diff --git a/pages/application/hotwork/hotwork-accept/hotwork-accept-detail.vue b/pages/application/hotwork/hotwork-accept/hotwork-accept-detail.vue index dde6ba1..998cda5 100644 --- a/pages/application/hotwork/hotwork-accept/hotwork-accept-detail.vue +++ b/pages/application/hotwork/hotwork-accept/hotwork-accept-detail.vue @@ -348,7 +348,7 @@ this.pd.ACCEPT_TIME = e this.$forceUpdate();//强制刷新 }, - goSubmit(){ + goSubmit(APPLY_STATUS){ var _this = this; let required = true uni.showLoading({ @@ -380,6 +380,7 @@ formData.HOTWORK_ID = this.pd.HOTWORK_ID formData.DESCR = this.pd.DESCR formData.USER_ID = loginUser.USER_ID + formData.APPLY_STATUS = APPLY_STATUS uni.uploadFile({ url: basePath+'app/hotwork/nextStep', files: files, diff --git a/pages/application/hotwork/hotwork-acceptconfess/hotwork-acceptconfess-detail.vue b/pages/application/hotwork/hotwork-acceptconfess/hotwork-acceptconfess-detail.vue index c442c82..1e3c688 100644 --- a/pages/application/hotwork/hotwork-acceptconfess/hotwork-acceptconfess-detail.vue +++ b/pages/application/hotwork/hotwork-acceptconfess/hotwork-acceptconfess-detail.vue @@ -219,7 +219,7 @@ } }); }, - goSubmit(){ + goSubmit(APPLY_STATUS){ var _this = this; let required = true uni.showLoading({ @@ -242,6 +242,7 @@ formData.SIGNTIME = signtime.join(",") formData.HOTWORK_ID = this.pd.HOTWORK_ID formData.USER_ID = loginUser.USER_ID + formData.APPLY_STATUS = APPLY_STATUS uni.uploadFile({ url: basePath+'app/hotwork/nextStep', files: fileList, diff --git a/pages/application/hotwork/hotwork-apply/hotwork-apply-detail.vue b/pages/application/hotwork/hotwork-apply/hotwork-apply-detail.vue index 0fb0812..1e62a0e 100644 --- a/pages/application/hotwork/hotwork-apply/hotwork-apply-detail.vue +++ b/pages/application/hotwork/hotwork-apply/hotwork-apply-detail.vue @@ -785,19 +785,17 @@ _this.pd = res.data.pd; //参数map if(_this.pd.STEP_ID == 0){ _this.forbidEdit = false; + this.getUserList(this.pd.ANALYZE_DEPARTMENT_ID,'analyzeUserList'); + this.getUserList(this.pd.CONFIRM_DEPARTMENT_ID,'confirmUserList'); + this.getUserList(this.pd.LEADER_DEPARTMENT_ID,'leaderUserList'); + this.getUserList(this.pd.AUDIT_DEPARTMENT_ID,'auditUserList'); + this.getUserList(this.pd.APPROVE_DEPARTMENT_ID,'approveUserList'); + this.getUserList(this.pd.MONITOR_DEPARTMENT_ID,'monitorUserList'); + this.getUserList(this.pd.ACCEPT_DEPARTMENT_ID,'acceptUserList'); + this.getUserList(this.pd.WORK_START_DEPARTMENT_ID,'workstartUserList'); + this.getUserList(this.pd.WORK_END_DEPARTMENT_ID,'workendUserList'); + this.getWorkUserList(); } - this.getUserList(this.pd.ANALYZE_DEPARTMENT_ID,'analyzeUserList'); - this.getUserList(this.pd.CONFIRM_DEPARTMENT_ID,'confirmUserList'); - this.getUserList(this.pd.LEADER_DEPARTMENT_ID,'leaderUserList'); - this.getUserList(this.pd.AUDIT_DEPARTMENT_ID,'auditUserList'); - this.getUserList(this.pd.APPROVE_DEPARTMENT_ID,'approveUserList'); - this.getUserList(this.pd.MONITOR_DEPARTMENT_ID,'monitorUserList'); - this.getUserList(this.pd.ACCEPT_DEPARTMENT_ID,'acceptUserList'); - this.getUserList(this.pd.WORK_START_DEPARTMENT_ID,'workstartUserList'); - this.getUserList(this.pd.WORK_END_DEPARTMENT_ID,'workendUserList'); - this.getWorkUserList(); - - } else if ("exception" == data.result) { uni.showToast({ title: '错误', diff --git a/pages/application/hotwork/hotwork-approve/hotwork-approve-detail.vue b/pages/application/hotwork/hotwork-approve/hotwork-approve-detail.vue index df8df68..0ad9f9a 100644 --- a/pages/application/hotwork/hotwork-approve/hotwork-approve-detail.vue +++ b/pages/application/hotwork/hotwork-approve/hotwork-approve-detail.vue @@ -276,7 +276,7 @@ return true return false }, - goSubmit(){ + goSubmit(APPLY_STATUS){ var _this = this; let required = true uni.showLoading({ @@ -300,6 +300,7 @@ formData.HOTWORK_ID = this.pd.HOTWORK_ID formData.DESCR = this.pd.DESCR formData.USER_ID = loginUser.USER_ID + formData.APPLY_STATUS = APPLY_STATUS uni.uploadFile({ url: basePath+'app/hotwork/nextStep', files: files, diff --git a/pages/application/hotwork/hotwork-audit/hotwork-audit-detail.vue b/pages/application/hotwork/hotwork-audit/hotwork-audit-detail.vue index eea7cc4..b065260 100644 --- a/pages/application/hotwork/hotwork-audit/hotwork-audit-detail.vue +++ b/pages/application/hotwork/hotwork-audit/hotwork-audit-detail.vue @@ -267,7 +267,7 @@ return true return false }, - goSubmit(){ + goSubmit(APPLY_STATUS){ var _this = this; let required = true uni.showLoading({ @@ -290,6 +290,7 @@ formData.HOTWORK_ID = this.pd.HOTWORK_ID formData.DESCR = this.pd.DESCR formData.USER_ID = loginUser.USER_ID + formData.APPLY_STATUS = APPLY_STATUS uni.uploadFile({ url: basePath+'app/hotwork/nextStep', files: files, diff --git a/pages/application/hotwork/hotwork-confess/hotwork-confess-detail.vue b/pages/application/hotwork/hotwork-confess/hotwork-confess-detail.vue index 26e49e0..9b39a9c 100644 --- a/pages/application/hotwork/hotwork-confess/hotwork-confess-detail.vue +++ b/pages/application/hotwork/hotwork-confess/hotwork-confess-detail.vue @@ -218,7 +218,7 @@ signtime.push(item.SIGNER_TIME) }) }, - goSubmit(){ + goSubmit(APPLY_STATUS){ var _this = this; let required = true uni.showLoading({ @@ -240,6 +240,7 @@ formData.SIGNTIME = signtime formData.HOTWORK_ID = this.pd.HOTWORK_ID formData.USER_ID = loginUser.USER_ID + formData.APPLY_STATUS = APPLY_STATUS uni.uploadFile({ url: basePath+'app/hotwork/nextStep', files: files, diff --git a/pages/application/hotwork/hotwork-confirm/hotwork-confirm-detail.vue b/pages/application/hotwork/hotwork-confirm/hotwork-confirm-detail.vue index 7f80964..529537f 100644 --- a/pages/application/hotwork/hotwork-confirm/hotwork-confirm-detail.vue +++ b/pages/application/hotwork/hotwork-confirm/hotwork-confirm-detail.vue @@ -241,7 +241,7 @@ signtime.push(item.SIGNER_TIME) }) }, - goSubmit(){ + goSubmit(APPLY_STATUS){ var _this = this; let required = true uni.showLoading({ @@ -265,6 +265,7 @@ formData.HOTWORK_ID = this.pd.HOTWORK_ID formData.DESCR = this.pd.DESCR formData.USER_ID = loginUser.USER_ID + formData.APPLY_STATUS = APPLY_STATUS uni.uploadFile({ url: basePath+'app/hotwork/nextStep', files: files, diff --git a/pages/application/hotwork/hotwork-endwork/hotwork-endwork-detail.vue b/pages/application/hotwork/hotwork-endwork/hotwork-endwork-detail.vue index f4d09b9..97d1525 100644 --- a/pages/application/hotwork/hotwork-endwork/hotwork-endwork-detail.vue +++ b/pages/application/hotwork/hotwork-endwork/hotwork-endwork-detail.vue @@ -331,7 +331,7 @@ this.pd.WORK_END_DATE = e this.$forceUpdate();//强制刷新 }, - goSubmit(){ + goSubmit(APPLY_STATUS){ var _this = this; let required = true uni.showLoading({ @@ -378,6 +378,7 @@ var signtime = []; const formData={} this.uploadImgFaults(files,signtime) + formData.APPLY_STATUS = APPLY_STATUS formData.SIGNTIME = signtime formData.WORK_END_DATE = this.pd.WORK_END_DATE formData.HOTWORK_ID = this.pd.HOTWORK_ID diff --git a/pages/application/hotwork/hotwork-gas/gas-detail.vue b/pages/application/hotwork/hotwork-gas/gas-detail.vue index 6c6891a..b810854 100644 --- a/pages/application/hotwork/hotwork-gas/gas-detail.vue +++ b/pages/application/hotwork/hotwork-gas/gas-detail.vue @@ -94,6 +94,15 @@ loginSession(); }, methods: { + uploadImgFaults(files,signtime) { + this.imgList.map((item,index) => { + var img = {} + img.name = 'file'+index + img.uri = item.filePath + files.push(img) + signtime.push(item.SIGNER_TIME) + }) + }, goSubmit(APPLY_STATUS){ var _this = this; let required = true @@ -121,18 +130,21 @@ uni.showLoading({ title: '请稍候' }) + var files = []; + var signtime = []; const formData={} Object.keys(this.pd).map(key => { formData[key]=this.pd[key] }) + this.uploadImgFaults(files,signtime) + formData.SIGNTIME = signtime formData.CORPINFO_ID = loginUser.CORPINFO_ID formData.USER_ID = loginUser.USER_ID formData.APPLY_STATUS = APPLY_STATUS this.buttonloading = true uni.uploadFile({ url: basePath + "app/hotwork/gas/save", - filePath: _this.imgList[0].filePath, - name: 'file', + files: files, formData:formData, success: (res) => { uni.showToast({ diff --git a/pages/application/hotwork/hotwork-guardian/hotwork-guardian-detail.vue b/pages/application/hotwork/hotwork-guardian/hotwork-guardian-detail.vue index deaea4d..b3ff340 100644 --- a/pages/application/hotwork/hotwork-guardian/hotwork-guardian-detail.vue +++ b/pages/application/hotwork/hotwork-guardian/hotwork-guardian-detail.vue @@ -198,7 +198,7 @@ current: 0 }); }, - goSubmit(){ + goSubmit(APPLY_STATUS){ var _this = this; let required = true uni.showLoading({ @@ -217,6 +217,7 @@ var signtime = []; this.uploadImgFaults(files,signtime) + formData.APPLY_STATUS = APPLY_STATUS formData.SIGNTIME = signtime.join(",") formData.HOTWORK_ID = this.pd.HOTWORK_ID formData.USER_ID = loginUser.USER_ID diff --git a/pages/application/hotwork/hotwork-leader/hotwork-leader-detail.vue b/pages/application/hotwork/hotwork-leader/hotwork-leader-detail.vue index 3de8c21..59503de 100644 --- a/pages/application/hotwork/hotwork-leader/hotwork-leader-detail.vue +++ b/pages/application/hotwork/hotwork-leader/hotwork-leader-detail.vue @@ -253,7 +253,7 @@ return true return false }, - goSubmit(){ + goSubmit(APPLY_STATUS){ var _this = this; let required = true uni.showLoading({ @@ -277,6 +277,7 @@ formData.HOTWORK_ID = this.pd.HOTWORK_ID formData.DESCR = this.pd.DESCR formData.USER_ID = loginUser.USER_ID + formData.APPLY_STATUS = APPLY_STATUS uni.uploadFile({ url: basePath+'app/hotwork/nextStep', files: files, diff --git a/pages/application/hotwork/hotwork-measures-confirm/hotwork-measures-confirm-detail.vue b/pages/application/hotwork/hotwork-measures-confirm/hotwork-measures-confirm-detail.vue index 63584ef..43bf94b 100644 --- a/pages/application/hotwork/hotwork-measures-confirm/hotwork-measures-confirm-detail.vue +++ b/pages/application/hotwork/hotwork-measures-confirm/hotwork-measures-confirm-detail.vue @@ -7,12 +7,12 @@ - + 申请单位: {{pd.APPLY_DEPARTMENT_NAME}} - + 申请人: {{pd.APPLY_USER_NAME}} @@ -72,43 +72,42 @@ 主要安全措施 - - 操作 - + + 操作 + - - @@ -129,8 +128,8 @@ - - + + @@ -165,7 +164,7 @@ }, onLoad(event){ this.pd.HOTWORK_ID = event.HOTWORK_ID; - this.getData(); + this.getData(); // 初始化现场作业负责人 this.getDept(); this.getMeasures(); @@ -186,7 +185,7 @@ // 取消监听 beforeDestroy() { uni.$off('dangerous_options_submit'); - }, + }, methods: { //跳转事件 goToDetail(e) { @@ -194,24 +193,24 @@ url: '/pages/application/hotwork/hotwork-gas/gas-list?HOTWORK_ID='+e }); }, - goToSign(index) { - const measures = this.measuresList[index] - const signImgList = [] - if (measures.SIGN_PATH) { - signImgList.push({"filePath":measures.SIGN_PATH,"SIGNER_TIME":measures.SIGN_TIME}) - } - const imgList = [] - if (measures.IMG_PATH) { - measures.IMG_PATH.split(",").forEach(item => { - imgList.push({"filePath":item}) - }) - } - setMeasures(measures.PROTECTIVE_MEASURES) - uni.navigateTo({ - url: '/pages/application/dangerous_options/index?index='+index + - '&STATUS='+(measures.STATUS || 1) + '&signImgList='+JSON.stringify(signImgList) + '&imgList='+JSON.stringify(imgList) - }); - }, + goToSign(index) { + const measures = this.measuresList[index] + const signImgList = [] + if (measures.SIGN_PATH) { + signImgList.push({"filePath":measures.SIGN_PATH,"SIGNER_TIME":measures.SIGN_TIME}) + } + const imgList = [] + if (measures.IMG_PATH) { + measures.IMG_PATH.split(",").forEach(item => { + imgList.push({"filePath":item}) + }) + } + setMeasures(measures.PROTECTIVE_MEASURES) + uni.navigateTo({ + url: '/pages/application/dangerous_options/index?index='+index + + '&STATUS='+(measures.STATUS || 1) + '&signImgList='+JSON.stringify(signImgList) + '&imgList='+JSON.stringify(imgList) + }); + }, getData() { var _this = this; uni.showLoading({ @@ -227,7 +226,7 @@ HOTWORK_ID: _this.pd.HOTWORK_ID, CORPINFO_ID:loginUser.CORPINFO_ID, USER_ID:loginUser.USER_ID, - }, + }, success: (res) => { if ("success" == res.data.result) { uni.hideLoading(); @@ -242,102 +241,104 @@ }); }, - goSubmit(){ + goSubmit(APPLY_STATUS){ var _this = this; uni.showLoading({ title: '请稍候' }) - if (_this.imgList.length <= 0) { - uni.showToast({ - icon: 'none', - title: '请签字', - duration: 1500 - }); - return; - } - for (let i = 0; i < this.measuresList.length; i++) { - const measures = this.measuresList[i] - if(measures.QUESTION1 && !measures.ANSWER1){ - uni.showToast({ - icon: 'none', - title: '第'+(i+1)+'项未填写第一项', - duration: 1500 - }); - return; - } - if(measures.QUESTION2 && !measures.ANSWER2){ - uni.showToast({ - icon: 'none', - title: '第'+(i+1)+'项未填写第二项', - duration: 1500 - }); - return; - } - if(measures.QUESTION3 && !measures.ANSWER3){ - uni.showToast({ - icon: 'none', - title: '第'+(i+1)+'项未填写第三项', - duration: 1500 - }); - return; - } - if(measures.QUESTION4 && !measures.ANSWER4){ - uni.showToast({ - icon: 'none', - title: '第'+(i+1)+'项未填写第四项', - duration: 1500 - }); - return; - } - if(!measures.SIGN_PATH){ - uni.showToast({ - icon: 'none', - title: '第'+(i+1)+'项未签字', - duration: 1500 - }); - return; - } - } + if (_this.imgList.length <= 0) { + uni.showToast({ + icon: 'none', + title: '请签字', + duration: 1500 + }); + return; + } + for (let i = 0; i < this.measuresList.length; i++) { + const measures = this.measuresList[i] + if(!measures.SIGN_PATH){ + uni.showToast({ + icon: 'none', + title: '第'+(i+1)+'项未签字', + duration: 1500 + }); + return; + } + if(measures.STATUS=='1' && measures.QUESTION1 && !measures.ANSWER1){ + uni.showToast({ + icon: 'none', + title: '第'+(i+1)+'项未填写第一项', + duration: 1500 + }); + return; + } + if(measures.STATUS=='1' && measures.QUESTION2 && !measures.ANSWER2){ + uni.showToast({ + icon: 'none', + title: '第'+(i+1)+'项未填写第二项', + duration: 1500 + }); + return; + } + if(measures.STATUS=='1' && measures.QUESTION3 && !measures.ANSWER3){ + uni.showToast({ + icon: 'none', + title: '第'+(i+1)+'项未填写第三项', + duration: 1500 + }); + return; + } + if(measures.STATUS=='1' && measures.QUESTION4 && !measures.ANSWER4){ + uni.showToast({ + icon: 'none', + title: '第'+(i+1)+'项未填写第四项', + duration: 1500 + }); + return; + } - const formData={} - var files = []; - var signtime = []; - this.uploadImgFaults(files,signtime) - formData.HOTWORK_ID = _this.pd.HOTWORK_ID - formData.SIGNTIME = signtime.join(",") - formData.USER_ID = loginUser.USER_ID - formData.MEASURES = JSON.stringify(this.measuresList) - uni.uploadFile({ - url: basePath+'app/hotwork/nextStep', - files: files, - formData:formData, - success: (res) => { - uni.showToast({ - icon:'none', - title: '保存成功', - duration: 2000 - }); - _this.goback() - }, - fail: (err) => { - uni.hideLoading(); - uni.showModal({ - content: err.errMsg, - showCancel: false - }); - } - }) + } + + const formData={} + var files = []; + var signtime = []; + this.uploadImgFaults(files,signtime) + formData.APPLY_STATUS = APPLY_STATUS + formData.HOTWORK_ID = _this.pd.HOTWORK_ID + formData.SIGNTIME = signtime.join(",") + formData.USER_ID = loginUser.USER_ID + formData.MEASURES = JSON.stringify(this.measuresList) + uni.uploadFile({ + url: basePath+'app/hotwork/nextStep', + files: files, + formData:formData, + success: (res) => { + uni.showToast({ + icon:'none', + title: '保存成功', + duration: 2000 + }); + _this.goback() + }, + fail: (err) => { + uni.hideLoading(); + uni.showModal({ + content: err.errMsg, + showCancel: false + }); + } + }) }, - uploadImgFaults(files,signtime) { - this.imgList.map((item,index) => { - var img = {} - img.name = 'file'+index - img.uri = item.filePath - files.push(img) - signtime.push(item.SIGNER_TIME) - }) - }, + uploadImgFaults(files,signtime) { + this.imgList.map((item,index) => { + var img = {} + img.name = 'file'+index + img.uri = item.filePath + files.push(img) + signtime.push(item.SIGNER_TIME) + }) + }, getMeasures(){ var _this = this; @@ -350,8 +351,8 @@ url: basePath + '/app/hotwork/listAllMeasuresForSign?tm=' + new Date().getTime(), data: { CORPINFO_ID:loginUser.CORPINFO_ID, - CONFIRM_ID:loginUser.USER_ID, - HOTWORK_ID: _this.pd.HOTWORK_ID, + CONFIRM_ID:loginUser.USER_ID, + HOTWORK_ID: _this.pd.HOTWORK_ID, }, success: function (res) { _this.measuresList = res.data.measuresForSignList @@ -385,40 +386,40 @@ }); }, - showDeptTree(index) { - this.isUps=true - this.$refs['tkiTree'+index][0]._show(); - }, + showDeptTree(index) { + this.isUps=true + this.$refs['tkiTree'+index][0]._show(); + }, - deptTreeConfirm(e,i) { - this.isUps=false; - this.measuresList[i].DEPARTMENT_ID=e[0].id; - this.measuresList[i].DEPARTMENT_NAME=e[0].name; - this.measuresList[i].USER_ID = '' - this.measuresList[i].USER_NAME = '' - this.getUserList(e[0].id,i); - }, + deptTreeConfirm(e,i) { + this.isUps=false; + this.measuresList[i].DEPARTMENT_ID=e[0].id; + this.measuresList[i].DEPARTMENT_NAME=e[0].name; + this.measuresList[i].USER_ID = '' + this.measuresList[i].USER_NAME = '' + this.getUserList(e[0].id,i); + }, - deptTreeCancel(e) { - this.isUps=false; - }, + deptTreeCancel(e) { + this.isUps=false; + }, - pickerUser(e,i) { - this.measuresList[i].userIndex = e.detail.value; - this.measuresList[i].USER_ID=this.measuresList[i].userList[e.detail.value].USER_ID; - this.measuresList[i].USER_NAME=this.measuresList[i].userList[e.detail.value].NAME; - this.$forceUpdate();//强制刷新 - }, + pickerUser(e,i) { + this.measuresList[i].userIndex = e.detail.value; + this.measuresList[i].USER_ID=this.measuresList[i].userList[e.detail.value].USER_ID; + this.measuresList[i].USER_NAME=this.measuresList[i].userList[e.detail.value].NAME; + this.$forceUpdate();//强制刷新 + }, - isBlankList(i) { - if (this.measuresList[i].userList.length == 0) { - uni.showToast({ - icon: 'none', - title: '请先选择确认单位', - duration: 1500 - }) - } - }, + isBlankList(i) { + if (this.measuresList[i].userList.length == 0) { + uni.showToast({ + icon: 'none', + title: '请先选择确认单位', + duration: 1500 + }) + } + }, //获取人员列表 getUserList(dept,i){ @@ -461,7 +462,7 @@ }, //完成 subCanvas(e) { - e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm') + e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm') this.imgList.splice(0,this.imgList.length); this.imgList.push(e); this.hideModal() diff --git a/pages/application/hotwork/hotwork-measures/hotwork-measures-detail.vue b/pages/application/hotwork/hotwork-measures/hotwork-measures-detail.vue index 765ae5d..954c25f 100644 --- a/pages/application/hotwork/hotwork-measures/hotwork-measures-detail.vue +++ b/pages/application/hotwork/hotwork-measures/hotwork-measures-detail.vue @@ -127,8 +127,8 @@ - - + + @@ -162,7 +162,7 @@ }, onLoad(event){ this.pd.HOTWORK_ID = event.HOTWORK_ID; - this.getData(); + this.getData(); // 初始化现场作业负责人 this.getDept(); this.getMeasures(); @@ -190,7 +190,7 @@ HOTWORK_ID: _this.pd.HOTWORK_ID, CORPINFO_ID:loginUser.CORPINFO_ID, USER_ID:loginUser.USER_ID, - }, + }, success: (res) => { if ("success" == res.data.result) { uni.hideLoading(); @@ -205,76 +205,77 @@ }); }, - goSubmit(){ + goSubmit(APPLY_STATUS){ var _this = this; uni.showLoading({ title: '请稍候' }) - if (_this.imgList.length <= 0) { - uni.showToast({ - icon: 'none', - title: '请签字', - duration: 1500 - }); - return; - } - for (let i = 0; i < this.measuresList.length; i++) { - const measures = this.measuresList[i] - if(!measures.USER_ID){ - uni.showToast({ - icon: 'none', - title: '第'+(i+1)+'项未设置确认人', - duration: 1500 - }); - return; - } - } + if (_this.imgList.length <= 0) { + uni.showToast({ + icon: 'none', + title: '请签字', + duration: 1500 + }); + return; + } + for (let i = 0; i < this.measuresList.length; i++) { + const measures = this.measuresList[i] + if(!measures.USER_ID){ + uni.showToast({ + icon: 'none', + title: '第'+(i+1)+'项未设置确认人', + duration: 1500 + }); + return; + } + } - const formData={} - var files = []; - var signtime = []; - const signers = this.measuresList.map(item => { - return { - BUS_HOTWORK_MEASURES_ID: item.BUS_HOTWORK_MEASURES_ID, - USER_ID: item.USER_ID - } - }) - this.uploadImgFaults(files,signtime) - formData.HOTWORK_ID = _this.pd.HOTWORK_ID - formData.SIGNTIME = signtime.join(",") - formData.USER_ID = loginUser.USER_ID - formData.PREPARERS = JSON.stringify(signers) - uni.uploadFile({ - url: basePath+'app/hotwork/nextStep', - files: files, - formData:formData, - success: (res) => { - uni.showToast({ - icon:'none', - title: '保存成功', - duration: 2000 - }); - _this.goback() - }, - fail: (err) => { - uni.hideLoading(); - uni.showModal({ - content: err.errMsg, - showCancel: false - }); - } - }) + const formData={} + var files = []; + var signtime = []; + const signers = this.measuresList.map(item => { + return { + BUS_HOTWORK_MEASURES_ID: item.BUS_HOTWORK_MEASURES_ID, + USER_ID: item.USER_ID + } + }) + this.uploadImgFaults(files,signtime) + formData.HOTWORK_ID = _this.pd.HOTWORK_ID + formData.SIGNTIME = signtime.join(",") + formData.USER_ID = loginUser.USER_ID + formData.APPLY_STATUS = APPLY_STATUS + formData.PREPARERS = JSON.stringify(signers) + uni.uploadFile({ + url: basePath+'app/hotwork/nextStep', + files: files, + formData:formData, + success: (res) => { + uni.showToast({ + icon:'none', + title: '保存成功', + duration: 2000 + }); + _this.goback() + }, + fail: (err) => { + uni.hideLoading(); + uni.showModal({ + content: err.errMsg, + showCancel: false + }); + } + }) }, - uploadImgFaults(files,signtime) { - this.imgList.map((item,index) => { - var img = {} - img.name = 'file'+index - img.uri = item.filePath - files.push(img) - signtime.push(item.SIGNER_TIME) - }) - }, + uploadImgFaults(files,signtime) { + this.imgList.map((item,index) => { + var img = {} + img.name = 'file'+index + img.uri = item.filePath + files.push(img) + signtime.push(item.SIGNER_TIME) + }) + }, getMeasures(){ var _this = this; diff --git a/pages/application/hotwork/hotwork-monitor/hotwork-monitor-detail.vue b/pages/application/hotwork/hotwork-monitor/hotwork-monitor-detail.vue index 11dc738..b5664ef 100644 --- a/pages/application/hotwork/hotwork-monitor/hotwork-monitor-detail.vue +++ b/pages/application/hotwork/hotwork-monitor/hotwork-monitor-detail.vue @@ -305,7 +305,6 @@ var files = []; var signtime = []; const formData={} - this.uploadImgFaults(files,signtime) formData.SIGNTIME = signtime formData.HOTWORK_ID = this.pd.HOTWORK_ID