Browse Source

修改bug

qukaidi 3 years ago
parent
commit
71700a79ba

+ 25 - 57
src/views/statisticAnalysis/collectLedger/index.vue

@@ -1,67 +1,34 @@
 <template>
   <div>
     <basic-container class="page-crad" v-show="show">
-      <avue-crud
-        ref="crud"
-        :option="option"
-        :data="dataList"
-        :page.sync="page"
-        :search.sync="search"
-        :cell-style="cellStyle"
-        @search-change="searchChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @refresh-change="refreshChange"
-        @on-load="onLoad"
-        :table-loading="loading"
-        @saveColumn="saveColumn"
-        @resetColumn="resetColumn"
-        @search-criteria-switch="searchCriteriaSwitch"
-        @search-reset="searchReset"
-      >
+      <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
+        :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+        @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+        @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch" @search-reset="searchReset">
         <template slot="menuLeft">
-          <el-button
-            type="info"
-            icon="el-icon-printer"
-            size="small"
-            :loading="exportLoading"
-            @click.stop="statement"
-            v-if="false"
-          >报表打印</el-button>
+          <el-button type="info" icon="el-icon-printer" size="small" :loading="exportLoading" @click.stop="statement"
+            v-if="false">报表打印</el-button>
           <el-button type="info" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
         </template>
         <template slot="corpNameSearch">
-          <crop-select
-            v-model="search.corpId"
-            corpType="KG"
-          ></crop-select>
+          <crop-select v-model="search.corpId" corpType="KG"></crop-select>
         </template>
         <template slot="sizeSearch">
-          <el-select
-            v-model="search.size"
-            placeholder="请选择"
-          >
+          <el-select v-model="search.size" placeholder="请选择">
             <el-option label="是" :value="1"></el-option>
             <el-option label="否" :value="0"></el-option>
           </el-select>
         </template>
         <template slot="corpName" slot-scope="scope">
-          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.corpName }}</span>
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, scope.index)">{{
+              scope.row.corpName
+          }}</span>
         </template>
       </avue-crud>
     </basic-container>
-    <report-dialog
-      :switchDialog="switchDialog"
-      :searchValue="statementData"
-      :reportName="'经销商-可用库存表'"
-      @onClose="onClose()"
-    />
-    <detail
-      v-if="!show"
-      :detail-data="detailData"
-      :trade-type="tradeType"
-      @goBack="goBack"
-    ></detail>
+    <report-dialog :switchDialog="switchDialog" :searchValue="statementData" :reportName="'经销商-可用库存表'"
+      @onClose="onClose()" />
+    <detail v-if="!show" :detail-data="detailData" :trade-type="tradeType" @goBack="goBack"></detail>
   </div>
 </template>
 
@@ -82,8 +49,8 @@ export default {
   },
   data() {
     return {
-      exportLoading:false,
-      switchDialog:false,
+      exportLoading: false,
+      switchDialog: false,
       statementData: {},
       form: {},
       search: {},
@@ -210,7 +177,7 @@ export default {
     this.option.column.forEach(item => {
       if (item.search) i++
     })
-    if (i % 3 !== 0){
+    if (i % 3 !== 0) {
       const num = 3 - Number(i % 3)
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
@@ -269,7 +236,7 @@ export default {
       this.dataList.forEach(item => {
         this.$refs.crud.toggleRowExpansion(item, false);
       });
-      let queryParams = Object.assign({tradeType: this.tradeType,dc: 'd',}, params);
+      let queryParams = this.deepClone(Object.assign({ tradeType: this.tradeType, dc: 'd' }, params, this.search));
       if (queryParams.accDate && queryParams.accDate.length > 0) {
         queryParams = {
           ...queryParams,
@@ -317,10 +284,10 @@ export default {
       }
     },
     statement() {
-      this.statementData = {...this.search};
+      this.statementData = { ...this.search };
       if (this.statementData.accDate && this.statementData.accDate.length > 0) {
-        this.statementData.accDateStart = this.statementData.accDate[0]+ " " + "00:00:00"
-        this.statementData.accDateEnd = this.statementData.accDate[1]+ " " + "23:59:59"
+        this.statementData.accDateStart = this.statementData.accDate[0] + " " + "00:00:00"
+        this.statementData.accDateEnd = this.statementData.accDate[1] + " " + "23:59:59"
         delete this.statementData.accDate
       }
       this.switchDialog = !this.switchDialog;
@@ -363,7 +330,7 @@ export default {
       this.show = false;
     },
     goBack() {
-      this.detailData=this.$options.data().detailData
+      this.detailData = this.$options.data().detailData
       if (JSON.stringify(this.$route.query) != "{}") {
         this.$router.$avueRouter.closeTag();
         this.$router.push({
@@ -397,8 +364,7 @@ export default {
         type: 'warning'
       }).then(() => {
         window.open(
-          `/api/trade-finance/receivable/export?${
-            this.website.tokenHeader
+          `/api/trade-finance/receivable/export?${this.website.tokenHeader
           }=${getToken()}&dc=d&tradeType=${this.tradeType}&corpId=${this.search.corpId}&accDateStart=${this.search.accDateStart}&accDateEnd=${this.search.accDateEnd}`
         );
       }).catch(() => {
@@ -416,9 +382,11 @@ export default {
 .page-crad ::v-deep .basic-container__card {
   height: 94.2vh;
 }
+
 ::v-deep .el-table__expanded-cell[class*="cell"] {
   padding: 0px;
 }
+
 .itemTable ::v-deep .el-table {
   width: 100%;
 }

+ 1 - 1
src/views/statisticAnalysis/dataDetail/index.vue

@@ -221,7 +221,7 @@ export default {
       this.dataList.forEach(item => {
         this.$refs.crud.toggleRowExpansion(item, false);
       });
-      let queryParams = Object.assign({}, params);
+      let queryParams = this.deepClone(Object.assign({},params, this.search));
       if (queryParams.createTime && queryParams.createTime.length > 0) {
         queryParams = {
           ...queryParams,

+ 1 - 1
src/views/statisticAnalysis/packFeeRecon/index.vue

@@ -227,7 +227,7 @@ export default {
           endCreateTime: this.search.careteTime[1]
         };
       }
-      let queryParams = Object.assign({}, params);
+      let queryParams = this.deepClone(Object.assign({},params, this.search));
       delete queryParams.careteTime;
       getList(
         page.currentPage,

+ 26 - 45
src/views/statisticAnalysis/payment/index.vue

@@ -1,35 +1,14 @@
 <template>
   <div>
     <basic-container class="page-crad">
-      <avue-crud
-        ref="crud"
-        :option="option"
-        :data="dataList"
-        :before-open="beforeOpen"
-        :page.sync="page"
-        :search.sync="search"
-        :cell-style="cellStyle"
-        @search-change="searchChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @refresh-change="refreshChange"
-        @search-reset="searchReset"
-        @on-load="onLoad"
-        :table-loading="loading"
-        :summary-method="summaryMethod"
-        @saveColumn="saveColumn"
-        @resetColumn="resetColumn"
-        @search-criteria-switch="searchCriteriaSwitch"
-      >
+      <avue-crud ref="crud" :option="option" :data="dataList" :before-open="beforeOpen" :page.sync="page"
+        :search.sync="search" :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange"
+        @size-change="sizeChange" @refresh-change="refreshChange" @search-reset="searchReset" @on-load="onLoad"
+        :table-loading="loading" :summary-method="summaryMethod" @saveColumn="saveColumn" @resetColumn="resetColumn"
+        @search-criteria-switch="searchCriteriaSwitch">
         <template slot="menuLeft">
-          <el-button
-            type="info"
-            size="small"
-            icon="el-icon-download"
-            @click="outExport"
-            :disabled="dataList.length == 0"
-            >导出</el-button
-          >
+          <el-button type="info" size="small" icon="el-icon-download" @click="outExport"
+            :disabled="dataList.length == 0">导出</el-button>
         </template>
         <template slot="corpIdSearch">
           <crop-select v-model="search.corpId" corpType="KH"></crop-select>
@@ -220,7 +199,7 @@ export default {
       return num ? Number(num).toFixed(2) : "0.00";
     }
   },
-  created() {},
+  created() { },
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";
@@ -274,7 +253,7 @@ export default {
         this.tradeType = "GN";
       } else if (sysType == 1) {
         this.tradeType = "XX";
-      }else if(sysType == 999){
+      } else if (sysType == 999) {
         this.tradeType = "ADMIN";
       }
     },
@@ -283,15 +262,19 @@ export default {
       this.dataList.forEach(item => {
         this.$refs.crud.toggleRowExpansion(item, false);
       });
-      let queryParams = Object.assign(
-        { tradeType: this.tradeType },
-        params,
-        this.search,
-        {
-          size: page.pageSize,
-          current: page.currentPage
-        }
-      );
+      // let queryParams = Object.assign(
+      //   { tradeType: this.tradeType },
+      //   params,
+      //   this.search,
+      //   {
+      //     size: page.pageSize,
+      //     current: page.currentPage
+      //   }
+      // );
+      let queryParams = this.deepClone(Object.assign({ tradeType: this.tradeType, dc: 'd' }, params, this.search, {
+        size: page.pageSize,
+        current: page.currentPage
+      }));
       if (this.search.businesDate && this.search.businesDate.length > 0) {
         queryParams = {
           ...queryParams,
@@ -346,12 +329,9 @@ export default {
       //   a.corpId = ''
       // }
       window.open(
-        `/api/trade-finance/acc/exportAccMessage?${
-          this.website.tokenHeader
-        }=${getToken()}&corpId=${
-          a.corpId
-        }&accDateStart=${accDateStart}&accDateEnd=${accDateEnd}&dc=${
-          a.dc
+        `/api/trade-finance/acc/exportAccMessage?${this.website.tokenHeader
+        }=${getToken()}&corpId=${a.corpId
+        }&accDateStart=${accDateStart}&accDateEnd=${accDateEnd}&dc=${a.dc
         }&accSysNo=${a.accSysNo}&tradeType=${this.tradeType}`
       );
     },
@@ -390,6 +370,7 @@ export default {
 .page-crad ::v-deep .basic-container__card {
   height: 94.2vh;
 }
+
 .itemTable ::v-deep .el-table {
   width: 100%;
 }

+ 1 - 1
src/views/statisticAnalysis/paymentLedger/index.vue

@@ -265,7 +265,7 @@ export default {
       this.dataList.forEach(item => {
         this.$refs.crud.toggleRowExpansion(item, false);
       });
-      let queryParams = Object.assign({tradeType: this.tradeType,dc: 'c',}, params);
+      let queryParams = this.deepClone(Object.assign({ tradeType: this.tradeType, dc: 'c' }, params, this.search));
       if (queryParams.accDate && queryParams.accDate.length > 0) {
         queryParams = {
           ...queryParams,

+ 1 - 1
src/views/statisticAnalysis/profitLedger/index.vue

@@ -225,7 +225,7 @@ export default {
       this.dataList.forEach(item => {
         this.$refs.crud.toggleRowExpansion(item, false);
       });
-      let queryParams = Object.assign({ tradeType: this.tradeType }, params);
+          let queryParams = this.deepClone(Object.assign({ tradeType: this.tradeType}, params, this.search));
       if (queryParams.accDate && queryParams.accDate.length > 0) {
         queryParams = {
           ...queryParams,

+ 1 - 1
src/views/statisticAnalysis/salesmanCommission/index.vue

@@ -218,7 +218,7 @@ export default {
           endCreateTime: this.search.careteTime[1]
         };
       }
-      let queryParams = Object.assign({}, params);
+      let queryParams = this.deepClone(Object.assign({},params, this.search));
       delete queryParams.careteTime;
       this.loading = true;
       getList(