luobang 3 rokov pred
rodič
commit
d9c4b065a3

+ 14 - 5
src/views/TMS/components/importedFuel/transportReserveFuAdd.vue

@@ -52,7 +52,9 @@
           <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>
+                <el-input
+                  v-model.number="scope.row.orderMaterialNumber"
+                ></el-input>
               </template>
             </template>
             <template v-else>
@@ -105,7 +107,7 @@
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
@@ -194,7 +196,8 @@ export default {
     onclick(a) {
       if (a == 1) {
         this.frist.requestUrl =
-          "/api/v1/uc/queryMaterialByLike?apiId=244&startNum=010&index=" + this.input;
+          "/api/v1/uc/queryMaterialByLike?apiId=244&startNum=010&index=" +
+          this.input;
       } else if (a == 2) {
         this.secend.requestUrl =
           "/api/v1/uc/querySupplierByLike?apiId=247&index=" + this.input;
@@ -223,7 +226,7 @@ export default {
       this.getPurchaseOrderNo();
     },
     currentRadioChange3(selection) {
-      console.log(selection,"selection");
+      console.log(selection, "selection");
       this.selectionList = [];
       this.selectionList = selection;
     },
@@ -305,7 +308,8 @@ export default {
           unloadPointId: this.form1.unloadPointId,
           orderEntryTime: sjTime(this.form1.orderEntryTime),
           driverCapacityIdList: this.selectionList,
-          orderType: 5
+          orderType: 5,
+          orgCode: getCookie("orgCode"),
         };
         // console.log("map",map);
         this.axios.post("/api/v1/oms/addPurOrder", map).then((res) => {
@@ -315,6 +319,11 @@ export default {
               type: "success",
             });
             this.$store.go(-1);
+          } else {
+            this.$message({
+              message: res.data.data,
+              type: "warning",
+            });
           }
         });
       }

+ 2 - 1
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

@@ -774,7 +774,8 @@ export default {
         driverCapacityIdList: this.selectionList,
         orderType: this.orderType,
         lineId: this.lineId,
-        isMoreTrips: this.isMoreTrips
+        isMoreTrips: this.isMoreTrips,
+        orgCode: getCookie("orgCode")
       };
 
       this.axios.post("/api/v1/oms/addPurOrder", map).then(res => {

+ 129 - 100
src/views/TMS/components/importedIngredients/transportReserveFuAddIngredients.vue

@@ -2,30 +2,34 @@
   <!-- 新增运输作业页面 -->
   <div id="contractDetails">
     <page-title>运输预约</page-title>
-     <div style="text-align: center; font-size:20px; font-weight:bold; margin-top:15px; color:green">
+    <div
+      style="
+        text-align: center;
+        font-size: 20px;
+        font-weight: bold;
+        margin-top: 15px;
+        color: green;
+      "
+    >
       <span>辅料预约界面</span>
     </div>
     <div class="supplieUnit">
-      <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-        >
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
         <el-form-item label="发货单位:">
-         <el-autocomplete
-          class="inline-input"
-          v-model="stateSupplier"
-          :fetch-suggestions="querySearchSupplier"
-          placeholder="请输入发货单位名称"
-          :trigger-on-focus="false"
-          @select="handleSelectSupplier"
-        >
-        <template slot-scope="{ item }">
-          <div class="name">{{ item.supplierName }}</div>
-        </template>
-        </el-autocomplete>
+          <el-autocomplete
+            class="inline-input"
+            v-model="stateSupplier"
+            :fetch-suggestions="querySearchSupplier"
+            placeholder="请输入发货单位名称"
+            :trigger-on-focus="false"
+            @select="handleSelectSupplier"
+          >
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.supplierName }}</div>
+            </template>
+          </el-autocomplete>
         </el-form-item>
-     </el-form>
+      </el-form>
     </div>
     <div class="material from">
       <span class="text">物资:</span>
@@ -34,7 +38,8 @@
     </div>
     <div class="remark from">
       <span class="text">船名:</span>
-      <el-input class="input" v-model="remark" @blur="onBlur" :disabled="true"> </el-input>
+      <el-input class="input" v-model="remark" @blur="onBlur" :disabled="true">
+      </el-input>
       <span class="span"></span>
     </div>
     <div class="forwardingUnit from">
@@ -68,28 +73,28 @@
       <el-switch v-model="isMoreTrips" active-text="是" inactive-text="否">
       </el-switch>
     </div>
-      <!-- 物资和装卸点以及装卸货次序 -->
+    <!-- 物资和装卸点以及装卸货次序 -->
     <div class="swtichTop">
-    <span class="titile">选择车辆前请选择物资单位!</span>
-    <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>
+      <span class="titile">选择车辆前请选择物资单位!</span>
+      <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>
     </div>
     <div class="truckListTable">
       <el-table
@@ -236,23 +241,23 @@ export default {
   data() {
     return {
       //限定first
-      isHeigth:true,
-      shiyHeigth:140,
+      isHeigth: true,
+      shiyHeigth: 140,
       //限定second
-      isHeigth1:true,
-      shiyHeigth1:140,
+      isHeigth1: true,
+      shiyHeigth1: 140,
       //限定third
-      isHeigth2:true,
-      shiyHeigth2:140,
+      isHeigth2: true,
+      shiyHeigth2: 140,
       //限定unloadPoint
-      isHeigth3:true,
-      shiyHeigth3:140,
+      isHeigth3: true,
+      shiyHeigth3: 140,
       //限定line
-      isHeigth4:true,
-      shiyHeigth4:140,
+      isHeigth4: true,
+      shiyHeigth4: 140,
       //限定purchaseOrder
-      isHeigth5:true,
-      shiyHeigth5:140,
+      isHeigth5: true,
+      shiyHeigth5: 140,
       isKuang: false,
       //采购订单号
       purchaseOrderNo: "",
@@ -285,8 +290,8 @@ export default {
       ],
       //发货单位名称
       supplierName: "",
-      stateSupplier:null,
-      restaurantsSupplier:null,
+      stateSupplier: null,
+      restaurantsSupplier: null,
       //车辆表格数据
       selectionList: [],
       // 表单
@@ -339,14 +344,14 @@ export default {
         requestUrl: "",
         selectionType: "radio",
       },
-      truckList:[]
+      truckList: [],
     };
   },
   watch: {
     drawer(val) {
       if (val) {
         this.input = null;
-      }   
+      }
     },
     value() {
       if (this.value) {
@@ -383,27 +388,37 @@ export default {
     onBlur() {
       this.getPurchaseOrderNo();
     },
-      //发货单位弹出层
-    handleSelectSupplier(item){
-      this.supplierId = item.supplierId
-      this.supplierName = item.supplierName
+    //发货单位弹出层
+    handleSelectSupplier(item) {
+      this.supplierId = item.supplierId;
+      this.supplierName = item.supplierName;
     },
     //以下是发货单位边输边查搜索
     querySearchSupplier(queryString, cb) {
-        this.axios.post('/api/v1/uc/getSupplierMesByLike?index='+this.stateSupplier).then((res)=>{
-        if(res.data.code == "200"){    
-          var restaurantsSupplier = res.data.data
-          var results = queryString ? restaurantsSupplier.filter(this.createFilterSupplier(queryString)) :restaurantsSupplier;
-          // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-      })  
-      },
+      this.axios
+        .post("/api/v1/uc/getSupplierMesByLike?index=" + this.stateSupplier)
+        .then((res) => {
+          if (res.data.code == "200") {
+            var restaurantsSupplier = res.data.data;
+            var results = queryString
+              ? restaurantsSupplier.filter(
+                  this.createFilterSupplier(queryString)
+                )
+              : restaurantsSupplier;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
     createFilterSupplier(queryString) {
-        return (restaurantsSupplier) => {
-          return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
+      return (restaurantsSupplier) => {
+        return (
+          restaurantsSupplier.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     getPurchaseOrderNo() {
       let map = {
         materialId: this.materialId,
@@ -423,9 +438,9 @@ export default {
                 type: "warning",
               });
               this.form1 = [];
-              this.purchaseOrderId = null
-              this.purchaseOrderNo = null
-              this.remark = null
+              this.purchaseOrderId = null;
+              this.purchaseOrderNo = null;
+              this.remark = null;
             } else {
               console.log();
               this.remark = res.data.data.remark;
@@ -444,7 +459,9 @@ export default {
         if (this.onDrawerNumber == 1) {
           this.frist.requestUrl =
             "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
-            this.input + "&supplierId=" + this.supplierId;
+            this.input +
+            "&supplierId=" +
+            this.supplierId;
         } else if (this.onDrawerNumber == 2) {
           this.secend.requestUrl =
             "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
@@ -485,7 +502,9 @@ export default {
         if (this.onDrawerNumber == 1) {
           this.frist.requestUrl =
             "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&i=" +
-            new Date() + "&supplierId=" + this.supplierId;
+            new Date() +
+            "&supplierId=" +
+            this.supplierId;
         } else if (this.onDrawerNumber == 2) {
           this.secend.requestUrl =
             "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
@@ -527,20 +546,22 @@ export default {
       this.isKuang = false;
     },
     ondrawer(num) {
-      if(this.supplierId == null){
-          this.$message.warning("请先选择发货单位")
-          return
+      if (this.supplierId == null) {
+        this.$message.warning("请先选择发货单位");
+        return;
       }
-      if(num != 1 && this.materialId == null){
-          this.$message.warning("请先选择物资")
-          return
+      if (num != 1 && this.materialId == null) {
+        this.$message.warning("请先选择物资");
+        return;
       }
       this.drawer = true;
       this.onDrawerNumber = num;
       if (num == 1) {
-          this.frist.requestUrl =
+        this.frist.requestUrl =
           "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
-          this.input + "&supplierId=" + this.supplierId;   
+          this.input +
+          "&supplierId=" +
+          this.supplierId;
       } else if (num == 2) {
         this.secend.requestUrl =
           "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
@@ -565,7 +586,8 @@ export default {
           "/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();
+          "/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=" +
@@ -579,7 +601,7 @@ export default {
       this.$router.push("/transportReserveRan");
     },
     currentRadioChange1(selection) {
-      this.remark = null ;
+      this.remark = null;
       this.materialName = selection.materialName;
       this.materialId = selection.materialId;
       this.getPurchaseOrderNo();
@@ -624,8 +646,7 @@ export default {
             type: "warning",
           });
           return;
-        } 
-         else if (!this.supplierId) {
+        } else if (!this.supplierId) {
           this.$message({
             message: "请选择发货单位!",
             type: "warning",
@@ -696,6 +717,7 @@ export default {
         orderType: this.orderType,
         lineId: this.lineId,
         isMoreTrips: this.isMoreTrips,
+        orgCode: getCookie("orgCode"),
       };
 
       this.axios.post("/api/v1/oms/addPurOrder", map).then((res) => {
@@ -705,6 +727,11 @@ export default {
             type: "success",
           });
           this.$router.push("/transportReserveFu");
+        } else {
+          this.$message({
+            message: res.data.data,
+            type: "warning",
+          });
         }
       });
     },
@@ -757,18 +784,18 @@ export default {
     height: 1px;
   }
 }
-.swtichTop{
+.swtichTop {
   display: flex;
   height: 40px;
   align-content: center;
   justify-content: center;
-  padding-right:20px ;
-  .titile{
+  padding-right: 20px;
+  .titile {
     color: red;
     font-size: 14px;
   }
-  .switch{
-    margin-right: -30px
+  .switch {
+    margin-right: -30px;
   }
 }
 .supplieUnit {
@@ -853,14 +880,16 @@ export default {
     }
   }
 }
-.drawer_top{
+.drawer_top {
   margin-top: -50px;
-  width: 100%;height: 60px;
+  width: 100%;
+  height: 60px;
   display: flex;
   align-items: center;
 }
-.drawer_table1{
-  width: 100%;height: 500px;
+.drawer_table1 {
+  width: 100%;
+  height: 500px;
 }
 .button_box {
   display: flex;

+ 6 - 0
src/views/TMS/components/purchaseChemicalMaterials/transportationReservationAdd.vue

@@ -636,6 +636,7 @@ export default {
           orderType: this.orderType,
           lineId: this.lineId,
           isMoreTrips:this.isMoreTrips,
+          orgCode: getCookie("orgCode")
         };
         console.log("map",map);
         this.axios.post("/api/v1/oms/addPurOrder", map).then((res) => {
@@ -645,6 +646,11 @@ export default {
               type: "success",
             });
             this.$router.push("/transportationReservation");
+          }else{
+              this.$message({
+              message: res.data.data,
+              type: "warning",
+            });
           }
         });
 

+ 3 - 0
src/views/appoint/components/saleContract/addSaleCokeSend.vue

@@ -429,10 +429,13 @@ export default {
         this.axios.post('/api/v1/ams/dispatchTruckOrderByCarrier',{
           saleOrderId:this.$route.params.saleOrderId,
           mapList:this.selectionList,
+          orgCode:getCookie("orgCode"),
         }).then((res)=>{
           if(res.data.code == '200'){
             this.$message.success('派车成功')
             this.cancel();
+          }else{
+            this.$message.warning(res.data.data)
           }
         })
       }else{

+ 2 - 1
src/views/inward/components/truckOrder/addPurInwardOrder.vue

@@ -291,7 +291,8 @@ export default {
           orderType: this.orderType,
           orderId: this.orderId,
           planId: this.planId,
-          mapList: this.selectionList
+          mapList: this.selectionList,
+          orgCode:getCookie("orgCode")
         })
         .then(res => {
           if (res.data.code == "200") {

+ 2 - 1
src/views/inward/components/truckOrder/decomposePlan.vue

@@ -340,6 +340,7 @@ export default {
           orderType:11,
           carrierId:this.carrierId,
           userId:getCookie("userId"),
+          orgCode:getCookie("orgCode"),
           mapList:this.$refs.xTable.getInsertRecords()
       };
       this.axios
@@ -353,7 +354,7 @@ export default {
             this.cancel()
             this.disabled = false
           } else {
-            this.$message.error("分解失败!");
+            this.$message.warning(res.data.data);
             this.disabled = false
           }
         });