Your Name 3 vuotta sitten
vanhempi
commit
5300114ce3

+ 1 - 1
.eslintrc.js

@@ -57,6 +57,6 @@ module.exports = {
     'no-dupe-args': 2,
     // 不能有声明后未被使用的变量或参数
     'no-unused-vars': 0,
-    "space-before-function-paren": 0
+    'space-before-function-paren': 0
   }
 };

+ 2 - 2
build/utils.js

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

+ 4 - 3
config/index.js

@@ -55,17 +55,18 @@ let proxyTable = {
     }
   },
   //抽奖结果的接口
-  "/game/v1": {
+  "/icore.icp.web/game/v1": {
     target: "http://172.16.33.166:9002",
     ws: true,
     pathRewrite: {
-      "^/game/v1": "/v1"
+      "^/icore.icp.web/game/v1": "/v1"
     }
   },
   // 所有数据的请求域名地址
   "/api/v1": {
     target: "http://172.16.33.166:8080",
-    // target: "http://192.168.1.109:8019",
+    // target: "http://192.168.1.102: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;

+ 60 - 13
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:'',
@@ -414,8 +445,9 @@ export default {
       } 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.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&i=" + new Date();
       }
+      
     },
     // 返回
     onClickCancel() {
@@ -479,39 +511,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 +562,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 +586,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 +595,7 @@ export default {
             this.$router.push("/transportationReservation");
           }
         });
-      }
+
     },
   },
 };
@@ -569,6 +604,9 @@ export default {
 .contractDetails {
   width: 100%;
 }
+.el-drawer__container ::-webkit-scrollbar {
+  display: none;
+}
 .from {
   display: flex;
   align-items: center;
@@ -680,6 +718,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;

+ 6 - 4
src/views/WMS/components/steel/steel_restack.vue

@@ -15,8 +15,8 @@
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options"> 
-      </dilTable>
+<!--       <dilTable v-bind.sync="options"> 
+      </dilTable> -->
     </div>
       <template>
         <el-tabs v-model="activeName" @tab-click="handleClick">
@@ -54,13 +54,15 @@ export default {
       inputText:"",
       first: {
         // 未分配地址
+        // 请求未下发的数据
         requestUrl:
-          "/api/v1/wms/selectRestackList?apiId=370&DistrubtionStatus=0",
+          "/api/v1/wms/selectRestackList?apiId=438&DistrubtionStatus=0",
       },
       second: {
         // second请求数据的地址
+        // 请求已下发的数据
         requestUrl:
-          "/api/v1/wms/selectRestackList?apiId=370&DistrubtionStatus=1",
+          "/api/v1/wms/selectRestackList2?apiId=440&DistrubtionStatus=1",
       },
       //默认显示待下发的标签页
       activeName: "first",

+ 162 - 20
src/views/WMS/components/steel/steel_restackAdd.vue

@@ -1,6 +1,7 @@
 // 新增倒垛作业
 <template>
     <div class="steel_restackAdd">
+        <PageTitle>返回</PageTitle>
         <div class="search">
             <div class="warehouse">
                 <span>仓库名称:</span>
@@ -36,8 +37,80 @@
                     :value="item.value">
                     </el-option>
                 </el-select>
+
+                <el-button type="primary" class="btn" @click="selectMaterial()">新增倒垛单</el-button>
             </div>
         </div>
+        <el-drawer
+            :visible.sync="table"
+            direction="rtl"
+            size="50%"
+            :show-close="false"
+            >
+            <el-button @click="open">取消</el-button>
+            <el-button type="primary" @click="makeSure1">新增</el-button>
+            <div class="warehouse">
+                <span>仓库名称:</span>
+                <el-select v-model="value1" placeholder="请选择" @change="onchange1()">
+                    <el-option
+                    v-for="(item,i) in options1"
+                    :key="i"
+                    :label="item.label"
+                    :value="item.value"
+                    >
+                    </el-option>
+                </el-select>
+            </div>
+            <div class="stack">
+                <span>垛位:</span>
+                <el-select v-model="value2" placeholder="请选择" @change ="onchange2()">
+                    <el-option
+                        v-for="(item,i) in options2"
+                        :key="i"
+                        :label="item.label"
+                        :value="item.value"
+                    >
+                    </el-option>
+                </el-select>
+            </div>
+            <div class="gradationnumber">
+                <span>层次:</span>
+                <el-select v-model="value3" placeholder="请选择" @change="onchange3()">
+                    <el-option
+                    v-for="(item,i) in options3"
+                    :key="i"
+                    :label="item.label"
+                    :value="item.value">
+                    </el-option>
+                </el-select>
+            </div>
+            <div class="stack">
+                <span>新垛位:</span>
+                <el-select v-model="value5" placeholder="请选择" @change ="onchange5()">
+                    <el-option
+                        v-for="(item,i) in options5"
+                        :key="i"
+                        :label="item.label"
+                        :value="item.value"
+                    >
+                    </el-option>
+                </el-select>
+            </div>
+            <div class="tablecls">
+                <!-- 查询所有的物资 -->
+                <dilTable v-bind.sync="option" @selection-change="selectionChange1">
+                    <!-- 操作列 -->
+                <el-table-column fixed="right" label="件数" prop="quantity" width="100">
+                <template slot-scope="scope">
+                    <el-input
+                    class="textinput1"
+                    v-model.number="scope.row.quantity"
+                    ></el-input>
+                </template>
+                </el-table-column>
+                </dilTable>
+            </div>
+        </el-drawer> 
         <div class="table" >
             <dilTable v-bind.sync="options11"  @selection-change="selectionChange"></diltable>
         </div>
@@ -55,7 +128,7 @@
                 </el-select>
             </div>
             <div class="stack">
-                <span>垛位:</span>
+                <span>垛位:</span>
                 <el-select v-model="value5" placeholder="请选择" @change ="onchange5()">
                     <el-option
                         v-for="(item,i) in options5"
@@ -71,10 +144,6 @@
          <div class="table">
             <dilTable v-bind.sync="options" ></diltable>
         </div>
-        <div class="button_box">
-            <el-button @click="cancel">取消</el-button>
-            <el-button type="primary" @click="onClickConfirm()">确定</el-button>
-        </div>
     </div>  
 </template>
 
@@ -83,13 +152,15 @@
 export default {
   data(){
     return{
+      table:false,
+      sselectionList1: [],
       form1:{},
       inputText:"",
-        options11:{
-        // first请求数据的地址
-      requestUrl: "/api/v1/wms/getWmspRestackMakeResultList?apiId=106",
-      selectionType: "select",
-      },
+      options11:{
+        // first请求数据的地址
+        requestUrl: "/api/v1/wms/getWmspRestackMakeResultList?apiId=106",
+        selectionType: "select",
+      },
       options:{
         // first请求数据的地址
       requestUrl: "/api/v1/wms/getWmspRestackMakeResultList?apiId=106",
@@ -111,7 +182,15 @@ export default {
         options5:[],
         // 选中垛位
         value5:'',
-        inf: {}
+        inf: {},
+        // 每个物资型号的件数
+        quantity:[],
+        option: {
+            // 表格请求物资型号
+            requestUrl: "/api/v1/wms/getMaterialTypeList?warehouseid="+this.value1+"&stackingId="+this.value2+"&gradtionNumber="+this.value3+"&apiId=437",
+            // 控制显示多选列
+            selectionType: "select",
+        },
     }
   },
     mounted(){
@@ -120,6 +199,70 @@ export default {
         this.initialization1();
     },
      methods: {
+        //  创建选择物资型号的方法
+        selectMaterial(){
+            this.table =true
+            this.option.requestUrl="/api/v1/wms/getMaterialTypeList?warehouseid="+this.value1+"&stackingId="+this.value2+"&gradtionNumber="+this.value3+"&apiId=437";
+        },
+         // 返回选中的物资信息
+        selectionChange1(selection) {
+            this.selectionList1 = [];
+            this.selectionList1 = selection;
+        },
+         // 新增倒垛单
+        makeSure1() {
+            this.table = false;
+            let maps =this.selectionList1;
+            console.log("maps",maps)
+            if(
+                maps[0]==null 
+            )this.$message.error("存在空值!");
+            else
+            this.axios
+                .post("/api/v1/wms/createRestackMakeResult?keeperId=2&beforeLevel="+this.value3+"&afterStackingId="+this.value5+"&afterWarehouseId="+this.value1+"&afterBeforeStackingId="+this.value2+"&resultRemark="+"",maps)
+                .then((res) => {
+                    if (res.data.code == 200) {
+                        this.$message({
+                        type: "success",
+                        message: "新增成功!",
+                        });
+                        this.$router.go(-1);
+                    }else{
+                        this.$message.error("新增失败,可能存在重复!");
+                    }
+                    });
+        },
+         open() {
+            if (this.selectionList1.length != 0) {
+                this.$confirm("取消会将已选择的数据清空, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+                })
+                .then(() => {
+                    this.selectionList1 = [];
+                    this.table = false;
+                })
+                .catch(() => {});
+            } else {
+                this.table = false;
+            }
+        },
+        //  添加倒垛单
+        toInsert() {
+        this.$router.push({
+          name: 'steel_restackTransfer',
+          params: {
+              mapValue:{
+                valus:"ssss",
+                cangku:this.value1,
+                 duowei:this.value2,
+                 cengci:this.value3
+              }
+              
+          }
+        })
+        },
          //初始化选择仓库垛位
      initialization(){
          this.axios.get('/api/v1/wms/selectWarehouse').then((res)=>{
@@ -149,15 +292,17 @@ export default {
         }else{
             console.log('-----')
             console.log(this.value2)
-            this.options11.requestUrl="/api/v1/wms/getWmspRestackMakeResultList?apiId=106&warehouseid="+this.value1+"&stackingId="+this.value2;        
+        //     this.options11.requestUrl="/api/v1/wms/getWmspRestackMakeResultList?apiId=106&warehouseid="+this.value1+"&stackingId="+this.value2;        
+        //     this.options.requestUrl ="/api/v1/wms/getWmspRestackMakeResultList?apiId=106&warehouseid="+this.value1+"&stackingId="+this.value2;   
+        //    console.log(this.options11.requestUrl)
             //选择仓库层次号
             this.axios.get('/api/v1/wms/selectGardationNumber?warehouseid='+this.value1+'&stackingId='+this.value2).then((res)=>{
             this.options3 = res.data.data;
-            
-            
-         })
+            console.log("层次选择"+this.options3)})
+            console.log("fasdsaf")
     }},
     onchange3(){
+        console.log("change3")
         if(this.value2 == ''||this.value1==''){
             this.$message({
                 message: '请选择仓库和垛位之后!再选择',
@@ -171,8 +316,7 @@ export default {
             "&stackingId="+this.value2+"&gradtionNumber="  + this.value3 
         }
     },
-  
-       onchange4(){
+    onchange4(){
         //  console.log(1);
         //  查询选中的仓库垛位
              this.axios.get('/api/v1/wms/selectStackingId?warehouseid='+this.value1).then((res)=>{
@@ -183,9 +327,7 @@ export default {
          })
      },
      onchange5(){
-             this.options.requestUrl = "/api/v1/wms/getWmspRestackMakeResultList?apiId=106&warehouseid="+this.value1+"&stackingId="+this.value5;    
-       
-            
+        this.options.requestUrl = "/api/v1/wms/getWmspRestackMakeResultList?apiId=106&warehouseid="+this.value1+"&stackingId="+this.value5;    
     },
 
      onclick(){

+ 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:'汽运单价'
     };

+ 203 - 35
src/views/index/components/luckDraw.vue

@@ -4,11 +4,15 @@
         <span class="text">中奖名单</span>
     </div>
     <div class="luckDraw_select">
-        <el-input v-model="form.text1" placeholder="请输入中奖姓名" clearable></el-input>
+        <el-date-picker
+            v-model="form.rflDate"
+            type="date"
+            placeholder="请选择中奖时间">
+            </el-date-picker>
         <el-button type="primary" @click="selectClick" :loading="selectLoading">
             <i class="el-icon-search"></i> 查询
         </el-button>
-        <el-button type="primary" @click="exportData()" :loading="downloadLoading">
+        <el-button type="primary" @click="menuExport" :loading="downloadLoading">
             <i class="el-icon-document"></i> 导出(Excel)
         </el-button>
     </div>
@@ -26,6 +30,7 @@
             :loading="tableLoading"
             element-tableLoading-text="玩命加载中"
             element-tableLoading-spinner="el-icon-tableLoading"
+            size="mini"
         >
             <el-table-column
                 type="index"
@@ -61,6 +66,7 @@
 
 <script>
 import luckDrawTableHead from './luckDrawTableHead'
+import { renderTime,sjTime } from '@/utils/sharedJsFile'
 export default {
     data(){
         return{
@@ -79,17 +85,15 @@ export default {
             //每页显示条目个数
             pageSize: 100,
             //每一页面的显示的条目个数数组
-            pageSizes: [50, 100, 200, 300],
+            pageSizes: [5, 100, 200, 300],
             //当前页数
             currentPage: 1,
             //表格的加载状态
             tableLoading: false,
             //查询条件
             form:{
-                text1:null,
+                rflDate:new Date()
             },
-            //后端给的数据
-            tableData1:[],
             //表格渲染的数据
             tableData:[],
             //表格的表头数据
@@ -102,32 +106,209 @@ export default {
         window.addEventListener("resize", this.getHeight);
         this.getHeight();
         this.initialization();
-        this.changeList();
     },
     methods:{
+        menuExport() {
+      if (this.tableData.length < 1) {
+        this.$message.error("当前无数据可供导出!");
+        return false;
+      }
+      let data = [];
+      let i = 0;
+      this.tableData.forEach((e)=>{
+          i++;
+            data.push({
+                '序号':i,
+                '单位':e.empDept,
+                '工号':e.empNo,
+                '姓名':e.empName,
+                '电话号码':e.cellPhoneNo,
+                '中奖等级':e.prizeDesc,
+                '中奖时间':e.rflDate,
+            })
+        })
+      // 表格标题
+      var dataTitle = this.tableTitle;
+      // 配置文件类型
+      const wopts = {
+        bookType: "xlsx",
+        bookSST: true,
+        type: "binary",
+        cellStyles: true,
+      };
+      this.downloadExl(data, wopts, dataTitle);
+    },
+    downloadExl(json, type, dataTitle) {
+      // 设置表格中cell默认的字体,居中,颜色等
+      var defaultCellStyle = {
+        // font: {
+        //     name: "宋体", sz: 11, color: { auto: 1 } ,
+        // },
+        // border: {
+        //     color: { auto: 1 },
+        //     top: { style: 'thin' },
+        //     bottom: { style: 'thin'},
+        //     left: { style: 'thin' },
+        //     right: { style: 'thin' }
+        // },
+        alignment: {
+          /// 自动换行
+          wrapText: 1,
+          // 居中
+          horizontal: "center",
+          vertical: "center",
+          indent: 0
+        },
+      };
+      var tmpdata = json[0];
+      json.unshift({});
+      var keyMap = []; // 获取keys
+      for (var k in tmpdata) {
+        keyMap.push(k);
+        json[0][k] = k;
+      }
+      var tmpdata = []; // 用来保存转换好的json
+      json
+        .map((v, i) => {
+          let data = keyMap.map((k, j) => {
+            return Object.assign(
+              {},
+              {
+                v: v[k],
+                position:
+                  (j > 25 ? this.getCharCol(j) : String.fromCharCode(65 + j)) +
+                  (i + 2),
+              }
+            );
+          });
+          return data;
+        })
+        .reduce((prev, next) => prev.concat(next))
+        .forEach(
+          (v, i) =>
+            (tmpdata[v.position] = {
+              v: v.v,
+              s: defaultCellStyle,
+            })
+        );
+      var outputPos = Object.keys(tmpdata); // 设置区域,比如表格从A1到D10
+      tmpdata["A1"] = { v: dataTitle };
+      outputPos = ["A1"].concat(outputPos);
+      tmpdata["A1"].s = {
+        font: { sz: 14, bold: true, vertAlign: true },
+        alignment: { vertical: "center", horizontal: "center" },
+      }; // <====设置xlsx单元格样式  fill: { bgColor: { rgb: "E8E8E8"}, fgColor: { rgb: "E8E8E8" } }
+      tmpdata["!merges"] = [
+        {
+          s: { c: 0, r: 0 },
+          e: { c: 6, r: 0 },
+        },
+      ]; // <====合并单元格
+      tmpdata["!cols"] = [
+        { wpx: 50 },
+        { wpx: 150 },
+        { wpx: 80 },
+        { wpx: 80 },
+        { wpx: 100 },
+        { wpx: 80 },
+        { wpx: 100 },
+      ]; // <====设置一列宽度
+
+      var tmpWB = {
+        SheetNames: ["mySheet"], // 保存的表标题
+        Sheets: {
+          mySheet: Object.assign(
+            {},
+            tmpdata, // 内容
+            {
+              "!ref": outputPos[0] + ":" + outputPos[outputPos.length - 1], // 设置填充区域
+            }
+          ),
+        },
+      };
+      var tmpDown = new Blob(
+        [
+          this.s2ab(
+            XLSX.write(
+              tmpWB,
+              // 这里的数据是用来定义导出的格式类型
+              {
+                bookType: type == undefined ? "xlsx" : type.bookType,
+                bookSST: false,
+                type: "binary",
+              },
+              { defaultCellStyle: this.defaultCellStyle }
+            )
+          ),
+        ],
+        {
+          type: "",
+        }
+      );
+      this.saveAs(
+        tmpDown,
+        this.tableTitle +
+          "." +
+          (type.bookType == "biff2" ? "xls" : type.bookType)
+      );
+    },
+    // 获取26个英文字母用来表示excel的列
+    getCharCol(n) {
+      let temCol = "",
+        s = "",
+        m = 0;
+      while (n > 0) {
+        m = (n % 26) + 1;
+        s = String.fromCharCode(m + 64) + s;
+        n = (n - m) / 26;
+      }
+      return s;
+    },
+    s2ab(s) {
+      if (typeof ArrayBuffer !== "undefined") {
+        var buf = new ArrayBuffer(s.length);
+        var view = new Uint8Array(buf);
+        for (var i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) & 0xff;
+        return buf;
+      } else {
+        var buf = new Array(s.length);
+        for (var i = 0; i != s.length; ++i) buf[i] = s.charCodeAt(i) & 0xff;
+        return buf;
+      }
+    },
+    // 下载功能
+    saveAs(obj, fileName) {
+      var tmpa = document.createElement("a");
+      tmpa.download = fileName || "未命名";
+      // 兼容ie
+      if ("msSaveOrOpenBlob" in navigator) {
+        window.navigator.msSaveOrOpenBlob(obj, this.tableTitle + ".xlsx");
+      } else {
+        tmpa.href = URL.createObjectURL(obj);
+      }
+      tmpa.click();
+      setTimeout(function () {
+        URL.revokeObjectURL(obj);
+      }, 100);
+    },
+
         getHeight(){
             this.height = window.innerHeight - 200
         },
         initialization(){
-            this.axios.get('/game/v1/rflemplotterys/').then((res)=>{
-                this.tableData1 = res.data.list
+            this.axios.get('/icore.icp.web/game/v1/rflemplotterys/?rflDate=&pageNum='+this.currentPage+'&pageSize='+this.pageSize+'&lotteryResult=1').then((res)=>{
+                this.tableData = res.data.data.list
+                this.total = res.data.data.total;
             })
-            console.log(this.tableData1)
-        //    let arr;
-        //     for(var i = 0 ;i<1000;i++){
-        //         let num = i + 1;
-        //         arr = {
-        //             prop1:'测试' + num,
-        //         }
-        //         this.tableData1.push(arr)
-        //     }
-            this.total = this.tableData1.length;
-            
         },
         //查询事件
         selectClick(){
             this.selectLoading = true;
-            
+            let Date = renderTime(sjTime(this.form.rflDate)).slice(0,10)
+            this.axios.get('/icore.icp.web/game/v1/rflemplotterys/?rflDate='+Date+'&pageNum='+this.currentPage+'&pageSize='+this.pageSize+'&lotteryResult=1').then((res)=>{
+                this.tableData = res.data.data.list
+                this.total = res.data.data.total;
+            })
             this.selectLoading = false;
         },
         //行间样式
@@ -139,20 +320,7 @@ export default {
             return 'background-color:#0C2278;color:#fff;text-align:center;height:20px'
         },
         changeList(){
-            if(this.tableData1.length){
-                this.tableData = [];
-                var x = (this.currentPage - 1) * this.pageSize;
-                var y = this.currentPage * this.pageSize;
-                if(x >= this.total){
-                    x = this.total;
-                }
-                if(y >= this.total){
-                    y = this.total
-                }
-                for(x;x<y;x++){
-                    this.tableData.push(this.tableData1[x])
-                }
-            }
+            this.initialization();
             this.tableLoading = false;
         },
         handleSizeChange(val) {

+ 6 - 6
src/views/index/components/luckDrawTableHead.js

@@ -1,19 +1,19 @@
 const luckDrawTableHead = [
     {
-        prop:'prop1',
+        prop:'empDept',
         label:'单位'
     },{
-        prop:'prop1',
+        prop:'empName',
         label:'姓名'
     },{
-        prop:'prop1',
+        prop:'empNo',
         label:'工号'
     },{
-        prop:'prop1',
+        prop:'prizeDesc',
         label:'中奖等级'
     },{
-        prop:'prop1',
-        label:'中奖时间',
+        prop:'rflDate',
+        label:'中奖日期',
         width:'220'
     }
 ]

+ 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;