From bd0c42c711c77be2a060d93ebdd0f9ad5273443c Mon Sep 17 00:00:00 2001 From: water_xu Date: Wed, 24 Jul 2024 08:48:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E4=B8=AD=E5=8F=B0=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PersonManager/user/components/add.vue | 95 +- .../PersonManager/user/components/edit.vue | 87 +- .../PersonManager/user/components/list.vue | 84 +- .../userCenter/components/add.vue | 1530 +++++++++++++++ .../userCenter/components/edit.vue | 1747 +++++++++++++++++ .../userCenter/components/list.vue | 1006 ++++++++++ .../userCenter/components/view.vue | 326 +++ src/views/PersonManager/userCenter/index.vue | 41 + 8 files changed, 4892 insertions(+), 24 deletions(-) create mode 100644 src/views/PersonManager/userCenter/components/add.vue create mode 100644 src/views/PersonManager/userCenter/components/edit.vue create mode 100644 src/views/PersonManager/userCenter/components/list.vue create mode 100644 src/views/PersonManager/userCenter/components/view.vue create mode 100644 src/views/PersonManager/userCenter/index.vue diff --git a/src/views/PersonManager/user/components/add.vue b/src/views/PersonManager/user/components/add.vue index f63f04a..3857595 100644 --- a/src/views/PersonManager/user/components/add.vue +++ b/src/views/PersonManager/user/components/add.vue @@ -39,7 +39,7 @@ - + @@ -69,7 +69,7 @@ - + @@ -92,7 +92,13 @@ - + + + + + + + @@ -392,7 +398,8 @@
- 保 存 + 保 存 + 校 验 返 回
@@ -538,6 +545,8 @@ export default { callback() } return { + ISCHECK: false, + ISPUSH: false, buttonLoading: false, DEPARTMENT_NAME: '', dayTime: [], @@ -581,7 +590,7 @@ export default { ], rules: { NAME: [{ required: true, message: '姓名不能为空', trigger: 'blur' }], - NATIONALITY: [{ required: false, message: '民族不能为空', trigger: 'blur' }], + NATIONALITY: [{ required: true, message: '民族不能为空', trigger: 'blur' }], IS_BF: [{ required: true, message: '请选择是否缴纳保险', trigger: 'blur' }], IS_SOCIAL: [{ required: true, message: '请选择是否缴纳社保', trigger: 'blur' }], POLITICAL_STATUS: [{ required: true, message: '请选择政治面貌', trigger: 'blur' }], @@ -639,6 +648,7 @@ export default { }, { validator: hasCARD, trigger: 'blur' } ], + EMAIL: [{ required: true, message: '电子邮箱不能为空', trigger: 'blur' }], AGE: [{ required: true, message: '年龄不能为空', trigger: 'blur' }, { pattern: /^\d{2}$/, @@ -825,6 +835,79 @@ export default { } }, methods: { + goPush(row) { + requestFN( + 'user/goPush', + { + USER_ID: row.USER_ID, + STATUS: row.STATUS, + BZ: row.BZ, + SKIN: row.SKIN, + PHONE: row.PHONE, + NUMBER: row.NUMBER, + CARD_NO: row.CARD_ID, + USERNAME: row.USERNAME, + NAME: row.NAME, + CORPINFO_ID: row.CORPINFO_ID, + CORPINFO_NAME: row.CORPINFO_NAME || '', + DEPARTMENT_ID: row.DEPARTMENT_ID, + DEPARTMENT_NAME: row.DEPARTMENT_NAME, + IMGFILES_ID: row.IMGFILES_ID, + FOREIGN_KEY: row.FOREIGN_KEY, + FILEPATH: row.FILEPATH, + EMAIL: row.EMAIL || '', + CARD_TYPE: '111', + CARD_TYPE_NAME: '身份证', + NATION: row.NATIONALITY || '', + SEX: row.SEX || '', + USER_TYPE: '2', + ISDELETE: row.ISDELETE + } + ).then((data) => { + if (data.result === 'success') { + this.$message.success('推送成功') + this.$parent.activeName = 'List' + } else { + this.$message.error('推送失败,' + data.msg) + this.$parent.activeName = 'List' + } + }).catch((e) => { + this.listLoading = false + }) + }, + goCheck() { + if (this.form.CARD_ID && this.form.USERNAME) { + const phoneJudge = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[0-9])\d{8}$/ + const phoneResult = phoneJudge.test(this.form.USERNAME) + const cardJudge = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/ + const cardResult = cardJudge.test(this.form.CARD_ID) + if (phoneResult && cardResult) { + console.log('格式校验通过') + requestFN( + 'user/goCheck', + { + CARD_NO: this.form.CARD_ID, + USERNAME: this.form.USERNAME + } + ).then((data) => { + if (data.result === 'success') { + this.$message.success('验证通过') + this.ISCHECK = true + } else { + this.$message.error('验证失败,请确认身份证号与手机号是否正确') + this.ISCHECK = false + } + }).catch((e) => { + this.listLoading = false + this.ISCHECK = false + }) + } else { + this.ISCHECK = false + } + } else { + this.ISCHECK = false + } + }, /** 三级教育培训 **/ handleLevelPhotoRemove(file, fileList) { this.form.photosOfLevel = fileList @@ -1011,7 +1094,7 @@ export default { '/user/' + this.dialogType, formData ).then((data) => { - this.$parent.activeName = 'List' + this.goPush(data.pd) this.listLoading = false this.buttonLoading = false }).catch((e) => { diff --git a/src/views/PersonManager/user/components/edit.vue b/src/views/PersonManager/user/components/edit.vue index 745e42d..730423b 100644 --- a/src/views/PersonManager/user/components/edit.vue +++ b/src/views/PersonManager/user/components/edit.vue @@ -35,7 +35,7 @@
- +
@@ -398,7 +398,8 @@
- 保 存 + 保 存 + 校 验 返 回
@@ -544,6 +545,8 @@ export default { callback() } return { + ISCHECK: false, + USER_ID: "", imgDelKey: [], zhebaoUpload: false, // 社保卡照片 photosOfLevel: false, // 三级教育培训照片 @@ -590,7 +593,7 @@ export default { rules: { NAME: [{ required: true, message: '姓名不能为空', trigger: 'blur' }], POLITICAL_STATUS: [{ required: true, message: '请选择政治面貌', trigger: 'blur' }], - NATIONALITY: [{ required: false, message: '请选择民族', trigger: 'blur' }], + NATIONALITY: [{ required: true, message: '请选择民族', trigger: 'blur' }], POLITICAL_TIME: [{ required: true, validator: isCommunist, message: '请选择入党时间', trigger: 'blur' }], USERNAME: [ { required: true, message: '用户名不能为空', trigger: 'blur' }, @@ -891,6 +894,81 @@ export default { this.getDict() }, methods: { + goCheck() { + if (this.form.CARD_ID && this.form.USERNAME) { + const phoneJudge = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[0-9])\d{8}$/ + const phoneResult = phoneJudge.test(this.form.USERNAME) + const cardJudge = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/ + const cardResult = cardJudge.test(this.form.CARD_ID) + if (phoneResult && cardResult) { + console.log('格式校验通过') + requestFN( + 'user/goCheck', + { + USER_ID: this.form.USER_ID, + CARD_NO: this.form.CARD_ID, + USERNAME: this.form.USERNAME + } + ).then((data) => { + if (data.result === 'success') { + this.$message.success('验证通过') + this.ISCHECK = true + } else { + this.$message.error('验证失败,请确认身份证号与手机号是否正确') + this.ISCHECK = false + } + }).catch((e) => { + this.listLoading = false + this.ISCHECK = false + }) + } else { + this.ISCHECK = false + } + } else { + this.$message.warning('请确认身份证号与手机号后进行校验') + this.ISCHECK = false + } + }, + goPush(row) { + requestFN( + 'user/goPush', + { + USER_ID: row.USER_ID, + STATUS: row.STATUS, + BZ: row.BZ, + SKIN: row.SKIN, + PHONE: row.PHONE, + NUMBER: row.NUMBER, + CARD_NO: row.CARD_ID, + USERNAME: row.USERNAME, + NAME: row.NAME, + CORPINFO_ID: row.CORPINFO_ID, + CORPINFO_NAME: row.CORPINFO_NAME || '', + DEPARTMENT_ID: row.DEPARTMENT_ID, + DEPARTMENT_NAME: row.DEPARTMENT_NAME, + IMGFILES_ID: row.IMGFILES_ID, + FOREIGN_KEY: row.FOREIGN_KEY, + FILEPATH: row.FILEPATH, + EMAIL: row.EMAIL || '', + CARD_TYPE: '111', + CARD_TYPE_NAME: '身份证', + NATION: row.NATIONALITY || '', + SEX: row.SEX || '', + USER_TYPE: '2', + ISDELETE: row.ISDELETE + } + ).then((data) => { + if (data.result === 'success') { + this.$message.success('推送成功') + this.$parent.activeName = 'List' + } else { + this.$message.error('推送失败,' + data.msg) + this.$parent.activeName = 'List' + } + }).catch((e) => { + this.listLoading = false + }) + }, // 查询是否有特种证书 checkSpecialCertificateList() { return new Promise((resolve, reject) => { @@ -1156,11 +1234,10 @@ export default { formData ).then((data) => { this.$message.success('保存成功!') - this.$parent.activeName = 'List' + this.goPush(data.pd) this.listLoading = false this.buttonLoading = false }).catch((e) => { - this.$message.success('保存失败!') this.listLoading = false this.buttonLoading = false }) diff --git a/src/views/PersonManager/user/components/list.vue b/src/views/PersonManager/user/components/list.vue index 40cbf36..6e79508 100644 --- a/src/views/PersonManager/user/components/list.vue +++ b/src/views/PersonManager/user/components/list.vue @@ -141,10 +141,11 @@ 编辑 重置密码 删除 - 启用 - 禁用 + 启用 + 禁用 打印 + 推送 @@ -457,6 +458,47 @@ export default { this.getTreeList() }, methods: { + goPush(row) { + requestFN( + 'user/goPush', + { + USER_ID: row.USER_ID, + STATUS: row.STATUS, + BZ: row.BZ, + SKIN: row.SKIN, + PHONE: row.PHONE, + NUMBER: row.NUMBER, + CARD_NO: row.CARD_ID, + USERNAME: row.USERNAME, + NAME: row.NAME, + CORPINFO_ID: row.CORPINFO_ID, + CORPINFO_NAME: row.CORPINFO_NAME || '', + DEPARTMENT_ID: row.DEPARTMENT_ID, + DEPARTMENT_NAME: row.DEPARTMENT_NAME, + IMGFILES_ID: row.IMGFILES_ID, + FOREIGN_KEY: row.FOREIGN_KEY, + FILEPATH: row.FILEPATH, + EMAIL: row.EMAIL || '', + CARD_TYPE: '111', + CARD_TYPE_NAME: '身份证', + NATION: row.NATIONALITY || '', + SEX: row.SEX || '', + USER_TYPE: '2', + ISUSE: row.ISUSE, + ISDELETE: row.ISDELETE + } + ).then((data) => { + if (data.result === 'success') { + this.$message.success('推送成功') + this.getList() + } else { + this.$message.error('推送失败,' + data.msg) + this.getList() + } + }).catch((e) => { + this.listLoading = false + }) + }, getRowKey(row) { return row.USER_ID }, @@ -593,7 +635,8 @@ export default { PHONE: row.PHONE, CARD_ID: row.CARD_ID, DEPARTMENT_NAME: row.DEPARTMENT_NAME, - CORPINFO_ID: row.CORPINFO_ID + CORPINFO_ID: row.CORPINFO_ID, + ISPUSH: row.ISPUSH } ).then((data) => { if (data.result == 'success') { @@ -629,7 +672,8 @@ export default { DEPART_STATE: this.DEPART_STATE, BASIC_STATE: this.BASIC_STATE, CARD_ID: this.ID_CARD, - USER_ID: this.USER_ID + USER_ID: this.USER_ID, + ISPUSH: '1' } ).then((data) => { this.listLoading = false @@ -650,7 +694,7 @@ export default { }) }, // 禁用 启用 - enableORDisable(ISUSE, USER_ID) { + enableORDisable(ISUSE, row) { this.$confirm(ISUSE === '0' ? '确定要启用该账户吗?' : '确定要禁用该账户吗?', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -660,8 +704,8 @@ export default { requestFN( '/user/editisuse', { - USER_ID, - ISUSE + USER_ID: row.USER_ID, + ISUSE: ISUSE } ).then(() => { this.$message({ @@ -671,7 +715,8 @@ export default { this.listLoading = false this.varList = [] this.listQuery.page = 1 - this.getList() + row.ISUSE = ISUSE + this.goPush(row) }).catch((e) => { this.listLoading = false }) @@ -746,11 +791,24 @@ export default { dangerouslyUseHTMLString: true }) } else { - this.$message({ - message: '导入成功。
一共解析了' + data.importCount + '条数据。
其中新增' + data.saveCount + '条数据。' + '修改' + data.updCount + '条数据。
', - dangerouslyUseHTMLString: true, - type: 'success' - }) + console.log(data.uncheckMsg) + if (data.uncheckMsg) { + this.$message({ + message: '导入成功,但部分数据验重或推送失败
一共解析了' + data.importCount + '条数据。
其中新增' + data.saveCount + '条数据。' + '修改' + data.updCount + '条数据。
' + data.pushMsg + '
' + data.uncheckMsg + '
', + duration: 5000, + showClose: true, + dangerouslyUseHTMLString: true, + type: 'error' + }) + } else { + this.$message({ + message: '导入成功。
一共解析了' + data.importCount + '条数据。
其中新增' + data.saveCount + '条数据。' + '修改' + data.updCount + '条数据。
' + data.pushMsg + '
', + duration: 5000, + showClose: true, + dangerouslyUseHTMLString: true, + type: 'success' + }) + } this.dialogFormDaoru = false this.getList() } diff --git a/src/views/PersonManager/userCenter/components/add.vue b/src/views/PersonManager/userCenter/components/add.vue new file mode 100644 index 0000000..2e3249b --- /dev/null +++ b/src/views/PersonManager/userCenter/components/add.vue @@ -0,0 +1,1530 @@ + + + + + + diff --git a/src/views/PersonManager/userCenter/components/edit.vue b/src/views/PersonManager/userCenter/components/edit.vue new file mode 100644 index 0000000..f4d3140 --- /dev/null +++ b/src/views/PersonManager/userCenter/components/edit.vue @@ -0,0 +1,1747 @@ + + + + + + diff --git a/src/views/PersonManager/userCenter/components/list.vue b/src/views/PersonManager/userCenter/components/list.vue new file mode 100644 index 0000000..80a194e --- /dev/null +++ b/src/views/PersonManager/userCenter/components/list.vue @@ -0,0 +1,1006 @@ + + + + + + + diff --git a/src/views/PersonManager/userCenter/components/view.vue b/src/views/PersonManager/userCenter/components/view.vue new file mode 100644 index 0000000..f341d35 --- /dev/null +++ b/src/views/PersonManager/userCenter/components/view.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/views/PersonManager/userCenter/index.vue b/src/views/PersonManager/userCenter/index.vue new file mode 100644 index 0000000..49fc989 --- /dev/null +++ b/src/views/PersonManager/userCenter/index.vue @@ -0,0 +1,41 @@ + + + + +