|
@@ -470,8 +470,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <AddPerson v-model="isAdd1" v-if="isAdd1" :pageStu="page" :disable="disable" :row="rowDetail"
|
|
|
- :customersId="form.id" :customersName="form.name" />
|
|
|
+ <AddPerson v-model="isAdd1" v-if="isAdd1" :pageStu="page" :disable="disable" :row="rowDetail" :customersId="form.id"
|
|
|
+ :customersName="form.name" />
|
|
|
|
|
|
<AddDepartment v-model="isAdd2" v-if="isAdd2" :pageStu="page" :disable="disable" :row="rowDetail"
|
|
|
:customersId="form.id" :customersName="form.name" />
|
|
@@ -522,6 +522,8 @@
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
|
+ // 选中数组中的客户编码
|
|
|
+ codes: [],
|
|
|
// 子表选中数据
|
|
|
checkedMkCmCustomersResponsiblePerson: [],
|
|
|
checkedMkCmCustomersDepartment: [],
|
|
@@ -710,6 +712,7 @@
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
+ this.codes = selection.map(item => item.code)
|
|
|
this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
@@ -793,8 +796,14 @@
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const ids = row.id || this.ids;
|
|
|
- this.$modal.confirm('是否确认删除客户编码为"' + row.code + '"的数据项?').then(function () {
|
|
|
+ let ids = row.id || this.ids;
|
|
|
+ // for (let i = 0; i < ids.length; i++) {
|
|
|
+ // ids[i] = parseInt(ids[i]);
|
|
|
+ // }
|
|
|
+ // ids = ids.join();
|
|
|
+ console.log(ids, 'ids')
|
|
|
+ const codes = row.code || this.codes;
|
|
|
+ this.$modal.confirm('是否确认删除客户编码为"' + codes + '"的数据项?').then(function () {
|
|
|
return delCustomers(ids);
|
|
|
}).then(() => {
|
|
|
this.getList();
|