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

Merge commit '416be46e0de15f3dc6f7f212d9dba6ea0ea9ca76' into HEAD

gitadmin 9 месяцев назад
Родитель
Сommit
47bbdfc2e1

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1722669717493
+  "version": 1724751581602
 }

+ 26 - 0
src/api/customer.js

@@ -119,3 +119,29 @@ export const custMergeLogList = (params) => {
     }
   })
 }
+
+// 关联经销商
+export const queryCanRelevancyDealer = params => {
+  return axios({
+    url: '/cust/queryCanRelevancyDealer',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('关联经销商列表')
+    }
+  })
+}
+// 被合并客户名称列表
+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('导出错误项')
     }
   })
-}
+}

+ 2 - 2
src/config/router.config.js

@@ -3308,8 +3308,8 @@ export const asyncRouterMap = [
         component: PageView,
         meta: {
           title: '促销管理',
-          icon: 'contacts'
-          // permission: 'M_promotionInfo'
+          icon: 'contacts',
+          permission: 'M_promotionInfo'
         },
         children: [
           {

+ 479 - 0
src/views/allocationManagement/chainTransferOut/list.vue

@@ -1,3 +1,482 @@
+ jianguan-web / qpls-md-html
+
+list.vue 20 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
+468
+469
+470
+471
+472
+473
+474
+475
 <template>
   <a-card size="small" :bordered="false" class="chainTransferOutList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">

+ 2 - 1
src/views/allocationManagement/storeTransferOut/list.vue

@@ -230,6 +230,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: 'relationTypeDictValue', 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 : '--') } },
@@ -298,7 +299,7 @@ export default {
       this.$refs.outWareRangeDate.resetDate('')
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseEndDate = ''
-      if(this.advanced){
+      if (this.advanced) {
         this.$refs.custList.resetForm()
       }
       this.queryParam.customerSnCurrent = undefined

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

@@ -16,7 +16,7 @@
     allowClear
   >
     <a-spin v-if="fetching" slot="notFoundContent" size="small" />
-    <a-select-option v-for="item in data" :key="item.customerSn" :value="item.customerName" :disabled="(isValidateEnabled ? item.enabledFlag=='0' : false) || (dealerDisabled?item.dealerFlag==1:false)">
+    <a-select-option v-for="item in data" :key="item.customerSn" :value="item.customerName" :disabled="pageType&&pageType==='1'?false:((isValidateEnabled ? item.enabledFlag=='0' : false) || (dealerDisabled ? item.dealerFlag==1:false))">
       {{ item.customerName }}
       <span v-if="isValidateEnabled && item.enabledFlag=='0'">(已禁用)</span>
     </a-select-option>
@@ -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 () {

+ 131 - 0
src/views/common/dealerList.vue

@@ -0,0 +1,131 @@
+<template>
+  <a-select
+    show-search
+    label-in-value
+    :size="size"
+    :value="dealerName"
+    mode="combobox"
+    placeholder="请输入经销商名称搜索"
+    style="width: 100%"
+    :filter-option="false"
+    :not-found-content="fetching ? undefined : null"
+    :dropdownMatchSelectWidth="false"
+    :defaultActiveFirstOption="false"
+    @search="fetchUser"
+    @change="handleChange"
+    :disabled="disabled"
+    allowClear
+  >
+    <a-spin v-if="fetching" slot="notFoundContent" size="small" />
+    <a-select-option v-for="item in data" :key="item.dealerSn" :value="item.dealerName">
+      {{ item.dealerName }}
+    </a-select-option>
+  </a-select>
+</template>
+<script>
+import debounce from 'lodash/debounce'
+import { queryCanRelevancyDealer } from '@/api/customer'
+export default {
+  props: {
+    isValidateEnabled: {
+      type: Boolean,
+      default: false
+    },
+    size: {
+      type: String,
+      default: 'default'
+    },
+    itemSn: {
+      type: String || Number,
+      default: undefined
+    },
+    notSn: {
+      type: String || Number,
+      default: ''
+    },
+    isEnabled: { // 是否只查启用状态
+      type: Boolean,
+      default: false
+    },
+    disabled: {
+      type: Boolean,
+      default: false
+    },
+    mainFlag: {
+      type: Boolean,
+      default: true
+    },
+    satelliteFlag: {
+      type: Boolean,
+      default: false
+    },
+    dealerDisabled: {
+      type: Boolean,
+      default: false
+    },
+    dealerFlag: { // 0不含下级,1 只是下级,all是全部
+      type: [String, Number],
+      default: 'all'
+    }
+  },
+  data () {
+    this.lastFetchId = 0
+    this.fetchUser = debounce(this.fetchUser, 800)
+    return {
+      data: [],
+      dealerName: undefined,
+      fetching: false
+    }
+  },
+  methods: {
+    fetchUser (dealerName) {
+      if (dealerName == '') return
+      this.lastFetchId += 1
+      const fetchId = this.lastFetchId
+      this.data = []
+      this.fetching = true
+      const params = {}
+      params.queryWord = dealerName.trim()
+      queryCanRelevancyDealer(params).then(res => {
+        if (fetchId !== this.lastFetchId) {
+          return
+        }
+        this.data = res.data || []
+        this.fetching = false
+      })
+    },
+    handleChange (value) {
+      if (value && value.key) {
+        value.key = value.key.trim()
+        const ind = this.data.findIndex(item => item.dealerName == value.key)
+        value.row = ind != -1 ? this.data[ind] : undefined
+      }
+
+      Object.assign(this, {
+        dealerName: value,
+        data: [],
+        fetching: false
+      })
+      this.$emit('input', value && value.key || undefined)
+      this.$emit('change', value && value.key || undefined, value && value.row || undefined)
+    },
+    resetForm () {
+      this.dealerName = undefined
+      this.setData(undefined)
+    },
+    setData (value) {
+      Object.assign(this, {
+        dealerName: value,
+        data: [],
+        fetching: false
+      })
+    }
+  },
+  mounted () {
+    if (this.itemSn) {
+      this.fetchUser(this.itemSn)
+      this.setData({ key: this.itemSn })
+    }
+  }
+}
+</script>

+ 38 - 14
src/views/customerManagement/customerInfo/edit.vue

@@ -28,6 +28,16 @@
                   allowClear />
               </a-form-model-item>
             </a-col>
+            <a-col :span="12" v-show="!form.relationType||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>
+            </a-col>
+            <a-col :span="12" v-show="form.relationType&&form.relationType!='customer'">
+              <a-form-model-item label="关联经销商" :labelCol="{ span: 6}" :wrapperCol="{ span: 16 }">
+                <dealerList :disabled="true" id="customerManagementEdit-putPersonName" ref="dealerList1" @change="dealerChange"></dealerList>
+              </a-form-model-item>
+            </a-col>
             <a-col :span="12">
               <a-form-model-item label="联系电话" prop="contactTel" :labelCol="{ span: 6}" :wrapperCol="{ span: 16 }">
                 <a-input id="customerManagementEdit-contactTel" :maxLength="15" v-model.trim="form.contactTel" placeholder="请输入联系电话(最多15个字符)" allowClear />
@@ -74,12 +84,6 @@
               </a-form-model-item>
             </a-col>
             <a-col :span="8" v-if="form.relationTypeDictValue">
-              <!-- <a-form-model-item label="是否卫星仓客户" prop="satelliteFlag">
-                <span style="padding-left: 11px;">{{ form.satelliteFlag == 1 ? '是' : '否' }}</span>
-              </a-form-model-item> -->
-              <!--  <a-form-model-item label="是否为下级" prop="satelliteFlag">
-                <span style="padding-left: 11px;">{{ form.satelliteFlag == 1 ? '是' : '否' }}</span>
-              </a-form-model-item> -->
               <a-form-model-item label="客户关系" prop="relationTypeDictValue">
                 <span style="padding-left: 11px;">{{ form.relationTypeDictValue || '--' }}</span>
               </a-form-model-item>
@@ -118,10 +122,11 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import custType from '@/views/common/custType.js'
 import AreaList from '@/views/common/areaList.js'
+import dealerList from '@/views/common/dealerList'
 import { custSave, custFindById, settleStyleFindAllList } from '@/api/customer'
 export default {
   name: 'CustomerManagementEdit',
-  components: { STable, VSelect, custType, AreaList },
+  components: { STable, VSelect, custType, AreaList, dealerList },
   mixins: [commonMixin],
   props: {
     model: {
@@ -155,9 +160,11 @@ export default {
         relationTypeDictValue: undefined, // 客户关系
         customerTypeSn: undefined, //  客户类型
         priceType: '', //  价格类型
-        settleStyleSn: undefined //  收款方式
+        settleStyleSn: undefined, //  收款方式
+        dealerSn: undefined // 关联经销商
       },
-      areaVal:[],
+      dealerName: undefined, // 关联经销商名称
+      areaVal: [],
       rules: {
         customerName: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
         contactMobile: [{ required: false, pattern: /^\d{11}$/, message: '请输入正确的手机号', trigger: 'blur' }],
@@ -172,6 +179,15 @@ export default {
     }
   },
   methods: {
+    dealerChange (v, row) {
+      if (row && row.dealerSn) {
+        this.form.dealerSn = row.dealerSn
+        this.dealerName = undefined
+      } else {
+        this.dealerName = v
+        this.form.dealerSn = undefined
+      }
+    },
     filterEmpty () {
       let str = this.form.customerName
       str = str.replace(/\ +/g, '')
@@ -179,7 +195,7 @@ export default {
       str = str.replace(/[\r\n]/g, '')
       this.form.customerName = str
     },
-    areaChange (val,opts) {
+    areaChange (val, opts) {
       console.log(opts)
       this.form.provinceSn = val[0] ? val[0] : undefined
       this.form.provinceName = opts[0] ? opts[0].name : ''
@@ -190,13 +206,21 @@ 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.dealer && Object.keys(res.data.dealer).length > 0) {
+            if (res.data.relationType === 'customer') {
+              _this.$refs.dealerList.setData({ key: res.data.dealer.dealerSn, label: res.data.dealer.dealerName, row: res.data.dealer })
+            } else {
+              _this.$refs.dealerList1.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()
         }
       })
     },
@@ -244,7 +268,7 @@ export default {
     },
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/customerManagement/customerInfo/list' })
+      this.$router.push({ name: 'customerInfo' })
     },
     // 获取基础数据
     getBaseData () {

+ 4 - 5
src/views/customerManagement/customerInfo/mergeCustomerModal.vue

@@ -25,8 +25,9 @@
           <custList
             ref="custList"
             :notSn="form.customerSnTarget"
-            :dealerFlag="0"
+            dealerFlag="all"
             dealerDisabled
+            pageType="1"
             @change="custChange"
             placeholder="输入客户名称搜索"></custList>
         </a-form-model-item>
@@ -103,10 +104,8 @@ export default {
       this.$confirm({
         title: '提示',
         content: '确定要合并吗?合并后数据不可恢复。',
-        okText: '确定',
-        okType: 'danger',
-        cancelText: '取消',
         onOk () {
+          _this.form.id = _this.params.id
           custMerge(_this.form).then(res => {
             if (res.status == 200) {
               _this.$message.info(res.message)
@@ -142,7 +141,7 @@ export default {
 }
 </script>
 
-<style lang="less">
+<style lang="less" scoped>
   .merge-customer-modal{
     .ant-modal-body {
       padding: 20px;

+ 19 - 12
src/views/salesManagement/salesQuery/list.vue

@@ -20,12 +20,12 @@
                 <a-input id="salesManagementList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="审核时间">
+                <rangeDate ref="auditRangeDate" v-model="auditTime" @change="auditDateChange" />
+              </a-form-item>
+            </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24">
-                <a-form-item label="审核时间">
-                  <rangeDate ref="auditRangeDate" v-model="auditTime" @change="auditDateChange" />
-                </a-form-item>
-              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="出库时间">
                   <rangeDate ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
@@ -86,9 +86,13 @@
                   <v-select code="FLAG" id="salesManagementList-distributionFlag" v-model="queryParam.distributionFlag" allowClear placeholder="请选择是否铺货出库"></v-select>
                 </a-form-model-item>
               </a-col>
-
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户关系">
+                  <v-select code="CUSTOMER_RELATION_TYPE" id="chainTransferOutList-buyerRelationType" v-model="queryParam.buyerRelationType" allowClear placeholder="请选择客户关系"></v-select>
+                </a-form-model-item>
+              </a-col>
             </template>
-            <a-col :md="6" :sm="24">
+            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" :disabled="disabled" @click="searchForm">查询</a-button>
                 <a-button style="margin-left: 5px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
@@ -285,18 +289,19 @@ export default {
         endDate: getDate.getMonthDays(3).endtime,
         auditBeginDate: '',
         auditEndDate: '',
-        outWarehouseBeginDate: '',
-        outWarehouseEndDate: '',
+        outWarehouseBeginDate: '', // 出库开始时间
+        outWarehouseEndDate: '', // 出库结束时间
         buyerNameCurrent: undefined, //  客户名称
-        buyerSn: undefined,
+        buyerSn: undefined, // 客户sn
         salesBillNo: '', //  销售单号
         purchaseBillNo: '', //  采购单号
         payType: undefined, //  支付方式
         settleStyleSn: undefined, //  收款方式
         billStatus: undefined, //  业务状态
         financialStatus: undefined, //  财务状态
-        sourceType: undefined,
-        distributionFlag: undefined
+        sourceType: undefined, // 单据来源
+        distributionFlag: undefined, // 铺货出库
+        buyerRelationType: undefined// 客户关系
       },
       totalData: {
         totalAmount: 0,
@@ -341,6 +346,7 @@ export default {
         { title: '来源', dataIndex: 'sourceTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '9%', align: 'center' },
         { title: '客户名称', dataIndex: 'buyerNameCurrent', align: 'center', width: '15%', customRender: function (text) { return text || '--' } },
+        { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '9%', customRender: function (text) { return text || '--' } },
         { title: '总款数', dataIndex: 'totalCategory', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'totalAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -531,6 +537,7 @@ export default {
       this.queryParam.financialStatus = undefined
       this.queryParam.sourceType = undefined
       this.queryParam.distributionFlag = undefined
+      this.queryParam.buyerRelationType = undefined
       this.$refs.custList.resetForm()
       if (!flag) {
         this.setIsHomeNav(this.$route.name, null)

+ 4 - 4
src/views/salesManagement/salesQuery/productSalesRecordModal.vue

@@ -81,10 +81,10 @@ export default {
       // 表头
       columns: [
         { title: '销售单号', dataIndex: 'salesBillNo', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售时间', dataIndex: 'salesBillEntity.createDate', width: 250, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售价', dataIndex: 'price', width: 150, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '销售数量', dataIndex: 'qty', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '客户名称', dataIndex: 'salesBillEntity.buyerNameCurrent', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '销售时间', dataIndex: 'salesBillEntity.createDate', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售价', dataIndex: 'price', width: 100, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '销售数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '客户名称', dataIndex: 'salesBillEntity.buyerNameCurrent', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单据来源', dataIndex: 'salesBillEntity.sourceTypeDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
       ],
       list: [],

+ 53 - 44
src/views/salesManagement/salesQueryNew/list.vue

@@ -47,43 +47,50 @@
                 <a-input id="salesManagementList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
               </a-form-item>
             </a-col>
-            <a-col :span="6" v-if="advanced">
-              <a-form-item label="单据来源">
-                <v-select
-                  v-model="queryParam.sourceType"
-                  ref="sourceType"
-                  id="salesManagementList-sourceType"
-                  code="SALES_SOURCE"
-                  placeholder="请选择单据来源"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :span="6" v-if="advanced">
-              <a-form-item label="财务状态">
-                <v-select
-                  v-model="queryParam.financialStatus"
-                  ref="financialStatus"
-                  id="salesManagementList-financialStatus"
-                  code="FINANCIAL_RECEIVE_STATUS"
-                  placeholder="请选择财务状态"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :span="6" v-if="advanced">
-              <a-form-item label="出库时间">
-                <rangeDate ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="6" v-if="advanced">
-              <a-form-item label="采购单号">
-                <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
-              </a-form-item>
-            </a-col>
-            <a-col :span="6" v-if="advanced">
-              <a-form-model-item label="铺货出库">
-                <v-select code="FLAG" id="salesManagementList-distributionFlag" v-model="queryParam.distributionFlag" allowClear placeholder="请选择是否铺货出库"></v-select>
-              </a-form-model-item>
-            </a-col>
+            <template v-if="advanced">
+              <a-col :span="6" >
+                <a-form-item label="单据来源">
+                  <v-select
+                    v-model="queryParam.sourceType"
+                    ref="sourceType"
+                    id="salesManagementList-sourceType"
+                    code="SALES_SOURCE"
+                    placeholder="请选择单据来源"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :span="6">
+                <a-form-item label="财务状态">
+                  <v-select
+                    v-model="queryParam.financialStatus"
+                    ref="financialStatus"
+                    id="salesManagementList-financialStatus"
+                    code="FINANCIAL_RECEIVE_STATUS"
+                    placeholder="请选择财务状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :span="6">
+                <a-form-item label="出库时间">
+                  <rangeDate ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :span="6">
+                <a-form-item label="采购单号">
+                  <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :span="6">
+                <a-form-model-item label="铺货出库">
+                  <v-select code="FLAG" id="salesManagementList-distributionFlag" v-model="queryParam.distributionFlag" allowClear placeholder="请选择是否铺货出库"></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="6">
+                <a-form-model-item label="客户关系">
+                  <v-select code="CUSTOMER_RELATION_TYPE" id="salesManagementList-buyerRelationType" v-model="queryParam.buyerRelationType" allowClear placeholder="请选择客户关系"></v-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
             <a-col :span="24" style="display:flex;align-items: center;">
               <div style="text-align:left;width:50%;">
                 <a-checkbox v-model="isByCustQuery" id="sales-byCustQuery">按客户查询</a-checkbox>
@@ -285,18 +292,19 @@ export default {
         endDate: getDate.getMonthDays(3).endtime,
         auditBeginDate: '',
         auditEndDate: '',
-        outWarehouseBeginDate: '',
-        outWarehouseEndDate: '',
+        outWarehouseBeginDate: '', // 出库开始时间
+        outWarehouseEndDate: '', // 出库结束时间
         buyerNameCurrent: undefined, //  客户名称
-        buyerSn: undefined,
+        buyerSn: undefined, // 客户sn
         salesBillNo: '', //  销售单号
         purchaseBillNo: '', //  采购单号
         payType: undefined, //  支付方式
         settleStyleSn: undefined, //  收款方式
         billStatus: undefined, //  业务状态
         financialStatus: undefined, //  财务状态
-        sourceType: undefined,
-        distributionFlag: undefined
+        sourceType: undefined, // 单据来源
+        distributionFlag: undefined, // 铺货出库
+        buyerRelationType: undefined // 客户关系
       },
       totalData: {
         totalAmount: 0,
@@ -341,6 +349,7 @@ export default {
         { title: '来源', dataIndex: 'sourceTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: this.showDiscount ? '6%' : '9%', align: 'center' },
         { title: '客户名称', dataIndex: 'buyerNameCurrent', align: 'center', width: this.showDiscount ? '12%' : '15%', customRender: function (text) { return text || '--' } },
+        { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '9%', customRender: function (text) { return text || '--' } },
         { title: '总款数', dataIndex: 'totalCategory', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'totalAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -509,7 +518,6 @@ export default {
       this.$refs.rangeDate.resetDate(flag ? '' : this.time)
       this.queryParam.beginDate = flag ? '' : getDate.getMonthDays(3).starttime
       this.queryParam.endDate = flag ? '' : getDate.getMonthDays(3).endtime
-
       this.queryParam.auditBeginDate = ''
       this.queryParam.auditEndDate = ''
       this.queryParam.outWarehouseBeginDate = ''
@@ -520,7 +528,6 @@ export default {
         this.$refs.auditRangeDate.resetDate('')
         this.$refs.outWareRangeDate.resetDate('')
       }
-
       this.queryParam.buyerNameCurrent = undefined
       this.queryParam.buyerSn = undefined
       this.queryParam.salesBillNo = ''
@@ -531,6 +538,8 @@ export default {
       this.queryParam.financialStatus = undefined
       this.queryParam.sourceType = undefined
       this.queryParam.distributionFlag = undefined
+      this.queryParam.buyerRelationType = undefined
+
       this.$refs.custList.resetForm()
       if (!flag) {
         this.setIsHomeNav(this.$route.name, null)

+ 49 - 80
src/views/salesManagement/salesQueryNew/productSalesRecordModal.vue

@@ -8,41 +8,31 @@
     @close="isShow=false"
     :z-index="150"
     wrapClassName="salesRecord-modal jg-drawer-wrap"
-    width="70%">
+    width="80%">
     <div v-if="isShow">
       <div ref="searchBox">
         <div style="padding: 0 0 10px 0;line-height: 24px;" v-if="baseData">
           <div style="flex:1">产品编码:{{ baseData.productCode }}</div>
           <div style="flex:1">产品名称:{{ baseData.productName }}</div>
         </div>
-        <a-tabs size="small" type="card" v-model="curTab" @change="callback">
-          <a-tab-pane key="1" tab="当前客户">
-          </a-tab-pane>
-          <a-tab-pane key="2" tab="全部客户">
-          </a-tab-pane>
+        <a-tabs id="sales-record-tab" size="small" type="card" v-model="curTab" @change="callback">
+          <a-tab-pane key="1" tab="当前客户" id="sales-record-tab1"></a-tab-pane>
+          <a-tab-pane key="2" tab="全部客户" id="sales-record-tab2"></a-tab-pane>
         </a-tabs>
       </div>
       <!-- 表格 -->
-      <a-table
-        class="sTable"
+      <s-table
+        class="sTable fixPagination"
         ref="table"
+        :style="{ height: tableHeight+84+'px' }"
         size="small"
         :rowKey="(record) => record.id"
-        :scroll="{ y: tableHeight }"
         :columns="columns"
-        :dataSource="list"
-        :loading="loading"
-        :pagination="false"
+        :data="loadData"
+        :scroll="{ y:tableHeight }"
+        :defaultLoadData="false"
         bordered>
-      </a-table>
-      <!-- 分页 -->
-      <tablePagination
-        ref="tablePagination"
-        :total="paginationProps.total"
-        :current="paginationProps.current"
-        :pageSize="paginationProps.pageSize"
-        @changePageSize="changePageSize"
-        @changePage="changePage" />
+      </s-table>
     </div>
   </a-drawer>
 </template>
@@ -61,7 +51,7 @@ export default {
       type: Boolean,
       default: false
     },
-    itemId: {
+    itemId: { // 单据id
       type: [Number, String],
       default: ''
     }
@@ -75,36 +65,51 @@ export default {
     const _this = this
     return {
       isShow: this.openModal, //  是否打开弹框
-      tableHeight: 0,
-      buyerSn: null,
+      tableHeight: 0, // 表格高度
+      buyerSn: null, // 客户sn
       queryParam: {
-        productSn: null
+        productSn: null // 产品sn
       },
       // 表头
       columns: [
-        { title: '销售单号', dataIndex: 'salesBillNo', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售时间', dataIndex: 'salesBillEntity.createDate', width: 250, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售价', dataIndex: 'price', width: 150, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '销售数量', dataIndex: 'qty', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '客户名称', dataIndex: 'salesBillEntity.buyerNameCurrent', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单据来源', dataIndex: 'salesBillEntity.sourceTypeDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '序号', dataIndex: 'no', align: 'center', width: '5%' },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售时间', dataIndex: 'salesBillEntity.createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售价', dataIndex: 'price', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '销售数量', dataIndex: 'qty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '客户名称', dataIndex: 'salesBillEntity.buyerNameCurrent', width: '45%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据来源', dataIndex: 'salesBillEntity.sourceTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
-      list: [],
-      loading: false,
-      curTab: '1',
-      paginationProps: {
-        total: 0, //  分页总条数
-        current: 1,
-        pageSize: 20
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        // 查询列表
+        return salesRecordlList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          this.setTableH()
+          return data
+        })
       },
-      baseData: null
+      curTab: '1', // 当前页签
+      baseData: null // 基础信息
     }
   },
   methods: {
+    // 计算表格高度
     setTableH () {
       this.$nextTick(() => {
         const searchBoxH = this.$refs.searchBox.offsetHeight
-        this.tableHeight = window.innerHeight - searchBoxH - 235
+        this.tableHeight = window.innerHeight - searchBoxH - 255
       })
     },
     //  获取详情
@@ -116,45 +121,12 @@ export default {
         delete this.queryParam.buyerSn
       }
       this.queryParam.productSn = productSn
-      this.handelSearch(1)
       this.baseData = row
-    },
-    // 查询列表
-    handelSearch (pageNo) {
-      this.paginationProps.current = pageNo || this.paginationProps.current
-      const params = {
-        pageNo: this.paginationProps.current,
-        pageSize: this.paginationProps.pageSize
-      }
-      // 开始查询
-      this.loading = true
-      salesRecordlList({ ...params, ...this.queryParam }).then(res => {
-        this.loading = false
-        if (res.status == 200) {
-          const data = res.data
-          this.paginationProps.total = Number(res.data.count) || 0
-          this.paginationProps.current = data.pageNo
-          this.list = data.list
-        } else {
-          this.paginationProps.total = 0
-          this.paginationProps.current = 1
-          this.paginationProps.pageSize = 20
-          this.list = []
-        }
-        this.setTableH()
+      this.$nextTick(() => {
+        this.$refs.table.refresh(true)
       })
     },
-    //  分页  一页多少条change
-    changePageSize (current, pageSize) {
-      this.paginationProps.current = current
-      this.paginationProps.pageSize = pageSize
-      this.handelSearch()
-    },
-    //  分页 页码change
-    changePage (current) {
-      this.paginationProps.current = current
-      this.handelSearch()
-    },
+    // 选择选项卡tab后
     callback (key) {
       this.curTab = key
       this.getDetail(this.buyerSn, this.queryParam.productSn, this.baseData)
@@ -172,11 +144,8 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
-        this.paginationProps.total = 0
-        this.paginationProps.current = 1
-        this.paginationProps.pageSize = 20
+        // 重置数据
         this.curTab = '1'
-        this.list = []
       }
     }
   }

+ 12 - 4
src/views/salesManagement/salesReturn/list.vue

@@ -37,6 +37,11 @@
                     allowClear></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="chainTransferOutList-buyerRelationType" v-model="queryParam.buyerRelationType" allowClear placeholder="请选择客户关系"></v-select>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
@@ -159,11 +164,12 @@ export default {
       queryParam: {
         beginDate: getDate.getCurrMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
-        auditBeginDate: '',
-        auditEndDate: '',
-        buyerNameCurrent: undefined,
+        auditBeginDate: '', // 审核开始时间
+        auditEndDate: '', // 审核结束时间
+        buyerNameCurrent: undefined, // 客户名称
         salesReturnNo: undefined, //  销售退货单号
-        state: undefined // 业务状态
+        state: undefined, // 业务状态
+        buyerRelationType: undefined // 客户关系
       },
       countData: null, // 统计数据
       // 表头
@@ -172,6 +178,7 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售退货单号', scopedSlots: { customRender: 'salesReturnNo' }, width: '15%', align: 'center' },
         { title: '客户名称', dataIndex: 'buyerNameCurrent', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '9%', customRender: function (text) { return text || '--' } },
         { title: '退款总金额', dataIndex: 'totalAmount', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '总款数', dataIndex: 'totalCategory', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -293,6 +300,7 @@ export default {
       this.queryParam.buyerNameCurrent = undefined
       this.queryParam.salesReturnNo = ''
       this.queryParam.state = undefined
+      this.queryParam.buyerRelationType = undefined
       this.$refs.custList.resetForm()
       if (!flag) {
         this.setIsHomeNav(this.$route.name, null)

+ 1 - 1
vue.config.js

@@ -209,7 +209,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.2.10/qpls-md',
+        target: 'http://192.168.2.113:8550/qpls-md',
         // target: 'https://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,