Browse Source

修改倒垛

hujh 3 years ago
parent
commit
09dc8fbaff
40 changed files with 1621 additions and 593 deletions
  1. 3 3
      build/utils.js
  2. 8 2
      config/index.js
  3. BIN
      dist.zip
  4. 9 0
      nginx.conf
  5. 1 0
      package.json
  6. 31 9
      src/components/DilCommonUI/packages/table/src/table.js
  7. 15 2
      src/components/DilCommonUI/packages/table/src/table.vue
  8. 1 1
      src/config/routerBefore.js
  9. 196 150
      src/views/RMS/components/addCapacity.vue
  10. 140 56
      src/views/RMS/components/addOilPrice.vue
  11. 62 30
      src/views/RMS/components/capacity.vue
  12. 1 1
      src/views/RMS/components/editCapacity.vue
  13. 2 10
      src/views/RMS/components/editConsignee.vue
  14. 2 6
      src/views/RMS/components/editSupplier.vue
  15. 62 46
      src/views/RMS/components/oilPrice.vue
  16. 1 0
      src/views/RMS/components/supplier.vue
  17. 6 0
      src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/addTransportOrder.vue
  18. 1 1
      src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/outFactory.vue
  19. 36 17
      src/views/SporadicManage/components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue
  20. 13 13
      src/views/SporadicManage/components/sporadicMaterial/transportAppoint/transportAppoint.vue
  21. 47 16
      src/views/SporadicManage/components/sporadicMaterial/transportOrder/addTransportOrder.vue
  22. 38 1
      src/views/SporadicManage/components/sporadicMaterial/transportOrder/transportOrder.vue
  23. 0 6
      src/views/TMS/components/importedFuel/transportReserveRanAdd.vue
  24. 23 30
      src/views/TMS/components/purchaseChemicalMaterials/transportationReservationAdd.vue
  25. 4 0
      src/views/appoint/app.js
  26. 366 55
      src/views/appoint/components/saleContract/addTransportPrice.vue
  27. 49 64
      src/views/appoint/components/saleContract/transportPrice.vue
  28. 3 1
      src/views/index/app.js
  29. 233 0
      src/views/index/components/luckDraw.vue
  30. 23 0
      src/views/index/components/luckDrawTableHead.js
  31. 10 0
      src/views/index/router/index.js
  32. 3 3
      src/views/inward/components/truckAppoint/addRequirement.vue
  33. 0 1
      src/views/inward/components/truckAppoint/purInwardRequirement.vue
  34. 14 3
      src/views/inward/components/truckOrder/addPurInwardOrder.vue
  35. 1 23
      src/views/sale/components/sale_contract/transportPrice.vue
  36. 108 0
      src/views/statisticalReport/components/inwardReport/putInwardReport.vue
  37. 67 34
      src/views/statisticalReport/components/salesLogisticsStatistics/transportationPerformance.vue
  38. 19 4
      src/views/statisticalReport/components/sporadicReport/sporadicReportEnterFactory.vue
  39. 19 4
      src/views/statisticalReport/components/sporadicReport/sporadicReportExFactory.vue
  40. 4 1
      src/views/statisticalReport/router/index.js

+ 3 - 3
build/utils.js

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

+ 8 - 2
config/index.js

@@ -54,11 +54,17 @@ let proxyTable = {
       "^/api/v1/cd": "/api/v1/cd"
     }
   },
+  //抽奖结果的接口
+  "/game/v1": {
+    target: "http://172.16.33.166:9002",
+    ws: true,
+    pathRewrite: {
+      "^/game/v1": "/v1"
+    }
+  },
   // 所有数据的请求域名地址
   "/api/v1": {
     target: "http://172.16.33.166:8080",
-    // target: "http://172.16.33.162:8019",
-    // target: "http://localhost:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

BIN
dist.zip


+ 9 - 0
nginx.conf

@@ -37,6 +37,15 @@ http {
 
     server {
         root /usr/share/nginx/html/;
+
+        location /game/v1 {
+            rewrite ^/icore.icp.web/game(.*)$ /$1 break; # 去除本地接口/api前缀, 否则会出现404
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_pass http://oa-system-game-service/v1; # 转发地址
+        }
+        
         location /views/icore.icp.web/pass/v1 {
 		    rewrite ^/b/(.*)$ /$1 break; # 去除本地接口/api前缀, 否则会出现404
 			port_in_redirect   on;

+ 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",

+ 31 - 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,33 @@ export default {
     //行拖拽
     // this.rowDrop();
     //列拖拽
-    this.columnDrop();
+    // this.columnDrop();
   },
   methods: {
+    getHeight(){
+      this.height = window.innerHeight - this.shiyHeigth;
+    },
+    //计算合计列
+    getSummaries(columns,data) {
+      const sums = [];
+      columns.forEach((column, index) => {
+       const values = data.map(item => Number(item[column.property]));
+           if (column.property =='resultNetWeight' ) {
+            sums[index] = values.reduce((prev, curr) => {
+             const value = Number(curr);
+             if (!isNaN(value)) {
+               return prev + curr;
+             } else {
+               return prev;
+             }
+            }, 0);
+            console.log(sums )
+            sums[index];
+           }
+      });
+      // console.log("净重:" + sums)
+      return sums
+      },
     // 通过请求获取数据
     requestData(options) {
       let pageNum = undefined;
@@ -70,7 +99,6 @@ export default {
         }
         //判断是否是带分页查询
         if(this.isKuang){
-          console.log(11111111111111111111111111);
           // 发送请求
           this.axios
           .post(url, data, {
@@ -90,7 +118,6 @@ export default {
             this.isShow = true;
           });
         }else{
-          console.log(2222222222222222222222222);
           // 发送请求
           this.axios
             .post(url, data, {
@@ -107,13 +134,7 @@ 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);
-              }
             });
         }
       } else {
@@ -125,6 +146,7 @@ export default {
       // 表头只赋值一次(在查出全部数据的情况下才只赋值一次)
       // if (this.dataColumnData.length > 0) return;
       // 如果前端有写表头,则加在后端表头前面
+      
       const d = this.columnData.concat(columnData);
       // 把操作列拼接到最后一列
       this.dataColumnData = d;

+ 15 - 2
src/components/DilCommonUI/packages/table/src/table.vue

@@ -10,12 +10,16 @@
       :row-class-name="rowClassName"
       :cell-class-name="cellClassName"
       :height="height"
-      :max-height="maxHeight"
       :highlight-current-row="highlightCurrentRow"
       @sort-change="sortChange"
       @selection-change="selectionChange"
       @filter-change="filterChange"
       @row-click="rowClick"
+      v-loading="loading"
+      element-loading-text="玩命加载中"
+      element-loading-spinner="el-icon-loading"
+      :isHeigth="isHeigth"
+      :shiyHeigth="shiyHeigth"
     >
       <!-- 多选列 -->
       <el-table-column
@@ -116,6 +120,12 @@ export default {
   name: "DilTable",
   extends: table,
   props: {
+    shiyHeigth:{
+      default:null,
+    },
+    isHeigth:{
+      default:false,
+    },
     drawer:{
       default:false,
     },
@@ -200,7 +210,9 @@ export default {
         return ({ row, rowIndex }) => "";
       },
     },
-
+    loading:{
+      default:false,
+    },
     // 是否启用分页器
     isPagination: {
       default: true,
@@ -244,6 +256,7 @@ export default {
     toggleRowExpansion(row, expanded) {
       this.$refs.mainTable.toggleRowExpansion(row, expanded);
     },
+
   },
 };
 </script>

+ 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'];
 
 /**
  * 当前路由取标题

+ 196 - 150
src/views/RMS/components/addCapacity.vue

@@ -2,35 +2,35 @@
   <!-- 添加运力信息 -->
   <div class="addCapacity">
     <PageTitle>返回</PageTitle>
-     <div class="form_box" style="margin-right: 10rem">
-        <dil-form :formId="309" v-model="form1" ref="from1"></dil-form>
-      </div>
-      <div class="elForm">
-             <el-form
-        :inline="true"
-        class="demo-form-inline"
-        label-width="80px"
-      >
+    <div class="form_box" style="margin-right: 10rem">
+      <dil-form :formId="309" v-model="form1" ref="from1"></dil-form>
+    </div>
+    <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">{{ item.carrierName }}</div>
-        </template>
-        </el-autocomplete>
+          <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>
- 
+      </el-form>
+    </div>
+
     <div class="button_box">
       <el-button @click="cancel">取消</el-button>
-      <el-button type="primary" @click="makeSure">确定</el-button>
+      <el-button type="primary" @click="makeSure" :loading="addLoading"
+        >确定</el-button
+      >
     </div>
   </div>
 </template>
@@ -42,83 +42,95 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      addLoading: false,
       form1: {},
-      form1Initialization : {
-        capacityTypeId : 1,
-        capacityNumber : '',
-        capacityCorlor : '黄',
-        capacityOwneris : '否',
-        capacityVip : '否',
-        capacityBlacklist : '否'
+      form1Initialization: {
+        capacityTypeId: 1,
+        capacityNumber: "",
+        capacityCorlor: "黄",
+        capacityOwneris: "否",
+        capacityVip: "否",
+        capacityBlacklist: "否",
       },
       value: undefined,
       carrierIds: null,
-      state:null,
-      userId:null,
+      state: null,
+      userId: null,
       restaurants: [],
-      accessToken:null,
-      userCode:null,
-      carrierUserId:null,
-      carrierId:null
+      accessToken: null,
+      userCode: null,
+      carrierUserId: null,
+      carrierId: null,
     };
   },
-  created(){
-      this.carrierUserId = getCookie("userId");
-      this.form1 = this.form1Initialization;
-      console.log(this.carrierUserId ,'carrierUserId')
-      
+  created() {
+    this.carrierUserId = getCookie("userId");
+    this.form1 = this.form1Initialization;
+    console.log(this.carrierUserId, "carrierUserId");
   },
   mounted() {
-   this.axios.post(
-       "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
+    this.axios
+      .post(
+        "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
       )
       .then((res) => {
-        if(res.data.code == "200"){
-        console.log(res.data.data)
-        this.state = res.data.data.carrierName
-        this.carrierIds = res.data.data.carrierId
-        }      
-  })},
+        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: {
     //承运商弹出层
-    handleSelect(item){    
-      this.carrierIds = item.carrierId
-      item.carrierName = this.state
+    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)
-          var restaurants = res.data.data
-          console.log(restaurants,"restaurants");
-          var results = queryString ? restaurants.filter(this.createFilter(queryString)) :restaurants;
-           // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-        })     
-      },
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .then((res) => {
+          if (res.data.code == "200") {
+            console.log(res.data.data);
+            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);
-        };
-      },
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
     //以上是承运商边输边查搜索
-    deleteUser(userId){
-        this.axios.delete("pass/v1/sysusers/" + userId) .then((res) => {
-           this.$message.error("添加失败,车牌可能重复");
-           });
+    deleteUser(userId) {
+      this.axios.delete("pass/v1/sysusers/" + userId).then((res) => {
+        this.$message.error("添加失败,车牌可能重复");
+      });
     },
-    insertRole(userId,userCode){
-        this.axios
+    insertRole(userId, userCode) {
+      this.axios
         .post(
           "pass/v1/sysuserroles/addUserroles?userId=" +
             userId +
             "&userCode=" +
             userCode +
             "&roleId=" +
-            '923693668269953024'
-        ).then((res) => {
+            "923693668269953024"
+        )
+        .then((res) => {
           if (res.code === "0") {
             this.$message.success("操作成功");
             this.saveLoading = false;
@@ -126,37 +138,40 @@ export default {
           } else {
             this.$message.error(res.message);
           }
-        })
+        });
     },
     isVehicleNumber(vehicleNumber) {
-				  console.log(vehicleNumber)
-			      var result = false;
-			      if (vehicleNumber.length == 7){
-			        var express = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
-			        result = express.test(vehicleNumber);
-			      }
-			      return result;
-				  
-		},
+      console.log(vehicleNumber);
+      var result = false;
+      if (vehicleNumber.length == 7) {
+        var express =
+          /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
+        result = express.test(vehicleNumber);
+      }
+      return result;
+    },
     makeSure() {
-        if(!this.isVehicleNumber(this.form1.capacityNumber.toUpperCase())){
-            this.$message.error("车牌号格式不正确")
-            return
-        }
-        if(this.carrierIds == null){
-            this.$message.error("请选择承运商")
-            return
-        }
-        let RmsCapacity = {
+      this.addLoading = true;
+      if (!this.isVehicleNumber(this.form1.capacityNumber.toUpperCase())) {
+        this.$message.error("车牌号格式不正确");
+        this.addLoading = false;
+        return;
+      }
+      if (this.carrierIds == null) {
+        this.$message.error("请选择承运商");
+        this.addLoading = false;
+        return;
+      }
+      let RmsCapacity = {
         capacityTypeId: this.form1.capacityTypeId,
         capacityNumber: this.form1.capacityNumber.toUpperCase(),
         capacityCorlor: this.form1.capacityCorlor,
         capacityOwneris: this.form1.capacityOwneris,
         capacityVip: this.form1.capacityVip,
         capacityBlacklist: this.form1.capacityBlacklist,
-        remark:this.form1.remark,
-        carrierId:this.carrierIds,
-        state: this.state
+        remark: this.form1.remark,
+        carrierId: this.carrierIds,
+        state: this.state,
       };
       if (
         RmsCapacity.capacityNumber == null ||
@@ -164,46 +179,77 @@ export default {
         RmsCapacity.capacityOwneris == null ||
         RmsCapacity.capacityVip == null ||
         RmsCapacity.capacityBlacklist == null
-      )
+      ) {
         this.$message.error("存在空值!");
+        this.addLoading = false;
+      } else {
         var formData = new FormData();
-        formData.append("userName",this.form1.capacityNumber.toUpperCase())
-        console.log(formData.get("userName"))
-        console.log(formData.set("userName",this.form1.capacityNumber.toUpperCase()))
-        console.log(formData)
-        formData.append('userCode',this.form1.capacityNumber.toUpperCase())
-        formData.append('orgCode','yunli')
-        formData.append('orgName','运力')
-        formData.append('groupId','506514577756917769')
-        formData.append('companyId','713710108567277568')
-        formData.append('orgId','924126716337721344')
-        console.log(formData.get("userCode"))
-        console.log(typeof formData)
-        this.$store.dispatch("system/usersManage/addUser", formData).then((res) => {
-        console.log(res);
-        if (res.code === "0") {
-          console.log(res.data.userId)
-          this.userId = res.data.userId
-          this.userCode = res.data.userCode
-          RmsCapacity.ssoId = res.data.userId
-          console.log(RmsCapacity)
-          this.axios.post("/api/v1/rms/insertCapacity",RmsCapacity).then((res) => {
-              console.log(res)
-              if(res.data.code == '200'){
-                this.insertRole(this.userId,this.userCode)
-                this.$message.success("添加成功");
-                this.$router.push('capacity')
+        formData.append("userCode", this.form1.capacityNumber.toUpperCase());
+        formData.append("orgCode", "yunli");
+        formData.append("orgName", "运力");
+        formData.append("groupId", "506514577756917769");
+        formData.append("companyId", "713710108567277568");
+        formData.append("orgId", "924126716337721344");
+        console.log(formData.get("userCode"));
+        console.log(typeof formData);
+        this.$store
+          .dispatch("system/usersManage/addUser", formData)
+          .then((res) => {
+            console.log(res);
+            if (res.code === "0") {
+              console.log(res.data.userId);
+              this.userId = res.data.userId;
+              this.userCode = res.data.userCode;
+              RmsCapacity.ssoId = res.data.userId;
+              this.axios
+                .post("/api/v1/rms/insertCapacity", RmsCapacity)
+                .then((res) => {
+                  if (res.data.code == "200") {
+                    this.insertRole(this.userId, this.userCode);
+                    this.$message.success("添加成功");
+                    this.$router.push("capacity");
+                  } else if (res.data.code == "201") {
+                    this.deleteUser(this.userId);
+                  } else {
+                    this.deleteUser(this.userId);
+                  }
+                });
+            } else {
+              console.log(RmsCapacity, "RmsCapacity");
+              if (res.message == "账号已被注册") {
+                this.$confirm(
+                  "该账号已经绑定承运商, 是否确定进行更改?",
+                  "提示",
+                  {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning",
+                  }
+                )
+                  .then(() => {
+                    this.axios
+                      .post("/api/v1/rms/insertCapacity", RmsCapacity)
+                      .then((res) => {
+                        console.log(res, "res");
+                        if (res.data.code == "200") {
+                          this.$message.success("更改成功");
+                          this.$router.push("capacity");
+                        } else {
+                          this.$message.error("请联系管理人员");
+                        }
+                      });
+                  })
+                  .catch(() => {
+                    this.$message({
+                      type: "info",
+                      message: "已取消删除",
+                    });
+                  });
               }
-              else if(res.data.code == '201'){
-                this.deleteUser(this.userId)
-              }else{
-                this.deleteUser(this.userId)
-              }
-          })         
-        } else {
-          this.$message.error(res.message);
-        }
-      });
+            }
+          });
+        this.addLoading = false;
+      }
     },
     // 取消
     cancel() {
@@ -222,41 +268,41 @@ export default {
     margin-top: 30px;
     display: flex;
     justify-content: center;
-    .el-form-item{
+    .el-form-item {
       display: flex;
       justify-content: center;
-      .el-form-item__label{
+      .el-form-item__label {
         display: flex;
         align-items: center;
       }
-      .el-form-item__content{
-         .el-select{
-            width: 250px;
-          }
-          .el-input{
-            width: 250px;
-          }
+      .el-form-item__content {
+        .el-select {
+          width: 250px;
+        }
+        .el-input {
+          width: 250px;
+        }
       }
     }
   }
-  .inputBox{
+  .inputBox {
     display: flex;
     justify-content: center;
     margin-bottom: 30px;
-    .text{
+    .text {
       text-align: right;
       display: flex;
       align-items: center;
       margin-right: 5px;
     }
-    .input{
+    .input {
       width: 250px;
     }
   }
-  .button_box{
+  .button_box {
     display: flex;
     justify-content: center;
-    .el-button{
+    .el-button {
       width: 80px;
       margin-right: 10px;
     }

+ 140 - 56
src/views/RMS/components/addOilPrice.vue

@@ -1,95 +1,179 @@
 <template>
   <!-- 添加油价信息 -->
   <div class="addWagonLoad">
-    <PageTitle>返回</PageTitle>
-    <div class="form-box" style="margin-right: 10rem">
-      <dil-form :formId="357" v-model="form1" ref="from1"></dil-form>
+    <page-title>返回</page-title>
+    <div class="form_you">
+      <span class="text">油品名称 </span>
+      <el-select v-model="oilNameId" filterable placeholder="请选择">
+        <el-option
+          v-for="item in options"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value">
+        </el-option>
+      </el-select>
+      <el-button type="primary" @click="dialogVisible = true">新增油品名称</el-button>
     </div>
-    <div class="button-box">
+    <div class="form_box" style="margin-right: 10rem">
+      <dil-form :formId="357" v-model="form1" ref="from1" @change="onchang"></dil-form>
+    </div>
+    <div class="button_box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
     </div>
+    <el-dialog
+      title="新增油品名称"
+      :visible.sync="dialogVisible"
+      width="30%"
+    >
+      <span>注:<span style="color:red;">不能输入特殊符号('#')</span></span>
+      <el-input v-model="input" placeholder="请输入内容"></el-input>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="dialogMakeSure">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { isNumber,sjTime } from '@/utils/sharedJsFile'
 export default {
   components: { PageTitle },
   data() {
     return {
-      form1: {},
-      value: undefined,
+      //下拉框选中的值
+      oilNameId:null,
+      //加载状态
+      loading:false,
+      //油品名称新增的值
+      input:null,
+      //是否显示添加油品名称的窗口
+      dialogVisible:false,
+      //下拉框的数据
+      options:[],
+      //表单的数据
+      form1: {
+        priceValue:'',
+        priceDate:new Date(),
+        priceStatus:false,
+      },
     };
   },
-  mounted() {},
+  created(){
+    this.initialization();
+  },
   methods: {
+    initialization(){
+      this.axios.post('/api/v1/rms/oilNameSelect').then((res)=>{
+        if(res.data.code == "200"){
+          this.options = res.data.data;
+        }
+      })
+    },
+    onchang(val){
+      if(val.priceStatus){
+        this.$message.warning('确认启用后将会停用正在执行的油品价格')
+      }
+    },
+    dialogMakeSure(){
+      this.loading = true;
+      if(this.input){
+        this.axios.post('/api/v1/rms/addOilType?oilTypeName='+this.input).then((res)=>{
+          if(res.data.code == "200"){
+            this.loading = false;
+            this.$message.success('新增成功')
+            this.dialogVisible = false;
+            this.initialization();
+          }
+        })
+      }else{
+        this.$message.warning('请输入油品名称')
+      } 
+    },
     makeSure() {
-      console.log(this.form1);
-      let RmsOilPrice = {
-        priceOilName:this.form1.priceOilName,
-        priceId:this.form1.priceId,
-        priceDate:this.form1.priceDate,
-        priceValue:this.form1.priceValue,
-      };
-      if(
-        RmsOilPrice.priceOilName ==null ||
-        RmsOilPrice.priceDate ==null ||
-         RmsOilPrice.priceValue ==null
-      )this.$message.error("存在空值!");
-      else
-      this.axios
-        .post(
-          "/api/v1/rms/insertOilPrice" , RmsOilPrice
-        )
+      this.loading = true;
+      let state = false;
+      if(!this.oilNameId){
+        this.$message.warning('请填写油品名称')
+      }else if(!this.form1.priceValue){
+        this.$message.warning('请填写油品价格')
+      }else if(!isNumber(this.form1.priceValue)){
+        this.$message.warning('油品价格必修为整数或者小数')
+      }else{
+        state = true;            
+      }
+      if(state){
+        let RmsOilPrice = {
+          oilNameId:this.oilNameId,
+          priceValue:this.form1.priceValue,
+          priceDate:sjTime(this.form1.priceDate),
+          priceStatus:this.form1.priceStatus
+        };
+        console.log(RmsOilPrice);
+        this.axios.post("/api/v1/rms/insertOilPrice" , RmsOilPrice)
         .then((res) => {
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });
-            // this.$refs.table.refreshData();
-            this.$router.go(-1);
-          } else {
-            this.$message.error("新增失败,可能存在重复!");
+          if (res.data.code == "200") {
+            this.loading = true;
+            this.$message.success('新增成功');
+            this.cancel();
           }
-        //  this.$refs['table'].resetField();
         });
+      }else{
+        this.loading = true;
+      }
     },
     // 取消
     cancel() {
-      this.$router.go(-1);
+      this.$router.push("/oilPrice");
     },
   },
 };
 </script>
-<style lang='scss' >
- .button-box{
-    display: flex;
-    justify-content: center;
-    .el-button{
-      width: 80px;
-      margin-right: 10px;
+<style lang='scss'>
+.addWagonLoad{
+  .form_you{
+    margin-left: 35%;
+    margin-top: 30px;
+    .text{
+      display: inline-block;
+      width: 55px;
+    }
+    .el-select{
+      width: 250px;
+      margin-right: 20px;
     }
   }
-.form-box{
-  display: flex;
-  justify-content: center;
-  .el-form-item{
+  .form_box{
+    margin-left: 35%;
+    padding-top: 10px;
+    width: 470px;
     display: flex;
-    justify-content: center;
-    .el-form-item__label{
-      display: flex;
-      align-items: center;
-    }
-    .el-form-item__content{
-      .el-input{
-        .el-input__inner{
-          width: 250px;
+    .el-form{
+      .el-form-item{
+        display: flex;
+        align-items: center;
+        .el-form-item__content{
+          .el-input{
+            width: 250px;
+          }
+          .el-switch{
+            margin-left: -250px;
+          }
         }
       }
     }
+    .addbtn{
+      margin-left: 30px;
+    }
+  }
+  .button_box{
+    margin-left: 40%;
+    padding-top: 30px;
+    width: 310px;
+    display: flex;
+    justify-content: center;
   }
 }
 </style>

+ 62 - 30
src/views/RMS/components/capacity.vue

@@ -7,7 +7,7 @@
         v-model="textInput"
         clearable>
       </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
+      <el-button type="primary" class="btn" @click="onclick" :loading="selectLoading">
         <i class="el-icon-search"></i>查询
       </el-button>
        <el-button type="primary" class="btn" @click="toInsert">
@@ -15,7 +15,12 @@
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options">
+      <dilTable 
+        v-bind.sync="options"
+        :loading="tableloading"
+        @func="func"
+        :isKuang="isKuang"
+      >
         <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
             <el-button
@@ -43,6 +48,9 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data(){
     return{
+     selectLoading:false,
+     isKuang:false,
+     tableloading:false,
      show:false,
      name:"homeworkPath",
      textInput:"",
@@ -67,14 +75,38 @@ export default {
      } 
   },
   methods:{
+    func(res){
+      if(this.tableloading){
+        this.tableloading = false;
+      }
+      if(this.isKuang){
+        this.isKuang = false;
+      }
+      if(this.selectLoading){
+        this.selectLoading = false;
+      }
+    },
     onclick(){
-      if(getCookie("orgCode") == "chengyunshang"){
-      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ getCookie("userId") +"&con=" +this.textInput + "&i=" + new Date();
-    }else if(getCookie("orgCode") == "baohua"){
-      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + getCookie("userId") + this.textInput + "&i=" + new Date();
-     }else{
-      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ null +"&con=" +this.textInput + "&i=" + new Date();
-    }
+      this.isKuang = true;
+      this.tableloading = true;
+      this.selectLoading = true;
+      if(this.textInput){
+        if(getCookie("orgCode") == "chengyunshang"){
+          this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ getCookie("userId") +"&con=" +this.textInput + "&i=" + new Date();
+        }else if(getCookie("orgCode") == "baohua"){
+          this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + getCookie("userId") + this.textInput + "&i=" + new Date();
+        }else{
+          this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ null +"&con=" +this.textInput + "&i=" + new Date();
+        }
+      }else{
+        if(getCookie("orgCode") == "chengyunshang"){
+          this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ getCookie("userId") + "&i=" + new Date();
+        }else if(getCookie("orgCode") == "baohua"){
+          this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + getCookie("userId") + "&i=" + new Date();
+        }else{
+          this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ null + "&i=" + new Date();
+        }
+      }
     },
      toInsert() {
       this.$router.push("/addCapacity");
@@ -83,9 +115,8 @@ export default {
       this.$router.push("/editCapacity/" + capacityId)
     },
     deleteUser(userId){
-        this.axios.delete("pass/v1/sysusers/" + userId) .then((res) => {
-           this.$message.success("删除成功!");
-           });
+      this.axios.delete("pass/v1/sysusers/" + userId) .then((res) => {
+      });
     },
     deleteCapacity(capacityId) {
         if(getCookie("orgCode") == "wuliuchuyunzhongxin" || getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
@@ -94,24 +125,25 @@ export default {
           cancelButtonText: '取消',
           type: 'warning',
         }).then(() => {
-            this.axios
-            .post("/api/v1/rms/deleteCapacity/" + capacityId)
-            .then((res) => {
-              if (res.data.code == 200) {
-                console.log(res.data.data)
-                this.deleteUser(res.data.data)
-                this.$message({
-                  type: "success",
-                  message: "删除成功!",
-                });     
-                this.$router.go(0);
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning",
-                });
-              }
-            });
+          this.axios
+          .post("/api/v1/rms/deleteCapacity/" + capacityId)
+          .then((res) => {
+            if (res.data.code == "200") {
+              console.log(res.data.data)
+              this.deleteUser(res.data.data)
+              this.$message({
+                type: "success",
+                message: "删除成功!",
+              });    
+              this.tableloading = true;
+              this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ null + "&i=" + new Date(); 
+            } else {
+              this.$message({
+                message: "删除失败",
+                type: "warning",
+              });
+            }
+          });
         }).catch(() => {
           this.$message({
             type: 'info',

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

@@ -160,7 +160,7 @@ export default {
          capacityOwneris:this.form1.capacityOwneris,
          capacityVip:this.form1.capacityVip,
          capacityBlacklist:this.form1.capacityBlacklist,
-          carrierId:this.carrierIds,
+         carrierId:this.carrierIds,
        };if(
          RmsCapacity.capacityNumber==null ||
          RmsCapacity.capacityCorlor==null ||

+ 2 - 10
src/views/RMS/components/editConsignee.vue

@@ -21,7 +21,6 @@
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
 export default {
   components: { PageTitle },
   data() {
@@ -68,19 +67,12 @@ console.log(this.$route.params)
          consigneeAbbreviation:this.form1.consigneeAbbreviation,
          consigneeRegisteredAddress:this.form1.consigneeRegisteredAddress,
          consigneeReceiveAddress:this.form1.consigneeReceiveAddress,
-         consigneeRegistrationTime:this.form1. consigneeRegistrationTime,
+         consigneeRegistrationTime:this.form1.consigneeRegistrationTime,
          consigneeContactName:this.form1.consigneeContactName,
          consigneeContactTel:this.form1.consigneeContactTel,
        };
        if(
-        RmsConsignee.consigneeId == null ||
-        RmsConsignee.companyName == null ||
-        RmsConsignee.consigneeAbbreviation==null ||
-        RmsConsignee. consigneeRegisteredAddress ==null ||
-        RmsConsignee.consigneeReceiveAddress == null ||
-        RmsConsignee.consigneeRegistrationTime == null ||
-        RmsConsignee.consigneeContactName == null ||
-        RmsConsignee.consigneeContactTel == null
+        RmsConsignee.companyName == null 
        )this.$message.error("存在空值!");
         console.log( this.$route.params.consigneeId);
         this.axios

+ 2 - 6
src/views/RMS/components/editSupplier.vue

@@ -21,7 +21,7 @@
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
@@ -69,11 +69,7 @@ export default {
         supplierContactNumber: this.form1.supplierContactNumber
       };
        if(
-        RmsSupplier.supplierName==null ||
-        RmsSupplier.supplierAddress==null ||
-        RmsSupplier.supplierRegisterDate==null ||
-        RmsSupplier.supplierContactsName==null ||
-        RmsSupplier.supplierContactNumber==null 
+        RmsSupplier.supplierName==null 
       )this.$message.error("存在空值!");
         this.axios
           .post(

+ 62 - 46
src/views/RMS/components/oilPrice.vue

@@ -7,7 +7,7 @@
         v-model="textInput"
         clearable>
       </el-input>
-      <el-button type="primary" class="btn"  @click="onclick">
+      <el-button type="primary" class="btn1"  @click="onclick" :loading="selectLoading">
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" class="btn" @click="toInsert">
@@ -15,15 +15,29 @@
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options">
+      <dilTable 
+        v-bind.sync="options"
+        :isKuang="isKuang"
+        @func="func"
+        :loading="tableLoading"
+      >
         <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
             <el-button
               type="text"
               size="small"
-              @click="updateOilPrice(scope)"
+              @click="onEnable(scope)"
+              v-if="scope.row.priceStatus !== '启用'"
             >
-              修改
+              启用
+            </el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="onDeactivate(scope)"
+              v-else
+            >
+              停用
             </el-button>
             <el-button
               type="text"
@@ -43,6 +57,11 @@ export default {
   name:"homeworkPath",
   data(){
     return{
+      tableLoading:false,
+      selectLoading:false,
+      isKuang:false,
+      //切换是否启用按钮和停用按钮
+      enableStatus:true,
       textInput: "" ,
       restaurants: [],
       options:{
@@ -52,64 +71,61 @@ export default {
     }
   },
   methods:{
+    func(res){
+      if(this.selectLoading){
+        this.selectLoading = false;
+      }
+      this.isKuang = false;
+      this.tableLoading = false;
+    },
     onclick(){
-      this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&con=" +this.textInput;
+      this.isKuang = true;
+      this.selectLoading = true;
+      this.tableLoading = true;
+      if(this.textInput){
+        this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&con=" +this.textInput+"&i="+ new Date();
+      }else{
+        this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&i="+ new Date();
+      }
     },
-
+    //跳转到新增页面
     toInsert() {
       this.$router.push("/addOilPrice");
-
-    },
-    /*这里要改一改*/
-    updateOilPrice(scope){
-      console.log(scope.row.priceId)
-      this.$router.push("/editOilPrice/"+scope.row.priceId)
     },
     deleteOilPrice(scope){
-      this.$confirm("是否删除", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-        .then(() => {
-          this.axios
-            .post("/api/v1/rms/deleteOilPrice/" + scope.row.priceId)
-            .then((res) => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "删除成功!",
-                });
-                this.$router.go(0);
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning",
-                });
-              }
-            });
+     this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.tableLoading = true;
+        this.axios.post('/api/v1/rms/deleteOilPrice/'+scope.row.priceId).then((res)=>{
+          if(res.data.code == "200"){
+            this.$message.success('删除成功')
+            this.options.requestUrl = "/api/v1/rms/getOilPriceResultList?apiId=380&i="+ new Date();
+          }
         })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "删除操作已取消!",
-          });
-        });
+      }).catch(() => {
+        this.$message.info('已取消删除');       
+      });
     },
   },
-
 }
-
 </script>
 
 <style lang="scss" scode>
 .steel_inbound{
   .sache{
-    padding: 1.25rem 0.375rem;
+    width: 100%;height: 100px;
+    display: flex;
+    align-items: center;
     .el-input {
-      width: 20%;
-      margin-right: 1.25rem;
+      width: 250px;
+      margin-left: 50px;
+      margin-right: 30px;
+    }
+    .btn1{
+      margin-right: 30px;
     }
   }
   }

+ 1 - 0
src/views/RMS/components/supplier.vue

@@ -71,6 +71,7 @@ export default {
         center: true,
       })
         .then(() => {
+          console.log("scope.row.supplierId",scope.row.supplierId)
           this.axios
             .post("/api/v1/rms/deleteSupplier/" + scope.row.supplierId)
             .then((res) => {

+ 6 - 0
src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/addTransportOrder.vue

@@ -257,6 +257,12 @@ export default {
 
 <style lang='scss'>
 .addSaleOrderSend {
+  .el-drawer__body {
+   overflow: auto;
+}
+.el-drawer__container ::-webkit-scrollbar{
+    display: none;
+}
   .from {
     margin-top: 20px;
     .line {

+ 1 - 1
src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/outFactory.vue

@@ -27,7 +27,7 @@ export default {
     };
   },
   created(){
-      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
           this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=13"
       }else{
           this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=13&userId=" + getCookie("orgCode")

+ 36 - 17
src/views/SporadicManage/components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue

@@ -94,7 +94,7 @@
         </el-autocomplete>
         </el-form-item>
         </el-form>
-        <el-form
+        <!-- <el-form
         :inline="true"
         class="demo-form-inline"
         label-width="80px"
@@ -109,7 +109,7 @@
         >
         </el-input>
         </el-form-item>
-        </el-form>
+        </el-form> -->
         <el-form
         :inline="true"
         class="demo-form-inline"
@@ -228,7 +228,7 @@
       <el-button type="primary" @click="makeSure1">确定</el-button>
       <div class="tablecls">
         <!-- 查询所有的物资 -->
-        <dilTable ref="materialTable" v-bind.sync="materialOptions" @radio-change="selectionChange">
+        <dilTable ref="materialTable" v-bind.sync="materialOptions" @radio-change="selectionChange" :drawer="aaadrawer">
         </dilTable>
       </div>
     </el-drawer>
@@ -270,6 +270,7 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      aaadrawer:false,
       disabled:false,
       materialTimes:null,
       options: [],
@@ -312,7 +313,7 @@ export default {
           width: "140",
         },
         {
-          prop: "Specification",
+          prop: "materialSpecification",
           label: "规格型号",
           width: "140",
         },
@@ -382,6 +383,13 @@ export default {
         });
       }
     },
+    table(val){
+      if(val){
+        this.aaadrawer = false;
+      }else{
+        this.aaadrawer = true;
+      }
+    }
   },
   methods: {
     //关闭运输线路
@@ -392,7 +400,7 @@ export default {
     },
     onclickMaterial(){
         if(this.inputMaterial != null){
-          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"+ "&index=" + this.inputMaterial
+          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&index=" + this.inputMaterial
         }
         else{
           this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"
@@ -419,7 +427,7 @@ export default {
       }
     },
     drawTable(){
-      this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&test=" + new Date()
+      this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395" +"&test=" + new Date()
       this.selectionList1 = []
       this.table = true
     },
@@ -497,14 +505,20 @@ export default {
     },
     // 返回主界面
     makeSure1() {
-      console.log(this.selectionList1)
-        this.selectionList1.materialPriority = 1
-        this.tableData.push(this.selectionList1);  
-        console.log(this.tableData)
-        console.log(this.tableData)  
-        this.selectionList1 = [];
-        this.table = false;
-        console.log(this.selectionList1)
+        if(this.tableData.length != 0){
+          this.$message.error("物资已选择,请删除后重试")
+          return
+        }
+        console.log(JSON.stringify(this.selectionList1).length)
+        if(JSON.stringify(this.selectionList1).length != 2){
+            this.selectionList1.materialPriority = 1
+            console.log(JSON.stringify(this.selectionList1))
+            this.tableData.push(this.selectionList1);  
+            this.selectionList1 = [];
+            this.table = false;
+        }else{
+          this.$message.error("请选择物资!")
+        }     
     },
     //取消模态框多选
     open() {
@@ -536,8 +550,13 @@ export default {
       }
     },
     ondrawer(num) {
-      this.line.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&test=1";
+      if(getCookie("orgCode") == "biemeierchejian"){
+        this.line.requestUrl =
+          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + "二厂:零星单拼出厂" 
+      }else{
+        this.line.requestUrl =
+          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" + "&t=" + new Date();
+      }
       this.drawer = true;
       this.a = num;
     },
@@ -589,7 +608,7 @@ export default {
           orderType:this.orderType,
           carrierId: this.carrierId,
           receiveId: this.consigneeId,
-          orderTime:this.materialTimes,
+          // orderTime:this.materialTimes,
           userId:getCookie("orgCode"),
           mapList: this.tableData,
         };

+ 13 - 13
src/views/SporadicManage/components/sporadicMaterial/transportAppoint/transportAppoint.vue

@@ -96,24 +96,24 @@ export default {
   },
   created(){
       if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=12&dispatchStatus=0",
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12",
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&orderType=12&dispatchStatus=0",
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12",
             this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1"       
       }else{
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=12&dispatchStatus=0&userId=" + getCookie("orgCode"),
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12&userId=" + getCookie("orgCode"),
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&orderType=12&dispatchStatus=0&userId=" + getCookie("orgCode"),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&userId=" + getCookie("orgCode"),
             this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&userId=" + getCookie("orgCode")
-      }
+      } 
   },
   methods: {
     getRequestUrl(){
       if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=12&dispatchStatus=0&test=" + new Date(),
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12&test=" + new Date(),
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&orderType=12&dispatchStatus=0&test=" + new Date(),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&test=" + new Date(),
             this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&test=" + new Date()
       }else{
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=12&dispatchStatus=0&userId=" + getCookie("orgCode") + "&test=" + new Date(),
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12&userId=" + getCookie("orgCode") + "&test=" + new Date(),
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&orderType=12&dispatchStatus=0&userId=" + getCookie("orgCode") + "&test=" + new Date(),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&userId=" + getCookie("orgCode") + "&test=" + new Date(),
             this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&userId=" + getCookie("orgCode") + "&test=" + new Date()
      }
     },
@@ -160,18 +160,18 @@ export default {
         if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu")
         {
           if(this.activeName == "first"){
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=12&dispatchStatus=0&con=" + this.input
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&orderType=12&dispatchStatus=0&con=" + this.input
           }else if(this.activeName == "second"){
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12&con=" + this.input
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&con=" + this.input
           }else{
             this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=11&con=" + this.input
           }                
         }else
         {
           if(this.activeName == "first"){
-            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=0&orderType=12&dispatchStatus=0&userId=" + getCookie("orgCode") + "&con=" + this.input
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&orderType=12&dispatchStatus=0&userId=" + getCookie("orgCode") + "&con=" + this.input
           }else if(this.activeName == "second"){
-            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=428&issueStatus=1&orderType=12&userId=" + getCookie("orgCode") + "&con=" + this.input
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&userId=" + getCookie("orgCode") + "&con=" + this.input
           }else{
             this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=11&userId=" + getCookie("orgCode") + "&con=" + this.input
           }       

+ 47 - 16
src/views/SporadicManage/components/sporadicMaterial/transportOrder/addTransportOrder.vue

@@ -153,23 +153,23 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
-        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=12&dispatchStatus=0&carrierSsoId=" + getCookie("userId");
+        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&dispatchStatus=0&carrierSsoId=" + getCookie("userId");
     } else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=12&dispatchStatus=0&sporadicStatus=0";
-    } else{
+        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&dispatchStatus=0&sporadicStatus=0";
+    }else if(getCookie("orgCode") == "biemeierchejian") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con=" + "铁专线精煤"; 
+      this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&dispatchStatus=0&sporadicStatus=0&userId=" + getCookie("orgCode");
+    }
+    else{
         this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=12&dispatchStatus=0&userId=" + getCookie("orgCode");
+        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&dispatchStatus=0&sporadicStatus=0&userId=" + getCookie("orgCode");
     }
   },
   methods: {
-    onInput(val){
-      if(!isNumber(val)){
-        this.$message.warning('重量请输入数字')
-      }
-    },
     //点击确定按钮的事件
     makeSure(){
        console.log(this.selectionList)
@@ -216,14 +216,36 @@ export default {
     },
     //车辆模态框框计算
     selectTruckClick(){
-      if (getCookie("orgCode") == "chengyunshang") {
+      if(this.truckText != null){
+        if (getCookie("orgCode") == "chengyunshang") {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
           getCookie("userId") + "&index="+this.truckText;
-      } else {
+      }else if(getCookie("orgCode") == "biemeierchejian") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con=" + "铁专线精煤" + "&index="+this.truckText;; 
+      
+    } 
+      else {
         this.truck.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index="+this.truckText;
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&index="+this.truckText;
       }
+        this.truckText = null
+      }else{
+         if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") + "&i=" + new Date()
+      }else if(getCookie("orgCode") == "biemeierchejian") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con=" + "铁专线精煤" + + "&i=" + new Date(); 
+    } 
+      else {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&i=" + new Date()
+      }
+      }
+    
     },
     //车辆表格
     currentRadioChange1(select){
@@ -241,18 +263,27 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId") + "&t=" + new Date();
-    } else {
+    }else if(getCookie("orgCode") == "biemeierchejian") {
       this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + + "&t=" + new Date();;
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con=" + "铁专线精煤" + "&t=" + new Date();
+    }
+     else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null  + "&t=" + new Date();
     } 
       this.truckDrawer = true
     },
   },
 };
 </script>
-
 <style lang='scss'>
 .addSaleOrderSend {
+  .el-drawer__body {
+   overflow: auto;
+  }
+  .el-drawer__container ::-webkit-scrollbar{
+    display: none;
+  }
   .from {
     margin-top: 20px;
     .line {

+ 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(){

+ 0 - 6
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

@@ -393,12 +393,6 @@ export default {
         }else if (this.onDrawerNumber == 6) {
           this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId="+this.supplierId+"&i="+new Date();
         }
-        }else if (a == 4) {
-        this.unloadPoint.requestUrl =
-          "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" + this.input;
-      } else if (a == 5) {
-        this.option.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
       }
     },
     ondrawer(num) {

+ 23 - 30
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,19 +389,10 @@ 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();
         }
-<<<<<<< HEAD
-=======
-      } else if (a == 4) {
-        this.unloadPoint.requestUrl =
-          "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" + this.input;
-      } else if (a == 5) {
-        this.option.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
->>>>>>> 9c1ccc273de01f5cc5dcdbff3c1f3ab12835836d
       }
     },
     ondrawer(num) {
@@ -420,24 +409,18 @@ export default {
         } else {
           this.third.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null  + "&i=" + new Date();
         }
-<<<<<<< HEAD
       } 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();
-=======
-      }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();
->>>>>>> 9c1ccc273de01f5cc5dcdbff3c1f3ab12835836d
       }
+      
     },
     // 返回
     onClickCancel() {
-      this.$router.push("/transportReserveRan");
+      this.$router.push("/transportationReservation");
     },
     currentRadioChange1(selection) {
       this.materialName = selection.materialName;
@@ -458,6 +441,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>

+ 49 - 64
src/views/appoint/components/saleContract/transportPrice.vue

@@ -3,18 +3,16 @@
   <div class="salePlan">
     <div class="top">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
+      <el-button type="primary" class="btn" @click="onclick" :loading="loading">
         <i class="el-icon-search"></i>查询
       </el-button>
-      
-
       <el-button type="primary" @click="btnclick(0)">
         <i class="el-icon-plus"></i>新增
       </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">
-      <el-table-column fixed="right" label="操作" width="200">
+    <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"
             >修改</el-button
@@ -26,7 +24,7 @@
             >删除</el-button
           >
         </template>
-      </el-table-column>
+      </el-table-column> -->
     </dilTable>
   </div>
 </template>
@@ -35,6 +33,8 @@ export default {
   name: "TransportPrice",
   data() {
     return {
+      isKuang:false,
+      loading:false,
       input: "",
       option: {
         // 表格请求数据的地址
@@ -45,70 +45,55 @@ export default {
     };
   },
   methods: {
+    func(){
+      this.loading = false;
+      this.isKuang = false;
+    },
     onclick() {
-      this.option.requestUrl =
-        "/api/v1/ams/getAmsContractTransportPrice?apiId=109&con=" +
-        this.input;
+      this.loading = true;
+      this.isKuang = true;
+      if(this.input){
+        this.option.requestUrl ="/api/v1/ams/getAmsContractTransportPrice1?apiId=109&con=" +this.input;
+      }else{
+        this.option.requestUrl ="/api/v1/ams/getAmsContractTransportPrice1?apiId=109&i="+new Date();
+      }
     },
     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;

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

@@ -0,0 +1,233 @@
+<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(){
+            this.axios.get('/game/v1/rflemplotterys/').then((res)=>{
+                this.tableData1 = res.data.list
+            })
+            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;
+            
+            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',

+ 3 - 3
src/views/inward/components/truckAppoint/addRequirement.vue

@@ -149,7 +149,7 @@ export default {
         mapList3: [],
       },
       unloadPoint: {
-        requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
+        requestUrl: "",
         selectionType: "radio",
       },
     };
@@ -162,7 +162,7 @@ export default {
     },
   },
   created() {
-   
+      this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374"
   },
   methods: {
     onClick(index) {
@@ -215,7 +215,7 @@ export default {
           this.input;
       } else if (a == 4) {
         this.unloadPoint.requestUrl =
-          "/api/v1/uc/getUnloadingMesByLike?apiId=347&index=" + this.input;
+          "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=" + this.input + "&i=" + new Date();
       }
     },
     ondrawer(num) {

+ 0 - 1
src/views/inward/components/truckAppoint/purInwardRequirement.vue

@@ -144,7 +144,6 @@ export default {
         });
     },
     stopRequirement(scope){
-
       this.$confirm("是否停用", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",

+ 14 - 3
src/views/inward/components/truckOrder/addPurInwardOrder.vue

@@ -167,7 +167,7 @@ export default {
       lineDrawer:false,
       //线路的表格
       line: {
-        requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
+        requestUrl: "",
         selectionType: "radio",
       },
       //已经选择车辆物资信息
@@ -203,10 +203,18 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
+        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"
         this.option.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2&carrierSsoId=" + getCookie("userId");
-    } else {
+    }else if(getCookie("orgCode") == "biemeierchejian"){
+         this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con="+"铁专线精煤";
+        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" + "&con=" + "采购内转"
+        this.option.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2";
+    } 
+    else {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
+        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"
         this.option.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2";
     } 
   },
@@ -306,7 +314,10 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
-    } else {
+    }else if(getCookie("orgCode") == "biemeierchejian"){
+         this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con="+"铁专线精煤"
+    }else {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
     } 

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

+ 19 - 4
src/views/statisticalReport/components/sporadicReport/sporadicReportEnterFactory.vue

@@ -1,11 +1,11 @@
 <template>
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
-      <span>进厂时间:</span>
-      <el-date-picker v-model="startTime" type="date" placeholder="选择日期">
+      <span>计皮时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
       <span>至</span>
-      <el-date-picker v-model="endTime" type="date" placeholder="选择日期">
+      <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>查询
@@ -13,9 +13,13 @@
       <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="totalNumber" :disabled="true" style="width: 100px;"></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"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
     </div>
   </div>
 </template>
@@ -26,6 +30,8 @@ import { getCookie } from '@/utils/util.js';
 export default {
   data() {
     return {
+      totalNumber:null,
+      totalCapacity:null,
       option: {
         requestUrl:'',
       },
@@ -55,6 +61,15 @@ export default {
     }
   },
   methods: {
+     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;
+    },
     getRequestUrl(){
         if (
       getCookie("orgCode") == "dagangadmin" ||

+ 19 - 4
src/views/statisticalReport/components/sporadicReport/sporadicReportExFactory.vue

@@ -1,17 +1,17 @@
 <template>
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
-      <span>进厂时间:</span>
+      <span>计毛时间:</span>
       <el-date-picker
         v-model="startTime"
-        type="date"
+        type="datetime"
         placeholder="选择日期"
       >
       </el-date-picker>
       <span>至</span>
       <el-date-picker
         v-model="endTime"
-        type="date"
+        type="datetime"
         placeholder="选择日期"
       >
       </el-date-picker>
@@ -19,9 +19,13 @@
         <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="totalNumber" :disabled="true" style="width: 100px;"></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"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
     </div>
   </div>
 </template>
@@ -32,6 +36,8 @@ import { getCookie } from '@/utils/util.js';
 export default {
   data() {
     return {
+      totalNumber:null,
+      totalCapacity:null,
       option: {
         requestUrl: "",
       },
@@ -50,6 +56,15 @@ export default {
       }
   },
   methods: {
+    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;
+    },
     getRequestUrl(){
         if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
           this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=null&endTime=null&i=' +new Date();

+ 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}
 
     ]
   }