|
@@ -22,7 +22,7 @@
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="是否卫星仓客户">
|
|
|
+ <a-form-item label="是否为下级">
|
|
|
<v-select code="FLAG" id="customerManagementList-satelliteFlag" v-model="queryParam.satelliteFlag" allowClear placeholder="请选择"></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -104,6 +104,13 @@
|
|
|
class="button-success"
|
|
|
@click="handleDetail(record)"
|
|
|
id="customerManagementList-detail-btn">详情</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ v-if="$hasPermissions('B_customer_customerInfo_edit')"
|
|
|
+ type="link"
|
|
|
+ class="button-primary"
|
|
|
+ @click="mergeCustomer(record)"
|
|
|
+ id="customerManagementList-edit-btn">合并</a-button>
|
|
|
<span v-if="!$hasPermissions('B_customer_customerInfo_edit') && !$hasPermissions('B_customer_customerInfo_detail')">--</span>
|
|
|
</template>
|
|
|
<template slot="enableAction" slot-scope="text, record">
|
|
@@ -114,6 +121,8 @@
|
|
|
</a-spin>
|
|
|
<!-- 客户详情 -->
|
|
|
<customer-management-detail-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
|
|
|
+ <!-- 合并用户 -->
|
|
|
+ <merge-customer-modal :openModal="openMergeModal" :mainCustomerName="customerName" @close="closeMergeModal" />
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
@@ -125,9 +134,10 @@ import custType from '@/views/common/custType.js'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import customerManagementDetailModal from './detailModal.vue'
|
|
|
+import mergeCustomerModal from './mergeCustomerModal.vue'
|
|
|
export default {
|
|
|
name: 'CustomerManagementList',
|
|
|
- components: { STable, VSelect, customerManagementDetailModal, rangeDate, custType },
|
|
|
+ components: { STable, VSelect, customerManagementDetailModal, rangeDate, custType, mergeCustomerModal },
|
|
|
mixins: [commonMixin],
|
|
|
data () {
|
|
|
return {
|
|
@@ -154,7 +164,7 @@ export default {
|
|
|
{ title: '联系手机', dataIndex: 'contactMobile', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '最后销售时间', dataIndex: 'lastSaleTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '是否卫星仓', dataIndex: 'satelliteFlagDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '是否为下级', dataIndex: 'satelliteFlagDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '启用禁用', scopedSlots: { customRender: 'enableAction' }, width: '8%', align: 'center' },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
|
],
|
|
@@ -181,7 +191,9 @@ export default {
|
|
|
addrCityList: [], // 市下拉
|
|
|
addrDistrictList: [], // 区下拉
|
|
|
openModal: false, // 查看客户详情 弹框
|
|
|
- itemId: '' // 当前客户id
|
|
|
+ itemId: '', // 当前客户id
|
|
|
+ openMergeModal: false, // 合并用户名称
|
|
|
+ customerName: ''// 主题客户名称
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -265,6 +277,10 @@ export default {
|
|
|
this.itemId = ''
|
|
|
this.openModal = false
|
|
|
},
|
|
|
+ closeMergeModal () {
|
|
|
+ this.customerName = ''
|
|
|
+ this.openMergeModal = false
|
|
|
+ },
|
|
|
filterOption (input, option) {
|
|
|
return (
|
|
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
@@ -326,6 +342,14 @@ export default {
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
this.tableHeight = window.innerHeight - tableSearchH - 235
|
|
|
+ },
|
|
|
+ // 合并客户
|
|
|
+ mergeCustomer (con) {
|
|
|
+ this.customerName = con.customerName
|
|
|
+ const _this = this
|
|
|
+ this.$nextTick(() => {
|
|
|
+ _this.openMergeModal = true
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
watch: {
|