zhouzh 3 vuotta sitten
vanhempi
commit
324d42c8c6
57 muutettua tiedostoa jossa 1843 lisäystä ja 618 poistoa
  1. 3 3
      build/utils.js
  2. 4 3
      config/index.js
  3. BIN
      dist.zip
  4. 2 2
      src/components/DilCommonUI/packages/table/src/table.vue
  5. 4 0
      src/views/RMS/app.js
  6. 62 3
      src/views/RMS/components/addRmsShipper.vue
  7. 28 26
      src/views/RMS/components/capacity.vue
  8. 2 2
      src/views/RMS/components/rmsShipper.vue
  9. 29 9
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/enFactory.vue
  10. 26 6
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/enFactory.vue
  11. 35 2
      src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/enFactory.vue
  12. 35 2
      src/views/SporadicManage/components/sporadicMaterial/sporadicEnfactory/enFactory.vue
  13. 35 2
      src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/enFactory.vue
  14. 21 7
      src/views/TMS/components/importedFuel/transportReserveRan.vue
  15. 12 1
      src/views/TMS/components/importedFuel/truckDriverReceiveRan.vue
  16. 35 3
      src/views/TMS/components/importedFuel/truckEnfactoryRanLaoResult.vue
  17. 35 2
      src/views/TMS/components/importedFuel/truckEnfactoryRanXingResult.vue
  18. 24 5
      src/views/TMS/components/importedIngredients/transportReserveFu.vue
  19. 84 27
      src/views/TMS/components/importedIngredients/transportReserveFuAddIngredients.vue
  20. 13 1
      src/views/TMS/components/importedIngredients/truckDriverReceiveFu.vue
  21. 35 2
      src/views/TMS/components/importedIngredients/truckEnfactoryFuResult.vue
  22. 0 22
      src/views/TMS/components/importedIngredients/truckLeaveFactoryFuResult.vue
  23. 35 2
      src/views/TMS/components/importedTruck/truckEnfactoryResult.vue
  24. 0 5
      src/views/TMS/components/importedTruck/truckLeaveFactoryResult.vue
  25. 35 2
      src/views/TMS/components/purchaseChemicalMaterials/purchaseChemicalMaterialsNEW/enterFactoryNew.vue
  26. 35 2
      src/views/TMS/components/purchaseChemicalMaterials/purchaseChemicalMaterialsOLD/enterFactoryOld.vue
  27. 0 17
      src/views/TMS/components/purchaseChemicalMaterials/purchaseChemicalMaterialsOLD/exFactoryOld.vue
  28. 13 7
      src/views/TMS/components/purchaseChemicalMaterials/transportationReservation.vue
  29. 7 0
      src/views/WMS/components/steel/addSteelInbound.vue
  30. 4 0
      src/views/WMS/components/steel/addSteelReserved.vue
  31. 4 0
      src/views/WMS/components/steel/bar1_steel/bar1_addSteelInbound.vue
  32. 7 0
      src/views/WMS/components/steel/bar1_steel/bar1_addSteelReserved.vue
  33. 4 0
      src/views/WMS/components/steel/bar2_steel/bar2_addSteelInbound.vue
  34. 4 0
      src/views/WMS/components/steel/bar2_steel/bar2_addSteelReserved.vue
  35. 1 0
      src/views/WMS/components/steel/bar2_steel/bar2_steel_inboundReal.vue
  36. 26 14
      src/views/appoint/components/saleContract/addSaleOrderCoproductSend.vue
  37. 28 14
      src/views/appoint/components/saleContract/addSaleOrderCoproductSendCarrier.vue
  38. 35 2
      src/views/inward/components/inwardFactory/enFactoryResult.vue
  39. 35 6
      src/views/inward/components/inwardImport/daZhou/enFactoryResult.vue
  40. 42 13
      src/views/inward/components/inwardImport/oldAreaRailScale/enFactory.vue
  41. 35 5
      src/views/inward/components/offsetSteel/truckTransport/enFactoryResult.vue
  42. 38 99
      src/views/inward/components/truckAppoint/addPlan.vue
  43. 0 1
      src/views/inward/components/truckAppoint/addRequirement.vue
  44. 53 18
      src/views/inward/components/truckAppoint/addRequirement2.vue
  45. 199 0
      src/views/inward/components/truckAppoint/getRequirementOrder.vue
  46. 27 2
      src/views/inward/components/truckAppoint/plan.vue
  47. 7 110
      src/views/inward/components/truckAppoint/requirement.vue
  48. 45 24
      src/views/inward/components/truckOrder/decomposePlan.vue
  49. 209 0
      src/views/inward/components/truckOrder/getPlanOrder.vue
  50. 27 133
      src/views/inward/components/truckOrder/plan.vue
  51. 8 1
      src/views/inward/router/index.js
  52. 36 6
      src/views/sale/components/transport_excute/enFactoryResult.vue
  53. 7 3
      src/views/sale/components/transport_order/receiveOrder.vue
  54. 100 0
      src/views/statisticalReport/components/inwardReport/getLoading.vue
  55. 100 0
      src/views/statisticalReport/components/inwardReport/getUnLoading.vue
  56. 106 0
      src/views/statisticalReport/components/inwardReport/inwardFactory.vue
  57. 7 2
      src/views/statisticalReport/router/index.js

+ 3 - 3
build/utils.js

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

+ 4 - 3
config/index.js

@@ -64,15 +64,16 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    //target: "http://172.16.33.166:8080",
-     target: "http://localhost:8080",
+    target: "http://172.16.33.166:8019",
+    // target: "http://localhost:8080",
+    // target: "http://192.168.1.107:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"
     }
   },
   "/views/api/v1": {
-    target: "http://localhost:8080",
+    target: "http://172.16.33.166:8019",
     // target: "http://172.16.33.166:8080",
     // target: "http://192.168.1.115:8080",
     ws: true,

BIN
dist.zip


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

@@ -162,7 +162,7 @@ export default {
     },
     // 是否在数据翻页后保留之前选中的数据(需指定 row-key)
     reserveSelection: {
-      default: false,
+      default: true,
     },
     // 是否为斑马纹 table
     stripe: {
@@ -256,7 +256,7 @@ export default {
     // 刷新表格数据
     refreshData() {
       this.requestData();
-      //多选表格清空用户的选择
+      // 多选表格清空用户的选择
       this.$refs.mainTable.clearSelection();
     },
     toggleRowExpansion(row, expanded) {

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

@@ -25,6 +25,10 @@ Vue.use(VueApollo)
 import DilCommonUI from "@/components/DilCommonUI";
 Vue.use(DilCommonUI);
 
+// 导出Excel全局组件
+import tableToExcel from '@/components/exportExcel/exportExcel'
+Vue.use(tableToExcel)
+
 const apolloProvider = new VueApollo({
     defaultClient: apollo
 })

+ 62 - 3
src/views/RMS/components/addRmsShipper.vue

@@ -6,6 +6,22 @@
        <!-- 323 -->
         <dil-form :formId="323" v-model="form1" ref="from1"></dil-form>
       </div>
+      <div class="department2">
+         <span>二级部门:</span>
+        <el-select v-model="value1" placeholder="请选择" @change="onchange1">
+          <el-option
+            v-for="(item,i) in options1"
+            :key="i"
+            :label="item.label"
+            :value="item.value"
+            >
+            </el-option>
+          </el-select>       
+      </div>
+      <div class="department2">
+        <span>三级部门:</span>
+        <el-input v-model="input" placeholder="请输入内容"></el-input>
+      </div>
     <div class="button-box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
@@ -23,22 +39,59 @@ export default {
       form1: {},
       value: undefined,
       shipperName:"四川达钢",
-      shipperAbbreviation:"四川达钢"
+      shipperAbbreviation:"四川达钢",
+      //二级部门
+      options1:[],
+      //选中的二级部门名称
+      value1:'',
+      input:''
     };
   },
   mounted() {
     this.form1.shipperName = this.shipperName;
     this.form1.shipperAbbreviation = this.shipperAbbreviation;
+    //初始化二级机构和角色
+    this.initialization();
   },
   methods: {
+    initialization(){
+       //初始化选择二级机构
+         this.axios.get('/api/v1/rms/getSecondShipper').then((res)=>{
+             this.options1 = res.data.data;
+         })
+         //初始化角色
+        const formData = new FormData();
+        this.$store.dispatch('system/rolesManage/list',formData)
+        .then((res)=>{
+          var roleList = [];
+          roleList=res.data;
+          roleList.forEach((item,i)=>{
+              if(item.roleId!='superadmin'){
+                this.options3.push(item);
+              }
+          })
+          // this.options3 = res.data;
+        })
+     },
+    onchange1(val){
+            //  查询选中的二级机构下的三级机构
+             this.value2 = '';
+             this.axios.get('/api/v1/rms/getThirdShipper?shipperId='+val).then((res)=>{
+             this.options2 = res.data.data;    
+         })
+         //获取二级部门的机构ID和机构编码
+         this.axios.post('/api/v1/rms/getShipperMap?shipperId='+val).then((res)=>{
+             this.map1 = res.data.data;
+         })
+     },
      makeSure() {
        console.log(this.form1)
        let RmsShipper={
         shipperName: this.form1.shipperName,
         shipperAbbreviation: this.form1.shipperAbbreviation,
         shipperId:this.form1.shipperId,
-        shipperCompanyBranch:this.form1.shipperCompanyBranch,
-        shipperBranchFactory:this.form1.shipperBranchFactory
+        shipperCompanyBranch:this.value1,
+        shipperBranchFactory:this.input
       };
       if(
         RmsShipper.shipperName==null ||
@@ -102,4 +155,10 @@ export default {
     }
   }
 }
+.department2{
+  display: flex;
+  justify-content: center;
+  margin-left: 36%;
+  width: 250px;
+}
 </style>

+ 28 - 26
src/views/RMS/components/capacity.vue

@@ -13,32 +13,34 @@
        <el-button type="primary" class="btn" @click="toInsert">
         <i class="el-icon-plus"></i>新增
       </el-button>
+      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
     </div>
     <div class="table">
-      <dilTable 
+      <dilTable
+        ref="excelDom"
         v-bind.sync="options"
         :loading="tableloading"
         @func="func"
         :isKuang="isKuang"
       >
-        <!-- <el-table-column fixed="right" label="操作" width="100">
+        <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
-            <el-button
+            <!-- <el-button
               type="text"
               size="small"
               @click="updateCapacity(scope.row.capacityId)"
             >
               修改
-            </el-button>
+            </el-button> -->
             <el-button
               type="text"
               size="small"
-              @click="deleteCapacity(scope.row.capacityId)"
+              @click="deleteCapacity(scope.row)"
               v-if="show==true">
               删除
             </el-button>
           </template>
-        </el-table-column> -->
+        </el-table-column>
       </dilTable>
     </div>
   </div>
@@ -63,7 +65,7 @@ export default {
     }
   },
   created(){
-    if(getCookie("orgCode") == "wuliuchuyunzhongxin" || getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+    if(getCookie("orgCode") == "wuliuchuyunzhongxin" || getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "chengyunshang"){
         this.show = true
     }
     if(getCookie("orgCode") == "chengyunshang"){
@@ -118,30 +120,30 @@ export default {
       this.axios.delete("pass/v1/sysusers/" + userId) .then((res) => {
       });
     },
-    deleteCapacity(capacityId) {
-        if(getCookie("orgCode") == "wuliuchuyunzhongxin" || getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.$confirm('是否删除?', '提示', {
+    deleteCapacity(row) {
+      console.log("row",row)
+      let map = {
+        carrierSSOId : getCookie("userId"),
+        capacityId : row.capacityId
+      }
+        if(getCookie("orgCode") == "wuliuchuyunzhongxin" || getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "chengyunshang"){
+          this.$confirm('是否删除与车牌号('+row.capacityNumber+')的绑定关系?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning',
         }).then(() => {
           this.axios
-          .post("/api/v1/rms/deleteCapacity/" + capacityId)
+          .post("/api/v1/rms/deleteCapacityCarrier",map)
           .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",
-              });
+            if(res.data.code=='0'){
+              this.$message.success("删除成功!")
+              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();
+              } 
             }
           });
         }).catch(() => {
@@ -151,7 +153,7 @@ export default {
           });          
         });
         }else{
-          this.$message.error("!权限不足,请联系管理员")
+          this.$message.error("权限不足,请联系管理员!")
         }  
       },
     },

+ 2 - 2
src/views/RMS/components/rmsShipper.vue

@@ -46,13 +46,13 @@ export default {
       inputText:"",
       options:{
         // first请求数据的地址
-        requestUrl: "/api/v1/rms/getShipperList?apiId=344",
+        requestUrl: "/api/v1/rms/getShipperList?apiId=451",
       },
     }
   },
   methods:{
     onclick(){
-      this.options.requestUrl="/api/v1/rms/getShipperList?apiId=344&con=" + this.inputText;
+      this.options.requestUrl="/api/v1/rms/getShipperList?apiId=451&con=" + this.inputText;
       console.log(this.textInput)
     },
     toInsert() {

+ 29 - 9
src/views/SporadicManage/components/moreThanMaterialTruck/sporadicEnfactory/enFactory.vue

@@ -3,7 +3,12 @@
   <!-- 零星物资进厂作业页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
@@ -15,11 +20,14 @@
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
       input: null,
+      startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "",
@@ -35,12 +43,23 @@ export default {
   },
   methods: {
     onclick() {
-      if(this.input != null){
+      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) {
           if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
-          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=15&con=" + this.input
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=15&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           }else{
-          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=15&userId=" + getCookie("orgCode") + "&con=" + this.input
-               }
+            this.startTime = null;
+            this.endTime = null;
+            this.$message.warning("开始时间要比结束时间早");
+          }
       }else{
           this.$message.warning("未输入查询条件")
           if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
@@ -48,10 +67,11 @@ export default {
           }else{
           this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=15&userId=" + getCookie("orgCode")
           }
-      }  
-    },
-  },
-};
+      }
+      }
+    }
+  }
+}
 </script>
 <style lang='scss' scoped>
 .homeworkPath {

+ 26 - 6
src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/enFactory.vue

@@ -3,7 +3,12 @@
   <!-- 零星物资出厂作业页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
@@ -15,11 +20,14 @@
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
       input: null,
+      startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "",
@@ -35,12 +43,23 @@ export default {
   },
   methods: {
     onclick() {
-      if(this.input != null){
+      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) {
           if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
-          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=16&con=" + this.input
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=16&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           }else{
-          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=16&userId=" + getCookie("orgCode") + "&con=" + this.input
-               }
+          this.startTime = null;
+            this.endTime = null;
+            this.$message.warning("开始时间要比结束时间早");
+          }
       }else{
           this.$message.warning("未输入查询条件")
           if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baoweibu"){
@@ -48,7 +67,8 @@ export default {
           }else{
           this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=16&userId=" + getCookie("orgCode")
           }
-      }  
+        }  
+      }
     },
   },
 };

+ 35 - 2
src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/enFactory.vue

@@ -3,7 +3,12 @@
   <!-- 零星物资进厂作业页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
@@ -15,11 +20,14 @@
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
       input: "",
+      startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "",
@@ -36,7 +44,32 @@ export default {
   },
   methods: {
     onclick() {
-      this.$message.info("功能暂时关闭")
+      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) {
+          // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+          // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }else{
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
     },
   },
 };

+ 35 - 2
src/views/SporadicManage/components/sporadicMaterial/sporadicEnfactory/enFactory.vue

@@ -3,7 +3,12 @@
   <!-- 零星物资进厂作业页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
@@ -14,12 +19,15 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
       input: "",
+      startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "",
@@ -35,7 +43,32 @@ export default {
   },
   methods: {
     onclick() {
-      this.$message.info("功能暂时关闭")
+      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) {
+          // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=12&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+          // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }else{
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
     },
   },
 };

+ 35 - 2
src/views/SporadicManage/components/sporadicMaterial/sporadicOutfactory/enFactory.vue

@@ -3,7 +3,12 @@
   <!-- 零星物资进厂作业页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
@@ -14,12 +19,15 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
     return {
       input: "",
+      startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "",
@@ -35,7 +43,32 @@ export default {
   },
   methods: {
     onclick() {
-      this.$message.info("功能暂时关闭")
+      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) {
+          // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+          // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }else{
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
     },
   },
 };

+ 21 - 7
src/views/TMS/components/importedFuel/transportReserveRan.vue

@@ -114,6 +114,24 @@ export default {
     }
   },
   methods: {
+    getRequestUrl(){
+         //判断是否是承运商
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.option1.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=1&carrierSSOId=" +
+        getCookie("userId") + "&i=" + new Date();
+      this.option2.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1&carrierSSOId=" +
+        getCookie("userId") + "&i=" + new Date();;
+    } else {
+      this.option1.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=1&carrierSSOId=" +
+        null + "&i=" + new Date();;
+      this.option2.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=1&carrierSSOId=" +
+        null + "&i=" + new Date();;
+    }
+    },
     onclick() {
       if (this.activeName == "first") {
         //判断是否是承运商
@@ -159,9 +177,7 @@ export default {
           type: "success",
           message: "下发成功!",
         });
-        this.option1.requestUrl =
-          "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=1&i=" +
-          new Date();
+        this.getRequestUrl()
       });
     },
     // 下发
@@ -181,9 +197,7 @@ export default {
               type: "success",
               message: "下发成功!",
             });
-            this.option1.requestUrl =
-              "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=1&i=" +
-              new Date();
+            this.getRequestUrl()
           });
         })
         .catch(() => {
@@ -212,7 +226,7 @@ export default {
               capacityNumber: capacityNumber,
             })
             .then(() => {
-              this.$router.go(0);
+              this.getRequestUrl()
             });
         })
         .catch(() => {

+ 12 - 1
src/views/TMS/components/importedFuel/truckDriverReceiveRan.vue

@@ -90,6 +90,17 @@ export default {
     }
   },
   methods: {
+    getRequestUrl(){
+      if (getCookie("orgCode") == "chengyunshang") {
+      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
+      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
+      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
+    } else {
+      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&carrierSSOId=" + null +"&i="+new Date();
+      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&carrierSSOId=" + null +"&i="+new Date();
+      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&carrierSSOId=" + null +"&i="+new Date();
+    }
+    },
     onclick() {
     if (getCookie("orgCode") == "chengyunshang") {
        if(this.activeName == "option"){
@@ -118,7 +129,7 @@ export default {
         this.axios.post('/api/v1/oms/deleteOrders',{list:this.list}).then((res)=>{
           if(res.data.code == "200"){
             this.$message.success('关闭成功')
-            this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&con=" + this.input +"&i="+new Date();
+            this.getRequestUrl()
           }
         })
       }

+ 35 - 3
src/views/TMS/components/importedFuel/truckEnfactoryRanLaoResult.vue

@@ -1,8 +1,12 @@
 <template>
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
     </div>
@@ -13,11 +17,14 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
       restaurants: [],
+      startTime: null,
+      endTime: null,
       input: "",
       option: {
         // 表格请求数据的地址
@@ -28,7 +35,32 @@ export default {
 
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=6&con=" + this.input;
+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) {
+          // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=6&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+          // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }else{
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
     },
     updateClick(resultId) {
       this.$router.push("/truckLoadResultEdit/" + resultId);

+ 35 - 2
src/views/TMS/components/importedFuel/truckEnfactoryRanXingResult.vue

@@ -1,7 +1,12 @@
 <template>
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
@@ -13,11 +18,14 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
       restaurants: [],
+      startTime: null,
+      endTime: null,
       input: "",
       option: {
         // 表格请求数据的地址
@@ -28,7 +36,32 @@ export default {
  
   methods: {
     onclick() {
-            this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=7&con=" + this.input;
+      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) {
+          // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=210&orderType=2&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+          // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }else{
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
     },
     updateClick(resultId) {
       this.$router.push("/truckLoadResultEdit/" + resultId);

+ 24 - 5
src/views/TMS/components/importedIngredients/transportReserveFu.vue

@@ -24,7 +24,7 @@
         <i class="el-icon-plus"></i>下发
       </el-button>
     </div>
-    <el-tabs v-model="activeName">
+    <el-tabs v-model="activeName" tab-click="handleClick">
       <!-- 未下发 -->
       <el-tab-pane label="未下发" name="first">
         <dilTable
@@ -114,6 +114,27 @@ export default {
     }
   },
   methods: {
+    handleClick(){
+      this.getRequestUrl()
+    },
+    getRequestUrl(){
+        //判断是否是承运商
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.option1.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&carrierSSOId=" +
+        getCookie("userId") + "&i=" + new Date();
+      this.option2.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
+        getCookie("userId") + "&i=" + new Date();
+    } else {
+      this.option1.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&carrierSSOId=" +
+        null + "&i=" + new Date();
+      this.option2.requestUrl =
+        "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
+        null + "&i=" + new Date();
+    }
+    },
     onclick() {
       if (this.activeName == "first") {
         //判断是否是承运商
@@ -181,9 +202,7 @@ export default {
               type: "success",
               message: "下发成功!",
             });
-            this.option1.requestUrl =
-              "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&i=" +
-              new Date();
+            this.getRequestUrl()
           });
         })
         .catch(() => {
@@ -212,7 +231,7 @@ export default {
               capacityNumber: capacityNumber,
             })
             .then(() => {
-              this.$router.go(0);
+              this.getRequestUrl()
             });
         })
         .catch(() => {

+ 84 - 27
src/views/TMS/components/importedIngredients/transportReserveFuAddIngredients.vue

@@ -59,6 +59,29 @@
           >浏览</el-button
         >
       </div>
+    </div>
+      <!-- 物资和装卸点以及装卸货次序 -->
+    <div class="swtichTop">
+    <span class="titile">选择车辆前请选择物资单位!</span>
+    <div class="switch" v-if="selectionList.length > 0">
+      <el-tooltip placement="top">
+        <div slot="content">下面表格已有数据,不能进行更改!!!</div>
+        <el-switch
+          v-model="value"
+          active-text="件数"
+          inactive-text="重量"
+          disabled
+        >
+        </el-switch>
+      </el-tooltip>
+    </div>
+    <div class="switch" v-else>
+      <el-tooltip placement="top">
+        <div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
+        <el-switch v-model="value" active-text="件数" inactive-text="重量">
+        </el-switch>
+      </el-tooltip>
+    </div>
     </div>
     <div class="truckListTable">
       <el-table
@@ -89,6 +112,14 @@
                   v-model.number="scope.row.orderMaterialWeight"
                 ></el-input>
               </template>
+              <!-- 物资件数 -->
+              <template v-if="item.prop == 'orderMaterialNumber'">
+                <el-input
+                  class="textinput"
+                  v-model.number="scope.row.orderMaterialNumber"
+                  @input="onInputNumber(scope.row.orderMaterialNumber)"
+                ></el-input>
+              </template>
             </template>
             <template v-else>
               <span>{{ scope.row[item.prop] }}</span>
@@ -144,11 +175,8 @@
         <dilTable
           v-bind.sync="third"
           @selection-change="currentRadioChange3"
-          :isKuang="isKuang"
-          @func="func"
           :isHeigth="isHeigth2"
           :shiyHeigth="shiyHeigth2"
-          :drawer="drawer"
         ></dilTable>
       </div>
       <div v-show="onDrawerNumber == 4">
@@ -221,17 +249,6 @@ export default {
       //采购订单号
       purchaseOrderNo: "",
       isMoreTrips: false,
-      //订单类别
-      orderTypeList: [
-        {
-          value: 6,
-          label: "老厂区",
-        },
-        {
-          value: 7,
-          label: "新厂区",
-        },
-      ],
       // 线路名称
       lineName: "",
       //线路id
@@ -314,12 +331,30 @@ export default {
         requestUrl: "",
         selectionType: "radio",
       },
+      truckList:[]
     };
   },
   watch: {
     drawer(val) {
       if (val) {
         this.input = null;
+      }   
+    },
+    value() {
+      if (this.value) {
+        this.tableTop.splice(this.tableTop.length - 1, 1);
+        this.tableTop.push({
+          prop: "orderMaterialNumber",
+          label: "件数",
+          slot: true,
+        });
+      } else {
+        this.tableTop.splice(this.tableTop.length - 1, 1);
+        this.tableTop.push({
+          prop: "orderMaterialWeight",
+          label: "重量",
+          slot: true,
+        });
       }
     },
   },
@@ -481,18 +516,24 @@ export default {
         }
       }
     },
+    func(res) {
+      console.log(res);
+      this.isKuang = false;
+    },
+    refreshTable(){
+    },
     ondrawer(num) {
       if(this.supplierId == null){
           this.$message.warning("请先选择发货单位")
           return
       }
-      console.log(num)
       if(num != 1 && this.materialId == null){
           this.$message.warning("请先选择物资")
           return
       }
       this.drawer = true;
       this.onDrawerNumber = num;
+      this.refreshTable()
       if (num == 1) {
           this.frist.requestUrl =
           "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
@@ -556,12 +597,21 @@ export default {
       this.purchaseOrderId = selection.purchaseOrderId;
     },
     currentRadioChange3(selection) {
-      this.selectionList = [];
       this.selectionList = selection;
-    },
-    func(res) {
-      console.log(res);
-      this.isKuang = false;
+      console.log(selection)
+      selection.forEach((e) => {
+            var addmap = {
+              orderMaterialWeight:e.orderMaterialWeight,
+              carrierName:e.carrierName,
+              capacityNumber:e.capacityNumber,
+              remark:e.remark,
+              carrierId:e.carrierId,
+              capacityId:e.capacityId
+            };
+            this.selectionList.push(addmap)
+            console.log(this.selectionList)
+      })
+      this.truckList = selection
     },
     // 确认
     onClickConfirm() {
@@ -583,13 +633,6 @@ export default {
           });
           return;
         } 
-        // else if (!this.orderType) {
-        //   this.$message({
-        //     message: "请选择订单类别!",
-        //     type: "warning",
-        //   });
-        //   return;
-        // }
          else if (!this.supplierId) {
           this.$message({
             message: "请选择发货单位!",
@@ -722,6 +765,20 @@ export default {
     height: 1px;
   }
 }
+.swtichTop{
+  display: flex;
+  height: 40px;
+  align-content: center;
+  justify-content: center;
+  padding-right:20px ;
+  .titile{
+    color: red;
+    font-size: 14px;
+  }
+  .switch{
+    margin-right: -30px
+  }
+}
 .supplieUnit {
   display: flex;
   justify-content: center;

+ 13 - 1
src/views/TMS/components/importedIngredients/truckDriverReceiveFu.vue

@@ -90,6 +90,18 @@ export default {
     }
   },
   methods: {
+    getRequestUrl(){
+      //判断是否是承运商
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
+      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
+      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&carrierSSOId=" + getCookie("userId") +"&i="+new Date();
+    } else {
+      this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&carrierSSOId=" + null +"&i="+new Date();
+      this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&carrierSSOId=" + null +"&i="+new Date();
+      this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&carrierSSOId=" + null +"&i="+new Date();
+    }
+    },
     onclick() {
     if (getCookie("orgCode") == "chengyunshang") {
        if(this.activeName == "option"){
@@ -118,7 +130,7 @@ export default {
         this.axios.post('/api/v1/oms/deleteOrders',{list:this.list}).then((res)=>{
           if(res.data.code == "200"){
             this.$message.success('关闭成功')
-            this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&con=" + this.input +"&i="+new Date();
+            this.getRequestUrl()
           }
         })
       }

+ 35 - 2
src/views/TMS/components/importedIngredients/truckEnfactoryFuResult.vue

@@ -1,7 +1,12 @@
 <template>
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
@@ -13,11 +18,14 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
       restaurants: [],
+      startTime: null,
+      endTime: null,
       input: "",
       option: {
         // 表格请求数据的地址
@@ -28,7 +36,32 @@ export default {
 
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=5&con=" + this.input;
+      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) {
+          // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=5&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+          // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }else{
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
     },
     updateClick(resultId) {
       this.$router.push("/truckLoadResultEdit/" + resultId);

+ 0 - 22
src/views/TMS/components/importedIngredients/truckLeaveFactoryFuResult.vue

@@ -1,7 +1,6 @@
 <template>
   <!-- 辅料出厂作业页面 -->
   <div class="homeworkPath">
-<<<<<<< HEAD
    <div class="top"> 
       <span class="text">出厂时间:</span>
       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
@@ -10,17 +9,6 @@
       <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
        <el-button type="primary" class="btn" @click="onclick">
-=======
-    <div class="top">
-      <el-input
-        placeholder="请输入内容"
-        class="input"
-        v-model="input"
-        clearable
-      >
-      </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
->>>>>>> 316aaeed393abe41c9ba8b8fc4bef29b4f666027
         <i class="el-icon-search"></i>查询
       </el-button>
     </div>
@@ -29,11 +17,8 @@
 </template>
 
 <script>
-<<<<<<< HEAD
 import { sjTime } from "@/utils/sharedJsFile";
-=======
 import { getCookie } from "@/utils/util.js";
->>>>>>> 316aaeed393abe41c9ba8b8fc4bef29b4f666027
 export default {
   name: "homeworkPath",
   data() {
@@ -64,7 +49,6 @@ export default {
       }
     },
     onclick() {
-<<<<<<< HEAD
      let startTime = null;
       let endTime = null;
       if(this.startTime){
@@ -83,13 +67,7 @@ export default {
         }
       }else{
         this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=147&orderType=5&startTime="+startTime+"&endTime="+endTime+"&i=" +new Date();
-        
       }  
-=======
-      this.option.requestUrl =
-        "/api/v1/tms/getLeaveFactoryResult?apiId=147&orderType=5&con=" +
-        this.input;
->>>>>>> 316aaeed393abe41c9ba8b8fc4bef29b4f666027
     },
   },
 };

+ 35 - 2
src/views/TMS/components/importedTruck/truckEnfactoryResult.vue

@@ -2,7 +2,12 @@
   <!-- 进厂作业页面 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input class="" placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span class="text">进厂时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
@@ -12,11 +17,14 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
       input:'',
+      startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getAllEnFactoryResult?apiId=99&orderType=8",
@@ -25,7 +33,32 @@ export default {
   },
   methods: {
     onclick(){
-      this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=99&orderType=8&con=" + this.input;
+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) {
+          // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=99&orderType=8&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+          // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }else{
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
     },
     updateClick(resultId) {
       this.$router.push("/truckLoadResultEdit/" + resultId);

+ 0 - 5
src/views/TMS/components/importedTruck/truckLeaveFactoryResult.vue

@@ -2,7 +2,6 @@
   <!-- 出厂作业页面 -->
   <div class="homeworkPath">
     <div class="top">
-<<<<<<< HEAD
        <span class="text">出厂时间:</span>
       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
@@ -10,10 +9,6 @@
       <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
        <el-button type="primary" class="btn" @click="onclick">
-=======
-      <el-input class="el-input" placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
->>>>>>> 316aaeed393abe41c9ba8b8fc4bef29b4f666027
         <i class="el-icon-search"></i>查询
       </el-button>
     </div>

+ 35 - 2
src/views/TMS/components/purchaseChemicalMaterials/purchaseChemicalMaterialsNEW/enterFactoryNew.vue

@@ -2,7 +2,12 @@
 <template>
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
@@ -14,11 +19,14 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
       restaurants: [],
+      startTime: null,
+      endTime: null,
       input: "",
       option: {
         // 表格请求数据的地址
@@ -29,7 +37,32 @@ export default {
  
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=18&con=" + this.input;
+      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) {
+          // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=18&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+          // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }else{
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
     },
   }
 };

+ 35 - 2
src/views/TMS/components/purchaseChemicalMaterials/purchaseChemicalMaterialsOLD/enterFactoryOld.vue

@@ -2,7 +2,12 @@
 <template>
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
@@ -14,10 +19,13 @@
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
+      startTime: null,
+      endTime: null,
       restaurants: [],
       input: "",
       option: {
@@ -29,7 +37,32 @@ export default {
  
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=17&con=" + this.input;
+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) {
+          // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=17&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+          // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }else{
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
     },
   }
 };

+ 0 - 17
src/views/TMS/components/purchaseChemicalMaterials/purchaseChemicalMaterialsOLD/exFactoryOld.vue

@@ -1,7 +1,6 @@
 //老区采购化工产品出厂作业
 <template>
   <div class="homeworkPath">
-<<<<<<< HEAD
    <div class="top"> 
      <span class="text">出厂时间:</span>
       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
@@ -10,11 +9,6 @@
       <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
        <el-button type="primary" class="btn" @click="onclick">
-=======
-    <div class="top">
-      <el-input placeholder="请输入内容" class="input" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
->>>>>>> 316aaeed393abe41c9ba8b8fc4bef29b4f666027
         <i class="el-icon-search"></i>查询
       </el-button>
     </div>
@@ -25,11 +19,8 @@
 </template>
 
 <script>
-<<<<<<< HEAD
 import { sjTime } from "@/utils/sharedJsFile";
-=======
 import { getCookie } from "@/utils/util.js";
->>>>>>> 316aaeed393abe41c9ba8b8fc4bef29b4f666027
 export default {
   name: "homeworkPath",
   data() {
@@ -54,7 +45,6 @@ export default {
   },
   methods: {
     onclick() {
-<<<<<<< HEAD
       let startTime = null;
       let endTime = null;
       if(this.startTime){
@@ -75,13 +65,6 @@ export default {
         this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=147&orderType=6&startTime="+startTime+"&endTime="+endTime+"&i=" +new Date();
         
       }  
-=======
-      if (getCookie("orgCode") == "chengyunshang") {
-        this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=147&orderType=17&carrierSsoId=" + getCookie("userId")+"&con=" + this.input;;
-      } else {
-        this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=147&orderType=17&carrierSsoId=" + null +"&con=" + this.input;
-      }
->>>>>>> 316aaeed393abe41c9ba8b8fc4bef29b4f666027
     },
    }
 };

+ 13 - 7
src/views/TMS/components/purchaseChemicalMaterials/transportationReservation.vue

@@ -123,6 +123,16 @@ export default {
     }
   },
   methods: {
+    getRequestUrl(){
+       //判断是否是承运商
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" + getCookie("userId") + "&i=" + new Date();
+      this.option2.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" + getCookie("userId") + "&i=" + new Date();
+    } else {
+      this.option1.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&carrierSSOId=" + null + "&i=" + new Date();
+      this.option2.requestUrl = "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&fuelOrder=2&carrierSSOId=" + null + "&i=" + new Date();
+    }
+    },
     onclick() {
       if (this.activeName == "first") {
         //判断是否是承运商
@@ -152,9 +162,7 @@ export default {
           type: "success",
           message: "下发成功!",
         });
-        this.option1.requestUrl =
-          "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&i=" +
-          new Date();
+        this.getRequestUrl()
       });
     },
     // 下发
@@ -174,9 +182,7 @@ export default {
               type: "success",
               message: "下发成功!",
             });
-            this.option1.requestUrl =
-              "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&fuelOrder=2&i=" +
-              new Date();
+            this.getRequestUrl()
           });
         })
         .catch(() => {
@@ -205,7 +211,7 @@ export default {
               capacityNumber: capacityNumber,
             })
             .then(() => {
-              this.$router.go(0);
+              this.getRequestUrl()
             });
         })
         .catch(() => {

+ 7 - 0
src/views/WMS/components/steel/addSteelInbound.vue

@@ -63,6 +63,10 @@ export default {
       materialName: null,
       //物资编码
       materialCode:null,
+      // 物资规格
+      materialSpecification:null,
+      // 物资型号
+      materialModel:null,
       //盘点数量
       materialNumber:null,
       //物资id
@@ -114,6 +118,9 @@ export default {
     currentRadioChange1(selection) {
       console.log(selection);
       this.materialName = selection.materialName;
+      this.materialCode = selection.materialCode;
+      this.materialSpecification = selection.materialSpecification;
+      this.materialModel = selection.materialModel;
       this.max = selection.max;
     },
     currentRadioChange2(selection) {

+ 4 - 0
src/views/WMS/components/steel/addSteelReserved.vue

@@ -63,6 +63,10 @@ export default {
       materialName: null,
       //物资编码
       materialCode:null,
+       // 物资规格
+      materialSpecification:null,
+      // 物资型号
+      materialModel:null,
       //盘点数量
       materialNumber:null,
       //物资id

+ 4 - 0
src/views/WMS/components/steel/bar1_steel/bar1_addSteelInbound.vue

@@ -63,6 +63,10 @@ export default {
       materialName: null,
       //物资编码
       materialCode:null,
+       // 物资规格
+      materialSpecification:null,
+      // 物资型号
+      materialModel:null,
       //盘点数量
       materialNumber:null,
       //物资id

+ 7 - 0
src/views/WMS/components/steel/bar1_steel/bar1_addSteelReserved.vue

@@ -63,6 +63,10 @@ export default {
       materialName: null,
       //物资编码
       materialCode:null,
+       // 物资规格
+      materialSpecification:null,
+      // 物资型号
+      materialModel:null,
       //盘点数量
       materialNumber:null,
       //物资id
@@ -113,6 +117,9 @@ export default {
     currentRadioChange1(selection) {
       console.log(selection);
       this.materialName = selection.materialName;
+      this.materialCode = selection.materialCode;
+      this.materialSpecification = selection.materialSpecification;
+      this.materialModel = selection.materialModel;
       this.max = selection.max;
     },
     currentRadioChange2(selection) {

+ 4 - 0
src/views/WMS/components/steel/bar2_steel/bar2_addSteelInbound.vue

@@ -63,6 +63,10 @@ export default {
       materialName: null,
       //物资编码
       materialCode:null,
+       // 物资规格
+      materialSpecification:null,
+      // 物资型号
+      materialModel:null,
       //盘点数量
       materialNumber:null,
       //物资id

+ 4 - 0
src/views/WMS/components/steel/bar2_steel/bar2_addSteelReserved.vue

@@ -63,6 +63,10 @@ export default {
       materialName: null,
       //物资编码
       materialCode:null,
+       // 物资规格
+      materialSpecification:null,
+      // 物资型号
+      materialModel:null,
       //盘点数量
       materialNumber:null,
       //物资id

+ 1 - 0
src/views/WMS/components/steel/bar2_steel/bar2_steel_inboundReal.vue

@@ -65,6 +65,7 @@ export default {
           this.axios
             .post("/api/v1/wms/undoInbound?inboundId=" + scope.row.inboundId)
             .then((res) => {
+              console.log("res.data.code",res.data.code)
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",

+ 26 - 14
src/views/appoint/components/saleContract/addSaleOrderCoproductSend.vue

@@ -23,7 +23,7 @@
           <span class="text">派车数</span>
           <el-input v-model="carNumber"></el-input>
           <span class="text">每车重量</span>
-          <el-input v-model="uniteOrderPlanWeight"></el-input>
+          <el-input v-model="uniteOrderPlanWeight" disabled></el-input>
           <span class="text">截止日期</span>
           <el-date-picker type="date" v-model="uniteSaleDateOfReceipt" style="width:150px"></el-date-picker>
           <el-button type="primary" @click="AddTruckClick" style="margin-top: 10px;">确定</el-button>
@@ -105,6 +105,7 @@
                   @input="onInput"
                   placeholder="(必填)"
                   v-model.number="scope.row.orderPlanWeight"
+                  disabled
                 ></el-input>
               </template>
 
@@ -271,7 +272,6 @@
       :wrapperClosable="false"
       modal
       close-on-press-escape
-    
     >
     
     <el-input v-model="addresText" placeholder="请输入内容" style="margin-top: 10px; margin-left: 20px; width: 250px"></el-input>
@@ -352,7 +352,7 @@ export default {
       //统一截止日期
       uniteSaleDateOfReceipt:null,
       //统一每车重量
-      uniteOrderPlanWeight:null,
+      uniteOrderPlanWeight:60,
       //线路名称
       lineName:null,
       lineId:null,
@@ -519,10 +519,12 @@ export default {
     //校验是否为车牌
     isVehicleNumber(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);
+      if(vehicleNumber!=null){
+        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;
     },
@@ -678,12 +680,16 @@ export default {
 
     //点击确定按钮的事件
     makeSure(){
+      //获取当前派车的数量和预估吨位的总和
+      var sendCount = this.selectionList.length*this.uniteOrderPlanWeight;
       //判断是否达到95%
-      var canDo = (this.totalWeight/this.number).toFixed(2);
+      var canDo = ((this.totalWeight+sendCount)/this.number).toFixed(2);
       if(canDo>0.95){
-        this.$message.error('当前已派发吨数接近订单总吨数,不可继续派单!')
+        var canSend = Math.floor(((this.number*0.95)-this.totalWeight)/this.uniteOrderPlanWeight);
+        this.$message.error('当前已派发吨数接近订单总吨数,最多还可派 ('+canSend+') 辆车!')
       }else{
         let state = false;
+        var beReady = 0;
           this.selectionList.forEach((e)=>{
             if(!isNumber(e.orderPlanWeight)){   //判定重量合法
               this.$message.error('重量请输入数字')
@@ -707,6 +713,9 @@ export default {
             if(isIntegerNumber(e.carrierName)){
               e.carrierId = e.carrierName
             }
+            if(e.capacityNumber){
+              beReady++;
+            }
           })
           if(state){
             //校验是否自提,是自提,则运输单价必选,非自提,运输单价为空
@@ -715,11 +724,11 @@ export default {
                 e.priceValue = null;
                 e.priceId = null;
               })
-              this.sendRequest();
+              this.sendRequest(beReady);
             }else{
               //判断是否全部完成运输单价的选择
               if(this.choosePriceCount==this.selectionList.length){
-                this.sendRequest();
+                this.sendRequest(beReady);
               }else{
                 this.$message.warning('还有运输单价未被选定!')
               }
@@ -730,8 +739,9 @@ export default {
       } 
     },
     //发送请求
-    sendRequest(){
-      this.axios.post('/api/v1/ams/dispatchTruckOrderBySale',{
+    sendRequest(beReady){
+      if(beReady==this.selectionList.length){
+        this.axios.post('/api/v1/ams/dispatchTruckOrderBySale',{
           saleOrderId:this.$route.params.saleOrderId,
           mapList:this.selectionList,
         }).then((res)=>{
@@ -764,9 +774,11 @@ export default {
                 message: "取消派车!",
               });
             });
-
           }
         })
+      } else{
+        this.$message.error('还有车牌号未填写!')
+      }
     },
     //点击取消按钮的事件
     cancel(){

+ 28 - 14
src/views/appoint/components/saleContract/addSaleOrderCoproductSendCarrier.vue

@@ -23,7 +23,7 @@
           <span class="text">派车数</span>
           <el-input v-model="carNumber"></el-input>
           <span class="text">每车重量</span>
-          <el-input v-model="uniteOrderPlanWeight"></el-input>
+          <el-input v-model="uniteOrderPlanWeight" disabled></el-input>
           <span class="text">截止日期</span>
           <el-date-picker type="date" v-model="uniteSaleDateOfReceipt" style="width:150px"></el-date-picker>
           <el-button type="primary" @click="AddTruckClick" style="margin-top: 10px;">确定</el-button>
@@ -105,6 +105,7 @@
                   @input="onInput"
                   placeholder="(必填)"
                   v-model.number="scope.row.orderPlanWeight"
+                  disabled
                 ></el-input>
               </template>
 
@@ -352,7 +353,7 @@ export default {
       //统一截止日期
       uniteSaleDateOfReceipt:null,
       //统一每车重量
-      uniteOrderPlanWeight:null,
+      uniteOrderPlanWeight:60,
       //线路名称
       lineName:null,
       lineId:null,
@@ -512,7 +513,6 @@ export default {
       this.axios
       .post("/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con="+'销售副产品单拼路线')
       .then((res)=>{
-        console.log("res.data.data.list[0].lineName",res.data.data.list[0].lineName)
         this.lineName = res.data.data.list[0].lineName +"  "+ res.data.data.list[0].lineDesk;
         this.lineId = res.data.data.list[0].lineId;
       });
@@ -520,10 +520,12 @@ export default {
     //校验是否为车牌
     isVehicleNumber(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);
+      if(vehicleNumber!=null){
+        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;
     },
@@ -677,11 +679,16 @@ export default {
 
     //点击确定按钮的事件
     makeSure(){
-      var canDo = (this.totalWeight/this.number).toFixed(2);
+      //获取当前派车的数量和预估吨位的总和
+      var sendCount = this.selectionList.length*this.uniteOrderPlanWeight;
+      //判断是否达到95%
+      var canDo = ((this.totalWeight+sendCount)/this.number).toFixed(2);
       if(canDo>0.95){
-        this.$message.error('当前已派发吨数接近订单总吨数,不可继续派单!')
+        var canSend = Math.floor(((this.number*0.95)-this.totalWeight)/this.uniteOrderPlanWeight);
+        this.$message.error('当前已派发吨数接近订单总吨数,最多还可派 ('+canSend+') 辆车!')
       }else{
         let state = false;
+        var beReady = 0;
         this.selectionList.forEach((e)=>{
           if(!isNumber(e.orderPlanWeight)){   //判定重量合法
             this.$message.error('重量请输入数字')
@@ -705,6 +712,9 @@ export default {
           if(isIntegerNumber(e.carrierName)){
             e.carrierId = e.carrierName
           }
+          if(e.capacityNumber){
+              beReady++;
+          }
         })
         if(state){
           //校验是否自提,是自提,则运输单价必选,非自提,运输单价为空
@@ -713,11 +723,11 @@ export default {
               e.priceValue = null;
               e.priceId = null;
             })
-            this.sendRequest();
+            this.sendRequest(beReady);
           }else{
             //判断是否全部完成运输单价的选择
             if(this.choosePriceCount==this.selectionList.length){
-              this.sendRequest();
+              this.sendRequest(beReady);
             }else{
               this.$message.warning('还有运输单价未被选定!')
             }
@@ -729,11 +739,12 @@ export default {
       
     },
     //发送请求
-    sendRequest(){
-      this.axios.post('/api/v1/ams/dispatchTruckOrderBySale',{
+    sendRequest(beReady){
+      if(beReady==this.selectionList.length){
+          this.axios.post('/api/v1/ams/dispatchTruckOrderBySale',{
           saleOrderId:this.$route.params.saleOrderId,
           mapList:this.selectionList,
-        }).then((res)=>{
+          }).then((res)=>{
           if(res.data.code == '200'){
             this.$message.success('派车成功')
             this.cancel();
@@ -766,6 +777,9 @@ export default {
 
           }
         })
+      }else{
+        this.$message.error('还有车牌号未填写!')
+      }
     },
     //点击取消按钮的事件
     cancel(){

+ 35 - 2
src/views/inward/components/inwardFactory/enFactoryResult.vue

@@ -3,7 +3,12 @@
   <!-- 内转运输实绩 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
@@ -15,11 +20,14 @@
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "homeworkPath",
   data() {
     return {
       input: "",
+      startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "",
@@ -35,7 +43,32 @@ export default {
   },
   methods: {
     onclick() {
-      this.$message.info("功能暂时关闭")
+      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) {
+                // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+                this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=357&orderType=11&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+                // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+                // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+                // }else{
+                // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+                // }
+                } else {
+                this.startTime = null;
+                this.endTime = null;
+                this.$message.warning("开始时间要比结束时间早");
+                }
+            } else {
+                this.getRequestUrl()
+            }
     },
   },
 };

+ 35 - 6
src/views/inward/components/inwardImport/daZhou/enFactoryResult.vue

@@ -3,11 +3,12 @@
     <div class="sale">
         <div class="top">
             <!-- 框计算 -->
-            <el-input
-                placeholder="请输入内容"
-                v-model="inputText"
-                clearable>
-            </el-input>
+            <span class="text">进门时间:</span>
+            <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+            </el-date-picker>
+            <span class="text">至</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>
@@ -18,10 +19,13 @@
     </div>
 </template>
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
     data(){
         return{
             inputText:'',
+            startTime: null,
+            endTime: null,
             option: {       
                 // 表格请求数据的地址
                 requestUrl: "/api/v1/tms/getAllEnFactoryResult?apiId=99&orderType=9",
@@ -30,7 +34,32 @@ export default {
     },
     methods:{
         onclick(){
-            this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=99&orderType=9&con=" + this.inputText;
+           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) {
+                // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+                this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=99&orderType=9&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+                // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+                // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+                // }else{
+                // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+                // }
+                } else {
+                this.startTime = null;
+                this.endTime = null;
+                this.$message.warning("开始时间要比结束时间早");
+                }
+            } else {
+                this.getRequestUrl()
+            }
         }
     }
 }

+ 42 - 13
src/views/inward/components/inwardImport/oldAreaRailScale/enFactory.vue

@@ -3,11 +3,12 @@
     <div class="sale">
         <div class="top">
             <!-- 框计算 -->
-            <el-input
-                placeholder="请输入内容"
-                v-model="inputText"
-                clearable>
-            </el-input>
+            <span class="text">进门时间:</span>
+            <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+            </el-date-picker>
+            <span class="text">至</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>
@@ -19,10 +20,13 @@
 </template>
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
     data(){
         return{
             inputText:null,
+            startTime: null,
+            endTime: null,
             option: {       
                 // 表格请求数据的地址
                 requestUrl: "",
@@ -37,14 +41,39 @@ export default {
         }
     },
     methods:{
-        // onclick(){
-        //     if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-        //     this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10"
-        //     }else{
-        //     this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10&userId=" + getCookie("orgCode")
-        //     }
-        //     this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10&con=" + this.inputText;
-        //     }
+        onclick(){
+            let startTime = null;
+            let endTime = null;
+            if (this.startTime) {
+                startTime = sjTime(this.startTime);
+            }
+            if (this.endTime) {
+                endTime = sjTime(this.endTime);
+            }
+            if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10"
+            }else{
+            this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10&userId=" + getCookie("orgCode")
+            }
+            if (startTime && endTime) {
+                if (startTime < endTime) {
+                // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+                    this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+                    // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+                    // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+                    // }else{
+                    // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+                    // }
+                    } else {
+                    this.startTime = null;
+                    this.endTime = null;
+                    this.$message.warning("开始时间要比结束时间早");
+                    }
+                } else {
+                    this.getRequestUrl()
+                }
+            }
     }
 }
 </script>

+ 35 - 5
src/views/inward/components/offsetSteel/truckTransport/enFactoryResult.vue

@@ -3,8 +3,12 @@
   <div class="sale">
     <div class="top">
       <!-- 框计算 -->
-      <el-input placeholder="请输入内容" v-model="inputText" clearable>
-      </el-input>
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
@@ -34,10 +38,13 @@
   </div>
 </template>
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   data() {
     return {
       inputText: "",
+      startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getAllEnFactoryResult?apiId=261&orderType=4",
@@ -82,9 +89,32 @@ export default {
         "/api/v1/uc/getMaterialMesByOrderId?apiId=352&orderId=" + orderId;
     },
     onclick() {
-      this.option.requestUrl =
-        "/api/v1/tms/getAllEnFactoryResult?apiId=261&orderType=4&con=" +
-        this.inputText;
+      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) {
+          // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=261&orderType=4&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+          // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }else{
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
     },
   },
 };

+ 38 - 99
src/views/inward/components/truckAppoint/addPlan.vue

@@ -21,7 +21,7 @@
   <div class="truckNum">
     <el-form  class="demo-form-inline"  label-width="80px" label-position="left">
     <el-form-item label="车数">
-    <el-input   v-model="planTruckNumber" placeholder="必填" class="input"></el-input>
+    <el-input   v-model="planTruckNumber" placeholder="必填" class="input"></el-input>
     </el-form-item>
   </el-form>
   </div>
@@ -32,30 +32,11 @@
 			<dilTable v-bind.sync="first" @radio-change="currentRadioChange" ref="table">
             <el-table-column fixed="right" label="操作" width="120">
                 <template slot-scope="scope">
-                  <el-button type="text" size="mini" @click="getRequirementMaterial(scope.row)">
-                    物资详情
+                  <el-button type="text" size="mini" @click="deleteRequirement(scope)">
+                    拒绝需求
                   </el-button>
                 </template>
               </el-table-column>
-              <!-- 物资详情抽屉 -->
-          <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-          </el-table-column>
 			</dilTable>
       </div>
 		</template>
@@ -86,82 +67,9 @@ export default {
       numberValidateForm: {
           planTruckNumber: null,
       },
-      //记录旧的row对象(未下发)
-      oldRow: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
-      oldRowCount: 1,
-      //记录旧的row对象(已下发)
-      oldRow1: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已下发)
-      oldRowCount1: 1,
-      tableHead: [
-        {
-          prop: "materialName",
-          label: "物资名称",
-          width: 150,
-        },
-        {
-          prop:"loadName",
-          label:"装货点",
-          width:150
-        },
-        {
-          prop:"unloadName",
-          label:"卸货点",
-          width:150
-        },
-        {
-          prop:"loadSequence",
-          label:"装卸货次序",
-          width:150
-        },
-        {
-          prop: "materialWeight",
-          label: "物资重量",
-          width: 150,
-        },
-        {
-          prop: "materialCount",
-          label: "物资数量",
-          width: 150,
-        },
-      ],
-      tableData: [],
-      tableData1: [],
     };
   },
   methods: {
-    getRequirementMaterial(row) {
-      // 记录重复点击次数
-      if (this.oldRow === row) {
-        this.oldRowCount += 1;
-      }
-      // 切换当前详情表
-      this.$refs.table.toggleRowExpansion(row);
-      // 打开前关闭上一个详情表
-      if (this.oldRow != "") {
-        if (this.oldRow != row) {
-          if (this.oldRowCount % 2 === 1) {
-            this.$refs.table.toggleRowExpansion(this.oldRow);
-          } else {
-            this.oldRowCount = 1;
-          }
-        } else {
-          this.oldRow = null;
-          return;
-        }
-      }
-      // 重置上一个点击对象
-      this.oldRow = row;
-      this.getMaterial(row.requirementId);
-    },
-    getMaterial(requirementId){
-      console.log(requirementId)
-      this.axios.post("/api/v1/ams/getRequirementMaterial/" + requirementId).then((res) => {
-        this.tableData = res.data.data
-        console.log(res.data.data)
-      })
-    },
     handleSelect(item){
       this.carrierId = item.carrierId
       this.state2 = item.carrierName 
@@ -196,16 +104,13 @@ export default {
       if(this.carrierId == null){
         this.$alert('请输入承运商!')
         return
-      }else if(this.planTruckNumber == null){
-        this.$alert('请输入车数!')
-        return
       }else if(this.requirementId== null){
         this.$alert('请选择需要制定计划的需求!')
         return
       }
       let plan = {
         requirementId : this.mapList.requirementId,
-        planTruckNumber: this.planTruckNumber,
+        planTruckNumber: Number(this.planTruckNumber),
         carrierId: this.carrierId
       };
       this.axios
@@ -230,6 +135,40 @@ export default {
     cancel() {
       this.$router.go(-1);
     },
+    deleteRequirement(scope) {
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios
+            .post(
+              "/api/v1/ams/deleteTruckRequirement/" + scope.row.requirementId
+            )
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "拒绝成功!",
+                });
+                this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=250&requirementStatus=2&i=" + new Date()
+              } else {
+                this.$message({
+                  message: "拒绝失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!",
+          });
+        });
+    },
   },
 };
 </script>

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

@@ -305,7 +305,6 @@ export default {
     // 确认
     onClickConfirm() {
       console.log(this.purchaseOrgLable,this.materialName,this.supplierName,this.purchaseOrderNo,this.unloadPointName,this.stateCarrier)
-      debugger
       this.disabled = true
       var state = 0;
       if (

+ 53 - 18
src/views/inward/components/truckAppoint/addRequirement2.vue

@@ -112,7 +112,7 @@
           <template slot-scope="scope">
             <template v-if="item.slot">
                 <!-- 装货点 -->
-               <template v-if="item.prop == 'requirementPlatformName'">
+               <template v-if="item.prop == 'requirementPlatformName'" style="width:400px">
                 <el-input
                   class="textinput"
                   v-model="scope.row.requirementPlatformName"
@@ -236,7 +236,7 @@
       </el-drawer>
     </div>
     <div class="button-box">
-      <el-button type="primary" @click="makeSure">确认新增</el-button>
+      <el-button type="primary" @click="makeSure" :disabled = "disabled">确认新增</el-button>
       <el-button type="primary" @click="cancel">返回</el-button>
     </div>
   </div>
@@ -254,7 +254,7 @@ export default {
       disabled:false,
       options: [],
       value: '',
-      isOpenDueTime : false,
+      isOpenDueTime : true,
       DueTime:null,
       // 件数与重量的开关
       value: false,
@@ -314,10 +314,11 @@ export default {
         mapList1: []
       },
       second1: {
-        requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
+        requestUrl: "",
         selectionType: "radio",
         mapList2: []
-      }
+      },
+      form:{}
     };
   },
   watch: {
@@ -354,6 +355,9 @@ export default {
       this.shipperId = item.shipperId
       this.requireUnitName = item.shipperName 
     },
+    getUnloadRequestUrl(){
+      this.second1.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date()
+    },
     //以下是用车单位边输边查搜索
     querySearchCarrier(queryString, cb) {
         this.axios.post('/api/v1/uc/getRequireUnitName?index='+queryString).then((res)=>{
@@ -377,16 +381,16 @@ export default {
       this.selectionList1 = selection;
     },
     unloadPoint(index) {
-      // console.log(index)
+      this.getUnloadRequestUrl()
       this.index= index
       this.a = 3
-      this.drawer = true;
+      this.drawer = true; 
     },
     loadPoint(index) {
-      // console.log(index)
+      this.getUnloadRequestUrl()
       this.index = index
       this.a = 4
-      this.drawer = true;
+      this.drawer = true; 
     },
     //以上是用车单位边输边查搜索
     ondrawer(num) {   
@@ -417,6 +421,15 @@ export default {
     },
      // 返回主界面
     makeSure1() {
+        console.log(this.tableData.length);
+        if(this.tableData.length > 0&&this.selectionList1.length>0){
+          this.$message.warning("一个需求只允许填写一个物资")
+          return
+        }
+        if(this.selectionList1.length > 1){
+          this.$message.warning("一个需求只允许填写一个物资")
+          return
+        }
         this.selectionList1.forEach((e) => {
           // console.log(e.materialModel,e.materialSpecification)
         if(e.materialSpecification == null){
@@ -495,24 +508,34 @@ export default {
     },
     // 新增
     makeSure() {
+      this.disabled = true
       if(this.shipperId == null){
         this.$message.error("请选择用车单位")
-        return
-      }if(typeof(this.form.requirementEstimatedDuration) == 'undefined'){
-        this.$message.error("请输入预计用车时长")
+        this.disabled = false
         return
       }if(typeof(this.form.requirementTruckTime) == 'undefined'){
         this.$message.error("请输入用车时间")
+        this.disabled = false
         return
       }if(typeof(this.form.requirementType) == 'undefined'){
         this.$message.error("请选择需求类型")
-        return
-      }if(typeof(this.form.requirementWorkType) == 'undefined'){
-        this.$message.error("请输入费用类别")
+        this.disabled = false
         return
       }if(this.tableData.length == 0){
         this.$message.error("请点击浏览选择物资")
+        this.disabled = false
         return
+      }if(typeof(this.form.requirementOverlimit) != 'undefined'){
+        console.log((typeof(this.form.remark) == 'undefined'))
+        if((typeof(this.form.remark) == 'undefined')){
+          this.$message.error("请填写超限备注")
+          this.disabled = false
+          return
+        }
+      }if(typeof(this.form.Tel) == 'undefined'){
+          this.$message.error("请填写联系电话")
+          this.disabled = false
+          return
       }
       var i=0
       this.tableData.forEach((e) =>{
@@ -522,10 +545,16 @@ export default {
       })
       if(i==0){
          this.$message.error("请选择装卸点")
+         this.disabled = false
          return
       }
       // console.log(this.tableData)
       var DueTime;
+      if(this.DueTime == null){
+        this.$message.warning("截止日期必填")
+        this.disabled = false
+        return
+      }
       if(this.DueTime==null){
         DueTime = null;
       }else{
@@ -533,7 +562,7 @@ export default {
       }
       let requiremnet = {
         requirementEstimatedDuration: this.form.requirementEstimatedDuration,
-        requirementOverlimit: this.form.requirementOverlimit,
+        requirementOverlimit: this.form.requirementOverlimit + this.form.remark + '米',
         requirementTruckTime: sjTime(this.form.requirementTruckTime),
         requirementType: this.form.requirementType,
         requirementWorkContent: this.form.requirementWorkContent,
@@ -543,9 +572,10 @@ export default {
         // 用车截日期
         DueTime:DueTime,
         mapList:this.tableData,
-        orgCode:getCookie("orgCode")
+        orgCode:getCookie("orgCode"),
+        remark:this.form.Tel + this.form.capacityType
       };
-      // console.log("requirement",requiremnet);
+      console.log("requirement",requiremnet);
       this.axios
         .post("/api/v1/ams/addTruckRequirement", requiremnet)
         .then(res => {
@@ -557,8 +587,13 @@ export default {
             this.$router.go(-1);
           } else {
             this.$message.error("新增失败!");
+            this.disabled = false
           }
         });
+    },
+     func(res) {
+      console.log(res);
+      this.isKuang = false;
     },
     // 返回
     cancel() {

+ 199 - 0
src/views/inward/components/truckAppoint/getRequirementOrder.vue

@@ -0,0 +1,199 @@
+// 分派计划
+<template>
+  <div class="inwardOrder">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="cancel">
+        返回
+      </el-button>
+    </div>
+     <!-- 车辆信息 -->
+    <el-dialog
+        title="车辆信息"
+        :visible.sync="dialogTableVisible"
+        :before-close="handleClose"
+    >
+      <el-input v-model="truckInput" style="width:250px"></el-input>
+      <el-button type="primary" @click="clickTruck">查询</el-button>
+      <dilTable
+        v-bind.sync="truck"
+        @radio-change="currentRadioChange1"
+        >
+      </dilTable>
+      <span slot="footer" class="dialog-footer">
+      <el-button @click="cancelUpdate()">取 消</el-button>
+      <el-button type="primary" @click="updateTruckCapacity()"
+      >确 定</el-button>
+      </span>
+    </el-dialog>
+    <template>
+      <div>
+        <el-tabs v-model="activeName" @tab-click="handleClick">
+          <el-tab-pane label="待接收" name="first">
+            <dilTable v-bind.sync="first" ref="table">
+            </dilTable>
+          </el-tab-pane>
+          <el-tab-pane label="已接收" name="second">
+            <dilTable v-bind.sync="second"> </dilTable>
+          </el-tab-pane>
+          <el-tab-pane label="已完成" name="third">
+            <dilTable v-bind.sync="third"> </dilTable>
+          </el-tab-pane>
+        </el-tabs>
+      </div>
+    </template>
+  </div>
+</template>
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      inputText: "",
+      truckInput:null,
+      userCarrierId: "",
+      //是否弹出对话框
+      dialogTableVisible: false,
+      first: {
+        //
+        requestUrl:
+          "" ,
+      },
+      //车辆信息的表格
+      truck: {
+        requestUrl:
+          "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + "",
+        // 控制显示当选列
+        selectionType: "radio",
+      },
+      //选中的运力id
+      capacityId: null,
+      activeName: "first",
+      second: {
+        requestUrl: "",
+      },
+      third: {
+        requestUrl: "",
+      },
+    };
+  },
+  created() {
+      this.first.requestUrl =
+        "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=4" + "&requirementId=" + this.$route.params.requirementId
+      this.second.requestUrl =
+        "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=5" + "&requirementId=" + this.$route.params.requirementId
+      this.third.requestUrl =
+        "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=2" + "&requirementId=" + this.$route.params.requirementId
+  },
+  methods: {
+    getRequest() {
+      this.first.requestUrl =
+        "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=4" + "&i=" + new Date() + "&requirementId=" + this.$route.params.requirementId
+      this.second.requestUrl =
+        "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=5" + "&i=" + new Date() + "&requirementId=" + this.$route.params.requirementId
+    },
+    cancel(){
+        this.$router.go(-1)
+    },
+    handleClick() {
+      this.getRequest()
+    },
+    handleClose(done){
+      done()
+      this.$message.info("取消修改运力")
+    },
+    currentRadioChange1(row){
+      console.log(row)
+      this.capacityId = row.capacityId
+    },
+    getTruckRequestUrl(){
+      if (getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId") + "&test=" + new Date();
+      } else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+      }
+    },
+    //修改运输订单
+    updatePlan(scope){
+      this.getTruckRequestUrl()
+      this.orderId = scope.row.orderId
+      this.dialogTableVisible = true
+      console.log(scope.row.orderId)
+    },
+    updateTruckCapacity(){
+        if(this.capacityId == null){
+            this.$message.error("未选中运力")
+            return
+        }
+        this.axios.post("/api/v1/oms/updateCapacityId",{
+          capacityId:this.capacityId,
+          orderId :this.orderId
+        }).then((res) =>{
+          if(res.data.code == "200"){
+            this.$message.success("修改运力成功")
+            this.dialogTableVisible = false
+            this.getRequest()
+            
+          }else{
+            this.$message.error("修改运力失败")
+            this.dialogTableVisible = false
+            this.getRequest()
+          }
+        })
+    },
+    clickTruck(){
+      this.truck.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&index=" + this.truckInput
+    },
+      //删除运输订单
+    deleteClick(scope){
+      this.$confirm('是否删除?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        }).then(() => {
+            this.axios
+            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });     
+                this.getRequest()
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });          
+        });
+    },
+  },
+};
+</script>
+<style lang="scss">
+.inwardOrder {
+  margin-top: 20px;
+  margin-left: 20px;
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 27 - 2
src/views/inward/components/truckAppoint/plan.vue

@@ -7,7 +7,8 @@
       <el-button type="primary" class="btn">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button
+      <el-badge :value="addPlanCount" class="item" v-if="activeName == 'second'">
+        <el-button
         type="primary"
         class="btn"
         @click="toInsert"
@@ -15,6 +16,8 @@
       >
         <i class="el-icon-plus"></i>制定计划
       </el-button>
+      </el-badge>
+      
       <el-button
         type="primary"
         class="btn"
@@ -211,15 +214,35 @@ export default {
         },
       ],
       tableData: [],
+      addPlanCount:0,
+      timer:""
     };
   },
   created(){
       this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1",
       this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=257&planStatus=0",
       this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1",
-      this.fourth.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4"
+      this.fourth.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4"  
+  },
+  mounted(){
+    this.getAddPlan()
+    this.start()
+    
+    // this.getAddPlan()
+  },
+  beforeDestroy(){
+    this.timer
   },
   methods: {
+    getAddPlan(){
+        this.axios.post("/api/v1/ams/getTruckRequirementList?apiId=250&requirementStatus=2").then((res) =>{
+          console.log(res.data.data.list.length)
+          this.addPlanCount = res.data.data.list.length
+        })
+    },
+    start(){
+        this.timer = setInterval(this.getAddPlan,60000)
+    },
     getRequirementMaterial(row) {
       // 记录重复点击次数
       if (this.oldRow === row) {
@@ -392,6 +415,7 @@ export default {
                   message: "删除成功!",
                 });
                 this.getRequestUrl()
+                this.getAddPlan()
               } else {
                 this.$message({
                   message: "删除失败",
@@ -429,6 +453,7 @@ export default {
                   message: "下发成功!",
                 });
                 this.getRequestUrl()
+                this.getAddPlan()
                 this.activeName = 'third'
               } else {
                 this.$message({

+ 7 - 110
src/views/inward/components/truckAppoint/requirement.vue

@@ -31,13 +31,6 @@
             <dilTable v-bind.sync="first" @selection-change="selectionChange" ref="table1">
               <el-table-column fixed="right" label="操作" width="120">
                 <template slot-scope="scope">
-                  <el-button
-                    type="text"
-                    size="mini"
-                    @click="getRequirementMaterial1(scope.row)"
-                  >
-                    物资详情
-                  </el-button>
                   <el-button
                     type="text"
                     size="mini"
@@ -47,59 +40,15 @@
                   </el-button>
                 </template>
               </el-table-column>
-                      <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData1" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
             </dilTable>
           </el-tab-pane>
           <el-tab-pane label="已下发" name="second">
             <dilTable v-bind.sync="second" ref="table">
             <el-table-column fixed="right" label="操作" width="80">
                 <template slot-scope="scope">
-                  <el-button
-                    type="text"
-                    size="mini"
-                    @click="getRequirementMaterial(scope.row)"
-                  >
-                    物资详情
-                  </el-button>
+                 <el-button type="text" size="mini" @click="getRequirementOrder(scope)">运单</el-button>
                 </template>
               </el-table-column>
-        <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
             </dilTable>
           </el-tab-pane>
         </el-tabs>
@@ -178,67 +127,15 @@ export default {
       this.second.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&orgCode=" + getCookie("orgCode")
     }
   },
-  
   methods: {
-    getRequirementMaterial(row) {
-      // 记录重复点击次数
-      if (this.oldRow === row) {
-        this.oldRowCount += 1;
-      }
-      // 切换当前详情表
-      this.$refs.table.toggleRowExpansion(row);
-      // 打开前关闭上一个详情表
-      if (this.oldRow != "") {
-        if (this.oldRow != row) {
-          if (this.oldRowCount % 2 === 1) {
-            this.$refs.table.toggleRowExpansion(this.oldRow);
-          } else {
-            this.oldRowCount = 1;
-          }
-        } else {
-          this.oldRow = null;
-          return;
-        }
-      }
-      // 重置上一个点击对象
-      this.oldRow = row;
-      this.getMaterial(row.requirementId);
-    },
-    getRequirementMaterial1(row) {
-      // 记录重复点击次数
-      if (this.oldRow1 === row) {
-        this.oldRowCount1 += 1;
-      }
-      // 切换当前详情表
-      this.$refs.table1.toggleRowExpansion(row);
-      // 打开前关闭上一个详情表
-      if (this.oldRow1 != "") {
-        if (this.oldRow1 != row) {
-          if (this.oldRowCount1 % 2 === 1) {
-            this.$refs.table1.toggleRowExpansion(this.oldRow1);
-          } else {
-            this.oldRowCount1 = 1;
-          }
-        } else {
-          this.oldRow1 = null;
-          return;
-        }
-      }
-      // 重置上一个点击对象
-      this.oldRow1 = row;
-      this.getMaterial(row.requirementId);
+    //查看需求下面的运单
+    getRequirementOrder(scope){
+      this.$router.push(
+        "/getRequirementOrder/" + scope.row.requirementId
+      );
     },
     handleClick(tab, event) {
-      this.getRequestUrl()
-      this.getRequirementMaterial()      
-    },
-    getMaterial(requirementId){
-      console.log(requirementId)
-      this.axios.post("/api/v1/ams/getRequirementMaterial/" + requirementId).then((res) => {
-        this.tableData = res.data.data
-        this.tableData1 = res.data.data
-        console.log(res.data.data)
-      })
+      this.getRequestUrl()   
     },
     getRequestUrl(){
       if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode") == "zidonghuabu"){

+ 45 - 24
src/views/inward/components/truckOrder/decomposePlan.vue

@@ -107,7 +107,7 @@
           </vxe-column>
 		</vxe-table>
 		<div class="button-box">
-			<el-button type="primary" @click="makeSure">确认分解</el-button>
+			<el-button type="primary" @click="makeSure" :disabled = "disabled">确认分解</el-button>
 			<el-button type="primary" @click="cancel">返回</el-button>
 		</div>
 	</div>
@@ -122,11 +122,11 @@ export default {
   },
   data() {
     return {
+      disabled:false,
       truckText:null,
       shiyHeigth:140,
       isHeigth:true,
       isKuang:false,
-      lineId:null,
       requirementId:null,
       capacityNumber:null,
       userCarrierId:null,
@@ -142,7 +142,7 @@ export default {
       carrierId:null,
       form: {},
       first:{
-       requestUrl: "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&planId="+this.$route.params.planId,
+       requestUrl: "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=100&planId="+this.$route.params.planId,
       },
       second:{
         requestUrl:"/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null,
@@ -185,16 +185,39 @@ export default {
         },
       ],
       tableData1: [],
+      newsArr:[]
     };
   },
   created(){
-    this.userCarrierId = getCookie("userId")
-    this.second.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246"
+      if (getCookie("orgCode") == "chengyunshang") {
+      this.second.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+        getCookie("userId");
+    } else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+      this.second.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con="+"物流储运中心";
+    }else {
+      this.second.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null
+    }
   },
   mounted(){
       this.information()
   },
   methods: {
+    getInwardRequestUrl(){
+      if (getCookie("orgCode") == "chengyunshang") {
+      this.second.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId") + "&i=" + new Date();
+    } else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+      this.second.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con="+"物流储运中心" + "&i=" + new Date();
+    }else {
+      this.second.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&i=" + new Date();
+    }
+    },
     getRequirementMaterial(row) {
       // 记录重复点击次数
       if (this.oldRow === row) {
@@ -226,25 +249,22 @@ export default {
         this.tableData1 = res.data.data
       })
     },
-    drawerCapacity(){ 
+    drawerCapacity(){
+      this.getInwardRequestUrl()
       this.drawer = true;
-      //重新初始化
-      this.second.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&i=" + new Date();
+      //重新初始化  
     },
     onConfirm(){
       console.log(this.mapList1)
       this.drawer = false
-      this.mapList1.forEach((e) => {
+      this.newsArr.forEach((e) => {
           console.log((e.capacityNumber))
           this.capacityNumber = e.capacityNumber
           this.insertEvent()
       })
-    },
-    drawerLine(){
-      this.linedrawer = true
+      this.newsArr = []
     },
     onclick(){
-      console.log(this.truckText,"truckText")
       if(this.truckText != null){
         this.second.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId="+this.input +"&carrierId=" + getCookie('userId') + "&index=" + this.truckText;
       }else{
@@ -252,14 +272,12 @@ export default {
       }     
     },
     currentRadioChange(selection){
-      this.mapList1=selection,
-      console.log(this.mapList1)
-    },
-    currentRadioChange1(selection){
-      this.mapList0=selection
-      this.lineName = this.mapList0.lineName
-      this.lineId = this.mapList0.lineId
-      console.log(this.mapList0.lineId)
+      this.mapList1=selection
+      for (let i = 0; i < selection.length; i++) {
+        if(this.newsArr.indexOf(selection[i]) === -1){
+        this.newsArr.push(selection[i]);
+        }
+        }
     },
    handleClose(done){
       done();
@@ -275,7 +293,7 @@ export default {
       //查看需求详情
       this.axios
         .post(
-          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&planId=" + this.$route.params.planId
+          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=200&planId=" + this.$route.params.planId
         )
         .then((res) => {
             console.log(res.data.data)
@@ -309,9 +327,11 @@ export default {
             },
     // 修改
     makeSure() {
+      this.disabled = true
       for(var i=0;i<this.$refs.xTable.getInsertRecords().length;i++){
         if(this.$refs.xTable.getInsertRecords()[i].capacityNumber == null){
           this.$alert('未选择车牌,请选择车牌')
+          this.disabled = false
           return
         }     
       }
@@ -325,14 +345,15 @@ export default {
         .post("/api/v1/oms/addInwardOrder", BmsTrainFreight)
         .then((res) => {
           if (res.data.code == 200) {
-            this.$router.go(-1);
             this.$message({
               type: "success",
               message: "分解成功!",
             });
-            
+            this.cancel()
+            this.disabled = false
           } else {
             this.$message.error("分解失败!");
+            this.disabled = false
           }
         });
     },

+ 209 - 0
src/views/inward/components/truckOrder/getPlanOrder.vue

@@ -0,0 +1,209 @@
+// 分派计划
+<template>
+  <div class="inwardOrder">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="cancel">
+        返回
+      </el-button>
+    </div>
+     <!-- 车辆信息 -->
+    <el-dialog
+        title="车辆信息"
+        :visible.sync="dialogTableVisible"
+        :before-close="handleClose"
+    >
+      <el-input v-model="truckInput" style="width:250px"></el-input>
+      <el-button type="primary" @click="clickTruck">查询</el-button>
+      <dilTable
+        v-bind.sync="truck"
+        @radio-change="currentRadioChange1"
+        >
+      </dilTable>
+      <span slot="footer" class="dialog-footer">
+      <el-button @click="cancelUpdate()">取 消</el-button>
+      <el-button type="primary" @click="updateTruckCapacity()"
+      >确 定</el-button>
+      </span>
+    </el-dialog>
+    <template>
+      <div>
+        <el-tabs v-model="activeName" @tab-click="handleClick">
+          <el-tab-pane label="待接收" name="first">
+            <dilTable v-bind.sync="first" ref="table">
+              <el-table-column fixed="right" label="操作" width="180">
+                <template slot-scope="scope">
+                  <el-button type="text" size="mini" @click="updatePlan(scope)">
+                    修改
+                  </el-button>
+                  <el-button type="text" size="mini" @click="deleteClick(scope)">
+                    删除
+                  </el-button>
+                </template>
+              </el-table-column>
+            </dilTable>
+          </el-tab-pane>
+          <el-tab-pane label="已接收" name="second">
+            <dilTable v-bind.sync="second"> </dilTable>
+          </el-tab-pane>
+          <el-tab-pane label="已完成" name="third">
+            <dilTable v-bind.sync="third"> </dilTable>
+          </el-tab-pane>
+        </el-tabs>
+      </div>
+    </template>
+  </div>
+</template>
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      inputText: "",
+      truckInput:null,
+      userCarrierId: "",
+      //是否弹出对话框
+      dialogTableVisible: false,
+      first: {
+        //
+        requestUrl:""
+      },
+      //车辆信息的表格
+      truck: {
+        requestUrl:
+          "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + "",
+        // 控制显示当选列
+        selectionType: "radio",
+      },
+      //选中的运力id
+      capacityId: null,
+      activeName: "first",
+      second: {
+        requestUrl: "",
+      },
+      third: {
+        requestUrl: "",
+      },
+    };
+  },
+  created() {
+      this.first.requestUrl =
+        "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=4" + "&planId=" + this.$route.params.planId
+      this.second.requestUrl =
+        "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=5" + "&planId=" + this.$route.params.planId
+      this.third.requestUrl =
+        "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=2" + "&planId=" + this.$route.params.planId
+  },
+  methods: {
+    getRequest() {
+      this.first.requestUrl =
+        "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=4" + "&i=" + new Date() + "&planId=" + this.$route.params.planId
+      this.second.requestUrl =
+        "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=5" + "&i=" + new Date() + "&planId=" + this.$route.params.planId
+    },
+    cancel(){
+        this.$router.go(-1)
+    },
+    handleClick() {
+      this.getRequirementMaterial();
+      this.getRequest()
+    },
+    handleClose(done){
+      done()
+      this.$message.info("取消修改运力")
+    },
+    currentRadioChange1(row){
+      console.log(row)
+      this.capacityId = row.capacityId
+    },
+    getTruckRequestUrl(){
+      if (getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId") + "&test=" + new Date();
+      } else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+      }
+    },
+    //修改运输订单
+    updatePlan(scope){
+      this.getTruckRequestUrl()
+      this.orderId = scope.row.orderId
+      this.dialogTableVisible = true
+      console.log(scope.row.orderId)
+    },
+    updateTruckCapacity(){
+        if(this.capacityId == null){
+            this.$message.error("未选中运力")
+            return
+        }
+        this.axios.post("/api/v1/oms/updateCapacityId",{
+          capacityId:this.capacityId,
+          orderId :this.orderId
+        }).then((res) =>{
+          if(res.data.code == "200"){
+            this.$message.success("修改运力成功")
+            this.dialogTableVisible = false
+            this.getRequest()
+            
+          }else{
+            this.$message.error("修改运力失败")
+            this.dialogTableVisible = false
+            this.getRequest()
+          }
+        })
+    },
+    clickTruck(){
+      this.truck.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&index=" + this.truckInput
+    },
+      //删除运输订单
+    deleteClick(scope){
+      this.$confirm('是否删除?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        }).then(() => {
+            this.axios
+            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });     
+                this.getRequest()
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });          
+        });
+    },
+  },
+};
+</script>
+<style lang="scss">
+.inwardOrder {
+  margin-top: 20px;
+  margin-left: 20px;
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 27 - 133
src/views/inward/components/truckOrder/plan.vue

@@ -16,9 +16,6 @@
             <dilTable v-bind.sync="second" ref="table1">
               <el-table-column fixed="right" label="操作" width="100">
                 <template slot-scope="scope">
-                  <el-button type="text" size="mini" @click="getRequirementMaterial1(scope.row)">
-                    物资详情
-                  </el-button>
                   <el-button
                     type="text"
                     size="mini"
@@ -51,10 +48,13 @@
           </el-tab-pane>
           <el-tab-pane label="已分解" name="third">
             <dilTable v-bind.sync="third" ref="table2">
-             <el-table-column fixed="right" label="操作" width="100">
+             <el-table-column fixed="right" label="操作" width="150">
                 <template slot-scope="scope">
-                  <el-button type="text" size="mini" @click="getRequirementMaterial2(scope.row)">
-                    物资详情
+                  <el-button type="text" size="mini" @click="desponsePlan(scope)">
+                    继续分解
+                  </el-button>
+                  <el-button type="text" size="mini" @click="getPlanOrder(scope)">
+                    运单
                   </el-button>
                 </template>
               </el-table-column>
@@ -91,15 +91,6 @@ export default {
     return {
       inputText: "",
       carrierId:40,
-      oldRow: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
-      oldRowCount: 1,
-      oldRow1: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
-      oldRowCount1: 1,
-       oldRow2: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
-      oldRowCount2: 1,
       first: {
         // first请求数据的地址
         requestUrl:"",
@@ -115,136 +106,36 @@ export default {
           "" 
       },
       activeName: "second",
-      tableHead: [
-        {
-          prop: "materialName",
-          label: "物资名称",
-          width: 150,
-        },
-        {
-          prop:"loadName",
-          label:"装货点",
-          width:150
-        },
-        {
-          prop:"unloadName",
-          label:"卸货点",
-          width:150
-        },
-        {
-          prop:"loadSequence",
-          label:"装卸货次序",
-          width:150
-        },
-        {
-          prop: "materialWeight",
-          label: "物资重量",
-          width: 150,
-        },
-        {
-          prop: "materialCount",
-          label: "物资数量",
-          width: 150,
-        },
-      ],
       tableData: [],
     };
   },
   created(){
-      this.carrierId = getCookie('userId')
-      this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1"
-      this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2"
-      this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3"
+      if(getCookie("orgCode") == "chengyunshang"){
+        this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&carrierId=" + getCookie("userId")
+        this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" + getCookie("userId")
+        this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" + getCookie("userId")
+      }else{
+        this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1"
+        this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2"
+        this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3"
+      } 
   },
   methods: {
-    getRequirementMaterial(row) {
-      // 记录重复点击次数
-      if (this.oldRow === row) {
-        this.oldRowCount += 1;
-      }
-      // 切换当前详情表
-      this.$refs.table.toggleRowExpansion(row);
-      // 打开前关闭上一个详情表
-      if (this.oldRow != "") {
-        if (this.oldRow != row) {
-          if (this.oldRowCount % 2 === 1) {
-            this.$refs.table.toggleRowExpansion(this.oldRow);
-          } else {
-            this.oldRowCount = 1;
-          }
-        } else {
-          this.oldRow = null;
-          return;
-        }
-      }
-      // 重置上一个点击对象
-      this.oldRow = row;
-      this.getMaterial(row.requirementId);
-    },
-    getRequirementMaterial1(row) {
-      // 记录重复点击次数
-      if (this.oldRow1 === row) {
-        this.oldRowCount1 += 1;
-      }
-      // 切换当前详情表
-      this.$refs.table1.toggleRowExpansion(row);
-      // 打开前关闭上一个详情表
-      if (this.oldRow1 != "") {
-        if (this.oldRow1 != row) {
-          if (this.oldRowCount1 % 2 === 1) {
-            this.$refs.table1.toggleRowExpansion(this.oldRow1);
-          } else {
-            this.oldRowCount1 = 1;
-          }
-        } else {
-          this.oldRow1 = null;
-          return;
-        }
-      }
-      // 重置上一个点击对象
-      this.oldRow1 = row;
-      this.getMaterial(row.requirementId);
-    },
-    getRequirementMaterial2(row) {
-      // 记录重复点击次数
-      if (this.oldRow2 === row) {
-        this.oldRowCount2 += 1;
-      }
-      // 切换当前详情表
-      this.$refs.table2.toggleRowExpansion(row);
-      // 打开前关闭上一个详情表
-      if (this.oldRow2 != "") {
-        if (this.oldRow2 != row) {
-          if (this.oldRowCount2 % 2 === 1) {
-            this.$refs.table2.toggleRowExpansion(this.oldRow2);
-          } else {
-            this.oldRowCount2 = 1;
-          }
-        } else {
-          this.oldRow2 = null;
-          return;
-        }
-      }
-      // 重置上一个点击对象
-      this.oldRow2 = row;
-      this.getMaterial(row.requirementId);
-    },
-    getMaterial(requirementId){
-      console.log(requirementId)
-      this.axios.post("/api/v1/ams/getRequirementMaterial/" + requirementId).then((res) => {
-        this.tableData = res.data.data
-        console.log(res.data.data)
-      })
-    },
      handleClick(tab, event) {
       console.log("zhix")
       this.getRequestUrl()
       this.getRequirementMaterial()
     },
     getRequestUrl(){
-      this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&i=" + new Date()
-      this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&i="  + new Date()
-      this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&i=" + new Date()
+      if(getCookie("orgCode") == "chengyunshang"){
+        this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&carrierId=" + getCookie("userId") + "&i=" + new Date()
+        this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" + getCookie("userId") + "&i=" + new Date()
+        this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" + getCookie("userId") + "&i=" + new Date()
+      }else{
+        this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1" + "&i=" + new Date()
+        this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2" + "&i=" + new Date()
+        this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3" + "&i=" + new Date()
+      } 
     },
     receiver(scope) {
       this.$confirm("是否接收", "提示", {
@@ -284,6 +175,9 @@ export default {
     desponsePlan(scope) {
       this.$router.push("/decomposePlan/" + scope.row.planId);
     },
+    getPlanOrder(scope) {
+      this.$router.push("/getPlanOrder/" + scope.row.planId);
+    },
     deletePlan(scope) {
       this.$confirm("是否删除", "提示", {
         confirmButtonText: "确定",

+ 8 - 1
src/views/inward/router/index.js

@@ -118,6 +118,11 @@ import updatePlan from '@/views/inward/components/truckAppoint/updatePlan.vue'
 import addRailPlan from '@/views/inward/components/truckAppoint/addRailPlan.vue'
 //计划分解
 import decomposePlan from '@/views/inward/components/truckOrder/decomposePlan.vue'
+
+//查看计划运单详情
+import getPlanOrder from '@/views/inward/components/truckOrder/getPlanOrder.vue'
+//查看需求运单详情
+import getRequirementOrder from '@/views/inward/components/truckAppoint/getRequirementOrder.vue'
 //内转异地库计划分解
 import decomposeRailPlan from '@/views/inward/components/truckOrder/decomposeRailPlan.vue'
 //请车作业新增
@@ -216,7 +221,9 @@ const constantRouterMap = [{
     {path: 'addPlan',name: 'addPlan',meta: {code: 'xtpzgl-yhgl'},component: addPlan}, 
     {path: 'updatePlan/:planId',name: 'updatePlan',meta: {code: 'xtpzgl-yhgl'},component: updatePlan}, 
     {path: 'addRailPlan',name: 'addRailPlan',meta: {code: 'xtpzgl-yhgl'},component: addRailPlan}, 
-    {path: 'decomposePlan/:planId',name: 'decomposePlan',meta: {code: 'xtpzgl-yhgl'},component: decomposePlan}, 
+    {path: 'decomposePlan/:planId',name: 'decomposePlan',meta: {code: 'xtpzgl-yhgl'},component: decomposePlan},
+    {path: 'getPlanOrder/:planId',name: 'getPlanOrder',meta: {code: 'xtpzgl-yhgl'},component: getPlanOrder},
+    {path: 'getRequirementOrder/:requirementId',name: 'getRequirementOrder',meta: {code: 'xtpzgl-yhgl'},component: getRequirementOrder},  
     {path: 'decomposeRailPlan/:dayPlanId',name: 'decomposeRailPlan',meta: {code: 'xtpzgl-yhgl'},component: decomposeRailPlan}, 
     {path: 'addWagonPlease',name: 'addWagonPlease',meta: {code: 'xtpzgl-yhgl'},component: addWagonPlease}, 
     {path: 'editWagonPlease/:resultId',name: 'editWagonPlease',meta: {code: 'xtpzgl-yhgl'},component: editWagonPlease}, 

+ 36 - 6
src/views/sale/components/transport_excute/enFactoryResult.vue

@@ -3,8 +3,12 @@
   <div class="sale">
     <div class="top">
       <!-- 框计算 -->
-      <el-input placeholder="请输入内容" v-model="inputText" clearable>
-      </el-input>
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</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>
@@ -42,10 +46,13 @@
   </div>
 </template>
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   data() {
     return {
       inputText: "",
+      startTime: null,
+      endTime: null,
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getAllEnFactoryResult?apiId=210&orderType=2",
@@ -80,11 +87,34 @@ export default {
     };
   },
   methods: {
-    //   框计算
+    //   时间查询
     onclick() {
-      this.option.requestUrl =
-        "/api/v1/tms/getAllEnFactoryResult?apiId=210&orderType=2&con="+
-        this.inputText;
+      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) {
+          // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=210&orderType=2&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+          // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }else{
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
     },
     // 查看物资详情
     detailclick(row) {

+ 7 - 3
src/views/sale/components/transport_order/receiveOrder.vue

@@ -33,7 +33,7 @@
         <el-tabs v-model="activeName">
           <!-- 未接收 -->
           <el-tab-pane label="未接收" name="third">
-            <dilTable v-bind.sync="option3" @selection-change="selectionChange" ref="table2">
+            <dilTable v-bind.sync="option3" @selection-change="selectionChange" ref="table2" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
               <el-table-column fixed="right" label="操作" width="180">
                 <template slot-scope="scope">
                   <el-button
@@ -82,7 +82,7 @@
           </el-tab-pane>
           <!-- 已接收 -->
           <el-tab-pane label="已接收" name="first">
-            <dilTable v-bind.sync="option1" ref="table">
+            <dilTable v-bind.sync="option1" ref="table" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
               <el-table-column fixed="right" label="操作" width="50">
                 <template slot-scope="scope">
                   <el-button
@@ -117,7 +117,7 @@
           </el-tab-pane>
           <!-- 已拒绝 -->
           <el-tab-pane label="已拒绝" name="second">
-            <dilTable v-bind.sync="option2" ref="table1">
+            <dilTable v-bind.sync="option2" ref="table1" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang">
               <el-table-column fixed="right" label="操作" width="50">
                 <template slot-scope="scope">
                   <el-button
@@ -158,6 +158,10 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
+      shiyHeigth:140,
+      isHeigth:true,
+      pageSize:100,
+      isKuang:false,
       inputTruck:null,
       inputText: "",
       option1: {

+ 100 - 0
src/views/statisticalReport/components/inwardReport/getLoading.vue

@@ -0,0 +1,100 @@
+<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="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';
+export default {
+  data() {
+    return {   
+      totalCapacity:null,
+      option: {
+        requestUrl: "",
+      },
+      startTime: null,
+      endTime: null,
+      tableTitle:'达钢装货统计报表'
+    };
+  }, 
+  created(){
+          this.option.requestUrl = '/api/v1/tms/getLoading?apiId=453&startTime=null&endTime=null&i=' +new Date()
+  },
+  methods: {
+    func(res){
+        console.log(res.list)     
+        var currentCapacityTotal = 0
+        res.list.forEach(e => {
+          currentCapacityTotal = currentCapacityTotal+e.capacityNumber       
+        });
+        this.totalCapacity = currentCapacityTotal;
+    },
+    getRequestUrl(){
+        this.option.requestUrl = '/api/v1/tms/getLoading?apiId=453&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/getLoading?apiId=453' + "&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>

+ 100 - 0
src/views/statisticalReport/components/inwardReport/getUnLoading.vue

@@ -0,0 +1,100 @@
+<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="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';
+export default {
+  data() {
+    return {   
+      totalCapacity:null,
+      option: {
+        requestUrl: "",
+      },
+      startTime: null,
+      endTime: null,
+      tableTitle:'达钢装货统计报表'
+    };
+  }, 
+  created(){
+          this.option.requestUrl = '/api/v1/tms/getUnLoading?apiId=454&startTime=null&endTime=null&i=' +new Date()
+  },
+  methods: {
+    func(res){
+        console.log(res.list)     
+        var currentCapacityTotal = 0
+        res.list.forEach(e => {
+          currentCapacityTotal = currentCapacityTotal+e.capacityNumber       
+        });
+        this.totalCapacity = currentCapacityTotal;
+    },
+    getRequestUrl(){
+        this.option.requestUrl = '/api/v1/tms/getUnLoading?apiId=454&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/getUnLoading?apiId=454' + "&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>

+ 106 - 0
src/views/statisticalReport/components/inwardReport/inwardFactory.vue

@@ -0,0 +1,106 @@
+<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';
+export default {
+  data() {
+    return {
+      totalNumberFrist:null,
+      totalCapacity:null,
+      option: {
+        requestUrl: "",
+      },
+      startTime: null,
+      endTime: null,
+      tableTitle:'达钢厂内统计报表'
+    };
+  }, 
+  created(){
+          this.option.requestUrl = '/api/v1/tms/getInwardReport?apiId=452&startTime=null&endTime=null&i=' +new Date()
+  },
+  methods: {
+    func(res){
+        console.log(res.list)
+        var resultNetWeightTotalFirst = 0
+        var currentCapacityTotal = 0
+        res.list.forEach(e => {
+          currentCapacityTotal++
+          resultNetWeightTotalFirst = resultNetWeightTotalFirst+e.resultNetWeight
+        });
+        this.totalNumberFrist = resultNetWeightTotalFirst.toFixed(2)
+        this.totalCapacity = currentCapacityTotal;
+    },
+    getRequestUrl(){
+        this.option.requestUrl = '/api/v1/tms/getInwardReport?apiId=452&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>

+ 7 - 2
src/views/statisticalReport/router/index.js

@@ -16,6 +16,9 @@ import transportationPerformance from '../components/salesLogisticsStatistics/tr
 import purchaseChemicalMaterialsNew from '../components/purchaseChemicalMaterials/purchaseChemicalMaterialsNew.vue'
 import purchaseChemicalMaterialsOld from '../components/purchaseChemicalMaterials/purchaseChemicalMaterialsOld.vue'
 import purInwardReport from '../components/inwardReport/putInwardReport.vue'
+import inwardFactory from '../components/inwardReport/inwardFactory.vue'
+import getLoading from '../components/inwardReport/getLoading.vue'
+import getUnLoading from '../components/inwardReport/getUnLoading.vue'
 
 
 Vue.use(Router)
@@ -37,8 +40,10 @@ 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}
-
+      {path: 'purInwardReport', name: 'purInwardReport', meta: {code: 'xtpzgl-yhgl'}, component: purInwardReport},
+      {path: 'inwardFactory', name: 'inwardFactory', meta: {code: 'xtpzgl-yhgl'}, component: inwardFactory},
+      {path: 'getLoading', name: 'getLoading', meta: {code: 'xtpzgl-yhgl'}, component: getLoading},
+      {path: 'getUnLoading', name: 'getUnLoading', meta: {code: 'xtpzgl-yhgl'}, component: getUnLoading}
     ]
   }
 ];