|
@@ -484,8 +484,9 @@ export default {
|
|
|
type: 'select',
|
|
|
dicData: [],
|
|
|
span: 10,
|
|
|
- disabled: true,
|
|
|
+ disabled: false,
|
|
|
clearable: false,
|
|
|
+ allowCreate: true,
|
|
|
forParameter: {
|
|
|
key: 'id',
|
|
|
label: 'cname',
|
|
@@ -497,7 +498,7 @@ export default {
|
|
|
prop: "corpAttnTel",
|
|
|
text: "电话",
|
|
|
labelWidth: '10px',
|
|
|
- disabled: true,
|
|
|
+ disabled: false,
|
|
|
clearable: false,
|
|
|
span: 7,
|
|
|
// rules: [{
|
|
@@ -511,7 +512,7 @@ export default {
|
|
|
prop: "corpAttnEmail",
|
|
|
text: "邮箱",
|
|
|
labelWidth: '10px',
|
|
|
- disabled: true,
|
|
|
+ disabled: false,
|
|
|
clearable: false,
|
|
|
span: 7,
|
|
|
// rules: [{
|
|
@@ -1075,20 +1076,20 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 获取客户联系人 客户OP
|
|
|
- getBcorpsattnListfun(cnName) {
|
|
|
- getBcorpsattnList(1, 10, { pid: this.form.corpId, cnName }).then(res => {
|
|
|
+ getBcorpsattnListfun(cname) {
|
|
|
+ getBcorpsattnList(1, 10, { cname }).then(res => {
|
|
|
this.columnforfun('corpAttnName').dicData = res.data.data.records
|
|
|
- if (res.data.data.records.length == 0) {
|
|
|
- this.form.corpAttnName = ''
|
|
|
- this.form.corpAttnId = ''
|
|
|
- this.$set(this.form, 'corpAttnTel', '')
|
|
|
- this.$set(this.form, 'corpAttnEmail', '')
|
|
|
- return
|
|
|
- }
|
|
|
- this.form.corpAttnName = res.data.data.records[0].cname
|
|
|
- this.form.corpAttnId = res.data.data.records[0].id
|
|
|
- this.$set(this.form, 'corpAttnTel', res.data.data.records[0].tel)
|
|
|
- this.$set(this.form, 'corpAttnEmail', res.data.data.records[0].email)
|
|
|
+ // if (res.data.data.records.length == 0) {
|
|
|
+ // this.form.corpAttnName = ''
|
|
|
+ // this.form.corpAttnId = ''
|
|
|
+ // this.$set(this.form, 'corpAttnTel', '')
|
|
|
+ // this.$set(this.form, 'corpAttnEmail', '')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // this.form.corpAttnName = res.data.data.records[0].cname
|
|
|
+ // this.form.corpAttnId = res.data.data.records[0].id
|
|
|
+ // this.$set(this.form, 'corpAttnTel', res.data.data.records[0].tel)
|
|
|
+ // this.$set(this.form, 'corpAttnEmail', res.data.data.records[0].email)
|
|
|
})
|
|
|
},
|
|
|
// 获取地点信息
|
|
@@ -1167,7 +1168,7 @@ export default {
|
|
|
this.form.corpCode = this.$refs.bcorps[0].selectionList[0].code
|
|
|
this.form.corpSource = this.$refs.bcorps[0].selectionList[0].corpSource
|
|
|
// 获取 客户op数据
|
|
|
- this.getBcorpsattnListfun()
|
|
|
+ // this.getBcorpsattnListfun()
|
|
|
// 业务来源参数带出
|
|
|
this.$set(this.form, 'srcType', this.$refs.bcorps[0].selectionList[0].sourceType)
|
|
|
this.$set(this.form, 'srcId', this.$refs.bcorps[0].selectionList[0].srcId)
|
|
@@ -1198,7 +1199,7 @@ export default {
|
|
|
this.form.corpCode = this.$refs.bcorps[0].$refs.detail.formData.code
|
|
|
this.form.corpSource = this.$refs.bcorps[0].$refs.detail.formData.corpSource
|
|
|
// 获取 客户op数据
|
|
|
- this.getBcorpsattnListfun()
|
|
|
+ // this.getBcorpsattnListfun()
|
|
|
// 业务来源参数带出
|
|
|
this.$set(this.form, 'srcType', this.$refs.bcorps[0].$refs.detail.formData.sourceType)
|
|
|
this.$set(this.form, 'srcId', this.$refs.bcorps[0].$refs.detail.formData.srcId)
|
|
@@ -1296,13 +1297,13 @@ export default {
|
|
|
}
|
|
|
else if (name == 'corpCnName') {
|
|
|
if (value) {
|
|
|
- this.columnforfun('corpAttnName').disabled = false
|
|
|
- this.columnforfun('corpAttnTel').disabled = false
|
|
|
- this.columnforfun('corpAttnEmail').disabled = false
|
|
|
+ // this.columnforfun('corpAttnName').disabled = false
|
|
|
+ // this.columnforfun('corpAttnTel').disabled = false
|
|
|
+ // this.columnforfun('corpAttnEmail').disabled = false
|
|
|
} else {
|
|
|
- this.columnforfun('corpAttnName').disabled = true
|
|
|
- this.columnforfun('corpAttnTel').disabled = true
|
|
|
- this.columnforfun('corpAttnEmail').disabled = true
|
|
|
+ // this.columnforfun('corpAttnName').disabled = true
|
|
|
+ // this.columnforfun('corpAttnTel').disabled = true
|
|
|
+ // this.columnforfun('corpAttnEmail').disabled = true
|
|
|
// 如果点击清空按钮把值赋值为空
|
|
|
this.form.corpCnName = ''
|
|
|
this.form.corpEnName = ''
|
|
@@ -1311,7 +1312,7 @@ export default {
|
|
|
this.form.shortName = ''
|
|
|
this.form.corpSource = ""
|
|
|
// 清空 客户OP
|
|
|
- this.form.corpAttnName = ''
|
|
|
+ // this.form.corpAttnName = ''
|
|
|
this.form.corpAttnId = ''
|
|
|
this.$set(this.form, 'corpAttnTel', '')
|
|
|
this.$set(this.form, 'corpAttnEmail', '')
|
|
@@ -1331,7 +1332,7 @@ export default {
|
|
|
this.form.shortName = item.shortName
|
|
|
this.form.corpSource = item.corpSource
|
|
|
// 获取 客户op数据
|
|
|
- this.getBcorpsattnListfun()
|
|
|
+ // this.getBcorpsattnListfun()
|
|
|
// 业务来源参数带出
|
|
|
this.$set(this.form, 'srcType', item.sourceType)
|
|
|
this.$set(this.form, 'srcId', item.srcId)
|
|
@@ -1355,12 +1356,19 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
else if (name == 'corpAttnName') {
|
|
|
- for (let item of this.columnforfun('corpAttnName').dicData) {
|
|
|
- if (item.cname == value) {
|
|
|
- this.form.corpAttnName = item.cname
|
|
|
- this.form.corpAttnId = item.id
|
|
|
- this.$set(this.form, 'corpAttnTel', item.tel)
|
|
|
- this.$set(this.form, 'corpAttnEmail', item.email)
|
|
|
+ if (this.columnforfun('corpAttnName').dicData.length) {
|
|
|
+ for (let item of this.columnforfun('corpAttnName').dicData) {
|
|
|
+ if (item.cname == value) {
|
|
|
+ this.form.corpAttnName = item.cname
|
|
|
+ this.form.corpAttnId = item.id
|
|
|
+ this.$set(this.form, 'corpAttnTel', item.tel)
|
|
|
+ this.$set(this.form, 'corpAttnEmail', item.email)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (value) {
|
|
|
+ this.form.corpAttnName = value
|
|
|
+ this.form.corpAttnId = null
|
|
|
}
|
|
|
}
|
|
|
}
|