Просмотр исходного кода

Merge branch 'develop_yh45' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_yh45

lilei 9 месяцев назад
Родитель
Сommit
8bb8f9056e

+ 14 - 0
src/api/customer.js

@@ -131,3 +131,17 @@ export const queryCanRelevancyDealer = params => {
     }
   })
 }
+// 被合并客户名称列表
+export const queryCanCustomer = (params) => {
+  const url = `/cust/queryCanCustomer/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}

+ 3 - 3
src/api/storeCallOut.js

@@ -125,7 +125,7 @@ export const storeCallOutDetailSave = (params) => {
     data: params,
     method: 'post',
     headers: {
-      'module': encodeURIComponent(params.id?'修改调出数量':'添加')
+      'module': encodeURIComponent(params.id ? '修改调出数量' : '添加')
     }
   })
 }
@@ -146,7 +146,7 @@ export const storeCallOutDetailPrint = params => {
     url: `storeCallOut/print/${params.sn}/${params.type}/${params.costFlag}`,
     method: 'get',
     headers: {
-      'module': encodeURIComponent(params.type == 'INK' ? '喷墨打印':'针式打印')
+      'module': encodeURIComponent(params.type == 'INK' ? '喷墨打印' : '针式打印')
     }
   }
   // 喷墨打印
@@ -185,4 +185,4 @@ export const storeCallOutDetailImportError = (params) => {
       'module': encodeURIComponent('导出错误项')
     }
   })
-}
+}

+ 14 - 477
src/views/allocationManagement/storeTransferOut/list.vue

@@ -1,474 +1,3 @@
- jianguan-web / qpls-md-html
-
-list.vue 19 KB
-
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
 <template>
   <a-card size="small" :bordered="false" class="storeTransferOutList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
@@ -491,12 +20,12 @@ list.vue 19 KB
                 <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="店内调出单号">
-                <a-input id="storeTransferOutList-storeCallOutNo" v-model.trim="queryParam.storeCallOutNo" allowClear placeholder="请输入店内调出单号"/>
-              </a-form-item>
-            </a-col>
             <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="店内调出单号">
+                  <a-input id="storeTransferOutList-storeCallOutNo" v-model.trim="queryParam.storeCallOutNo" allowClear placeholder="请输入店内调出单号"/>
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="调往对象名称">
                   <custList id="storeTransferOutList-putPersonName" ref="custList" @change="custChange"></custList>
@@ -533,8 +62,13 @@ list.vue 19 KB
                   ></v-select>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户关系">
+                  <v-select code="CUSTOMER_RELATION_TYPE" id="storeTransferOutList-putPersonRelationType" v-model="queryParam.putPersonRelationType" allowClear placeholder="请选择客户关系"></v-select>
+                </a-form-model-item>
+              </a-col>
             </template>
-            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align: center;">
+            <a-col :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeTransferOutList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
               <a @click="advanced=!advanced" style="margin-left: 8px">
@@ -659,6 +193,7 @@ export default {
         auditEndDate: '',
         outWarehouseBeginDate: '',
         outWarehouseEndDate: '',
+        putPersonRelationType: undefined, // 客户关系
         customerNameCurrent: undefined, //  调往对象
         customerSnCurrent: undefined,
         storeCallOutNo: undefined, // 店内调出单号
@@ -701,6 +236,7 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '店内调出单号', scopedSlots: { customRender: 'storeCallOutNo' }, width: '14%', align: 'center' },
         { title: '调往对象名称', width: '16%', align: 'center', customRender: function (text, record) { return (record.putPersonType == 'CUSTOMER' ? record.customerNameCurrent : record.putPersonName) || '--' }, ellipsis: true },
+        { title: '客户关系', dataIndex: 'putPersonRelationTypeDictValue', align: 'center', width: '9%', customRender: function (text) { return text || '--' } },
         { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '总款数', dataIndex: 'productTotalCategory', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'productTotalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -773,6 +309,7 @@ export default {
         this.$refs.custList.resetForm()
       }
       this.queryParam.customerSnCurrent = undefined
+      this.queryParam.putPersonRelationType = undefined
       this.queryParam.customerNameCurrent = undefined
       this.queryParam.storeCallOutNo = undefined
       this.queryParam.callOutType = undefined

+ 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
         }

+ 9 - 4
src/views/customerManagement/customerInfo/edit.vue

@@ -28,7 +28,7 @@
                   allowClear />
               </a-form-model-item>
             </a-col>
-            <a-col :span="12" v-if="form.relationType==='customer'">
+            <a-col :span="12" v-show="form.relationType==='customer'">
               <a-form-model-item label="关联经销商" :labelCol="{ span: 6}" :wrapperCol="{ span: 16 }">
                 <dealerList id="customerManagementEdit-putPersonName" ref="dealerList" @change="dealerChange"></dealerList>
               </a-form-model-item>
@@ -201,13 +201,18 @@ export default {
     },
     //  获取客户信息
     getDetail () {
+      const _this = this
       custFindById({ id: this.$route.params.id }).then(res => {
         if (res.status == 200) {
           res.data.satelliteFlag = res.data.dealerFlag
-          this.form = Object.assign(this.form, res.data)
-          this.areaVal = [res.data.provinceSn, res.data.citySn, res.data.countySn]
+          if (res.data.relationType === 'customer' && res.data.dealer && Object.keys(res.data.dealer).length > 0) {
+            debugger
+            _this.$refs.dealerList.setData({ key: res.data.dealer.dealerSn, label: res.data.dealer.dealerName, row: res.data.dealer })
+          }
+          _this.form = Object.assign(this.form, res.data)
+          _this.areaVal = [res.data.provinceSn, res.data.citySn, res.data.countySn]
         } else {
-          this.$refs.ruleForm.resetFields()
+          _this.$refs.ruleForm.resetFields()
         }
       })
     },

+ 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)