From ced36b733b8b408b6b34c25ea4ead6bef5bfcb90 Mon Sep 17 00:00:00 2001 From: "396572590@qq.com" Date: Tue, 12 Jul 2022 11:06:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20There=20is=20no=20way=20the,=20#56517?= =?UTF-8?q?=20=E6=8A=80=E6=9C=AF=E6=A0=87=E5=87=86-=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E8=8A=82=E7=82=B9=EF=BC=8C=E6=8F=90=E4=BA=A4=EF=BC=8C=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creatProcess/qbrk-product/step13.vue | 32 ++++---- .../pages/creatProcess/qbrk/step13.vue | 74 +++++++++++-------- 2 files changed, 60 insertions(+), 46 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/qbrk-product/step13.vue b/src/pages/processCenter/pages/creatProcess/qbrk-product/step13.vue index f81ec874d..abdc33c9a 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk-product/step13.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk-product/step13.vue @@ -606,20 +606,24 @@ }, data () { const validateStandNumber = async (rule, value, callback) => { - if (value === '') { - callback(new Error('请输入企标顺序号')) - } else { - let res = await this.verifySnExists() - if(res.data){ - callback() - let date = new Date(); - let year = date.getFullYear(); - this.form.standSn = this.form.standNum - this.form.standNumber = this.form.standNum - this.form.standYear = year // 待带入立项标准 - this.form.standCode = this.form.standSort + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) - }else { - callback(new Error('企标顺序号已存在或已锁定')) + if(this.form.standStatus !== '1'){ + callback() + }else { + if (value === '') { + callback(new Error('请输入企标顺序号')) + } else { + let res = await this.verifySnExists() + if(res.data){ + callback() + let date = new Date(); + let year = date.getFullYear(); + this.form.standSn = this.form.standNum + this.form.standNumber = this.form.standNum + this.form.standYear = year // 待带入立项标准 + this.form.standCode = this.form.standSort + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) + }else { + callback(new Error('企标顺序号已存在或已锁定')) + } } } }; diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step13.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step13.vue index 9503c7270..55ecd7834 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step13.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step13.vue @@ -651,21 +651,24 @@ }, data () { const validateStandNumber = async (rule, value, callback) => { - console.log(value) - if (value === '') { - callback(new Error('请输入企标顺序号')) - } else { - let res = await this.verifySnExists() - if(res.data){ - callback() - let date = new Date(); - let year = date.getFullYear(); - this.form.standSn = this.form.standNum - this.form.standNumber = this.form.standNum - this.form.standYear = this.regDate(year) // 待带入立项标准 - this.form.standCode = this.form.standSort + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) - }else { - callback(new Error('企标顺序号已存在或已锁定')) + if(this.form.reviseStatus !== '1'){ + callback() + }else { + if (value === '') { + callback(new Error('请输入企标顺序号')) + } else { + let res = await this.verifySnExists() + if(res.data){ + callback() + let date = new Date(); + let year = date.getFullYear(); + this.form.standSn = this.form.standNum + this.form.standNumber = this.form.standNum + this.form.standYear = this.regDate(year) // 待带入立项标准 + this.form.standCode = this.form.standSort + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) + }else { + callback(new Error('企标顺序号已存在或已锁定')) + } } } }; @@ -2573,10 +2576,10 @@ this.$message.success(res.message) } }) - }else{ - this.$message.warning('请检查基础信息表单是否填写完整') } }) + }else{ + this.$message.warning('请检查基础信息表单是否填写完整') } }) }, @@ -2730,22 +2733,29 @@ pId: this.pId }).then(res => { if (res) { - if(res.nowTaskInfo && res.nowTaskInfo === '发布'){ - const processForm = JSON.parse(res.mesg) - if (processForm.form === undefined) { - this.getFormFieldList(processForm) - } else { - //表单文件处理 - this.getTaskId(processForm) - } - }else { - this.$alert('当前任务'+(res.nowTaskInfo ?res.nowTaskInfo:"")+'不是发布节点,禁止跨路由访问当前页面', '', { - confirmButtonText: '确定', - callback: action => { - this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) - } - }); + const processForm = JSON.parse(res.mesg) + if (processForm.form === undefined) { + this.getFormFieldList(processForm) + } else { + //表单文件处理 + this.getTaskId(processForm) } + // if(res.nowTaskInfo && res.nowTaskInfo === '发布'){ + // const processForm = JSON.parse(res.mesg) + // if (processForm.form === undefined) { + // this.getFormFieldList(processForm) + // } else { + // //表单文件处理 + // this.getTaskId(processForm) + // } + // }else { + // this.$alert('当前任务'+(res.nowTaskInfo ?res.nowTaskInfo:"")+'不是发布节点,禁止跨路由访问当前页面', '', { + // confirmButtonText: '确定', + // callback: action => { + // this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) + // } + // }); + // } } }).catch(e => { })