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

签约方不可重复选择

parent 2b7597d9
...@@ -96,6 +96,12 @@ export default { ...@@ -96,6 +96,12 @@ export default {
companyType: { companyType: {
type: String, type: String,
default: undefined default: undefined
},
CodeList: {
type: Array,
default() {
return []
}
} }
}, },
data() { data() {
...@@ -160,7 +166,19 @@ export default { ...@@ -160,7 +166,19 @@ export default {
}, },
/** dialog确定按钮*/ /** dialog确定按钮*/
determine() { 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) { if (this.companyType === '0' && this.saveCompanyCode === this.companyCode) {
this.$message({ this.$message({
type: 'warning', type: 'warning',
......
...@@ -2489,6 +2489,7 @@ ...@@ -2489,6 +2489,7 @@
ref="companyQueryList" ref="companyQueryList"
:company-type="companyType" :company-type="companyType"
:visible.sync="companyDialogVisible" :visible.sync="companyDialogVisible"
:code-list="contractCodeList"
@funClose="companyCloseVisible" @funClose="companyCloseVisible"
@getValue="handleCompanygetName" @getValue="handleCompanygetName"
/> />
...@@ -2635,6 +2636,7 @@ export default { ...@@ -2635,6 +2636,7 @@ export default {
SJLYList: [], SJLYList: [],
// 跳转前,是否有未保存的数据 // 跳转前,是否有未保存的数据
agreeBack: false, agreeBack: false,
contractCodeList: '',
form: { form: {
CONMAINCODE: '', CONMAINCODE: '',
PARTIESUNITNAME: '', PARTIESUNITNAME: '',
...@@ -3227,6 +3229,8 @@ export default { ...@@ -3227,6 +3229,8 @@ export default {
// } else { // } else {
// this.supplement = true // this.supplement = true
// } // }
this.contractCodeList = this.form.HTDFXX.map(item => item.UNITID)
console.log('ggggg', this.contractCodeList)
if (this.form.SJLYDWID) { if (this.form.SJLYDWID) {
this.form.SJLYDWID = this.form.SJLYDWID.split(',') this.form.SJLYDWID = this.form.SJLYDWID.split(',')
} }
...@@ -3623,6 +3627,7 @@ export default { ...@@ -3623,6 +3627,7 @@ export default {
if (this.companyType === '0') { if (this.companyType === '0') {
this.form.HTDFXX[this.sianIndex].UNITNAME = name this.form.HTDFXX[this.sianIndex].UNITNAME = name
this.form.HTDFXX[this.sianIndex].UNITID = code this.form.HTDFXX[this.sianIndex].UNITID = code
this.contractCodeList = this.form.HTDFXX.map(item => item.UNITID)
} else if (this.companyType === '1') { } else if (this.companyType === '1') {
this.form.FKDWXX[this.paySianIndex].DRAWEE = name this.form.FKDWXX[this.paySianIndex].DRAWEE = name
this.form.FKDWXX[this.paySianIndex].DRAWEEID = code this.form.FKDWXX[this.paySianIndex].DRAWEEID = code
...@@ -3747,6 +3752,7 @@ export default { ...@@ -3747,6 +3752,7 @@ export default {
}, },
delHTDFXX(i) { delHTDFXX(i) {
this.form.HTDFXX.splice(i, 1) this.form.HTDFXX.splice(i, 1)
this.contractCodeList = this.form.HTDFXX.map(item => item.UNITID)
}, },
delChild(i, j) { delChild(i, j) {
if (this.form.HTDFXX[i].incomeArray.length > 1) { 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