lilei 1 éve
szülő
commit
b62f27f618
1 módosított fájl, 23 hozzáadás és 23 törlés
  1. 23 23
      src/views/reportData/returnSlipReport/list.vue

+ 23 - 23
src/views/reportData/returnSlipReport/list.vue

@@ -33,13 +33,13 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            
+
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-              <a-form-item label="退货单号">
-                <a-input id="returnSlipReportList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入退货单号"/>
-              </a-form-item>
-            </a-col>
+                <a-form-item label="退货单号">
+                  <a-input id="returnSlipReportList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入退货单号"/>
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="returnSlipReportList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
@@ -47,12 +47,12 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域负责人">
-                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                  <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
-                    <AreaList id="returnSlipReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                  <AreaList id="returnSlipReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -82,7 +82,7 @@
         ref="table"
         size="small"
         :rowKey="(record) => record.no"
-        rowKeyName = 'no'
+        rowKeyName="no"
         :columns="columns"
         :data="loadData"
         :scroll="{ x: tableWidth, y: tableHeight }"
@@ -148,7 +148,7 @@ export default {
         provinceSn: undefined,
         citySn: undefined,
         districtSn: undefined,
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined,
           bizUserSn: undefined
@@ -190,12 +190,12 @@ export default {
       },
       totalData: null,
       columns: [],
-      countLabel:[],
-      countBrandLabel:[],
+      countLabel: [],
+      countBrandLabel: [],
       tableWidth: 0
     }
   },
-  
+
   methods: {
     //  导出
     handleExport () {
@@ -233,7 +233,7 @@ export default {
         if (valid) {
           _this.$refs.table.refresh(true)
         } else {
-          _this.$message.error("请选择退货日期")
+          _this.$message.error('请选择退货日期')
           return false
         }
       })
@@ -251,7 +251,7 @@ export default {
     custChange (val) {
       this.queryParam.dealerSn = val.key
     },
-    subareaChange(val){
+    subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
@@ -282,34 +282,34 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },
-    areaChange(val){
+    areaChange (val) {
       this.queryParam.provinceSn = val[0] ? val[0] : ''
       this.queryParam.citySn = val[1] ? val[1] : ''
       this.queryParam.districtSn = val[2] ? val[2] : ''
     },
     // 获取表头
-    async getTableTitle(){
+    async getTableTitle () {
       const _this = this
       const tableTitle = await salesReportReturnTitle().then(res => res.data)
       this.columns = tableTitle.list
-      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')<0)
-      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')>=0)
+      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') < 0)
+      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') >= 0)
       this.columns.map(item => {
-        let mw = 40
-        if(item.customRender == 'amount'){
+        let mw = 20
+        if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
-        }else{
+        } else {
           item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 ? mw*5 : w
+        const tw = w <= 80 ? mw * 5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })
       this.resetSearchForm()
     },
-    pageInit(){
+    pageInit () {
       this.getTableTitle()
     }
   },