修改bug 56663 【0719】标准入库流程 新增 验重失效(按照类别、编号、年份)进行验重,如果出现重复给出提示与什么什么重复
This commit is contained in:
@@ -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} 个文件`)
|
||||
|
||||
Reference in New Issue
Block a user