chenrui 1 år sedan
förälder
incheckning
86292582ad

+ 41 - 30
src/views/reportData/allocationDetails/list.vue

@@ -88,9 +88,9 @@
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
-                <a-form-item label="客服">
+                <a-form-model-item label="客服">
                   <customerService ref="customerName" v-model="queryParam.bizUserSn"></customerService>
-                </a-form-item>
+                </a-form-model-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -155,19 +155,21 @@
 <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 reportModal from '@/views/common/reportModal.vue'
 import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
-import { allocateTypeAllList } from '@/api/allocateType'
 import ProductBrand from '@/views/common/productBrand.js'
 import ProductType from '@/views/common/productType.js'
-import { hdExportExcel } from '@/libs/exportExcel'
-import { userQueryList } from '@/api/power-user'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
 import customerService from '@/views/common/customerService'
 import AllocateType from '@/views/common/allocateType.js'
+// 接口
+import { userQueryList } from '@/api/power-user'
+import { allocateTypeAllList } from '@/api/allocateType'
 import { allocateReportDetailList, allocateReportDetailCount, allocateReportDetailExport } from '@/api/allocateReport'
 export default {
   name: 'AllocationDetailsList',
@@ -176,47 +178,49 @@ export default {
   data () {
     return {
       spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
       advanced: false, // 高级搜索 展开/关闭
-      exportLoading: false,
-      tableHeight: 0,
-      showExport: false,
-      allocateTypeVal: [],
-      queryParam: { //  查询条件
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
+      tableHeight: 0, // 表格高度
+      showExport: false, // 导出弹窗
+      //  查询条件
+      queryParam: {
+        // 调拨开单日期 默认时间
         time: [
           getDate.getCurrMonthDays().starttime,
           getDate.getCurrMonthDays().endtime
         ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        productName: '',
-        productBrandTypeSn: undefined,
-        productBrandSn: undefined, //  产品品牌
-        productCode: '',
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始日期
+        endDate: getDate.getCurrMonthDays().endtime, // 结束日期
+        productName: '', // 产品名称
+        productBrandTypeSn: undefined, // 产品分类sn
+        productBrandSn: undefined, //  产品品牌sn
+        productCode: '', // 产品编码
         costTypeSn: undefined, // 费用类型
         allocateSortSn: undefined, //  调拨类型1
         allocateTypeSn: undefined, //  调拨类型2
-        creatorId: undefined,
-        allocateNo: '',
+        creatorId: undefined, // 操作员 id
+        allocateNo: '', // 调拨单号
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        dealerName: '',
-        dealerLevel: undefined,
+        dealerName: '', // 客户名称
+        dealerLevel: undefined, // 客户等级
         subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined// 分区
         },
-        dealerProvinceSn: undefined,
-        warehouseSn: undefined,
-        bizUserSn: undefined
+        dealerProvinceSn: undefined, // 地区  省份
+        warehouseSn: undefined, // 出库仓库
+        bizUserSn: undefined// 客服
       },
-      productType: [],
-      labelCol: { span: 8 },
-      wrapperCol: { span: 16 },
+      productType: [], // 产品分类
+      allocateTypeVal: [], // 已选费用/调拨类型 值
       rules: {
         'time': [{ required: true, message: '请选择调拨开单日期', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -224,12 +228,14 @@ export default {
         delete params.time
         this.spinning = true
         if (params.beginDate) {
+          // 获取列表数据  有分页
           return allocateReportDetailList(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
@@ -309,6 +315,7 @@ export default {
     }
   },
   watch: {
+    // 展开关闭
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -324,7 +331,7 @@ export default {
     handleStock () {
       this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
     },
-    //  创建时间  change
+    // 调拨开单日期  change
     dateChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
@@ -334,6 +341,7 @@ export default {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
+    // 费用/调拨类型 change
     changeAllocatype (val, opts) {
       this.allocateTypeVal = val || []
       this.queryParam.costTypeSn = val && val[0] ? val[0] : ''
@@ -362,6 +370,7 @@ export default {
         }
       })
     },
+    // 区域分区 change
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
@@ -450,12 +459,14 @@ export default {
         }
       })
     },
+    // 初始化
     pageInit () {
       this.getAllocateTypeAllList()
       this.getUserList()
       this.resetSearchForm()
       this.setTableH()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 200

+ 28 - 19
src/views/reportData/allocationOrderTotal/list.vue

@@ -44,9 +44,9 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
-              <a-form-item label="客服">
+              <a-form-model-item label="客服">
                 <customerService ref="customerName" v-model="queryParam.bizUserSn"></customerService>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             <a-col :md="isShowCustomerSearch?6:24" :sm="24" style="margin-bottom: 10px;" :style="{textAlign: !isShowCustomerSearch?'center':''}">
               <!-- <a-button
@@ -98,12 +98,14 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import getDate from '@/libs/getDate.js'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { allocateTypeAllList } from '@/api/allocateType'
-import { userQueryList } from '@/api/power-user'
 import AllocateType from '@/views/common/allocateType.js'
 import customerService from '@/views/common/customerService'
+// 接口
+import { allocateTypeAllList } from '@/api/allocateType'
+import { userQueryList } from '@/api/power-user'
 import { allocateReportList, allocateReportCount } from '@/api/allocateReport'
 export default {
   name: 'AllocationOrderTotalList',
@@ -112,23 +114,29 @@ export default {
   data () {
     return {
       spinning: false,
-      allocateTypeVal: [],
-      queryParam: { //  查询条件
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      tableHeight: 0, // 表格高度
+      //  查询条件
+      queryParam: {
+        // 调拨开单日期 默认值
         time: [
           getDate.getCurrMonthDays().starttime,
           getDate.getCurrMonthDays().endtime
         ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        allocateNo: '',
-        creatorId: undefined,
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始日期
+        endDate: getDate.getCurrMonthDays().endtime, // 结束日期
+        allocateNo: '', // 调拨单号
+        creatorId: undefined, // 操作员id
         costTypeSn: undefined, // 费用类型
         allocateCategory: undefined, //  调拨类型1
         allocateTypeSn: undefined, //  调拨类型2
         bizUserSn: undefined// 客服
       },
-      labelCol: { span: 8 },
-      wrapperCol: { span: 16 },
+      allocateTypeList: [], //  调拨类型
+      allocateTypeVal: [], // 已选费用/调拨类型
+      operatorList: [], //  操作员下拉数据
+      totalData: null, //  合计
       rules: {
         'time': [{ required: true, message: '请选择调拨开单日期', trigger: 'change' }]
       },
@@ -139,12 +147,14 @@ export default {
         const params = Object.assign(parameter, this.queryParam)
         delete params.time
         this.spinning = true
+        // 获取列表数据 有分页
         return allocateReportList(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
@@ -154,11 +164,7 @@ export default {
           this.spinning = false
           return data
         })
-      },
-      allocateTypeList: [], //  调拨类型
-      operatorList: [], //  操作员下拉数据
-      totalData: null, //  合计
-      tableHeight: 0
+      }
     }
   },
   computed: {
@@ -181,6 +187,7 @@ export default {
     }
   },
   methods: {
+    // 费用/调拨类型 change
     changeAllocatype (val, opts) {
       this.allocateTypeVal = val || []
       this.queryParam.costTypeSn = val && val[0] ? val[0] : ''
@@ -191,7 +198,7 @@ export default {
     handleStock () {
       this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
     },
-    //  创建时间  change
+    //  调拨开单日期  change
     dateChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
@@ -201,7 +208,7 @@ export default {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
-    // 
+    // 
     getCount (params) {
       allocateReportCount(params).then(res => {
         if (res.status == 200) {
@@ -268,6 +275,7 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
+    // 初始化
     pageInit () {
       const _this = this
       _this.getAllocateTypeAllList()
@@ -276,6 +284,7 @@ export default {
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 215

+ 34 - 22
src/views/reportData/tireSalesReport/detailList.vue

@@ -162,6 +162,8 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
@@ -169,9 +171,9 @@ import AreaList from '@/views/common/areaList.js'
 import BizUser from '@/views/common/bizUser.js'
 import reportModal from '@/views/common/reportModal.vue'
 import outDetailModal from './outDetailModal'
-import { hdExportExcel } from '@/libs/exportExcel'
-import { queryTireDetailCount, tireListExport, tireReportDetailList, tireOutDetailListExport } from '@/api/reportData'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+// 接口
+import { queryTireDetailCount, tireListExport, tireReportDetailList, tireOutDetailListExport } from '@/api/reportData'
 export default {
   name: 'TireSalesDealerList',
   mixins: [commonMixin],
@@ -181,27 +183,30 @@ export default {
       spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      queryParam: { //  查询条件
-        time: [],
-        bizBeginDate: '',
-        bizEndDate: '',
-        provinceSn: undefined,
-        citySn: undefined,
-        districtSn: undefined,
-        dealerLevel: undefined,
-        dealerName: undefined,
-        dealerSn: undefined,
-        subareaArea: {// 区域分区
-          subareaSn: undefined,
-          subareaAreaSn: undefined,
+      tableHeight: 0, // 表格高度
+      exportLoading: false, // 导出按钮加载状态
+      showExport: false, // 导出弹窗
+      //  查询条件
+      queryParam: {
+        time: [], // 日期
+        bizBeginDate: '', // 开始时间
+        bizEndDate: '', // 结束时间
+        provinceSn: undefined, // 省
+        citySn: undefined, // 市
+        districtSn: undefined, // 区
+        dealerLevel: undefined, // 客户等级
+        dealerName: undefined, // 客户名称
+        dealerSn: undefined, // 客户sn
+        subareaArea: {
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined, // 分区
           bizUserSn: undefined // 区域负责人
         },
         productWord: '', // 产品编码/原厂编码
         productName: '' // 产品名称
       },
-      exportLoading: false,
-      showExport: false,
+      totalData: null, // 合计
+      showOutDetail: false, // 出库明细弹窗
       rules: {
         'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
       },
@@ -212,23 +217,24 @@ export default {
         const oldParams = Object.assign(parameter, this.queryParam)
         const params = JSON.parse(JSON.stringify(oldParams))
         delete params.time
+        // 获取列表数据  有分页
         return tireReportDetailList(params).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.getCount(params)
           }
           this.spinning = false
           return data
         })
-      },
-      totalData: null,
-      showOutDetail: false
+      }
     }
   },
   watch: {
@@ -296,6 +302,7 @@ export default {
         }
       })
     },
+    // 客户名称 change
     custChange (val) {
       this.queryParam.dealerName = val.name
       this.queryParam.dealerSn = val.key
@@ -343,6 +350,7 @@ export default {
       this.queryParam.bizBeginDate = date[0] ? date[0].replace(/-/g, '') : ''
       this.queryParam.bizEndDate = date[1] ? date[1].replace(/-/g, '') : ''
     },
+    // 区域分区  change
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
@@ -371,7 +379,7 @@ export default {
       this.$refs.table.clearTable()
       this.$refs.ruleForm.resetFields()
     },
-    //  导出
+    //  导出  必填判断
     handleExport (pos) {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
@@ -387,6 +395,7 @@ export default {
         }
       })
     },
+    // 轮胎明细报表导出
     exportList () {
       const _this = this
       const params = JSON.parse(JSON.stringify(_this.queryParam))
@@ -402,6 +411,7 @@ export default {
         _this.$store.state.app.curActionPermission = ''
       })
     },
+    // 轮胎出库明细报表  导出
     exportOutDetailList () {
       const _this = this
       const params = JSON.parse(JSON.stringify(_this.queryParam))
@@ -416,11 +426,13 @@ export default {
         _this.$store.state.app.curActionPermission = ''
       })
     },
+    // 初始化
     pageInit () {
       this.$nextTick(() => { // 页面渲染完成后的回调
         this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 280

+ 4 - 2
src/views/reportData/tireSalesReport/index.vue

@@ -3,7 +3,6 @@
     <a-card size="small" :bordered="false">
       <a-tabs default-active-key="1" @change="handleChange">
         <a-tab-pane key="1" tab="轮胎统计报表">
-          <!-- 列表 -->
           <tireList ref="tireStatisticsList"></tireList>
         </a-tab-pane>
         <a-tab-pane key="2" tab="轮胎明细报表" force-render>
@@ -15,6 +14,7 @@
 </template>
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import tireList from './list'
 import detailList from './detailList'
 export default {
@@ -23,13 +23,15 @@ export default {
   components: { tireList, detailList },
   data () {
     return {
-      tabVal: 1
+      tabVal: 1 // tab值  1轮胎统计报表 2 轮胎明细报表
     }
   },
   methods: {
+    // 切换tab值  change
     handleChange (val) {
       this.tabVal = val
     },
+    // 初始化
     pageInit () {
       if (this.tabVal == 1) {
         this.$refs.tireStatisticsList.pageInit()

+ 31 - 20
src/views/reportData/tireSalesReport/list.vue

@@ -130,15 +130,17 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
 import BizUser from '@/views/common/bizUser.js'
 import reportModal from '@/views/common/reportModal.vue'
-import { hdExportExcel } from '@/libs/exportExcel'
-import { tireReportList, queryTireCount, tireListExport } from '@/api/reportData'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+// 接口
+import { tireReportList, queryTireCount, tireListExport } from '@/api/reportData'
 export default {
   name: 'TireSalesDealerList',
   mixins: [commonMixin],
@@ -147,26 +149,27 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      queryParam: { //  查询条件
-        time: [],
-        bizBeginDate: '',
-        bizEndDate: '',
-        provinceSn: undefined,
-        citySn: undefined,
-        districtSn: undefined,
-        dealerLevel: undefined,
-        dealerName: undefined,
-        dealerSn: undefined,
-        subareaArea: {// 区域分区
-          subareaSn: undefined,
-          subareaAreaSn: undefined,
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
+      showExport: false, // 导出弹窗
+      tableHeight: 0, // 表格高度
+      //  查询条件
+      queryParam: {
+        time: [], // 日期
+        bizBeginDate: '', // 开始时间
+        bizEndDate: '', // 结束时间
+        provinceSn: undefined, // 省份编码
+        citySn: undefined, // 市编码
+        districtSn: undefined, // 区编码
+        dealerLevel: undefined, // 客户等级
+        dealerName: undefined, // 客户名称
+        dealerSn: undefined, // 客户sn
+        subareaArea: {
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined, // 分区
           bizUserSn: undefined // 区域负责人
         }
       },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
-      showExport: false,
       rules: {
         'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
       },
@@ -177,15 +180,18 @@ export default {
         const oldParams = Object.assign(parameter, this.queryParam)
         const params = JSON.parse(JSON.stringify(oldParams))
         delete params.time
+        // 获取列表数据  有分页
         return tireReportList(params).then(res => {
           let data
           if (res.status == 200 && res.data) {
             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.getCount(params)
           }
           this.spinning = false
@@ -196,6 +202,7 @@ export default {
     }
   },
   watch: {
+    // 展开关闭
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -267,6 +274,7 @@ export default {
         }
       })
     },
+    // 客户名称 change
     custChange (val) {
       this.queryParam.dealerName = val.name
       this.queryParam.dealerSn = val.key
@@ -297,6 +305,7 @@ export default {
       this.queryParam.bizBeginDate = date[0] ? date[0].replace(/-/g, '') : ''
       this.queryParam.bizEndDate = date[1] ? date[1].replace(/-/g, '') : ''
     },
+    // 区域分区  change
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
@@ -325,7 +334,7 @@ export default {
       this.$refs.subarea.clearData()
       this.$refs.table.clearTable()
     },
-    //  导出
+    //  导出 查询数据必填判断
     handleExport () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
@@ -353,12 +362,14 @@ export default {
         _this.$store.state.app.curActionPermission = ''
       })
     },
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 276

+ 31 - 20
src/views/reportData/urchaseDetailReturn/detailList.vue

@@ -137,6 +137,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 supplier from '@/views/common/supplier.js'
@@ -144,7 +146,7 @@ import reportModal from '@/views/common/reportModal.vue'
 import AreaList from '@/views/common/areaList.js'
 import ProductBrand from '@/views/common/productBrand.js'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
-import { hdExportExcel } from '@/libs/exportExcel'
+// 接口
 import { sparePartsReturnDetailReportList, sparePartsReturnDetailReportStat, sparePartsReturnReportExportDetail } from '@/api/reportData'
 export default {
   name: 'UrchaseDetailReturnList',
@@ -154,47 +156,51 @@ export default {
     return {
       spinning: false,
       advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      showExport: false,
-      queryParam: { //  查询条件
+      tableHeight: 0, // 表格高度
+      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, // 结束日期
         sparePartsReturnNo: '', // 采购退货单号
-        returnReason: '',
-        warehouseSn: undefined,
+        returnReason: '', // 退货原因
+        warehouseSn: undefined, // 出库仓库
         product: {
-          name: '',
-          code: '',
-          brandType: undefined,
-          productBrandSn: undefined
+          name: '', // 产品名称
+          code: '', // 产品编码
+          brandType: undefined, // 品牌分类
+          productBrandSn: undefined// 产品品牌 sn
         },
         supplier: {
-          supplierSn: '',
-          supplierName: '',
-          provinceSn: undefined,
-          citySn: undefined,
-          districtSn: undefined
+          supplierSn: '', // 供应商sn
+          supplierName: '', // 供应商名称
+          provinceSn: undefined, // 省
+          citySn: undefined, // 市
+          districtSn: undefined// 区
         }
       },
       rules: {
         'time': [{ required: true, message: '请选择退货完成日期', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
         delete params.time
+        // 获取列表数据 有分页
         return sparePartsReturnDetailReportList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 统计
             this.getCount(params)
             this.disabled = false
           }
@@ -239,6 +245,7 @@ export default {
     }
   },
   watch: {
+    // 展开关闭
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -260,10 +267,12 @@ export default {
         }
       })
     },
+    // 供应商 change
     getSupplierName (val, item) {
       this.queryParam.supplier.supplierName = item.supplierName
       this.queryParam.supplier.supplierSn = val
     },
+    // 查询
     handleSearch () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
@@ -278,7 +287,7 @@ export default {
         }
       })
     },
-    //  创建时间  change
+    //  退货完成日期  change
     dateChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
@@ -336,11 +345,13 @@ export default {
         }
       })
     },
+    // 地区
     areaChange (val) {
       this.queryParam.supplier.provinceSn = val[0] ? val[0] : ''
       this.queryParam.supplier.citySn = val[1] ? val[1] : ''
       this.queryParam.supplier.districtSn = val[2] ? val[2] : ''
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 215

+ 21 - 13
src/views/reportData/urchaseReturn/list.vue

@@ -106,12 +106,14 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import getDate from '@/libs/getDate.js'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import supplier from '@/views/common/supplier.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
 import reportModal from '@/views/common/reportModal.vue'
+// 接口
 import { sparePartsReturnReportList, sparePartsReturnReportStat, sparePartsReturnReportExport } from '@/api/reportData'
 export default {
   name: 'UrchaseReturn',
@@ -120,35 +122,39 @@ export default {
   data () {
     return {
       spinning: false,
-      exportLoading: false,
-      tableHeight: 0,
-      showExport: false,
-      queryParam: { //  查询条件
+      exportLoading: false, // 导出按钮加载状态
+      tableHeight: 0, // 表格高度
+      showExport: false, // 导出弹窗
+      disabled: false, //  查询、重置按钮是否可操作
+      //  查询条件
+      queryParam: {
+        // 退货完成日期 默认值
         time: [
           getDate.getCurrMonthDays().starttime,
           getDate.getCurrMonthDays().endtime
         ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        sparePartsReturnNo: undefined,
-        supplierSn: undefined,
-        warehouseSn: undefined,
-        returnReason: undefined
+        beginDate: getDate.getCurrMonthDays().starttime, // 开始日期
+        endDate: getDate.getCurrMonthDays().endtime, // 结束日期
+        sparePartsReturnNo: undefined, // 采购退货单号
+        supplierSn: undefined, // 供应商 sn
+        warehouseSn: undefined, // 出库仓库
+        returnReason: undefined// 退货原因
       },
       rules: {
         'time': [{ required: true, message: '请选择退货完成日期', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
         delete params.time
+        // 获取列表数据 有分页
         return sparePartsReturnReportList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 统计
             this.getCount(params)
             this.disabled = false
           }
@@ -156,7 +162,7 @@ export default {
           return data
         })
       },
-      totalData: null
+      totalData: null// 合计
     }
   },
   computed: {
@@ -212,6 +218,7 @@ export default {
         }
       })
     },
+    // 查询
     handleSearch () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
@@ -223,7 +230,7 @@ export default {
         }
       })
     },
-    //  创建时间  change
+    //  退货完成日期  change
     dateChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
@@ -250,6 +257,7 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 215