zyf 2 år sedan
förälder
incheckning
355058ba8f
71 ändrade filer med 8416 tillägg och 3435 borttagningar
  1. 4 18
      build/utils.js
  2. 3 3
      config/index.js
  3. 48 0
      src/components/DilCommonUI/packages/table/src/table.vue
  4. 76 2
      src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue
  5. 10 0
      src/views/RMS/components/addContractPrice.vue
  6. 15 3
      src/views/RMS/components/contractPrice.vue
  7. 1 3
      src/views/TMS/components/bmsship/addTwoSectionHandleFee.vue
  8. 583 46
      src/views/TMS/components/bmsship/detailsStatement.vue
  9. 132 0
      src/views/TMS/components/bmsship/threeSectionFeeDetails.vue
  10. 283 0
      src/views/TMS/components/bmsship/updateThreeSectionFeeDetails.vue
  11. 36 12
      src/views/TMS/components/domesticMine/wagonLoadAdd.vue
  12. 2 2
      src/views/TMS/components/domesticMine/wagonLoadbu.vue
  13. 602 287
      src/views/TMS/components/importedEmergency/addWagonLoadEmergency.vue
  14. 6 3
      src/views/TMS/components/importedEmergency/wagonLoadEmergency.vue
  15. 85 109
      src/views/TMS/components/importedMine/addWagonLoad.vue
  16. 53 248
      src/views/TMS/components/importedMine/addWagonPlease.vue
  17. 15 5
      src/views/TMS/components/importedMine/addWagonloadCopy.vue
  18. 51 251
      src/views/TMS/components/importedMine/editWagonPlease.vue
  19. 82 17
      src/views/TMS/components/importedMine/outBoundWagon.vue
  20. 50 85
      src/views/TMS/components/importedMine/wagonPlease.vue
  21. 45 15
      src/views/TMS/components/importedShip/addLoadShip.vue
  22. 3 3
      src/views/TMS/components/importedShip/updateLoadShip.vue
  23. 15 2
      src/views/TMS/router/index.js
  24. 3 1
      src/views/WMS/components/billingOrder/updateBill.vue
  25. 206 109
      src/views/WMS/components/steel/addSteelInbound.vue
  26. 120 90
      src/views/WMS/components/steel/addSteelReserved.vue
  27. 208 110
      src/views/WMS/components/steel/bar1_steel/bar1_addSteelInbound.vue
  28. 115 90
      src/views/WMS/components/steel/bar1_steel/bar1_addSteelReserved.vue
  29. 135 70
      src/views/WMS/components/steel/bar1_steel/bar1_steel_inbound.vue
  30. 122 97
      src/views/WMS/components/steel/bar1_steel/bar1_steel_inboundStatistics.vue
  31. 28 21
      src/views/WMS/components/steel/bar1_steel/bar1_steel_reserved.vue
  32. 102 0
      src/views/WMS/components/steel/bar1_steel/inboundEas01.vue
  33. 208 110
      src/views/WMS/components/steel/bar2_steel/bar2_addSteelInbound.vue
  34. 121 91
      src/views/WMS/components/steel/bar2_steel/bar2_addSteelReserved.vue
  35. 135 78
      src/views/WMS/components/steel/bar2_steel/bar2_steel_inbound.vue
  36. 122 97
      src/views/WMS/components/steel/bar2_steel/bar2_steel_inboundStatistics.vue
  37. 29 22
      src/views/WMS/components/steel/bar2_steel/bar2_steel_reserved.vue
  38. 102 0
      src/views/WMS/components/steel/bar2_steel/inboundEas02.vue
  39. 103 0
      src/views/WMS/components/steel/inboundEas03.vue
  40. 139 116
      src/views/WMS/components/steel/steel_inbound.vue
  41. 145 118
      src/views/WMS/components/steel/steel_inboundStatistics.vue
  42. 39 38
      src/views/WMS/components/steel/steel_reserved.vue
  43. 21 0
      src/views/WMS/router/index.js
  44. 57 19
      src/views/appoint/components/saleContract/addSaleOrder.vue
  45. 138 7
      src/views/appoint/components/saleContract/editSaleOrder.vue
  46. 1 1
      src/views/appoint/components/saleContract/saleOrderSteel.vue
  47. 17 0
      src/views/appoint/components/ship/deliveryAttorney.vue
  48. 1 1
      src/views/appoint/components/ship/modifyDeliveryNotice.vue
  49. 252 226
      src/views/inward/components/inwardFactory/timeTaskResult.vue
  50. 194 30
      src/views/inward/components/inwardSettlement/detailOrder.vue
  51. 110 23
      src/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue
  52. 88 22
      src/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue
  53. 55 99
      src/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckPreview.vue
  54. 121 54
      src/views/inward/components/truckAppoint/addRequirement2.vue
  55. 45 0
      src/views/inward/components/truckOrder/purInwardTruckOrder.vue
  56. 2 4
      src/views/queue/components/qmsEnFacotory/queueFStart.vue
  57. 2 0
      src/views/queue/components/qmsEnFacotory/updateBill.vue
  58. 7 5
      src/views/sale/components/offSiteTransportation/checkGPS.vue
  59. 322 241
      src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailOrder.vue
  60. 531 0
      src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelDetails.vue
  61. 77 0
      src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelStatement.vue
  62. 732 223
      src/views/sale/router/index.js
  63. 205 0
      src/views/statisticalReport/components/ShipWorkReport.vue
  64. 112 107
      src/views/statisticalReport/components/Ship_dynamic_table.vue
  65. 245 0
      src/views/statisticalReport/components/dowmShipDynamicTable.vue
  66. 6 1
      src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelAllReport.vue
  67. 113 0
      src/views/statisticalReport/components/tableItem.vue
  68. 217 0
      src/views/statisticalReport/components/wanzhouReport/loadWagonWorkReport.vue
  69. 144 0
      src/views/statisticalReport/components/wanzhouReport/unloadShipWorkReport.vue
  70. 178 0
      src/views/statisticalReport/components/wanzhouReport/wagonWorkReport.vue
  71. 41 0
      src/views/statisticalReport/router/index.js

+ 4 - 18
build/utils.js

@@ -15,26 +15,12 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
-// let devModules = ["index", "appoint", "statisticalReport"];
-// let devModules = ["index", "statisticalReport", "appoint", "TMS"];
-// let devModules = ["index", "statisticalReport", "TMS", "appoint"];
-
-// let devModules = ["all"];
-
-// let devModules = ["all"];
-
 // let devModules = ["index", "appoint", "statisticalReport", "WMS","TMS"];
-// let devModules = ["index", "inward", "appoint", "queue"];
-// let devModules = ["index", "appoint", "statisticalReport", "WMS"];
-// let devModules = ["index", "appoint", "inward", "statisticalReport", "RMS"];
-// let devModules = ["index", "appoint", "inward", "TMS"];
+// let devModules = ["index", "TMS", "appoint", "WMS", "queue"];
+// let devModules = ["index", "statisticalReport", "inward"];
+// let devModules = ["index", "WMS", "inward"];
 let devModules = ["all"];
-//let devModules = ["index","RMS","AMS","appoint","sale"];
-//let devModules = ["index", "appoint", "inward", "queue", "statisticalReport","RMS"];
-// let devModules = ['index','appoint','sale','statisticalReport','RMS','TMS','WMS']
-// let devModules = ["index", "ADMINISTRATORS", "RMS"];
-// let devModules = ["index", "inward", "statisticalReport"];
-// let devModules = ['index','statisticalReport','inward']
+
 
 if (pathSrc.indexOf("node_modules") > -1) {
   devModules = require("../../../cors.js").devModules;

+ 3 - 3
config/index.js

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

+ 48 - 0
src/components/DilCommonUI/packages/table/src/table.vue

@@ -21,6 +21,8 @@
       element-loading-spinner="el-icon-loading"
       :isHeigth="isHeigth"
       :shiyHeigth="shiyHeigth"
+      :summary-method="getSummaries"
+      :show-summary="isshowSummary"
     >
       <!-- 多选列 -->
       <el-table-column
@@ -124,6 +126,14 @@ export default {
     shiyHeigth: {
       default: null
     },
+    isshowSummary: {
+      default: false
+    },
+    showSummaryList: {
+      default() {
+        return [];
+      }
+    },
     isHeigth: {
       default: false
     },
@@ -266,6 +276,44 @@ export default {
     },
     toggleRowExpansion(row, expanded) {
       this.$refs.mainTable.toggleRowExpansion(row, expanded);
+    },
+    //合计
+    //表尾合计行
+    getSummaries(param) {
+      console.log(param);
+      const { columns, data } = param;
+      console.log("columns");
+      console.log(columns);
+      console.log("data");
+      console.log(data);
+      const sums = [];
+      columns.forEach((column, index) => {
+        //如果索引值为0,则展示‘合计’
+        if (index === 0) {
+          sums[index] = "合计";
+          return;
+        }
+        console.log(column);
+        if (this.showSummaryList.includes(column.property)) {
+          const values = data.map(item => Number(item[column.property]));
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return prev + curr;
+              } else {
+                return prev;
+              }
+            }, 0);
+            sums[index];
+          } else {
+            sums[index] = "N/A";
+          }
+        }
+        //遍历数组,找到符合条件的列
+      });
+
+      return sums;
     }
   }
 };

+ 76 - 2
src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue

@@ -274,6 +274,58 @@
               </div>
             </div>
           </el-tab-pane>
+          <el-tab-pane label="车辆手动进厂" name="sixth">
+            <div class="admin2">
+              <div class="carrier from">
+                <el-form
+                  :inline="true"
+                  class="demo-form-inline"
+                  label-width="80px"
+                >
+                  <el-form-item label="车牌号:">
+                    <el-autocomplete
+                      class="inline-input"
+                      v-model="capacityName"
+                      :fetch-suggestions="querySearchCapacity"
+                      placeholder="车牌号"
+                      :trigger-on-focus="false"
+                      @select="handleSelectCapacity"
+                    >
+                      <template slot-scope="{ item }">
+                        <div class="name">{{ item.capacityNumber }}</div>
+                      </template>
+                    </el-autocomplete>
+                  </el-form-item>
+                </el-form>
+              </div>
+              <div class="poundNo from">
+                <span class="text">运输订单号:</span>
+                <el-input v-model="orderNumber" disabled></el-input>
+              </div>
+              <span class="text">进厂门岗:</span>
+              <el-select
+                v-model="enFactoryGatepost"
+                placeholder="请选择"
+                @change="onchangeGatepost(enFactoryGatepost)"
+              >
+                <el-option
+                  v-for="item in gatePostList"
+                  :key="item.gatepostId"
+                  :label="item.gatepostName"
+                  :value="item.gatepostName"
+                >
+                </el-option>
+              </el-select>
+              <div class="button_box">
+                <el-button
+                  type="primary"
+                  @click="enFactoryResultByPDA"
+                  :disabled="disabled"
+                  >确认</el-button
+                >
+              </div>
+            </div>
+          </el-tab-pane>
         </el-tabs>
       </div>
     </template>
@@ -308,7 +360,10 @@ export default {
       switchValue: true,
       truckCalFirstNum: null,
       truckCalSecondNum: null,
-      lineQuence: null
+      lineQuence: null,
+      gatePostList: [],
+      enFactoryGatepost: null,
+      gatePostId: null
     };
   },
   created() {
@@ -319,10 +374,25 @@ export default {
     this.information();
   },
   methods: {
+    onchangeGatepost(value) {
+      console.log(value);
+      this.gatePostList.forEach(e => {
+        if (e.gatepostName == value) {
+          this.gatePostId = e.gatePostId;
+        }
+      });
+    },
+    enFactoryResultByPDA() {
+      let map = {
+        orderNumber: this.orderNumber + " ",
+        gatepostId: this.gatePostId
+      };
+      this.axios.post("");
+    },
     allowEnfactoryClick() {},
     queueClick() {
       this.axios
-        .post("/api/v1/qms/addQueueResult?vno=" + this.capacityName)
+        .post("/api/v1/qms/addQueueResult?vno=" + this.capacityName + "_")
         .then(res => {
           if (res.data.code == 200) {
             this.$message.success("操作成功");
@@ -431,6 +501,10 @@ export default {
         this.truckCalFirstList = res.data;
         this.truckCalSecondList = res.data;
       });
+      this.axios.get("/api/v1/uc/getAllGatepost").then(res => {
+        console.log(res);
+        this.gatePostList = res.data;
+      });
     },
     onClickConfirm() {
       this.poundNo = "jlbl" + toDateNo(new Date());

+ 10 - 0
src/views/RMS/components/addContractPrice.vue

@@ -87,6 +87,7 @@ export default {
       }
       else{
          let map=this.form;
+         map.userId=getCookie("userId");
          console.log(map);
          map.startTime = sjTime(this.form.startTime);
          map.endTime = sjTime(this.form.endTime);
@@ -119,6 +120,15 @@ export default {
           } else {
             this.$message.error(res.data.data);
           }
+        }).then(()=>{
+          let copy=this.$route.query;
+          console.log("copy:",copy);
+          if(copy){
+            if(copy.portId){
+              copy.portId=copy.portId * 1;
+            }
+            this.$set(this,"form",copy);
+          }
         });
     }
   }

+ 15 - 3
src/views/RMS/components/contractPrice.vue

@@ -13,12 +13,15 @@
     </div>
     <div class="table">
       <dilTable v-bind.sync="options">
-        <el-table-column fixed="right" label="操作" width="100">
+        <el-table-column fixed="right" label="操作" width="180">
           <template slot-scope="scope">
-            <el-button type="text" size="small" @click="update(scope)">
+            <el-button type="text" size="small" @click="add(scope)" style="margin:10px">
+              复制新增
+            </el-button>
+            <el-button type="text" size="small" @click="update(scope)" style="margin:10px">
               修改
             </el-button>
-            <el-button type="text" size="mini" @click="deleteOne(scope)">
+            <el-button type="text" size="mini" @click="deleteOne(scope)" style="margin:10px">
               删除
             </el-button>
           </template>
@@ -53,6 +56,15 @@ export default {
       console.log(scope.row.resultId);
       this.$router.push("/editContractPrice/" + scope.row.resultId);
     },
+    //复制新增
+    add(scope) {
+      console.log(scope.row);
+      this.$router.push("/addContractPrice?contractNo="+scope.row.contractNo
+      +"&portId="+scope.row.portId
+      +"&unitPrice="+scope.row.unitPrice
+      +"&startTime="+scope.row.startTime
+      +"&endTime="+scope.row.endTime);
+    },
     showCarrier(scope) {
       console.log(scope.row.resultId);
       this.$router.push("/showContractPrice/" + scope.row.resultId);

+ 1 - 3
src/views/TMS/components/bmsship/addTwoSectionHandleFee.vue

@@ -12,8 +12,7 @@
         </div>
         <div class="searchSelect">
             <span class="text">单价</span>
-            <el-input class="input" v-model="form.unitPrice" disabled  @change="calculate"> </el-input>
-            <el-button class="button" type="primary" @click="ondrawer(6)">浏览</el-button>
+            <el-input class="input" v-model="form.unitPrice"   @change="calculate"> </el-input>
         </div>
         <div class="preview-group">
           <el-form-item label="实装吨位">
@@ -205,7 +204,6 @@ export default {
       if(map.batchId==null ||
        map.purchaseOrderId==null ||
        map.unitPrice==null ||
-       map.unitPriceId==null ||
        map.realTonnage==null ||
        map.fee==null ||
        map.makeTime==null ||

+ 583 - 46
src/views/TMS/components/bmsship/detailsStatement.vue

@@ -1,71 +1,608 @@
+<!-- 计费账单 -->
 <template>
-  <!-- 船运计费详单页面 -->
-  <div class="purchaseOrder">
+  <div id="detailsStatement">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" @click="shipclick">
-        新增水运费账单
-      </el-button>
-      <el-button type="primary" @click="waterclick">
-        新增水分检测费账单
-      </el-button>
-      <el-button type="primary" @click="click()">
-        新增途损费账单
-      </el-button>
+      <el-form :inline="true">
+        <el-form-item>
+          <el-input v-model="shipName" placeholder="请输入船名"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span class="demonstration">结算日期</span>
+          <el-date-picker
+            v-model="startTime"
+            type="date"
+            placeholder="选择日期"
+            style="width:200px"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="date"
+            placeholder="选择日期"
+            style="width:200px"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="onClick">查询</el-button>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="exportAllReportToExcel"
+            ><i class="el-icon-download"></i>Excel</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <span class="totalWillTonage">合计已预开票吨位</span>
+          <el-input
+            v-model="totalWillTonageedValue"
+            disabled
+            style="width:80px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span class="totalWillTonage">合计已预开金额</span>
+          <el-input
+            v-model="totalWillTonageedMoney"
+            disabled
+            style="width:80px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span class="totalWillTonage">合计本次实际开票吨位</span>
+          <el-input
+            v-model="totalActuallyTonageedValue"
+            disabled
+            style="width:80px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span class="totalWillTonage">合计本月实际开票金额</span>
+          <el-input
+            v-model="totalActuallyTonageedMoney"
+            disabled
+            style="width:80px"
+          ></el-input>
+        </el-form-item>
+      </el-form>
     </div>
-    <dilTable v-bind.sync="option" >
-      <el-table-column fixed="right" label="操作" width="100">
-        <template slot-scope="scope">
-          <el-button @click="btnclick(scope.row)" type="text" size="small"
-            >详情</el-button
+    <div class="main">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <el-tab-pane label="未结算" name="first">
+          <el-table
+            :data="tableData"
+            ref="tableRef"
+            border
+            stripe
+            style="width: 100%; margin-top: 20px"
+            max-height="600px"
+            :row-style="{ height: '30px' }"
+            :cell-style="{ fontWeight: '700' }"
+            class="table"
+            :span-method="objectSpanMethod"
           >
-        </template>
-      </el-table-column>
-    </dilTable>
+            <el-table-column
+              prop="index"
+              width="50"
+              label="序号"
+              align="center"
+              :resizable="false"
+            >
+              <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+            </el-table-column>
+            <el-table-column
+              prop="materialName"
+              label="品种"
+              width="150px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="resultForeignShipName"
+              label="船名"
+              width="150px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="portName"
+              label="放货港口"
+              width="150px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="carrierName"
+              label="承运单位"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="resultOutPortTime"
+              label="离港日期"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="loadTonnage"
+              label="装船吨位"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="loadingProportion"
+              label="装船比例"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="realTonnage"
+              label="结算吨位"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="totalEnTonnage"
+              label="到厂湿吨"
+              width="100px"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.totalEnTonnage"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="unitPrice"
+              label="合同单价"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="fee"
+              label="金额(元)"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="previewTonnage"
+              label="已预开票吨位"
+              width="100px"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.previewTonnage"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="previewFee"
+              label="已预开票金额"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="makeTonnage"
+              label="本次实际开票吨位"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMoney"
+              label="本次实际开票金额"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="feeMake"
+              label="本月实际开票金额"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="operate"
+              label="操作"
+              width="100px"
+              align="center"
+              fixed="right"
+            >
+              <template slot-scope="scope">
+                <el-button type="text" @click="operate(scope.row)"
+                  >保存</el-button
+                >
+                <el-button type="text" @click="settlement(scope.row)"
+                  >结算</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+        <el-tab-pane label="已结算" name="second">
+          <el-table
+            :data="tableData1"
+            ref="tableRef1"
+            border
+            stripe
+            max-height="600px"
+            :row-style="{ height: '30px' }"
+            :cell-style="{ fontWeight: '700' }"
+            class="table"
+            :span-method="objectSpanMethod1"
+          >
+            <el-table-column
+              prop="index"
+              width="50"
+              label="序号"
+              align="center"
+              :resizable="false"
+            >
+              <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+            </el-table-column>
+            <el-table-column
+              prop="materialName"
+              label="品种"
+              width="150px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="resultForeignShipName"
+              label="船名"
+              width="150px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="portName"
+              label="放货港口"
+              width="150px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="carrierName"
+              label="承运单位"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="resultOutPortTime"
+              label="离港日期"
+              width="200px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="loadTonnage"
+              label="装船吨位"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="loadingProportion"
+              label="装船比例"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="realTonnage"
+              label="结算吨位"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="totalEnTonnage"
+              label="到厂湿吨"
+              width="100px"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.totalEnTonnage"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="unitPrice"
+              label="合同单价"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="fee"
+              label="金额(元)"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="previewTonnage"
+              label="已预开票吨位"
+              width="100px"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.willTonanged"></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="previewFee"
+              label="已预开票金额"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="makeTonnage"
+              label="本次实际开票吨位"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="actuallyMoney"
+              label="本次实际开票金额"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="feeMake"
+              label="本月实际开票金额"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
   </div>
 </template>
-
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
-  name: "purchaseOrder",
   data() {
     return {
-      input:"",
-      option: {
-        // 表格请求数据的地址
-        requestUrl: "/api/v1/bms/getStatementList?apiId=113",
-      },
+      totalWillTonageedValue: 0,
+      totalWillTonageedMoney: 0,
+      totalActuallyTonageedMoney: 0,
+      totalActuallyTonageedValue: 0,
+      shipName: null,
+      tableData: [],
+      tableData1: [],
+      spanArr: [],
+      spanArr1: [],
+      pos: null,
+      mergeList: [
+        "index",
+        "carrierName",
+        "portName",
+        "resultForeignShipName",
+        "materialName",
+        "totalEnTonnage",
+        "operate"
+      ],
+      activeName: "first",
+      tableTitle: "结算账单报表",
+      startTime: null,
+      endTime: null
     };
   },
+  watch: {
+    tableData: {
+      handler(newVal) {
+        console.log("执行一次汇总函数");
+        this.computedTableData(newVal);
+      },
+      deep: true,
+      immediate: false
+    },
+    tableData1: {
+      handler(newVal) {
+        console.log("执行一次汇总函数");
+        this.computedTableData(newVal);
+      },
+      deep: true,
+      immediate: false
+    }
+  },
   methods: {
-    onclick() {
-      this.option.requestUrl = "/api/v1/bms/getStatementList?apiId=113&con="+this.input;
+    //结算
+    settlement(row) {},
+    //保存
+    operate(row) {
+      console.log(row);
+      //遍历tableData,找出相同批次的行数
+      let arr = this.tableData.filter(e => {
+        return e.batchId == row.batchId;
+      });
+      let stateMentTotalAmount = this.tableData.reduce((pre, item) => {
+        return pre + item.fee;
+      }, 0);
+      let map = {
+        list: arr,
+        statementType: 3,
+        totalEnTonnage: row.totalEnTonnage,
+        stateMentTotalAmount: stateMentTotalAmount,
+        userID: getCookie("userId")
+      };
+      this.axios
+        .post("/api/v1/bms/addShipFeeStatement", map)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.getNoDetailsStament();
+            this.$message.success("保存成功");
+          }
+        })
+        .catch(() => {
+          this.$message.error("保存失败");
+        });
+    },
+    //处理表格数据
+    computedTableData(data) {
+      data.forEach((item, index) => {
+        if (index == 0) {
+        } else if (item.batchId == data[index - 1].batchId) {
+          item.totalEnTonnage = data[index - 1].totalEnTonnage;
+        }
+        //预开金额
+        item.previewFee = (item.unitPrice * item.previewTonnage).toFixed(2);
+        //金额
+        item.fee = (item.realTonnage * item.unitPrice).toFixed(2);
+        //结算吨位
+        item.realTonnage = (
+          item.totalEnTonnage * item.loadingProportion
+        ).toFixed(2);
+        //开票吨位
+        item.makeTonnage = (item.realTonnage - item.previewTonnage).toFixed(2);
+        //实际开票金额
+        item.actuallyMoney = (item.makeTonnage * item.unitPrice).toFixed(2);
+      });
+      this.getSpanArr(this.tableData);
+    },
+    //根据表格据汇总顶部展示
+    getTotalArr(data) {
+      this.totalWillTonageedValue = data.reduce((pre, item) => {
+        return pre + item.willTonanged;
+      }, 0);
+      this.totalWillTonageedMoney = data.reduce((pre, item) => {
+        return pre + item.willMoneyed;
+      });
+      this.totalActuallyTonageedValue = data.reduce((pre, item) => {
+        return pre + item.actuallyMoney;
+      });
+      this.totalActuallyTonageedMoney = data.reduce((pre, item) => {
+        return pre + item.actuallyMonthMoney;
+      });
     },
-    btnclick(row) {
-      this.$router.push("/statementDetailsOrder/" + row.batchId + "?statementId=" + row.statementId);
+    handleClick() {
+      console.log("我正在进行账单");
     },
-    shipclick() {
-      this.$router.push("/uncomplateDetails");
+    onClick() {},
+    //获取未结算账单数据
+    getNoDetailsStament() {
+      this.axios.post("/api/v1/bms/getShipFeeStatement").then(res => {
+        console.log(res.data.data);
+        this.tableData = res.data.data;
+        this.computedTableData(this.tableData);
+      });
     },
-    waterclick() {
-      this.$router.push("/uncomplateWater");
+    getDetailsStamented() {},
+    //合并表格数据
+    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].batchId === data[i - 1].batchId) {
+            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;
+          }
+        }
+      }
     },
-    click() {
-      this.$router.push("/toBeStatement");
+    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
+        };
+      }
+    },
+    objectSpanMethod1({ 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
+        };
+      }
+    },
+    //导出账单数据
+    exportAllReportToExcel() {
+      console.log(this.$refs.tableRef);
+      const loading = this.$loading({
+        lock: true,
+        text: "正在导出Excel",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      var title = this.tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      let data = [];
+      if (this.activeName == "first") {
+        data = this.$refs.tableRef.$children;
+      } else {
+        data = this.$refs.tableRef1.$children;
+      }
+      data.forEach(item => {
+        if (item.label != undefined && item.prop != undefined) {
+          if (tHeader.indexOf(item.label) === -1) {
+            tHeader.push(item.label);
+          }
+          if (filterVal.indexOf(item.prop) === -1) {
+            filterVal.push(item.prop);
+          }
+        }
+      });
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let data = this.tableData.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
+      loading.close();
     }
   },
+  mounted() {
+    this.getNoDetailsStament();
+    this.getDetailsStamented();
+  }
 };
 </script>
-<style lang='scss' scoped>
-.purchaseOrder {
+<style lang="scss" scoped>
+#detailsStatement {
   .top {
-    padding: 1.25rem 1.875rem;
-    .el-input {
-      width: 250px;
+    margin-left: 10px;
+    margin-top: 30px;
+  }
+  .main {
+    margin-left: 10px;
+    margin-top: 30px;
+    ::-webkit-scrollbar {
+      // width: 20px;
+      height: 20px;
+      background-color: transparent;
     }
   }
 }
-</style>
+</style>

+ 132 - 0
src/views/TMS/components/bmsship/threeSectionFeeDetails.vue

@@ -0,0 +1,132 @@
+<template>
+  <!-- 装船作业页面 -->
+  <div class="shipTransport">
+    <div class="top">
+      <el-input
+        class="el-input"
+        placeholder="请输入内容"
+        v-model="input"
+        clearable
+      >
+      </el-input>
+<!-- 
+       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期"></el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker> -->
+
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="refresh()">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+    </div>
+    <dilTable v-bind.sync="option">
+      <el-table-column fixed="right" label="操作" align="center" width="100">
+        <template slot-scope="scope">
+          <el-button @click="click(scope.row.resultId)" type="text" size="small"
+            >编辑</el-button
+          >
+          <!-- <el-button
+            type="text"
+            size="small"
+            @click="deleteclick(scope.row.resultId)"
+            >删除</el-button> -->
+        </template>
+      </el-table-column>
+    </dilTable>
+  </div>
+</template>
+
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      startTime: null,
+      endTime: null,
+      input: "",
+       startTime: null,
+      endTime: null,
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "/api/v1/tms/getLoadShipList?apiId=63",
+      },
+    };
+  },
+  mounted() {},
+  methods: {
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime && startTime < endTime){
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input+
+                "&startTime=" +
+                startTime +
+                "&endTime=" +
+                endTime;
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input;
+      }
+    },
+    click(resultId) {
+      console.log("aaa" + resultId);
+      this.$router.push("/updateThreeSectionFeeDetails/" + resultId);
+    },
+    addclick() {
+      this.$router.push("/addLoadShip/");
+    },
+    deleteclick(scope) {
+      let resultId = scope;
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios.post("/api/v1/tms/deleteLoadShip/" + resultId).then(() => {
+            this.$message({
+              type: "success",
+              message: "删除成功!",
+            });
+            this.option.requestUrl =
+              "/api/v1/tms/getLoadShipList?apiId=63&i=" + new Date();
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消删除!",
+          });
+        });
+    },
+    refresh() {
+      this.$router.go(0);
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.shipTransport {
+  .top {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 40rpx;
+    }
+    .btn {
+      width: 5.5%;
+      margin-left: 0.25rem;
+    }
+  }
+}
+</style>

+ 283 - 0
src/views/TMS/components/bmsship/updateThreeSectionFeeDetails.vue

@@ -0,0 +1,283 @@
+<template>
+  <!-- 修改位置作业 -->
+    <div class="shipTransport">
+    <page-title>返回</page-title>
+    <div class="form">
+      <div class="form_box">
+        <dil-form :formId="136" v-model="form1" ref="from1"></dil-form>
+        <el-form :inline="true">
+          <el-form-item label="水运单价">
+            <el-input type="number" placeholder="水运单价" v-model="form1.waterUnitPrice" disabled
+            ></el-input>
+          </el-form-item> 
+          <el-form-item label="是否拼装" >
+            <el-radio v-model="form1.isNeedAssemble" label="否" style="margin-left :10px">否</el-radio>
+            <el-radio v-model="form1.isNeedAssemble" label="是">是</el-radio>
+          </el-form-item>
+          <el-form-item label="水分检测费">
+             <el-input type="number" placeholder="水分检测费" v-model="form1.resultInspectionFees"></el-input>
+          </el-form-item>
+          <el-form-item label="计划日期">
+            <el-date-picker
+            v-model="form1.planDate"
+            type="datetime"
+            placeholder="计划日期">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="预计放货日期">
+            <el-date-picker
+            v-model="form1.planDeliveryDate"
+            type="datetime"
+            placeholder="预计放货日期">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="含水率">
+             <el-input type="number" placeholder="含水率" v-model="form1.resultMoistureContent"
+             @change="pipeiContarct"></el-input>
+          </el-form-item>
+          <el-form-item label="合同水分值">
+             <el-input
+             type="number"
+              placeholder=""
+              v-model="form1.contractMoistureValue"
+              :disabled="true"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="水分吨位">
+            <el-input
+            type="number"
+              placeholder=""
+              v-model="form1.moistureTonnage"
+              :disabled="true"
+            ></el-input>
+          </el-form-item>
+        </el-form> 
+      </div> 
+    </div>
+    <!-- 确定和取消 -->
+    <div class="button_box">
+      <el-button type="primary" @click="makeSure">确认</el-button>
+      <el-button @click="onClickCancel">返回</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+ data(){
+     return {
+      form1: {},
+      waterQualiyResultId:null,
+      outWharyResultId:null,
+      unitPrices:[]
+  }
+ },
+  mounted() {
+    this.information();
+  },
+  watch:{
+    "form1.resultOutPortTime":{
+      handler(newVal,oldVal){
+        this.findUnitPrice();
+      },
+      deep: true,
+      immediate: true
+    },
+    "form1.isNeedAssemble":{
+      handler(newVal,oldVal){
+        this.isNeedAssemble();
+      },
+      deep: true,
+      immediate: true
+    }
+  },
+  methods: {
+    getUnitPrice(){
+      this.axios
+            .post("/api/v1/rms/selectbmsshipContractPriceList?apiId=500")
+            .then((res) => {
+                this.unitPrices=res.data.data.list;
+        }).then(()=>{
+            this.findUnitPrice();
+        });
+    },
+    findUnitPrice(){
+        console.log("form1",this.form1);
+      if(this.form1.sendPortId && this.form1.resultOutPortTime){
+          let contract=this.unitPrices.find(item=>
+          item.portId==this.form1.sendPortId
+          && sjTime(this.form1.resultOutPortTime)>=sjTime(item.startTime)
+          && sjTime(this.form1.resultOutPortTime)<=sjTime(item.endTime));
+          if(contract){
+             this.form1.waterUnitPrice=contract.unitPrice;
+             this.form1.unitPriceId=contract.resultId;
+             console.log("contract:",contract);
+             this.$forceUpdate();
+          }
+      }else{
+        console.log("null");
+      }
+    },
+    isNeedAssemble(){
+        if(this.form1.isNeedAssemble){
+            if(this.form1.isNeedAssemble=="是" && this.form1.sendPortId!=this.form1.startPortId){
+                this.form1.resultInspectionFees=4000;
+            }else{
+                this.form1.resultInspectionFees=2000;
+            }
+        }else{
+            console.log("是否拼装为空");
+        }
+    },
+    information() {
+      //编辑位置作业
+      this.axios
+        .post("/api/v1/tms/getLoadShip/" + this.$route.params.resultId)
+        .then((res) => {
+          res.data.data.forEach((e) => {
+            this.form1 = e;
+            this.waterQualiyResultId=e.waterQualiyResultId;
+            this.outWharyResultId=e.outWharyResultId;
+            console.log("form1:",e);
+          });
+        }).then(()=>{
+            this.getUnitPrice();
+        });
+    },
+    handleCheckedCitiesChange(value) {
+      console.log(value);
+    },
+    // 返回
+    onClickCancel() {
+      this.$router.go(-1);
+    },
+    currentRadioChange(row) {
+      this.aaaa = row;
+    },
+    pipeiContarct() {
+      if (
+        this.form1.resultMoistureContent >= 0
+      ) {
+        let map = {
+          batchInfactoryId: this.form1.batchId,
+          resultMoistureContent: this.form1.resultMoistureContent,
+          resultActualInstallations:this.form1.resultActualInstallations,
+        };
+        this.axios
+          .post("/api/v1/tms/getMoistureAndInstallations", map)
+          .then(res => {
+            if (res.data.code == 200) {
+              console.log("res:",res);
+              this.form1.contractMoistureValue = res.data.data.purchaseContractMoisture;
+              this.form1.moistureTonnage = res.data.data.resultWaterTonnage;
+              this.$forceUpdate();
+            } else {
+              this.$message.warning(res.data.data);
+            }
+          });
+      }
+    },
+    // 确认
+    makeSure() {
+      let mapVal = {
+        resultId: this.$route.params.resultId,
+        waterQualiyResultId:this.waterQualiyResultId,
+        resultActualInstallations: this.form1.resultActualInstallations,
+        outWharyResultId:this.outWharyResultId,
+        // rwarehouseMaterialId: this.form1.rwarehouseMaterialId,
+        resultArrivalPortTime: sjTime(
+          this.form1.resultArrivalPortTime
+        ),
+        resultOutPortTime: sjTime(
+          this.form1.resultOutPortTime
+        ),
+        resultLoadShipDate: sjTime(
+          this.form1.resultLoadShipDate
+        ),
+        resultIsClear: this.form1.resultIsClear,
+        resultOutPortName:this.form1.resultOutPortName,
+        planDate:sjTime(this.form1.planDate),
+        planDeliveryDate:sjTime(this.form1.planDeliveryDate),
+        isNeedAssemble:this.form1.isNeedAssemble,
+        resultInspectionFees:this.form1.resultInspectionFees,
+        moistureTonnage:this.form1.moistureTonnage,
+        waterUnitPrice:this.form1.waterUnitPrice,
+        unitPriceId:this.form1.unitPriceId,
+        resultHeavyWeight:this.form1.resultHeavyWeight,
+        resultMoistureContent:this.form1.resultMoistureContent,
+        userId:getCookie("userId")
+      };
+              //判断放货数量是否为数字
+       function isNumber() {
+        var value = mapVal.resultActualInstallations;
+        //验证是否为数字
+        var patrn = /^(-)?\d+(\.\d+)?$/;
+        if (patrn.exec(value) == null || value == "") {
+          return false;
+        } else {
+          return true;
+        }
+      }
+      var val=this.value;
+    
+    console.log("map:",mapVal);
+      this.axios
+        .post(
+          "/api/v1/tms/updateThreeSectionDetails",
+          mapVal
+        )
+        .then((res) => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "修改成功!",
+            });
+            // this.$refs.table.refreshData();
+            this.$router.go(-1);
+          } else {
+            this.$message.error("修改失败!");
+          }
+          this.$refs['table'].resetField();
+        });
+    },
+  },
+};
+</script>
+<style lang="scss">
+.shipTransport{
+  .form{
+    display: flex;
+    .form_box{
+      width: 320px;
+      margin-left: 35%;
+      margin-top: 30px;
+      margin-right: 20px;
+      .el-form{
+        .preview-group{
+          .el-form-item{
+            .el-form-item__label{
+              display: inline-block;
+              width: 70px !important;
+            }
+            .el-form-item__content{
+              .el-select{
+                width: 250px;
+              }
+              .el-input{
+                width: 250px;
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+  .button_box{
+    margin-left: 45%;
+  }
+}
+</style>

+ 36 - 12
src/views/TMS/components/domesticMine/wagonLoadAdd.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 国产矿导入3-->
-  <div class="addWagonLoad">
+  <div class="addWagonLoad" style="width:100%">
     <page-title>返回</page-title>
     <div class="cp">
       <el-upload
@@ -18,11 +18,12 @@
         当前导入数量:{{ tableData.length }}
       </div>
     </div>
-    <div class="importedTable" style="height:300px;overflow:scroll;">
+    <div class="importedTable" style="height:300px;overflow:scroll;width:100%">
       <el-table
         ref="importExcel"
         highlight-current-row
         :data="tableData"
+        fit
         :row-style="{height:'40px'}"
          @row-click="rowClick"
          style="width: 100%;font-size: 14px"
@@ -59,7 +60,7 @@
           align="center"
           prop="supplierName"
           label="发货单位"
-          width="150px"
+          width="300px"
         >
         </el-table-column>
         <el-table-column
@@ -106,7 +107,6 @@
         </el-table-column>
         <el-table-column
           align="center"
-          width="100px"
           prop="weight"
           label="标重"
         >
@@ -132,7 +132,6 @@
           <div class="preview-group">
             <el-form-item label="到站:">
               <el-autocomplete
-                class="inline-input"
                 v-model="toTheStation"
                 :fetch-suggestions="querySearchToTheStation"
                 placeholder="请输入到站名称"
@@ -154,7 +153,7 @@
       :visible.sync="drawer"
       :direction="direction"
       :before-close="handleClose"
-      size="50%"
+      size="80%"
     >
     <el-input
         placeholder="发货单位"
@@ -413,7 +412,7 @@ export default {
         list: selection,
         userId: getCookie("userId")
       };
-      console.log(data);
+      console.log("data:",data);
       //请求添加
       this.axios.post("/api/v1/tms/addDomesticLoadResult", data).then(res => {
         console.log(res);
@@ -616,9 +615,17 @@ export default {
           }
           return;
         }
+        let groupNo=1;
+        let isLoading=true;
         //读取表格
-        for (let i = 1; i <= rows.length + 1; i++) {
+        for (let i = index+1; i <= rows.length + 1; i++) {
           let row = workbook.Sheets[workbook.SheetNames[0]]["A" + i];//先取A列,如果是数字则取该行数据
+          if(row && typeof row.v == "number" && isLoading==false){
+            isLoading=true;
+            groupNo++;
+          }else if(!row || typeof row.v != "number" && isLoading==true){
+            isLoading=false;
+          }
           if (
             row && typeof row.v == "number" &&
             workbook.Sheets[workbook.SheetNames[0]]["B" + i] != "undefined" &&
@@ -645,7 +652,8 @@ export default {
               productName: workbook.Sheets[workbook.SheetNames[0]]["G" + i].v,
               wagonNo: workbook.Sheets[workbook.SheetNames[0]]["J" + i].v,
               weight: workbook.Sheets[workbook.SheetNames[0]]["I" + i].v,
-              mineral: workbook.Sheets[workbook.SheetNames[0]]["H" + i].v
+              mineral: workbook.Sheets[workbook.SheetNames[0]]["H" + i].v,
+              groupNo:groupNo
             };
             if ((tableRow.wagonNo + "").length != 7) {
               that.$message({
@@ -657,7 +665,7 @@ export default {
             excelData.push(tableRow);
           }
         }
-        console.log(excelData);
+        console.log("excelData",excelData);
         let map={
           list:excelData
         }
@@ -665,15 +673,31 @@ export default {
         that.axios.post("/api/v1/tms/importDomesticLoadResult",map).then(res => {
           console.log(res);
           if (res.data.code == "200") {
+            //赋值
             that.tableData=res.data.data;
+            //查询匹配失败记录数
+            let length=that.tableData.length;
+            that.tableData.forEach((item)=>{
+              if(item.purchaseOrderId)
+                length--;
+            });
+            if(length<=0){
+              that.$message({
+                message: "导入"+that.tableData.length+"条数据,全部匹配成功!",
+                type: "success",
+              });
+            }else if(length>0){
+               that.$confirm("导入"+that.tableData.length+"条数据,"+length+"条数据匹配失败!请手动配单!")
+                .then(_ => {
+                  done();
+                });
+            }
           } else {
             that.$message({
               type: "error",
               message: res.data.data
             });
           }
-        }).then(()=>{
-          // that.isLoading = false;
         });
       };
       reader.readAsBinaryString(file.raw); //以二进制方式读取

+ 2 - 2
src/views/TMS/components/domesticMine/wagonLoadbu.vue

@@ -131,7 +131,7 @@ export default {
         requestUrl: "/api/v1/tms/findPurchaseOrderList?apiId=81",
         // 控制选择单列
         selectionType: "radio",
-        pageSize:5,
+        pageSize:10,
       },
       option: {
         // 表格请求数据的地址
@@ -188,7 +188,7 @@ export default {
     };
   },
   mounted(){
-    this.searchMaterialName('');
+    // this.searchMaterialName('');
   },
   methods: {
     //确定

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 602 - 287
src/views/TMS/components/importedEmergency/addWagonLoadEmergency.vue


+ 6 - 3
src/views/TMS/components/importedEmergency/wagonLoadEmergency.vue

@@ -55,7 +55,7 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=2",
+        requestUrl: "/api/v1/tms/getTmstrainWagonLoad?apiId=508&resultType=2",
       },
     };
   },
@@ -73,7 +73,7 @@ export default {
         if (startTime && endTime) {
           if (startTime < endTime) {
              this.option.requestUrl =
-            "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=2&con=" +
+            "/api/v1/tms/getTmstrainWagonLoad?apiId=508&resultType=2&con=" +
             this.input + "&startTime=" +
               startTime +
               "&endTime=" +
@@ -83,7 +83,7 @@ export default {
           }
         } else {
           this.option.requestUrl =
-            "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=2&con=" +
+            "/api/v1/tms/getTmstrainWagonLoad?apiId=508&resultType=2&con=" +
             this.input;
         }
       } else if (num == 1) {
@@ -93,6 +93,9 @@ export default {
         this.$router.push("/editWagonLoadEmergency/" + resultId);
       }
     },
+    click(resultId) {
+      this.$router.push("/editWagonLoadEmergency/" + resultId);
+    },
     deleteclick(resultId) {
       this.$confirm("是否删除", "提示", {
         confirmButtonText: "确定",

+ 85 - 109
src/views/TMS/components/importedMine/addWagonLoad.vue

@@ -2,31 +2,18 @@
   <!-- 万州港-达州新增装车1 -->
   <div class="addWagonLoad">
     <page-title>返回</page-title>
-    <!-- <div class="cp">
-      <span >车皮号:</span>
-      <el-upload style="margin: 8px;"
-          class="upload-excel"
-          action=""
-          :on-change="importExcel"
-          :show-file-list="false"
-          accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
-          :auto-upload="false">
-          <el-button  type="primary">导入</el-button>
-      </el-upload>
-      <span >当前导入数量:{{tableData.length}}</span>
-    </div> -->
     <div class="tempTable">
-      <div class="search" style="display:flex">
+      <div class="search" style="display:flex;margin: 10px;">
         <el-input
-          placeholder="请输入"
+          placeholder="请输入车皮号或外轮船名"
           v-model="input"
-          style="margin: 10px; width:20%"
+          style="margin: 10px; width:38%"
           clearable
         ></el-input>
         <el-button
           type="primary"
           class="btn"
-          @click="searchLoadTemp()"
+          @click="findWagon()"
           style="margin: 10px;"
         >
           <i class="el-icon-search"></i>查询
@@ -40,16 +27,18 @@
           :auto-upload="false">
           <el-button  type="primary">
             <i class="el-icon-search"></i>导入查询</el-button>
+            <span >查询结果数量:{{tableDataReal.length}}</span>
       </el-upload>
       </div>
       <!-- 临时表已导入配单的车皮 -->
       <div class="tempTable" style="height:300px;overflow:scroll;float:left;margin-left:5px">
         <el-table
           ref="tempTable"
+          empty-text="请先查询,再查看数据"
           highlight-current-row
           @selection-change="handleSelectionChange"
           @row-click="rowClick"
-          :data="tableData"
+          :data="tableDataReal"
           :row-style="{height:'40px'}"
           style="width: 100%;font-size: 18px"
           id="domesticTable">
@@ -99,66 +88,6 @@
         </el-table>
       </div>
     </div>
-    <!-- <div class="importedTable" style="height:300px;overflow:scroll;">
-      <el-table
-        highlight-current-row
-        :data="tableData"
-        :row-style="{height:'40px'}"
-        style="width: 100%,font-size: 20px"
-        id="domesticTable">
-        <el-table-column
-        type="index"
-        width="50"
-        prop="number"
-        label="序号"
-        align="center"
-        fixed="left"
-        :resizable="false">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="productName"
-          label="品  名"
-          width="240px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="mineral"
-          label="矿种"
-          width="100px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="wagonNo"
-          label="车号"
-          width="180px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="unloadPoint"
-          label="卸货地点"
-          width="180px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="sendStation"
-          label="发站"
-          width="180px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-        width="180px"
-          prop="arrivalStation"
-          label="到站">
-        </el-table-column>
-         <el-table-column
-         align="center"
-        width="180px"
-          prop="weight"
-          label="标重">
-        </el-table-column>
-      </el-table>
-    </div> -->
     <div class="right" 
     style="margin-top:10px
            float:right;">
@@ -185,18 +114,6 @@
                     <el-select filterable  v-model="arrivalStationId">
                         <el-option v-for="item in arrivalStations" :value="item.arrivalId" :key="item.arrivalId" :label="item.arrivalName"></el-option>
                     </el-select>
-                    <!-- <el-autocomplete
-                      class="inline-input"
-                      v-model="toTheStation"
-                      :fetch-suggestions="querySearchToTheStation"
-                      placeholder="请输入到站名称"
-                      :trigger-on-focus="false"
-                      @select="handleSelectToTheStation"
-                    >
-                      <template slot-scope="{ item }">
-                        <div class="name">{{ item.arrivalName }}</div>
-                      </template>
-                    </el-autocomplete> -->
                   </el-form-item>
                </div>
           </el-form>
@@ -205,7 +122,7 @@
         </div>
         <div class="button-box">
           <el-button @click="cancel">取消</el-button>
-          <el-button type="primary" :loading="isLoading" @click="makeSure">确定</el-button>
+          <el-button type="primary" :loading="isLoading" :disabled="!isSend" @click="makeSure">确定</el-button>
         </div>
     </div>
   </div>
@@ -219,10 +136,14 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      isSend:false,
       isLoading:false,
       list: [],
-      form1: {},
+      form1: {
+        resultLoadingDate:new Date()
+      },
       tableData:[],
+      tableDataReal:[],
       selectionRow:[],
       input: "",
       value: undefined,
@@ -262,6 +183,19 @@ export default {
     this.searchLoadTemp();
   },
   methods: {
+    findWagon(){
+      this.tableDataReal=[];
+      this.isSend=true;
+      this.tableData.forEach((item)=>{
+        if(item.foreignShipName.includes(this.input) || item.wagonNo.includes(this.input)){
+          this.tableDataReal.push(item);
+        }
+      });
+      if(this.tableDataReal.length<=0){
+        this.$message.warning("查询不到记录!");
+      }
+      console.log("serachResult:",this.tableDataReal);
+    },
     //发站弹出层
     handleSelectSendStation(item) {
       this.sendStationId = item.arrivalId;
@@ -351,6 +285,22 @@ export default {
           return;
         }
       }
+      let date=this.form1.resultLoadingDate;
+      let month=(date.getMonth()+1);
+      let day=date.getDate();
+      if(month>=1 && month <=9){
+        month="0"+month;
+      }
+      if(day>=1 && day<=9){
+        day="0"+day;
+      }
+      let dateStr=date.getFullYear()+"年"+month+"月"+day+"日";
+      this.selectionRow.forEach((item)=>{
+        if(!item.sendDate || !item.arrivalDate){
+          item.sendDate=dateStr;
+          item.arrivalDate=dateStr;
+        }
+      });
       let map = {
         wagonList:this.selectionRow,
         sendStationId: this.sendStationId,
@@ -495,9 +445,17 @@ export default {
           }
           return;
         }
+        let groupNo=1;
+        let isLoading=true;
         //读取表格
-        for(let i=1;i<=rows.length+1;i++){
+        for(let i=index+1;i<=rows.length+1;i++){
           let row=workbook.Sheets[workbook.SheetNames[0]]['A'+i];
+          if(row && typeof row.v == "number" && isLoading==false){
+            isLoading=true;
+            groupNo++;
+          }else if(!row || typeof row.v != "number" && isLoading==true){
+            isLoading=false;
+          }
           if(row!='undefined' && row!=null && typeof row.v=='number' 
               && workbook.Sheets[workbook.SheetNames[0]]['B'+i]!='undefined'
             && workbook.Sheets[workbook.SheetNames[0]]['B'+i]!=null
@@ -516,13 +474,14 @@ export default {
             let tableRow={
               sendStation:workbook.Sheets[workbook.SheetNames[0]]['B'+i].v,
               arrivalStation:workbook.Sheets[workbook.SheetNames[0]]['C'+i].v,
-              sendDate:sjTime(workbook.Sheets[workbook.SheetNames[0]]['D'+i].v),
-              arrivalDate:workbook.Sheets[workbook.SheetNames[0]]['E'+i].v,
+              sendDate: that.formatDate(workbook.Sheets[workbook.SheetNames[0]]["D" + i].v),
+              arrivalDate: that.formatDate(workbook.Sheets[workbook.SheetNames[0]]["E" + i].v),
               unloadPoint:workbook.Sheets[workbook.SheetNames[0]]['F'+i].v,
               productName:workbook.Sheets[workbook.SheetNames[0]]['G'+i].v,
               wagonNo:workbook.Sheets[workbook.SheetNames[0]]['J'+i].v,
               weight:workbook.Sheets[workbook.SheetNames[0]]['I'+i].v,
               mineral:workbook.Sheets[workbook.SheetNames[0]]['H'+i].v,
+              groupNo:groupNo
             }
             if((tableRow.wagonNo+"").length!=7){
               that.$message({
@@ -543,7 +502,7 @@ export default {
           return;
         }else if(that.tableData.length<=0){
           that.$message({
-            message:"当前列表没有可用数据",
+            message:"数据库没有可用数据",
             type:"warning "
           })
           return;
@@ -552,24 +511,29 @@ export default {
         let tableData=[];
         importData.forEach((row)=>{
           let temp=that.tableData.find(item=>item.wagonNo==row.wagonNo 
-          && row.productName.includes(item.foreignShipName)
-          && item.materialName.includes(row.mineral));
-          if(temp)
+          && row.productName.includes(item.foreignShipName));
+          if(temp){
+            temp.sendDate=row.sendDate;
+            temp.arrivalDate=row.arrivalDate;
+            temp.groupNo=row.groupNo;
             tableData.push(temp);
+          }
         });
-        console.log("test",tableData);
         that.tableDataReal=tableData;
-        if(that.tableData.length<=0){
-           that.$message({
-            message: "查询不到相关车皮!",
-            type: "warning",
+        if(tableData.length<=0){
+          that.$confirm('查询不到相关车皮!请联系万州港相关人员!')
+          .then(_ => {
+            that.isSend=false;
+            done();
           });
-        }else if(that.tableData.length<importData.length){
-          that.$message({
-            message: "共"+importData.length-that.tableData.length+"条车皮查询失败!",
-            type: "warning",
+        }else if(tableData.length<importData.length){
+           that.$confirm("共"+(importData.length-tableData.length)+"条车皮查询失败!请联系万州港相关人员!")
+          .then(_ => {
+            that.isSend=false;
+            done();
           });
         }else{
+          that.isSend=true;
           that.$message({
             message: "查询成功!",
             type: "success",
@@ -593,8 +557,9 @@ export default {
     },
     //查询临时表
     searchLoadTemp(){
+      this.tableDataReal=[];
       this.axios.post('/api/v1/tms/getResultType?apiId=58&resultType=1&con='+this.input).then((res)=>{
-        console.log(res);
+        console.log("temp:",res.data.data);
         if(res.data.code == "200"){
           this.tableData=res.data.data;
         }else {
@@ -636,6 +601,17 @@ export default {
       this.selectionRow = rows //保存已选择行
       console.log(this.selectionRow);
     },
+    formatDate(numb, format) {
+      const time = new Date((numb - 1) * 24 * 3600000 + 1)
+      time.setYear(time.getFullYear() - 70)
+      const year = time.getFullYear() + ''
+      const month = time.getMonth() + 1 + ''
+      const date = time.getDate() + ''
+      if (format && format.length === 1) {
+        return year + format + month + format + date
+      }
+      return year + '年' + (month < 10 ? '0' + month : month)+ '月' + (date < 10 ? '0' + date : date) + '日'
+    },
   },
 };
 </script>

+ 53 - 248
src/views/TMS/components/importedMine/addWagonPlease.vue

@@ -2,67 +2,25 @@
   <!-- 新增请作业页面 -->
   <div class="contractDetails">
     <page-title>返回</page-title>
-
-    <div class="form">
-      <div class="form_box">
-        <dil-form :formId="122" v-model="form1"></dil-form>
-      </div>
-    </div>
-    <div class="fromOther">
-      <el-form :inline="true" class="demo-form-inline" label-width="80px" style="margin-left:525px;">
-        <el-form-item label="发货单位">
-          <el-autocomplete
-            class="inline-input"
-            v-model="stateSupplier"
-            :fetch-suggestions="querySearchSupplier"
-            placeholder="请输入发货单位名称"
-            :trigger-on-focus="false"
-            @select="handleSelectSupplier"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.supplierName }}</div>
-            </template>
-          </el-autocomplete>
+    <div>
+      <el-form   label-width="80px" style="margin-left:35%;">
+        <el-form-item label="批复车数">
+          <el-input v-model="form.resultApproveNumber" type="number" style="width:240px"></el-input>
         </el-form-item>
-      </el-form>
-      <el-form :inline="true" class="demo-form-inline" label-width="80px" style="margin-left:525px;">
-        <el-form-item label="发站">
-          <el-autocomplete
-            class="inline-input"
-            v-model="sendStation"
-            :fetch-suggestions="querySearchSendStation"
-            placeholder="请输入发站名称"
-            :trigger-on-focus="false"
-            @select="handleSelectSendStation"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.arrivalName }}</div>
-            </template>
-          </el-autocomplete>
+        <el-form-item label="落空车数">
+          <el-input v-model="form.resultVoidNumber" type="number" style="width:240px"></el-input>
         </el-form-item>
-      </el-form>
-      <el-form :inline="true" class="demo-form-inline" label-width="80px" style="margin-left:525px;">
-        <el-form-item label="到站">
-          <el-autocomplete
-            class="inline-input"
-            v-model="toTheStation"
-            :fetch-suggestions="querySearchToTheStation"
-            placeholder="请输入到站名称"
-            :trigger-on-focus="false"
-            @select="handleSelectToTheStation"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.arrivalName }}</div>
-            </template>
-          </el-autocomplete>
+        <el-form-item label="实装车数">
+          <el-input v-model="form.resultRealNumber" type="number" style="width:240px"></el-input>
+        </el-form-item>
+        <el-form-item label="日期">
+          <el-date-picker v-model="form.resultDate" type="datetime" placeholder="日期" @change="getRealNumber"></el-date-picker>
         </el-form-item>
       </el-form>
-    </div>
-    <div class="trainTransport">
       <!-- 确定和取消 -->
-      <div class="button_box">
-        <el-button @click="onClickCancel">返回</el-button>
-        <el-button type="primary" @click="onClickConfirm">确认</el-button>
+      <div style="margin-left:40%">
+        <el-button @click="cancel">返回</el-button>
+        <el-button type="primary" @click="makeSure">确认</el-button>
       </div>
     </div>
   </div>
@@ -76,211 +34,58 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      // 表单
-      form1: {},
-      supplierId: null,
-      supplierName: "",
-      stateSupplier: "",
-      sendStationId:2,
-      toTheStationId:1,
-      sendStation:"万州港",
-      toTheStation:"老区轨道衡"
+      form:{
+        resultRealNumber:0,
+        resultDate:new Date()
+      }
     };
   },
   created() {
     
+  },
+  mounted(){
+    this.getRealNumber();
   },
   methods: {
-    handleCheckedCitiesChange(value) {
-      console.log(value);
-    },
-    //发站弹出层
-    handleSelectSendStation(item) {
-      this.sendStationId = item.arrivalId;
-      this.sendStation = item.arrivalName;
-    },
-    //以下是发站边输边查搜索
-    querySearchSendStation(queryString, cb) {
-      this.axios
-        .get("/api/v1/uc/getArrivalByLike?index=" + this.sendStation)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            console.log(restaurantsSupplier)
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterSendStation(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
-        });
-    },
-    //发站
-    createFilterSendStation(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.arrivalName
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-    //到站弹出层
-    handleSelectToTheStation(item) {
-      this.toTheStationId = item.arrivalId;
-      this.toTheStation = item.arrivalName;
-    },
-    //以下是到站边输边查搜索
-    querySearchToTheStation(queryString, cb) {
-      this.axios
-        .get("/api/v1/uc/getArrivalByLike?index=" + this.toTheStation)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            console.log(restaurantsSupplier)
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterToTheStation(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
-        });
-    },
-    //到站
-    createFilterToTheStation(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.arrivalName
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-    //发货单位弹出层
-    handleSelectSupplier(item) {
-      this.supplierId = item.supplierId;
-      item.supplierName = this.supplierName;
-    },
-    //以下是发货单位边输边查搜索
-    querySearchSupplier(queryString, cb) {
-      this.axios
-        .post("/api/v1/uc/getSupplierMesByLike?index=" + this.stateSupplier)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterSupplier(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
-        });
-    },
-    createFilterSupplier(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.value
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-    // 返回
-    onClickCancel() {
+    cancel() {
       this.$router.go(-1);
     },
-    // 确认
-    onClickConfirm() {
-      let tmstrainPleaseApproveResult = {
-        resultPlanDate: sjTime(this.form1.resultPlanDate),
-        resultCategory: this.form1.resultCategory,
-        supplierId: this.supplierId,
-        sendStationId: this.sendStationId,
-        toTheStationId: this.toTheStationId,
-        resultPleaseNumber: this.form1.resultPleaseNumber,
-        userId: getCookie("orgCode"),
-        resultType: 1,
-      };
-      function isNumber() {
-        var value = tmstrainPleaseApproveResult.resultPleaseNumber;
-        //验证是否为数字
-        var patrn = /^(-)?\d+(\.\d+)?$/;
-        if (patrn.exec(value) == null || value == "") {
-          return false;
-        } else {
-          return true;
-        }
+    makeSure() {
+      console.log("form",this.form.resultVoidNumber-this.form.resultApproveNumber);
+      if(!this.form.resultDate ||
+      !this.form.resultApproveNumber||
+      !this.form.resultVoidNumber||
+      !this.form.resultRealNumber){
+        this.$message.warning("存在空值!");
+        return;
+      }else if(this.form.resultVoidNumber-this.form.resultApproveNumber>0){
+        this.$message.warning("落空车数不能超过批复车数!");
+        return;
       }
-      var val = this.value;
-      if (
-        tmstrainPleaseApproveResult.resultPlanDate == null ||
-        tmstrainPleaseApproveResult.resultCategory == null ||
-        tmstrainPleaseApproveResult.supplierId == null ||
-        tmstrainPleaseApproveResult.sendStationId == null ||
-        tmstrainPleaseApproveResult.toTheStationId == null ||
-        tmstrainPleaseApproveResult.resultPleaseNumber == null
-      )
-        this.$message.error("存在空值!");
-      else if (!isNumber(val)) this.$message.error("请车数量必须是数字!");
-      else
-        this.axios
-          .post("/api/v1/tms/addWagonPlease", tmstrainPleaseApproveResult)
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });
-            this.$router.go(-1);
+      this.form.resultDate= sjTime(this.form.resultDate);
+      this.form.resultSurplusNumber=this.form.resultApproveNumber-this.form.resultVoidNumber;
+      this.form.userId= getCookie("userId");
+      this.axios.post("/api/v1/tms/addPleaseResult", this.form).then(() => {
+          this.$message({
+            type: "success",
+            message: "新增成功!",
           });
+          this.$router.go(-1);
+        });
     },
+    //获取当天车皮数量
+    getRealNumber(){
+      if(this.form.resultDate){
+        this.form.resultDate=sjTime(this.form.resultDate);
+        this.axios.post("/api/v1/tms/getRealNumber",this.form).then((res)=>{
+          console.log("res",res);
+          this.form.resultRealNumber=res.data.data;
+          console.log("form",this.form);
+        });
+      }
+    }
   },
 };
 </script>
 <style lang="scss">
-.contractDetails {
-  .form {
-    display: flex;
-    .form_box {
-      width: 340px;
-      margin-left: 35%;
-      margin-top: 30px;
-      margin-right: 20px;
-      .el-form {
-        .preview-group {
-          .el-form-item {
-            .el-form-item__label {
-              display: inline-block;
-              width: 70px !important;
-            }
-            .el-form-item__content {
-              .el-select {
-                width: 250px;
-              }
-              .el-input {
-                width: 250px;
-              }
-            }
-            .button_box {
-              margin-left: 42%;
-              margin-top: 55px;
-            }
-          }
-        }
-      }
-    }
-  }
-  .trainTransport{
-    .button_box{
-      margin-left: 40%;
-      margin-bottom: 2px;
-
-    }
-  }
-}
 </style>

+ 15 - 5
src/views/TMS/components/importedMine/addWagonloadCopy.vue

@@ -86,7 +86,7 @@
           align="center"
           prop="makeDate"
           label="制票日期"
-          width="120px"
+          width="170px"
         >
         </el-table-column>
         <el-table-column
@@ -121,7 +121,7 @@
            float:right;"
     >
       <div class="form">
-        <div class="form_box" style="">
+        <div class="form_box_addWagonLoad" style="">
           <el-form>
             <div class="preview-group">
               <el-form-item label="发站:">
@@ -627,7 +627,7 @@ export default {
             //表格数据
             let temp = {
               number: row["序号"],
-              makeDate: row["制票日期"],
+              makeDate:that.formatDate(row["制票日期"]) ,
               materialName: row["品名"],
               wagonNo: row["车皮号"]+"",
               mineral: row["矿种"],
@@ -662,6 +662,17 @@ export default {
           tempTable.toggleRowSelection(row);
        }
     },
+    formatDate(numb, format) {
+      const time = new Date((numb - 1) * 24 * 3600000 + 1)
+      time.setYear(time.getFullYear() - 70)
+      const year = time.getFullYear() + ''
+      const month = time.getMonth() + 1 + ''
+      const date = time.getDate() + ''
+      if (format && format.length === 1) {
+        return year + format + month + format + date
+      }
+      return year + '年' + (month < 10 ? '0' + month : month)+ '月' + (date < 10 ? '0' + date : date) + '日'
+    }
   }
 };
 </script>
@@ -785,9 +796,8 @@ export default {
   }
   .form {
     display: flex;
-    .form_box {
+    .form_box_addWagonLoad {
       width: 340px;
-      margin-left:10px;
       .el-form {
         .preview-group {
           .el-form-item {

+ 51 - 251
src/views/TMS/components/importedMine/editWagonPlease.vue

@@ -1,67 +1,27 @@
 <template>
+  <!-- 新增请作业页面 -->
   <div class="contractDetails">
     <page-title>返回</page-title>
-
-    <div class="form">
-      <div class="form_box">
-        <dil-form :formId="117" v-model="form1"></dil-form>
-      </div>
-    </div>
-    <div class="fromOther">
-      <el-form :inline="true" class="demo-form-inline" label-width="80px">
-        <el-form-item label="发货单位">
-          <el-autocomplete
-            class="inline-input"
-            v-model="stateSupplier"
-            :fetch-suggestions="querySearchSupplier"
-            placeholder="请输入发货单位名称"
-            :trigger-on-focus="false"
-            @select="handleSelectSupplier"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.supplierName }}</div>
-            </template>
-          </el-autocomplete>
+    <div>
+      <el-form   label-width="80px" style="margin-left:35%;">
+        <el-form-item label="批复车数">
+          <el-input v-model="form.resultApproveNumber" type="number" style="width:240px"></el-input>
         </el-form-item>
-      </el-form>
-        <el-form :inline="true" class="demo-form-inline" label-width="80px" >
-        <el-form-item label="发站:">
-          <el-autocomplete
-            class="inline-input"
-            v-model="sendStation"
-            :fetch-suggestions="querySearchSendStation"
-            placeholder="请输入发站名称"
-            :trigger-on-focus="false"
-            @select="handleSelectSendStation"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.arrivalName }}</div>
-            </template>
-          </el-autocomplete>
+        <el-form-item label="落空车数">
+          <el-input v-model="form.resultVoidNumber" type="number" style="width:240px"></el-input>
         </el-form-item>
-      </el-form>
-      <el-form :inline="true" class="demo-form-inline" label-width="80px" >
-        <el-form-item label="到站:">
-          <el-autocomplete
-            class="inline-input"
-            v-model="toTheStation"
-            :fetch-suggestions="querySearchToTheStation"
-            placeholder="请输入到站名称"
-            :trigger-on-focus="false"
-            @select="handleSelectToTheStation"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.arrivalName }}</div>
-            </template>
-          </el-autocomplete>
+        <el-form-item label="实装车数">
+          <el-input v-model="form.resultRealNumber" type="number" style="width:240px"></el-input>
+        </el-form-item>
+        <el-form-item label="日期">
+          <el-date-picker v-model="form.resultDate" type="datetime" placeholder="日期" @change="getRealNumber"></el-date-picker>
         </el-form-item>
       </el-form>
-    </div>
-
-    <!-- 确定和取消 -->
-    <div class="button_box">
-      <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm">确认</el-button>
+      <!-- 确定和取消 -->
+      <div style="margin-left:40%">
+        <el-button @click="cancel">返回</el-button>
+        <el-button type="primary" @click="makeSure">确认</el-button>
+      </div>
     </div>
   </div>
 </template>
@@ -69,18 +29,12 @@
 <script>
 import PageTitle from "@/components/Page/Title";
 import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
-      form1: {},
-      supplierId: null,
-      supplierName: "",
-      stateSupplier: "",
-      sendStationId:null,
-      toTheStationId:null,
-      sendStation:"",
-      toTheStation:""
+      form:null,
     };
   },
   mounted() {
@@ -90,204 +44,50 @@ export default {
     information() {
       //编辑请车作业
       this.axios
-        .post("/api/v1/tms/getWagonPleaseById/" + this.$route.params.resultId)
+        .post("/api/v1/tms/getPleaseResult/" + this.$route.params.resultId)
         .then((res) => {
-          res.data.data.forEach((e) => {
-            this.form1 = e;
-            console.log(e)
-            this.toTheStationId = e.toTheStationId
-            this.sendStationId = e.sendStationId
-            this.sendStation = e.sendName
-            this.toTheStation = e.arrivalName
-          });
-          
-          this.stateSupplier = res.data.data[0].supplierName;
-          this.supplierId = res.data.data[0].supplierId;
+          this.form=res.data.data;
         });
     },
-    // 返回
-    onClickCancel() {
+    cancel() {
       this.$router.go(-1);
     },
-       //发货单位弹出层
-    handleSelectSupplier(item){
-      this.supplierId = item.supplierId
-      item.supplierName = this.supplierName
-    },
-    //以下是发货单位边输边查搜索
-    querySearchSupplier(queryString, cb) {
-        this.axios.post('/api/v1/uc/getSupplierMesByLike?index='+this.stateSupplier).then((res)=>{
-        if(res.data.code == "200"){    
-          var restaurantsSupplier = res.data.data
-          var results = queryString ? restaurantsSupplier.filter(this.createFilterSupplier(queryString)) :restaurantsSupplier;
-          // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-      })  
-      },
-    createFilterSupplier(queryString) {
-        return (restaurantsSupplier) => {
-          return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
-    //发站弹出层
-    handleSelectSendStation(item) {
-      this.sendStationId = item.arrivalId;
-      this.sendStation = item.arrivalName;
-    },
-    //以下是发站边输边查搜索
-    querySearchSendStation(queryString, cb) {
-      this.axios
-        .get("/api/v1/uc/getArrivalByLike?index=" + this.sendStation)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            console.log(restaurantsSupplier)
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterSendStation(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
+    makeSure() {
+      if(!this.form.resultDate ||
+      !this.form.resultApproveNumber||
+      !this.form.resultVoidNumber||
+      !this.form.resultRealNumber){
+        this.$message.warning("存在空值!");
+        return;
+      }else if(this.form.resultVoidNumber-this.form.resultApproveNumber>0){
+        this.$message.warning("落空车数不能超过批复车数!");
+        return;
+      }
+      this.form.resultDate= sjTime(this.form.resultDate);
+      this.form.resultSurplusNumber=this.form.resultApproveNumber-this.form.resultVoidNumber;
+      this.form.userId= getCookie("userId");
+      this.axios.post("/api/v1/tms/editPleaseResult", this.form).then(() => {
+          this.$message({
+            type: "success",
+            message: "修改成功!",
+          });
+          this.$router.go(-1);
         });
     },
-    //发站
-    createFilterSendStation(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.arrivalName
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-    //到站弹出层
-    handleSelectToTheStation(item) {
-      this.toTheStationId = item.arrivalId;
-      this.toTheStation = item.arrivalName;
-    },
-    //以下是到站边输边查搜索
-    querySearchToTheStation(queryString, cb) {
-      this.axios
-        .get("/api/v1/uc/getArrivalByLike?index=" + this.toTheStation)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            console.log(restaurantsSupplier)
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterToTheStation(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
+    //获取当天车皮数量
+    getRealNumber(){
+      if(this.form.resultDate){
+        this.form.resultDate=sjTime(this.form.resultDate);
+        this.axios.post("/api/v1/tms/getRealNumber",this.form).then((res)=>{
+          console.log("res",res);
+          this.form.resultRealNumber=res.data.data;
+          console.log("form",this.form);
         });
-    },
-    //到站
-    createFilterToTheStation(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.arrivalName
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-
-    // 确认
-    onClickConfirm() {
-      let tmstrainPleaseApproveResult = {
-        resultId: this.$route.params.resultId,
-        resultPlanDate: sjTime(this.form1.resultPlanDate),
-        resultCategory: this.form1.resultCategory,
-        supplierId: this.supplierId,
-        sendStationId: this.sendStationId,
-        toTheStationId: this.toTheStationId,
-        resultPleaseNumber: this.form1.resultPleaseNumber,
-      };
-      console.log(tmstrainPleaseApproveResult)
-      function isNumber() {
-        var value = tmstrainPleaseApproveResult.resultPleaseNumber;
-        //验证是否为数字
-        var patrn = /^(-)?\d+(\.\d+)?$/;
-        if (patrn.exec(value) == null || value == "") {
-          return false;
-        } else {
-          return true;
-        }
       }
-      var val = this.value;
-      if (
-        tmstrainPleaseApproveResult.resultPlanDate == null ||
-        tmstrainPleaseApproveResult.resultCategory == null ||
-        tmstrainPleaseApproveResult.supplierId == null ||
-        tmstrainPleaseApproveResult.sendStationId == null ||
-        tmstrainPleaseApproveResult.toTheStationId == null ||
-        tmstrainPleaseApproveResult.resultPleaseNumber == null
-      )
-        this.$message.error("存在空值!");
-      else if (!isNumber(val)) this.$message.error("请车数必须是数字!");
-      else
-        this.axios
-          .post(
-            "/api/v1/tms/updateApproveWagonPlease",
-            tmstrainPleaseApproveResult
-          )
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "修改成功!",
-            });
-            this.$router.go(-1);
-          });
-    },
+    }
   },
 };
 </script>
 <style lang="scss">
-.contractDetails {
-  .form {
-    display: flex;
-    .form_box {
-      width: 340px;
-      margin-left: 35%;
-      margin-top: 30px;
-      margin-right: 20px;
-      .el-form {
-        .preview-group {
-          .el-form-item {
-            .el-form-item__label {
-              display: inline-block;
-              width: 70px !important;
-            }
-            .el-form-item__content {
-              .el-select {
-                width: 250px;
-              }
-              .el-input {
-                width: 250px;
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-  .button_box {
-    margin-left: 42%;
-    margin-top: 55px;
-  }
-  .fromOther {
-  margin-left: 34.5%;
-  width: 50%;
-  .el-input__inner{
-    width: 250px;
-  
-  }
-}
-}
 
 </style>

+ 82 - 17
src/views/TMS/components/importedMine/outBoundWagon.vue

@@ -2,22 +2,25 @@
   <!-- 出库 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-
+      <el-input placeholder="请输入内容" v-model="input" clearable style="width:200px"> </el-input>
+      <el-date-picker style="margin: 10px;width:250px" v-model="startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;width:250px" v-model="endTime" type="datetime" placeholder="结束日期"></el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" class="btn" @click="insert"> 出库 </el-button>
+      <el-button type="primary" @click="exportData()" ><i class="el-icon-download"></i>导出(Excel)</el-button>
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
-      <mergeRowTable v-bind.sync="option1" ref="table">
+      <el-tab-pane label="全部" name="first">
+        <mergeRowTable v-bind.sync="option1" ref="excelDom" @func="calculate">
         <el-table-column fixed="right" label="操作" width="50">
           <template slot-scope="scope">
             <el-button
               @click="click(scope.row.resultId)"
               type="text"
               size="small"
-              :disabled="!isEdit"
+              :disabled="scope.row.isEdit!=1"
               >修改</el-button
             >
             <!-- <el-button
@@ -28,12 +31,38 @@
           </template>
         </el-table-column>
       </mergeRowTable>
+      </el-tab-pane>
+      <el-tab-pane label="待计量" name="second">
+        <mergeRowTable v-bind.sync="option1" ref="excelDom" @func="calculate">
+        <el-table-column fixed="right" label="操作" width="50">
+          <template slot-scope="scope">
+            <el-button
+              @click="click(scope.row.resultId)"
+              type="text"
+              size="small"
+              :disabled="scope.row.isEdit!=1"
+              >修改</el-button
+            >
+            <!-- <el-button
+            type="text"
+            size="small"
+            @click="deleteclick(scope.row.resultId)"
+            >删除</el-button > -->
+          </template>
+        </el-table-column>
+      </mergeRowTable>
+      </el-tab-pane>
     </el-tabs>
+    <div class="count"  style="margin-right:50px;font-size:18px;">
+      <div style="display:flex;flex-direction:row-reverse">总车数:{{dataTabel.length}}</div>
+      <div style="display:flex;flex-direction:row-reverse">标重总吨位:{{sum}}</div>
+    </div>
   </div>
 </template>
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
@@ -47,34 +76,70 @@ export default {
         comparison: "resultNumber",
         columnIndexs: [0, 1, 2, 3, 4, 5],
       },
+      startTime: null,
+      endTime: null,
+      tableTitle: "港口出库表",
+      dataTabel:[],
+      sum:0,
     };
   },
   filters: {},
+  mounted(){
+    this.onclick();
+  },
   methods: {
     onclick() {
       if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input;
+        if(this.checkSEDate()==true){
+          this.option1.requestUrl =
+          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
+          +"&activeName="+this.activeName
+          +"&startTime="+sjTime(this.startTime)
+          +"&endTime="+sjTime(this.endTime);
+        }else{
+          this.option1.requestUrl =
+          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
+           +"&activeName="+this.activeName;
+        }
+      }else if(this.activeName == "second"){
+        if(this.checkSEDate()==true){
+          this.option1.requestUrl =
+          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
+           +"&activeName="+this.activeName
+           +"&startTime="+sjTime(this.startTime)
+          +"&endTime="+sjTime(this.endTime);
+        }else{
+          this.option1.requestUrl =
+          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
+          +"&activeName="+this.activeName;
+        }
       }
     },
     insert() {
       this.$router.push("/addWagonLoadCopy");
     },
     handleClick(tab, event) {
-      console.log(tab, event);
+      this.onclick();
     },
     click(resultId) {
-      console.log("res",getCookie("orgCode"));
-      if (
-        getCookie("orgCode") == "yuanliaogongsi" ||
-        getCookie("orgCode") == "dagangadmin"
-      ) {
-       this.$router.push("/editOutBoundWagon/" + resultId);
-      
-      } else {
-          this.$message.warning("权限不足,请联系部门管理员!");
-        }
+      this.$router.push("/editOutBoundWagon/" + resultId);
     },
+    //起止时间校验
+    checkSEDate(){
+      if(this.startTime && this.endTime && this.startTime<=this.endTime){
+          return true;
+      }else{
+         return false;
+      }
+    },
+    calculate(res){
+      console.log("res",res);
+      this.dataTabel=res.list;
+      this.sum=0
+      this.dataTabel.forEach(item => {
+        this.sum+=item.weight;
+      });
+    }
   },
 };
 </script>

+ 50 - 85
src/views/TMS/components/importedMine/wagonPlease.vue

@@ -1,19 +1,28 @@
 <template>
   <!-- 请车作业页面 -->
   <div class="trainTransport">
-    <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" @click="insertClick">
-        <i class="el-icon-plus"></i>新增
-      </el-button>
-    </div>
-    <el-tabs v-model="activeName">
-      <!-- 未下发 -->
-      <el-tab-pane label="未下发" name="first">
-        <dilTable v-bind.sync="option1" ref="table">
+     <div class="search" style="display:flex;margin: 10px;">
+        <!-- <el-input
+          placeholder="请输入"
+          v-model="input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input> -->
+       <el-date-picker style="margin: 10px;" v-model="startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;" v-model="endTime" type="datetime" placeholder="结束日期"></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="onclick"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <el-button class="btn" style="margin: 10px;" type="primary" @click="insertClick">
+          <i class="el-icon-plus"></i>新增
+        </el-button>
+      </div>
+      <dilTable v-bind.sync="option" ref="table">
           <el-table-column fixed="right" label="操作" width="120">
             <template slot-scope="scope">
               <el-button
@@ -24,75 +33,59 @@
                 修改
               </el-button>
               <el-button
-                @click="deleteClick(scope.row.resultId)"
+                @click="deleteClick(scope.row)"
                 type="text"
                 size="small"
               >
                 删除
               </el-button>
-              <el-button
-                @click="sendClick(scope.row.resultId)"
-                type="text"
-                size="small"
-              >
-                下发
-              </el-button>
             </template>
           </el-table-column>
         </dilTable>
-      </el-tab-pane>
-      <!-- 已下发 -->
-      <el-tab-pane label="已下发" name="second">
-        <dilTable v-bind.sync="option2"></dilTable>
-      </el-tab-pane>
-    </el-tabs>
   </div>
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
     return {
       input: "",
-      activeName: "first",
-      option1: {
+      startTime:null,
+      endTime:null,
+      option: {
         // 表格请求数据的地址
         requestUrl: ""
       },
-      option2: {
-        // 表格请求数据的地址
-        requestUrl: ""
-      }
     };
   },
   created() {
-    this.getRequestUrl();
+    this.onclick();
   },
   methods: {
-    getRequestUrl() {
-      this.option1.requestUrl =
-        "/api/v1/tms/getAllWagonPlease?apiId=57&status=0&resultType=1" +
-        "&i=" +
-        new Date();
-      this.option2.requestUrl =
-        "/api/v1/tms/getAllWagonPlease?apiId=57&status=1&resultType=1" +
-        "&i=" +
-        new Date();
+    checkDate(){
+      if(this.startTime&&this.endTime&&this.startTime<this.endTime){
+        return true;
+      }else{
+        return false;
+      }
     },
     onclick() {
-      if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/tms/getAllWagonPlease?apiId=57&status=0&resultType=1&con=" +
-          this.input;
+      if (this.checkDate()) {
+        this.option.requestUrl =
+          "/api/v1/tms/getAllPleaseResult?apiId=509&con=" + this.input
+          +"&i="+new Date()
+          +"&startTime="+sjTime(this.startTime)
+          +"&endTime="+sjTime(this.endTime);
       } else {
-        this.option2.requestUrl =
-          "/api/v1/tms/getAllWagonPlease?apiId=57&status=1&resultType=1&con=" +
-          this.input;
+        this.option.requestUrl =
+          "/api/v1/tms/getAllPleaseResult?apiId=509&con=" +this.input
+          +"&i="+new Date();
       }
     },
     // 删除
-    deleteClick(resultId) {
+    deleteClick(row) {
       this.$confirm("是否删除", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -100,49 +93,21 @@ export default {
         center: true
       })
         .then(() => {
+          let map={
+            resultId:row.resultId,
+            deleted:1
+          }
           this.axios
-            .post("/api/v1/tms/deleteApproveWagonPlease/" + resultId)
+            .post("/api/v1/tms/editPleaseResult",map)
             .then(() => {
               this.$message({
                 type: "success",
                 message: "删除成功!"
               });
-              this.getRequestUrl();
+              this.onclick();
             });
         })  
     },
-    // 下发
-    sendClick(resultId) {
-      this.$confirm("是否下发", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true
-      })
-        .then(() => {
-          console.log("enter!1!");
-          this.axios
-            .post("/api/v1/tms/sendWagonPlease/" + resultId)
-            .then(res => {
-              if (res.data.code == "200") {
-                this.getRequestUrl();
-              }
-            });
-          this.$message({
-            type: "success",
-            message: "下发成功!"
-          });
-          // console.log(this.arr[0].text_prop);
-        })
-        .catch(() => {
-          console.log("out!S");
-          this.$message({
-            type: "info",
-            message: "取消下发!"
-          });
-        });
-    },
-
     //新增
     insertClick() {
       this.$router.push("/addWagonPlease/");

+ 45 - 15
src/views/TMS/components/importedShip/addLoadShip.vue

@@ -12,11 +12,9 @@
     <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
     </dilTable>
     <div class="form">
-      <!-- 第二部分 -->
       <div class="form_box">
         <dil-form :formId="120" v-model="form"></dil-form>
-            <el-form :inline="true">
-            <!-- 含水率 -->
+            <!-- <el-form :inline="true">
           <el-form-item>
             <label class="el-form-item__label" style="width: auto;margin: left 2px;"
               >含水率</label
@@ -25,7 +23,6 @@
           <el-form-item>
             <el-input placeholder="" v-model="resultMoistureContent"></el-input>
           </el-form-item>
-          <!-- 合同水分值 -->
           <el-form-item>
             <label class="el-form-item__label" style="width: auto"
               >合同水分值</label
@@ -38,7 +35,6 @@
               :disabled="true"
             ></el-input>
           </el-form-item>
-          <!-- 水分吨位 -->
           <el-form-item>
             <label class="el-form-item__label" style="width: auto"
               >水分吨位</label
@@ -51,11 +47,10 @@
               :disabled="true"
             ></el-input>
           </el-form-item>
-        </el-form>
+        </el-form> -->
       </div>
-      <!-- 下方内容 -->  
     </div>
-    <div class="button_box">
+    <div class="button_box_addLoadShip">
       <el-button type="primary" @click="makeSure">新增装船作业</el-button>
     </div>
   </div>
@@ -75,7 +70,9 @@ export default {
       batchInfactoryId:"",
       restaurants: [],
       state: "",
-      form: {},
+      form: {
+        waterUnitPrice:null,
+      },
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getCapacityList?apiId=138",
@@ -83,21 +80,52 @@ export default {
         selectionType: "radio",
       },
       rowMap: {},
+      unitPrices:[]
     };
   },
-  mounted() {},
+  mounted() {
+    this.getUnitPrice();
+  },
     watch: {
     resultMoistureContent() {
       this.pipeiContarct();
     },
     batchId() {
       this.pipeiContarct();
+    },
+    "form.resultOutWharyTime":{
+      handler(newVal,oldVal){
+        this.findUnitPrice();
+      },
+      deep: true,
+      immediate: true
     }
   },
   methods: {
+    getUnitPrice(){
+      this.axios
+            .post("/api/v1/rms/selectbmsshipContractPriceList?apiId=500")
+            .then((res) => {
+                this.unitPrices=res.data.data.list;
+        });
+    },
+    findUnitPrice(){
+      if(this.rowMap && this.form.resultOutWharyTime){
+          let contract=this.unitPrices.find(item=>
+          item.portId==this.rowMap.startPortId
+          && sjTime(this.form.resultOutWharyTime)>=sjTime(item.startTime)
+          && sjTime(this.form.resultOutWharyTime)<=sjTime(item.endTime));
+          if(contract){
+             this.form.waterUnitPrice=contract.unitPrice;
+             this.form.unitPriceId=contract.resultId;
+             console.log("contract:",contract);
+          }
+      }
+    },
     currentRadioChange(row) {
       this.rowMap = row;
       this.batchInfactoryId=this.rowMap.batchInfactoryId;
+      this.findUnitPrice();
     },
 
     pipeiContarct() {
@@ -139,17 +167,19 @@ export default {
         resultOutWharyName: this.form.resultOutWharyName,
         resultOutWharyTime: sjTime(this.form.resultOutWharyTime),
         resultMemo: this.form.resultMemo,
-        resultPlannedDate: sjTime(this.form.planDate),
-        expectNoticeDate: sjTime(this.form.expectNoticeDate),
+        //resultPlannedDate: sjTime(this.form.planDate),
+        //expectNoticeDate: sjTime(this.form.expectNoticeDate),
         resultEmptyHeavyWaterMeter: this.form.resultEmptyHeavyWaterMeter,
         resultMoistureContent: this.resultMoistureContent,
-        resultInspectionFees: this.form.resultInspectionFees,
+        //resultInspectionFees: this.form.resultInspectionFees,
         contractMoistureValue: this.contractMoistureValue,
         moistureTonnage: this.moistureTonnage,
         waterUnitPrice:this.form.waterUnitPrice,
-        isNeedAssemble:this.form.isNeedAssemble,
+        unitPriceId:this.form.unitPriceId,
+        //isNeedAssemble:this.form.isNeedAssemble,
         userId: getCookie("userId"),
       };
+      console.log("mapVal:",mapVal);
       //判断放货数量是否为数字
       function isNumber() {
         var value = mapVal.resultActualInstallations;
@@ -255,7 +285,7 @@ export default {
       margin-right: 1.25rem;
     }
   }
-  .button_box {
+  .button_box_addLoadShip {
     margin-left: 45%;
   }
 }

+ 3 - 3
src/views/TMS/components/importedShip/updateLoadShip.vue

@@ -73,9 +73,9 @@ export default {
         ),
         resultIsClear: this.form1.resultIsClear,
         resultOutPortName:this.form1.resultOutPortName,
-        planDate:sjTime(this.form1.planDate),
-        planDeliveryDate:sjTime(this.form1.planDeliveryDate),
-        resultHeavyWeight:this.form1.resultHeavyWeight,
+        //planDate:sjTime(this.form1.planDate),
+        //planDeliveryDate:sjTime(this.form1.planDeliveryDate),
+        //resultHeavyWeight:this.form1.resultHeavyWeight,
         userId:getCookie("userId"),
       };
               //判断放货数量是否为数字

+ 15 - 2
src/views/TMS/router/index.js

@@ -228,11 +228,13 @@ import editDomesticTrainFee from "../components/bmstrain/editDomesticTrainFee.vu
 import threeSectionHandleFee from "../components/bmsship/threeSectionHandleFee.vue";
 import addThreeSectionHandleFee from "../components/bmsship/addThreeSectionHandleFee.vue";
 import editThreeSectionHandleFee from "../components/bmsship/editThreeSectionHandleFee.vue";
-import threeSectionFee from "../components/bmsship/threeSectionFee.vue";
+import threeSectionFee from "../components/bmsship/threeSectionFee.vue";    
 import addThreeSectionFee from "../components/bmsship/addThreeSectionFee.vue";
 import editThreeSectionFee from "../components/bmsship/editThreeSectionFee.vue";
 import moistureDetection from "../components/bmsship/moistureDetection.vue";
 import addMoistureDetection from "../components/bmsship/addMoistureDetection.vue";
+import threeSectionFeeDetails from "../components/bmsship/threeSectionFeeDetails.vue";
+import updateThreeSectionFeeDetails from "../components/bmsship/updateThreeSectionFeeDetails.vue";   
 Vue.use(Router);
 
 const constantRouterMap = [
@@ -1464,7 +1466,18 @@ const constantRouterMap = [
         name: "moistureDetection",
         meta: { code: "xtpzgl-jggl" },
         component: moistureDetection
-      }
+      },{
+        path: "threeSectionFeeDetails",
+        name: "threeSectionFeeDetails",
+        meta: { code: "xtpzgl-jggl" },
+        component: threeSectionFeeDetails
+      },
+      {
+        path: "updateThreeSectionFeeDetails/:resultId",
+        name: "updateThreeSectionFeeDetails",
+        meta: { code: "xtpzgl-jggl" },
+        component: updateThreeSectionFeeDetails
+      },
     ]
   }
 ];

+ 3 - 1
src/views/WMS/components/billingOrder/updateBill.vue

@@ -139,6 +139,7 @@ export default {
           this.consigneeCompanyName = res.data.data.consigneeCompanyName;
           this.receiveAddressName = res.data.data.receiveAddressName;
           this.shipperName = res.data.data.shipperName;
+          this.saleOrderId = res.data.data.saleOrderId;
         });
     },
     changeMaterial() {
@@ -235,7 +236,8 @@ export default {
       // }
       let updateNumMap = {
         orderId: this.orderId,
-        mapList: this.materialList
+        mapList: this.materialList,
+        saleOrderId: this.saleOrderId
       };
       this.axios
         .post("/api/v1/oms/updateMaterialMes", updateNumMap)

+ 206 - 109
src/views/WMS/components/steel/addSteelInbound.vue

@@ -1,20 +1,32 @@
 <template>
   <!-- 新增入库转预留作业页面 -->
   <div class="addCheckWarehouse">
-    <page-title>入库转预留作业</page-title>
+    <page-title>预留转入库作业</page-title>
     <div class="material from">
       <span class="text">物资规格型号:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
     </div>
     <div class="materialNumber from">
-      <span class="text">最大预留件数:</span>
+      <span class="text">最大入库件数:</span>
       <el-input class="input" v-model="max" disabled> </el-input>
     </div>
     <div class="materialNumber from">
       <span class="text">件数:</span>
       <el-input class="input" v-model="materialNumber"> </el-input>
     </div>
+    <div class="materialNumber from">
+      <span class="text">理重(磅重)</span>
+      <el-input class="input" v-model="materialTheWeight" disabled> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">实重</span>
+      <el-input class="input" v-model="actuallyWeight"> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">备注</span>
+      <el-input class="input" v-model="remark"> </el-input>
+    </div>
     <!-- 模态窗口 -->
     <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
       <div style="margin-bottom: 10px">
@@ -39,11 +51,13 @@
           v-bind.sync="second"
           @radio-change="currentRadioChange2"
         ></dilTable>
-      </div>          
+      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
@@ -55,22 +69,22 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      startTime:null,
-      endTime:null,
-      max:null,
-      disabled:false,
+      startTime: null,
+      endTime: null,
+      max: null,
+      disabled: false,
       //仓库名称
-      warehouseName:null,
+      warehouseName: null,
       //物资名称
       materialName: null,
       //物资编码
-      materialCode:null,
+      materialCode: null,
       // 物资规格
-      materialSpecification:null,
+      materialSpecification: null,
       // 物资型号
-      materialModel:null,
+      materialModel: null,
       //盘点数量
-      materialNumber:null,
+      materialNumber: null,
       //物资id
       materialId: null,
       //是否需要打开模态窗口
@@ -81,12 +95,15 @@ export default {
       first: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       second: {
-          requestUrl: "",
-          selectionType:"radio"
-      }
+        requestUrl: "",
+        selectionType: "radio"
+      },
+      materialTheWeight: 0,
+      actuallyWeight: 0,
+      remark: null
     };
   },
   watch: {
@@ -95,46 +112,99 @@ export default {
         this.input = null;
       }
     },
+    materialNumber() {
+      this.getTheoreticalByInfo();
+    }
   },
   created() {
-      let strTime=this.formatDate(new Date(),"yyyy-MM-dd hh:mm:ss")
-      this.startTime= Date.parse(new Date(strTime));
-      this.endTime=new Date(this.startTime+86400000);
+    let strTime = this.formatDate(new Date(), "yyyy-MM-dd hh:mm:ss");
+    this.startTime = Date.parse(new Date(strTime));
+    this.endTime = new Date(this.startTime + 86400000);
   },
   methods: {
-    formatDate (date, fmt) {
-        if (/(y+)/.test(fmt)) {
-          fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-        }
-        let o = {
-          'M+': date.getMonth() + 1,
-          'd+': date.getDate(),
-          'h+': 0,
-          'm+': 0,
-          's+': 0
+    getTheoreticalByInfo() {
+      this.axios
+        .post(
+          "/api/v1/wms/getTheoreticalByInfo?warehouseId=" +
+            3 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&num=" +
+            this.materialNumber +
+            "&status=1"
+        )
+        .then(res => {
+          if (res.data.data == -1) {
+            this.$message.error("数量超出");
+            this.materialTheWeight = null;
+          } else {
+            this.materialTheWeight = parseFloat(res.data.data);
+          }
+        });
+    },
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
       }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": 0,
+        "m+": 0,
+        "s+": 0
+      };
       for (let k in o) {
         if (new RegExp(`(${k})`).test(fmt)) {
-          let str = o[k] + ''
-          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str))
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : this.padLeftZero(str)
+          );
         }
-            }
-      return fmt
+      }
+      return fmt;
     },
-    padLeftZero (str) {
-        return ('00' + str).substr(str.length)
+    padLeftZero(str) {
+      return ("00" + str).substr(str.length);
     },
     onclick(a) {
       if (a == 1) {
-        console.log(this.input)
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+3+"&status="+1+"&con="+this.input+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
+        console.log(this.input);
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          3 +
+          "&status=" +
+          1 +
+          "&con=" +
+          this.input +
+          "&startTime=" +
+          sjTime(this.startTime) +
+          "&endTime=" +
+          sjTime(this.endTime);
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
-      if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+3+"&status="+1+"&con="+""+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
+      if (num == 1) {
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          3 +
+          "&status=" +
+          1 +
+          "&con=" +
+          "" +
+          "&startTime=" +
+          sjTime(this.startTime) +
+          "&endTime=" +
+          sjTime(this.endTime);
       }
     },
     // 返回
@@ -150,97 +220,124 @@ export default {
       this.max = selection.max;
     },
     currentRadioChange2(selection) {
-      this.warehouseId = selection.warehouseId
-      this.warehouseName = selection.warehouseName
+      this.warehouseId = selection.warehouseId;
+      this.warehouseName = selection.warehouseName;
     },
     // 确认
     onClickConfirm() {
-      // console.log(this.warehouseId,this.materialCode,this.materialNumber);
-      this.disabled = true
-      this.axios.post("/api/v1/wms/insertReserved?warehouseId=" + 3 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
-        console.log(res.data)
+      this.disabled = true;
+      // if(isNumber(this.actuallyWeight))
+      if (!isNumber(this.actuallyWeight)) {
+        this.$message.error("实重填写不正确");
+        return;
+      }
+      this.axios
+        .post(
+          "/api/v1/wms/insertReserved?warehouseId=" +
+            3 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&quantity=" +
+            this.materialNumber +
+            "&actuallyWeight=" +
+            Number(parseFloat(this.actuallyWeight)) +
+            "&materialTheWeight=" +
+            Number(parseFloat(this.materialTheWeight)) +
+            "&remark=" +
+            this.remark
+        )
+        .then(res => {
+          console.log(res.data);
           if (res.data.code == "200") {
             this.$message({
-              message: "预留成功!",
-              type: "success",
+              message: "入库成功!",
+              type: "success"
             });
-            this.disabled = false
-            this.onClickCancel()
-            this.$router.go(-1)
-          }else if(res.data.code=="201"){
+            this.disabled = false;
+            this.onClickCancel();
+            this.$router.go(-1);
+          } else if (res.data.code == "201") {
             this.$message({
-              message:"预留的数量不正确",
-              type:"faile",
-            })
+              message: "入库的数量不正确",
+              type: "faile"
+            });
+            this.disabled = false;
           }
-          this.$router.go(-1)
+          this.$router.go(-1);
+        })
+        .catch(() => {
+          this.disabled = false;
         });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scope>
-.addCheckWarehouse{
-.contractDetails {
-  width: 100%;
-}
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.warehouse {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  margin-right: 70px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+.addCheckWarehouse {
+  .contractDetails {
+    width: 100%;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
   }
-}
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .warehouse {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.materialNumber {
+  .materialNumber {
     display: flex;
     justify-content: center;
     margin-top: 20px;
     margin-right: 70px;
     .text {
-        display:inline-block;
-        width: 170px;
-        text-align: right;
+      display: inline-block;
+      width: 170px;
+      text-align: right;
     }
     .input {
-        width: 250px;
-        margin-right: 20px;
+      width: 250px;
+      margin-right: 20px;
     }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100px;
+  }
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
-}
-}
-</style>
+</style>

+ 120 - 90
src/views/WMS/components/steel/addSteelReserved.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 新增预留转入库作业页面 -->
   <div class="addCheckWarehouse">
-    <page-title>预留转入库作业</page-title>
+    <page-title>入库转预留作业</page-title>
     <div class="material from">
       <span class="text">物资规格型号:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
@@ -39,11 +39,13 @@
           v-bind.sync="second"
           @radio-change="currentRadioChange2"
         ></dilTable>
-      </div>          
+      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
@@ -55,20 +57,20 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      max:null,
-      disabled:false,
+      max: null,
+      disabled: false,
       //仓库名称
-      warehouseName:null,
+      warehouseName: null,
       //物资名称
       materialName: null,
       //物资编码
-      materialCode:null,
-       // 物资规格
-      materialSpecification:null,
+      materialCode: null,
+      // 物资规格
+      materialSpecification: null,
       // 物资型号
-      materialModel:null,
+      materialModel: null,
       //盘点数量
-      materialNumber:null,
+      materialNumber: null,
       //物资id
       materialId: null,
       //是否需要打开模态窗口
@@ -79,11 +81,11 @@ export default {
       first: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       second: {
-          requestUrl: "",
-          selectionType:"radio"
+        requestUrl: "",
+        selectionType: "radio"
       }
     };
   },
@@ -92,22 +94,32 @@ export default {
       if (!val) {
         this.input = null;
       }
-    },
-  },
-  created() {
-      
+    }
   },
+  created() {},
   methods: {
     onclick(a) {
       if (a == 1) {
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+3+"&status="+2+"&con="+this.input
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          3 +
+          "&status=" +
+          2 +
+          "&con=" +
+          this.input;
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
-      if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+3+"&status="+2+"&con="+""
+      if (num == 1) {
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          3 +
+          "&status=" +
+          2 +
+          "&con=" +
+          "";
       }
     },
     // 返回
@@ -116,7 +128,12 @@ export default {
     },
     currentRadioChange1(selection) {
       console.log(selection);
-      this.materialName = selection.materialName + selection.materialSpecification + '(' + selection.materialModel + ')' ;
+      this.materialName =
+        selection.materialName +
+        selection.materialSpecification +
+        "(" +
+        selection.materialModel +
+        ")";
       this.materialId = selection.materialId;
       this.materialCode = selection.materialCode;
       this.materialSpecification = selection.materialSpecification;
@@ -124,97 +141,110 @@ export default {
       this.max = selection.max;
     },
     currentRadioChange2(selection) {
-      this.warehouseId = selection.warehouseId
-      this.warehouseName = selection.warehouseName
+      this.warehouseId = selection.warehouseId;
+      this.warehouseName = selection.warehouseName;
     },
     // 确认
     onClickConfirm() {
       // console.log(this.warehouseId,this.materialCode,this.materialNumber);
-      this.disabled = true
-      this.axios.post("/api/v1/wms/insertInbounds?warehouseId=" + 3 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
-        console.log(res.data)
+      this.disabled = true;
+      this.axios
+        .post(
+          "/api/v1/wms/insertInbounds?warehouseId=" +
+            3 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&quantity=" +
+            this.materialNumber
+        )
+        .then(res => {
+          console.log(res.data);
           if (res.data.code == "200") {
             this.$message({
-              message: "入库成功!",
-              type: "success",
+              message: "转预留成功!",
+              type: "success"
             });
-            this.disabled = false
-            this.onClickCancel()
-            this.$router.go(-1)
-          }else if(res.data.code=="201"){
+            this.disabled = false;
+            this.onClickCancel();
+            this.$router.go(-1);
+          } else if (res.data.code == "201") {
             this.$message({
-              message:"入库的数量不正确",
-              type:"faile",
-            })
+              message: "转预留的数量不正确",
+              type: "faile"
+            });
           }
-          this.$router.go(-1)
+          this.$router.go(-1);
         });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scope>
-.addCheckWarehouse{
-.contractDetails {
-  width: 100%;
-}
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.warehouse {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  margin-right: 70px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+.addCheckWarehouse {
+  .contractDetails {
+    width: 100%;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
   }
-}
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .warehouse {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.materialNumber {
+  .materialNumber {
     display: flex;
     justify-content: center;
     margin-top: 20px;
     margin-right: 70px;
     .text {
-        display:inline-block;
-        width: 170px;
-        text-align: right;
+      display: inline-block;
+      width: 170px;
+      text-align: right;
     }
     .input {
-        width: 250px;
-        margin-right: 20px;
+      width: 250px;
+      margin-right: 20px;
     }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100px;
+  }
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
-}
-}
-</style>
+</style>

+ 208 - 110
src/views/WMS/components/steel/bar1_steel/bar1_addSteelInbound.vue

@@ -1,20 +1,32 @@
 <template>
   <!-- 新增入库转预留作业页面 -->
   <div class="addCheckWarehouse">
-    <page-title>入库转预留作业</page-title>
+    <page-title>预留转入库作业</page-title>
     <div class="material from">
       <span class="text">物资规格型号:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
     </div>
     <div class="materialNumber from">
-      <span class="text">最大预留件数:</span>
+      <span class="text">最大入库件数:</span>
       <el-input class="input" v-model="max" disabled> </el-input>
     </div>
     <div class="materialNumber from">
       <span class="text">件数:</span>
       <el-input class="input" v-model="materialNumber"> </el-input>
     </div>
+    <div class="materialNumber from">
+      <span class="text">理重(磅重)</span>
+      <el-input class="input" v-model="materialTheWeight" disabled> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">实重</span>
+      <el-input class="input" v-model="actuallyWeight"> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">备注</span>
+      <el-input class="input" v-model="remark"> </el-input>
+    </div>
     <!-- 模态窗口 -->
     <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
       <div style="margin-bottom: 10px">
@@ -39,11 +51,13 @@
           v-bind.sync="second"
           @radio-change="currentRadioChange2"
         ></dilTable>
-      </div>          
+      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
@@ -55,22 +69,22 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      startTime:null,
-      endTime:null,
-      max:null,
-      disabled:false,
+      startTime: null,
+      endTime: null,
+      max: null,
+      disabled: false,
       //仓库名称
-      warehouseName:null,
+      warehouseName: null,
       //物资名称
       materialName: null,
       //物资编码
-      materialCode:null,
-       // 物资规格
-      materialSpecification:null,
+      materialCode: null,
+      // 物资规格
+      materialSpecification: null,
       // 物资型号
-      materialModel:null,
+      materialModel: null,
       //盘点数量
-      materialNumber:null,
+      materialNumber: null,
       //物资id
       materialId: null,
       //是否需要打开模态窗口
@@ -81,12 +95,15 @@ export default {
       first: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       second: {
-          requestUrl: "",
-          selectionType:"radio"
-      }
+        requestUrl: "",
+        selectionType: "radio"
+      },
+      materialTheWeight: 0,
+      actuallyWeight: 0,
+      remark: null
     };
   },
   watch: {
@@ -95,45 +112,98 @@ export default {
         this.input = null;
       }
     },
+    materialNumber() {
+      this.getTheoreticalByInfo();
+    }
   },
   created() {
-      let strTime=this.formatDate(new Date(),"yyyy-MM-dd hh:mm:ss")
-      this.startTime= Date.parse(new Date(strTime));
-      this.endTime=new Date(this.startTime+86400000);
+    let strTime = this.formatDate(new Date(), "yyyy-MM-dd hh:mm:ss");
+    this.startTime = Date.parse(new Date(strTime));
+    this.endTime = new Date(this.startTime + 86400000);
   },
   methods: {
-    formatDate (date, fmt) {
-        if (/(y+)/.test(fmt)) {
-          fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-        }
-        let o = {
-          'M+': date.getMonth() + 1,
-          'd+': date.getDate(),
-          'h+': 0,
-          'm+': 0,
-          's+': 0
+    getTheoreticalByInfo() {
+      this.axios
+        .post(
+          "/api/v1/wms/getTheoreticalByInfo?warehouseId=" +
+            1 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&num=" +
+            this.materialNumber +
+            "&status=1"
+        )
+        .then(res => {
+          if (res.data.data == -1) {
+            this.$message.error("数量超出");
+            this.materialTheWeight = null;
+          } else {
+            this.materialTheWeight = parseFloat(res.data.data);
+          }
+        });
+    },
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
       }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": 0,
+        "m+": 0,
+        "s+": 0
+      };
       for (let k in o) {
         if (new RegExp(`(${k})`).test(fmt)) {
-          let str = o[k] + ''
-          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str))
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : this.padLeftZero(str)
+          );
         }
-            }
-      return fmt
+      }
+      return fmt;
     },
-    padLeftZero (str) {
-        return ('00' + str).substr(str.length)
+    padLeftZero(str) {
+      return ("00" + str).substr(str.length);
     },
     onclick(a) {
       if (a == 1) {
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+1+"&status="+1+"&con="+this.input+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          1 +
+          "&status=" +
+          1 +
+          "&con=" +
+          this.input +
+          "&startTime=" +
+          sjTime(this.startTime) +
+          "&endTime=" +
+          sjTime(this.endTime);
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
-      if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+1+"&status="+1+"&con="+""+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
+      if (num == 1) {
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          1 +
+          "&status=" +
+          1 +
+          "&con=" +
+          "" +
+          "&startTime=" +
+          sjTime(this.startTime) +
+          "&endTime=" +
+          sjTime(this.endTime);
       }
     },
     // 返回
@@ -142,7 +212,12 @@ export default {
     },
     currentRadioChange1(selection) {
       console.log(selection);
-      this.materialName = selection.materialName + selection.materialSpecification + '(' + selection.materialModel + ')' ;
+      this.materialName =
+        selection.materialName +
+        selection.materialSpecification +
+        "(" +
+        selection.materialModel +
+        ")";
       this.materialId = selection.materialId;
       this.materialCode = selection.materialCode;
       this.materialSpecification = selection.materialSpecification;
@@ -150,97 +225,120 @@ export default {
       this.max = selection.max;
     },
     currentRadioChange2(selection) {
-      this.warehouseId = selection.warehouseId
-      this.warehouseName = selection.warehouseName
+      this.warehouseId = selection.warehouseId;
+      this.warehouseName = selection.warehouseName;
     },
     // 确认
     onClickConfirm() {
+      if (!isNumber(this.actuallyWeight)) {
+        this.$message.error("实重填写不正确");
+        return;
+      }
       // console.log(this.warehouseId,this.materialCode,this.materialNumber);
-      this.disabled = true
-      this.axios.post("/api/v1/wms/insertReserved?warehouseId=" + 1 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
-        console.log(res.data)
+      this.disabled = true;
+      this.axios
+        .post(
+          "/api/v1/wms/insertReserved?warehouseId=" +
+            1 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&quantity=" +
+            this.materialNumber +
+            "&actuallyWeight=" +
+            Number(parseFloat(this.actuallyWeight)) +
+            "&materialTheWeight=" +
+            Number(parseFloat(this.materialTheWeight)) +
+            "&remark=" +
+            this.remark
+        )
+        .then(res => {
+          console.log(res.data);
           if (res.data.code == "200") {
             this.$message({
-              message: "预留成功!",
-              type: "success",
+              message: "入库成功!",
+              type: "success"
             });
-            this.disabled = false
-            this.onClickCancel()
-            this.$router.go(-1)
-          }else if(res.data.code=="201"){
+            this.disabled = false;
+            this.onClickCancel();
+            this.$router.go(-1);
+          } else if (res.data.code == "201") {
             this.$message({
-              message:"预留的数量不正确",
-              type:"faile",
-            })
+              message: "入库的数量不正确",
+              type: "faile"
+            });
           }
-          this.$router.go(-1)
+          this.$router.go(-1);
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang="scss" scope>
-.addCheckWarehouse{
-.contractDetails {
-  width: 100%;
-}
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.warehouse {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  margin-right: 70px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+<style lang="scss" scoped>
+.addCheckWarehouse {
+  .contractDetails {
+    width: 100%;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
   }
-}
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .warehouse {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.materialNumber {
+  .materialNumber {
     display: flex;
     justify-content: center;
     margin-top: 20px;
     margin-right: 70px;
     .text {
-        display:inline-block;
-        width: 170px;
-        text-align: right;
+      display: inline-block;
+      width: 170px;
+      text-align: right;
     }
     .input {
-        width: 250px;
-        margin-right: 20px;
+      width: 250px;
+      margin-right: 20px;
     }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100px;
+  }
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
-}
-}
-</style>
+</style>

+ 115 - 90
src/views/WMS/components/steel/bar1_steel/bar1_addSteelReserved.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 新增预留转入库作业页面 -->
   <div class="addCheckWarehouse">
-    <page-title>预留转入库作业</page-title>
+    <page-title>入库转预留作业</page-title>
     <div class="material from">
       <span class="text">物资规格型号:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
@@ -39,11 +39,13 @@
           v-bind.sync="second"
           @radio-change="currentRadioChange2"
         ></dilTable>
-      </div>          
+      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
@@ -55,20 +57,20 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      max:null,
-      disabled:false,
+      max: null,
+      disabled: false,
       //仓库名称
-      warehouseName:null,
+      warehouseName: null,
       //物资名称
       materialName: null,
       //物资编码
-      materialCode:null,
-       // 物资规格
-      materialSpecification:null,
+      materialCode: null,
+      // 物资规格
+      materialSpecification: null,
       // 物资型号
-      materialModel:null,
+      materialModel: null,
       //盘点数量
-      materialNumber:null,
+      materialNumber: null,
       //物资id
       materialId: null,
       //是否需要打开模态窗口
@@ -79,11 +81,11 @@ export default {
       first: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       second: {
-          requestUrl: "",
-          selectionType:"radio"
+        requestUrl: "",
+        selectionType: "radio"
       }
     };
   },
@@ -92,22 +94,32 @@ export default {
       if (!val) {
         this.input = null;
       }
-    },
-  },
-  created() {
-      
+    }
   },
+  created() {},
   methods: {
     onclick(a) {
       if (a == 1) {
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+1+"&status="+2+"&con="+this.input
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          1 +
+          "&status=" +
+          2 +
+          "&con=" +
+          this.input;
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
-      if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+1+"&status="+2+"&con="+""
+      if (num == 1) {
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          1 +
+          "&status=" +
+          2 +
+          "&con=" +
+          "";
       }
     },
     // 返回
@@ -123,97 +135,110 @@ export default {
       this.max = selection.max;
     },
     currentRadioChange2(selection) {
-      this.warehouseId = selection.warehouseId
-      this.warehouseName = selection.warehouseName
+      this.warehouseId = selection.warehouseId;
+      this.warehouseName = selection.warehouseName;
     },
     // 确认
     onClickConfirm() {
       // console.log(this.warehouseId,this.materialCode,this.materialNumber);
-      this.disabled = true
-      this.axios.post("/api/v1/wms/insertInbounds?warehouseId=" + 1 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
-        console.log(res.data)
+      this.disabled = true;
+      this.axios
+        .post(
+          "/api/v1/wms/insertInbounds?warehouseId=" +
+            1 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&quantity=" +
+            this.materialNumber
+        )
+        .then(res => {
+          console.log(res.data);
           if (res.data.code == "200") {
             this.$message({
-              message: "入库成功!",
-              type: "success",
+              message: "转预留成功!",
+              type: "success"
             });
-            this.disabled = false
-            this.onClickCancel()
-            this.$router.go(-1)
-          }else if(res.data.code=="201"){
+            this.disabled = false;
+            this.onClickCancel();
+            this.$router.go(-1);
+          } else if (res.data.code == "201") {
             this.$message({
-              message:"入库的数量不正确",
-              type:"faile",
-            })
+              message: "转预留的数量不正确",
+              type: "faile"
+            });
           }
-          this.$router.go(-1)
+          this.$router.go(-1);
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang="scss" scope>
-.addCheckWarehouse{
-.contractDetails {
-  width: 100%;
-}
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.warehouse {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  margin-right: 70px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+<style lang="scss" scoped>
+.addCheckWarehouse {
+  .contractDetails {
+    width: 100%;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
   }
-}
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .warehouse {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.materialNumber {
+  .materialNumber {
     display: flex;
     justify-content: center;
     margin-top: 20px;
     margin-right: 70px;
     .text {
-        display:inline-block;
-        width: 170px;
-        text-align: right;
+      display: inline-block;
+      width: 170px;
+      text-align: right;
     }
     .input {
-        width: 250px;
-        margin-right: 20px;
+      width: 250px;
+      margin-right: 20px;
     }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100px;
+  }
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
-}
-}
-</style>
+</style>

+ 135 - 70
src/views/WMS/components/steel/bar1_steel/bar1_steel_inbound.vue

@@ -1,28 +1,50 @@
 //入库
 <template>
-  <div class="steel_inbound">
+  <div class="steel_inbound01">
     <div class="sache">
-      <!-- <el-input
-        placeholder="请输入内容"
-        v-model="inputText"
-        clearable>
-      </el-input>
-       -->
-      <span>入库时间:</span>
-      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
-      </el-date-picker>
-      <span>至</span>
-      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
-      </el-date-picker>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" class="btn" @click="onreserved">
-        预留
-      </el-button>
+      <el-form :inline="true">
+        <el-form-item>
+          <span class="text">入库时间:</span>
+          <el-date-picker
+            disabled
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+          <span class="text">至</span>
+          <el-date-picker
+            disabled
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <span class="text">物资类型</span>
+          <el-autocomplete
+            v-model="inputText"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入内容"
+            @select="handleSelect"
+            style="width: 200px;"
+          ></el-autocomplete>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>查询
+          </el-button>
+          <el-button type="primary" class="btn" @click="onreserved">
+            入库
+          </el-button>
+        </el-form-item>
+      </el-form>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options" >
+      <dilTable v-bind.sync="options">
         <!-- <el-table-column fixed="right" label="操作" width="150">
 								<template slot-scope="scope">
 									<el-button type="text" size="mini" @click="inboundDetails(scope)">
@@ -37,60 +59,90 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      inputText:"",
+  data() {
+    return {
+      inputText: "",
       startTime: null,
       endTime: null,
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+1,
+        requestUrl: "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" + 1
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-   created(){
+  created() {
     var date = new Date();
-    let dateStr=this.formatDate(date, 'yyyy-MM-dd hh:mm:ss');
-    
-    this.startTime= Date.parse(new Date(dateStr));
-    this.endTime=new Date(this.startTime+86400000);
+    let dateStr = this.formatDate(date, "yyyy-MM-dd hh:mm:ss");
+
+    this.startTime = Date.parse(new Date(dateStr));
+    this.endTime = new Date(this.startTime + 86400000);
 
-    this.options.requestUrl= "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+1+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime) ;
-    this.tableShow=true;
+    this.options.requestUrl =
+      "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" +
+      1 +
+      "&startTime=" +
+      sjTime(this.startTime) +
+      "&endTime=" +
+      sjTime(this.endTime);
+    this.tableShow = true;
   },
-  
-  methods:{
-    formatDate (date, fmt) {
-        if (/(y+)/.test(fmt)) {
-          fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-        }
-        let o = {
-          'M+': date.getMonth() + 1,
-          'd+': date.getDate(),
-          'h+': 0,
-          'm+': 0,
-          's+': 0
+
+  methods: {
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
       }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": 0,
+        "m+": 0,
+        "s+": 0
+      };
       for (let k in o) {
         if (new RegExp(`(${k})`).test(fmt)) {
-          let str = o[k] + ''
-          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str))
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : this.padLeftZero(str)
+          );
         }
-            }
-      return fmt
+      }
+      return fmt;
     },
-    padLeftZero (str) {
-        return ('00' + str).substr(str.length)
+    padLeftZero(str) {
+      return ("00" + str).substr(str.length);
+    },
+    querySearch(queryString, cb) {
+      var restaurants = [
+        { value: "螺纹钢" },
+        { value: "盘螺" },
+        { value: "乱尺" }
+      ];
+      var results = queryString
+        ? restaurants.filter(this.createFilter(queryString))
+        : restaurants;
+      // 调用 callback 返回建议列表的数据
+      cb(results);
+    },
+    createFilter(queryString) {
+      return restaurant => {
+        return (
+          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1
+        );
+      };
     },
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
-    onclick(){
-
+    onclick() {
       let startTime = null;
       let endTime = null;
       if (this.startTime) {
@@ -102,11 +154,22 @@ export default {
       if (startTime && endTime) {
         if (startTime < endTime) {
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+1+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          this.options.requestUrl =
+            "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" +
+            1 +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+          this.options.requestQuery = {
+            materialNames: this.inputText
+          };
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
-          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }
         } else {
           this.startTime = null;
@@ -114,28 +177,30 @@ export default {
           this.$message.warning("开始时间要比结束时间早");
         }
       } else {
-        this.getRequestUrl()
+        this.getRequestUrl();
       }
     },
     selectionChange(selection) {
       this.options.mapList = selection;
     },
-    onreserved(){
+    onreserved() {
       this.$router.push({
-        path: "/bar1_addSteelInbound",
+        path: "/bar1_addSteelInbound"
       });
     }
   }
-}
+};
 </script>
 
-<style lang="scss" scode>
-.steel_inbound{
-  .sache{
-    height: 5rem;
-    display: flex;
-    align-items: center;
-    padding-left: 1.875rem;
+<style lang="scss" scoped>
+.steel_inbound01 {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
   }
 }
-</style>
+</style>

+ 122 - 97
src/views/WMS/components/steel/bar1_steel/bar1_steel_inboundStatistics.vue

@@ -3,7 +3,11 @@
   <div class="steel_inboundStatistics">
     <div class="sache">
       <span>入库时间:</span>
-      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
       </el-date-picker>
       <span>至</span>
       <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
@@ -17,18 +21,23 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-col :span="3" v-html="'\u2003'"/>
+      <el-col :span="3" v-html="'\u2003'" />
       <span>生产总件数</span>
       <el-input
         placeholder="请输入内容"
         v-model="input3"
-        :disabled="true" class="inputs" style="width:10%">
+        :disabled="true"
+        class="inputs"
+        style="width:10%"
+      >
       </el-input>
       <span>生产总重量</span>
       <el-input
         placeholder="请输入内容"
         v-model="input4"
-        :disabled="true" style="width:10%">
+        :disabled="true"
+        style="width:10%"
+      >
       </el-input>
     </div>
     <div class="table">
@@ -40,51 +49,51 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      rowClassName({row, rowIndex}) {
+  data() {
+    return {
+      rowClassName({ row, rowIndex }) {
         if (rowIndex === 0) {
-          return 'success-row';
+          return "success-row";
         }
-        return '';
+        return "";
       },
-      input1: '',
-      input2: '',
-      input3: '',
-      input4: '',
-      input5: '',
-      inputText:"",
+      input1: "",
+      input2: "",
+      input3: "",
+      input4: "",
+      input5: "",
+      inputText: "",
       startTime: null,
       endTime: null,
       region: "0",
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+1,
+        requestUrl:
+          "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" + 1
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  created(){
-    console.log(this.options.data)
+  created() {
+    console.log(this.options.data);
   },
-  methods:{
-    func(res){
+  methods: {
+    func(res) {
       // console.log(res.list[0])
       // this.input1 = this.input1 + e.furnaceNumber1,
       let num1 = 0;
       let num2 = 0;
       res.list.forEach(e => {
-        console.log(e)
-        console.log(e.count)
-        console.log(e.weight)
-        num1 = num1 + e.count,
-        num2 = num2 + e.weight
+        console.log(e);
+        console.log(e.count);
+        console.log(e.weight);
+        (num1 = num1 + e.count), (num2 = num2 + e.weight);
       });
       this.input3 = num1;
-      this.input4 = num2;
+      this.input4 = (num2 / 1000).toFixed(3);
       // this.input1 = res.list[0].furnaceNumber1,
       // this.input2 = res.list[0].materialName,
       // this.input3 = res.list[0].count,
@@ -95,53 +104,60 @@ export default {
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
     // 获取当前月份的最后一天
-    getdaysinmonth(year,month){
-      month = parseInt(month,10)+1;
+    getdaysinmonth(year, month) {
+      month = parseInt(month, 10) + 1;
       let days = 0;
-      month = month -1;
-      console.log("othermonth"+month)
-      console.log("otheryear"+year);
+      month = month - 1;
+      console.log("othermonth" + month);
+      console.log("otheryear" + year);
       // 根据月份获取对应的天数
-      if(month == 2){
-        days = year % 4 == 0?29:28;
-      }else if(month == 1||month == 3||month == 5||month == 7||month == 8||month == 10||month == 12){
+      if (month == 2) {
+        days = year % 4 == 0 ? 29 : 28;
+      } else if (
+        month == 1 ||
+        month == 3 ||
+        month == 5 ||
+        month == 7 ||
+        month == 8 ||
+        month == 10 ||
+        month == 12
+      ) {
         days = 31;
-      }else{
+      } else {
         days = 30;
       }
-      console.log("otherdays"+days)
+      console.log("otherdays" + days);
       return days;
     },
-    onclick(){
-
+    onclick() {
       let startTime = null;
       let endTime = null;
       // 判断用户有没有班次,有班次则提供默认时间
-      if(this.region!=null){
-        let date =null;
-        let date2 =null;
+      if (this.region != null) {
+        let date = null;
+        let date2 = null;
         let year = null;
-        let month =null;
+        let month = null;
         let day = null;
         let year2 = null;
-        let month2 =null;
+        let month2 = null;
         let day2 = null;
         // 判断当前日期输入框中是否选择了时间,并且开始日期和结束日期是否是同一天
-        if(this.startTime!=null){
-            date = this.startTime;
-            // 判断当前开始时间是标准时间还是字符串时间
-            
-           year = date.getFullYear(); // 年
+        if (this.startTime != null) {
+          date = this.startTime;
+          // 判断当前开始时间是标准时间还是字符串时间
+
+          year = date.getFullYear(); // 年
           month = date.getMonth() + 1; // 月
-          day = date.getDate(); // 日 
+          day = date.getDate(); // 日
         }
-        if(this.endTime!=null){
-           date2 = this.endTime;
-           year2 = date2.getFullYear(); // 年
+        if (this.endTime != null) {
+          date2 = this.endTime;
+          year2 = date2.getFullYear(); // 年
           month2 = date2.getMonth() + 1; // 月
           day2 = date2.getDate(); // 日 // 日
         }
-        if(this.startTime==null&&this.endTime==null){
+        if (this.startTime == null && this.endTime == null) {
           // 获取当前的日期时间
           date = new Date();
           year = date.getFullYear(); // 年
@@ -149,50 +165,53 @@ export default {
           day = date.getDate(); // 日
         }
         // 判断开始日期和结束日期是否是同一天
-        if(!(year==year2&&month==month2&&day==day2)&&(this.startTime!=null||this.endTime!=null)&&this.region==null){
+        if (
+          !(year == year2 && month == month2 && day == day2) &&
+          (this.startTime != null || this.endTime != null) &&
+          this.region == null
+        ) {
           // 当不是同一天的时候,直接弹窗警告
           this.startTime = null;
           this.endTime = null;
           this.$message.warning("开始日期和结束日期不是同一天");
         }
         // 判断当前用户选择的具体班次
-        if(this.region == 0){
-          this.startTime = year+"-"+month+"-"+day+" "+"00:00:00";
+        if (this.region == 0) {
+          this.startTime = year + "-" + month + "-" + day + " " + "00:00:00";
           // 将结束时间加一
-          day =parseInt(day) + 1;
-          this.endTime = year+"-"+month+"-"+day+" "+"00:00:00";
-          
-        }else if(this.region == 1){
-          this.startTime = year+"-"+month+"-"+day+" "+"07:30:00";
-          this.endTime = year+"-"+month+"-"+day+" "+"15:30:00";
-        }else if(this.region == 2){
-          this.startTime = year+"-"+month+"-"+day+" "+"15:30:00";
-          this.endTime = year+"-"+month+"-"+day+" "+"23:30:00";
-        }else if(this.region == 3){
-          this.endTime = year+"-"+month+"-"+day+" "+"07:30:00";
+          day = parseInt(day) + 1;
+          this.endTime = year + "-" + month + "-" + day + " " + "00:00:00";
+        } else if (this.region == 1) {
+          this.startTime = year + "-" + month + "-" + day + " " + "07:30:00";
+          this.endTime = year + "-" + month + "-" + day + " " + "15:30:00";
+        } else if (this.region == 2) {
+          this.startTime = year + "-" + month + "-" + day + " " + "15:30:00";
+          this.endTime = year + "-" + month + "-" + day + " " + "23:30:00";
+        } else if (this.region == 3) {
+          this.endTime = year + "-" + month + "-" + day + " " + "07:30:00";
           // 判断开始日期和结束日期是否跨月份了
-          if(month!=month2){
-            month = parseInt(month)-1
+          if (month != month2) {
+            month = parseInt(month) - 1;
             // 获取前一个月份的最后一天
-            day = this.$options.methods.getdaysinmonth(year,month)
-          }else{
+            day = this.$options.methods.getdaysinmonth(year, month);
+          } else {
             // 将开始时间减一
-            day =parseInt(day)-1;
+            day = parseInt(day) - 1;
           }
-          this.startTime = year+"-"+month+"-"+day+" "+"23:30:00";
+          this.startTime = year + "-" + month + "-" + day + " " + "23:30:00";
         }
-        this.startTime = new Date(this.startTime)
-        this.endTime = new Date(this.endTime)
-          console.log(this.startTime+"开始时间")
-          console.log(this.endTime+"结束时间")
+        this.startTime = new Date(this.startTime);
+        this.endTime = new Date(this.endTime);
+        console.log(this.startTime + "开始时间");
+        console.log(this.endTime + "结束时间");
         // 将拼接好的日期转换为时间戳
-        startTime = Date.parse(this.startTime)
-        endTime = Date.parse(this.endTime)
-        console.log(startTime+"开始时间2")
-        console.log(endTime+"结束时间2")
-      }else{
+        startTime = Date.parse(this.startTime);
+        endTime = Date.parse(this.endTime);
+        console.log(startTime + "开始时间2");
+        console.log(endTime + "结束时间2");
+      } else {
         if (this.startTime) {
-        startTime = sjTime(this.startTime);
+          startTime = sjTime(this.startTime);
         }
         if (this.endTime) {
           endTime = sjTime(this.endTime);
@@ -201,11 +220,19 @@ export default {
       if (startTime && endTime) {
         if (startTime < endTime) {
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+1+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          this.options.requestUrl =
+            "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" +
+            1 +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
-          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }
         } else {
           this.startTime = null;
@@ -213,19 +240,19 @@ export default {
           this.$message.warning("开始时间要比结束时间早");
         }
       } else {
-        this.getRequestUrl()
+        this.getRequestUrl();
       }
     },
     selectionChange(selection) {
       this.options.mapList = selection;
-    },
+    }
   }
-}
+};
 </script>
 
 <style lang="scss" scoped>
 .steel_inboundStatistics {
-  .sache{
+  .sache {
     height: 5rem;
     display: flex;
     align-items: center;
@@ -241,8 +268,6 @@ export default {
     display: flex;
     justify-content: center;
     align-items: center;
-
   }
 }
-
-</style>
+</style>

+ 28 - 21
src/views/WMS/components/steel/bar1_steel/bar1_steel_reserved.vue

@@ -5,9 +5,11 @@
       <el-input
         placeholder="请输入内容"
         v-model="inputText"
-        clearable>
+        clearable
+        style="width:250px"
+      >
       </el-input>
-      
+
       <!-- <span>入库时间:</span>
       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
@@ -18,11 +20,11 @@
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" class="btn" @click="onreserved">
-        入库
+        预留
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options" >
+      <dilTable v-bind.sync="options">
         <!-- <el-table-column fixed="right" label="操作" width="150">
 								<template slot-scope="scope">
 									<el-button type="text" size="mini" @click="inboundDetails(scope)">
@@ -37,47 +39,52 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      inputText:"",
+  data() {
+    return {
+      inputText: "",
       startTime: null,
       endTime: null,
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId="+1,
+        requestUrl:
+          "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId=" + 1
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  methods:{
+  methods: {
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
-    onclick(){
-      this.options.requestUrl= "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId="+1+"&con="+this.inputText;
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId=" +
+        1 +
+        "&con=" +
+        this.inputText;
     },
     selectionChange(selection) {
       this.options.mapList = selection;
     },
-    onreserved(){
+    onreserved() {
       this.$router.push({
-        path: "/bar1_addSteelReserved",
+        path: "/bar1_addSteelReserved"
       });
     }
   }
-}
+};
 </script>
 
 <style lang="scss" scode>
-.steel_inbound{
-  .sache{
+.steel_inbound {
+  .sache {
     height: 5rem;
     display: flex;
     align-items: center;
     padding-left: 1.875rem;
   }
 }
-</style>
+</style>

+ 102 - 0
src/views/WMS/components/steel/bar1_steel/inboundEas01.vue

@@ -0,0 +1,102 @@
+<template>
+  <div class="steel_inbound_real">
+    <div class="sache">
+      <span class="text">入库时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable
+        v-bind.sync="options"
+        ref="table"
+        :showSummaryList="showSummaryList"
+        :isshowSummary="true"
+      >
+        <el-table-column label="操作" width="120px">
+          <template slot-scope="scope">
+            <el-button type="text" @click="crtlZ(scope.row)">撤销</el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+export default {
+  data() {
+    return {
+      inputText: "",
+      startTime: null,
+      endTime: null,
+      region: "0",
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=" + 1
+        // selectionType: "select",
+        // mapList: [],
+      },
+      showSummaryList: ["theroticalWeight", "materialNum", "actuallyWeight"]
+    };
+  },
+  methods: {
+    // inboundDetails(scope){
+    //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
+    // }
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      this.options.requestUrl =
+        "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=1&startTime=" +
+        startTime +
+        "&endTime=" +
+        endTime +
+        "&i=" +
+        new Date();
+    },
+    crtlZ(row) {
+      console.log(row.inboundEasId);
+      this.axios
+        .post("/api/v1/wms/reduceInboundEas?inboundEasId=" + row.inboundEasId)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("撤销成功");
+          } else {
+            this.$message.error("撤销失败");
+          }
+          this.options.requestUrl =
+            "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=1" +
+            "&i=" +
+            new Date();
+        });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.steel_inbound_real {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+}
+</style>

+ 208 - 110
src/views/WMS/components/steel/bar2_steel/bar2_addSteelInbound.vue

@@ -1,20 +1,32 @@
 <template>
   <!-- 新增入库转预留作业页面 -->
   <div class="addCheckWarehouse">
-    <page-title>入库转预留作业</page-title>
+    <page-title>预留转入库作业</page-title>
     <div class="material from">
       <span class="text">物资规格型号:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
     </div>
     <div class="materialNumber from">
-      <span class="text">最大预留件数:</span>
+      <span class="text">最大入库件数:</span>
       <el-input class="input" v-model="max" disabled> </el-input>
     </div>
     <div class="materialNumber from">
       <span class="text">件数:</span>
       <el-input class="input" v-model="materialNumber"> </el-input>
     </div>
+    <div class="materialNumber from">
+      <span class="text">理重(磅重)</span>
+      <el-input class="input" v-model="materialTheWeight" disabled> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">实重</span>
+      <el-input class="input" v-model="actuallyWeight"> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">备注</span>
+      <el-input class="input" v-model="remark"> </el-input>
+    </div>
     <!-- 模态窗口 -->
     <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
       <div style="margin-bottom: 10px">
@@ -39,11 +51,13 @@
           v-bind.sync="second"
           @radio-change="currentRadioChange2"
         ></dilTable>
-      </div>          
+      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
@@ -55,22 +69,22 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      startTime:null,
-      endTime:null,
-      max:null,
-      disabled:false,
+      startTime: null,
+      endTime: null,
+      max: null,
+      disabled: false,
       //仓库名称
-      warehouseName:null,
+      warehouseName: null,
       //物资名称
       materialName: null,
       //物资编码
-      materialCode:null,
-       // 物资规格
-      materialSpecification:null,
+      materialCode: null,
+      // 物资规格
+      materialSpecification: null,
       // 物资型号
-      materialModel:null,
+      materialModel: null,
       //盘点数量
-      materialNumber:null,
+      materialNumber: null,
       //物资id
       materialId: null,
       //是否需要打开模态窗口
@@ -81,12 +95,15 @@ export default {
       first: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       second: {
-          requestUrl: "",
-          selectionType:"radio"
-      }
+        requestUrl: "",
+        selectionType: "radio"
+      },
+      materialTheWeight: 0,
+      actuallyWeight: 0,
+      remark: null
     };
   },
   watch: {
@@ -95,45 +112,98 @@ export default {
         this.input = null;
       }
     },
+    materialNumber() {
+      this.getTheoreticalByInfo();
+    }
   },
   created() {
-      let strTime=this.formatDate(new Date(),"yyyy-MM-dd hh:mm:ss")
-      this.startTime= Date.parse(new Date(strTime));
-      this.endTime=new Date(this.startTime+86400000);
+    let strTime = this.formatDate(new Date(), "yyyy-MM-dd hh:mm:ss");
+    this.startTime = Date.parse(new Date(strTime));
+    this.endTime = new Date(this.startTime + 86400000);
   },
   methods: {
-    formatDate (date, fmt) {
-        if (/(y+)/.test(fmt)) {
-          fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-        }
-        let o = {
-          'M+': date.getMonth() + 1,
-          'd+': date.getDate(),
-          'h+': 0,
-          'm+': 0,
-          's+': 0
+    getTheoreticalByInfo() {
+      this.axios
+        .post(
+          "/api/v1/wms/getTheoreticalByInfo?warehouseId=" +
+            2 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&num=" +
+            this.materialNumber +
+            "&status=1"
+        )
+        .then(res => {
+          if (res.data.data == -1) {
+            this.$message.error("数量超出");
+            this.materialTheWeight = null;
+          } else {
+            this.materialTheWeight = parseFloat(res.data.data);
+          }
+        });
+    },
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
       }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": 0,
+        "m+": 0,
+        "s+": 0
+      };
       for (let k in o) {
         if (new RegExp(`(${k})`).test(fmt)) {
-          let str = o[k] + ''
-          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str))
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : this.padLeftZero(str)
+          );
         }
-            }
-      return fmt
+      }
+      return fmt;
     },
-    padLeftZero (str) {
-        return ('00' + str).substr(str.length)
+    padLeftZero(str) {
+      return ("00" + str).substr(str.length);
     },
     onclick(a) {
       if (a == 1) {
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+2+"&status="+1+"&con="+this.input+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          2 +
+          "&status=" +
+          1 +
+          "&con=" +
+          this.input +
+          "&startTime=" +
+          sjTime(this.startTime) +
+          "&endTime=" +
+          sjTime(this.endTime);
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
-      if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+2+"&status="+1+"&con="+""+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
+      if (num == 1) {
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          2 +
+          "&status=" +
+          1 +
+          "&con=" +
+          "" +
+          "&startTime=" +
+          sjTime(this.startTime) +
+          "&endTime=" +
+          sjTime(this.endTime);
       }
     },
     // 返回
@@ -142,7 +212,12 @@ export default {
     },
     currentRadioChange1(selection) {
       console.log(selection);
-      this.materialName = selection.materialName + selection.materialSpecification + '(' + selection.materialModel + ')' ;
+      this.materialName =
+        selection.materialName +
+        selection.materialSpecification +
+        "(" +
+        selection.materialModel +
+        ")";
       this.materialId = selection.materialId;
       this.materialCode = selection.materialCode;
       this.materialSpecification = selection.materialSpecification;
@@ -150,97 +225,120 @@ export default {
       this.max = selection.max;
     },
     currentRadioChange2(selection) {
-      this.warehouseId = selection.warehouseId
-      this.warehouseName = selection.warehouseName
+      this.warehouseId = selection.warehouseId;
+      this.warehouseName = selection.warehouseName;
     },
     // 确认
     onClickConfirm() {
       // console.log(this.warehouseId,this.materialCode,this.materialNumber);
-      this.disabled = true
-      this.axios.post("/api/v1/wms/insertReserved?warehouseId=" + 2 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
-        console.log(res.data)
+      if (!isNumber(this.actuallyWeight)) {
+        this.$message.error("实重填写不正确");
+        return;
+      }
+      this.disabled = true;
+      this.axios
+        .post(
+          "/api/v1/wms/insertReserved?warehouseId=" +
+            2 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&quantity=" +
+            this.materialNumber +
+            "&actuallyWeight=" +
+            Number(parseFloat(this.actuallyWeight)) +
+            "&materialTheWeight=" +
+            Number(parseFloat(this.materialTheWeight)) +
+            "&remark=" +
+            this.remark
+        )
+        .then(res => {
+          console.log(res.data);
           if (res.data.code == "200") {
             this.$message({
-              message: "预留成功!",
-              type: "success",
+              message: "入库成功!",
+              type: "success"
             });
-            this.disabled = false
-            this.onClickCancel()
-            this.$router.go(-1)
-          }else if(res.data.code=="201"){
+            this.disabled = false;
+            this.onClickCancel();
+            this.$router.go(-1);
+          } else if (res.data.code == "201") {
             this.$message({
-              message:"预留的数量不正确",
-              type:"faile",
-            })
+              message: "入库的数量不正确",
+              type: "faile"
+            });
           }
-          this.$router.go(-1)
+          this.$router.go(-1);
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang="scss" scope>
-.addCheckWarehouse{
-.contractDetails {
-  width: 100%;
-}
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.warehouse {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  margin-right: 70px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+<style lang="scss" scoped>
+.addCheckWarehouse {
+  .contractDetails {
+    width: 100%;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
   }
-}
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .warehouse {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.materialNumber {
+  .materialNumber {
     display: flex;
     justify-content: center;
     margin-top: 20px;
     margin-right: 70px;
     .text {
-        display:inline-block;
-        width: 170px;
-        text-align: right;
+      display: inline-block;
+      width: 170px;
+      text-align: right;
     }
     .input {
-        width: 250px;
-        margin-right: 20px;
+      width: 250px;
+      margin-right: 20px;
     }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100px;
+  }
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
-}
-}
-</style>
+</style>

+ 121 - 91
src/views/WMS/components/steel/bar2_steel/bar2_addSteelReserved.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 新增预留转入库作业页面 -->
   <div class="addCheckWarehouse">
-    <page-title>预留转入库作业</page-title>
+    <page-title>入库转预留作业</page-title>
     <div class="material from">
       <span class="text">物资规格型号:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
@@ -39,11 +39,13 @@
           v-bind.sync="second"
           @radio-change="currentRadioChange2"
         ></dilTable>
-      </div>          
+      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
@@ -55,20 +57,20 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      max:null,
-      disabled:false,
+      max: null,
+      disabled: false,
       //仓库名称
-      warehouseName:null,
+      warehouseName: null,
       //物资名称
       materialName: null,
       //物资编码
-      materialCode:null,
-       // 物资规格
-      materialSpecification:null,
+      materialCode: null,
+      // 物资规格
+      materialSpecification: null,
       // 物资型号
-      materialModel:null,
+      materialModel: null,
       //盘点数量
-      materialNumber:null,
+      materialNumber: null,
       //物资id
       materialId: null,
       //是否需要打开模态窗口
@@ -79,11 +81,11 @@ export default {
       first: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       second: {
-          requestUrl: "",
-          selectionType:"radio"
+        requestUrl: "",
+        selectionType: "radio"
       }
     };
   },
@@ -92,22 +94,32 @@ export default {
       if (!val) {
         this.input = null;
       }
-    },
-  },
-  created() {
-      
+    }
   },
+  created() {},
   methods: {
     onclick(a) {
       if (a == 1) {
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+2+"&status="+2+"&con="+this.input
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          2 +
+          "&status=" +
+          2 +
+          "&con=" +
+          this.input;
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
-      if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+2+"&status="+2+"&con="+""
+      if (num == 1) {
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          2 +
+          "&status=" +
+          2 +
+          "&con=" +
+          "";
       }
     },
     // 返回
@@ -116,7 +128,12 @@ export default {
     },
     currentRadioChange1(selection) {
       console.log(selection);
-      this.materialName = selection.materialName + selection.materialSpecification + '(' + selection.materialModel + ')' ;
+      this.materialName =
+        selection.materialName +
+        selection.materialSpecification +
+        "(" +
+        selection.materialModel +
+        ")";
       this.materialId = selection.materialId;
       this.materialCode = selection.materialCode;
       this.materialSpecification = selection.materialSpecification;
@@ -124,97 +141,110 @@ export default {
       this.max = selection.max;
     },
     currentRadioChange2(selection) {
-      this.warehouseId = selection.warehouseId
-      this.warehouseName = selection.warehouseName
+      this.warehouseId = selection.warehouseId;
+      this.warehouseName = selection.warehouseName;
     },
     // 确认
     onClickConfirm() {
       // console.log(this.warehouseId,this.materialCode,this.materialNumber);
-      this.disabled = true
-      this.axios.post("/api/v1/wms/insertInbounds?warehouseId=" + 2 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
-        console.log(res.data)
+      this.disabled = true;
+      this.axios
+        .post(
+          "/api/v1/wms/insertInbounds?warehouseId=" +
+            2 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&quantity=" +
+            this.materialNumber
+        )
+        .then(res => {
+          console.log(res.data);
           if (res.data.code == "200") {
             this.$message({
-              message: "入库成功!",
-              type: "success",
+              message: "转预留成功!",
+              type: "success"
             });
-            this.disabled = false
-            this.onClickCancel()
-            this.$router.go(-1)
-          }else if(res.data.code=="201"){
+            this.disabled = false;
+            this.onClickCancel();
+            this.$router.go(-1);
+          } else if (res.data.code == "201") {
             this.$message({
-              message:"入库的数量不正确",
-              type:"faile",
-            })
+              message: "转预留数量不正确",
+              type: "faile"
+            });
           }
-          this.$router.go(-1)
+          this.$router.go(-1);
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang="scss" scope>
-.addCheckWarehouse{
-.contractDetails {
-  width: 100%;
-}
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.warehouse {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  margin-right: 70px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+<style lang="scss" scoped>
+.addCheckWarehouse {
+  .contractDetails {
+    width: 100%;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
   }
-}
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .warehouse {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.materialNumber {
+  .materialNumber {
     display: flex;
     justify-content: center;
     margin-top: 20px;
     margin-right: 70px;
     .text {
-        display:inline-block;
-        width: 170px;
-        text-align: right;
+      display: inline-block;
+      width: 170px;
+      text-align: right;
     }
     .input {
-        width: 250px;
-        margin-right: 20px;
+      width: 250px;
+      margin-right: 20px;
     }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100px;
+  }
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
-}
-}
-</style>
+</style>

+ 135 - 78
src/views/WMS/components/steel/bar2_steel/bar2_steel_inbound.vue

@@ -1,96 +1,140 @@
 //入库
 <template>
-  <div class="steel_inbound">
+  <div class="steel_inbound02">
     <div class="sache">
-      <!-- <el-input
-        placeholder="请输入内容"
-        v-model="inputText"
-        clearable>
-      </el-input>
-       -->
-      <span>入库时间:</span>
-      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
-      </el-date-picker>
-      <span>至</span>
-      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
-      </el-date-picker>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" class="btn" @click="onreserved">
-        预留
-      </el-button>
+      <el-form :inline="true">
+        <el-form-item>
+          <span class="text">入库时间:</span>
+          <el-date-picker
+            disabled
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+          <span class="text">至</span>
+          <el-date-picker
+            disabled
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <span class="text">物资类型</span>
+          <el-autocomplete
+            v-model="inputText"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入内容"
+            @select="handleSelect"
+            style="width: 200px;"
+          ></el-autocomplete>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>查询
+          </el-button>
+          <el-button type="primary" class="btn" @click="onreserved">
+            入库
+          </el-button>
+        </el-form-item>
+      </el-form>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options" >
-        <!-- <el-table-column fixed="right" label="操作" width="150">
-								<template slot-scope="scope">
-									<el-button type="text" size="mini" @click="inboundDetails(scope)">
-										详情
-									</el-button>
-								</template>
-				</el-table-column> -->
-      </dilTable>
+      <dilTable v-bind.sync="options"> </dilTable>
     </div>
   </div>
 </template>
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      inputText:"",
+  data() {
+    return {
+      inputText: "",
       startTime: null,
       endTime: null,
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+2,
+        requestUrl: "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" + 2
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  created(){
+  created() {
     var date = new Date();
-    let dateStr=this.formatDate(date, 'yyyy-MM-dd hh:mm:ss');
-    
-    this.startTime= Date.parse(new Date(dateStr));
-    this.endTime=new Date(this.startTime+86400000);
+    let dateStr = this.formatDate(date, "yyyy-MM-dd hh:mm:ss");
+
+    this.startTime = Date.parse(new Date(dateStr));
+    this.endTime = new Date(this.startTime + 86400000);
 
-    this.options.requestUrl= "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+2+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime) ;
-    this.tableShow=true;
+    this.options.requestUrl =
+      "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" +
+      2 +
+      "&startTime=" +
+      sjTime(this.startTime) +
+      "&endTime=" +
+      sjTime(this.endTime);
+    this.tableShow = true;
   },
-  
-  methods:{
-    formatDate (date, fmt) {
-        if (/(y+)/.test(fmt)) {
-          fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-        }
-        let o = {
-          'M+': date.getMonth() + 1,
-          'd+': date.getDate(),
-          'h+': 0,
-          'm+': 0,
-          's+': 0
+
+  methods: {
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
       }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": 0,
+        "m+": 0,
+        "s+": 0
+      };
       for (let k in o) {
         if (new RegExp(`(${k})`).test(fmt)) {
-          let str = o[k] + ''
-          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str))
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : this.padLeftZero(str)
+          );
         }
-            }
-      return fmt
+      }
+      return fmt;
     },
-    padLeftZero (str) {
-        return ('00' + str).substr(str.length)
+    padLeftZero(str) {
+      return ("00" + str).substr(str.length);
+    },
+    querySearch(queryString, cb) {
+      var restaurants = [
+        { value: "螺纹钢" },
+        { value: "盘螺" },
+        { value: "乱尺" }
+      ];
+      var results = queryString
+        ? restaurants.filter(this.createFilter(queryString))
+        : restaurants;
+      // 调用 callback 返回建议列表的数据
+      cb(results);
+    },
+    createFilter(queryString) {
+      return restaurant => {
+        return (
+          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1
+        );
+      };
     },
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
-    onclick(){
-
+    onclick() {
       let startTime = null;
       let endTime = null;
       if (this.startTime) {
@@ -102,11 +146,22 @@ export default {
       if (startTime && endTime) {
         if (startTime < endTime) {
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+2+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          this.options.requestUrl =
+            "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" +
+            2 +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+          this.options.requestQuery = {
+            materialNames: this.inputText
+          };
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
-          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }
         } else {
           this.startTime = null;
@@ -114,28 +169,30 @@ export default {
           this.$message.warning("开始时间要比结束时间早");
         }
       } else {
-        this.getRequestUrl()
+        this.getRequestUrl();
       }
     },
     selectionChange(selection) {
       this.options.mapList = selection;
     },
-    onreserved(){
+    onreserved() {
       this.$router.push({
-        path: "/bar2_addSteelInbound",
+        path: "/bar2_addSteelInbound"
       });
     }
   }
-}
+};
 </script>
 
-<style lang="scss" scode>
-.steel_inbound{
-  .sache{
-    height: 5rem;
-    display: flex;
-    align-items: center;
-    padding-left: 1.875rem;
+<style lang="scss" scoped>
+.steel_inbound02 {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
   }
 }
-</style>
+</style>

+ 122 - 97
src/views/WMS/components/steel/bar2_steel/bar2_steel_inboundStatistics.vue

@@ -3,7 +3,11 @@
   <div class="steel_inboundStatistics">
     <div class="sache">
       <span>入库时间:</span>
-      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
       </el-date-picker>
       <span>至</span>
       <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
@@ -17,18 +21,23 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-col :span="3" v-html="'\u2003'"/>
+      <el-col :span="3" v-html="'\u2003'" />
       <span>生产总件数</span>
       <el-input
         placeholder="请输入内容"
         v-model="input3"
-        :disabled="true" class="inputs" style="width:10%">
+        :disabled="true"
+        class="inputs"
+        style="width:10%"
+      >
       </el-input>
       <span>生产总重量</span>
       <el-input
         placeholder="请输入内容"
         v-model="input4"
-        :disabled="true" style="width:10%">
+        :disabled="true"
+        style="width:10%"
+      >
       </el-input>
     </div>
     <div class="table">
@@ -40,51 +49,51 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      rowClassName({row, rowIndex}) {
+  data() {
+    return {
+      rowClassName({ row, rowIndex }) {
         if (rowIndex === 0) {
-          return 'success-row';
+          return "success-row";
         }
-        return '';
+        return "";
       },
-      input1: '',
-      input2: '',
-      input3: '',
-      input4: '',
-      input5: '',
-      inputText:"",
+      input1: "",
+      input2: "",
+      input3: "",
+      input4: "",
+      input5: "",
+      inputText: "",
       startTime: null,
       endTime: null,
       region: "0",
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+2,
+        requestUrl:
+          "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" + 2
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  created(){
-    console.log(this.options.data)
+  created() {
+    console.log(this.options.data);
   },
-  methods:{
-    func(res){
+  methods: {
+    func(res) {
       // console.log(res.list[0])
       // this.input1 = this.input1 + e.furnaceNumber1,
       let num1 = 0;
       let num2 = 0;
       res.list.forEach(e => {
-        console.log(e)
-        console.log(e.count)
-        console.log(e.weight)
-        num1 = num1 + e.count,
-        num2 = num2 + e.weight
+        console.log(e);
+        console.log(e.count);
+        console.log(e.weight);
+        (num1 = num1 + e.count), (num2 = num2 + e.weight);
       });
       this.input3 = num1;
-      this.input4 = num2;
+      this.input4 = (num2 / 1000).toFixed(3);
       // this.input1 = res.list[0].furnaceNumber1,
       // this.input2 = res.list[0].materialName,
       // this.input3 = res.list[0].count,
@@ -95,53 +104,60 @@ export default {
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
     // 获取当前月份的最后一天
-    getdaysinmonth(year,month){
-      month = parseInt(month,10)+1;
+    getdaysinmonth(year, month) {
+      month = parseInt(month, 10) + 1;
       let days = 0;
-      month = month -1;
-      console.log("othermonth"+month)
-      console.log("otheryear"+year);
+      month = month - 1;
+      console.log("othermonth" + month);
+      console.log("otheryear" + year);
       // 根据月份获取对应的天数
-      if(month == 2){
-        days = year % 4 == 0?29:28;
-      }else if(month == 1||month == 3||month == 5||month == 7||month == 8||month == 10||month == 12){
+      if (month == 2) {
+        days = year % 4 == 0 ? 29 : 28;
+      } else if (
+        month == 1 ||
+        month == 3 ||
+        month == 5 ||
+        month == 7 ||
+        month == 8 ||
+        month == 10 ||
+        month == 12
+      ) {
         days = 31;
-      }else{
+      } else {
         days = 30;
       }
-      console.log("otherdays"+days)
+      console.log("otherdays" + days);
       return days;
     },
-    onclick(){
-
+    onclick() {
       let startTime = null;
       let endTime = null;
       // 判断用户有没有班次,有班次则提供默认时间
-      if(this.region!=null){
-        let date =null;
-        let date2 =null;
+      if (this.region != null) {
+        let date = null;
+        let date2 = null;
         let year = null;
-        let month =null;
+        let month = null;
         let day = null;
         let year2 = null;
-        let month2 =null;
+        let month2 = null;
         let day2 = null;
         // 判断当前日期输入框中是否选择了时间,并且开始日期和结束日期是否是同一天
-        if(this.startTime!=null){
-            date = this.startTime;
-            // 判断当前开始时间是标准时间还是字符串时间
-            
-           year = date.getFullYear(); // 年
+        if (this.startTime != null) {
+          date = this.startTime;
+          // 判断当前开始时间是标准时间还是字符串时间
+
+          year = date.getFullYear(); // 年
           month = date.getMonth() + 1; // 月
-          day = date.getDate(); // 日 
+          day = date.getDate(); // 日
         }
-        if(this.endTime!=null){
-           date2 = this.endTime;
-           year2 = date2.getFullYear(); // 年
+        if (this.endTime != null) {
+          date2 = this.endTime;
+          year2 = date2.getFullYear(); // 年
           month2 = date2.getMonth() + 1; // 月
           day2 = date2.getDate(); // 日 // 日
         }
-        if(this.startTime==null&&this.endTime==null){
+        if (this.startTime == null && this.endTime == null) {
           // 获取当前的日期时间
           date = new Date();
           year = date.getFullYear(); // 年
@@ -149,50 +165,53 @@ export default {
           day = date.getDate(); // 日
         }
         // 判断开始日期和结束日期是否是同一天
-        if(!(year==year2&&month==month2&&day==day2)&&(this.startTime!=null||this.endTime!=null)&&this.region==null){
+        if (
+          !(year == year2 && month == month2 && day == day2) &&
+          (this.startTime != null || this.endTime != null) &&
+          this.region == null
+        ) {
           // 当不是同一天的时候,直接弹窗警告
           this.startTime = null;
           this.endTime = null;
           this.$message.warning("开始日期和结束日期不是同一天");
         }
         // 判断当前用户选择的具体班次
-        if(this.region == 0){
-          this.startTime = year+"-"+month+"-"+day+" "+"00:00:00";
+        if (this.region == 0) {
+          this.startTime = year + "-" + month + "-" + day + " " + "00:00:00";
           // 将结束时间加一
-          day =parseInt(day) + 1;
-          this.endTime = year+"-"+month+"-"+day+" "+"00:00:00";
-          
-        }else if(this.region == 1){
-          this.startTime = year+"-"+month+"-"+day+" "+"07:30:00";
-          this.endTime = year+"-"+month+"-"+day+" "+"15:30:00";
-        }else if(this.region == 2){
-          this.startTime = year+"-"+month+"-"+day+" "+"15:30:00";
-          this.endTime = year+"-"+month+"-"+day+" "+"23:30:00";
-        }else if(this.region == 3){
-          this.endTime = year+"-"+month+"-"+day+" "+"07:30:00";
+          day = parseInt(day) + 1;
+          this.endTime = year + "-" + month + "-" + day + " " + "00:00:00";
+        } else if (this.region == 1) {
+          this.startTime = year + "-" + month + "-" + day + " " + "07:30:00";
+          this.endTime = year + "-" + month + "-" + day + " " + "15:30:00";
+        } else if (this.region == 2) {
+          this.startTime = year + "-" + month + "-" + day + " " + "15:30:00";
+          this.endTime = year + "-" + month + "-" + day + " " + "23:30:00";
+        } else if (this.region == 3) {
+          this.endTime = year + "-" + month + "-" + day + " " + "07:30:00";
           // 判断开始日期和结束日期是否跨月份了
-          if(month!=month2){
-            month = parseInt(month)-1
+          if (month != month2) {
+            month = parseInt(month) - 1;
             // 获取前一个月份的最后一天
-            day = this.$options.methods.getdaysinmonth(year,month)
-          }else{
+            day = this.$options.methods.getdaysinmonth(year, month);
+          } else {
             // 将开始时间减一
-            day =parseInt(day)-1;
+            day = parseInt(day) - 1;
           }
-          this.startTime = year+"-"+month+"-"+day+" "+"23:30:00";
+          this.startTime = year + "-" + month + "-" + day + " " + "23:30:00";
         }
-        this.startTime = new Date(this.startTime)
-        this.endTime = new Date(this.endTime)
-          console.log(this.startTime+"开始时间")
-          console.log(this.endTime+"结束时间")
+        this.startTime = new Date(this.startTime);
+        this.endTime = new Date(this.endTime);
+        console.log(this.startTime + "开始时间");
+        console.log(this.endTime + "结束时间");
         // 将拼接好的日期转换为时间戳
-        startTime = Date.parse(this.startTime)
-        endTime = Date.parse(this.endTime)
-        console.log(startTime+"开始时间2")
-        console.log(endTime+"结束时间2")
-      }else{
+        startTime = Date.parse(this.startTime);
+        endTime = Date.parse(this.endTime);
+        console.log(startTime + "开始时间2");
+        console.log(endTime + "结束时间2");
+      } else {
         if (this.startTime) {
-        startTime = sjTime(this.startTime);
+          startTime = sjTime(this.startTime);
         }
         if (this.endTime) {
           endTime = sjTime(this.endTime);
@@ -201,11 +220,19 @@ export default {
       if (startTime && endTime) {
         if (startTime < endTime) {
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+2+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          this.options.requestUrl =
+            "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" +
+            2 +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
-          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }
         } else {
           this.startTime = null;
@@ -213,19 +240,19 @@ export default {
           this.$message.warning("开始时间要比结束时间早");
         }
       } else {
-        this.getRequestUrl()
+        this.getRequestUrl();
       }
     },
     selectionChange(selection) {
       this.options.mapList = selection;
-    },
+    }
   }
-}
+};
 </script>
 
 <style lang="scss" scoped>
 .steel_inboundStatistics {
-  .sache{
+  .sache {
     height: 5rem;
     display: flex;
     align-items: center;
@@ -241,8 +268,6 @@ export default {
     display: flex;
     justify-content: center;
     align-items: center;
-
   }
 }
-
-</style>
+</style>

+ 29 - 22
src/views/WMS/components/steel/bar2_steel/bar2_steel_reserved.vue

@@ -5,9 +5,11 @@
       <el-input
         placeholder="请输入内容"
         v-model="inputText"
-        clearable>
+        clearable
+        style="width:250px"
+      >
       </el-input>
-      
+
       <!-- <span>入库时间:</span>
       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
@@ -18,11 +20,11 @@
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" class="btn" @click="onreserved">
-        入库
+        预留
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options" >
+      <dilTable v-bind.sync="options">
         <!-- <el-table-column fixed="right" label="操作" width="150">
 								<template slot-scope="scope">
 									<el-button type="text" size="mini" @click="inboundDetails(scope)">
@@ -37,47 +39,52 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      inputText:"",
+  data() {
+    return {
+      inputText: "",
       startTime: null,
       endTime: null,
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId="+2,
+        requestUrl:
+          "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId=" + 2
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  methods:{
+  methods: {
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
-    onclick(){
-      this.options.requestUrl= "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId="+2+"&con="+this.inputText;
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId=" +
+        2 +
+        "&con=" +
+        this.inputText;
     },
     selectionChange(selection) {
       this.options.mapList = selection;
     },
-    onreserved(){
+    onreserved() {
       this.$router.push({
-        path: "/bar2_addSteelReserved",
+        path: "/bar2_addSteelReserved"
       });
     }
   }
-}
+};
 </script>
 
-<style lang="scss" scode>
-.steel_inbound{
-  .sache{
+<style lang="scss" scoped>
+.steel_inbound {
+  .sache {
     height: 5rem;
     display: flex;
     align-items: center;
     padding-left: 1.875rem;
   }
 }
-</style>
+</style>

+ 102 - 0
src/views/WMS/components/steel/bar2_steel/inboundEas02.vue

@@ -0,0 +1,102 @@
+<template>
+  <div class="steel_inbound_real">
+    <div class="sache">
+      <span class="text">入库时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable
+        v-bind.sync="options"
+        ref="table"
+        :showSummaryList="showSummaryList"
+        :isshowSummary="true"
+      >
+        <el-table-column label="操作" width="120px">
+          <template slot-scope="scope">
+            <el-button type="text" @click="crtlZ(scope.row)">撤销</el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+export default {
+  data() {
+    return {
+      inputText: "",
+      startTime: null,
+      endTime: null,
+      region: "0",
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=" + 2
+        // selectionType: "select",
+        // mapList: [],
+      },
+      showSummaryList: ["theroticalWeight", "materialNum", "actuallyWeight"]
+    };
+  },
+  methods: {
+    // inboundDetails(scope){
+    //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
+    // }
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      this.options.requestUrl =
+        "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=2&startTime=" +
+        startTime +
+        "&endTime=" +
+        endTime +
+        "&i=" +
+        new Date();
+    },
+    crtlZ(row) {
+      console.log(row.inboundEasId);
+      this.axios
+        .post("/api/v1/wms/reduceInboundEas?inboundEasId=" + row.inboundEasId)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("撤销成功");
+          } else {
+            this.$message.error("撤销失败");
+          }
+          this.options.requestUrl =
+            "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=2" +
+            "&i=" +
+            new Date();
+        });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.steel_inbound_real {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+}
+</style>

+ 103 - 0
src/views/WMS/components/steel/inboundEas03.vue

@@ -0,0 +1,103 @@
+<template>
+  <div class="steel_inbound_real">
+    <div class="sache">
+      <span class="text">入库时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable
+        v-bind.sync="options"
+        ref="table"
+        :showSummaryList="showSummaryList"
+        :isshowSummary="true"
+      >
+        <el-table-column label="操作" width="120px">
+          <template slot-scope="scope"
+            ><el-button type="text" @click="crtlZ(scope.row)"
+              >撤销</el-button
+            ></template
+          >
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+export default {
+  data() {
+    return {
+      inputText: "",
+      startTime: null,
+      endTime: null,
+      region: "0",
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=" + 3
+        // selectionType: "select",
+        // mapList: [],
+      },
+      showSummaryList: ["theroticalWeight", "materialNum", "actuallyWeight"]
+    };
+  },
+  methods: {
+    // inboundDetails(scope){
+    //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
+    // }
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      this.options.requestUrl =
+        "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=3&startTime=" +
+        startTime +
+        "&endTime=" +
+        endTime +
+        "&i=" +
+        new Date();
+    },
+    crtlZ(row) {
+      this.axios
+        .post("/api/v1/wms/reduceInboundEas?inboundEasId=" + row.inboundEasId)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("撤销成功");
+          } else {
+            this.$message.error("撤销失败");
+          }
+          this.options.requestUrl =
+            "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=3" +
+            "&i=" +
+            new Date();
+        });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.steel_inbound_real {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+}
+</style>

+ 139 - 116
src/views/WMS/components/steel/steel_inbound.vue

@@ -1,30 +1,54 @@
 //入库转预留
 <template>
-  <div class="steel_inbound">
+  <div class="steel_inbound03">
     <div class="sache">
-      <span class="text">入库时间:</span>
-      <el-date-picker disabled v-model="startTime" type="datetime" placeholder="选择日期">
-      </el-date-picker>
-      <span class="text">至</span>
-      <el-date-picker disabled v-model="endTime" type="datetime" placeholder="选择日期">
-      </el-date-picker>
-      <span class="text">物资类型</span>
-      <el-autocomplete
-      class="inputStyle"
-      v-model="inputText"
-      :fetch-suggestions="querySearch"
-      placeholder="请输入内容"
-      @select="handleSelect"
-    ></el-autocomplete>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" class="btn" @click="onreserved">
-        预留
-      </el-button>
+      <el-form :inline="true">
+        <el-form-item>
+          <span class="text">扫码时间:</span>
+          <el-date-picker
+            disabled
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+          <span class="text">至</span>
+          <el-date-picker
+            disabled
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <span class="text">物资类型</span>
+          <el-autocomplete
+            v-model="inputText"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入内容"
+            @select="handleSelect"
+            style="width: 200px;"
+          ></el-autocomplete>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>查询
+          </el-button>
+          <el-button type="primary" class="btn" @click="onreserved">
+            入库
+          </el-button>
+        </el-form-item>
+      </el-form>
     </div>
     <div class="table">
-      <dilTable v-if="tableShow" :selectionType="selectionType"  v-bind.sync="options" >
+      <dilTable
+        v-if="tableShow"
+        :selectionType="selectionType"
+        v-bind.sync="options"
+      >
       </dilTable>
     </div>
   </div>
@@ -32,77 +56,90 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
 export default {
-  data(){
-    return{
-      tableShow:false,
-      selectionType:"",
-      inputText:"",
+  data() {
+    return {
+      tableShow: false,
+      selectionType: "",
+      inputText: "",
       startTime: null,
       endTime: null,
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+3,
+        requestUrl: "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" + 3
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  mounted(){
-
+  mounted() {
     var date = new Date();
-    let dateStr=this.formatDate(date, 'yyyy-MM-dd hh:mm:ss');
-    
-    this.startTime= Date.parse(new Date(dateStr));
-    this.endTime=new Date(this.startTime+86400000);
+    let dateStr = this.formatDate(date, "yyyy-MM-dd hh:mm:ss");
 
-    this.options.requestUrl= "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+3+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime) ;
-    this.tableShow=true;
+    this.startTime = Date.parse(new Date(dateStr));
+    this.endTime = new Date(this.startTime + 86400000);
+
+    this.options.requestUrl =
+      "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" +
+      3 +
+      "&startTime=" +
+      sjTime(this.startTime) +
+      "&endTime=" +
+      sjTime(this.endTime);
+    this.tableShow = true;
   },
-  methods:{
-    formatDate (date, fmt) {
-        if (/(y+)/.test(fmt)) {
-          fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-        }
-        let o = {
-          'M+': date.getMonth() + 1,
-          'd+': date.getDate(),
-          'h+': 0,
-          'm+': 0,
-          's+': 0
+  methods: {
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
       }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": 0,
+        "m+": 0,
+        "s+": 0
+      };
       for (let k in o) {
         if (new RegExp(`(${k})`).test(fmt)) {
-          let str = o[k] + ''
-          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str))
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : this.padLeftZero(str)
+          );
         }
-            }
-      return fmt
+      }
+      return fmt;
+    },
+    padLeftZero(str) {
+      return ("00" + str).substr(str.length);
+    },
+    querySearch(queryString, cb) {
+      var restaurants = [
+        { value: "螺纹钢" },
+        { value: "盘螺" },
+        { value: "乱尺" }
+      ];
+      var results = queryString
+        ? restaurants.filter(this.createFilter(queryString))
+        : restaurants;
+      // 调用 callback 返回建议列表的数据
+      cb(results);
     },
-    padLeftZero (str) {
-        return ('00' + str).substr(str.length)
+    createFilter(queryString) {
+      return restaurant => {
+        return (
+          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1
+        );
+      };
     },
-     querySearch(queryString, cb) {
-        var restaurants = [ 
-                            {"value":"螺纹钢"},
-                            {"value":"盘螺"},
-                            {"value":"乱尺"}
-                          ];
-        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
-        // 调用 callback 返回建议列表的数据
-        cb(results);
-      },
-      createFilter(queryString) {
-        return (restaurant) => {
-          return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
-        };
-      },
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
-    onclick(){
-
+    onclick() {
       let startTime = null;
       let endTime = null;
       if (this.startTime) {
@@ -113,10 +150,18 @@ export default {
       }
       if (startTime && endTime) {
         if (startTime < endTime) {
-          this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+3+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
-          this.options.requestQuery={
-            "materialNames":this.inputText
-          }
+          this.options.requestUrl =
+            "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" +
+            3 +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+          this.options.requestQuery = {
+            materialNames: this.inputText
+          };
           // this.selectionType="select";
         } else {
           this.startTime = null;
@@ -124,7 +169,7 @@ export default {
           this.$message.warning("开始时间要比结束时间早");
         }
       } else {
-         this.$message.warning("没有选择时间段");
+        this.$message.warning("没有选择时间段");
         // this.getRequestUrl()
       }
     },
@@ -132,48 +177,26 @@ export default {
       this.options.mapList = selection;
     },
     handleSelect(item) {
-        console.log(item);
+      console.log(item);
     },
-    onreserved(){
+    onreserved() {
       this.$router.push({
-        path: "/addSteelInbound",
+        path: "/addSteelInbound"
       });
     }
   }
-}
+};
 </script>
 
-<style lang="scss" scode>
-.steel_inbound{
-  margin-top: 30px;
-  margin-left: 20px;
-   
-    .sache{
-      display: flex;
-      margin-bottom: 10px;
-      padding-right: 10px;
-       .inputStyle{
-          width: 200px;
-          margin-right: 5px;
-        margin-left: 5px;
-        }
-      .text {
-        text-align: left;
-        line-height: 40px;
-      }
-      .el-date-editor {
-        margin-right: 5px;
-        margin-left: 5px;
-      }
-      .btn {
-        margin-left: 10px;
-      }
-      .el-select {
-      width: 100%;
-      .el-input__inner {
-        width: 150px;
-      }
-    }
-    }
+<style lang="scss" scoped>
+.steel_inbound03 {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
 }
-</style>
+</style>

+ 145 - 118
src/views/WMS/components/steel/steel_inboundStatistics.vue

@@ -3,7 +3,11 @@
   <div class="steel_inboundStatistics">
     <div class="sache">
       <span class="text">入库时间:</span>
-      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
       </el-date-picker>
       <span class="text1">至</span>
       <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
@@ -17,18 +21,23 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-col :span="3" v-html="'\u2003'"/>
+      <el-col :span="3" v-html="'\u2003'" />
       <span class="text">生产总件数</span>
       <el-input
         placeholder="请输入内容"
         v-model="input3"
-        :disabled="true" class="inputs" style="width:10%">
+        :disabled="true"
+        class="inputs"
+        style="width:10%"
+      >
       </el-input>
       <span class="text">生产总重量</span>
       <el-input
         placeholder="请输入内容"
         v-model="input4"
-        :disabled="true" style="width:10%">
+        :disabled="true"
+        style="width:10%"
+      >
       </el-input>
     </div>
     <div class="table">
@@ -40,51 +49,52 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      rowClassName({row, rowIndex}) {
+  data() {
+    return {
+      rowClassName({ row, rowIndex }) {
         if (rowIndex === 0) {
-          return 'success-row';
+          return "success-row";
         }
-        return '';
+        return "";
       },
-      input1: '',
-      input2: '',
-      input3: '',
-      input4: '',
-      input5: '',
-      inputText:"",
+      input1: "",
+      input2: "",
+      input3: "",
+      input4: "",
+      input5: "",
+      inputText: "",
       startTime: null,
       endTime: null,
       region: "0",
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3,
+        requestUrl:
+          "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" + 3
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  created(){
-    console.log(this.options.data)
+  created() {
+    console.log(this.options.data);
   },
-  methods:{
-    func(res){
+  methods: {
+    func(res) {
       // console.log(res.list[0])
       // this.input1 = this.input1 + e.furnaceNumber1,
       let num1 = 0;
       let num2 = 0;
       res.list.forEach(e => {
-        console.log(e)
-        console.log(e.count)
-        console.log(e.weight)
-        num1 = num1 + e.count,
-        num2 = num2 + e.weight
+        console.log(e);
+        console.log(e.count);
+        console.log(e.weight);
+        num1 = num1 + e.count;
+        num2 = num2 + e.weight;
       });
       this.input3 = num1;
-      this.input4 = num2;
+      this.input4 = (num2 / 1000).toFixed(3);
       // this.input1 = res.list[0].furnaceNumber1,
       // this.input2 = res.list[0].materialName,
       // this.input3 = res.list[0].count,
@@ -95,53 +105,60 @@ export default {
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
     // 获取当前月份的最后一天
-    getdaysinmonth(year,month){
-      month = parseInt(month,10)+1;
+    getdaysinmonth(year, month) {
+      month = parseInt(month, 10) + 1;
       let days = 0;
-      month = month -1;
-      console.log("othermonth"+month)
-      console.log("otheryear"+year);
+      month = month - 1;
+      console.log("othermonth" + month);
+      console.log("otheryear" + year);
       // 根据月份获取对应的天数
-      if(month == 2){
-        days = year % 4 == 0?29:28;
-      }else if(month == 1||month == 3||month == 5||month == 7||month == 8||month == 10||month == 12){
+      if (month == 2) {
+        days = year % 4 == 0 ? 29 : 28;
+      } else if (
+        month == 1 ||
+        month == 3 ||
+        month == 5 ||
+        month == 7 ||
+        month == 8 ||
+        month == 10 ||
+        month == 12
+      ) {
         days = 31;
-      }else{
+      } else {
         days = 30;
       }
-      console.log("otherdays"+days)
+      console.log("otherdays" + days);
       return days;
     },
-    onclick(){
-
+    onclick() {
       let startTime = null;
       let endTime = null;
       // 判断用户有没有班次,有班次则提供默认时间
-      if(this.region!=null){
-        let date =null;
-        let date2 =null;
+      if (this.region != null) {
+        let date = null;
+        let date2 = null;
         let year = null;
-        let month =null;
+        let month = null;
         let day = null;
         let year2 = null;
-        let month2 =null;
+        let month2 = null;
         let day2 = null;
         // 判断当前日期输入框中是否选择了时间,并且开始日期和结束日期是否是同一天
-        if(this.startTime!=null){
-            date = this.startTime;
-            // 判断当前开始时间是标准时间还是字符串时间
-            
-           year = date.getFullYear(); // 年
+        if (this.startTime != null) {
+          date = this.startTime;
+          // 判断当前开始时间是标准时间还是字符串时间
+
+          year = date.getFullYear(); // 年
           month = date.getMonth() + 1; // 月
-          day = date.getDate(); // 日 
+          day = date.getDate(); // 日
         }
-        if(this.endTime!=null){
-           date2 = this.endTime;
-           year2 = date2.getFullYear(); // 年
+        if (this.endTime != null) {
+          date2 = this.endTime;
+          year2 = date2.getFullYear(); // 年
           month2 = date2.getMonth() + 1; // 月
           day2 = date2.getDate(); // 日 // 日
         }
-        if(this.startTime==null&&this.endTime==null){
+        if (this.startTime == null && this.endTime == null) {
           // 获取当前的日期时间
           date = new Date();
           year = date.getFullYear(); // 年
@@ -149,50 +166,53 @@ export default {
           day = date.getDate(); // 日
         }
         // 判断开始日期和结束日期是否是同一天
-        if(!(year==year2&&month==month2&&day==day2)&&(this.startTime!=null||this.endTime!=null)&&this.region==null){
+        if (
+          !(year == year2 && month == month2 && day == day2) &&
+          (this.startTime != null || this.endTime != null) &&
+          this.region == null
+        ) {
           // 当不是同一天的时候,直接弹窗警告
           this.startTime = null;
           this.endTime = null;
           this.$message.warning("开始日期和结束日期不是同一天");
         }
         // 判断当前用户选择的具体班次
-        if(this.region == 0){
-          this.startTime = year+"-"+month+"-"+day+" "+"00:00:00";
+        if (this.region == 0) {
+          this.startTime = year + "-" + month + "-" + day + " " + "00:00:00";
           // 将结束时间加一
-          day =parseInt(day) + 1;
-          this.endTime = year+"-"+month+"-"+day+" "+"00:00:00";
-          
-        }else if(this.region == 1){
-          this.startTime = year+"-"+month+"-"+day+" "+"07:30:00";
-          this.endTime = year+"-"+month+"-"+day+" "+"15:30:00";
-        }else if(this.region == 2){
-          this.startTime = year+"-"+month+"-"+day+" "+"15:30:00";
-          this.endTime = year+"-"+month+"-"+day+" "+"23:30:00";
-        }else if(this.region == 3){
-          this.endTime = year+"-"+month+"-"+day+" "+"07:30:00";
+          day = parseInt(day) + 1;
+          this.endTime = year + "-" + month + "-" + day + " " + "00:00:00";
+        } else if (this.region == 1) {
+          this.startTime = year + "-" + month + "-" + day + " " + "07:30:00";
+          this.endTime = year + "-" + month + "-" + day + " " + "15:30:00";
+        } else if (this.region == 2) {
+          this.startTime = year + "-" + month + "-" + day + " " + "15:30:00";
+          this.endTime = year + "-" + month + "-" + day + " " + "23:30:00";
+        } else if (this.region == 3) {
+          this.endTime = year + "-" + month + "-" + day + " " + "07:30:00";
           // 判断开始日期和结束日期是否跨月份了
-          if(month!=month2){
-            month = parseInt(month)-1
+          if (month != month2) {
+            month = parseInt(month) - 1;
             // 获取前一个月份的最后一天
-            day = this.$options.methods.getdaysinmonth(year,month)
-          }else{
+            day = this.$options.methods.getdaysinmonth(year, month);
+          } else {
             // 将开始时间减一
-            day =parseInt(day)-1;
+            day = parseInt(day) - 1;
           }
-          this.startTime = year+"-"+month+"-"+day+" "+"23:30:00";
+          this.startTime = year + "-" + month + "-" + day + " " + "23:30:00";
         }
-        this.startTime = new Date(this.startTime)
-        this.endTime = new Date(this.endTime)
-          console.log(this.startTime+"开始时间")
-          console.log(this.endTime+"结束时间")
+        this.startTime = new Date(this.startTime);
+        this.endTime = new Date(this.endTime);
+        console.log(this.startTime + "开始时间");
+        console.log(this.endTime + "结束时间");
         // 将拼接好的日期转换为时间戳
-        startTime = Date.parse(this.startTime)
-        endTime = Date.parse(this.endTime)
-        console.log(startTime+"开始时间2")
-        console.log(endTime+"结束时间2")
-      }else{
+        startTime = Date.parse(this.startTime);
+        endTime = Date.parse(this.endTime);
+        console.log(startTime + "开始时间2");
+        console.log(endTime + "结束时间2");
+      } else {
         if (this.startTime) {
-        startTime = sjTime(this.startTime);
+          startTime = sjTime(this.startTime);
         }
         if (this.endTime) {
           endTime = sjTime(this.endTime);
@@ -201,11 +221,19 @@ export default {
       if (startTime && endTime) {
         if (startTime < endTime) {
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          this.options.requestUrl =
+            "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" +
+            3 +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
-          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }
         } else {
           this.startTime = null;
@@ -216,42 +244,41 @@ export default {
     },
     selectionChange(selection) {
       this.options.mapList = selection;
-    },
+    }
   }
-}
+};
 </script>
 
 <style lang="scss" scoped>
 .steel_inboundStatistics {
-    margin-top: 30px;
-    margin-left: 20px;
-    .sache{
-      display: flex;
-      margin-bottom: 10px;
-      padding-right: 10px;
-      .text {
-        text-align: left;
-        line-height: 40px;
-        width: 70px;
-      }
-      .text1 {
-        text-align: left;
-        line-height: 40px;
-      }
-      .el-date-editor {
-        margin-right: 5px;
-        margin-left: 5px;
-      }
-      .btn {
-        margin-left: 10px;
-      }
-      .el-select {
+  margin-top: 30px;
+  margin-left: 20px;
+  .sache {
+    display: flex;
+    margin-bottom: 10px;
+    padding-right: 10px;
+    .text {
+      text-align: left;
+      line-height: 40px;
+      width: 70px;
+    }
+    .text1 {
+      text-align: left;
+      line-height: 40px;
+    }
+    .el-date-editor {
+      margin-right: 5px;
+      margin-left: 5px;
+    }
+    .btn {
+      margin-left: 10px;
+    }
+    .el-select {
       width: 100%;
       .el-input__inner {
         width: 150px;
       }
     }
-    }
+  }
 }
-
-</style>
+</style>

+ 39 - 38
src/views/WMS/components/steel/steel_reserved.vue

@@ -2,79 +2,80 @@
 <template>
   <div class="steel_inbound">
     <div class="sache">
-      <el-input
-        placeholder="请输入内容"
-        v-model="inputText"
-        clearable>
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
       </el-input>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" class="btn" @click="onreserved">
-        入库
+        预留
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options" >
-      </dilTable>
+      <dilTable v-bind.sync="options"> </dilTable>
     </div>
   </div>
 </template>
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      inputText:"",
+  data() {
+    return {
+      inputText: "",
       startTime: null,
       endTime: null,
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId="+3,
+        requestUrl:
+          "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId=" + 3
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  methods:{
+  methods: {
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
-    onclick(){
-      this.options.requestUrl= "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId="+3+"&con="+this.inputText;
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId=" +
+        3 +
+        "&con=" +
+        this.inputText;
     },
     selectionChange(selection) {
       this.options.mapList = selection;
     },
-    onreserved(){
+    onreserved() {
       this.$router.push({
-        path: "/addSteelReserved",
+        path: "/addSteelReserved"
       });
     }
   }
-}
+};
 </script>
 
-<style lang="scss" scope>
-.steel_inbound{
+<style lang="scss" scoped>
+.steel_inbound {
   margin-top: 30px;
   margin-left: 20px;
-    .sache{
-      display: flex;
-      margin-bottom: 10px;
-      padding-right: 10px;
-      .text {
-        text-align: left;
-        line-height: 40px;
-      }
-      .btn {
-        margin-left: 10px;
-      }
-      .el-input {
-        width: 250px;
-      }
+  .sache {
+    display: flex;
+    margin-bottom: 10px;
+    padding-right: 10px;
+    .text {
+      text-align: left;
+      line-height: 40px;
+    }
+    .btn {
+      margin-left: 10px;
     }
+    .el-input {
+      width: 250px;
+    }
+  }
 }
-</style>
+</style>

+ 21 - 0
src/views/WMS/router/index.js

@@ -44,6 +44,7 @@ import addSteelInbound from "../components/steel/addSteelInbound.vue";
 import addSteelReserved from "../components/steel/addSteelReserved.vue";
 import steel_outboundStatistics from "../components/steel/steel_outboundStatistics.vue";
 import steel_inboundStatistics from "../components/steel/steel_inboundStatistics.vue";
+import inboundEas03 from "../components/steel/inboundEas03.vue";
 
 // 一帮库页面配置
 import bar1_addTransfer from "../components/steel/bar1_steel/bar1_addTransfer.vue";
@@ -72,6 +73,7 @@ import bar1_addSteelInbound from "../components/steel/bar1_steel/bar1_addSteelIn
 import bar1_addSteelReserved from "../components/steel/bar1_steel/bar1_addSteelReserved.vue";
 import bar1_steel_inboundStatistics from "../components/steel/bar1_steel/bar1_steel_inboundStatistics.vue";
 import bar1_steel_outboundStatistics from "../components/steel/bar1_steel/bar1_steel_outboundStatistics.vue";
+import inboundEas01 from "../components/steel/bar1_steel/inboundEas01.vue";
 
 // 二棒库路径配置
 import bar2_addTransfer from "../components/steel/bar2_steel/bar2_addTransfer.vue";
@@ -101,6 +103,7 @@ import bar2_addSteelReserved from "../components/steel/bar2_steel/bar2_addSteelR
 import bar2_steel_inboundStatistics from "../components/steel/bar2_steel/bar2_steel_inboundStatistics.vue";
 import bar2_steel_outboundStatistics from "../components/steel/bar2_steel/bar2_steel_outboundStatistics.vue";
 import wmsOrderDetails from "../components/billingOrder/orderDetails.vue";
+import inboundEas02 from "../components/steel/bar2_steel/inboundEas02.vue";
 Vue.use(Router);
 const constantRouterMap = [
   {
@@ -661,6 +664,24 @@ const constantRouterMap = [
         name: "wmsOrderDetails",
         meta: { code: "xtpzgl-yhgl" },
         component: wmsOrderDetails
+      },
+      {
+        path: "inboundEas01",
+        name: "inboundEas01",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inboundEas01
+      },
+      {
+        path: "inboundEas02",
+        name: "inboundEas02",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inboundEas02
+      },
+      {
+        path: "inboundEas03",
+        name: "inboundEas03",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inboundEas03
       }
     ]
   }

+ 57 - 19
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -945,7 +945,8 @@ export default {
       //是否忽视收货客户电话字段
       ignoreSaleOrderConsigneeTel: 0,
       restaurants: [],
-      saleAreaId: null
+      saleAreaId: null,
+      isNiTui: 0
     };
   },
   created() {
@@ -1201,6 +1202,15 @@ export default {
     //以上是发货单位边输边查搜索
     //下单客户弹出层
     handleSelectConsignee(item) {
+      this.saleShipperAddressName = null;
+      this.saleShipperAddressId = null;
+      this.addressId = null;
+      this.place1 = null;
+      this.saleMan = null;
+      this.saleOrderConsigneeTel = null;
+      this.province = null;
+      this.city = null;
+      this.county = null;
       this.consigneeName = item.consigneeCompanyName;
       this.consigneeId = item.consigneeId;
       this.isReceiveHaveArea(this.consigneeId);
@@ -1439,6 +1449,7 @@ export default {
       ).then(() => {
         this.creatArtSingle(singleArr);
       });
+      this.isNiTui = 0;
     },
     async creatArtSingle(singleArr) {
       let i = 0;
@@ -1563,6 +1574,7 @@ export default {
       } else {
         this.addMaterialToSaleOrder();
       }
+      this.isNiTui = 0;
     },
     //添加物资到订单
     addMaterialToSaleOrder() {
@@ -1840,27 +1852,53 @@ export default {
     },
     //收货地址弹出层
     handleSelect1(item) {
-      console.log("获取所有下拉值!");
+      console.log(item);
+      if (this.isNiTui == 1) {
+        this.province = item.province;
+        this.city = item.district;
+        this.county = item.town;
+        this.place1 = item.place;
+        this.addressId = item.shipperAddressId;
+        this.place = item.place;
+      }
     },
     //以下是收货地址边输边查搜索
     querySearch1(queryString, cb) {
-      this.axios
-        .post(
-          "/api/v1/ams/getRealAddressByLike?addressId=" +
-            this.addressId +
-            "&index=" +
-            queryString
-        )
-        .then(res => {
-          if (res.data.code == "200") {
-            var restaurants = res.data.data;
-            var results = queryString
-              ? restaurants.filter(this.createFilter1(queryString))
-              : restaurants;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
-        });
+      if (this.addressId != null) {
+        this.axios
+          .post(
+            "/api/v1/ams/getRealAddressByLike?addressId=" +
+              this.addressId +
+              "&index=" +
+              queryString
+          )
+          .then(res => {
+            this.isNiTui = 0;
+            if (res.data.code == "200") {
+              var restaurants = res.data.data;
+              var results = queryString
+                ? restaurants.filter(this.createFilter1(queryString))
+                : restaurants;
+              // 调用 callback 返回建议列表的数据
+              cb(results);
+            }
+          });
+      } else {
+        this.axios
+          .post("/api/v1/uc/getPlaceAndAddress?index=" + queryString)
+          .then(res => {
+            this.isNiTui = 1;
+            if (res.data.code == "200") {
+              console.log(res.data.data);
+              var restaurants = res.data.data;
+              var results = queryString
+                ? restaurants.filter(this.createFilter1(queryString))
+                : restaurants;
+              // 调用 callback 返回建议列表的数据
+              cb(results);
+            }
+          });
+      }
     },
     createFilter1(queryString) {
       return restaurants => {

+ 138 - 7
src/views/appoint/components/saleContract/editSaleOrder.vue

@@ -96,12 +96,17 @@
     <el-form :inline="true" style="margin-top: 1rem;">
       <el-form-item>
         <label class="el-form-item__label" style="width: auto;">收货地址</label>
-        <el-input
-          style="width: 400px"
+        <el-autocomplete
+          style="width:400px"
           v-model="saleShipperAddressName"
-          disabled
+          :fetch-suggestions="querySearchAddress"
+          placeholder="请输入内容"
+          @select="handleSelectAddress"
         >
-        </el-input>
+          <template slot-scope="{ item }">
+            <span class="addr">{{ item.addressPlace }}</span>
+          </template>
+        </el-autocomplete>
         <el-button type="primary" @click="ondrawerOut">选择</el-button>
       </el-form-item>
       <el-form-item>
@@ -289,6 +294,9 @@
           <template slot="scope" v-if="item.label !== '收货方电话'">
             <span>{{ item.label }}</span>
           </template>
+          <template slot="scope" v-if="item.label !== '备注'">
+            <span>{{ item.label }}</span>
+          </template>
           <!-- 插入输入框 -->
           <template slot-scope="scope">
             <template v-if="item.slot">
@@ -366,6 +374,14 @@
                   @change="batchUpdateValue(scope.row, scope.$index)"
                 ></el-input>
               </template>
+              <!-- 备注 -->
+              <template v-if="item.prop == 'truckRemark'">
+                <el-input
+                  class="textinput5"
+                  placeholder="(必填)"
+                  v-model="scope.row.truckRemark"
+                ></el-input>
+              </template>
             </template>
             <template v-else>
               <span>{{ scope.row[item.prop] }}</span>
@@ -373,7 +389,7 @@
           </template>
         </el-table-column>
         <!-- 操作列 -->
-        <el-table-column fixed="right" label="操作" width="100">
+        <el-table-column fixed="right" label="操作" width="200">
           <template slot-scope="scope">
             <el-button
               @click.native.prevent="deleteRow(scope.$index, selectionList)"
@@ -381,6 +397,28 @@
               icon="el-icon-close"
               size="big"
             ></el-button>
+            <el-button
+              @click.native.prevent="copyRow(scope.$index, scope.row)"
+              type="text"
+              size="big"
+              >复制为一车</el-button
+            >
+            <el-button
+              @click.native.prevent="copyRowflu(scope.$index, scope.row)"
+              type="text"
+              size="big"
+              >复制为分录</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column fixed="right" width="80">
+          <template slot-scope="scope">
+            <el-button
+              @click.native.prevent="copyRowfluAll(scope.$index, scope.row)"
+              type="text"
+              size="big"
+              >复制整车</el-button
+            >
           </template>
         </el-table-column>
       </el-table>
@@ -885,6 +923,78 @@ export default {
     this.getAllSaleMessages();
   },
   methods: {
+    handleSelectAddress(item) {
+      this.saleShipperAddressName = item.addressPlace;
+      this.province = item.addressProvince;
+      this.city = item.addressDistrict;
+      this.county = item.addressTown;
+      this.saleShipperAddressId = item.shipperAddressId;
+      this.addressId = item.shipperAddressId;
+      this.place1 = item.place;
+      this.saleOrderConsigneeTel = item.saleOrderConsigneeTel;
+    },
+    querySearchAddress(queryString, cb) {
+      if (this.consigneeId != null) {
+        this.axios
+          .post(
+            "/api/v1/ams/matchingAddressRecently?receiveId=" + this.consigneeId
+          )
+          .then(res => {
+            var restaurants = res.data.data;
+            console.log(restaurants);
+            var results = queryString
+              ? restaurants.filter(this.createStateFilter(queryString))
+              : restaurants;
+            cb(results);
+          });
+      }
+    },
+    createStateFilter(queryString) {
+      return restaurants => {
+        return (
+          restaurants.addressPlace
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
+    copyRow(index, row) {
+      let copyRow = new Object();
+      Object.keys(row).forEach(key => {
+        copyRow[key] = row[key];
+      });
+      copyRow.cxh = this.maxCxh;
+      this.selectionList.push(copyRow);
+      this.getSpanArr(this.selectionList);
+      this.maxCxh++;
+    },
+    copyRowflu(index, row) {
+      console.log(index);
+      let copyRowflu = new Object();
+      Object.keys(row).forEach(key => {
+        copyRowflu[key] = row[key];
+      });
+      this.selectionList.splice(index + 1, 0, copyRowflu);
+      // this.selectionList.push(copyRowflu);
+      this.getSpanArr(this.selectionList);
+    },
+    copyRowfluAll(index, row) {
+      let arr = [];
+      //复制整车,根据车序号去寻找相同的列
+      arr = this.selectionList.concat([]).filter((item, index) => {
+        return item.cxh == row.cxh;
+      });
+      arr.forEach(e => {
+        let copyRow = new Object();
+        Object.keys(e).forEach(key => {
+          copyRow[key] = e[key];
+        });
+        copyRow.cxh = this.maxCxh;
+        this.selectionList.push(copyRow);
+      });
+      this.getSpanArr(this.selectionList);
+      this.maxCxh++;
+    },
     onblur() {
       this.isCellClick = 0;
       console.log("我这里值也变化了");
@@ -907,7 +1017,7 @@ export default {
         )
         .then(res => {
           //销售订单基础数据
-          console.log(res);
+          console.log(res.data.data);
           this.shipperName = res.data.data.shipperName;
           this.shipperId = res.data.data.shipperId;
           this.consigneeName = res.data.data.receiveName;
@@ -1319,6 +1429,7 @@ export default {
               saleShipperAddressName: this.saleShipperAddressName,
               saleDateOfReceipt: this.saleDateOfReceipt,
               saleOrderConsigneeTel: this.saleOrderConsigneeTel,
+              truckRemark: this.truckRemark,
               materialId: e.materialId,
               haveMeter: e.haveMeter,
               isDisable: e.isDisable
@@ -1349,6 +1460,7 @@ export default {
             saleShipperAddressName: this.saleShipperAddressName,
             saleDateOfReceipt: this.saleDateOfReceipt,
             saleOrderConsigneeTel: this.saleOrderConsigneeTel,
+            truckRemark: this.truckRemark,
             materialId: e.materialId,
             haveMeter: e.haveMeter,
             isDisable: e.isDisable
@@ -1616,6 +1728,22 @@ export default {
           colspan: _col
         };
       }
+      if (columnIndex === 8) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+      if (columnIndex === 10) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
     },
     //点击外层收货地址浏览事件
     ondrawerOut() {
@@ -1807,6 +1935,7 @@ export default {
             var orderPlanWeightAllFill = 0;
             //初始化maplist
             var mapList = [];
+            console.log(this.selectionList);
             this.selectionList.forEach(item => {
               if (!item.orderPlanWeight) {
                 orderPlanWeightAllFill++;
@@ -1830,7 +1959,8 @@ export default {
                 //米数
                 steelMeters: 0,
                 //是否磅重销售
-                isPoundSale: 0
+                isPoundSale: 0,
+                truckRemark: null
               };
               mapItem.truckNo = item.cxh;
               mapItem.shipperAddressId = item.saleShipperAddressId;
@@ -1841,6 +1971,7 @@ export default {
               mapItem.materialNumber = item.orderPlanWeight;
               mapItem.steelMeters = item.meterNumber;
               mapItem.isPoundSale = item.isPound;
+              mapItem.truckRemark = item.truckRemark;
               mapList.push(mapItem);
             });
             let mapValue = {

+ 1 - 1
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -3,7 +3,7 @@
   <div class="salePlan">
     <div class="top">
       <el-form :inline="true">
-        <el-form-item>
+        <el-form-item v-if="activeName != 'first'">
           <el-date-picker
             v-model="startTime"
             type="datetime"

+ 17 - 0
src/views/appoint/components/ship/deliveryAttorney.vue

@@ -75,6 +75,23 @@
       <!-- 已下发 -->
       <el-tab-pane label="已下发" name="second">
         <dilTable v-bind.sync="option2" @selection-change="selectionChange">
+          <el-table-column
+            fixed="right"
+            align="center"
+            label="操作"
+            width="120"
+          >
+            <template slot-scope="scope">
+              <el-button
+                @click="modifyClick(scope.row.attorneyId)"
+                type="text"
+                size="small"
+                :disabled="scope.row.purchaseOrderMaterialNum"
+              >
+                修改
+              </el-button>
+            </template>
+          </el-table-column>
         </dilTable>
       </el-tab-pane>
     </el-tabs>

+ 1 - 1
src/views/appoint/components/ship/modifyDeliveryNotice.vue

@@ -411,7 +411,7 @@ export default {
         map.silicaContent == null ||
         map.aluminaContent == null ||
         map.phosphorusContent == null ||
-        map.manganeseContent == null ||
+        // map.manganeseContent == null ||
         map.resultContactPerson == null ||
         map.resultTelephoneFax == null ||
         map.resultNumberOfLoans == null ||

+ 252 - 226
src/views/inward/components/inwardFactory/timeTaskResult.vue

@@ -1,66 +1,71 @@
 // 计时作业
 <template>
-    <div class="sale">
-        <div class="top">
-            <!-- 框计算 -->
-            <span class="text">计时时间:</span>
-            <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
-            </el-date-picker>
-            <span class="text">至</span>
-            <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
-            </el-date-picker>
-            <el-button type="primary" class="btn" @click="onclick">
-                <i class="el-icon-search"></i>查询
-            </el-button>
-            <!-- excel导出 -->
-            <el-button type="primary" @click="exportData()">
-                <i class="el-icon-download"></i>导出(Excel)
-            </el-button>
-        </div>
-        <div class="tab">
-            <dilTable v-bind.sync="option"  ref="excelDom">
-                <el-table-column fixed="right" label="操作" width="180">
-                <template slot-scope="scope">
-                    <div class="step">
-                        <el-button
-                        @click="detailclick1(scope.row)"
-                        type="text"
-                        size="small"
-                        >运输详情</el-button>
-                    </div>
-                  <!-- <el-button @click="" type="primary" style="margin-left: 16px;">
+  <div class="sale">
+    <div class="top">
+      <!-- 框计算 -->
+      <span class="text">计时时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <!-- excel导出 -->
+      <el-button type="primary" @click="exportData()">
+        <i class="el-icon-download"></i>导出(Excel)
+      </el-button>
+    </div>
+    <div class="tab">
+      <dilTable v-bind.sync="option" ref="excelDom">
+        <el-table-column fixed="right" label="操作" width="180">
+          <template slot-scope="scope">
+            <div class="step">
+              <el-button
+                @click="detailclick1(scope.row)"
+                type="text"
+                size="small"
+                >运输详情</el-button
+              >
+            </div>
+            <!-- <el-button @click="" type="primary" style="margin-left: 16px;">
                     运输详情
                   </el-button> -->
-                </template>
-                </el-table-column>
-                <!-- 运输进程详情 -->
-                <el-table-column type="expand" width="1">
-                    <template slot-scope="props">
-                        <el-form label-position="center" inline class="demo-table-expand">
-                        <div v-if="false">{{ props }}</div>
-                        <div>
-                            <el-table :data="tableData1" border>
-                            <el-table-column
-                                v-for="(item, i) in tableHead"
-                                :key="i"
-                                :prop="item.prop"
-                                :label="item.label"
-                                :width="item.width"
-                            ></el-table-column>
-                            </el-table>
-                        </div>
-                        </el-form>
-                    </template>
-                </el-table-column>
-            </dilTable>
-        </div>
-        
+          </template>
+        </el-table-column>
         <!-- 运输进程详情 -->
-        <!-- <el-drawer
+        <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData1" border>
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+
+    <!-- 运输进程详情 -->
+    <!-- <el-drawer
             :visible.sync="drawer"
             :direction="direction"> -->
-            <!-- 步骤条显示 -->
-            <!-- <div style="height: 200px;content-align:center" >
+    <!-- 步骤条显示 -->
+    <!-- <div style="height: 200px;content-align:center" >
                 <el-table
                 :data="stepList"
                 style="width: 100%">
@@ -77,188 +82,209 @@
                 </el-table>
             </div>
         </el-drawer> -->
-    </div>
+  </div>
 </template>
 <script>
 import { getCookie } from "@/utils/util.js";
 import { sjTime } from "@/utils/sharedJsFile";
 export default {
-    data(){
-        return{
-            inputText:'',
-            option: {       
-                // 表格请求数据的地址
-                requestUrl: "",
-            },
-            tableHead: [
-                {
-                prop: "linkName",
-                label: "计时状态",
-                width: 150,
-                },
-                {
-                prop: "pointDate",
-                label: "时间",
-                width: 150,
-                }
-            ],
-            tableData1: [],
-            tableData: [],
-            startTime: null,
-            endTime: null,
-            oldRow1: "",
-            oldRowCount1: 1,
-            drawer: false,
-            direction: 'rtl',
-            orderId: 0,
-            stepList:[],
-            tableTitle:'计时统计'
+  data() {
+    return {
+      inputText: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: ""
+      },
+      tableHead: [
+        {
+          prop: "linkName",
+          label: "计时状态",
+          width: 150
+        },
+        {
+          prop: "pointDate",
+          label: "时间",
+          width: 150
         }
-    },
-    created(){
-        if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode") == "zidonghuabu"||getCookie("orgCode") == "wuliuchuyunzhongxin"){
-            this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458"
-        }else{
-            console.log("cookier"+getCookie("userId"))
-            this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458&orgCode="+getCookie("userId");
+      ],
+      tableData1: [],
+      tableData: [],
+      startTime: null,
+      endTime: null,
+      oldRow1: "",
+      oldRowCount1: 1,
+      drawer: false,
+      direction: "rtl",
+      orderId: 0,
+      stepList: [],
+      tableTitle: "计时统计"
+    };
+  },
+  created() {
+    if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu" ||
+      getCookie("orgCode") == "wuliuchuyunzhongxin"
+    ) {
+      this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458";
+    } else {
+      this.option.requestUrl =
+        "/api/v1/tms/getAllTimeTaskResult?apiId=458&userId=" +
+        getCookie("orgCode");
+    }
+  },
+  methods: {
+    // -------查看物资详情(已拒绝)
+    detailclick1(row) {
+      // 记录重复点击次数
+      if (this.oldRow1 === row) {
+        this.oldRowCount1 += 1;
+      }
+      this.orderId = row.orderId;
+      let map = {
+        orderId: this.orderId
+      };
+      // 切换当前详情表
+      this.$refs.excelDom.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow1 != "") {
+        if (this.oldRow1 != row) {
+          if (this.oldRowCount1 % 2 === 1) {
+            this.$refs.excelDom.toggleRowExpansion(this.oldRow1);
+          } else {
+            this.oldRowCount1 = 1;
+          }
+        } else {
+          this.oldRow1 = null;
+          return;
         }
+      }
+      // 重置上一个点击对象
+      this.oldRow1 = row;
+      // 根据销售订单物资中间表id查询物资信息
+      this.axios.post("/api/v1/oms/getOrderResult?orderId=", map).then(res => {
+        console.log("res", res);
+        this.tableData1 = res.data;
+      });
     },
-    methods:{
-        // -------查看物资详情(已拒绝)
-        detailclick1(row) {
-        // 记录重复点击次数
-        if (this.oldRow1 === row) {
-            this.oldRowCount1 += 1;
-        }
-        this.orderId = row.orderId
-        let map = {
-            orderId : this.orderId
+    getStepsList(row) {
+      console.log(row.orderId);
+      this.orderId = row.orderId;
+      this.drawer = true;
+      let map = {
+        orderId: this.orderId
+      };
+      this.axios.post("/api/v1/oms/getOrderResult", map).then(res => {
+        console.log(res);
+        if (res.status == 200) {
+          this.stepList = res.data;
+        } else {
+          this.$message.error("展示失败!");
         }
-        // 切换当前详情表
-        this.$refs.excelDom.toggleRowExpansion(row);
-        // 打开前关闭上一个详情表
-        if (this.oldRow1 != "") {
-            if (this.oldRow1 != row) {
-            if (this.oldRowCount1 % 2 === 1) {
-                this.$refs.excelDom.toggleRowExpansion(this.oldRow1);
-            } else {
-                this.oldRowCount1 = 1;
-            }
-            } else {
-            this.oldRow1 = null;
-            return;
-            }
-        }
-        // 重置上一个点击对象
-        this.oldRow1 = row;
-        // 根据销售订单物资中间表id查询物资信息
-        this.axios
-            .post("/api/v1/oms/getOrderResult?orderId=",map)
-            .then((res) => {
-            console.log("res",res)
-            this.tableData1 = res.data;
-            });
-        },
-        getStepsList(row){
-            console.log(row.orderId)
-            this.orderId = row.orderId
-            this.drawer = true
-            let map = {
-                orderId : this.orderId
-            }
-            this.axios.post("/api/v1/oms/getOrderResult",map)
-                .then((res) => {
-                    console.log(res)
-                if (res.status == 200) {
-                    this.stepList = res.data
-                } else {
-                    this.$message.error("展示失败!");
-                }
-            });
-            console.log(this.stepList)
-        },
-        getRequirementMaterial1(row) {
-        // 记录重复点击次数
-        if (this.oldRow1 === row) {
-            this.oldRowCount1 += 1;
+      });
+      console.log(this.stepList);
+    },
+    getRequirementMaterial1(row) {
+      // 记录重复点击次数
+      if (this.oldRow1 === row) {
+        this.oldRowCount1 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.excelDom.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow1 != "") {
+        if (this.oldRow1 != row) {
+          if (this.oldRowCount1 % 2 === 1) {
+            this.$refs.excelDom.toggleRowExpansion(this.oldRow1);
+          } else {
+            this.oldRowCount1 = 1;
+          }
+        } else {
+          this.oldRow1 = null;
+          return;
         }
-        // 切换当前详情表
-        this.$refs.excelDom.toggleRowExpansion(row);
-        // 打开前关闭上一个详情表
-        if (this.oldRow1 != "") {
-            if (this.oldRow1 != row) {
-            if (this.oldRowCount1 % 2 === 1) {
-                this.$refs.excelDom.toggleRowExpansion(this.oldRow1);
-            } else {
-                this.oldRowCount1 = 1;
-            }
-            } else {
-            this.oldRow1 = null;
-            return;
-            }
+      }
+      // 重置上一个点击对象
+      this.oldRow1 = row;
+      this.getMaterial(row.orderId);
+    },
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          console.log(startTime);
+          console.log(endTime);
+          if (
+            getCookie("orgCode") == "dagangadmin" ||
+            getCookie("orgCode") == "zidonghuabu" ||
+            getCookie("orgCode") == "wuliuchuyunzhongxin"
+          ) {
+            this.option.requestUrl =
+              "/api/v1/tms/getAllTimeTaskResult?apiId=458&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          } else {
+            this.option.requestUrl =
+              "/api/v1/tms/getAllTimeTaskResult?apiId=458&userId=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
         }
-        // 重置上一个点击对象
-        this.oldRow1 = row;
-        this.getMaterial(row.orderId);
-        },
-        onclick(){
-            let startTime = null;
-            let endTime = null;
-            if (this.startTime) {
-                startTime = sjTime(this.startTime);
-            }
-            if (this.endTime) {
-                endTime = sjTime(this.endTime);
-            }
-            if (startTime && endTime) {
-                if (startTime < endTime) {
-                    console.log(startTime)
-                    console.log(endTime)
-                if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode") == "zidonghuabu"||getCookie("orgCode") == "wuliuchuyunzhongxin"){
-                    this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
-                }else{
-                    this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458&orgCode="+getCookie("userId")+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
-                }
-                } else {
-                this.startTime = null;
-                this.endTime = null;
-                this.$message.warning("开始时间要比结束时间早");
-                }
-            } else {
-               
-            }
-        },
-        getMaterial(orderId){
-            console.log(orderId)
-            this.axios.post("/api/v1/oms/getPauseTimeTaskDetail/" + orderId).then((res) => {
-                console.log(res)
-                this.tableData = res.data.data
-            })
-        },
+      } else {
+      }
+    },
+    getMaterial(orderId) {
+      console.log(orderId);
+      this.axios
+        .post("/api/v1/oms/getPauseTimeTaskDetail/" + orderId)
+        .then(res => {
+          console.log(res);
+          this.tableData = res.data.data;
+        });
     }
-}
+  }
+};
 </script>
 <style lang="scss">
-    .sale{
-        .top {
-            padding: 1.25rem 1.875rem;
-            .el-input{
-            width: 20%;
-            }
-        }
-    }
-    .el-table th.el-table__cell>.cell {
-        display: inline-block;
-        -webkit-box-sizing: border-box;
-        box-sizing: border-box;
-        position: relative;
-        vertical-align: middle;
-        padding-left: 10px;
-        padding-right: 10px;
-        width: 100%;
-        text-align: center;
-    }
-    .step {
-    text-align: center;
+.sale {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input {
+      width: 20%;
     }
-</style>
+  }
+}
+.el-table th.el-table__cell > .cell {
+  display: inline-block;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  position: relative;
+  vertical-align: middle;
+  padding-left: 10px;
+  padding-right: 10px;
+  width: 100%;
+  text-align: center;
+}
+.step {
+  text-align: center;
+}
+</style>

+ 194 - 30
src/views/inward/components/inwardSettlement/detailOrder.vue

@@ -69,38 +69,24 @@
         <el-button type="primary" @click="exportData()"
           ><i class="el-icon-download"></i>Excel</el-button
         >
-        <!-- <span style="margin-left: 1rem;">合计净重:</span>
-        <el-input
-          v-model="totalNetWeight"
-          :disabled="true"
-          style="width: 120px;"
-        ></el-input>
-        <span style="margin-left: 1rem;">合计金额:</span>
-        <el-input
-          v-model="totalMoney"
-          :disabled="true"
-          style="width: 100px;"
-        ></el-input> -->
       </el-form>
     </div>
     <div class="table">
       <el-tabs v-model="activeName" tab-click="handClick">
         <!-- 未结算 -->
         <el-tab-pane label="未结算" name="first">
-          <div class="table">
-            <dilTable
-              v-bind.sync="options1"
-              ref="excelDom"
-              @func="func"
-            ></dilTable>
-          </div>
+          <dilTable
+            v-bind.sync="options1"
+            ref="excelDom"
+            @func="func"
+          ></dilTable>
         </el-tab-pane>
         <!-- 已结算 -->
         <el-tab-pane label="已结算" name="second">
-          <dilTable v-bind.sync="options2"> </dilTable>
+          <dilTable v-bind.sync="options2" @func="func2"> </dilTable>
         </el-tab-pane>
         <el-tab-pane label="未生成详单" name="third">
-          <dilTable v-bind.sync="options3"> </dilTable>
+          <dilTable v-bind.sync="options3" @func="func3"> </dilTable>
         </el-tab-pane>
       </el-tabs>
     </div>
@@ -190,8 +176,6 @@ export default {
       newAddress: null,
       //新单价Id
       priceId: null,
-      //是否打开运输单价的模态框
-      addressDrawer: false,
       //运输单价的表格
       Address: {
         requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
@@ -201,7 +185,11 @@ export default {
       //缓存当前选中的运输单价
       priceMap: {},
       formLabelWidth: "125px",
-      tableTitle: "内转计重详单"
+      tableTitle: "内转计重详单",
+      exportAllList: [],
+      noSettleDetailsColumn: [],
+      settleDetailsColumn: [],
+      noDetailsColumn: []
     };
   },
   created() {
@@ -211,18 +199,188 @@ export default {
   },
   methods: {
     func(res) {
-      console.log(res.list);
+      this.noSettleDetailsColumn = res.columnData;
       var totalWeight = 0;
       var totalAllMoney = 0;
       res.list.forEach(e => {
-        console.log(e.resultNetWeight);
         totalWeight = totalWeight + e.resultNetWeight;
         totalAllMoney = totalAllMoney + e.detailsAmount;
-        console.log(e.detailsAmount);
       });
       this.totalNetWeight = totalWeight.toFixed(2) + "t";
       this.totalMoney = totalAllMoney.toFixed(2) + "元";
     },
+    func2(res) {
+      this.settleDetailsColumn = res.columnData;
+    },
+    func3(res) {
+      this.noDetailsColumn = res.columnData;
+    },
+    exportAllExcel() {
+      let startTime = null;
+      let endTime = null;
+      let orgCode = null;
+      let materialTypeNames = null;
+      let transRangeValues = null;
+      let shipperNames = null;
+      let capacityNo = null;
+      let carrierSsoId = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      if (getCookie("orgCode") == "chengyunshang") {
+        carrierSsoId = getCookie("userId");
+      }
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        orgCode = null;
+      } else {
+        orgCode = getCookie("orgCode");
+      }
+      if (this.screen == "车牌号") {
+        capacityNo = this.input;
+      }
+      if (this.screen == "承运起止范围") {
+        transRangeValues = this.input;
+      }
+      if (this.screen == "货物名称") {
+        materialTypeNames = this.input;
+      }
+      if (this.screen == "用车单位") {
+        shipperNames = this.input;
+      }
+      if (this.screen1 == "车牌号") {
+        capacityNo = this.input1;
+      }
+      if (this.screen1 == "承运起止范围") {
+        transRangeValues = this.input1;
+      }
+      if (this.screen1 == "货物名称") {
+        materialTypeNames = this.input1;
+      }
+      if (this.screen1 == "用车单位") {
+        shipperNames = this.input1;
+      }
+      if (this.activeName == "first") {
+        this.tableTitle = "未结算计费详单";
+        this.axios
+          .post(
+            "/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() +
+              "&isPage=yes"
+          )
+          .then(res => {
+            console.log(res.data.data);
+            this.exportAllList = res.data.data;
+            this.exportAllReportToExcel(
+              this.tableTitle,
+              this.exportAllList,
+              this.noSettleDetailsColumn
+            );
+          });
+      } else if (this.activeName == "second") {
+        this.tableTitle = "已结算计费详单";
+        this.axios
+          .post(
+            "/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() +
+              "&isPage=yes" +
+              "&orgCode=" +
+              orgCode
+          )
+          .then(res => {
+            this.exportAllList = res.data.data;
+            this.exportAllReportToExcel(
+              this.tableTitle,
+              this.exportAllList,
+              this.settleDetailsColumn
+            );
+          });
+      } else if (this.activeName == "third") {
+        this.tableTitle = "未生成计费详单数据";
+        this.axios
+          .post(
+            "/api/v1/bms/getNoInwardDetails?apiId=490" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&shipperNames=" +
+              shipperNames +
+              "&materialTypeNames=" +
+              materialTypeNames +
+              "&transRangeValues=" +
+              transRangeValues +
+              "&capacityNo=" +
+              capacityNo +
+              "&i" +
+              new Date() +
+              "&orgCode=" +
+              orgCode
+          )
+          .then(res => {
+            this.exportAllList = res.data.data;
+            this.exportAllReportToExcel(
+              this.tableTitle,
+              this.exportAllList,
+              this.noDetailsColumn
+            );
+          });
+      }
+    },
+    //导出excel
+    exportAllReportToExcel(tableTitle, dataArr, columnData) {
+      var title = tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      columnData.forEach(e1 => {
+        if (tHeader.indexOf(e1.label) === -1) {
+          tHeader.push(e1.label);
+        }
+        if (filterVal.indexOf(e1.prop) === -1) {
+          filterVal.push(e1.prop);
+        }
+      });
+      //导出为excel
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        // let list = this.$refs.excelDom.dataTabel;
+        let data = dataArr.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
+    },
     //未结算数据
     options1GetRequestUrl() {
       if (getCookie("orgCode") == "chengyunshang") {
@@ -344,7 +502,9 @@ export default {
         "&capacityNo=" +
         capacityNo +
         "&i" +
-        new Date();
+        new Date() +
+        "&orgCode=" +
+        orgCode;
       this.options2.requestUrl =
         "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
         "&startTime=" +
@@ -360,7 +520,9 @@ export default {
         "&capacityNo=" +
         capacityNo +
         "&i" +
-        new Date();
+        new Date() +
+        "&orgCode=" +
+        orgCode;
       this.options3.requestUrl =
         "/api/v1/bms/getNoInwardDetails?apiId=490" +
         "&startTime=" +
@@ -376,7 +538,9 @@ export default {
         "&capacityNo=" +
         capacityNo +
         "&i" +
-        new Date();
+        new Date() +
+        "&orgCode=" +
+        orgCode;
     },
     //运输订单点击浏览的事件
     select() {

+ 110 - 23
src/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue

@@ -81,6 +81,30 @@
             <i class="el-icon-search"></i>
           </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-form-item>
+         <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>
+            </el-select>
+        </el-form-item>
       </el-form>
     </div>
     <div class="main">
@@ -95,7 +119,12 @@
         :cell-style="{ fontWeight: '700' }"
         class="table"
         :span-method="objectSpanMethod"
+        @selection-change="handleSelectionChange();handleMulSendChange()"
       >
+        <el-table-column
+          type="selection"
+          width="55">
+        </el-table-column>
         <el-table-column
           prop="index"
           width="50"
@@ -140,7 +169,6 @@
               v-model="scope.row.receiveName"
               :fetch-suggestions="querySearchConsignee"
               placeholder="请输入收货单位名称"
-              :trigger-on-focus="false"
               @select="handleSelectConsignee(scope.row, scope.$index)"
             >
               <template slot-scope="{ item }">
@@ -149,6 +177,34 @@
             </el-autocomplete>
           </template>
         </el-table-column>
+        <el-table-column
+          prop="sendStation"
+          label="车皮装车地点"
+          width="120px"
+          align="center"
+          column-key="sendStation"
+          :filters="[
+            { text: '专用线', value: '专用线' },
+            { text: '达州站', value: '达州站' }
+          ]"
+          :filter-method="filterSend"
+        >
+          <template slot-scope="scope">
+            <el-select
+              size="mini"
+              v-model="scope.row.sendStationId"
+              @change="changesendStation(scope.row)"
+            >
+              <el-option
+                v-for="item in sendStationList"
+                :key="item.sendStationId"
+                :label="item.sendStation"
+                :value="item.sendStationId"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
         <el-table-column
           prop="transInDep"
           label="调入部门"
@@ -202,28 +258,11 @@
         >
         </el-table-column>
         <el-table-column
-          prop="sendStation"
-          label="发站"
-          width="120px"
+          prop="isPoundSale"
+          label="重量"
           align="center"
-          column-key="sendStation"
-          :filters="[
-            { text: '专用线', value: '专用线' },
-            { text: '达州站', value: '达州站' }
-          ]"
-          :filter-method="filterSend"
+          width="150px"
         >
-          <template slot-scope="scope">
-            <el-select size="mini" v-model="scope.row.sendStationId">
-              <el-option
-                v-for="item in sendStationList"
-                :key="item.sendStationId"
-                :label="item.sendStation"
-                :value="item.sendStationId"
-              >
-              </el-option>
-            </el-select>
-          </template>
         </el-table-column>
         <el-table-column
           prop="operate"
@@ -297,7 +336,9 @@ export default {
       pos: null,
       sendStationList: [],
       //收货客户列表
-      consigneeList: []
+      consigneeList: [],
+      receiveName: null,
+      sendStationId: null,
     };
   },
   created() {
@@ -307,7 +348,34 @@ export default {
     this.information();
   },
   methods: {
+    handleSelectionChange(){
+      //批量绑定收货客户
+      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;
+          });
+        }
+      });
+    },
+    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);
+      });
+    },
     handleSelectConsignee(row, index, item) {
+      console.log(row);
       this.consigneeList.forEach(e => {
         if (e.consigneeCompanyName == row.receiveName) {
           row.consigneeId = e.consigneeId;
@@ -316,7 +384,7 @@ export default {
     },
     //以下是收货单位边输边查搜索
     querySearchConsignee(queryString, cb) {
-      if (queryString.length > 3) {
+      if (queryString && queryString.length > 3) {
         this.axios
           .post("/api/v1/uc/getConsigneeByLike?index=" + queryString)
           .then(res => {
@@ -333,6 +401,17 @@ 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);
+              }
+        });
       }
     },
     createFilterConsignee(queryString) {
@@ -385,6 +464,14 @@ export default {
         };
       }
     },
+    //修改发站
+    changesendStation(row) {
+      this.axios.post("/api/v1/ams/updateInwardConsignee", row).then(res => {
+        if (res.data.code == "200") {
+          this.$message.success("保存成功");
+        }
+      });
+    },
     operate(row) {
       this.axios
         .post("/api/v1/ams/updateInwardConsignee", row)

+ 88 - 22
src/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue

@@ -112,9 +112,6 @@
               :trigger-on-focus="false"
               @select="handleSelectWarehouse(scope.row, scope.$index)"
             >
-              <template slot-scope="{ item }">
-                <div class="name">{{ item.warehouseName }}</div>
-              </template>
             </el-autocomplete>
           </template>
         </el-table-column>
@@ -194,18 +191,24 @@
         >
         </el-table-column>
         <el-table-column
-          prop="strawMats"
-          label="草垫根数"
+          prop="orderNum"
+          label="运输订单号"
           align="center"
           width="150px"
         >
-          <template> </template>
         </el-table-column>
         <el-table-column
-          prop="orderNum"
-          label="运输订单号"
+          prop="wgmDelete"
+          label="入库状态"
           align="center"
           width="150px"
+          column-key="wgmDelete"
+          :filters="[
+            { text: '入库', value: '入库' },
+            { text: '出库', value: '出库' },
+            { text: '待入库', value: '待入库' }
+          ]"
+          :filter-method="filterDeleted"
         >
         </el-table-column>
         <el-table-column
@@ -234,17 +237,6 @@
             </el-input>
           </template>
         </el-table-column>
-        <el-table-column
-          prop="wagonWeight"
-          label="标重"
-          align="center"
-          width="150px"
-        >
-          <template slot-scope="scope">
-            <el-input v-model.number="scope.row.wagonWeight" placeholder="标重">
-            </el-input>
-          </template>
-        </el-table-column>
         <el-table-column
           prop="wagonBillWeight"
           label="计费吨位"
@@ -315,6 +307,14 @@ export default {
         {
           value: "收货单位",
           lable: "收货单位"
+        },
+        {
+          value: "车皮号",
+          lable: "车皮号"
+        },
+        {
+          value: "到站",
+          lable: "到站"
         }
       ],
       input: null,
@@ -327,7 +327,8 @@ export default {
         "materialWeight",
         "materialNum"
       ],
-      operateName: "编辑"
+      operateName: "编辑",
+      unloadPointList: []
     };
   },
   created() {
@@ -337,8 +338,46 @@ export default {
     this.showSummariesPosition();
   },
   methods: {
+    handleSelectWarehouse(row, index, item) {
+      console.log(item);
+      this.unloadPointList.forEach(e => {
+        if (e.warehouseName == row.unloadPoint) {
+          row.unloadPointId = e.warehouseId;
+          row.unloadPoint = e.warehouseName;
+        }
+      });
+    },
     //边输边查卸货点
-
+    querySearchWarehouse(queryString, cb) {
+      if (queryString.length >= 2) {
+        this.axios
+          .post("/api/v1/uc/selectUnloadingPoint?index=" + queryString)
+          .then(res => {
+            console.log(res.data);
+            if (res.data.length > 0) {
+              console.log(res);
+              var restaurantsConsignee = res.data;
+              this.unloadPointList = res.data;
+              var results = queryString
+                ? restaurantsConsignee.filter(
+                    this.createFilterConsignee(queryString)
+                  )
+                : restaurantsConsignee;
+              // 调用 callback 返回建议列表的数据
+              cb(results);
+            }
+          });
+      }
+    },
+    createFilterConsignee(queryString) {
+      return restaurantsConsignee => {
+        return (
+          restaurantsConsignee.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     operate(row) {
       row.personnelSsoId = getCookie("userId");
       if (
@@ -377,6 +416,19 @@ export default {
     onclick() {
       let startTime = null;
       let endTime = null;
+      let wagonNo = null;
+      let consigneeName = null;
+      let sendStation = null;
+      let toTheStation = null;
+      if (this.screen == "发站") {
+        sendStation = this.input;
+      } else if (this.screen == "到站") {
+        toTheStation = this.input;
+      } else if (this.screen == "收货单位") {
+        consigneeName = this.input;
+      } else if (this.screen == "车皮号") {
+        wagonNo = this.input;
+      }
       if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime);
         endTime = sjTime(this.endTime);
@@ -386,7 +438,15 @@ export default {
           "/api/v1/oms/getWagonShippingDetails?startTime=" +
             startTime +
             "&endTime=" +
-            endTime
+            endTime +
+            "&wagonNo=" +
+            wagonNo +
+            "&consigneeName=" +
+            consigneeName +
+            "&toTheStation=" +
+            toTheStation +
+            "&sendStation=" +
+            sendStation
         )
         .then(res => {
           this.tableData = res.data.data;
@@ -408,6 +468,8 @@ export default {
     },
     //刷新
     refresh() {
+      this.screen = null;
+      this.input = null;
       this.getRequestUrl();
     },
     //筛选发站
@@ -418,6 +480,10 @@ export default {
     filterType(value, row, column) {
       return row.orderType === value;
     },
+    //筛选是否入库数据
+    filterDeleted(value, row, column) {
+      return row.wgmDelete === value;
+    },
     //将合计行置顶
     showSummariesPosition() {
       const table = document.querySelector(".table");

+ 55 - 99
src/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckPreview.vue

@@ -49,20 +49,13 @@
             <i class="el-icon-search"></i>
           </el-button>
         </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="exportAllReportToExcel"
-            ><i class="el-icon-download"></i>Excel</el-button
-          >
-        </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="refresh">
             <i class="el-icon-refresh"></i>
           </el-button>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" @click="dispatchSome(), showDialog()"
-            >多拼派车</el-button
-          >
+          <el-button type="primary" @click="showDialog">多拼派车</el-button>
         </el-form-item>
       </el-form>
     </div>
@@ -79,11 +72,11 @@
         :row-style="{ height: '30px' }"
         :cell-style="{ fontWeight: '700' }"
       >
-        <el-table-column type="selection" width="55" :selectable="selectInit">
+        <el-table-column type="selection" width="40" :selectable="selectInit">
         </el-table-column>
         <el-table-column
           prop="index"
-          width="50"
+          width="40"
           label="序号"
           align="center"
           :resizable="false"
@@ -130,7 +123,7 @@
           column-key="capacityNo"
           label="车牌号"
           align="center"
-          width="250px"
+          width="200px"
         >
           <template slot-scope="scope">
             <el-autocomplete
@@ -149,11 +142,18 @@
             >
           </template>
         </el-table-column>
+        <el-table-column
+          prop="toTheStation"
+          label="到站"
+          align="center"
+          width="100px"
+        >
+        </el-table-column>
         <el-table-column
           prop="materialName"
           label="物资名称"
           align="center"
-          width="150px"
+          width="100px"
         >
         </el-table-column>
         <el-table-column prop="materialSpe" label="物资规格" align="center">
@@ -162,7 +162,7 @@
           prop="materialNum"
           label="物资件数"
           align="center"
-          width="150px"
+          width="100px"
         >
           <!-- <template slot-scope="scope">
             <button
@@ -200,14 +200,6 @@
           column-key="transInDep"
         >
         </el-table-column>
-        <el-table-column
-          prop="transOutDep"
-          label="调出部门"
-          width="120px"
-          align="center"
-          column-key="transOutDep"
-        >
-        </el-table-column>
         <el-table-column
           prop="transInWarehouse"
           label="调入仓库"
@@ -216,8 +208,7 @@
           column-key="transInWarehouse"
         >
         </el-table-column>
-        <el-table-column prop="netWeight" label="净重"> </el-table-column>
-        <el-table-column prop="entryGateTime" label="进厂时间" width="130px">
+        <el-table-column prop="netWeight" label="净重" align="center"></el-table-column>
         </el-table-column>
         <el-table-column
           prop="carrierName"
@@ -244,12 +235,20 @@
           </template>
         </el-table-column>
         <el-table-column
-          prop="orderNo"
+          prop="orderNumber"
           label="运输订单号"
           width="180px"
           align="center"
         >
         </el-table-column>
+        <el-table-column
+          prop="transOutDep"
+          label="调出部门"
+          width="120px"
+          align="center"
+          column-key="transOutDep"
+        >
+        </el-table-column>
         <el-table-column
           prop="capacityTel"
           label="司机电话"
@@ -278,58 +277,6 @@
           align="center"
         >
         </el-table-column>
-        <!-- <el-table-column
-          label="操作"
-          fixed="right"
-          width="120px"
-          align="center"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              size="small"
-              @click="closeEasEntryId(scope.row)"
-              v-if="scope.row.deletedStatus == null"
-              >关闭分录</el-button
-            >
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="操作"
-          fixed="right"
-          width="120px"
-          align="center"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              size="small"
-              @click="deleteEasEntryId(scope.row)"
-              v-if="
-                scope.row.carStatus == 4 ||
-                scope.row.carStatus == 5 ||
-                scope.row.carStatus == null
-              "
-              >关闭车辆</el-button
-            >
-          </template>
-        </el-table-column> -->
-        <!-- <el-table-column
-          label="操作"
-          fixed="right"
-          width="120px"
-          align="center"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              size="small"
-              @click="adverseCloseSaleMaterial(scope.row)"
-              v-if="scope.row.deletedStatus != null"
-              >反关闭分录</el-button
-            >
-          </template>
-        </el-table-column> -->
       </el-table>
     </div>
     <!-- 多拼弹出层-->
@@ -445,15 +392,20 @@ export default {
     this.getSendStations();
   },
   methods: {
-    dispatchSome() {
-      console.log(this.tableData);
-      //首先过滤掉已派车的数据
-      let arr = this.tableData.filter(item => {
-        return item.capacityIds == 0;
-      });
-      console.log(arr);
-      this.s
-    },
+    // dispatchSome() {
+    //   console.log(this.tableData);
+    //   //首先过滤掉已派车的数据
+    //   let arr = this.tableData.filter(item => {
+    //     return item.capacityIds == 0;
+    //   });
+    //   if (arr.length == 0) {
+    //     ths.$message.error("没有符合条件的分录可供拼装");
+    //     return;
+    //   }
+    //   console.log(arr);
+    //   this.selection = arr;
+    //   this.updateMulCapacity();
+    // },
     //禁用已派车
     selectInit(row) {
       console.log(row);
@@ -646,16 +598,12 @@ export default {
       });
     },
     //多拼弹出层绑定车牌号
-    handleMulSelect(row, index) {
-      this.capacityList.forEach(item => {
-        if (item.capacityNumber === row.capacityNo) {
-          this.selection.forEach(selected => {
-            selected.newsCapacityId = item.capacityId;
-            selected.capacityNo = row.capacityNo;
-          });
-          this.newsCapacityId = item.capacityId;
-          this.capacityNo = row.capacityNo;
-          console.log("newCapacityId:", this.newsCapacityId);
+    handleMulSelect(item) {
+      console.log(item);
+      this.capacityList.forEach(e => {
+        if (item.capacityNumber === e.capacityNumber) {
+          this.capacityNumber = e.capacityNumber;
+          this.capacityId = e.capacityId;
         }
       });
     },
@@ -775,11 +723,15 @@ export default {
 
     //多拼派车
     updateMulCapacity() {
+      let i = 0;
+      if (this.capacityId == null) {
+        this.$message.error("请选择车牌号后再派发");
+        return;
+      }
       this.selection.forEach(item => {
         item.isIwardSteel = 4;
         item.saleOrderMaterialId = item.saleOrderId;
-        item.capacityId = this.capacityId;
-        item.capacityNumber = this.capacityNo;
+        item.capacityNumber = this.capacityNumber;
       });
       if (this.selection[0].sendStation == "达州站") {
         this.selection.forEach(item => {
@@ -820,16 +772,22 @@ export default {
             this.$message.success("派车成功!");
             this.getSteelReport();
             loading.close();
+            this.capacityId = null;
+            this.dialogTableVisible = false;
           } else {
             this.$message.error("派车失败,请联系管理员");
             this.getSteelReport();
             loading.close();
+            this.capacityId = null;
+            this.dialogTableVisible = false;
           }
         })
         .catch(() => {
           this.$message.error("派车失败,请联系管理员");
           this.getSteelReport();
           loading.close();
+          this.capacityId = null;
+          this.dialogTableVisible = false;
         });
     },
 
@@ -1147,8 +1105,6 @@ export default {
     },
     //获取钢材订单报表
     getSteelReport() {
-      let carrierSsoId = null;
-      let saler = null;
       this.axios
         .post(
           "/api/v1/tms/getInwardSaleSteelOrder?startTime=" +

+ 121 - 54
src/views/inward/components/truckAppoint/addRequirement2.vue

@@ -39,7 +39,7 @@
         </el-select>
       </div>
       <div class="DueTime">
-        <el-form :inline="true" style="margin-top: 0.5rem;">
+        <el-form :inline="true" style="margin-top: 0.5rem">
           <el-form-item>
             <el-switch
               v-model="isOpenDueTime"
@@ -52,7 +52,7 @@
             <el-form-item v-if="isOpenDueTime == true">
               <label
                 class="el-form-item__label"
-                style="width: auto; margin-left:10px;"
+                style="width: auto; margin-left: 10px"
                 >截止日期</label
               >
               <el-date-picker
@@ -88,11 +88,11 @@
           size="40%"
           :show-close="false"
         >
-          <div style="margin-left:-300px">
+          <div style="margin-left: -300px">
             <el-input
               placeholder="请输入内容"
               v-model="inputCapacityType"
-              style="margin-left:20px;width: 250px"
+              style="margin-left: 20px; width: 250px"
               clearable
             >
             </el-input
@@ -114,6 +114,8 @@
           </div>
         </el-drawer>
       </div>
+
+      <!-- 选择物资 -->
       <div class="materialDrawer">
         <el-form :inline="true" class="demo-form-inline" label-width="80px">
           <el-form-item label="选择物资"> </el-form-item>
@@ -173,7 +175,7 @@
                   <!-- 装货点 -->
                   <template
                     v-if="item.prop == 'requirementPlatformName'"
-                    style="width:400px"
+                    style="width: 400px"
                   >
                     <el-input
                       class="textinput"
@@ -246,6 +248,7 @@
           direction="rtl"
           size="40%"
           :show-close="false"
+          :before-close="handleClose2"
         >
           <el-input placeholder="请输入内容" v-model="inputMaterial" clearable>
           </el-input
@@ -253,7 +256,7 @@
             <i class="el-icon-search"></i>查询
           </el-button>
           <!-- <el-button @click="open">取消</el-button> -->
-          <el-button type="primary" @click="makeSure1">确定</el-button>
+          <!-- <el-button type="primary" @click="makeSure1">确定</el-button> -->
           <div class="tablecls">
             <!-- 查询所有的物资 -->
             <dilTable
@@ -331,44 +334,44 @@ export default {
       options6: [
         {
           value: "焦化",
-          label: "焦化"
+          label: "焦化",
         },
         {
           value: "污粉",
-          label: "污粉"
+          label: "污粉",
         },
         {
           value: "喷煤",
-          label: "喷煤"
+          label: "喷煤",
         },
         {
           value: "溶剂",
-          label: "溶剂"
+          label: "溶剂",
         },
         {
           value: "配料",
-          label: "配料"
+          label: "配料",
         },
         {
           value: "二次",
-          label: "二次"
+          label: "二次",
         },
         {
           value: "原料",
-          label: "原料"
+          label: "原料",
         },
         {
           value: "烧结矿",
-          label: "烧结矿"
+          label: "烧结矿",
         },
         {
           value: "打堆、装车",
-          label: "打堆、装车"
+          label: "打堆、装车",
         },
         {
           value: "回收废旧物资",
-          label: "回收废旧物资"
-        }
+          label: "回收废旧物资",
+        },
       ],
       installremark: "",
       options: [],
@@ -386,25 +389,25 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: "140"
+          width: "140",
         },
         {
           prop: "requirementPlatformName",
           label: "装货点",
           slot: true,
-          width: "140"
+          width: "140",
         },
         {
           prop: "truckPoint1",
           label: "卸货点",
           slot: true,
-          width: "140"
+          width: "140",
         },
         {
           prop: "orderMaterialWeight",
           label: "重量",
-          slot: true
-        }
+          slot: true,
+        },
       ],
       row: {},
       //物资表格数据
@@ -436,25 +439,25 @@ export default {
       materialTable: {
         requestUrl: "",
         selectionType: "select",
-        mapList1: []
+        mapList1: [],
       },
       second1: {
         requestUrl: "",
         selectionType: "radio",
-        mapList2: []
+        mapList2: [],
       },
       options3: {
         requestUrl: "",
         selectionType: "radio",
-        mapList3: []
+        mapList3: [],
       },
-      form: {}
+      form: {},
     };
   },
   computed: {
     requirementType() {
       return this.form.requirementType;
-    }
+    },
   },
   watch: {
     requirementType() {
@@ -481,14 +484,14 @@ export default {
         this.tableTop.push({
           prop: "orderMaterialNumber",
           label: "件数",
-          slot: true
+          slot: true,
         });
       } else {
         this.tableTop.splice(this.tableTop.length - 1, 1);
         this.tableTop.push({
           prop: "orderMaterialWeight",
           label: "重量",
-          slot: true
+          slot: true,
         });
       }
     },
@@ -498,7 +501,7 @@ export default {
       } else {
         this.aaadrawer = true;
       }
-    }
+    },
   },
   methods: {
     //用车单位弹出层
@@ -514,7 +517,7 @@ export default {
     querySearchCarrier(queryString, cb) {
       this.axios
         .post("/api/v1/uc/getRequireUnitName?index=" + queryString)
-        .then(res => {
+        .then((res) => {
           if (res.data.code == "200") {
             var restaurantsCarrier = res.data.data;
             // console.log(restaurantsCarrier,"restaurantsCarrier");
@@ -527,7 +530,7 @@ export default {
         });
     },
     createFilterCarrier(queryString) {
-      return restaurantsCarrier => {
+      return (restaurantsCarrier) => {
         return (
           restaurantsCarrier.shipperName
             .toLowerCase()
@@ -573,6 +576,58 @@ export default {
     },
     handleClose(done) {
       done();
+      //执行选择
+    },
+    handleClose2(done) {
+      console.log("add2");
+
+      console.log(this.tableData.length);
+      console.log("ad");
+      if (this.tableData.length > 0 && this.selectionList1.length > 0) {
+        this.$message.warning("一个需求只允许填写一个物资");
+        return;
+      }
+      if (this.selectionList1.length > 1) {
+        this.$message.warning("一个需求只允许填写一个物资");
+        return;
+      }
+      this.selectionList1.forEach((e) => {
+        // console.log(e.materialModel,e.materialSpecification)
+        if (e.materialSpecification == null) {
+          e.materialSpecification = "";
+        }
+        if (e.materialModel == null) {
+          e.materialModel = "";
+        }
+        var addmap = {
+          materialName:
+            e.materialName + e.materialSpecification + e.materialModel,
+          materialId: e.materialId,
+        };
+        this.tableData.push(addmap);
+      });
+      this.selectionList1 = [];
+      this.table = false;
+      done();
+    },
+    refreshTable() {
+      var arr = this.tableData;
+      this.tableData = [];
+      arr.forEach((e) => {
+        var addmap = {
+          materialName: e.materialName,
+          materialId: e.materialId,
+          requirementPlatformName: e.requirementPlatformName,
+          truckPoint1: e.truckPoint1,
+          requirementPlatformId: e.requirementPlatformId,
+          requirementUnloadUnitId: e.requirementUnloadUnitId,
+          orderMaterialNumber: e.orderMaterialNumber,
+          orderMaterialWeight: e.orderMaterialWeight,
+          loadPointName: e.loadPointName,
+          unloadPointName: e.unloadPointName,
+        };
+        this.tableData.push(addmap);
+      });
     },
     onclickMaterial() {
       if (this.inputMaterial == null) {
@@ -614,6 +669,7 @@ export default {
     // 返回主界面
     makeSure1() {
       console.log(this.tableData.length);
+      console.log("ad");
       if (this.tableData.length > 0 && this.selectionList1.length > 0) {
         this.$message.warning("一个需求只允许填写一个物资");
         return;
@@ -622,7 +678,7 @@ export default {
         this.$message.warning("一个需求只允许填写一个物资");
         return;
       }
-      this.selectionList1.forEach(e => {
+      this.selectionList1.forEach((e) => {
         // console.log(e.materialModel,e.materialSpecification)
         if (e.materialSpecification == null) {
           e.materialSpecification = "";
@@ -633,7 +689,7 @@ export default {
         var addmap = {
           materialName:
             e.materialName + e.materialSpecification + e.materialModel,
-          materialId: e.materialId
+          materialId: e.materialId,
         };
         this.tableData.push(addmap);
       });
@@ -643,7 +699,7 @@ export default {
     refreshTable() {
       var arr = this.tableData;
       this.tableData = [];
-      arr.forEach(e => {
+      arr.forEach((e) => {
         var addmap = {
           materialName: e.materialName,
           materialId: e.materialId,
@@ -654,7 +710,7 @@ export default {
           orderMaterialNumber: e.orderMaterialNumber,
           orderMaterialWeight: e.orderMaterialWeight,
           loadPointName: e.loadPointName,
-          unloadPointName: e.unloadPointName
+          unloadPointName: e.unloadPointName,
         };
         this.tableData.push(addmap);
       });
@@ -739,11 +795,11 @@ export default {
     },
     // 新增
     makeSure() {
-      console.log(this.form.isMineral);
-      // 判断当前装机是否选择了装机必填
-      console.log("进来了");
-      console.log(this.whether);
-      console.log(this.installremark);
+      // console.log(this.form.isMineral);
+      // // 判断当前装机是否选择了装机必填
+      // console.log("进来了");
+      // console.log(this.whether);
+      // console.log(this.installremark);
       if (this.whether == 2 && this.installremark == "") {
         console.log("确实进来了");
         this.$message.warning("请选择装机必填");
@@ -789,7 +845,7 @@ export default {
         return;
       }
       var i = 0;
-      this.tableData.forEach(e => {
+      this.tableData.forEach((e) => {
         if (e.requirementPlatformId && e.requirementUnloadUnitId) {
           i++;
         }
@@ -844,15 +900,15 @@ export default {
         capacityTypeId: this.capacityTypeId,
         mapList: this.tableData,
         orgCode: getCookie("orgCode"),
-        remark: this.form.Tel + this.capacityTypeName + this.form.typeRemarks
+        remark: this.form.Tel + this.capacityTypeName + this.form.typeRemarks,
       };
       this.axios
         .post("/api/v1/ams/addTruckRequirement", requiremnet)
-        .then(res => {
+        .then((res) => {
           if (res.data.code == 200) {
             this.$message({
               type: "success",
-              message: "新增成功!"
+              message: "新增成功!",
             });
             this.$router.go(-1);
           } else {
@@ -868,8 +924,8 @@ export default {
     // 返回
     cancel() {
       this.$router.go(-1);
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>
@@ -966,13 +1022,24 @@ export default {
       display: flex;
       justify-content: center;
       align-items: center;
-      margin-right: 500px;
-      .el-form-item {
-        .el-form-item__label {
-          width: 170px !important;
-        }
-        .el-input {
-          width: 210px !important;
+      margin-right: 600px;
+      // margin-left: -20px;
+      background-color: yellow;
+      .preview-group {
+        background-color: blue;
+        ::v-deep .el-form-item {
+          background-color: blue;
+          .el-form-item__label {
+            width: 170px !important;
+            background-color: blue;
+          }
+          ::v-deep .el-form-item__content {
+            background-color: red;
+            width: 300px;
+          }
+          .el-input {
+            width: 210px !important;
+          }
         }
       }
     }

+ 45 - 0
src/views/inward/components/truckOrder/purInwardTruckOrder.vue

@@ -134,6 +134,8 @@ export default {
       selectionList: [],
       //区别点击的是添加运力,还是修改
       index: null
+      // wssUrl: "wss:wl.dasteel.cn:32322/websocket/socketServer",
+      // actiones: { username: "湘M99999" } //传入后台的数据
     };
   },
   created() {
@@ -180,8 +182,51 @@ export default {
       this.dispatched.requestUrl =
         "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&planStatus=3";
     }
+    // this.initWebSocket();
   },
   methods: {
+    //建立websocket连接
+    initWebSocket() {
+      //试图调用websocket
+      //初始化weosocket
+      const wssUrl = this.wssUrl;
+      this.websock = new WebSocket(wssUrl);
+      this.websock.onmessage = this.websocketonmessage;
+      this.websock.onopen = this.websocketonopen;
+      this.websock.onerror = this.websocketonerror;
+      // this.websock.onclose = this.websocketclose;
+    },
+    //发送数据
+    websocketonopen() {
+      this.websocketsend();
+    },
+    //接收数据
+    websocketonmessage(e) {
+      console.log("收到信息");
+      let data = e.data;
+      console.log(data);
+      let websocketKey = data.messageContent;
+      let userName = "湘M99999";
+      let message =
+        "{'messageContent': '" +
+        websocketKey +
+        ":" +
+        userName +
+        "','messageType':1,'receivePerson': 'app','sendPerson': 'self'}";
+      this.websocketsend(message);
+    },
+    //连接建立失败重连
+    websocketonerror() {
+      this.initWebSocket();
+    },
+    //发送数据
+    websocketsend(message) {
+      this.websock.send({ message, async success() {} });
+    },
+    //关闭连接
+    websocketclose(e) {
+      console.log("断开连接", e);
+    },
     continueDispatch(scope) {
       this.$router.push("/addPurInwardOrderCon/" + scope.row.planId);
     },

+ 2 - 4
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -119,7 +119,6 @@
             <el-table-column
               type="selection"
               width="55"
-              :selectable="selectInit"
               reserve-selection
             ></el-table-column>
             <el-table-column type="index" width="50"> </el-table-column>
@@ -159,14 +158,13 @@
 
             <el-table-column prop="gatepostName" label="进厂门岗">
             </el-table-column>
-
-            <!-- <el-table-column fixed="right" label="操作" width="100">
+            <el-table-column fixed="right" label="操作" width="100">
               <template slot-scope="scope">
                 <el-button type="text" size="mini" @click="updateBill(scope)">
                   修改提货单
                 </el-button>
               </template>
-            </el-table-column> -->
+            </el-table-column>
           </el-table>
         </el-tab-pane>
         <el-tab-pane label="多拼车辆排队链表" name="second">

+ 2 - 0
src/views/queue/components/qmsEnFacotory/updateBill.vue

@@ -148,6 +148,7 @@ export default {
           this.consigneeCompanyName = res.data.data.consigneeCompanyName;
           this.receiveAddressName = res.data.data.receiveAddressName;
           this.shipperName = res.data.data.shipperName;
+          this.saleOrderId = res.data.data.saleOrderId;
         });
     },
     changeMaterial() {
@@ -248,6 +249,7 @@ export default {
       }
       let updateNumMap = {
         orderId: this.orderId,
+        saleOrderId: this.saleOrderId,
         mapList: this.materialList
       };
       this.axios

+ 7 - 5
src/views/sale/components/offSiteTransportation/checkGPS.vue

@@ -508,11 +508,12 @@ export default {
         .then(res => {
           if (res.data.data == "-1") {
             this.$message.error("运输订单未关闭,自提车辆无权查看!");
-          } else if (res.data.data.startAndEndRoutes != "") {
+          } else if (res.data.data.startAndEndRoutes) {
+            console.log("res.data.data:",res.data.data);
             that.listPath = res.data.data.startAndEndRoutes;
             that.initMap([105.602725, 37.076636]);
           } else {
-            this.$message.error("车辆没有开启GPS");
+            this.$message.error("车辆没有开启GPS或尚未注册!");
           }
         });
     },
@@ -534,7 +535,7 @@ export default {
         that.initThreeMarker();
         //初始化当前点标记
         //that.initCustomMarkes(that.carNumber+"("+that.listPath[0].miled+")",that.listPath[0].currentPointName,that.listPath[0].currentPoint.lon,that.listPath[0].currentPoint.lat)
-        //that.initEndline();
+        that.initEndline();
       });
     },
     //结束点
@@ -569,11 +570,11 @@ export default {
           element.endPoint != "" &&
           element.endPoint != null
         ) {
-          // that.initMarkes(20,35,require('@/assets/img/end.png'),element.endPoint.lon,element.endPoint.lat,'终点');
+          that.initMarkes(20,35,require('@/assets/img/end.png'),element.endPoint.lon,element.endPoint.lat,'终点');
           //终点名称
           that.getEndPointName([element.endPoint.lon, element.endPoint.lat]);
         } else {
-          // that.initMarkes(20,35,require('@/assets/img/end.png'),element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat,'终点');
+          that.initMarkes(20,35,require('@/assets/img/end.png'),element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat,'终点');
           //终点名称
           that.getEndPointName([
             element.runRoute[element.runRoute.length - 1].lon,
@@ -604,6 +605,7 @@ export default {
     //初始化预计轨迹
     initPolyline(path, color) {
       let that = this;
+      console.log("path:",path);
       //预计轨迹
       var endLine = new AMap.Polyline({
         map: that.map, //地图组件

+ 322 - 241
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailOrder.vue

@@ -3,98 +3,152 @@
   <div class="steel_inbound">
     <div class="sache">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
     </div>
     <div class="table">
       <el-tabs v-model="activeName">
         <!-- 未结算 -->
         <el-tab-pane label="未结算" name="first">
-        <dilTable v-bind.sync="options1">
+          <dilTable v-bind.sync="options1">
             <el-table-column fixed="right" label="操作" width="145">
-                <template slot-scope="scope">
-                  <el-button v-if="ssoId==null" type="text" size="small" @click="priceValueUpdate(scope.row)">修改详单地址</el-button>
-                  <!-- <el-button type="text" size="mini" @click="getclick(scope)">查看</el-button> -->
-                  <el-button type="text" size="mini" @click="addDamage(scope.row)">增加途损</el-button>
-                </template>
+              <template slot-scope="scope">
+                <el-button
+                  v-if="ssoId == null"
+                  type="text"
+                  size="small"
+                  @click="priceValueUpdate(scope.row)"
+                  >修改详单地址</el-button
+                >
+                <!-- <el-button type="text" size="mini" @click="getclick(scope)">查看</el-button> -->
+                <el-button type="text" size="mini" @click="addDamage(scope.row)"
+                  >增加途损</el-button
+                >
+              </template>
             </el-table-column>
-        </dilTable>
+          </dilTable>
         </el-tab-pane>
         <!-- 已结算 -->
         <el-tab-pane label="已结算" name="second">
-        <dilTable v-bind.sync="options2">
+          <dilTable v-bind.sync="options2">
             <!-- <el-table-column fixed="right" label="操作" width="40">
                 <template slot-scope="scope">
                   <el-button type="text" size="mini" @click="getclick(scope)">查看</el-button>
                 </template>
             </el-table-column> -->
-        </dilTable>
+          </dilTable>
         </el-tab-pane>
       </el-tabs>
     </div>
     <!-- 修改详单单价弹出框 -->
-    <el-dialog title="修改详单地址" :visible.sync="dialogFormVisible" append-to-body>
+    <el-dialog
+      title="修改详单地址"
+      :visible.sync="dialogFormVisible"
+      append-to-body
+    >
       <!-- 内层单价选择弹出框 -->
       <el-dialog
-      width="40%"
-      title="地址筛选"
-      :visible.sync="addressDrawer"
-      append-to-body>
-
-      <el-input v-model="addresText" placeholder="请输入内容" style="margin-top: 10px; margin-left: 20px; width: 250px"></el-input>
-        <el-button type="primary" @click="selectAddresClick" :loading="selectLineLoading"><i class="el-icon-search"></i>查询</el-button>
-         <!-- 已选中 省市(区)县 -->
-         <el-form :inline="true" style="margin-top: 0.5rem;">
+        width="40%"
+        title="地址筛选"
+        :visible.sync="addressDrawer"
+        append-to-body
+      >
+        <el-input
+          v-model="addresText"
+          placeholder="请输入内容"
+          style="margin-top: 10px; margin-left: 20px; width: 250px"
+        ></el-input>
+        <el-button
+          type="primary"
+          @click="selectAddresClick"
+          :loading="selectLineLoading"
+          ><i class="el-icon-search"></i>查询</el-button
+        >
+        <!-- 已选中 省市(区)县 -->
+        <el-form :inline="true" style="margin-top: 0.5rem;">
           <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">已选中省市县(区):</label>
-          </el-form-item>
-          <el-form-item>
-              <el-input class="el-form-item__content" v-model="address" placeholder="请输入内容" :disabled="true"></el-input>
-          </el-form-item>
-         </el-form>
-         <!-- 具体收货地址 -->
-         <div v-if="address != null">
-           <el-form :inline="true" style="margin-top: 0.5rem;" >
-
-          <el-form-item label="具体收货地址:">
-            <el-autocomplete
-              class="inline-input"
-              v-model="place"
-              :fetch-suggestions="querySearch1"
-              placeholder="请输入具体收货地址"
-              :trigger-on-focus="false"
-              @select="handleSelect1"
+            <label class="el-form-item__label" style="width: auto;"
+              >已选中省市县(区):</label
             >
+<<<<<<< HEAD
             </el-autocomplete>
           </el-form-item>
+=======
+          </el-form-item>
+          <el-form-item>
+            <el-input
+              class="el-form-item__content"
+              v-model="address"
+              placeholder="请输入内容"
+              :disabled="true"
+            ></el-input>
+          </el-form-item>
+        </el-form>
+        <!-- 具体收货地址 -->
+        <div v-if="address != null">
+          <el-form :inline="true" style="margin-top: 0.5rem;">
+            <el-form-item label="具体收货地址:">
+              <el-autocomplete
+                class="inline-input"
+                v-model="place"
+                :fetch-suggestions="querySearch1"
+                placeholder="请输入具体收货地址"
+                :trigger-on-focus="false"
+                @select="handleSelect1"
+              >
+              </el-autocomplete>
+            </el-form-item>
+>>>>>>> 176afc48db5501735cf0b7b76294927091bc7890
 
-          <el-button type="primary" @click="addAddressClick">确定</el-button>
-         </el-form>
-         </div>
+            <el-button type="primary" @click="addAddressClick">确定</el-button>
+          </el-form>
+        </div>
 
-      <div class="tablecls">
-        <!-- 查询所有的运输单价 -->
-        <dilTable
-          v-bind.sync="Address"
-          @radio-change="currentRadioChange2"
-        ></dilTable>
-      </div>
+        <div class="tablecls">
+          <!-- 查询所有的运输单价 -->
+          <dilTable
+            v-bind.sync="Address"
+            @radio-change="currentRadioChange2"
+          ></dilTable>
+        </div>
       </el-dialog>
       <!-- 内层单价选择弹出框 -->
 
       <el-form>
         <el-form-item label="原详单地址" :label-width="formLabelWidth">
-          <el-input style="width:250px" v-model="originalAddress" disabled></el-input>
+          <el-input
+            style="width:250px"
+            v-model="originalAddress"
+            disabled
+          ></el-input>
           <label>原单价</label>
+<<<<<<< HEAD
           <el-input style="width:100px" v-model="originalPriceValue" disabled></el-input>
 
+=======
+          <el-input
+            style="width:100px"
+            v-model="originalPriceValue"
+            disabled
+          ></el-input>
+>>>>>>> 176afc48db5501735cf0b7b76294927091bc7890
         </el-form-item>
         <el-form-item label="新详单地址" :label-width="formLabelWidth">
-          <el-input style="width:250px" v-model="newAddress" disabled></el-input>
+          <el-input
+            style="width:250px"
+            v-model="newAddress"
+            disabled
+          ></el-input>
           <label>现单价</label>
-          <el-input style="width:100px" v-model="newPriceValue" disabled></el-input>
-          <el-button type="primary" placeholder="()" @click="select">浏览</el-button>
+          <el-input
+            style="width:100px"
+            v-model="newPriceValue"
+            disabled
+          ></el-input>
+          <el-button type="primary" placeholder="()" @click="select"
+            >浏览</el-button
+          >
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -103,129 +157,144 @@
       </div>
     </el-dialog>
     <!-- 增加途损 -->
-      <el-dialog title="增加途损" width="30%" :visible.sync="dialogDamage">
-    <el-form>
-      <el-form-item label="达钢的干基" :label-width="formLabelWidth">
-        <el-input v-model="DaDryBasis"></el-input>
-      </el-form-item>
-      <el-form-item label="九江收货的干基" :label-width="formLabelWidth">
-        <el-input v-model="JiuDryBasis"></el-input>
-      </el-form-item>
-      <el-form-item label="单价" :label-width="formLabelWidth">
-        <el-input v-model="Fee"></el-input>
-      </el-form-item>
-    </el-form>
-    <div slot="footer" class="dialog-footer">
-      <el-button @click="dialogDamage = false">取 消</el-button>
-      <el-button type="primary" @click="makeSureAdd">确 定</el-button>
-    </div>
+    <el-dialog title="增加途损" width="30%" :visible.sync="dialogDamage">
+      <el-form>
+        <el-form-item label="达钢的干基" :label-width="formLabelWidth">
+          <el-input v-model="DaDryBasis"></el-input>
+        </el-form-item>
+        <el-form-item label="九江收货的干基" :label-width="formLabelWidth">
+          <el-input v-model="JiuDryBasis"></el-input>
+        </el-form-item>
+        <el-form-item label="单价" :label-width="formLabelWidth">
+          <el-input v-model="Fee"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogDamage = false">取 消</el-button>
+        <el-button type="primary" @click="makeSureAdd">确 定</el-button>
+      </div>
     </el-dialog>
-
   </div>
 </template>
 
 <script>
 import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
+  data() {
+    return {
       //已选中 省市县(区)
-      address:null,
+      address: null,
       //具体收货地址
-      place:null,
+      place: null,
       //收货地址id
-      addressId:null,
+      addressId: null,
       //省市县(区)查询值
-      addresText:null,
+      addresText: null,
       //达钢的干基
-      DaDryBasis:null,
+      DaDryBasis: null,
       //九江收货的干基
-      JiuDryBasis:null,
+      JiuDryBasis: null,
       //单价
-      Fee:null,
+      Fee: null,
       //途损费
-      damageFee:null,
+      damageFee: null,
       //加载
-      selectLineLoading:false,
-      input:"",
-      activeName:"first",
-      ssoId:null,
+      selectLineLoading: false,
+      input: "",
+      activeName: "first",
+      ssoId: null,
       //详单Id
-      detailsId:null,
-      options1:{
+      detailsId: null,
+      options1: {
         // first请求数据的地址
-        requestUrl: "",
+        requestUrl: ""
       },
-      options2:{
+      options2: {
         // second请求数据的地址
-        requestUrl: "",
+        requestUrl: ""
       },
       //是否打开修改详单地址弹出框
-      dialogFormVisible:false,
+      dialogFormVisible: false,
       //是否打开增加途损弹出框
-      dialogDamage:false,
+      dialogDamage: false,
       //原详单单价
-      originalPriceValue:null,
+      originalPriceValue: null,
       //新详单单价
-      newPriceValue:null,
+      newPriceValue: null,
       //原详单地址
-      originalAddress:null,
+      originalAddress: null,
       //新详单地址
-      newAddress:null,
+      newAddress: null,
       //新单价Id
-      priceId:null,
+      priceId: null,
       //是否打开运输单价的模态框
-      addressDrawer:false,
+      addressDrawer: false,
       //运输单价的表格
       Address: {
         requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
-        selectionType: "radio",
+        selectionType: "radio"
       },
       // addressText:null,
       //缓存当前选中的运输单价
-      priceMap:{},
-      formLabelWidth: '125px'
-    }
+      priceMap: {},
+      formLabelWidth: "125px"
+    };
   },
-  created(){
-     this.options1GetRequestUrl();
-     this.options2GetRequestUrl();
+  created() {
+    this.options1GetRequestUrl();
+    this.options2GetRequestUrl();
   },
-  methods:{
-    //已结算数据
-    options1GetRequestUrl(){
-    if(getCookie("orgCode") == "chengyunshang"){
-      this.ssoId=getCookie('userId');
-      this.options1.requestUrl = "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&carrierSsoId="+ getCookie('userId');
-    }else{
-      this.options1.requestUrl = "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&carrierSsoId=" + this.ssoId;
-    }
-    },
+  methods: {
     //未结算数据
-    options2GetRequestUrl(){
-    if(getCookie("orgCode") == "chengyunshang"){
-      this.options2.requestUrl = "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId="+ getCookie('userId');
-    }else{
-      this.options2.requestUrl = "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" + this.ssoId;
-    }
+    options1GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options1.requestUrl =
+          "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" +
+          getCookie("userId");
+      } else {
+        this.options1.requestUrl =
+          "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" +
+          this.ssoId;
+      }
+    },
+    //已结算数据
+    options2GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.options2.requestUrl =
+          "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" +
+          getCookie("userId");
+      } else {
+        this.options2.requestUrl =
+          "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=2&carrierSsoId=" +
+          this.ssoId;
+      }
     },
     //收货地址弹出层
     handleSelect1(item) {
-        console.log("获取所有下拉值!");
+      console.log("获取所有下拉值!");
     },
     //查询全国省市县
-    selectAddresClick(){
-      if(this.addresText){
-        this.Address.requestUrl = "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con="+this.addresText;
-      }else{
-        this.Address.requestUrl = "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
+    selectAddresClick() {
+      if (this.addresText) {
+        this.Address.requestUrl =
+          "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+          this.addresText;
+      } else {
+        this.Address.requestUrl =
+          "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
       }
     },
     //以下是收货地址边输边查搜索
-    querySearch1(queryString, cb){
+    querySearch1(queryString, cb) {
       this.axios
-        .post("/api/v1/ams/getRealAddressByLike?addressId="+this.addressId + "&index=" + queryString)
-        .then((res) => {
+        .post(
+          "/api/v1/ams/getRealAddressByLike?addressId=" +
+            this.addressId +
+            "&index=" +
+            queryString
+        )
+        .then(res => {
           if (res.data.code == "200") {
             var restaurants = res.data.data;
             var results = queryString
@@ -237,7 +306,7 @@ export default {
         });
     },
     createFilter1(queryString) {
-      return (restaurants) => {
+      return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -245,172 +314,184 @@ export default {
       };
     },
     //以上是收货地址边输边查搜索
-
-     toInsert() {
+    toInsert() {
       this.$router.push("/insertCheckInventory");
     },
     // getclick(scope){
-		//   this.$router.push("/getTransportResult/"+scope.row.orderId)
-	  // },
+    //   this.$router.push("/getTransportResult/"+scope.row.orderId)
+    // },
     //增加途损
-    addDamage(row){
+    addDamage(row) {
       this.detailsId = row.detailsId;
       this.dialogDamage = true;
     },
-    makeSureAdd(){
-      if(!this.DaDryBasis){
-        this.$message.error('达钢的干基还未填!')
-      }else if(!this.JiuDryBasis){
-        this.$message.error('九江收货的干基还未填!')
-      }else if(!this.Fee){
-        this.$message.error('单价还未填!')
-      }else{
+    makeSureAdd() {
+      if (!this.DaDryBasis) {
+        this.$message.error("达钢的干基还未填!");
+      } else if (!this.JiuDryBasis) {
+        this.$message.error("九江收货的干基还未填!");
+      } else if (!this.Fee) {
+        this.$message.error("单价还未填!");
+      } else {
         this.dialogDamage = false;
         //计算途损 [(达钢的干基-九江收货的干基)/达钢的干基 - 0.03] * 单价 > 0, 扣除途损
-        this.damageFee = ((this.DaDryBasis - this.JiuDryBasis) / this.DaDryBasis - 0.03) * this.Fee;
-        if(this.damageFee>0){
+        this.damageFee =
+          ((this.DaDryBasis - this.JiuDryBasis) / this.DaDryBasis - 0.03) *
+          this.Fee;
+        if (this.damageFee > 0) {
           let map = {
-        detailsId: this.detailsId,
-        lossFees: this.damageFee.toFixed(2)
-        }
-        //是否确定增加途损费!
+            detailsId: this.detailsId,
+            lossFees: this.damageFee.toFixed(2)
+          };
+          //是否确定增加途损费!
           this.$confirm("是否确定增加途损费", "提示", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             type: "warning",
-            center: true,
+            center: true
           })
-          .then(() => {
-            //初始化增加途损费对话框中的信息
-            this.damageFee=null,
-            this.axios.post('/api/v1/bms/addLossFeeOfCoke',map).then((res)=>{
-                if(res.data.code == '0'){
-                this.$message.success('增加途损费成功!')
-                //重置未结算详单表单信息
-                this.options1.requestUrl = "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" + new Date();
-              }else{
-                this.$message.error('增加途损费失败,请联系管理员!')
-              }
-            });
-          })
-          .catch(() => {
-            this.$message({
-              type: "info",
-              message: "取消修改详单单价!",
+            .then(() => {
+              //初始化增加途损费对话框中的信息
+              (this.damageFee = null),
+                this.axios
+                  .post("/api/v1/bms/addLossFeeOfCoke", map)
+                  .then(res => {
+                    if (res.data.code == "0") {
+                      this.$message.success("增加途损费成功!");
+                      //重置未结算详单表单信息
+                      this.options1.requestUrl =
+                        "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" +
+                        new Date();
+                    } else {
+                      this.$message.error("增加途损费失败,请联系管理员!");
+                    }
+                  });
+            })
+            .catch(() => {
+              this.$message({
+                type: "info",
+                message: "取消修改详单单价!"
+              });
             });
-          });
         }
       }
+<<<<<<< HEAD
 
+=======
+>>>>>>> 176afc48db5501735cf0b7b76294927091bc7890
     },
-    onclick(){
-      console.log("查询待定值")
+    onclick() {
+      console.log("查询待定值");
       // this.options.requestUrl = "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=1&con="+this.input;
     },
     //修改详单单价
-    priceValueUpdate(row){
+    priceValueUpdate(row) {
       this.originalAddress = row.realAddress;
       this.originalPriceValue = row.priceValue;
       this.detailsId = row.detailsId;
-      this.dialogFormVisible = true
+      this.dialogFormVisible = true;
     },
     //运输订单点击浏览的事件
-    select(){
+    select() {
       this.addressDrawer = true;
     },
     //运输单价模态窗口的框计算
-    selectAddressClick(){
-      this.Price.requestUrl = '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con='+this.addressText;
+    selectAddressClick() {
+      this.Price.requestUrl =
+        "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+        this.addressText;
     },
     //运输单价模态窗口的点击事件
-    addAddressClick(){
+    addAddressClick() {
       //获取运输单价和运输单价ID
       let map = {
         place: this.place,
         addressId: this.addressId
-      }
-      this.axios.post('/api/v1/ams/getPriceMap',map)
-      .then((res)=>{
-          if(res.data.data.priceId==-1){
-            this.newPriceValue = '未录单价!';
-            this.priceId = null;
-          }else{
-            //赋值运输单价和运输单价ID
-            this.newPriceValue = res.data.data.priceValue;//this.priceMap.priceValue
-            this.priceId = res.data.data.priceId;//this.priceMap.priceId
-          }
+      };
+      this.axios.post("/api/v1/ams/getPriceMap", map).then(res => {
+        if (res.data.data.priceId == -1) {
+          this.newPriceValue = "未录单价!";
+          this.priceId = null;
+        } else {
+          //赋值运输单价和运输单价ID
+          this.newPriceValue = res.data.data.priceValue; //this.priceMap.priceValue
+          this.priceId = res.data.data.priceId; //this.priceMap.priceId
+        }
       });
       //priceMap
-      this.newAddress = this.address+this.place;
+      this.newAddress = this.address + this.place;
       this.addressDrawer = false;
     },
     //运输单价模态框单选选中的事件
-    currentRadioChange2(val){
+    currentRadioChange2(val) {
       //若具体地址有值,清空值
-      if(this.place!=null){
-        this.place=null;
+      if (this.place != null) {
+        this.place = null;
       }
-      this.address = val.address,
-      this.addressId = val.addressId;
+      (this.address = val.address), (this.addressId = val.addressId);
       // this.priceMap = {};
       // this.priceMap = val;
     },
     //确认修改详单单价
-    makeSure(){
+    makeSure() {
       //若没有单价Id
-      if(this.priceId==null){
-        this.$message.error('该区域没有录入单价,不可修改!')
-      }else{
-      this.dialogFormVisible = false;
-      let mapValue = {
-        detailsId: this.detailsId,
-        priceId: this.priceId
-      }
-      //是否确定修改详单地址!
-      this.$confirm("是否确定修改详单地址", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-      .then(() => {
-        //初始化修改详单地址对话框的信息
-        this.newPriceValue=null,
-        this.newAddress=null,
-        this.address=null,
-        this.addresText=null,
-        this.addressId=null,
-        this.priceId=null,
-        this.axios.post('/api/v1/bms/updateDetailsOrder',mapValue).then((res)=>{
-            if(res.data.code == '0'){
-            this.$message.success('修改详单单价成功!')
-            //重置未结算详单表单信息
-            this.options1.requestUrl = "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" + new Date();
-          }else{
-            this.$message.error('修改详单单价失败,请联系管理员!')
-          }
-        });
-      })
-      .catch(() => {
-        this.$message({
-          type: "info",
-          message: "取消修改详单单价!",
-        });
-      });
+      if (this.priceId == null) {
+        this.$message.error("该区域没有录入单价,不可修改!");
+      } else {
+        this.dialogFormVisible = false;
+        let mapValue = {
+          detailsId: this.detailsId,
+          priceId: this.priceId
+        };
+        //是否确定修改详单地址!
+        this.$confirm("是否确定修改详单地址", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+          center: true
+        })
+          .then(() => {
+            //初始化修改详单地址对话框的信息
+            (this.newPriceValue = null),
+              (this.newAddress = null),
+              (this.address = null),
+              (this.addresText = null),
+              (this.addressId = null),
+              (this.priceId = null),
+              this.axios
+                .post("/api/v1/bms/updateDetailsOrder", mapValue)
+                .then(res => {
+                  if (res.data.code == "0") {
+                    this.$message.success("修改详单单价成功!");
+                    //重置未结算详单表单信息
+                    this.options1.requestUrl =
+                      "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" +
+                      new Date();
+                  } else {
+                    this.$message.error("修改详单单价失败,请联系管理员!");
+                  }
+                });
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "取消修改详单单价!"
+            });
+          });
       }
     }
   }
-}
+};
 </script>
 
 <style lang="scss" scode>
-.steel_inbound{
-  .sache{
+.steel_inbound {
+  .sache {
     padding: 1.25rem 0.375rem;
-			.el-input {
-			width: 20%;
-			margin-right: 1.25rem;
-			}
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
   }
 }
 </style>

+ 531 - 0
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelDetails.vue

@@ -0,0 +1,531 @@
+// 计费详单
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+        style="width:220px"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="datetime"
+        placeholder="选择日期"
+        style="width:220px"
+      >
+      </el-date-picker>
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出Excel</el-button
+      >
+    </div>
+    <div class="table">
+      <el-tabs v-model="activeName">
+        <!-- 未结算 -->
+        <el-tab-pane label="未结算" name="first">
+          <dilTable v-bind.sync="options1" ref="excelDom">
+            <el-table-column fixed="right" label="操作" width="145">
+              <template slot-scope="scope">
+                <el-button
+                  v-if="ssoId == null"
+                  type="text"
+                  size="small"
+                  @click="priceValueUpdate(scope.row)"
+                  >修改详单地址</el-button
+                >
+              </template>
+            </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+        <!-- 已结算 -->
+        <el-tab-pane label="已结算" name="second">
+          <dilTable v-bind.sync="options2">
+            <!-- <el-table-column fixed="right" label="操作" width="40">
+                <template slot-scope="scope">
+                  <el-button type="text" size="mini" @click="getclick(scope)">查看</el-button>
+                </template>
+            </el-table-column> -->
+          </dilTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+    <!-- 修改详单单价弹出框 -->
+    <el-dialog
+      title="修改详单地址"
+      :visible.sync="dialogFormVisible"
+      append-to-body
+    >
+      <!-- 内层单价选择弹出框 -->
+      <el-dialog
+        width="40%"
+        title="地址筛选"
+        :visible.sync="addressDrawer"
+        append-to-body
+      >
+        <el-input
+          v-model="addresText"
+          placeholder="请输入内容"
+          style="margin-top: 10px; margin-left: 20px; width: 250px"
+        ></el-input>
+        <el-button
+          type="primary"
+          @click="selectAddresClick"
+          :loading="selectLineLoading"
+          ><i class="el-icon-search"></i>查询</el-button
+        >
+        <!-- 已选中 省市(区)县 -->
+        <el-form :inline="true" style="margin-top: 0.5rem;">
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto;"
+              >已选中省市县(区):</label
+            >
+          </el-form-item>
+          <el-form-item>
+            <el-input
+              class="el-form-item__content"
+              v-model="address"
+              placeholder="请输入内容"
+              :disabled="true"
+            ></el-input>
+          </el-form-item>
+        </el-form>
+        <!-- 具体收货地址 -->
+        <div v-if="address != null">
+          <el-form :inline="true" style="margin-top: 0.5rem;">
+            <el-form-item label="具体收货地址:">
+              <el-autocomplete
+                class="inline-input"
+                v-model="place"
+                :fetch-suggestions="querySearch1"
+                placeholder="请输入具体收货地址"
+                :trigger-on-focus="false"
+                @select="handleSelect1"
+              >
+              </el-autocomplete>
+            </el-form-item>
+
+            <el-button type="primary" @click="addAddressClick">确定</el-button>
+          </el-form>
+        </div>
+
+        <div class="tablecls">
+          <!-- 查询所有的运输单价 -->
+          <dilTable
+            v-bind.sync="Address"
+            @radio-change="currentRadioChange2"
+          ></dilTable>
+        </div>
+      </el-dialog>
+      <!-- 内层单价选择弹出框 -->
+
+      <el-form>
+        <el-form-item label="原详单地址" :label-width="formLabelWidth">
+          <el-input
+            style="width:250px"
+            v-model="originalAddress"
+            disabled
+          ></el-input>
+          <label>原单价</label>
+          <el-input
+            style="width:100px"
+            v-model="originalPriceValue"
+            disabled
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="新详单地址" :label-width="formLabelWidth">
+          <el-input
+            style="width:250px"
+            v-model="newAddress"
+            disabled
+          ></el-input>
+          <label>现单价</label>
+          <el-input
+            style="width:100px"
+            v-model="newPriceValue"
+            disabled
+          ></el-input>
+          <el-button type="primary" placeholder="()" @click="select"
+            >浏览</el-button
+          >
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="makeSure">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 增加途损 -->
+    <el-dialog title="增加途损" width="30%" :visible.sync="dialogDamage">
+      <el-form>
+        <el-form-item label="达钢的干基" :label-width="formLabelWidth">
+          <el-input v-model="DaDryBasis"></el-input>
+        </el-form-item>
+        <el-form-item label="九江收货的干基" :label-width="formLabelWidth">
+          <el-input v-model="JiuDryBasis"></el-input>
+        </el-form-item>
+        <el-form-item label="单价" :label-width="formLabelWidth">
+          <el-input v-model="Fee"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogDamage = false">取 消</el-button>
+        <el-button type="primary" @click="makeSureAdd">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+import { sjTime } from "../../../../ADMINISTRATORS/app";
+export default {
+  data() {
+    return {
+      tableTitle: "销售钢材汽运结算详单",
+      endTime: null,
+      startTime: null,
+      //已选中 省市县(区)
+      address: null,
+      //具体收货地址
+      place: null,
+      //收货地址id
+      addressId: null,
+      //省市县(区)查询值
+      addresText: null,
+      //达钢的干基
+      DaDryBasis: null,
+      //九江收货的干基
+      JiuDryBasis: null,
+      //单价
+      Fee: null,
+      //途损费
+      damageFee: null,
+      //加载
+      selectLineLoading: false,
+      input: "",
+      activeName: "first",
+      ssoId: null,
+      //详单Id
+      detailsId: null,
+      options1: {
+        // first请求数据的地址
+        requestUrl: ""
+      },
+      options2: {
+        // second请求数据的地址
+        requestUrl: ""
+      },
+      //是否打开修改详单地址弹出框
+      dialogFormVisible: false,
+      //是否打开增加途损弹出框
+      dialogDamage: false,
+      //原详单单价
+      originalPriceValue: null,
+      //新详单单价
+      newPriceValue: null,
+      //原详单地址
+      originalAddress: null,
+      //新详单地址
+      newAddress: null,
+      //新单价Id
+      priceId: null,
+      //是否打开运输单价的模态框
+      addressDrawer: false,
+      //运输单价的表格
+      Address: {
+        requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
+        selectionType: "radio"
+      },
+      // addressText:null,
+      //缓存当前选中的运输单价
+      priceMap: {},
+      formLabelWidth: "125px"
+    };
+  },
+  created() {
+    this.options1GetRequestUrl();
+    this.options2GetRequestUrl();
+  },
+  methods: {
+    //未结算数据
+    options1GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options1.requestUrl =
+          "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&carrierSsoId=" +
+          getCookie("userId");
+      } else {
+        this.options1.requestUrl =
+          "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&carrierSsoId=" +
+          this.ssoId;
+      }
+    },
+    //已结算数据
+    options2GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.options2.requestUrl =
+          "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&carrierSsoId=" +
+          getCookie("userId");
+      } else {
+        this.options2.requestUrl =
+          "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&carrierSsoId=" +
+          this.ssoId;
+      }
+    },
+    //收货地址弹出层
+    handleSelect1(item) {
+      console.log("获取所有下拉值!");
+    },
+    //查询全国省市县
+    selectAddresClick() {
+      if (this.addresText) {
+        this.Address.requestUrl =
+          "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+          this.addresText;
+      } else {
+        this.Address.requestUrl =
+          "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
+      }
+    },
+    //以下是收货地址边输边查搜索
+    querySearch1(queryString, cb) {
+      this.axios
+        .post(
+          "/api/v1/ams/getRealAddressByLike?addressId=" +
+            this.addressId +
+            "&index=" +
+            queryString
+        )
+        .then(res => {
+          if (res.data.code == "200") {
+            var restaurants = res.data.data;
+            var results = queryString
+              ? restaurants.filter(this.createFilter1(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter1(queryString) {
+      return restaurants => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是收货地址边输边查搜索
+    toInsert() {
+      this.$router.push("/insertCheckInventory");
+    },
+    // getclick(scope){
+    //   this.$router.push("/getTransportResult/"+scope.row.orderId)
+    // },
+    //增加途损
+    addDamage(row) {
+      this.detailsId = row.detailsId;
+      this.dialogDamage = true;
+    },
+    makeSureAdd() {
+      if (!this.DaDryBasis) {
+        this.$message.error("达钢的干基还未填!");
+      } else if (!this.JiuDryBasis) {
+        this.$message.error("九江收货的干基还未填!");
+      } else if (!this.Fee) {
+        this.$message.error("单价还未填!");
+      } else {
+        this.dialogDamage = false;
+        //计算途损 [(达钢的干基-九江收货的干基)/达钢的干基 - 0.03] * 单价 > 0, 扣除途损
+        this.damageFee =
+          ((this.DaDryBasis - this.JiuDryBasis) / this.DaDryBasis - 0.03) *
+          this.Fee;
+        if (this.damageFee > 0) {
+          let map = {
+            detailsId: this.detailsId,
+            lossFees: this.damageFee.toFixed(2)
+          };
+          //是否确定增加途损费!
+          this.$confirm("是否确定增加途损费", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+            center: true
+          })
+            .then(() => {
+              //初始化增加途损费对话框中的信息
+              (this.damageFee = null),
+                this.axios
+                  .post("/api/v1/bms/addLossFeeOfCoke", map)
+                  .then(res => {
+                    if (res.data.code == "0") {
+                      this.$message.success("增加途损费成功!");
+                      //重置未结算详单表单信息
+                      this.options1.requestUrl =
+                        "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&i=" +
+                        new Date();
+                    } else {
+                      this.$message.error("增加途损费失败,请联系管理员!");
+                    }
+                  });
+            })
+            .catch(() => {
+              this.$message({
+                type: "info",
+                message: "取消修改详单单价!"
+              });
+            });
+        }
+      }
+    },
+    onclick() {
+      console.log("查询待定值");
+      let startTime = null;
+      let endTime = null;
+      let carrierSsoId = null;
+      if (getCookie("orgCode") == "chengyunshang") {
+        carrierSsoId = getCookie("userId");
+      }
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      this.options1.requestUrl =
+        "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&con=" +
+        this.input +
+        "&startTime=" +
+        startTime +
+        "&endTime=" +
+        endTime +
+        "&status=0" +
+        "&i=" +
+        new Date();
+      this.options2.requestUrl =
+        "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&con=" +
+        this.input +
+        "&startTime=" +
+        startTime +
+        "&endTime=" +
+        endTime +
+        "&status=1" +
+        "&i=" +
+        new Date();
+    },
+    //修改详单单价
+    priceValueUpdate(row) {
+      this.originalAddress = row.realAddress;
+      this.originalPriceValue = row.priceValue;
+      this.detailsId = row.detailsId;
+      this.dialogFormVisible = true;
+    },
+    //运输订单点击浏览的事件
+    select() {
+      this.addressDrawer = true;
+    },
+    //运输单价模态窗口的框计算
+    selectAddressClick() {
+      this.Price.requestUrl =
+        "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+        this.addressText;
+    },
+    //运输单价模态窗口的点击事件
+    addAddressClick() {
+      //获取运输单价和运输单价ID
+      let map = {
+        place: this.place,
+        addressId: this.addressId
+      };
+      this.axios.post("/api/v1/ams/getPriceMap", map).then(res => {
+        if (res.data.data.priceId == -1) {
+          this.newPriceValue = "未录单价!";
+          this.priceId = null;
+        } else {
+          //赋值运输单价和运输单价ID
+          this.newPriceValue = res.data.data.priceValue; //this.priceMap.priceValue
+          this.priceId = res.data.data.priceId; //this.priceMap.priceId
+        }
+      });
+      //priceMap
+      this.newAddress = this.address + this.place;
+      this.addressDrawer = false;
+    },
+    //运输单价模态框单选选中的事件
+    currentRadioChange2(val) {
+      //若具体地址有值,清空值
+      if (this.place != null) {
+        this.place = null;
+      }
+      (this.address = val.address), (this.addressId = val.addressId);
+      // this.priceMap = {};
+      // this.priceMap = val;
+    },
+    //确认修改详单单价
+    makeSure() {
+      //若没有单价Id
+      if (this.priceId == null) {
+        this.$message.error("该区域没有录入单价,不可修改!");
+      } else {
+        this.dialogFormVisible = false;
+        let mapValue = {
+          detailsId: this.detailsId,
+          priceId: this.priceId
+        };
+        //是否确定修改详单地址!
+        this.$confirm("是否确定修改详单地址", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+          center: true
+        })
+          .then(() => {
+            //初始化修改详单地址对话框的信息
+            (this.newPriceValue = null),
+              (this.newAddress = null),
+              (this.address = null),
+              (this.addresText = null),
+              (this.addressId = null),
+              (this.priceId = null),
+              this.axios
+                .post("/api/v1/bms/updateDetailsOrder", mapValue)
+                .then(res => {
+                  if (res.data.code == "0") {
+                    this.$message.success("修改详单单价成功!");
+                    //重置未结算详单表单信息
+                    this.options1.requestUrl =
+                      "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" +
+                      new Date();
+                  } else {
+                    this.$message.error("修改详单单价失败,请联系管理员!");
+                  }
+                });
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "取消修改详单单价!"
+            });
+          });
+      }
+    }
+  }
+};
+</script>
+
+<style lang="scss" scode>
+.steel_inbound {
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 77 - 0
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelStatement.vue

@@ -0,0 +1,77 @@
+// 计费账单
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="selectBmstruckOrder(scope)"
+            >
+              查看
+            </el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="updateBmstruckCheck(scope)"
+            >
+              稽核
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      input: "",
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/bms/getTruckStatementList?apiId=179"
+      }
+    };
+  },
+  methods: {
+    toInsert() {
+      this.$router.push("/addBmsTruckStatement");
+    },
+    selectBmstruckOrder(scope) {
+      this.$router.push("/getBmsTruckStatementOrder/" + scope.row.statementId);
+    },
+    updateBmstruckCheck(scope) {
+      this.$router.push("/bmsTruckAudit/" + scope.row.statementId);
+    },
+    onclick() {
+      console.log("查询待定值");
+      // this.options.requestUrl = "/api/v1/bms/getTruckStatementList?apiId=179&con="+this.input;
+    }
+  }
+};
+</script>
+
+<style lang="scss" scode>
+.steel_inbound {
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 732 - 223
src/views/sale/router/index.js

@@ -1,234 +1,743 @@
-import Vue from 'vue'
-import Router from 'vue-router'
+import Vue from "vue";
+import Router from "vue-router";
 
-import routerBefore from '@/config/routerBefore.js'
+import routerBefore from "@/config/routerBefore.js";
 // 主要
-import main from '@/components/main.vue'
+import main from "@/components/main.vue";
 // 系统配置管理
-import addSaleOrder from '../components/sale_contract/addSaleOrder.vue'
-import addSalePlan from '../components/sale_contract/addSalePlan.vue'
-import addSalePlanDetail from '../components/sale_contract/addSalePlanDetail.vue'
-import addTransportPrice from '../components/sale_contract/addTransportPrice.vue'
-import addTruckNoDetail from '../components/sale_contract/addTruckNoDetail.vue'
-import editaddress from '../components/sale_contract/editaddress.vue'
-import editSaleOrder from '../components/sale_contract/editSaleOrder.vue'
-import editSaleOrderDetail from '../components/sale_contract/editSaleOrderDetail.vue'
-import editSalePalnDetail from '../components/sale_contract/editSalePalnDetail.vue'
-import editSalePlan from '../components/sale_contract/editSalePlan.vue'
-import editTransportPrice from '../components/sale_contract/editTransportPrice.vue'
-import editTruckNoDetail from '../components/sale_contract/editTruckNoDetail.vue'
-import saleOrder from '../components/sale_contract/saleOrder.vue'
-import saleOrderDetail from '../components/sale_contract/saleOrderDetail.vue'
-import saleOrderDetailApproved from '../components/sale_contract/saleOrderDetailApproved.vue'
-import saleOrderUpdateLog from '../components/sale_contract/saleOrderUpdateLog.vue'
-import salePlan from '../components/sale_contract/salePlan.vue'
-import transportPrice from '../components/sale_contract/transportPrice.vue'
-import addlading from '../components/saleSelfMachine/addlading.vue'
-import printLading from '../components/saleSelfMachine/printLading.vue'
-import printReceipt from '../components/saleSelfMachine/printReceipt.vue'
-import printScan from '../components/saleSelfMachine/printScan.vue'
-import printWarranty from '../components/saleSelfMachine/printWarranty.vue'
-import saleSelfMachine from '../components/saleSelfMachine/saleSelfMachine.vue'
-import addCokeRailPlan from '../components/transport_appointment/railPlan/addCokeRailPlan.vue'
-import addSlagRailPlan from '../components/transport_appointment/railPlan/addSlagRailPlan.vue'
-import addSteelRailPlan from '../components/transport_appointment/railPlan/addSteelRailPlan.vue'
-import cokeRailPlan from '../components/transport_appointment/railPlan/cokeRailPlan.vue'
-import slagRailPlan from '../components/transport_appointment/railPlan/slagRailPlan.vue'
-import steelRailPlan from '../components/transport_appointment/railPlan/steelRailPlan.vue'
-import updateCokeRailPlan from '../components/transport_appointment/railPlan/updateCokeRailPlan.vue'
-import updateSlagRailPlan from '../components/transport_appointment/railPlan/updateSlagRailPlan.vue'
-import updateSteelRailPlan from '../components/transport_appointment/railPlan/updateSteelRailPlan.vue'
-import addOpenDistribution from '../components/transport_appointment/addOpenDistribution.vue'
-import directionalDispatch from '../components/transport_appointment/directionalDispatch.vue'
-import openDistribution from '../components/transport_appointment/openDistribution.vue'
-import openDistributionSection from '../components/transport_appointment/openDistributionSection.vue'
-import orderGrabbing from '../components/transport_appointment/orderGrabbing.vue'
+import addSaleOrder from "../components/sale_contract/addSaleOrder.vue";
+import addSalePlan from "../components/sale_contract/addSalePlan.vue";
+import addSalePlanDetail from "../components/sale_contract/addSalePlanDetail.vue";
+import addTransportPrice from "../components/sale_contract/addTransportPrice.vue";
+import addTruckNoDetail from "../components/sale_contract/addTruckNoDetail.vue";
+import editaddress from "../components/sale_contract/editaddress.vue";
+import editSaleOrder from "../components/sale_contract/editSaleOrder.vue";
+import editSaleOrderDetail from "../components/sale_contract/editSaleOrderDetail.vue";
+import editSalePalnDetail from "../components/sale_contract/editSalePalnDetail.vue";
+import editSalePlan from "../components/sale_contract/editSalePlan.vue";
+import editTransportPrice from "../components/sale_contract/editTransportPrice.vue";
+import editTruckNoDetail from "../components/sale_contract/editTruckNoDetail.vue";
+import saleOrder from "../components/sale_contract/saleOrder.vue";
+import saleOrderDetail from "../components/sale_contract/saleOrderDetail.vue";
+import saleOrderDetailApproved from "../components/sale_contract/saleOrderDetailApproved.vue";
+import saleOrderUpdateLog from "../components/sale_contract/saleOrderUpdateLog.vue";
+import salePlan from "../components/sale_contract/salePlan.vue";
+import transportPrice from "../components/sale_contract/transportPrice.vue";
+import addlading from "../components/saleSelfMachine/addlading.vue";
+import printLading from "../components/saleSelfMachine/printLading.vue";
+import printReceipt from "../components/saleSelfMachine/printReceipt.vue";
+import printScan from "../components/saleSelfMachine/printScan.vue";
+import printWarranty from "../components/saleSelfMachine/printWarranty.vue";
+import saleSelfMachine from "../components/saleSelfMachine/saleSelfMachine.vue";
+import addCokeRailPlan from "../components/transport_appointment/railPlan/addCokeRailPlan.vue";
+import addSlagRailPlan from "../components/transport_appointment/railPlan/addSlagRailPlan.vue";
+import addSteelRailPlan from "../components/transport_appointment/railPlan/addSteelRailPlan.vue";
+import cokeRailPlan from "../components/transport_appointment/railPlan/cokeRailPlan.vue";
+import slagRailPlan from "../components/transport_appointment/railPlan/slagRailPlan.vue";
+import steelRailPlan from "../components/transport_appointment/railPlan/steelRailPlan.vue";
+import updateCokeRailPlan from "../components/transport_appointment/railPlan/updateCokeRailPlan.vue";
+import updateSlagRailPlan from "../components/transport_appointment/railPlan/updateSlagRailPlan.vue";
+import updateSteelRailPlan from "../components/transport_appointment/railPlan/updateSteelRailPlan.vue";
+import addOpenDistribution from "../components/transport_appointment/addOpenDistribution.vue";
+import directionalDispatch from "../components/transport_appointment/directionalDispatch.vue";
+import openDistribution from "../components/transport_appointment/openDistribution.vue";
+import openDistributionSection from "../components/transport_appointment/openDistributionSection.vue";
+import orderGrabbing from "../components/transport_appointment/orderGrabbing.vue";
 
-import add_sale_dilNotice from '../components/dilNotice/add_sale_dilNotice.vue'
-import Carrier_dilNotice from '../components/dilNotice/Carrier_dilNotice.vue'
-import sale_dilNotice from '../components/dilNotice/sale_dilNotice.vue'
-import addNotice from '../components/dilNotice/addNotice.vue'
-import carrierNotice from '../components/dilNotice/carrierNotice.vue'
-import clientNotice from '../components/dilNotice/clientNotice.vue'
-import editNotice from '../components/dilNotice/editNotice.vue'
-import getNoticeById from '../components/dilNotice/getNoticeById.vue'
-import marketingNotice from '../components/dilNotice/marketingNotice.vue'
-import newNotice from '../components/dilNotice/newNotice.vue'
+import add_sale_dilNotice from "../components/dilNotice/add_sale_dilNotice.vue";
+import Carrier_dilNotice from "../components/dilNotice/Carrier_dilNotice.vue";
+import sale_dilNotice from "../components/dilNotice/sale_dilNotice.vue";
+import addNotice from "../components/dilNotice/addNotice.vue";
+import carrierNotice from "../components/dilNotice/carrierNotice.vue";
+import clientNotice from "../components/dilNotice/clientNotice.vue";
+import editNotice from "../components/dilNotice/editNotice.vue";
+import getNoticeById from "../components/dilNotice/getNoticeById.vue";
+import marketingNotice from "../components/dilNotice/marketingNotice.vue";
+import newNotice from "../components/dilNotice/newNotice.vue";
 
-import outFactoryResult from '../components/transport_excute/outFactory/outFactoryResult.vue'
-import smsResult from '../components/transport_excute/outFactory/smsResult.vue'
-import arrivalPhoto from '../components/transport_excute/tms-offsite/arrivalPhoto.vue'
-import arrivalResult from '../components/transport_excute/tms-offsite/arrivalResult.vue' 
-import transportationPerformance from '../components/offSiteTransportation/transportationPerformance.vue' 
-import distance from '../components/transport_excute/tms-offsite/distance.vue'
+import outFactoryResult from "../components/transport_excute/outFactory/outFactoryResult.vue";
+import smsResult from "../components/transport_excute/outFactory/smsResult.vue";
+import arrivalPhoto from "../components/transport_excute/tms-offsite/arrivalPhoto.vue";
+import arrivalResult from "../components/transport_excute/tms-offsite/arrivalResult.vue";
+import transportationPerformance from "../components/offSiteTransportation/transportationPerformance.vue";
+import distance from "../components/transport_excute/tms-offsite/distance.vue";
 // import inTransit from '../components/transport_excute/offSiteTransportation/inTransit.vue'
-import inTransitAbnormal from '../components/transport_excute/tms-offsite/inTransitAbnormal.vue'
-import inTransitAlarm from '../components/transport_excute/tms-offsite/inTransitAlarm.vue'
-import inTransitOrderMileage from '../components/transport_excute/tms-offsite/inTransitOrderMileage.vue'
-import pathView from '../components/transport_excute/tms-offsite/pathView.vue'
-import receiptChildPhoto from '../components/transport_excute/tms-offsite/receiptChildPhoto.vue'
-import receiptPhoto from '../components/transport_excute/tms-offsite/receiptPhoto.vue'
-import receiptResult from '../components/transport_excute/tms-offsite/receiptResult.vue'
-import transportInfo from '../components/transport_excute/tms-offsite/transportInfo.vue'
-import enFactoryResult from '../components/transport_excute/enFactoryResult.vue'
-import grossWeightResult from '../components/transport_excute/grossWeightResult.vue'
-import loadTruckResult from '../components/transport_excute/loadTruckResult.vue'
-import qualityResult from '../components/transport_excute/qualityResult.vue'
-import returnResult from '../components/transport_excute/returnResult.vue'
-import tareWeightResult from '../components/transport_excute/tareWeightResult.vue'
-import disatchSteelSaleOrderAdd from '../components/transport_order/disatchSteelSaleOrderAdd.vue'
-import dispatchCokeRailPlan from '../components/transport_order/dispatchCokeRailPlan.vue'
-import dispatchCokeRailPlanAdd from '../components/transport_order/dispatchCokeRailPlanAdd.vue'
-import dispatchCokeRailPlanCheck from '../components/transport_order/dispatchCokeRailPlanCheck.vue'
-import dispatchOrder from '../components/transport_order/dispatchOrder.vue'
-import dispatchSlagDayPlanAdd from '../components/transport_order/dispatchSlagDayPlanAdd.vue'
-import dispatchSlagDayPlanCheck from '../components/transport_order/dispatchSlagDayPlanCheck.vue'
-import dispatchSlagRailPlan from '../components/transport_order/dispatchSlagRailPlan.vue'
-import dispatchSteelSaleOrder from '../components/transport_order/dispatchSteelSaleOrder.vue'
-import dispatchSteelSaleOrderCheck from '../components/transport_order/dispatchSteelSaleOrderCheck.vue'
-import receiveOrder from '../components/transport_order/receiveOrder.vue'
-import saleChemicalCokeOrder from '../components/transport_order/saleChemicalCokeOrder.vue'
-import saleCoproductOrder from '../components/transport_order/saleCoproductOrder.vue'
-import saleSteelOrder from '../components/transport_order/saleSteelOrder.vue'
-import addBmsTrainFreight from '../components/transportFreight/saleTrainSettlement/addBmsTrainFreight.vue'
-import bmsTrainFreight from '../components/transportFreight/saleTrainSettlement/bmsTrainFreight.vue'
-import updateBmsTrainFreight from '../components/transportFreight/saleTrainSettlement/updateBmsTrainFreight.vue'
-import addBmsTruckInvoice from '../components/transportFreight/saleTruckSettlement/addBmsTruckInvoice.vue'
-import addBmsTruckStatement from '../components/transportFreight/saleTruckSettlement/addBmsTruckStatement.vue'
-import bmsTruckAudit from '../components/transportFreight/saleTruckSettlement/bmsTruckAudit.vue'
-import bmsTruckDetailOrder from '../components/transportFreight/saleTruckSettlement/bmsTruckDetailOrder.vue'
-import bmsTruckFormula from '../components/transportFreight/saleTruckSettlement/bmsTruckFormula.vue'
-import bmsTruckInvoice from '../components/transportFreight/saleTruckSettlement/bmsTruckInvoice.vue'
-import bmsTruckStatement from '../components/transportFreight/saleTruckSettlement/bmsTruckStatement.vue'
-import getBmsTruckStatementOrder from '../components/transportFreight/saleTruckSettlement/getBmsTruckStatementOrder.vue'
-import getTransportResult from '../components/transportFreight/saleTruckSettlement/getTransportResult.vue'
-import mapTest from '../components/offSiteTransportation/mapTest.vue'
-import checkGPS from '../components/offSiteTransportation/checkGPS.vue'
-import currentLocation from '../components/offSiteTransportation/currentLocation.vue'
-import inTransit from '../components/offSiteTransportation/inTransit.vue'  
-import inTransitWarn from '../components/offSiteTransportation/inTransitWarn.vue'
+import inTransitAbnormal from "../components/transport_excute/tms-offsite/inTransitAbnormal.vue";
+import inTransitAlarm from "../components/transport_excute/tms-offsite/inTransitAlarm.vue";
+import inTransitOrderMileage from "../components/transport_excute/tms-offsite/inTransitOrderMileage.vue";
+import pathView from "../components/transport_excute/tms-offsite/pathView.vue";
+import receiptChildPhoto from "../components/transport_excute/tms-offsite/receiptChildPhoto.vue";
+import receiptPhoto from "../components/transport_excute/tms-offsite/receiptPhoto.vue";
+import receiptResult from "../components/transport_excute/tms-offsite/receiptResult.vue";
+import transportInfo from "../components/transport_excute/tms-offsite/transportInfo.vue";
+import enFactoryResult from "../components/transport_excute/enFactoryResult.vue";
+import grossWeightResult from "../components/transport_excute/grossWeightResult.vue";
+import loadTruckResult from "../components/transport_excute/loadTruckResult.vue";
+import qualityResult from "../components/transport_excute/qualityResult.vue";
+import returnResult from "../components/transport_excute/returnResult.vue";
+import tareWeightResult from "../components/transport_excute/tareWeightResult.vue";
+import disatchSteelSaleOrderAdd from "../components/transport_order/disatchSteelSaleOrderAdd.vue";
+import dispatchCokeRailPlan from "../components/transport_order/dispatchCokeRailPlan.vue";
+import dispatchCokeRailPlanAdd from "../components/transport_order/dispatchCokeRailPlanAdd.vue";
+import dispatchCokeRailPlanCheck from "../components/transport_order/dispatchCokeRailPlanCheck.vue";
+import dispatchOrder from "../components/transport_order/dispatchOrder.vue";
+import dispatchSlagDayPlanAdd from "../components/transport_order/dispatchSlagDayPlanAdd.vue";
+import dispatchSlagDayPlanCheck from "../components/transport_order/dispatchSlagDayPlanCheck.vue";
+import dispatchSlagRailPlan from "../components/transport_order/dispatchSlagRailPlan.vue";
+import dispatchSteelSaleOrder from "../components/transport_order/dispatchSteelSaleOrder.vue";
+import dispatchSteelSaleOrderCheck from "../components/transport_order/dispatchSteelSaleOrderCheck.vue";
+import receiveOrder from "../components/transport_order/receiveOrder.vue";
+import saleChemicalCokeOrder from "../components/transport_order/saleChemicalCokeOrder.vue";
+import saleCoproductOrder from "../components/transport_order/saleCoproductOrder.vue";
+import saleSteelOrder from "../components/transport_order/saleSteelOrder.vue";
+import addBmsTrainFreight from "../components/transportFreight/saleTrainSettlement/addBmsTrainFreight.vue";
+import bmsTrainFreight from "../components/transportFreight/saleTrainSettlement/bmsTrainFreight.vue";
+import updateBmsTrainFreight from "../components/transportFreight/saleTrainSettlement/updateBmsTrainFreight.vue";
+import addBmsTruckInvoice from "../components/transportFreight/saleTruckSettlement/addBmsTruckInvoice.vue";
+import addBmsTruckStatement from "../components/transportFreight/saleTruckSettlement/addBmsTruckStatement.vue";
+import bmsTruckAudit from "../components/transportFreight/saleTruckSettlement/bmsTruckAudit.vue";
+import bmsTruckDetailOrder from "../components/transportFreight/saleTruckSettlement/bmsTruckDetailOrder.vue";
+import bmsTruckFormula from "../components/transportFreight/saleTruckSettlement/bmsTruckFormula.vue";
+import bmsTruckInvoice from "../components/transportFreight/saleTruckSettlement/bmsTruckInvoice.vue";
+import bmsTruckStatement from "../components/transportFreight/saleTruckSettlement/bmsTruckStatement.vue";
+import getBmsTruckStatementOrder from "../components/transportFreight/saleTruckSettlement/getBmsTruckStatementOrder.vue";
+import getTransportResult from "../components/transportFreight/saleTruckSettlement/getTransportResult.vue";
+import mapTest from "../components/offSiteTransportation/mapTest.vue";
+import checkGPS from "../components/offSiteTransportation/checkGPS.vue";
+import currentLocation from "../components/offSiteTransportation/currentLocation.vue";
+import inTransit from "../components/offSiteTransportation/inTransit.vue";
+import inTransitWarn from "../components/offSiteTransportation/inTransitWarn.vue";
 //测试数据
+//添加销售钢材汽运结算
+import bmsTruckSteelDetails from "@/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelDetails.vue";
+import bmsTruckSteelStatement from "@/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelStatement.vue";
 
-Vue.use(Router)
+Vue.use(Router);
 const constantRouterMap = [
-	{
-	  path: '/',
-	  name: 'main',
-	  meta: {title: '首页', code: 'xtpzgl'},
-	  component: main,
-	  redirect: {name: 'addSaleOrder'},
-	  children: [
-		{path: 'addSaleOrder', name: 'addSaleOrder', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrder},
-		{path: 'addSalePlan', name: 'addSalePlan', meta: {code: 'xtpzgl-yhgl'}, component: addSalePlan},
-		{path: 'addSalePlanDetail/:planId', name: 'addSalePlanDetail', meta: {code: 'xtpzgl-yhgl'}, component: addSalePlanDetail},
-		{path: 'addTransportPrice', name: 'addTransportPrice', meta: {code: 'xtpzgl-yhgl'}, component: addTransportPrice},
-		{path: 'addTruckNoDetail/:saleOrderMaterialId', name: 'addTruckNoDetail', meta: {code: 'xtpzgl-yhgl'}, component: addTruckNoDetail},
-		{path: 'editaddress/:saleOrderMaterialId', name: 'editaddress', meta: {code: 'xtpzgl-yhgl'}, component: editaddress},
-		{path: 'editSaleOrder/:saleOrderId', name: 'editSaleOrder', meta: {code: 'xtpzgl-yhgl'}, component: editSaleOrder},
-		{path: 'editSaleOrderDetail/:saleOrderMaterialId', name: 'editSaleOrderDetail', meta: {code: 'xtpzgl-yhgl'}, component: editSaleOrderDetail},
-		{path: 'editSalePalnDetail/:planMaterialId', name: 'editSalePalnDetail', meta: {code: 'xtpzgl-yhgl'}, component: editSalePalnDetail},
-		{path: 'editSalePlan/:planId', name: 'editSalePlan', meta: {code: 'xtpzgl-yhgl'}, component: editSalePlan},
-		{path: 'editTransportPrice/:priceId', name: 'editTransportPrice', meta: {code: 'xtpzgl-yhgl'}, component: editTransportPrice},
-		{path: 'editTruckNoDetail/:trucknoMaterialId', name: 'editTruckNoDetail', meta: {code: 'xtpzgl-yhgl'}, component: editTruckNoDetail},
-		{path: 'saleOrder', name: 'saleOrder', meta: {code: 'xtpzgl-yhgl'}, component: saleOrder},
-		{path: 'saleOrderDetail/:saleOrderId', name: 'saleOrderDetail', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderDetail},
-		{path: 'saleOrderDetailApproved/:saleOrderId', name: 'saleOrderDetailApproved', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderDetailApproved},
-		{path: 'saleOrderUpdateLog/:saleOrderId', name: 'saleOrderUpdateLog', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderUpdateLog},
-		{path: 'salePlan', name: 'salePlan', meta: {code: 'xtpzgl-yhgl'}, component: salePlan},
-		{path: 'transportPrice', name: 'transportPrice', meta: {code: 'xtpzgl-yhgl'}, component: transportPrice},
-		{path: 'addlading', name: 'addlading', meta: {code: 'xtpzgl-yhgl'}, component: addlading},
-		{path: 'printLading', name: 'printLading', meta: {code: 'xtpzgl-yhgl'}, component: printLading},
-		{path: 'printReceipt', name: 'printReceipt', meta: {code: 'xtpzgl-yhgl'}, component: printReceipt},
-		{path: 'printScan', name: 'printScan', meta: {code: 'xtpzgl-yhgl'}, component: printScan},
-		{path: 'printWarranty', name: 'printWarranty', meta: {code: 'xtpzgl-yhgl'}, component: printWarranty},
-		{path: 'saleSelfMachine', name: 'saleSelfMachine', meta: {code: 'xtpzgl-yhgl'}, component: saleSelfMachine},
-		{path: 'addCokeRailPlan', name: 'addCokeRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: addCokeRailPlan},
-		{path: 'addSlagRailPlan', name: 'addSlagRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: addSlagRailPlan},
-		{path: 'addSteelRailPlan', name: 'addSteelRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: addSteelRailPlan},
-		{path: 'cokeRailPlan', name: 'cokeRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: cokeRailPlan},
-		{path: 'slagRailPlan', name: 'slagRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: slagRailPlan},
-		{path: 'steelRailPlan', name: 'steelRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: steelRailPlan},
-		{path: 'updateCokeRailPlan/:dayPlanId', name: 'updateCokeRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: updateCokeRailPlan},
-		{path: 'updateSlagRailPlan/:dayPlanId', name: 'updateSlagRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: updateSlagRailPlan},
-		{path: 'updateSteelRailPlan/:dayPlanId', name: 'updateSteelRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: updateSteelRailPlan},
-		{path: 'addOpenDistribution', name: 'addOpenDistribution', meta: {code: 'xtpzgl-yhgl'}, component: addOpenDistribution},
-		{path: 'directionalDispatch', name: 'directionalDispatch', meta: {code: 'xtpzgl-yhgl'}, component: directionalDispatch},
-		{path: 'openDistribution', name: 'openDistribution', meta: {code: 'xtpzgl-yhgl'}, component: openDistribution},
-		{path: 'openDistributionSection/:dispatchId', name: 'openDistributionSection', meta: {code: 'xtpzgl-yhgl'}, component: openDistributionSection},
-		{path: 'orderGrabbing', name: 'orderGrabbing', meta: {code: 'xtpzgl-yhgl'}, component: orderGrabbing},
+  {
+    path: "/",
+    name: "main",
+    meta: { title: "首页", code: "xtpzgl" },
+    component: main,
+    redirect: { name: "addSaleOrder" },
+    children: [
+      {
+        path: "addSaleOrder",
+        name: "addSaleOrder",
+        meta: { code: "xtpzgl-jggl" },
+        component: addSaleOrder
+      },
+      {
+        path: "addSalePlan",
+        name: "addSalePlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addSalePlan
+      },
+      {
+        path: "addSalePlanDetail/:planId",
+        name: "addSalePlanDetail",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addSalePlanDetail
+      },
+      {
+        path: "addTransportPrice",
+        name: "addTransportPrice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addTransportPrice
+      },
+      {
+        path: "addTruckNoDetail/:saleOrderMaterialId",
+        name: "addTruckNoDetail",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addTruckNoDetail
+      },
+      {
+        path: "editaddress/:saleOrderMaterialId",
+        name: "editaddress",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editaddress
+      },
+      {
+        path: "editSaleOrder/:saleOrderId",
+        name: "editSaleOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editSaleOrder
+      },
+      {
+        path: "editSaleOrderDetail/:saleOrderMaterialId",
+        name: "editSaleOrderDetail",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editSaleOrderDetail
+      },
+      {
+        path: "editSalePalnDetail/:planMaterialId",
+        name: "editSalePalnDetail",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editSalePalnDetail
+      },
+      {
+        path: "editSalePlan/:planId",
+        name: "editSalePlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editSalePlan
+      },
+      {
+        path: "editTransportPrice/:priceId",
+        name: "editTransportPrice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editTransportPrice
+      },
+      {
+        path: "editTruckNoDetail/:trucknoMaterialId",
+        name: "editTruckNoDetail",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editTruckNoDetail
+      },
+      {
+        path: "saleOrder",
+        name: "saleOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleOrder
+      },
+      {
+        path: "saleOrderDetail/:saleOrderId",
+        name: "saleOrderDetail",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleOrderDetail
+      },
+      {
+        path: "saleOrderDetailApproved/:saleOrderId",
+        name: "saleOrderDetailApproved",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleOrderDetailApproved
+      },
+      {
+        path: "saleOrderUpdateLog/:saleOrderId",
+        name: "saleOrderUpdateLog",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleOrderUpdateLog
+      },
+      {
+        path: "salePlan",
+        name: "salePlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: salePlan
+      },
+      {
+        path: "transportPrice",
+        name: "transportPrice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: transportPrice
+      },
+      {
+        path: "addlading",
+        name: "addlading",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addlading
+      },
+      {
+        path: "printLading",
+        name: "printLading",
+        meta: { code: "xtpzgl-yhgl" },
+        component: printLading
+      },
+      {
+        path: "printReceipt",
+        name: "printReceipt",
+        meta: { code: "xtpzgl-yhgl" },
+        component: printReceipt
+      },
+      {
+        path: "printScan",
+        name: "printScan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: printScan
+      },
+      {
+        path: "printWarranty",
+        name: "printWarranty",
+        meta: { code: "xtpzgl-yhgl" },
+        component: printWarranty
+      },
+      {
+        path: "saleSelfMachine",
+        name: "saleSelfMachine",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleSelfMachine
+      },
+      {
+        path: "addCokeRailPlan",
+        name: "addCokeRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addCokeRailPlan
+      },
+      {
+        path: "addSlagRailPlan",
+        name: "addSlagRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addSlagRailPlan
+      },
+      {
+        path: "addSteelRailPlan",
+        name: "addSteelRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addSteelRailPlan
+      },
+      {
+        path: "cokeRailPlan",
+        name: "cokeRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: cokeRailPlan
+      },
+      {
+        path: "slagRailPlan",
+        name: "slagRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: slagRailPlan
+      },
+      {
+        path: "steelRailPlan",
+        name: "steelRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: steelRailPlan
+      },
+      {
+        path: "updateCokeRailPlan/:dayPlanId",
+        name: "updateCokeRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: updateCokeRailPlan
+      },
+      {
+        path: "updateSlagRailPlan/:dayPlanId",
+        name: "updateSlagRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: updateSlagRailPlan
+      },
+      {
+        path: "updateSteelRailPlan/:dayPlanId",
+        name: "updateSteelRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: updateSteelRailPlan
+      },
+      {
+        path: "addOpenDistribution",
+        name: "addOpenDistribution",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addOpenDistribution
+      },
+      {
+        path: "directionalDispatch",
+        name: "directionalDispatch",
+        meta: { code: "xtpzgl-yhgl" },
+        component: directionalDispatch
+      },
+      {
+        path: "openDistribution",
+        name: "openDistribution",
+        meta: { code: "xtpzgl-yhgl" },
+        component: openDistribution
+      },
+      {
+        path: "openDistributionSection/:dispatchId",
+        name: "openDistributionSection",
+        meta: { code: "xtpzgl-yhgl" },
+        component: openDistributionSection
+      },
+      {
+        path: "orderGrabbing",
+        name: "orderGrabbing",
+        meta: { code: "xtpzgl-yhgl" },
+        component: orderGrabbing
+      },
 
-		{path: 'add_sale_dilNotice', name: 'add_sale_dilNotice', meta: {code: 'xtpzgl-yhgl'}, component: add_sale_dilNotice},
-		{path: 'Carrier_dilNotice', name: 'Carrier_dilNotice', meta: {code: 'xtpzgl-yhgl'}, component: Carrier_dilNotice},
-		{path: 'sale_dilNotice', name: 'sale_dilNotice', meta: {code: 'xtpzgl-yhgl'}, component: sale_dilNotice},
-		{path: 'addNotice', name: 'addNotice', meta: {code: 'xtpzgl-yhgl'}, component: addNotice},
-		{path: 'carrierNotice', name: 'carrierNotice', meta: {code: 'xtpzgl-yhgl'}, component: carrierNotice},
-		{path: 'clientNotice', name: 'clientNotice', meta: {code: 'xtpzgl-yhgl'}, component: clientNotice},
-		{path: 'editNotice/:noticeId', name: 'editNotice', meta: {code: 'xtpzgl-yhgl'}, component: editNotice},
-		{path: 'getNoticeById/:noticeId', name: 'getNoticeById', meta: {code: 'xtpzgl-yhgl'}, component: getNoticeById},
-		{path: 'marketingNotice', name: 'marketingNotice', meta: {code: 'xtpzgl-yhgl'}, component: marketingNotice},
-		{path: 'newNotice', name: 'newNotice', meta: {code: 'xtpzgl-yhgl'}, component: newNotice},
+      {
+        path: "add_sale_dilNotice",
+        name: "add_sale_dilNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: add_sale_dilNotice
+      },
+      {
+        path: "Carrier_dilNotice",
+        name: "Carrier_dilNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: Carrier_dilNotice
+      },
+      {
+        path: "sale_dilNotice",
+        name: "sale_dilNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sale_dilNotice
+      },
+      {
+        path: "addNotice",
+        name: "addNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addNotice
+      },
+      {
+        path: "carrierNotice",
+        name: "carrierNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: carrierNotice
+      },
+      {
+        path: "clientNotice",
+        name: "clientNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: clientNotice
+      },
+      {
+        path: "editNotice/:noticeId",
+        name: "editNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: editNotice
+      },
+      {
+        path: "getNoticeById/:noticeId",
+        name: "getNoticeById",
+        meta: { code: "xtpzgl-yhgl" },
+        component: getNoticeById
+      },
+      {
+        path: "marketingNotice",
+        name: "marketingNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: marketingNotice
+      },
+      {
+        path: "newNotice",
+        name: "newNotice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: newNotice
+      },
 
-		{path: 'outFactoryResult', name: 'outFactoryResult', meta: {code: 'xtpzgl-yhgl'}, component: outFactoryResult},
-		{path: 'smsResult', name: 'smsResult', meta: {code: 'xtpzgl-jggl'}, component: smsResult},
-		{path: 'arrivalPhoto', name: 'arrivalPhoto', meta: {code: 'xtpzgl-yhgl'}, component: arrivalPhoto},
-		{path: 'arrivalResult', name: 'arrivalResult', meta: {code: 'xtpzgl-yhgl'}, component: arrivalResult},
-		{path: 'distance', name: 'distance', meta: {code: 'xtpzgl-yhgl'}, component: distance},
-		{path: 'inTransit', name: 'inTransit', meta: {code: 'xtpzgl-yhgl'}, component: inTransit},
-		{path: 'inTransitAbnormal', name: 'inTransitAbnormal', meta: {code: 'xtpzgl-yhgl'}, component: inTransitAbnormal},
-		{path: 'inTransitAlarm', name: 'inTransitAlarm', meta: {code: 'xtpzgl-yhgl'}, component: inTransitAlarm},
-		{path: 'inTransitOrderMileage', name: 'inTransitOrderMileage', meta: {code: 'xtpzgl-yhgl'}, component: inTransitOrderMileage},
-		{path: 'pathView', name: 'pathView', meta: {code: 'xtpzgl-yhgl'}, component: pathView},
-		{path: 'receiptChildPhoto', name: 'receiptChildPhoto', meta: {code: 'xtpzgl-yhgl'}, component: receiptChildPhoto},
-		{path: 'receiptPhoto', name: 'receiptPhoto', meta: {code: 'xtpzgl-yhgl'}, component: receiptPhoto},
-		{path: 'receiptResult', name: 'receiptResult', meta: {code: 'xtpzgl-yhgl'}, component: receiptResult},
-		{path: 'transportInfo', name: 'transportInfo', meta: {code: 'xtpzgl-yhgl'}, component: transportInfo},
-		{path: 'enFactoryResult', name: 'enFactoryResult', meta: {code: 'xtpzgl-yhgl'}, component: enFactoryResult},
-		{path: 'grossWeightResult', name: 'grossWeightResult', meta: {code: 'xtpzgl-jggl'}, component: grossWeightResult},
-		{path: 'loadTruckResult', name: 'loadTruckResult', meta: {code: 'xtpzgl-yhgl'}, component: loadTruckResult},
-		{path: 'qualityResult', name: 'qualityResult', meta: {code: 'xtpzgl-yhgl'}, component: qualityResult},
-		{path: 'returnResult', name: 'returnResult', meta: {code: 'xtpzgl-yhgl'}, component: returnResult},
-		{path: 'tareWeightResult', name: 'tareWeightResult', meta: {code: 'xtpzgl-yhgl'}, component: tareWeightResult},
-		{path: 'disatchSteelSaleOrderAdd', name: 'disatchSteelSaleOrderAdd', meta: {code: 'xtpzgl-yhgl'}, component: disatchSteelSaleOrderAdd},
-		{path: 'dispatchCokeRailPlan', name: 'dispatchCokeRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: dispatchCokeRailPlan},
-		{path: 'dispatchCokeRailPlanAdd', name: 'dispatchCokeRailPlanAdd', meta: {code: 'xtpzgl-yhgl'}, component: dispatchCokeRailPlanAdd},
-		{path: 'dispatchCokeRailPlanCheck', name: 'dispatchCokeRailPlanCheck', meta: {code: 'xtpzgl-yhgl'}, component: dispatchCokeRailPlanCheck},
-		{path: 'dispatchOrder', name: 'dispatchOrder', meta: {code: 'xtpzgl-yhgl'}, component: dispatchOrder},
-		{path: 'dispatchSlagDayPlanAdd', name: 'dispatchSlagDayPlanAdd', meta: {code: 'xtpzgl-yhgl'}, component: dispatchSlagDayPlanAdd},
-		{path: 'dispatchSlagDayPlanCheck', name: 'dispatchSlagDayPlanCheck', meta: {code: 'xtpzgl-yhgl'}, component: dispatchSlagDayPlanCheck},
-		{path: 'dispatchSlagRailPlan', name: 'dispatchSlagRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: dispatchSlagRailPlan},
-		{path: 'dispatchSteelSaleOrder', name: 'dispatchSteelSaleOrder', meta: {code: 'xtpzgl-yhgl'}, component: dispatchSteelSaleOrder},
-		{path: 'dispatchSteelSaleOrderCheck', name: 'dispatchSteelSaleOrderCheck', meta: {code: 'xtpzgl-jggl'}, component: dispatchSteelSaleOrderCheck},
-		{path: 'receiveOrder', name: 'receiveOrder', meta: {code: 'xtpzgl-yhgl'}, component: receiveOrder},
-		{path: 'saleChemicalCokeOrder', name: 'saleChemicalCokeOrder', meta: {code: 'xtpzgl-yhgl'}, component: saleChemicalCokeOrder},
-		{path: 'saleCoproductOrder', name: 'saleCoproductOrder', meta: {code: 'xtpzgl-yhgl'}, component: saleCoproductOrder},
-		{path: 'saleSteelOrder', name: 'saleSteelOrder', meta: {code: 'xtpzgl-yhgl'}, component: saleSteelOrder},
-		{path: 'addBmsTrainFreight', name: 'addBmsTrainFreight', meta: {code: 'xtpzgl-yhgl'}, component: addBmsTrainFreight},
-		{path: 'bmsTrainFreight', name: 'bmsTrainFreight', meta: {code: 'xtpzgl-yhgl'}, component: bmsTrainFreight},
-		{path: 'updateBmsTrainFreight/:settlementId', name: 'updateBmsTrainFreight', meta: {code: 'xtpzgl-yhgl'}, component: updateBmsTrainFreight},
-		{path: 'addBmsTruckInvoice', name: 'addBmsTruckInvoice', meta: {code: 'xtpzgl-yhgl'}, component: addBmsTruckInvoice},
-		{path: 'addBmsTruckStatement', name: 'addBmsTruckStatement', meta: {code: 'xtpzgl-yhgl'}, component: addBmsTruckStatement},
-		{path: 'bmsTruckAudit/:statementId', name: 'bmsTruckAudit', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckAudit},
-		{path: 'bmsTruckDetailOrder', name: 'bmsTruckDetailOrder', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckDetailOrder},
-		{path: 'bmsTruckFormula', name: 'bmsTruckFormula', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckFormula},
-		{path: 'bmsTruckInvoice', name: 'bmsTruckInvoice', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckInvoice},
-		{path: 'bmsTruckStatement', name: 'bmsTruckStatement', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckStatement},
-		{path: 'getBmsTruckStatementOrder/:statementId', name: 'getBmsTruckStatementOrder', meta: {code: 'xtpzgl-yhgl'}, component: getBmsTruckStatementOrder},
-		{path: 'getTransportResult/:orderId', name: 'getTransportResult', meta: {code: 'xtpzgl-yhgl'}, component: getTransportResult},
-		{path: 'mapTest', name: 'mapTest', meta: {code: 'xtpzgl-yhgl'}, component: mapTest},  
-		{path: 'checkGPS', name: 'checkGPS', meta: {code: 'xtpzgl-yhgl'}, component: checkGPS},
-		{path: 'currentLocation', name: 'currentLocation', meta: {code: 'xtpzgl-yhgl'}, component: currentLocation},
-		{path: 'inTransitWarn', name: 'inTransitWarn', meta: {code: 'xtpzgl-yhgl'}, component: inTransitWarn},
-		{path: 'transportationPerformance', name: 'transportationPerformance', meta: {code: 'xtpzgl-yhgl'}, component: transportationPerformance},
-	  ] 
-	}
-  ];
-  const router = new Router({
-	routes: constantRouterMap
-  })
-  //  before
-  routerBefore(router, constantRouterMap);
-  
-  export default router;
-  //  constantRouterMap
-  export const routes = constantRouterMap;
-  
+      {
+        path: "outFactoryResult",
+        name: "outFactoryResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: outFactoryResult
+      },
+      {
+        path: "smsResult",
+        name: "smsResult",
+        meta: { code: "xtpzgl-jggl" },
+        component: smsResult
+      },
+      {
+        path: "arrivalPhoto",
+        name: "arrivalPhoto",
+        meta: { code: "xtpzgl-yhgl" },
+        component: arrivalPhoto
+      },
+      {
+        path: "arrivalResult",
+        name: "arrivalResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: arrivalResult
+      },
+      {
+        path: "distance",
+        name: "distance",
+        meta: { code: "xtpzgl-yhgl" },
+        component: distance
+      },
+      {
+        path: "inTransit",
+        name: "inTransit",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inTransit
+      },
+      {
+        path: "inTransitAbnormal",
+        name: "inTransitAbnormal",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inTransitAbnormal
+      },
+      {
+        path: "inTransitAlarm",
+        name: "inTransitAlarm",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inTransitAlarm
+      },
+      {
+        path: "inTransitOrderMileage",
+        name: "inTransitOrderMileage",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inTransitOrderMileage
+      },
+      {
+        path: "pathView",
+        name: "pathView",
+        meta: { code: "xtpzgl-yhgl" },
+        component: pathView
+      },
+      {
+        path: "receiptChildPhoto",
+        name: "receiptChildPhoto",
+        meta: { code: "xtpzgl-yhgl" },
+        component: receiptChildPhoto
+      },
+      {
+        path: "receiptPhoto",
+        name: "receiptPhoto",
+        meta: { code: "xtpzgl-yhgl" },
+        component: receiptPhoto
+      },
+      {
+        path: "receiptResult",
+        name: "receiptResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: receiptResult
+      },
+      {
+        path: "transportInfo",
+        name: "transportInfo",
+        meta: { code: "xtpzgl-yhgl" },
+        component: transportInfo
+      },
+      {
+        path: "enFactoryResult",
+        name: "enFactoryResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: enFactoryResult
+      },
+      {
+        path: "grossWeightResult",
+        name: "grossWeightResult",
+        meta: { code: "xtpzgl-jggl" },
+        component: grossWeightResult
+      },
+      {
+        path: "loadTruckResult",
+        name: "loadTruckResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: loadTruckResult
+      },
+      {
+        path: "qualityResult",
+        name: "qualityResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: qualityResult
+      },
+      {
+        path: "returnResult",
+        name: "returnResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: returnResult
+      },
+      {
+        path: "tareWeightResult",
+        name: "tareWeightResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: tareWeightResult
+      },
+      {
+        path: "disatchSteelSaleOrderAdd",
+        name: "disatchSteelSaleOrderAdd",
+        meta: { code: "xtpzgl-yhgl" },
+        component: disatchSteelSaleOrderAdd
+      },
+      {
+        path: "dispatchCokeRailPlan",
+        name: "dispatchCokeRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchCokeRailPlan
+      },
+      {
+        path: "dispatchCokeRailPlanAdd",
+        name: "dispatchCokeRailPlanAdd",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchCokeRailPlanAdd
+      },
+      {
+        path: "dispatchCokeRailPlanCheck",
+        name: "dispatchCokeRailPlanCheck",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchCokeRailPlanCheck
+      },
+      {
+        path: "dispatchOrder",
+        name: "dispatchOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchOrder
+      },
+      {
+        path: "dispatchSlagDayPlanAdd",
+        name: "dispatchSlagDayPlanAdd",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchSlagDayPlanAdd
+      },
+      {
+        path: "dispatchSlagDayPlanCheck",
+        name: "dispatchSlagDayPlanCheck",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchSlagDayPlanCheck
+      },
+      {
+        path: "dispatchSlagRailPlan",
+        name: "dispatchSlagRailPlan",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchSlagRailPlan
+      },
+      {
+        path: "dispatchSteelSaleOrder",
+        name: "dispatchSteelSaleOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dispatchSteelSaleOrder
+      },
+      {
+        path: "dispatchSteelSaleOrderCheck",
+        name: "dispatchSteelSaleOrderCheck",
+        meta: { code: "xtpzgl-jggl" },
+        component: dispatchSteelSaleOrderCheck
+      },
+      {
+        path: "receiveOrder",
+        name: "receiveOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: receiveOrder
+      },
+      {
+        path: "saleChemicalCokeOrder",
+        name: "saleChemicalCokeOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleChemicalCokeOrder
+      },
+      {
+        path: "saleCoproductOrder",
+        name: "saleCoproductOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleCoproductOrder
+      },
+      {
+        path: "saleSteelOrder",
+        name: "saleSteelOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleSteelOrder
+      },
+      {
+        path: "addBmsTrainFreight",
+        name: "addBmsTrainFreight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addBmsTrainFreight
+      },
+      {
+        path: "bmsTrainFreight",
+        name: "bmsTrainFreight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTrainFreight
+      },
+      {
+        path: "updateBmsTrainFreight/:settlementId",
+        name: "updateBmsTrainFreight",
+        meta: { code: "xtpzgl-yhgl" },
+        component: updateBmsTrainFreight
+      },
+      {
+        path: "addBmsTruckInvoice",
+        name: "addBmsTruckInvoice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addBmsTruckInvoice
+      },
+      {
+        path: "addBmsTruckStatement",
+        name: "addBmsTruckStatement",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addBmsTruckStatement
+      },
+      {
+        path: "bmsTruckAudit/:statementId",
+        name: "bmsTruckAudit",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckAudit
+      },
+      {
+        path: "bmsTruckDetailOrder",
+        name: "bmsTruckDetailOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckDetailOrder
+      },
+      {
+        path: "bmsTruckFormula",
+        name: "bmsTruckFormula",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckFormula
+      },
+      {
+        path: "bmsTruckInvoice",
+        name: "bmsTruckInvoice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckInvoice
+      },
+      {
+        path: "bmsTruckStatement",
+        name: "bmsTruckStatement",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckStatement
+      },
+      {
+        path: "getBmsTruckStatementOrder/:statementId",
+        name: "getBmsTruckStatementOrder",
+        meta: { code: "xtpzgl-yhgl" },
+        component: getBmsTruckStatementOrder
+      },
+      {
+        path: "getTransportResult/:orderId",
+        name: "getTransportResult",
+        meta: { code: "xtpzgl-yhgl" },
+        component: getTransportResult
+      },
+      {
+        path: "mapTest",
+        name: "mapTest",
+        meta: { code: "xtpzgl-yhgl" },
+        component: mapTest
+      },
+      {
+        path: "checkGPS",
+        name: "checkGPS",
+        meta: { code: "xtpzgl-yhgl" },
+        component: checkGPS
+      },
+      {
+        path: "currentLocation",
+        name: "currentLocation",
+        meta: { code: "xtpzgl-yhgl" },
+        component: currentLocation
+      },
+      {
+        path: "inTransitWarn",
+        name: "inTransitWarn",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inTransitWarn
+      },
+      {
+        path: "transportationPerformance",
+        name: "transportationPerformance",
+        meta: { code: "xtpzgl-yhgl" },
+        component: transportationPerformance
+      },
+      {
+        path: "bmsTruckSteelDetails",
+        name: "bmsTruckSteelDetails",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckSteelDetails
+      },
+      {
+        path: "bmsTruckSteelStatement",
+        name: "bmsTruckSteelStatement",
+        meta: { code: "xtpzgl-yhgl" },
+        component: bmsTruckSteelStatement
+      }
+    ]
+  }
+];
+const router = new Router({
+  routes: constantRouterMap
+});
+//  before
+routerBefore(router, constantRouterMap);
+
+export default router;
+//  constantRouterMap
+export const routes = constantRouterMap;

+ 205 - 0
src/views/statisticalReport/components/ShipWorkReport.vue

@@ -0,0 +1,205 @@
+<template>
+  <!-- 万州港作业报表 -->
+  <div class="ShipWorkReport">
+    <div style="height:100%;width:100%">
+      <div class="search" style="display:flex;margin: 10px;">
+        <el-input
+          placeholder="请输入"
+          v-model="map.input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input>
+       <el-date-picker style="margin: 10px;" v-model="map.startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;" v-model="map.endTime" type="datetime" placeholder="结束日期"></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="searchLoadData"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+      </div>
+      <!-- 装车出库详情 -->
+      <div class="loadData" style="height:500px;float:left;margin-left:5px">
+        <div style="font-size:16px;color:red">港口装车数据:共{{count}}车</div>
+        <div class="loadTable" style="height:500px;overflow:scroll;">
+             <el-table
+          ref="loadTable"
+          highlight-current-row
+          border
+          :data="loadTable"
+          :span-method="objectSpanMethod"
+          :row-style="{height:'40px'}"
+          style="width: 100%;font-size: 18px">
+          <el-table-column
+          align="center"
+            prop="materialName"
+            label="物资名"
+            width="300px">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="resultForeignShipName"
+            label="船号"
+            width="150px">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="num"
+            label="装车量"
+            width="150px">
+          </el-table-column>
+        </el-table>
+        </div >
+      </div>
+      <!-- 卸船作业 -->
+      <div class="right" style="margin-right=10px:10px;float:right;">
+        <div style="font-size:16px;color:red">港口卸船数据</div>
+           <el-table
+          ref="unLoadTable"
+          highlight-current-row
+          border
+          :data="unLoadTable"
+          :row-style="{height:'40px'}"
+          style="width: 100%;font-size: 18px">
+          <el-table-column
+          type="index"
+          width="50"
+          label="编号"
+          align="center"
+          fixed="left"
+          :resizable="false">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="status"
+            label="状态"
+            width="240px">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="num"
+            label="数量"
+            width="100px">
+          </el-table-column>
+        </el-table>
+    </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import {getCookie} from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+        count:0,
+        loadTable:[],
+        unLoadTable:[],
+        map:{
+            input:"",
+            startTime:null,
+            endTime:null
+        },
+        spanArr: [], // 用于存放需要合并的行的个数
+        spanIndex: 0, // 记录spanArr数组的下标
+      
+    };
+  },
+  mounted(){
+    this.searchLoadData();
+    this.searchUnLoadData();
+  },
+  methods: {
+    //查询装车数据
+    searchLoadData(){
+      //时间校验
+      if(this.map.startTime && this.map.endTime){
+        if(this.map.startTime>=this.map.endTime){
+            this.$message({
+                message:"结束日期必须大于起始日期!",
+                type:"warning",
+                duration:2000
+            });
+            return;
+        }
+        this.map.startTime=sjTime(this.map.startTime);
+        this.map.endTime=sjTime(this.map.endTime);
+      }else if((this.map.startTime && !this.map.endTime) || (!this.map.startTime && this.map.endTime)){
+        this.$message({
+            message:"起止日期错误!",
+            type:"warning",
+            duration:2000
+        });
+        return;
+      }
+      this.axios.post('/api/v1/tms/getLoadData',this.map).then((res)=>{
+        if(res.data.code == "200"){
+          this.getSpanArr(res.data.data);
+          this.loadTable=res.data.data;
+          this.count=0;
+          this.loadTable.forEach((item)=>{
+            this.count+=item.num;
+          });
+        }else {
+          this.$message({
+              type: "error", 
+              message: res.data.data,
+          });
+        }
+      })
+    },
+    //查询卸船
+    searchUnLoadData(){
+      this.axios.post('/api/v1/tms/getUnloadData').then((res)=>{
+        if(res.data.code == "200"){
+          this.unLoadTable=res.data.data;
+        }else {
+          this.$message({
+              type: "error", 
+              message: res.data.data,
+          });
+        }
+      })
+    },
+    //处理数据,得到合并数组
+    getSpanArr(data) {
+        this.spanArr=[];
+        for (let i = 0; i < data.length; i++) {
+            if (i == 0) {
+                this.spanArr.push(1);
+                this.spanIndex = 0;
+            } else {
+                // 判断当前行与前一行内容是否相同
+                if (data[i].materialName == data[i - 1].materialName) {
+                    this.spanArr[this.spanIndex] += 1; // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
+                    this.spanArr.push(0);// 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
+                } else {
+                    this.spanArr.push(1); // 否则,依旧是一行
+                    this.spanIndex = i;
+                }
+            }
+        }
+    },
+     //合并
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+        if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex]; // 行数
+            const _col = _row > 0 ? 1 : 0; // 列数
+            return {
+                rowspan: _row,
+                colspan: _col
+            };
+        }
+    },
+  },
+};
+</script>
+<style lang='scss'>
+
+</style>
+

+ 112 - 107
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -18,27 +18,6 @@
         </el-button>
       </div>
       <table-item :tableData="tableData" :col="col" id="pdfDom"> </table-item>
-      <table
-        border="0"
-        cellpadding="10"
-        cellspacing="0"
-        style="
-          margin: auto;
-          font-size: 21px;
-          font-family: FangSong;
-          line-height: 50px;
-        "
-
-        width="100%"
-        class="tablePart0"
-      >
-        <tr>
-          <!-- <td>{{stockString}}</td> -->
-          <td>
-            <span v-for="item in stockStringArr" :class="item.class" :key="item.value">{{item.value}}</span>
-          </td>
-        </tr>
-      </table>
     </div>
   </div>
 </template>
@@ -47,7 +26,7 @@ import tableItem from "./tableItem";
 export default {
   name: "TableView",
   components: {
-    tableItem,
+    tableItem
   },
   data() {
     return {
@@ -56,120 +35,120 @@ export default {
       col: [
         {
           prop: "materialType",
-          label: "矿种",
+          label: "矿种"
         },
         {
           prop: "pm",
-          label: "品名",
+          label: "品名"
         },
         {
           prop: "portName",
-          label: "港口名称",
+          label: "港口名称"
         },
         {
           prop: "tonnage",
-          label: "下游港口吨位",
+          label: "下游港口吨位"
         },
         {
           prop: "tonnage1",
-          label: "二层船吨位",
+          label: "二层船吨位"
         },
         {
           label: "未到闸船舶",
           children: [
             {
               prop: "capacity1",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber1",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue1",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime1",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "等闸船舶",
           children: [
             {
               prop: "capacity2",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber2",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue2",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime2",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "已过闸船舶",
           children: [
             {
               prop: "capacity3",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber3",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue3",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime3",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "到港待卸船舶",
           children: [
             {
               prop: "capacity4",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber4",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue4",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime4",
-              label: "离港时间",
+              label: "离港时间"
             },
             {
               prop: "dgsj",
-              label: "到港时间",
-            },
-          ],
-        },
+              label: "到港时间"
+            }
+          ]
+        }
       ],
       // 表格数据
 
       tableData: [],
       input: "",
       //万州港库存信息
-      stockString:null,
-      stockStringArr:[]
+      stockString: null,
+      stockStringArr: []
     };
   },
   created() {},
@@ -182,7 +161,7 @@ export default {
     onclick() {
       this.axios
         .post("/api/v1/tms/selectAllShipDynamaics?con=" + this.input)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             this.tableData = res.data.data;
             console.log("aaad" + res.data.data);
@@ -192,70 +171,96 @@ export default {
         });
     },
     initialization() {
-      this.axios.post("/api/v1/tms/selectAllShipDynamaics").then((res) => {
+      this.axios.post("/api/v1/tms/selectAllShipDynamaics").then(res => {
         if (res.data.code == "200") {
           this.tableData = res.data.data;
           console.log(this.tableData);
         } else {
           this.$message({
             type: "warning",
-            message: res.data.data,
+            message: res.data.data
           });
         }
       });
     },
-    getStockString(){
-      let that=this;
-      this.axios.post("/api/v1/wmsh/getLoadPortStockList?apiId=158&i=").then((res)=>{
-        console.log(res);
-        if(res.status=="200"){
-          let resultActualInstallations = 0;
-          res.data.data.list.forEach((e) => {
-            resultActualInstallations = resultActualInstallations + e.gmTonnage;
-          }); 
+    getStockString() {
+      let that = this;
+      this.axios
+        .post("/api/v1/wmsh/getLoadPortStockList?apiId=158&i=")
+        .then(res => {
+          console.log(res);
+          if (res.status == "200") {
+            let resultActualInstallations = 0;
+            res.data.data.list.forEach(e => {
+              resultActualInstallations =
+                resultActualInstallations + e.gmTonnage;
+            });
 
-          this.stockString +='万港库存'+ resultActualInstallations.toFixed(2) + "吨:";
-          this.stockStringArr.push({
-            class:"normal",
-            value:'万港库存'+ resultActualInstallations.toFixed(2) + "吨:"
-          });
+            this.stockString +=
+              "万港库存" + resultActualInstallations.toFixed(2) + "吨:";
+            this.stockStringArr.push({
+              class: "normal",
+              value: "万港库存" + resultActualInstallations.toFixed(2) + "吨:"
+            });
 
-          let materialName=res.data.data.list[0].materialName;
-          this.stockStringArr.push({
-            class:"black",
-            value:materialName+res.data.data.list[0].totalTonnage+"吨:"
-          })
-          this.stockString+=(materialName+res.data.data.list[0].totalTonnage+"吨 ");
+            let materialName = res.data.data.list[0].materialName;
+            this.stockStringArr.push({
+              class: "black",
+              value: materialName + res.data.data.list[0].totalTonnage + "吨:"
+            });
+            this.stockString +=
+              materialName + res.data.data.list[0].totalTonnage + "吨 ";
 
-          res.data.data.list.forEach((e) => {
-            if(e.materialName==materialName){
-              this.stockString+=(" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 ");
-               this.stockStringArr.push({
-                  class:"normal",
-                  value:" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 "
+            res.data.data.list.forEach(e => {
+              if (e.materialName == materialName) {
+                this.stockString +=
+                  " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 ";
+                this.stockStringArr.push({
+                  class: "normal",
+                  value:
+                    " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
                 });
-            }else{
-              materialName=e.materialName;
-              this.stockString+=(materialName+res.data.data.list[0].totalTonnage+"吨 ");
-              this.stockString+=(";"+materialName+e.totalTonnage+ "吨:"+" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 ");
-               this.stockStringArr.push({
-                class:"black",
-                value:";"+materialName+e.totalTonnage+ "吨:"
-              })
-              this.stockString+=(";"+materialName+e.totalTonnage+ "吨:"+" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 ");
-               this.stockStringArr.push({
-                class:"normal",
-                value:" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 "
-              })
-            }
-          });
-          console.log("arr:",this.stockStringArr);
-        }else{
-
-        }
-      });
+              } else {
+                materialName = e.materialName;
+                this.stockString +=
+                  materialName + res.data.data.list[0].totalTonnage + "吨 ";
+                this.stockString +=
+                  ";" +
+                  materialName +
+                  e.totalTonnage +
+                  "吨:" +
+                  " “" +
+                  e.resultForeignShipName +
+                  "”" +
+                  e.gmTonnage +
+                  "吨 ";
+                this.stockStringArr.push({
+                  class: "black",
+                  value: ";" + materialName + e.totalTonnage + "吨:"
+                });
+                this.stockString +=
+                  ";" +
+                  materialName +
+                  e.totalTonnage +
+                  "吨:" +
+                  " “" +
+                  e.resultForeignShipName +
+                  "”" +
+                  e.gmTonnage +
+                  "吨 ";
+                this.stockStringArr.push({
+                  class: "normal",
+                  value:
+                    " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
+                });
+              }
+            });
+            console.log("arr:", this.stockStringArr);
+          } else {
+          }
+        });
     }
-  },
+  }
 };
 </script>
 
@@ -276,8 +281,8 @@ export default {
     font-size: 20px;
     font-weight: 700;
   }
-  .black{
-      font-weight: 1000;
+  .black {
+    font-weight: 1000;
   }
 }
 </style>

+ 245 - 0
src/views/statisticalReport/components/dowmShipDynamicTable.vue

@@ -0,0 +1,245 @@
+<template>
+  <!-- 万州港作业报表 -->
+  <div class="dowmShipDynamicTable" style="width:100%">
+    <div style="height:100%;width:100%">
+      <div class="search" style="display:flex;margin: 10px;">
+        <el-input
+          placeholder="请输入"
+          v-model="map.input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input>
+       <el-date-picker style="margin: 10px;" v-model="map.startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;" v-model="map.endTime" type="datetime" placeholder="结束日期"></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="getTableData()"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+      </div>
+      <!-- 下游港口船舶动态表 -->
+      <div class="loadData" style="height:500px;margin-left:5px;width:100%">
+        <!-- <div style="font-size:16px;color:red">港口装车数据:共{{count}}车</div> -->
+        <div class="loadTable" style="height:500px;overflow:scroll;width:100%">
+        <el-table
+          ref="loadTable"
+          highlight-current-row
+          empty-text="请查询数据"
+          border
+          fit
+          show-summary
+          :summary-method="getSummaries"
+          :span-method="objectSpanMethod"
+          :data="tableData"
+          :row-style="{height:'40px'}"
+          style="width: 100%;font-size: 18px">
+          <el-table-column
+          align="center"
+            prop="portName"
+            label="放货港口"
+            width="100px">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="productName"
+            label="品种/数量/放货日期"
+            >
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="gmTonnage"
+            label="港口库存"
+            width="100px">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="capacityNumber"
+            label="船名"
+            width="150px">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="instructPlannedLoading"
+            label="计划吨位"
+            width="100px">
+          </el-table-column>
+           <el-table-column
+          align="center"
+          prop="shipDynamic"
+            label="船舶动态"
+            width="250px">
+            <template slot-scope="scope">
+                <el-input v-model="scope.row.shipDynamic"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column
+          align="center"
+            label="装船(吨)"
+            prop="loadDetails"
+            width="250px">
+            <template slot-scope="scope">
+            <el-input v-model="scope.row.loadDetails"></el-input>
+            </template>
+          </el-table-column>
+           <el-table-column fixed="right" label="操作" align="center" width="50">
+            <template slot-scope="scope">
+                <el-button @click="updateDynamic(scope.row)" type="text" size="small">保存</el-button>
+            </template>
+      </el-table-column>
+        </el-table>
+        </div >
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import {getCookie} from "@/utils/util.js";
+import BigNumber from "bignumber.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+        tableData:[],
+        spanArr: [], // 用于存放需要合并的行的个数
+        spanIndex: 0, // 记录spanArr数组的下标
+        map:{
+            input:"",
+            startTime:null,
+            endTime:null
+        },
+    };
+  },
+  mounted(){
+    //this.getTableData();
+  },
+  methods: {
+    //查询表格数据
+    getTableData(){
+      console.log("map",this.map);
+      //时间校验
+      if(this.map.startTime && this.map.endTime){
+        if(this.map.startTime>=this.map.endTime){
+            this.$message({
+                message:"结束日期必须大于起始日期!",
+                type:"warning",
+                duration:2000
+            });
+            return;
+        }
+        this.map.startTime=sjTime(this.map.startTime);
+        this.map.endTime=sjTime(this.map.endTime);
+      }else if((this.map.startTime && !this.map.endTime) || (!this.map.startTime && this.map.endTime)){
+        this.$message({
+            message:"起止日期错误!",
+            type:"warning",
+            duration:2000
+        });
+        return;
+      }
+      //发送请求
+      this.axios.post('/api/v1/tms/getDownShipDynamaics',this.map).then((res)=>{
+        if(res.data.code == "200"){
+            this.getSpanArr(res.data.data);//先得到合并数组
+            return Promise.resolve(res);
+        }else {
+          this.$message({
+              type: "error",
+              message: res.data.data,
+          });
+        }
+      }).then((res)=>{
+        //再给表格赋值
+        this.tableData=res.data.data;
+      });
+    },
+    updateDynamic(row){
+        console.log("row:",row);
+        if(!row.instructionsCapacityId){
+             this.$message.warning("无法保存,请先操作装船指令!");
+             return;
+        }
+        this.axios.post('/api/v1/tms/updateInstructionsCapacity',row).then((res)=>{
+            if(res.data.code == "200"){
+                this.$message.success("保存成功!");
+                this.getTableData();
+            }else {
+                this.$message({
+                    type: "error",
+                    message: res.data.data,
+                });
+            }
+        });
+    },
+    getSummaries(param) {
+        console.log("param",param);
+        const { columns, data } = param;
+        const sums = [];
+        columns.forEach((column, index) => {
+          if (index === 0) {
+            sums[index] = '合计';
+            return;
+          }
+          if (index === 3 || index===5) {
+            sums[index] = '';
+            return;
+          }
+          const values = data.map(item => Number(item[column.property]));
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return new BigNumber(prev).plus(curr).toNumber();
+              } else {
+                return prev;
+              }
+            }, 0);
+          } else {
+            sums[index] = '';
+          }
+        });
+        return sums;
+    },
+    //处理数据,得到合并数组
+    getSpanArr(data) {
+        this.spanArr=[];
+        for (let i = 0; i < data.length; i++) {
+            if (i == 0) {
+                this.spanArr.push(1);
+                this.spanIndex = 0;
+            } else {
+                // 判断当前行与前一行内容是否相同
+                if (data[i].portName == data[i - 1].portName) {
+                    this.spanArr[this.spanIndex] += 1; // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
+                    this.spanArr.push(0);// 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
+                } else {
+                    this.spanArr.push(1); // 否则,依旧是一行
+                    this.spanIndex = i;
+                }
+            }
+        }
+        console.log("spanArr",this.spanArr);
+    },
+    //合并
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+        if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex]; // 行数
+            const _col = _row > 0 ? 1 : 0; // 列数
+            return {
+                rowspan: _row,
+                colspan: _col
+            };
+        }
+    },
+  },
+};
+</script>
+<style lang='scss'>
+
+</style>
+

+ 6 - 1
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelAllReport.vue

@@ -85,7 +85,7 @@
         border
         stripe
         style="width: 100%; margin-top: 20px"
-        max-height="800px"
+        max-height="600px"
         @cell-click="cellClik"
         :row-style="{ height: '30px' }"
         :cell-style="{ fontWeight: '700' }"
@@ -1336,6 +1336,11 @@ export default {
   .table {
     margin-left: 20px;
     margin-top: 20px;
+    ::-webkit-scrollbar {
+      // width: 20px;
+      height: 30px;
+      background-color: transparent;
+    }
   }
   .address {
     .button-box {

+ 113 - 0
src/views/statisticalReport/components/tableItem.vue

@@ -28,6 +28,16 @@
           <span class="empty-desc">暂无数据</span>
         </div>
       </template>
+      <div slot="append">
+        <div class="appendSlot">
+          <span
+            v-for="item in stockStringArr"
+            :class="item.class"
+            :key="item.value"
+            >{{ item.value }}</span
+          >
+        </div>
+      </div>
     </el-table>
   </div>
 </template>
@@ -70,7 +80,92 @@ export default {
       default: false // 默认不展示
     }
   },
+  data() {
+    return {
+      stockString: null,
+      stockStringArr: []
+    };
+  },
+  mounted() {
+    this.getStockString();
+  },
   methods: {
+    getStockString() {
+      let that = this;
+      this.axios
+        .post("/api/v1/wmsh/getLoadPortStockList?apiId=158&i=")
+        .then(res => {
+          console.log(res);
+          if (res.status == "200") {
+            let resultActualInstallations = 0;
+            res.data.data.list.forEach(e => {
+              resultActualInstallations =
+                resultActualInstallations + e.gmTonnage;
+            });
+
+            this.stockString +=
+              "万港库存" + resultActualInstallations.toFixed(2) + "吨:";
+            this.stockStringArr.push({
+              class: "normalFirst",
+              value: "万港库存" + resultActualInstallations.toFixed(2) + "吨:"
+            });
+
+            let materialName = res.data.data.list[0].materialName;
+            this.stockStringArr.push({
+              class: "black",
+              value: materialName + res.data.data.list[0].totalTonnage + "吨:"
+            });
+            this.stockString +=
+              materialName + res.data.data.list[0].totalTonnage + "吨 ";
+
+            res.data.data.list.forEach(e => {
+              if (e.materialName == materialName) {
+                this.stockString +=
+                  " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 ";
+                this.stockStringArr.push({
+                  class: "normal",
+                  value:
+                    " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
+                });
+              } else {
+                materialName = e.materialName;
+                this.stockString +=
+                  materialName + res.data.data.list[0].totalTonnage + "吨 ";
+                this.stockString +=
+                  ";" +
+                  materialName +
+                  e.totalTonnage +
+                  "吨:" +
+                  " “" +
+                  e.resultForeignShipName +
+                  "”" +
+                  e.gmTonnage +
+                  "吨 ";
+                this.stockStringArr.push({
+                  class: "black",
+                  value: ";" + materialName + e.totalTonnage + "吨:"
+                });
+                this.stockString +=
+                  ";" +
+                  materialName +
+                  e.totalTonnage +
+                  "吨:" +
+                  " “" +
+                  e.resultForeignShipName +
+                  "”" +
+                  e.gmTonnage +
+                  "吨 ";
+                this.stockStringArr.push({
+                  class: "normal",
+                  value:
+                    " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
+                });
+              }
+            });
+            console.log("arr:", this.stockStringArr);
+          }
+        });
+    },
     headerCellStyle({ row, column, rowIndex, columnIndex }) {
       let columnIndexList1 = [5];
       let columnIndexList2 = [6];
@@ -180,3 +275,21 @@ export default {
   padding: 0.4375rem 0 !important;
 }
 </style>
+<style lang="scss" scoped>
+.el-table {
+  .appendSlot {
+    margin-left: 10%;
+    font-size: 18px;
+    line-height: 20px;
+    .normalFirst {
+      margin-left: 42px;
+    }
+    // display: flex;
+    // // align-items: center;
+    // // justify-content: center;
+    .black {
+      font-weight: 700;
+    }
+  }
+}
+</style>

+ 217 - 0
src/views/statisticalReport/components/wanzhouReport/loadWagonWorkReport.vue

@@ -0,0 +1,217 @@
+<template>
+  <!-- 万州港装船作业报表 -->
+  <div class="ShipWorkReport" style="width:100%;">
+    <div style="height:100%;width:100%">
+      <div class="search" style="display:flex;margin: 10px;">
+        <el-input
+          placeholder="请输入"
+          v-model="map.input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input>
+       <el-date-picker style="margin: 10px;" v-model="map.startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;" v-model="map.endTime" type="datetime" placeholder="结束日期"></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="searchLoadData"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="exportToExcel('装车作业统计.xlsx')"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-download"></i>导出excel
+        </el-button>
+      </div>
+
+      <!-- 装车出库详情 -->
+      <div ref="loadWagonData" style="width:100%;height:500px;float:left;margin-left:5px">
+        <div style="font-size:16px;color:red">港口装车数据:共{{count}}车</div>
+        <div class="loadTable" style="height:500px;width:100%;overflow:scroll;">
+             <el-table
+          ref="loadTable"
+          highlight-current-row
+          border
+          fit
+          show-summary
+          :summary-method="getSummaries"
+          :data="loadTable"
+          :span-method="objectSpanMethod"
+          :row-style="{height:'40px'}"
+          style="width: 100%;font-size: 18px">
+          <el-table-column
+          align="center"
+            prop="materialName"
+            label="物资名">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="resultForeignShipName"
+            label="船号">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="num"
+            label="装车量">
+          </el-table-column>
+        </el-table>
+        </div >
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import {getCookie} from "@/utils/util.js";
+import FileSaver from "file-saver";
+import BigNumber from "bignumber.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+        count:0,
+        loadTable:[],
+        unLoadTable:[],
+        map:{
+            input:"",
+            startTime:null,
+            endTime:null
+        },
+        spanArr: [], // 用于存放需要合并的行的个数
+        spanIndex: 0, // 记录spanArr数组的下标
+      
+    };
+  },
+  mounted(){
+    this.searchLoadData();
+  },
+  methods: {
+    //查询装车数据
+    searchLoadData(){
+      //时间校验
+      if(this.map.startTime && this.map.endTime){
+        if(this.map.startTime>=this.map.endTime){
+            this.$message({
+                message:"结束日期必须大于起始日期!",
+                type:"warning",
+                duration:2000
+            });
+            return;
+        }
+        this.map.startTime=sjTime(this.map.startTime);
+        this.map.endTime=sjTime(this.map.endTime);
+      }else if((this.map.startTime && !this.map.endTime) || (!this.map.startTime && this.map.endTime)){
+        this.$message({
+            message:"起止日期错误!",
+            type:"warning",
+            duration:2000
+        });
+        return;
+      }
+      this.axios.post('/api/v1/tms/getLoadData',this.map).then((res)=>{
+        if(res.data.code == "200"){
+          this.getSpanArr(res.data.data);
+          this.loadTable=res.data.data;
+          this.count=0;
+          this.loadTable.forEach((item)=>{
+            this.count+=item.num;
+          });
+        }else {
+          this.$message({
+              type: "error", 
+              message: res.data.data,
+          });
+        }
+      })
+    },
+    //处理数据,得到合并数组
+    getSpanArr(data) {
+        this.spanArr=[];
+        for (let i = 0; i < data.length; i++) {
+            if (i == 0) {
+                this.spanArr.push(1);
+                this.spanIndex = 0;
+            } else {
+                // 判断当前行与前一行内容是否相同
+                if (data[i].materialName == data[i - 1].materialName) {
+                    this.spanArr[this.spanIndex] += 1; // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
+                    this.spanArr.push(0);// 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
+                } else {
+                    this.spanArr.push(1); // 否则,依旧是一行
+                    this.spanIndex = i;
+                }
+            }
+        }
+    },
+     //合并
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+        if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex]; // 行数
+            const _col = _row > 0 ? 1 : 0; // 列数
+            return {
+                rowspan: _row,
+                colspan: _col
+            };
+        }
+    },
+    exportToExcel(tableTitle) {
+        let tables = this.$refs.loadWagonData;
+        let table_book = XLSX.utils.table_to_book(tables);
+        var table_write = XLSX.write(table_book, {
+            bookType: "xlsx",
+            bookSST: true,
+            type: "array"
+        });
+        try {
+            FileSaver.saveAs(
+                new Blob([table_write], { type: "application/octet-stream" }),
+                tableTitle
+            );
+        } catch (e) {
+            if (typeof console !== "undefined") console.log(e, table_write);
+        }
+        return table_write;
+    },
+     getSummaries(param) {
+        console.log("param",param);
+        const { columns, data } = param;
+        const sums = [];
+        columns.forEach((column, index) => {
+          if (index === 0) {
+            sums[index] = '合计';
+            return;
+          }
+          if (index === 1 ) {
+            sums[index] = '';
+            return;
+          }
+          const values = data.map(item => Number(item[column.property]));
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return new BigNumber(prev).plus(curr).toNumber();
+              } else {
+                return prev;
+              }
+            }, 0);
+          } else {
+            sums[index] = '';
+          }
+        });
+        return sums;
+    },
+  },
+};
+</script>
+<style lang='scss'>
+
+</style>
+

+ 144 - 0
src/views/statisticalReport/components/wanzhouReport/unloadShipWorkReport.vue

@@ -0,0 +1,144 @@
+<template>
+  <!-- 万州港卸船作业报表 -->
+  <div class="ShipWorkReport" style="width:100%;">
+    <div style="height:100%;width:100%">
+      <div class="search" style="display:flex;margin: 10px;">
+        <el-input
+          placeholder="请输入"
+          v-model="map.input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input>
+       <el-date-picker style="margin: 10px;" v-model="map.startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;" v-model="map.endTime" type="datetime" placeholder="结束日期"></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="searchUnLoadData"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="exportToExcel('卸船作业统计.xlsx')"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-download"></i>导出excel
+        </el-button>
+      </div>
+      <!-- 装车出库详情 -->
+      <div ref="unloadData" style="height:500px;width:100%;float:left;margin-left:5px">
+        <div style="font-size:16px;color:red">港口卸船数据</div>
+        <div class="loadTable" style="height:500px;width:100%;overflow:scroll;">
+             <el-table
+          ref="loadTable"
+          highlight-current-row
+          border
+          fit
+          :data="unLoadTable"
+          :row-style="{height:'40px'}"
+          style="width: 100%;font-size: 18px">
+          <el-table-column
+          align="center"
+            prop="status"
+            label="状态">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="num"
+            label="数量">
+          </el-table-column>
+        </el-table>
+        </div >
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import {getCookie} from "@/utils/util.js";
+import FileSaver from "file-saver";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+        count:0,
+        loadTable:[],
+        unLoadTable:[],
+        map:{
+            input:"",
+            startTime:null,
+            endTime:null
+        },
+        spanArr: [], // 用于存放需要合并的行的个数
+        spanIndex: 0, // 记录spanArr数组的下标
+      
+    };
+  },
+  mounted(){
+    this.searchUnLoadData();
+  },
+  methods: {
+    //查询卸船
+    searchUnLoadData(){
+        //时间校验
+      if(this.map.startTime && this.map.endTime){
+        if(this.map.startTime>=this.map.endTime){
+            this.$message({
+                message:"结束日期必须大于起始日期!",
+                type:"warning",
+                duration:2000
+            });
+            return;
+        }
+        this.map.startTime=sjTime(this.map.startTime);
+        this.map.endTime=sjTime(this.map.endTime);
+      }else if((this.map.startTime && !this.map.endTime) || (!this.map.startTime && this.map.endTime)){
+        this.$message({
+            message:"起止日期错误!",
+            type:"warning",
+            duration:2000
+        });
+        return;
+      }
+      this.axios.post('/api/v1/tms/getUnloadData',this.map).then((res)=>{
+        if(res.data.code == "200"){
+          this.unLoadTable=res.data.data;
+        }else {
+          this.$message({
+              type: "error", 
+              message: res.data.data,
+          });
+        }
+      })
+    },
+    //   点击按钮  导出excel表格:
+    exportToExcel(tableTitle) {
+        let tables = this.$refs.unloadData;
+        let table_book = XLSX.utils.table_to_book(tables);
+        var table_write = XLSX.write(table_book, {
+            bookType: "xlsx",
+            bookSST: true,
+            type: "array"
+        });
+        try {
+            FileSaver.saveAs(
+                new Blob([table_write], { type: "application/octet-stream" }),
+                tableTitle
+            );
+        } catch (e) {
+            if (typeof console !== "undefined") console.log(e, table_write);
+        }
+        return table_write;
+    },
+  },
+};
+</script>
+<style lang='scss'>
+
+</style>
+

+ 178 - 0
src/views/statisticalReport/components/wanzhouReport/wagonWorkReport.vue

@@ -0,0 +1,178 @@
+<template>
+  <!-- 车皮作业报表 -->
+  <div class="ShipWorkReport" style="width:100%;">
+    <div style="height:100%;width:100%">
+      <div class="search" style="display:flex;margin: 10px;">
+        <!-- <el-input
+          placeholder="请输入"
+          v-model="map.input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input> -->
+       <el-date-picker style="margin: 10px;" v-model="map.startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;" v-model="map.endTime" type="datetime" placeholder="结束日期"></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="searchLoadData"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="exportToExcel('车皮作业统计.xlsx')"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-download"></i>导出excel
+        </el-button>
+      </div>
+
+      <!-- 装车出库详情 -->
+      <div ref="loadWagonData" style="height:500px;float:left;margin-left:5px;width:100%">
+        <div class="loadTable" style="height:500px;overflow:scroll;width:100%">
+             <el-table
+          ref="loadTable"
+          highlight-current-row
+          border
+          fit
+          :data="loadTable"
+          :row-style="{height:'40px'}"
+          style="width: 100%;font-size: 18px">
+          <el-table-column
+          align="center"
+            prop="dateType"
+            label="数据类型">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="num"
+            label="装车量">
+          </el-table-column>
+        </el-table>
+        </div >
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import {getCookie} from "@/utils/util.js";
+import FileSaver from "file-saver";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+        count:0,
+        loadTable:[],
+        unLoadTable:[],
+        map:{
+            input:"",
+            startTime:null,
+            endTime:null
+        },
+        spanArr: [], // 用于存放需要合并的行的个数
+        spanIndex: 0, // 记录spanArr数组的下标
+      
+    };
+  },
+  mounted(){
+    this.searchLoadData();
+  },
+  methods: {
+    //查询装车数据
+    searchLoadData(){
+      //时间校验
+      if(this.map.startTime && this.map.endTime){
+        if(this.map.startTime>=this.map.endTime){
+            this.$message({
+                message:"结束日期必须大于起始日期!",
+                type:"warning",
+                duration:2000
+            });
+            return;
+        }
+        this.map.startTime=sjTime(this.map.startTime);
+        this.map.endTime=sjTime(this.map.endTime);
+      }else if((this.map.startTime && !this.map.endTime) || (!this.map.startTime && this.map.endTime)){
+        this.$message({
+            message:"起止日期错误!",
+            type:"warning",
+            duration:2000
+        });
+        return;
+      }
+      this.axios.post('/api/v1/tms/getWagonWork',this.map).then((res)=>{
+        if(res.data.code == "200"){
+          this.getSpanArr(res.data.data);
+          this.loadTable=res.data.data;
+          this.count=0;
+          this.loadTable.forEach((item)=>{
+            this.count+=item.num;
+          });
+        }else {
+          this.$message({
+              type: "error", 
+              message: res.data.data,
+          });
+        }
+      })
+    },
+    //处理数据,得到合并数组
+    getSpanArr(data) {
+        this.spanArr=[];
+        for (let i = 0; i < data.length; i++) {
+            if (i == 0) {
+                this.spanArr.push(1);
+                this.spanIndex = 0;
+            } else {
+                // 判断当前行与前一行内容是否相同
+                if (data[i].materialName == data[i - 1].materialName) {
+                    this.spanArr[this.spanIndex] += 1; // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
+                    this.spanArr.push(0);// 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
+                } else {
+                    this.spanArr.push(1); // 否则,依旧是一行
+                    this.spanIndex = i;
+                }
+            }
+        }
+    },
+     //合并
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+        if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex]; // 行数
+            const _col = _row > 0 ? 1 : 0; // 列数
+            return {
+                rowspan: _row,
+                colspan: _col
+            };
+        }
+    },
+    exportToExcel(tableTitle) {
+        let tables = this.$refs.loadWagonData;
+        let table_book = XLSX.utils.table_to_book(tables);
+        var table_write = XLSX.write(table_book, {
+            bookType: "xlsx",
+            bookSST: true,
+            type: "array"
+        });
+        try {
+            FileSaver.saveAs(
+                new Blob([table_write], { type: "application/octet-stream" }),
+                tableTitle
+            );
+        } catch (e) {
+            if (typeof console !== "undefined") console.log(e, table_write);
+        }
+        return table_write;
+    },
+  },
+};
+</script>
+<style lang='scss'>
+
+</style>
+

+ 41 - 0
src/views/statisticalReport/router/index.js

@@ -7,6 +7,8 @@ import routerBefore from "@/config/routerBefore.js";
 import main from "@/components/main.vue";
 // 系统配置管理
 import ShipDynamicTable from "../components/Ship_dynamic_table.vue";
+import ShipWorkReport from "../components/ShipWorkReport.vue";
+import dowmShipDynamicTable from "../components/dowmShipDynamicTable.vue";
 import purchaseAccessoriesMonitor from "../components/purchaseAccessoriesMonitor.vue";
 import purchasFuelOldMonitor from "../components/purchasFuelMonitor/purchasFuelOldMonitor.vue";
 import purchasFuelNewMonitor from "../components/purchasFuelMonitor/purchasFuelNewMonitor.vue";
@@ -30,6 +32,9 @@ import inwardAssemble from "../components/inwardAssemble/inwardAssemble.vue";
 import loadCapacityDetail from "../components/loadCapacityDetail/loadCapacityDetail.vue";
 import allInwardReport from "../components/inwardReport/allInwardReport.vue";
 import saleSteelAllReport from "../components/salesLogisticsStatistics/saleSteelAllReport.vue";
+import loadWagonWorkReport from "../components/wanzhouReport/loadWagonWorkReport.vue";
+import unloadShipWorkReport from "../components/wanzhouReport/unloadShipWorkReport.vue";
+import wagonWorkReport from "../components/wanzhouReport/wagonWorkReport.vue";
 Vue.use(Router);
 
 const constantRouterMap = [
@@ -58,6 +63,18 @@ const constantRouterMap = [
         meta: { code: "xtpzgl-yhgl" },
         component: ShipDynamicTable
       },
+      {
+        path: "ShipWorkReport",
+        name: "ShipWorkReport",
+        meta: { code: "xtpzgl-yhgl" },
+        component: ShipWorkReport
+      },
+      {
+        path: "dowmShipDynamicTable",
+        name: "dowmShipDynamicTable",
+        meta: { code: "xtpzgl-yhgl" },
+        component: dowmShipDynamicTable
+      },
       {
         path: "purchaseAccessoriesMonitor",
         name: "purchaseAccessoriesMonitor",
@@ -185,6 +202,30 @@ const constantRouterMap = [
           code: "xtpzgl-yhgl"
         },
         component: saleSteelAllReport
+      },
+      {
+        path: "loadWagonWorkReport",
+        name: "loadWagonWorkReport",
+        meta: {
+          code: "xtpzgl-yhgl"
+        },
+        component: loadWagonWorkReport
+      },
+      {
+        path: "unloadShipWorkReport",
+        name: "unloadShipWorkReport",
+        meta: {
+          code: "xtpzgl-yhgl"
+        },
+        component: unloadShipWorkReport
+      },
+      {
+        path: "wagonWorkReport",
+        name: "wagonWorkReport",
+        meta: {
+          code: "xtpzgl-yhgl"
+        },
+        component: wagonWorkReport
       }
     ]
   }

Vissa filer visades inte eftersom för många filer har ändrats