zouzhd před 3 roky
rodič
revize
8099d95bc3

+ 1 - 1
build/utils.js

@@ -16,7 +16,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 let devModules = ['all'];
-// let devModules = ['index','appoint','TMS','statisticalReport','RMS','systemConfig'];
+// let devModules = ['index','appoint','sale','TMS','statisticalReport'];
 // let devModules = ['index','appoint','TMS'];
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;

+ 1 - 1
config/index.js

@@ -58,7 +58,7 @@ let proxyTable = {
   "/api/v1": {
     target: "http://172.16.33.166:8080",
     // target: "http://192.168.1.102:8019",
-    // target: "http://localhost:8019",
+    // target: "http://192.168.1.112:8019",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 1 - 0
src/components/DilCommonUI/packages/table/src/table.js

@@ -43,6 +43,7 @@ export default {
   methods: {
     getHeight(){
       this.height = window.innerHeight - this.shiyHeigth;
+      console.log(this.height);
     },
     //计算合计列
     getSummaries(columns,data) {

+ 23 - 0
src/views/RMS/components/oilPrice.vue

@@ -103,12 +103,35 @@ export default {
           if(res.data.code == "200"){
             this.$message.success('删除成功')
             this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&i="+ new Date();
+          }else{
+            this.$message.error('删除失败,该油价正在启用!')
+            this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&i="+ new Date();
           }
         })
       }).catch(() => {
         this.$message.info('已取消删除');       
       });
     },
+    onEnable(scope){
+      this.$confirm('将要启用该油价, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.axios.post("/api/v1/rms/updateOilPrice/"+scope.row.priceId).then((res) => {
+          if (res.data.code == "200") {
+            this.$message({ type: "success", message: "启用成功!",});
+            this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&i="+ new Date();
+          }else{
+            this.$message({ type: "error", message: "启用失败,请联系管理员!",});
+          }
+          
+        }); 
+      }).catch(() => {
+        this.$message.info('已取消启用该油价!');       
+      });
+        
+    }
   },
 }
 </script>

+ 176 - 75
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

@@ -65,10 +65,7 @@
     </div>
     <div class="lineId from">
       <span class="text">该批车辆是否一车多趟:</span>
-      <el-switch
-        v-model="isMoreTrips"
-        active-text="是"
-        inactive-text="否">
+      <el-switch v-model="isMoreTrips" active-text="是" inactive-text="否">
       </el-switch>
     </div>
     <div class="truckListTable">
@@ -118,7 +115,7 @@
     </div>
     <!-- 模态窗口 -->
     <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
-      <div style="margin-bottom: 10px">
+      <div class="drawer_top">
         <el-input
           placeholder="请输入内容"
           v-model="input"
@@ -129,12 +126,14 @@
           <i class="el-icon-search"></i>查询
         </el-button>
       </div>
-      <div v-show="onDrawerNumber == 1">
+      <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>
@@ -144,6 +143,8 @@
           @radio-change="currentRadioChange2"
           :isKuang="isKuang"
           @func="func"
+          :isHeigth="isHeigth1"
+          :shiyHeigth="shiyHeigth1"
           :drawer="drawer"
         ></dilTable>
       </div>
@@ -153,6 +154,8 @@
           @selection-change="currentRadioChange3"
           :isKuang="isKuang"
           @func="func"
+          :isHeigth="isHeigth2"
+          :shiyHeigth="shiyHeigth2"
           :drawer="drawer"
         ></dilTable>
       </div>
@@ -162,6 +165,8 @@
           @radio-change="currentRadioChange4"
           :isKuang="isKuang"
           @func="func"
+          :isHeigth="isHeigth3"
+          :shiyHeigth="shiyHeigth3"
           :drawer="drawer"
         ></dilTable>
       </div>
@@ -171,6 +176,8 @@
           @radio-change="currentRadioChange5"
           :isKuang="isKuang"
           @func="func"
+          :isHeigth="isHeigth4"
+          :shiyHeigth="shiyHeigth4"
           :drawer="drawer"
         ></dilTable>
       </div>
@@ -180,6 +187,8 @@
           @radio-change="currentRadioChange6"
           :isKuang="isKuang"
           @func="func"
+          :isHeigth="isHeigth5"
+          :shiyHeigth="shiyHeigth5"
           :drawer="drawer"
         ></dilTable>
       </div>
@@ -198,10 +207,28 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      isKuang:false,
+      //限定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,
+      purchaseOrderNo: "",
+      isMoreTrips: false,
       //订单类别
       orderTypeList: [
         {
@@ -270,7 +297,7 @@ export default {
         mapList1: [],
       },
       secend: {
-        requestUrl:"",
+        requestUrl: "",
         selectionType: "radio",
         mapList2: [],
       },
@@ -287,10 +314,10 @@ export default {
         requestUrl: "",
         selectionType: "radio",
       },
-      purchaseOrder:{
+      purchaseOrder: {
         requestUrl: "",
         selectionType: "radio",
-      }
+      },
     };
   },
   watch: {
@@ -340,11 +367,11 @@ export default {
               console.log();
               this.remark = res.data.data.remark;
               this.purchaseOrderId = res.data.data.purchaseOrderId;
-              this.purchaseOrderNo=res.data.data.purchaseOrderNo;
+              this.purchaseOrderNo = res.data.data.purchaseOrderNo;
               if (res.data.data.receiveUnitId == 1) {
-                this.orderType = 17;
+                this.orderType = 6;
               } else {
-                this.orderType = 18;
+                this.orderType = 7;
               }
             }
           } else {
@@ -354,67 +381,127 @@ export default {
       }
     },
     onclick() {
-      if(this.input){
+      if (this.input) {
         this.isKuang = true;
         if (this.onDrawerNumber == 1) {
-          this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" + this.input;
+          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;
+          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;
+            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;
+            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;
+          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();
+          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{
+      } else {
         if (this.onDrawerNumber == 1) {
-          this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&i="+new Date();
+          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();
+          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();
+            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();
+            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();
+          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();
+          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.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;
+      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();
+          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();
+          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();
+        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&i=" + new Date();
-      }else if (num == 6) {
-        this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId="+ this.supplierId+"&i=" + new Date();
+        this.line.requestUrl =
+          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
+      } else if (num == 6) {
+        this.purchaseOrder.requestUrl =
+          "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId=" +
+          this.supplierId +
+          "&i=" +
+          new Date();
       }
     },
     // 返回
@@ -440,7 +527,7 @@ export default {
       this.lineId = selection.lineId;
     },
     currentRadioChange6(selection) {
-      console.log(selection)
+      console.log(selection);
       if (selection.shipperId == 1) {
         this.orderType = 6;
       } else {
@@ -457,8 +544,8 @@ export default {
       this.selectionList = [];
       this.selectionList = selection;
     },
-    func(res){
-      console.log(res)
+    func(res) {
+      console.log(res);
       this.isKuang = false;
     },
     // 确认
@@ -479,31 +566,37 @@ export default {
             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) {
@@ -511,7 +604,7 @@ export default {
           message: "请选择车辆!",
           type: "warning",
         });
-        state = 0;
+        return;
       } else {
         this.selectionList.forEach((e) => {
           if (e.orderMaterialWeight) {
@@ -523,44 +616,39 @@ export default {
                   message: "重量只能是整数!",
                   type: "warning",
                 });
-                state = 0;
+                return;
               }
             } else {
               this.$message({
                 message: "重量只能是数字!",
                 type: "warning",
               });
-              state = 0;
+              return;
             }
-          } else {
-            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: 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: this.orderType,
-          lineId: this.lineId,
-          isMoreTrips:this.isMoreTrips,
-        };
-        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("/transportationReservation");
-          }
-        });
-      }
+      this.axios.post("/api/v1/oms/addPurOrder", map).then((res) => {
+        if (res.data.code == "200") {
+          this.$message({
+            message: "添加成功!",
+            type: "success",
+          });
+          this.$router.push("/transportReserveRan");
+        }
+      });
     },
   },
 };
@@ -569,6 +657,10 @@ export default {
 .contractDetails {
   width: 100%;
 }
+
+.el-drawer__container ::-webkit-scrollbar {
+  display: none;
+}
 .from {
   display: flex;
   align-items: center;
@@ -601,7 +693,7 @@ export default {
     width: 250px;
     margin-right: 20px;
   }
-  .span{
+  .span {
     display: inline-block;
     width: 70px;
     height: 1px;
@@ -680,6 +772,15 @@ export default {
     }
   }
 }
+.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;

+ 58 - 12
src/views/TMS/components/purchaseChemicalMaterials/transportationReservationAdd.vue

@@ -118,7 +118,7 @@
     </div>
     <!-- 模态窗口 -->
     <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
-      <div style="margin-bottom: 10px">
+      <div class="drawer_top">
         <el-input
           placeholder="请输入内容"
           v-model="input"
@@ -129,12 +129,14 @@
           <i class="el-icon-search"></i>查询
         </el-button>
       </div>
-      <div v-show="onDrawerNumber == 1">
+      <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>
@@ -144,6 +146,8 @@
           @radio-change="currentRadioChange2"
           :isKuang="isKuang"
           @func="func"
+          :isHeigth="isHeigth1"
+          :shiyHeigth="shiyHeigth1"
           :drawer="drawer"
         ></dilTable>
       </div>
@@ -153,6 +157,8 @@
           @selection-change="currentRadioChange3"
           :isKuang="isKuang"
           @func="func"
+          :isHeigth="isHeigth2"
+          :shiyHeigth="shiyHeigth2"
           :drawer="drawer"
         ></dilTable>
       </div>
@@ -162,6 +168,8 @@
           @radio-change="currentRadioChange4"
           :isKuang="isKuang"
           @func="func"
+          :isHeigth="isHeigth3"
+          :shiyHeigth="shiyHeigth3"
           :drawer="drawer"
         ></dilTable>
       </div>
@@ -171,6 +179,8 @@
           @radio-change="currentRadioChange5"
           :isKuang="isKuang"
           @func="func"
+          :isHeigth="isHeigth4"
+          :shiyHeigth="shiyHeigth4"
           :drawer="drawer"
         ></dilTable>
       </div>
@@ -180,6 +190,8 @@
           @radio-change="currentRadioChange6"
           :isKuang="isKuang"
           @func="func"
+          :isHeigth="isHeigth5"
+          :shiyHeigth="shiyHeigth5"
           :drawer="drawer"
         ></dilTable>
       </div>
@@ -198,6 +210,25 @@ 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,
       isKuang:false,
       //采购订单号
       purchaseOrderNo:'',
@@ -479,39 +510,46 @@ export default {
             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) {
         this.$message({
           message: "请选择车辆!",
           type: "warning",
         });
-        state = 0;
+        return;
       } else {
         this.selectionList.forEach((e) => {
           if (e.orderMaterialWeight) {
@@ -523,22 +561,19 @@ export default {
                   message: "重量只能是整数!",
                   type: "warning",
                 });
-                state = 0;
+                return;
               }
             } else {
               this.$message({
                 message: "重量只能是数字!",
                 type: "warning",
               });
-              state = 0;
+              return;
             }
-          } else {
-            state = 1;
-          }
+          } 
         });
       }
-
-      if (state == 1) {
+      //发送请求
         let map = {
           materialId: this.materialId,
           supplierId: this.supplierId,
@@ -550,7 +585,6 @@ export default {
           lineId: this.lineId,
           isMoreTrips:this.isMoreTrips,
         };
-        console.log(map, map);
         this.axios.post("/api/v1/oms/addPurOrder", map).then((res) => {
           if (res.data.code == "200") {
             this.$message({
@@ -560,7 +594,7 @@ export default {
             this.$router.push("/transportationReservation");
           }
         });
-      }
+
     },
   },
 };
@@ -569,6 +603,9 @@ export default {
 .contractDetails {
   width: 100%;
 }
+.el-drawer__container ::-webkit-scrollbar {
+  display: none;
+}
 .from {
   display: flex;
   align-items: center;
@@ -680,6 +717,15 @@ export default {
     }
   }
 }
+.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;

+ 64 - 25
src/views/appoint/components/saleContract/addSaleOrderSend.vue

@@ -73,11 +73,11 @@
                 ></el-input>
               </template>
 
-              <!-- 收货地址id -->
-              <template v-if="item.prop == 'saleShipperAddressName'" >
+              <!-- 运输单价id -->
+              <template v-if="item.prop == 'priceValue'" >
                 <el-input
                   style="width: 200px"
-                  v-model="scope.row.saleShipperAddressName"
+                  v-model="scope.row.priceValue"
                   disabled
                 >
                 </el-input>
@@ -88,7 +88,7 @@
                   >浏览</el-button
                 >
               </template>
-              <!-- 收货日期 -->
+              <!-- 截止日期 -->
               <template v-if="item.prop == 'saleDateOfReceipt'">
                  <el-date-picker
                   class="textinput3"
@@ -227,12 +227,12 @@
         ></dilTable>
       </div>
     </el-drawer>
-    <!-- 收货地址的模态框 -->
+    <!-- 运输单价的模态框 -->
     <el-drawer 
       :visible.sync="addressDrawer" 
       :destroy-on-close="false"
       direction="rtl"
-      size="40%"
+      size="70%"
       :wrapperClosable="false"
       modal
       close-on-press-escape
@@ -262,9 +262,9 @@
         <i class="el-icon-check"></i>确定
       </el-button>
       <div class="tablecls">
-        <!-- 查询所有的收货地址 -->
+        <!-- 查询所有的运输单价 -->
         <dilTable
-          v-bind.sync="Address"
+          v-bind.sync="Price"
           @radio-change="currentRadioChange2"
         ></dilTable>
       </div>
@@ -320,7 +320,7 @@ export default {
       drawer:false,
       //是否打开选择车辆的模态框
       truckDrawer:false,
-      //是否打开收货地址的模态框
+      //是否打开运输单价的模态框
       addressDrawer:false,
       //线路的表格
       line: {
@@ -332,9 +332,9 @@ export default {
         requestUrl: "",
         selectionType: "select",
       },
-      //收货地址的表格
-      Address: {
-        requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
+      //运输单价的表格
+      Price: {
+        requestUrl: "/api/v1/ams/getAmsContractTransportPrice1?apiId=109&deleted=0",
         selectionType: "radio",
       },
       addressText:null,
@@ -374,11 +374,17 @@ export default {
           slot: true,
         },
         {
-          prop: "saleShipperAddressName",
-          label: "收货地址",
+          prop: "priceValue",
+          label: "运输单价",
           width: "300",
           slot: true,
         },
+        // {
+        //   prop: "saleShipperAddressName",
+        //   label: "收货地址",
+        //   width: "300",
+        //   slot: true,
+        // },
         {
           prop: "saleOrderConsignee",
           label: "收货客户",
@@ -399,8 +405,8 @@ export default {
       saleMaterialId:null,
       //记录点击的市哪一个收货地址的浏览
       addressIndex:null,
-      //缓存当前选中的收货地址
-      addressMap:{},
+      //缓存当前选中的运输单价
+      priceMap:{},
     };
   },
   created() {
@@ -441,15 +447,42 @@ export default {
           e.saleDateOfReceipt = sjTime(e.saleDateOfReceipt)
         }
       })
-      
       if(state){
         this.axios.post('/api/v1/ams/dispatchTruckOrderBySale',{
           saleOrderId:this.$route.params.saleOrderId,
           mapList:this.selectionList,
         }).then((res)=>{
+          console.log("res",res)
           if(res.data.code == '200'){
             this.$message.success('派车成功')
             this.cancel();
+          }else{
+            //若该销售订单的净重已达到97%!
+            this.$confirm("该销售订单的净重已达到97%! 是否仍然派车", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+              center: true,
+            })
+            .then(() => {
+              this.axios.post('/api/v1/ams/dispatchTruckOrderBySale',{
+              saleOrderId:this.$route.params.saleOrderId,
+              sendAgain:1,
+              mapList:this.selectionList,
+              }).then((res)=>{
+                  if(res.data.code == '200'){
+                  this.$message.success('派车成功')
+                  this.cancel();
+                }
+              });
+            })
+            .catch(() => {
+              this.$message({
+                type: "info",
+                message: "取消派车!",
+              });
+            });
+
           }
         })
       }else{
@@ -483,7 +516,8 @@ export default {
             saleMaterialId:row.saleMaterialId,
             saleOrderConsignee:row.saleOrderConsignee,
             saleOrderConsigneeTel:row.saleOrderConsigneeTel,
-            saleShipperAddressName:row.saleShipperAddressName,
+            priceValue:row.priceValue,
+            priceId:row.priceId,
             saleShippingAddressId:row.saleShippingAddressId,
           }
           )
@@ -496,12 +530,13 @@ export default {
     },
     //收货地址模态窗口的框计算
     selectAddressClick(){
-      this.Address.requestUrl = '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con='+this.addressText;
+      this.Price.requestUrl = '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con='+this.addressText;
     },
-    //收货地址模态窗口的点击事件
+    //运输单价模态窗口的点击事件
     addAddressClick(){
-      this.selectionList[this.addressIndex].saleShipperAddressName = this.addressMap.address
-      this.selectionList[this.addressIndex].saleShippingAddressId = this.addressMap.addressId
+      //priceMap
+      this.selectionList[this.addressIndex].priceValue = this.priceMap.priceValue
+      this.selectionList[this.addressIndex].priceId = this.priceMap.priceId
       this.addressDrawer = false;
       let arr = this.selectionList;
       this.selectionList = [];
@@ -511,6 +546,7 @@ export default {
           capacityId:e.capacityId,
           capacityNumber:e.capacityNumber,
           carrierName:e.carrierName,
+          carrierId:e.carrierId,
           lineId:e.lineId,
           lineName:e.lineName,
           materialId:e.materialId,
@@ -520,7 +556,8 @@ export default {
           saleMaterialId:e.saleMaterialId,
           saleOrderConsignee:e.saleOrderConsignee,
           saleOrderConsigneeTel:e.saleOrderConsigneeTel,
-          saleShipperAddressName:e.saleShipperAddressName,
+          priceValue:e.priceValue,
+          priceId:e.priceId,
           saleShippingAddressId:e.saleShippingAddressId,
         })
       })
@@ -532,17 +569,19 @@ export default {
     },
     //收货地址模态框单选选中的事件
     currentRadioChange2(val){
-      this.addressMap = {};
-      this.addressMap = val;
+      this.priceMap = {};
+      this.priceMap = val;
     },
     //车辆模态框的确定事件
     AddTruckClick(){
+
       if(this.selectTruck.length>0){
       this.selectTruck.forEach(e => {
         this.selectionList.push({
           //销售订单与物资表主键
           saleMaterialId:this.saleMaterialId,
           capacityId:e.capacityId,
+          carrierId:e.carrierId,
           capacityNumber:e.capacityNumber,
           carrierName:e.carrierName,
           materialName:this.materialName,

+ 1 - 0
src/views/appoint/components/saleContract/addTransportPrice.vue

@@ -144,6 +144,7 @@ export default {
       form1: {
         priceDate:new Date(),
         oilTypeId:10,
+        capacityTypeId:1
       },
       //提交给后端的数据
       // map:{},

+ 21 - 3
src/views/appoint/components/saleContract/transportPrice.vue

@@ -11,7 +11,11 @@
       </el-button>
        <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
     </div>
-    <dilTable ref="excelDom" v-bind.sync="option" :loading="loading" :isKuang="isKuang" @func="func">
+
+<el-tabs v-model="activeName" @tab-click="handleClick">
+      <!-- 正在启用 -->
+       <el-tab-pane label="正在启用" name="first">
+          <dilTable ref="excelDom" v-bind.sync="option" :loading="loading" :isKuang="isKuang" @func="func">
       <!-- <el-table-column fixed="right" label="操作" width="200">
         <template slot-scope="scope">
           <el-button @click="click(scope.row.priceId)" type="text" size="small"
@@ -25,7 +29,15 @@
           >
         </template>
       </el-table-column> -->
-    </dilTable>
+        </dilTable>
+      </el-tab-pane>
+      <!-- 历史启用 -->
+      <el-tab-pane label="历史启用" name="second">
+          <dilTable ref="excelDom" v-bind.sync="option2" :loading="loading" :isKuang="isKuang" @func="func">
+          </dilTable>
+      </el-tab-pane>
+      
+    </el-tabs>
   </div>
 </template>
 <script>
@@ -33,13 +45,19 @@ export default {
   name: "TransportPrice",
   data() {
     return {
+      activeName: "first",
       isKuang:false,
       loading:false,
       input: "",
       option: {
         // 表格请求数据的地址
         requestUrl:
-          "/api/v1/ams/getAmsContractTransportPrice1?apiId=109",
+          "/api/v1/ams/getAmsContractTransportPrice1?apiId=109&deleted=0",
+      },
+      option2: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getAmsContractTransportPrice1?apiId=109&deleted=1",
       },
       tableTitle:'汽运单价'
     };

+ 30 - 2
src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelNewMonitor.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
-      <span>进厂时间:</span>
+      <span>计毛时间:</span>
       <el-date-picker
         v-model="startTime"
         type="date"
@@ -19,9 +19,17 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
+      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+      <span style="margin-left: 1rem;">合计净重:</span>
+      <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input>
+      <span style="margin-left: 1rem;">合计车数:</span>
+      <el-input v-model="totalCapacity" :disabled="true" style="width: 150px;"></el-input>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="option"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
     </div>
   </div>
 </template>
@@ -36,9 +44,29 @@ export default {
       },
       startTime: null,
       endTime: null,
+      //合计净重
+      totalNumber: 0,
+      //合计车数
+      totalCapacity: 0,
+      tableTitle:'采购燃料新区统计报表'
     };
   },
   methods: {
+    refresh(){
+      this.$router.go(0);
+    },
+    func(res){
+      console.log(res)
+      var resultNetWeightTotal = 0
+      res.list.forEach(e => {
+        resultNetWeightTotal = resultNetWeightTotal+e.resultNetWeight
+      });
+      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t"
+      this.totalCapacity = res.total;
+      //获取总记录条数作为合计车数
+      // this.totalCapacity = res.total;
+      this.isKuang = false;
+    },
     onclick() {
       let startTime = null;
       let endTime = null;

+ 30 - 2
src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelOldMonitor.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="purchasFuelOldMonitor">
     <div class="frameCalculation">
-      <span>进厂时间:</span>
+      <span>计毛时间:</span>
       <el-date-picker
         v-model="startTime"
         type="date"
@@ -19,9 +19,17 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
+      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+      <span style="margin-left: 1rem;">合计净重:</span>
+      <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input>
+      <span style="margin-left: 1rem;">合计车数:</span>
+      <el-input v-model="totalCapacity" :disabled="true" style="width: 150px;"></el-input>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="option"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
     </div>
   </div>
 </template>
@@ -36,9 +44,29 @@ export default {
       },
       startTime: null,
       endTime: null,
+      //合计净重
+      totalNumber: 0,
+      //合计车数
+      totalCapacity: 0,
+      tableTitle:'采购燃料老区统计报表'
     };
   },
   methods: {
+    refresh(){
+      this.$router.go(0);
+    },
+    func(res){
+      console.log(res)
+      var resultNetWeightTotal = 0
+      res.list.forEach(e => {
+        resultNetWeightTotal = resultNetWeightTotal+e.resultNetWeight
+      });
+      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t"
+      this.totalCapacity = res.total;
+      //获取总记录条数作为合计车数
+      // this.totalCapacity = res.total;
+      this.isKuang = false;
+    },
     onclick() {
       let startTime = null;
       let endTime = null;

+ 30 - 2
src/views/statisticalReport/components/purchaseChemicalMaterials/purchaseChemicalMaterialsNew.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
-      <span>进厂时间:</span>
+      <span>计毛时间:</span>
       <el-date-picker
         v-model="startTime"
         type="date"
@@ -19,9 +19,17 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
+      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+      <span style="margin-left: 1rem;">合计净重:</span>
+      <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input>
+      <span style="margin-left: 1rem;">合计车数:</span>
+      <el-input v-model="totalCapacity" :disabled="true" style="width: 150px;"></el-input>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="option"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
     </div>
   </div>
 </template>
@@ -36,9 +44,29 @@ export default {
       },
       startTime: null,
       endTime: null,
+      //合计净重
+      totalNumber: 0,
+      //合计车数
+      totalCapacity: 0,
+      tableTitle:'采购化工原料新区统计报表'
     };
   },
   methods: {
+    refresh(){
+      this.$router.go(0);
+    },
+    func(res){
+      console.log(res)
+      var resultNetWeightTotal = 0
+      res.list.forEach(e => {
+        resultNetWeightTotal = resultNetWeightTotal+e.resultNetWeight
+      });
+      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t"
+      this.totalCapacity = res.total;
+      //获取总记录条数作为合计车数
+      // this.totalCapacity = res.total;
+      this.isKuang = false;
+    },
     onclick() {
       let startTime = null;
       let endTime = null;

+ 30 - 2
src/views/statisticalReport/components/purchaseChemicalMaterials/purchaseChemicalMaterialsOld.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="purchasFuelOldMonitor">
     <div class="frameCalculation">
-      <span>进厂时间:</span>
+      <span>计毛时间:</span>
       <el-date-picker
         v-model="startTime"
         type="date"
@@ -19,9 +19,17 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
+      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+      <span style="margin-left: 1rem;">合计净重:</span>
+      <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input>
+      <span style="margin-left: 1rem;">合计车数:</span>
+      <el-input v-model="totalCapacity" :disabled="true" style="width: 150px;"></el-input>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="option"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
     </div>
   </div>
 </template>
@@ -36,9 +44,29 @@ export default {
       },
       startTime: null,
       endTime: null,
+      //合计净重
+      totalNumber: 0,
+      //合计车数
+      totalCapacity: 0,
+      tableTitle:'采购化工原料老区统计报表'
     };
   },
   methods: {
+    refresh(){
+      this.$router.go(0);
+    },
+    func(res){
+      console.log(res)
+      var resultNetWeightTotal = 0
+      res.list.forEach(e => {
+        resultNetWeightTotal = resultNetWeightTotal+e.resultNetWeight
+      });
+      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t"
+      this.totalCapacity = res.total;
+      //获取总记录条数作为合计车数
+      // this.totalCapacity = res.total;
+      this.isKuang = false;
+    },
     onclick() {
       let startTime = null;
       let endTime = null;