浏览代码

注释 id

chenrui 1 年之前
父节点
当前提交
401091c7e7

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

@@ -13,12 +13,12 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="退货完成时间" prop="time">
-                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange"/>
+                <rangeDate ref="rangeDate" id="billingBackReportList-time" :value="queryParam.time" @change="dateChange"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="供应商名称">
-                <supplier id="billingBackReport-supplierName" v-model="queryParam.supplier.supplierSn" @change="getSupplierName" placeholder="请输入供应商名称"></supplier>
+                <supplier id="billingBackReportList-supplierName" v-model="queryParam.supplier.supplierSn" @change="getSupplierName" placeholder="请输入供应商名称"></supplier>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -88,43 +88,46 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { STable, VSelect } from '@/components'
 import getDate from '@/libs/getDate.js'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
+import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import AreaList from '@/views/common/areaList.js'
-import { hdExportExcel } from '@/libs/exportExcel'
 import reportModal from '@/views/common/reportModal.vue'
 import supplier from '@/views/common/supplier.js'
+// 接口
 import { querySupplierPage, querySupplierCount, querySupplierTitle, supplierExport } from '@/api/reportData.js'
 export default {
-  name: 'RegionTypeSalesReportList',
+  name: 'BillingBackReportList',
   mixins: [commonMixin],
   components: { STable, VSelect, rangeDate, reportModal, AreaList, supplier },
   data () {
     return {
       spinning: false,
-      showExport: false,
+      showExport: false, // 导出弹窗提示
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
       queryParam: {
+        // 退货完成日期  默认值
         time: [
           getDate.getCurrMonthDays().starttime,
           getDate.getCurrMonthDays().endtime
         ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始日期
+        endDate: getDate.getCurrMonthDays().endtime, // 结束日期
         supplier: {
-          supplierSn: undefined,
-          supplierName: undefined,
-          provinceSn: undefined,
-          citySn: undefined,
-          districtSn: undefined
+          supplierSn: undefined, // 供应商 sn
+          supplierName: undefined, // 供应商名称
+          provinceSn: undefined, // 省
+          citySn: undefined, // 市
+          districtSn: undefined// 区
         }
       },
-      countLabel: [],
-      countBrandLabel: [],
-      columns: [],
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
-      totalData: null,
+      countLabel: [], // 统计 分类数据
+      countBrandLabel: [], // 统计 品牌数据
+      columns: [], // 表头数据
+      totalData: null, // 统计
       rules: {
         'time': [{ required: true, message: '请选择退货完成时间', trigger: 'change' }]
       },
@@ -132,13 +135,16 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        const params = Object.assign(parameter, this.queryParam) //  无分页
+        const params = Object.assign(parameter, this.queryParam)
         delete params.time
+        // 获取列表数据 有分页
         return querySupplierPage(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 统计
             this.getCount(params)
+            // 计算列表序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -168,7 +174,7 @@ export default {
       this.queryParam.supplier.supplierName = item ? item.supplierName : undefined
       this.queryParam.supplier.supplierSn = val
     },
-    //  创建时间  change
+    //  退货完成日期  change
     dateChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
@@ -208,6 +214,7 @@ export default {
       this.$refs.areaList.clearData()
       this.$refs.table.clearTable()
     },
+    // 地区 change
     areaChange (val) {
       this.queryParam.supplier.provinceSn = val[0] ? val[0] : ''
       this.queryParam.supplier.citySn = val[1] ? val[1] : ''
@@ -256,10 +263,12 @@ export default {
       })
       this.resetSearchForm()
     },
+    // 初始化
     pageInit () {
       this.getTableTitle()
       this.setTableH()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 215

+ 30 - 21
src/views/reportData/billingOrderReport/list.vue

@@ -13,22 +13,22 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="退货完成时间" prop="time">
-                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange"/>
+                <rangeDate ref="rangeDate" id="billingOrderReport-time" :value="queryParam.time" @change="dateChange"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="供应商名称">
-                <supplier id="billingBackReport-supplierName" v-model="queryParam.supplier.supplierSn" @change="getSupplierName" placeholder="请输入供应商名称"></supplier>
+                <supplier id="billingOrderReport-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="采购退货单号" >
-                <a-input id="billingBackReport-sparePartsReturnNo" v-model.trim="queryParam.sparePartsReturnNo" allowClear placeholder="请输入采购退货单号"/>
+                <a-input id="billingOrderReport-sparePartsReturnNo" v-model.trim="queryParam.sparePartsReturnNo" allowClear placeholder="请输入采购退货单号"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="地区">
-                <AreaList id="returnSlipReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                <AreaList id="billingOrderReport-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
               </a-form-model-item>
             </a-col>
             <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
@@ -93,13 +93,15 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { STable, VSelect } from '@/components'
 import getDate from '@/libs/getDate.js'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
+import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import AreaList from '@/views/common/areaList.js'
-import { hdExportExcel } from '@/libs/exportExcel'
 import reportModal from '@/views/common/reportModal.vue'
 import supplier from '@/views/common/supplier.js'
+// 接口
 import { queryBillNoPage, queryBillNoCount, queryBillNoTitle, billNoExport } from '@/api/reportData.js'
 export default {
   name: 'BillingOrderReportList',
@@ -108,30 +110,31 @@ export default {
   data () {
     return {
       spinning: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
       showExport: false, // 导出弹窗
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       queryParam: {
+        // 退货完成时间 默认值
         time: [
           getDate.getCurrMonthDays().starttime,
           getDate.getCurrMonthDays().endtime
         ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        sparePartsReturnNo: undefined,
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 结束时间
+        sparePartsReturnNo: undefined, // 采购退货单号
         supplier: {
-          supplierSn: undefined,
-          supplierName: undefined,
-          provinceSn: undefined,
-          citySn: undefined,
-          districtSn: undefined
+          supplierSn: undefined, // 供应商 sn
+          supplierName: undefined, // 供应商名称
+          provinceSn: undefined, // 省
+          citySn: undefined, // 市
+          districtSn: undefined// 区
         }
       },
-      countLabel: [],
-      countBrandLabel: [],
-      columns: [],
-      totalData: null,
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
+      countLabel: [], // 统计分类数据
+      countBrandLabel: [], // 统计品牌数据
+      columns: [], // 表头数据
+      totalData: null, // 统计
       rules: {
         'time': [{ required: true, message: '请选择退货完成时间', trigger: 'change' }]
       },
@@ -141,11 +144,14 @@ export default {
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
         delete params.time
+        // 获取列表数据 有分页
         return queryBillNoPage(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 统计
             this.getCount(params)
+            // 计算表格序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -215,6 +221,7 @@ export default {
       this.$refs.areaList.clearData()
       this.$refs.table.clearTable()
     },
+    // 地区
     areaChange (val) {
       this.queryParam.supplier.provinceSn = val[0] ? val[0] : ''
       this.queryParam.supplier.citySn = val[1] ? val[1] : ''
@@ -263,10 +270,12 @@ export default {
       })
       this.resetSearchForm()
     },
+    // 初始化
     pageInit () {
       this.getTableTitle()
       this.setTableH()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 215

+ 15 - 11
src/views/reportData/hPriceDifferenceDetailReport/list.vue

@@ -14,7 +14,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="日期" prop="time">
-                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
+                <rangeDate ref="rangeDate" id="hPriceDifferenceDetailList-time" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="5" :sm="24">
@@ -72,7 +72,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域负责人">
-                  <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                  <BizUser id="hPriceDifferenceDetailList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
               <a-col :md="5" :sm="24">
@@ -89,7 +89,7 @@
               </a-col>
               <a-col :md="7" :sm="24" v-show="isShowCustomerSearch">
                 <a-form-model-item label="客服">
-                  <customerService ref="customerName" v-model="queryParam.bizUserSn"></customerService>
+                  <customerService id="hPriceDifferenceDetailList-customerName" ref="customerName" v-model="queryParam.bizUserSn"></customerService>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -108,7 +108,7 @@
                 class="button-warning"
                 @click="handleExport"
                 :disabled="disabled"
-                id="shortageStatisticsCList-export">导出</a-button>
+                id="hPriceDifferenceDetailList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -153,9 +153,10 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import getDate from '@/libs/getDate.js'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import subarea from '@/views/common/subarea.js'
 import reportModal from '@/views/common/reportModal.vue'
 import Area from '@/views/common/area.js'
@@ -163,7 +164,8 @@ import ProductBrand from '@/views/common/productBrand.js'
 import ProductType from '@/views/common/productType.js'
 import BizUser from '@/views/common/bizUser.js'
 import customerService from '@/views/common/customerService'
-import { hdExportExcel } from '@/libs/exportExcel'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+// 接口
 import { headRebateDetailReportList, headRebateDetailReportCount, headRebateDetailReportExport } from '@/api/reportData'
 export default {
   name: 'HPriceDifferenceDetailReportList',
@@ -173,15 +175,17 @@ export default {
     return {
       spinning: false,
       advanced: false, // 高级搜索 展开/关闭
-      showExport: false,
-      queryParam: { //  查询条件
+      showExport: false, // 导出弹窗提示
+      //  查询条件
+      queryParam: {
+        // 日期 默认值
         time: [
           getDate.getCurrMonthDays().starttime,
           getDate.getCurrMonthDays().endtime
         ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        bizNo: '',
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始日期
+        endDate: getDate.getCurrMonthDays().endtime, // 结束日期
+        bizNo: '', // 订单号
         dealer: {
           dealerSn: undefined,
           dealerLevel: undefined,

+ 32 - 22
src/views/reportData/priceDifferenceDetailReport/list.vue

@@ -17,6 +17,7 @@
                 <a-month-picker
                   placeholder="请选择月份"
                   locale="zh-cn"
+                  id="priceDifferenceDetailList-month"
                   v-model="queryParam.month"
                   @change="onChange"
                   :disabled-date="disabledDate"
@@ -39,9 +40,9 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
-              <a-form-item label="客服">
-                <customerService ref="customerName" v-model="queryParam.bizUserSn"></customerService>
-              </a-form-item>
+              <a-form-model-item label="客服">
+                <customerService ref="customerName" id="priceDifferenceDetailList-customerName" v-model="queryParam.bizUserSn"></customerService>
+              </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="所在区域">
@@ -49,7 +50,7 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
-              <a-form-item label="单据类型">
+              <a-form-model-item label="单据类型">
                 <v-select
                   v-model="queryParam.bizType"
                   ref="bizType"
@@ -57,9 +58,8 @@
                   code="REBATE_BILL_BIZ_TYPE"
                   placeholder="请选择单据类型"
                   allowClear></v-select>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
-
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="priceDifferenceDetailList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="priceDifferenceDetailList-reset">重置</a-button>
@@ -71,7 +71,7 @@
                 :disabled="disabled"
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_priceDifferenceDetail_Export')"
-                id="allocationDetailsList-export">导出</a-button>
+                id="priceDifferenceDetailList-export">导出</a-button>
             </a-col>
           </a-row>
         </a-form-model>
@@ -119,6 +119,8 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import { STable, VSelect } from '@/components'
 import custList from '@/views/common/custList.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
@@ -127,7 +129,7 @@ import subarea from '@/views/common/subarea.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import reportModal from '@/views/common/reportModal.vue'
 import customerService from '@/views/common/customerService.vue'
-import { hdExportExcel } from '@/libs/exportExcel'
+// 接口
 import { reportRebateReportList, reportRebateCount, reportRebateExport } from '@/api/reportData'
 export default {
   name: 'PriceDifferenceDetailReportList',
@@ -136,25 +138,28 @@ export default {
   data () {
     return {
       spinning: false,
-      exportLoading: false,
-      showExport: false,
-      queryParam: { //  查询条件
-        month: moment().format('YYYY-MM'),
-        provinceSn: undefined,
-        parentDealerSn: undefined,
-        buyerSn: undefined,
-        bizUserSn: undefined,
+      exportLoading: false, // 导出按钮加载状态
+      showExport: false, // 导出弹窗状态
+      disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0, // 表格高度
+      //  查询条件
+      queryParam: {
+        month: moment().format('YYYY-MM'), // 月份默认值
+        provinceSn: undefined, // 省份编码
+        parentDealerSn: undefined, // 记账门店
+        buyerSn: undefined, // 客户名称 sn
+        bizUserSn: undefined, // 客服
         bizType: undefined, // 单据类型
         subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined// 分区
         }
       },
+      totalData: null, // 统计数据
       rules: {
         'month': [{ required: true, message: '请选择月份', trigger: 'change' }],
         'provinceSn': [{ required: true, message: '请选择省份', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -163,12 +168,14 @@ export default {
           params.month = params.month + '-01'
         }
         this.spinning = true
+        // 获取列表数据
         return reportRebateReportList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
             // 总计
             this.getCount(params)
+            // 计算列表序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -178,9 +185,7 @@ export default {
           this.spinning = false
           return data
         })
-      },
-      totalData: null,
-      tableHeight: 0
+      }
     }
   },
   computed: {
@@ -204,9 +209,11 @@ export default {
     }
   },
   methods: {
+    // 月份 change
     onChange (date, dateString) {
       this.queryParam.month = dateString
     },
+    // 月份选择范围
     disabledDate (current) {
       return current && current > moment().endOf('day')
     },
@@ -237,9 +244,11 @@ export default {
         }
       })
     },
+    // 记账门店
     rebateDealerChange (val) {
       this.queryParam.parentDealerSn = val.key
     },
+    // 客户名称 change
     custChange (val) {
       this.queryParam.buyerSn = val.key
     },
@@ -280,6 +289,7 @@ export default {
         }
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 200

+ 41 - 40
src/views/reportData/regionTypeSalesReport/list.vue

@@ -1,14 +1,16 @@
 <template>
   <div>
     <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 选项卡切换 -->
       <a-tabs v-model="activeKey" @change="callback" :tabBarStyle="{'background':'#fff'}">
         <a-tab-pane :key="item.id" :tab="item.name" v-for="item in tabsList">
         </a-tab-pane>
       </a-tabs>
       <a-card size="small">
+        <!-- 搜索条件 -->
         <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
           <a-form-model
-            id="returnGoodsPresentationList-form"
+            id="regionTypeSalesList-form"
             ref="ruleForm"
             class="form-model-con"
             layout="inline"
@@ -18,12 +20,13 @@
             <a-row :gutter="15">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="时间" prop="time">
-                  <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange"/>
+                  <rangeDate id="regionTypeSalesList-time" ref="rangeDate" :value="queryParam.time" @change="dateChange"/>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="销售状态" prop="salesStatusType">
                   <v-select
+                    id="regionTypeSalesList-salesStatusType"
                     v-model="queryParam.salesStatusType"
                     code="SALES_STATUS"
                     placeholder="请选择销售状态"
@@ -32,29 +35,22 @@
               </a-col>
               <a-col :md="6" :sm="24" v-if="activeKey==0">
                 <a-form-model-item label="所在区域">
-                  <subarea id="returnGoodsPresentationList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
+                  <subarea id="regionTypeSalesList-subarea" ref="subarea" @change="subareaChange"></subarea>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域负责人">
-                  <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                  <BizUser id="regionTypeSalesList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
-                <a-form-item label="客服">
-                  <customerService ref="customerName" v-model="queryParam.bizUserSn"></customerService>
-                </a-form-item>
-              </a-col>
-              <!--  <template v-if="advanced && activeKey==0">
-              <a-col :md="6" :sm="24">
-                <a-form-model-item prop="dealerProvinceSn" style="margin: 0;" label="地区">
-                  <Area id="returnGoodsPresentationList-dealerProvinceSn" v-model="queryParam.dealerProvinceSn" placeholder="请选择省"></Area>
+                <a-form-model-item label="客服">
+                  <customerService id="regionTypeSalesList-customerName" ref="customerName" v-model="queryParam.bizUserSn"></customerService>
                 </a-form-model-item>
               </a-col>
-            </template> -->
               <a-col :md="(activeKey==0&&!isShowCustomerSearch)?24:activeKey==1&&isShowCustomerSearch?24:6" :sm="24" style="margin-bottom: 10px;" :style="{textAlign:(activeKey==0&&!isShowCustomerSearch)?'center':(activeKey==1&&isShowCustomerSearch)?'center':'left'}">
-                <a-button type="primary" @click="handleSearch" :disabled="disabled" id="returnGoodsPresentationList-refresh">查询</a-button>
-                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="returnGoodsPresentationList-reset">重置</a-button>
+                <a-button type="primary" @click="handleSearch" :disabled="disabled" id="regionTypeSalesList-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="regionTypeSalesList-reset">重置</a-button>
                 <a-button
                   style="margin-left: 5px"
                   type="primary"
@@ -63,7 +59,7 @@
                   :disabled="disabled"
                   :loading="exportLoading"
                   v-if="$hasPermissions('B_regionTypeSalesReportExport')"
-                  id="returnGoodsPresentationList-export">导出</a-button>
+                  id="regionTypeSalesList-export">导出</a-button>
               </a-col>
             </a-row>
           </a-form-model>
@@ -82,7 +78,7 @@
           :data="loadData"
           :showPagination="false"
           :style="{ height: tableHeight+84.5+'px' }"
-          :scroll="{ x:1550,y: tableHeight}"
+          :scroll="{ x:1550,y: tableHeight +30}"
           bordered>
         </s-table>
       </a-card>
@@ -94,45 +90,46 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import Area from '@/views/common/area.js'
 import subarea from '@/views/common/subarea.js'
 import BizUser from '@/views/common/bizUser.js'
-import { hdExportExcel } from '@/libs/exportExcel'
 import reportModal from '@/views/common/reportModal.vue'
 import customerService from '@/views/common/customerService.vue'
+// 接口
 import { realReportSalesByProvince, realReportSalesByProvinceExport, subareaAreaReportTitle, subareaReportTitle, realReportSalesBySubArea, realReportSalesBySubAreaExport } from '@/api/reportData.js'
 export default {
   name: 'RegionTypeSalesReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, Area, reportModal, BizUser, customerService },
+  components: { STable, VSelect, rangeDate, subarea, reportModal, BizUser, customerService },
   data () {
     return {
       spinning: false,
-      tabsList: [{ id: 0, name: '各分区品类实售明细' }, { id: 1, name: '各区域品类实售明细' }],
-      salesStatusTypeList: [{ code: 'SALES', name: '实售销售' }, { code: 'SALES_RETURN', name: '实售退货' }, { code: 'REAL_SALES', name: '实际销售' }],
-      activeKey: 0,
+      activeKey: 0, // 切换显示页面值 0 各分区品类实售明细 1各区域品类实售明细
       advanced: true, // 高级搜索 展开/关闭
-      showExport: false,
-      columns: [],
-      totalData: null,
+      showExport: false, // 导出弹窗
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
+      tableHeight: 0, // 表格高度
+      tabsList: [{ id: 0, name: '各分区品类实售明细' }, { id: 1, name: '各区域品类实售明细' }], // tab切换data
+      salesStatusTypeList: [{ code: 'SALES', name: '实售销售' }, { code: 'SALES_RETURN', name: '实售退货' }, { code: 'REAL_SALES', name: '实际销售' }],
+      columns: [], // 表头数据
+      totalData: null, // 统计
+      // 查询参数
       queryParam: {
-        time: [],
-        beginDate: '',
-        endDate: '',
-        dealerProvinceSn: undefined,
+        time: [], // 默认时间
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
         subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined,
-          bizUserSn: undefined
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined, // 分区
+          bizUserSn: undefined// 区域负责人
         },
-        salesStatusType: 'REAL_SALES',
-        bizUserSn: undefined
+        salesStatusType: 'REAL_SALES', // 销售状态
+        bizUserSn: undefined// 客服
       },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
-      tableHeight: 0,
       rules: {
         'time': [{ required: true, message: '请选择时间', trigger: 'change' }],
         'salesStatusType': [{ required: true, message: '请选择销售状态', trigger: 'change' }]
@@ -141,8 +138,9 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        const paramsPage = Object.assign(this.queryParam) //  无分页
+        const paramsPage = Object.assign(this.queryParam)
         const jkUrl = this.activeKey == 0 ? realReportSalesByProvince : realReportSalesBySubArea
+        // 获取列表数据 无分页 0各分区品类实售明细列表 1各区域品类实售明细列表
         return jkUrl(paramsPage).then(res => {
           let data
           if (res.status == 200) {
@@ -159,6 +157,7 @@ export default {
     }
   },
   methods: {
+    // tabs切换  change时间
     callback (key) {
       this.activeKey = key
       const _this = this
@@ -189,6 +188,7 @@ export default {
         }
       })
     },
+    // 区域分区
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
@@ -200,7 +200,6 @@ export default {
       this.$refs.rangeDate.resetDate(this.queryParam.time)
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.dealerProvinceSn = undefined
       this.queryParam.subareaArea.subareaSn = undefined
       this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.subareaArea.bizUserSn = undefined
@@ -254,11 +253,13 @@ export default {
       })
       this.resetSearchForm()
     },
+    // 初始化
     pageInit () {
       this.activeKey = 0
       this.getTableTitle()
       this.setTableH()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 250

+ 49 - 38
src/views/reportData/returnSlipReport/list.vue

@@ -14,7 +14,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="退货日期" prop="time">
-                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
+                <rangeDate ref="rangeDate" id="returnSlipReportList-time" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -36,9 +36,9 @@
 
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-                <a-form-item label="退货单号">
+                <a-form-model-item label="退货单号">
                   <a-input id="returnSlipReportList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入退货单号"/>
-                </a-form-item>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
@@ -47,7 +47,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域负责人">
-                  <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                  <BizUser id="returnSlipReportList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -60,7 +60,7 @@
                   <v-select
                     v-model="queryParam.goodFlag"
                     ref="goodFlag"
-                    id="returnSchedule-goodFlag"
+                    id="returnSlipReportList-goodFlag"
                     code="GOOD_FLAG"
                     placeholder="请选择退货类别"
                     allowClear></v-select>
@@ -70,16 +70,16 @@
                 <a-form-model-item label="退货类型">
                   <v-select
                     v-model="queryParam.salesReturnType"
-                    id="departUser-salesReturnType"
+                    id="returnSlipReportList-salesReturnType"
                     code="SALES_RETURN_TYPE"
                     placeholder="请选择退货类型"
                     allowClear></v-select>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
-                <a-form-item label="客服">
-                  <customerService ref="customerName" v-model="queryParam.bizUserSn"></customerService>
-                </a-form-item>
+                <a-form-model-item label="客服">
+                  <customerService id="returnSlipReportList-customerName" ref="customerName" v-model="queryParam.bizUserSn"></customerService>
+                </a-form-model-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -149,6 +149,8 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import getDate from '@/libs/getDate.js'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
@@ -157,7 +159,7 @@ import reportModal from '@/views/common/reportModal.vue'
 import AreaList from '@/views/common/areaList.js'
 import BizUser from '@/views/common/bizUser.js'
 import customerService from '@/views/common/customerService'
-import { hdExportExcel } from '@/libs/exportExcel'
+// 接口
 import { salesReportReturnTitle, salesReportReturnBillList, salesReportReturnBillCount, returnSlipExport } from '@/api/reportData'
 export default {
   name: 'ReturnSlipReportList',
@@ -167,38 +169,37 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      showExport: false,
-      queryParam: { //  查询条件
+      tableHeight: 0, // 表格高度
+      showExport: false, // 导出弹窗
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出loading
+      //  查询条件
+      queryParam: {
+        // 退货日期 默认值
         time: [
           getDate.getCurrMonthDays().starttime,
           getDate.getCurrMonthDays().endtime
         ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        dealerSn: undefined,
-        provinceSn: undefined,
-        citySn: undefined,
-        districtSn: undefined,
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始日期
+        endDate: getDate.getCurrMonthDays().endtime, // 结束日期
+        dealerSn: undefined, // 客户名称 sn
+        provinceSn: undefined, // 省编码
+        citySn: undefined, // 市编码
+        districtSn: undefined, // 区编码
         subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined,
-          bizUserSn: undefined
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined, // 分区
+          bizUserSn: undefined// 区域负责人
         },
-        dealerLevel: undefined,
-        salesReturnType: undefined,
-        goodFlag: undefined,
-        salesReturnBillNo: '',
+        dealerLevel: undefined, // 客户等级
+        salesReturnType: undefined, // 退货类型
+        goodFlag: undefined, // 退货类别
+        salesReturnBillNo: '', // 退货单号
         bizUserSn: undefined// 客服
       },
       rules: {
         'time': [{ required: true, message: '请选择退货日期', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false, // 导出loading
-      addrProvinceList: [], //  省下拉
-      addrCityList: [], //  市下拉
-      addrDistrictList: [], //  区下拉
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -206,13 +207,16 @@ export default {
         if (this.tableHeight == 0) {
           this.tableHeight = window.innerHeight - 380
         }
-        const params = Object.assign(parameter, this.queryParam) //  无分页
+        const params = Object.assign(parameter, this.queryParam)
         delete params.time
+        // 获取列表数据  有分页
         return salesReportReturnBillList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 统计
             this.getCount(params)
+            // 计算列表序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -223,14 +227,15 @@ export default {
           return data
         })
       },
-      totalData: null,
-      columns: [],
-      countLabel: [],
-      countBrandLabel: [],
-      tableWidth: 0
+      totalData: null, // 总计
+      columns: [], // 表头数据
+      countLabel: [], // 统计分类数据
+      countBrandLabel: [], // 统计 品牌数据
+      tableWidth: 0// 表格宽度
     }
   },
   watch: {
+    // 展开关闭
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -272,6 +277,7 @@ export default {
         }
       })
     },
+    // 查询
     handleSearch () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
@@ -283,7 +289,7 @@ export default {
         }
       })
     },
-    //  创建时间  change
+    //  退货日期  change
     dateChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
@@ -293,9 +299,11 @@ export default {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
+    // 客户名称 change
     custChange (val) {
       this.queryParam.dealerSn = val.key
     },
+    // 区域分期
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
@@ -330,6 +338,7 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },
+    // 地区
     areaChange (val) {
       this.queryParam.provinceSn = val[0] ? val[0] : ''
       this.queryParam.citySn = val[1] ? val[1] : ''
@@ -357,10 +366,12 @@ export default {
       })
       this.resetSearchForm()
     },
+    // 初始化
     pageInit () {
       this.getTableTitle()
       this.setTableH()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 215