luobang 2 vuotta sitten
vanhempi
commit
e4acc11020

+ 8 - 2
build/utils.js

@@ -19,8 +19,14 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 // let devModules = ["index", "TMS", "appoint", "WMS", "queue"];
 // let devModules = ["index", "statisticalReport", "inward"];
 // let devModules = ["index", "WMS", "inward"];
-let devModules = ["all"];
-
+let devModules = [
+  "index",
+  "inward",
+  "RMS",
+  "statisticalReport",
+  "WMS",
+  "appoint"
+];
 if (pathSrc.indexOf("node_modules") > -1) {
   devModules = require("../../../cors.js").devModules;
 }

+ 2 - 2
config/index.js

@@ -65,8 +65,8 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://172.16.33.166:80",
-    // target: "http://localhost:8080",
+    // target: "http://172.16.33.166:80",
+    target: "http://localhost:8080",
     // target: "http://192.168.1.101:8080",
     ws: true,
     pathRewrite: {

+ 1 - 1
src/components/DilCommonUI/packages/table/src/table.vue

@@ -305,7 +305,7 @@ export default {
                 return prev;
               }
             }, 0);
-            sums[index];
+            sums[index] = sums[index].toFixed(3);
           } else {
             sums[index] = "N/A";
           }

+ 10 - 0
src/views/appoint/components/inward/transPrice.vue

@@ -24,6 +24,13 @@
             :isKuang="isKuang"
             @func="func"
           >
+            <el-table-column label="操作" width="120px" fixed="right">
+              <template slot-scope="scope">
+                <el-button type="text" @click="updatePriceMaterial(scope.row)">
+                  修改价格物资
+                </el-button>
+              </template>
+            </el-table-column>
           </dilTable>
         </el-tab-pane>
         <!-- 历史启用 -->
@@ -62,6 +69,9 @@ export default {
     };
   },
   methods: {
+    updatePriceMaterial(row) {
+      console.log(row);
+    },
     func() {
       this.loading = false;
       this.isKuang = false;

+ 116 - 59
src/views/inward/components/inwardSettlement/detailOrder.vue

@@ -47,7 +47,7 @@
             clearable
           ></el-input>
         </el-form-item>
-        <span>详单时间:</span>
+        <span>净重时间:</span>
         <el-date-picker
           v-model="startTime"
           type="datetime"
@@ -66,9 +66,10 @@
         <el-button type="primary" class="btn" @click="onclick">
           <i class="el-icon-search"></i>
         </el-button>
-        <el-button type="primary" @click="exportData()"
+        <el-button type="primary" @click="exportAllExcel"
           ><i class="el-icon-download"></i>Excel</el-button
         >
+        <el-button type="primary" @click="newSettle">生成详单</el-button>
       </el-form>
     </div>
     <div class="table">
@@ -189,7 +190,10 @@ export default {
       exportAllList: [],
       noSettleDetailsColumn: [],
       settleDetailsColumn: [],
-      noDetailsColumn: []
+      noDetailsColumn: [],
+      orderList1: [],
+      orderList2: [],
+      orderList3: []
     };
   },
   created() {
@@ -198,7 +202,17 @@ export default {
     this.options3GetRequestUrl();
   },
   methods: {
+    handClick() {
+      if (this.activeName == "first") {
+        this.options1GetRequestUrl();
+      } else if (this.activeName == "second") {
+        this.options2GetRequestUrl();
+      } else {
+        this.options3GetRequestUrl();
+      }
+    },
     func(res) {
+      console.log(res);
       this.noSettleDetailsColumn = res.columnData;
       var totalWeight = 0;
       var totalAllMoney = 0;
@@ -208,13 +222,48 @@ export default {
       });
       this.totalNetWeight = totalWeight.toFixed(2) + "t";
       this.totalMoney = totalAllMoney.toFixed(2) + "元";
+      this.orderList1 = [];
+      res.list.forEach(e => {
+        let map = {
+          orderLineSeq: e.orderLineSeq,
+          orderId: e.orderId
+        };
+        this.orderList1.push(map);
+      });
     },
     func2(res) {
       this.settleDetailsColumn = res.columnData;
     },
     func3(res) {
+      console.log(res.list);
+      console.log("res");
+      this.orderList3 = [];
+      res.list.forEach(e => {
+        let map = {
+          orderLineSeq: e.orderLineSeq,
+          orderId: e.orderId
+        };
+        this.orderList3.push(map);
+      });
       this.noDetailsColumn = res.columnData;
     },
+    newSettle() {
+      console.log(this.orderList);
+      let orderList = [];
+      if (this.activeName == "third") {
+        orderList = this.orderList3;
+      } else {
+        orderList = this.orderList1;
+      }
+      debugger;
+      this.axios
+        .post("/api/v1/bms/newInwardSettle", { orderIds: orderList })
+        .then(res => {
+          console.log(res);
+          this.$message.success("生成成功");
+          this.options3GetRequestUrl();
+        });
+    },
     exportAllExcel() {
       let startTime = null;
       let endTime = null;
@@ -345,7 +394,8 @@ export default {
               "&i" +
               new Date() +
               "&orgCode=" +
-              orgCode
+              orgCode +
+              "&isPage=yes"
           )
           .then(res => {
             this.exportAllList = res.data.data;
@@ -433,7 +483,8 @@ export default {
       }
     },
     options3GetRequestUrl() {
-      this.options3.requestUrl = "/api/v1/bms/getNoInwardDetails?apiId=490";
+      this.options3.requestUrl =
+        "/api/v1/bms/getNoInwardDetails?apiId=490&i=" + new Date();
     },
     toInsert() {
       this.$router.push("/insertCheckInventory");
@@ -487,60 +538,66 @@ export default {
       if (this.screen1 == "用车单位") {
         shipperNames = this.input1;
       }
-      this.options1.requestUrl =
-        "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" +
-        "&startTime=" +
-        startTime +
-        "&endTime=" +
-        endTime +
-        "&shipperNames=" +
-        shipperNames +
-        "&materialTypeNames=" +
-        materialTypeNames +
-        "&transRangeValues=" +
-        transRangeValues +
-        "&capacityNo=" +
-        capacityNo +
-        "&i" +
-        new Date() +
-        "&orgCode=" +
-        orgCode;
-      this.options2.requestUrl =
-        "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
-        "&startTime=" +
-        startTime +
-        "&endTime=" +
-        endTime +
-        "&shipperNames=" +
-        shipperNames +
-        "&materialTypeNames=" +
-        materialTypeNames +
-        "&transRangeValues=" +
-        transRangeValues +
-        "&capacityNo=" +
-        capacityNo +
-        "&i" +
-        new Date() +
-        "&orgCode=" +
-        orgCode;
-      this.options3.requestUrl =
-        "/api/v1/bms/getNoInwardDetails?apiId=490" +
-        "&startTime=" +
-        startTime +
-        "&endTime=" +
-        endTime +
-        "&shipperNames=" +
-        shipperNames +
-        "&materialTypeNames=" +
-        materialTypeNames +
-        "&transRangeValues=" +
-        transRangeValues +
-        "&capacityNo=" +
-        capacityNo +
-        "&i" +
-        new Date() +
-        "&orgCode=" +
-        orgCode;
+      if (this.activeName == "first") {
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" +
+          "&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&shipperNames=" +
+          shipperNames +
+          "&materialTypeNames=" +
+          materialTypeNames +
+          "&transRangeValues=" +
+          transRangeValues +
+          "&capacityNo=" +
+          capacityNo +
+          "&i" +
+          new Date() +
+          "&orgCode=" +
+          orgCode;
+      }
+      if (this.activeName == "second") {
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
+          "&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&shipperNames=" +
+          shipperNames +
+          "&materialTypeNames=" +
+          materialTypeNames +
+          "&transRangeValues=" +
+          transRangeValues +
+          "&capacityNo=" +
+          capacityNo +
+          "&i" +
+          new Date() +
+          "&orgCode=" +
+          orgCode;
+      }
+      if (this.activeName == "third") {
+        this.options3.requestUrl =
+          "/api/v1/bms/getNoInwardDetails?apiId=490" +
+          "&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&shipperNames=" +
+          shipperNames +
+          "&materialTypeNames=" +
+          materialTypeNames +
+          "&transRangeValues=" +
+          transRangeValues +
+          "&capacityNo=" +
+          capacityNo +
+          "&i" +
+          new Date() +
+          "&orgCode=" +
+          orgCode;
+      }
     },
     //运输订单点击浏览的事件
     select() {

+ 66 - 52
src/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue

@@ -80,30 +80,34 @@
           <el-button type="primary" class="btn" @click="onclick">
             <i class="el-icon-search"></i>
           </el-button>
+          <el-button type="primary" class="btn" @click="batchOperate"
+            >批量保存</el-button
+          >
         </el-form-item>
         <el-form-item>
-            <el-autocomplete
-              class="inline-input"
-              v-model="receiveName"
-              :fetch-suggestions="querySearchConsignee"
-              placeholder="请输入收货单位名称"
-              @select="handleSelectionChange()">
-            </el-autocomplete>
+          <el-autocomplete
+            class="inline-input"
+            v-model="receiveName"
+            :fetch-suggestions="querySearchConsignee"
+            placeholder="请输入收货单位名称"
+            @select="handleSelectionChange()"
+          >
+          </el-autocomplete>
         </el-form-item>
-         <el-form-item>
-           <el-select
-              size="mini"
-              v-model="sendStationId"
-              @change="handleMulSendChange()"
+        <el-form-item>
+          <el-select
+            size="mini"
+            v-model="sendStationId"
+            @change="handleMulSendChange()"
+          >
+            <el-option
+              v-for="item in sendStationList"
+              :key="item.sendStationId"
+              :label="item.sendStation"
+              :value="item.sendStationId"
             >
-              <el-option
-                v-for="item in sendStationList"
-                :key="item.sendStationId"
-                :label="item.sendStation"
-                :value="item.sendStationId"
-              >
-              </el-option>
-            </el-select>
+            </el-option>
+          </el-select>
         </el-form-item>
       </el-form>
     </div>
@@ -119,12 +123,12 @@
         :cell-style="{ fontWeight: '700' }"
         class="table"
         :span-method="objectSpanMethod"
-        @selection-change="handleSelectionChange();handleMulSendChange()"
+        @selection-change="
+          handleSelectionChange();
+          handleMulSendChange();
+        "
       >
-        <el-table-column
-          type="selection"
-          width="55">
-        </el-table-column>
+        <el-table-column type="selection" width="55"> </el-table-column>
         <el-table-column
           prop="index"
           width="50"
@@ -338,7 +342,7 @@ export default {
       //收货客户列表
       consigneeList: [],
       receiveName: null,
-      sendStationId: null,
+      sendStationId: null
     };
   },
   created() {
@@ -348,30 +352,42 @@ export default {
     this.information();
   },
   methods: {
-    handleSelectionChange(){
+    batchOperate() {
+      console.log(this.$refs.tableRef.data);
+      this.axios
+        .post(
+          "/api/v1/ams/batchUpdateInwardConsignee",
+          this.$refs.tableRef.data
+        )
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("批量保存成功");
+            this.getRequestUrl();
+          }
+        });
+    },
+    handleSelectionChange() {
       //批量绑定收货客户
-      let selection=this.$refs.tableRef.selection;
-      console.log("selection:",selection);
-      if(!selection)
-        return;
+      let selection = this.$refs.tableRef.selection;
+      console.log("selection:", selection);
+      if (!selection) return;
       this.consigneeList.forEach(e => {
         if (e.consigneeCompanyName == this.receiveName) {
-           selection.forEach((row)=>{
-              row.receiveName = e.consigneeCompanyName;
-              row.consigneeId = e.consigneeId;
+          selection.forEach(row => {
+            row.receiveName = e.consigneeCompanyName;
+            row.consigneeId = e.consigneeId;
           });
         }
       });
     },
-    handleMulSendChange(){
+    handleMulSendChange() {
       //批量绑定发站
-      let selection=this.$refs.tableRef.selection;
-      console.log("selection:",selection);
-      if(!selection || !this.sendStationId)
-        return;
-      selection.forEach((row)=>{
-          row.sendStationId = this.sendStationId;
-          this.changesendStation(row);
+      let selection = this.$refs.tableRef.selection;
+      console.log("selection:", selection);
+      if (!selection || !this.sendStationId) return;
+      selection.forEach(row => {
+        row.sendStationId = this.sendStationId;
+        this.changesendStation(row);
       });
     },
     handleSelectConsignee(row, index, item) {
@@ -401,16 +417,14 @@ export default {
               cb(results);
             }
           });
-      }else{
-          //历史收货客户
-          this.axios
-            .post("/api/v1/uc/getConsigneeHistory")
-            .then(res => {
-              if (res.data.code == "200") {
-                console.log(res);
-                this.consigneeList = res.data.data;
-                cb(this.consigneeList);
-              }
+      } else {
+        //历史收货客户
+        this.axios.post("/api/v1/uc/getConsigneeHistory").then(res => {
+          if (res.data.code == "200") {
+            console.log(res);
+            this.consigneeList = res.data.data;
+            cb(this.consigneeList);
+          }
         });
       }
     },

+ 89 - 5
src/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue

@@ -58,6 +58,9 @@
           <el-button type="primary" class="btn" @click="onclick">
             <i class="el-icon-search"></i>
           </el-button>
+          <el-button type="primary" class="btn" @click="batchOperate"
+            >批量保存</el-button
+          >
         </el-form-item>
       </el-form>
     </div>
@@ -74,6 +77,7 @@
         :summary-method="getSummaries"
         show-summary
         class="table"
+        :span-method="objectSpanMethod"
       >
         <el-table-column width="50" label="序号" align="center" type="index">
         </el-table-column>
@@ -270,7 +274,7 @@
           prop="number"
           label="票号"
           align="center"
-          width="150px"
+          width="180px"
         >
         </el-table-column>
         <el-table-column
@@ -328,7 +332,9 @@ export default {
         "materialNum"
       ],
       operateName: "编辑",
-      unloadPointList: []
+      unloadPointList: [],
+      spanArr: [],
+      mergeList: [""]
     };
   },
   created() {
@@ -338,6 +344,47 @@ export default {
     this.showSummariesPosition();
   },
   methods: {
+    batchOperate() {
+      this.$refs.tableRef.data.forEach((e, index) => {
+        this.$refs.tableRef.data.forEach((item, index) => {
+          if (
+            item.unloadPointId == null &&
+            e.consigneeId == item.consigneeId &&
+            e.consigneeId != null &&
+            e.unloadPointId != null
+          ) {
+            item.unloadPointId = e.unloadPointId;
+            item.unloadPoint = e.unloadPoint;
+          }
+        });
+      });
+      this.$refs.tableRef.data.forEach(row => {
+        row.personnelSsoId = getCookie("userId");
+        if (
+          (typeof row.EnStation == "object" ||
+            typeof row.EnStation == "string") &&
+          row.EnStation != null
+        ) {
+          row.EnStation = sjTime(new Date(row.EnStation));
+        }
+        if (
+          (typeof row.OutStation == "object" ||
+            typeof row.OutStation == "string") &&
+          row.OutStation != null
+        ) {
+          row.OutStation = sjTime(new Date(row.OutStation));
+        }
+      });
+      this.axios
+        .post("/api/v1/wms/listAfterInwardOutbound", this.$refs.tableRef.data)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("批量保存成功");
+            this.getRequestUrl();
+          }
+        });
+      console.log(this.$refs.tableRef.data);
+    },
     handleSelectWarehouse(row, index, item) {
       console.log(item);
       this.unloadPointList.forEach(e => {
@@ -446,11 +493,14 @@ export default {
             "&toTheStation=" +
             toTheStation +
             "&sendStation=" +
-            sendStation
+            sendStation +
+            "&i=" +
+            new Date()
         )
         .then(res => {
           this.tableData = res.data.data;
           this.showSummariesPosition();
+          this.getSpanArr();
         });
     },
     //获取后台数据
@@ -463,6 +513,7 @@ export default {
         .then(res => {
           console.log(res.data.data);
           this.tableData = res.data.data;
+          this.getSpanArr();
           this.showSummariesPosition();
         });
     },
@@ -513,16 +564,49 @@ export default {
                 return prev;
               }
             }, 0);
-            sums[index];
+            sums[index] = sums[index].toFixed(2);
+            // console.log("sums");
+            // console.log(sums[index]);
           } else {
             sums[index] = "N/A";
           }
         }
         //遍历数组,找到符合条件的列
       });
-
       return sums;
     },
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          data[i].group = i;
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].trainOrderId === data[i - 1].trainOrderId) {
+            this.spanArr[this.pos] += 1;
+            data[i].group = data[i - 1].group;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+            data[i].group = data[i - 1].group + 1;
+          }
+        }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList.includes(column.property)) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
     //导出Excel
     exportAllReportToExcel() {
       console.log(this.$refs.tableRef);