Browse Source

修改bug

chenrui 11 months ago
parent
commit
4e46505c99

+ 7 - 2
src/views/common/custList.vue

@@ -24,7 +24,7 @@
 </template>
 <script>
 import debounce from 'lodash/debounce'
-import { custList } from '@/api/customer'
+import { custList, queryCanCustomer } from '@/api/customer'
 export default {
   props: {
     isValidateEnabled: {
@@ -62,6 +62,10 @@ export default {
     dealerFlag: { // 0不含下级,1 只是下级,all是全部
       type: [String, Number],
       default: 'all'
+    },
+    pageType: {
+      type: String,
+      default: '0' // 0客户名称  1被合并的客户名称
     }
   },
   data () {
@@ -92,7 +96,8 @@ export default {
       if (this.isEnabled) {
         params.enabledFlag = 1
       }
-      custList(params).then(res => {
+      const ajaxUrl = this.pageType === '0' ? custList : queryCanCustomer
+      ajaxUrl(params).then(res => {
         if (fetchId !== this.lastFetchId) {
           return
         }

+ 1 - 1
src/views/customerManagement/customerInfo/list.vue

@@ -114,7 +114,7 @@
     <!-- 客户详情 -->
     <customer-management-detail-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
     <!-- 合并用户 -->
-    <merge-customer-modal :openModal="openMergeModal" :params="customerTemp" @close="closeMergeModal" />
+    <merge-customer-modal pageType="1" :openModal="openMergeModal" :params="customerTemp" @close="closeMergeModal" />
   </a-card>
 </template>
 

+ 1 - 0
src/views/customerManagement/customerInfo/mergeCustomerModal.vue

@@ -107,6 +107,7 @@ export default {
         okType: 'danger',
         cancelText: '取消',
         onOk () {
+          _this.form.id = _this.params.id
           custMerge(_this.form).then(res => {
             if (res.status == 200) {
               _this.$message.info(res.message)