From b36058d011255dce32fb693f115dbe98291f6c37 Mon Sep 17 00:00:00 2001 From: hanshaozhuang Date: Wed, 20 Jul 2022 17:56:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug=2056663=20=E3=80=900719?= =?UTF-8?q?=E3=80=91=E6=A0=87=E5=87=86=E5=85=A5=E5=BA=93=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=20=E9=AA=8C=E9=87=8D=E5=A4=B1=E6=95=88(?= =?UTF-8?q?=E6=8C=89=E7=85=A7=E7=B1=BB=E5=88=AB=E3=80=81=E7=BC=96=E5=8F=B7?= =?UTF-8?q?=E3=80=81=E5=B9=B4=E4=BB=BD)=E8=BF=9B=E8=A1=8C=E9=AA=8C?= =?UTF-8?q?=E9=87=8D=EF=BC=8C=E5=A6=82=E6=9E=9C=E5=87=BA=E7=8E=B0=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E7=BB=99=E5=87=BA=E6=8F=90=E7=A4=BA=E4=B8=8E=E4=BB=80?= =?UTF-8?q?=E4=B9=88=E4=BB=80=E4=B9=88=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/bzrk/step1.vue | 60 ++++++++++++++++++- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue b/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue index 8e6fede4a..c2e216751 100644 --- a/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue @@ -1736,14 +1736,17 @@ export default { {required: true, message: '请选择归档位置', trigger: 'blur'} ], standSort: [ - {required: true, message: '请选择标准类别', trigger: 'change'} + {required: true, message: '请选择标准类别', trigger: 'change'}, + { validator: this.checkIsOnly, trigger: 'change'} ], standNumber: [ {required: true, message: '请输入标准编号', trigger: 'blur'}, - {min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: 'blur'} + {min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: 'blur'}, + { validator: this.checkIsOnly, trigger: 'change'} ], standYear: [ {required: true, message: '请输入标准年份'}, + { validator: this.checkIsOnly, trigger: 'change'} // { type: 'number', message: '年标准年份必须为数字值'} ], standName: [ @@ -1836,6 +1839,21 @@ export default { } } }, + // 'form.standSort' : { + // handler: function() { + // this.checkIsOnly() + // } + // }, + // 'form.standNumber' : { + // handler: function() { + // this.checkIsOnly() + // } + // }, + // 'form.standYear' : { + // handler: function() { + // this.checkIsOnly() + // } + // } /* 'form.signFlag' : { handler: function () { if (this.form.signFlag === '1') { @@ -1980,6 +1998,44 @@ export default { // }, }, methods: { + checkIsOnly() { + let standType = '' + if (this.form.standInData === '0') { + standType = 'INLAND' + if(this.form.standSort && this.form.standNumber && this.form.standYear){ + this.$http.get('sarStandardsInfo/sar-standards-info/checkIsOnly', { + standType: standType, + standSort: this.form.standSort, + standNumber: this.form.standNumber, + standYear: this.form.standYear, + }, { + _this: this + }, res => { + if (!res.ok) { + this.$message.warning('标准号重复') + return + } + }) + } + } else { + standType = 'FOREIGN' + if(this.form.standSort && this.form.standNumber){ + this.$http.get('sarStandardsInfo/sar-standards-info/checkIsOnly', { + standType: standType, + standSort: this.form.standSort, + standNumber: this.form.standNumber, + standYear: this.form.standYear, + }, { + _this: this + }, res => { + if (!res.ok) { + this.$message.warning('标准号重复') + return + } + }) + } + } + }, //限制上传文件个数 handleExceed (files, fileList) { this.$message.warning(`当前限制选择 8 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)