zouzhd 3 vuotta sitten
vanhempi
commit
c3b96a4c62

+ 2 - 2
build/utils.js

@@ -17,8 +17,8 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 
  // let devModules = ['index','WMS']
- let devModules = ['all']
-// let devModules = ['index','TMS','statisticalReport','appoint','sale'];
+//  let devModules = ['all']
+let devModules = ['index','TMS','statisticalReport','appoint','sale','RMS'];
 // let devModules = ['index','appoint','WMS'];
 
 if (pathSrc.indexOf('node_modules') > -1) {

+ 2 - 2
config/index.js

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

BIN
dist.zip


+ 25 - 25
src/views/RMS/components/capacity.vue

@@ -21,24 +21,24 @@
         @func="func"
         :isKuang="isKuang"
       >
-        <!-- <el-table-column fixed="right" label="操作" width="100">
+        <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
-            <el-button
+            <!-- <el-button
               type="text"
               size="small"
               @click="updateCapacity(scope.row.capacityId)"
             >
               修改
-            </el-button>
+            </el-button> -->
             <el-button
               type="text"
               size="small"
-              @click="deleteCapacity(scope.row.capacityId)"
+              @click="deleteCapacity(scope.row)"
               v-if="show==true">
               删除
             </el-button>
           </template>
-        </el-table-column> -->
+        </el-table-column>
       </dilTable>
     </div>
   </div>
@@ -63,7 +63,7 @@ export default {
     }
   },
   created(){
-    if(getCookie("orgCode") == "wuliuchuyunzhongxin" || getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+    if(getCookie("orgCode") == "wuliuchuyunzhongxin" || getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "chengyunshang"){
         this.show = true
     }
     if(getCookie("orgCode") == "chengyunshang"){
@@ -118,30 +118,30 @@ export default {
       this.axios.delete("pass/v1/sysusers/" + userId) .then((res) => {
       });
     },
-    deleteCapacity(capacityId) {
-        if(getCookie("orgCode") == "wuliuchuyunzhongxin" || getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.$confirm('是否删除?', '提示', {
+    deleteCapacity(row) {
+      console.log("row",row)
+      let map = {
+        carrierSSOId : getCookie("userId"),
+        capacityId : row.capacityId
+      }
+        if(getCookie("orgCode") == "wuliuchuyunzhongxin" || getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "chengyunshang"){
+          this.$confirm('是否删除与车牌号('+row.capacityNumber+')的绑定关系?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning',
         }).then(() => {
           this.axios
-          .post("/api/v1/rms/deleteCapacity/" + capacityId)
+          .post("/api/v1/rms/deleteCapacityCarrier",map)
           .then((res) => {
-            if (res.data.code == "200") {
-              console.log(res.data.data)
-              this.deleteUser(res.data.data)
-              this.$message({
-                type: "success",
-                message: "删除成功!",
-              });    
-              this.tableloading = true;
-              this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ null + "&i=" + new Date(); 
-            } else {
-              this.$message({
-                message: "删除失败",
-                type: "warning",
-              });
+            if(res.data.code=='0'){
+              this.$message.success("删除成功!")
+              if(getCookie("orgCode") == "chengyunshang"){
+                this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ getCookie("userId") +"&i="+new Date();
+              }else if(getCookie("orgCode") == "baohua"){
+                this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
+              }else{
+                this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + null +"&i="+new Date();
+              } 
             }
           });
         }).catch(() => {
@@ -151,7 +151,7 @@ export default {
           });          
         });
         }else{
-          this.$message.error("!权限不足,请联系管理员")
+          this.$message.error("权限不足,请联系管理员!")
         }  
       },
     },

+ 26 - 14
src/views/appoint/components/saleContract/addSaleOrderCoproductSend.vue

@@ -23,7 +23,7 @@
           <span class="text">派车数</span>
           <el-input v-model="carNumber"></el-input>
           <span class="text">每车重量</span>
-          <el-input v-model="uniteOrderPlanWeight"></el-input>
+          <el-input v-model="uniteOrderPlanWeight" disabled></el-input>
           <span class="text">截止日期</span>
           <el-date-picker type="date" v-model="uniteSaleDateOfReceipt" style="width:150px"></el-date-picker>
           <el-button type="primary" @click="AddTruckClick" style="margin-top: 10px;">确定</el-button>
@@ -105,6 +105,7 @@
                   @input="onInput"
                   placeholder="(必填)"
                   v-model.number="scope.row.orderPlanWeight"
+                  disabled
                 ></el-input>
               </template>
 
@@ -271,7 +272,6 @@
       :wrapperClosable="false"
       modal
       close-on-press-escape
-    
     >
     
     <el-input v-model="addresText" placeholder="请输入内容" style="margin-top: 10px; margin-left: 20px; width: 250px"></el-input>
@@ -352,7 +352,7 @@ export default {
       //统一截止日期
       uniteSaleDateOfReceipt:null,
       //统一每车重量
-      uniteOrderPlanWeight:null,
+      uniteOrderPlanWeight:60,
       //线路名称
       lineName:null,
       lineId:null,
@@ -519,10 +519,12 @@ export default {
     //校验是否为车牌
     isVehicleNumber(vehicleNumber) {
       var result = false;
-      if (vehicleNumber.length == 7) {
-        var express =
-          /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
-        result = express.test(vehicleNumber);
+      if(vehicleNumber!=null){
+        if (vehicleNumber.length == 7) {
+          var express =
+            /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
+          result = express.test(vehicleNumber);
+        }
       }
       return result;
     },
@@ -678,12 +680,16 @@ export default {
 
     //点击确定按钮的事件
     makeSure(){
+      //获取当前派车的数量和预估吨位的总和
+      var sendCount = this.selectionList.length*this.uniteOrderPlanWeight;
       //判断是否达到95%
-      var canDo = (this.totalWeight/this.number).toFixed(2);
+      var canDo = ((this.totalWeight+sendCount)/this.number).toFixed(2);
       if(canDo>0.95){
-        this.$message.error('当前已派发吨数接近订单总吨数,不可继续派单!')
+        var canSend = Math.floor(((this.number*0.95)-this.totalWeight)/this.uniteOrderPlanWeight);
+        this.$message.error('当前已派发吨数接近订单总吨数,最多还可派 ('+canSend+') 辆车!')
       }else{
         let state = false;
+        var beReady = 0;
           this.selectionList.forEach((e)=>{
             if(!isNumber(e.orderPlanWeight)){   //判定重量合法
               this.$message.error('重量请输入数字')
@@ -707,6 +713,9 @@ export default {
             if(isIntegerNumber(e.carrierName)){
               e.carrierId = e.carrierName
             }
+            if(e.capacityNumber){
+              beReady++;
+            }
           })
           if(state){
             //校验是否自提,是自提,则运输单价必选,非自提,运输单价为空
@@ -715,11 +724,11 @@ export default {
                 e.priceValue = null;
                 e.priceId = null;
               })
-              this.sendRequest();
+              this.sendRequest(beReady);
             }else{
               //判断是否全部完成运输单价的选择
               if(this.choosePriceCount==this.selectionList.length){
-                this.sendRequest();
+                this.sendRequest(beReady);
               }else{
                 this.$message.warning('还有运输单价未被选定!')
               }
@@ -730,8 +739,9 @@ export default {
       } 
     },
     //发送请求
-    sendRequest(){
-      this.axios.post('/api/v1/ams/dispatchTruckOrderBySale',{
+    sendRequest(beReady){
+      if(beReady==this.selectionList.length){
+        this.axios.post('/api/v1/ams/dispatchTruckOrderBySale',{
           saleOrderId:this.$route.params.saleOrderId,
           mapList:this.selectionList,
         }).then((res)=>{
@@ -764,9 +774,11 @@ export default {
                 message: "取消派车!",
               });
             });
-
           }
         })
+      } else{
+        this.$message.error('还有车牌号未填写!')
+      }
     },
     //点击取消按钮的事件
     cancel(){

+ 28 - 14
src/views/appoint/components/saleContract/addSaleOrderCoproductSendCarrier.vue

@@ -23,7 +23,7 @@
           <span class="text">派车数</span>
           <el-input v-model="carNumber"></el-input>
           <span class="text">每车重量</span>
-          <el-input v-model="uniteOrderPlanWeight"></el-input>
+          <el-input v-model="uniteOrderPlanWeight" disabled></el-input>
           <span class="text">截止日期</span>
           <el-date-picker type="date" v-model="uniteSaleDateOfReceipt" style="width:150px"></el-date-picker>
           <el-button type="primary" @click="AddTruckClick" style="margin-top: 10px;">确定</el-button>
@@ -105,6 +105,7 @@
                   @input="onInput"
                   placeholder="(必填)"
                   v-model.number="scope.row.orderPlanWeight"
+                  disabled
                 ></el-input>
               </template>
 
@@ -352,7 +353,7 @@ export default {
       //统一截止日期
       uniteSaleDateOfReceipt:null,
       //统一每车重量
-      uniteOrderPlanWeight:null,
+      uniteOrderPlanWeight:60,
       //线路名称
       lineName:null,
       lineId:null,
@@ -512,7 +513,6 @@ export default {
       this.axios
       .post("/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con="+'销售副产品单拼路线')
       .then((res)=>{
-        console.log("res.data.data.list[0].lineName",res.data.data.list[0].lineName)
         this.lineName = res.data.data.list[0].lineName +"  "+ res.data.data.list[0].lineDesk;
         this.lineId = res.data.data.list[0].lineId;
       });
@@ -520,10 +520,12 @@ export default {
     //校验是否为车牌
     isVehicleNumber(vehicleNumber) {
       var result = false;
-      if (vehicleNumber.length == 7) {
-        var express =
-          /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
-        result = express.test(vehicleNumber);
+      if(vehicleNumber!=null){
+        if (vehicleNumber.length == 7) {
+          var express =
+            /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
+          result = express.test(vehicleNumber);
+        }
       }
       return result;
     },
@@ -677,11 +679,16 @@ export default {
 
     //点击确定按钮的事件
     makeSure(){
-      var canDo = (this.totalWeight/this.number).toFixed(2);
+      //获取当前派车的数量和预估吨位的总和
+      var sendCount = this.selectionList.length*this.uniteOrderPlanWeight;
+      //判断是否达到95%
+      var canDo = ((this.totalWeight+sendCount)/this.number).toFixed(2);
       if(canDo>0.95){
-        this.$message.error('当前已派发吨数接近订单总吨数,不可继续派单!')
+        var canSend = Math.floor(((this.number*0.95)-this.totalWeight)/this.uniteOrderPlanWeight);
+        this.$message.error('当前已派发吨数接近订单总吨数,最多还可派 ('+canSend+') 辆车!')
       }else{
         let state = false;
+        var beReady = 0;
         this.selectionList.forEach((e)=>{
           if(!isNumber(e.orderPlanWeight)){   //判定重量合法
             this.$message.error('重量请输入数字')
@@ -705,6 +712,9 @@ export default {
           if(isIntegerNumber(e.carrierName)){
             e.carrierId = e.carrierName
           }
+          if(e.capacityNumber){
+              beReady++;
+          }
         })
         if(state){
           //校验是否自提,是自提,则运输单价必选,非自提,运输单价为空
@@ -713,11 +723,11 @@ export default {
               e.priceValue = null;
               e.priceId = null;
             })
-            this.sendRequest();
+            this.sendRequest(beReady);
           }else{
             //判断是否全部完成运输单价的选择
             if(this.choosePriceCount==this.selectionList.length){
-              this.sendRequest();
+              this.sendRequest(beReady);
             }else{
               this.$message.warning('还有运输单价未被选定!')
             }
@@ -729,11 +739,12 @@ export default {
       
     },
     //发送请求
-    sendRequest(){
-      this.axios.post('/api/v1/ams/dispatchTruckOrderBySale',{
+    sendRequest(beReady){
+      if(beReady==this.selectionList.length){
+          this.axios.post('/api/v1/ams/dispatchTruckOrderBySale',{
           saleOrderId:this.$route.params.saleOrderId,
           mapList:this.selectionList,
-        }).then((res)=>{
+          }).then((res)=>{
           if(res.data.code == '200'){
             this.$message.success('派车成功')
             this.cancel();
@@ -766,6 +777,9 @@ export default {
 
           }
         })
+      }else{
+        this.$message.error('还有车牌号未填写!')
+      }
     },
     //点击取消按钮的事件
     cancel(){

+ 7 - 3
src/views/sale/components/transport_order/receiveOrder.vue

@@ -33,7 +33,7 @@
         <el-tabs v-model="activeName">
           <!-- 未接收 -->
           <el-tab-pane label="未接收" name="third">
-            <dilTable v-bind.sync="option3" @selection-change="selectionChange" ref="table2">
+            <dilTable v-bind.sync="option3" @selection-change="selectionChange" ref="table2" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
               <el-table-column fixed="right" label="操作" width="180">
                 <template slot-scope="scope">
                   <el-button
@@ -82,7 +82,7 @@
           </el-tab-pane>
           <!-- 已接收 -->
           <el-tab-pane label="已接收" name="first">
-            <dilTable v-bind.sync="option1" ref="table">
+            <dilTable v-bind.sync="option1" ref="table" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
               <el-table-column fixed="right" label="操作" width="50">
                 <template slot-scope="scope">
                   <el-button
@@ -117,7 +117,7 @@
           </el-tab-pane>
           <!-- 已拒绝 -->
           <el-tab-pane label="已拒绝" name="second">
-            <dilTable v-bind.sync="option2" ref="table1">
+            <dilTable v-bind.sync="option2" ref="table1" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
               <el-table-column fixed="right" label="操作" width="50">
                 <template slot-scope="scope">
                   <el-button
@@ -158,6 +158,10 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
+      shiyHeigth:140,
+      isHeigth:true,
+      pageSize:100,
+      isKuang:false,
       inputTruck:null,
       inputText: "",
       option1: {