luobang 2 年之前
父节点
当前提交
d16e39836e

+ 39 - 0
src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue

@@ -236,6 +236,44 @@
               </div>
             </div>
           </el-tab-pane>
+          <el-tab-pane label="钢材车辆手动放行" name="fifth">
+            <div class="admin2">
+              <div class="carrier from">
+                <el-form
+                  :inline="true"
+                  class="demo-form-inline"
+                  label-width="80px"
+                >
+                  <el-form-item label="车牌号:">
+                    <el-autocomplete
+                      class="inline-input"
+                      v-model="capacityName"
+                      :fetch-suggestions="querySearchCapacity"
+                      placeholder="车牌号"
+                      :trigger-on-focus="false"
+                      @select="handleSelectCapacity"
+                    >
+                      <template slot-scope="{ item }">
+                        <div class="name">{{ item.capacityNumber }}</div>
+                      </template>
+                    </el-autocomplete>
+                  </el-form-item>
+                </el-form>
+              </div>
+              <div class="poundNo from">
+                <span class="text">运输订单号:</span>
+                <el-input v-model="orderNumber" disabled></el-input>
+              </div>
+              <div class="button_box">
+                <el-button
+                  type="primary"
+                  @click="allowEnfactoryClick"
+                  :disabled="disabled"
+                  >确认</el-button
+                >
+              </div>
+            </div>
+          </el-tab-pane>
         </el-tabs>
       </div>
     </template>
@@ -281,6 +319,7 @@ export default {
     this.information();
   },
   methods: {
+    allowEnfactoryClick() {},
     queueClick() {
       this.axios
         .post("/api/v1/qms/addQueueResult?vno=" + this.capacityName)

+ 159 - 127
src/views/SporadicManage/components/oldAreaSporadic/transportOrder/addTransportOrder.vue

@@ -1,5 +1,4 @@
-//新增运输派单
-//新增运输订单
+//新增运输派单 //新增运输订单
 <template>
   <div class="addSaleOrderSend">
     <page-title>新增运输订单派车</page-title>
@@ -10,24 +9,24 @@
         @radio-change="currentRadioChange"
         ref="table"
       >
-        <el-table-column
-            fixed="right"
-            label="操作"
-            width="100"
-          >
-            <template slot-scope="scope">
-              <el-button @click="getMatrialDetails1(scope.row)" type="text" size="small">
-                物资详情
-              </el-button>
-            </template>
-          </el-table-column>
-          //物资详情抽屉
-          <el-table-column type="expand" width="1">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button
+              @click="getMatrialDetails1(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 :data="tableData" border>
                   <el-table-column
                     v-for="(item, i) in tableHead"
                     :key="i"
@@ -84,8 +83,8 @@
       </el-table>
     </div>
     <!-- 车辆模态框 -->
-    <el-drawer 
-      :visible.sync="truckDrawer" 
+    <el-drawer
+      :visible.sync="truckDrawer"
       :with-header="false"
       :destroy-on-close="false"
       direction="rtl"
@@ -128,56 +127,57 @@
     </el-drawer>
     <div class="button_box">
       <el-button @click="cancel">取消</el-button>
-      <el-button type="primary" @click="makeSure" :disabled = "disabled" >确定</el-button>
+      <el-button type="primary" @click="makeSure" :disabled="disabled"
+        >确定</el-button
+      >
     </div>
   </div>
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
 import { getCookie } from "@/utils/util.js";
-import { sjTime,isNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
     return {
-      disabled:false,
+      disabled: false,
       //零星订单ID
-      sporadicOrderId:null,
+      sporadicOrderId: null,
       //运输订单ID
-      orderId:null,
+      orderId: null,
       //线路名称
-      lineName:null,
+      lineName: null,
       //已经选择车辆物资信息
-      selectionList:[],
+      selectionList: [],
       //销售订单物资信息
       option: {
         // 表格请求数据的地址
-        requestUrl:"",
+        requestUrl: "",
         // 控制显示当选列
         selectionType: "radio",
-        isPagination: false,
+        isPagination: false
       },
       //当前选中的物资id
       materialId: null,
       //当前选中的物资名称
-      materialName: null,   
+      materialName: null,
       //是否打开选择车辆的模态框
-      truckDrawer:false,
+      truckDrawer: false,
       //车辆的表格
       truck: {
         requestUrl: "",
-        selectionType: "select",
+        selectionType: "select"
       },
       tableTop: [
         {
           prop: "capacityNumber",
-          label: "车牌号",
+          label: "车牌号"
         }
       ],
-      truckText:null,
+      truckText: null,
       //当前多选选中的车辆
-      selectTruck:[],
-       //记录旧的row对象
+      selectTruck: [],
+      //记录旧的row对象
       oldRow: "",
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态
       oldRowCount: 1,
@@ -185,25 +185,25 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 150,
+          width: 150
         },
         {
           prop: "specificationModel",
           label: "规格型号",
-          width: 150,
+          width: 150
         },
         {
           prop: "materialNumber",
           label: "物资件数",
-          width: 100,
+          width: 100
         },
         {
           prop: "materialWeight",
           label: "物资重量",
-          width: 100,
-        },
+          width: 100
+        }
       ],
-      tableData: [],
+      tableData: []
     };
   },
   created() {
@@ -211,100 +211,121 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
-        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&carrierSsoId=" + getCookie("userId");
-    } else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
+      this.option.requestUrl =
+        "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&carrierSsoId=" +
+        getCookie("userId");
+    } else if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu" ||
+      getCookie("orgCode") == "wuliuchuyunzhongxin"
+    ) {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0";
-    }else{
-        this.truck.requestUrl =
+      this.option.requestUrl =
+        "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0";
+    } else {
+      this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&userId=" + getCookie("orgCode");
+      this.option.requestUrl =
+        "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&userId=" +
+        getCookie("orgCode");
     }
   },
   methods: {
     //点击确定按钮的事件
-    makeSure(){
-       console.log(this.selectionList)
-        this.disabled = true
-        console.log(this.orderId)
-        if(this.orderId == null){
-          this.$message.error("未勾选零星订单")
-          this.disabled = false
-          return 
-        }else if(this.selectionList.length == 0){
-          this.$message.error("未选择车辆")
-          this.disabled = false
-          return
-        }
-        this.axios.post('/api/v1/ams/addSporadicOrderTimes',{
-          orderId:this.orderId,
-          sporadicOrderId:this.sporadicOrderId,
-          mapList:this.selectionList,
-        }).then((res)=>{
-          if(res.data.code == '200'){
-            this.$message.success('派车成功')
-            this.disabled = false
+    makeSure() {
+      console.log(this.selectionList);
+      this.disabled = true;
+      console.log(this.orderId);
+      if (this.orderId == null) {
+        this.$message.error("未勾选零星订单");
+        this.disabled = false;
+        return;
+      } else if (this.selectionList.length == 0) {
+        this.$message.error("未选择车辆");
+        this.disabled = false;
+        return;
+      }
+      this.axios
+        .post("/api/v1/ams/addSporadicOrderTimes", {
+          orderId: this.orderId,
+          sporadicOrderId: this.sporadicOrderId,
+          mapList: this.selectionList,
+          orgCode: getCookie("orgCode")
+        })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("派车成功");
+            this.disabled = false;
             this.cancel();
           }
-        })
+        });
     },
     //点击取消按钮的事件
-    cancel(){
-      this.$router.push('/oldSporadicOrder')
+    cancel() {
+      this.$router.push("/oldSporadicOrder");
     },
     //点击删除按钮删除当前点击的对象
-    deleteRow(index){
-      this.selectionList.splice(index,1)
+    deleteRow(index) {
+      this.selectionList.splice(index, 1);
     },
     //车辆模态框的确定事件
-    AddTruckClick(){
+    AddTruckClick() {
       this.selectTruck.forEach(e => {
         this.selectionList.push({
-          capacityId:e.capacityId,
-          capacityNumber:e.capacityNumber,
-        })
+          capacityId: e.capacityId,
+          capacityNumber: e.capacityNumber
+        });
       });
       this.truckDrawer = false;
     },
     //车辆模态框框计算
-    selectTruckClick(){
-      if(this.truckText != null){
+    selectTruckClick() {
+      if (this.truckText != null) {
         if (getCookie("orgCode") == "chengyunshang") {
-        this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-          getCookie("userId") + "&index="+this.truckText;
-      }else {
-        this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&index="+this.truckText;
-      }
-        this.truckText = null
-      }else{
-         if (getCookie("orgCode") == "chengyunshang") {
-        this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-          getCookie("userId") + "&i=" + new Date()
-      }else {
-        this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&i=" + new Date()
-      }
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            getCookie("userId") +
+            "&index=" +
+            this.truckText;
+        } else {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            null +
+            "&index=" +
+            this.truckText;
+        }
+        this.truckText = null;
+      } else {
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
+        } else {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date();
+        }
       }
-    
     },
     //车辆表格
-    currentRadioChange1(select){
+    currentRadioChange1(select) {
       this.selectTruck = [];
       this.selectTruck = select;
     },
     //主界面表格单选
     currentRadioChange(row) {
-      console.log(row)
-      this.sporadicOrderId = row.sporadicOrderId
-      this.orderId = row.orderId
+      console.log(row);
+      this.sporadicOrderId = row.sporadicOrderId;
+      this.orderId = row.orderId;
     },
     //获取物资详情--未下发
-    getMatrialDetails1(row){
-      console.log("wuzixq")
+    getMatrialDetails1(row) {
+      console.log("wuzixq");
       // 记录重复点击次数
       if (this.oldRow === row) {
         this.oldRowCount += 1;
@@ -326,35 +347,46 @@ export default {
       }
       // 重置上一个点击对象
       this.oldRow = row;
-      this.axios.post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId).then((res) =>{
-        console.log(res.data.data)
-        this.tableData = res.data.data
-      })
+      this.axios
+        .post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId)
+        .then(res => {
+          console.log(res.data.data);
+          this.tableData = res.data.data;
+        });
     },
     onClick() {
-      if(getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId") + "&t=" + new Date();
-    }else if(getCookie("orgCode") == "biemeierchejian") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con=" + "铁专线精煤" + "&t=" + new Date();
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") +
+          "&t=" +
+          new Date();
+      } else if (getCookie("orgCode") == "biemeierchejian") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&con=" +
+          "铁专线精煤" +
+          "&t=" +
+          new Date();
+      } else {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&t=" +
+          new Date();
+      }
+      this.truckDrawer = true;
     }
-     else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null  + "&t=" + new Date();
-    } 
-      this.truckDrawer = true
-    },
-  },
+  }
 };
 </script>
-<style lang='scss'>
+<style lang="scss">
 .addSaleOrderSend {
   .el-drawer__body {
-   overflow: auto;
+    overflow: auto;
   }
-  .el-drawer__container ::-webkit-scrollbar{
+  .el-drawer__container ::-webkit-scrollbar {
     display: none;
   }
   .from {
@@ -384,17 +416,17 @@ export default {
       }
     }
   }
-  .tablecls{
+  .tablecls {
     margin-top: 20px;
   }
-  .button_box{
+  .button_box {
     display: flex;
     justify-content: center;
     margin: 20px;
-    .el-button{
+    .el-button {
       width: 100px;
       margin-left: 20px;
     }
   }
 }
-</style>
+</style>