Your Name 3 年之前
父節點
當前提交
c251e9907c

+ 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','statisticalReport','SporadicManage','RMS'];
+let devModules = ['index','statisticalReport','SporadicManage','inward'];
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;
 }

+ 2 - 3
config/index.js

@@ -56,9 +56,9 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://172.16.33.166:8080",
-    // target: "http://172.16.33.162:8019",
+    target: "http://localhost:8087",
     // target: "http://192.168.1.102:8019",
+    // target: "http://localhost:8019",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"
@@ -66,7 +66,6 @@ let proxyTable = {
   },
   "/views/api/v1": {
     target: "http://172.16.33.166:8080",
-    // target: "http://192.168.1.102:8019",
     ws: true,
     pathRewrite: {
       "^/views/api/v1": "/api/v1"

+ 1 - 0
package.json

@@ -53,6 +53,7 @@
     "vue-quill-editor": "^3.0.5",
     "vue-router": "^3.0.1",
     "vue-splitpane": "^1.0.2",
+    "vuescroll": "^4.17.3",
     "vuex": "^3.0.1",
     "vxe-table": "^3.4.12",
     "x2js": "^3.3.0",

+ 10 - 9
src/components/DilCommonUI/packages/table/src/table.js

@@ -25,6 +25,11 @@ export default {
     };
   },
   created() {
+    if(this.isHeigth){
+      window.addEventListener('resize',this.getHeight)
+      this.getHeight();
+    }
+    
     this.dataCurrentPage = this.currentPage;
     this.dataPageSize = this.pageSize;
     this.requestData();
@@ -33,9 +38,12 @@ export default {
     //行拖拽
     // this.rowDrop();
     //列拖拽
-    this.columnDrop();
+    // this.columnDrop();
   },
   methods: {
+    getHeight(){
+      this.height = window.innerHeight - this.shiyHeigth;
+    },
     //计算合计列
     getSummaries(columns,data) {
       const sums = [];
@@ -54,7 +62,7 @@ export default {
             sums[index];
            }
       });
-      console.log("净重:" + sums)
+      // console.log("净重:" + sums)
       return sums
       },
     // 通过请求获取数据
@@ -127,13 +135,6 @@ export default {
               this.$emit('func',response.data.data);
               this.refreshColumnData(d.columnData);
               this.isShow = true;
-              
-              //若父组件存在要合计的值
-              if(this.$parent.totalNumber>=0){
-                //将筛选的字段传给父组件
-                this.$parent.calculationTotalNumber(this.dataRequestQuery);
-              }
-              return d.columnData
             });
         }
       } else {

+ 6 - 3
src/components/DilCommonUI/packages/table/src/table.vue

@@ -10,7 +10,6 @@
       :row-class-name="rowClassName"
       :cell-class-name="cellClassName"
       :height="height"
-      :max-height="maxHeight"
       :highlight-current-row="highlightCurrentRow"
       @sort-change="sortChange"
       @selection-change="selectionChange"
@@ -19,7 +18,8 @@
       v-loading="loading"
       element-loading-text="玩命加载中"
       element-loading-spinner="el-icon-loading"
-      :show-summary="summary"
+      :isHeigth="isHeigth"
+      :shiyHeigth="shiyHeigth"
     >
       <!-- 多选列 -->
       <el-table-column
@@ -120,7 +120,10 @@ export default {
   name: "DilTable",
   extends: table,
   props: {
-    summary:{
+    shiyHeigth:{
+      default:null,
+    },
+    isHeigth:{
       default:false,
     },
     drawer:{

+ 1 - 1
src/config/routerBefore.js

@@ -16,7 +16,7 @@ import {
 } from '@/config/config.js';
 
 // 免登录白名单
-const whiteList = ['/', '/login', '/download', '/page404', '/dingtalkTaskMobileEnd', '/dingtalkWorkFlowMobileEnd'];
+const whiteList = ['/', '/login', '/download', '/page404', '/dingtalkTaskMobileEnd', '/dingtalkWorkFlowMobileEnd', '/luckDraw'];
 
 /**
  * 当前路由取标题

+ 1 - 1
src/views/RMS/components/addCapacity.vue

@@ -97,7 +97,7 @@ export default {
           if (res.data.code == "200") {
             console.log(res.data.data);
             var restaurants = res.data.data;
-            console.log(restaurants, "restaurants");
+            // console.log(restaurants, "restaurants");
             var results = queryString
               ? restaurants.filter(this.createFilter(queryString))
               : restaurants;

+ 38 - 1
src/views/SporadicManage/components/sporadicMaterial/transportOrder/transportOrder.vue

@@ -62,6 +62,22 @@
           <dilTable v-bind.sync="completed">
           </dilTable>
         </el-tab-pane>
+         <!-- 已拒绝 -->
+        <el-tab-pane label="已拒绝" name="refused">
+          <dilTable v-bind.sync="refused">
+            <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-button @click="ctrlZClick(scope)" type="text" size="small">
+                撤销
+              </el-button>
+            </template>
+          </el-table-column>
+          </dilTable>
+        </el-tab-pane>
       </el-tabs>
     </div> 
   </div>
@@ -96,6 +112,9 @@ export default {
       },
       completed:{
         requestUrl:"",
+      },
+      refused:{
+        requestUrl:"",
       },
        //车辆的表格
       truck: {
@@ -152,18 +171,33 @@ export default {
       if(getCookie('orgCode') == "chengyunshang"){
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + getCookie("userId") ,
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + getCookie("userId"),
-        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&carrierId=" + getCookie("userId")
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&carrierId=" + getCookie("userId"),
+        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&carrierId=" + getCookie("userId")
       }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4"
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5"
         this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2"
+        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6"
       }else{
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&userId=" + getCookie("orgCode")
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&userId=" + getCookie("orgCode")
         this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&userId=" + getCookie("orgCode")
+        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&userId=" + getCookie("orgCode")
       }
   },
   methods: {
+    //撤销已拒绝的运输订单
+    ctrlZClick(scope){
+        console.log(scope.row.orderId)
+        this.axios.post("/api/v1/oms/refuseCtrlZ",{
+          orderId:scope.row.orderId
+        }).then((res) => {
+          if(res.data.code == '200'){
+             this.$message.success("撤单成功")
+             this.getRequestUrl()
+          }
+        })
+    },
     handleClose(done){
       done()
       this.$message.info("取消修改运力")
@@ -173,14 +207,17 @@ export default {
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + getCookie("userId") + "&test=" + new Date() ,
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + getCookie("userId") + "&test=" + new Date()
         this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&carrierId=" + getCookie("userId") + "&test=" + new Date()
+        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&carrierId=" + getCookie("userId") + "&test=" + new Date()
       }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4" + "&test=" + new Date()
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5" + "&test=" + new Date()
         this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2" + "&test=" + new Date()
+        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6" + "&test=" + new Date()
       }else{
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&userId=" + getCookie("orgCode") + "&test=" + new Date()
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&userId=" + getCookie("orgCode") + "&test=" + new Date()
         this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&userId=" + getCookie("orgCode") + "&test=" + new Date()
+        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&userId=" + getCookie("orgCode") + "&test=" + new Date()
       }
     },
     getTruckRequestUrl(){

+ 35 - 26
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

@@ -32,8 +32,7 @@
     <div class="lineId from">
       <span class="text">采购订单号:</span>
       <el-input class="input" v-model="purchaseOrderNo" disabled> </el-input>
-      <el-button type="primary" @click="ondrawer(6)" v-if="materialId && supplierId">浏览</el-button>
-      <span v-else class="span"></span>
+      <el-button type="primary" @click="ondrawer(6)">浏览</el-button>
     </div>
     <div class="orderType from">
       <span class="text">订单类别:</span>
@@ -271,8 +270,7 @@ export default {
         mapList1: [],
       },
       secend: {
-        requestUrl:
-          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=",
+        requestUrl:"",
         selectionType: "radio",
         mapList2: [],
       },
@@ -282,15 +280,15 @@ export default {
         mapList3: [],
       },
       unloadPoint: {
-        requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
+        requestUrl: "",
         selectionType: "radio",
       },
       line: {
-        requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
+        requestUrl: "",
         selectionType: "radio",
       },
       purchaseOrder:{
-        requestUrl: "/api/v1/ams/getPurchaseOrderList?apiId=81",
+        requestUrl: "",
         selectionType: "radio",
       }
     };
@@ -344,9 +342,9 @@ export default {
               this.purchaseOrderId = res.data.data.purchaseOrderId;
               this.purchaseOrderNo=res.data.data.purchaseOrderNo;
               if (res.data.data.receiveUnitId == 1) {
-                this.orderType = 6;
+                this.orderType = 17;
               } else {
-                this.orderType = 7;
+                this.orderType = 18;
               }
             }
           } else {
@@ -355,9 +353,6 @@ export default {
         });
       }
     },
-    func(res){
-      this.isKuang = false;
-    },
     onclick() {
       if(this.input){
         this.isKuang = true;
@@ -373,38 +368,38 @@ export default {
             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&con=" + this.input+"&i="+new Date();
+          this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId="+this.supplierId+"&con=" + this.input+"&i="+new Date();
         }
       }else{
         if (this.onDrawerNumber == 1) {
-          this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050"
+          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;
+          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");
+            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;
+            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";
+          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";
+          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";
+          this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId="+this.supplierId+"&i="+new Date();
         }
       }
     },
     ondrawer(num) {
-      this.onDrawerNumber = num;
       this.drawer = true;
+      this.onDrawerNumber = num;
       if(num == 1){
-        this.frist.requestUrl = "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050"
+        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) {
@@ -417,9 +412,9 @@ export default {
       } else if (num == 4) {
         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();
+        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&i=" + new Date();
+        this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId="+ this.supplierId+"&i=" + new Date();
       }
     },
     // 返回
@@ -445,6 +440,16 @@ export default {
       this.lineId = selection.lineId;
     },
     currentRadioChange6(selection) {
+      console.log(selection)
+      if (selection.shipperId == 1) {
+        this.orderType = 6;
+      } else {
+        this.orderType = 7;
+      }
+      this.materialName = selection.materialName;
+      this.materialId = selection.materialId;
+      this.supplierId = selection.supplierId;
+      this.supplierName = selection.supplierName;
       this.purchaseOrderNo = selection.purchaseOrderNo;
       this.purchaseOrderId = selection.purchaseOrderId;
     },
@@ -452,6 +457,10 @@ export default {
       this.selectionList = [];
       this.selectionList = selection;
     },
+    func(res){
+      console.log(res)
+      this.isKuang = false;
+    },
     // 确认
     onClickConfirm() {
       var state = 0;
@@ -548,7 +557,7 @@ export default {
               message: "添加成功!",
               type: "success",
             });
-            this.$router.push("/transportReserveRan");
+            this.$router.push("/transportationReservation");
           }
         });
       }

+ 23 - 15
src/views/TMS/components/purchaseChemicalMaterials/transportationReservationAdd.vue

@@ -32,8 +32,7 @@
     <div class="lineId from">
       <span class="text">采购订单号:</span>
       <el-input class="input" v-model="purchaseOrderNo" disabled> </el-input>
-      <el-button type="primary" @click="ondrawer(6)" v-if="materialId && supplierId">浏览</el-button>
-      <span v-else class="span"></span>
+      <el-button type="primary" @click="ondrawer(6)">浏览</el-button>
     </div>
     <div class="orderType from">
       <span class="text">订单类别:</span>
@@ -266,13 +265,12 @@ export default {
       direction: "rtl",
       input: "",
       frist: {
-        requestUrl: "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050",
+        requestUrl: "",
         selectionType: "radio",
         mapList1: [],
       },
       secend: {
-        requestUrl:
-          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=",
+        requestUrl:"",
         selectionType: "radio",
         mapList2: [],
       },
@@ -282,15 +280,15 @@ export default {
         mapList3: [],
       },
       unloadPoint: {
-        requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
+        requestUrl: "",
         selectionType: "radio",
       },
       line: {
-        requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
+        requestUrl: "",
         selectionType: "radio",
       },
       purchaseOrder:{
-        requestUrl: "/api/v1/ams/getPurchaseOrderList?apiId=81",
+        requestUrl: "",
         selectionType: "radio",
       }
     };
@@ -372,9 +370,9 @@ export default {
         } else if (this.onDrawerNumber == 4) {
           this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" + this.input;
         } else if (this.onDrawerNumber == 5) {
-          this.option.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
+          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&con=" + this.input+"&i="+new Date();
+          this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId="+this.supplierId+"&con=" + this.input+"&i="+new Date();
         }
       }else{
         if (this.onDrawerNumber == 1) {
@@ -391,9 +389,9 @@ export default {
         } else if (this.onDrawerNumber == 4) {
           this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&i="+new Date();
         } else if (this.onDrawerNumber == 5) {
-          this.option.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&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&i="+new Date();
+          this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId="+this.supplierId+"&i="+new Date();
         }
       }
     },
@@ -414,14 +412,14 @@ export default {
       } else if (num == 4) {
         this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
       } else if (num == 5) {
-        this.option.requestUrl ="/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&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&i=" + new Date();
+        this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId="+ this.supplierId+"&i=" + new Date();
       }
     },
     // 返回
     onClickCancel() {
-      this.$router.push("/transportReserveRan");
+      this.$router.push("/transportationReservation");
     },
     currentRadioChange1(selection) {
       this.materialName = selection.materialName;
@@ -442,6 +440,16 @@ export default {
       this.lineId = selection.lineId;
     },
     currentRadioChange6(selection) {
+      console.log(selection)
+      if (selection.shipperId == 1) {
+        this.orderType = 17;
+      } else {
+        this.orderType = 18;
+      }
+      this.materialName = selection.materialName;
+      this.materialId = selection.materialId;
+      this.supplierId = selection.supplierId;
+      this.supplierName = selection.supplierName;
       this.purchaseOrderNo = selection.purchaseOrderNo;
       this.purchaseOrderId = selection.purchaseOrderId;
     },

+ 4 - 0
src/views/appoint/app.js

@@ -24,6 +24,10 @@ Vue.use(VueApollo)
 import DilCommonUI from "@/components/DilCommonUI";
 Vue.use(DilCommonUI);
 
+import vuescroll from "vuescroll";//引入vuescroll
+import "vuescroll/dist/vuescroll.css";//引入vuescroll样式
+Vue.use(vuescroll);//使用
+
 // 导出Excel全局组件
 import tableToExcel from '@/components/exportExcel/exportExcel'
 Vue.use(tableToExcel)

+ 366 - 55
src/views/appoint/components/saleContract/addTransportPrice.vue

@@ -1,86 +1,397 @@
 <template>
   <!-- 添加汽运单价 -->
-  <div class="addSalePlan">
+  <div class="addTransportPrice">
     <page-title>新增</page-title>
-    <div class="form-box" style="margin-right: 10rem">
-      <dil-form :formId="287" v-model="form1" ref="from1"></dil-form>
+    <div class="form">
+      <div class="form_box">
+        <dil-form :formId="287" v-model="form1" ref="from1"></dil-form>
+      </div> 
+      <div class="liulan">
+          <el-button type="primary" class="btn" @click="lineClick">浏览</el-button>
+          <el-button type="primary" class="btn1" @click="addressClick">浏览</el-button>
+          <!-- <el-button type="primary" class="btn2">浏览</el-button> -->
+      </div>
     </div>
-    <div class="button-box">
+    <div class="elForm">
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
+        <el-form-item label="所属承运商">
+          <el-autocomplete
+            class="inline-input"
+            v-model="state"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入承运商名称"
+            :trigger-on-focus="false"
+            @select="handleSelect"
+          >
+            <template slot-scope="{ item }">
+              <div class="name" v-if="item.carrierName">
+                {{ item.carrierName }}
+              </div>
+            </template>
+          </el-autocomplete>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="button_box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
     </div>
+    <!-- 线路模态框 -->
+    <el-drawer
+      title="请选择线路"
+      :visible.sync="LineDrawer"
+      :direction="direction"
+      :before-close="handleClose"
+      close-on-press-escape
+      modal
+      wrapperClosable
+      size="40%"
+    >
+      <div class="selectText">
+        <!-- <span></span> -->
+        <el-input v-model="LineText" placeholder="请输入内容"></el-input>
+        <el-button type="primary" @click="selectLineClick" :loading="selectLineLoading"><i class="el-icon-search"></i>查询</el-button>
+      </div>
+      <div class="LineTable">
+        <vue-scroll :ops="ops" style="width:100%;height:100%">
+          <dilTable 
+            v-bind.sync="line"
+            @radio-change="currentRadioChange"
+            :isKuang="isKuang"
+            :loading="tableLoading"
+            :drawer="LineDrawer"
+            @func="func"
+          ></dilTable>
+        </vue-scroll>
+      </div>
+    </el-drawer>
+    <!-- 地址模态框 -->
+    <el-drawer
+      title="请选择收货地址"
+      :visible.sync="addresDrawer"
+      :direction="direction"
+      :before-close="handleClose"
+      close-on-press-escape
+      wrapperClosable
+      modal
+      size="40%"
+    >
+      <div class="selectText">
+        <!-- <span></span> -->
+        <el-input v-model="addresText" placeholder="请输入内容"></el-input>
+        <el-button type="primary" @click="selectAddresClick" :loading="selectLineLoading"><i class="el-icon-search"></i>查询</el-button>
+      </div>
+      <div class="LineTable">
+        <vue-scroll :ops="ops" style="width:100%;height:100%">
+          <dilTable 
+            v-bind.sync="addres"
+            @radio-change="currentRadioChange1"
+            :isKuang="isKuang"
+            :loading="tableLoading"
+            :drawer="addresDrawer"
+            @func="func"
+          ></dilTable>
+        </vue-scroll>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
     return {
-      form1: {},
-      value: undefined,
+      //承运商名称
+      state: null,
+      //承运商id
+      carrierIds: null,
+      //是否打开收货地址模态框
+      addresDrawer:false,
+      //收货地址查询条件
+      addresText:null,
+      //收货地址id
+      addressId:null,
+      //收货地址模态框数据
+      addressDetailed :null,
+      addres:{
+        requestUrl:"",
+        selectionType: "radio",
+      },
+
+      //是否点击查询
+      isKuang:false,
+      //表格加载状态
+      tableLoading:false,
+      //是否打开线路的模态窗口
+      LineDrawer:false,
+      //线路查询条件
+      LineText:null,
+      //线路Id
+      lineId:null,
+      //线路模态框查询按钮状态
+      selectLineLoading:false,
+      //线路模态窗口的数据
+      line:{
+        requestUrl:"",
+        selectionType: "radio",
+      },
+      //模态窗口的打开的方向
+      direction: 'rtl',
+      //表单数据
+      form1: {
+        priceDate:new Date(),
+        oilTypeId:10,
+      },
+      //提交给后端的数据
+      // map:{},
+      ops: {
+        vuescroll: {},
+        scrollPanel: {},
+        rail: {
+          keepShow: true
+        },
+        bar: {
+          hoverStyle: true,
+          onlyShowBarOnScroll: false, //是否只有滚动的时候才显示滚动条
+          background: "#5f9ea0",//滚动条颜色
+          opacity: 0.8,//滚动条透明度
+          "overflow-x": "hidden"
+        }
+      }
     };
   },
-  created(){
-    this.form1.priceDate=new Date()
+  mounted() {
+    this.axios
+      .post(
+        "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
+      )
+      .then((res) => {
+        if (res.data.code == "200") {
+          console.log(res.data.data);
+          if (res.data.data) {
+            this.state = res.data.data.carrierName;
+            this.carrierIds = res.data.data.carrierId;
+          }
+        }
+      });
   },
   methods: {
-    // 确定
-    makeSure() {
-      let amsContractTransportPrice = {
-        shipperId: this.form1.shipperId,
-        carrierId: this.form1.carrierId,
-        lineId: this.form1.lineId,
-        addressId: this.form1.addressId,
-        priceValue: this.form1.priceValue,
-        priceDate: sjTime(this.form1.priceDate),
-      };
-      if (
-        amsContractTransportPrice.shipperId && 
-        amsContractTransportPrice.carrierId && 
-        amsContractTransportPrice.lineId && 
-        amsContractTransportPrice.addressId && 
-        amsContractTransportPrice.priceValue && 
-        amsContractTransportPrice.priceDate
-      ){
-        this.axios
-          .post(
-            "/api/v1/ams/addAmsContractTransportUnitPrice1",
-            amsContractTransportPrice
-          )
-          .then((res) => {
+    func(res){
+        this.selectLineLoading = false;
+        this.isKuang = false;
+        this.tableLoading = false;
+    },
+    selectAddresClick(){
+      this.tableLoading = true;
+      this.selectLineLoading = true;
+      this.isKuang = true;
+      if(this.addresText){
+        this.addres.requestUrl = "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con="+this.addresText;
+      }else{
+        this.addres.requestUrl = "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
+      }
+    },
+    selectLineClick(){
+      this.tableLoading = true;
+      this.selectLineLoading = true;
+      this.isKuang = true;
+      if(this.LineText){
+        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con="+this.LineText;
+      }else{
+        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
+      }
+    },
+    //承运商弹出层
+    handleSelect(item) {
+      this.carrierIds = item.carrierId;
+      item.carrierName = this.state;
+    },
+    //以下是承运商边输边查搜索
+    querySearch(queryString, cb) {
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .then((res) => {
+          if (res.data.code == "200") {
             console.log(res.data.data);
-            if (res.data.code == "200") {
-              this.$router.go(-1);
-            }
-          });
-      }else {
-        this.$message.error("必填项存在空值!");
+            var restaurants = res.data.data;
+            // console.log(restaurants, "restaurants");
+            var results = queryString
+              ? restaurants.filter(this.createFilter(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是承运商边输边查搜索
+    currentRadioChange(val){
+      let mapvalue = {
+        shipperId : this.form1.shipperId,
+        lineName:val.lineName,
+        capacityTypeId : this.form1.capacityTypeId,
+        cargonameId : this.form1.cargonameId,
+        priceValue : this.form1.priceValue,
+        priceDate : this.form1.priceDate,
+        addressName:this.form1.addressName,
+        type : this.form1.type,
+        oilpriceBase : this.form1.oilpriceBase,
+        oilTypeId : this.form1.oilTypeId,
+        oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
+      }
+      this.form1 = mapvalue;
+      this.lineId = val.lineId;
+    },
+    currentRadioChange1(val){
+      let mapvalue = {
+        shipperId : this.form1.shipperId,
+        lineName:this.form1.lineName,
+        capacityTypeId : this.form1.capacityTypeId,
+        cargonameId : this.form1.cargonameId,
+        priceValue : this.form1.priceValue,
+        priceDate : this.form1.priceDate,
+        addressName:val.address,
+        type : this.form1.type,
+        oilpriceBase : this.form1.oilpriceBase,
+        oilTypeId : this.form1.oilTypeId,
+        oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
+      }
+      this.form1 = mapvalue;
+      this.addressId = val.addressId;
+    },
+    //打开线路的模态窗口
+    lineClick(){
+      this.LineDrawer = true;
+      this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"
+    },
+    addressClick(){
+      this.addresDrawer = true;
+      this.addres.requestUrl = "/api/v1/ams/getAddressDeliveryAddress?apiId=255"
+    },
+    //模态窗口关闭时调用
+    handleClose(){
+      if(this.LineDrawer){
+        this.LineDrawer = false;
+        this.LineText = null;
+      }
+      if(this.addresDrawer){
+        this.addresDrawer = false;
+        this.addresText = null;
+      }
+    },
+    makeSure() {
+      let amsContractTransportPrice={
+        shipperId : this.form1.shipperId,
+        carrierId : this.carrierIds,
+        lineId : this.lineId,
+        capacityTypeId : this.form1.capacityTypeId,
+        cargonameId : this.form1.cargonameId,
+        priceValue : this.form1.priceValue,
+        priceDate : sjTime(this.form1.priceDate),
+        addressId : this.addressId,
+        type : this.form1.type,
+        oilpriceBase : this.form1.oilpriceBase,
+        oilTypeId : this.form1.oilTypeId,
+        oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
       }
+      // console.log("amsContractTransportPrice",amsContractTransportPrice)
+      this.axios.post("/api/v1/ams/addAmsContractTransportPrice", amsContractTransportPrice).then((res) => {
+          if (res.data.code == "200") {
+            this.$router.go(-1);
+          }
+          this.$message({
+            type: "success",
+            message: "新增运输单价成功!",
+          });
+        });   
     },
     // 取消
     cancel() {
-      this.$router.go(-1);
+      this.$router.push('/transportPrice');
     },
   },
 };
 </script>
-<style lang='scss' scoped>
-.form-box{
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.button-box{
-  display: flex;
-  text-align: center;
-  align-items: center;
-  justify-content: center;
-  margin-top: 0.3125rem;
-  margin-bottom: 1.25rem;
+<style lang='scss'>
+.elForm {
+    margin-left: 30%;
+  }
+.addTransportPrice{
+  .form{
+    display: flex;
+    .form_box{
+      width: 320px;
+      margin-left: 30%;
+      margin-top: 30px;
+      margin-right: 20px;
+      .el-form{
+        .preview-group{
+          .el-form-item{
+            .el-form-item__label{
+              display: inline-block;
+              width: 70px !important;
+            }
+            .el-form-item__content{
+              .el-select{
+                width: 250px;
+              }
+              .el-input{
+                width: 250px;
+              }
+            }
+          }
+        }
+      }
+    }
+    .liulan{
+      width: 120px;
+      margin-top: 30px;
+      .el-button{
+        width: 100px !important;
+        margin: auto;
+      }
+      .btn{
+        margin-top: 105px;
+      }
+      .btn1{
+        margin-top: 13px;
+      }
+      .btn2{
+        margin-top: 67px;
+      }
+    }
+  }
+  .button_box{
+    margin-left: 45%;
+  }
+  .selectText{
+    .el-input{
+      width: 250px;
+    }
+  }
+  .LineTable{
+    width: 100%;
+    height: 480px;
+    overflow: hidden;
+    margin-top: 10px;
+  }
 }
+</style>
+<style lang='scss'>
+  /deep/.__bar-is-vertical {
+    right: -1px !important;
+  }
+  /deep/.__bar-is-horizontal {
+    display: none !important;
+  }
 </style>

+ 34 - 57
src/views/appoint/components/saleContract/transportPrice.vue

@@ -12,7 +12,7 @@
        <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-table-column fixed="right" label="操作" width="200">
+      <!-- <el-table-column fixed="right" label="操作" width="200">
         <template slot-scope="scope">
           <el-button @click="click(scope.row.priceId)" type="text" size="small"
             >修改</el-button
@@ -24,7 +24,7 @@
             >删除</el-button
           >
         </template>
-      </el-table-column>
+      </el-table-column> -->
     </dilTable>
   </div>
 </template>
@@ -61,62 +61,39 @@ export default {
     btnclick() {
       this.$router.push("/addTransportPrice");
     },
-    click(priceId) {
-      this.$router.push("/editTransportPrice/" + priceId);
-    },
-    deleteclick(scope) {
-      let priceId = scope;
-      this.$confirm("是否删除", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-        .then(() => {
-          this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
-          this.axios
-            .post(
-              "/api/v1/ams/deleteAmsContractTransportPrice1?priceId=" +
-                priceId
-            )
-            .then((res) => {
-              if (res.data.code == "200") {
-                this.$router.go(0);
-              }
-            });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "取消删除!",
-          });
-        });
-    },
-    // exportData(){
-    //     let tHeader = [];
-    //     let filterVal = [];
-    //     this.$refs.tab.dataColumnData.filter( (item,i) =>{
-    //       tHeader.push(item.label);
-    //           filterVal.push(item.prop);
-    //       } )
-    //     this.export2Excel(tHeader,filterVal,this.$refs.tab.dataTabel);
-    // },
-    //  export2Excel(tHeader,filterVal,dataTabel) {
-    //   var that = this;
-    //    this.downloadLoading = true
-    //   require.ensure([], () => {
-    //     const { export_json_to_excel } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
-    //     let list = dataTabel;
-    //     let data = that.formatJson(filterVal, list);
-    //     export_json_to_excel(tHeader, data, "汽运单价"); // 导出的表格名称
-    //   });
+    // click(priceId) {
+    //   this.$router.push("/editTransportPrice/" + priceId);
     // },
-    // //3.格式转换
-    // formatJson(filterVal, jsonData) {
-    //   return jsonData.map((v) => filterVal.map((j) => v[j]));
+    // deleteclick(scope) {
+    //   let priceId = scope;
+    //   this.$confirm("是否删除", "提示", {
+    //     confirmButtonText: "确定",
+    //     cancelButtonText: "取消",
+    //     type: "warning",
+    //     center: true,
+    //   })
+    //     .then(() => {
+    //       this.$message({
+    //         type: "success",
+    //         message: "删除成功!",
+    //       });
+    //       this.axios
+    //         .post(
+    //           "/api/v1/ams/deleteAmsContractTransportPrice1?priceId=" +
+    //             priceId
+    //         )
+    //         .then((res) => {
+    //           if (res.data.code == "200") {
+    //             this.$router.go(0);
+    //           }
+    //         });
+    //     })
+    //     .catch(() => {
+    //       this.$message({
+    //         type: "info",
+    //         message: "取消删除!",
+    //       });
+    //     });
     // },
   },
   

+ 3 - 1
src/views/index/app.js

@@ -14,7 +14,9 @@ import router from './router/index.js';
 import VueApollo from 'vue-apollo'
 
 import apollo from '@/config/apolloConfig.js'
-
+// 注册表格的全局组件
+import DilCommonUI from "@/components/DilCommonUI";
+Vue.use(DilCommonUI);
 
 // 关闭生产模式下给出的提示
 Vue.config.productionTip = false;

+ 228 - 0
src/views/index/components/luckDraw.vue

@@ -0,0 +1,228 @@
+<template>
+  <div class="luckDraw">
+    <div class="luckDraw_title">
+        <span class="text">中奖名单</span>
+    </div>
+    <div class="luckDraw_select">
+        <el-input v-model="form.text1" placeholder="请输入中奖姓名" clearable></el-input>
+        <el-button type="primary" @click="selectClick" :loading="selectLoading">
+            <i class="el-icon-search"></i> 查询
+        </el-button>
+        <el-button type="primary" @click="exportData()" :loading="downloadLoading">
+            <i class="el-icon-document"></i> 导出(Excel)
+        </el-button>
+    </div>
+    <div class="luckDraw_table">
+        <el-table
+            ref="tab"
+            :data="tableData"
+            style="width: 100%;"
+            border
+            :height="height"
+            :stripe="true"
+            :highlight-current-row="false"
+            :row-style="tableRowStyle"
+            :header-cell-style="tableHeaderColor"
+            :loading="tableLoading"
+            element-tableLoading-text="玩命加载中"
+            element-tableLoading-spinner="el-icon-tableLoading"
+        >
+            <el-table-column
+                type="index"
+                label="序号"
+                fixed="left"
+                width="50"
+            >
+            </el-table-column>
+            <el-table-column
+                sortable
+                v-for="(item,i) in tablehead"
+                :key="i"
+                :prop="item.prop"
+                :label="item.label"
+                :min-width="item.width || width">
+            </el-table-column>
+        </el-table>
+         <div class="fy">
+            <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                :page-sizes="pageSizes"
+                :page-size="pageSize"
+                layout="total, sizes, prev, pager, next, jumper"
+                :total="total"
+                :hide-on-single-page="true">
+            </el-pagination>
+         </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import luckDrawTableHead from './luckDrawTableHead'
+export default {
+    data(){
+        return{
+            //查询按钮的状态
+            selectLoading:false,
+            //导出按钮的状态
+            downloadLoading:false,
+            //导出excel文件的名字
+            tableTitle:'中奖名单',
+            //表格的高度
+            height:null,
+            //表格的每一列的宽度,若没有再表头设置则采用
+            width:150,
+            //总条目数
+            total:null,
+            //每页显示条目个数
+            pageSize: 100,
+            //每一页面的显示的条目个数数组
+            pageSizes: [50, 100, 200, 300],
+            //当前页数
+            currentPage: 1,
+            //表格的加载状态
+            tableLoading: false,
+            //查询条件
+            form:{
+                text1:null,
+            },
+            //后端给的数据
+            tableData1:[],
+            //表格渲染的数据
+            tableData:[],
+            //表格的表头数据
+            tablehead:[],
+        }
+    },
+    created(){
+        this.tablehead = luckDrawTableHead.luckDrawTableHead;
+        //动态监听页面的高度,如果改变则改变
+        window.addEventListener("resize", this.getHeight);
+        this.getHeight();
+        this.initialization();
+        this.changeList();
+    },
+    methods:{
+        getHeight(){
+            this.height = window.innerHeight - 200
+        },
+        initialization(){
+           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;
+            console.log(this.form)
+            this.selectLoading = false;
+        },
+        //行间样式
+        tableRowStyle(){
+           return 'background-color:#CCF1FF;color:#000;text-align:center;height:10px'
+        },
+        //表头样式
+        tableHeaderColor(){
+            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.tableLoading = false;
+        },
+        handleSizeChange(val) {
+            this.tableLoading = true;
+            this.pageSize = val
+            this.changeList();
+        },
+        handleCurrentChange(val) {
+            this.tableLoading = true;
+            this.currentPage = val
+            this.changeList();
+        },
+        exportData(){
+            if(this.tableData.length){
+                let tHeader = [];
+                let filterVal = [];
+                this.tablehead.filter( (item,i) =>{
+                tHeader.push(item.label);
+                    filterVal.push(item.prop);
+                } )
+                this.export2Excel(tHeader,filterVal,this.tableData);
+            }else{
+                this.$alert('没有查询到数据,不能使用导出功能', '提示', {
+                    confirmButtonText: '确定',
+                    callback: action => {
+                    }
+                });
+            }
+        },
+        export2Excel(tHeader,filterVal,dataTabel) {
+        var that = this;
+        this.downloadLoading = true
+        require.ensure([], () => {
+            const { export_json_to_excel } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+            let list = dataTabel;
+            let data = that.formatJson(filterVal, list);
+            export_json_to_excel(tHeader, data, that.tableTitle); // 导出的表格名称
+        });
+        this.downloadLoading = false;
+        },
+        //3.格式转换
+        formatJson(filterVal, jsonData) {
+        return jsonData.map((v) => filterVal.map((j) => v[j]));
+        },
+    }
+}
+</script>
+
+<style lang="scss">
+    .luckDraw{
+        .luckDraw_title{
+            width: 100%;height: 100px;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            font-size: 46px;
+            font-weight: 900;
+            color: red;
+                
+        }
+        .luckDraw_select{
+            display: flex;
+            align-items: center;
+            width: 100%;height: 60px;
+            padding-left: 50px;
+            .el-input{
+                width: 200px;
+                margin-right: 20px;
+            }
+        }
+        .fy{
+            display: flex;
+            align-items: center;
+            height: 40px;
+            width: 100%;
+        }
+    }
+</style>

+ 23 - 0
src/views/index/components/luckDrawTableHead.js

@@ -0,0 +1,23 @@
+const luckDrawTableHead = [
+    {
+        prop:'prop1',
+        label:'单位'
+    },{
+        prop:'prop1',
+        label:'姓名'
+    },{
+        prop:'prop1',
+        label:'工号'
+    },{
+        prop:'prop1',
+        label:'中奖等级'
+    },{
+        prop:'prop1',
+        label:'中奖时间',
+        width:'220'
+    }
+]
+
+export default {
+    luckDrawTableHead
+}

+ 10 - 0
src/views/index/router/index.js

@@ -8,6 +8,8 @@ import main from '@/components/main.vue'
 // 登录
 import login from '@/views/index/components/login.vue'// 登录
 import download from '@/views/index/components/download.vue'
+// 抽奖结果
+import luckDraw from '@/views/index/components/luckDraw.vue'
 
 
 // 网页登录不可访问
@@ -42,6 +44,14 @@ export const constantRouterMap = [{
         },
         component: login
     },
+    {
+        path:'/luckDraw',
+        name:'luckDraw',
+        meta:{
+            'title':'抽奖结果'
+        },
+        component:luckDraw
+    },
     {
         path: '/default',
         name: 'default',

+ 1 - 23
src/views/sale/components/sale_contract/transportPrice.vue

@@ -87,29 +87,7 @@ export default {
           });
         });
     },
-    // exportData(){
-    //     let tHeader = [];
-    //     let filterVal = [];
-    //     this.$refs.tab.dataColumnData.filter( (item,i) =>{
-    //       tHeader.push(item.label);
-    //           filterVal.push(item.prop);
-    //       } )
-    //     this.export2Excel(tHeader,filterVal,this.$refs.tab.dataTabel);
-    // },
-    //  export2Excel(tHeader,filterVal,dataTabel) {
-    //   var that = this;
-    //    this.downloadLoading = true
-    //   require.ensure([], () => {
-    //     const { export_json_to_excel } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
-    //     let list = dataTabel;
-    //     let data = that.formatJson(filterVal, list);
-    //     export_json_to_excel(tHeader, data, "汽运单价"); // 导出的表格名称
-    //   });
-    // },
-    // //3.格式转换
-    // formatJson(filterVal, jsonData) {
-    //   return jsonData.map((v) => filterVal.map((j) => v[j]));
-    // },
+    
   },
   
 };

+ 108 - 0
src/views/statisticalReport/components/inwardReport/putInwardReport.vue

@@ -0,0 +1,108 @@
+<template>
+  <div class="purchasFuelNewMonitor">
+    <div class="frameCalculation">
+      <span>净重时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <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>
+      <span style="margin-left: 1rem;">首次/二次合计净重:</span>
+      <el-input v-model="totalNumberFrist" :disabled="true" style="width: 140px;"></el-input>
+      <span style="margin-left: 1rem;">合计车数:</span>
+      <el-input v-model="totalCapacity" :disabled="true" style="width: 100px;"></el-input>
+    </div>
+    <div class="table">
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
+    </div>
+  </div>
+</template>
+
+<script>
+import { sjTime } from '@/utils/sharedJsFile';
+import { getCookie } from '@/utils/util.js';
+export default {
+  data() {
+    return {
+      totalNumberSecond:null,
+      totalNumberFrist:null,
+      totalCapacity:null,
+      option: {
+        requestUrl: "",
+      },
+      startTime: null,
+      endTime: null,
+      tableTitle:'零星出厂统计报表'
+    };
+  }, 
+  created(){
+          this.option.requestUrl = '/api/v1/tms/getPurInwardReport?apiId=441&startTime=null&endTime=null&i=' +new Date()
+  },
+  methods: {
+    func(res){
+        console.log(res)
+        var resultNetWeightTotalFirst = 0
+        var resultNetWeightTotalSecond = 0
+        res.list.forEach(e => {
+          resultNetWeightTotalFirst = resultNetWeightTotalFirst+e.netWeightFirst
+          resultNetWeightTotalSecond = resultNetWeightTotalSecond + e.netWeightSecond
+        });
+        this.totalNumberFrist = resultNetWeightTotalFirst.toFixed(2) + "t" + "/" + resultNetWeightTotalSecond.toFixed(2) + "t"
+        this.totalCapacity = res.total;
+    },
+    getRequestUrl(){
+        this.option.requestUrl = '/api/v1/tms/getPurInwardReport?apiId=441?apiId=425&startTime=null&endTime=null&i=' +new Date();
+     
+    },
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if(this.startTime){
+        startTime = sjTime(this.startTime);
+      }
+      if(this.endTime){
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime){
+        if(startTime < endTime){
+          this.option.requestUrl = '/api/v1/tms/getPurInwardReport?apiId=441' + "&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        console.log(startTime && endTime)
+        this.getRequestUrl()
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss">
+.purchasFuelNewMonitor {
+  .frameCalculation {
+    width: 100%;
+    height: 100px;
+    display: flex;
+    align-items: center;
+    padding-left: 50px;
+    .el-date-editor{
+      margin: 20px;
+    }
+  }
+}
+</style>

+ 67 - 34
src/views/statisticalReport/components/salesLogisticsStatistics/transportationPerformance.vue

@@ -2,13 +2,24 @@
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
       <span>计毛时间:</span>
-      <el-date-picker
+      <!-- <el-date-picker
         v-model="Time"
         :editable="true"
         type="datetimerange"
         range-separator="至"
         start-placeholder="开始日期"
         end-placeholder="结束日期">
+      </el-date-picker> -->
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期时间">
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="datetime"
+        placeholder="选择日期时间">
       </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
@@ -23,7 +34,7 @@
       <el-input v-model="totalCapacity" :disabled="true" style="width: 150px;"></el-input>
     </div>
     <div class="table">
-      <dilTable ref="excelDom" v-bind.sync="option" :isKuang="isKuang" @func="func" :pageSize = "pageSize"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang" @func="func" @requestQuery="requestQuery" :pageSize = "pageSize"></dilTable>
     </div>
   </div>
 </template>
@@ -33,12 +44,15 @@ import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
+      shiyHeigth:140,
+      isHeigth:true,
       pageSize:100,
       isKuang:false,
       option: {
         requestUrl: "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&i=" +new Date(),
       },
-      Time:null,
+      startTime:null,
+      endTime:null,
       //合计净重
       totalNumber: 0,
       //合计车数
@@ -47,7 +61,8 @@ export default {
     };
   },
   created(){
-      var startTime = this.dataFormat(sjTime(new Date()));
+      const start = new Date(new Date(new Date().toLocaleDateString()).getTime());
+      var startTime = this.dataFormat(sjTime(start));
       var endTime = this.dataFormat(sjTime(new Date()));
       this.tableTitle = startTime + ' 至 ' + endTime;
   },
@@ -56,47 +71,65 @@ export default {
       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;
     },
+    // requestQuery(q){
+    //   //调用获取总净重方法
+    //   this.calculationTotalNumber(q);
+    // },
     onclick() {
       let startTime = null;
       let endTime = null;
-      if(this.Time != null){
-        startTime = sjTime(this.Time[0]);
-        endTime = sjTime(this.Time[1]);
+      if(this.startTime && this.endTime){
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+        //修改报表名称
+        this.tableTitle = this.dataFormat(startTime) + ' 至 ' + this.dataFormat(endTime);
+        this.option.requestUrl = "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      }else{
+        if(this.startTime){
+          startTime = sjTime(this.startTime);
+        }else if(this.endTime){
+          endTime = sjTime(this.endTime);
+        }
+        this.option.requestUrl = "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
       }
-      this.option.requestUrl = "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
-      //修改报表名称
-      this.tableTitle = this.dataFormat(startTime) + ' 至 ' + this.dataFormat(endTime);
     },
-    //获取当前条件下的总净重
-    calculationTotalNumber(dataRequestQuery){
-      //初始化时间
-      let startTime = null;
-      let endTime = null;
-      if(this.Time != null){
-        startTime = sjTime(this.Time[0]);
-        endTime = sjTime(this.Time[1]);
-      }
-      //放入子组件筛选的值
-      let mapValue = undefined;
-          for (const key in dataRequestQuery) {
+    // //获取当前条件下的总净重
+    // calculationTotalNumber(dataRequestQuery){
+    //   //初始化时间
+    //   let startTime = null;
+    //   let endTime = null;
+    //   if(this.Time != null){
+    //     startTime = sjTime(this.Time[0]);
+    //     endTime = sjTime(this.Time[1]);
+    //   }
+    //   //放入子组件筛选的值
+    //   let mapValue = undefined;
+    //       for (const key in dataRequestQuery) {
          
-            const val = dataRequestQuery[key];
-            if (val||val==0) {
+    //         const val = dataRequestQuery[key];
+    //         if (val||val==0) {
              
-              if (!mapValue) mapValue = {};
+    //           if (!mapValue) mapValue = {};
             
-              mapValue[key] = val;
-            }
-          }
-      this.axios.post("/api/v1/tms/getAllSaleReportTotal?startTime=" + startTime +"&endTime="+ endTime +"&i=" +new Date(),mapValue)
-      .then((res) => {
-          this.totalNumber = res.data.data;
-        });  
-    },
+    //           mapValue[key] = val;
+    //         }
+    //       }
+    //   this.axios.post("/api/v1/tms/getAllSaleReportTotal?startTime=" + startTime +"&endTime="+ endTime +"&i=" +new Date(),mapValue)
+    //   .then((res) => {
+    //       this.totalNumber = res.data.data;
+    //     });  
+    // },
     //格式化日期
     dataFormat(value){
       let date = new Date(value);

+ 1 - 1
src/views/statisticalReport/components/sporadicReport/sporadicReportEnterFactory.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
-      <span>进厂时间:</span>
+      <span>计皮时间:</span>
       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
       <span>至</span>

+ 1 - 1
src/views/statisticalReport/components/sporadicReport/sporadicReportExFactory.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
-      <span>进厂时间:</span>
+      <span>计毛时间:</span>
       <el-date-picker
         v-model="startTime"
         type="datetime"

+ 4 - 1
src/views/statisticalReport/router/index.js

@@ -15,6 +15,9 @@ import sporadicReportExFactory from '../components/sporadicReport/sporadicReport
 import transportationPerformance from '../components/salesLogisticsStatistics/transportationPerformance.vue'
 import purchaseChemicalMaterialsNew from '../components/purchaseChemicalMaterials/purchaseChemicalMaterialsNew.vue'
 import purchaseChemicalMaterialsOld from '../components/purchaseChemicalMaterials/purchaseChemicalMaterialsOld.vue'
+import purInwardReport from '../components/inwardReport/putInwardReport.vue'
+
+
 Vue.use(Router)
 
 const constantRouterMap = [
@@ -34,7 +37,7 @@ const constantRouterMap = [
       {path: 'sporadicReportEnterFactory',name:'sporadicReportEnterFactory',meta:{code:'xtpzgl-yhgl'},component:sporadicReportEnterFactory},
       {path: 'sporadicReportExFactory',name:'sporadicReportExFactory',meta:{code:'xtpzgl-yhgl'},component:sporadicReportExFactory},
       {path: 'transportationPerformance', name: 'transportationPerformance', meta: {code: 'xtpzgl-yhgl'}, component: transportationPerformance},
-
+      {path: 'purInwardReport', name: 'purInwardReport', meta: {code: 'xtpzgl-yhgl'}, component: purInwardReport}
 
     ]
   }