Преглед изворни кода

Merge branch 'dev' of git.echepei.com:caojunjie/Smart_platform_ui into dev

caojunjie пре 3 година
родитељ
комит
8923659a89

+ 8 - 0
src/api/dealer/purchase.js

@@ -51,3 +51,11 @@ export function dealerSubmit(params) {
     params
   })
 }
+// 获取历史日期和历史价格
+export function historyPrice(params) {
+  return request({
+    url: '/api/blade-purchase-sales/dealerOrder/historyPrice',
+    method: 'get',
+    params
+  })
+}

+ 8 - 0
src/api/dealer/sales.js

@@ -59,3 +59,11 @@ export function dealerSubmit(params) {
     params
   })
 }
+// 获取历史日期和历史价格
+export function historyPrice(params) {
+  return request({
+    url: '/api/blade-purchase-sales/dealerOrder/historyPrice',
+    method: 'get',
+    params
+  })
+}

+ 18 - 0
src/api/statisticAnalysis/payment.js

@@ -0,0 +1,18 @@
+import request from '@/router/axios';
+
+//列表查询
+export function getAccList(params) {
+  return request({
+    url: '/api/trade-finance/acc/getAccMessage',
+    method: 'get',
+    params
+  })
+}
+//导出
+export function exportAcctList(params) {
+  return request({
+    url: '/api/trade-finance/acc/exportAccMessage',
+    method: 'get',
+    params
+  })
+}

+ 1 - 1
src/components/finance/config/option.json

@@ -159,7 +159,7 @@
     },
     {
       "label": "商品名称",
-      "prop": "cname",
+      "prop": "goodName",
       "overHidden": true,
       "index": 12,
       "value": 0,

+ 45 - 0
src/router/views/index.js

@@ -1127,4 +1127,49 @@ export default [{
       component: () => import( /* webpackChunkName: "views" */ '@/views/landTransportation/dispatchingCars/index')
     }]
   },
+  //运维-价格管理
+  {
+    path: '/maintenance/priceManagement/index',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: '/maintenance/priceManagement/index',
+      name: '价格管理',
+      meta: {
+        i18n: '/maintenance/priceManagement/index',
+        keepAlive: true,
+      },
+      component: () => import( /* webpackChunkName: "views" */ '@/views/maintenance/priceManagement/index')
+    }]
+  },
+  //经销商库存账
+  {
+    path: '/dealer/stock/index',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: '/dealer/stock/index',
+      name: '库存账(D)',
+      meta: {
+        i18n: '/dealer/stock/index',
+        keepAlive: true,
+      },
+      component: () => import( /* webpackChunkName: "views" */ '@/views/dealer/stock/index')
+    }]
+  },
+  //内贸库存账
+  {
+    path: '/businessManagement/inventoryAccount/index',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: '/businessManagement/inventoryAccount/index',
+      name: '库存账(N)',
+      meta: {
+        i18n: '/businessManagement/inventoryAccount/index',
+        keepAlive: true,
+      },
+      component: () => import( /* webpackChunkName: "views" */ '@/views/businessManagement/inventoryAccount/index')
+    }]
+  },
 ]

+ 96 - 0
src/views/dealer/componet/history.vue

@@ -0,0 +1,96 @@
+<template>
+  <el-dialog
+    append-to-body
+    title="历史明细"
+    class="el-dialogDeep"
+    :visible.sync="historyVisible"
+    width="70%"
+    :close-on-click-modal="false"
+    :destroy-on-close="true"
+    :close-on-press-escape="false"
+    v-dialog-drag
+    :before-close="closeDialog"
+  >
+    <avue-crud
+      ref="historyCrud"
+      :data="historyData"
+      :option="historyOption"
+    ></avue-crud>
+    <span slot="footer" class="dialog-footer">
+        <el-button @click="closeDialog">关 闭</el-button>
+      </span>
+  </el-dialog>
+</template>
+
+<script>
+import {historyPrice} from "@/api/dealer/sales";
+
+export default {
+  name: "history",
+  props: {
+    params: {
+      type: Object,
+      default: {}
+    }
+  },
+  data() {
+    return {
+      historyVisible: false,
+      historyData: [],
+      historyOption: {
+        stripe: true,
+        border: true,
+        index: true,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        menu: false,
+        align: "center",
+        menuWidth: "180",
+        selection: false,
+        tip: false,
+        column: [
+          {
+            label: "价格",
+            prop: "price",
+            index: 1,
+            overHidden: true
+          },
+          {
+            label: "日期",
+            prop: "businesDate",
+            index: 2,
+            overHidden: true
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            index: 3,
+            overHidden: true
+          },
+        ]
+      },
+    }
+  },
+  methods: {
+    init() {
+      this.historyVisible = true;
+      historyPrice(this.params).then(res => {
+        this.historyData = res.data.data? res.data.data: [];
+        this.$set(this.historyOption, 'height', window.innerHeight - 240)
+      })
+    },
+    // 关闭弹窗
+    closeDialog() {
+      this.historyVisible = false;
+      this.historyData = [];
+      this.$emit("closeDialog")
+    },
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 15 - 1
src/views/dealer/purchase/config/customerContact.json

@@ -133,9 +133,23 @@
       "overHidden": true
     },
     {
+      "label": "最新价格",
+      "prop": "newJob",
+      "index": 14,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "最新日期",
+      "prop": "newDate",
+      "index": 15,
+      "width": 100,
+      "overHidden": true
+    },
+    {
       "label": "备注",
       "prop": "remarks",
-      "index": 15,
+      "index": 16,
       "width": 100,
       "overHidden": true
     }

+ 126 - 28
src/views/dealer/purchase/detail.vue

@@ -52,7 +52,7 @@
           @click="editCustomer"
           size="small"
           :loading="btnLoading"
-          :disabled="disabled || confirmDisabled"
+          :disabled="disabled"
         >保存数据
         </el-button>
       </div>
@@ -257,6 +257,18 @@
           <template slot="storageQuantity" slot-scope="{ row, index }">
             <span>{{ row.storageQuantity | IntegerFormat }}</span>
           </template>
+          <template slot="newJob" slot-scope="{ row, index }">
+            <span style="color: #1e9fff;cursor: pointer" @click="openHistory(row)">{{ row.newJob }}</span>
+          </template>
+          <template slot="remarks" slot-scope="{ row, index }">
+            <el-input
+              v-if="row.$cellEdit"
+              v-model="row.remarks"
+              size="small"
+              :disabled="!form.storageId"
+            />
+            <span v-else>{{ row.remarks }}</span>
+          </template>
         </avue-crud>
       </basic-container>
       <containerTitle title="详细信息"/>
@@ -380,6 +392,13 @@
         @choceFun="choceFun"
       />
     </el-dialog>
+<!--    历史记录-->
+    <view-history
+      v-if="historyVisible"
+      ref="history"
+      :params="historyParams"
+      @closeDialog="closeDialog"
+    />
   </div>
 </template>
 
@@ -390,7 +409,7 @@ import {getDeptLazyTree,
   getGoods,} from "@/api/basicData/customerInquiry";
 import {selectGoodsNum} from "@/api/basicData/inventoryAccount"; // 库存查询
 import {getUserInfo} from "@/api/system/user"; //登录用户信息
-import {dataDetail, removeGoods, typeSave, dealerSubmit} from "@/api/dealer/purchase";
+import {dataDetail, removeGoods, typeSave, dealerSubmit, historyPrice} from "@/api/dealer/purchase";
 import {
   isDiscount,
   isPercentage,
@@ -405,6 +424,7 @@ import { customerList as feeList } from "@/api/basicData/basicFeesDesc";
 import {getDetail} from "@/api/basicData/inventoryAccount";
 import { getToken } from "@/util/auth";
 import { getCurrentDate } from "@/util/date";
+import viewHistory from '../componet/history';
 
 export default {
   name: "detail",
@@ -418,6 +438,7 @@ export default {
     billApplication,
     financialAccount,
     checkSchedule,
+    viewHistory,
   },
   data() {
     return {
@@ -626,6 +647,8 @@ export default {
       unitOption: [],
       baseURL: '/api/blade-purchase-sales/orderitems/importDealerOrder',
       headers: { "Blade-Auth": 'Bearer ' + getToken()},
+      historyVisible: false,
+      historyParams: {},
     }
   },
   async created() {
@@ -695,9 +718,9 @@ export default {
         this.form.amount = Number(this.form.amount).toFixed(2);
         this.confirmDisabled = this.form.status == 3? true: false;
         if (this.confirmDisabled) {
-          this.option.column.map(e => {
-            this.$set(e, 'disabled', true)
-          })
+          // this.option.column.map(e => {
+          //   this.$set(e, 'disabled', true)
+          // })
         }
         this.dataList = this.form.orderItemsList? this.form.orderItemsList: [];
         this.uploadData = this.form.orderFilesList? this.form.orderFilesList: [];
@@ -712,11 +735,17 @@ export default {
     },
     openEdit() {
       this.disabled = false;
-      if (this.form.status != 3) {
-        this.option.column.map(e => {
+      this.option.column.map(e => {
+        if (this.confirmDisabled) {
+          if (e.prop == 'businesDate' || e.prop == 'lotNo') {
+            this.$set(e, 'disabled', true)
+          } else {
+            this.$set(e, 'disabled', false)
+          }
+        } else {
           this.$set(e, 'disabled', false)
-        })
-      }
+        }
+      })
     },
     copyDoc() {
       this.$emit("copyOrder", this.form.id);
@@ -802,6 +831,14 @@ export default {
           this.selectionList.forEach(e => {
             this.dataList.forEach(async (item, index) => {
               if (index == this.reData.index) {
+                let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+                if (historyData.length > 0) {
+                  e.newJob = historyData[0].price;
+                  e.newDate = historyData[0].businesDate;
+                } else {
+                  e.newJob = null;
+                  e.newDate = null;
+                }
                 form = await this.getStockInfo({
                   tradeType: 'JXS',
                   goodsId: e.id,
@@ -823,6 +860,8 @@ export default {
                 item.size = e.size;
                 item.lotNo = e.batch == 1? this.form.lotNo: null;
                 item.priceCategory = e.goodsTypeName;
+                item.newJob = e.newJob;
+                item.newDate = e.newDate;
                 item.$cellEdit = true;
               }
             });
@@ -831,6 +870,14 @@ export default {
       } else {
         if (this.goodsListSave.length > 0) { // 暂存的有数据
           this.goodsListSave.forEach(async e => {
+            let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+            if (historyData.length > 0) {
+              e.newJob = historyData[0].price;
+              e.newDate = historyData[0].businesDate;
+            } else {
+              e.newJob = null;
+              e.newDate = null;
+            }
             form = await this.getStockInfo({
               tradeType: 'JXS',
               goodsId: e.id,
@@ -856,12 +903,22 @@ export default {
               orderQuantity: 0,
               storageQuantity: e.storageQuantity,
               purchaseAmount: e.purchaseAmount,
+              newJob: e.newJob,
+              newDate: e.newDate,
               lotNo: e.batch == 1? this.form.lotNo: null,
               $cellEdit: true
             });
           });
         } else {
           this.selectionList.forEach(async e => {
+            let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+            if (historyData.length > 0) {
+              e.newJob = historyData[0].price;
+              e.newDate = historyData[0].businesDate;
+            } else {
+              e.newJob = null;
+              e.newDate = null;
+            }
             form = await this.getStockInfo({
               tradeType: 'JXS',
               goodsId: e.id,
@@ -887,6 +944,8 @@ export default {
               orderQuantity: 0,
               storageQuantity: e.storageQuantity,
               purchaseAmount: e.purchaseAmount,
+              newJob: e.newJob,
+              newDate: e.newDate,
               lotNo: e.batch == 1? this.form.lotNo: null,
               $cellEdit: true
             });
@@ -1001,26 +1060,23 @@ export default {
       let form = {};
       this.goodsoptions.forEach(async e => {
         if (e.code == row.code) {
-          if (e.batch == 0) {
-            form = await this.getStockInfo({
-              tradeType: 'JXS',
-              goodsId: e.id,
-              storageId: this.form.storageId,
-            })
-            e.storageQuantity = form.stock;
-            e.purchaseAmount = form.purchaseAmount;
-            e.arr = [];
+          let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+          if (historyData.length > 0) {
+            e.newJob = historyData[0].price;
+            e.newDate = historyData[0].businesDate;
           } else {
-            e.storageQuantity = 0
-            e.purchaseAmount = 0;
-            e.arr = await this.getLotNo({
-              itemId: e.id,
-              storageId: this.form.storageId,
-              tradeType: 'JXS'
-            });
+            e.newJob = null;
+            e.newDate = null;
           }
+          form = await this.getStockInfo({
+            tradeType: 'JXS',
+            goodsId: e.id,
+            storageId: this.form.storageId,
+            lotNo: e.batch == 1? this.form.lotNo: null
+          })
+          e.storageQuantity = form.stock;
+          e.purchaseAmount = form.purchaseAmount;
           row.itemId = e.id;
-          row.storageQuantity =  e.storageQuantity;
           row.cname = e.cname;
           row.code = e.code;
           row.corpId = e.corpId;
@@ -1031,10 +1087,13 @@ export default {
           row.typeno = e.typeno;
           row.unit = e.unit;
           row.size = e.size;
-          row.arr = e.arr;
           row.priceCategory = e.goodsTypeName;
+          row.storageQuantity = e.storageQuantity;
           row.purchaseAmount = e.purchaseAmount;
-          row.batch = e.batch;
+          row.lotNo = e.batch == 1? this.form.lotNo: null;
+          row.newJob = e.newJob;
+          row.newDate = e.newDate;
+          // row.amount = 0;
         }
       });
     },
@@ -1042,6 +1101,14 @@ export default {
       let form = {};
       this.goodsoptions.forEach(async e => {
         if (e.id == row.itemId) {
+          let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+          if (historyData.length > 0) {
+            e.newJob = historyData[0].price;
+            e.newDate = historyData[0].businesDate;
+          } else {
+            e.newJob = null;
+            e.newDate = null;
+          }
           form = await this.getStockInfo({
             tradeType: 'JXS',
             goodsId: e.id,
@@ -1064,6 +1131,8 @@ export default {
           row.storageQuantity = e.storageQuantity;
           row.purchaseAmount = e.purchaseAmount;
           row.lotNo = e.batch == 1? this.form.lotNo: null;
+          row.newJob = e.newJob;
+          row.newDate = e.newDate;
           // row.amount = 0;
         }
       });
@@ -1132,6 +1201,7 @@ export default {
           cname: e.cname,
           price: e.price,
           quantity: e.orderQuantity,
+          unit:e.unit,
         }
         this.applyPaymentList.push(form);
       })
@@ -1224,6 +1294,34 @@ export default {
       });
       if (res === true) loading.close();
     },
+    // 获得历史数据
+    async getHistoryData(row, typeId = null) {
+      let data;
+      const params = {
+        typeId,
+        tradeType: 'JXS',
+        billType: 'CG',
+        itemId: row.id
+      }
+      await historyPrice(params).then(res => {
+        data = res.data.data? res.data.data: [];
+      })
+      return data;
+    },
+    openHistory(row) {
+      this.historyParams = {
+        tradeType: 'JXS',
+        billType: 'CG',
+        itemId: row.itemId
+      }
+      this.historyVisible = true;
+      this.$nextTick(() => {
+        this.$refs.history.init();
+      })
+    },
+    closeDialog() {
+      this.historyVisible = false;
+    },
   },
 }
 </script>

+ 16 - 3
src/views/dealer/purchase/index.vue

@@ -15,6 +15,7 @@
         @current-change="currentChange"
         @size-change="sizeChange"
         @refresh-change="refreshChange"
+        @search-reset="searchReset"
         @on-load="onLoad"
         @search-criteria-switch="searchCriteriaSwitch"
         @saveColumn="saveColumn"
@@ -56,6 +57,7 @@
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row, scope.index)"
+            :disabled="scope.row.status == 3"
           >删除
           </el-button>
         </template>
@@ -115,9 +117,9 @@ export default {
   methods: {
     searchCriteriaSwitch(type) {
       if (type) {
-        this.option.height = this.option.height - 190
+        this.option.height = this.option.height - 70
       } else {
-        this.option.height = this.option.height + 190
+        this.option.height = this.option.height + 70
       }
       this.$refs.crud.getTableHeight();
     },
@@ -161,6 +163,9 @@ export default {
     refreshChange() {
       this.onLoad(this.page, this.search);
     },
+    searchReset() {
+      this.onLoad(this.page, this.search);
+    },
     cellStyle() {
       return "padding:0;height:40px;";
     },
@@ -169,10 +174,18 @@ export default {
       this.dataList.forEach(item => {
         this.$refs.crud.toggleRowExpansion(item, false)
       })
-      const queryParams = Object.assign({}, params, {
+      let queryParams = Object.assign({}, params, {
         size: page.pageSize,
         current: page.currentPage,
       })
+      if (queryParams.businesDate && queryParams.businesDate.length > 0) {
+        queryParams = {
+          ...queryParams,
+          businesStartDate: queryParams.businesDate[0],
+          businesEndDate: queryParams.businesDate[1],
+        }
+      }
+      delete queryParams.businesDate;
       this.loading = true;
       getPurchaseList(queryParams).then(res => {
         this.dataList = res.data.data.records;

+ 15 - 1
src/views/dealer/sales/config/customerContact.json

@@ -127,9 +127,23 @@
       "overHidden": true
     },
     {
+      "label": "最新价格",
+      "prop": "newJob",
+      "index": 14,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "最新日期",
+      "prop": "newDate",
+      "index": 15,
+      "width": 100,
+      "overHidden": true
+    },
+    {
       "label": "备注",
       "prop": "remarks",
-      "index": 15,
+      "index": 16,
       "width": 100,
       "overHidden": true
     }

+ 159 - 13
src/views/dealer/sales/detail.vue

@@ -52,7 +52,7 @@
           @click="editCustomer"
           size="small"
           :loading="btnLoading"
-          :disabled="disabled || confirmDisabled"
+          :disabled="disabled"
         >保存数据
         </el-button>
       </div>
@@ -95,7 +95,7 @@
               filterable
               clearable
               size="small"
-              :disabled="disabled || confirmDisabled"
+              :disabled="disabled"
             >
               <el-option
                 v-for="(item,index) in userList"
@@ -302,6 +302,9 @@
             </el-select>
             <span v-else>{{ row.lotNo }}</span>
           </template>
+          <template slot="newJob" slot-scope="{ row, index }">
+            <span style="color: #1e9fff;cursor: pointer" @click="openHistory(row)">{{ row.newJob }}</span>
+          </template>
           <template slot="remarks" slot-scope="{ row, index }">
             <el-input
               v-if="row.$cellEdit"
@@ -419,7 +422,7 @@
     <report-dialog
       :switchDialog="switchDialog"
       :reportId="form.id"
-      reportName="代理商-报表"
+      reportName="经销商-销售单"
       @onClose="onClose()"
     />
 <!--    账单-->
@@ -442,6 +445,13 @@
         @choceFun="choceFun"
       />
     </el-dialog>
+    <!--    历史记录-->
+    <view-history
+      v-if="historyVisible"
+      ref="history"
+      :params="historyParams"
+      @closeDialog="closeDialog"
+    />
   </div>
 </template>
 
@@ -454,7 +464,7 @@ import {getUserInfo} from "@/api/system/user";
 import { gainUser } from "@/api/basicData/customerInquiry";
 import {selectGoodsNum} from "@/api/basicData/inventoryAccount"; // 库存查询
 import {detail as KHDetail} from "@/api/basicData/customerInformation";
-import {dataDetail, removeGoods, typeSave, getLotNo, dealerSubmit} from "@/api/dealer/sales";
+import {dataDetail, removeGoods, typeSave, getLotNo, dealerSubmit, historyPrice} from "@/api/dealer/sales";
 import reportDialog from "@/components/report-dialog/main";
 import {
   isDiscount,
@@ -469,6 +479,8 @@ import { customerList as feeList } from "@/api/basicData/basicFeesDesc";
 import {getDetail} from "@/api/basicData/inventoryAccount";
 import { getToken } from "@/util/auth";
 import { getCurrentDate } from "@/util/date";
+import viewHistory from '../componet/history';
+import { getMarketPrice, getPurchasePrice } from "@/api/basicData/fees"
 
 export default {
   name: "detail",
@@ -482,6 +494,7 @@ export default {
     billApplication,
     financialAccount,
     checkSchedule,
+    viewHistory,
   },
   data() {
     return {
@@ -714,6 +727,8 @@ export default {
       baseURL: '/api/blade-purchase-sales/orderitems/importDealerOrder',
       headers: { "Blade-Auth": 'Bearer ' + getToken()},
       uploadParam: {},
+      historyVisible: false,
+      historyParams: {},
     }
   },
   async created() {
@@ -791,9 +806,9 @@ export default {
         }
         this.confirmDisabled = this.form.status == 3? true: false;
         if (this.confirmDisabled) {
-          this.option.column.map(e => {
-            this.$set(e, 'disabled', true)
-          })
+          // this.option.column.map(e => {
+          //   this.$set(e, 'disabled', true)
+          // })
         }
         this.dataList = this.form.orderItemsList? this.form.orderItemsList: [];
         this.uploadData = this.form.orderFilesList? this.form.orderFilesList: [];
@@ -817,11 +832,17 @@ export default {
     },
     openEdit() {
       this.disabled = false;
-      if (this.form.status != 3) {
-        this.option.column.map(e => {
+      this.option.column.map(e => {
+        if (this.confirmDisabled) {
+          if (e.prop == 'businesDate') {
+            this.$set(e, 'disabled', true)
+          } else {
+            this.$set(e, 'disabled', false)
+          }
+        } else {
           this.$set(e, 'disabled', false)
-        })
-      }
+        }
+      })
     },
     copyDoc() {
       this.$emit("copyOrder", this.form.id);
@@ -949,6 +970,21 @@ export default {
           this.selectionList.forEach(e => {
             this.dataList.forEach(async (item, index) => {
               if (index == this.reData.index) {
+                getMarketPrice({code: e.code,isFreight: 0, isLabel: 0}).then(response => {
+                  if (response.data.data.length > 0) {
+                    this.$set(e, 'price', response.data.data[0].salePrice)
+                  } else {
+                    this.$set(e, 'price', '0')
+                  }
+                })
+                let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+                if (historyData.length > 0) {
+                  e.newJob = historyData[0].price;
+                  e.newDate = historyData[0].businesDate;
+                } else {
+                  e.newJob = null;
+                  e.newDate = null;
+                }
                 if (e.batch == 0) {
                   form = await this.getStockInfo({
                     tradeType: 'JXS',
@@ -980,6 +1016,9 @@ export default {
                 item.priceCategory = e.goodsTypeName;
                 item.purchaseAmount = e.purchaseAmount;
                 item.batch = e.batch;
+                item.newDate = e.newDate;
+                item.newJob = e.newJob;
+                item.price = e.price;
                 item.$cellEdit = true;
               }
             });
@@ -988,6 +1027,21 @@ export default {
       } else {
         if (this.goodsListSave.length > 0) { // 暂存的有数据
           this.goodsListSave.forEach(async e => {
+            getMarketPrice({code: e.code,isFreight: 0, isLabel: 0}).then(response => {
+              if (response.data.data.length > 0) {
+                this.$set(e, 'price', response.data.data[0].salePrice)
+              } else {
+                this.$set(e, 'price', '0')
+              }
+            })
+            let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+            if (historyData.length > 0) {
+              e.newJob = historyData[0].price;
+              e.newDate = historyData[0].businesDate;
+            } else {
+              e.newJob = null;
+              e.newDate = null;
+            }
             if (e.batch == 0) {
               form = await this.getStockInfo({
                 tradeType: 'JXS',
@@ -1018,18 +1072,35 @@ export default {
               corpName: e.corpName,
               unit: e.unit,
               size: e.size,
-              price: 0,
+              price: e.price,
               amount: 0,
               orderQuantity: 0,
               storageQuantity: e.storageQuantity,
               purchaseAmount: e.purchaseAmount,
               batch: e.batch,
               arr: e.arr,
+              newJob:e.newJob,
+              newDate: e.newDate,
               $cellEdit: true
             });
           });
         } else {
           this.selectionList.forEach(async e => {
+            getMarketPrice({code: e.code,isFreight: 0, isLabel: 0}).then(response => {
+              if (response.data.data.length > 0) {
+                this.$set(e, 'price', response.data.data[0].salePrice)
+              } else {
+                this.$set(e, 'price', '0')
+              }
+            })
+            let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+            if (historyData.length > 0) {
+              e.newJob = historyData[0].price;
+              e.newDate = historyData[0].businesDate;
+            } else {
+              e.newJob = null;
+              e.newDate = null;
+            }
             if (e.batch == 0) {
               form = await this.getStockInfo({
                 tradeType: 'JXS',
@@ -1060,13 +1131,15 @@ export default {
               corpName: e.corpName,
               unit: e.unit,
               size: e.size,
-              price: 0,
               amount: 0,
               orderQuantity: 0,
               storageQuantity: e.storageQuantity,
               purchaseAmount: e.purchaseAmount,
               batch: e.batch,
               arr: e.arr,
+              newJob: e.newJob,
+              newDate: e.newDate,
+              price: e.price,
               $cellEdit: true
             });
           });
@@ -1189,6 +1262,22 @@ export default {
       let form = {};
       this.goodsoptions.forEach(async e => {
         if (e.code == row.code) {
+          getMarketPrice({code: e.code,isFreight: 0, isLabel: 0}).then(response => {
+            if (response.data.data.length > 0) {
+              this.$set(e, 'price', response.data.data[0].salePrice)
+            } else {
+              this.$set(e, 'price', '0')
+            }
+            this.$set(row, 'amount', (Number(e.price) * Number(row.orderQuantity)).toFixed(2))
+          })
+          let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+          if (historyData.length > 0) {
+            e.newJob = historyData[0].price;
+            e.newDate = historyData[0].businesDate;
+          } else {
+            e.newJob = null;
+            e.newDate = null;
+          }
           if (e.batch == 0) {
             form = await this.getStockInfo({
               tradeType: 'JXS',
@@ -1223,6 +1312,9 @@ export default {
           row.priceCategory = e.goodsTypeName;
           row.purchaseAmount = e.purchaseAmount;
           row.batch = e.batch;
+          row.newJob = e.newJob;
+          row.newDate = e.newDate;
+          row.price = e.price;
         }
       });
     },
@@ -1230,6 +1322,22 @@ export default {
       let form = {};
       this.goodsoptions.forEach(async e => {
         if (e.id == row.itemId) {
+          getMarketPrice({code: e.code,isFreight: 0, isLabel: 0}).then(response => {
+            if (response.data.data.length > 0) {
+              this.$set(e, 'price', response.data.data[0].salePrice)
+            } else {
+              this.$set(e, 'price', '0')
+            }
+            this.$set(row, 'amount', (Number(e.price) * Number(row.orderQuantity)).toFixed(2))
+          })
+          let historyData = await this.getHistoryData(e, 1); // 获得最新数据
+          if (historyData.length > 0) {
+            e.newJob = historyData[0].price;
+            e.newDate = historyData[0].businesDate;
+          } else {
+            e.newJob = null;
+            e.newDate = null;
+          }
           if (e.batch == 0) {
             form = await this.getStockInfo({
               tradeType: 'JXS',
@@ -1263,6 +1371,9 @@ export default {
           row.priceCategory = e.goodsTypeName;
           row.purchaseAmount = e.purchaseAmount;
           row.batch = e.batch;
+          row.newDate = e.newDate;
+          row.newJob = e.newJob;
+          row.price = e.price;
         }
       });
     },
@@ -1330,6 +1441,7 @@ export default {
           cname: e.cname,
           price: e.price,
           quantity: e.orderQuantity,
+          unit: e.unit,
         }
         this.applyPaymentList.push(form);
       })
@@ -1428,6 +1540,40 @@ export default {
         }
       }
     },
+    // 获得历史数据
+    async getHistoryData(row, typeId = null) {
+      let data;
+      const params = {
+        typeId,
+        tradeType: 'JXS',
+        billType: 'XS',
+        itemId: row.id
+      }
+      await historyPrice(params).then(res => {
+        data = res.data.data? res.data.data: [];
+      })
+      return data;
+    },
+    openHistory(row) {
+      this.historyParams = {
+        tradeType: 'JXS',
+        billType: 'XS',
+        itemId: row.itemId
+      }
+      this.historyVisible = true;
+      this.$nextTick(() => {
+        this.$refs.history.init();
+      })
+    },
+    closeDialog() {
+      this.historyVisible = false;
+    },
+    // 销售金额获取
+    async getMarketPrice(row) {
+      await getMarketPrice({code: row.code}).then(res => {
+        this.salesPriceOtion = res.data.data
+      })
+    },
   },
 }
 </script>

+ 12 - 3
src/views/dealer/sales/index.vue

@@ -64,6 +64,7 @@
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row, scope.index)"
+            :disabled="scope.row.status == 3"
           >删除
           </el-button>
         </template>
@@ -135,9 +136,9 @@ export default {
   methods: {
     searchCriteriaSwitch(type) {
       if (type){
-        this.option.height =  this.option.height - 190
+        this.option.height =  this.option.height - 90
       }else {
-        this.option.height =  this.option.height + 190
+        this.option.height =  this.option.height + 90
       }
       this.$refs.crud.getTableHeight()
     },
@@ -189,11 +190,19 @@ export default {
       this.dataList.forEach(item => {
         this.$refs.crud.toggleRowExpansion(item, false)
       })
-      const queryParams = Object.assign({}, params, {
+      let queryParams = Object.assign({}, params, {
         size: page.pageSize,
         current: page.currentPage,
       })
       this.loading = true;
+      if (queryParams.businesDate && queryParams.businesDate.length > 0) {
+        queryParams = {
+          ...queryParams,
+          orderStartDate: queryParams.businesDate[0],
+          orderEndDate: queryParams.businesDate[1],
+        }
+      }
+      delete queryParams.businesDate;
       getSalesList(queryParams).then(res => {
         this.dataList = res.data.data.records;
         this.page.total = res.data.data.total;

+ 13 - 1
src/views/dealer/stock/config/mainList.json

@@ -20,6 +20,18 @@
   "searchIcon": true,
   "searchIndex": 2,
   "searchSpan": 8,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "balanceQuantity",
+      "type": "sum"
+    },
+    {
+      "name": "surplusRouteQuantity",
+      "type": "sum"
+    }
+  ],
   "column": [
     {
       "label": "品号",
@@ -87,7 +99,7 @@
     },
     {
       "label": "仓库名称",
-      "prop": "stockName",
+      "prop": "storageId",
       "search": true,
       "index": 1,
       "width": 100,

+ 16 - 0
src/views/dealer/stock/index.vue

@@ -16,6 +16,14 @@
           <span v-if="Number(scope.row.lockingQuantity) > 0" style="color: #409EFF;cursor: pointer" @click.stop="viewCell(scope.row,scope.index)">{{ scope.row.lockingQuantity }}</span>
           <span v-else>{{ scope.row.lockingQuantity }}</span>
         </template>
+        <template slot="storageId" slot-scope="{row, index}">
+          <span>{{ row.stockName }}</span>
+        </template>
+        <template slot="storageIdSearch">
+          <warehouse-select
+            v-model="search.storageId"
+            :configuration="configurationWarehouse"/>
+        </template>
         <template slot-scope="{row,index}" slot="menu">
           <el-button
             type="text"
@@ -122,6 +130,14 @@ export default {
         corpId: null,
         itemId: null
       },
+      // 仓库配置
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
     }
   },
   created() {

+ 148 - 143
src/views/maintenance/priceManagement/configuration/mainList.json

@@ -1,148 +1,153 @@
 {
-    "lazy": true,
-    "tip": false,
-    "stripe": true,
-    "searchMenuPosition": "right",
+  "lazy": true,
+  "tip": false,
+  "stripe": true,
+  "searchMenuPosition": "right",
   "searchIcon": true,
   "searchIndex": 2,
   "searchSpan": 8,
-    "searchShow": true,
-    "dialogWidth": "60%",
-    "addBtn": false,
-    "tree": true,
-    "border": true,
-    "index": true,
-    "selection": true,
-    "viewBtn": false,
-    "editBtn": false,
-    "delBtn": false,
-    "menuWidth": 130,
-    "dialogClickModal": false,
-    "searchLabelWidth": 120,
-    "column":[
-        {
-            "label": "品号",
-            "prop": "code",
-            "search": true,
-            "index": 1,
-            "width":120,
-          "overHidden": true
-        },
-        {
-            "label": "名称",
-            "prop": "bigCharacter",
-            "search": true,
-            "index": 1,
-            "width":100,
-          "overHidden": true
-        },
-        {
-            "label": "花纹",
-            "prop": "brandItem",
-            "search": true,
-            "index": 1,
-            "width":100,
-          "overHidden": true
-        },
-        {
-            "label": "产地",
-            "prop": "placeProduction",
-            "search": true,
-            "index": 1,
-            "width":100,
-          "overHidden": true
-        },
-        {
-            "label": "规格",
-            "prop": "typeno",
-            "search": true,
-            "index": 1,
-            "width":100,
-          "overHidden": true
-        },
-        {
-            "label": "品牌",
-            "prop": "brand",
-            "search": true,
-            "index": 1,
-            "width":100,
-          "overHidden": true
-        },
-        {
-            "label": "销售价格",
-            "prop": "salesPrice",
-            "search": false,
-            "index": 1,
-            "width":100,
-            "cell": false,
-          "overHidden": true
-        },
-        {
-            "label": "采购价格",
-            "prop": "purchasePrice",
-            "search": false,
-            "index": 1,
-            "width":100,
-            "cell": false,
-          "overHidden": true
-        },
-      {
-        "label": "运费价格",
-        "prop": "freightFees",
-        "search": false,
-        "index": 1,
-        "width":100,
-        "cell": false,
-        "overHidden": true
-      },
-      {
-        "label": "标签价格",
-        "prop": "labelFees",
-        "search": false,
-        "index": 1,
-        "width":100,
-        "cell": false,
-        "overHidden": true
-      },
-        {
-            "label": "供应商",
-            "prop": "corpName",
-            "search": false,
-            "index": 1,
-            "width":100,
-          "overHidden": true
-        },
-        {
-            "label": "创建日期",
-            "prop": "createTime",
-            "search": true,
-            "index": 1,
-            "width":100,
-            "overHidden": true
-        },
-        {
-            "label": "创建人",
-            "prop": "createUserName",
-            "search": false,
-            "index": 1,
-            "width":100,
-          "overHidden": true
-        },
-        {
-            "label": "更新日期",
-            "prop": "updateTime",
-            "search": false,
-            "index": 1,
-            "width":100,
-          "overHidden": true
-        },
-        {
-            "label": "更新人",
-            "prop": "updateUserName",
-            "search": false,
-            "index": 1,
-            "width":100,
-          "overHidden": true
-        }
-    ]
+  "searchShow": true,
+  "dialogWidth": "60%",
+  "addBtn": false,
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 130,
+  "dialogClickModal": false,
+  "searchLabelWidth": 120,
+  "column": [
+    {
+      "label": "编号",
+      "prop": "code",
+      "search": true,
+      "index": 1,
+      "width": 120,
+      "overHidden": true
+    },
+    {
+      "label": "名称",
+      "prop": "bigCharacter",
+      "search": true,
+      "index": 1,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "花纹",
+      "prop": "brandItem",
+      "search": true,
+      "index": 1,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "产地",
+      "prop": "placeProduction",
+      "search": true,
+      "index": 1,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "规格",
+      "prop": "typeno",
+      "search": true,
+      "index": 1,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "品牌",
+      "prop": "brand",
+      "search": true,
+      "index": 1,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "销售价格",
+      "prop": "salesPrice",
+      "search": false,
+      "index": 1,
+      "width": 100,
+      "cell": false,
+      "overHidden": true
+    },
+    {
+      "label": "采购价格",
+      "prop": "purchasePrice",
+      "search": false,
+      "index": 1,
+      "width": 100,
+      "cell": false,
+      "overHidden": true
+    },
+    {
+      "label": "运费价格",
+      "prop": "freightFees",
+      "search": false,
+      "index": 1,
+      "width": 100,
+      "cell": false,
+      "overHidden": true
+    },
+    {
+      "label": "标签价格",
+      "prop": "labelFees",
+      "search": false,
+      "index": 1,
+      "width": 100,
+      "cell": false,
+      "overHidden": true
+    },
+    {
+      "label": "供应商",
+      "prop": "corpName",
+      "search": false,
+      "index": 1,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "创建日期",
+      "prop": "createTime",
+      "search": true,
+      "index": 1,
+      "width": 100,
+      "overHidden": true,
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "type": "date",
+      "unlinkPanels": true,
+      "searchRange": true
+    },
+    {
+      "label": "创建人",
+      "prop": "createUserName",
+      "search": false,
+      "index": 1,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "更新日期",
+      "prop": "updateTime",
+      "search": false,
+      "index": 1,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "更新人",
+      "prop": "updateUserName",
+      "search": false,
+      "index": 1,
+      "width": 100,
+      "overHidden": true
+    }
+  ]
 }

+ 8 - 0
src/views/maintenance/priceManagement/index.vue

@@ -193,6 +193,14 @@ export default {
         size: page.pageSize,
         current: page.currentPage,
       })
+      if (queryParams.createTime && queryParams.createTime.length > 0) {
+        queryParams = {
+          ...queryParams,
+          createTimeStart: queryParams.createTime[0]+ " " + "00:00:00",
+          createTimeEnd: queryParams.createTime[1]+ " " + "23:59:59",
+        }
+      }
+      delete queryParams.createTime
       customerList(queryParams).then(res => {
         this.data = res.data.data.records
         this.page.total = res.data.data.total

+ 132 - 97
src/views/statisticAnalysis/payment/index.vue

@@ -13,6 +13,7 @@
         @current-change="currentChange"
         @size-change="sizeChange"
         @refresh-change="refreshChange"
+        @search-reset="searchReset"
         @on-load="onLoad"
         :table-loading="loading"
         :summary-method="summaryMethod"
@@ -21,55 +22,38 @@
         @search-criteria-switch="searchCriteriaSwitch"
       >
         <template slot="menuLeft">
-          <el-button type="info" size="small" @click="outExport"
-            >导出</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>
         </template>
-        <template slot="businesDateSearch">
-          <el-date-picker
-            v-model="search.businesDate"
-            type="daterange"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']"
-          >
-          </el-date-picker>
-        </template>
-        <template slot-scope="{ row }" slot="purchasePrice">
-          <span>{{ row.purchasePrice | decimalFormat }}</span>
-        </template>
-        <template slot-scope="{ row }" slot="amount">
-          <span>{{ row.amount | decimalFormat }}</span>
-        </template>
-        <template slot-scope="{ row }" slot="procurementCost">
-          <span>{{ row.procurementCost | decimalFormat }}</span>
-        </template>
-        <template slot-scope="{ row }" slot="partsCost">
-          <span>{{ row.partsCost | decimalFormat }}</span>
-        </template>
-        <template slot-scope="{ row }" slot="grossProfit">
-          <span>{{ row.grossProfit | decimalFormat }}</span>
-        </template>
-        <template slot-scope="{ row }" slot="fd">
-          <span>{{ row.fd | decimalFormat }}</span>
+<!--        <template slot="dcSearch">-->
+<!--          <el-select-->
+<!--            v-model="search.dc"-->
+<!--            filterable-->
+<!--          >-->
+<!--            <el-option-->
+<!--              label="收"-->
+<!--              value="d"-->
+<!--            />-->
+<!--            <el-option-->
+<!--              label="付"-->
+<!--              value="c"-->
+<!--            />-->
+<!--          </el-select>-->
+<!--        </template>-->
+        <template slot="corpId" slot-scope="{ row, index }">
+          <span>{{ row.corpName }}</span>
         </template>
-        <template slot-scope="{ row }" slot="fc">
-          <span>{{ row.fc | decimalFormat }}</span>
-        </template>
-        <template slot-scope="{ row }" slot="singleTicketMargin">
-          <span>{{ row.singleTicketMargin | decimalFormat }}</span>
-        </template>
-        <template slot-scope="scope" slot="orderNo">
-          <span
-            style="color: #409EFF;cursor: pointer"
-            @click.stop="editOpen(scope.row)"
-            >{{ scope.row.orderNo }}
-          </span>
+        <template slot="dc" slot-scope="{ row, index }">
+          <span>{{ row.dc == 'd'? '收': '付' }}</span>
         </template>
       </avue-crud>
     </basic-container>
@@ -81,12 +65,17 @@ import { getToken } from "@/util/auth";
 import { getList, getProfitItem } from "@/api/statisticAnalysis/salesProfit";
 import { micrometerFormat } from "@/util/validate";
 import _ from "lodash";
+import {getAccList, exportAcctList} from "@/api/statisticAnalysis/payment"
+import {getUserInfo} from "@/api/system/user";
+
 export default {
   name: "index",
   data() {
     return {
       form: {},
-      search: {},
+      search: {
+        dc: 'd',
+      },
       dataList: [],
       loading: false,
       detailData: {},
@@ -114,8 +103,7 @@ export default {
         column: [
           {
             label: "订单号",
-            prop: "billType",
-            type: "select",
+            prop: "accSysNo",
             width: 100,
             search: true
           },
@@ -126,7 +114,12 @@ export default {
             width: 100,
             hide: true,
             showColumn: false,
-            search: true
+            search: true,
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            type: "date",
+            unlinkPanels: true,
+            searchRange: true
           },
           {
             label: "客户名称",
@@ -139,76 +132,89 @@ export default {
             }
           },
           {
-            label: "收类别",
-            prop: "orderNo",
+            label: "收类别",
+            prop: "dc",
             overHidden: true,
             hide: true,
             showColumn: false,
             search: true,
-            width: 100
+            width: 100,
+            searchValue: 'c',
+            type: 'select',
+            dicData: [
+              {
+                label: '收',
+                value: 'd'
+              },
+              {
+                label: '付',
+                value: 'c'
+              }
+            ]
           },
           {
             label: "商品名称",
-            prop: "portOfLoad",
+            prop: "goodName",
             overHidden: true,
             width: 100
           },
           {
             label: "型号",
-            prop: "portOfDestination",
+            prop: "goodType",
             overHidden: true,
             width: 100
           },
           {
             label: "数量",
-            prop: "transport",
+            prop: "quantity",
             overHidden: true,
             width: 100
           },
           {
             label: "销售单价",
-            prop: "procurementCost",
+            prop: "price",
             overHidden: true,
             width: 100
           },
           {
             label: "金额",
-            prop: "partsCost",
+            prop: "amount",
             overHidden: true,
             width: 100
           },
           {
             label: "币别",
-            prop: "purchasePrice",
+            prop: "currency",
             overHidden: true,
             width: 100
           },
           {
             label: "汇率",
-            prop: "amount",
+            prop: "exchangeRate",
             overHidden: true,
             width: 100
           },
           {
             label: "结算金额",
-            prop: "grossProfit",
+            prop: "settlementAmount",
             overHidden: true,
             width: 100
           },
           {
             label: "发票号",
-            prop: "grossProfitRate",
+            prop: "invoice",
             overHidden: true,
             width: 100
           },
           {
             label: "备注",
-            prop: "fd",
+            prop: "remarks",
             overHidden: true,
             width: 100
           }
         ]
-      }
+      },
+      tradeType: '',
     };
   },
   filters: {
@@ -216,6 +222,24 @@ export default {
       return num ? Number(num).toFixed(2) : "0.00";
     }
   },
+  created() {
+    getUserInfo().then(res => {
+      const sysType = res.data.data.billType;
+      if (sysType == 6) {
+        this.tradeType = 'JXS'
+      } else if (sysType == 5) {
+        this.tradeType = 'SW'
+      } else if (sysType == 4) {
+        this.tradeType = 'CK'
+      } else if (sysType == 3) {
+        this.tradeType = 'JK'
+      } else if (sysType == 2) {
+        this.tradeType = 'GN'
+      } else if (sysType == 1) {
+        this.tradeType = 'XX'
+      }
+    })
+  },
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";
@@ -230,10 +254,6 @@ export default {
     },
     //点击搜索按钮触发
     searchChange(params, done) {
-      if (!params.billType) {
-        done();
-        return this.$message.error("请选择类别");
-      }
       if (params.businesDate) {
         params.contractStartDate = params.businesDate[0];
         params.contractEndDate = params.businesDate[1];
@@ -246,6 +266,12 @@ export default {
     refreshChange() {
       this.onLoad(this.page, this.search);
     },
+    searchReset() {
+      this.search = {
+        dc: 'c'
+      }
+      this.onLoad(this.page, this.search);
+    },
     currentChange(val) {
       this.page.currentPage = val;
     },
@@ -253,34 +279,33 @@ export default {
       this.page.currentPage = 1;
       this.page.pageSize = val;
     },
-    onLoad(page, params = {}) {
-      // this.loading = true;
-      // if (!this.search.billType) {
-      //   this.search.billType = "XS";
-      // }
-      // this.dataList.forEach(item => {
-      //   this.$refs.crud.toggleRowExpansion(item, false);
-      // });
-      // getList(
-      //   page.currentPage,
-      //   page.pageSize,
-      //   Object.assign(params, this.search)
-      // )
-      //   .then(res => {
-      //     if (res.data.data.records) {
-      //       res.data.data.records.forEach(e => {
-      //         e.itemLoading = true;
-      //       });
-      //     }
-      //     this.dataList = res.data.data.records ? res.data.data.records : [];
-      //     this.page.total = res.data.data.total;
-      //     if (this.page.total) {
-      //       this.option.height = window.innerHeight - 210;
-      //     }
-      //   })
-      //   .finally(() => {
-      //     this.loading = false;
-      //   });
+    onLoad(page, params) {
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false);
+      });
+      let queryParams = Object.assign({tradeType: 'JK'}, params, this.search, {
+        size: page.pageSize,
+        current: page.currentPage,
+      })
+      if (this.search.businesDate && this.search.businesDate.length > 0) {
+        queryParams = {
+          ...queryParams,
+          accDateStart: this.search.businesDate[0],
+          accDateEnd: this.search.businesDate[1]
+        };
+      }
+      delete queryParams.businesDate;
+      this.loading = true;
+      getAccList(queryParams).then(res => {
+        this.dataList = res.data.data.records ? res.data.data.records : [];
+        this.page.total = res.data.data.total;
+        this.option.height = window.innerHeight - 210;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+      }).finally(() => {
+        this.loading = false;
+      })
     },
     editOpen(row) {
       if (row.billType == "BJ") {
@@ -300,13 +325,23 @@ export default {
       }
     },
     outExport() {
-      if (!this.search.billType) {
-        return this.$message.error("请选择类别");
+      let accDateStart = '';
+      let accDateEnd = '';
+      if (this.search.businesDate && this.search.businesDate.length > 0) {
+        accDateStart = this.search.businesDate[0]
+        accDateEnd = this.search.businesDate[1]
       }
+      let a = {...this.search}
+      // let itemList = JSON.stringify(a)
+      // let result = itemList.replace(/""/g, "null");
+      // a = JSON.parse(result)
+      // if (!a.corpId) {
+      //   a.corpId = ''
+      // }
       window.open(
-        `/api/blade-purchase-sales/exportOrder/exportProfit?${
+        `/api/trade-finance/acc/exportAccMessage?${
           this.website.tokenHeader
-        }=${getToken()}&billType=${this.search.billType}`
+        }=${getToken()}&corpId=${a.corpId}&accDateStart=${accDateStart}&accDateEnd=${accDateEnd}&dc=${a.dc}&accSysNo=${a.accSysNo}&tradeType=JK`
       );
     },
     summaryMethod({ columns, data }) {