From cfab8a70c513e97ab0c0bb3173287ecfb39cc808 Mon Sep 17 00:00:00 2001 From: gongdi <410827992@qq.com> Date: Sat, 12 Feb 2022 14:03:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=8B=E6=B5=A6=E5=AD=A6=E6=A0=A1=20?= =?UTF-8?q?=E5=BE=85=E5=8A=9E=E5=B7=A5=E4=BD=9C=E9=98=B6=E6=AE=B5=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/screenAdaptation/menuConfig.js | 2 +- .../todoHandle/business/BusinessItem.vue | 395 +++++++++++++++--- .../todoHandle/business/BusinessList.vue | 3 +- 3 files changed, 351 insertions(+), 49 deletions(-) diff --git a/src/views/screenAdaptation/menuConfig.js b/src/views/screenAdaptation/menuConfig.js index 057f71a..637b38b 100644 --- a/src/views/screenAdaptation/menuConfig.js +++ b/src/views/screenAdaptation/menuConfig.js @@ -1153,7 +1153,7 @@ const careerMenu = [ {id: 7, title: "测评报告", icon: "icon-cepingbaogao", logo: require("./assets/images/application/shy/测评报告.png")}, ] -const menuConfig = menuConfigYP; +const menuConfig = menuConfigDS; export { menuConfig, diff --git a/src/views/screenAdaptation/pages/adminCenter/messageProcessing/todoHandle/business/BusinessItem.vue b/src/views/screenAdaptation/pages/adminCenter/messageProcessing/todoHandle/business/BusinessItem.vue index 92ff69e..f032822 100644 --- a/src/views/screenAdaptation/pages/adminCenter/messageProcessing/todoHandle/business/BusinessItem.vue +++ b/src/views/screenAdaptation/pages/adminCenter/messageProcessing/todoHandle/business/BusinessItem.vue @@ -91,6 +91,7 @@ checkPersonId: "",//审核人ID checkPersonName: "",//审核人姓名 paramCopyList: [],//抄送人 + updateTs: "",//教师信息审批使用 } }, methods: { @@ -153,7 +154,6 @@ //自动办理--通过 automaticHandle: function () { let bizCode = this.businessData.biz_code; - console.log(bizCode) let infoBox = this.businessData.data_infomation; switch (bizCode) { case "106001001"://物品领用申请审批 @@ -206,7 +206,49 @@ this.modalOk(); break; case "105001001"://请假申请审批 - + case "105002001"://公出申请审批 + case "105003001"://出差申请审批 + case "105004001"://补卡申请审批 + var callBack = this.getLeaveApplyInfo(infoBox); + callBack.then((res) => { + this.hasNext = res.has_next; + if (this.hasNext === 1) { + this.checkPersonList = res.next_level.check_person_list; + this.nextLevelId = res.next_level.level_id; + } + this.openCopyFlag = 1;//开启抄送 + this.copyPersonType = 0;//自选 + /** + * visible为true的前提条件 + * 1、当前节点 开启抄送 并且抄送方式为自选或者指定 + * 2、存在下一审批节点 + * 3、1和2是“或者”关系 + */ + if (this.hasNext === 1) { + this.modalTitle = "审批节点"; + this.visible = true; + } else { + //直接处理 + this.modalOk(); + } + }) + break; + case "109001001"://资产新增审批 + case "109001002"://资产导入审批 + case "109001003"://资产入库审批 + case "109002001"://资产变更审批 + case "109003001"://资产领用审批 + case "109004001"://资产退库审批 + case "109005001"://资产调拨审批 + case "109006001"://资产借用审批 + case "109007001"://资产归还审批 + case "109008001"://资产报修审批 + case "109009001"://资产报废审批 + case "109010001"://资产处置审批 + this.modalOk(); + break; + case "110001"://教师类目信息维护 + this.modalOk(); break; default: break; @@ -259,7 +301,7 @@ }) return p; }, - //3、物品领用申请详情 + //3、获取物品领用申请详情 getGoodsApplyInfo: function (info) { let _this = this; let p = new Promise(function (resolve, reject) { @@ -283,6 +325,55 @@ }) return p; }, + //4、获取请假申请详情 + getLeaveApplyInfo: function (info) { + let _this = this; + let p = new Promise(function (resolve, reject) { + let params = { + run_id: info.run_id, + level_check: 1, + need_next: 1, + person_id: _this.BaseConfig.userInfo.person_id + } + _this.InterfaceConfig.callInterface([{ + url: interConfig.getLeaveApplyDetail.url, + params: params, + method: interConfig.getLeaveApplyDetail.method, + isTestLogin: interConfig.getLeaveApplyDetail.isTestLogin + }], (result) => { + let res = result[0].data; + if (res.code === 2000) { + resolve(res.data); + } + }) + }) + return p; + }, + //5、获取教师信息详情 + getTeacherInfo: function (dataId, info) { + let _this = this; + let p = new Promise(function (resolve, reject) { + let params = { + org_id: _this.BaseConfig.person_info_my.bureau_id, + system_id: 10, + form_id: info.form_id, + value_id: dataId, + teacher_id: info.person_id, + } + _this.InterfaceConfig.callInterface([{ + url: interConfig.getPersonalInfoByValueId.url, + params: params, + method: interConfig.getPersonalInfoByValueId.method, + isTestLogin: interConfig.getPersonalInfoByValueId.isTestLogin + }], (result) => { + let res = result[0].data; + if (res.code === 2000) { + resolve(res.data); + } + }) + }) + return p; + }, changeCheckPerson: function (personId) { @@ -302,24 +393,53 @@ }, modalOk: function () { let bizCode = this.businessData.biz_code; + let dataId = this.businessData.data_id; let infoBox = this.businessData.data_infomation; switch (bizCode) { - case "106001001": - //物品审批 + case "105001001": //请假审批 + case "105002001": //公出审批 + case "105003001": //出差审批 + case "105004001": //补卡审批 + this.checkLeaveApply(infoBox, 1); + break; + case "106001001"://物品审批 this.checkGoodsApply(infoBox, 1); break; - case "107001001": - //用车审批 + case "107001001"://用车审批 this.checkCarApply(infoBox, 1); break; - case "108001001": - //用车审批 + case "108001001"://会议室审批 this.checkMeetingApply(infoBox, 1); break; - case "107002001": - //用车归还审批 + case "107002001"://用车归还审批 this.checkCarReturnApply(infoBox, 1); break; + case "109001001"://资产新增审批 + case "109001002"://资产导入审批 + case "109001003"://资产入库审批 + case "109002001"://资产变更审批 + this.checkAssetsAddApply(bizCode, infoBox, 1); + break; + case "109003001"://资产领用审批 + case "109004001"://资产退库审批 + case "109005001"://资产调拨审批 + case "109006001"://资产借用审批 + case "109007001"://资产归还审批 + case "109008001"://资产报修审批 + case "109009001"://资产报废审批 + case "109010001"://资产处置审批 + this.checkAssetsOperateApply(bizCode, infoBox, 1); + break; + case "110001"://教师类目信息维护 + var callBack = this.getTeacherInfo(dataId, infoBox); + callBack.then((res) => { + let formDataList = res.form_data_list; + if (formDataList && formDataList.length > 0) { + this.updateTs = formDataList[0].update_ts; + } + this.checkTeacherInfoApply(dataId, infoBox, 1); + }) + break; default: break; } @@ -328,26 +448,53 @@ //自动办理--未通过 noPass: function () { let bizCode = this.businessData.biz_code; + let dataId = this.businessData.data_id; let infoBox = this.businessData.data_infomation; switch (bizCode) { - case "106001001": - //物品审批 + case "105001001": //请假审批 + case "105002001": //公出审批 + case "105003001": //出差审批 + case "105004001": //补卡审批 + this.checkLeaveApply(infoBox, -1); + break; + case "106001001"://物品审批 this.checkGoodsApply(infoBox, -1); break; - case "107001001": - //用车审批 + case "107001001"://用车审批 this.checkCarApply(infoBox, -1); break; - case "108001001": - //会议室审批 + case "108001001"://会议室审批 this.checkMeetingApply(infoBox, -1); break; - case "107002001": - //用车归还审批 + case "107002001"://用车归还审批 this.checkCarReturnApply(infoBox, 1); break; - case "105001001"://请假申请 - this.checkLeave(this.businessData.data_infomation); + case "109001001"://资产新增审批 + case "109001002"://资产导入审批 + case "109001003"://资产入库审批 + case "109002001"://资产变更审批 + this.checkAssetsAddApply(bizCode, infoBox, -1); + break; + case "109003001"://资产领用审批 + case "109004001"://资产退库审批 + case "109005001"://资产调拨审批 + case "109006001"://资产借用审批 + case "109007001"://资产归还审批 + case "109008001"://资产报修审批 + case "109009001"://资产报废审批 + case "109010001"://资产处置审批 + this.checkAssetsOperateApply(bizCode, infoBox, -1); + break; + case "110001"://教师类目信息维护 + var callBack = this.getTeacherInfo(dataId, infoBox); + callBack.then((res) => { + let formDataList = res.form_data_list; + if (formDataList && formDataList.length > 0) { + this.updateTs = formDataList[0].update_ts; + } + this.checkTeacherInfoApply(dataId, infoBox, -1); + }) + break; break; default: break; @@ -555,49 +702,203 @@ } }) }, - - //请假审批 - checkLeave: function (info) { - this.getInfo(info.run_id).then((result) => { + //请假、公出审批 + checkLeaveApply: function (infoBox, state) { + let options = this.$refs.approveCom ? this.$refs.approveCom.options : ""; + if (state === -1) { + options = "审批未通过"; + } + let submitParam = { + check_id: infoBox.check_id, + status_id: state, + person_id: this.BaseConfig.userInfo.person_id_cookie, + check_opinion: options, + has_next: this.hasNext, + } + if (state === 1 && this.hasNext === 1) { + submitParam.next_level_id = this.nextLevelId; + submitParam.next_person_id = this.checkPersonId; + submitParam.next_person_name = this.checkPersonName; + } + if (this.copyPersonType === 1 && this.copyPersonList.length > 0) { + //部门领导 + submitParam.copy_list = JSON.stringify(this.copyPersonList); + } + if (this.copyPersonType !== 1 && this.paramCopyList.length > 0) { + //其他方式 + submitParam.copy_list = JSON.stringify(this.paramCopyList); + } + this.InterfaceConfig.callInterface([{ + url: interConfig.leaveCheck.url, + params: submitParam, + method: interConfig.leaveCheck.method, + isTestLogin: interConfig.leaveCheck.isTestLogin + }], (result) => { + let res = result[0].data; + if (res.code === 2000) { + Modal.success({ + title: "审批成功", + content: "", + centered: true + }) + this.$emit("updateModuleList") + this.spinning = false; + } else { + this.spinning = false; + } + }) + }, + //资产新增审批 + checkAssetsAddApply: function (code, infoBox, state) { + let options = state === 1 ? "审批通过" : "审批未通过"; + this.getNowTime().then((time) => { + let operation_time = time.datetime; let submitParam = { - check_id: info.check_id, - status_id: -1, - person_id: this.BaseConfig.userInfo.person_id_cookie, - check_opinion: "申请未通过", - has_next: result.has_next, + receipt_id: infoBox.receipt_id, + update_ts: infoBox.update_ts, + check_flag: state, + check_info: options, + operation_person_id: this.BaseConfig.userInfo.person_id_cookie, + operation_identity_id: this.BaseConfig.userInfo.identity_id, + operation_time: operation_time + } + let url = ""; + let method = ""; + let isTestLogin = ""; + if (code === "109001001" || code === "109001002" || code === "109001003") { + url = interConfig.checkIncreaseReceipt.url; + method = interConfig.checkIncreaseReceipt.method; + isTestLogin = interConfig.checkIncreaseReceipt.isTestLogin; + } else if (code === "109002001") { + url = interConfig.checkChangeReceipt.url; + method = interConfig.checkChangeReceipt.method; + isTestLogin = interConfig.checkChangeReceipt.isTestLogin; } this.InterfaceConfig.callInterface([{ - url: interConfig.leaveCheck.url, + url: url, params: submitParam, - method: interConfig.leaveCheck.method, - isTestLogin: interConfig.leaveCheck.isTestLogin + method: method, + isTestLogin: isTestLogin }], (result) => { let res = result[0].data; if (res.code === 2000) { - this.$emit("updateModuleList"); Modal.success({ title: "审批成功", content: "", centered: true }) + this.$emit("updateModuleList") + this.spinning = false; + } else { + this.spinning = false; } }) + }); + }, + //资产操作审批 + checkAssetsOperateApply: function (code, infoBox, state) { + let options = state === 1 ? "审批通过" : "审批未通过"; + let receiptType = 0; + switch (code) { + case "109003001"://资产领用 + receiptType = 3; + break; + case "109004001"://资产退库 + receiptType = 4; + break; + case "109005001"://资产调拨 + receiptType = 5; + break; + case "109006001"://资产借用 + receiptType = 6; + break; + case "109007001"://资产归还 + receiptType = 7; + break; + case "109008001"://资产报修 + receiptType = 8; + break; + case "109009001"://资产报废 + receiptType = 9; + break; + case "109010001"://资产处置 + receiptType = 10; + break; + default: + break; + } + let submitParam = { + org_id: this.BaseConfig.person_info_my.bureau_id, + receipt_type: receiptType, + receipt_id: infoBox.receipt_id, + check_flag: state, + check_info: options, + person_id: this.BaseConfig.userInfo.person_id_cookie, + identity_id: this.BaseConfig.userInfo.identity_id, + update_ts: infoBox.update_ts, + } + this.InterfaceConfig.callInterface([{ + url: interConfig.checkAssetReceipt.url, + params: submitParam, + method: interConfig.checkAssetReceipt.method, + isTestLogin: interConfig.checkAssetReceipt.isTestLogin + }], (result) => { + let res = result[0].data; + if (res.code === 2000) { + Modal.success({ + title: "审批成功", + content: "", + centered: true + }) + this.$emit("updateModuleList") + this.spinning = false; + } else { + this.spinning = false; + } }) }, - getInfo: function (runId) { - var _this = this; - var p = new Promise((resolve, reject) => { - let params = { - run_id: runId, - level_check: 1, - need_next: 1, - person_id: _this.BaseConfig.userInfo.person_id + //教师类目申请审批 + checkTeacherInfoApply: function (dataId, infoBox, state) { + let options = state === 1 ? "审批通过" : "审批未通过"; + let submitParam = { + org_id: this.BaseConfig.person_info_my.bureau_id, + system_id: 10, + form_id: infoBox.form_id, + value_ids: dataId, + check_flag: state, + check_info: options, + person_id: this.BaseConfig.userInfo.person_id_cookie, + dept_id: this.BaseConfig.person_info_my.dep_id, + update_ts: this.updateTs + } + this.InterfaceConfig.callInterface([{ + url: interConfig.saveCheckInfoByValueId.url, + params: submitParam, + method: interConfig.saveCheckInfoByValueId.method, + isTestLogin: interConfig.saveCheckInfoByValueId.isTestLogin + }], (result) => { + let res = result[0].data; + if (res.code === 2000) { + Modal.success({ + title: "审批成功", + content: "", + centered: true + }) + this.$emit("updateModuleList") + this.spinning = false; + } else { + this.spinning = false; } + }) + }, + //获取系统时间 + getNowTime: function () { + let _this = this; + let getTime = new Promise(function (resolve, reject) { _this.InterfaceConfig.callInterface([{ - url: interConfig.getLeaveApplyDetail.url, - params: params, - method: interConfig.getLeaveApplyDetail.method, - isTestLogin: interConfig.getLeaveApplyDetail.isTestLogin + url: interConfig.getNowTime.url, + method: interConfig.getNowTime.method, + isTestLogin: interConfig.getNowTime.isTestLogin }], (result) => { let res = result[0].data; if (res.code === 2000) { @@ -605,7 +906,7 @@ } }) }) - return p; + return getTime; }, }, watch: { diff --git a/src/views/screenAdaptation/pages/adminCenter/messageProcessing/todoHandle/business/BusinessList.vue b/src/views/screenAdaptation/pages/adminCenter/messageProcessing/todoHandle/business/BusinessList.vue index b8a640f..17ea48c 100644 --- a/src/views/screenAdaptation/pages/adminCenter/messageProcessing/todoHandle/business/BusinessList.vue +++ b/src/views/screenAdaptation/pages/adminCenter/messageProcessing/todoHandle/business/BusinessList.vue @@ -698,7 +698,7 @@ this.moduleParam = item.data_infomation; break; case "109001003": - this.infoTitle = "资产导入审批"; + this.infoTitle = "资产入库审批"; this.moduleComponent = () => import('../modulComponent/assetsImportApprove.vue'); this.moduleParam = item.data_infomation; break; @@ -752,6 +752,7 @@ case "109010001": this.infoTitle = "资产处置审批"; this.moduleComponent = () => import('../modulComponent/assetsOperateApprove.vue'); + item.data_infomation.receipt_type = 10; this.moduleParam = item.data_infomation; break; case "110001":