QuKatie hace 3 años
padre
commit
9d41b01004

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

@@ -9,6 +9,7 @@
   "addBtn": false,
   "align": "center",
   "menuWidth": "180",
+  "showSummary": true,
   "searchIcon": true,
   "searchIndex": 2,
   "column": [{

+ 39 - 0
src/views/exportTrade/customerInquiry/index.vue

@@ -16,6 +16,7 @@
         :table-loading="loading"
         @saveColumn="saveColumn"
         :cell-style="cellStyle"
+        :summary-method="summaryMethod"
       >
         <template slot-scope="{ row }" slot="createUser">
           <span>{{ row.createUserName }}</span>
@@ -119,6 +120,8 @@ import option from "./config/mainList.json";
 import { getList, remove } from "@/api/basicData/customerInquiry";
 import detailPage from "./detailsPage.vue";
 import { defaultDate } from "@/util/date";
+import { micrometerFormat } from "@/util/validate";
+import _ from "lodash";
 export default {
   name: "customerInformation",
   data() {
@@ -249,6 +252,7 @@ export default {
           orderStartDate: this.search.businesDate[0],
           orderEndDate: this.search.businesDate[1]
         };
+        delete params.businesDate;
       }
       this.loading = true;
       getList(page.currentPage, page.pageSize, params)
@@ -263,6 +267,41 @@ export default {
           this.loading = false;
         });
     },
+    summaryMethod({ columns, data }) {
+      const sums = [];
+      if (columns.length > 0) {
+        columns.forEach((item, index) => {
+          sums[0] = "合计";
+          if (
+            item.property == "orderQuantity" ||
+            item.property == "amount" ||
+            item.property == "purchaseAmount"
+          ) {
+            let qtySum = 0;
+            let instoreSum = 0;
+            let totalSum = 0;
+            data.forEach(e => {
+              qtySum = _.add(qtySum, Number(e.orderQuantity));
+              instoreSum = _.add(instoreSum, Number(e.amount));
+              totalSum = _.add(totalSum, Number(e.purchaseAmount));
+            });
+            //数量总计
+            if (item.property == "orderQuantity") {
+              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+            }
+            //入库金额总计
+            if (item.property == "amount") {
+              sums[index] = micrometerFormat(instoreSum);
+            }
+            //金额总计
+            if (item.property == "purchaseAmount") {
+              sums[index] = micrometerFormat(totalSum);
+            }
+          }
+        });
+      }
+      return sums;
+    },
     refreshChange() {
       this.onLoad(this.page, this.search);
     },

+ 18 - 16
src/views/exportTrade/invoice/config/mainList.json

@@ -1,6 +1,6 @@
 {
   "searchShow": true,
-  "searchMenuSpan": 8,
+  "searchMenuSpan": 24,
   "border": true,
   "index": true,
   "viewBtn": false,
@@ -17,7 +17,7 @@
       "label": "销售订单号",
       "prop": "orgOrderNo",
       "index": 1,
-      "width": 100,
+      "width": 110,
       "overHidden": true,
       "search": true,
       "searchSpan": 8
@@ -28,16 +28,16 @@
       "search": true,
       "searchSpan": 8,
       "index": 2,
-      "width": 100,
+      "width": 110,
       "overHidden": true
     },
     {
       "label": "所属公司",
-      "prop": "belongToCorpName",
+      "prop": "salesCompany",
       "search": true,
       "searchSpan": 8,
       "index": 3,
-      "width": 100,
+      "width": 110,
       "overHidden": true
     },
     {
@@ -46,7 +46,7 @@
       "search": true,
       "searchSpan": 8,
       "index": 4,
-      "width": 100,
+      "width": 110,
       "overHidden": true,
       "type": "date",
       "format": "yyyy-MM-dd",
@@ -57,7 +57,7 @@
       "prop": "",
       "search": true,
       "index": 5,
-      "width": 100,
+      "width": 110,
       "overHidden": true,
       "hide": true,
       "showColumn": false,
@@ -66,22 +66,24 @@
     {
       "label": "仓库",
       "prop": "storageId",
+      "search": true,
+      "searchSpan": 8,
       "index": 6,
-      "width": 100,
+      "width": 110,
       "overHidden": true
     },
     {
       "label": "出库数量",
       "prop": "totalQuantity",
       "index": 7,
-      "width": 100,
+      "width": 110,
       "overHidden": true
     },
     {
       "label": "出库金额",
       "prop": "deliveryAmount",
       "index": 8,
-      "width": 100,
+      "width": 110,
       "overHidden": true
     },
     {
@@ -90,7 +92,7 @@
       "search": true,
       "searchSpan": 8,
       "index": 9,
-      "width": 100,
+      "width": 110,
       "overHidden": true
     },
     {
@@ -99,7 +101,7 @@
       "search": true,
       "searchSpan": 8,
       "index": 10,
-      "width": 100,
+      "width": 110,
       "overHidden": true
     },
     {
@@ -108,7 +110,7 @@
       "search": true,
       "searchSpan": 8,
       "index": 11,
-      "width": 100,
+      "width": 110,
       "overHidden": true
     },
     {
@@ -117,14 +119,14 @@
       "search": true,
       "searchSpan": 8,
       "index": 12,
-      "width": 100,
+      "width": 110,
       "overHidden": true
     },
     {
       "label": "制单日期",
       "prop": "createTime",
       "index": 13,
-      "width": 100,
+      "width": 110,
       "search": true,
       "overHidden": true,
       "searchSpan": 8
@@ -133,7 +135,7 @@
       "label": "制单人",
       "prop": "createUser",
       "index": 14,
-      "width": 100,
+      "width": 110,
       "search": true,
       "overHidden": true,
       "searchSpan": 8

+ 14 - 0
src/views/exportTrade/invoice/detailsPage.vue

@@ -47,6 +47,13 @@
               :disabled="detailData.status == 1"
             ></select-component>
           </template>
+          <template slot="storageId">
+            <warehouse-select
+              v-model="form.storageId"
+              :configuration="configuration2"
+              :disabled="detailData.status == 1"
+            ></warehouse-select>
+          </template>
         </avue-form>
       </basic-container>
       <containerTitle title="商品信息"></containerTitle>
@@ -264,6 +271,13 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: []
       },
+      configuration2: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: []
+      },
       switchDialog: false,
       form: {
         deliveryStatus: "录入"

+ 32 - 0
src/views/exportTrade/invoice/index.vue

@@ -18,9 +18,24 @@
         :summary-method="summaryMethod"
         :cell-style="cellStyle"
       >
+        <template slot-scope="{ row }" slot="salesCompany">
+          <span>{{ row.salesCompanyName }}</span>
+        </template>
+        <template slot-scope="{ row }" slot="storageId">
+          <span>{{ row.storageName }}</span>
+        </template>
+        <template slot-scope="{ row }" slot="createUser">
+          <span>{{ row.createUserName }}</span>
+        </template>
         <template slot-scope="scope" slot="corpId">
           {{ scope.row.corpsName }}
         </template>
+        <template slot="storageIdSearch">
+          <warehouse-select
+            v-model="search.storageId"
+            :configuration="configuration2"
+          ></warehouse-select>
+        </template>
         <template slot="businessDateSearch">
           <el-date-picker
             v-model="search.businessDate"
@@ -96,6 +111,7 @@ import option from "./config/mainList.json";
 import { getList, remove } from "@/api/basicData/invoice";
 import detailPage from "./detailsPage.vue";
 import { micrometerFormat } from "@/util/validate";
+import { defaultDate } from "@/util/date";
 import _ from "lodash";
 export default {
   name: "customerInformation",
@@ -108,6 +124,13 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: []
       },
+      configuration2: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: []
+      },
       search: {},
       form: {},
       option: {},
@@ -125,6 +148,7 @@ export default {
   },
   components: { detailPage },
   async created() {
+    this.search.businessDate = defaultDate();
     this.option = await this.getColumnData(this.getColumnName(8), option);
     if (this.$route.query.pageType == "Generate") {
       this.newAdd();
@@ -218,6 +242,14 @@ export default {
       this.page.pageSize = val;
     },
     onLoad(page, params) {
+      if (this.search.businesDate && this.search.businesDate.length > 0) {
+        params = {
+          ...params,
+          orderStartDate: this.search.businesDate[0],
+          orderEndDate: this.search.businesDate[1]
+        };
+        delete params.businesDate;
+      }
       this.loading = true;
       getList(page.currentPage, page.pageSize, params)
         .then(res => {

+ 73 - 68
src/views/exportTrade/purchaseContract/config/mainList.json

@@ -1,6 +1,6 @@
 {
   "searchShow": true,
-  "searchMenuSpan": 6,
+  "searchMenuSpan": 16,
   "border": true,
   "index": true,
   "viewBtn": false,
@@ -11,123 +11,128 @@
   "menuWidth": "180",
   "searchLabelWidth": "90",
   "searchIcon": true,
-  "searchIndex": 3,
-  "column": [{
-      "label": "系统号",
-      "prop": "sysNo",
+  "searchIndex": 2,
+  "column": [
+    {
+      "label": "客户名称",
+      "prop": "corpId",
       "search": true,
+      "searchSpan":8,
       "index": 1,
       "width": 100,
       "overHidden": true
-    }, {
-      "label": "客户名称",
-      "prop": "corpId",
+    },
+    {
+      "label": "采购订单号",
+      "prop": "orderNo",
       "search": true,
+      "searchSpan":8,
       "index": 2,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "采购订单号",
-      "prop": "orderNo",
+      "label": "采购日期",
+      "prop": "businesDate",
+      "search": true,
+      "searchSpan":8,
       "index": 3,
       "width": 100,
       "overHidden": true
     }, {
-      "label": "订单状态",
-      "prop": "orderStatus",
+      "label": "预交日期",
+      "prop": "plannedDeliveryDate",
       "search": true,
+      "searchSpan":8,
       "index": 4,
       "width": 100,
+      "overHidden": true
+    }, {
+      "label": "实交日期",
+      "prop": "requiredDeliveryDate",
+      "search": true,
+      "searchSpan":8,
+      "index": 5,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "付款方式",
+      "prop": "paymentType",
+      "index": 6,
+      "width": 100,
+      "search": true,
+      "searchSpan":8,
       "overHidden": true,
       "type": "select",
-      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
       "props": {
         "label": "dictValue",
         "value": "dictValue"
       }
-    }, {
-      "label": "联系人",
-      "prop": "corpAttn",
+    },
+    {
+      "label": "采购金额",
+      "prop": "purchaseAmount",
       "index": 7,
       "width": 100,
       "overHidden": true
-    }, {
-      "label": "电话",
-      "prop": "corpTel",
+    },
+    {
+      "label": "数量合计",
+      "prop": "orderQuantity",
       "index": 8,
       "width": 100,
       "overHidden": true
-    }, {
-      "label": "采购日期",
-      "prop": "businesDate",
-      "search": true,
+    },
+    {
+      "label": "收货金额",
+      "prop": "",
       "index": 9,
       "width": 100,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
       "overHidden": true
-    }, {
-      "label": "预计交货日期",
-      "prop": "plannedDeliveryDate",
+    },
+    {
+      "label": "收货数量",
+      "prop": "",
       "index": 10,
       "width": 100,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
       "overHidden": true
-    }, {
-      "label": "实际交货日",
-      "prop": "requiredDeliveryDate",
+    },
+    {
+      "label": "系统号",
+      "prop": "sysNo",
       "search": true,
       "index": 11,
       "width": 100,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
-      "overHidden": true
-    }, {
-      "label": "是否开票",
-      "prop": "ifInvoice",
-      "index": 12,
-      "width": 100,
-      "overHidden": true
+      "overHidden": true,
+      "searchSpan":8
     },
     {
-      "label": "收款方式",
-      "prop": "paymentType",
-      "index": 13,
+      "label": "制单人",
+      "prop": "createUser",
+      "index": 12,
       "width": 100,
       "search": true,
-      "type": "select",
-      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=payment_term",
-      "props": {
-        "label": "dictValue",
-        "value": "dictValue"
-      },
-      "overHidden": true
-    },
-    {
-      "label": "币别",
-      "prop": "currency",
-      "index": 14,
-      "width": 100,
-      "overHidden": true
+      "overHidden": true,
+      "searchSpan":8
     },
     {
-      "label": "汇率",
-      "prop": "exchangeRate",
-      "index": 15,
+      "label": "制单日期",
+      "prop": "createTime",
+      "index": 13,
       "width": 100,
-      "overHidden": true
+      "search": true,
+      "overHidden": true,
+      "searchSpan":8
     },
     {
       "label": "备注",
       "prop": "orderRemark",
-      "index": 16,
+      "index": 14,
       "width": 100,
-      "overHidden": true
+      "overHidden": true,
+      "search": true,
+      "searchSpan":8
     }
   ]
 }

+ 38 - 1
src/views/exportTrade/purchaseContract/index.vue

@@ -17,6 +17,18 @@
         @saveColumn="saveColumn"
         :cell-style="cellStyle"
       >
+        <template slot="createTimeSearch">
+          <el-date-picker
+            v-model="search.createTime"
+            type="daterange"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :default-time="['00:00:00', '23:59:59']"
+          >
+          </el-date-picker>
+        </template>
         <template slot="menuLeft">
           <el-button
             type="primary"
@@ -46,6 +58,18 @@
           >
           </el-date-picker>
         </template>
+        <template slot="plannedDeliveryDateSearch">
+          <el-date-picker
+            v-model="search.plannedDeliveryDate"
+            type="daterange"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :default-time="['00:00:00', '23:59:59']"
+          >
+          </el-date-picker>
+        </template>
         <template slot="requiredDeliveryDateSearch">
           <el-date-picker
             v-model="search.requiredDeliveryDate"
@@ -94,7 +118,7 @@
 import option from "./config/mainList.json";
 import { getList, remove } from "@/api/exportTrade/purchaseContract";
 import detailPage from "./detailsPage.vue";
-
+import { defaultDate } from "@/util/date";
 export default {
   name: "customerInformation",
   data() {
@@ -123,6 +147,7 @@ export default {
   },
   components: { detailPage },
   async created() {
+    this.search.businesDate = defaultDate();
     this.option = await this.getColumnData(this.getColumnName(2), option);
     let _this = this;
     this.option.column.forEach(e => {
@@ -143,6 +168,10 @@ export default {
         };
       }
     });
+    this.getWorkDicts("payment_term").then(res => {
+      this.findObject(this.option.column, "paymentType").dicData =
+        res.data.data;
+    });
   },
   methods: {
     cellStyle() {
@@ -203,6 +232,14 @@ export default {
       this.page.pageSize = val;
     },
     onLoad(page, params) {
+      if (this.search.businesDate && this.search.businesDate.length > 0) {
+        params = {
+          ...params,
+          orderStartDate: this.search.businesDate[0],
+          orderEndDate: this.search.businesDate[1]
+        };
+        delete params.businesDate;
+      }
       this.loading = true;
       getList(page.currentPage, page.pageSize, params)
         .then(res => {

+ 56 - 64
src/views/exportTrade/receipt/config/mainList.json

@@ -12,114 +12,106 @@
   "searchLabelWidth": "90",
   "showSummary": true,
   "searchIcon": true,
-  "searchIndex": 3,
+  "searchIndex": 2,
   "column": [{
-      "label": "系统号",
-      "prop": "sysNo",
-      "search": true,
+      "label": "销售订单号",
+      "prop": "orgOrderNo",
       "index": 1,
-      "width": 120,
-      "overHidden": true
-    },
-    {
-      "label": "客户名称",
-      "prop": "corpId",
+      "width": 110,
+      "overHidden": true,
       "search": true,
-      "index": 2,
-      "width": 120,
-      "overHidden": true
+      "searchSpan": 8
     },
     {
       "label": "采购订单号",
       "prop": "srcOrderNo",
       "search": true,
+      "searchSpan": 8,
       "index": 3,
       "width": 120,
       "overHidden": true
     },
     {
-      "label": "订单状态",
-      "prop": "deliveryStatus",
-      "search": true,
-      "index": 4,
-      "width": 120,
-      "overHidden": true,
-      "type": "select",
-      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
-      "props": {
-        "label": "dictValue",
-        "value": "dictValue"
-      }
-    },
-    {
-      "label": "仓库名称",
-      "prop": "storageId",
-      "search": true,
-      "index": 5,
-      "width": 120,
-      "overHidden": true
-    },
-    {
-      "label": "仓库类型",
-      "prop": "warehouseType",
+      "label": "客户名称",
+      "prop": "corpId",
       "search": true,
-      "index": 6,
-      "width": 120,
+      "searchSpan": 8,
+      "index": 2,
+      "width": 110,
       "overHidden": true
     },
     {
-      "label": "收货日期",
+      "label": "入库日期",
       "prop": "businessDate",
       "search": true,
-      "index": 7,
-      "width": 120,
+      "searchSpan": 8,
+      "index": 4,
+      "width": 110,
       "overHidden": true,
       "type": "date",
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd 00:00:00"
     },
     {
-      "label": "制单时间",
-      "prop": "createTime",
+      "label": "商品名称",
+      "prop": "",
       "search": true,
-      "index": 8,
-      "width": 120,
+      "index": 5,
+      "width": 110,
       "overHidden": true,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd 00:00:00"
+      "hide": true,
+      "showColumn": false,
+      "searchSpan": 8
     },
     {
-      "label": "入库金额",
-      "prop": "deliveryAmount",
-      "search": false,
-      "index": 9,
-      "width": 120,
+      "label": "仓库",
+      "prop": "storageId",
+      "search": true,
+      "searchSpan": 8,
+      "index": 6,
+      "width": 110,
       "overHidden": true
     },
     {
       "label": "入库数量",
       "prop": "totalQuantity",
-      "search": false,
-      "index": 10,
-      "width": 120,
+      "index": 7,
+      "width": 110,
       "overHidden": true
     },
     {
-      "label": "费用合计",
-      "prop": "totalCost",
-      "search": false,
-      "index": 11,
-      "width": 120,
+      "label": "入库金额",
+      "prop": "deliveryAmount",
+      "index": 8,
+      "width": 110,
       "overHidden": true
     },
     {
       "label": "备注",
       "prop": "deliveryRemarks",
-      "search": false,
+      "search": true,
+      "searchSpan": 8,
       "index": 12,
-      "width": 120,
+      "width": 110,
       "overHidden": true
+    },
+    {
+      "label": "制单日期",
+      "prop": "createTime",
+      "index": 13,
+      "width": 110,
+      "search": true,
+      "overHidden": true,
+      "searchSpan": 8
+    },
+    {
+      "label": "制单人",
+      "prop": "createUser",
+      "index": 14,
+      "width": 110,
+      "search": true,
+      "overHidden": true,
+      "searchSpan": 8
     }
   ]
 }

+ 41 - 0
src/views/exportTrade/receipt/index.vue

@@ -29,6 +29,36 @@
           <el-button type="success" size="small" disabled>复制新单</el-button>
           <el-button type="info" size="small">报表</el-button>
         </template>
+        <template slot-scope="{ row }" slot="storageId">
+          <span>{{ row.storageName }}</span>
+        </template>
+        <template slot-scope="{ row }" slot="createUser">
+          <span>{{ row.createUserName }}</span>
+        </template>
+        <template slot="businessDateSearch">
+          <el-date-picker
+            v-model="search.businessDate"
+            type="daterange"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :default-time="['00:00:00', '23:59:59']"
+          >
+          </el-date-picker>
+        </template>
+        <template slot="createTimeSearch">
+          <el-date-picker
+            v-model="search.createTime"
+            type="daterange"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :default-time="['00:00:00', '23:59:59']"
+          >
+          </el-date-picker>
+        </template>
         <template slot="corpIdSearch">
           <select-component
             v-model="search.corpId"
@@ -72,6 +102,7 @@ import option from "./config/mainList.json";
 import { getList, remove } from "@/api/exportTrade/receipt";
 import detailPage from "./detailsPage.vue";
 import { micrometerFormat } from "@/util/validate";
+import { defaultDate } from "@/util/date";
 import _ from "lodash";
 export default {
   name: "customerInformation",
@@ -101,6 +132,7 @@ export default {
   },
   components: { detailPage },
   async created() {
+    this.search.businessDate = defaultDate();
     this.option = await this.getColumnData(this.getColumnName(6), option);
     if (this.$route.query.pageType == "Generate") {
       this.newAdd();
@@ -184,6 +216,15 @@ export default {
       this.page.pageSize = val;
     },
     onLoad(page, params) {
+      if (this.search.businesDate && this.search.businesDate.length > 0) {
+        params = {
+          ...params,
+          orderStartDate: this.search.businesDate[0],
+          orderEndDate: this.search.businesDate[1]
+        };
+        delete params.businesDate;
+      }
+      this.loading = true;
       getList(page.currentPage, page.pageSize, params)
         .then(res => {
           this.dataList = res.data.data.records ? res.data.data.records : [];

+ 8 - 7
src/views/exportTrade/salesContract/index.vue

@@ -188,13 +188,14 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        remove(row.id);
-        this.$message({
-          type: "success",
-          message: "删除成功!"
+        remove(row.id).then(res => {
+          this.$message({
+            type: "success",
+            message: "删除成功!"
+          });
+          this.page.currentPage = 1;
+          this.onLoad(this.page);
         });
-        this.page.currentPage = 1;
-        this.onLoad(this.page);
       });
     },
     //查看跳转页面
@@ -231,13 +232,13 @@ export default {
       this.page.pageSize = val;
     },
     onLoad(page, params) {
-      console.log(this.search.businesDate)
       if (this.search.businesDate && this.search.businesDate.length > 0) {
         params = {
           ...params,
           orderStartDate: this.search.businesDate[0],
           orderEndDate: this.search.businesDate[1]
         };
+        delete params.businesDate;
       }
       getList(page.currentPage, page.pageSize, params).then(res => {
         this.dataList = res.data.data.records ? res.data.data.records : [];