-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
@@ -154,18 +136,29 @@
-
-
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
-
-
+
+
+
+
@@ -173,16 +166,42 @@
size="mini"
type="text"
icon="el-icon-edit"
- @click="handleUpdate(scope.row)"
+ @click="registered(scope.row)"
v-hasPermi="['invoiceall:invoiceallyhdj:edit']"
- >修改
+ v-if="scope.row.dqbm != null
+ && scope.row.dqbm != ''
+ && scope.row.dlfs != null
+ && scope.row.dlfs != ''
+ && scope.row.dlsfmm != null
+ && scope.row.dlsfmm != ''
+ && scope.row.dlmm != null
+ && scope.row.dlmm != ''
+ && scope.row.dlzh != null
+ && scope.row.dlzh != ''
+ && scope.row.nsrmc != null
+ && scope.row.nsrmc != ''
+ && scope.row.nsrsbh != null
+ && scope.row.nsrsbh != ''
+ && scope.row.bsrysfzjhm != null
+ && scope.row.bsrysfzjhm != ''
+ && scope.row.identity != null
+ && scope.row.identity != ''"
+ >登记
删除
+ v-show="scope.row.dqbm != null
+ && scope.row.dqbm != ''
+ && scope.row.nsrsbh != null
+ && scope.row.nsrsbh != ''
+ && scope.row.bsrysfzjhm != null
+ && scope.row.bsrysfzjhm != ''
+ && scope.row.identity != null
+ && scope.row.identity != ''"
+ >人脸识别
@@ -195,20 +214,28 @@
@pagination="getList"
/>
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
@@ -222,15 +249,21 @@
-
-
+
+
-
-
+
+
+
+
+
+
+
+
@@ -249,17 +282,23 @@ import {
getInvoiceallyhdj,
delInvoiceallyhdj,
addInvoiceallyhdj,
- updateInvoiceallyhdj
+ updateInvoiceallyhdj,
+ registeredMethod,
+ getCompanyservice,
+ qrcodeMethod,
+ encrypt
} from "@/api/digital/registered";
export default {
name: "Invoiceallyhdj",
+ dicts: ['login_dlsf','login_dlfs'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
+ should : false,
// 非单个禁用
single: true,
// 非多个禁用
@@ -294,7 +333,79 @@ export default {
form: {},
// 表单校验
rules: {
- }
+ identity: [
+ { required: true, message: "属性不能为空", trigger: "blur" }
+ ],
+ bsryxm : [
+ { required: true, message: "属性不能为空", trigger: "blur" }
+ ],
+ dqbm : [
+ { required: true, message: "属性不能为空", trigger: "blur" }
+ ],
+ dlsf : [
+ { required: true, message: "属性不能为空", trigger: "blur" }
+ ],
+ dlsfmm : [
+ { required: true, message: "属性不能为空", trigger: "blur" }
+ ],
+ dlmm : [
+ { required: true, message: "属性不能为空", trigger: "blur" }
+ ],
+ dlzh : [
+ { required: true, message: "属性不能为空", trigger: "blur" }
+ ],
+ nsrmc : [
+ { required: true, message: "属性不能为空", trigger: "blur" }
+ ],
+ nsrsbh : [
+ { required: true, message: "属性不能为空", trigger: "blur" }
+ ],
+ bsrysfzjhm : [
+ { required: true, message: "属性不能为空", trigger: "blur" }
+ ],
+ bsrysjhm : [
+ { required: true, message: "属性不能为空", trigger: "blur" }
+ ]
+ },
+ //登记参数
+ registeredParams: {
+ appkey: "935248bf224f6c8431cdc1969f029519",
+ async: false,
+ bsrysfzjhm: "",
+ serviceId: "yhdj",
+ dqbm: "",
+ nsrsbh: "",
+ jsonData: {
+ bsryxm: "",
+ dlsf: "",
+ dlsfmm: "",
+ dlfs: "",
+ dlmm: "",
+ dlzh: "",
+ nsrmc: "",
+ nsrsbh: "",
+ bsrysfzjhm: "",
+ bsrysjhm: "",
+ zjh: "",
+ deviceType: "",
+ userExt: {
+ }
+ }
+
+ },
+
+ //获取人脸二维码参数
+ qrcodeParams : {
+ appkey: "935248bf224f6c8431cdc1969f029519",
+ async: true,
+ bsrysfzjhm:"",
+ dqbm: "",
+ nsrsbh: "",
+ jsonData: {
+ rlsblx: ""
+ },
+ serviceId: "hqrlsbewm"
+ },
};
},
created() {
@@ -334,6 +445,8 @@ export default {
createTime: null,
updateBy: null,
updateTime: null,
+ identity: null,
+ dqbm: null,
remark: null
};
this.resetForm("form");
@@ -358,7 +471,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
- this.title = "添加金四-用户登记";
+ this.title = "添加用户登记";
},
/** 修改按钮操作 */
handleUpdate(row) {
@@ -370,6 +483,90 @@ export default {
this.title = "修改金四-用户登记";
});
},
+ //登记方法
+ registered(row) {
+ this.reset();
+
+ getCompanyservice(row.identity).then(resp=>{
+ //请求成功
+ if(resp.code==200 && resp.data != null && resp.data != ""){
+ this.convertRegistedParam(row,true)
+ const requestBody = {
+ key: resp.data.secret,
+ order: JSON.stringify(this.registeredParams),
+ }
+ encrypt(requestBody).then(res => {
+ if (res.code == 200 && res.data != null && res.data != "") {
+ registeredMethod(res.data,row.identity).then(response => {
+ if (response.code == 200){
+ this.$message.success('请求登记成功')
+ }
+ });
+ }else if (res.data == null || res.data == ""){
+ this.$message.error('报文加密失败')
+ }
+ })
+ }else if(resp.data == null || resp.data == "") {
+ this.$message.error('请检查企业ID配置')
+ }
+
+ })
+ },
+ /** 人脸识别 */
+ qrcode(row){
+ this.reset();
+ getCompanyservice(row.identity).then(resp=>{
+ //请求成功
+ if(resp.code==200 && resp.data != null && resp.data != ""){
+ this.convertRegistedParam(row,false)
+ const requestBody = {
+ key: resp.data.secret,
+ order: JSON.stringify(this.registeredParams),
+ }
+ encrypt(requestBody).then(res => {
+ if (res.code == 200 && res.data != null && res.data != "") {
+ qrcodeMethod(res.data,row.identity).then(response => {
+ if (response.code == 200 && response.data != null && response.data != ""){
+
+ if (response.data.ewm != null && response.data.ewm != ""){
+ this.$message.success('登记成功')
+ }else {
+ this.$message.error('登记失败')
+ }
+ }else {
+ this.$message.error('登记失败')
+ }
+ });
+ }else if (res.data == null || res.data == ""){
+ this.$message.error('报文加密失败')
+ }
+ })
+ }else if (resp.data == null || resp.data == ""){
+ this.$message.error('请检查企业ID配置')
+ }
+
+ })
+ },
+ convertRegistedParam(row,flag){
+ if (flag){
+ this.registeredParams.bsrysfzjhm = row.bsrysfzjhm;
+ this.registeredParams.dqbm = row.dqbm;
+ this.registeredParams.nsrsbh = row.nsrsbh;
+ this.registeredParams.jsonData.bsryxm = row.bsryxm;
+ this.registeredParams.jsonData.dlsf = row.dlsf;
+ this.registeredParams.jsonData.dlsfmm = row.dlsfmm;
+ this.registeredParams.jsonData.dlfs = row.dlfs;
+ this.registeredParams.jsonData.dlmm = row.dlmm;
+ this.registeredParams.jsonData.nsrmc = row.nsrmc;
+ this.registeredParams.jsonData.nsrsbh = row.nsrsbh;
+ this.registeredParams.jsonData.bsrysjhm = row.bsrysjhm;
+ this.registeredParams.jsonData.zjh = row.zjh;
+ }else {
+ this.qrcodeParams.bsrysfzjhm = row.bsrysfzjhm;
+ this.qrcodeParams.dqbm = row.dqbm;
+ this.qrcodeParams.nsrsbh = row.nsrsbh;
+ }
+ },
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
diff --git a/sql/invoiceallyhdjMenu.sql b/sql/invoiceallyhdjMenu.sql
new file mode 100644
index 0000000..ca85473
--- /dev/null
+++ b/sql/invoiceallyhdjMenu.sql
@@ -0,0 +1,43 @@
+
+-- 顶级目录sql
+INSERT INTO `jianshui_dev`.`sys_menu`( `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ('数电配置', 0, 10, 'digital', NULL, '', 1, 0, 'M', '0', '0', '', 'system', 'admin', '2021-12-09 16:18:41', 'admin', '2021-12-21 15:06:58', '数电配置目录');
+
+-- 菜单 SQL
+SELECT @parentId := LAST_INSERT_ID();
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('用户登记', @parentId, '1', 'registered', 'digital/registered/index', 1, 0, 'C', '0', '0', 'digital:registered:list', '#', 'admin', sysdate(), '', null, '用户登记菜单');
+
+-- 按钮父菜单ID
+SELECT @parentId := LAST_INSERT_ID();
+
+-- 按钮 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('用户登记查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'digital:registered:query', '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('用户登记新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'digital:registered:add', '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('用户登记修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'digital:registered:edit', '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('用户登记删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'digital:registered:remove', '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('用户登记导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'digital:registered:export', '#', 'admin', sysdate(), '', null, '');
+
+-- 登陆身份字典
+INSERT INTO `jianshui_dev`.`sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 1, '财务负责人', '1', 'login_dlsf', NULL, 'default', 'N', '0', 'admin', NOW(), '', NOW(), NULL);
+INSERT INTO `jianshui_dev`.`sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 2, '法定代表人', '2', 'login_dlsf', NULL, 'default', 'N', '0', 'admin', NOW(), '', NOW(), NULL);
+INSERT INTO `jianshui_dev`.`sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 3, '办税人', '3', 'login_dlsf', NULL, 'default', 'N', '0', 'admin', NOW(), '', NOW(), NULL);
+INSERT INTO `jianshui_dev`.`sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 4, '购票员', '4', 'login_dlsf', NULL, 'default', 'N', '0', 'admin', NOW(), '', NOW(), NULL);
+INSERT INTO `jianshui_dev`.`sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 5, '普通管理员', '5', 'login_dlsf', NULL, 'default', 'N', '0', 'admin', NOW(), '', NOW(), NULL);
+INSERT INTO `jianshui_dev`.`sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 6, '销售人员', '6', 'login_dlsf', NULL, 'default', 'N', '0', 'admin', NOW(), '', NOW(), NULL);
+INSERT INTO `jianshui_dev`.`sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 7, '开票员', '7', 'login_dlsf', NULL, 'default', 'N', '0', 'admin', NOW(), '', NOW(), NULL);
+INSERT INTO `jianshui_dev`.`sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 8, '其他', '99', 'login_dlsf', NULL, 'default', 'N', '0', 'admin', NOW(), '', NOW(), NULL);
+
+--登陆方式字典
+INSERT INTO `jianshui_dev`.`sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 1, '证书登录', '1', 'login_dlfs', NULL, 'default', 'N', '0', 'admin', NOW(), '', NOW(), NULL);
+INSERT INTO `jianshui_dev`.`sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 2, '账密或中间号方式登录', '2', 'login_dlfs', NULL, 'default', 'N', '0', 'admin', NOW(), '', NOW(), NULL);
+INSERT INTO `jianshui_dev`.`sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 3, '自主授权', '3', 'login_dlfs', NULL, 'default', 'N', '0', 'admin', NOW(), '', NOW(), NULL);
+INSERT INTO `jianshui_dev`.`sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 4, '数电客户端', '4', 'login_dlfs', NULL, 'default', 'N', '0', 'admin', NOW(), '', NOW(), NULL);
\ No newline at end of file