QuKatie 3 years ago
parent
commit
96e28c1947

+ 9 - 3
src/views/exportTrade/customerInquiry/config/mainList.json

@@ -28,7 +28,9 @@
       "index": 2,
       "width": 100,
       "overHidden": true,
-      "searchSpan":8
+      "searchSpan":8,
+      "type": "date",
+      "format": "yyyy-MM-dd"
     },
     {
       "label": "有效日期",
@@ -37,7 +39,9 @@
       "index": 3,
       "width": 100,
       "overHidden": true,
-      "searchSpan":8
+      "searchSpan":8,
+      "type": "date",
+      "format": "yyyy-MM-dd"
     },
     {
       "label": "价格条款",
@@ -184,7 +188,9 @@
       "width": 100,
       "search": true,
       "overHidden": true,
-      "searchSpan":8
+      "searchSpan":8,
+      "type": "date",
+      "format": "yyyy-MM-dd"
     },
     {
       "label": "备注",

+ 32 - 25
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="borderless">
+  <div class="borderless" v-loading="loading">
     <div class="customer-head">
       <div class="customer-back">
         <!--        <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
@@ -11,20 +11,19 @@
           >返回列表
         </el-button>
       </div>
-      <el-button type="info" class="sell-customer-btn" @click="saveSell"
-        >生成销售单</el-button
-      >
-      <el-button type="success" class="copy-customer-btn" disabled>
-        复制新单
-      </el-button>
-      <el-button
-        class="add-customer-btn"
-        type="primary"
-        :disabled="disabled"
-        @click="editCustomer"
-        :loading="subLoading"
-        >{{ form.id ? "确认修改" : "确认新增" }}
-      </el-button>
+      <div class="add-customer-btn" v-if="showBut">
+        <el-button type="info" @click="saveSell">生成销售单</el-button>
+        <el-button type="success" disabled>
+          复制新单
+        </el-button>
+        <el-button
+          type="primary"
+          :disabled="disabled"
+          @click="editCustomer"
+          :loading="subLoading"
+          >{{ form.id ? "确认修改" : "确认新增" }}
+        </el-button>
+      </div>
     </div>
     <div style="margin-top: 60px;margin-bottom:35px">
       <containerTitle title="基础信息"></containerTitle>
@@ -670,7 +669,8 @@ export default {
       olddata: [],
       oldorderFeesList: [],
       reData: null,
-      subLoading: false
+      subLoading: true,
+      showBut: true
     };
   },
   props: {
@@ -982,15 +982,22 @@ export default {
       this.dialogVisible = !this.dialogVisible;
     },
     getDetail(id) {
-      detail(id).then(res => {
-        this.form = res.data.data;
-        this.data = res.data.data.orderItemsList;
-        this.orderFeesList = res.data.data.orderFeesList;
-        this.configuration.dicData = this.form.corpName;
-        this.oldform = res.data.data;
-        this.olddata = this.deepClone(res.data.data.orderItemsList);
-        this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
-      });
+      this.loading = true;
+      this.showBut = false;
+      detail(id)
+        .then(res => {
+          this.form = res.data.data;
+          this.data = res.data.data.orderItemsList;
+          this.orderFeesList = res.data.data.orderFeesList;
+          this.configuration.dicData = this.form.corpName;
+          this.oldform = res.data.data;
+          this.olddata = this.deepClone(res.data.data.orderItemsList);
+          this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
+        })
+        .finally(() => {
+          this.loading = false;
+          this.showBut = true;
+        });
     },
     //修改提交触发
     editCustomer(status) {

+ 10 - 4
src/views/exportTrade/customerInquiry/index.vue

@@ -84,7 +84,7 @@
           {{ scope.row.corpsName }}
         </template>
         <template slot-scope="scope" slot="grossProfitRate">
-          {{ scope.row.grossProfitRate }}%
+          {{ scope.row.grossProfitRate ? scope.row.grossProfitRate : 0 }}%
         </template>
         <template slot-scope="scope" slot="menu">
           <el-button
@@ -134,7 +134,9 @@ export default {
         dicData: [],
         clearable: true
       },
-      search: {},
+      search: {
+        businesDate: defaultDate()
+      },
       form: {},
       option: {},
       parentId: 0,
@@ -151,7 +153,6 @@ export default {
   },
   components: { detailPage },
   async created() {
-    this.search.businesDate = defaultDate();
     /**
      * 已定义全局方法,直接使用,getColumnData获取列数据,参数传值(表格名称,引入的本地JSON的数据定义的名称)
      * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
@@ -260,7 +261,7 @@ export default {
           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 - 460;
+            this.option.height = window.innerHeight - 450;
           }
         })
         .finally(() => {
@@ -328,6 +329,11 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     }
+  },
+  watch: {
+    option: function() {
+      this.search.businesDate = defaultDate();
+    }
   }
 };
 </script>

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

@@ -23,17 +23,19 @@
       "searchSpan": 8
     },
     {
-      "label": "客户名称",
-      "prop": "corpId",
+      "label": "出库日期",
+      "prop": "businessDate",
       "search": true,
       "searchSpan": 8,
       "index": 2,
       "width": 110,
-      "overHidden": true
+      "overHidden": true,
+      "type": "date",
+      "format": "yyyy-MM-dd"
     },
     {
-      "label": "所属公司",
-      "prop": "salesCompany",
+      "label": "客户名称",
+      "prop": "corpId",
       "search": true,
       "searchSpan": 8,
       "index": 3,
@@ -41,16 +43,13 @@
       "overHidden": true
     },
     {
-      "label": "出库日期",
-      "prop": "businessDate",
+      "label": "所属公司",
+      "prop": "salesCompany",
       "search": true,
       "searchSpan": 8,
       "index": 4,
       "width": 110,
-      "overHidden": true,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd 00:00:00"
+      "overHidden": true
     },
     {
       "label": "商品名称",
@@ -129,7 +128,9 @@
       "width": 110,
       "search": true,
       "overHidden": true,
-      "searchSpan": 8
+      "searchSpan": 8,
+      "type": "date",
+      "format": "yyyy-MM-dd"
     },
     {
       "label": "制单人",

+ 13 - 9
src/views/exportTrade/invoice/index.vue

@@ -131,7 +131,9 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: []
       },
-      search: {},
+      search: {
+        businessDate: defaultDate()
+      },
       form: {},
       option: {},
       parentId: 0,
@@ -148,7 +150,6 @@ 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();
@@ -242,13 +243,13 @@ export default {
       this.page.pageSize = val;
     },
     onLoad(page, params) {
-      if (this.search.businesDate && this.search.businesDate.length > 0) {
+      if (this.search.businessDate && this.search.businessDate.length > 0) {
         params = {
           ...params,
-          orderStartDate: this.search.businesDate[0],
-          orderEndDate: this.search.businesDate[1]
+          orderStartDate: this.search.businessDate[0],
+          orderEndDate: this.search.businessDate[1]
         };
-        delete params.businesDate;
+        delete params.businessDate;
       }
       this.loading = true;
       getList(page.currentPage, page.pageSize, params)
@@ -256,9 +257,7 @@ export default {
           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 - 435;
-          } else {
-            this.option.height = window.innerHeight - 360;
+            this.option.height = window.innerHeight - 500;
           }
         })
         .finally(() => {
@@ -329,6 +328,11 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     }
+  },
+  watch: {
+    option: function() {
+      this.search.businessDate = defaultDate();
+    }
   }
 };
 </script>

+ 29 - 21
src/views/exportTrade/purchaseContract/config/mainList.json

@@ -12,49 +12,55 @@
   "searchLabelWidth": "90",
   "searchIcon": true,
   "searchIndex": 2,
-  "column": [
-    {
+  "column": [{
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
-      "searchSpan":8,
+      "searchSpan": 8,
       "index": 1,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "采购订单号",
-      "prop": "orderNo",
+      "label": "采购日期",
+      "prop": "businesDate",
       "search": true,
-      "searchSpan":8,
+      "searchSpan": 8,
       "index": 2,
       "width": 100,
-      "overHidden": true
+      "overHidden": true,
+      "type": "date",
+      "format": "yyyy-MM-dd"
     },
     {
-      "label": "采购日期",
-      "prop": "businesDate",
+      "label": "采购订单号",
+      "prop": "orderNo",
       "search": true,
-      "searchSpan":8,
+      "searchSpan": 8,
       "index": 3,
       "width": 100,
       "overHidden": true
-    }, {
+    },
+    {
       "label": "预交日期",
       "prop": "plannedDeliveryDate",
       "search": true,
-      "searchSpan":8,
+      "searchSpan": 8,
       "index": 4,
       "width": 100,
-      "overHidden": true
+      "overHidden": true,
+      "type": "date",
+      "format": "yyyy-MM-dd"
     }, {
       "label": "实交日期",
       "prop": "requiredDeliveryDate",
       "search": true,
-      "searchSpan":8,
+      "searchSpan": 8,
       "index": 5,
       "width": 100,
-      "overHidden": true
+      "overHidden": true,
+      "type": "date",
+      "format": "yyyy-MM-dd"
     },
     {
       "label": "付款方式",
@@ -62,7 +68,7 @@
       "index": 6,
       "width": 100,
       "search": true,
-      "searchSpan":8,
+      "searchSpan": 8,
       "overHidden": true,
       "type": "select",
       "props": {
@@ -93,7 +99,7 @@
     },
     {
       "label": "收货数量",
-      "prop": "",
+      "prop": "actualQuantity",
       "index": 10,
       "width": 100,
       "overHidden": true
@@ -105,7 +111,7 @@
       "index": 11,
       "width": 100,
       "overHidden": true,
-      "searchSpan":8
+      "searchSpan": 8
     },
     {
       "label": "制单人",
@@ -114,7 +120,7 @@
       "width": 100,
       "search": true,
       "overHidden": true,
-      "searchSpan":8
+      "searchSpan": 8
     },
     {
       "label": "制单日期",
@@ -123,7 +129,9 @@
       "width": 100,
       "search": true,
       "overHidden": true,
-      "searchSpan":8
+      "searchSpan": 8,
+      "type": "date",
+      "format": "yyyy-MM-dd"
     },
     {
       "label": "备注",
@@ -132,7 +140,7 @@
       "width": 100,
       "overHidden": true,
       "search": true,
-      "searchSpan":8
+      "searchSpan": 8
     }
   ]
 }

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

@@ -359,7 +359,7 @@ export default {
             ]
           },
           {
-            label: "预日期",
+            label: "预交日期",
             prop: "plannedDeliveryDate",
             span: 8,
             type: "date",
@@ -367,7 +367,7 @@ export default {
             valueFormat: "yyyy-MM-dd 00:00:00"
           },
           {
-            label: "实日期",
+            label: "实交日期",
             prop: "requiredDeliveryDate",
             span: 8,
             type: "date",

+ 13 - 6
src/views/exportTrade/purchaseContract/index.vue

@@ -83,7 +83,10 @@
           </el-date-picker>
         </template>
         <template slot-scope="scope" slot="corpId">
-          {{ scope.row.corpsName }}
+          {{ scope.row.strCorpName }}
+        </template>
+        <template slot-scope="scope" slot="createUser">
+          {{ scope.row.createUserName }}
         </template>
         <template slot-scope="scope" slot="menu">
           <el-button
@@ -130,7 +133,9 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: []
       },
-      search: {},
+      search: {
+        businesDate: defaultDate()
+      },
       form: {},
       option: {},
       parentId: 0,
@@ -147,7 +152,6 @@ 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 => {
@@ -246,9 +250,7 @@ export default {
           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 - 380;
-          } else {
-            this.option.height = window.innerHeight - 305;
+            this.option.height = window.innerHeight - 450;
           }
         })
         .finally(() => {
@@ -279,6 +281,11 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     }
+  },
+  watch: {
+    option: function() {
+      this.search.businesDate = defaultDate();
+    }
   }
 };
 </script>

+ 92 - 91
src/views/exportTrade/purchaseInquiry/config/mainList.json

@@ -1,6 +1,6 @@
 {
   "searchShow": true,
-  "searchMenuSpan": 12,
+  "searchMenuSpan": 24,
   "border": true,
   "index": true,
   "viewBtn": false,
@@ -10,136 +10,137 @@
   "align": "center",
   "menuWidth": "180",
   "searchIcon": true,
-  "searchIndex": 3,
+  "searchIndex": 2,
+  "showSummary": true,
   "column": [{
-      "label": "系统号",
-      "prop": "sysNo",
+      "label": "客户名称",
+      "prop": "corpId",
       "search": true,
+      "searchSpan": 8,
       "index": 1,
-      "width": 100,
+      "width": 110,
       "overHidden": true
-    }, {
-      "label": "客户名称",
-      "prop": "corpId",
+    },
+    {
+      "label": "询价日期",
+      "prop": "businesDate",
       "search": true,
+      "searchSpan": 8,
       "index": 2,
-      "width": 100,
+      "width": 110,
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd 00:00:00",
       "overHidden": true
     },
     {
-      "label": "订单号",
-      "prop": "orderNo",
+      "label": "有效日期",
+      "prop": "dateValidity",
+      "search": true,
+      "searchSpan": 8,
       "index": 3,
-      "width": 100,
+      "width": 110,
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd 00:00:00",
       "overHidden": true
     },
     {
       "label": "订单状态",
       "prop": "orderStatus",
       "search": true,
+      "searchSpan": 8,
       "index": 4,
-      "width": 100,
+      "width": 110,
       "overHidden": true,
       "type": "select",
-      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
       "props": {
         "label": "dictValue",
         "value": "dictValue"
       }
-    }, {
-      "label": "联系人",
-      "prop": "corpAttn",
+    },
+    {
+      "label": "起运港",
+      "prop": "portOfLoad",
       "index": 5,
-      "width": 100,
+      "width": 110,
       "overHidden": true
-    }, {
-      "label": "电话",
-      "prop": "corpTel",
+    },
+    {
+      "label": "目的港",
+      "prop": "portOfDestination",
       "index": 6,
-      "width": 100,
+      "width": 110,
       "overHidden": true
-    }, {
-      "label": "起运港",
-      "prop": "portOfLoad",
-      "search": true,
+    },
+    {
+      "label": "数量合计",
+      "prop": "orderQuantity",
       "index": 7,
-      "width": 100,
-      "overHidden": true,
-      "type": "select",
-      "filterable": true,
-      "dicData": [],
-      "props": {
-        "label": "name",
-        "value": "name"
-      }
-    }, {
-      "label": "目的港",
-      "prop": "portOfDestination",
+      "width": 110,
+      "overHidden": true
+    },
+    {
+      "label": "商品名称",
+      "prop": "",
       "search": true,
       "index": 8,
-      "width": 100,
+      "width": 110,
       "overHidden": true,
-      "type": "select",
-      "filterable": true,
-      "dicData": [],
-      "props": {
-        "label": "name",
-        "value": "name"
-      }
-    }, {
-      "label": "运输方式",
-      "prop": "transport",
+      "hide": true,
+      "showColumn": false,
+      "searchSpan": 8
+    },
+    {
+      "label": "系统号",
+      "prop": "sysNo",
+      "search": true,
+      "searchSpan": 8,
       "index": 9,
-      "width": 100,
+      "width": 110,
       "overHidden": true
-    }, {
-      "label": "价格条款",
-      "prop": "priceTerms",
+    },
+    {
+      "label": "制单人",
+      "prop": "createUser",
       "index": 10,
-      "width": 100,
+      "width": 110,
+      "search": true,
+      "searchSpan": 8,
       "overHidden": true
-    }, {
-      "label": "订单日期",
-      "prop": "businesDate",
+    },
+    {
+      "label": "制单日期",
+      "prop": "createTime",
+      "index": 11,
+      "width": 110,
       "search": true,
-      "index": 12,
-      "width": 100,
+      "overHidden": true,
+      "searchSpan": 8,
       "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd 00:00:00",
-      "overHidden": true
-    }, {
-      "label": "有效日期",
-      "prop": "dateValidity",
+      "format": "yyyy-MM-dd"
+    },
+    {
+      "label": "备注",
+      "prop": "orderRemark",
+      "index": 12,
+      "width": 110,
+      "search": true,
+      "overHidden": true,
+      "searchSpan": 8
+    },
+    {
+      "label": "采购备注",
+      "prop": "purchaseRemark",
       "index": 13,
-      "width": 100,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd 00:00:00",
+      "width": 110,
       "overHidden": true
-    }, {
-      "label": "收款方式",
-      "prop": "paymentType",
+    },
+    {
+      "label": "销售备注",
+      "prop": "shippingRemark",
       "index": 14,
-      "width": 100,
-      "overHidden": true
-    }, {
-      "label": "币别",
-      "prop": "currency",
-      "index": 15,
-      "width": 100,
-      "overHidden": true
-    }, {
-      "label": "汇率",
-      "prop": "exchangeRate",
-      "index": 16,
-      "width": 100,
-      "overHidden": true
-    }, {
-      "label": "备注",
-      "prop": "orderRemark",
-      "index": 20,
-      "width": 100,
+      "width": 110,
       "overHidden": true
     }
   ]

+ 92 - 9
src/views/exportTrade/purchaseInquiry/index.vue

@@ -15,6 +15,7 @@
         @on-load="onLoad"
         :table-loading="loading"
         @saveColumn="saveColumn"
+        :summary-method="summaryMethod"
         :cell-style="cellStyle"
       >
         <template slot="menuLeft">
@@ -26,11 +27,44 @@
             :configuration="configuration"
           ></select-component>
         </template>
-        <template slot="portOfLoadSearch">
-          <port-info v-model="search.portOfLoad" />
+        <template slot="businesDateSearch">
+          <el-date-picker
+            v-model="search.businesDate"
+            type="daterange"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :default-time="['00:00:00', '23:59:59']"
+          >
+          </el-date-picker>
         </template>
-        <template slot="portOfDestinationSearch">
-          <port-info v-model="search.portOfDestination" />
+        <template slot="dateValiditySearch">
+          <el-date-picker
+            v-model="search.dateValidity"
+            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-scope="{ row }" slot="createUser">
+          <span>{{ row.createUserName }}</span>
         </template>
         <template slot-scope="scope" slot="corpId">
           {{ scope.row.corpName }}
@@ -68,7 +102,9 @@
 import option from "./config/mainList.json";
 import { getList, remove, getPorts } from "@/api/basicData/purchaseInquiry";
 import detailPage from "./detailsPage.vue";
-
+import { defaultDate } from "@/util/date";
+import { micrometerFormat } from "@/util/validate";
+import _ from "lodash";
 export default {
   name: "customerInformation",
   data() {
@@ -80,7 +116,9 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: []
       },
-      search: {},
+      search: {
+        businesDate: defaultDate()
+      },
       option: {},
       parentId: 0,
       dataList: [],
@@ -159,6 +197,21 @@ export default {
     },
     //点击搜索按钮触发
     searchChange(params, done) {
+      if (params.businesDate) {
+        params.orderStartDate = params.businesDate[0];
+        params.orderEndDate = params.businesDate[1];
+      }
+      if (params.dateValidity) {
+        params.plannedDeliveryStart = params.dateValidity[0];
+        params.plannedDeliveryEnd = params.dateValidity[1];
+      }
+      if (params.createTime) {
+        params.createTimeStart = params.createTime[0];
+        params.createTimeEnd = params.createTime[1];
+      }
+      delete params.businesDate;
+      delete params.dateValidity;
+      delete params.createTime;
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done();
@@ -171,15 +224,21 @@ 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 : [];
           this.page.total = res.data.data.total;
           if (this.page.total) {
-            this.option.height = window.innerHeight - 380;
-          } else {
-            this.option.height = window.innerHeight - 305;
+            this.option.height = window.innerHeight - 450;
           }
         })
         .finally(() => {
@@ -196,6 +255,25 @@ 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 == "orderQuantity") {
+            let qtySum = 0;
+            data.forEach(e => {
+              qtySum = _.add(qtySum, Number(e.orderQuantity));
+            });
+            //数量总计
+            if (item.property == "orderQuantity") {
+              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+            }
+          }
+        });
+      }
+      return sums;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(10),
@@ -207,6 +285,11 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     }
+  },
+  watch: {
+    option: function() {
+      this.search.businesDate = defaultDate();
+    }
   }
 };
 </script>

+ 26 - 24
src/views/exportTrade/receipt/config/mainList.json

@@ -13,22 +13,34 @@
   "showSummary": true,
   "searchIcon": true,
   "searchIndex": 2,
-  "column": [{
+  "column": [
+    {
       "label": "销售订单号",
       "prop": "orgOrderNo",
       "index": 1,
-      "width": 110,
+      "width": 130,
       "overHidden": true,
       "search": true,
       "searchSpan": 8
     },
     {
+      "label": "入库日期",
+      "prop": "businessDate",
+      "search": true,
+      "searchSpan": 8,
+      "index": 4,
+      "width": 130,
+      "overHidden": true,
+      "type": "date",
+      "format": "yyyy-MM-dd"
+    },
+    {
       "label": "采购订单号",
       "prop": "srcOrderNo",
       "search": true,
       "searchSpan": 8,
       "index": 3,
-      "width": 120,
+      "width": 130,
       "overHidden": true
     },
     {
@@ -37,27 +49,15 @@
       "search": true,
       "searchSpan": 8,
       "index": 2,
-      "width": 110,
+      "width": 130,
       "overHidden": true
     },
     {
-      "label": "入库日期",
-      "prop": "businessDate",
-      "search": true,
-      "searchSpan": 8,
-      "index": 4,
-      "width": 110,
-      "overHidden": true,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd 00:00:00"
-    },
-    {
       "label": "商品名称",
       "prop": "",
       "search": true,
       "index": 5,
-      "width": 110,
+      "width": 130,
       "overHidden": true,
       "hide": true,
       "showColumn": false,
@@ -69,21 +69,21 @@
       "search": true,
       "searchSpan": 8,
       "index": 6,
-      "width": 110,
+      "width": 130,
       "overHidden": true
     },
     {
       "label": "入库数量",
       "prop": "totalQuantity",
       "index": 7,
-      "width": 110,
+      "width": 130,
       "overHidden": true
     },
     {
       "label": "入库金额",
       "prop": "deliveryAmount",
       "index": 8,
-      "width": 110,
+      "width": 130,
       "overHidden": true
     },
     {
@@ -92,23 +92,25 @@
       "search": true,
       "searchSpan": 8,
       "index": 12,
-      "width": 110,
+      "width": 130,
       "overHidden": true
     },
     {
       "label": "制单日期",
       "prop": "createTime",
       "index": 13,
-      "width": 110,
+      "width": 130,
       "search": true,
       "overHidden": true,
-      "searchSpan": 8
+      "searchSpan": 8,
+      "type": "date",
+      "format": "yyyy-MM-dd"
     },
     {
       "label": "制单人",
       "prop": "createUser",
       "index": 14,
-      "width": 110,
+      "width": 130,
       "search": true,
       "overHidden": true,
       "searchSpan": 8

+ 14 - 0
src/views/exportTrade/receipt/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>
@@ -277,6 +284,13 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: []
       },
+      configuration2: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: []
+      },
       switchDialog: false,
       form: {
         deliveryStatus: "录入"

+ 23 - 9
src/views/exportTrade/receipt/index.vue

@@ -115,7 +115,9 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: []
       },
-      search: {},
+      search: {
+        businessDate: defaultDate()
+      },
       form: {},
       option: {},
       parentId: 0,
@@ -132,7 +134,6 @@ 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();
@@ -204,6 +205,16 @@ export default {
     },
     //点击搜索按钮触发
     searchChange(params, done) {
+      if (params.businessDate) {
+        params.orderStartDate = params.businessDate[0];
+        params.orderEndDate = params.businessDate[1];
+      }
+      if (params.createTime) {
+        params.createTimeStart = params.createTime[0];
+        params.createTimeEnd = params.createTime[1];
+      }
+      delete params.businessDate;
+      delete params.createTime;
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done();
@@ -216,13 +227,13 @@ export default {
       this.page.pageSize = val;
     },
     onLoad(page, params) {
-      if (this.search.businesDate && this.search.businesDate.length > 0) {
+      if (this.search.businessDate && this.search.businessDate.length > 0) {
         params = {
           ...params,
-          orderStartDate: this.search.businesDate[0],
-          orderEndDate: this.search.businesDate[1]
+          orderStartDate: this.search.businessDate[0],
+          orderEndDate: this.search.businessDate[1]
         };
-        delete params.businesDate;
+        delete params.businessDate;
       }
       this.loading = true;
       getList(page.currentPage, page.pageSize, params)
@@ -230,9 +241,7 @@ export default {
           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 - 435;
-          } else {
-            this.option.height = window.innerHeight - 360;
+            this.option.height = window.innerHeight - 450;
           }
         })
         .finally(() => {
@@ -303,6 +312,11 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     }
+  },
+  watch: {
+    option: function() {
+      this.search.businessDate = defaultDate();
+    }
   }
 };
 </script>

+ 17 - 10
src/views/exportTrade/salesContract/config/mainList.json

@@ -12,6 +12,7 @@
   "searchIcon": true,
   "searchIndex": 2,
   "searchLabelWidth": 90,
+  "showSummary": true,
   "column": [{
       "label": "客户名称",
       "prop": "corpId",
@@ -22,31 +23,35 @@
       "searchSpan":8
     },
     {
-      "label": "销售订单号",
-      "prop": "orderNo",
+      "label": "订单日期",
+      "prop": "businesDate",
+      "search": true,
       "index": 2,
       "width": 100,
       "overHidden": true,
-      "search": true,
-      "searchSpan":8
+      "searchSpan":8,
+      "type": "date",
+      "format": "yyyy-MM-dd"
     },
     {
-      "label": "订单日期",
-      "prop": "businesDate",
-      "search": true,
+      "label": "销售订单号",
+      "prop": "orderNo",
       "index": 3,
       "width": 100,
       "overHidden": true,
+      "search": true,
       "searchSpan":8
     },
     {
       "label": "预交日期",
-      "prop": "dateValidity",
+      "prop": "plannedDeliveryDate",
       "search": true,
       "index": 4,
       "width": 100,
       "overHidden": true,
-      "searchSpan":8
+      "searchSpan":8,
+      "type": "date",
+      "format": "yyyy-MM-dd"
     },
     {
       "label": "价格条款",
@@ -228,7 +233,9 @@
       "width": 100,
       "search": true,
       "overHidden": true,
-      "searchSpan":8
+      "searchSpan":8,
+      "type": "date",
+      "format": "yyyy-MM-dd"
     },
     {
       "label": "备注",

+ 1 - 1
src/views/exportTrade/salesContract/detailsPage.vue

@@ -540,7 +540,7 @@ export default {
           },
           {
             label: "预交日期",
-            prop: "dateValidity",
+            prop: "plannedDeliveryDate",
             span: 8,
             type: "date",
             format: "yyyy-MM-dd",

+ 104 - 5
src/views/exportTrade/salesContract/index.vue

@@ -15,6 +15,7 @@
         @on-load="onLoad"
         @saveColumn="saveColumn"
         :cell-style="cellStyle"
+        :summary-method="summaryMethod"
       >
         <template slot-scope="scope" slot="grossProfitRate">
           {{ scope.row.grossProfitRate }}%
@@ -57,9 +58,9 @@
           >
           </el-date-picker>
         </template>
-        <template slot="dateValiditySearch">
+        <template slot="plannedDeliveryDateSearch">
           <el-date-picker
-            v-model="search.dateValidity"
+            v-model="search.plannedDeliveryDate"
             type="daterange"
             start-placeholder="开始日期"
             end-placeholder="结束日期"
@@ -118,6 +119,8 @@ import option from "./config/mainList.json";
 import { getList, remove, getPorts } from "@/api/basicData/salesContract";
 import detailPage from "./detailsPage.vue";
 import { defaultDate } from "@/util/date";
+import { micrometerFormat } from "@/util/validate";
+import _ from "lodash";
 export default {
   name: "customerInformation",
   data() {
@@ -129,7 +132,9 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: []
       },
-      search: {},
+      search: {
+        businesDate: defaultDate()
+      },
       form: {},
       option: {},
       parentId: 0,
@@ -146,7 +151,6 @@ export default {
   },
   components: { detailPage },
   async created() {
-    this.search.businesDate = defaultDate();
     this.option = await this.getColumnData(this.getColumnName(4), option);
     let _this = this;
     this.option.column.forEach(e => {
@@ -219,7 +223,17 @@ export default {
         params.orderStartDate = params.businesDate[0];
         params.orderEndDate = params.businesDate[1];
       }
+      if (params.plannedDeliveryDate) {
+        params.plannedDeliveryStart = params.plannedDeliveryDate[0];
+        params.plannedDeliveryEnd = params.plannedDeliveryDate[1];
+      }
+      if (params.createTime) {
+        params.createTimeStart = params.createTime[0];
+        params.createTimeEnd = params.createTime[1];
+      }
       delete params.businesDate;
+      delete params.plannedDeliveryDate;
+      delete params.createTime;
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done();
@@ -244,7 +258,7 @@ export default {
         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 - 380;
+          this.option.height = window.innerHeight - 500;
         }
       });
     },
@@ -261,6 +275,86 @@ 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 == "minOrder" ||
+            item.property == "predictOceanFreight" ||
+            item.property == "referenceOceanFreight" ||
+            item.property == "oceanFreight" ||
+            item.property == "orderQuantity"||
+            item.property == "actualQuantity"||
+            item.property == "grossProfit"||
+            item.property == "amount"||
+            item.property == "purchaseAmount"
+          ) {
+            let qtySum = 0;
+            let instoreSum = 0;
+            let totalSum = 0;
+            let oceanFreightSum = 0;
+            let orderQuantitySum = 0;
+            let actualQuantitySum = 0;
+            let amountSum = 0;
+            let purchaseAmountSum = 0;
+            data.forEach(e => {
+              qtySum = _.add(qtySum, Number(e.minOrder));
+              instoreSum = _.add(instoreSum, Number(e.predictOceanFreight));
+              totalSum = _.add(totalSum, Number(e.referenceOceanFreight));
+              oceanFreightSum = _.add(oceanFreightSum, Number(e.oceanFreight));
+              orderQuantitySum = _.add(
+                orderQuantitySum,
+                Number(e.orderQuantity)
+              );
+              actualQuantitySum = _.add(
+                actualQuantitySum,
+                Number(e.actualQuantity)
+              );
+              amountSum = _.add(amountSum, Number(e.amount));
+              purchaseAmountSum = _.add(
+                purchaseAmountSum,
+                Number(e.purchaseAmount)
+              );
+            });
+            //数量总计
+            if (item.property == "minOrder") {
+              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+            }
+            //入库金额总计
+            if (item.property == "predictOceanFreight") {
+              sums[index] = micrometerFormat(instoreSum);
+            }
+            //金额总计
+            if (item.property == "referenceOceanFreight") {
+              sums[index] = micrometerFormat(totalSum);
+            }
+            //实际海运费
+            if (item.property == "oceanFreight") {
+              sums[index] = micrometerFormat(oceanFreightSum);
+            }
+            if (item.property == "orderQuantity") {
+              sums[index] = orderQuantitySum
+                ? orderQuantitySum.toFixed(2)
+                : "0.00";
+            }
+            if (item.property == "actualQuantity") {
+              sums[index] = actualQuantitySum
+                ? actualQuantitySum.toFixed(2)
+                : "0.00";
+            }
+            if (item.property == "amount") {
+              sums[index] = micrometerFormat(amountSum);
+            }
+            if (item.property == "purchaseAmount") {
+              sums[index] = micrometerFormat(purchaseAmountSum);
+            }
+          }
+        });
+      }
+      return sums;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(4),
@@ -272,6 +366,11 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     }
+  },
+  watch: {
+    option: function() {
+      this.search.businesDate = defaultDate();
+    }
   }
 };
 </script>

+ 60 - 110
src/views/exportTrade/shippingInquiry/config/mainList.json

@@ -1,6 +1,6 @@
 {
   "searchShow": true,
-  "searchMenuSpan": 12,
+  "searchMenuSpan": 8,
   "border": true,
   "index": true,
   "viewBtn": false,
@@ -8,138 +8,88 @@
   "delBtn": false,
   "addBtn": false,
   "align": "center",
-  "menuWidth": "150",
+  "menuWidth": "180",
   "searchIcon": true,
-  "searchIndex": 3,
-  "column": [{
-      "label": "系统号",
-      "prop": "sysNo",
-      "search": true,
-      "index": 1,
-      "width": 100,
-      "overHidden": true
-    }, {
-      "label": "客户名称",
-      "prop": "corpId",
+  "searchIndex": 2,
+  "column": [
+    {
+      "label": "询价日期",
+      "prop": "businesDate",
       "search": true,
+      "searchSpan": 8,
       "index": 2,
-      "width": 100,
+      "width": 180,
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd 00:00:00",
       "overHidden": true
     },
     {
-      "label": "订单号",
-      "prop": "orderNo",
+      "label": "有效日期",
+      "prop": "plannedDeliveryDate",
+      "search": true,
+      "searchSpan": 8,
       "index": 3,
-      "width": 100,
+      "width": 180,
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd 00:00:00",
       "overHidden": true
     },
     {
-      "label": "订单状态",
-      "prop": "orderStatus",
-      "search": true,
-      "index": 4,
-      "width": 100,
-      "overHidden": true,
-      "type": "select",
-      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
-      "props": {
-        "label": "dictValue",
-        "value": "dictValue"
-      }
-    }, {
-      "label": "联系人",
-      "prop": "corpAttn",
-      "index": 5,
-      "width": 100,
-      "overHidden": true
-    }, {
-      "label": "电话",
-      "prop": "corpTel",
-      "index": 6,
-      "width": 100,
-      "overHidden": true
-    }, {
       "label": "起运港",
       "prop": "portOfLoad",
       "search": true,
-      "index": 7,
-      "width": 100,
-      "overHidden": true,
-      "type": "select",
-      "filterable": true,
-      "dicData": [],
-      "props": {
-        "label": "name",
-        "value": "name"
-      }
-    }, {
+      "searchSpan": 8,
+      "index": 5,
+      "width": 180,
+      "overHidden": true
+    },
+    {
       "label": "目的港",
       "prop": "portOfDestination",
       "search": true,
-      "index": 8,
-      "width": 100,
-      "overHidden": true,
-      "type": "select",
-      "filterable": true,
-      "dicData": [],
-      "props": {
-        "label": "name",
-        "value": "name"
-      }
-    }, {
-      "label": "运输方式",
-      "prop": "transport",
+      "searchSpan": 8,
+      "index": 6,
+      "width": 180,
+      "overHidden": true
+    },
+    {
+      "label": "系统号",
+      "prop": "sysNo",
+      "search": true,
+      "searchSpan": 8,
       "index": 9,
-      "width": 100,
+      "width": 180,
       "overHidden": true
-    }, {
-      "label": "价格条款",
-      "prop": "priceTerms",
+    },
+    {
+      "label": "制单人",
+      "prop": "createUser",
       "index": 10,
-      "width": 100,
-      "overHidden": true
-    }, {
-      "label": "订单日期",
-      "prop": "businesDate",
+      "width": 180,
       "search": true,
-      "index": 12,
-      "width": 100,
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd 00:00:00",
+      "searchSpan": 8,
       "overHidden": true
-    }, {
-      "label": "有效日期",
-      "prop": "dateValidity",
-      "index": 13,
-      "width": 100,
+    },
+    {
+      "label": "制单日期",
+      "prop": "createTime",
+      "index": 11,
+      "width": 180,
+      "search": true,
+      "overHidden": true,
+      "searchSpan": 8,
       "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd 00:00:00",
-      "overHidden": true
-    }, {
-      "label": "收款方式",
-      "prop": "paymentType",
+      "format": "yyyy-MM-dd"
+    },
+    {
+      "label": "销售备注",
+      "prop": "shippingRemark",
+      "search": true,
+      "searchSpan": 8,
       "index": 14,
-      "width": 100,
-      "overHidden": true
-    }, {
-      "label": "币别",
-      "prop": "currency",
-      "index": 15,
-      "width": 100,
-      "overHidden": true
-    }, {
-      "label": "汇率",
-      "prop": "exchangeRate",
-      "index": 16,
-      "width": 100,
-      "overHidden": true
-    }, {
-      "label": "备注",
-      "prop": "orderRemark",
-      "index": 20,
-      "width": 100,
+      "width": 180,
       "overHidden": true
     }
   ]

+ 18 - 9
src/views/exportTrade/shippingInquiry/detailsPage.vue

@@ -121,11 +121,6 @@
           >
         </avue-crud>
       </basic-container>
-      <fee-info
-        ref="feeInfo"
-        :orderFeesList="orderFeesList"
-        feeUrl="/trade-purchase/shipping-enquiry/removeByFees"
-      />
     </div>
     <el-dialog
       title="导入商品"
@@ -189,7 +184,6 @@
 import tableOption from "./config/customerContact.json";
 import goodsOption from "./config/commodity.json";
 import freightOption from "./config/freight.json";
-import feeInfo from "@/components/fee-info/main";
 import customerDialog from "@/components/customer-dialog/main";
 import {
   detail,
@@ -262,11 +256,27 @@ export default {
           },
           {
             label: "计划交期",
-            prop: "dateValidity",
+            prop: "plannedDeliveryDate",
             span: 8,
             type: "date",
             format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00"
+            valueFormat: "yyyy-MM-dd 00:00:00",
+            row:true
+          },
+          {
+            label: "箱型",
+            prop: "boxPile",
+            span: 8
+          },
+          {
+            label: "箱量",
+            prop: "boxNumber",
+            span: 8
+          },
+          {
+            label: "起订量",
+            prop: "minOrder",
+            span: 8
           },
           {
             label: "销售指示",
@@ -324,7 +334,6 @@ export default {
   },
   components: {
     reportDialog,
-    feeInfo,
     customerDialog
   },
   async created() {

+ 62 - 0
src/views/exportTrade/shippingInquiry/index.vue

@@ -31,6 +31,45 @@
         <template slot="portOfDestinationSearch">
           <port-info v-model="search.portOfDestination" />
         </template>
+        <template slot="businesDateSearch">
+          <el-date-picker
+            v-model="search.businesDate"
+            type="daterange"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :default-time="['00:00:00', '23:59:59']"
+          >
+          </el-date-picker>
+        </template>
+        <template slot="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="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-scope="{ row }" slot="createUser">
+          <span>{{ row.createUserName }}</span>
+        </template>
         <template slot-scope="scope" slot="corpId">
           {{ scope.row.corpName }}
         </template>
@@ -135,6 +174,21 @@ export default {
     },
     //点击搜索按钮触发
     searchChange(params, done) {
+      if (params.businesDate) {
+        params.orderStartDate = params.businesDate[0];
+        params.orderEndDate = params.businesDate[1];
+      }
+      if (params.plannedDeliveryDate) {
+        params.plannedDeliveryStart = params.plannedDeliveryDate[0];
+        params.plannedDeliveryEnd = params.plannedDeliveryDate[1];
+      }
+      if (params.createTime) {
+        params.createTimeStart = params.createTime[0];
+        params.createTimeEnd = params.createTime[1];
+      }
+      delete params.businesDate;
+      delete params.plannedDeliveryDate;
+      delete params.createTime;
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done();
@@ -147,6 +201,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;
+      }
       getList(page.currentPage, page.pageSize, params).then(res => {
         this.dataList = res.data.data.records ? res.data.data.records : [];
         this.page.total = res.data.data.total;