|
|
|
@ -45,7 +45,6 @@ |
|
|
|
:row-style="rowStyle" |
|
|
|
@row-click="customerClickRow" |
|
|
|
@selection-change="selectionCustomer" |
|
|
|
@current-change="changeCurrentRow" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
@ -97,9 +96,6 @@ |
|
|
|
<el-dialog :title="modalData.title" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="500px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" |
|
|
|
style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="客户代码" prop="customerNo" :rules="rules.customerNo"> |
|
|
|
<el-input v-model="modalData.customerNo" :disabled="modalDisableFlag" style="width: 222px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="客户名称" prop="customerDesc" :rules="rules.customerDesc"> |
|
|
|
<el-input v-model="modalData.customerDesc" :readonly="detailModalFlag" style="width: 222px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -779,6 +775,11 @@ export default { |
|
|
|
this.modalData.customerGroupName2 = '' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
customerCurrentRow(newVal,oldVal){ |
|
|
|
if (newVal){ |
|
|
|
this.refreshCurrentTabTable(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
data() { |
|
|
|
@ -1989,13 +1990,9 @@ export default { |
|
|
|
* 刷新页签的table数据 |
|
|
|
*/ |
|
|
|
refreshCurrentTabTable() { |
|
|
|
if (this.activeTable === 'customer_contact') { |
|
|
|
this.getCustomerContactList() |
|
|
|
} else if (this.activeTable === 'customer_address') { |
|
|
|
this.getCustomerAddressList() |
|
|
|
} else if (this.activeTable === 'project_information') { |
|
|
|
this.getProjectInformationList() |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// ======== 列表数据刷新方法 ======== |
|
|
|
@ -2012,11 +2009,8 @@ export default { |
|
|
|
this.pageSize = data.page.pageSize |
|
|
|
this.totalPage = data.page.totalCount |
|
|
|
// 判断是否全部存在数据 |
|
|
|
if (this.totalPage > 0) { |
|
|
|
// 设置选中行 |
|
|
|
this.$refs.customerTable.setCurrentRow(this.dataList[0]) |
|
|
|
// 加载当前的页签的table |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
if (this.dataList.length > 0) { |
|
|
|
this.customerCurrentRow = {...this.dataList[0]} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
@ -2663,10 +2657,6 @@ export default { |
|
|
|
* 客户信息新增/编辑 |
|
|
|
*/ |
|
|
|
saveData() { |
|
|
|
if (this.modalData.customerNo === '' || this.modalData.customerNo == null) { |
|
|
|
this.$message.warning('请输入客户代码!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) { |
|
|
|
this.$message.warning('请输入客户名称!') |
|
|
|
return |
|
|
|
@ -2908,7 +2898,7 @@ export default { |
|
|
|
* @param row |
|
|
|
*/ |
|
|
|
customerClickRow(row) { |
|
|
|
this.customerCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
this.customerCurrentRow = {...row} |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 单机选中客户联系人 |
|
|
|
@ -3264,8 +3254,8 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
rowStyle({row}) { |
|
|
|
if (this.customerCurrentRow.customerNo === row.customerNo) { |
|
|
|
return {'background-color': '#E8F7F6', cursor: 'pointer'}; |
|
|
|
if (this.customerCurrentRow.customerNo === row.customerNo && this.customerCurrentRow.site === row.site) { |
|
|
|
return {'background-color': '#E8F7F6'}; |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
|