lilei 16 timmar sedan
förälder
incheckning
aeae72125e

+ 35 - 0
src/api/dealearNewLog.js

@@ -0,0 +1,35 @@
+import { axios } from '@/utils/request'
+//  查询修改标记
+export const dealerNewLogEditFlag = (params) => {
+  return axios({
+    url: `/dealerNewLog/queryUpdateFlag/${params.sn}`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('查询新客户首笔订单是否修改标记')
+    }
+  })
+}
+// 新客户列表
+export const dealerNewLogPageList = (params) => {
+  const url = `/dealerNewLog/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  新客户导出
+export const dealerNewLogExport = (params) => {
+  return axios({
+    url: '/dealerNewLog/export',
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers: {
+      'module': encodeURIComponent('新客户导出')
+    }
+  })
+}

+ 15 - 18
src/views/dealerManagement/newCustomSearch/list.vue

@@ -90,7 +90,6 @@
           :columns="columns"
           :data="loadData"
           :scroll="{y: tableHeight}"
-          :defaultLoadData="false"
           bordered>
         </s-table>
       </a-spin>
@@ -101,7 +100,6 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { hdExportExcel } from '@/libs/exportExcel'
-import moment from 'moment'
 // 组件
 import { STable, VSelect } from '@/components'
 import subarea from '@/views/common/subarea.js'
@@ -110,12 +108,13 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import BizUser from '@/views/common/bizUser.js'
 import customerService from '@/views/common/customerService.vue'
 // 接口
-import { salesStatsDealerList, salesStatsDealerExport } from '@/api/reportData'
+import { dealerNewLogPageList, dealerNewLogExport } from '@/api/dealearNewLog'
 export default {
   name: 'CustomerCountList',
   mixins: [commonMixin],
   components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, BizUser, customerService },
   data () {
+    const _this = this
     return {
       spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
@@ -125,7 +124,7 @@ export default {
       //  查询条件
       queryParam: {
         dealerLevel: undefined, // 客户等级
-        dealerSnOwner: undefined, // 客户sn
+        dealerSn: undefined, // 客户sn
         dealerName: undefined, // 客户名称
         provinceSn: undefined, // 省
         citySn: undefined, // 市
@@ -141,26 +140,25 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '区域负责人', dataIndex: 'subareaArea.userNameQyfzrs', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '省份', dataIndex: 'dealer.provinceName', width: '6%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'dealer.dealerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户级别', dataIndex: 'dealer.dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域负责人', dataIndex: 'subareaArea.bizUserName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省份', dataIndex: 'provinceName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerName', width: '17%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '客户级别', dataIndex: 'dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '年份', dataIndex: 'year', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '月份', dataIndex: 'month', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '第一笔时间', dataIndex: 'firstDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '最后一笔时间', dataIndex: 'lastDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '最后一笔时间', dataIndex: 'lastDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '首笔订单数', dataIndex: 'billCount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '总开单金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '总实售金额', dataIndex: 'totalRealAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '总开单金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: function (text) { return _this.toThousands(text) || '--' } },
+        { title: '总实售金额', dataIndex: 'totalRealAmount', width: '8%', align: 'right', customRender: function (text) { return _this.toThousands(text) || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
-        params.removeReportFlag = 1
         // 获取列表数据  有分页
-        return salesStatsDealerList(params).then(res => {
+        return dealerNewLogPageList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -196,7 +194,7 @@ export default {
     // 客户名称 change
     custChange (val) {
       this.queryParam.dealerName = val.name
-      this.queryParam.dealerSnOwner = val.key
+      this.queryParam.dealerSn = val.key
     },
     // 地区
     areaChange (val) {
@@ -215,8 +213,7 @@ export default {
       this.queryParam.citySn = undefined
       this.queryParam.districtSn = undefined
       this.queryParam.dealerName = undefined
-      this.queryParam.dealerSnOwner = undefined
-      this.queryParam.bizUserSn = undefined
+      this.queryParam.dealerSn = undefined
       this.queryParam.subareaArea.subareaSn = ''
       this.queryParam.subareaArea.subareaAreaSn = ''
       this.queryParam.subareaArea.bizUserSn = undefined
@@ -229,15 +226,15 @@ export default {
       }
       this.$refs.table.clearTable()
       this.$refs.ruleForm.resetFields()
+      this.$refs.table.refresh(false)
     },
     // 导出
     handleExport () {
       const _this = this
       const params = JSON.parse(JSON.stringify(_this.queryParam))
-      params.removeReportFlag = this.removeReportFlag
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(salesStatsDealerExport, params, '新客户查询', function () {
+      hdExportExcel(dealerNewLogExport, params, '新客户查询', function () {
         _this.exportLoading = false
         _this.spinning = false
       })

+ 12 - 1
src/views/salesManagement/waitDispatchNew/dsModal.vue

@@ -78,7 +78,7 @@
             </a-radio-group>
           </a-form-model-item>
           <a-form-model-item label="新客户首笔订单" prop="newCustFlag">
-            <a-radio-group v-model="form.newCustFlag" id="dsModal-newCustFlag">
+            <a-radio-group v-model="form.newCustFlag" :disabled="!editFlag" id="dsModal-newCustFlag">
               <a-radio value="1" id="dsModal-newCustFlag-1">
               </a-radio>
@@ -104,6 +104,7 @@ import { commonMixin } from '@/utils/mixin'
 import chooseAddressModal from '../salesQuery/receivingAddress/chooseAddressModal.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import { dealerRecevieAddrQuery } from '@/api/dealerRecevieAddr'
+import { dealerNewLogEditFlag } from '@/api/dealearNewLog'
 export default {
   name: 'DsModal',
   mixins: [commonMixin],
@@ -229,6 +230,14 @@ export default {
         }
       }
     },
+    getEditFlag () {
+      dealerNewLogEditFlag({ sn: this.detailData.buyerSn }).then(res => {
+        if (res.status == 200) {
+          this.editFlag = res.data
+          this.form.newCustFlag = res.data ? 1 : 0
+        }
+      })
+    },
     // 重置表单
     resetForm () {
       this.detailData = null
@@ -259,6 +268,8 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.resetForm()
+      } else {
+        this.getEditFlag()
       }
     }
   }

+ 1 - 1
vue.config.js

@@ -107,7 +107,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.2.103/ocs-admin',
+        target: 'http://192.168.2.10/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
         // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,