Jelajahi Sumber

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

zhouzh 3 tahun lalu
induk
melakukan
e2f5eeb82f
31 mengubah file dengan 4246 tambahan dan 581 penghapusan
  1. 4 3
      build/utils.js
  2. 2 4
      config/index.js
  3. TEMPAT SAMPAH
      dist.rar
  4. 0 1
      package.json
  5. 0 2
      src/views/RMS/components/addCarrier.vue
  6. 26 9
      src/views/TMS/components/bmsport/addHandlingFee.vue
  7. 6 4
      src/views/TMS/components/bmsport/handlingFee.vue
  8. 1 6
      src/views/TMS/components/bmsport/updateHandlingFee.vue
  9. 3 3
      src/views/TMS/components/importedFuel/truckDriverReceiveRan.vue
  10. 3 3
      src/views/TMS/components/importedIngredients/truckDriverReceiveFu.vue
  11. 20 9
      src/views/appoint/components/purchase/addOtherPrice.vue
  12. 7 8
      src/views/appoint/components/purchase/otherPrice.vue
  13. 19 6
      src/views/appoint/components/purchase/updateOtherPrice.vue
  14. 1066 215
      src/views/appoint/components/saleContract/addSaleOrder.vue
  15. 2 3
      src/views/appoint/components/saleContract/addSaleOrderSend.vue
  16. 734 0
      src/views/appoint/components/saleContract/addSaleOrderSteelSend.vue
  17. 728 0
      src/views/appoint/components/saleContract/addSaleOrderSteelSendCarrier.vue
  18. 90 79
      src/views/appoint/components/saleContract/addTransportPrice.vue
  19. 29 121
      src/views/appoint/components/saleContract/saleOrder.vue
  20. 4 95
      src/views/appoint/components/saleContract/saleOrderCoproduct.vue
  21. 1 1
      src/views/appoint/components/saleContract/saleOrderCoproductCarrier.vue
  22. 446 0
      src/views/appoint/components/saleContract/saleOrderSteel.vue
  23. 358 0
      src/views/appoint/components/saleContract/saleOrderSteelCar.vue
  24. 185 0
      src/views/appoint/components/saleContract/saleOrderSteelCarrier.vue
  25. 486 0
      src/views/appoint/components/saleContract/saleOrderSteelEmpower.vue
  26. 12 0
      src/views/appoint/router/index.js
  27. 9 1
      src/views/inward/components/truckOrder/dispatchPlan.vue
  28. 0 2
      src/views/sale/app.js
  29. 1 2
      src/views/sale/components/saleSelfMachine/printScan.vue
  30. 1 1
      src/views/sale/components/transport_appointment/openDistributionSection.vue
  31. 3 3
      src/views/sale/components/transport_order/receiveOrder.vue

+ 4 - 3
build/utils.js

@@ -16,9 +16,10 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 
-
-
-  let devModules = ['all']
+ // let devModules = ['index','WMS']
+ let devModules = ['all']
+// let devModules = ['index','statisticalReport','appoint','sale','RMS','TMS'];
+// let devModules = ['index','appoint','WMS'];
 // let devModules = ['index','inward','SporadicManage']
 // let devModules = ['index','sale','RMS']
 // let devModules = ['index','SporadicManage','RMS','statisticalReport']

+ 2 - 4
config/index.js

@@ -65,16 +65,14 @@ let proxyTable = {
   // 所有数据的请求域名地址
   "/api/v1": {
     target: "http://172.16.33.166:8080",
-    // target: "http://localhost:8080",
-    // target: "http://localhost:8019",
+    // target: "http://192.168.1.119: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: {

TEMPAT SAMPAH
dist.rar


+ 0 - 1
package.json

@@ -54,7 +54,6 @@
     "vue-baidu-map": "^0.21.19",
     "vue-clipboard2": "^0.2.1",
     "vue-element-bigdata-table": "^1.3.1",
-    "vue-print-nb": "^1.7.5",
     "vue-property-decorator": "^8.2.1",
     "vue-quill-editor": "^3.0.5",
     "vue-router": "^3.0.1",

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

@@ -280,7 +280,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 +291,6 @@ export default {
                     "&roleId=924449091658846208"
                 )
                 .then((res) => {
-                  console.log(2)
                   if (res.code == "0") {
                     //图片地址
                     let imageUrls = {

+ 26 - 9
src/views/TMS/components/bmsport/addHandlingFee.vue

@@ -1,18 +1,14 @@
 <template>
   <!-- 船只信息页面 -->
-  <div class="homeworkPath">
+  <div class="handingFee">
     <page-title>港口装卸费</page-title>
-    <div class="main">
-      <span class="text">港口装卸费新增</span>
-      <span class="a"></span>
-    </div>
     <div>
-      <div class="form-box" style="margin-left: 5rem">
-        <el-form ><dil-form :formId="222" v-model="form"></dil-form></el-form>
+      <div class="form-box">
+        <dil-form :formId="222" v-model="form"></dil-form>
       </div>
     </div>
-    <div class="button-ins">
-      <el-button type="primary" @click="makeSure">新增港口装卸费</el-button>
+    <div class="button-box">
+      <el-button type="primary" @click="makeSure">新增</el-button>
     </div>
     <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
     </dilTable>
@@ -87,4 +83,25 @@ export default {
 };
 </script>
 <style lang='scss' scoped>
+    .handingFee {
+      .form-box {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .el-form-item {
+          display: flex;
+          .el-form-item__label {
+            width: 170px !important;
+          }
+          .el-input {
+            width: 210px !important;
+          }
+    }
+      }
+      .button-box {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
+    }
 </style>

+ 6 - 4
src/views/TMS/components/bmsport/handlingFee.vue

@@ -3,9 +3,6 @@
   <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>
       <el-button type="primary" class="btn" @click="addclick">
         新增
       </el-button>
@@ -91,7 +88,12 @@ export default {
 <style lang='scss' scoped>
 .homeworkPath {
   .top {
-    padding: 1.25rem 1.875rem;
+    .el-input {
+      margin-left: 2.5rem;
+      margin-top: 2.5rem;
+      margin-bottom: 2.5rem;
+      width: 250px;
+    }
   }
 }
 </style>

+ 1 - 6
src/views/TMS/components/bmsport/updateHandlingFee.vue

@@ -2,18 +2,13 @@
   <!-- 修改港口装卸费 -->
   <div id="contractDetails">
     <page-title>编辑</page-title>
-    <div class="main">
-      <span class="text">港口装卸费</span>
-      <span class="a"></span>
-    </div>
     <div class="contractTitle">
       <div class="form-box">
-        <div class="form-one">
+        <div class="form-box">
           <dil-form :formId="223" v-model="form1"></dil-form>
         </div>
       </div>
     </div>
-
     <div class="button-box">
       <el-button type="primary" @click="onClickConfirm">确认</el-button>
       <el-button @click="onClickCancel">返回</el-button>

+ 3 - 3
src/views/TMS/components/importedFuel/truckDriverReceiveRan.vue

@@ -59,11 +59,11 @@ export default {
     activeName(val){
       if (getCookie("orgCode") == "chengyunshang") {
         if(val == "option"){
-          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&i="+new Date()+"&carrierSSOId=" + null;
+          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
         }else if(val == "first"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&i="+new Date()+"&carrierSSOId=" + null;
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
         }else if(val == "second"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&i="+new Date()+"&carrierSSOId=" + null;
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
         }
       }else{
         if(val == "option"){

+ 3 - 3
src/views/TMS/components/importedIngredients/truckDriverReceiveFu.vue

@@ -59,11 +59,11 @@ export default {
     activeName(val){
       if (getCookie("orgCode") == "chengyunshang") {
         if(val == "option"){
-          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&i="+new Date()+"&carrierSSOId=" + null;
+          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
         }else if(val == "first"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&i="+new Date()+"&carrierSSOId=" + null;
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
         }else if(val == "second"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&i="+new Date()+"&carrierSSOId=" + null;
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
         }
       }else{
         if(val == "option"){

+ 20 - 9
src/views/appoint/components/purchase/addOtherPrice.vue

@@ -2,20 +2,13 @@
   <!-- 添加其他价格 -->
   <div class="addShipPrice">
     <page-title>新增</page-title>
-    <el-divider content-position="left">添加其他价格</el-divider>
-     <div class="form-box" style="margin-right: 10rem">
+     <div class="form-box">
         <dil-form :formId="221" v-model="form1" ref="from1"></dil-form>
       </div>
     <div class="button-box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
     </div>
-    <!-- <div class="primarybtn">
-      <el-button class="btn" @click="goback">取消</el-button>
-      <el-button type="primary" class="btn" @click="submitclick"
-        >确定</el-button
-      >
-    </div> -->
   </div>
 </template>
 
@@ -62,5 +55,23 @@ export default {
 };
 </script>
 <style lang='scss' scoped>
-
+  .form-box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    .el-form-item {
+      display: flex;
+      .el-form-item__label {
+        width: 170px !important;
+      }
+      .el-input {
+        width: 210px !important;
+      }
+    }
+  }
+  .button-box {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
 </style>

+ 7 - 8
src/views/appoint/components/purchase/otherPrice.vue

@@ -2,15 +2,13 @@
   <!-- 其他单价页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input v-model="input" placeholder="请输入内容"></el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
+      <el-input></el-input>
       <el-button type="primary" @click="btnclick()">
         新增
       </el-button>
     </div>
-    <dilTable v-bind.sync="option">
+    <div>
+      <dilTable v-bind.sync="option">
       <el-table-column fixed="right" label="操作" align="center" width="150">
         <template slot-scope="scope">
           <el-button @click="click(scope.row.priceId)" type="text" size="small"
@@ -25,6 +23,7 @@
         </template>
       </el-table-column>
     </dilTable>
+    </div> 
   </div>
 </template>
 
@@ -45,9 +44,6 @@ export default {
     
   },
   methods: {
-    handleSelect(item) {
-      console.log(item);
-    },
     onclick() {
       console.log(1);
     },
@@ -103,6 +99,9 @@ export default {
 <style lang='scss' scoped>
 .homeworkPath {
   .top {
+    .el-input {
+      width: 250px;
+    }
     padding: 1.25rem 1.875rem;
   }
 }

+ 19 - 6
src/views/appoint/components/purchase/updateOtherPrice.vue

@@ -2,10 +2,6 @@
   <!-- 修改其他价格信息 -->
   <div id="contractDetails">
     <page-title>编辑</page-title>
-    <div class="main">
-      <span class="text">修改其他价格信息</span>
-      <span class="a"></span>
-    </div>
     <div class="contractTitle">
       <div class="form-box">
         <div class="form-one">
@@ -13,7 +9,6 @@
         </div>
       </div>
     </div>
-
     <div class="button-box">
       <el-button type="primary" @click="onClickConfirm">确认</el-button>
       <el-button @click="onClickCancel">返回</el-button>
@@ -81,5 +76,23 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-
+    .form-box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    .el-form-item {
+      display: flex;
+      .el-form-item__label {
+        width: 170px !important;
+      }
+      .el-input {
+        width: 210px !important;
+      }
+    }
+  }
+  .button-box {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
 </style>

File diff ditekan karena terlalu besar
+ 1066 - 215
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('电话号码请输入数字')
       }
     },
     //收货地址弹出层

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

@@ -0,0 +1,734 @@
+<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)">
+                  <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/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,
+                priceValue: null,
+                priceId: null,
+            };
+            this.selectionList.push(addmap);
+            //填充承运商下拉框
+            this.carrierNameOptions.push(e.carrierAndPriceList);
+            //调用记录每一行的合并数的方法
+            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){
+                  var mapItem = {
+                  //车牌号
+                  capacityNumber : null,
+                  //车序号主键
+                  saleOrderMaterialId : 0,
+                  //承运商Id
+                  carrierId : 0,
+                  //线路Id
+                  lineId : 0,
+                  //运输单价Id
+                  priceId : 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,
+                mapItem.priceId = this.selectionList[i].priceId
+                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){
+      //单价以及单价Id
+        var priceValue = null;
+        var priceId = null;
+        var carrierName = null;
+        this.carrierNameOptions[index].forEach((e) => {
+          if (row.carrierName == e.value) {
+            priceValue = e.priceValue;
+            priceId = e.priceId;
+            carrierName = e.label;
+          }
+        });
+        for(var i=index;i<this.spanArr[index]+index;i++){
+          this.selectionList[i].capacityNumber=row.capacityNumber;
+          this.selectionList[i].carrierId=row.carrierName;
+          this.selectionList[i].carrierName=carrierName;
+          this.selectionList[i].priceValue=priceValue;
+          this.selectionList[i].priceId=priceId;
+        }
+    },
+    //初始化线路
+    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>

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

@@ -0,0 +1,728 @@
+<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 priceValueFirst = 0;
+          var priceIdFirst = 0;
+          e.carrierAndPriceList.forEach((a)=>{
+              if(a.id == e.carrierId){
+                  priceValueFirst = a.priceValue;
+                  priceIdFirst = a.priceId;
+              }
+          })
+            //带承运商初始化派车表格
+            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,
+                priceValue: priceValueFirst,
+                priceId: priceIdFirst
+            };
+            this.selectionList.push(addmap);
+            //填充承运商下拉框
+            this.carrierNameOptions.push(e.carrierAndPriceList);
+            //调用记录每一行的合并数的方法
+            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,
+                  //运输单价Id
+                  priceId : 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,
+                mapItem.priceId = this.selectionList[i].priceId
+                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="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="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>
+</template>
+<script>
+export default {
+  name: "saleOrder",
+  data() {
+    return {
+      activeName: "four",
+      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>

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

@@ -0,0 +1,486 @@
+<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-select v-model="scope.row.carrierName" placeholder="请选择" 
+                  @change="batchUpdateValue(scope.row,scope.$index)">
+                  <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>
+
+              <!-- 截止日期 -->
+              <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,
+      //承运商下拉框中的值
+      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.carrierNameOptions.push(e.carrierAndPriceList);
+            //调用记录每一行的合并数的方法
+            this.getSpanArr(this.selectionList);
+          }
+        });
+      });
+    },
+    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){
+                      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},

+ 9 - 1
src/views/inward/components/truckOrder/dispatchPlan.vue

@@ -75,7 +75,15 @@
             </dilTable>
           </el-tab-pane>
           <el-tab-pane label="已接收" name="second">
-            <dilTable v-bind.sync="second"> </dilTable>
+            <dilTable v-bind.sync="second"> 
+              <el-table-column fixed="right" label="操作" width="80">
+                <template slot-scope="scope">
+                  <el-button type="text" size="mini" @click="deleteClick(scope)">
+                    关闭
+                  </el-button>
+                </template>
+              </el-table-column>
+            </dilTable>
           </el-tab-pane>
         </el-tabs>
       </div>

+ 0 - 2
src/views/sale/app.js

@@ -15,8 +15,6 @@ import VueApollo from 'vue-apollo'
 
 import apollo from '@/config/apolloConfig.js'
 
-import Print from 'vue-print-nb';
-Vue.use(Print);
 
 import 'xe-utils' 
 import VXETable from 'vxe-table'

+ 1 - 2
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();
         })

+ 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;
     },
     // 返回

+ 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=" +

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini