huk 3 年之前
父节点
当前提交
4260a546b0

+ 2 - 2
build/utils.js

@@ -15,8 +15,8 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 // ['index', 'sales', '  ', 'standard', 'qualityControl', 'produce', 'workshop',
 //    物流         进程     成本   报表          基础配置        系统配置
 //  'logistics', 'process', '   ', 'reportform', 'basicconfig', 'system']
-// let devModules = ['index','RMS','systemConfig']
-let devModules = ['all'];
+let devModules = ['index','RMS','systemConfig','TMS']
+// let devModules = ['all'];
 // let devModules = ['index','inward','appoint','sale']
 
 if (pathSrc.indexOf('node_modules') > -1) {

+ 1 - 1
config/index.js

@@ -56,7 +56,7 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://172.16.33.166:8080",
+    target: "http://192.168.1.113:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 56 - 12
src/views/TMS/components/importedFuel/transportReserveRan.vue

@@ -15,7 +15,12 @@
       <el-button type="primary" class="btn" @click="insertClick">
         <i class="el-icon-plus"></i>新增
       </el-button>
-      <el-button type="primary" class="btn" @click="issue" v-if="activeName == 'first'">
+      <el-button
+        type="primary"
+        class="btn"
+        @click="issue"
+        v-if="activeName == 'first'"
+      >
         <i class="el-icon-plus"></i>下发
       </el-button>
     </div>
@@ -70,6 +75,7 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "inplantTMS",
   data() {
@@ -79,28 +85,66 @@ export default {
       activeName: "first",
       option1: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=1",
+        requestUrl: "",
         selectionType: "select",
         mapList: [],
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1",
+        requestUrl: "",
       },
     };
   },
+  created() {
+    //判断是否是承运商
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.option1.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=1&carrierSSOId=" +
+        getCookie("userId");
+      this.option2.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=&carrierSSOId=" +
+        getCookie("userId");
+    } else {
+      this.option1.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=1&carrierSSOId=" +
+        null;
+      this.option2.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=&carrierSSOId=" +
+        null;
+    }
+  },
   methods: {
     onclick() {
       if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=1&con=" +
-          this.input;
+        //判断是否是承运商
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=1&carrierSSOId=" +
+            getCookie("userId") +
+            "&con=" +
+            this.input;
+        } else {
+          this.option1.requestUrl =
+            "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=1&carrierSSOId=" +
+            null +
+            "&con=" +
+            this.input;
+        }
       } else {
-        this.option2.requestUrl =
-          "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1&con=" +
-          this.input;
+        //判断是否是承运商
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.option1.requestUrl =
+            "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1&carrierSSOId=" +
+            getCookie("userId") +
+            "&con=" +
+            this.input;
+        } else {
+          this.option1.requestUrl =
+            "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1&carrierSSOId=" +
+            null +
+            "&con=" +
+            this.input;
+        }
       }
     },
     selectionChange(selection) {
@@ -197,7 +241,7 @@ export default {
       width: 250px;
       margin-right: 20px;
     }
-    .btn{
+    .btn {
       margin-right: 10px;
     }
   }

+ 74 - 49
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

@@ -31,11 +31,16 @@
     </div>
     <div class="orderType from">
       <span class="text">订单类别:</span>
-      <el-select class="select" v-model="orderType" placeholder="请选择" disabled>
+      <el-select
+        class="select"
+        v-model="orderType"
+        placeholder="请选择"
+        disabled
+      >
         <el-option
           v-for="item in orderTypeList"
           :key="item.value"
-          :label="item.label" 
+          :label="item.label"
           :value="item.value"
         >
         </el-option>
@@ -78,7 +83,7 @@
             <template v-if="item.slot">
               <template v-if="item.prop == 'orderMaterialWeight'">
                 <el-input
-                style="width:250px"
+                  style="width: 250px"
                   v-model.number="scope.row.orderMaterialWeight"
                 ></el-input>
               </template>
@@ -100,20 +105,16 @@
     </div>
     <!-- 模态窗口 -->
     <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
-      <div style="margin-bottom: 10px;">
+      <div style="margin-bottom: 10px">
         <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(a)"
-      >
-        <i class="el-icon-search"></i>查询
-      </el-button>
+          placeholder="请输入内容"
+          v-model="input"
+          style="margin-top: 10px; margin-right: 10px; width: 250px"
+          clearable
+        ></el-input>
+        <el-button type="primary" class="btn" @click="onclick(a)">
+          <i class="el-icon-search"></i>查询
+        </el-button>
       </div>
       <div v-show="a == 1">
         <dilTable
@@ -154,20 +155,22 @@
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
-import { sjTime,isNumber,isIntegerNumber } from '@/utils/sharedJsFile'
+import { sjTime, isNumber, isIntegerNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
       //订单类别
-      orderTypeList:[
+      orderTypeList: [
         {
-          value:6,
-          label:'老厂区'
-        },{
-          value:7,
-          label:'新厂区'
-        }
+          value: 6,
+          label: "老厂区",
+        },
+        {
+          value: 7,
+          label: "新厂区",
+        },
       ],
       // 线路名称
       lineName: "",
@@ -216,7 +219,7 @@ export default {
       //卸货点名称
       unloadPointName: "",
       //订单类别
-      orderType:null,
+      orderType: null,
       a: 1,
       direction: "rtl",
       input: "",
@@ -232,7 +235,7 @@ export default {
         mapList2: [],
       },
       third: {
-        requestUrl: "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248",
+        requestUrl: "",
         selectionType: "select",
         mapList3: [],
       },
@@ -246,11 +249,21 @@ export default {
       },
     };
   },
-  watch:{
-    drawer(val){
-      if(!val){
+  watch: {
+    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: {
@@ -280,14 +293,14 @@ export default {
               });
               this.form1 = [];
             } else {
-              console.log()
+              console.log();
               this.remark = res.data.data.remark;
               this.purchaseOrderId = res.data.data.purchaseOrderId;
               this.form1 = { purchaseOrderNo: res.data.data.purchaseOrderNo };
-              if(res.data.data.receiveUnitId == 1){
-                  this.orderType = 6
-              }else{
-                this.orderType = 7
+              if (res.data.data.receiveUnitId == 1) {
+                this.orderType = 6;
+              } else {
+                this.orderType = 7;
               }
             }
           } else {
@@ -308,9 +321,20 @@ export default {
           "&index=" +
           this.input;
       } else if (a == 3) {
-        this.third.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&index=" +
-          this.input;
+        //判断是否是承运商查询车辆
+        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 (a == 4) {
         this.unloadPoint.requestUrl =
           "/api/v1/uc/getUnloadingMesByLike?apiId=347&index=" + this.input;
@@ -480,7 +504,7 @@ export default {
     width: 100px;
     text-align: right;
   }
-  .input{
+  .input {
     width: 250px;
     margin-right: 20px;
   }
@@ -493,7 +517,7 @@ export default {
     width: 170px;
     text-align: right;
   }
-  .input{
+  .input {
     width: 250px;
     margin-right: 20px;
   }
@@ -507,12 +531,12 @@ export default {
     width: 170px;
     text-align: right;
   }
-  .input{
+  .input {
     width: 250px;
     margin-right: 20px;
   }
 }
-.orderType{
+.orderType {
   display: flex;
   justify-content: center;
   .text {
@@ -520,25 +544,26 @@ export default {
     width: 110px;
     text-align: right;
   }
-  .select{
+  .select {
     width: 250px;
   }
-  .span{
+  .span {
     display: inline-block;
-    width: 30px;height: 10px;
+    width: 30px;
+    height: 10px;
   }
 }
-.contractTitle{
+.contractTitle {
   display: flex;
   justify-content: center;
-  .el-form-item{
+  .el-form-item {
     display: flex;
     justify-content: center;
-    .el-form-item__label{
+    .el-form-item__label {
       display: flex;
       align-items: center;
     }
-    .el-input{
+    .el-input {
       width: 250px;
     }
   }
@@ -551,7 +576,7 @@ export default {
     width: 170px;
     text-align: right;
   }
-  .input{
+  .input {
     width: 250px;
     margin-right: 20px;
   }

+ 46 - 20
src/views/TMS/components/importedFuel/transportReserveRanEdit.vue

@@ -66,7 +66,8 @@
 
 <script>
 import PageTitle from "@/components/Page/Title";
-import {sjTime} from "@/utils/sharedJsFile";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
@@ -76,7 +77,7 @@ export default {
       direction: "rtl",
       a: null,
       third: {
-        requestUrl: "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248",
+        requestUrl: "",
         selectionType: "radio",
       },
       unloadPoint: {
@@ -86,18 +87,43 @@ export default {
       capacityId: null,
       warehouseId: null,
       input: null,
-      orderType: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) {
-        this.third.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&con=" + this.input;
+        //判断是否是承运商
+        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() {
@@ -132,22 +158,22 @@ export default {
     // 确认
     onClickConfirm() {
       let obj = {
-          orderId:this.$route.params.orderId,
-          capacityId:parseInt(this.capacityId),
-          unloadPointId:this.warehouseId,
-          orderEntryTime:sjTime(this.form1.orderEntryTime),
-          orderType:parseInt(this.form1.orderType),
+        orderId: this.$route.params.orderId,
+        capacityId: parseInt(this.capacityId),
+        unloadPointId: this.warehouseId,
+        orderEntryTime: sjTime(this.form1.orderEntryTime),
+        orderType: parseInt(this.form1.orderType),
+      };
+      this.axios.post("/api/v1/oms/updateOrder", obj).then((res) => {
+        if (res.data.code == "200") {
+          this.$message({
+            type: "success",
+            message: "修改成功!",
+          });
+          this.$router.push("/transportReserveRan");
         }
-        this.axios.post("/api/v1/oms/updateOrder", obj).then((res) => {
-          if(res.data.code == "200"){
-            this.$message({
-              type: "success",
-              message: "修改成功!",
-            });
-            this.$router.push("/transportReserveRan");
-            }
-        });
-    }
+      });
+    },
   },
 };
 </script>

+ 43 - 14
src/views/TMS/components/importedFuel/truckDriverReceiveRan.vue

@@ -2,7 +2,13 @@
   <!-- 燃料运输派单 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" class="input" 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>查询
       </el-button>
@@ -10,19 +16,18 @@
     <el-tabs v-model="activeName">
       <!-- 未下发 -->
       <el-tab-pane label="已接收" name="first">
-        <dilTable v-bind.sync="option1" ref="table">
-        </dilTable>
+        <dilTable v-bind.sync="option1" ref="table"> </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() {
@@ -32,20 +37,44 @@ export default {
       activeName: "first",
       option1: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5"
+        requestUrl:
+          "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5",
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6"
-      }
+        requestUrl:
+          "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6",
+      },
     };
   },
+  created() {
+    //判断是否是承运商
+    if (getCookie("orgCode") == "chengyunshang") {
+      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=5&carrierSSOId=" +
+        getCookie("userId");
+    } else {
+      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=5&carrierSSOId=" +
+        null;
+    }
+  },
   methods: {
     onclick() {
-      if(this.activeName == "first"){
-        this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&con=" + this.input;
-      }else{
-        this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&con=" + this.input;
+      if (this.activeName == "first") {
+        this.option1.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=5&con=" +
+          this.input;
+      } else {
+        this.option2.requestUrl =
+          "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&con=" +
+          this.input;
       }
     },
   },
@@ -53,9 +82,9 @@ export default {
 </script>
 <style lang='scss'>
 .homeworkPath {
-   .top {
+  .top {
     padding: 40px;
-    .input{
+    .input {
       width: 250px;
       margin-right: 10px;
     }