Bläddra i källkod

Merge branch 'develop_yh42' of jianguan-web/jg-ocs-html into pre-release

李磊 11 månader sedan
förälder
incheckning
35143135a9

+ 38 - 24
src/views/reportData/allocationPresentation/list.vue

@@ -15,7 +15,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="allocationPresentationList-time" :value="queryParam.time" @change="dateChange" />
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -71,7 +71,8 @@
             </a-row>
           </a-form-model>
         </div>
-      </a-spin></a-card>
+      </a-spin>
+    </a-card>
     <a-tabs :tabBarStyle="{'background':'#fff'}">
       <a-tab-pane key="1" tab="费用/调拨类型列表">
         <a-card size="small" :bordered="false" class="allocationPresentationList-wrap" :style="{'margin-top':'-16px'}">
@@ -148,13 +149,15 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+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 { allocateTypeTreeList } from '@/api/allocateType'
 import AreaList from '@/views/common/areaList.js'
-import { hdExportExcel } from '@/libs/exportExcel'
+// 接口
 import { reportAllocateDbjdReportList, reportAllocateDbjdReportCount, reportAllocateDbjdReportExport } from '@/api/reportData'
 export default {
   name: 'AllocationPresentationList',
@@ -164,40 +167,45 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      showExport: false,
-      queryParam: { //  查询条件
-        time: [],
-        beginDate: '',
-        endDate: '',
-        allocateNo: '',
-        targetName: '',
+      showExport: false, // 导出提示框
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
+      tableWidth: 0, // 表格宽度
+      //  查询条件
+      queryParam: {
+        time: [], // 调拨日期
+        beginDate: '', // 开始日期
+        endDate: '', // 结束日期
+        allocateNo: '', // 调拨单号
+        targetName: '', // 客户名称
         subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined// 分区
         },
         dealer: {
-          provinceSn: undefined,
-          citySn: undefined,
-          districtSn: undefined,
-          dealerLevel: undefined
+          provinceSn: undefined, // 省
+          citySn: undefined, // 市
+          districtSn: undefined, // 区
+          dealerLevel: undefined// 客户级别
         }
       },
-      tableHeight: 0,
       rules: {
         'time': [{ required: true, message: '请选择调拨日期', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) //  有分页
+        const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize })
+        // 获取列表数据 有分页
         return reportAllocateDbjdReportList(paramsPage).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 获取 费用/调拨类型合计  数据
             this.getCount(paramsPage)
+            // 计算表格序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -208,10 +216,9 @@ export default {
           return data
         })
       },
-      totalData: null,
+      totalData: null, // 费用/调拨类型合计  数据
       allocateType: [], // 调拨类型
-      atypeColList: [],
-      tableWidth: 0
+      atypeColList: []// 重组调拨类型数据
     }
   },
   computed: {
@@ -230,6 +237,7 @@ export default {
     }
   },
   watch: {
+    // 展开关闭时,监听表格高度
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -241,6 +249,7 @@ export default {
     }
   },
   methods: {
+    // 组合调拨类型 数据
     getCol (data, key) {
       const ret = []
       for (let i = 0; i < data.length; i++) {
@@ -307,6 +316,7 @@ export default {
         }
       })
     },
+    // 查询
     handleSearch () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
@@ -318,7 +328,7 @@ export default {
         }
       })
     },
-    //  创建时间  change
+    //  调拨日期  change
     dateChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
@@ -328,6 +338,7 @@ export default {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
+    // 区域分区  change
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
@@ -358,16 +369,19 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },
+    // 地区
     areaChange (val) {
       this.queryParam.dealer.provinceSn = val[0] ? val[0] : ''
       this.queryParam.dealer.citySn = val[1] ? val[1] : ''
       this.queryParam.dealer.districtSn = val[2] ? val[2] : ''
     },
+    // 初始化
     pageInit () {
       this.getAllocateType()
       this.resetSearchForm()
       this.setTableH()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 255

+ 31 - 22
src/views/reportData/expenseAccountReport/bearerList.vue

@@ -3,7 +3,7 @@
     <a-card size="small" :bordered="false" class="searchBoxNormal">
       <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
-          id="returnGoodsPresentationList-form"
+          id="expenseAccountBearerList-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -13,7 +13,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="统计月份" prop="months">
-                <a-input :value="queryParam.months?queryParam.months.join(','):''" placeholder="请选择月份(多选)" style="width: 100%;">
+                <a-input id="expenseAccountBearerList-months" :value="queryParam.months?queryParam.months.join(','):''" placeholder="请选择月份(多选)" style="width: 100%;">
                   <span style="cursor: pointer;" slot="addonAfter" @click="openMonth">
                     点击选择
                   </span>
@@ -26,6 +26,7 @@
                   code="EXPENSE_ACCOUNT_DETAIL_SPLIT_OBJ_TYPE"
                   allowClear
                   style="width: 100%;"
+                  id="expenseAccountBearerList-targetType"
                   v-model="queryParam.targetType"
                   @change="targetChange"
                   placeholder="请选择费用承担方类型"
@@ -35,20 +36,21 @@
             <a-col :md="6" :sm="24">
               <a-form-model-item label="费用承担方名称" prop="targetSn">
                 <!-- 部门 -->
-                <department v-show="queryParam.targetType=='DEPARTMENT'" style="width: 100%;" placeholder="请选择费用承担方名称" v-model="queryParam.targetSn"></department>
+                <department id="expenseAccountBearerList-targetSn" v-show="queryParam.targetType=='DEPARTMENT'" style="width: 100%;" placeholder="请选择费用承担方名称" v-model="queryParam.targetSn"></department>
                 <!-- 经销商 -->
                 <custList
                   v-show="queryParam.targetType=='CUSTOMER'"
                   ref="custList"
                   cooperateFlag="1"
                   @change="custChange"
+                  id="expenseAccountBearerList-custList"
                   placeholder="请选择经销商(输入名称搜索)"></custList>
                 <a-select v-if="!queryParam.targetType" placeholder="请选择费用承担方名称"></a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <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="expenseAccountBearerList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="expenseAccountBearerList-reset">重置</a-button>
               <a-button
                 style="margin-left: 5px"
                 type="primary"
@@ -57,7 +59,7 @@
                 :disabled="disabled"
                 v-if="$hasPermissions('B_expenseCollectExportByTarget')"
                 :loading="exportLoading"
-                id="returnGoodsPresentationList-export">导出</a-button>
+                id="expenseAccountBearerList-export">导出</a-button>
             </a-col>
           </a-row>
         </a-form-model>
@@ -99,47 +101,49 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import { STable, VSelect } from '@/components'
 import selectMonth from './selectMonth.vue'
-import { hdExportExcel } from '@/libs/exportExcel'
 import reportModal from '@/views/common/reportModal.vue'
 import department from '@/views/expenseManagement/expenseReimbursement/department.js'
 import custList from '@/views/common/custList.vue'
+// 接口
 import { expenseCollectReportQueryPageByTarget, expenseCollectReportQueryCountByTarget, expenseCollectReportExportByTarget } from '@/api/reportData'
 export default {
-  name: 'AllCountryCostReportList',
+  name: 'ExpenseAccountBearerList',
   mixins: [commonMixin],
   components: { STable, VSelect, selectMonth, department, custList, reportModal },
   data () {
     return {
       spinning: false,
-      open: false,
-      year: '',
       showExport: false, // 导出弹窗初始值
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
+      tableHeight: 0, // 表格高度
       queryParam: {
-        months: undefined,
-        targetType: undefined,
-        targetSn: undefined
+        months: undefined, // 月
+        targetType: undefined, // 费用承担方类型
+        targetSn: undefined// 费用承担方
       },
-      addrProvinceList: [], //  省下拉
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
       rules: {
         'months': [{ required: true, message: '请选择月份', trigger: 'change' }],
         'targetType': [{ required: true, message: '请选择费用承担方类型', trigger: 'change' }],
         'targetSn': [{ required: true, message: '请选择费用承担方名称', trigger: 'change' }]
       },
-      columns: [],
+      columns: [], // 表头数据
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         const _this = this
         _this.disabled = true
         _this.spinning = true
-        const paramsPage = Object.assign(parameter, this.queryParam) //  有分页
+        const paramsPage = Object.assign(parameter, this.queryParam)
+        // 获取列表数据 无分页
         return expenseCollectReportQueryPageByTarget(paramsPage).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
@@ -147,13 +151,13 @@ export default {
           }
           _this.spinning = false
           _this.disabled = false
+          // 统计
           this.getCount(paramsPage)
           return data
         })
       },
-      totalData: null,
-      totalMData: [],
-      tableHeight: 0
+      totalData: null, // 统计数据
+      totalMData: []// 汇总数据
     }
   },
   methods: {
@@ -241,15 +245,17 @@ export default {
     openMonth () {
       this.$refs.months.showModal(this.queryParam.months, 'm1')
     },
+    // 选择月份完成
     getDateValue (data) {
-      console.log(data)
       this.queryParam.months = data
     },
+    // 费用承担方类型 change
     targetChange (v) {
       // 清空费用承担方名称
       this.queryParam.targetSn = undefined
       this.$refs.custList.resetForm()
     },
+    // 经销商 change
     custChange (v, obj, id) {
       this.queryParam.targetSn = v.key
       this.$refs.ruleForm.validateField('targetSn')
@@ -267,6 +273,7 @@ export default {
         }
       })
     },
+    // 获取统计数据
     getCount (params) {
       this.totalData = null
       this.totalMData = []
@@ -312,10 +319,12 @@ export default {
         }
       })
     },
+    // 初始化
     pageInit () {
       this.getColumns()
       this.setTableH()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 240

+ 34 - 21
src/views/reportData/expenseAccountReport/categoryList.vue

@@ -3,7 +3,7 @@
     <a-card size="small" :bordered="false" class="searchBoxNormal">
       <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
-          id="returnGoodsPresentationList-form"
+          id="categoryList-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -13,7 +13,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="统计月份" prop="months">
-                <a-input :value="queryParam.months?queryParam.months.join(','):''" placeholder="请选择月份(多选)" style="width: 100%;">
+                <a-input id="categoryList-months" :value="queryParam.months?queryParam.months.join(','):''" placeholder="请选择月份(多选)" style="width: 100%;">
                   <span style="cursor: pointer;" slot="addonAfter" @click="openMonth">
                     点击选择
                   </span>
@@ -22,12 +22,18 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="费用归属品类(二级)" prop="productTypeSn2">
-                <ProductType v-model="productType" :changeOnSelect="false" :level="2" @change="changeProductType" placeholder="请选择费用归属品类"></ProductType>
+                <ProductType
+                  id="categoryList-productTypeSn2"
+                  v-model="productType"
+                  :changeOnSelect="false"
+                  :level="2"
+                  @change="changeProductType"
+                  placeholder="请选择费用归属品类"></ProductType>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <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="categoryList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="categoryList-reset">重置</a-button>
               <a-button
                 style="margin-left: 5px"
                 type="primary"
@@ -36,7 +42,7 @@
                 :disabled="disabled"
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_expenseCollectExportByPtype')"
-                id="returnGoodsPresentationList-export">导出</a-button>
+                id="categoryList-export">导出</a-button>
             </a-col>
           </a-row>
         </a-form-model>
@@ -78,45 +84,47 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import { STable, VSelect } from '@/components'
 import selectMonth from './selectMonth.vue'
-import { hdExportExcel } from '@/libs/exportExcel'
 import reportModal from '@/views/common/reportModal.vue'
 import ProductType from '@/views/common/productType.js'
+// 接口
 import { expenseCollectReportQueryPageByProductType, expenseCollectReportQueryCountByProductType, expenseCollectReportExportByProductType } from '@/api/reportData'
 export default {
-  name: 'AllCountryCostReportList',
+  name: 'ExpenseAccountCategoryList',
   mixins: [commonMixin],
   components: { STable, VSelect, selectMonth, ProductType, reportModal },
   data () {
     return {
       spinning: false,
-      open: false,
-      year: '',
       showExport: false, // 导出弹窗初始值
-      productType: [],
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
+      tableHeight: 0, // 列表高度
+      productType: [], // 产品分类
       queryParam: {
-        months: undefined,
-        productTypeSn2: undefined
+        months: undefined, // 月份
+        productTypeSn2: undefined// 产品二级分类
       },
-      addrProvinceList: [], //  省下拉
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
       rules: {
         'months': [{ required: true, message: '请选择月份', trigger: 'change' }],
         'productTypeSn2': [{ required: true, message: '请选择费用归属品类(二级)', trigger: 'change' }]
       },
-      columns: [],
+      columns: [], // 表头数据
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         const _this = this
         _this.disabled = true
         _this.spinning = true
-        const paramsPage = Object.assign(parameter, this.queryParam) //  有分页
+        const paramsPage = Object.assign(parameter, this.queryParam)
+        // 获取列表数据 无分页
         return expenseCollectReportQueryPageByProductType(paramsPage).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
@@ -124,16 +132,17 @@ export default {
           }
           this.spinning = false
           this.disabled = false
+          // 统计
           this.getCount(paramsPage)
           return data
         })
       },
-      totalData: null,
-      totalMData: [],
-      tableHeight: 0
+      totalData: null, // 统计数据
+      totalMData: [] // 汇总数据
     }
   },
   methods: {
+    // 获取列表表头
     getColumns () {
       const _this = this
       const arr = [
@@ -218,6 +227,7 @@ export default {
     openMonth () {
       this.$refs.months.showModal(this.queryParam.months, 'm1')
     },
+    // 选择月份完成
     getDateValue (data) {
       this.queryParam.months = data
     },
@@ -238,6 +248,7 @@ export default {
         }
       })
     },
+    // 统计
     getCount (params) {
       this.totalData = null
       this.totalMData = []
@@ -283,10 +294,12 @@ export default {
         }
       })
     },
+    // 初始化
     pageInit () {
       this.getColumns()
       this.setTableH()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 240

+ 21 - 26
src/views/reportData/expenseAccountReport/selectMonth.vue

@@ -21,6 +21,7 @@
             :getPopupContainer="triggerNode=>triggerNode.parentNode"
             @change="selectTime"
             placeholder="请选择"
+            id="selectMonthModal-OneY"
             v-model="OneY" >
             <a-select-option v-for="(i,j) in DateList" :key="j" :value="i.TimeYear">{{ i.TimeYear }}</a-select-option>
           </a-select>
@@ -28,7 +29,7 @@
       </a-col>
       <a-col :span="19">
         <div class="conterList">
-          <a-checkbox-group v-model="optTime[curIndex].queryTime" @change="onChange" >
+          <a-checkbox-group id="selectMonthModal-queryTime" v-model="optTime[curIndex].queryTime" @change="onChange" >
             <a-checkbox
               v-for="(item,index) in DateList[curIndex].queryTime"
               :key="index"
@@ -40,22 +41,9 @@
         </div>
       </a-col>
     </a-row>
-    <!-- <a-row style="margin-top:5px;">
-      <a-col :span="24">
-        <div><label style="margin: 5px 5px 0 0;display:inline-block;"><span style="color:#f00">*</span>已选择:</label>
-          <a-tag
-            color="#40a9ff"
-            style="margin-bottom: 3px;"
-            closable
-            @close="()=>closeTime(curIndex,v)"
-            v-for="v in optTimes"
-            :key="v + '-1'">{{ v }}</a-tag>
-        </div>
-      </a-col>
-    </a-row> -->
     <div class="btn-cont">
-      <a-button @click="cancel" style="margin-right: 15px;">取消</a-button>
-      <a-button type="primary" @click="handleSubmit">确定</a-button>
+      <a-button @click="cancel" id="selectMonthModal-cancel" style="margin-right: 15px;">取消</a-button>
+      <a-button type="primary" id="selectMonthModal-submit" @click="handleSubmit">确定</a-button>
     </div>
   </a-modal>
 </template>
@@ -63,10 +51,10 @@
 export default {
   data () {
     return {
-      visible: false,
-      title: '月份选择',
-      DateList: [],
-      labelCol: {
+      visible: false, // 弹窗是否显示
+      title: '月份选择', // 弹窗标题
+      DateList: [], // 已选择月份数据
+      labelCol: {// 调整表单距离
         xs: { span: 24 },
         sm: { span: 10 }
       },
@@ -74,18 +62,18 @@ export default {
         xs: { span: 24 },
         sm: { span: 13 }
       },
-      optTime: [],
-      OneY: null,
-      curIndex: 0,
-      optTimes: null,
+      optTime: [], // 月份数据
+      OneY: null, // 选择年份
+      curIndex: 0, // 当前选中年份下标值
+      optTimes: null, // 选中的月份
       ctype: null
-
     }
   },
-  created () {
+  created () { // 初始化数据
     this.init()
   },
   methods: {
+    // 关闭弹窗
     cancel () {
       this.visible = false
     },
@@ -96,6 +84,7 @@ export default {
       this.optTimes = info || null
       if (info) this.editTime(info)
     },
+    // 初始化
     init () {
       const _this = this
       const _opt = {}
@@ -112,6 +101,7 @@ export default {
       _this.optTime = _optTime
       _this.DateList = _opt
     },
+    // 获取当前年月数据
     getDateList () {
       const Dates = new Date()
       const year = Dates.getFullYear()
@@ -122,6 +112,7 @@ export default {
       }
       return optDate.reverse()
     },
+    // 选中年份
     editTime (info) {
       const _optTime = this.optTime
       const _opt = this.optTimes.map(v => { return v.substring(0, 4) })
@@ -134,6 +125,7 @@ export default {
       }
       // console.log(_optTime,'_optTime_optTime')
     },
+    // 确定提交
     handleSubmit () {
       const _this = this
       _this.visible = false
@@ -143,11 +135,13 @@ export default {
         _this.optTime[i].queryTime = []
       }
     },
+    // 选择时间
     selectTime (info, Node) {
       const _this = this
       _this.OneY = info
       _this.curIndex = parseInt(Node.key)
     },
+    // 选择月份 change
     onChange (info) {
       const _this = this
       const _opt = _this.optTime
@@ -157,6 +151,7 @@ export default {
       }
       _this.optTimes = arr
     },
+    // 关闭时间选择弹窗
     closeTime (index, time) {
       this.optTime[index].queryTime = this.optTime[index].queryTime.filter(v => {
         return v !== time

+ 43 - 31
src/views/reportData/productRebateReport/dealerList.vue

@@ -4,7 +4,7 @@
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper" ref="tableSearch2">
         <a-form-model
-          id="rebateDetailReport-form"
+          id="productRebateDealerList-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -16,17 +16,17 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="日期" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="productRebateDealerList-time" ref="rangeDate" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="单号">
-                <a-input id="srebateReport-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单号"/>
+                <a-input id="productRebateDealerList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单号"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="客户名称">
-                <dealerSearchList ref="dealer" id="srebateReport-buyerName" @change="dealerChange" />
+                <dealerSearchList ref="dealer" id="productRebateDealerList-buyerName" @change="dealerChange" />
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
@@ -34,7 +34,7 @@
                 <a-form-model-item label="客户级别">
                   <v-select
                     v-model="queryParam.dealer.dealerLevel"
-                    id="srebateReport-dealerLevel"
+                    id="productRebateDealerList-dealerLevel"
                     code="DEALER_LEVEL"
                     placeholder="请选择客户级别"
                     allowClear></v-select>
@@ -42,45 +42,45 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
-                  <subarea id="srebateReport-subareaSn" ref="subarea" @change="subareaChange"></subarea>
+                  <subarea id="productRebateDealerList-subareaSn" 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="productRebateDealerList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="省份">
-                  <Area id="srebateReport-provinceSn" v-model="queryParam.dealer.provinceSn" placeholder="请选择省份"></Area>
+                  <Area id="productRebateDealerList-provinceSn" v-model="queryParam.dealer.provinceSn" placeholder="请选择省份"></Area>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="差价归属方">
-                  <dealerSearchList ref="parentDealer" id="srebateReport-parentDealer" @change="parentDealerChange" placeholder="请输入差价归属方"/>
+                  <dealerSearchList ref="parentDealer" id="productRebateDealerList-parentDealer" @change="parentDealerChange" placeholder="请输入差价归属方"/>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="差价归属类型">
-                  <v-select code="RELATION_REBATE_PARENT_TYPE" v-model="queryParam.rebateParentType" allowClear placeholder="请选择差价归属类型"></v-select>
+                  <v-select code="RELATION_REBATE_PARENT_TYPE" id="productRebateDealerList-rebateParentType" v-model="queryParam.rebateParentType" allowClear placeholder="请选择差价归属类型"></v-select>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="单据类型" prop="bizType">
-                  <a-select id="srebateReport-bizType" allowClear v-model="queryParam.bizType" placeholder="请选择单据类型">
+                  <a-select id="productRebateDealerList-bizType" allowClear v-model="queryParam.bizType" placeholder="请选择单据类型">
                     <a-select-option v-for="item in bizTypeList" :value="item.value" :key="item.value">{{ item.name }}</a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="客服">
-                  <customerService ref="customerName" v-model="queryParam.bizUserSn"></customerService>
+                  <customerService id="productRebateDealerList-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;">
-              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="rebateDetailReport-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="rebateDetailReport-reset">重置</a-button>
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="productRebateDealerList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productRebateDealerList-reset">重置</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -121,6 +121,7 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import dealerSearchList from '@/views/common/dealerSearchList.vue'
@@ -128,46 +129,50 @@ import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
 import BizUser from '@/views/common/bizUser.js'
 import customerService from '@/views/common/customerService'
+// 接口
 import { productRebateParentList, productRebateParentCount } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate, dealerSearchList, subarea, Area, BizUser, customerService },
   mixins: [commonMixin],
+  name: 'ProductRebateDealerList',
   data () {
     return {
       spinning: false,
       labelCol: { span: 8 },
-      wrapperCol: { span: 16 },
+      wrapperCol: { span: 16 }, // 调整表单
       advanced: true, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      queryParam: { //  查询条件
-        time: [],
-        beginDate: '',
-        endDate: '',
-        bizNo: '', // 单号
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      //  查询条件
+      queryParam: {
+        time: [], // 日期
+        beginDate: '', // 开始日期
+        endDate: '', // 结束日期
+        bizNo: '', // 订单号
         buyerSn: undefined, // 客户sn
         subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined,
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined, // 分区
           bizUserSn: undefined // 区域负责人
         },
         dealer: {
-          dealerSn: undefined,
-          dealerLevel: undefined,
-          provinceSn: undefined
+          dealerSn: undefined, // 客户sn
+          dealerLevel: undefined, // 客户名称
+          provinceSn: undefined// 省份
         },
         parentDealerSn: undefined, // 差价归属方
         rebateParentType: undefined, // 差价归属类型
         bizType: undefined, // 类型
         bizUserSn: undefined // 客服类型
       },
-      bizTypeList: [
+      bizTypeList: [// 单据类型数据
         { value: 'SALES', name: '采购差价' },
         { value: 'SALES_RETURN', name: '退货差价' }
       ],
+      totalData: null, //  合计
       rules: {
         'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -176,13 +181,16 @@ export default {
         delete params.time
         // 总计
         this.getCount(params)
+        // 获取列表数据 有分页
         return productRebateParentList(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
+              // 差价归属类型 不等于 直接上级时,统计值恢复undefined
               if (data.list[i].rebateParentTypeDictValue && data.list[i].rebateParentTypeDictValue != '直接上级') {
                 data.list[i].totalAmount = undefined
                 data.list[i].totalRealAmount = undefined
@@ -194,8 +202,7 @@ export default {
           this.spinning = false
           return data
         })
-      },
-      totalData: null //  合计
+      }
     }
   },
   computed: {
@@ -224,6 +231,7 @@ export default {
     }
   },
   watch: {
+    // 展开关闭 监听表格高度变化
     advanced (newValue, oldValue) {
       this.setTableH()
     },
@@ -242,12 +250,13 @@ export default {
         }
       })
     },
-    //  创建时间  change
+    //  日期  change
     dateChange (date) {
       this.queryParam.time = date
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
+    // 客户名称 change
     dealerChange (val) {
       if (val.row) {
         this.queryParam.buyerSn = val.row.dealerSn
@@ -255,6 +264,7 @@ export default {
         this.queryParam.buyerSn = undefined
       }
     },
+    // 区域分区
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
@@ -304,11 +314,13 @@ export default {
       this.totalData = null
       this.$refs.table.clearTable()
     },
+    // 初始化
     pageInit () {
       this.disabled = false
       this.spinning = false
       this.setTableH()
     },
+    // 计算表格高度
     setTableH () {
       this.$nextTick(() => { // 页面渲染完成后的回调
         const tableSearchH = this.$refs.tableSearch2.offsetHeight

+ 42 - 46
src/views/reportData/productRebateReport/detailList.vue

@@ -4,7 +4,7 @@
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper" ref="tableSearch1">
         <a-form-model
-          id="rebateDetailReport-form"
+          id="productRebateDetailList-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -16,32 +16,32 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="日期" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="productRebateDetailList-time" ref="rangeDate" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="订单号">
-                <a-input id="srebateReport-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入订单号"/>
+                <a-input id="productRebateDetailList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入订单号"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="备货单号">
-                <a-input id="srebateReport-bizSubNo" v-model.trim="queryParam.bizSubNo" allowClear placeholder="请输入备货单号"/>
+                <a-input id="productRebateDetailList-bizSubNo" v-model.trim="queryParam.bizSubNo" allowClear placeholder="请输入备货单号"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="客户名称">
-                <dealerSearchList ref="dealer" id="srebateReport-buyerName" @change="dealerChange" />
+                <dealerSearchList ref="dealer" id="productRebateDetailList-buyerName" @change="dealerChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="差价归属方">
-                <dealerSearchList ref="parentDealer" id="srebateReport-parentDealer" @change="parentDealerChange" placeholder="请输入差价归属方"/>
+                <dealerSearchList ref="parentDealer" id="productRebateDetailList-parentDealer" @change="parentDealerChange" placeholder="请输入差价归属方"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="差价归属类型">
-                <v-select code="RELATION_REBATE_PARENT_TYPE" v-model="queryParam.rebateParentType" allowClear placeholder="请选择差价归属类型"></v-select>
+                <v-select code="RELATION_REBATE_PARENT_TYPE" id="productRebateDetailList-rebateParentType" v-model="queryParam.rebateParentType" allowClear placeholder="请选择差价归属类型"></v-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -49,7 +49,7 @@
                 <v-select
                   v-model="queryParam.bizType"
                   ref="bizType"
-                  id="srebateReport-bizType"
+                  id="productRebateDetailList-bizType"
                   code="REBATE_BILL_BIZ_TYPE"
                   placeholder="请选择单据类型"
                   allowClear></v-select>
@@ -57,33 +57,24 @@
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-                <a-form-item label="产品品牌">
-                  <ProductBrand id="rebateDetailReport-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
-                </a-form-item>
+                <a-form-model-item label="产品品牌">
+                  <ProductBrand id="productRebateDetailList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+                </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品分类">
-                  <ProductType id="rebateDetailReport-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="queryParam.productType"></ProductType>
+                  <ProductType id="productRebateDetailList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="queryParam.productType"></ProductType>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品编码">
-                  <a-input id="rebateDetailReport-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+                  <a-input id="productRebateDetailList-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
                 </a-form-model-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="rebateDetailReport-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="rebateDetailReport-reset">重置</a-button>
-              <!-- <a-button
-                type="primary"
-                style="margin-left: 5px"
-                @click="handleExport"
-                :disabled="disabled"
-                :loading="exportLoading"
-                v-if="$hasPermissions('M_salesReturnReportExport')"
-                class="button-warning"
-                id="rebateDetailReport-export-btn">导出</a-button> -->
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="productRebateDetailList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productRebateDetailList-reset">重置</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -124,33 +115,38 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { downloadExcel } from '@/libs/JGPrint.js'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import dealerSearchList from '@/views/common/dealerSearchList.vue'
+// 组件
 import { rebateDetailQueryList, rebateDetailQueryCount } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate, ProductType, ProductBrand, dealerSearchList },
   mixins: [commonMixin],
+  name: 'ProductRebateDetailList',
   data () {
     return {
       spinning: false,
-      labelCol: { span: 8 },
-      wrapperCol: { span: 16 },
+      labelCol: { span: 8 }, // 调整表单纵向布局
+      wrapperCol: { span: 16 }, // 调整表单横向布局
       advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      queryParam: { //  查询条件
-        time: [],
-        beginDate: '',
-        endDate: '',
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
+      //  查询条件
+      queryParam: {
+        time: [], // 日期
+        beginDate: '', // 开始日期
+        endDate: '', // 结束日期
         buyerSn: undefined, // 客户sn
-        bizNo: '', // 单号
-        bizSubNo: '',
-        bizType: undefined,
-        parentDealerSn: undefined,
-        rebateParentType: undefined,
+        bizNo: '', // 单号
+        bizSubNo: '', // 备货单号
+        bizType: undefined, // 单据类型
+        parentDealerSn: undefined, // 差价归属方
+        rebateParentType: undefined, // 差价归属类型
         productEntity: {
           productBrandSn: undefined, //  产品品牌
           productTypeSn1: '', //  产品一级分类
@@ -160,11 +156,10 @@ export default {
           name: '' //  产品名称
         }
       },
+      totalData: null, //  合计
       rules: {
         'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -173,6 +168,7 @@ export default {
         delete params.time
         // 总计
         this.getCount(params)
+        // 获取列表数据 有分页
         return rebateDetailQueryList(params).then(res => {
           let data
           if (res.status == 200) {
@@ -181,17 +177,13 @@ export default {
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
               data.list[i].inStockQty = data.list[i].qty
-              // if (data.list[i].parentDealerName) {
-              //   data.list[i].parentDealerName += '(' + data.list[i].rebateRate * 100 + '%)'
-              // }
             }
             this.disabled = false
           }
           this.spinning = false
           return data
         })
-      },
-      totalData: null //  合计
+      }
     }
   },
   computed: {
@@ -225,6 +217,7 @@ export default {
     }
   },
   watch: {
+    // 展开关闭 监听表格高度变化
     advanced (newValue, oldValue) {
       this.setTableH()
     },
@@ -247,7 +240,7 @@ export default {
         }
       })
     },
-    //  创建时间  change
+    //  日期  change
     dateChange (date) {
       this.queryParam.time = date
       this.queryParam.beginDate = date[0] || ''
@@ -264,6 +257,7 @@ export default {
         }
       })
     },
+    // 客户名称
     dealerChange (val) {
       if (val.row) {
         this.queryParam.buyerSn = val.row.dealerSn
@@ -271,6 +265,7 @@ export default {
         this.queryParam.buyerSn = undefined
       }
     },
+    // 差价归属方
     parentDealerChange (val) {
       if (val.row) {
         this.queryParam.parentDealerSn = val.row.dealerSn
@@ -311,15 +306,16 @@ export default {
       this.queryParam.productEntity.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productEntity.productTypeSn3 = val[2] ? val[2] : ''
     },
+    // 初始化
     pageInit () {
       this.disabled = false
       this.spinning = false
       this.setTableH()
     },
+    // 计算表格高度
     setTableH () {
       this.$nextTick(() => { // 页面渲染完成后的回调
         const tableSearchH = this.$refs.tableSearch1.offsetHeight
-        console.log(tableSearchH)
         this.tableHeight = window.innerHeight - tableSearchH - 300
       })
     }

+ 5 - 6
src/views/reportData/productRebateReport/index.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="tabsReportList-wrap">
     <div style="background-color: #fff;margin-bottom: 5px;">
+      <!-- 选项卡 1订单差价表 2订单经销商差价表 3产品差价表 -->
       <a-tabs default-active-key="1" v-model="curTab" @change="changeTab">
         <a-tab-pane key="1" tab="订单差价表"></a-tab-pane>
         <a-tab-pane key="2" tab="订单经销商差价表"></a-tab-pane>
@@ -16,22 +17,20 @@
 </template>
 
 <script>
+// 引入组件
 import report from './list.vue'
 import detailReport from './detailList.vue'
 import dealerReport from './dealerList.vue'
 export default {
   name: 'ProductRebateReportIndex',
-  components: {
-    report,
-    detailReport,
-    dealerReport
-  },
+  components: { report, detailReport, dealerReport },
   data () {
     return {
-      curTab: '1'
+      curTab: '1'// 切换tab值
     }
   },
   methods: {
+    // 选项卡切换 事件
     changeTab (v) {
       if (v == 2) {
         this.$refs.dealerList.setTableH()

+ 28 - 50
src/views/reportData/productRebateReport/list.vue

@@ -4,7 +4,7 @@
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form-model
-          id="srebateReport-form"
+          id="productRebateReportList-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -16,17 +16,17 @@
           <a-row :gutter="15">
             <a-col :md="5" :sm="24">
               <a-form-model-item label="日期" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="productRebateReportList-time" ref="rangeDate" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="5" :sm="24">
               <a-form-model-item label="订单号">
-                <a-input id="srebateReport-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入订单号"/>
+                <a-input id="productRebateReportList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入订单号"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="5" :sm="24">
               <a-form-model-item label="客户名称">
-                <dealerSearchList ref="dealer" id="srebateReport-buyerName" @change="dealerChange" />
+                <dealerSearchList ref="dealer" id="productRebateReportList-buyerName" @change="dealerChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="5" :sm="24">
@@ -34,24 +34,15 @@
                 <v-select
                   v-model="queryParam.bizType"
                   ref="bizType"
-                  id="srebateReport-bizType"
+                  id="productRebateReportList-bizType"
                   code="REBATE_BILL_BIZ_TYPE"
                   placeholder="请选择单据类型"
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="srebateReport-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="srebateReport-reset">重置</a-button>
-              <!-- <a-button
-                type="primary"
-                style="margin-left: 5px"
-                @click="handleExport"
-                :disabled="disabled"
-                :loading="exportLoading"
-                v-if="$hasPermissions('M_salesReturnReportExport')"
-                class="button-warning"
-                id="srebateReport-export-btn">导出</a-button> -->
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="productRebateReportList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productRebateReportList-reset">重置</a-button>
             </a-col>
           </a-row>
         </a-form-model>
@@ -68,6 +59,7 @@
             dropdownMatchSelectWidth
             :maxTagCount="3"
             :tree-data="colsArr"
+            id="productRebateReportList-isShowColumn"
             tree-checkable
             placeholder="请选择要显示的列(多选)"
           />
@@ -102,10 +94,11 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-// import { downloadExcel } from '@/libs/JGPrint.js'
 import dealerSearchList from '@/views/common/dealerSearchList.vue'
+// 接口
 import { rebateQueryList, rebateQueryCount } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate, dealerSearchList },
@@ -114,22 +107,23 @@ export default {
     return {
       spinning: false,
       labelCol: { span: 8 },
-      wrapperCol: { span: 16 },
+      wrapperCol: { span: 16 }, // 表单调整
       advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      queryParam: { //  查询条件
-        time: [],
-        beginDate: '',
-        endDate: '',
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
+      //  查询条件
+      queryParam: {
+        time: [], // 日期
+        beginDate: '', // 开始日期
+        endDate: '', // 结束日期
         buyerSn: undefined, // 客户sn
-        bizNo: '', // 单号
-        bizType: undefined
+        bizNo: '', // 单号
+        bizType: undefined// 单据类型
       },
       rules: {
         'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -138,6 +132,7 @@ export default {
         delete params.time
         // 总计
         this.getCount(params)
+        // 获取表格数据 有分页
         return rebateQueryList(params).then(res => {
           let data
           if (res.status == 200) {
@@ -153,7 +148,7 @@ export default {
         })
       },
       totalData: null, //  合计
-      colsArr: [
+      colsArr: [ // 显示列数据
         {
           title: '直接差价金额(明细)',
           value: 'directRebateAmountInfo',
@@ -167,7 +162,7 @@ export default {
           disabled: !this.$hasPermissions('M_salesOrderTotalList_salesPrice')
         }
       ],
-      showCols: []
+      showCols: []// 已选显示列数据
     }
   },
   computed: {
@@ -209,7 +204,7 @@ export default {
         }
       })
     },
-    //  创建时间  change
+    //  日期  change
     dateChange (date) {
       this.queryParam.time = date
       this.queryParam.beginDate = date[0] || ''
@@ -226,6 +221,7 @@ export default {
         }
       })
     },
+    // 客户名称 change
     dealerChange (val) {
       if (val.row) {
         this.queryParam.buyerSn = val.row.dealerSn
@@ -247,32 +243,14 @@ export default {
       this.totalData = null
       this.$refs.table.clearTable()
     },
-    // 导出
-    // handleExport () {
-    //   const _this = this
-    //   this.$refs.ruleForm.validate(valid => {
-    //     if (valid) {
-    //       const params = _this.queryParam
-    //       params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
-    //       _this.exportLoading = true
-    //       _this.spinning = true
-    //       reportSalesReturnExport(params).then(res => {
-    //         downloadExcel(res, '销售退货报表')
-    //         _this.exportLoading = false
-    //         _this.spinning = false
-    //       })
-    //     } else {
-    //       console.log('error submit!!')
-    //       return false
-    //     }
-    //   })
-    // },
+    // 表格高度自适应
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 210
     }
   },
   watch: {
+    //  展开关闭 监听列表高度变化
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 36 - 24
src/views/reportData/receivedSendStorageReport/index.vue

@@ -1,10 +1,12 @@
 <template>
   <div>
     <a-card size="small" :bordered="false" class="receivedSendStorageReport-wrap searchBoxNormal">
+      <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName">
         <a-form-model
           layout="inline"
           ref="ruleForm"
+          id="receivedSendStorageReport-form"
           :rules="rules"
           :model="form">
           <a-row :gutter="15">
@@ -16,6 +18,7 @@
                     format="YYYY-MM"
                     v-model="startValue"
                     placeholder="开始月份"
+                    id="receivedSendStorageReport-startTime"
                     @openChange="handleStartOpenChange"
                     @change="getStartDate"
                   />
@@ -24,6 +27,7 @@
                     :disabled-date="disabledEndDate"
                     format="YYYY-MM"
                     v-model="endValue"
+                    id="receivedSendStorageReport-endTime"
                     placeholder="结束月份"
                     :open="endOpen"
                     @openChange="handleEndOpenChange"
@@ -54,7 +58,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="仓库">
-                <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                <chooseWarehouse ref="warehouse" id="receivedSendStorageReport-warehouseSn" v-model="queryParam.warehouseSn"></chooseWarehouse>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -67,7 +71,7 @@
                 @click="testForm('export')"
                 :disabled="disabled"
                 v-if="$hasPermissions('B_ProductPriceExoprt')"
-                id="productInfoList-export">导出</a-button>
+                id="receivedSendStorageReport-export">导出</a-button>
             </a-col>
           </a-row>
         </a-form-model>
@@ -125,50 +129,52 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+import moment from 'moment'
+// 组件
+import { STable, VSelect } from '@/components'
 import ProductBrand from '@/views/common/productBrand.js'
 import productTypeAll from '@/views/common/productTypeAll.js'
-import { STable, VSelect } from '@/components'
 import reportModal from '@/views/common/reportModal.vue'
-import { queryDetailReportPage, exportDetailReport, queryReportCount } from '@/api/reportData'
-import { hdExportExcel } from '@/libs/exportExcel'
 import gatherList from './list'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
-import moment from 'moment'
+// 接口
+import { queryDetailReportPage, exportDetailReport, queryReportCount } from '@/api/reportData'
 export default {
-  name: 'PriceDifferenceDetailReportList',
+  name: 'ReceivedSendStorageReportList',
   mixins: [commonMixin],
   components: { STable, VSelect, ProductBrand, gatherList, productTypeAll, reportModal, chooseWarehouse },
   data () {
     return {
       moment,
+      disabled: false, // 查询、重置按钮是否可操作
+      tableHeight: 0, // 表格高度
+      showExport: false, // 导出提示框
       queryParam: {
-        beginDate: undefined,
-        endDate: undefined,
+        beginDate: undefined, // 开始周期
+        endDate: undefined, // 结束周期
         product: {
           name: '', // 产品名称
           code: ''// 产品编码
         },
-        productBrandSn: undefined,
-        productTypeSn1: undefined,
-        productTypeSn2: undefined,
-        productTypeSn3: undefined,
-        warehouseSn: undefined
+        productBrandSn: undefined, // 产品品牌
+        productTypeSn1: undefined, // 产品一级分类
+        productTypeSn2: undefined, // 产品二级分类
+        productTypeSn3: undefined, // 产品三级分类
+        warehouseSn: undefined// 出库仓库
       },
       form: {
-        time: []
+        time: []// 选择周期
       },
-      totalData: null,
-      tabVal: 1,
+      totalData: null, // 统计数据
+      tabVal: 1, // tabs  切换值
+      productType: [], // 产品分类
       rules: {
         time: [{ required: true, message: '请选择月份', trigger: 'change' }]
       },
-      productType: [],
-      disabled: false,
-      tableHeight: 0,
-      endOpen: false,
-      showExport: false,
-      startValue: null,
-      endValue: null,
+      endOpen: false, // 结束月份弹窗
+      startValue: null, // 开始月份有效值
+      endValue: null, // 结束月份有效值
       columns: [
         { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -196,10 +202,12 @@ export default {
         this.disabled = true
         const params = Object.assign(parameter, this.queryParam)
         this.spinning = true
+        // 获取列表数据  有分页
         return queryDetailReportPage(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
@@ -213,6 +221,7 @@ export default {
     }
   },
   methods: {
+    // 统计
     getCount (params) {
       queryReportCount(params).then(res => {
         if (res.status == 200) {
@@ -262,6 +271,7 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
+    // 选项卡 change
     handleChange (val) {
       this.tabVal = val
     },
@@ -325,12 +335,14 @@ export default {
       this.totalData = null
       this.$refs.gatherBox.resetTable()
     },
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 255

+ 11 - 6
src/views/reportData/receivedSendStorageReport/list.vue

@@ -42,25 +42,26 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { queryGroupByprodTypeReportPage } from '@/api/reportData'
+// 组件
 import { STable, VSelect } from '@/components'
+// 接口
+import { queryGroupByprodTypeReportPage } from '@/api/reportData'
 export default {
-  name: 'QueryPart',
+  name: 'ReceivedSendStorageList',
   mixins: [commonMixin],
   components: { STable, VSelect },
   props: {
-    newLoading: Boolean,
-    queryParam: {
+    queryParam: {// 查询参数
       type: Object,
       default: function () {
         return {}
       }
     },
-    tableHeight: {
+    tableHeight: {// 表格高度
       type: Number,
       default: 0
     },
-    totalData: {
+    totalData: {// 合计数据
       type: Object,
       default: function () {
         return null
@@ -91,10 +92,12 @@ export default {
       loadData: parameter => {
         this.disabled = true
         const params = Object.assign(parameter, this.queryParam)
+        // 获取列表数据 无分页
         return queryGroupByprodTypeReportPage(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 获取列表序号
             for (var i = 0; i < data.length; i++) {
               data[i].no = i + 1
             }
@@ -107,6 +110,7 @@ export default {
     }
   },
   methods: {
+    // 初始化
     pageInit (buyerSn) {
       this.resetCurForm()
     },
@@ -114,6 +118,7 @@ export default {
     resetCurForm () {
       this.$refs.table.refresh()
     },
+    // 清除表格内容
     resetTable () {
       this.$refs.table.clearTable()
     }

+ 40 - 28
src/views/reportData/returnGoodsPresentation/list.vue

@@ -14,13 +14,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="returnGoodsPresentationList-time" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="客户名称">
-                <dealerSubareaScopeList id="salesPresentationList-dealerSn" ref="custList" @change="custChange"></dealerSubareaScopeList>
-                <!-- <a-input id="returnGoodsPresentationList-dealerName" v-model.trim="queryParam.dealer.dealerName" allowClear placeholder="请输入客户名称"/> -->
+                <dealerSubareaScopeList id="returnGoodsPresentationList-dealerSn" ref="custList" @change="custChange"></dealerSubareaScopeList>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -48,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="returnGoodsPresentationList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -124,6 +123,8 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import { STable, VSelect } from '@/components'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -131,7 +132,7 @@ 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 { returnDocReportTitle, reportSalesReturnThjdReportList, reportSalesReturnThjdReportCount, reportSalesReturnThjdReportExport } from '@/api/reportData'
 export default {
   name: 'ReturnGoodsPresentationList',
@@ -141,44 +142,48 @@ export default {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
-      showExport: false,
-      queryParam: { //  查询条件
-        time: [],
-        beginDate: '',
-        endDate: '',
-        salesReturnBillNo: '',
+      showExport: false, // 导出提示框
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
+      //  查询条件
+      queryParam: {
+        time: [], // 退货日期
+        beginDate: '', // 开始日期
+        endDate: '', // 结束日期
+        salesReturnBillNo: '', // 退货单号
         subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined,
-          bizUserSn: undefined
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined, // 分期
+          bizUserSn: undefined// 区域负责人
         },
         dealer: {
-          'dealerSn': '',
-          'provinceSn': undefined,
-          'citySn': undefined,
-          'districtSn': undefined,
-          'dealerLevel': undefined
+          'dealerSn': '', // 客户名称
+          'provinceSn': undefined, // 省
+          'citySn': undefined, // 市
+          'districtSn': undefined, // 区
+          'dealerLevel': undefined// 客户级别
         }
       },
-      tableHeight: 0,
-      columns: [],
-      countLabel: [],
-      countBrandLabel: [],
+      columns: [], // 表头数据
+      countLabel: [], // 统计分类数据
+      countBrandLabel: [], // 统计品牌数据
       rules: {
-        'time': [{ required: true, message: '请选择调拨日期', trigger: 'change' }]
+        'time': [{ required: true, message: '请选择退货日期', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) //  有分页
+        const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize })
+        // 获取列表数据 有分页
         return reportSalesReturnThjdReportList(paramsPage).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 统计
             this.getCount(paramsPage)
+            // 计算列表序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -193,6 +198,7 @@ export default {
     }
   },
   watch: {
+    // 展开关闭,监听表格高度变化
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -235,6 +241,7 @@ export default {
         }
       })
     },
+    // 查询
     handleSearch () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
@@ -246,10 +253,11 @@ export default {
         }
       })
     },
+    // 客户名称
     custChange (val) {
       this.queryParam.dealer.dealerSn = val.key
     },
-    //  创建时间  change
+    //  退货日期  change
     dateChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
@@ -259,6 +267,7 @@ export default {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
+    // 区域分期 change
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
@@ -291,6 +300,7 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },
+    // 地区
     areaChange (val) {
       this.queryParam.dealer.provinceSn = val[0] ? val[0] : ''
       this.queryParam.dealer.citySn = val[1] ? val[1] : ''
@@ -318,10 +328,12 @@ export default {
       })
       this.resetSearchForm()
     },
+    // 初始化
     pageInit () {
       this.getTableTitle()
       this.setTableH()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 215

+ 3 - 2
src/views/reportData/salesPresentation/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="salesPresentationList-time" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -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="salesPresentationList-bizUserSn" v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -122,6 +122,7 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'

+ 27 - 34
src/views/reportData/warehousingOrder/list.vue

@@ -14,7 +14,7 @@
           <a-row :gutter="15">
             <a-col :md="7" :sm="24">
               <a-form-model-item label="完成日期" prop="time">
-                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
+                <rangeDate ref="rangeDate" id="warehousingOrderList-time" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="5" :sm="24">
@@ -52,17 +52,11 @@
               </a-col>
               <a-col :md="5" :sm="24">
                 <a-form-model-item label="入库仓库">
-                  <chooseWarehouse ref="warehouse" isPermission v-model="queryParam.warehouseSn"></chooseWarehouse>
+                  <chooseWarehouse id="warehousingOrderList-warehouseSn" ref="warehouse" isPermission v-model="queryParam.warehouseSn"></chooseWarehouse>
                 </a-form-model-item>
               </a-col>
             </template>
             <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
-              <!-- <a-button
-                type="primary"
-                class="button-info"
-                size="small"
-                @click="handleStock"
-                id="warehousingOrderList-stockDate">盘点区间日期</a-button> -->
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="warehousingOrderList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="warehousingOrderList-reset">重置</a-button>
               <a-button
@@ -134,36 +128,41 @@ export default {
   data () {
     return {
       spinning: false,
-      advanced: false,
-      tableHeight: 0,
-      showExport: false,
-      queryParam: { //  查询条件
-        time: [],
-        beginDate: '',
-        endDate: '',
-        stockPutNo: '',
-        supplierName: '',
-        putBizType: undefined,
-        sparePartsType: undefined,
-        warehouseSn: undefined
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0, // 表格高度
+      showExport: false, // 导出弹窗
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
+      // 查询条件
+      queryParam: {
+        time: [], // 完成日期
+        beginDate: '', // 开始日期
+        endDate: '', // 结束日期
+        stockPutNo: '', // 入库单号
+        supplierName: '', // 单位名称
+        putBizType: undefined, // 入库类型
+        sparePartsType: undefined, // 散件入库子类型
+        warehouseSn: undefined// 出库仓库
       },
       rules: {
         'time': [{ required: true, message: '请选择完成日期', trigger: 'change' }]
       },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
+      totalData: null, // 统计
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
         delete params.time
+        // 获取列表数据 有分页
         return reportStockPutList(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
             }
@@ -172,8 +171,7 @@ export default {
           this.spinning = false
           return data
         })
-      },
-      totalData: null
+      }
     }
   },
   computed: {
@@ -196,6 +194,7 @@ export default {
     }
   },
   watch: {
+    // 展开关闭  表格高度变化
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -207,10 +206,6 @@ export default {
     }
   },
   methods: {
-    // 盘点库存日期
-    handleStock () {
-      this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
-    },
     // 总计
     getCount (params) {
       reportStockPutCount(params).then(res => {
@@ -221,6 +216,7 @@ export default {
         }
       })
     },
+    // 查询
     handleSearch () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
@@ -232,7 +228,7 @@ export default {
         }
       })
     },
-    //  创建时间  change
+    //  完成日期  change
     dateChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
@@ -277,15 +273,12 @@ export default {
         }
       })
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
+    // 初始化
     pageInit () {
       this.setTableH()
       this.resetSearchForm()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 200

+ 26 - 33
src/views/reportData/warehousingOrderDetail/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="warehousingOrderDetailList-time" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -47,7 +47,7 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="入库仓库">
-                  <chooseWarehouse ref="warehouse" isPermission v-model="queryParam.warehouseSn"></chooseWarehouse>
+                  <chooseWarehouse ref="warehouse" id="warehousingOrderDetailList-warehouseSn" isPermission v-model="queryParam.warehouseSn"></chooseWarehouse>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -67,12 +67,6 @@
               </a-col>
             </template>
             <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align:center;">
-              <!-- <a-button
-                type="primary"
-                class="button-info"
-                size="small"
-                @click="handleStock"
-                id="warehousingOrderDetailList-stockDate">盘点区间日期</a-button> -->
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="warehousingOrderDetailList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="warehousingOrderDetailList-reset">重置</a-button>
               <a-button
@@ -129,11 +123,13 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { hdExportExcel } from '@/libs/exportExcel'
 import reportModal from '@/views/common/reportModal.vue'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
+// 接口
 import { reportStockPutDetailList, reportStockPutDetailCount, reportStockPutDetailExport } from '@/api/reportData'
 export default {
   name: 'WarehousingOrderDetailList',
@@ -143,30 +139,32 @@ export default {
     return {
       spinning: false,
       advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      showExport: false,
-      queryParam: { //  查询条件
-        time: [],
-        beginDate: '',
-        endDate: '',
-        stockPutNo: '',
-        putBizType: undefined,
-        supplierName: '',
-        productName: '',
-        productCode: '',
-        warehouseSn: undefined
+      tableHeight: 0, // 表格高度
+      showExport: false, // 导出弹窗
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出按钮加载状态
+      //  查询条件
+      queryParam: {
+        time: [], // 完成日期
+        beginDate: '', // 开始日期
+        endDate: '', // 结束日期
+        stockPutNo: '', // 入库单号
+        putBizType: undefined, // 入库类型
+        supplierName: '', // 单位名称
+        productName: '', // 产品名称
+        productCode: '', // 产品编码
+        warehouseSn: 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 reportStockPutDetailList(params).then(res => {
           let data
           if (res.status == 200) {
@@ -211,6 +209,7 @@ export default {
     }
   },
   watch: {
+    // 展开关闭 重新计算表格高度
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -222,10 +221,6 @@ export default {
     }
   },
   methods: {
-    // 盘点库存日期
-    handleStock () {
-      this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
-    },
     // 总计
     getCount (params) {
       reportStockPutDetailCount(params).then(res => {
@@ -236,6 +231,7 @@ export default {
         }
       })
     },
+    // 查询
     handleSearch () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
@@ -247,7 +243,7 @@ export default {
         }
       })
     },
-    //  创建时间  change
+    //  完成日期  change
     dateChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
@@ -293,15 +289,12 @@ export default {
         }
       })
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
+    // 初始化
     pageInit () {
       this.resetSearchForm()
       this.setTableH()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 200