فهرست منبع

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

QuKatie 3 سال پیش
والد
کامیت
6a945df389
35فایلهای تغییر یافته به همراه2443 افزوده شده و 131 حذف شده
  1. 73 0
      src/api/dealer/purchaseContract.js
  2. 8 0
      src/api/landTransportation/index.js
  3. 27 0
      src/api/statisticAnalysis/collectLedger.js
  4. 27 0
      src/api/statisticAnalysis/paymentLedger.js
  5. 26 0
      src/api/statisticAnalysis/profitLedger.js
  6. 12 0
      src/enums/column-name.js
  7. 60 0
      src/router/views/index.js
  8. 8 2
      src/views/basicData/customerInformation/configuration/mainList.json
  9. 9 0
      src/views/basicData/customerInformation/detailsPageEdit.vue
  10. 5 1
      src/views/basicData/factoryInformation/factoryInformation/detailsPageEdit.vue
  11. 4 0
      src/views/basicData/fleetInformation/detailsPageEdit.vue
  12. 5 0
      src/views/basicData/productInformation/detailsPageEdit.vue
  13. 5 0
      src/views/businessManagement/deliveryNotice/configuration/customerContact.json
  14. 9 2
      src/views/businessManagement/salesOrder/configuration/customerContact.json
  15. 12 2
      src/views/dealer/purchase/index.vue
  16. 14 2
      src/views/dealer/purchaseContract/detail.vue
  17. 1 1
      src/views/dealer/purchaseContract/index.vue
  18. 1 1
      src/views/dealer/sales/index.vue
  19. 145 67
      src/views/landTransportation/dispatchingCars/detailPage.vue
  20. 12 5
      src/views/landTransportation/dispatchingCars/index.vue
  21. 2 1
      src/views/landTransportation/driver/index.vue
  22. 2 1
      src/views/landTransportation/motorcadeDriver/index.vue
  23. 78 19
      src/views/landTransportation/placeAnOrder/detailPage.vue
  24. 15 7
      src/views/landTransportation/placeAnOrder/index.vue
  25. 9 4
      src/views/landTransportation/reportAnalysis/index.vue
  26. 180 0
      src/views/statisticAnalysis/collectLedger/detail.vue
  27. 425 0
      src/views/statisticAnalysis/collectLedger/index.vue
  28. 180 0
      src/views/statisticAnalysis/paymentLedger/detail.vue
  29. 421 0
      src/views/statisticAnalysis/paymentLedger/index.vue
  30. 202 0
      src/views/statisticAnalysis/profitLedger/detail.vue
  31. 414 0
      src/views/statisticAnalysis/profitLedger/index.vue
  32. 10 0
      src/views/system/tenant.vue
  33. 6 1
      src/views/wel/home/landTransportation/components/sales-reached.vue
  34. 26 12
      src/views/wel/home/landTransportation/components/sales-trend.vue
  35. 10 3
      src/views/wel/home/landTransportation/landTransportation.vue

+ 73 - 0
src/api/dealer/purchaseContract.js

@@ -0,0 +1,73 @@
+import request from '@/router/axios';
+
+//采购资料列表查询
+export function getPurchaseList(params) {
+  return request({
+    url: '/api/trade-purchase/purchaseContract/list',
+    method: 'get',
+    params
+  })
+}
+//采购资料列表删除
+export function deleteDetails(data) {
+  return request({
+    url: '/api/trade-purchase/purchaseContract/remove',
+    method: 'post',
+    params: {
+      ids:data
+    }
+  })
+}
+//采购资料列表查看明细
+export function dataDetail(data) {
+  return request({
+    url: '/api/trade-purchase/purchaseContract/'+data,
+    method: 'get'
+  })
+}
+//采购资料列表修改和新增
+export function typeSave(data) {
+  return request({
+    url: '/api/trade-purchase/purchaseContract/submit',
+    method: 'post',
+    data
+  })
+}
+//商品从表列表删除
+export function removeGoods(data) {
+  return request({
+    url: '/api/trade-purchase/purchaseContract/removeByItem',
+    method: 'post',
+    data: {
+      id:data
+    }
+  })
+}
+//采购确认或取消订单
+export function dealerSubmit(params) {
+  return request({
+    url: '/api/trade-purchase/purchaseContract/dealerSubmit',
+    method: 'get',
+    params
+  })
+}
+// 获取历史日期和历史价格
+export function historyPrice(params) {
+  return request({
+    url: '/api/blade-purchase-sales/dealerOrder/historyPrice',
+    method: 'get',
+    params
+  })
+}
+// 商品明细分页查询
+export function itemDetail(current, size, params) {
+  return request({
+    url: '/api/trade-purchase/purchase-order/orderItems/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size
+    }
+  })
+}

+ 8 - 0
src/api/landTransportation/index.js

@@ -323,4 +323,12 @@ export function validChange(data) {
         params:data
     })
 }
+//删除途径地
+export function tRemove(data) {
+    return request({
+        url: '/api/blade-land/order-address/remove',
+        method: 'post',
+        params:data
+    })
+}
 

+ 27 - 0
src/api/statisticAnalysis/collectLedger.js

@@ -0,0 +1,27 @@
+import request from '@/router/axios';
+
+// 列表查询
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/trade-finance/receivable/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size
+    }
+  })
+}
+
+// 详情
+export function detail(id, dc, tradeType) {
+  return request({
+    url: '/api/trade-finance/receivable/detail',
+    method: 'get',
+    params: {
+      corpId: id,
+      dc,
+      tradeType
+    }
+  })
+}

+ 27 - 0
src/api/statisticAnalysis/paymentLedger.js

@@ -0,0 +1,27 @@
+import request from '@/router/axios';
+
+// 列表查询
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/trade-finance/receivable/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size
+    }
+  })
+}
+
+// 详情
+export function detail(id, dc, tradeType) {
+  return request({
+    url: '/api/trade-finance/receivable/detail',
+    method: 'get',
+    params: {
+      corpId: id,
+      dc,
+      tradeType
+    }
+  })
+}

+ 26 - 0
src/api/statisticAnalysis/profitLedger.js

@@ -0,0 +1,26 @@
+import request from '@/router/axios';
+
+// 列表查询
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/trade-finance/profit/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size
+    }
+  })
+}
+
+// 详情
+export function detail(id, tradeType) {
+  return request({
+    url: '/api/trade-finance/profit/detail',
+    method: 'get',
+    params: {
+      corpId: id,
+      tradeType
+    }
+  })
+}

+ 12 - 0
src/enums/column-name.js

@@ -525,6 +525,18 @@ const columnName = [{
     code: 136,
     name: '贸易所属公司明细'
   },
+  {
+    code: 137,
+    name: '统计分析应收总账'
+  },
+  {
+    code: 138,
+    name: '统计分析应付总账'
+  },
+  {
+    code: 139,
+    name: '统计分析利润总账'
+  },
 ]
 export const getColumnName = (key) => {
   for (let index = 0; index < columnName.length; index++) {

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

@@ -1379,4 +1379,64 @@ export default [{
       component: () => import( /* webpackChunkName: "views" */ '@/views/statisticAnalysis/salesReconciliation/index')
     }]
   },
+  //应收总账
+  {
+    path: '/statisticAnalysis/collectLedger/index',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: '/statisticAnalysis/collectLedger/index',
+      name: '应收总账',
+      meta: {
+        i18n: '/statisticAnalysis/collectLedger/index',
+        keepAlive: true,
+      },
+      component: () => import( /* webpackChunkName: "views" */ '@/views/statisticAnalysis/collectLedger/index')
+    }]
+  },
+  //应付总账
+  {
+    path: '/statisticAnalysis/paymentLedger/index',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: '/statisticAnalysis/paymentLedger/index',
+      name: '应付总账',
+      meta: {
+        i18n: '/statisticAnalysis/paymentLedger/index',
+        keepAlive: true,
+      },
+      component: () => import( /* webpackChunkName: "views" */ '@/views/statisticAnalysis/paymentLedger/index')
+    }]
+  },
+  //利润总账
+  {
+    path: '/statisticAnalysis/profitLedger/index',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: '/statisticAnalysis/profitLedger/index',
+      name: '利润总账',
+      meta: {
+        i18n: '/statisticAnalysis/profitLedger/index',
+        keepAlive: true,
+      },
+      component: () => import( /* webpackChunkName: "views" */ '@/views/statisticAnalysis/profitLedger/index')
+    }]
+  },
+  //采购合同(D)
+  {
+    path: '/dealer/purchaseContract/index',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: '/dealer/purchaseContract/index',
+      name: '采购合同(D)',
+      meta: {
+        i18n: '/dealer/purchaseContract/index',
+        keepAlive: true,
+      },
+      component: () => import( /* webpackChunkName: "views" */ '@/views/dealer/purchaseContract/index')
+    }]
+  },
 ]

+ 8 - 2
src/views/basicData/customerInformation/configuration/mainList.json

@@ -96,12 +96,18 @@
       "index": 8,
       "width": 130,
     "overHidden": true
+  },{
+    "label": "类别",
+    "prop": "corpsTypeName",
+    "index": 9,
+    "width": 130,
+    "overHidden": true
   }, {
       "label": "客户等级 ",
       "prop": "creditLevel",
       "search": true,
       "hide": true,
-      "index": 9,
+      "index": 10,
       "width": 100,
     "overHidden": true,
       "rules": [{
@@ -114,7 +120,7 @@
       "label": "分管员",
       "prop": "adminProfiles",
       "search": true,
-      "index": 10,
+      "index": 11,
       "width": 130,
       "type": "select",
       "dicData": [],

+ 9 - 0
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -749,6 +749,10 @@ export default {
             ]
           },
           {
+            label: "简称",
+            prop: "shortName"
+          },
+          {
             label: "类别",
             prop: "corpsTypeId",
             rules: [
@@ -810,6 +814,11 @@ export default {
             prop: "creditRating",
             span: 8,
           },
+          {
+            label: "代理商编码",
+            prop: "agentCode",
+            span: 8,
+          },
           // {
           //   label: "总返利",
           //   prop: "profitReturn",

+ 5 - 1
src/views/basicData/factoryInformation/factoryInformation/detailsPageEdit.vue

@@ -616,6 +616,10 @@ export default {
             ]
           },
           {
+            label: "简称",
+            prop: "shortName"
+          },
+          {
             label: "类别",
             prop: "corpsTypeId",
             rules: [
@@ -667,7 +671,7 @@ export default {
           {
             label: "代理区域",
             prop: "belongtoarea",
-            span: 16,
+            span: 8,
             mock: {
               type: "county"
             }

+ 4 - 0
src/views/basicData/fleetInformation/detailsPageEdit.vue

@@ -641,6 +641,10 @@ export default {
             ]
           },
           {
+            label: "简称",
+            prop: "shortName"
+          },
+          {
             label: "类别",
             prop: "corpsTypeId",
             rules: [

+ 5 - 0
src/views/basicData/productInformation/detailsPageEdit.vue

@@ -381,6 +381,11 @@ export default {
             span: 8
           },
           {
+            label: "平台商品编码",
+            prop: "terraceCode",
+            span: 8
+          },
+          {
             label: "备注",
             prop: "remarks",
             type: "textarea",

+ 5 - 0
src/views/businessManagement/deliveryNotice/configuration/customerContact.json

@@ -51,6 +51,11 @@
       "name": "actualQuantity",
       "type": "sum",
       "decimals": 0
+    },
+    {
+      "name": "arrivalQuantity",
+      "type": "sum",
+      "decimals": 0
     }
   ],
   "column":[

+ 9 - 2
src/views/businessManagement/salesOrder/configuration/customerContact.json

@@ -293,7 +293,7 @@
     {
       "label": "重量",
       "prop": "cartonWeight",
-      "index": 15,
+      "index": 16,
       "width":100,
       "cell": false,
       "overHidden": true,
@@ -308,7 +308,7 @@
     {
       "label": "体积",
       "prop": "cntrVolumn",
-      "index": 15,
+      "index": 17,
       "width":100,
       "cell": false,
       "overHidden": true,
@@ -319,6 +319,13 @@
           "trigger": "blur"
         }
       ]
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "index": 18,
+      "width": 100,
+      "overHidden": true
     }
   ]
 }

+ 12 - 2
src/views/dealer/purchase/index.vue

@@ -208,6 +208,16 @@ export default {
       this.option.searchMenuPosition = "right";
     }
   },
+  activated() {
+    if (this.$route.query.params) {
+      this.show = true;
+      this.detailData = {
+        id: this.$route.query.params,
+        query: true,
+      };
+      this.show = false;
+    }
+  },
   filters: {
     decimalFormat(num) {
       return num ? Number(num).toFixed(2) : "0.00";
@@ -327,10 +337,10 @@ export default {
       }
     },
     goBack() {
-      if (this.$route.query.id) {
+      if (this.$route.query.params) {
         this.$router.$avueRouter.closeTag(this.$route.fullPath);
         this.$router.push({
-          path: "/dealer/sales/index"
+          path: "/dealer/purchase/index"
         });
       }
       this.detailData = this.$options.data().detailData;

+ 14 - 2
src/views/dealer/purchaseContract/detail.vue

@@ -488,7 +488,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, historyPrice, itemDetail} from "@/api/dealer/purchase";
+import {dataDetail, removeGoods, typeSave, dealerSubmit, historyPrice, itemDetail} from "@/api/dealer/purchaseContract";
 import {
   isDiscount,
   isPercentage,
@@ -587,6 +587,18 @@ export default {
             ],
           },
           {
+            label: "平台代码",
+            prop: "purchaseRemark",
+            span: 8,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+          },
+          {
             label: "电话",
             prop: "corpTel",
             span: 8
@@ -882,7 +894,7 @@ export default {
           })
           this.$set(this.form, 'debitAmount', amount.toFixed(2));
           this.$set(this.form, 'amount', amount.toFixed(2));
-          this.form.billType = 'CG';
+          this.form.billType = 'CGHT';
           this.$set(this.form, 'itemsVOList', this.dataList);
           this.$set(this.form, 'orderFilesList', this.uploadData);
           this.btnLoading = true;

+ 1 - 1
src/views/dealer/purchaseContract/index.vue

@@ -94,7 +94,7 @@
 import option from './config/mainList.json';
 import detailPage from "./detail";
 import { gainUser } from "@/api/basicData/customerInquiry";
-import {getPurchaseList, deleteDetails, dataDetail} from "@/api/dealer/purchase";
+import {getPurchaseList, deleteDetails, dataDetail} from "@/api/dealer/purchaseContract";
 
 export default {
   name: "index",

+ 1 - 1
src/views/dealer/sales/index.vue

@@ -377,7 +377,7 @@ export default {
       }
     },
     goBack() {
-      if (this.$route.query.id) {
+      if (this.$route.query.id || this.$route.query.params) {
         this.$router.$avueRouter.closeTag(this.$route.fullPath);
         this.$router.push({
           path: "/dealer/sales/index"

+ 145 - 67
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -1,15 +1,31 @@
 <template>
   <div>
     <div class="customer-head">
-      <div class="customer-back">
+      <div class="customer-back" v-if="!home">
         <el-button
             type="danger"
             style="border: none;background: none;color: red"
             icon="el-icon-arrow-left"
-            @click="backToList"
+            @click="backToList(0)"
         >返回列表
         </el-button>
       </div>
+      <div class="customer-back" v-else>
+        <el-button
+            type="danger"
+            style="border: none;background: none;color: red"
+            icon="el-icon-arrow-left"
+            @click="backToList(1)"
+        >返回列表
+        </el-button>
+        <el-button
+            type="danger"
+            style="border: none;background: none;color: red"
+            icon="el-icon-arrow-left"
+            @click="backToList(2)"
+        >返回台账
+        </el-button>
+      </div>
     </div>
     <containerTitle title="委托信息" style="margin-top: 50px"></containerTitle>
     <basic-container>
@@ -542,25 +558,29 @@ import {
   fleetDriverSave,
   recordingDetails,
   changeFleet,
-  incidentalSubmit, saveFile, getFee
+  incidentalSubmit, saveFile, getFee, fleetList
 } from "@/api/landTransportation";
 import website from "@/config/website";
 import {getDeptTree} from "@/api/system/dept";
+import {customerList} from "@/api/basicData/basicFeesDesc";
 
 export default {
   props: {
     id: {
       type: String
+    },
+    home: {
+      type: Boolean
     }
   },
   data() {
     return {
       formData: {},
-      enclosure:false,
+      enclosure: false,
       formAnnex: {},
-      key:0,
+      key: 0,
       formDataList: {},
-      orderList:[],
+      orderList: [],
       dialogChange: false,
       optionData: {
         span: 12,
@@ -781,7 +801,7 @@ export default {
           label: '货运日期',
           type: "datetime",
           cell: true,
-          format: 'yyyy-MM-dd HH:mm:ss',
+          format: 'yyyy-MM-dd HH:mm',
           valueFormat: 'yyyy-MM-dd HH:mm:ss',
           width: 200,
           index: 1,
@@ -1068,7 +1088,7 @@ export default {
           label: '委托日期',
           prop: 'bsDate',
           type: "datetime",
-          format: 'yyyy-MM-dd HH:mm:ss',
+          format: 'yyyy-MM-dd HH:mm',
           valueFormat: 'yyyy-MM-dd HH:mm:ss',
         }, {
           label: '票据号',
@@ -1240,7 +1260,7 @@ export default {
         ]
       },
       collectionList: [],
-      collectionOption:{},
+      collectionOption: {},
       collectionOptionBackup: {
         align: 'center',
         menuAlign: 'center',
@@ -1270,10 +1290,21 @@ export default {
         column: [{
           label: '客户名称',
           slot: true,
+          width: 300,
           prop: 'corpId'
         }, {
+          label: '车号',
+          cell: true,
+          prop: 'plateNo',
+          type: "select",
+          props: {
+            label: "label",
+            value: "label"
+          },
+        }, {
           label: '费用名称',
           slot: true,
+          width: 200,
           prop: 'feeId'
         }, {
           label: '计价单位',
@@ -1286,16 +1317,22 @@ export default {
             value: "dictKey"
           }
         }, {
-          label: '数量',
-          cell: true,
-          prop: 'quantity'
-        }, {
           label: '单价',
           cell: true,
+          type: 'number',
+          controls:false,
           prop: 'price'
         }, {
+          label: '数量',
+          cell: true,
+          controls:false,
+          type: 'number',
+          prop: 'quantity'
+        }, {
           label: '金额',
           cell: true,
+          type: 'number',
+          controls:false,
           prop: 'amount'
         }, {
           label: '税率',
@@ -1311,21 +1348,12 @@ export default {
             label: "dictValue",
             value: "dictKey"
           },
-        }, {
-          label: '车号',
-          cell: true,
-          prop: 'plateNo',
-          type: "select",
-          props: {
-            label: "label",
-            value: "label"
-          },
         }
         ]
       },
       paymentList: [],
-      paymentOption:{},
-      paymentOptionBackup:{
+      paymentOption: {},
+      paymentOptionBackup: {
         align: 'center',
         menuAlign: 'center',
         index: true,
@@ -1354,10 +1382,21 @@ export default {
         column: [{
           label: '客户名称',
           slot: true,
+          width: 300,
           prop: 'corpId'
         }, {
+          label: '车号',
+          cell: true,
+          prop: 'plateNo',
+          type: "select",
+          props: {
+            label: "label",
+            value: "label"
+          },
+        }, {
           label: '费用名称',
           slot: true,
+          width: 200,
           prop: 'feeId'
         }, {
           label: '计价单位',
@@ -1370,23 +1409,29 @@ export default {
             value: "dictKey"
           }
         }, {
-          label: '数量',
+          label: '单价',
           cell: true,
-          prop: 'quantity'
+          controls:false,
+          type: 'number',
+          prop: 'price',
         }, {
-          label: '单价',
+          label: '数量',
           cell: true,
-          prop: 'price'
+          controls:false,
+          type: 'number',
+          prop: 'quantity'
         }, {
           label: '金额',
           cell: true,
+          controls:false,
+          type: 'number',
           prop: 'amount'
         }, {
-          label: '税率(默认6)',
+          label: '税率',
           cell: true,
           prop: 'taxRate'
         }, {
-          label: '币别(默认RMB)',
+          label: '币别',
           cell: true,
           prop: 'currency',
           type: "select",
@@ -1395,16 +1440,7 @@ export default {
             label: "dictValue",
             value: "dictKey"
           },
-        }, {
-          label: '车号',
-          cell: true,
-          prop: 'plateNo',
-          type: "select",
-          props: {
-            label: "label",
-            value: "label"
-          },
-        }
+        },
         ]
       }
     };
@@ -1413,6 +1449,28 @@ export default {
     this.entrustOptionTwoT = await this.getColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
     this.collectionOption = await this.getColumnData(this.getColumnName(86.4), this.collectionOptionBackup);
     this.paymentOption = await this.getColumnData(this.getColumnName(86.5), this.paymentOptionBackup);
+    // price
+    // quantity
+    this.findObject(this.collectionOption.column, "price").change = (data) => {
+      if (data.row.price && data.row.quantity){
+        data.row.amount = Number(data.row.price) * Number(data.row.quantity)
+      }
+    }
+    this.findObject(this.collectionOption.column, "quantity").change = (data) => {
+      if (data.row.price && data.row.quantity){
+        data.row.amount = Number(data.row.price) * Number(data.row.quantity)
+      }
+    }
+    this.findObject(this.paymentOption.column, "price").change = (data) => {
+      if (data.row.price && data.row.quantity){
+        data.row.amount = Number(data.row.price) * Number(data.row.quantity)
+      }
+    }
+    this.findObject(this.paymentOption.column, "quantity").change = (data) => {
+      if (data.row.price && data.row.quantity){
+        data.row.amount = Number(data.row.price) * Number(data.row.quantity)
+      }
+    }
     this.KeyBoxTwo++
     if (this.id) {
       detailDelegationList({id: this.id, kind: '2'}).then(res => {
@@ -1488,7 +1546,7 @@ export default {
        * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
        * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
        */
-      const inSave = await this.saveColumnData(this.getColumnName(85.4), this.collectionOption);
+      const inSave = await this.saveColumnData(this.getColumnName(86.4), this.collectionOption);
       if (inSave) {
         this.$message.success("保存成功");
         //关闭窗口
@@ -1498,7 +1556,7 @@ export default {
     //自定义列重置
     async resetColumnCollection() {
       this.collectionOption = this.collectionOptionBackup;
-      const inSave = await this.delColumnData(this.getColumnName(85.4), this.collectionOptionBackup);
+      const inSave = await this.delColumnData(this.getColumnName(86.4), this.collectionOptionBackup);
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs.collection.$refs.dialogColumn.columnBox = false;
@@ -1528,19 +1586,19 @@ export default {
       }
     },
     //打开附件
-    annexOpen(row, index){
+    annexOpen(row, index) {
       this.enclosure = true
       this.formAnnex = row
-      getFee({id:row.id}).then(res=>{
+      getFee({id: row.id}).then(res => {
         this.orderList = res.data.data
       })
     },
     //保存
-    saveAnnex(){
+    saveAnnex() {
       saveFile({
-        id:this.formAnnex.id,
-        fileList:this.orderList
-      }).then(res=>{
+        id: this.formAnnex.id,
+        fileList: this.orderList
+      }).then(res => {
         this.$message.success("保存成功");
         this.annexOpen(this.formAnnex)
       })
@@ -1711,8 +1769,16 @@ export default {
       this.tableData.splice(this.tableData.length - 1, 0, {leas: 1111})
     },
     //返回主列表
-    backToList() {
-      this.$emit('backToList')
+    backToList(value) {
+      if (value === 0){
+        this.$emit('backToList')
+      }else if(value === 1){
+        this.$emit('backToList',true)
+      }else if (value === 2){
+        this.$router.push({
+          path: '/landTransportation/reportAnalysis/index'
+        });
+      }
     },
     //删除途径地址
     deleteAddress(scope) {
@@ -1725,22 +1791,22 @@ export default {
     },
     rowCell(row, index) {
       if (row.$cellEdit) {
-        if (row.plateNo){
-          incidentalSubmit(row).then(res=>{
+        if (row.plateNo) {
+          incidentalSubmit(row).then(res => {
             this.$refs.collection.rowCell(row, index)
             row = res.data.data
             this.$message.success("保存成功");
           })
-        }else {
+        } else {
           this.$message.error("请选择车号");
         }
-      }else {
+      } else {
         this.$refs.collection.rowCell(row, index)
       }
     },
     paymentRowCell(row, index) {
       if (row.$cellEdit) {
-        incidentalSubmit(row).then(res=>{
+        incidentalSubmit(row).then(res => {
           row = res.data.data
           this.$message.success("保存成功");
         })
@@ -1780,21 +1846,33 @@ export default {
     },
     //收费新增
     addRowCollection() {
-      this.$refs.collection.rowCellAdd({
-        currency: '1',
-        type: '1',
-        orderId:this.id,
-        $cellEdit: true
-      });
+      customerList({size: 10, current: 1}).then(res => {
+        this.$refs.collection.rowCellAdd({
+          currency: '1',
+          type: '1',
+          feeId: res.data.data.records.length > 0 ? res.data.data.records[0] : '',
+          unit: '件数',
+          corpId: '1526835847238901762',
+          quantity:1,
+          orderId: this.id,
+          $cellEdit: true
+        });
+      })
     },
     //付费新增
     addRowPayment() {
-      this.$refs.payment.rowCellAdd({
-        currency: '1',
-        type: '2',
-        orderId:this.id,
-        $cellEdit: true
-      });
+      customerList({size: 10, current: 1}).then(res => {
+        this.$refs.payment.rowCellAdd({
+          currency: '1',
+          type: '2',
+          feeId: res.data.data.records.length > 0 ? res.data.data.records[0] : '',
+          unit: '件数',
+          quantity:1,
+          corpId: '1526835847238901762',
+          orderId: this.id,
+          $cellEdit: true
+        });
+      })
     },
     //选择费用
     selectValue(value, row) {

+ 12 - 5
src/views/landTransportation/dispatchingCars/index.vue

@@ -100,7 +100,7 @@
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page v-if="!show" @backToList="backToList" :id="id"></detail-page>
+    <detail-page v-if="!show" @backToList="backToList" :id="id" :home="home"></detail-page>
   </div>
 </template>
 
@@ -150,7 +150,7 @@ export default {
             type: "date",
             searchRange: true,
             defaultTime:['00:00:00', '23:59:59'],
-            format: "yyyy-MM-dd HH:mm:ss",
+            format: "yyyy-MM-dd HH:mm",
             valueFormat: "yyyy-MM-dd HH:mm:ss",
             index: 1,
             width: 150,
@@ -226,7 +226,7 @@ export default {
             width: 140
           }, {
             label: '公司名称',
-            prop: 'corpName',
+            prop: 'corpShortName',
             overHidden: true,
             index: 12,
             width: 140,
@@ -268,13 +268,15 @@ export default {
             width: 140,
             search: true,
           }]
-      }
+      },
+      home:false
     }
   },
   activated() {
     if (this.$route.query.orderId){
       this.rowCell({id:this.$route.query.orderId},0)
       this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+      this.home = true
     }
     // if (this.$route.query.params){
     //   this.rowCell({id:this.$route.query.params},0)
@@ -391,7 +393,12 @@ export default {
     rowSave() {
       this.show = false
     },
-    backToList() {
+    backToList(type) {
+      if (type){
+        this.$router.push({
+          path: '/landTransportation/dispatchingCars/index'
+        });
+      }
       this.show = true
       this.onLoad(this.page)
     },

+ 2 - 1
src/views/landTransportation/driver/index.vue

@@ -202,6 +202,7 @@ export default {
         addBtn: false,
         delBtn: false,
         cellBtn: false,
+        menuWidth:150,
         cancelBtn: false,
         editBtn: false,
         addRowBtn: false,
@@ -254,7 +255,7 @@ export default {
           type: "date",
           searchRange: true,
           defaultTime: ['00:00:00', '23:59:59'],
-          format: "yyyy-MM-dd HH:mm:ss",
+          format: "yyyy-MM-dd HH:mm",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
           index: 1,
           width: 140,

+ 2 - 1
src/views/landTransportation/motorcadeDriver/index.vue

@@ -307,6 +307,7 @@ export default {
         index: true,
         addBtn: false,
         delBtn: false,
+        menuWidth:150,
         cellBtn: false,
         cancelBtn: false,
         editBtn: false,
@@ -361,7 +362,7 @@ export default {
           type: "date",
           searchRange: true,
           defaultTime: ['00:00:00', '23:59:59'],
-          format: "yyyy-MM-dd HH:mm:ss",
+          format: "yyyy-MM-dd HH:mm",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
           index: 1,
           width: 145,

+ 78 - 19
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -1,15 +1,31 @@
 <template>
   <div>
     <div class="customer-head">
-      <div class="customer-back">
+      <div class="customer-back" v-if="!home">
         <el-button
             type="danger"
             style="border: none;background: none;color: red"
             icon="el-icon-arrow-left"
-            @click="backToList"
+            @click="backToList(0)"
         >返回列表
         </el-button>
       </div>
+      <div class="customer-back" v-else>
+        <el-button
+            type="danger"
+            style="border: none;background: none;color: red"
+            icon="el-icon-arrow-left"
+            @click="backToList(1)"
+        >返回列表
+        </el-button>
+        <el-button
+            type="danger"
+            style="border: none;background: none;color: red"
+            icon="el-icon-arrow-left"
+            @click="backToList(2)"
+        >返回首页
+        </el-button>
+      </div>
       <div>
         <el-button
             class="el-button--small-yh add-customer-btn"
@@ -41,7 +57,7 @@
         <div class="el-button&#45;&#45;small-yh add-customer-btn">
           <el-button
               type="primary"
-              :disabled="goodsForm.status > 1"
+              :disabled="goodsForm.status >= 1"
               size="small"
               :loading="type"
               v-if="!typeTwo"
@@ -509,7 +525,7 @@ import {
   detailDelegationList,
   removeCollection,
   saveSaveList,
-  addressList, cancelSubmission, getCorp, getSalesman, getFee, changeSubmission, validChange
+  addressList, cancelSubmission, getCorp, getSalesman, getFee, changeSubmission, validChange, tRemove
 } from "@/api/landTransportation";
 import {getDeptTree} from "@/api/system/dept";
 import website from "@/config/website";
@@ -518,6 +534,9 @@ export default {
   props: {
     id: {
       type: String
+    },
+    home: {
+      type: Boolean
     }
   },
   data() {
@@ -977,7 +996,7 @@ export default {
           label: '委托日期',
           prop: 'bsDate',
           type: "datetime",
-          format: 'yyyy-MM-dd HH:mm:ss',
+          format: 'yyyy-MM-dd HH:mm',
           valueFormat: 'yyyy-MM-dd HH:mm:ss',
         }, {
           label: '票据号',
@@ -1130,7 +1149,7 @@ export default {
         column: [{
           label: '货运日期',
           type: "datetime",
-          format: 'yyyy-MM-dd HH:mm:ss',
+          format: 'yyyy-MM-dd HH:mm',
           valueFormat: 'yyyy-MM-dd HH:mm:ss',
           cell: true,
           width: 200,
@@ -1258,13 +1277,22 @@ export default {
         column: [{
           label: '公司名称',
           slot: true,
-          width: 200,
+          width: 300,
           overHidden: true,
           prop: 'corpId'
         }, {
+          label: '车号',
+          cell: true,
+          prop: 'plateNo',
+          type: "select",
+          props: {
+            label: "label",
+            value: "label"
+          },
+        }, {
           label: '费用名称',
           slot: true,
-          width: 160,
+          width: 200,
           prop: 'feeId'
         }, {
           label: '计价单位',
@@ -1277,14 +1305,14 @@ export default {
             value: "dictKey"
           }
         }, {
-          label: '数量',
-          cell: true,
-          prop: 'quantity'
-        }, {
           label: '单价',
           cell: true,
           prop: 'price'
         }, {
+          label: '数量',
+          cell: true,
+          prop: 'quantity'
+        }, {
           label: '金额',
           cell: true,
           prop: 'amount'
@@ -1667,13 +1695,28 @@ export default {
       this.tableData.splice(this.tableData.length - 1, 0, {})
     },
     //返回主列表
-    backToList() {
-      this.goodsForm = {}
-      this.$emit('backToList')
+    backToList(value) {
+      if (value === 0){
+        this.goodsForm = {}
+        this.$emit('backToList')
+      }else if(value === 1){
+        this.goodsForm = {}
+        this.$emit('backToList',true)
+      }else if (value === 1){
+        this.$router.push({
+          path: '/wel/index'
+        });
+      }
     },
     //删除途径地址
     deleteAddress(scope) {
-      this.tableData.splice(scope.$index, 1);
+      if (scope.row.id){
+        tRemove({ids:scope.row.id}).then(res=>{
+          this.tableData.splice(scope.$index, 1);
+        })
+      }else {
+        this.tableData.splice(scope.$index, 1);
+      }
     },
     //箱信息保存
     rowSave(row, index, done, loading) {
@@ -1733,7 +1776,6 @@ export default {
     //确认变更
     confirmChange() {
       validChange().then(res => {
-        console.log(res)
         this.goodsForm.status = 0
         this.goodsOptionFormC.disabled = false
         this.goodsOptionForm.disabled = false
@@ -1749,19 +1791,36 @@ export default {
           this.$refs['goodsForm'].validate((valid, done) => {
             done();
             if (valid) {
+              for (let item in this.tableData) {
+                if (item < Number(this.tableData.length) - 1) {
+                  if (!this.tableData[item].corpId) return this.$message.error('请选择第' + Number(Number(item) + 1) + '行货运地点');
+                  // if (!this.tableData[item].address) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行详细地址');
+                  // if (!this.tableData[item].contacts) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行联系人');
+                  // if (!this.tableData[item].tel) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行电话');
+                }
+              }
+              for (let item in this.entrustList) {
+                if (!this.entrustList[item].ctnType) return this.$message.error('请选择第' + Number(Number(item) + 1) + '行箱型');
+                if (!this.entrustList[item].ctnQuantity) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行箱量');
+                if (!this.entrustList[item].arrivalTime) return this.$message.error('请输入第' + Number(Number(item) + 1) + '行货运日期');
+                // if (!this.entrustList[item].landAmountD) return this.$message.error('请输入第' + Number(Number(item) + 1) + '运费');
+              }
+              if (this.entrustList.length === 0) return this.$message.error('箱信息不能为空')
               let data = JSON.parse(JSON.stringify(this.tableData))
               data.forEach((item, index) => {
                 item.sort = index + 1
               })
               this.type = true
+              let form = this.goodsForm
               delete this.goodsForm.status
+              delete form.orderItemList
               changeSubmission({
-                ...this.goodsForm,
+                ...form,
                 kind: '1',
                 orderAddressList: data,
                 fileList: this.orderFilesList,
                 itemList: this.entrustList,
-                orderItemList: this.vehicleList,
+                orderItemList:[],
                 orderFeeList: this.collectionList.concat(this.paymentList)
               }).then(res => {
                 this.$message.success('保存成功');

+ 15 - 7
src/views/landTransportation/placeAnOrder/index.vue

@@ -161,7 +161,7 @@
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page v-if="!show" @backToList="backToList" :id="id"></detail-page>
+    <detail-page v-if="!show" @backToList="backToList" :id="id" :home="home"></detail-page>
   </div>
 </template>
 
@@ -197,7 +197,7 @@ export default {
         align: 'center',
         stripe:true,
         index: true,
-        menuWidth:100,
+        menuWidth:80,
         addBtn: false,
         editBtn: false,
         delBtn: false,
@@ -215,7 +215,7 @@ export default {
             type: "date",
             searchRange: true,
             defaultTime:['00:00:00', '23:59:59'],
-            format: "yyyy-MM-dd HH:mm:ss",
+            format: "yyyy-MM-dd HH:mm",
             valueFormat: "yyyy-MM-dd HH:mm:ss",
             index: 1,
             width: 150,
@@ -291,7 +291,7 @@ export default {
             width: 140
           }, {
             label: '公司名称',
-            prop: 'corpName',
+            prop: 'shortName',
             overHidden: true,
             index: 12,
             width: 140,
@@ -333,14 +333,16 @@ export default {
             width: 140,
             search: true,
           }]
-      }
+      },
+      home:false,
     }
   },
   activated() {
     if (this.$route.query.id){
       this.rowCell({id:this.$route.query.id},0)
       this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
-      this.$router.push({ query: {} });
+      this.home = true
+      // this.$router.push({ query: {} });
     }
   },
   async created() {
@@ -468,7 +470,13 @@ export default {
       this.id = 'copy' + this.selectionList[0].id
       this.show = false
     },
-    backToList() {
+    backToList(type) {
+      if(type){
+        this.home = false
+        this.$router.push({
+          path: '/landTransportation/placeAnOrder/index'
+        });
+      }
       this.id = ''
       this.show = true
       this.onLoad(this.page)

+ 9 - 4
src/views/landTransportation/reportAnalysis/index.vue

@@ -291,7 +291,7 @@ export default {
           }],
         column: [{
           label: '客户名称',
-          prop: 'corpName',
+          prop: 'corpShortName',
           overHidden: true,
           index: 1,
           width: 140,
@@ -303,7 +303,7 @@ export default {
           type: "date",
           searchRange: true,
           defaultTime: ['00:00:00', '23:59:59'],
-          format: "yyyy-MM-dd HH:mm:ss",
+          format: "yyyy-MM-dd HH:mm",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
           index: 2,
           width: 150,
@@ -397,6 +397,9 @@ export default {
         return this.goodsOptionCrud.menu = true
       }else if (item == '平台') {
         this.goodsOptionCrud.menu = false
+        for (let item of this.goodsOptionCrud.column){
+          if (item.prop === 'landAmountC') return
+        }
         return this.goodsOptionCrud.column.push( {
           label: '应付运费',
           overHidden: true,
@@ -494,11 +497,13 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
       this.roleName.forEach(item =>{
-        console.log(item);
         if (item == '客户'){
           return this.goodsOptionCrud.menu = true
         }else if (item == '平台') {
           this.goodsOptionCrud.menu = false
+          for (let item of this.goodsOptionCrud.column){
+            if (item.prop === 'landAmountC') return false
+          }
           return this.goodsOptionCrud.column.push( {
             label: '应付运费',
             overHidden: true,
@@ -661,7 +666,7 @@ export default {
       })
     },
     ToBreak(val) {
-      if (val) return val.replace('\n', '<br/>')
+      if (val) return val.replace(/\n/g, '<br/>')
     },
     incidentalConfirm(row){
       incidental({

+ 180 - 0
src/views/statisticAnalysis/collectLedger/detail.vue

@@ -0,0 +1,180 @@
+<template>
+  <div>
+    <div class="customer-head">
+      <div class="customer-back">
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                   @click="backToList">返回列表
+        </el-button>
+      </div>
+    </div>
+    <basic-container class="page-crad" style="margin-top: 30px">
+      <avue-crud
+        ref="crud"
+        :option="option"
+        :data="dataList"
+        :table-loading="loading"
+        :cell-style="cellStyle"
+        :key="crudIndex"
+      >
+        <template slot="menuLeft">
+          <el-button type="info" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
+        </template>
+        <template slot="accSysNo" slot-scope="scope">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="jumpPage(scope.row,scope.index)">{{ scope.row.accSysNo }}</span>
+        </template>
+      </avue-crud>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+import {detail} from "@/api/statisticAnalysis/collectLedger";
+import { getToken } from "@/util/auth";
+
+export default {
+  name: "detail",
+  props: {
+    detailData: {
+      type: Object
+    },
+    tradeType: {
+      type: [Number, String]
+    }
+  },
+  data() {
+    return {
+      crudIndex: 0,
+      dataList: [],
+      loading: false,
+      option: {
+        searchShow: true,
+        align: "center",
+        searchSpan: 8,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        cellBtn: false,
+        cancelBtn: false,
+        refreshBtn: false,
+        showSummary: true,
+        summaryText: '合计',
+        sumColumnList: [
+          {
+            name: 'amount',
+            type: 'sum'
+          },
+          {
+            name: 'settlementAmount',
+            type: 'sum'
+          },
+          {
+            name: 'outstandingAmount',
+            type: 'sum'
+          },
+        ],
+        searchIcon: true,
+        searchIndex: 2,
+        menu: false,
+        column: [
+          {
+            label: "结算单位",
+            prop: "corpName",
+            overHidden: true,
+          },
+          {
+            label: "订单号",
+            prop: "accSysNo",
+            overHidden: true,
+          },
+          {
+            label: "业务类型",
+            prop: "billType",
+            overHidden: true,
+          },
+          {
+            label: "业务时间",
+            prop: "createTime",
+            overHidden: true,
+          },
+          {
+            label: "应收金额",
+            prop: "amount",
+            overHidden: true,
+          },
+          {
+            label: "实收金额",
+            prop: "settlementAmount",
+            overHidden: true,
+          },
+          {
+            label: "未收金额",
+            prop: "outstandingAmount",
+            overHidden: true,
+          },
+        ],
+      },
+    }
+  },
+  created() {
+    if (this.detailData.id) {
+      this.queryData(this.detailData.id);
+    }
+  },
+  methods: {
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    queryData(id) {
+      this.loading = true;
+      detail(id, 'd', this.tradeType).then(res => {
+        this.dataList = res.data.data.records;
+      }).finally(() => {
+        this.loading = false;
+        this.option.height = window.innerHeight - 180;
+        this.crudIndex++;
+      })
+    },
+    backToList() {
+      this.$emit("goBack");
+    },
+    //导出
+    outExport() {
+      this.$confirm('是否导出应收总账详情信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        window.open(
+          `/api/trade-finance/receivable/exportItem?${
+            this.website.tokenHeader
+          }=${getToken()}&dc=d&$tradeType=${this.tradeType}corpId=${this.detailData.id}`
+        );
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消' //
+        });
+      })
+    },
+    // 跳转页面
+    jumpPage(row, index) {
+      if (this.tradeType == '' || this.tradeType == 'JXS') {
+        this.$router.$avueRouter.closeTag("/dealer/sales/index");
+        this.$router.push({
+          path: "/dealer/sales/index",
+          query: {
+            params: row.srcParentId
+          },
+        });
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 425 - 0
src/views/statisticAnalysis/collectLedger/index.vue

@@ -0,0 +1,425 @@
+<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"
+      >
+        <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" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
+        </template>
+        <template slot="corpNameSearch">
+          <crop-select
+            v-model="search.corpId"
+            corpType="KG"
+          ></crop-select>
+        </template>
+        <template slot="sizeSearch">
+          <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>
+        </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>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/util/auth";
+import { getList } from "@/api/statisticAnalysis/collectLedger";
+import { micrometerFormat } from "@/util/validate";
+import _ from "lodash";
+import reportDialog from "@/components/report-dialog/main";
+import { gainUser } from "@/api/basicData/customerInquiry";
+import detail from "./detail";
+
+export default {
+  name: "index",
+  components: {
+    reportDialog,
+    detail
+  },
+  data() {
+    return {
+      exportLoading:false,
+      switchDialog:false,
+      statementData: {},
+      form: {},
+      search: {},
+      dataList: [],
+      loading: false,
+      detailData: {},
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      option: {},
+      defaultOption: {
+        searchShow: true,
+        align: "center",
+        searchSpan: 8,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        showSummary: true,
+        summaryText: '合计',
+        sumColumnList: [
+          {
+            name: 'amount',
+            type: 'sum'
+          },
+          {
+            name: 'settlementAmount',
+            type: 'sum'
+          },
+          {
+            name: 'outstandingAmount',
+            type: 'sum'
+          },
+        ],
+        searchIcon: true,
+        searchIndex: 2,
+        menu: false,
+        column: [
+          {
+            label: "结算单位",
+            prop: "corpName",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "业务区间",
+            prop: "accDate",
+            search: true,
+            type: 'date',
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            unlinkPanels: true,
+            searchRange: true,
+            overHidden: true,
+          },
+          // {
+          //   label: "是否显示金额为0",
+          //   prop: "size",
+          //   search: true,
+          //   overHidden: true,
+          //   hide: true,
+          //   showColumn: false
+          // },
+          {
+            label: "应收金额",
+            prop: "amount",
+            search: false,
+            overHidden: true,
+          },
+          {
+            label: "实收金额",
+            prop: "settlementAmount",
+            search: false,
+            overHidden: true,
+          },
+          {
+            label: "未收金额",
+            prop: "outstandingAmount",
+            search: false,
+            overHidden: true,
+          },
+          {
+            label: "开票金额",
+            prop: "invoiceAmount",
+            search: false,
+            overHidden: true,
+          },
+        ],
+      },
+      // 仓库配置
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
+      brandOption: [],
+      userList: [],
+      tradeType: '',
+      sysitemType: null,
+      show: true,
+    };
+  },
+  filters: {
+    decimalFormat(num) {
+      return num ? Number(num).toFixed(2) : "0.00";
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(137), this.defaultOption);
+    this.getWorkDicts('brand').then(res => {
+      this.brandOption = res.data.data;
+    })
+    gainUser().then(res => {
+      this.userList = res.data.data;
+    });
+    let i = 0;
+    this.option.column.forEach(item => {
+      if (item.search) i++
+    })
+    if (i % 3 !== 0){
+      const num = 3 - Number(i % 3)
+      this.option.searchMenuSpan = num * 8;
+      this.option.searchMenuPosition = "right";
+    }
+  },
+  methods: {
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    searchCriteriaSwitch(type) {
+      if (type) {
+        this.option.height = this.option.height - 46;
+      } else {
+        this.option.height = this.option.height + 46;
+      }
+      this.$refs.crud.getTableHeight();
+    },
+    searchReset() {
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    onLoad(page, params) {
+      this.sysitemType = localStorage.getItem('sysitemType');
+      if (this.sysitemType == 999) {
+        this.tradeType = ''
+      } else if (this.sysitemType == 1) {
+        this.tradeType = 'XX'
+      } else if (this.sysitemType == 2) {
+        this.tradeType = 'GN'
+      } else if (this.sysitemType == 3) {
+        this.tradeType = 'JK'
+      } else if (this.sysitemType == 4) {
+        this.tradeType = 'CK'
+      } else if (this.sysitemType == 5) {
+        this.tradeType = 'SW'
+      } else if (this.sysitemType == 6) {
+        this.tradeType = 'JXS'
+      } else if (this.sysitemType == 7) {
+        this.tradeType = 'LY'
+      }
+      this.loading = true;
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false);
+      });
+      let queryParams = Object.assign({tradeType: this.tradeType,dc: 'd',}, params);
+      if (queryParams.accDate && queryParams.accDate.length > 0) {
+        queryParams = {
+          ...queryParams,
+          accDateStart: queryParams.accDate[0] + ' 00:00:00',
+          accDateEnd: queryParams.accDate[1] + ' 23:59:59',
+        }
+        delete queryParams.accDate;
+      }
+      getList(
+        page.currentPage,
+        page.pageSize,
+        queryParams
+      )
+        .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 - 230;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    editOpen(row) {
+      if (row.billType == "BJ") {
+        this.$router.push({
+          path: "/exportTrade/customerInquiry/index",
+          query: {
+            id: row.id
+          }
+        });
+      } else {
+        this.$router.push({
+          path: "/exportTrade/salesContract/index",
+          query: {
+            id: row.id
+          }
+        });
+      }
+    },
+    statement() {
+      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"
+        delete this.statementData.accDate
+      }
+      this.switchDialog = !this.switchDialog;
+    },
+    onClose(val) {
+      this.switchDialog = val;
+    },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(137),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = this.defaultOption;
+      const inSave = await this.delColumnData(this.getColumnName(137), this.defaultOption);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+        this.$message.success("重置成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    // 跳转到详情
+    beforeOpenPage(row, index) {
+      this.detailData = {
+        id: row.corpId
+      };
+      this.show = false;
+    },
+    goBack() {
+      this.detailData=this.$options.data().detailData
+      if (JSON.stringify(this.$route.query) != "{}") {
+        this.$router.$avueRouter.closeTag();
+        this.$router.push({
+          path: "/statisticAnalysis/collectLedger/index"
+        });
+      }
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false)
+      })
+      this.show = true;
+      this.onLoad(this.page, this.search);
+    },
+    outExport() {
+      if (!this.search.corpId) this.$set(this.search, 'corpId', '');
+      if (this.search.accDate && this.search.accDate.length > 0) {
+        this.search = {
+          ...this.search,
+          accDateStart: this.search.accDate[0] + ' 00:00:00',
+          accDateEnd: this.search.accDate[1] + ' 23:59:59',
+        }
+      } else {
+        this.search = {
+          ...this.search,
+          accDateStart: '',
+          accDateEnd: '',
+        }
+      }
+      this.$confirm('是否导出应收总账信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        window.open(
+          `/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(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消' //
+        });
+      })
+    },
+  }
+};
+</script>
+
+<style scoped>
+.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%;
+}
+</style>

+ 180 - 0
src/views/statisticAnalysis/paymentLedger/detail.vue

@@ -0,0 +1,180 @@
+<template>
+  <div>
+    <div class="customer-head">
+      <div class="customer-back">
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                   @click="backToList">返回列表
+        </el-button>
+      </div>
+    </div>
+    <basic-container class="page-crad" style="margin-top: 30px">
+      <avue-crud
+        ref="crud"
+        :option="option"
+        :data="dataList"
+        :table-loading="loading"
+        :cell-style="cellStyle"
+        :key="crudIndex"
+      >
+        <template slot="menuLeft">
+          <el-button type="info" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
+        </template>
+        <template slot="accSysNo" slot-scope="scope">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="jumpPage(scope.row,scope.index)">{{ scope.row.accSysNo }}</span>
+        </template>
+      </avue-crud>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+import {detail} from "@/api/statisticAnalysis/paymentLedger";
+import { getToken } from "@/util/auth";
+
+export default {
+  name: "detail",
+  props: {
+    detailData: {
+      type: Object
+    },
+    tradeType: {
+      type: [Number, String]
+    }
+  },
+  data() {
+    return {
+      crudIndex: 0,
+      dataList: [],
+      loading: false,
+      option: {
+        searchShow: true,
+        align: "center",
+        searchSpan: 8,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        cellBtn: false,
+        cancelBtn: false,
+        refreshBtn: false,
+        showSummary: true,
+        summaryText: '合计',
+        sumColumnList: [
+          {
+            name: 'amount',
+            type: 'sum'
+          },
+          {
+            name: 'settlementAmount',
+            type: 'sum'
+          },
+          {
+            name: 'outstandingAmount',
+            type: 'sum'
+          },
+        ],
+        searchIcon: true,
+        searchIndex: 2,
+        menu: false,
+        column: [
+          {
+            label: "结算单位",
+            prop: "corpName",
+            overHidden: true,
+          },
+          {
+            label: "订单号",
+            prop: "accSysNo",
+            overHidden: true,
+          },
+          {
+            label: "业务类型",
+            prop: "billType",
+            overHidden: true,
+          },
+          {
+            label: "业务时间",
+            prop: "createTime",
+            overHidden: true,
+          },
+          {
+            label: "应付金额",
+            prop: "amount",
+            overHidden: true,
+          },
+          {
+            label: "实付金额",
+            prop: "settlementAmount",
+            overHidden: true,
+          },
+          {
+            label: "未付金额",
+            prop: "outstandingAmount",
+            overHidden: true,
+          },
+        ],
+      },
+    }
+  },
+  created() {
+    if (this.detailData.id) {
+      this.queryData(this.detailData.id);
+    }
+  },
+  methods: {
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    queryData(id) {
+      this.loading = true;
+      detail(id, 'c', this.tradeType).then(res => {
+        this.dataList = res.data.data.records;
+      }).finally(() => {
+        this.loading = false;
+        this.option.height = window.innerHeight - 180;
+        this.crudIndex++;
+      })
+    },
+    backToList() {
+      this.$emit("goBack");
+    },
+    //导出
+    outExport() {
+      this.$confirm('是否导出应付总账详情信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        window.open(
+          `/api/trade-finance/dealWith/exportItem?${
+            this.website.tokenHeader
+          }=${getToken()}&dc=c&$tradeType=${this.tradeType}&corpId=${this.detailData.id}`
+        );
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消' //
+        });
+      })
+    },
+    // 跳转页面
+    jumpPage(row, index) {
+      if (this.tradeType == '' || this.tradeType == 'JXS') {
+        this.$router.$avueRouter.closeTag("/dealer/purchase/index");
+        this.$router.push({
+          path: "/dealer/purchase/index",
+          query: {
+            params: row.srcParentId
+          },
+        });
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 421 - 0
src/views/statisticAnalysis/paymentLedger/index.vue

@@ -0,0 +1,421 @@
+<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"
+      >
+        <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" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
+        </template>
+        <template slot="corpNameSearch">
+          <crop-select
+            v-model="search.corpId"
+            corpType="KG"
+          ></crop-select>
+        </template>
+        <template slot="sizeSearch">
+          <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>
+        </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>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/util/auth";
+import { getList } from "@/api/statisticAnalysis/paymentLedger";
+import { micrometerFormat } from "@/util/validate";
+import _ from "lodash";
+import reportDialog from "@/components/report-dialog/main";
+import { gainUser } from "@/api/basicData/customerInquiry";
+import detail from "./detail";
+
+export default {
+  name: "index",
+  components: {
+    reportDialog,
+    detail
+  },
+  data() {
+    return {
+      exportLoading:false,
+      switchDialog:false,
+      statementData: {},
+      form: {},
+      search: {},
+      dataList: [],
+      loading: false,
+      detailData: {},
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      option: {},
+      defaultOption: {
+        searchShow: true,
+        align: "center",
+        searchSpan: 8,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        showSummary: true,
+        summaryText: '合计',
+        sumColumnList: [
+          {
+            name: 'amount',
+            type: 'sum'
+          },
+          {
+            name: 'settlementAmount',
+            type: 'sum'
+          },
+          {
+            name: 'outstandingAmount',
+            type: 'sum'
+          },
+        ],
+        searchIcon: true,
+        searchIndex: 2,
+        menu: false,
+        column: [
+          {
+            label: "结算单位",
+            prop: "corpName",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "业务区间",
+            prop: "accDate",
+            search: true,
+            type: 'date',
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            unlinkPanels: true,
+            searchRange: true,
+            overHidden: true,
+          },
+          // {
+          //   label: "是否显示金额为0",
+          //   prop: "size",
+          //   search: true,
+          //   overHidden: true,
+          //   hide: true,
+          //   showColumn: false
+          // },
+          {
+            label: "应付金额",
+            prop: "amount",
+            search: false,
+            overHidden: true,
+          },
+          {
+            label: "实付金额",
+            prop: "settlementAmount",
+            search: false,
+            overHidden: true,
+          },
+          {
+            label: "未付金额",
+            prop: "outstandingAmount",
+            search: false,
+            overHidden: true,
+          },
+        ],
+      },
+      // 仓库配置
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
+      brandOption: [],
+      userList: [],
+      tradeType: '',
+      sysitemType: null,
+      show: true,
+    };
+  },
+  filters: {
+    decimalFormat(num) {
+      return num ? Number(num).toFixed(2) : "0.00";
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(138), this.defaultOption);
+    this.getWorkDicts('brand').then(res => {
+      this.brandOption = res.data.data;
+    })
+    gainUser().then(res => {
+      this.userList = res.data.data;
+    });
+
+    let i = 0;
+    this.option.column.forEach(item => {
+      if (item.search) i++
+    })
+    if (i % 3 !== 0){
+      const num = 3 - Number(i % 3)
+      this.option.searchMenuSpan = num * 8;
+      this.option.searchMenuPosition = "right";
+    }
+  },
+  methods: {
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    searchReset() {
+    },
+    searchCriteriaSwitch(type) {
+      if (type) {
+        this.option.height = this.option.height - 46;
+      } else {
+        this.option.height = this.option.height + 46;
+      }
+      this.$refs.crud.getTableHeight();
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    onLoad(page, params) {
+      this.sysitemType = localStorage.getItem('sysitemType');
+      if (this.sysitemType == 999) {
+        this.tradeType = ''
+      } else if (this.sysitemType == 1) {
+        this.tradeType = 'XX'
+      } else if (this.sysitemType == 2) {
+        this.tradeType = 'GN'
+      } else if (this.sysitemType == 3) {
+        this.tradeType = 'JK'
+      } else if (this.sysitemType == 4) {
+        this.tradeType = 'CK'
+      } else if (this.sysitemType == 5) {
+        this.tradeType = 'SW'
+      } else if (this.sysitemType == 6) {
+        this.tradeType = 'JXS'
+      } else if (this.sysitemType == 7) {
+        this.tradeType = 'LY'
+      }
+      this.loading = true;
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false);
+      });
+      let queryParams = Object.assign({tradeType: this.tradeType,dc: 'c',}, params);
+      if (queryParams.accDate && queryParams.accDate.length > 0) {
+        queryParams = {
+          ...queryParams,
+          accDateStart: queryParams.accDate[0] + ' 00:00:00',
+          accDateEnd: queryParams.accDate[1] + ' 23:59:59',
+        }
+        delete queryParams.accDate;
+      }
+      getList(
+        page.currentPage,
+        page.pageSize,
+        queryParams
+      )
+        .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 - 230;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    editOpen(row) {
+      if (row.billType == "BJ") {
+        this.$router.push({
+          path: "/exportTrade/customerInquiry/index",
+          query: {
+            id: row.id
+          }
+        });
+      } else {
+        this.$router.push({
+          path: "/exportTrade/salesContract/index",
+          query: {
+            id: row.id
+          }
+        });
+      }
+    },
+    statement() {
+      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"
+        delete this.statementData.accDate
+      }
+      this.switchDialog = !this.switchDialog;
+    },
+    onClose(val) {
+      this.switchDialog = val;
+    },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(138),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = this.defaultOption;
+      const inSave = await this.delColumnData(this.getColumnName(138), this.defaultOption);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+        this.$message.success("重置成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    // 跳转到详情
+    beforeOpenPage(row, index) {
+      this.detailData = {
+        id: row.corpId
+      };
+      this.show = false;
+    },
+    goBack() {
+      this.detailData=this.$options.data().detailData
+      if (JSON.stringify(this.$route.query) != "{}") {
+        this.$router.$avueRouter.closeTag();
+        this.$router.push({
+          path: "/statisticAnalysis/collectLedger/index"
+        });
+      }
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false)
+      })
+      this.show = true;
+      this.onLoad(this.page, this.search);
+    },
+    outExport() {
+      if (!this.search.corpId) this.$set(this.search, 'corpId', '');
+      if (this.search.accDate && this.search.accDate.length > 0) {
+        this.search = {
+          ...this.search,
+          accDateStart: this.search.accDate[0] + ' 00:00:00',
+          accDateEnd: this.search.accDate[1] + ' 23:59:59',
+        }
+      } else {
+        this.search = {
+          ...this.search,
+          accDateStart: '',
+          accDateEnd: '',
+        }
+      }
+      this.$confirm('是否导出应付总账信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        window.open(
+          `/api/trade-finance/dealWith/export?${
+            this.website.tokenHeader
+          }=${getToken()}&dc=c&tradeType=${this.tradeType}&corpId=${this.search.corpId}&accDateStart=${this.search.accDateStart}&accDateEnd=${this.search.accDateEnd}`
+        );
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消' //
+        });
+      })
+    },
+  }
+};
+</script>
+
+<style scoped>
+.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%;
+}
+</style>

+ 202 - 0
src/views/statisticAnalysis/profitLedger/detail.vue

@@ -0,0 +1,202 @@
+<template>
+  <div>
+    <div class="customer-head">
+      <div class="customer-back">
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                   @click="backToList">返回列表
+        </el-button>
+      </div>
+    </div>
+    <basic-container class="page-crad" style="margin-top: 30px">
+      <avue-crud
+        ref="crud"
+        :option="option"
+        :data="dataList"
+        :table-loading="loading"
+        :cell-style="cellStyle"
+        :key="crudIndex"
+      >
+        <template slot="menuLeft">
+          <el-button type="info" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
+        </template>
+        <template slot="accSysNo" slot-scope="scope">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="jumpPage(scope.row,scope.index)">{{ scope.row.accSysNo }}</span>
+        </template>
+      </avue-crud>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+import {detail} from "@/api/statisticAnalysis/profitLedger";
+import { getToken } from "@/util/auth";
+
+export default {
+  name: "detail",
+  props: {
+    detailData: {
+      type: Object
+    },
+    tradeType: {
+      type: [Number, String]
+    }
+  },
+  data() {
+    return {
+      crudIndex: 0,
+      dataList: [],
+      loading: false,
+      option: {
+        searchShow: true,
+        align: "center",
+        searchSpan: 8,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        cellBtn: false,
+        cancelBtn: false,
+        refreshBtn: false,
+        showSummary: true,
+        summaryText: '合计',
+        sumColumnList: [
+          {
+            name: 'amount',
+            type: 'sum'
+          },
+          {
+            name: 'settlementAmount',
+            type: 'sum'
+          },
+          {
+            name: 'outstandingAmount',
+            type: 'sum'
+          },
+        ],
+        searchIcon: true,
+        searchIndex: 2,
+        menu: false,
+        column: [
+          {
+            label: "单据来源",
+            prop: "billType",
+            overHidden: true,
+          },
+          {
+            label: "结算单位",
+            prop: "corpName",
+            overHidden: true,
+          },
+          {
+            label: "订单号",
+            prop: "accSysNo",
+            overHidden: true,
+          },
+          {
+            label: "费用名称",
+            prop: "itemName",
+            overHidden: true,
+          },
+          {
+            label: "单价",
+            prop: "price",
+            overHidden: true,
+          },
+          {
+            label: "账单金额",
+            prop: "amount",
+            overHidden: true,
+          },
+          {
+            label: "结算金额",
+            prop: "settlementAmount",
+            overHidden: true,
+          },
+          {
+            label: "币别",
+            prop: "currency",
+            overHidden: true,
+          },
+          {
+            label: "汇率",
+            prop: "exchangeRate",
+            overHidden: true,
+          },
+        ],
+      },
+    }
+  },
+  created() {
+    if (this.detailData.id) {
+      this.queryData(this.detailData.id);
+    }
+  },
+  methods: {
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    queryData(id) {
+      this.loading = true;
+      detail(id, this.tradeType).then(res => {
+        this.dataList = res.data.data.records;
+      }).finally(() => {
+        this.loading = false;
+        this.option.height = window.innerHeight - 180;
+        this.crudIndex++;
+      })
+    },
+    backToList() {
+      this.$emit("goBack");
+    },
+    //导出
+    outExport() {
+      this.$confirm('是否导出应付总账详情信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        window.open(
+          `/api/trade-finance/profit/exportItem?${
+            this.website.tokenHeader
+          }=${getToken()}&$tradeType=${this.tradeType}&corpId=${this.detailData.id}`
+        );
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消' //
+        });
+      })
+    },
+    // 跳转页面
+    jumpPage(row, index) {
+      if (row.billType == '申请') {
+        if (this.tradeType == '' || this.tradeType == 'JXS') {
+          this.$router.$avueRouter.closeTag("/dealer/purchase/index");
+          this.$router.push({
+            path: "/dealer/purchase/index",
+            query: {
+              params: row.srcParentId
+            },
+          });
+        }
+      } else if (row.billType == '收费') {
+        if (this.tradeType == '' || this.tradeType == 'JXS') {
+          this.$router.$avueRouter.closeTag("/dealer/sales/index");
+          this.$router.push({
+            path: "/dealer/sales/index",
+            query: {
+              params: row.srcParentId
+            },
+          });
+        }
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 414 - 0
src/views/statisticAnalysis/profitLedger/index.vue

@@ -0,0 +1,414 @@
+<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"
+      >
+        <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" size="small" @click="outExport" icon="el-icon-download">导出</el-button>
+        </template>
+        <template slot="corpNameSearch">
+          <crop-select
+            v-model="search.corpId"
+            corpType="KG"
+          ></crop-select>
+        </template>
+        <template slot="sizeSearch">
+          <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>
+        </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>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/util/auth";
+import { getList } from "@/api/statisticAnalysis/profitLedger";
+import { micrometerFormat } from "@/util/validate";
+import _ from "lodash";
+import reportDialog from "@/components/report-dialog/main";
+import { gainUser } from "@/api/basicData/customerInquiry";
+import detail from "./detail";
+
+export default {
+  name: "index",
+  components: {
+    reportDialog,
+    detail
+  },
+  data() {
+    return {
+      exportLoading:false,
+      switchDialog:false,
+      statementData: {},
+      form: {},
+      search: {},
+      dataList: [],
+      loading: false,
+      detailData: {},
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      option: {},
+      defaultOption: {
+        searchShow: true,
+        align: "center",
+        searchSpan: 8,
+        searchMenuSpan: 8,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        showSummary: true,
+        summaryText: '合计',
+        sumColumnList: [
+          {
+            name: 'amount',
+            type: 'sum'
+          },
+          {
+            name: 'handleAmount',
+            type: 'sum'
+          },
+          {
+            name: 'profitAmount',
+            type: 'sum'
+          },
+        ],
+        searchIcon: true,
+        searchIndex: 2,
+        menu: false,
+        column: [
+          {
+            label: "结算单位",
+            prop: "corpName",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "业务区间",
+            prop: "accDate",
+            search: true,
+            type: 'date',
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+            unlinkPanels: true,
+            searchRange: true,
+            overHidden: true,
+          },
+          {
+            label: "应收金额",
+            prop: "amount",
+            search: false,
+            overHidden: true,
+          },
+          {
+            label: "应付金额",
+            prop: "handleAmount",
+            search: false,
+            overHidden: true,
+          },
+          {
+            label: "利润金额",
+            prop: "profitAmount",
+            search: false,
+            overHidden: true,
+          },
+        ],
+      },
+      // 仓库配置
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
+      brandOption: [],
+      userList: [],
+      tradeType: '',
+      sysitemType: null,
+      show: true,
+    };
+  },
+  filters: {
+    decimalFormat(num) {
+      return num ? Number(num).toFixed(2) : "0.00";
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(139), this.defaultOption);
+    this.getWorkDicts('brand').then(res => {
+      this.brandOption = res.data.data;
+    })
+    gainUser().then(res => {
+      this.userList = res.data.data;
+    });
+
+    let i = 0;
+    this.option.column.forEach(item => {
+      if (item.search) i++
+    })
+    if (i % 3 !== 0){
+      const num = 3 - Number(i % 3)
+      this.option.searchMenuSpan = num * 8;
+      this.option.searchMenuPosition = "right";
+    }
+  },
+  methods: {
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    searchReset() {
+    },
+    searchCriteriaSwitch(type) {
+      if (type) {
+        this.option.height = this.option.height - 46;
+      } else {
+        this.option.height = this.option.height + 46;
+      }
+      this.$refs.crud.getTableHeight();
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    onLoad(page, params) {
+      this.sysitemType = localStorage.getItem('sysitemType');
+      if (this.sysitemType == 999) {
+        this.tradeType = ''
+      } else if (this.sysitemType == 1) {
+        this.tradeType = 'XX'
+      } else if (this.sysitemType == 2) {
+        this.tradeType = 'GN'
+      } else if (this.sysitemType == 3) {
+        this.tradeType = 'JK'
+      } else if (this.sysitemType == 4) {
+        this.tradeType = 'CK'
+      } else if (this.sysitemType == 5) {
+        this.tradeType = 'SW'
+      } else if (this.sysitemType == 6) {
+        this.tradeType = 'JXS'
+      } else if (this.sysitemType == 7) {
+        this.tradeType = 'LY'
+      }
+      this.loading = true;
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false);
+      });
+      let queryParams = Object.assign({tradeType: this.tradeType}, params);
+      if (queryParams.accDate && queryParams.accDate.length > 0) {
+        queryParams = {
+          ...queryParams,
+          accDateStart: queryParams.accDate[0] + ' 00:00:00',
+          accDateEnd: queryParams.accDate[1] + ' 23:59:59',
+        }
+        delete queryParams.accDate;
+      }
+      getList(
+        page.currentPage,
+        page.pageSize,
+        queryParams
+      )
+        .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 - 230;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    editOpen(row) {
+      if (row.billType == "BJ") {
+        this.$router.push({
+          path: "/exportTrade/customerInquiry/index",
+          query: {
+            id: row.id
+          }
+        });
+      } else {
+        this.$router.push({
+          path: "/exportTrade/salesContract/index",
+          query: {
+            id: row.id
+          }
+        });
+      }
+    },
+    statement() {
+      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"
+        delete this.statementData.accDate
+      }
+      this.switchDialog = !this.switchDialog;
+    },
+    onClose(val) {
+      this.switchDialog = val;
+    },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(139),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = this.defaultOption;
+      const inSave = await this.delColumnData(this.getColumnName(139), this.defaultOption);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+        this.$message.success("重置成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    // 跳转到详情
+    beforeOpenPage(row, index) {
+      this.detailData = {
+        id: row.corpId
+      };
+      this.show = false;
+    },
+    goBack() {
+      this.detailData=this.$options.data().detailData
+      if (JSON.stringify(this.$route.query) != "{}") {
+        this.$router.$avueRouter.closeTag();
+        this.$router.push({
+          path: "/statisticAnalysis/collectLedger/index"
+        });
+      }
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false)
+      })
+      this.show = true;
+      this.onLoad(this.page, this.search);
+    },
+    outExport() {
+      if (!this.search.corpId) this.$set(this.search, 'corpId', '');
+      if (this.search.accDate && this.search.accDate.length > 0) {
+        this.search = {
+          ...this.search,
+          accDateStart: this.search.accDate[0] + ' 00:00:00',
+          accDateEnd: this.search.accDate[1] + ' 23:59:59',
+        }
+      } else {
+        this.search = {
+          ...this.search,
+          accDateStart: '',
+          accDateEnd: '',
+        }
+      }
+      this.$confirm('是否导出应付总账信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        window.open(
+          `/api/trade-finance/profit/export?${
+            this.website.tokenHeader
+          }=${getToken()}&tradeType=${this.tradeType}&corpId=${this.search.corpId}&accDateStart=${this.search.accDateStart}&accDateEnd=${this.search.accDateEnd}`
+        );
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消' //
+        });
+      })
+    },
+  }
+};
+</script>
+
+<style scoped>
+.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%;
+}
+</style>

+ 10 - 0
src/views/system/tenant.vue

@@ -183,6 +183,16 @@ export default {
             }]
           },
           {
+            label: "平台客户编码",
+            prop: "corpCode",
+            span: 12,
+          },
+          {
+            label: "对应平台(租户id)",
+            prop: "terrace",
+            span: 12,
+          },
+          {
             label: "系统背景",
             prop: "backgroundUrl",
             type: 'upload',

+ 6 - 1
src/views/wel/home/landTransportation/components/sales-reached.vue

@@ -46,6 +46,10 @@ export default {
     this.getSysType();
   },
   methods: {
+    //点击获取图表数据
+    handleMousedown(params){
+      this.$emit('handleMousedown',params.data)
+    },
     //箱分布图表
     rankingTwo(id, name, data) {
       // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
@@ -79,6 +83,7 @@ export default {
             ]
           }
       );
+      myChart.on("click", this.handleMousedown);
     },
     init() {
       this.getSysType();
@@ -94,7 +99,7 @@ export default {
         // this.rankingTwo('totalBulkCargoTwo', '散货总量:'+res.data.data.dept.all, res.data.data.dept.list)
       })
       bizCount({mold:3}).then(res=>{
-        this.rankingTwo('specialTotal', '特种车辆:'+res.data.data.flow.all,res.data.data.flow.list)
+        this.rankingTwo('specialTotal', '特种运输:'+res.data.data.flow.all,res.data.data.flow.list)
         // this.rankingTwo('specialTotalTwo', '特种车辆总量:'+res.data.data.dept.all,res.data.data.dept.list)
       })
       this.loading = false

+ 26 - 12
src/views/wel/home/landTransportation/components/sales-trend.vue

@@ -23,12 +23,22 @@
               header-row-style="color: #000"
               style="width: 100%;">
             <el-table-column
+                type="index"
+                label="序号"
+                align="center"
+                width="50">
+            </el-table-column>
+            <el-table-column
               align="center"
               label="货运日期"
               width="150"
               show-overflow-tooltip
               prop="arrivalTime"
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{scope.row.arrivalTime?scope.row.arrivalTime.slice(0,16):''}}
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="业务员"
@@ -82,7 +92,7 @@
                 label="车队"
                 width="190"
                 show-overflow-tooltip
-                prop="fleetName"
+                prop="fleetShortName"
             ></el-table-column>
             <el-table-column
                 align="center"
@@ -101,13 +111,13 @@
               show-overflow-tooltip
               prop="landAmountD"
             ></el-table-column>
-            <el-table-column
-              align="center"
-              label="其他费用(总)"
-              width="100"
-              show-overflow-tooltip
-              prop="allFeeD"
-            ></el-table-column>
+<!--            <el-table-column-->
+<!--              align="center"-->
+<!--              label="其他费用(总)"-->
+<!--              width="100"-->
+<!--              show-overflow-tooltip-->
+<!--              prop="allFeeD"-->
+<!--            ></el-table-column>-->
             <el-table-column
               align="center"
               label="应付杂费"
@@ -141,7 +151,7 @@
                 label="客户名称"
                 width="190"
                 show-overflow-tooltip
-                prop="corpName"
+                prop="corpShortName"
             ></el-table-column>
             <el-table-column
                 align="center"
@@ -209,6 +219,7 @@
 <script>
 import {active} from "@/api/wel";
 import {gaude,location} from "@/api/gaude";
+import data from "@/views/util/data";
 export default {
   name: "basicContainer",
   props: {
@@ -312,9 +323,12 @@ export default {
     init() {
       this.getsalesTrend();
     },
-    getsalesTrend() {
+    query(data){
+      this.getsalesTrend(data)
+    },
+    getsalesTrend(data={status:0,mold:0}) {
       this.loading = true;
-      active({status:0,mold:0}).then(res => {
+      active(data).then(res => {
         this.tableData = res.data.data
         this.loading = false;
       })

+ 10 - 3
src/views/wel/home/landTransportation/landTransportation.vue

@@ -2,8 +2,8 @@
   <div class="container">
     <quick-launch class="item1" :sysType="sysType" />
 <!--    <audit-data class="item2" :sysType="sysType"/>-->
-    <sales-reached class="item2" :sysType="sysType"/>
-    <sales-trend class="item3" :sysType="sysType"/>
+    <sales-reached @handleMousedown="handleMousedown" class="item2" :sysType="sysType"/>
+    <sales-trend ref="trend" class="item3" :sysType="sysType"/>
   </div>
 </template>
 
@@ -34,7 +34,14 @@ export default {
     payToday
   },
   computed: {},
-  methods: {}
+  methods: {
+    handleMousedown(params){
+      this.$refs.trend.query({
+        status:params.name === '未运行'?1:params.name === '运行中'?2:3,
+        mold:params.mold
+      })
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>