瀏覽代碼

Merge branch 'develop_yh13' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh13

lilei 2 年之前
父節點
當前提交
198af65b66

+ 13 - 3
src/api/dealerRelation.js

@@ -56,8 +56,7 @@ export const updateRebate = (params) => {
   })
 }
 
-
-//经销商所属分区  列表
+// 经销商所属分区  列表
 export const queryDealerWithBizuser = (params) => {
   const url = `/subareaAreaDealer/queryDealerWithBizuser/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
@@ -67,4 +66,15 @@ export const queryDealerWithBizuser = (params) => {
     data: params,
     method: 'post'
   })
-}
+}
+
+// 经销商所属分区  导出
+export const exportDealerWithBizuser = params => {
+  const url = `/subareaAreaDealer/exportDealerWithBizuser`
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 17 - 24
src/views/dealerManagement/businessOwnerSettings/categorySet.vue

@@ -15,7 +15,7 @@
           :scroll="{ y: tableHeight }" -->
           <!-- 产品分类 -->
           <template slot="classify" slot-scope="text,record,index">
-            <div style="max-height:230px;overflow-y:scroll;">
+            <div style="max-height:64px;overflow-y:scroll;">
               <a-row v-if="record.productTypeList && record.productTypeList.length>0">
                 <a-col :span="20">
                   <a-tag style="margin-bottom:10px;" closable @close.prevent="delLabel(record.bizUserScopeSn,con,'typeList')" v-for="(con,i) in record.productTypeList" :key="i">
@@ -39,7 +39,7 @@
           </template>
           <!-- 产品品牌 -->
           <template slot="brand" slot-scope="text,record,index">
-            <div style="max-height:230px;overflow-y:scroll;">
+            <div style="max-height:64px;overflow-y:scroll;">
               <a-row v-if="record.productBrandList && record.productBrandList.length>0">
                 <a-col :span="20">
                   <a-tag style="margin-bottom:10px;" closable @close.prevent="delLabel(record.bizUserScopeSn,item,'brandList')" v-for="(item,j) in record.productBrandList" :key="j">
@@ -143,29 +143,22 @@ export default {
     // 删除分类、品牌标签
     delLabel (bigRow, row, type) {
       const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '删除后不可恢复,确定要删除吗?',
-        centered: true,
-        onOk () {
-          const bigPos = _this.dataSource.findIndex(con => { return bigRow == con.bizUserScopeSn })
-          if (type == 'typeList') {
-            const typePos = _this.dataSource[bigPos].productTypeList.findIndex(item => { return item.id == row.id })
-            deleteProductType({ id: _this.dataSource[bigPos].productTypeList[typePos].id }).then(res => {
-              if (res.status == 200) {
-                _this.dataSource[bigPos].productTypeList.splice(typePos, 1)
-              }
-            })
-          } else {
-            const brandPos = _this.dataSource[bigPos].productBrandList.findIndex(obj => { return obj.id == row.id })
-            deleteProductBrand({ id: _this.dataSource[bigPos].productBrandList[brandPos].id }).then(res => {
-              if (res.status == 200) {
-                _this.dataSource[bigPos].productBrandList.splice(brandPos, 1)
-              }
-            })
+      const bigPos = _this.dataSource.findIndex(con => { return bigRow == con.bizUserScopeSn })
+      if (type == 'typeList') {
+        const typePos = _this.dataSource[bigPos].productTypeList.findIndex(item => { return item.id == row.id })
+        deleteProductType({ id: _this.dataSource[bigPos].productTypeList[typePos].id }).then(res => {
+          if (res.status == 200) {
+            _this.dataSource[bigPos].productTypeList.splice(typePos, 1)
           }
-        }
-      })
+        })
+      } else {
+        const brandPos = _this.dataSource[bigPos].productBrandList.findIndex(obj => { return obj.id == row.id })
+        deleteProductBrand({ id: _this.dataSource[bigPos].productBrandList[brandPos].id }).then(res => {
+          if (res.status == 200) {
+            _this.dataSource[bigPos].productBrandList.splice(brandPos, 1)
+          }
+        })
+      }
     },
     // 添加分类标签
     addClassifyTag (pos, row) {

+ 42 - 8
src/views/dealerManagement/dealerZoneSearch/list.vue

@@ -23,14 +23,13 @@
             <a-col :md="24" :sm="24" style="margin-top: 10px;text-align:center;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="dealerZoneSearch-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="dealerZoneSearch-reset">重置</a-button>
-              <!-- <a-button
+              <a-button
                 style="margin-left: 5px"
                 type="primary"
                 class="button-warning"
                 @click="handleExport"
-                :disabled="disabled"
                 :loading="exportLoading"
-                id="dealerZoneSearch-export">导出</a-button> -->
+                id="dealerZoneSearch-export">导出</a-button>
             </a-col>
           </a-row>
         </a-form>
@@ -51,6 +50,33 @@
           :scroll="{ y: tableHeight }"
           :defaultLoadData="false"
           bordered>
+          <template slot="kf" slot-scope="text, record">
+            <a-tooltip placement="top" v-if="record.userNameKfs">
+              <template slot="title">
+                {{ record.userNameKfs }}
+              </template>
+              <div class="line-2">{{ record.userNameKfs }}</div>
+            </a-tooltip>
+            <span v-else>--</span>
+          </template>
+          <template slot="qyfzr" slot-scope="text, record">
+            <a-tooltip placement="top" v-if="record.userNameQyfzrs">
+              <template slot="title">
+                {{ record.userNameQyfzrs }}
+              </template>
+              <div class="line-2">{{ record.userNameQyfzrs }}</div>
+            </a-tooltip>
+            <span v-else>--</span>
+          </template>
+          <template slot="xszj" slot-scope="text, record">
+            <a-tooltip placement="top" v-if="record.userNameXszjs">
+              <template slot="title">
+                {{ record.userNameXszjs }}
+              </template>
+              <div class="line-2">{{ record.userNameXszjs }}</div>
+            </a-tooltip>
+            <span v-else>--</span>
+          </template>
         </s-table>
       </a-spin>
     </a-card>
@@ -62,7 +88,7 @@ import { commonMixin } from '@/utils/mixin'
 import { STable } from '@/components'
 import subarea from '@/views/common/subarea.js'
 import { exportExcel } from '@/libs/JGPrint.js'
-import { queryDealerWithBizuser } from '@/api/dealerRelation'
+import { queryDealerWithBizuser, exportDealerWithBizuser } from '@/api/dealerRelation'
 import dealerSearchList from '@/views/common/dealerSearchList.vue'
 export default {
   name: 'DealerZoneSearch',
@@ -87,9 +113,9 @@ export default {
         { title: '经销商名称', dataIndex: 'dealer.dealerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '所属区域', dataIndex: 'subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '所属分区', dataIndex: 'subareaAreaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客服', dataIndex: 'userNameKfs', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售总监', dataIndex: 'userNameXszjs', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '客服', scopedSlots: { customRender: 'kf' }, dataIndex: 'userNameKfs', width: '18%', align: 'center' },
+        { title: '区域负责人', scopedSlots: { customRender: 'qyfzr' }, dataIndex: 'userNameQyfzrs', width: '18%', align: 'center' },
+        { title: '销售总监', scopedSlots: { customRender: 'xszj' }, dataIndex: 'userNameXszjs', width: '18%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -118,7 +144,7 @@ export default {
       const params = this.queryParam
       this.spinning = true
       this.exportLoading = true
-      exportExcel(dealerExport, params, '经销商所属分区导出', function () {
+      exportExcel(exportDealerWithBizuser, params, '经销商所属分区导出', function () {
         _this.spinning = false
         _this.exportLoading = false
       })
@@ -189,4 +215,12 @@ export default {
   /deep/.ant-select-combobox .ant-select-arrow{
     display:inline-block !important;
   }
+  .line-2{
+    width: 100%;
+    overflow:hidden;
+    text-overflow: ellipsis;
+    -webkit-line-clamp: 2;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+  }
 </style>

+ 21 - 31
src/views/reportData/billingBackReport/list.vue

@@ -21,11 +21,6 @@
                 <supplier id="billingBackReport-supplierName" v-model="queryParam.supplier.supplierSn" @change="getSupplierName" placeholder="请输入供应商名称"></supplier>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="所在区域/分区">
-                <subarea id="billingBackReportList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
-              </a-form-model-item>
-            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="地区">
                 <AreaList id="billingBackReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
@@ -90,9 +85,9 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
+import getDate from '@/libs/getDate.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import AreaList from '@/views/common/areaList.js'
-import subarea from '@/views/common/subarea.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import reportModal from '@/views/common/reportModal.vue'
 import supplier from '@/views/common/supplier.js'
@@ -100,19 +95,18 @@ import { querySupplierPage, querySupplierCount, querySupplierTitle, supplierExpo
 export default {
   name: 'RegionTypeSalesReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, reportModal, AreaList, supplier },
+  components: { STable, VSelect, rangeDate, reportModal, AreaList, supplier },
   data () {
     return {
       spinning: false,
       showExport: false,
       queryParam: {
-        time: [],
-        beginDate: '',
-        endDate: '',
-        subareaArea:{
-          subareaSn: undefined,
-          subareaAreaSn: undefined
-        },
+        time: [
+          getDate.getCurrMonthDays().starttime,
+          getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         supplier: {
           supplierSn: undefined,
           supplierName: undefined,
@@ -122,7 +116,7 @@ export default {
         }
       },
       countLabel: [],
-      countBrandLabel:[],
+      countBrandLabel: [],
       columns: [],
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
@@ -167,7 +161,7 @@ export default {
     },
     // 选择供应商
     getSupplierName (val, item) {
-      this.queryParam.supplier.supplierName = item.supplierName
+      this.queryParam.supplier.supplierName = item ? item.supplierName : undefined
       this.queryParam.supplier.supplierSn = val
     },
     //  创建时间  change
@@ -192,32 +186,28 @@ export default {
         }
       })
     },
-    subareaChange(val){
-      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
-      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
-    },
     //  重置
     resetSearchForm () {
       this.$refs.ruleForm.resetFields()
-      this.queryParam.time = []
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
       this.$refs.rangeDate.resetDate(this.queryParam.time)
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.supplier.supplierName = undefined
       this.queryParam.supplier.supplierSn = undefined
       this.queryParam.supplier.provinceSn = undefined
       this.queryParam.supplier.citySn = undefined
       this.queryParam.supplier.districtSn = undefined
-      this.queryParam.subareaArea.subareaSn = undefined
-      this.queryParam.subareaArea.subareaAreaSn = undefined
-      this.$refs.subarea.clearData()
       this.$refs.areaList.clearData()
       this.$refs.table.clearTable()
     },
     areaChange (val) {
-      this.queryParam.provinceSn = val[0] ? val[0] : ''
-      this.queryParam.citySn = val[1] ? val[1] : ''
-      this.queryParam.districtSn = val[2] ? val[2] : ''
+      this.queryParam.supplier.provinceSn = val[0] ? val[0] : ''
+      this.queryParam.supplier.citySn = val[1] ? val[1] : ''
+      this.queryParam.supplier.districtSn = val[2] ? val[2] : ''
     },
     //  导出
     handleExport () {
@@ -245,8 +235,8 @@ export default {
       const _this = this
       const tableTitle = await querySupplierTitle().then(res => res.data)
       this.columns = tableTitle.list
-      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')<0)
-      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')>=0)
+      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') < 0)
+      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') >= 0)
       this.columns.map(item => {
         let mw = 40
         if (item.customRender == 'amount') {

+ 19 - 12
src/views/reportData/billingOrderReport/list.vue

@@ -95,6 +95,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
+import getDate from '@/libs/getDate.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import AreaList from '@/views/common/areaList.js'
 import subarea from '@/views/common/subarea.js'
@@ -111,10 +112,13 @@ export default {
       spinning: false,
       showExport: false, // 导出弹窗
       queryParam: {
-        time: [],
-        beginDate: '',
-        endDate: '',
-        subareaArea:{
+        time: [
+          getDate.getCurrMonthDays().starttime,
+          getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
@@ -128,7 +132,7 @@ export default {
         }
       },
       countLabel: [],
-      countBrandLabel:[],
+      countBrandLabel: [],
       columns: [],
       totalData: null,
       disabled: false, //  查询、重置按钮是否可操作
@@ -162,7 +166,7 @@ export default {
   methods: {
     // 选择供应商
     getSupplierName (val, item) {
-      this.queryParam.supplier.supplierName = item.supplierName
+      this.queryParam.supplier.supplierName = item ? item.supplierName : undefined
       this.queryParam.supplier.supplierSn = val
     },
     // 总计
@@ -197,17 +201,20 @@ export default {
         }
       })
     },
-    subareaChange(val){
+    subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
     //  重置
     resetSearchForm () {
       this.$refs.ruleForm.resetFields()
-      this.queryParam.time = []
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
       this.$refs.rangeDate.resetDate(this.queryParam.time)
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.supplier.provinceSn = undefined
       this.queryParam.supplier.citySn = undefined
       this.queryParam.supplier.districtSn = undefined
@@ -251,8 +258,8 @@ export default {
       const _this = this
       const tableTitle = await queryBillNoTitle().then(res => res.data)
       this.columns = tableTitle.list
-      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')<0)
-      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')>=0)
+      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') < 0)
+      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') >= 0)
       this.columns.map(item => {
         let mw = 40
         if (item.customRender == 'amount') {