QuKatie 4 лет назад
Родитель
Сommit
a2e9564d88
35 измененных файлов с 673 добавлено и 240 удалено
  1. 18 17
      src/components/fee-info/config/feeInfo.json
  2. 16 15
      src/components/fee-info/config/feeList.json
  3. 30 1
      src/components/fee-info/main.vue
  4. 0 3
      src/components/upload-file/config/uploadList.json
  5. 1 1
      src/enums/column-name.js
  6. 1 1
      src/util/validate.js
  7. 23 11
      src/views/exportTrade/customerInquiry/config/commodity.json
  8. 1 0
      src/views/exportTrade/customerInquiry/config/customerContact.json
  9. 14 14
      src/views/exportTrade/customerInquiry/config/mainList.json
  10. 44 1
      src/views/exportTrade/customerInquiry/detailsPage.vue
  11. 25 13
      src/views/exportTrade/invoice/config/commodity.json
  12. 15 14
      src/views/exportTrade/invoice/config/customerContact.json
  13. 3 2
      src/views/exportTrade/invoice/config/mainList.json
  14. 50 2
      src/views/exportTrade/invoice/detailsPage.vue
  15. 39 2
      src/views/exportTrade/invoice/index.vue
  16. 0 1
      src/views/exportTrade/purchaseContract/config/commodity.json
  17. 15 14
      src/views/exportTrade/purchaseContract/config/customerContact.json
  18. 11 11
      src/views/exportTrade/purchaseContract/config/mainList.json
  19. 47 2
      src/views/exportTrade/purchaseContract/detailsPage.vue
  20. 6 5
      src/views/exportTrade/purchaseInquiry/config/customerContact.json
  21. 14 14
      src/views/exportTrade/purchaseInquiry/config/mainList.json
  22. 47 2
      src/views/exportTrade/purchaseInquiry/detailsPage.vue
  23. 0 1
      src/views/exportTrade/receipt/config/commodity.json
  24. 14 13
      src/views/exportTrade/receipt/config/customerContact.json
  25. 13 12
      src/views/exportTrade/receipt/config/mainList.json
  26. 50 2
      src/views/exportTrade/receipt/detailsPage.vue
  27. 39 2
      src/views/exportTrade/receipt/index.vue
  28. 0 1
      src/views/exportTrade/salesContract/config/commodity.json
  29. 13 12
      src/views/exportTrade/salesContract/config/customerContact.json
  30. 16 16
      src/views/exportTrade/salesContract/config/mainList.json
  31. 29 2
      src/views/exportTrade/salesContract/detailsPage.vue
  32. 0 1
      src/views/exportTrade/shippingInquiry/config/commodity.json
  33. 16 15
      src/views/exportTrade/shippingInquiry/config/customerContact.json
  34. 15 15
      src/views/exportTrade/shippingInquiry/config/mainList.json
  35. 48 2
      src/views/exportTrade/shippingInquiry/detailsPage.vue

+ 18 - 17
src/components/fee-info/config/feeInfo.json

@@ -10,70 +10,71 @@
   "refreshBtn": false,
   "menuWidth": 180,
   "align":"center",
+  "showSummary": true,
   "column": [{
       "label": "结算单位",
       "prop": "corpId",
       "index": 1,
-      "minWidth": 100,
       "cell": true,
-      "overHidden": true
+      "overHidden": true,
+      "width": 150
     },
     {
       "label": "费用名称",
       "prop": "feeName",
       "index": 2,
-      "minWidth": 100
+      "width": 150
     },
     {
       "label": "单价",
       "prop": "price",
       "index": 3,
-      "minWidth": 100,
       "slot": true,
-      "overHidden": true
+      "overHidden": true,
+      "width": 150
     },
     {
       "label": "计价单位",
       "prop": "unit",
       "index": 4,
-      "minWidth": 100,
-      "overHidden": true
+      "overHidden": true,
+      "width": 150
     },
     {
       "label": "数量",
       "prop": "quantity",
       "index": 5,
-      "minWidth": 100,
-      "overHidden": true
+      "overHidden": true,
+      "width": 150
     },
     {
       "label": "金额",
       "prop": "amount",
       "index": 6,
-      "minWidth": 100,
-      "overHidden": true
+      "overHidden": true,
+      "width": 150
     },
     {
       "label": "币别",
       "prop": "currency",
       "index": 7,
-      "minWidth": 100,
-      "overHidden": true
+      "overHidden": true,
+      "width": 150
     },
     {
       "label": "汇率",
       "prop": "exchangeRate",
       "index": 8,
-      "minWidth": 100,
-      "overHidden": true
+      "overHidden": true,
+      "width": 150
     },
     {
       "label": "备注",
       "prop": "remarks",
       "index": 9,
-      "minWidth": 100,
       "cell": true,
-      "overHidden": true
+      "overHidden": true,
+      "width": 150
     }
   ]
 }

+ 16 - 15
src/components/fee-info/config/feeList.json

@@ -21,54 +21,54 @@
       "prop": "code",
       "search": true,
       "index": 1,
-      "minWidth": 100,
       "rules": [
         {
           "required": true,
           "message": "请输入费用编号",
           "trigger": "blur"
         }
-      ]
+      ],
+      "width": 100
     },
     {
       "label": "费用名称",
       "prop": "cname",
       "search": true,
-      "index": 2,
-      "minWidth": 100,
+      "index": 2,   
       "rules": [
         {
           "required": true,
           "message": "请输入商品名称",
           "trigger": "blur"
         }
-      ]
+      ],
+      "width": 100
     },
     {
       "label": "币别",
       "prop": "fcyno",
       "search": true,
-      "index": 3,
-      "minWidth": 100,
+      "index": 3,     
       "rules": [
         {
           "required": false,
           "message": "请输入币别",
           "trigger": "blur"
         }
-      ]
+      ],
+      "width": 100
     },
     {
       "label": "计量单位",
       "prop": "unitno",
       "search": true,
       "index": 4,
-      "minWidth": 100,
       "rules": [{
         "required": false,
         "message": "请输入计量单位",
         "trigger": "blur"
-      }]
+      }],
+      "width": 100
     },
     {
       "label": "收付",
@@ -76,7 +76,6 @@
       "prop": "dc",
       "search": true,
       "index": 5,
-      "minWidth": 100,
       "dicData": [{
         "label": "收",
         "value": "D"
@@ -90,7 +89,8 @@
           "message": "请选择收付",
           "trigger": "blur"
         }
-      ]
+      ],
+      "width": 100
     },
     {
       "label": "费用类别",
@@ -107,19 +107,20 @@
         "required": true,
         "message": " ",
         "trigger": "click"
-      }]
+      }],
+      "width": 100
     },{
       "label": "备注",
       "prop": "remarks",
       "index": 6,
-      "minWidth":100,
       "rules": [
         {
           "required": false,
           "message": "请输入备注",
           "trigger": "blur"
         }
-      ]
+      ],
+      "width": 100
     }
   ]
 }

+ 30 - 1
src/components/fee-info/main.vue

@@ -7,6 +7,7 @@
         :data="feeData"
         :option="feeOption"
         @saveColumn="saveColumn"
+        :summary-method="summaryMethod"
       >
         <template slot="menuLeft">
           <el-button
@@ -149,7 +150,7 @@ export default {
   data() {
     return {
       option: option,
-      feeOption:{},
+      feeOption: {},
       feeDialog: false,
       treeOption: {
         nodeKey: "id",
@@ -378,6 +379,34 @@ export default {
     submitData() {
       return this.feeData;
     },
+    summaryMethod({ columns, data }) {
+      const sums = [];
+      if (columns.length > 0) {
+        columns.forEach((item, index) => {
+          sums[0] = "合计";
+          if (
+            item.property == "quantity" ||
+            item.property == "amount"
+          ) {
+            let qtySum = 0;
+            let amountSum = 0;
+            data.forEach(e => {
+              qtySum = _.add(qtySum, Number(e.quantity));
+              amountSum = _.add(amountSum, Number(e.amount));
+            });
+            //数量总计
+            if (item.property == "quantity") {
+              sums[index] = qtySum ? qtySum.toFixed(2) : '0.00';
+            }
+            //金额总计
+            if (item.property == "amount") {
+              sums[index] = micrometerFormat(amountSum);
+            }
+          }
+        });
+      }
+      return sums;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(33),

+ 0 - 3
src/components/upload-file/config/uploadList.json

@@ -19,7 +19,6 @@
       "prop": "sort",
       "type": "number",
       "index": 1,
-      "minWidth":100,
       "rules": [
         {
           "required": true,
@@ -31,7 +30,6 @@
       "label": "文件名称",
       "prop": "fileName",
       "index": 2,
-      "minWidth":100,
       "rules": [
         {
           "required": true,
@@ -43,7 +41,6 @@
       "label": "备注",
       "prop": "remarks",
       "index": 5,
-      "minWidth":100,
       "rules": [
         {
           "required": false,

+ 1 - 1
src/enums/column-name.js

@@ -1,6 +1,6 @@
 const columnName = [{
   code: 0,
-  name: 'processDialog'
+  name: '出口报价单'
 }, {
   code: 1,
   name: '出口报价单商品信息'

+ 1 - 1
src/util/validate.js

@@ -6,7 +6,7 @@
  * @returns
  */
 export function micrometerFormat(num) {
-  num = num ? Number(num).toFixed(2) : 0.00
+  num = num ? Number(num).toFixed(2) : '0.00'
   return (
     num && num.toString().replace(/\d+/, function (s) {
       return s.replace(/(\d)(?=(\d{3})+$)/g, '$1,');

+ 23 - 11
src/views/exportTrade/customerInquiry/config/commodity.json

@@ -47,6 +47,7 @@
       "hide": true,
       "addDisabled": false,
       "multiple": true,
+      "width": 100,
       "props": {
         "label": "title"
       },
@@ -59,47 +60,56 @@
     {
       "label": "规格编码",
       "prop": "typeno",
-      "search": true
+      "search": true,
+      "width": 100
     },
     {
       "label": "品牌",
       "prop": "brand",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "花纹",
       "prop": "brandItem",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "规格尺寸",
       "prop": "specs",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "产品类别",
       "prop": "category",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "产品分类",
       "prop": "categoryitem",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "供应商",
       "prop": "providers",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "计量单位",
       "prop": "unit",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "包装单位",
       "prop": "packgeunit",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "商品图片",
@@ -113,12 +123,14 @@
         "url": "link"
       },
       "hide": true,
-      "span": 24
+      "span": 24,
+      "width": 100
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "slot": true
+      "slot": true,
+      "width": 100
     }
   ]
 }

+ 1 - 0
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -10,6 +10,7 @@
   "align": "center",
   "menuWidth": 150,
   "refreshBtn": false,
+  "showSummary": true,
   "column": [{
       "label": "产品类别",
       "prop": "priceCategory",

+ 14 - 14
src/views/exportTrade/customerInquiry/config/mainList.json

@@ -14,14 +14,14 @@
       "prop": "sysNo",
       "search": true,
       "index": 1,
-      "width": 60,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
       "index": 2,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
@@ -29,7 +29,7 @@
       "prop": "orderStatus",
       "search": true,
       "index": 4,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "type": "select",
       "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
@@ -41,27 +41,27 @@
       "label": "联系人",
       "prop": "corpAttn",
       "index": 5,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "电话",
       "prop": "corpTel",
       "index": 6,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "起运港",
       "prop": "portOfLoad",
       "search": true,
       "index": 7,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "目的港",
       "prop": "portOfDestination",
       "search": true,
       "index": 8,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "type": "select",
       "filterable":true,
@@ -74,13 +74,13 @@
       "label": "运输方式",
       "prop": "transport",
       "index": 9,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "价格条款",
       "prop": "priceTerms",
       "index": 10,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "订单日期",
@@ -96,7 +96,7 @@
       "label": "有效日期",
       "prop": "dateValidity",
       "index": 13,
-      "width": 80,
+      "width": 100,
       "type": "date",
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd 00:00:00",
@@ -105,25 +105,25 @@
       "label": "收款方式",
       "prop": "paymentType",
       "index": 14,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "币别",
       "prop": "currency",
       "index": 15,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "汇率",
       "prop": "exchangeRate",
       "index": 16,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "备注",
       "prop": "orderRemark",
       "index": 20,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }
   ]

+ 44 - 1
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -65,6 +65,7 @@
           :data="data"
           :option="tableOption"
           @row-del="rowDel"
+          :summary-method="summaryMethod"
           @saveColumn="saveColumn"
         >
           <template slot="menuLeft">
@@ -485,7 +486,7 @@ export default {
         total: 0
       },
       loading: false,
-      goodsOption:{},
+      goodsOption: {},
       data: [],
       goodsList: [],
       selectionList: [],
@@ -785,6 +786,48 @@ export default {
     onClose(val) {
       this.switchDialog = val;
     },
+    summaryMethod({ columns, data }) {
+      const sums = [];
+      if (columns.length > 0) {
+        columns.forEach((item, index) => {
+          sums[0] = "合计";
+          if (
+            item.property == "orderQuantity" ||
+            item.property == "amount"||
+            item.property == "insurance"||
+            item.property == "freight"
+          ) {
+            let qtySum = 0;
+            let amountSum = 0;
+            let insuranceSum = 0;
+            let freightSum = 0;
+            data.forEach(e => {
+              qtySum = _.add(qtySum, Number(e.orderQuantity));
+              amountSum = _.add(amountSum, Number(e.amount));
+              insuranceSum = _.add(insuranceSum, Number(e.insurance));
+              freightSum = _.add(freightSum, Number(e.freight));
+            });
+            //数量总计
+            if (item.property == "orderQuantity") {
+              sums[index] = qtySum ? qtySum.toFixed(2) : '0.00';
+            }
+            //金额总计
+            if (item.property == "amount") {
+              sums[index] = micrometerFormat(amountSum);
+            }
+            //保险总计
+            if (item.property == "insurance") {
+              sums[index] = micrometerFormat(insuranceSum);
+            }
+            //运费总计
+            if (item.property == "freight") {
+              sums[index] = micrometerFormat(freightSum);
+            }
+          }
+        });
+      }
+      return sums;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(1),

+ 25 - 13
src/views/exportTrade/invoice/config/commodity.json

@@ -1,6 +1,6 @@
 
 {
-  "calcHeight": 80,
+  "calcHeight": 100,
   "tip": false,
   "addBtn": false,
   "searchShow": false,
@@ -54,52 +54,62 @@
         "required": true,
         "message": " ",
         "trigger": "click"
-      }]
+      }],
+      "width": 100
     },
     {
       "label": "规格编码",
       "prop": "typeno",
-      "search": true
+      "search": true,
+      "width": 100
     },
     {
       "label": "品牌",
       "prop": "brand",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "花纹",
       "prop": "brandItem",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "规格尺寸",
       "prop": "specs",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "产品类别",
       "prop": "category",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "产品分类",
       "prop": "categoryitem",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "供应商",
       "prop": "providers",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "计量单位",
       "prop": "unit",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "包装单位",
       "prop": "packgeunit",
-      "slot": true
+      "slot": true,
+      "width": 100
     },
     {
       "label": "商品图片",
@@ -113,12 +123,14 @@
         "url": "link"
       },
       "hide": true,
-      "span": 24
+      "span": 24,
+      "width": 100
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "slot": true
+      "slot": true,
+      "width": 100
     }
   ]
 }

+ 15 - 14
src/views/exportTrade/invoice/config/customerContact.json

@@ -10,6 +10,7 @@
   "menuWidth": 150,
   "refreshBtn": false,
   "delBtn":false,
+  "showSummary": true,
   "addBtnText": "新增明细",
   "column": [
     {
@@ -23,28 +24,28 @@
       "label": "产品类别",
       "prop": "priceCategory",
       "index": 2,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "产品编号",
       "prop": "code",
       "index": 3,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "产品名称",
       "prop": "cname",
       "index": 4,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "产品属性",
       "prop": "itemProp",
       "index": 5,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "cell": true,
       "type": "select",
@@ -58,7 +59,7 @@
       "label": "产品照片",
       "prop": "itemUrl",
       "index": 6,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "hide": true
     },
@@ -66,7 +67,7 @@
       "label": "产品描述",
       "prop": "itemDescription",
       "index": 7,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "cell": true
     },
@@ -74,27 +75,27 @@
       "label": "产品型号",
       "prop": "itemType",
       "index": 8,
-      "width": 80
+      "width": 100
     },
     {
       "label": "包装要求",
       "prop": "packageRemarks",
       "index": 8,
-      "width": 80,
+      "width": 100,
       "cell": true
     },
     {
       "label": "数量",
       "prop": "actualQuantity",
       "index": 8,
-      "width": 60,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "计价单位",
       "prop": "unit",
       "index": 9,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "cell": true,
       "type": "select",
@@ -108,28 +109,28 @@
       "label": "单价",
       "prop": "price",
       "index": 10,
-      "width": 60,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "金额",
       "prop": "contractAmount",
       "index": 11,
-      "width": 60,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "税率",
       "prop": "taxRate",
       "index": 12,
-      "width": 60,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
       "index": 13,
-      "width": 60,
+      "width": 100,
       "overHidden": true,
       "cell": true
     }

+ 3 - 2
src/views/exportTrade/invoice/config/mainList.json

@@ -10,6 +10,7 @@
   "align": "center",
   "menuWidth": "180",
   "searchLabelWidth": "90",
+  "showSummary": true,
   "column": [{
       "label": "系统号",
       "prop": "sysNo",
@@ -23,7 +24,7 @@
       "prop": "corpId",
       "search": true,
       "index": 2,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
@@ -39,7 +40,7 @@
       "prop": "deliveryStatus",
       "search": true,
       "index": 4,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "type": "select",
       "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",

+ 50 - 2
src/views/exportTrade/invoice/detailsPage.vue

@@ -43,6 +43,7 @@
           :option="tableOption"
           @row-del="rowDel"
           @saveColumn="saveColumn"
+          :summary-method="summaryMethod"
         >
           <template slot="menuLeft">
             <el-button
@@ -218,7 +219,11 @@ import {
 } from "@/api/basicData/invoice";
 import uploadFile from "@/components/upload-file/main";
 import reportDialog from "@/components/report-dialog/main";
-import { isvalidatemobile, validatename } from "@/util/validate";
+import {
+  isvalidatemobile,
+  validatename,
+  micrometerFormat
+} from "@/util/validate";
 import _ from "lodash";
 export default {
   name: "detailsPageEdit",
@@ -391,7 +396,7 @@ export default {
         total: 0
       },
       loading: false,
-      goodsOption: goodsOption,
+      goodsOption:{},
       data: [],
       goodsList: [],
       selectionList: [],
@@ -416,6 +421,10 @@ export default {
       this.getColumnName(9),
       tableOption
     );
+    this.goodsOption = await this.getColumnData(
+      this.getColumnName(30),
+      goodsOption
+    );
     if (this.$route.query.pageType == "Generate") {
       this.getGenerate(JSON.parse(this.$route.query.data));
     }
@@ -630,6 +639,34 @@ export default {
     onClose(val) {
       this.switchDialog = val;
     },
+    summaryMethod({ columns, data }) {
+      const sums = [];
+      if (columns.length > 0) {
+        columns.forEach((item, index) => {
+          sums[0] = "合计";
+          if (
+            item.property == "actualQuantity" ||
+            item.property == "contractAmount"
+          ) {
+            let qtySum = 0;
+            let amountSum = 0;
+            data.forEach(e => {
+              qtySum = _.add(qtySum, Number(e.actualQuantity));
+              amountSum = _.add(amountSum, Number(e.contractAmount));
+            });
+            //数量总计
+            if (item.property == "actualQuantity") {
+              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+            }
+            //金额总计
+            if (item.property == "contractAmount") {
+              sums[index] = micrometerFormat(amountSum);
+            }
+          }
+        });
+      }
+      return sums;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(9),
@@ -640,6 +677,17 @@ export default {
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
+    },
+    async saveGoodsColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(30),
+        this.goodsOption
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+      }
     }
   }
 };

+ 39 - 2
src/views/exportTrade/invoice/index.vue

@@ -15,6 +15,7 @@
         @on-load="onLoad"
         :table-loading="loading"
         @saveColumn="saveColumn"
+        :summary-method="summaryMethod"
       >
         <template slot-scope="scope" slot="corpId">
           {{ scope.row.corpsName }}
@@ -93,7 +94,8 @@
 import option from "./config/mainList.json";
 import { getList, remove } from "@/api/basicData/invoice";
 import detailPage from "./detailsPage.vue";
-
+import { micrometerFormat } from "@/util/validate";
+import _ from "lodash";
 export default {
   name: "customerInformation",
   data() {
@@ -107,7 +109,7 @@ export default {
       },
       search: {},
       form: {},
-      option:{},
+      option: {},
       parentId: 0,
       dataList: [],
       page: {
@@ -245,6 +247,41 @@ export default {
       this.show = true;
       this.$store.commit("OUT_OUT_DETAIL");
     },
+    summaryMethod({ columns, data }) {
+      const sums = [];
+      if (columns.length > 0) {
+        columns.forEach((item, index) => {
+          sums[0] = "合计";
+          if (
+            item.property == "totalQuantity" ||
+            item.property == "deliveryAmount" ||
+            item.property == "totalCost"
+          ) {
+            let qtySum = 0;
+            let instoreSum = 0;
+            let totalSum = 0;
+            data.forEach(e => {
+              qtySum = _.add(qtySum, Number(e.totalQuantity));
+              instoreSum = _.add(instoreSum, Number(e.deliveryAmount));
+              totalSum = _.add(totalSum, Number(e.totalCost));
+            });
+            //数量总计
+            if (item.property == "totalQuantity") {
+              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+            }
+            //入库金额总计
+            if (item.property == "deliveryAmount") {
+              sums[index] = micrometerFormat(instoreSum);
+            }
+            //金额总计
+            if (item.property == "totalCost") {
+              sums[index] = micrometerFormat(totalSum);
+            }
+          }
+        });
+      }
+      return sums;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(8),

+ 0 - 1
src/views/exportTrade/purchaseContract/config/commodity.json

@@ -1,6 +1,5 @@
 
 {
-  "calcHeight": 80,
   "tip": false,
   "addBtn": false,
   "searchShow": false,

+ 15 - 14
src/views/exportTrade/purchaseContract/config/customerContact.json

@@ -12,32 +12,33 @@
   "menuWidth": 150,
   "refreshBtn": false,
   "selection": true,
+  "showSummary": true,
   "column": [{
       "label": "产品类别",
       "prop": "priceCategory",
       "index": 1,
-      "width": 80,
+      "width": 100,
       "overHidden":true
     },
     {
       "label": "产品编号",
       "prop": "code",
       "index": 2,
-      "width": 80,
+      "width": 100,
       "overHidden":true
     },
     {
       "label": "产品名称",
       "prop": "cname",
       "index": 3,
-      "width": 80,
+      "width": 100,
       "overHidden":true
     },
     {
       "label": "产品属性",
       "prop": "itemProp",
       "index": 4,
-      "width": 80,
+      "width": 100,
       "overHidden":true,
       "cell": true,
       "type": "select",
@@ -51,7 +52,7 @@
       "label": "产品照片",
       "prop": "itemUrl",
       "index": 5,
-      "width": 80,
+      "width": 100,
       "overHidden":true,
       "hide":true
     },
@@ -59,7 +60,7 @@
       "label": "产品描述",
       "prop": "itemDescription",
       "index": 6,
-      "width": 80,
+      "width": 100,
       "overHidden":true,
       "cell": true
     },
@@ -67,20 +68,20 @@
       "label": "产品型号",
       "prop": "itemType",
       "index": 7,
-      "width": 80
+      "width": 100
     },
     {
       "label": "数量",
       "prop": "orderQuantity",
       "index": 8,
-      "width": 60,
+      "width": 100,
       "overHidden":true
     },
     {
       "label": "计价单位",
       "prop": "unit",
       "index": 9,
-      "width": 80,
+      "width": 100,
       "overHidden":true,
       "cell": true,
       "type": "select",
@@ -94,7 +95,7 @@
       "label": "是否含税",
       "prop": "ifTax",
       "index": 9,
-      "width": 80,
+      "width": 100,
       "overHidden":true,
       "cell": true
     },
@@ -102,7 +103,7 @@
       "label": "汇率",
       "prop": "taxRate",
       "index": 9,
-      "width": 80,
+      "width": 100,
       "overHidden":true,
       "cell": true
     },
@@ -110,21 +111,21 @@
       "label": "单价",
       "prop": "price",
       "index": 10,
-      "width": 60,
+      "width": 100,
       "overHidden":true
     },
     {
       "label": "金额",
       "prop": "amount",
       "index": 11,
-      "width": 60,
+      "width": 100,
       "overHidden":true
     },
     {
       "label": "备注",
       "prop": "remarks",
       "index": 12,
-      "width": 60,
+      "width": 100,
       "overHidden":true,
       "cell": true
     }

+ 11 - 11
src/views/exportTrade/purchaseContract/config/mainList.json

@@ -15,14 +15,14 @@
       "prop": "sysNo",
       "search": true,
       "index": 1,
-      "width": 60,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
       "index": 2,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
@@ -30,14 +30,14 @@
       "prop": "orderNo",
       "search": true,
       "index": 3,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "订单状态",
       "prop": "orderStatus",
       "search": true,
       "index": 4,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "type": "select",
       "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
@@ -49,13 +49,13 @@
       "label": "联系人",
       "prop": "corpAttn",
       "index": 7,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "电话",
       "prop": "corpTel",
       "index": 8,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "采购日期",
@@ -90,14 +90,14 @@
       "label": "是否开票",
       "prop": "ifInvoice",
       "index": 12,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "收款方式",
       "prop": "paymentType",
       "index": 13,
-      "width": 80,
+      "width": 100,
       "search": true,
       "type": "select",
       "dicUrl": "/api/blade-system/dict-biz/dictionary?code=payment_term",
@@ -111,21 +111,21 @@
       "label": "币别",
       "prop": "currency",
       "index": 14,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "汇率",
       "prop": "exchangeRate",
       "index": 15,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "备注",
       "prop": "orderRemark",
       "index": 16,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }
   ]

+ 47 - 2
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -55,6 +55,7 @@
             @row-del="rowDel"
             @selection-change="goodsSelectionChange"
             @saveColumn="saveColumn"
+            :summary-method="summaryMethod"
           >
             <template slot="price" slot-scope="{ row }">
               <el-input
@@ -230,7 +231,11 @@ import {
 } from "@/api/exportTrade/purchaseContract";
 import _ from "lodash";
 import reportDialog from "@/components/report-dialog/main";
-import { isvalidatemobile, validatename } from "@/util/validate";
+import {
+  isvalidatemobile,
+  validatename,
+  micrometerFormat
+} from "@/util/validate";
 export default {
   name: "detailsPageEdit",
   data() {
@@ -474,7 +479,7 @@ export default {
         total: 0
       },
       loading: false,
-      goodsOption: goodsOption,
+      goodsOption:{},
       data: [],
       goodsList: [],
       selectionList: [],
@@ -500,6 +505,10 @@ export default {
       this.getColumnName(3),
       tableOption
     );
+        this.goodsOption = await this.getColumnData(
+      this.getColumnName(27),
+      goodsOption
+    );
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
@@ -719,6 +728,31 @@ export default {
     onClose(val) {
       this.switchDialog = val;
     },
+    summaryMethod({ columns, data }) {
+      const sums = [];
+      if (columns.length > 0) {
+        columns.forEach((item, index) => {
+          sums[0] = "合计";
+          if (item.property == "orderQuantity" || item.property == "amount") {
+            let qtySum = 0;
+            let amountSum = 0;
+            data.forEach(e => {
+              qtySum = _.add(qtySum, Number(e.orderQuantity));
+              amountSum = _.add(amountSum, Number(e.amount));
+            });
+            //数量总计
+            if (item.property == "orderQuantity") {
+              sums[index] = qtySum ? qtySum.toFixed(2) : '0.00';
+            }
+            //金额总计
+            if (item.property == "amount") {
+              sums[index] = micrometerFormat(amountSum);
+            }
+          }
+        });
+      }
+      return sums;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(3),
@@ -729,6 +763,17 @@ export default {
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
+    },
+    async saveGoodsColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(27),
+        this.goodsOption
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+      }
     }
   }
 };

+ 6 - 5
src/views/exportTrade/purchaseInquiry/config/customerContact.json

@@ -10,6 +10,7 @@
   "align": "center",
   "menuWidth": 150,
   "refreshBtn": false,
+  "showSummary": true,
   "column": [{
       "label": "产品类别",
       "prop": "priceCategory",
@@ -71,7 +72,7 @@
       "label": "数量",
       "prop": "orderQuantity",
       "index": 8,
-      "width": 60,
+      "width": 100,
       "overHidden":true
     },
     {
@@ -106,21 +107,21 @@
       "label": "单价",
       "prop": "price",
       "index": 11,
-      "width": 60,
+      "width": 100,
       "overHidden":true
     },
     {
       "label": "金额",
       "prop": "amount",
       "index": 12,
-      "width": 60,
+      "width": 100,
       "overHidden":true
     },
     {
       "label": "税率",
       "prop": "taxRate",
       "index": 13,
-      "width": 60,
+      "width": 100,
       "overHidden":true,
       "cell": true
     },
@@ -128,7 +129,7 @@
       "label": "备注",
       "prop": "remarks",
       "index": 14,
-      "width": 60,
+      "width": 100,
       "overHidden":true,
       "cell": true
     }

+ 14 - 14
src/views/exportTrade/purchaseInquiry/config/mainList.json

@@ -14,14 +14,14 @@
       "prop": "sysNo",
       "search": true,
       "index": 1,
-      "width": 60,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
       "index": 2,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
@@ -29,7 +29,7 @@
       "prop": "orderStatus",
       "search": true,
       "index": 4,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "type": "select",
       "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
@@ -41,20 +41,20 @@
       "label": "联系人",
       "prop": "corpAttn",
       "index": 5,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "电话",
       "prop": "corpTel",
       "index": 6,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "起运港",
       "prop": "portOfLoad",
       "search": true,
       "index": 7,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "type": "select",
       "filterable":true,
@@ -68,7 +68,7 @@
       "prop": "portOfDestination",
       "search": true,
       "index": 8,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "type": "select",
       "filterable":true,
@@ -81,13 +81,13 @@
       "label": "运输方式",
       "prop": "transport",
       "index": 9,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "价格条款",
       "prop": "priceTerms",
       "index": 10,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "订单日期",
@@ -103,7 +103,7 @@
       "label": "有效日期",
       "prop": "dateValidity",
       "index": 13,
-      "width": 80,
+      "width": 100,
       "type": "date",
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd 00:00:00",
@@ -112,25 +112,25 @@
       "label": "收款方式",
       "prop": "paymentType",
       "index": 14,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "币别",
       "prop": "currency",
       "index": 15,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "汇率",
       "prop": "exchangeRate",
       "index": 16,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "备注",
       "prop": "orderRemark",
       "index": 20,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }
   ]

+ 47 - 2
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -61,6 +61,7 @@
           :option="tableOption"
           @row-del="rowDel"
           @saveColumn="saveColumn"
+          :summary-method="summaryMethod"
         >
           <template slot="price" slot-scope="{ row }">
             <el-input
@@ -211,7 +212,11 @@ import {
   getSpecification
 } from "@/api/basicData/purchaseInquiry";
 import reportDialog from "@/components/report-dialog/main";
-import { isvalidatemobile, validatename } from "@/util/validate";
+import {
+  isvalidatemobile,
+  validatename,
+  micrometerFormat
+} from "@/util/validate";
 import _ from "lodash";
 export default {
   name: "detailsPageEdit",
@@ -438,7 +443,7 @@ export default {
         total: 0
       },
       loading: false,
-      goodsOption: goodsOption,
+      goodsOption: {},
       data: [],
       goodsList: [],
       selectionList: [],
@@ -459,6 +464,10 @@ export default {
       this.getColumnName(11),
       tableOption
     );
+    this.goodsOption = await this.getColumnData(
+      this.getColumnName(31),
+      goodsOption
+    );
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
@@ -639,6 +648,31 @@ export default {
     onClose(val) {
       this.switchDialog = val;
     },
+    summaryMethod({ columns, data }) {
+      const sums = [];
+      if (columns.length > 0) {
+        columns.forEach((item, index) => {
+          sums[0] = "合计";
+          if (item.property == "orderQuantity" || item.property == "amount") {
+            let qtySum = 0;
+            let amountSum = 0;
+            data.forEach(e => {
+              qtySum = _.add(qtySum, Number(e.orderQuantity));
+              amountSum = _.add(amountSum, Number(e.amount));
+            });
+            //数量总计
+            if (item.property == "orderQuantity") {
+              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+            }
+            //金额总计
+            if (item.property == "amount") {
+              sums[index] = micrometerFormat(amountSum);
+            }
+          }
+        });
+      }
+      return sums;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(11),
@@ -649,6 +683,17 @@ export default {
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
+    },
+    async saveGoodsColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(31),
+        this.goodsOption
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+      }
     }
   }
 };

+ 0 - 1
src/views/exportTrade/receipt/config/commodity.json

@@ -1,6 +1,5 @@
 
 {
-  "calcHeight": 80,
   "tip": false,
   "addBtn": false,
   "searchShow": false,

+ 14 - 13
src/views/exportTrade/receipt/config/customerContact.json

@@ -11,6 +11,7 @@
   "refreshBtn": false,
   "delBtn":false,
   "addBtnText": "新增明细",
+  "showSummary": true,
   "column": [
     {
       "label": "销售订单号",
@@ -23,28 +24,28 @@
       "label": "产品类别",
       "prop": "priceCategory",
       "index": 2,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "产品编号",
       "prop": "code",
       "index": 3,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "产品名称",
       "prop": "cname",
       "index": 4,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "产品属性",
       "prop": "packageRemarks",
       "index": 5,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "cell": true,
       "type": "select",
@@ -58,7 +59,7 @@
       "label": "产品照片",
       "prop": "itemUrl",
       "index": 6,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "hide": true
     },
@@ -66,7 +67,7 @@
       "label": "产品描述",
       "prop": "productDesc",
       "index": 7,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "cell": true
     },
@@ -74,20 +75,20 @@
       "label": "产品型号",
       "prop": "specificationAndModel",
       "index": 8,
-      "width": 80
+      "width": 100
     },
     {
       "label": "数量",
       "prop": "actualQuantity",
       "index": 9,
-      "width": 60,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "计价单位",
       "prop": "unit",
       "index": 10,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "cell": true,
       "type": "select",
@@ -101,28 +102,28 @@
       "label": "单价",
       "prop": "price",
       "index": 11,
-      "width": 60,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "金额",
       "prop": "contractAmount",
       "index": 12,
-      "width": 60,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "税率",
       "prop": "taxRate",
       "index": 13,
-      "width": 60,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
       "index": 14,
-      "width": 60,
+      "width": 100,
       "overHidden": true,
       "cell": true
     }

+ 13 - 12
src/views/exportTrade/receipt/config/mainList.json

@@ -10,12 +10,13 @@
   "align": "center",
   "menuWidth": "180",
   "searchLabelWidth": "90",
+  "showSummary": true,
   "column": [{
       "label": "系统号",
       "prop": "sysNo",
       "search": true,
       "index": 1,
-      "width": 100,
+      "width": 120,
       "overHidden": true
     },
     {
@@ -23,7 +24,7 @@
       "prop": "corpId",
       "search": true,
       "index": 2,
-      "width": 80,
+      "width": 120,
       "overHidden": true
     },
     {
@@ -31,7 +32,7 @@
       "prop": "orderNo",
       "search": true,
       "index": 3,
-      "width": 100,
+      "width": 120,
       "overHidden": true
     },
     {
@@ -39,7 +40,7 @@
       "prop": "deliveryStatus",
       "search": true,
       "index": 4,
-      "width": 80,
+      "width": 120,
       "overHidden": true,
       "type": "select",
       "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
@@ -53,7 +54,7 @@
       "prop": "storageId",
       "search": true,
       "index": 5,
-      "width": 100,
+      "width": 120,
       "overHidden": true
     },
     {
@@ -61,7 +62,7 @@
       "prop": "warehouseType",
       "search": true,
       "index": 6,
-      "width": 100,
+      "width": 120,
       "overHidden": true
     },
     {
@@ -69,7 +70,7 @@
       "prop": "businessDate",
       "search": true,
       "index": 7,
-      "width": 100,
+      "width": 120,
       "overHidden": true,
       "type": "date",
       "format": "yyyy-MM-dd",
@@ -80,7 +81,7 @@
       "prop": "createTime",
       "search": true,
       "index": 8,
-      "width": 100,
+      "width": 120,
       "overHidden": true,
       "type": "date",
       "format": "yyyy-MM-dd",
@@ -91,7 +92,7 @@
       "prop": "deliveryAmount",
       "search": false,
       "index": 9,
-      "width": 100,
+      "width": 120,
       "overHidden": true
     },
     {
@@ -99,7 +100,7 @@
       "prop": "totalQuantity",
       "search": false,
       "index": 10,
-      "width": 100,
+      "width": 120,
       "overHidden": true
     },
     {
@@ -107,7 +108,7 @@
       "prop": "totalCost",
       "search": false,
       "index": 11,
-      "width": 100,
+      "width": 120,
       "overHidden": true
     },
     {
@@ -115,7 +116,7 @@
       "prop": "deliveryRemarks",
       "search": false,
       "index": 12,
-      "width": 100,
+      "width": 120,
       "overHidden": true
     }
   ]

+ 50 - 2
src/views/exportTrade/receipt/detailsPage.vue

@@ -43,6 +43,7 @@
           :option="tableOption"
           @row-del="rowDel"
           @saveColumn="saveColumn"
+          :summary-method="summaryMethod"
         >
           <template slot="menuLeft">
             <el-button
@@ -218,7 +219,11 @@ import {
 } from "@/api/exportTrade/receipt";
 import uploadFile from "@/components/upload-file/main";
 import reportDialog from "@/components/report-dialog/main";
-import { isvalidatemobile, validatename } from "@/util/validate";
+import {
+  isvalidatemobile,
+  validatename,
+  micrometerFormat
+} from "@/util/validate";
 import _ from "lodash";
 export default {
   name: "detailsPageEdit",
@@ -374,7 +379,7 @@ export default {
         total: 0
       },
       loading: false,
-      goodsOption: goodsOption,
+      goodsOption: {},
       data: [],
       goodsList: [],
       selectionList: [],
@@ -399,6 +404,10 @@ export default {
       this.getColumnName(7),
       tableOption
     );
+    this.goodsOption = await this.getColumnData(
+      this.getColumnName(29),
+      goodsOption
+    );
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
@@ -600,6 +609,34 @@ export default {
     onClose(val) {
       this.switchDialog = val;
     },
+    summaryMethod({ columns, data }) {
+      const sums = [];
+      if (columns.length > 0) {
+        columns.forEach((item, index) => {
+          sums[0] = "合计";
+          if (
+            item.property == "actualQuantity" ||
+            item.property == "contractAmount"
+          ) {
+            let qtySum = 0;
+            let amountSum = 0;
+            data.forEach(e => {
+              qtySum = _.add(qtySum, Number(e.actualQuantity));
+              amountSum = _.add(amountSum, Number(e.contractAmount));
+            });
+            //数量总计
+            if (item.property == "actualQuantity") {
+              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+            }
+            //金额总计
+            if (item.property == "contractAmount") {
+              sums[index] = micrometerFormat(amountSum);
+            }
+          }
+        });
+      }
+      return sums;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(7),
@@ -610,6 +647,17 @@ export default {
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
+    },
+    async saveGoodsColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(29),
+        this.goodsOption
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+      }
     }
   }
 };

+ 39 - 2
src/views/exportTrade/receipt/index.vue

@@ -15,6 +15,7 @@
         @on-load="onLoad"
         :table-loading="loading"
         @saveColumn="saveColumn"
+        :summary-method="summaryMethod"
       >
         <template slot="menuLeft">
           <el-button
@@ -66,7 +67,8 @@
 import option from "./config/mainList.json";
 import { getList, remove } from "@/api/exportTrade/receipt";
 import detailPage from "./detailsPage.vue";
-
+import { micrometerFormat } from "@/util/validate";
+import _ from "lodash";
 export default {
   name: "customerInformation",
   data() {
@@ -80,7 +82,7 @@ export default {
       },
       search: {},
       form: {},
-      option:{},
+      option: {},
       parentId: 0,
       dataList: [],
       page: {
@@ -186,6 +188,41 @@ export default {
       this.detailData = this.$options.data().detailData;
       this.show = true;
     },
+    summaryMethod({ columns, data }) {
+      const sums = [];
+      if (columns.length > 0) {
+        columns.forEach((item, index) => {
+          sums[0] = "合计";
+          if (
+            item.property == "totalQuantity" ||
+            item.property == "deliveryAmount" ||
+            item.property == "totalCost"
+          ) {
+            let qtySum = 0;
+            let instoreSum = 0;
+            let totalSum = 0;
+            data.forEach(e => {
+              qtySum = _.add(qtySum, Number(e.totalQuantity));
+              instoreSum = _.add(instoreSum, Number(e.deliveryAmount));
+              totalSum= _.add(totalSum, Number(e.totalCost));
+            });
+            //数量总计
+            if (item.property == "totalQuantity") {
+              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+            }
+            //入库金额总计
+            if (item.property == "deliveryAmount") {
+              sums[index] = micrometerFormat(instoreSum);
+            }
+            //金额总计
+            if (item.property == "totalCost") {
+              sums[index] = micrometerFormat(totalSum);
+            }
+          }
+        });
+      }
+      return sums;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(6),

+ 0 - 1
src/views/exportTrade/salesContract/config/commodity.json

@@ -1,6 +1,5 @@
 
 {
-  "calcHeight": 80,
   "tip": false,
   "addBtn": false,
   "searchShow": false,

+ 13 - 12
src/views/exportTrade/salesContract/config/customerContact.json

@@ -12,32 +12,33 @@
   "menuWidth":150,
   "refreshBtn": false,
   "selection": true,
+  "showSummary": true,
   "column": [{
       "label": "产品类别",
       "prop": "priceCategory",
       "index": 1,
-      "width": 80,
+      "width": 120,
       "overHidden":true
     },
     {
       "label": "产品编号",
       "prop": "code",
       "index": 2,
-      "width": 80,
+      "width": 120,
       "overHidden":true
     },
     {
       "label": "产品名称",
       "prop": "cname",
       "index": 3,
-      "width": 80,
+      "width": 120,
       "overHidden":true
     },
     {
       "label": "产品属性",
       "prop": "itemProp",
       "index": 4,
-      "width": 80,
+      "width": 120,
       "overHidden":true,
       "cell": true,
       "type": "select",
@@ -51,7 +52,7 @@
       "label": "产品照片",
       "prop": "itemUrl",
       "index": 5,
-      "width": 80,
+      "width": 120,
       "overHidden":true,
       "hide":true
     },
@@ -59,7 +60,7 @@
       "label": "产品描述",
       "prop": "itemDescription",
       "index": 6,
-      "width": 80,
+      "width": 120,
       "overHidden":true,
       "cell": true
     },
@@ -67,20 +68,20 @@
       "label": "产品型号",
       "prop": "itemType",
       "index": 7,
-      "width": 80
+      "width": 120
     },
     {
       "label": "数量",
       "prop": "orderQuantity",
       "index": 8,
-      "width": 60,
+      "width": 120,
       "overHidden":true
     },
     {
       "label": "计价单位",
       "prop": "unit",
       "index": 9,
-      "width": 80,
+      "width": 120,
       "overHidden":true,
       "cell": true,
       "type": "select",
@@ -94,21 +95,21 @@
       "label": "单价",
       "prop": "price",
       "index": 10,
-      "width": 60,
+      "width": 120,
       "overHidden":true
     },
     {
       "label": "金额",
       "prop": "amount",
       "index": 11,
-      "width": 60,
+      "width": 120,
       "overHidden":true
     },
     {
       "label": "备注",
       "prop": "remarks",
       "index": 12,
-      "width": 60,
+      "width": 120,
       "overHidden":true,
       "cell": true
     }

+ 16 - 16
src/views/exportTrade/salesContract/config/mainList.json

@@ -14,14 +14,14 @@
       "prop": "sysNo",
       "search": true,
       "index": 1,
-      "width": 60,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
       "index": 2,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
@@ -29,7 +29,7 @@
       "prop": "orderStatus",
       "search": true,
       "index": 4,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "type": "select",
       "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
@@ -41,32 +41,32 @@
       "label": "业务员",
       "prop": "salesName",
       "index": 5,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "提成标准",
       "prop": "commissionRate",
       "index": 6,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "联系人",
       "prop": "corpAttn",
       "index": 7,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "电话",
       "prop": "corpTel",
       "index": 8,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "起运港",
       "prop": "portOfLoad",
       "search": true,
       "index": 9,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "type": "select",
       "filterable":true,
@@ -80,7 +80,7 @@
       "prop": "portOfDestination",
       "search": true,
       "index": 10,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "type": "select",
       "filterable":true,
@@ -93,13 +93,13 @@
       "label": "运输方式",
       "prop": "transport",
       "index": 11,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "价格条款",
       "prop": "priceTerms",
       "index": 12,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },{
       "label": "订单日期",
@@ -115,7 +115,7 @@
       "label": "有效日期",
       "prop": "dateValidity",
       "index": 15,
-      "width": 80,
+      "width": 100,
       "type": "date",
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd 00:00:00",
@@ -124,26 +124,26 @@
       "label": "收款方式",
       "prop": "paymentType",
       "index": 16,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "币别",
       "prop": "currency",
       "index": 17,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "汇率",
       "prop": "exchangeRate",
       "index": 18,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
       "label": "备注",
       "prop": "orderRemark",
       "index": 19,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }
   ]

+ 29 - 2
src/views/exportTrade/salesContract/detailsPage.vue

@@ -67,6 +67,7 @@
             @row-del="rowDel"
             @selection-change="goodsSelectionChange"
             @saveColumn="saveColumn"
+            :summary-method="summaryMethod"
           >
             <template slot="price" slot-scope="{ row }">
               <el-input
@@ -264,7 +265,7 @@ import {
 } from "@/api/basicData/salesContract";
 import _ from "lodash";
 import reportDialog from "@/components/report-dialog/main";
-import { isvalidatemobile, validatename } from "@/util/validate";
+import { isvalidatemobile, validatename,micrometerFormat } from "@/util/validate";
 export default {
   name: "detailsPageEdit",
   data() {
@@ -421,7 +422,7 @@ export default {
             valueFormat: "yyyy-MM-dd 00:00:00"
           },
           {
-            label: "有效日期",
+            label: "计划交期",
             prop: "dateValidity",
             span: 8,
             type: "date",
@@ -571,6 +572,7 @@ export default {
       this.getColumnName(5),
       tableOption
     );
+    console.log(this.tableOption)
     this.goodsOption = await this.getColumnData(
       this.getColumnName(28),
       goodsOption
@@ -860,6 +862,31 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     },
+    summaryMethod({ columns, data }) {
+      const sums = [];
+      if (columns.length > 0) {
+        columns.forEach((item, index) => {
+          sums[0] = "合计";
+          if (item.property == "orderQuantity" || item.property == "amount") {
+            let qtySum = 0;
+            let amountSum = 0;
+            data.forEach(e => {
+              qtySum = _.add(qtySum, Number(e.orderQuantity));
+              amountSum = _.add(amountSum, Number(e.amount));
+            });
+            //数量总计
+            if (item.property == "orderQuantity") {
+              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+            }
+            //金额总计
+            if (item.property == "amount") {
+              sums[index] = micrometerFormat(amountSum);
+            }
+          }
+        });
+      }
+      return sums;
+    },
     async saveGoodsColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(28),

+ 0 - 1
src/views/exportTrade/shippingInquiry/config/commodity.json

@@ -1,6 +1,5 @@
 
 {
-  "calcHeight": 80,
   "tip": false,
   "addBtn": false,
   "searchShow": false,

+ 16 - 15
src/views/exportTrade/shippingInquiry/config/customerContact.json

@@ -7,35 +7,36 @@
   "editBtn": false,
   "addBtn":false,
   "align": "center",
-  "menuWidth": 80,
+  "menuWidth": 120,
   "menu":false,
   "refreshBtn": false,
+  "showSummary": true,
   "column": [{
       "label": "产品类别",
       "prop": "priceCategory",
       "index": 1,
-      "width": 80,
+      "width": 120,
       "overHidden":true
     },
     {
       "label": "产品编号",
       "prop": "code",
       "index": 2,
-      "width": 80,
+      "width": 120,
       "overHidden":true
     },
     {
       "label": "产品名称",
       "prop": "cname",
       "index": 3,
-      "width": 80,
+      "width": 120,
       "overHidden":true
     },
     {
       "label": "产品属性",
       "prop": "itemProp",
       "index": 4,
-      "width": 80,
+      "width": 120,
       "overHidden":true,
       "cell": true,
       "type": "select",
@@ -49,7 +50,7 @@
       "label": "产品照片",
       "prop": "itemUrl",
       "index": 5,
-      "width": 80,
+      "width": 120,
       "overHidden":true,
       "hide":true
     },
@@ -57,7 +58,7 @@
       "label": "产品描述",
       "prop": "itemDescription",
       "index": 6,
-      "width": 80,
+      "width": 120,
       "overHidden":true,
       "cell": true
     },
@@ -65,14 +66,14 @@
       "label": "产品型号",
       "prop": "itemType",
       "index": 7,
-      "width": 80,
+      "width": 120,
       "cell": true
     },
     {
       "label": "数量",
       "prop": "orderQuantity",
       "index": 8,
-      "width": 60,
+      "width": 120,
       "overHidden":true,
       "cell": true
     },
@@ -80,7 +81,7 @@
       "label": "计价单位",
       "prop": "unit",
       "index": 9,
-      "width": 80,
+      "width": 120,
       "overHidden":true,
       "cell": true,
       "type": "select",
@@ -94,7 +95,7 @@
       "label": "价格条款",
       "prop": "tradeTerms",
       "index": 10,
-      "width": 80,
+      "width": 120,
       "overHidden":true,
       "cell": true,
       "type": "select",
@@ -108,7 +109,7 @@
       "label": "单价",
       "prop": "price",
       "index": 11,
-      "width": 60,
+      "width": 120,
       "overHidden":true,
       "cell": true
     },
@@ -116,7 +117,7 @@
       "label": "金额",
       "prop": "amount",
       "index": 12,
-      "width": 60,
+      "width": 120,
       "overHidden":true,
       "cell": true
     },
@@ -124,7 +125,7 @@
       "label": "税率",
       "prop": "taxRate",
       "index": 13,
-      "width": 60,
+      "width": 120,
       "overHidden":true,
       "cell": true
     },
@@ -132,7 +133,7 @@
       "label": "备注",
       "prop": "remarks",
       "index": 14,
-      "width": 60,
+      "width": 120,
       "overHidden":true,
       "cell": true
     }

+ 15 - 15
src/views/exportTrade/shippingInquiry/config/mainList.json

@@ -8,20 +8,20 @@
   "delBtn": false,
   "addBtn": false,
   "align": "center",
-  "menuWidth": "180",
+  "menuWidth": "150",
   "column": [{
       "label": "系统号",
       "prop": "sysNo",
       "search": true,
       "index": 1,
-      "width": 60,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
       "index": 2,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     },
     {
@@ -29,7 +29,7 @@
       "prop": "orderStatus",
       "search": true,
       "index": 4,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "type": "select",
       "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
@@ -41,20 +41,20 @@
       "label": "联系人",
       "prop": "corpAttn",
       "index": 5,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "电话",
       "prop": "corpTel",
       "index": 6,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "起运港",
       "prop": "portOfLoad",
       "search": true,
       "index": 7,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "type": "select",
       "filterable": true,
@@ -68,7 +68,7 @@
       "prop": "portOfDestination",
       "search": true,
       "index": 8,
-      "width": 80,
+      "width": 100,
       "overHidden": true,
       "type": "select",
       "filterable": true,
@@ -81,13 +81,13 @@
       "label": "运输方式",
       "prop": "transport",
       "index": 9,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "价格条款",
       "prop": "priceTerms",
       "index": 10,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "订单日期",
@@ -103,7 +103,7 @@
       "label": "有效日期",
       "prop": "dateValidity",
       "index": 13,
-      "width": 80,
+      "width": 100,
       "type": "date",
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd 00:00:00",
@@ -112,25 +112,25 @@
       "label": "收款方式",
       "prop": "paymentType",
       "index": 14,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "币别",
       "prop": "currency",
       "index": 15,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "汇率",
       "prop": "exchangeRate",
       "index": 16,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }, {
       "label": "备注",
       "prop": "orderRemark",
       "index": 20,
-      "width": 80,
+      "width": 100,
       "overHidden": true
     }
   ]

+ 48 - 2
src/views/exportTrade/shippingInquiry/detailsPage.vue

@@ -51,6 +51,7 @@
           :option="tableOption"
           @row-del="rowDel"
           @saveColumn="saveColumn"
+          :summary-method="summaryMethod"
         >
           <!-- <template slot="menuLeft">
             <el-button
@@ -140,7 +141,12 @@ import {
   getPorts
 } from "@/api/basicData/shippingInquiry";
 import reportDialog from "@/components/report-dialog/main";
-import { isvalidatemobile, validatename } from "@/util/validate";
+import {
+  isvalidatemobile,
+  validatename,
+  micrometerFormat
+} from "@/util/validate";
+import _ from "lodash";
 export default {
   name: "detailsPageEdit",
   data() {
@@ -367,7 +373,7 @@ export default {
         total: 0
       },
       loading: false,
-      goodsOption: goodsOption,
+      goodsOption: {},
       data: [],
       goodsList: [],
       selectionList: [],
@@ -389,6 +395,10 @@ export default {
       this.getColumnName(13),
       tableOption
     );
+    this.goodsOption = await this.getColumnData(
+      this.getColumnName(32),
+      goodsOption
+    );
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
@@ -523,6 +533,31 @@ export default {
     onClose(val) {
       this.switchDialog = val;
     },
+    summaryMethod({ columns, data }) {
+      const sums = [];
+      if (columns.length > 0) {
+        columns.forEach((item, index) => {
+          sums[0] = "合计";
+          if (item.property == "orderQuantity" || item.property == "amount") {
+            let qtySum = 0;
+            let amountSum = 0;
+            data.forEach(e => {
+              qtySum = _.add(qtySum, Number(e.orderQuantity));
+              amountSum = _.add(amountSum, Number(e.amount));
+            });
+            //数量总计
+            if (item.property == "orderQuantity") {
+              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+            }
+            //金额总计
+            if (item.property == "amount") {
+              sums[index] = micrometerFormat(amountSum);
+            }
+          }
+        });
+      }
+      return sums;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(13),
@@ -533,6 +568,17 @@ export default {
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
+    },
+    async saveGoodsColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(32),
+        this.goodsOption
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+      }
     }
   }
 };