luobang 3 år sedan
förälder
incheckning
75eb771f92
46 ändrade filer med 4999 tillägg och 860 borttagningar
  1. 5 6
      build/utils.js
  2. 2 4
      config/index.js
  3. BIN
      dist.rar
  4. 11 5
      package.json
  5. 0 1
      src/components/DilCommonUI/packages/table/src/table.vue
  6. 5 2
      src/views/RMS/components/addCarrier.vue
  7. 41 42
      src/views/TMS/components/domesticMine/approveWagonPleaseAdd.vue
  8. 4 3
      src/views/TMS/components/domesticMine/wagonLoadAdd.vue
  9. 2 0
      src/views/TMS/components/domesticMine/wagonLoadMine.vue
  10. 1 1
      src/views/TMS/components/domesticMine/wagonLoadbu.vue
  11. 94 27
      src/views/TMS/components/domesticMine/wagonPleaseAdd.vue
  12. 0 1
      src/views/TMS/components/domesticMine/wagonPleaseMine.vue
  13. 20 17
      src/views/TMS/components/domesticMine/wagonUnLoadAdd.vue
  14. 8 13
      src/views/TMS/components/importedEmergency/addWagonLoadEmergency.vue
  15. 2 8
      src/views/TMS/components/importedEmergency/addWagonUnLoadEmergency.vue
  16. 1 1
      src/views/TMS/components/importedEmergency/entrustEmergency.vue
  17. 3 2
      src/views/TMS/components/importedEmergency/wagonUnLoadEmergency.vue
  18. 0 6
      src/views/TMS/components/importedMine/addWagonPlease.vue
  19. 1 1
      src/views/TMS/components/importedMine/wagonApprove.vue
  20. 2 2
      src/views/TMS/router/index.js
  21. 353 0
      src/views/WMS/components/billingOrder/updateBill.vue
  22. 2 1
      src/views/WMS/router/index.js
  23. 1095 217
      src/views/appoint/components/saleContract/addSaleOrder.vue
  24. 2 3
      src/views/appoint/components/saleContract/addSaleOrderSend.vue
  25. 749 0
      src/views/appoint/components/saleContract/addSaleOrderSteelSend.vue
  26. 713 0
      src/views/appoint/components/saleContract/addSaleOrderSteelSendCarrier.vue
  27. 90 79
      src/views/appoint/components/saleContract/addTransportPrice.vue
  28. 29 121
      src/views/appoint/components/saleContract/saleOrder.vue
  29. 4 95
      src/views/appoint/components/saleContract/saleOrderCoproduct.vue
  30. 1 1
      src/views/appoint/components/saleContract/saleOrderCoproductCarrier.vue
  31. 446 0
      src/views/appoint/components/saleContract/saleOrderSteel.vue
  32. 358 0
      src/views/appoint/components/saleContract/saleOrderSteelCar.vue
  33. 185 0
      src/views/appoint/components/saleContract/saleOrderSteelCarrier.vue
  34. 532 0
      src/views/appoint/components/saleContract/saleOrderSteelEmpower.vue
  35. 12 0
      src/views/appoint/router/index.js
  36. 3 0
      src/views/inward/components/truckAppoint/addRequirement2.vue
  37. 29 28
      src/views/sale/app.js
  38. 24 49
      src/views/sale/components/offSiteTransportation/inTransit.vue
  39. 12 10
      src/views/sale/components/offSiteTransportation/mapTest.vue
  40. 4 4
      src/views/sale/components/saleSelfMachine/printScan.vue
  41. 4 1
      src/views/sale/components/saleSelfMachine/printWarranty.vue
  42. 1 1
      src/views/sale/components/transport_appointment/openDistributionSection.vue
  43. 96 105
      src/views/sale/components/transport_excute/tms-offsite/arrivalResult.vue
  44. 3 3
      src/views/sale/components/transport_order/receiveOrder.vue
  45. 46 0
      src/views/statisticalReport/components/defendCapacity/getCapacityByDefend.vue
  46. 4 0
      src/views/statisticalReport/router/index.js

+ 5 - 6
build/utils.js

@@ -15,14 +15,13 @@ 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 = ['all']
-let devModules = ['index','statisticalReport','inward']
+// let devModules = ['all']
+let devModules = ['index','TMS','WMS'];
+// let devModules = ['index','appoint','WMS'];
+// let devModules = ['index','inward','SporadicManage']
 // let devModules = ['index','sale','RMS']
 // let devModules = ['index','SporadicManage','RMS','statisticalReport']
-// let devModules = ['index','inward','statisticalReport']
+// let devModules = ['index','inward','statisticalReport','TMS']
 //  let devModules = ['index','WMS','sale','TMS','inward','SporadicManage']
 // let devModules = ['index','SporadicManage','TMS','statisticalReport','RMS'];
 // let devModules = ['index','RMS'];

+ 2 - 4
config/index.js

@@ -65,16 +65,14 @@ let proxyTable = {
   // 所有数据的请求域名地址
   "/api/v1": {
     // target: "http://172.16.33.166:8080",
-    target: "http://localhost:8081",
-    // target: "http://localhost:8019",
+    target: "http://192.168.1.100:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"
     }
   },
   "/views/api/v1": {
-    // target: "http://localhost:8080",
-     target: "http://172.16.33.166:8080",
+    target: "http://172.16.33.166:8080",
     // target: "http://192.168.1.115:8080",
     ws: true,
     pathRewrite: {

BIN
dist.rar


+ 11 - 5
package.json

@@ -15,18 +15,21 @@
     "testc": "cross-env NODE_ENV=test nyc mocha-webpack --webpack-config build/webpack.test.conf.js --require test/setup.js test/**/*.spec.js"
   },
   "dependencies": {
+    "@amap/amap-jsapi-loader": "^1.0.1",
     "@antv/g6": "1.2.8",
+    "@vue/reactivity": "^3.2.31",
+    "amap-js": "^2.4.0",
     "apollo-cache-inmemory": "^1.5.1",
     "apollo-client": "^2.5.1",
     "apollo-link": "^1.2.11",
     "apollo-link-error": "^1.1.11",
     "apollo-link-http": "^1.5.14",
-    "axios": "^0.18.0",
+    "axios": "^0.26.1",
     "babel-polyfill": "^6.26.0",
     "crypto": "^1.0.1",
     "echarts": "^4.1.0",
     "el-cascader-multi": "^1.1.8",
-    "element-ui": "2.4.2",
+    "element-ui": "2.13.2",
     "file-saver": "^1.3.8",
     "graphql": "^14.1.1",
     "graphql-tag": "^2.10.1",
@@ -44,7 +47,9 @@
     "socket.io-stream": "^0.9.1",
     "sockjs-client": "^1.3.0",
     "uuid": "^3.3.2",
+    "view-design": "^4.7.0",
     "vue": "^2.5.2",
+    "vue-amap": "^0.5.10",
     "vue-apollo": "^3.0.0-beta.28",
     "vue-baidu-map": "^0.21.19",
     "vue-clipboard2": "^0.2.1",
@@ -53,13 +58,14 @@
     "vue-property-decorator": "^8.2.1",
     "vue-quill-editor": "^3.0.5",
     "vue-router": "^3.0.1",
+    "vue-social-share": "0.0.3",
     "vue-splitpane": "^1.0.2",
     "vuescroll": "^4.17.3",
     "vuex": "^3.0.1",
     "vxe-table": "^3.4.12",
     "x2js": "^3.3.0",
-    "xe-utils": "^3.5.1",
-    "xlsx": "^0.11.19",
+    "xe-utils": "^3.5.4",
+    "xlsx": "^0.18.4",
     "xterm": "3.12.0"
   },
   "devDependencies": {
@@ -124,7 +130,7 @@
     "sass-loader": "^6.0.6",
     "selenium-server": "^3.0.1",
     "semver": "^5.3.0",
-    "shelljs": "^0.7.6",
+    "shelljs": "^0.8.5",
     "uglifyjs-webpack-plugin": "^1.1.1",
     "url-loader": "^0.5.8",
     "vue-jest": "^1.0.2",

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

@@ -7,7 +7,6 @@
       row-key="ROW_ID"
       :stripe="stripe"
       :border="border"
-      :row-class-name="tableRowClassName"
       :cell-class-name="cellClassName"
       :height="height"
       :highlight-current-row="highlightCurrentRow"

+ 5 - 2
src/views/RMS/components/addCarrier.vue

@@ -234,6 +234,11 @@ export default {
       this.bidAreaId = selection.bidAreaId;
     },
     makeSure() {
+      console.log(this.input.length)
+      if(this.input.length > 14){
+        this.$message.error("账号长度不能大于十四个字")
+        return
+      }
       let status = false;
       this.form1.carrierContactNumber = parseInt(this.form1.carrierContactNumber);
       if (!this.input) {
@@ -280,7 +285,6 @@ export default {
         this.$store
           .dispatch("system/usersManage/addUser", fromData)
           .then((res) => {
-            console.log(1)
             if (res.code === "0") {
               let userId = res.data.userId;
               this.axios
@@ -292,7 +296,6 @@ export default {
                     "&roleId=924449091658846208"
                 )
                 .then((res) => {
-                  console.log(2)
                   if (res.code == "0") {
                     //图片地址
                     let imageUrls = {

+ 41 - 42
src/views/TMS/components/domesticMine/approveWagonPleaseAdd.vue

@@ -2,7 +2,7 @@
   <!-- 新增批车作业页面 -->
   <div id="contractDetails">
     <page-title>返回</page-title>
-  <div>
+    <div>
       <dilTable
         v-bind.sync="option"
         v-model="table1"
@@ -27,6 +27,9 @@
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+
 export default {
   components: { PageTitle },
   data() {
@@ -65,7 +68,7 @@ export default {
       let approveWagonPlease = {
         resultId: this.inf.resultId,
         resultApproveDate: sjTime(this.form1.resultApproveDate),
-        resultApproveNumber: this.form1.resultApproveNumber
+        resultApproveNumber: this.form1.resultApproveNumber,
       };
       function isNumber() {
         var value = approveWagonPlease.resultApproveNumber;
@@ -79,29 +82,29 @@ export default {
       }
       var val = this.value;
       if (
-        approveWagonPlease.resultId==null||
-        approveWagonPlease.resultApproveDate==null||
-        approveWagonPlease.resultApproveNumber==null
-      ) this.$message.error("存在空值!");
+        approveWagonPlease.resultId == null ||
+        approveWagonPlease.resultApproveDate == null ||
+        approveWagonPlease.resultApproveNumber == null
+      )
+        this.$message.error("存在空值!");
+      else if (!isNumber(val)) this.$message.error("请车数量必须是数字!");
       else
-      if (!isNumber(val)) this.$message.error("请车数量必须是数字!");
-      else
-      this.axios
-        .post("/api/v1/tms/addApproveWagonPlease", approveWagonPlease)
-        .then(() => {
-          this.$message({
-            type: "success",  
-            message: "新增成功!",
+        this.axios
+          .post("/api/v1/tms/addApproveWagonPlease", approveWagonPlease)
+          .then(() => {
+            this.$message({
+              type: "success",
+              message: "新增成功!",
+            });
+            this.$router.go(-1);
           });
-          this.$router.go(-1);
-        });
     },
   },
 };
 </script>
 <style lang="scss">
 // @import "@/styles/appoint/contract/ContractInsert.scss";
-#contractDetails{
+#contractDetails {
   .form {
     display: flex;
     .form_box {
@@ -109,35 +112,31 @@ export default {
       margin-left: 35%;
       margin-top: 30px;
       margin-right: 22px;
-      .el-form {
-        .preview-group {
-     }
+     
     }
-  }          .el-form-item {
-            .el-form-item__label {
-              display: inline-block;
-              width: 70px !important;    
-              padding-right: 200px;
-              margin-bottom: 0px;
-            }
-            .el-form-item__content {
-              .el-select {
-                width: 230px;
-              }
-              .el-input {
-                width: 160px;
-                margin-left: -300px;
-                padding-bottom: 0%;
-               
-              }
-            }
-          }
+    .el-form-item {
+      .el-form-item__label {
+        display: inline-block;
+        width: 70px !important;
+        padding-right: 200px;
+        margin-bottom: 0px;
+      }
+      .el-form-item__content {
+        .el-select {
+          width: 230px;
+        }
+        .el-input {
+          width: 160px;
+          margin-left: -300px;
+          padding-bottom: 0%;
         }
- 
-  .button-box{
+      }
+    }
+  }
+
+  .button-box {
     margin-top: 50px;
     margin-left: 550px;
-    
   }
 }
 </style>

+ 4 - 3
src/views/TMS/components/domesticMine/wagonLoadAdd.vue

@@ -106,7 +106,8 @@
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
@@ -378,13 +379,13 @@ export default {
                 type: "success",
                 message: "新增成功",
               });
-              this.$router.push("/wagonLoad");
+              this.$router.push("/wagonLoadMine");
             }
           });
       }
     },
     cancel() {
-      this.$router.push("/wagonLoad");
+      this.$router.push("/wagonLoadMine");
     },
   },
 };

+ 2 - 0
src/views/TMS/components/domesticMine/wagonLoadMine.vue

@@ -57,6 +57,8 @@ export default {
       }
     },
     click(resultId) {
+      console.log("点击了")
+      console.log(resultId)
       this.$router.push("/wagonLoadEdit/" + resultId);
     },
     deleteclick(scope) {

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

@@ -141,7 +141,7 @@ export default {
     },
     //取消
     cancel() {
-      this.$router.push("/wagonLoad");
+      this.$router.push("/wagonLoadMine");
     },
     //表格选中
     selectionChange(selection) {

+ 94 - 27
src/views/TMS/components/domesticMine/wagonPleaseAdd.vue

@@ -1,27 +1,59 @@
 <template>
   <!-- 新增请作业页面 -->
-  <div id="contractDetails">
+ <div class="contractDetails">
     <page-title>返回</page-title>
+
     <div class="form">
       <div class="form_box">
-        <dil-form :formId="122" v-model="form1"></dil-form>
+         <dil-form :formId="122" v-model="form1" ></dil-form>
       </div>
     </div>
-    <div class="button-box">
+
+     <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>
+        </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>
   </div>
+ </div>
 </template>
+
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
       // 表单
       form1: {},
+      supplierId: null,
+      supplierName: "",
+      stateSupplier: "",
     };
   },
   mounted() {
@@ -31,7 +63,37 @@ export default {
     handleCheckedCitiesChange(value) {
       console.log(value);
     },
-
+    //发货单位弹出层
+    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() {
       this.$router.go(-1);
@@ -41,10 +103,11 @@ export default {
       let tmstrainPleaseApproveResult = {
         resultPlanDate: sjTime(this.form1.resultPlanDate),
         resultCategory: this.form1.resultCategory,
-        shipperId: this.form1.shipperId,
+        supplierId: this.supplierId,
         sendStationId: this.form1.sendStationId,
         toTheStationId: this.form1.toTheStationId,
         resultPleaseNumber: this.form1.resultPleaseNumber,
+        userId: getCookie("orgCode"),
         resultType: 3,
       };
       function isNumber() {
@@ -61,7 +124,7 @@ export default {
       if (
         tmstrainPleaseApproveResult.resultPlanDate == null ||
         tmstrainPleaseApproveResult.resultCategory == null ||
-        tmstrainPleaseApproveResult.shipperId == null ||
+        tmstrainPleaseApproveResult.supplierId == null ||
         tmstrainPleaseApproveResult.sendStationId == null ||
         tmstrainPleaseApproveResult.toTheStationId == null ||
         tmstrainPleaseApproveResult.resultPleaseNumber == null
@@ -82,44 +145,48 @@ export default {
   },
 };
 </script>
-<style lang="scss" scoped>
-#contractDetails{
+<style lang="scss">
+.contractDetails {
   .form {
     display: flex;
     .form_box {
-      width: 240px;
+      width: 340px;
       margin-left: 35%;
       margin-top: 30px;
-      margin-right: 22px;
+      margin-right: 20px;
       .el-form {
         .preview-group {
-     }
-    }
-  }          .el-form-item {
+          .el-form-item {
             .el-form-item__label {
               display: inline-block;
-              width: 70px !important;    
-              padding-right: 200px;
-              margin-bottom: 0px;
+              width: 70px !important;
             }
             .el-form-item__content {
               .el-select {
-                width: 230px;
+                width: 250px;
               }
               .el-input {
-                width: 160px;
-                margin-left: -300px;
-                padding-bottom: 0%;
-               
+                width: 250px;
+              }
+            }
+            .button_box {
+              margin-left: 42%;
+              margin-top: 55px;
+            }
+          }
+          .fromOther {
+            margin-left: 34.5%;
+            width: 50%;
+            .inline-input {
+              width: 300px;
+              .button_box {
+                margin-left: 45%;
               }
             }
           }
         }
- 
-  .button-box{
-    margin-top: 50px;
-    margin-left: 550px;
-    
+      }
+    }
   }
 }
 </style>

+ 0 - 1
src/views/TMS/components/domesticMine/wagonPleaseMine.vue

@@ -89,7 +89,6 @@ export default {
             type: "success",
             message: "删除成功!",
           });
-          // console.log(this.arr[0].text_prop);
           this.axios
             .post("/api/v1/tms/deleteApproveWagonPlease/" + resultId)
             .then(() => {

+ 20 - 17
src/views/TMS/components/domesticMine/wagonUnLoadAdd.vue

@@ -27,6 +27,9 @@
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
+
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
@@ -57,13 +60,10 @@ export default {
     },
     // 确定
     makeSure() {
-      console.log(this.list);
       let tmstrainWagonUnloadResult = {
         wagonNoList: this.list,
         resultArrivalDate: sjTime(this.form1.resultArrivalDate),
         resultUnloadTime: sjTime(this.form1.resultUnloadTime),
-        resultBigTicketWeight: this.form1.resultBigTicketWeight,
-        resultRailHorizontalWeight: this.form1.resultRailHorizontalWeight,
         resultRemark: this.form1.resultRemark,
         resultType: 3,
       };
@@ -71,23 +71,27 @@ export default {
       if (
         tmstrainWagonUnloadResult.wagonNoList == null ||
         tmstrainWagonUnloadResult.resultArrivalDate == null ||
-        tmstrainWagonUnloadResult.resultUnloadTime == null ||
-        tmstrainWagonUnloadResult.resultBigTicketWeight == null ||
-        tmstrainWagonUnloadResult.resultRailHorizontalWeight == null
+        tmstrainWagonUnloadResult.resultUnloadTime == null
       )
-        this.$message.error("存在空值!");
+       this.$message.error("存在空值!");
       else
         this.axios
           .post(
             "/api/v1/tms/insertTmstrainWagonUnLoadResult",
             tmstrainWagonUnloadResult
           )
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });
-            this.$router.go(-1);
+          .then((res) => {
+            if ((res.data.code = "200")) {
+              this.$message({
+                type: "success",
+                message: "新增成功!",
+              });
+              this.$router.go(-1);
+            }else{
+               ({ type: "failed", message: "新增失败!" });
+            }
+
+            
           });
     },
     // 取消
@@ -120,7 +124,7 @@ export default {
               .el-input {
                 width: 220px;
               }
-            .el-textarea{
+              .el-textarea {
                 .el-textarea__inner {
                   display: block;
                   resize: vertical;
@@ -130,16 +134,15 @@ export default {
                   border-radius: 4px;
                   margin-left: 56px;
                   margin-top: -25px;
-    
                 }
-             }  
+              }
             }
           }
         }
       }
     }
   }
-  .button-box{
+  .button-box {
     margin-top: 50px;
     margin-left: 600px;
   }

+ 8 - 13
src/views/TMS/components/importedEmergency/addWagonLoadEmergency.vue

@@ -2,7 +2,7 @@
   <!-- 添加车皮装车实绩 -->
   <div class="addWagonLoad">
     <page-title>新增</page-title>
-    <el-divider content-position="left">车皮装车实绩</el-divider>
+ 
     <div class="cp">
       <span>车皮号:</span>
       <el-input
@@ -35,7 +35,7 @@
     </div>
     <div class="remark from">
       <span class="text">船名:</span>
-      <el-input v-model="remark" @blur="onBlur"> </el-input>
+      <el-input class="el-input" v-model="remark" @blur="onBlur"> </el-input>
       <span class="span"></span>
     </div>
     <div class="forwardingUnit from">
@@ -92,7 +92,7 @@
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
@@ -272,7 +272,6 @@ export default {
         this.supplierId &&
         this.unloadPointId &&
         this.purchaseOrderId &&
-        this.form1.resultClass &&
         this.form1.sendStationId &&
         this.form1.arrivalStationId &&
         this.form1.resultLoadingDate
@@ -290,7 +289,6 @@ export default {
             if (this.supplierId) {
               if (this.unloadPointId) {
                 if (this.purchaseOrderId) {
-                    if (this.form1.resultClass) {
                       if (this.form1.sendStationId) {
                         if (this.form1.arrivalStationId) {
                           if (this.form1.resultLoadingDate) {
@@ -313,12 +311,6 @@ export default {
                         });
                       }
                     } else {
-                      this.$message({
-                        type: "warning",
-                        message: "请选择班别!",
-                      });
-                    }
-                  } else {
                   this.$message({
                     type: "warning",
                     message: "该物资没有采购订单号!",
@@ -347,8 +339,11 @@ export default {
       if(state == 1){
         let map = {
           wagonNoList:this.list,
-          unloadPointId:this.unloadPointId,
+          unloadingPointId:this.unloadPointId,
           purchaseOrderRailPlanId:this.purchaseOrderId,
+          materialId:this.materialId,
+          sendUnitId:this.supplierId,
+          resultIsclear:this.form1.resultIsclear,
           resultClass: this.form1.resultClass,
           sendStationId: this.form1.sendStationId,
           arrivalStationId: this.form1.arrivalStationId,
@@ -363,7 +358,7 @@ export default {
               type: "success",
               message: "新增成功",
             });
-            this.$router.push("/wagonLoad");
+            this.$router.go(-1);
           }
         })
       }

+ 2 - 8
src/views/TMS/components/importedEmergency/addWagonUnLoadEmergency.vue

@@ -26,7 +26,7 @@
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
@@ -59,9 +59,6 @@ export default {
         wagonNoList: this.list,
         resultArrivalDate: sjTime(this.form1.resultArrivalDate),
         resultUnloadTime: sjTime(this.form1.resultUnloadTime),
-        unloadingPointId: this.form1.unloadingPointId,
-        resultBigTicketWeight: this.form1.resultBigTicketWeight,
-        resultRailHorizontalWeight: this.form1.resultRailHorizontalWeight,
         resultRemark: this.form1.resultRemark,
         resultType: 2,
       };
@@ -69,10 +66,7 @@ export default {
       if (
         tmstrainWagonUnloadResult.wagonNoList == null ||
         tmstrainWagonUnloadResult.resultArrivalDate == null ||
-        tmstrainWagonUnloadResult.resultUnloadTime == null ||
-        tmstrainWagonUnloadResult.unloadingPointId == null ||
-        tmstrainWagonUnloadResult.resultBigTicketWeight == null ||
-        tmstrainWagonUnloadResult.resultRailHorizontalWeight == null
+        tmstrainWagonUnloadResult.resultUnloadTime == null
       )
         this.$message.error("存在空值!");
       else

+ 1 - 1
src/views/TMS/components/importedEmergency/entrustEmergency.vue

@@ -41,7 +41,7 @@ export default {
             type: "success",
             message: "发送成功",
           });
-          this.option.requestUrl = "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=2";
+          this.option.requestUrl = "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=2&i=" + new Date();
         }
       })
     },

+ 3 - 2
src/views/TMS/components/importedEmergency/wagonUnLoadEmergency.vue

@@ -47,12 +47,13 @@ export default {
   },
   methods: {
     btnclick(num,unloadingId) {
+      console.log(num,unloadingId)
       if ( num == 0 ) {
         this.option.requestUrl = '/api/v1/tms/getTmstrainWagonUnLoad?apiId=60&resultType=2&con='+this.input;
       } else if (num == 1 ) {
-        this.$router.push("/addWagonLoadEmergency")
+        this.$router.push("/addWagonUnLoadEmergency")
       }else if (num == 2) {
-        this.$router.push("/editWagonLoadEmergency/" + unloadingId);
+        this.$router.push("/editWagonUnLoadEmergency/" + unloadingId);
       }
     },
     deleteclick(scope) {

+ 0 - 6
src/views/TMS/components/importedMine/addWagonPlease.vue

@@ -32,12 +32,6 @@
         </el-form>
     </div>
   <div class="trainTransport">
-    <page-title>返回</page-title>
-    <div class="form">
-      <div class="form_box">
-          <dil-form :formId="122" v-model="form1" ref="from1"></dil-form>
-      </div>   
-    </div>
     <!-- 确定和取消 -->
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>

+ 1 - 1
src/views/TMS/components/importedMine/wagonApprove.vue

@@ -37,7 +37,7 @@ export default {
       option: {
         // 表格请求数据的地址
         requestUrl:
-          "/api/v1/tms/getApproveAllWagonPlease?apiId=70&resultType=1",
+          "/api/v1/tms/getApproveAllWagonPlease?apiId=70&resultType=1&status=2",
       },
     };
   },

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

@@ -257,7 +257,7 @@ const constantRouterMap = [
       {path: 'wagonLoadMine', name: 'wagonLoadMine', meta: {code: 'xtpzgl-yhgl'}, component: wagonLoadMine},
       {path: 'wagonLoadbu', name: 'wagonLoadbu', meta: {code: 'xtpzgl-yhgl'}, component: wagonLoadbu},
       {path: 'wagonLoadAdd', name: 'wagonLoadAdd', meta: {code: 'xtpzgl-yhgl'}, component: wagonLoadAdd},
-      {path: 'wagonLoadEdit', name: 'wagonLoadEdit', meta: {code: 'xtpzgl-yhgl'}, component: wagonLoadEdit},
+      {path: 'wagonLoadEdit/:resultId', name: 'wagonLoadEdit', meta: {code: 'xtpzgl-yhgl'}, component: wagonLoadEdit},
       {path: 'wagonPleaseMine', name: 'wagonPleaseMine', meta: {code: 'xtpzgl-yhgl'}, component: wagonPleaseMine},
       {path: 'wagonPleaseAdd', name: 'wagonPleaseAdd', meta: {code: 'xtpzgl-yhgl'}, component: wagonPleaseAdd},
       {path: 'wagonPleaseEdit/:resultId', name: 'wagonPleaseEdit', meta: {code: 'xtpzgl-yhgl'}, component: wagonPleaseEdit},
@@ -268,7 +268,7 @@ const constantRouterMap = [
 
       {path: 'addWagonLoadEmergency', name: 'addWagonLoadEmergency', meta: {code: 'xtpzgl-yhgl'}, component: addWagonLoadEmergency},
       {path: 'addWagonUnLoadEmergency', name: 'addWagonUnLoadEmergency', meta: {code: 'xtpzgl-yhgl'}, component: addWagonUnLoadEmergency},
-      {path: 'editWagonUnLoadEmergency', name: 'editWagonUnLoadEmergency', meta: {code: 'xtpzgl-yhgl'}, component: editWagonUnLoadEmergency},
+      {path: 'editWagonUnLoadEmergency/:unloadingId', name: 'editWagonUnLoadEmergency', meta: {code: 'xtpzgl-yhgl'}, component: editWagonUnLoadEmergency},
       {path: 'editWagonLoadEmergency/:unloadingId', name: 'editWagonLoadEmergency', meta: {code: 'xtpzgl-yhgl'}, component: editWagonLoadEmergency},
       {path: 'entrustEmergency', name: 'entrustEmergency', meta: {code: 'xtpzgl-yhgl'}, component: entrustEmergency},
       {path: 'trainDetails', name: 'trainDetails', meta: {code: 'xtpzgl-yhgl'}, component: trainDetails},

+ 353 - 0
src/views/WMS/components/billingOrder/updateBill.vue

@@ -0,0 +1,353 @@
+// 采购内转需求
+<template>
+  <div class="admin">
+    <template>
+      <div class="admin1">
+        <el-tabs v-model="activeName">
+          <el-tab-pane label="修改提货单" name="first">
+          <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></div>
+            <div class="poundNo from">
+                <span class="text">运输订单号:</span>
+                <el-select v-model="orderId" placeholder="请选择" @change="changeOrderNo">
+                <el-option
+                    v-for="item in orderList"
+                    :key="item.orderId"
+                    :label="item.orderNumber" 
+                    :value="item.orderId"
+                >
+                </el-option>
+                </el-select>
+            </div>
+            <div class="material from">
+                <span class="text">物资:</span>
+                <el-select v-model="materialId" placeholder="请选择" @change="changeMaterial">
+                <el-option
+                    v-for="item in materialList"
+                    :key="item.materialId"
+                    :label="item.materialName" 
+                    :value="item.materialId"
+                >
+                </el-option>
+                </el-select>
+            </div>
+            <div class="material from"> 
+                <span class="text">物资件数:</span>
+                <el-input v-model="materialNum" ></el-input>
+            </div>
+            <div class="material from"> 
+                <span class="text">发货单位:</span>
+                <el-input v-model="shipperName" disabled></el-input>
+            </div>
+            <div class="material from"> 
+                <span class="text">收货单位:</span>
+                <el-input v-model="consigneeCompanyName" disabled></el-input>
+            </div>
+            <div class="material from"> 
+                <span class="text">收货地址:</span>
+                <el-input v-model="receiveAddressName" disabled></el-input>
+            </div>
+            <div class="material from"> 
+                <span class="text">截止日期:</span>
+                <el-input v-model="saleDateOfReceipt" disabled></el-input>
+            </div>
+        </div>
+          <div class="button_box">
+            <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+          </div>
+          </el-tab-pane>
+
+        </el-tabs>
+      </div>
+    </template>
+  </div>
+</template>
+<script>
+import { isNumber } from "@/utils/sharedJsFile";
+export default {
+  data() {
+    return {
+        orderNumber:null,
+        activeName:"first",
+        capacityName:null,    
+        stateCapacity:null,
+        materialList:[],
+        capacityId:null,
+        materialId:null,
+        disabled:false,
+        orderId:null,
+        orderList:[],
+        materialNum:null,
+        saleDateOfReceipt:null,
+        consigneeCompanyName:null,
+        receiveAddressName:null,
+        shipperName:null
+    };
+  },
+  methods: {    
+    //运力弹出层
+    handleSelectCapacity(item){
+      console.log(item)
+      this.capacityId = item.capacityId
+      this.capacityName = item.capacityNumber
+      this.axios.get("/api/v1/oms/getSteelOrderNum?capacityId=" + this.capacityId).then((res) =>{
+          if(res.data.code == "200"){
+              console.log(res.data.data)
+              this.orderList = res.data.data
+          }
+      })
+    },
+    changeOrderNo(){
+        console.log(this.orderNumber)
+        this.axios.get("/api/v1/oms/getMesToSteelDepartment?orderId=" + this.orderId).then((res) => {
+            this.materialList = res.data.data.materialMes
+            this.saleDateOfReceipt = res.data.data.saleDateOfReceipt
+            this.consigneeCompanyName = res.data.data.consigneeCompanyName
+            this.receiveAddressName = res.data.data.receiveAddressName
+            this.shipperName = res.data.data.shipperName
+        })
+    },
+    changeMaterial(){
+        console.log(this.materialId)
+        this.materialList.forEach((e) => {
+            if(e.materialId == this.materialId){
+                this.materialNum = e.materialNum
+                this.maxMaterialNum = e.materialNum
+            }
+        })
+    },
+    //以下是运力边输边查搜索
+    querySearchCapacity(queryString, cb) {
+        if(queryString.length < 3){
+            return
+        }
+        this.axios.get('/api/v1/uc/getCapacityNumber?index='+queryString).then((res)=>{
+        if(res.data.code == "200"){
+          var restaurantsCarrier = res.data.data
+          console.log(restaurantsCarrier,"restaurantsCarrier");
+          var results = queryString ? restaurantsCarrier.filter(this.createFilterCarrier(queryString)) :restaurantsCarrier;
+           // 调用 callback 返回建议列表的数据
+          cb(results);
+        }
+        })     
+      },
+    createFilterCarrier(queryString) {
+        return (restaurantsCarrier)  =>  {
+          return (restaurantsCarrier.capacityNumber.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+    //以上是承运商边输边查搜索
+    onClickConfirm(){
+        if(!isNumber(this.materialNum)){
+            this.$message.error("件数请输入数字")
+            return
+        }
+        if((parseInt(this.materialNum) > parseInt(this.maxMaterialNum))){
+            this.$message.error("修改后的数量不得大于提货单数量")
+            return
+        }
+        if(this.materialNum == 0){
+            this.$message.error("不能将物资数量修改为0")
+            return
+        }
+        let updateNumMap = {
+            orderId:this.orderId,
+            materialId:this.materialId,
+            materialNum:parseInt(this.materialNum)
+        }
+        this.axios.post("/api/v1/oms/updateMaterialMes",updateNumMap).then((res) => {
+            console.log(res)
+            if(res.data.code == '200'){
+                this.$message.success("修改物资数量成功")
+            }else{
+                this.$message.error("新增失败请联系管理员")
+            }
+        })
+
+    },
+  },
+};
+</script>
+<style lang="scss">
+.admin{
+  .admin1 {
+
+      margin-top: 40px;
+      margin-left: 40px;
+      .switch {
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          margin-top: 20px;
+          color: aqua;
+      }
+      .button_box {
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            width: 100%;
+            height: 100px;
+        }
+      .admin2 {    
+        margin-top: 40px; 
+        .from {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        margin-top: 20px;
+        margin-bottom: 20px;
+        }
+        .carrier{
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            .el-form-item {
+                text-align: right;
+            }
+            .el-autocomplete{
+            width: 250px;
+            }
+        }
+        .material {
+        display: flex;
+        justify-content: center;
+        margin-top: 20px;
+        margin-right: 100px;
+        .text {
+            display: inline-block;
+            width: 170px;
+            text-align: right;
+        }
+        .el-input {
+            width: 250px;
+        }
+        }
+        .poundNo {
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            margin-top: 20px;
+            margin-right: 100px;
+            .text {
+            display: inline-block;
+            width: 170px;
+            text-align: right;
+                  }
+            .el-input {
+            width: 250px;
+                    }
+        }  
+        .block {
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            margin-top: 20px;
+            margin-right: 100px;
+            .el-input {
+                width: 250px;
+            }
+            .text {
+            display: inline-block;
+            width: 170px;
+            text-align: right;
+            }
+        }
+        .truckCalFirst {
+            display: flex;
+            justify-content: center;
+            margin-top: 20px;
+            margin-right: 100px;
+            .text {
+                display: inline-block;
+                width: 170px;
+                text-align: right;
+            }
+            .el-input {
+                width: 250px;
+            }
+        }
+        .truckCalSecond {
+            display: flex;
+            justify-content: center;
+            margin-top: 20px;
+            margin-right: 100px;
+            .text {
+                display: inline-block;
+                width: 170px;
+                text-align: right;
+            }
+            .el-input {
+                width: 250px;
+            }
+        }
+        .secondWeight {
+           display: flex;
+            justify-content: center;
+            align-items: center;
+            margin-top: 20px;
+            margin-right: 100px;
+            .text {
+            display: inline-block;
+            width: 170px;
+            text-align: right;
+                  }
+            .el-input {
+            width: 250px;
+                    } 
+        }
+        .firstWeight {
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            margin-top: 20px;
+            margin-right: 100px;
+            .text {
+            display: inline-block;
+            width: 170px;
+            text-align: right;
+                  }
+            .el-input {
+            width: 250px;
+                    }
+        }
+        .netWeight {
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            margin-top: 20px;
+            margin-right: 100px;
+            .text {
+            display: inline-block;
+            width: 170px;
+            text-align: right;
+                  }
+            .el-input {
+            width: 250px;
+                    }
+        }
+      }      
+  }
+  }
+</style>

+ 2 - 1
src/views/WMS/router/index.js

@@ -5,6 +5,7 @@ import routerBefore from '@/config/routerBefore.js'
 // 主要
 import main from '@/components/main.vue'
 // 系统配置管理
+import editBill from '../components/billingOrder/updateBill.vue'
 import intrainst_real from '../components/intrainst/intrainst_real.vue'
 import offsite_check from '../components/offsite/offsite_check.vue'
 import offsite_close from '../components/offsite/offsite_close.vue'
@@ -199,7 +200,7 @@ const constantRouterMap = [
 		{path: 'bar2_addSteelReserved', name: 'bar2_addSteelReserved', meta: {code: 'xtpzgl-yhgl'}, component: bar2_addSteelReserved},
 		{path: 'bar2_steel_inboundStatistics', name: 'bar2_steel_inboundStatistics', meta: {code: 'xtpzgl-yhgl'}, component: bar2_steel_inboundStatistics},
 		{path: 'bar2_steel_outboundStatistics', name: 'bar2_steel_outboundStatistics', meta: {code: 'xtpzgl-yhgl'}, component: bar2_steel_outboundStatistics},
-
+		{path: 'editBill', name: 'editBill', meta: {code: 'xtpzgl-yhgl'}, component: editBill},
 	  ]
 	}
   ];

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1095 - 217
src/views/appoint/components/saleContract/addSaleOrder.vue


+ 2 - 3
src/views/appoint/components/saleContract/addSaleOrderSend.vue

@@ -67,9 +67,8 @@
               <template v-if="item.prop == 'orderPlanWeight'">
                 <el-input
                   class="textinput"
-                  @input="onInput"
                   placeholder="(必填)"
-                  v-model.number="scope.row.orderPlanWeight"
+                  v-model="scope.row.orderPlanWeight"
                 ></el-input>
               </template>
 
@@ -448,7 +447,7 @@ export default {
   methods: {
     onInput(val){
       if(!isNumber(val)){
-        this.$message.warning('重量/电话号码请输入数字')
+        this.$message.warning('电话号码请输入数字')
       }
     },
     //收货地址弹出层

+ 749 - 0
src/views/appoint/components/saleContract/addSaleOrderSteelSend.vue

@@ -0,0 +1,749 @@
+<template>
+  <div class="addSaleOrderSend">
+    <page-title>新增销售订单钢材派车</page-title>
+    <!-- 派车表格 -->
+    <div class="selectionTable from">
+      <el-table
+        :data="selectionList"
+        border
+        style="width: 100%"
+        highlight-current-row
+        :span-method="cellMerge"
+      >
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          :width="item.width"
+          align="center"
+          show-overflow-tooltip
+        >
+          <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" v-if="item.label !== '件数'">
+            <span>{{ item.label }}</span>
+          </template>
+          <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" v-if="item.label !== '截止日期'">
+            <span>{{ item.label }}</span>
+          </template>
+          <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">
+              <!-- 车牌号 -->
+              <template v-if="item.prop == 'capacityNumber'">
+                <el-autocomplete
+                class="inline-input"
+                v-model="scope.row.capacityNumber"
+                :fetch-suggestions="querySearch"
+                placeholder="(必填)"
+                :trigger-on-focus="false"
+                @select="handleSelect"
+                @blur="checkRelationship(scope.$index)"
+                @change="batchUpdateValue(scope.row,scope.$index)"
+                ></el-autocomplete>
+              </template>
+
+              <!-- 承运商 -->
+              <template v-if="item.prop == 'carrierName'">
+                <el-autocomplete
+                    class="inline-input"
+                    v-model="scope.row.carrierName"
+                    :fetch-suggestions="querySearch1"
+                    placeholder="请输入承运商名称"
+                    :trigger-on-focus="false"
+                    @change="batchUpdateValue(scope.row,scope.$index)"
+                    @select="handleSelect1"
+                  >
+                    <template slot-scope="{ item }">
+                      <div class="name" v-if="item.carrierName">
+                        {{ item.carrierName }}
+                      </div>
+                    </template>
+                  </el-autocomplete>
+              </template>
+
+              <!-- 物资件数 -->
+              <template v-if="item.prop == 'orderPlanWeight'">
+                <el-input
+                  class="textinput"
+                  @input="onInput"
+                  placeholder="(必填)"
+                  v-model.number="scope.row.orderPlanWeight"
+                  disabled
+                ></el-input>
+              </template>
+
+              <!-- 物资重量 -->
+              <template v-if="item.prop == 'materialWeight'">
+                <el-input
+                  class="textinput"
+                  v-model.number="scope.row.materialWeight"
+                  disabled
+                ></el-input>
+              </template>
+
+              <!-- 运输单价id -->
+              <template v-if="item.prop == 'priceValue'" >
+                <el-input
+                  v-model="scope.row.priceValue"
+                  disabled
+                >
+                </el-input>
+              </template>
+              <!-- 截止日期 -->
+              <template v-if="item.prop == 'saleDateOfReceipt'">
+                 <el-date-picker
+                  class="textinput3"
+                  type="date"
+                  v-model.number="scope.row.saleDateOfReceipt"
+                  style="width:135px"
+                  disabled
+                ></el-date-picker>
+              </template>
+              <!-- 收货客户 -->
+              <template v-if="item.prop == 'saleOrderConsignee'">
+                <el-input
+                  class="textinput4"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsignee"
+                  disabled
+                ></el-input>
+              </template>
+              <!-- 收货客户电话号码 -->
+              <template v-if="item.prop == 'saleOrderConsigneeTel'">
+                <el-input
+                  class="textinput5"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsigneeTel"
+                  @input="onInput"
+                  disabled
+                ></el-input>
+              </template>
+            </template>
+            <template v-else>
+              <span>{{ scope.row[item.prop] }}</span>
+            </template>
+          </template>
+        </el-table-column>
+        <!-- 操作列 -->
+        <!-- <el-table-column fixed="right" label="操作" width="100">
+        </el-table-column> -->
+      </el-table>
+    </div>
+
+    <div class="button_box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+import { sjTime,isNumber,isIntegerNumber } from "@/utils/sharedJsFile";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      //存放每一行记录的合并数
+      spanArr: [],
+      //pos是spanArr的索引
+      pos:0,
+      //加载
+      selectLineLoading:false,
+      //所有选中承运商Id和承运商名称暂存
+      carrierIdAndName: [],
+      //承运商下拉框中的值
+      carrierNameOptions:[],
+      //当前车序号物资
+      selectionList:[],
+      tableTop: [
+        {
+          prop: "truckNo",
+          label: "车序号",
+          width: "50",
+        },
+        {
+          prop: "capacityNumber",
+          label: "车牌号",
+          width: "130",
+          slot: true,
+        },
+        {
+          prop: "carrierName",
+          label: "承运商",
+          width: "240",
+          slot: true,
+        },
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: "140",
+        },
+        {
+          prop: "Specification",
+          label: "规格型号",
+          width: "140",
+        },
+        {
+          prop: "orderPlanWeight",
+          label: "件数",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "materialWeight",
+          label: "重量",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "lineName",
+          label: "厂内运输线路",
+          width: "220",
+        },
+        {
+          prop: "saleDateOfReceipt",
+          label: "截止日期",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "saleShipperAddressName",
+          label: "收货地址",
+          width: "300",
+        },
+        {
+          prop: "priceValue",
+          label: "运输单价",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "saleOrderConsignee",
+          label: "收货客户",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "saleOrderConsigneeTel",
+          label: "收货客户电话号码",
+          slot: true,
+          width: "150",
+        },
+        {
+          prop: "materialCode",
+          label: "物资编码",
+          width: "140",
+        },
+      ],
+    };
+  },
+  created(){
+    this.getValue();
+  },
+  methods: {
+    getValue(){
+      this.axios
+      .post("/api/v1/ams/getTruckNoMaterial?saleOrderMaterialId=" + this.$route.params.saleOrderMaterialId)
+      .then((res)=>{
+        if(res.data.data.length==0){
+            this.$confirm("该销售订单尚未排车!是否先进行排车?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+              center: true,
+            })
+            .then(() => {
+              this.$router.push("/addSaleOrderArrange/" + this.$route.params.saleOrderId);
+            })
+            .catch(() => {
+              this.$message({ type: "info", message: "取消!",});
+            });
+        }
+        //赋值派车表格
+        res.data.data.forEach((e,i) => {
+          if(e.saleOrderConsignee=="null"){
+            e.saleOrderConsignee = null
+          }
+          if(e.saleOrderConsigneeTel=="null"){
+            e.saleOrderConsigneeTel = null
+          }
+            //不带承运商初始化派车表格
+            var addmap = {
+                truckNo: e.truckNo,
+                saleOrderMaterialId: e.saleOrderMaterialId,
+                capacityNumber: null,
+                carrierName: null,
+                carrierId: null,
+                materialId: e.materialId,
+                materialName: e.materialName,
+                Specification: e.materialModelSpecification,
+                materialCode: e.materialCode,
+                orderPlanWeight: e.materialNumber,
+                materialWeight: e.materialWeight,
+                lineName:null,
+                lineId:null,
+                saleShipperAddressId: e.placeId,
+                saleShipperAddressName:e.place,
+                saleDateOfReceipt: e.receiptDate,
+                saleOrderConsignee: e.saleOrderConsignee,
+                saleOrderConsigneeTel: e.saleOrderConsigneeTel,
+            };
+            this.selectionList.push(addmap);
+            //调用记录每一行的合并数的方法
+            this.getSpanArr(this.selectionList);
+            //初始化每个车的线路
+            this.initializeLine();
+        });
+      });
+    },
+
+    //承运商弹出层
+    handleSelect1(item) {
+      let carrierIdAndNameItem = {
+        carrierId : item.carrierId,
+        carrierName : item.carrierName
+      }
+      this.carrierIdAndName.push(carrierIdAndNameItem);
+    },
+    //以下是承运商边输边查搜索
+    querySearch1(queryString, cb) {
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?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
+        );
+      };
+    },
+    //以上是承运商边输边查搜索
+
+    onInput(val){
+      if(!isNumber(val)){
+        this.$message.warning('重量/电话号码请输入数字')
+      }
+    },
+    //校验是否为车牌
+    isVehicleNumber(vehicleNumber) {
+      var result = false;
+      if(vehicleNumber!=null){
+        if (vehicleNumber.length == 7) {
+          var express =
+            /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
+          result = express.test(vehicleNumber);
+        }
+      }
+      return result;
+    },
+    //绑定车牌号和承运商的关系
+    bindRelationship(mapValue){
+      let RmsCapacity = {
+        capacityTypeId: 1,
+        capacityNumber: mapValue.capacityNumber,
+        capacityCorlor: "黄",
+        capacityOwneris: "否",
+        capacityVip: "否",
+        capacityBlacklist: "否",
+        remark: null,
+        carrierId: mapValue.carrierId,
+        state: mapValue.carrierName,
+      };
+      this.$confirm("车牌号("+mapValue.capacityNumber+")与承运商未有绑定关系, 是否立即绑定该车牌号和承运商?","提示",{
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+      })
+      .then(() => {
+          this.axios
+            .post("/api/v1/rms/insertCapacity", RmsCapacity)
+            .then((res) => {
+              console.log("res",res)
+              if (res.data.data == 0) {
+                this.$message.success("该车牌号与承运商绑定关系成功!");
+              } 
+            });
+        })
+        .catch(() => {this.$message({ type: "info", message: "已取消删除",});});
+    },
+    //确定车牌号与承运商是否有绑定关系
+    checkRelationship(index){
+      if(this.selectionList[index].carrierId!=null){
+        //暂存车牌号
+      var capacityNumber1;
+      if(this.isVehicleNumber(this.selectionList[index].capacityNumber)){
+        let mapValue = {
+        capacityNumber:this.selectionList[index].capacityNumber,
+        carrierId:this.selectionList[index].carrierId,
+        carrierName:this.selectionList[index].carrierName
+      }
+      this.axios
+       .post("/api/v1/uc/isInCapacityCarrier", mapValue)
+       .then((res)=>{
+         if(res.data.code=="201"){
+           capacityNumber1 = res.data.data;
+           if(capacityNumber1==null){
+             this.selectionList[index].capacityNumber = null;
+             this.$message.error("该车牌号未注册,请先前往注册!");
+           }else{
+             this.bindRelationship(mapValue);
+           }
+         }
+       });
+      }
+      }
+    },
+    //车牌号弹出层
+    handleSelect(item) {
+      console.log("获取下拉值!")
+    },
+
+    //以下是车牌号边输边查搜索
+    querySearch(queryString, cb){
+      this.axios
+        .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
+        .then((res) => {
+          if (res.data.code == "200") {
+            var restaurants = res.data.data;
+            var results = queryString
+              ? restaurants.filter(this.createFilter(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是车牌号边输边查搜索
+
+    //点击确定按钮的事件
+    makeSure(){
+      //是否可发送请求
+      var canSend = 1;
+      this.selectionList.forEach((e)=>{
+          if(e.carrierName==null){
+              canSend = 0;
+          }
+          if(isIntegerNumber(e.carrierName)){
+              e.carrierId = e.carrierName;
+          }
+        });
+      if(canSend==0){
+          //还有车序号未授权承运商
+          this.$message.warning('还有车序号未授权承运商!')
+      }else{
+          this.$confirm("是否确定进行钢材派单!", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+              center: true,
+            })
+            .then(() => {
+              var mapList = [];
+              for(var i=0;i<this.spanArr.length;i++){
+                  if(this.spanArr[i]>0){
+                  //从所有选中承运商Id和承运商名称暂存中取出当前行的承运商Id
+                  this.carrierIdAndName.forEach((item) => {
+                    if(this.selectionList[i].carrierName==item.carrierName){
+                      this.selectionList[i].carrierId = item.carrierId;
+                    }
+                  })
+                  var mapItem = {
+                  //车牌号
+                  capacityNumber : null,
+                  //车序号主键
+                  saleOrderMaterialId : 0,
+                  //承运商Id
+                  carrierId : 0,
+                  //线路Id
+                  lineId : 0,
+                }
+                mapItem.capacityNumber = this.selectionList[i].capacityNumber,
+                mapItem.saleOrderMaterialId = this.selectionList[i].saleOrderMaterialId,
+                mapItem.carrierId = this.selectionList[i].carrierId,
+                mapItem.lineId = this.selectionList[i].lineId,
+                mapList.push(mapItem);
+                }
+              }
+              this.axios.post('/api/v1/ams/dispatchSteelOrder',mapList)
+              .then((res)=>{
+                  if(res.data.code == '200'){
+                  this.cancel();
+                }
+                  this.$message.success('派单成功!')               
+              });
+            })
+            .catch(() => {
+              this.$message({ type: "info", message: "取消!",});
+            });
+      }
+    },
+    //点击取消按钮的事件
+    cancel(){
+      this.$router.push('/saleOrderSteelCar')
+    },
+
+    //批量修改内层值
+    batchUpdateValue(row,index){
+        for(var i=index;i<this.spanArr[index]+index;i++){
+          this.selectionList[i].capacityNumber=row.capacityNumber;
+          this.selectionList[i].carrierName=row.carrierName;
+        }
+    },
+    //初始化线路
+    initializeLine(){
+      for(var i=0;i<this.spanArr.length;i++){
+        if(this.spanArr[i]==1){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材单拼路线'+" "+'进厂-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110001;
+          }
+        }
+        if(this.spanArr[i]==2){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材二拼路线'+" "+'计皮-进厂-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110002;
+          }
+        }
+        if(this.spanArr[i]==3){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材三拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110003;
+          }
+        }
+        if(this.spanArr[i]==4){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材四拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110004;
+          }
+        }
+        if(this.spanArr[i]==5){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材五拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110005;
+          }
+        }
+        if(this.spanArr[i]==6){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材六拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110006;
+          }
+        }
+        if(this.spanArr[i]==7){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材七拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110007;
+          }
+        }
+        if(this.spanArr[i]==8){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材八拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110008;
+          }
+        }
+        if(this.spanArr[i]==9){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材九拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110009;
+          }
+        }
+        if(this.spanArr[i]==10){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材十拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110010;
+          }
+        }
+      }
+      
+    },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+            if (i === 0) {
+                  this.spanArr.push(1);
+                  this.pos = 0
+            } else {
+                // 判断当前元素与上一个元素是否相同
+                if (data[i].truckNo === data[i - 1].truckNo) {
+                  this.spanArr[this.pos] += 1;
+                  this.spanArr.push(0);
+                } else {
+                  this.spanArr.push(1);
+                  this.pos = i;
+                }
+            }
+        }
+    },
+    //根据条件合并行
+    cellMerge({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 1) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 2) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 7) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 8) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 9) {
+            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
+            }
+      }
+      if (columnIndex === 11) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 12) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+    },
+  },
+};
+</script>
+
+<style lang='scss'>
+.addSaleOrderSend {
+  .from {
+    margin-top: 20px;
+    .line {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 350px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+    }
+    .sendCar {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 70px;
+        margin-left: 10px;
+        margin-right: 10px;
+        margin-top: 10px;
+      }
+    }
+    .vehicle {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin-top: 20px;
+      .el-button {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+      .span {
+        width: 70px;
+      }
+    }
+  }
+  .tablecls{
+    margin-top: 20px;
+  }
+  .button_box{
+    display: flex;
+    justify-content: center;
+    margin: 20px;
+    .el-button{
+      width: 100px;
+      margin-left: 20px;
+    }
+  }
+}
+</style>

+ 713 - 0
src/views/appoint/components/saleContract/addSaleOrderSteelSendCarrier.vue

@@ -0,0 +1,713 @@
+<template>
+  <div class="addSaleOrderSend">
+    <page-title>新增销售订单钢材派车</page-title>
+    <!-- 派车表格 -->
+    <div class="selectionTable from">
+      <el-table
+        :data="selectionList"
+        border
+        style="width: 100%"
+        highlight-current-row
+        :span-method="cellMerge"
+      >
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          :width="item.width"
+          align="center"
+          show-overflow-tooltip
+        >
+          <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" v-if="item.label !== '件数'">
+            <span>{{ item.label }}</span>
+          </template>
+          <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" v-if="item.label !== '截止日期'">
+            <span>{{ item.label }}</span>
+          </template>
+          <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">
+              <!-- 车牌号 -->
+              <template v-if="item.prop == 'capacityNumber'">
+                <el-autocomplete
+                class="inline-input"
+                v-model="scope.row.capacityNumber"
+                :fetch-suggestions="querySearch"
+                placeholder="(必填)"
+                :trigger-on-focus="false"
+                @select="handleSelect"
+                @blur="checkRelationship(scope.$index)"
+                @change="batchUpdateValue(scope.row,scope.$index)"
+                ></el-autocomplete>
+              </template>
+
+              <!-- 承运商 -->
+              <template v-if="item.prop == 'carrierName'">
+                 <el-select v-model="scope.row.carrierName" placeholder="请选择"  
+                 @change="batchUpdateValue(scope.row,scope.$index)"
+                 disabled>
+                  <el-option
+                    v-for="item in carrierNameOptions[scope.$index]"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </template>
+
+              <!-- 物资件数 -->
+              <template v-if="item.prop == 'orderPlanWeight'">
+                <el-input
+                  class="textinput"
+                  @input="onInput"
+                  placeholder="(必填)"
+                  v-model.number="scope.row.orderPlanWeight"
+                  disabled
+                ></el-input>
+              </template>
+
+              <!-- 物资重量 -->
+              <template v-if="item.prop == 'materialWeight'">
+                <el-input
+                  class="textinput"
+                  v-model.number="scope.row.materialWeight"
+                  disabled
+                ></el-input>
+              </template>
+
+              <!-- 运输单价id -->
+              <template v-if="item.prop == 'priceValue'" >
+                <el-input
+                  v-model="scope.row.priceValue"
+                  disabled
+                >
+                </el-input>
+              </template>
+              <!-- 截止日期 -->
+              <template v-if="item.prop == 'saleDateOfReceipt'">
+                 <el-date-picker
+                  class="textinput3"
+                  type="date"
+                  v-model.number="scope.row.saleDateOfReceipt"
+                  style="width:135px"
+                  disabled
+                ></el-date-picker>
+              </template>
+              <!-- 收货客户 -->
+              <template v-if="item.prop == 'saleOrderConsignee'">
+                <el-input
+                  class="textinput4"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsignee"
+                  disabled
+                ></el-input>
+              </template>
+              <!-- 收货客户电话号码 -->
+              <template v-if="item.prop == 'saleOrderConsigneeTel'">
+                <el-input
+                  class="textinput5"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsigneeTel"
+                  @input="onInput"
+                  disabled
+                ></el-input>
+              </template>
+            </template>
+            <template v-else>
+              <span>{{ scope.row[item.prop] }}</span>
+            </template>
+          </template>
+        </el-table-column>
+        <!-- 操作列 -->
+        <!-- <el-table-column fixed="right" label="操作" width="100">
+        </el-table-column> -->
+      </el-table>
+    </div>
+
+    <div class="button_box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+import { sjTime,isNumber,isIntegerNumber } from "@/utils/sharedJsFile";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      //存放每一行记录的合并数
+      spanArr: [],
+      //pos是spanArr的索引
+      pos:0,
+      //加载
+      selectLineLoading:false,
+      //承运商下拉框中的值
+      carrierNameOptions:[],
+      //当前车序号物资
+      selectionList:[],
+      tableTop: [
+        {
+          prop: "truckNo",
+          label: "车序号",
+          width: "50",
+        },
+        {
+          prop: "capacityNumber",
+          label: "车牌号",
+          width: "130",
+          slot: true,
+        },
+        {
+          prop: "carrierName",
+          label: "承运商",
+          width: "240",
+          slot: true,
+        },
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: "140",
+        },
+        {
+          prop: "Specification",
+          label: "规格型号",
+          width: "140",
+        },
+        {
+          prop: "orderPlanWeight",
+          label: "件数",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "materialWeight",
+          label: "重量",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "lineName",
+          label: "厂内运输线路",
+          width: "220",
+        },
+        {
+          prop: "saleDateOfReceipt",
+          label: "截止日期",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "saleShipperAddressName",
+          label: "收货地址",
+          width: "300",
+        },
+        {
+          prop: "priceValue",
+          label: "运输单价",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "saleOrderConsignee",
+          label: "收货客户",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "saleOrderConsigneeTel",
+          label: "收货客户电话号码",
+          slot: true,
+          width: "150",
+        },
+        {
+          prop: "materialCode",
+          label: "物资编码",
+          width: "140",
+        },
+      ],
+    };
+  },
+  created(){
+    this.getValue();
+  },
+  methods: {
+    getValue(){
+      this.axios
+      .post("/api/v1/ams/getTruckNoAndMaterialList?saleOrderId=" + this.$route.params.saleOrderId)
+      .then((res)=>{
+        if(res.data.data.length==0){
+            this.$confirm("该销售订单尚未排车!是否先进行排车?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+              center: true,
+            })
+            .then(() => {
+              this.$router.push("/addSaleOrderArrange/" + this.$route.params.saleOrderId);
+            })
+            .catch(() => {
+              this.$message({ type: "info", message: "取消!",});
+            });
+        }
+        //赋值派车表格
+        res.data.data.forEach((e,i) => {
+          if(e.saleOrderConsignee=="null"){
+            e.saleOrderConsignee = null
+          }
+          if(e.saleOrderConsigneeTel=="null"){
+            e.saleOrderConsigneeTel = null
+          }
+            //带承运商初始化派车表格
+            var addmap = {
+                truckNo: e.truckNo,
+                saleOrderMaterialId: e.saleOrderMaterialId,
+                capacityNumber: null,
+                carrierName: e.carrierId,
+                carrierId: e.carrierId,
+                materialId: e.materialId,
+                materialName: e.materialName,
+                Specification: e.materialModelSpecification,
+                materialCode: e.materialCode,
+                orderPlanWeight: e.materialNumber,
+                materialWeight: e.materialWeight,
+                lineName:null,
+                lineId:null,
+                saleShipperAddressId: e.placeId,
+                saleShipperAddressName:e.place,
+                saleDateOfReceipt: e.receiptDate,
+                saleOrderConsignee: e.saleOrderConsignee,
+                saleOrderConsigneeTel: e.saleOrderConsigneeTel
+            };
+            this.selectionList.push(addmap);
+            //调用记录每一行的合并数的方法
+            this.getSpanArr(this.selectionList);
+            //初始化每个车的线路
+            this.initializeLine();
+        });
+      });
+    },
+    onInput(val){
+      if(!isNumber(val)){
+        this.$message.warning('重量/电话号码请输入数字')
+      }
+    },
+    //校验是否为车牌
+    isVehicleNumber(vehicleNumber) {
+      var result = false;
+      if(vehicleNumber!=null){
+        if (vehicleNumber.length == 7) {
+          var express =
+            /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
+          result = express.test(vehicleNumber);
+        }
+      }
+      return result;
+    },
+    //绑定车牌号和承运商的关系
+    bindRelationship(mapValue){
+      let RmsCapacity = {
+        capacityTypeId: 1,
+        capacityNumber: mapValue.capacityNumber,
+        capacityCorlor: "黄",
+        capacityOwneris: "否",
+        capacityVip: "否",
+        capacityBlacklist: "否",
+        remark: null,
+        carrierId: mapValue.carrierId,
+        state: mapValue.carrierName,
+      };
+      this.$confirm("车牌号("+mapValue.capacityNumber+")与承运商未有绑定关系, 是否立即绑定该车牌号和承运商?","提示",{
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+      })
+      .then(() => {
+          this.axios
+            .post("/api/v1/rms/insertCapacity", RmsCapacity)
+            .then((res) => {
+              console.log("res",res)
+              if (res.data.data == 0) {
+                this.$message.success("该车牌号与承运商绑定关系成功!");
+              } 
+            });
+        })
+        .catch(() => {this.$message({ type: "info", message: "已取消删除",});});
+    },
+    //失焦事件后确定车牌号与承运商是否有绑定关系
+    checkRelationship(index){
+      if(this.selectionList[index].carrierId!=null){
+        //暂存车牌号
+      var capacityNumber1;
+      if(this.isVehicleNumber(this.selectionList[index].capacityNumber)){
+        let mapValue = {
+        capacityNumber:this.selectionList[index].capacityNumber,
+        carrierId:this.selectionList[index].carrierId,
+        carrierName:this.selectionList[index].carrierName
+      }
+      this.axios
+       .post("/api/v1/uc/isInCapacityCarrier", mapValue)
+       .then((res)=>{
+         if(res.data.code=="201"){
+           capacityNumber1 = res.data.data;
+           if(capacityNumber1==null){
+             this.selectionList[index].capacityNumber = null;
+             this.$message.error("该车牌号未注册,请先前往注册!");
+           }else{
+             this.bindRelationship(mapValue);
+           }
+         }
+       });
+      }
+      }
+    },
+    //车牌号弹出层
+    handleSelect(item) {
+      console.log("item")
+        // let mapValue = {
+        //   capacityNumber:item.capacityNumber,
+        //   carrierId:this.receiveCarrierId,
+        //   carrierName:this.receiveCarrierName
+        // }
+        // this.axios
+        // .post("/api/v1/uc/isInCapacityCarrier", mapValue)
+        // .then((res)=>{
+        //   if(res.data.code=="201"){
+        //     this.bindRelationship(mapValue);
+        //   }
+        // });
+    },
+
+    //以下是车牌号边输边查搜索
+    querySearch(queryString, cb){
+      this.axios
+        .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
+        .then((res) => {
+          if (res.data.code == "200") {
+            var restaurants = res.data.data;
+            var results = queryString
+              ? restaurants.filter(this.createFilter(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是车牌号边输边查搜索
+
+    //点击确定按钮的事件
+    makeSure(){
+      //是否可发送请求
+      var canSend = 1;
+      this.selectionList.forEach((e)=>{
+          if(e.carrierName==null){
+              canSend = 0;
+          }
+          if(isIntegerNumber(e.carrierName)){
+              e.carrierId = e.carrierName;
+          }
+        });
+      if(canSend==0){
+          //还有车序号未授权承运商
+          this.$message.warning('还有车序号未授权承运商!')
+      }else{
+          this.$confirm("是否确定进行钢材派单!", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+              center: true,
+            })
+            .then(() => {
+              var mapList = [];
+              for(var i=0;i<this.spanArr.length;i++){
+                if(this.spanArr[i]>0&&this.selectionList[i].capacityNumber){
+                  var mapItem = {
+                  //车牌号
+                  capacityNumber : null,
+                  //车序号主键
+                  saleOrderMaterialId : 0,
+                  //承运商Id
+                  carrierId : 0,
+                  //线路Id
+                  lineId : 0,
+                }
+                mapItem.capacityNumber = this.selectionList[i].capacityNumber,
+                mapItem.saleOrderMaterialId = this.selectionList[i].saleOrderMaterialId,
+                mapItem.carrierId = this.selectionList[i].carrierId,
+                mapItem.lineId = this.selectionList[i].lineId,
+                mapList.push(mapItem);
+                }
+              }
+              this.axios.post('/api/v1/ams/dispatchSteelOrder',mapList)
+              .then((res)=>{
+                  if(res.data.code == '200'){
+                  this.cancel();
+                }
+                  this.$message.success('派单成功!')               
+              });
+            })
+            .catch(() => {
+              this.$message({ type: "info", message: "取消!",});
+            });
+      }
+    },
+    //点击取消按钮的事件
+    cancel(){
+      this.$router.push('/saleOrderSteelCarrier')
+    },
+
+    //批量修改内层值
+    batchUpdateValue(row,index){
+        for(var i=index;i<this.spanArr[index]+index;i++){
+          this.selectionList[i].capacityNumber=row.capacityNumber;
+        }
+    },
+    //初始化线路
+    initializeLine(){
+      for(var i=0;i<this.spanArr.length;i++){
+        if(this.spanArr[i]==1){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材单拼路线'+" "+'进厂-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110001;
+          }
+        }
+        if(this.spanArr[i]==2){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材二拼路线'+" "+'计皮-进厂-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110002;
+          }
+        }
+        if(this.spanArr[i]==3){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材三拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110003;
+          }
+        }
+        if(this.spanArr[i]==4){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材四拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110004;
+          }
+        }
+        if(this.spanArr[i]==5){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材五拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110005;
+          }
+        }
+        if(this.spanArr[i]==6){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材六拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110006;
+          }
+        }
+        if(this.spanArr[i]==7){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材七拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110007;
+          }
+        }
+        if(this.spanArr[i]==8){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材八拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110008;
+          }
+        }
+        if(this.spanArr[i]==9){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材九拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110009;
+          }
+        }
+        if(this.spanArr[i]==10){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材十拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110010;
+          }
+        }
+      }
+      
+    },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+            if (i === 0) {
+                  this.spanArr.push(1);
+                  this.pos = 0
+            } else {
+                // 判断当前元素与上一个元素是否相同
+                if (data[i].truckNo === data[i - 1].truckNo) {
+                  this.spanArr[this.pos] += 1;
+                  this.spanArr.push(0);
+                } else {
+                  this.spanArr.push(1);
+                  this.pos = i;
+                }
+            }
+        }
+    },
+    //根据条件合并行
+    cellMerge({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 1) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 2) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 7) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 8) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 9) {
+            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
+            }
+      }
+      if (columnIndex === 11) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 12) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+    },
+  },
+};
+</script>
+
+<style lang='scss'>
+.addSaleOrderSend {
+  .from {
+    margin-top: 20px;
+    .line {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 350px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+    }
+    .sendCar {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 70px;
+        margin-left: 10px;
+        margin-right: 10px;
+        margin-top: 10px;
+      }
+    }
+    .vehicle {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin-top: 20px;
+      .el-button {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+      .span {
+        width: 70px;
+      }
+    }
+  }
+  .tablecls{
+    margin-top: 20px;
+  }
+  .button_box{
+    display: flex;
+    justify-content: center;
+    margin: 20px;
+    .el-button{
+      width: 100px;
+      margin-left: 20px;
+    }
+  }
+}
+</style>

+ 90 - 79
src/views/appoint/components/saleContract/addTransportPrice.vue

@@ -8,8 +8,8 @@
       </div> 
       <div class="liulan">
           <el-button type="primary" class="btn" @click="oilPriceFormulaClick">浏览</el-button>
-          <el-button type="primary" class="btn1" @click="addressClick">浏览</el-button>
-          <!-- <el-button type="primary" class="btn2">浏览</el-button> -->
+          <el-button type="primary" class="btn1" @click="ondrawerOut">选择</el-button>
+          <!-- <el-button type="primary" class="btn1" @click="addressClick">浏览</el-button> -->
       </div>
     </div>
     <div class="elForm">
@@ -66,35 +66,30 @@
         </vue-scroll>
       </div>
     </el-drawer>
-    <!-- 地址模态框 -->
-    <el-drawer
-      title="请选择收货地址"
-      :visible.sync="addresDrawer"
-      :direction="direction"
-      :before-close="handleClose"
-      close-on-press-escape
-      wrapperClosable
-      modal
-      size="40%"
-    >
-      <div class="selectText">
-        <!-- <span></span> -->
-        <el-input v-model="addresText" placeholder="请输入内容"></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-dialog title="收货地址" :visible.sync="drawer1" width="90%">
+      <el-form :inline="true">
+        <el-form-item>
+            <label class="el-form-item__label" style="width: auto;">省</label>
+            <el-select v-model="province" filterable placeholder="请选择" @change="onchangeProvince">
+              <el-option v-for="item in provinceList" :key="item.id" :label="item.addressProvince" :value="item.id"></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">已选中省市县(区):</label>
+            <label class="el-form-item__label" style="width: auto;">市</label>
+            <el-select v-model="city" filterable placeholder="请选择" @change="onchangeCity">
+              <el-option v-for="item in cityList" :key="item.id" :label="item.addressDistrict" :value="item.id"></el-option>
+            </el-select>
           </el-form-item>
           <el-form-item>
-              <el-input class="el-form-item__content" v-model="address" placeholder="请输入内容" :disabled="true"></el-input>
+            <label class="el-form-item__label" style="width: auto;">县(区)</label>
+            <el-select v-model="county" filterable placeholder="请选择" @change="onchangeCounty">
+              <el-option v-for="item in countyList" :key="item.id" :label="item.addressTown" :value="item.id"></el-option>
+            </el-select>
           </el-form-item>
-         </el-form>
-         <!-- 具体收货地址 -->
-         <div v-if="address != null">
-           <el-form :inline="true" style="margin-top: 0.5rem;" >
-
-          <el-form-item label="具体收货地址:">
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto;">具体收货地址</label>
             <el-autocomplete
               class="inline-input"
               v-model="place"
@@ -104,26 +99,14 @@
               @select="handleSelect1"
             >
             </el-autocomplete>
-          </el-form-item> 
-
-          <el-button type="primary" @click="specificAddress">确定</el-button>
-         </el-form>
-         </div>
-         
-      </div>
-      <div class="LineTable">
-        <vue-scroll :ops="ops" style="width:100%;height:100%">
-          <dilTable 
-            v-bind.sync="addres"
-            @radio-change="currentRadioChange1"
-            :isKuang="isKuang"
-            :loading="tableLoading"
-            :drawer="addresDrawer"
-            @func="func"
-          ></dilTable>
-        </vue-scroll>
+          </el-form-item>
+      </el-form>
+      <div slot="footer" class="button-box">
+        <el-button @click="drawer1 = false">取 消</el-button>
+        <el-button type="primary" @click="specificAddress">确定</el-button>
       </div>
-    </el-drawer>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -134,18 +117,12 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      //已选中 省市县(区)
-      address:null,
       //具体收货地址
       place:null,
       //承运商名称
       state: null,
       //承运商id
       carrierIds: null,
-      //是否打开收货地址模态框
-      addresDrawer:false,
-      //收货地址查询条件
-      addresText:null,
       //收货地址id
       addressId:null,
       //收货地址模态框数据
@@ -154,7 +131,20 @@ export default {
         requestUrl:"",
         selectionType: "radio",
       },
-
+      //是否打开收货地址弹出框
+      drawer1:false,
+      //所有省
+      provinceList: [],
+      //选中的省
+      province: '',
+      //所有市
+      cityList: [],
+      //选中的市
+      city: '',
+      //所有的县(区)
+      countyList: [],
+      //选中的县
+      county: '',
       //是否点击查询
       isKuang:false,
       //表格加载状态
@@ -178,9 +168,10 @@ export default {
       direction: 'rtl',
       //表单数据
       form1: {
+        shipperId:1,
         priceDate:new Date(),
         oilTypeId:10,
-        capacityTypeId:1
+        capacityTypeId:1,
       },
       //提交给后端的数据
       // map:{},
@@ -207,7 +198,6 @@ export default {
       )
       .then((res) => {
         if (res.data.code == "200") {
-          console.log(res.data.data);
           if (res.data.data) {
             this.state = res.data.data.carrierName;
             this.carrierIds = res.data.data.carrierId;
@@ -215,21 +205,48 @@ export default {
         }
       });
   },
+  created(){
+    //获取所有的省
+    this.getAllProvince();
+  },
   methods: {
     func(res){
         this.selectLineLoading = false;
         this.isKuang = false;
         this.tableLoading = false;
     },
-    selectAddresClick(){
-      this.tableLoading = true;
-      this.selectLineLoading = true;
-      this.isKuang = true;
-      if(this.addresText){
-        this.addres.requestUrl = "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con="+this.addresText;
-      }else{
-        this.addres.requestUrl = "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
+    //点击外层收货地址选择事件
+    ondrawerOut(){
+      this.drawer1 = true;
+    },
+    //获取所有省数据
+    getAllProvince(){
+      this.axios.post('/api/v1/uc/getAllProvince').then((res)=>{
+        this.provinceList = res.data.data;
+      })
+    },
+    //省改变
+    onchangeProvince(){
+      this.axios.post('/api/v1/uc/getDistrictByProvince?addressProvince='+this.province).then((res)=>{
+        this.cityList = res.data.data;
+      })
+    },
+    //市改变
+    onchangeCity(){
+      this.axios.post('/api/v1/uc/getTownByDistrict?addressDistrict='+this.city).then((res)=>{
+        this.countyList = res.data.data;
+      })
+    },
+    //县(区)改变
+    onchangeCounty(){
+      let mapValue = {
+        addressProvince : this.province,
+        addressDistrict : this.city,
+        addressTown : this.county
       }
+      this.axios.post('/api/v1/uc/getPlaceByAllAddress',mapValue).then((res)=>{
+        this.addressId = res.data.data[0].addressId;
+      })
     },
     selectLineClick(){
       this.tableLoading = true;
@@ -256,9 +273,7 @@ export default {
         .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
         .then((res) => {
           if (res.data.code == "200") {
-            // console.log(res.data.data);
             var restaurants = res.data.data;
-            // console.log(restaurants, "restaurants");
             var results = queryString
               ? restaurants.filter(this.createFilter(queryString))
               : restaurants;
@@ -326,10 +341,6 @@ export default {
       this.formulaString = val.formulaString;
       this.oilPriceFormulaId = val.formulaId;
     },
-    currentRadioChange1(val){
-      this.address = val.address,
-      this.addressId = val.addressId;
-    },
     //具体地址确定
     specificAddress(){
       let mapvalue = {
@@ -339,34 +350,26 @@ export default {
         cargonameId : this.oilPriceFormulaId,
         priceValue : this.form1.priceValue,
         priceDate : this.form1.priceDate,
-        addressName:this.address +''+ this.place,
+        addressName:this.province+this.city+this.county+this.place,
         type : this.form1.type,
         oilpriceBase : this.form1.oilpriceBase,
         oilTypeId : this.form1.oilTypeId,
         oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
       }
       this.form1 = mapvalue;
-      this.addresDrawer = false;
+      this.drawer1 = false;
     },
     //打开线路的模态窗口
     oilPriceFormulaClick(){
       this.oilPriceFormulaDrawer = true;
       this.oilPriceFormula.requestUrl = "/api/v1/uc/getOilFormula?apiId=444"
     },
-    addressClick(){
-      this.addresDrawer = true;
-      this.addres.requestUrl = "/api/v1/ams/getAddressDeliveryAddress?apiId=255"
-    },
     //模态窗口关闭时调用
     handleClose(){
       if(this.oilPriceFormulaDrawer){
         this.oilPriceFormulaDrawer = false;
         this.LineText = null;
       }
-      if(this.addresDrawer){
-        this.addresDrawer = false;
-        this.addresText = null;
-      }
     },
     makeSure() {
       let mapValue={
@@ -404,6 +407,14 @@ export default {
 .elForm {
     margin-left: 30%;
   }
+.button-box{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
 .addTransportPrice{
   .form{
     display: flex;

+ 29 - 121
src/views/appoint/components/saleContract/saleOrder.vue

@@ -2,36 +2,35 @@
   <!-- 销售订单页面 -->
   <div class="salePlan">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-input placeholder="请输入内容" v-model="input" style="width:250px" clearable> </el-input>
           <el-button type="primary" class="btn" @click="onclick">
-            <i class="el-icon-search"></i>查询
-          </el-button>
-          <el-button type="primary" @click="btnclick(0)">
-            <i class="el-icon-plus"></i>钢材订单新增
+          <i class="el-icon-search"></i>查询
           </el-button>
           <el-button type="primary" @click="refresh">
             <i class="el-icon-refresh"></i>刷新
           </el-button>
-      <!-- <el-form :inline="true">
-        <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">时间段</label>
-            <el-date-picker
-            v-model="startDate"
-            type="date"
-            placeholder="开始日期">
-        </el-date-picker>
-        </el-form-item>
-        <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">至</label>
-            <el-date-picker
-            v-model="endDate"
-            type="date"
-            placeholder="结束日期">
-        </el-date-picker>
-        </el-form-item>
-        <el-form-item>
-        </el-form-item>
-      </el-form> -->
+          <!-- <el-form :inline="true">
+            <el-form-item>
+              <label class="el-form-item__label" style="width: auto;">时间段</label>
+                <el-date-picker
+                v-model="startDate"
+                type="date"
+                placeholder="开始日期"
+                style="width:200px">
+            </el-date-picker>
+            </el-form-item>
+            <el-form-item>
+              <label class="el-form-item__label" style="width: auto;">至</label>
+                <el-date-picker
+                v-model="endDate"
+                type="date"
+                placeholder="结束日期"
+                style="width:200px">
+            </el-date-picker>
+            </el-form-item>
+            <el-form-item>
+            </el-form-item>
+          </el-form> -->
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <!-- 已审批 -->
@@ -80,94 +79,6 @@
         </el-table-column>
         </dilTable>
       </el-tab-pane>
-      <!-- 未上报 -->
-      <el-tab-pane label="未上报" name="first">
-        <dilTable v-bind.sync="option" ref="table3">
-          <el-table-column fixed="right" label="操作" align="center" width="200">
-            <template slot-scope="scope">
-              <el-button
-                @click="uploadclick(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >上传</el-button
-              >
-              <el-button
-                @click="click(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >修改</el-button
-              >
-              <el-button
-                type="text"
-                size="small"
-                @click="deleteclick(scope.row.saleOrderId)"
-                >删除</el-button
-              >
-              <el-button
-                @click="detailclick3(scope.row)"
-                type="text"
-                size="small"
-                >物资详情</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="tableData3" 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>
-      </el-tab-pane>
-      <!-- 已下发 -->
-      <el-tab-pane label="已上报" name="second">
-        <dilTable v-bind.sync="option2" ref="table2">
-        <el-table-column fixed="right" label="操作" width="70">
-            <template slot-scope="scope">
-              <el-button
-                @click="detailclick2(scope.row)"
-                type="text"
-                size="small"
-                >物资详情</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="tableData2" 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>
-      </el-tab-pane>
       
     </el-tabs>
   </div>
@@ -181,8 +92,8 @@ export default {
       // shiyHeigth:140,
       // isHeigth:true,
       // isKuang:false,
-      // startDate : new Date().getTime() - 3600 * 1000 * 24 * 3,
-      // endDate : new Date(),
+      startDate : new Date().getTime() - 3600 * 1000 * 24 * 85,
+      endDate : new Date(),
       activeName: "four",
       input: "",
       option: {
@@ -203,8 +114,8 @@ export default {
       option4: {
         // 表格请求数据的地址
         requestUrl:
-          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409",
-          //&shipperId=2&startDate="+sjTime(this.startDate)+"&endDate="+sjTime(this.endDate)
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=2"
+          // &startDate="+sjTime(new Date().getTime() - 3600 * 1000 * 24 * 85)+"&endDate="+sjTime(new Date()),
       },
       
       //记录旧的row对象 (销售公司已审批)
@@ -268,15 +179,12 @@ export default {
       }else if(this.activeName == "second"){
         this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
       }else if(this.activeName == "four"){
-        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&con="+this.input;      
+        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=2&con="+this.input;      
       }
     },
     seeclick(saleOrderId) {
       this.$router.push("/saleOrderDetail/" + saleOrderId);
     },
-    btnclick() {
-      this.$router.push("/addSaleOrder");
-    },
     click(saleOrderId) {
       this.$router.push("/editSaleOrder/" + saleOrderId);
     },

+ 4 - 95
src/views/appoint/components/saleContract/saleOrderCoproduct.vue

@@ -55,94 +55,6 @@
 
         </dilTable>
       </el-tab-pane>
-      <!-- 未上报 -->
-      <el-tab-pane label="未上报" name="first">
-        <dilTable v-bind.sync="option" ref="table3">
-          <el-table-column fixed="right" label="操作" align="center" width="200">
-            <template slot-scope="scope">
-              <el-button
-                @click="uploadclick(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >上传</el-button
-              >
-              <el-button
-                @click="click(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >修改</el-button
-              >
-              <el-button
-                type="text"
-                size="small"
-                @click="deleteclick(scope.row.saleOrderId)"
-                >删除</el-button
-              >
-              <el-button
-                @click="detailclick3(scope.row)"
-                type="text"
-                size="small"
-                >物资详情</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="tableData3" 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>
-      </el-tab-pane>
-      <!-- 已下发 -->
-      <el-tab-pane label="已上报" name="second">
-        <dilTable v-bind.sync="option2" ref="table2">
-        <el-table-column fixed="right" label="操作" width="70">
-            <template slot-scope="scope">
-              <el-button
-                @click="detailclick2(scope.row)"
-                type="text"
-                size="small"
-                >物资详情</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="tableData2" 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>
-      </el-tab-pane>
       
     </el-tabs>
     <!-- 承运商模态框 -->
@@ -162,7 +74,7 @@
       <el-button type="primary" @click="selectMakeSure">确定</el-button>
       <div class="tablecls">
         <!-- 查询所有的承运商 -->
-        <dilTable v-bind.sync="carrier" @radio-change="currentRadioChange">
+        <dilTable v-bind.sync="carrier" @radio-change="currentRadioChange" :drawer="drawer">
         </dilTable>
       </div>
     </el-drawer>
@@ -197,7 +109,7 @@ export default {
       option4: {
         // 表格请求数据的地址
         requestUrl:
-          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409",
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1",
           selectionType: "select",
       },
       carrier: {
@@ -267,7 +179,7 @@ export default {
       }else if(this.activeName == "second"){
         this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
       }else if(this.activeName == "four"){
-        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&con="+this.input;      
+        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con="+this.input;      
       }
     },
     //模糊查询承运商
@@ -320,7 +232,7 @@ export default {
             ).then((res) => {
               if(res.data.code=='0'){
                 this.$message({ type: "success",message: "授权成功!",});
-                this.$router.go(0);
+                this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&i="+new Date();
               }
             });
         })
@@ -335,9 +247,6 @@ export default {
     seeclick(saleOrderId) {
       this.$router.push("/saleOrderDetail/" + saleOrderId);
     },
-    btnclick() {
-      this.$router.push("/addSaleOrder");
-    },
     click(saleOrderId) {
       this.$router.push("/editSaleOrder/" + saleOrderId);
     },

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

@@ -121,7 +121,7 @@ export default {
     },
     onclick() {
       if(this.activeName == "four"){
-        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&con="+this.input;      
+        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con="+this.input;      
       }
     },
     coproductSendClick(saleOrderId){

+ 446 - 0
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -0,0 +1,446 @@
+<template>
+  <!-- 销售订单页面 -->
+  <div class="salePlan">
+    <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="btnclick(0)">
+        <i class="el-icon-plus"></i>钢材订单新增
+      </el-button>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <!-- 未上报 -->
+      <el-tab-pane label="未上报" name="first">
+        <dilTable v-bind.sync="option" ref="table3">
+          <el-table-column fixed="right" label="操作" align="center" width="200">
+            <template slot-scope="scope">
+              <el-button
+                @click="uploadclick(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >上传</el-button
+              >
+              <!-- <el-button
+                @click="click(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >修改</el-button
+              > -->
+              <el-button
+                type="text"
+                size="small"
+                @click="deleteclick(scope.row.saleOrderId)"
+                >删除</el-button
+              >
+              <el-button
+                @click="detailclick3(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</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="tableData3" 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>
+      </el-tab-pane>
+      <!-- 已审批 -->
+       <el-tab-pane label="已审批" name="four">
+        <dilTable v-bind.sync="option4" ref="table">
+          <el-table-column fixed="right" label="操作" width="80">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</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="tableData" 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>
+      </el-tab-pane>
+      <!-- 已上报 -->
+      <el-tab-pane label="已上报" name="second">
+        <dilTable v-bind.sync="option2" ref="table2">
+        <el-table-column fixed="right" label="操作" width="70">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick2(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</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="tableData2" 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>
+      </el-tab-pane>
+      
+    </el-tabs>
+  </div>
+</template>
+<script>
+export default {
+  name: "saleOrder",
+  data() {
+    return {
+      activeName: "first",
+      drawer: false,
+      input: "",
+      index: "",
+      carrierId: null,
+      carrierName: null,
+      option: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getSaleOrderInfoes?apiId=408",
+      },
+      option2: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getSaleOrderReportedes?apiId=408",
+      },
+      option3: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409",
+      },
+      option4: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1",
+      },
+      mapList: [],
+      mapItemList:[],
+      //记录旧的row对象 (销售公司已审批)
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
+      oldRowCount: 1,
+      //记录旧的row对象 (财务已审批)
+      oldRow1: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (财务已审批)
+      oldRowCount1: 1,
+      //记录旧的row对象 (已上报)
+      oldRow2: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (已上报)
+      oldRowCount2: 1,
+      //记录旧的row对象 (未上报)
+      oldRow3: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (未上报)
+      oldRowCount3: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      //(销售公司已审批)
+      tableData: [],
+      //(财务已审批)
+      tableData1: [],
+      //(已上报)
+      tableData2: [],
+      //(未上报)
+      tableData3: [],
+    };
+  },
+  methods: {
+    refresh(){
+      this.$router.go(0);
+    },
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
+    onclick() {
+      if(this.activeName == "first"){
+        this.option.requestUrl = "/api/v1/ams/getSaleOrderInfoes?apiId=408&con="+this.input;
+      }else if(this.activeName == "second"){
+        this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
+      }else if(this.activeName == "four"){
+        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con="+this.input;      
+      }
+    },
+    seeclick(saleOrderId) {
+      this.$router.push("/saleOrderDetail/" + saleOrderId);
+    },
+    btnclick() {
+      this.$router.push("/addSaleOrder");
+    },
+    click(saleOrderId) {
+      this.$router.push("/editSaleOrder/" + saleOrderId);
+    },
+    // -------查看物资详情 (已审批)
+    detailclick(row) {
+      // 记录重复点击次数
+      if (this.oldRow === row) {
+        this.oldRowCount += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow != "") {
+        if (this.oldRow != row) {
+          if (this.oldRowCount % 2 === 1) {
+            this.$refs.table.toggleRowExpansion(this.oldRow);
+          } else {
+            this.oldRowCount = 1;
+          }
+        } else {
+          this.oldRow = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (财务已审批)
+    detailclick1(row) {
+      // 记录重复点击次数
+      if (this.oldRow1 === row) {
+        this.oldRowCount1 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table1.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow1 != "") {
+        if (this.oldRow1 != row) {
+          if (this.oldRowCount1 % 2 === 1) {
+            this.$refs.table1.toggleRowExpansion(this.oldRow1);
+          } else {
+            this.oldRowCount1 = 1;
+          }
+        } else {
+          this.oldRow1 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow1 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData1 = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (已上报)
+    detailclick2(row) {
+      // 记录重复点击次数
+      if (this.oldRow2 === row) {
+        this.oldRowCount2 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table2.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow2 != "") {
+        if (this.oldRow2 != row) {
+          if (this.oldRowCount2 % 2 === 1) {
+            this.$refs.table2.toggleRowExpansion(this.oldRow2);
+          } else {
+            this.oldRowCount2 = 1;
+          }
+        } else {
+          this.oldRow2 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow2 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData2 = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (未上报)
+    detailclick3(row) {
+      // 记录重复点击次数
+      if (this.oldRow3 === row) {
+        this.oldRowCount3 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table3.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow3 != "") {
+        if (this.oldRow3 != row) {
+          if (this.oldRowCount3 % 2 === 1) {
+            this.$refs.table3.toggleRowExpansion(this.oldRow3);
+          } else {
+            this.oldRowCount3 = 1;
+          }
+        } else {
+          this.oldRow3 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow3 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData3 = res.data.data;
+        });
+    },
+
+    // 上传
+    uploadclick(saleOrderId) {
+      this.$confirm("是否上传", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "上传成功!",
+          });
+          this.axios
+            .post(
+              "/api/v1/ams/uploadSaleOrder?saleOrderId=" +
+                saleOrderId
+            )
+            .then(() => {
+              this.$router.go(0);
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消上传!",
+          });
+        });
+    },
+    //删除
+    deleteclick(scope) {
+      let saleOrderId = scope;
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "删除成功!",
+          });
+          this.axios
+            .post(
+              "/api/v1/ams/deleteAmsSaleOrderBySaleOrderId?saleOrderId=" +
+                saleOrderId
+            )
+            .then(() => {
+              this.$router.go(0);
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消删除!",
+          });
+        });
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.salePlan {
+  .top {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 358 - 0
src/views/appoint/components/saleContract/saleOrderSteelCar.vue

@@ -0,0 +1,358 @@
+<template>
+  <!-- 销售订单页面 -->
+  <div class="salePlan">
+    <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="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <!-- 未授权 -->
+       <el-tab-pane label="未授权" name="four">
+        <dilTable v-bind.sync="option4" ref="table">
+          <el-table-column fixed="right" label="操作" width="200">
+            <template slot-scope="scope">
+              <el-button
+                @click="empowerCarrierClick(scope.row.saleOrderMaterialId)"
+                type="text"
+                size="small"
+                >授权承运商</el-button
+              >
+              <el-button
+                @click="steelSendClick(scope.row.saleOrderMaterialId)"
+                type="text"
+                size="small"
+                >钢材派车</el-button
+              >
+              <el-button
+                @click="detailclick(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</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="tableData" 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>
+      </el-tab-pane>
+
+      <!-- 未派车 -->
+      <el-tab-pane label="未派车" name="five">
+        <dilTable v-bind.sync="option0" ref="table0">
+        <el-table-column fixed="right" label="操作" width="70">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick0(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</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="tableData0" 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>
+      </el-tab-pane>
+      <!-- 已派车 -->
+      <el-tab-pane label="已派车" name="first">
+        <dilTable v-bind.sync="option" ref="table3">
+          <el-table-column fixed="right" label="操作" align="center" width="80">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick3(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</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="tableData3" 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>
+      </el-tab-pane>
+      
+    </el-tabs>
+  </div>
+</template>
+<script>
+export default {
+  name: "saleOrder",
+  data() {
+    return {
+      activeName: "four",
+      drawer: false,
+      input: "",
+      index: "",
+      carrierId: null,
+      carrierName: null,
+      option: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getHaveCarTruckNoList?apiId=466",
+      },
+      option2: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getSaleOrderReportedes?apiId=408",
+      },
+      option3: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409",
+      },
+      option4: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getSteelTruckNoList?apiId=411",
+      },
+      option0: {
+        // 表格请求数据的地址
+        requestUrl:
+        "/api/v1/ams/getNoCarTruckNoList?apiId=466"
+      },
+      mapList: [],
+      mapItemList:[],
+      //记录旧的row对象 (销售公司已审批)
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
+      oldRowCount: 1,
+      //记录旧的row对象 (财务已审批)
+      oldRow1: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (财务已审批)
+      oldRowCount1: 1,
+      //记录旧的row对象 (已上报)
+      oldRow2: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (已上报)
+      oldRowCount2: 1,
+      //记录旧的row对象 (未上报)
+      oldRow3: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (未上报)
+      oldRowCount3: 1,
+      //记录旧的row对象 (未派车)
+      oldRow0: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (未派车)
+      oldRowCount0: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      //(销售公司已审批)
+      tableData: [],
+      //(财务已审批)
+      tableData1: [],
+      //(已上报)
+      tableData2: [],
+      //(未上报)
+      tableData3: [],
+      //(未派车)
+      tableData0: [],
+    };
+  },
+  methods: {
+    refresh(){
+      this.$router.go(0);
+    },
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
+    onclick() {
+      if(this.activeName == "first"){
+        this.option.requestUrl = "/api/v1/ams/getSaleOrderInfoes?apiId=408&con="+this.input;
+      }else if(this.activeName == "second"){
+        this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
+      }else if(this.activeName == "four"){
+        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con="+this.input;      
+      }
+    },
+    seeclick(saleOrderId) {
+      this.$router.push("/saleOrderDetail/" + saleOrderId);
+    },
+    empowerCarrierClick(saleOrderMaterialId){
+      this.$router.push("/saleOrderSteelEmpower/" + saleOrderMaterialId);
+    },
+    steelSendClick(saleOrderMaterialId){
+      this.$router.push("/addSaleOrderSteelSend/" + saleOrderMaterialId);
+    },
+    // -------查看物资详情 (已审批)
+    detailclick(row) {
+      // 记录重复点击次数
+      if (this.oldRow === row) {
+        this.oldRowCount += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow != "") {
+        if (this.oldRow != row) {
+          if (this.oldRowCount % 2 === 1) {
+            this.$refs.table.toggleRowExpansion(this.oldRow);
+          } else {
+            this.oldRowCount = 1;
+          }
+        } else {
+          this.oldRow = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +row.saleOrderMaterialId)
+        .then((res) => {
+          this.tableData = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (已派车)
+    detailclick3(row) {
+      // 记录重复点击次数
+      if (this.oldRow3 === row) {
+        this.oldRowCount3 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table3.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow3 != "") {
+        if (this.oldRow3 != row) {
+          if (this.oldRowCount3 % 2 === 1) {
+            this.$refs.table3.toggleRowExpansion(this.oldRow3);
+          } else {
+            this.oldRowCount3 = 1;
+          }
+        } else {
+          this.oldRow3 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow3 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +row.saleOrderMaterialId)
+        .then((res) => {
+          this.tableData3 = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (未派车)
+    detailclick0(row) {
+      // 记录重复点击次数
+      if (this.oldRow0 === row) {
+        this.oldRowCount0 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table0.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow0 != "") {
+        if (this.oldRow0 != row) {
+          if (this.oldRowCount0 % 2 === 1) {
+            this.$refs.table0.toggleRowExpansion(this.oldRow0);
+          } else {
+            this.oldRowCount0 = 1;
+          }
+        } else {
+          this.oldRow0 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow0 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +row.saleOrderMaterialId)
+        .then((res) => {
+          this.tableData0 = res.data.data;
+        });
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.salePlan {
+  .top {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 185 - 0
src/views/appoint/components/saleContract/saleOrderSteelCarrier.vue

@@ -0,0 +1,185 @@
+<template>
+  <!-- 销售订单页面 -->
+  <div class="salePlan">
+    <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="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <!-- 已审批 -->
+       <el-tab-pane label="已审批" name="four">
+        <dilTable v-bind.sync="option4" ref="table">
+          <el-table-column fixed="right" label="操作" width="200">
+            <template slot-scope="scope">
+              <el-button
+                @click="steelSendClick(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >钢材派车</el-button
+              >
+              <el-button
+                @click="detailclick(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</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="tableData" 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>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "saleOrder",
+  data() {
+    return {
+      activeName: "four",
+      drawer: false,
+      input: "",
+      index: "",
+      carrierId: null,
+      carrierName: null,
+      option4: {
+        // 表格请求数据的地址
+        requestUrl:
+          "",
+      },
+      mapList: [],
+      mapItemList:[],
+      //记录旧的row对象 (销售公司已审批)
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
+      oldRowCount: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      //(销售公司已审批)
+      tableData: [],
+    };
+  },
+  created(){
+      this.initUrl();
+  },
+  methods: {
+    initUrl(){
+        if (getCookie("orgCode") == "chengyunshang") {
+        this.option4.requestUrl =
+          "/api/v1/ams/getSaleOrderListToCarrier?apiId=467&carrierSsoId=" +
+          getCookie("userId");
+      } else {
+        this.option4.requestUrl =
+          "/api/v1/ams/getSaleOrderListToCarrier?apiId=467&carrierSsoId=" + null;
+      }
+    },
+    refresh(){
+      this.$router.go(0);
+    },
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
+    onclick() {
+      if(this.activeName == "first"){
+        this.option.requestUrl = "/api/v1/ams/getSaleOrderInfoes?apiId=408&con="+this.input;
+      }else if(this.activeName == "second"){
+        this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
+      }else if(this.activeName == "four"){
+        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con="+this.input;      
+      }
+    },
+    seeclick(saleOrderId) {
+      this.$router.push("/saleOrderDetail/" + saleOrderId);
+    },
+    steelSendClick(saleOrderId){
+      this.$router.push("/addSaleOrderSteelSendCarrier/" + saleOrderId);
+    },
+    // -------查看物资详情 (已审批)
+    detailclick(row) {
+      // 记录重复点击次数
+      if (this.oldRow === row) {
+        this.oldRowCount += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow != "") {
+        if (this.oldRow != row) {
+          if (this.oldRowCount % 2 === 1) {
+            this.$refs.table.toggleRowExpansion(this.oldRow);
+          } else {
+            this.oldRowCount = 1;
+          }
+        } else {
+          this.oldRow = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData = res.data.data;
+        });
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.salePlan {
+  .top {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 532 - 0
src/views/appoint/components/saleContract/saleOrderSteelEmpower.vue

@@ -0,0 +1,532 @@
+<template>
+  <div class="addSaleOrderSend">
+    <page-title>销售钢材订单授权承运商</page-title>
+    <!-- 派车表格 -->
+    <div class="selectionTable from">
+      <el-table
+        :data="selectionList"
+        border
+        style="width: 100%"
+        highlight-current-row
+        :span-method="cellMerge"
+      >
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          :width="item.width"
+          align="center"
+          show-overflow-tooltip
+        >
+          <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" v-if="item.label !== '重量'">
+            <span>{{ item.label }}</span>
+          </template>
+          <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" v-if="item.label !== '截止日期'">
+            <span>{{ item.label }}</span>
+          </template>
+          <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">
+
+              <!-- 承运商 -->
+              <template v-if="item.prop == 'carrierName'">
+                  <el-autocomplete
+                    class="inline-input"
+                    v-model="scope.row.carrierName"
+                    :fetch-suggestions="querySearch"
+                    placeholder="请输入承运商名称"
+                    :trigger-on-focus="false"
+                    @change="batchUpdateValue(scope.row,scope.$index)"
+                    @select="handleSelect"
+                  >
+                    <template slot-scope="{ item }">
+                      <div class="name" v-if="item.carrierName">
+                        {{ item.carrierName }}
+                      </div>
+                    </template>
+                  </el-autocomplete>
+              </template>
+
+              <!-- 物资件数 -->
+              <template v-if="item.prop == 'orderPlanWeight'">
+                <el-input
+                  class="textinput"
+                  @input="onInput"
+                  placeholder="(必填)"
+                  v-model.number="scope.row.orderPlanWeight"
+                  disabled
+                ></el-input>
+              </template>
+
+              <!-- 物资重量 -->
+              <template v-if="item.prop == 'materialWeight'">
+                <el-input
+                  class="textinput"
+                  v-model.number="scope.row.materialWeight"
+                  disabled
+                ></el-input>
+              </template>
+
+              <!-- 截止日期 -->
+              <template v-if="item.prop == 'saleDateOfReceipt'">
+                 <el-date-picker
+                  class="textinput3"
+                  type="date"
+                  v-model.number="scope.row.saleDateOfReceipt"
+                  style="width:135px"
+                  disabled
+                ></el-date-picker>
+              </template>
+              <!-- 收货客户 -->
+              <template v-if="item.prop == 'saleOrderConsignee'">
+                <el-input
+                  class="textinput4"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsignee"
+                  disabled
+                ></el-input>
+              </template>
+              <!-- 收货客户电话号码 -->
+              <template v-if="item.prop == 'saleOrderConsigneeTel'">
+                <el-input
+                  class="textinput5"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsigneeTel"
+                  @input="onInput"
+                  disabled
+                ></el-input>
+              </template>
+            </template>
+            <template v-else>
+              <span>{{ scope.row[item.prop] }}</span>
+            </template>
+          </template>
+        </el-table-column>
+        <!-- 操作列 -->
+        <!-- <el-table-column fixed="right" label="操作" width="100">
+        </el-table-column> -->
+      </el-table>
+    </div>
+
+    <div class="button_box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure">确认授权</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+import { sjTime,isNumber,isIntegerNumber } from "@/utils/sharedJsFile";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      //存放每一行记录的合并数
+      spanArr: [],
+      //pos是spanArr的索引
+      pos:0,
+      //所有选中承运商Id和承运商名称暂存
+      carrierIdAndName: [],
+      //承运商下拉框中的值
+      carrierNameOptions:[],
+      //当前车序号物资
+      selectionList:[],
+      tableTop: [
+        {
+          prop: "truckNo",
+          label: "车序号",
+          width: "50",
+        },
+        {
+          prop: "carrierName",
+          label: "承运商",
+          width: "240",
+          slot: true,
+        },
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: "140",
+        },
+        {
+          prop: "Specification",
+          label: "规格型号",
+          width: "140",
+        },
+        {
+          prop: "materialCode",
+          label: "物资编码",
+          width: "140",
+        },
+        {
+          prop: "orderPlanWeight",
+          label: "件数",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "materialWeight",
+          label: "重量",
+          width: "100",
+          slot: true,
+        },
+        {
+          prop: "saleDateOfReceipt",
+          label: "截止日期",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "saleShipperAddressName",
+          label: "收货地址",
+          width: "300",
+        },
+        {
+          prop: "saleOrderConsignee",
+          label: "收货客户",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "saleOrderConsigneeTel",
+          label: "收货客户电话号码",
+          slot: true,
+          width: "150",
+        },
+      ],
+    };
+  },
+  created(){
+    this.getValue();
+  },
+  methods: {
+    getValue(){
+      this.axios
+      .post("/api/v1/ams/getTruckNoMaterial?saleOrderMaterialId=" + this.$route.params.saleOrderMaterialId)
+      .then((res)=>{
+        if(res.data.data.length==0){
+            this.$confirm("该销售订单尚未排车!是否先进行排车?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+              center: true,
+            })
+            .then(() => {
+              this.$router.push("/addSaleOrderArrange/" + this.$route.params.saleOrderId);
+            })
+            .catch(() => {
+              this.$message({ type: "info", message: "取消!",});
+            });
+        }
+        //赋值派车表格
+        res.data.data.forEach((e) => {
+          if(e.saleOrderConsignee=="null"){
+            e.saleOrderConsignee = null
+          }
+          if(e.saleOrderConsigneeTel=="null"){
+            e.saleOrderConsigneeTel = null
+          }
+          //判断是否已经定向派单
+          if(!e.carrierId){
+            //不带承运商初始化派车表格
+            var addmap = {
+                truckNo: e.truckNo,
+                saleOrderMaterialId: e.saleOrderMaterialId,
+                carrierName: null,
+                carrierId: null,
+                materialId: e.materialId,
+                materialName: e.materialName,
+                Specification: e.materialModelSpecification,
+                materialCode: e.materialCode,
+                orderPlanWeight: e.materialNumber,
+                materialWeight: e.materialWeight,
+                saleShipperAddressId: e.placeId,
+                saleShipperAddressName:e.place,
+                saleDateOfReceipt: e.receiptDate,
+                saleOrderConsignee: e.saleOrderConsignee,
+                saleOrderConsigneeTel: e.saleOrderConsigneeTel,
+            };
+            this.selectionList.push(addmap);
+            //调用记录每一行的合并数的方法
+            this.getSpanArr(this.selectionList);
+          }
+        });
+      });
+    },
+
+    //承运商弹出层
+    handleSelect(item) {
+      let carrierIdAndNameItem = {
+        carrierId : item.carrierId,
+        carrierName : item.carrierName
+      }
+      this.carrierIdAndName.push(carrierIdAndNameItem);
+    },
+    //以下是承运商边输边查搜索
+    querySearch(queryString, cb) {
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .then((res) => {
+          if (res.data.code == "200") {
+            var restaurants = res.data.data;
+            var results = queryString
+              ? restaurants.filter(this.createFilter(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是承运商边输边查搜索
+
+    onInput(val){
+      if(!isNumber(val)){
+        this.$message.warning('重量/电话号码请输入数字')
+      }
+    },
+
+    //点击确定按钮的事件
+    makeSure(){
+      //是否可发送请求
+      var canSend = 1;
+      if(this.selectionList.length>0){
+          this.selectionList.forEach((e)=>{
+          if(e.carrierName==null){
+              canSend = 0;
+          }
+          if(isIntegerNumber(e.carrierName)){
+              e.carrierId = e.carrierName;
+          }
+        });
+      }else{
+          canSend = -1;
+      }
+      if(canSend==0){
+          //还有车序号未授权承运商
+          this.$message.warning('还有车序号未授权承运商!')
+      }else if(canSend==-1){
+          this.$message.warning('该订单没有要授权承运商的车序号了!')
+      }else{
+          this.$confirm("请仔细确认是否授权这些承运商!", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+              center: true,
+            })
+            .then(() => {
+              var mapList = [];
+              //取得要发送的车序号和它的承运商
+              for(var i=0;i<this.spanArr.length;i++){
+                  if(this.spanArr[i]>0){
+                      //从所有选中承运商Id和承运商名称暂存中取出当前行的承运商Id
+                      this.carrierIdAndName.forEach((item) => {
+                        if(this.selectionList[i].carrierName==item.carrierName){
+                          this.selectionList[i].carrierId = item.carrierId;
+                        }
+                      })
+                      var oneCarAndCarrier = {
+                          //车序号Id
+                          saleOrderMaterialId : 0,
+                          //省市县id
+                          carrierId : 0,
+                      }
+                      oneCarAndCarrier.saleOrderMaterialId = this.selectionList[i].saleOrderMaterialId,
+                      oneCarAndCarrier.carrierId = this.selectionList[i].carrierId,
+                      mapList.push(oneCarAndCarrier);
+                  }
+              }
+              this.axios.post('/api/v1/ams/dispatchToCarrier',mapList)
+              .then((res)=>{
+                this.cancel();
+                 this.$message.success('授权成功!')               
+              });
+            })
+            .catch(() => {
+              this.$message({ type: "info", message: "取消!",});
+            });
+      }
+    },
+    //点击取消按钮的事件
+    cancel(){
+      this.$router.push('/saleOrderSteelCar')
+    },
+    //批量修改内层值
+    batchUpdateValue(row,index){
+      for(var i=index;i<this.spanArr[index]+index;i++){
+        this.selectionList[i].carrierName=row.carrierName;
+      }
+    },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+            if (i === 0) {
+                  this.spanArr.push(1);
+                  this.pos = 0
+            } else {
+                // 判断当前元素与上一个元素是否相同
+                if (data[i].truckNo === data[i - 1].truckNo) {
+                  this.spanArr[this.pos] += 1;
+                  this.spanArr.push(0);
+                } else {
+                  this.spanArr.push(1);
+                  this.pos = i;
+                }
+            }
+        }
+    },
+    //根据条件合并行
+    cellMerge({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 1) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 7) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 8) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 9) {
+            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
+            }
+      }
+      if (columnIndex === 11) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 12) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+    },
+  },
+};
+</script>
+
+<style lang='scss'>
+.addSaleOrderSend {
+  .from {
+    margin-top: 20px;
+    .line {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 350px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+    }
+    .sendCar {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 70px;
+        margin-left: 10px;
+        margin-right: 10px;
+        margin-top: 10px;
+      }
+    }
+    .vehicle {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin-top: 20px;
+      .el-button {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+      .span {
+        width: 70px;
+      }
+    }
+  }
+  .tablecls{
+    margin-top: 20px;
+  }
+  .button_box{
+    display: flex;
+    justify-content: center;
+    margin: 20px;
+    .el-button{
+      width: 100px;
+      margin-left: 20px;
+    }
+  }
+}
+</style>

+ 12 - 0
src/views/appoint/router/index.js

@@ -35,6 +35,8 @@ import addSaleOrderArrange from '../components/saleContract/addSaleOrderArrange.
 import addSaleOrderSend from '../components/saleContract/addSaleOrderSend.vue'
 import addSaleOrderCoproductSend from '../components/saleContract/addSaleOrderCoproductSend.vue'
 import addSaleOrderCoproductSendCarrier from '../components/saleContract/addSaleOrderCoproductSendCarrier.vue'
+import addSaleOrderSteelSend from '../components/saleContract/addSaleOrderSteelSend.vue'
+import addSaleOrderSteelSendCarrier from '../components/saleContract/addSaleOrderSteelSendCarrier.vue'
 import addSalePlan from '../components/saleContract/addSalePlan.vue'
 import addSalePlanDetail from '../components/saleContract/addSalePlanDetail.vue'
 import addTransportPrice from '../components/saleContract/addTransportPrice.vue'
@@ -54,6 +56,10 @@ import saleOrderCoproductCarrier from '../components/saleContract/saleOrderCopro
 import saleOrderDetail from '../components/saleContract/saleOrderDetail.vue'
 import saleOrderDetailApproved from '../components/saleContract/saleOrderDetailApproved.vue'
 import saleOrderMaterial from '../components/saleContract/saleOrderMaterial.vue'
+import saleOrderSteel from '../components/saleContract/saleOrderSteel.vue'
+import saleOrderSteelCar from '../components/saleContract/saleOrderSteelCar.vue'
+import saleOrderSteelCarrier from '../components/saleContract/saleOrderSteelCarrier.vue'
+import saleOrderSteelEmpower from '../components/saleContract/saleOrderSteelEmpower.vue'
 import saleOrderUpdateLog from '../components/saleContract/saleOrderUpdateLog.vue'
 import salePlan from '../components/saleContract/salePlan.vue'
 import transportPrice from '../components/saleContract/transportPrice.vue'
@@ -100,6 +106,8 @@ const constantRouterMap = [
       {path: 'addSaleOrderCoproductSend/:saleOrderId', name: 'addSaleOrderCoproductSend', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderCoproductSend},
       {path: 'addSaleOrderCoproductSendCarrier/:saleOrderId', name: 'addSaleOrderCoproductSendCarrier', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderCoproductSendCarrier},
       {path: 'addSaleOrderSend/:saleOrderId', name: 'addSaleOrderSend', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderSend},
+      {path: 'addSaleOrderSteelSend/:saleOrderMaterialId', name: 'addSaleOrderSteelSend', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderSteelSend},
+      {path: 'addSaleOrderSteelSendCarrier/:saleOrderId', name: 'addSaleOrderSteelSendCarrier', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderSteelSendCarrier},
       {path: 'addSalePlan', name: 'addSalePlan', meta: {code: 'xtpzgl-yhgl'}, component: addSalePlan},
       {path: 'addSalePlanDetail/:planId', name: 'addSalePlanDetail', meta: {code: 'xtpzgl-yhgl'}, component: addSalePlanDetail},
       {path: 'saleOrderMaterial/:saleOrderId', name: 'saleOrderMaterial', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderMaterial},
@@ -117,6 +125,10 @@ const constantRouterMap = [
       {path: 'saleOrderArrange', name: 'saleOrderArrange', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderArrange},
       {path: 'saleOrderCoproduct', name: 'saleOrderCoproduct', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderCoproduct},
       {path: 'saleOrderCoproductCarrier', name: 'saleOrderCoproductCarrier', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderCoproductCarrier},
+      {path: 'saleOrderSteel', name: 'saleOrderSteel', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderSteel},
+      {path: 'saleOrderSteelCar', name: 'saleOrderSteelCar', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderSteelCar},
+      {path: 'saleOrderSteelCarrier', name: 'saleOrderSteelCarrier', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderSteelCarrier},
+      {path: 'saleOrderSteelEmpower/:saleOrderMaterialId', name: 'saleOrderSteelEmpower', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderSteelEmpower},
       {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},

+ 3 - 0
src/views/inward/components/truckAppoint/addRequirement2.vue

@@ -754,6 +754,9 @@ export default {
     width: 320px;
   }
 }
+.preview-group {
+    width: 700px;
+}
 .swtichTop{
   display: flex;
   height: 40px;

+ 29 - 28
src/views/sale/app.js

@@ -18,6 +18,7 @@ import apollo from '@/config/apolloConfig.js'
 import Print from 'vue-print-nb';
 Vue.use(Print);
 
+
 import 'xe-utils' 
 import VXETable from 'vxe-table'
 import 'vxe-table/lib/style.css'
@@ -25,34 +26,34 @@ Vue.use(VXETable)
 Vue.prototype.$XModal = VXETable.modal
 
 
-// import AMap from 'vue-amap';
-
-// Vue.use(AMap);
-//   AMap.initAMapApiLoader({
-//     key: 'eed46ea40bbcadbf8a9cdd5dc1a94642',
-//     plugin: [
-//       "AMap.Autocomplete", // 输入提示插件
-//       "AMap.PlaceSearch", // POI搜索插件
-//       "AMap.Scale", // 右下角缩略图插件 比例尺
-//       "AMap.OverView", // 地图鹰眼插件
-//       "AMap.ToolBar", // 地图工具条
-//       "AMap.MapType", // 类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制
-//       "AMap.PolyEditor", // 编辑 折线多,边形
-//       "AMap.CircleEditor", // 圆形编辑器插件
-//       "AMap.Geolocation", // 定位控件,用来获取和展示用户主机所在的经纬度位置
-//       "AMap.ControlBar"   // 缩放、尺寸控制器
-//     ],
-//     // 默认高德 sdk 版本为 1.4.4
-//     v: '1.4.15',
-//     uiVersion: '1.1.1'
-// });
-
-// import Share from 'vue-social-share'
-// Vue.use(Share);
-
-// import 'view-design/dist/styles/iview.css';
-// import ViewUI from 'view-design';
-// Vue.use(ViewUI);
+import AMap from 'vue-amap';
+
+Vue.use(AMap);
+  AMap.initAMapApiLoader({
+    key: 'eed46ea40bbcadbf8a9cdd5dc1a94642',
+    plugin: [
+      "AMap.Autocomplete", // 输入提示插件
+      "AMap.PlaceSearch", // POI搜索插件
+      "AMap.Scale", // 右下角缩略图插件 比例尺
+      "AMap.OverView", // 地图鹰眼插件
+      "AMap.ToolBar", // 地图工具条
+      "AMap.MapType", // 类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制
+      "AMap.PolyEditor", // 编辑 折线多,边形
+      "AMap.CircleEditor", // 圆形编辑器插件
+      "AMap.Geolocation", // 定位控件,用来获取和展示用户主机所在的经纬度位置
+      "AMap.ControlBar"   // 缩放、尺寸控制器
+    ],
+    // 默认高德 sdk 版本为 1.4.4
+    v: '1.4.15',
+    uiVersion: '1.1.1'
+});
+
+import Share from 'vue-social-share'
+Vue.use(Share);
+
+import 'view-design/dist/styles/iview.css';
+import ViewUI from 'view-design';
+Vue.use(ViewUI);
 // import VueAMap from 'vue-amap'
  
 // Vue.use(VueAMap)

+ 24 - 49
src/views/sale/components/offSiteTransportation/inTransit.vue

@@ -15,23 +15,7 @@
   </el-form-item>
   <el-form-item>
      <label class="el-form-item__label" style="width: auto;">产品分类</label>
-      <el-select v-model="inputValue" placeholder="产品分类">
-        <el-option
-          v-for="item in inputValues"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <!-- <label class="el-form-item__label" style="width: auto;">产品分类</label>
-      <el-autocomplete
-        popper-class="my-autocomplete"
-        v-model="inputValue"
-        :fetch-suggestions="querySearch"
-        placeholder="请输入内容" 
-      >
-        <i class="el-icon-edit el-input__icon" slot="suffix"> </i>
-      </el-autocomplete> -->
+      <el-input v-model="inputValue" placeholder="请输入内容"></el-input>
   </el-form-item>
   <el-form-item>
       <label class="el-form-item__label" style="width: auto;">车牌号</label>
@@ -47,23 +31,7 @@
   </el-form-item> 
    <el-form-item>
      <label class="el-form-item__label" style="width: auto;">门岗名称</label>
-      <el-select v-model="gatepostName" placeholder="门岗名称">
-        <el-option
-          v-for="item in gatepostNames1"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <!-- <label class="el-form-item__label" style="width: auto;">门岗名称</label>
-       <el-autocomplete
-            popper-class="my-autocomplete"
-            v-model="gatepostName"
-            :fetch-suggestions="querySearch2"
-            placeholder="请输入内容" 
-          >
-            <i class="el-icon-edit el-input__icon" slot="suffix"> </i>
-          </el-autocomplete> -->
+     <el-input v-model="gatepostName" placeholder="请输入内容"></el-input>
   </el-form-item> 
   <el-form-item>
     <label class="el-form-item__label" style="width: auto;">报警类型</label>
@@ -163,7 +131,7 @@ import { sjTime } from "@/utils/sharedJsFile";
 
 //PathView组件注册
 // import PageTitle from "@/offSiteTransportation/mapTest.vue";
-// import PathView from "./mapTest.vue"
+import PathView from "./mapTest.vue"
 // import InTransitOrderMileage from "@/views/TMS/tms-offsite/inTransitOrderMileage.vue"
 // import inTransitAlarm from "@/views/TMS/tms-offsite/inTransitAlarm.vue"
 export default {
@@ -242,11 +210,13 @@ export default {
       },
        option2: {
         // 表格请求数据的地址
-        // requestUrl: "/api/v1/tms/getFinishTruckOrderInfo?apiId=160",
+        requestUrl: "/api/v1/otms/getFinishTruckOrderInfo?apiId=468",
       },
       pathOption:{
            orderNumber:'',
         capacityNumber:'',
+         startPointName:'',
+        endPointName:'',
       },
       mileOption:{
         orderNumber:''
@@ -367,31 +337,31 @@ export default {
       //改变执行中条件
       this.$refs.tab.setDataRequestQuery({"startTime":sjTime(this.dateValue[0]),
                       "endTime": sjTime(this.dateValue[1]),
-                      "productClassification": this.inputValue,
-                      "capacityNumber1": this.capacityNumber1,
-                      "carrierName1":this.carrierName,
-                      "gatepostName1":this.gatepostName,
-                      "consigneeCompanyName1": this.consigneeCompanyName1});
+                      "materialNames": this.inputValue,
+                      "capacityNumbers": this.capacityNumber1,
+                      "carrierNames":this.carrierName,
+                      "outGatepostNames":this.gatepostName,
+                      "consigneeCompanyNames": this.consigneeCompanyName1});
       }
       if(this.activeName=="second"){
       //改变已完成条件              
       this.$refs.tab2.setDataRequestQuery({"startTime":sjTime(this.dateValue[0]),
                       "endTime": sjTime(this.dateValue[1]),
-                      "productClassification": this.inputValue,
-                      "capacityNumber1": this.capacityNumber1,
-                      "carrierName1":this.carrierName,
-                      "gatepostName1":this.gatepostName,
-                      "consigneeCompanyName1": this.consigneeCompanyName1});
+                      "materialNames": this.inputValue,
+                      "capacityNumbers": this.capacityNumber1,
+                      "carrierNames":this.carrierName,
+                      "outGatepostNames":this.gatepostName,
+                      "consigneeCompanyNames": this.consigneeCompanyName1});
       }
       if(this.activeName=="third"){
       //改变有异常条件              
       this.$refs.tab3.setDataRequestQuery({"startTime":sjTime(this.dateValue[0]),
                       "endTime": sjTime(this.dateValue[1]),
-                      "productClassification": this.inputValue,
+                      "materialNames": this.inputValue,
                       "capacityNumber1": this.capacityNumber1,
                       "carrierName1":this.carrierName,
                       "abnormalType":this.exceptionType=="全部类型"?"":this.exceptionType,
-                      "gatepostName1":this.gatepostName,
+                      "outGatepostNames":this.gatepostName,
                       "consigneeCompanyName1": this.consigneeCompanyName1});
       }                              
     },
@@ -399,15 +369,20 @@ export default {
 
     //other
     click(row) {
-      console.log(row,"row")
+     
         this.pathOption.orderNumber=row.orderNumber;
         this.pathOption.capacityNumber=row.capacityNumber;
+        this.pathOption.startPointName="达钢集团"+row.outGatepostName,
+        this.pathOption.endPointName=row.deliveryAddress,
+         console.log(this.pathOption,"this.pathOption")
         this.value7=true;
       // this.$router.push("/offsite/pathView?orderNumber="+row.orderNumber+"&capacityNumber="+row.capacityNumber);
     },
     historyclick(row){
+      
       this.pathOption.orderNumber=row.orderNumber;
         this.pathOption.capacityNumber=row.capacityNumber;
+        
         this.value7=true;
       //this.$router.push("/offsite/pathView?orderNumber="+row.orderNumber+"&capacityNumber="+row.capacityNumber);
     },

+ 12 - 10
src/views/sale/components/offSiteTransportation/mapTest.vue

@@ -3,9 +3,9 @@
         <div id="amap-container"></div>
          <div class="controller">
              <div class="in_transit_information">
-                 <label class="item_details">起点:{{transportDetail.startPointName}}</label>
+                 <label class="item_details">起点:{{startPointName}}</label>
                  <br/>
-                 <label class="item_details">终点:{{transportDetail.endPointName}}</label>
+                 <label class="item_details">终点:{{endPointName}}</label>
                  <br/>
              </div>
              <div class="driving_information">  
@@ -44,19 +44,21 @@
 </template>
 
 <script>
-// import AMapLoader from '@amap/amap-jsapi-loader';
-// // import { shallowRef } from '@vue/reactivity'
-// import { Loading } from 'element-ui';
-// // import { lazyAMapApiLoaderInstance } from 'vue-amap';
-// import Slider from './slider.vue'
+import AMapLoader from '@amap/amap-jsapi-loader';
+import { shallowRef } from '@vue/reactivity'
+import { Loading } from 'element-ui';
+import { lazyAMapApiLoaderInstance } from 'vue-amap';
+import Slider from './slider.vue'
 Vue.use(Slider)
-// import AMapJS from "amap-js";
+import AMapJS from "amap-js";
 import Vue from 'vue';
 export default {
     name: "PathView",
     props:{
         orderNumber:'',
         capacityNumber:'',
+        startPointName:'',
+        endPointName:'',
         startTime:'',
         endTime:'',
     },
@@ -159,7 +161,7 @@ export default {
                     lon:""
                 },
                 //起点位置
-                startPointName:"中国达州市通川区",
+                startPointName:"中国达州市通川区", 
                 //起点位置经纬度
                 startPoint:{
                     lon:"114.03922119568348",
@@ -277,7 +279,7 @@ export default {
                 that.initPathSimplifier();
                 that.threeMarker();
                 console.log("that.listPath[0]",that.listPath)
-                that.initCustomMarkes(that.ctmarkes.title+"("+that.listPath[0].miled+")",that.listPath[0].currentPointName,that.listPath[0].currentPoint.lon,that.listPath[0].currentPoint.lat)
+                that.initCustomMarkes(that.capacityNumber+"("+that.listPath[0].miled+")",that.listPath[0].currentPointName,that.listPath[0].currentPoint.lon,that.listPath[0].currentPoint.lat)
                 that.endline();
             });
         },

+ 4 - 4
src/views/sale/components/saleSelfMachine/printScan.vue

@@ -4,7 +4,7 @@
             <img :src="backgroundImgURL" width="100%" height="100%"/>
         </div>
         <div class="orderNumberData">
-            <el-input placeholder="请将二维码放置在扫描区" v-model="orderNumber" :focus="true" @blur="onInputBlur" ref="inputs">
+            <el-input placeholder="请将二维码放置在扫描区" v-model="orderNumber" :focus="true" ref="inputs">
             </el-input>
         </div>
     </div>    
@@ -26,7 +26,6 @@ export default {
     methods:{
         //输入框自动聚焦
         changfouce(){
-            console.log("enter")
         this.$nextTick((x)=>{
         this.$refs.inputs.focus();
         })
@@ -51,12 +50,13 @@ export default {
         //}
          if(this.orderNumber!=null&&this.orderNumber.length==21){
             if(this.orderNumber.startsWith('WYSDD')==true||this.orderNumber.startsWith('wysdd')==true){
+          
             this.$router.push({
                 path:"/saleSelfMachine?orderNumber="+this.orderNumber,
             })
-        
+            }
             }   
-        }
+        
     },3000)
     this.$once('hook:beforeDestroy', ()=>{
         clearInterval(timer)

+ 4 - 1
src/views/sale/components/saleSelfMachine/printWarranty.vue

@@ -49,8 +49,11 @@ export default {
         )
         .then((res) => {
           console.log("res.data.data",res.data.data)
-          if(res.data.code==201){
+          console.log("res.data.code",res.data.code)  
+          if(res.data.data==-1){
             this.$message("质保书正在紧张制作中,请耐心等待!")
+          }else if(res.data.data==-2) {
+            this.$message("该车还未装货")
           }else{
             res.data.data.forEach((e) => {
               console.log(e)

+ 1 - 1
src/views/sale/components/transport_appointment/openDistributionSection.vue

@@ -109,7 +109,7 @@ export default {
     },
     //打开线路模态框
     tableOpen(){
-        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"+"&i=" + new Date(),
+        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con="+"销售"+"&i=" + new Date(),
          this.table = true;
     },
     // 返回

+ 96 - 105
src/views/sale/components/transport_excute/tms-offsite/arrivalResult.vue

@@ -1,129 +1,120 @@
 <template>
-  <!-- 抵达实绩信息页面 -->
-  <div class="arrivalResult">
-    <div class="top">
-      <el-form :inline="true" style="margin-top: 0.5rem;">
-        <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">时间段</label>
-         <el-date-picker
-      v-model="dateValue"
-      type="daterange"
-      range-separator="至"
-      start-placeholder="开始日期"
-      end-placeholder="结束日期">
-    </el-date-picker>
-        </el-form-item>
-
-        <el-form-item>
-      <label class="el-form-item__label" style="width: auto;">产品分类</label>
-      <el-autocomplete
-        popper-class="my-autocomplete"
-        v-model="inputValue"
-        :fetch-suggestions="querySearch"
-        placeholder="请输入内容" 
+  <!-- 抵达页面 -->
+   <div class="purchasFuelNewMonitor">
+    <div class="frameCalculation">
+      <span>抵达时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
       >
-        <i class="el-icon-edit el-input__icon" slot="suffix"> </i>
-      </el-autocomplete>
-        </el-form-item>
-        <el-form-item>
-      <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">车牌号</label>
-      </el-form-item>
-      <el-form-item>
-          <el-input class="el-form-item__content" v-model="capacityNumber1" placeholder="请输入内容"></el-input>
-      </el-form-item>
-      <el-form-item>
-          <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">收货单位</label>
-      </el-form-item>
-      <el-form-item>
-          <el-input v-model="consigneeCompanyName1" placeholder="请输入内容"></el-input>
-      </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="onSearch"><i class="el-icon-search"></i>查询</el-button>
-        </el-form-item>
-      </el-form>
-
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </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>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+             <el-button
+              type="text"
+              size="mini"
+              @click="photo(scope)"
+            >
+              满货箱照片
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
     </div>
-
-    <dilTable ref="tab" v-bind.sync="option">
-      <el-table-column fixed="right" label="操作" width="110">
-        <template slot-scope="scope">
-          <el-button @click="toPhotoClick(scope.row.resultFullContainerPhoto)" type="text" size="small" style="font-size: 17px"
-            >浏览图片</el-button
-          >
-        </template>
-      </el-table-column>
-    </dilTable>
   </div>
 </template>
 
-
 <script>
-
+import { sjTime } from '@/utils/sharedJsFile';
 export default {
-  name: "arrivalResult",
+  name: "homeworkPath",
   data() {
     return {
-      dateValue:[new Date(), new Date()],
-      inputValue:"",
-      capacityNumber1:"",
-      consigneeCompanyName1:"",
-      status: "",
-      state: "",
-      option: {       
+      restaurants: [],
+      input: "",
+      startTime: null,
+      endTime: null,
+      option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getArrivalResultInfo?apiId=136",
+        requestUrl: "/api/v1/tms/getReceiptResult?apiId=470",
       },
     };
   },
-  mounted() {
-    this.restaurants = this.loadAll();
+  created(){
+   
   },
   methods: {
-    querySearch(queryString, cb) {
-      var restaurants = this.restaurants;
-      var results = queryString
-        ? restaurants.filter(this.createFilter(queryString))
-        : restaurants;
-      cb(results);
-    },
-    createFilter(queryString) {
-      return (restaurant) => {
-        return (
-          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
-          0
-        );
-      };
+    photo(scope){
+      console.log(scope.row.orderNumber)
+     this.axios
+       .post("/api/v1/tms/getReceiptPhoto?orderNumber="+scope.row.orderNumber)
+       .then((res)=>{
+         console.log("res.data.data",res.data.data)
+       });
     },
-    loadAll() {
-      return [
-        { value: "带钢"},
-        { value: "微粉"},
-        { value: "螺纹钢"},
-        { value: "钢坯"},
-        { value: "其他"},
-      ];
-    },
-
-    onSearch(){
-      //改变查询条件
-      this.$refs.tab.setDataRequestQuery({"startTime":sjTime(this.dateValue[0]),
-                      "endTime": sjTime(this.dateValue[1]),
-                      "productClassification": this.inputValue,
-                      "capacityNumber1": this.capacityNumber1,
-                      "consigneeCompanyName1": this.consigneeCompanyName1});                         
-    },
-
-    toPhotoClick(resultFullContainerPhoto){
-      this.$router.push("/arrivalPhoto?resultFullContainerPhoto="+resultFullContainerPhoto);
-      
-    }
+    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){
+          this.option.requestUrl = '/api/v1/tms/getReceiptResult?apiId=470' + "&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date()+"&con="+this.input; 
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        console.log(startTime && endTime)
+         this.option.requestUrl = '/api/v1/tms/getReceiptResult?apiId=470' + "&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date()+"&con="+this.input; 
+      }
     },
+   }
 };
 </script>
 <style lang='scss' scoped>
-.homeworkPath {
-  .top {
-    padding: 20px 30px;
+.purchasFuelNewMonitor {
+  .frameCalculation {
+    width: 100%;
+    height: 100px;
+    display: flex;
+    align-items: center;
+    padding-left: 50px;
+    .el-date-editor{
+      margin: 20px;
+    }
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
   }
 }
 </style>

+ 3 - 3
src/views/sale/components/transport_order/receiveOrder.vue

@@ -357,13 +357,13 @@ export default {
           "&con=" +
           this.inputText;
       } else if (this.activeName == "second") {
-        this.option1.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&carrierSsoId=" +
+        this.option2.requestUrl =
+          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=6&carrierSsoId=" +
           getCookie("userId") +
           "&con=" +
           this.inputText;
       } else {
-        this.option1.requestUrl =
+        this.option3.requestUrl =
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=4&carrierSsoId=" +
           getCookie("userId") +
           "&con=" +

+ 46 - 0
src/views/statisticalReport/components/defendCapacity/getCapacityByDefend.vue

@@ -0,0 +1,46 @@
+<template>
+  <!-- 抽查车牌号页面 -->
+  <div class="homeworkPath">
+   <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>
+    </div>
+    <dilTable v-bind.sync="option"></dilTable>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      restaurants: [],
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "api/v1/tms/getCapacityByDefend?apiId=469",
+      },
+    };
+  },
+  created(){
+   
+  },
+  methods: {
+    onclick() {
+          this.option.requestUrl="api/v1/tms/getCapacityByDefend?apiId=469&con="+this.input;
+    },
+   }
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
+    }
+  }
+}
+</style>

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

@@ -18,10 +18,12 @@ import purchaseChemicalMaterialsOld from '../components/purchaseChemicalMaterial
 import purInwardReport from '../components/inwardReport/putInwardReport.vue'
 import inwardFactory from '../components/inwardReport/inwardFactory.vue'
 import getLoading from '../components/inwardReport/getLoading.vue'
+import getInstall from '../components/inwardReport/getInstall.vue'
 import getUnLoading from '../components/inwardReport/getUnLoading.vue'
 import purchaseMineral from '../components/purachaseMineral.vue'
 import inwardSporadicReport from '../components/sporadicReport/inwardSporadicReport.vue'
 import getInstall from '../components/inwardReport/getInstall.vue'
+import getCapacityByDefend from '../components/defendCapacity/getCapacityByDefend.vue'
 
 Vue.use(Router)
 
@@ -45,10 +47,12 @@ const constantRouterMap = [
       {path: 'purInwardReport', name: 'purInwardReport', meta: {code: 'xtpzgl-yhgl'}, component: purInwardReport},
       {path: 'inwardFactory', name: 'inwardFactory', meta: {code: 'xtpzgl-yhgl'}, component: inwardFactory},
       {path: 'getLoading', name: 'getLoading', meta: {code: 'xtpzgl-yhgl'}, component: getLoading},
+      {path: 'getInstall', name: 'getInstall', meta: {code: 'xtpzgl-yhgl'}, component: getInstall},
       {path: 'getUnLoading', name: 'getUnLoading', meta: {code: 'xtpzgl-yhgl'}, component: getUnLoading},
       {path: 'purchaseMineral', name: 'purchaseMineral', meta: {code: 'xtpzgl-yhgl'}, component: purchaseMineral},
       {path: 'inwardSporadicReport', name: 'inwardSporadicReport', meta: {code: 'xtpzgl-yhgl'}, component: inwardSporadicReport},
       {path: 'getInstall', name: 'getInstall', meta: {code: 'xtpzgl-yhgl'}, component: getInstall},
+      {path: 'getCapacityByDefend', name: 'getCapacityByDefend', meta: {code: 'xtpzgl-yhgl'}, component: getCapacityByDefend}
     ]
   }
 ];

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