Your Name 3 years ago
parent
commit
efaf024043

+ 2 - 2
build/utils.js

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

+ 1 - 1
config/index.js

@@ -70,7 +70,7 @@ let proxyTable = {
     }
   },
   '/icore.icp.web/pass/logout': {
-    target: 'http://172.16.33.161:9001/logout',
+    target: 'http://172.16.33.166:9001/logout',
     changeOrigin: true,
     pathRewrite: {
       '^/icore.icp.web/pass/logout': '/'

+ 52 - 59
src/views/RMS/components/addCapacity.vue

@@ -6,7 +6,7 @@
      <div class="form_box" style="margin-right: 10rem">
         <dil-form :formId="309" v-model="form1" ref="from1"></dil-form>
       </div>
-      <!-- <div class="inputBox">
+    <div class="inputBox">
     <span class="text">所属承运商</span>
       <el-autocomplete
         class="input"
@@ -17,7 +17,7 @@
         :trigger-on-focus="false"
         @select="handleSelect"
       ></el-autocomplete>
-    </div> -->
+    </div>
     <div class="button_box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
@@ -40,53 +40,63 @@ export default {
       restaurants: [],
       accessToken:null,
       userCode:null,
-      carrierUserId:null
+      carrierUserId:null,
+      carrierId:null
     };
   },
   created(){
       this.carrierUserId = getCookie("userId");
       console.log(this.carrierUserId ,'carrierUserId')
+      
   },
   mounted() {
-    
-  },
+   this.axios.post(
+       "api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
+      )
+      .then((res) => {
+        if(res.data.code == "200"){
+        console.log(res.data.data)
+        this.state = res.data.data.carrierName
+        this.carrierIds = res.data.data.carrierId
+        }      
+  })},
   methods: {
-    //  onInput() {
-    //   this.axios.post(
-    //     "/api/v1/rms/getCarrierName?state="+this.state,
-    //   )
-    //   .then((res) => {
-    //     if(res.data.code == "200"){
-    //       res.data.data.forEach(element => {
-    //         this.restaurants.push({
-    //           value:element.carrierName,
-    //           carrierIds:element.carrierId
-    //         })
-    //       });
-    //     }
+     onInput() {
+      this.axios.post(
+        "/api/v1/rms/getCarrierName?state="+this.state,
+      )
+      .then((res) => {
+        if(res.data.code == "200"){
+          res.data.data.forEach(element => {
+            this.restaurants.push({
+              value:element.carrierName,
+              carrierIds:element.carrierId
+            })
+          });
+        }
         
-    //   });
-    // },
-    // querySearch(queryString, cb) {
-    //   var restaurants = this.restaurants;
-    //   var results = queryString
-    //     ? restaurants.filter(this.createFilter(queryString))
-    //     : restaurants;
-    //   // 调用 callback 返回建议列表的数据
-    //   cb(results);
-    // },
-    // createFilter(queryString) {
-    //   return (restaurant) => {
-    //     return (
-    //       restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
-    //       0
-    //     );
-    //   };
-    // },
-    // handleSelect(item) {
-    //   this.carrierIds = item.carrierIds;
-    //   console.log(item);
-    // },
+      });
+    },
+    querySearch(queryString, cb) {
+      var restaurants = this.restaurants;
+      var results = queryString
+        ? restaurants.filter(this.createFilter(queryString))
+        : restaurants;
+      // 调用 callback 返回建议列表的数据
+      cb(results);
+    },
+    createFilter(queryString) {
+      return (restaurant) => {
+        return (
+          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
+          0
+        );
+      };
+    },
+    handleSelect(item) {
+      this.carrierIds = item.carrierIds;
+      console.log(item);
+    },
     deleteUser(userId){
         this.axios.delete("pass/v1/sysusers/" + userId) .then((res) => {
            this.$message.error("添加失败,车牌可能重复");
@@ -119,9 +129,8 @@ export default {
         capacityOwneris: this.form1.capacityOwneris,
         capacityVip: this.form1.capacityVip,
         capacityBlacklist: this.form1.capacityBlacklist,
-        // carrierId:this.form1.carrierId,
-        state: this.state,
-        carrierUserId:this.carrierUserId
+        carrierId:this.carrierIds,
+        state: this.state
       };
       if (
         RmsCapacity.capacityNumber == null ||
@@ -169,22 +178,6 @@ export default {
           this.$message.error(res.message);
         }
       });
-      //   this.axios
-      //     .post("/api/v1/rms/insertCapacity", RmsCapacity)
-      //     .then((res) => {
-      //       console.log("res.data.code", res.data.code);
-      //       if (res.data.code == 200) {
-      //         this.$message({
-      //           type: "success",
-      //           message: "新增成功!",
-      //         });
-      //         // this.$refs.table.refreshData();
-      //         this.$router.go(-1);
-      //       } else {
-      //         this.$message.error("新增失败,可能存在重复!");
-      //       }
-      //       // this.$refs['table'].resetField();
-      //     });
     },
     // 取消
     cancel() {

+ 81 - 11
src/views/RMS/components/editCapacity.vue

@@ -10,7 +10,20 @@
           <dil-form :formId="310" v-model="form1"></dil-form>
       </div>
     </div>
+    <div class="inputBox">
+    <span class="text">所属承运商</span>
+      <el-autocomplete
+        class="input"
+        v-model="state"
+        @input="onInput"
+        :fetch-suggestions="querySearch"
+        placeholder="边输入边查询"
+        :trigger-on-focus="false"
+        @select="handleSelect"
+      ></el-autocomplete>
+    </div>
 </div>
+
         <!-- <div class="form-box f1">
           <el-form :inline="true" :model="formInline" class="demo-form-inline">
 <div class="disableBox">
@@ -50,28 +63,85 @@
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
-      drawer: false,
+      state: "",
+      userId:null,
+      restaurants: [],
+      accessToken:null,
+      userCode:null,
+      carrierUserId:null,
+      carrierId:null,
+      carrierIds:null,
       direction: 'rtl',
       inputText:"",
       form1: {},
+      carrierUserId:null,
       carrierName:"",
-    options:{
+      options:{
         requestUrl:"/api/v1/rms/getCarrierList?apiId=417",
         selectionType:"radio",
         mapList:[]
       }
     };
   },
-  mounted() {
-      console.log(this.$route)
-    this.information();
-  },
+  created(){
+      this.carrierUserId = getCookie("userId");
+      console.log(this.carrierUserId ,'carrierUserId')
+      
+  },
+  mounted() {
+   this.information();
+   this.axios.post(
+       "api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
+      )
+      .then((res) => {
+        if(res.data.code == "200"){
+        console.log(res.data.data)
+        this.state = res.data.data.carrierName
+        this.carrierIds = res.data.data.carrierId
+        }      
+  })},
   methods: {
+      onInput() {
+      this.axios.post(
+        "/api/v1/rms/getCarrierName?state="+this.state,
+      )
+      .then((res) => {
+        if(res.data.code == "200"){
+          res.data.data.forEach(element => {
+            this.restaurants.push({
+              value:element.carrierName,
+              carrierIds:element.carrierId
+            })
+          });
+        }
+        
+      });
+    },
+    querySearch(queryString, cb) {
+      var restaurants = this.restaurants;
+      var results = queryString
+        ? restaurants.filter(this.createFilter(queryString))
+        : restaurants;
+      // 调用 callback 返回建议列表的数据
+      cb(results);
+    },
+    createFilter(queryString) {
+      return (restaurant) => {
+        return (
+          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
+          0
+        );
+      };
+    },
+    handleSelect(item) {
+      this.carrierIds = item.carrierIds;
+      console.log(item);
+    },
     currentRadioChange(selection){
       this.mapList=selection,
       console.log(this.mapList)
@@ -82,7 +152,7 @@ export default {
     },
     information() {
       //编辑 
-console.log(this.$route.params)            
+    console.log(this.$route.params)            
      
       this.axios
         .post(
@@ -99,13 +169,13 @@ console.log(this.$route.params)
             console.log(this.form1);
             console.log( this.$route.params.capacityId);
           }); 
- this.axios
+        this.axios
         .post(
           "/api/v1/rms/getCarrierNameById/" +
           this.$route.params.capacityId
         )
         .then((res) => {
-          this.carrierName=res.data.data.carrierName
+          this.state=res.data.data.carrierName
           console.log("carrierName",this.carrierName);
         }); 
         });
@@ -125,7 +195,7 @@ console.log(this.$route.params)
          capacityOwneris:this.form1.capacityOwneris,
          capacityVip:this.form1.capacityVip,
          capacityBlacklist:this.form1.capacityBlacklist,
-       //  carrierId:this.mapList.carrierId,
+          carrierId:this.carrierIds,
        };if(
          RmsCapacity.capacityNumber==null ||
          RmsCapacity.capacityCorlor==null ||

+ 18 - 11
src/views/SporadicManage/components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue

@@ -560,6 +560,10 @@ export default {
       this.carriermapList = [];
       this.carriermapList = selection;
     },
+    jgao(){
+      this.$alert('有数据未填写')
+      return
+    },
     // 确认
     makeSure() {
         console.log(this.supplierId,"this.supplierId")
@@ -574,18 +578,22 @@ export default {
           this.$alert('请点击浏览勾选物资')
           return
         }
+        var i = 0;
+        var j = 0;
         this.tableData.forEach((e) => {
           if(e.materialPriority == null){
-            this.$alert('装卸货优先级未填写')
-            return
-          }else if(e.orderMaterialWeight == null){
-            this.$alert('物资重量未填写')
-            return
-          }
-          return            
+            i++
+          }else if(e.orderMaterialWeight == null){            
+            j++
+          }            
         })
-        console.log(this.tableData)
-        debugger
+        if(i != 0){
+           this.$alert('装卸货优先级未填写')
+           return
+        }else if(j != 0){
+           this.$alert('物资重量未填写')
+           return
+        }
         let amsOrder = {
           supplierId:this.supplierId,
           lineId:this.lineId,
@@ -593,8 +601,7 @@ export default {
           carrierId: this.carrierId,
           receiveId: this.consigneeId,
           mapList: this.tableData,
-        };
-        console.log(amsOrder);     
+        };   
         this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then((res) => {
           if (res.data.code == "200") {
             this.$router.go(-1)

+ 5 - 4
src/views/SporadicManage/components/sporadicMaterial/transportOrder/transportOrder.vue

@@ -212,6 +212,7 @@ export default {
   },
   methods: {
     handleClose(done){
+        this.determine();
         done();
     },
     onclick(){
@@ -275,13 +276,13 @@ export default {
               });
             }
             this.dialogVisible = false;
-            this.option.requestUrl =
-              "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=3&i=" +
-              new Date();
+            this.option.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=3&carrierId=" + this.carrierUserId +"&test=1",
+            this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + this.carrierUserId +"&test=1",
+            this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + this.carrierUserId +"&test=1" ,
+            this.truck.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + this.carrierUserId +"&test=1"
           }
         });
     },
-  
     //多选的选中的数据
     selectionChange(selection) {
       this.selectionList = [];