zx 3 年之前
父节点
当前提交
f4bbfa1e8d

+ 4 - 3
config/index.js

@@ -64,8 +64,8 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    // target: "http://172.16.33.166:8080",
-    target: "http://192.168.1.122:8019",
+    target: "http://172.16.33.166:8080",
+    // target: "http://192.168.1.115:8080",
     // target: "http://192.168.1.114:8019",
     ws: true,
     pathRewrite: {
@@ -73,7 +73,8 @@ let proxyTable = {
     }
   },
   "/views/api/v1": {
-    target: "http://192.168.1.122:8019",
+    target: "http://172.16.33.166:8080",
+    // target: "http://192.168.1.115:8080",
     ws: true,
     pathRewrite: {
       "^/views/api/v1": "/api/v1"

+ 141 - 109
src/views/TMS/components/importedIngredients/transportReserveFu.vue

@@ -1,31 +1,65 @@
 <template>
-  <!-- 采购辅料运输预约 -->
+  <!-- 辅料运输预约 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" @click="insertClick" >
+      <el-input
+        class="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="insertClick">
         <i class="el-icon-plus"></i>新增
       </el-button>
-       <el-button type="primary" @click="sendClick(0)" >
-        <i class="el-icon-bottom"></i>下发
+      <el-button
+        type="primary"
+        class="btn"
+        @click="issue"
+        v-if="activeName == 'first'"
+      >
+        <i class="el-icon-plus"></i>下发
       </el-button>
     </div>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-         <!-- 未下发 -->
+    <el-tabs v-model="activeName">
+      <!-- 未下发 -->
       <el-tab-pane label="未下发" name="first">
-        <dilTable v-bind.sync="option1" ref="table" @selection-change="selectionChange">
-          <el-table-column fixed="right" align="center" label="操作" width="120">
+        <dilTable
+          v-bind.sync="option1"
+          ref="table"
+          @selection-change="selectionChange"
+        >
+          <el-table-column
+            fixed="right"
+            align="center"
+            label="操作"
+            width="120"
+          >
             <template slot-scope="scope">
-              <el-button @click="sendClick(1,scope.row.orderId)"  type="text" size="small">
+              <el-button
+                @click="sendClick(scope.row.orderId)"
+                type="text"
+                size="small"
+              >
                 下发
               </el-button>
-              <el-button @click="updateClick(scope.row.orderId)" type="text" size="small">
+              <el-button
+                @click="updateClick(scope.row.orderId)"
+                type="text"
+                size="small"
+              >
                 修改
               </el-button>
-              <el-button @click="deleteClick(scope.row.orderId, scope.row.capacityNumber)" type="text" size="small">
+              <el-button
+                @click="
+                  deleteClick(scope.row.orderId, scope.row.capacityNumber)
+                "
+                type="text"
+                size="small"
+              >
                 删除
               </el-button>
             </template>
@@ -34,21 +68,14 @@
       </el-tab-pane>
       <!-- 已下发 -->
       <el-tab-pane label="已下发" name="second">
-        <dilTable v-bind.sync="option2">
-           <el-table-column fixed="right" align="center" label="操作" width="120">
-            <template slot-scope="scope">
-              <el-button @click="CloseClick(scope.row.orderId)"  type="text" size="small">
-               关闭
-              </el-button>
-            </template>
-          </el-table-column>
-        </dilTable>
+        <dilTable v-bind.sync="option2"> </dilTable>
       </el-tab-pane>
     </el-tabs>
   </div>
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "inplantTMS",
   data() {
@@ -58,72 +85,90 @@ export default {
       activeName: "first",
       option1: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5",
-        // 控制显示多选列
+        requestUrl: "",
         selectionType: "select",
+        mapList: [],
       },
-       option2: {
+      option2: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=4&orderType=5",
+        requestUrl: "",
       },
-      selection:[],
     };
   },
+  created() {
+    //判断是否是承运商
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.option1.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&carrierSSOId=" +
+        getCookie("userId");
+      this.option2.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
+        getCookie("userId");
+    } else {
+      this.option1.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&carrierSSOId=" +
+        null;
+      this.option2.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
+        null;
+    }
+  },
   methods: {
-    //获取选中的订单
-    selectionChange(selection){
-      this.selection = [];
-      selection.forEach(e => {
-       this.selection.push({orderId:e.orderId});
-      });
-    },
     onclick() {
-      if(this.activeName == "first"){
-        this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&con=" + this.input;
-      }else{
-        this.option2.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=4&orderType=5&con=" + this.input;
-      }
+      if (this.activeName == "first") {
+        //判断是否是承运商
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&carrierSSOId=" +
+            getCookie("userId") +
+            "&con=" +
+            this.input;
+        } else {
+          this.option1.requestUrl =
+            "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&carrierSSOId=" +
+            null +
+            "&con=" +
+            this.input;
+        }
+      } else {
+        //判断是否是承运商
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
+            getCookie("userId") +
+            "&con=" +
+            this.input;
+        } else {
+          this.option1.requestUrl =
+            "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
+            null +
+            "&con=" +
+            this.input;
+        }
+      }
     },
-    handleClick(tab, event) {
-      console.log(tab, event);
+    selectionChange(selection) {
+      this.mapList = selection;
     },
-     // 下发
-    CloseClick(orderId) {
-      this.$confirm("是否关闭", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-         this.axios
-            .post(
-              "/api/v1/oms/CloseOrder",{
-                orderId: orderId
-              }
-            )
-            .then(() => {
-              this.$router.go(0);
-            })
-        .then(() => {
-          this.$message({
-            type: "success",
-            message: "关闭成功!",
-          });
-          // console.log(this.arr[0].text_prop);
-   
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "取消关闭!",
-          });
+    issue() {
+      let mapvalue = {
+        mapList: this.mapList,
+      };
+      this.axios.post("/api/v1/oms/dispatchOrder", mapvalue).then(() => {
+        this.$message({
+          type: "success",
+          message: "下发成功!",
         });
+        this.option1.requestUrl =
+          "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&i=" +
+          new Date();
+      });
     },
-
-
-    //关闭
-
-    sendClick(index,orderId) {
+    // 下发
+    sendClick(orderId) {
+      let mapvalue = {
+        mapList: [{ orderId: orderId }],
+      };
       this.$confirm("是否下发", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -131,32 +176,15 @@ export default {
         center: true,
       })
         .then(() => {
-          let orderList = [];
-          if(index == 0){
-            if(this.selection.length > 0){
-              orderList=this.selection;
-            }else{
-            this.$message({
-              type: "warning",
-              message: "请选择要下发的订单!",
-            });
-            }
-          }else if(index == 1){
-            orderList.push({orderId:orderId})
-          }
-          this.axios
-            .post(
-              "/api/v1/oms/dispatchOrder",{
-                mapList:orderList
-              }
-            )
-            .then(() => {
-              this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&i=0"
-            });
+          this.axios.post("/api/v1/oms/dispatchOrder", mapvalue).then(() => {
             this.$message({
               type: "success",
               message: "下发成功!",
             });
+            this.option1.requestUrl =
+              "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&i=" +
+              new Date();
+          });
         })
         .catch(() => {
           this.$message({
@@ -179,12 +207,10 @@ export default {
             message: "删除成功!",
           });
           this.axios
-            .post(
-               "/api/v1/oms/deleteOrder",{
-                 orderId: orderId,
-                 capacityNumber: capacityNumber
-              }
-            )
+            .post("/api/v1/oms/deleteOrder", {
+              orderId: orderId,
+              capacityNumber: capacityNumber,
+            })
             .then(() => {
               this.$router.go(0);
             });
@@ -204,14 +230,20 @@ export default {
     updateClick(orderId) {
       this.$router.push("/transportReserveFuEdit/" + orderId);
     },
-
   },
 };
 </script>
 <style lang='scss' scoped>
 .homeworkPath {
-   .top {
-    padding: 1.25rem 1.875rem;
+  .top {
+    padding: 40px;
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
+    .btn {
+      margin-right: 10px;
+    }
   }
 }
 </style>

+ 407 - 166
src/views/TMS/components/importedIngredients/transportReserveFuAddIngredients.vue

@@ -2,37 +2,55 @@
   <!-- 新增运输作业页面 -->
   <div id="contractDetails">
     <page-title>运输预约</page-title>
+    <div class="orderType from">
+      <!-- <span class="text">订单类别:</span>
+      <el-select
+        class="select"
+        v-model="orderType"
+        placeholder="请选择"
 
-    <div class="main">
-      <el-divider content-position="left">新增运输预约</el-divider>
+      >
+        <el-option
+          v-for="item in orderTypeList"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select> -->
+      <span class="span"></span>
     </div>
-
     <div class="material from">
       <span class="text">物资:</span>
-      <el-input v-model="materialName" disabled> </el-input>
+      <el-input class="input" v-model="materialName" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
     </div>
 
     <div class="forwardingUnit from">
       <span class="text">发货单位:</span>
-      <el-input v-model="supplierName" disabled> </el-input>
+      <el-input class="input" v-model="supplierName" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
     </div>
     <div class="remark from">
       <span class="text">船名:</span>
-      <el-input v-model="remark" @blur="onBlur"> </el-input>
+      <el-input class="input" v-model="remark" @blur="onBlur"> </el-input>
       <span class="span"></span>
     </div>
     <div class="forwardingUnit from">
       <span class="text">卸货点:</span>
-      <el-input v-model="unloadPointName" disabled> </el-input>
+      <el-input class="input" v-model="unloadPointName" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(4)">浏览</el-button>
     </div>
     <div class="lineId from">
       <span class="text">选择路线:</span>
-      <el-input v-model="lineName" disabled> </el-input>
+      <el-input class="input" v-model="lineName" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(5)">浏览</el-button>
     </div>
+    <div class="lineId from">
+      <span class="text">采购订单号:</span>
+      <el-input class="input" v-model="purchaseOrderNo" disabled> </el-input>
+      <el-button type="primary" @click="ondrawer(6)">浏览</el-button>
+    </div>
     <div class="contractTitle from">
       <dil-form :formId="219" v-model="form1"></dil-form>
     </div>
@@ -44,25 +62,10 @@
         >
       </div>
     </div>
-    <!-- 车辆表格 -->
-    <div class="switch" v-if="selectionList.length > 0">
-      <el-tooltip placement="top">
-        <div slot="content">下面表格已有数据,不能进行更改!!!</div>
-        <el-switch
-          v-model="value"
-          active-text="重量"
-          inactive-text="件数"
-          disabled
-        >
-        </el-switch>
-      </el-tooltip>
-    </div>
-    <div class="switch" v-else>
-      <el-tooltip placement="top">
-        <div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
-        <el-switch v-model="value" active-text="重量" inactive-text="件数">
-        </el-switch>
-      </el-tooltip>
+    <div class="lineId from">
+      <span class="text">该批车辆是否一车多趟:</span>
+      <el-switch v-model="isMoreTrips" active-text="是" inactive-text="否">
+      </el-switch>
     </div>
     <div class="truckListTable">
       <el-table
@@ -81,22 +84,15 @@
           align="center"
           show-overflow-tooltip
         >
-          <template slot="scope" v-if="item.th_name !== '件数'">
-            <span>{{ item.label }}</span>
-          </template>
           <template slot="scope" v-if="item.th_name !== '重量'">
             <span>{{ item.label }}</span>
           </template>
           <!-- 插入输入框 -->
           <template slot-scope="scope">
             <template v-if="item.slot">
-              <template v-if="item.prop == 'orderMaterialNumber'">
-                <el-input
-                  v-model.number="scope.row.orderMaterialNumber"
-                ></el-input>
-              </template>
               <template v-if="item.prop == 'orderMaterialWeight'">
                 <el-input
+                  style="width: 250px"
                   v-model.number="scope.row.orderMaterialWeight"
                 ></el-input>
               </template>
@@ -117,49 +113,82 @@
       </el-table>
     </div>
     <!-- 模态窗口 -->
-    <el-drawer :visible.sync="drawer" :direction="direction" size="30%">
-      <el-input
-        placeholder="请输入内容"
-        v-model="input"
-        style="margin-top: 0.625rem; margin-left: 1.25rem"
-        clearable
-      ></el-input>
-      <el-button
-        type="primary"
-        class="btn"
-        @click="onclick(a)"
-        style="margin-bottom: 0.9375rem"
-      >
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <div v-show="a == 1">
+    <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
+      <div class="drawer_top">
+        <el-input
+          placeholder="请输入内容"
+          v-model="input"
+          style="margin-top: 10px; margin-right: 10px; width: 250px"
+          clearable
+        ></el-input>
+        <el-button type="primary" class="btn" @click="onclick">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+      </div>
+      <div class="drawer_table1" v-show="onDrawerNumber == 1">
         <dilTable
           v-bind.sync="frist"
           @radio-change="currentRadioChange1"
+          :isKuang="isKuang"
+          @func="func"
+          :isHeigth="isHeigth"
+          :shiyHeigth="shiyHeigth"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="a == 2">
+      <div v-show="onDrawerNumber == 2">
         <dilTable
           v-bind.sync="secend"
           @radio-change="currentRadioChange2"
+          :isKuang="isKuang"
+          @func="func"
+          :isHeigth="isHeigth1"
+          :shiyHeigth="shiyHeigth1"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="a == 3">
+      <div v-show="onDrawerNumber == 3">
         <dilTable
           v-bind.sync="third"
           @selection-change="currentRadioChange3"
+          :isKuang="isKuang"
+          @func="func"
+          :isHeigth="isHeigth2"
+          :shiyHeigth="shiyHeigth2"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="a == 4">
+      <div v-show="onDrawerNumber == 4">
         <dilTable
           v-bind.sync="unloadPoint"
           @radio-change="currentRadioChange4"
+          :isKuang="isKuang"
+          @func="func"
+          :isHeigth="isHeigth3"
+          :shiyHeigth="shiyHeigth3"
+          :drawer="drawer"
         ></dilTable>
       </div>
-      <div v-show="a == 5">
+      <div v-show="onDrawerNumber == 5">
         <dilTable
           v-bind.sync="line"
           @radio-change="currentRadioChange5"
+          :isKuang="isKuang"
+          @func="func"
+          :isHeigth="isHeigth4"
+          :shiyHeigth="shiyHeigth4"
+          :drawer="drawer"
+        ></dilTable>
+      </div>
+      <div v-show="onDrawerNumber == 6">
+        <dilTable
+          v-bind.sync="purchaseOrder"
+          @radio-change="currentRadioChange6"
+          :isKuang="isKuang"
+          @func="func"
+          :isHeigth="isHeigth5"
+          :shiyHeigth="shiyHeigth5"
+          :drawer="drawer"
         ></dilTable>
       </div>
     </el-drawer>
@@ -171,11 +200,45 @@
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime, isNumber, isIntegerNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
+      //限定first
+      isHeigth:true,
+      shiyHeigth:140,
+      //限定second
+      isHeigth1:true,
+      shiyHeigth1:140,
+      //限定third
+      isHeigth2:true,
+      shiyHeigth2:140,
+      //限定unloadPoint
+      isHeigth3:true,
+      shiyHeigth3:140,
+      //限定line
+      isHeigth4:true,
+      shiyHeigth4:140,
+      //限定purchaseOrder
+      isHeigth5:true,
+      shiyHeigth5:140,
+      isKuang: false,
+      //采购订单号
+      purchaseOrderNo: "",
+      isMoreTrips: false,
+      //订单类别
+      orderTypeList: [
+        {
+          value: 6,
+          label: "老厂区",
+        },
+        {
+          value: 7,
+          label: "新厂区",
+        },
+      ],
       // 线路名称
       lineName: "",
       //线路id
@@ -197,8 +260,8 @@ export default {
           width: "140",
         },
         {
-          prop: "orderMaterialNumber",
-          label: "件数",
+          prop: "orderMaterialWeight",
+          label: "重量",
           slot: true,
         },
       ],
@@ -222,54 +285,57 @@ export default {
       unloadPointId: "",
       //卸货点名称
       unloadPointName: "",
-      a: 1,
+      //订单类别
+      orderType: 5,
+      onDrawerNumber: 1,
       direction: "rtl",
       input: "",
       frist: {
-        requestUrl: "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050",
+        requestUrl: "",
         selectionType: "radio",
         mapList1: [],
       },
       secend: {
-        requestUrl:
-          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=",
+        requestUrl: "",
         selectionType: "radio",
         mapList2: [],
       },
       third: {
-        requestUrl: "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248",
+        requestUrl: "",
         selectionType: "select",
         mapList3: [],
       },
       unloadPoint: {
-        requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
+        requestUrl: "",
         selectionType: "radio",
       },
       line: {
-        requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
+        requestUrl: "",
+        selectionType: "radio",
+      },
+      purchaseOrder: {
+        requestUrl: "",
         selectionType: "radio",
       },
     };
   },
   watch: {
-    value() {
-      if (this.value) {
-        this.tableTop.splice(this.tableTop.length - 1, 1);
-        this.tableTop.push({
-          prop: "orderMaterialWeight",
-          label: "重量",
-          slot: true,
-        });
-      } else {
-        this.tableTop.splice(this.tableTop.length - 1, 1);
-        this.tableTop.push({
-          prop: "orderMaterialNumber",
-          label: "件数",
-          slot: true,
-        });
+    drawer(val) {
+      if (val) {
+        this.input = null;
       }
     },
   },
+  created() {
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.third.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+        getCookie("userId");
+    } else {
+      this.third.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null;
+    }
+  },
   methods: {
     onClick(index) {
       this.selectionList.splice(index, 1);
@@ -297,9 +363,15 @@ export default {
               });
               this.form1 = [];
             } else {
+              console.log();
               this.remark = res.data.data.remark;
               this.purchaseOrderId = res.data.data.purchaseOrderId;
-              this.form1 = { purchaseOrderNo: res.data.data.purchaseOrderNo };
+              this.purchaseOrderNo = res.data.data.purchaseOrderNo;
+              // if (res.data.data.receiveUnitId == 1) {
+              //   this.orderType = 6;
+              // } else {
+              //   this.orderType = 7;
+              // }
             }
           } else {
             this.$message.error("请求失败");
@@ -307,44 +379,135 @@ export default {
         });
       }
     },
-    onclick(a) {
-      if (a == 1) {
-        this.frist.requestUrl =
-          "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
-          this.input;
-      } else if (a == 2) {
-        this.secend.requestUrl =
-          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
-          this.materialId +
-          "&index=" +
-          this.input;
-      } else if (a == 3) {
-        this.third.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&index=" +
-          this.input;
-      } else if (a == 4) {
-        this.third.requestUrl =
-          "/api/v1/uc/getUnloadingMesByLike?apiId=347&index=" + this.input;
-      } else if (a == 5) {
-        this.option.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
+    onclick() {
+      if (this.input) {
+        this.isKuang = true;
+        if (this.onDrawerNumber == 1) {
+          this.frist.requestUrl =
+            "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
+            this.input;
+        } else if (this.onDrawerNumber == 2) {
+          this.secend.requestUrl =
+            "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
+            this.materialId +
+            "&index=" +
+            this.input;
+        } else if (this.onDrawerNumber == 3) {
+          //判断是否是承运商查询车辆
+          if (getCookie("orgCode") == "chengyunshang") {
+            this.third.requestUrl =
+              "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+              getCookie("userId") +
+              "&index=" +
+              this.input;
+          } else {
+            this.third.requestUrl =
+              "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+              null +
+              "&index=" +
+              this.input;
+          }
+        } else if (this.onDrawerNumber == 4) {
+          this.unloadPoint.requestUrl =
+            "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" + this.input;
+        } else if (this.onDrawerNumber == 5) {
+          this.line.requestUrl =
+            "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
+        } else if (this.onDrawerNumber == 6) {
+          this.purchaseOrder.requestUrl =
+            "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId=" +
+            this.supplierId +
+            "&con=" +
+            this.input +
+            "&i=" +
+            new Date();
+        }
+      } else {
+        if (this.onDrawerNumber == 1) {
+          this.frist.requestUrl =
+            "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&i=" +
+            new Date();
+        } else if (this.onDrawerNumber == 2) {
+          this.secend.requestUrl =
+            "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
+            this.materialId +
+            "&i=" +
+            new Date();
+        } else if (this.onDrawerNumber == 3) {
+          //判断是否是承运商查询车辆
+          if (getCookie("orgCode") == "chengyunshang") {
+            this.third.requestUrl =
+              "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+              getCookie("userId") +
+              "&i=" +
+              new Date();
+          } else {
+            this.third.requestUrl =
+              "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+              null +
+              "&i=" +
+              new Date();
+          }
+        } else if (this.onDrawerNumber == 4) {
+          this.unloadPoint.requestUrl =
+            "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
+        } else if (this.onDrawerNumber == 5) {
+          this.line.requestUrl =
+            "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
+        } else if (this.onDrawerNumber == 6) {
+          this.purchaseOrder.requestUrl =
+            "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId=" +
+            this.supplierId +
+            "&i=" +
+            new Date();
+        }
       }
     },
     ondrawer(num) {
       this.drawer = true;
-      this.a = num;
-      if (num == 2) {
+      this.onDrawerNumber = num;
+      if (num == 1) {
+        this.frist.requestUrl =
+          "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
+          this.input;
+      } else if (num == 2) {
         this.secend.requestUrl =
           "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
           this.materialId;
+      } else if (num == 3) {
+        //判断是否是承运商查询车辆
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.third.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
+        } else {
+          this.third.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date();
+        }
+      } else if (num == 4) {
+        this.unloadPoint.requestUrl =
+          "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
+      } else if (num == 5) {
+        this.line.requestUrl =
+          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=辅料&i=" + new Date();
+      } else if (num == 6) {
+        this.purchaseOrder.requestUrl =
+          "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId=" +
+          this.supplierId +
+          "&i=" +
+          new Date();
       }
     },
     // 返回
     onClickCancel() {
-      this.$router.push("/transportReserveFu");
+      this.$router.push("/transportReserveRan");
     },
     currentRadioChange1(selection) {
-      this.input = null;
       this.materialName = selection.materialName;
       this.materialId = selection.materialId;
       this.getPurchaseOrderNo();
@@ -362,10 +525,22 @@ export default {
       this.lineName = selection.lineName;
       this.lineId = selection.lineId;
     },
+    currentRadioChange6(selection) {
+      this.materialName = selection.materialName;
+      this.materialId = selection.materialId;
+      this.supplierId = selection.supplierId;
+      this.supplierName = selection.supplierName;
+      this.purchaseOrderNo = selection.purchaseOrderNo;
+      this.purchaseOrderId = selection.purchaseOrderId;
+    },
     currentRadioChange3(selection) {
       this.selectionList = [];
       this.selectionList = selection;
     },
+    func(res) {
+      console.log(res);
+      this.isKuang = false;
+    },
     // 确认
     onClickConfirm() {
       var state = 0;
@@ -384,31 +559,45 @@ export default {
             message: "请选择物资!",
             type: "warning",
           });
-        } else if (!this.supplierId) {
+          return;
+        } 
+        // else if (!this.orderType) {
+        //   this.$message({
+        //     message: "请选择订单类别!",
+        //     type: "warning",
+        //   });
+        //   return;
+        // }
+         else if (!this.supplierId) {
           this.$message({
             message: "请选择发货单位!",
             type: "warning",
           });
+          return;
         } else if (!this.purchaseOrderId) {
           this.$message({
             message: "没有匹配的采购订单号!",
             type: "warning",
           });
+          return;
         } else if (!this.unloadPointId) {
           this.$message({
             message: "请选择卸货地点!",
             type: "warning",
           });
+          return;
         } else if (!this.lineId) {
           this.$message({
             message: "请选择运输路线!",
             type: "warning",
           });
+          return;
         } else if (!sjTime(this.form1.orderEntryTime)) {
           this.$message({
             message: "请选择预估进厂时间!",
             type: "warning",
           });
+          return;
         }
       }
       if (this.selectionList.length == 0) {
@@ -416,116 +605,159 @@ export default {
           message: "请选择车辆!",
           type: "warning",
         });
-        state = 0;
+        return;
       } else {
         this.selectionList.forEach((e) => {
-          if (e.orderMaterialNumber || e.orderMaterialWeight) {
-            if (
-              isNumber(e.orderMaterialNumber) ||
-              isNumber(e.orderMaterialWeight)
-            ) {
-              if (
-                isIntegerNumber(e.orderMaterialNumber) ||
-                isIntegerNumber(e.orderMaterialWeight)
-              ) {
+          if (e.orderMaterialWeight) {
+            if (isNumber(e.orderMaterialWeight)) {
+              if (isIntegerNumber(e.orderMaterialWeight)) {
                 state = 1;
               } else {
                 this.$message({
-                  message: "件数(重量)只能是整数!",
+                  message: "重量只能是整数!",
                   type: "warning",
                 });
-                state = 0;
+                return;
               }
             } else {
               this.$message({
-                message: "件数(重量)只能是数字!",
+                message: "重量只能是数字!",
                 type: "warning",
               });
-              state = 0;
+              return;
             }
-          } else {
-            this.$message({
-              message: "件数(重量)不能为空!",
-              type: "warning",
-            });
-            state = 0;
           }
         });
       }
+      let map = {
+        materialId: this.materialId,
+        supplierId: this.supplierId,
+        purchaseOrderId: this.purchaseOrderId,
+        unloadPointId: this.unloadPointId,
+        orderEntryTime: sjTime(this.form1.orderEntryTime),
+        driverCapacityIdList: this.selectionList,
+        orderType: this.orderType,
+        lineId: this.lineId,
+        isMoreTrips: this.isMoreTrips,
+      };
 
-      if (state == 1) {
-        let map = {
-          materialId: this.materialId,
-          supplierId: this.supplierId,
-          purchaseOrderId: this.purchaseOrderId,
-          unloadPointId: this.unloadPointId,
-          orderEntryTime: sjTime(this.form1.orderEntryTime),
-          driverCapacityIdList: this.selectionList,
-          orderType: 5,
-          lineId: this.lineId,
-        };
-        console.log(map, map);
-        this.axios.post("/api/v1/oms/addPurOrder", map).then((res) => {
-          if (res.data.code == "200") {
-            this.$message({
-              message: "添加成功!",
-              type: "success",
-            });
-            this.$router.push("/transportReserveFu");
-          }
-        });
-      }
+      this.axios.post("/api/v1/oms/addPurOrder", map).then((res) => {
+        if (res.data.code == "200") {
+          this.$message({
+            message: "添加成功!",
+            type: "success",
+          });
+          this.$router.push("/transportReserveFu");
+        }
+      });
     },
   },
 };
 </script>
-
-<style lang="scss" >
+<style lang="scss">
 .contractDetails {
   width: 100%;
 }
+
+.el-drawer__container ::-webkit-scrollbar {
+  display: none;
+}
 .from {
   display: flex;
   align-items: center;
   justify-content: center;
-  margin-top: 0.3125rem;
-  margin-bottom: 1.25rem;
+  margin-top: 5px;
+  margin-bottom: 20px;
 }
 .remark {
+  display: flex;
+  justify-content: center;
   .text {
     display: inline-block;
-    width: 5.625rem;
+    width: 100px;
     text-align: right;
   }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
 }
 .lineId {
+  display: flex;
+  justify-content: center;
   .text {
     display: inline-block;
-    width: 10rem;
+    width: 170px;
     text-align: right;
   }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
+  .span {
+    display: inline-block;
+    width: 70px;
+    height: 1px;
+  }
 }
 .material {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
   .text {
     display: inline-block;
-    width: 10rem;
+    width: 170px;
     text-align: right;
   }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
 }
-.switch {
-  width: 100%;
-  height: 2.5rem;
+.orderType {
   display: flex;
-  align-items: center;
-  justify-content: flex-end;
-  padding-right: 6.875rem;
+  justify-content: center;
+  .text {
+    display: inline-block;
+    width: 110px;
+    text-align: right;
+  }
+  .select {
+    width: 250px;
+  }
+  .span {
+    display: inline-block;
+    width: 30px;
+    height: 10px;
+  }
+}
+.contractTitle {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-input {
+      width: 250px;
+    }
+  }
 }
 .forwardingUnit {
+  display: flex;
+  justify-content: center;
   .text {
     display: inline-block;
-    width: 10rem;
+    width: 170px;
     text-align: right;
   }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
 }
 .truckList1 {
   width: 100%;
@@ -533,19 +765,28 @@ export default {
     width: 96%;
     .text {
       display: inline-block;
-      width: 9.375rem;
+      width: 120px;
       text-align: right;
     }
     .truckBtn {
-      width: 17.5rem;
+      width: 250px;
     }
   }
 }
+.drawer_top{
+  margin-top: -50px;
+  width: 100%;height: 60px;
+  display: flex;
+  align-items: center;
+}
+.drawer_table1{
+  width: 100%;height: 500px;
+}
 .button_box {
   display: flex;
   justify-content: center;
   align-items: center;
   width: 100%;
-  height: 6.25rem;
+  height: 100px;
 }
 </style>

+ 160 - 46
src/views/TMS/components/importedIngredients/transportReserveFuEdit.vue

@@ -2,63 +2,152 @@
   <!-- 修改运输预约页面 -->
   <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">
-          <dil-form :formId="258" v-model="form1"></dil-form>
-          <div>
-            <div v-if="form1.orderMaterialNumber">
-              <span>物资件数:</span>
-              <el-input placeholder="请输入内容" v-model="orderMaterialNumber" clearable>
-              </el-input>
-            </div>
-             <div v-if="form1.orderMaterialWeight">
-              <span>物资重量:</span>
-              <el-input placeholder="请输入内容" v-model="orderMaterialWeight" clearable>
-              </el-input>
-            </div>
-          </div>
+      <div class="form-one">
+        <dil-form :formId="220" v-model="form1"> </dil-form>
+      </div>
+      <div class="btn">
+        <div class="btn1">
+          <el-button type="primary" @click="selectTruck">浏览</el-button>
+        </div>
+        <div class="btn1">
+          <el-button type="primary" @click="selectUnloadingPoint"
+            >浏览</el-button
+          >
         </div>
       </div>
     </div>
-    <div class="button-box">
+
+    <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
       <el-button type="primary" @click="onClickConfirm">确认</el-button>
     </div>
+
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      size="40%"
+      :wrapperClosable="true"
+      :close-on-press-escape="false"
+      :destroy-on-close="false"
+      :show-close="false"
+      :withHeader="true"
+      modal
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 0.625rem; margin-left: 1.25rem; width: 200px"
+        clearable
+      ></el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 0.9375rem"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 1">
+        <dilTable
+          v-bind.sync="third"
+          @radio-change="currentRadioChange"
+        ></dilTable>
+      </div>
+      <div v-show="a == 2">
+        <dilTable
+          v-bind.sync="unloadPoint"
+          @radio-change="currentRadioChange2"
+        ></dilTable>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
       form1: {},
-      orderMaterialNumber:'',
-      orderMaterialWeight:'',
+      drawer: false,
+      direction: "rtl",
+      a: null,
+      third: {
+        requestUrl: "",
+        selectionType: "radio",
+      },
+      unloadPoint: {
+        requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
+        selectionType: "radio",
+      },
+      capacityId: null,
+      warehouseId: null,
+      input: null,
+      orderType: null,
     };
   },
+  created() {
+    //判断是否是承运商
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.third.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+        getCookie("userId");
+    } else {
+      this.third.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null;
+    }
+  },
   mounted() {
     this.information();
   },
   methods: {
+    onclick(a) {
+      if (a == 1) {
+        //判断是否是承运商
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.third.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+            getCookie("userId") +
+            "&con=" +
+            this.input;
+        } else {
+          this.third.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+            null +
+            "&con=" +
+            this.input;
+        }
+      } else if (a == 2) {
+        this.unloadPoint.requestUrl =
+          "/api/v1/uc/getUnloadingMesByLike?apiId=374&con=" + this.input;
+      }
+    },
+    selectTruck() {
+      this.a = 1;
+      this.drawer = true;
+    },
+    selectUnloadingPoint() {
+      this.a = 2;
+      this.drawer = true;
+    },
+    currentRadioChange(row) {
+      this.form1.capacityNumber = row.capacityNumber;
+      this.capacityId = row.capacityId;
+    },
+    currentRadioChange2(row) {
+      this.form1.warehouseName = row.warehouseName;
+      this.warehouseId = row.warehouseId;
+    },
     information() {
       this.axios
         .post("/api/v1/oms/selectOrderByOrderId/" + this.$route.params.orderId)
         .then((res) => {
           res.data.data.forEach((e) => {
             this.form1 = e;
-            if(e.orderMaterialNumber){
-              this.orderMaterialNumber = e.orderMaterialNumber;
-            }else if(e.orderMaterialWeight){
-              this.orderMaterialWeight = e.orderMaterialWeight;
-            }
           });
         });
     },
@@ -70,31 +159,56 @@ export default {
     onClickConfirm() {
       let obj = {
         orderId: this.$route.params.orderId,
-        orderMaterialNumber: this.form1.orderMaterialNumber,
+        capacityId: parseInt(this.capacityId),
+        unloadPointId: this.warehouseId,
         orderEntryTime: sjTime(this.form1.orderEntryTime),
-        unloadPointId: this.form1.unloadPointId,
-        orderType: 5,
+        orderType: parseInt(this.form1.orderType),
       };
-
-      if (
-        obj.orderId == null ||
-        obj.orderMaterialNumber == null ||
-        obj.orderEntryTime == null ||
-        obj.unloadPointId == null
-      )
-        this.$message.error("存在空值!");
-      else
-        this.axios.post("/api/v1/oms/updateOrder", obj).then(() => {
+      this.axios.post("/api/v1/oms/updateOrder", obj).then((res) => {
+        if (res.data.code == "200") {
           this.$message({
             type: "success",
             message: "修改成功!",
           });
-          this.$router.go(-1);
-        });
+          this.$router.push("/transportReserveFu");
+        }
+      });
     },
   },
 };
 </script>
-<style lang="scss" scoped>
-// @import "@/styles/appoint/contract/ContractInsert.scss";
-</style>  
+<style lang="scss">
+.contractTitle {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+      font-size: 14px;
+    }
+    .el-input {
+      width: 250px;
+    }
+  }
+  .btn {
+    margin-left: 20px;
+    padding-top: 105px;
+    .btn1 {
+      margin-bottom: 15px;
+    }
+  }
+}
+.button_box {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+</style>

+ 106 - 73
src/views/TMS/components/importedIngredients/truckDriverReceiveFu.vue

@@ -1,113 +1,146 @@
 <template>
-  <!-- 运输派单 -->
+  <!-- 辅料运输派单 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
+      <el-input
+        placeholder="请输入内容"
+        class="input"
+        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="clickClose" v-if="activeName == 'option'">
+        <i class="el-icon-close"></i>关闭
+      </el-button>
     </div>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <!-- 未接收 -->
-      	<el-tab-pane label="未接收" name="third">
-						<dilTable v-bind.sync="option0">
-              <el-table-column fixed="right" label="操作" width="50">
-        <template slot-scope="scope">
-          <el-button @click="closeOrder(scope.row.orderId)" type="text" size="small">
-            关闭
-          </el-button>
-        </template>
-      </el-table-column>
-						</dilTable>
-					</el-tab-pane>
-      <!-- 未下发 -->
+    <el-tabs v-model="activeName">
+      <el-tab-pane label="未接收" name="option">
+        <dilTable v-bind.sync="option" @selection-change="selectionChange"> </dilTable>
+      </el-tab-pane>
       <el-tab-pane label="已接收" name="first">
-        <dilTable v-bind.sync="option1" ref="table">
-        </dilTable>
+        <dilTable v-bind.sync="option1"> </dilTable>
       </el-tab-pane>
-      <!-- 已下发 -->
       <el-tab-pane label="已拒绝" name="second">
-        <dilTable v-bind.sync="option2">
-        </dilTable>
+        <dilTable v-bind.sync="option2"> </dilTable>
       </el-tab-pane>
     </el-tabs>
   </div>
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "inplantTMS",
   data() {
     return {
       input: "",
       Time: "",
-      activeName: "first",
-       option0: {
+      activeName: "option",
+      option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4"
+        requestUrl:"",
+        selectionType: "select",
       },
       option1: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5"
+        requestUrl:"",
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=6"
-      }
+        requestUrl:"",
+      },
+      list:[],
     };
   },
+  watch:{
+    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;
+        }else if(val == "first"){
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&i="+new Date()+"&carrierSSOId=" + null;
+        }else if(val == "second"){
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&i="+new Date()+"&carrierSSOId=" + null;
+        }
+      }else{
+        if(val == "option"){
+          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&i="+new Date()+"&carrierSSOId=" + null;
+        }else if(val == "first"){
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&i="+new Date()+"&carrierSSOId=" + null;
+        }else if(val == "second"){
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&i="+new Date()+"&carrierSSOId=" + null;
+        }
+      }
+      
+    }
+  },
+  created() {
+    //判断是否是承运商
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" + getCookie("userId");
+      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" + getCookie("userId");
+      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" + getCookie("userId");
+    } else {
+      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" + null;
+      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" + null;
+      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" + null;
+    }
+  },
   methods: {
-    closeOrder(orderId) {
-      this.$confirm("是否关闭", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-        .then(() => {
-           this.axios
-            .post(
-              "/api/v1/oms/closeOmstruckOrde?orderId="+orderId
-            )
-            .then((res) => {
-           if(res.data.code == '200')
-              // if(res.data.code)
-              this.$router.go(0);
-            });
-          this.$message({
-            type: "success",
-            message: "下发成功!",
-          });
-          // console.log(this.arr[0].text_prop);
-         
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "取消关闭!",
-          });
-        });
-    },
     onclick() {
-       if(this.activeName == "first"){
-        this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&con=" + this.input;
-      }else if(this.activeName == "second"){
-        this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=6&con=" + this.input;
-      }else
-      {
-        this.option0.requestUrl="/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&con="+this.input;
+    if (getCookie("orgCode") == "chengyunshang") {
+       if(this.activeName == "option"){
+        this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + getCookie("userId");
+      }else if (this.activeName == "first") {
+        this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + getCookie("userId");
+      } else if (this.activeName == "second") {
+        this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + getCookie("userId");
+      }
+    }else{
+      if(this.activeName == "option"){
+        this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + null;
+      }else if (this.activeName == "first") {
+        this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + null;
+      } else if (this.activeName == "second") {
+        this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&con=" + this.input +"&i="+new Date() + "&carrierSSOId=" + null;
       }
+    }
+      
     },
-    handleClick(tab, event) {
-      console.log(tab, event);
+    clickClose(){
+      console.log(this.list)
+      if(this.list.length == 0){
+        this.$message.warning('请选择订单之后在关闭')
+      }else{
+        this.axios.post('/api/v1/oms/deleteOrders',{list:this.list}).then((res)=>{
+          if(res.data.code == "200"){
+            this.$message.success('关闭成功')
+            this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&con=" + this.input +"&i="+new Date();
+          }
+        })
+      }
+
     },
+    selectionChange(selection){
+      this.list = [],
+      selection.forEach(e => {
+        this.list.push(e.orderId)
+      });
+    }
   },
 };
 </script>
-<style lang='scss' scoped>
+<style lang='scss'>
 .homeworkPath {
-   .top {
-    padding: 1.25rem 1.875rem;
+  .top {
+    padding: 40px;
+    .input {
+      width: 250px;
+      margin-right: 10px;
+    }
   }
 }
 </style>

+ 12 - 35
src/views/TMS/components/importedIngredients/truckEnfactoryFuResult.vue

@@ -1,11 +1,10 @@
 <template>
-  <!-- 辅料进厂作业页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
+      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
     </div>
     <dilTable v-bind.sync="option">
       
@@ -26,22 +25,8 @@ export default {
       },
     };
   },
+
   methods: {
-    querySearch(queryString, cb) {
-      var restaurants = this.restaurants;
-      var results = queryString
-        ? restaurants.filter(this.createFilter(queryString))
-        : restaurants;
-      cb(results);
-    },
-    createFilter(queryString) {
-      return (restaurant) => {
-        return (
-          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
-          0
-        );
-      };
-    },
     onclick() {
       this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=5&con=" + this.input;
     },
@@ -52,18 +37,6 @@ export default {
     insertClick() {
       this.$router.push("/truckLoadResultAdd/");
     },
-    // deleteclick(scope) {
-    //   let pathId = scope;
-    //   this.axios
-    //     .post("/api/v1/tms/operationPath/operationPathDelete?pathId=" + pathId)
-    //     .then((res) => {
-    //       this.$message({
-    //         message: "删除成功",
-    //         type: "success",
-    //       });
-    //       this.$router.go(0);
-    //     });
-    // },
     deleteClick(resultId) {
       
       this.$confirm("是否删除", "提示", {
@@ -95,10 +68,14 @@ export default {
   },
 };
 </script>
-<style lang='scss' scoped>
+<style lang='scss'>
 .homeworkPath {
-  .top {
-    padding: 1.25rem 1.875rem;
+   .top {
+    padding: 40px;
+    .input{
+      width: 250px;
+      margin-right: 10px;
+    }
   }
 }
 </style>

+ 13 - 153
src/views/TMS/components/importedIngredients/truckJiMaoFuResult.vue

@@ -2,85 +2,14 @@
   <!-- 辅料计毛实绩页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-           
+      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
       <el-button type="primary" class="btn" @click="onclick">
-                <i class="el-icon-search"></i>查询      
+        <i class="el-icon-search"></i>查询
       </el-button>
     </div>
     <dilTable v-bind.sync="option">
-      <el-table-column fixed="right" align="center" label="操作" width="120">
-        <template slot-scope="scope">
-          <el-button
-            @click="sendClick(scope.row.orderId)"
-            type="text"
-            size="small"
-            v-if="scope.row.orderStatus == 5"
-          >
-            退货
-          </el-button>
-          <el-button  
-            type="text"
-            size="small"
-            disabled
-            v-else
-          >
-            退货
-          </el-button>
-        </template>
-      </el-table-column>
-    </dilTable>
-
-    <el-dialog
-      title="提示"
-      :visible.sync="dialogVisible"
-      width="30%"
-      :before-close="handleClose"
-      :modal="true"
-      :close-on-click-modal="false"
-    >
-      <div class="text">
-        <span>请选择退货路线</span>
-      </div>
-      <el-input placeholder="请输入内容" v-model="lineName" disabled>
-      </el-input>
-      <el-button type="primary" @click="onLine">浏览</el-button>
-      <div class="returnResult">
-        <span>退货原因:</span>
-      </div>
-      <el-input placeholder="请输入内容" v-model="returnResult">
-      </el-input>
       
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="handleClose">取 消</el-button>
-        <el-button type="primary" @click="outOrder">确 定</el-button>
-      </span>
-    </el-dialog>
-
-    <!-- 模态窗口 -->
-    <el-drawer :visible.sync="drawer" size="50%">
-      <el-input
-        placeholder="请输入内容"
-        v-model="calculationText"
-        style="margin-top: 0.625rem; margin-left: 1.25rem"
-        clearable
-      ></el-input>
-      <el-button
-        type="primary"
-        class="btn"
-        @click="calculation"
-        style="margin-bottom: 0.9375rem"
-      >
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <div>
-        <!-- 模态框——表格 -->
-        <dilTable
-          v-bind.sync="line"
-          @radio-change="currentRadioChange"
-        ></dilTable>
-      </div>
-    </el-drawer>
+    </dilTable>
   </div>
 </template>
 
@@ -89,99 +18,30 @@ export default {
   name: "homeworkPath",
   data() {
     return {
-      returnResult:'',
-      //路线名称
-      lineName: "",
-      //路线id
-      lineId: null,
-      //模态框框计算文本
-      calculationText: "",
-      //是否需要打开模态窗口
-      drawer: false,
-      //是否打开弹窗
-      dialogVisible: false,
-      //订单id
-      orderId: null,
       restaurants: [],
       input: "",
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getAllJiMaoResult?apiId=102&orderType=5",
       },
-      //模态框表格数据
-      line: {
-        requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=4",
-        selectionType: "radio",
-      },
     };
   },
+
   methods: {
-    //模态框单选触发事件
-    currentRadioChange(selection) {
-      this.lineName = selection.lineName;
-      this.lineId = selection.lineId;
-    },
-    //模态框框计算
-    calculation() {
-      this.option.requestUrl =
-        "/api/v1/rms/getAllLineDesk?apiId=249&lineType=4&con=" +
-        this.calculationText;
-    },
-    //弹窗浏览按钮
-    onLine() {
-      this.drawer = true;
-    },
-    //弹窗的确定按钮
-    outOrder() {
-      if(this.lineId && this.returnResult){
-        let map = {
-        returnResult:this.returnResult,
-        orderId: this.orderId,
-        lineId: this.lineId,
-      };
-      this.axios.post("/api/v1/oms/returnOrderCloseOrder", map).then((res) => {
-        console.log(res);
-        this.dialogVisible = false;
-          this.option.requestUrl ="/api/v1/tms/getAllJiMaoResult?apiId=102&orderType=5&i=0";
-      });
-      }else{
-          this.$message({
-          message: '请选择运输路线和退货原因,在确定!',
-          type: 'warning'
-        });
-      }
-    },
-    //弹窗关闭事件
-    handleClose() {
-      this.lineName = null;
-      this.lineId = null;
-      this.orderId = null;
-      this.dialogVisible = false;
-    },
-    //操作列退货按钮
-    sendClick(orderId) {
-      console.log(orderId);
-      this.orderId = orderId;
-      this.dialogVisible = true;
-    },
     onclick() {
-      this.option.requestUrl =
-        "/api/v1/tms/getAllJiMaoResult?apiId=102&orderType=5&con=" + this.input;
+     this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=102&orderType=5&con=" + this.input;
     },
-  },
+   }
 };
 </script>
-<style lang='scss' scoped>
+<style lang='scss'>
 .homeworkPath {
-  .top {
-    padding: 1.25rem 1.875rem;
-  }
-  .text {
-    margin-bottom: 0.625rem;
-  }
-  .returnResult {
-    margin-top: 0.625rem;
-    margin-bottom: 0.625rem;
+   .top {
+    padding: 40px;
+    .input{
+      width: 250px;
+      margin-right: 10px;
+    }
   }
 }
 </style>

+ 15 - 12
src/views/TMS/components/importedIngredients/truckJiPiFuResult.vue

@@ -2,10 +2,9 @@
   <!-- 辅料计皮实绩页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-           
+      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
       <el-button type="primary" class="btn" @click="onclick">
-                <i class="el-icon-search"></i>查询      
+        <i class="el-icon-search"></i>查询
       </el-button>
     </div>
     <dilTable v-bind.sync="option">
@@ -19,27 +18,31 @@ export default {
   name: "homeworkPath",
   data() {
     return {
-      //一览表格框计算文本
+      restaurants: [],
       input: "",
-      //一览表格数据
       option: {
+        // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getAllJiPiResult?apiId=146&orderType=5",
       },
     };
   },
+
   methods: {
-    //一览表格框计算
+
     onclick() {
-      this.option.requestUrl =
-        "/api/v1/tms/getAllJiPiResult?apiId=146&orderType=5&con=" + this.input;
+     this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=146&orderType=5&con=" + this.input;
     },
-  },
+   }
 };
 </script>
-<style lang='scss' scoped>
+<style lang='scss'>
 .homeworkPath {
-  .top {
-    padding: 1.25rem 1.875rem;
+   .top {
+    padding: 40px;
+    .input{
+      width: 250px;
+      margin-right: 10px;
+    }
   }
 }
 </style>

+ 14 - 24
src/views/TMS/components/importedIngredients/truckLeaveFactoryFuResult.vue

@@ -1,11 +1,11 @@
 <template>
   <!-- 辅料出厂作业页面 -->
   <div class="homeworkPath">
-    <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
+   <div class="top"> 
+      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
     </div>
     <dilTable v-bind.sync="option">
       
@@ -26,33 +26,23 @@ export default {
       },
     };
   },
+
   methods: {
-    querySearch(queryString, cb) {
-      var restaurants = this.restaurants;
-      var results = queryString
-        ? restaurants.filter(this.createFilter(queryString))
-        : restaurants;
-      cb(results);
-    },
-    createFilter(queryString) {
-      return (restaurant) => {
-        return (
-          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
-          0
-        );
-      };
-    },
     
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=147&orderType=5&con=" + this.input;
+     this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=147&orderType=5&con=" + this.input;
     },
    }
 };
 </script>
-<style lang='scss' scoped>
+<style lang='scss'>
 .homeworkPath {
-  .top {
-    padding: 1.25rem 1.875rem;
+   .top {
+    padding: 40px;
+    .input{
+      width: 250px;
+      margin-right: 10px;
+    }
   }
 }
 </style>

+ 15 - 27
src/views/TMS/components/importedIngredients/truckQualityFuResult.vue

@@ -2,10 +2,11 @@
   <!-- 辅料质检作业 -->
   <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-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+
     </div>
     
     <dilTable v-bind.sync="option">
@@ -34,39 +35,26 @@ export default {
       },
     };
   },
+
   methods: {
-    querySearch(queryString, cb) {
-      var restaurants = this.restaurants;
-      var results = queryString
-        ? restaurants.filter(this.createFilter(queryString))
-        : restaurants;
-      cb(results);
-    },
-    createFilter(queryString) {
-      return (restaurant) => {
-        return (
-          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
-          0
-        );
-      };
-    },
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getQualityResult?apiId=150&orderType=5&con=" + this.input;
-    },
-    btnclick() {
-      this.$router.push("/approveWagonPleaseAdd/");
+         this.option.requestUrl = "/api/v1/tms/getQualityResult?apiId=150&orderType=5&con=" + this.input;
     },
     updateClick(resultId) {
-      this.$router.push("/truckQualityFuResultEdit/" + resultId);
+      this.$router.push("/truckQualityRanLaoResultEdit/" + resultId);
     },
     
   },
 };
 </script>
-<style lang='scss' scoped>
+<style lang='scss'>
 .homeworkPath {
-  .top {
-    padding: 1.25rem 1.875rem;
+   .top {
+    padding: 40px;
+    .input{
+      width: 250px;
+      margin-right: 10px;
+    }
   }
 }
 </style>

+ 12 - 24
src/views/TMS/components/importedIngredients/truckReceiptFuResult.vue

@@ -2,10 +2,10 @@
   <!-- 辅料收货作业页面 -->
   <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-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
     </div>
     <dilTable v-bind.sync="option">
       
@@ -27,32 +27,20 @@ export default {
     };
   },
   methods: {
-    querySearch(queryString, cb) {
-      var restaurants = this.restaurants;
-      var results = queryString
-        ? restaurants.filter(this.createFilter(queryString))
-        : restaurants;
-      cb(results);
-    },
-    createFilter(queryString) {
-      return (restaurant) => {
-        return (
-          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
-          0
-        );
-      };
-    },
-    
     onclick() {
-     this.option.requestUrl = "/api/v1/tms/getReceiveResult?apiId=149&orderType=5&con=" + this.input;
+      this.option.requestUrl = "/api/v1/tms/getReceiveResult?apiId=149&orderType=5&con=" + this.input;
     },
    }
 };
 </script>
-<style lang='scss' scoped>
+<style lang='scss'>
 .homeworkPath {
-  .top {
-    padding: 1.25rem 1.875rem;
+   .top {
+    padding: 40px;
+    .input{
+      width: 250px;
+      margin-right: 10px;
+    }
   }
 }
 </style>

+ 15 - 27
src/views/TMS/components/importedIngredients/truckUnloadFuResult.vue

@@ -1,15 +1,13 @@
 <template>
   <!-- 卸货实绩页面 -->
   <div class="homeworkPath">
-    <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
+   <div class="top">
+      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
     </div>
-    <dilTable v-bind.sync="option">
-      
-    </dilTable>
+    <dilTable v-bind.sync="option"></dilTable>
   </div>
 </template>
 
@@ -26,32 +24,22 @@ export default {
       },
     };
   },
+ 
   methods: {
-    querySearch(queryString, cb) {
-      var restaurants = this.restaurants;
-      var results = queryString
-        ? restaurants.filter(this.createFilter(queryString))
-        : restaurants;
-      cb(results);
-    },
-    createFilter(queryString) {
-      return (restaurant) => {
-        return (
-          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
-          0
-        );
-      };
-    },
     onclick() {
-     this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=145&orderType=5&con=" + this.input;
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=145&orderType=5&con=" + this.input;
     },
    }
 };
 </script>
-<style lang='scss' scoped>
+<style lang='scss'>
 .homeworkPath {
-  .top {
-    padding: 1.25rem 1.875rem;
+   .top {
+    padding: 40px;
+    .input{
+      width: 250px;
+      margin-right: 10px;
+    }
   }
 }
 </style>