Commit dcea5ef7 authored by 张伯涛's avatar 张伯涛

签约方不可重复选择

parent 2b7597d9
......@@ -96,6 +96,12 @@ export default {
companyType: {
type: String,
default: undefined
},
CodeList: {
type: Array,
default() {
return []
}
}
},
data() {
......@@ -160,7 +166,19 @@ export default {
},
/** dialog确定按钮*/
determine() {
if (this.companyName) {
console.log('aaa', this.CodeList)
if (this.CodeList) {
if (this.CodeList.includes(this.companyCode)) {
this.$message({
type: 'warning',
message: '该往来单位已选择'
})
} else {
this.saveCompanyCode = this.companyCode
this.$emit('getValue', this.companyName, this.companyCode)
this.$emit('funClose', false)
}
} else if (this.companyName) {
if (this.companyType === '0' && this.saveCompanyCode === this.companyCode) {
this.$message({
type: 'warning',
......
......@@ -2489,6 +2489,7 @@
ref="companyQueryList"
:company-type="companyType"
:visible.sync="companyDialogVisible"
:code-list="contractCodeList"
@funClose="companyCloseVisible"
@getValue="handleCompanygetName"
/>
......@@ -2635,6 +2636,7 @@ export default {
SJLYList: [],
// 跳转前,是否有未保存的数据
agreeBack: false,
contractCodeList: '',
form: {
CONMAINCODE: '',
PARTIESUNITNAME: '',
......@@ -3227,6 +3229,8 @@ export default {
// } else {
// this.supplement = true
// }
this.contractCodeList = this.form.HTDFXX.map(item => item.UNITID)
console.log('ggggg', this.contractCodeList)
if (this.form.SJLYDWID) {
this.form.SJLYDWID = this.form.SJLYDWID.split(',')
}
......@@ -3623,6 +3627,7 @@ export default {
if (this.companyType === '0') {
this.form.HTDFXX[this.sianIndex].UNITNAME = name
this.form.HTDFXX[this.sianIndex].UNITID = code
this.contractCodeList = this.form.HTDFXX.map(item => item.UNITID)
} else if (this.companyType === '1') {
this.form.FKDWXX[this.paySianIndex].DRAWEE = name
this.form.FKDWXX[this.paySianIndex].DRAWEEID = code
......@@ -3747,6 +3752,7 @@ export default {
},
delHTDFXX(i) {
this.form.HTDFXX.splice(i, 1)
this.contractCodeList = this.form.HTDFXX.map(item => item.UNITID)
},
delChild(i, j) {
if (this.form.HTDFXX[i].incomeArray.length > 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment