Bläddra i källkod

结算和副产品上线

zouzhd 3 år sedan
förälder
incheckning
2ce3e970a5
51 ändrade filer med 4032 tillägg och 724 borttagningar
  1. 2 2
      build/utils.js
  2. 1 1
      config/index.js
  3. 18 4
      src/views/SporadicManage/components/moreThanMaterialTruck/transportAppoint/addSporadicTransportAppoint.vue
  4. 16 1
      src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/transportOrder.vue
  5. 52 0
      src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/LeaveFactory.vue
  6. 52 0
      src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/Load.vue
  7. 53 0
      src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/enFactory.vue
  8. 52 0
      src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/grossWeight.vue
  9. 52 0
      src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/tareWeight.vue
  10. 52 0
      src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/unload.vue
  11. 1 1
      src/views/SporadicManage/components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue
  12. 15 2
      src/views/SporadicManage/router/index.js
  13. 17 7
      src/views/TMS/components/importedFuel/transportReserveRanAdd.vue
  14. 1 1
      src/views/TMS/components/purchaseChemicalMaterials/transportationReservationAdd.vue
  15. 4 0
      src/views/WMS/app.js
  16. 209 0
      src/views/WMS/components/steel/addCheckWarehouse.vue
  17. 218 0
      src/views/WMS/components/steel/addSteelInbound.vue
  18. 218 0
      src/views/WMS/components/steel/addSteelReserved.vue
  19. 65 0
      src/views/WMS/components/steel/checkWarehouse.vue
  20. 57 9
      src/views/WMS/components/steel/steel_inbound.vue
  21. 186 0
      src/views/WMS/components/steel/steel_inboundReal.vue
  22. 100 0
      src/views/WMS/components/steel/steel_inboundStatistics.vue
  23. 22 14
      src/views/WMS/components/steel/steel_real.vue
  24. 83 0
      src/views/WMS/components/steel/steel_reserved.vue
  25. 1 1
      src/views/WMS/components/steel/steel_restackAdd.vue
  26. 84 27
      src/views/WMS/components/steel/steel_sendreceive.vue
  27. 12 0
      src/views/WMS/router/index.js
  28. 1 1
      src/views/appoint/components/saleContract/addSaleCokeSend.vue
  29. 1 1
      src/views/appoint/components/saleContract/addSaleOrderSend.vue
  30. 447 0
      src/views/appoint/components/saleContract/saleOrderCoproduct.vue
  31. 2 0
      src/views/appoint/router/index.js
  32. 43 38
      src/views/inward/components/inwardFactory/enFactoryResult.vue
  33. 43 38
      src/views/inward/components/inwardFactory/outFactory.vue
  34. 43 38
      src/views/inward/components/inwardFactory/tareWeightResult.vue
  35. 29 84
      src/views/inward/components/inwardFactory/truckLoad.vue
  36. 43 38
      src/views/inward/components/inwardFactory/unload.vue
  37. 118 10
      src/views/inward/components/truckAppoint/addPlan.vue
  38. 41 9
      src/views/inward/components/truckAppoint/addRequirement.vue
  39. 546 102
      src/views/inward/components/truckAppoint/addRequirement2.vue
  40. 256 67
      src/views/inward/components/truckAppoint/plan.vue
  41. 16 2
      src/views/inward/components/truckAppoint/purInwardRequirement.vue
  42. 186 22
      src/views/inward/components/truckAppoint/requirement.vue
  43. 36 2
      src/views/inward/components/truckOrder/addPurInwardOrder.vue
  44. 159 57
      src/views/inward/components/truckOrder/decomposePlan.vue
  45. 120 61
      src/views/inward/components/truckOrder/dispatchPlan.vue
  46. 194 38
      src/views/inward/components/truckOrder/plan.vue
  47. 56 36
      src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailOrder.vue
  48. 0 7
      src/views/sale/components/transport_appointment/directionalDispatch.vue
  49. 3 1
      src/views/statisticalReport/components/inwardReport/putInwardReport.vue
  50. 3 1
      src/views/statisticalReport/components/sporadicReport/sporadicReportEnterFactory.vue
  51. 3 1
      src/views/statisticalReport/components/sporadicReport/sporadicReportExFactory.vue

+ 2 - 2
build/utils.js

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

+ 1 - 1
config/index.js

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

+ 18 - 4
src/views/SporadicManage/components/moreThanMaterialTruck/transportAppoint/addSporadicTransportAppoint.vue

@@ -228,7 +228,7 @@
       <el-button type="primary" @click="makeSure1">确定</el-button>
       <div class="tablecls">
         <!-- 查询所有的物资 -->
-        <dilTable ref="materialTable" v-bind.sync="materialOptions" @radio-change="selectionChange">
+        <dilTable ref="materialTable" v-bind.sync="materialOptions" @radio-change="selectionChange" :drawer="aaadrawer">
         </dilTable>
       </div>
     </el-drawer>
@@ -270,6 +270,7 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      aaadrawer:false,
       disabled:false,
       materialTimes:null,
       options: [],
@@ -312,7 +313,7 @@ export default {
           width: "140",
         },
         {
-          prop: "Specification",
+          prop: "materialSpecification",
           label: "规格型号",
           width: "140",
         },
@@ -382,14 +383,22 @@ export default {
         });
       }
     },
+    table(val){
+      if(val){
+        this.aaadrawer = false;
+      }else{
+        this.aaadrawer = true;
+      }
+    }
   },
   methods: {
     onclickMaterial(){
         if(this.inputMaterial != null){
           this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"+ "&index=" + this.inputMaterial
+          this.inputMaterial = null
         }
         else{
-          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"
+          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395" + "&i=" + new Date() 
         }
     },
     onInputTimes(){
@@ -490,11 +499,16 @@ export default {
     },
     // 返回主界面
     makeSure1() {
+      if(this.tableData.length != 0){
+        this.$message.error("物资已选择,请删除后重试")
+        return
+      }
+      if(JSON.stringify(this.selectionList1).length != 2){
         this.selectionList1.materialPriority = 1
         this.tableData.push(this.selectionList1);    
         this.selectionList1 = [];
         this.table = false;
-        console.log(this.selectionList1)
+      }
     },
     //取消模态框多选
     open() {

+ 16 - 1
src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/transportOrder.vue

@@ -56,6 +56,11 @@
           </el-table-column>      
           </dilTable>
         </el-tab-pane>
+         <!-- 已完成 -->
+        <el-tab-pane label="已完成" name="completed">
+          <dilTable v-bind.sync="completed">
+          </dilTable>
+        </el-tab-pane>
       </el-tabs>
     </div> 
   </div>
@@ -79,6 +84,9 @@ export default {
       first: {
         requestUrl:"",
       },
+      completed:{
+        requestUrl:"",
+      },
       //车辆信息的表格
       truck: {
         requestUrl: "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + '',
@@ -136,13 +144,16 @@ export default {
       }
       if(getCookie('orgCode') == "chengyunshang"){
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" + getCookie("userId") ,
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" + getCookie("userId")
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" + getCookie("userId"),
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&carrierId=" + getCookie("userId")
       }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4"
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5"
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2"
       }else{
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&userId=" + getCookie("orgCode")
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" + getCookie("orgCode")
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&userId=" + getCookie("orgCode")
       }    
   },
   
@@ -159,12 +170,16 @@ export default {
       if(getCookie('orgCode') == "chengyunshang"){
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" + getCookie("userId") + "&test=" + new Date(),
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" + getCookie("userId") + "&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&carrierId=" + getCookie("userId") + "&test=" + new Date()
+      
       }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&test=" + new Date()
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&test=" + new Date()
       }else{
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&userId=" + getCookie("orgCode") + "&test=" + new Date()
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" + getCookie("orgCode") + "&test=" + new Date()
+        this.completed.requestUrl =  "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&userId=" + getCookie("orgCode") + "&test=" + new Date()     
       }
     },
     //删除运输订单

+ 52 - 0
src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/LeaveFactory.vue

@@ -0,0 +1,52 @@
+//出厂
+<template>
+  <!-- 零星物资出厂作业页面 -->
+  <div class="homeworkPath">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <dilTable v-bind.sync="option">      
+    </dilTable>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=20"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=20&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onclick() {
+      this.$message.info("功能暂时关闭")
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
+    }
+  }
+}
+</style>

+ 52 - 0
src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/Load.vue

@@ -0,0 +1,52 @@
+//卸货
+<template>
+  <!-- 零星物资卸货卸货实绩页面 -->
+  <div class="homeworkPath">
+   <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <dilTable v-bind.sync="option"></dilTable>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      restaurants: [],
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=430&orderType=20&status=0"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=430&orderType=20&status=0&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onclick() {
+          this.$message.info("功能暂时关闭")
+    },
+   }
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
+    }
+  }
+}
+</style>

+ 53 - 0
src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/enFactory.vue

@@ -0,0 +1,53 @@
+//进厂
+<template>
+  <!-- 零星物资进厂作业页面 -->
+  <div class="homeworkPath">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <dilTable v-bind.sync="option">      
+    </dilTable>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+    };
+  },
+  created(){
+    console.log("enter!")
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=20"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=20&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onclick() {
+      this.$message.info("功能暂时关闭")
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
+    }
+  }
+}
+</style>

+ 52 - 0
src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/grossWeight.vue

@@ -0,0 +1,52 @@
+//计毛
+<template>
+  <!-- 零星物资计毛作业页面 -->
+  <div class="homeworkPath">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <dilTable v-bind.sync="option">      
+    </dilTable>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=20"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=20&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onclick() {
+      this.$message.info("功能暂时关闭")
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
+    }
+  }
+}
+</style>

+ 52 - 0
src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/tareWeight.vue

@@ -0,0 +1,52 @@
+//计皮
+<template>
+  <!-- 零星物资计皮作业页面 -->
+  <div class="homeworkPath">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <dilTable v-bind.sync="option">      
+    </dilTable>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=20"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=20&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onclick() {
+      this.$message.info("功能暂时关闭")
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
+    }
+  }
+}
+</style>

+ 52 - 0
src/views/SporadicManage/components/sporadicMaterial/inwardSporadicFactory/unload.vue

@@ -0,0 +1,52 @@
+//卸货
+<template>
+  <!-- 零星物资卸货卸货实绩页面 -->
+  <div class="homeworkPath">
+   <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <dilTable v-bind.sync="option"></dilTable>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      restaurants: [],
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=389&orderType=20"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=389&orderType=20&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onclick() {
+          this.$message.info("功能暂时关闭")
+    },
+   }
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
+    }
+  }
+}
+</style>

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

@@ -552,7 +552,7 @@ export default {
     ondrawer(num) {
       if(getCookie("orgCode") == "biemeierchejian"){
         this.line.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + "二厂:零星单拼出厂" 
+          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + "二厂-总厂:采购内转燃料路线" 
       }else{
         this.line.requestUrl =
           "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" + "&t=" + new Date();

+ 15 - 2
src/views/SporadicManage/router/index.js

@@ -65,8 +65,13 @@ import mornThanOUToutFactory from '../components/moreThanMaterialTruck/sporadicO
 import mornThanOUTtareWeight from '../components/moreThanMaterialTruck/sporadicOutfactory/tareWeight.vue'
 import mornThanOUTload from '../components/moreThanMaterialTruck/sporadicOutfactory/load.vue'
 
-
-
+// 内转零星内转进厂展示界面
+import sporadicEnfactoryInward from '../components/sporadicMaterial/inwardSporadicFactory/enFactory.vue'
+import sporadicgrossWeightInward from '../components/sporadicMaterial/inwardSporadicFactory/grossWeight.vue'
+import sporadicLeavefactoryInward from '../components/sporadicMaterial/inwardSporadicFactory/LeaveFactory.vue'
+import sporadicLoadInward from '../components/sporadicMaterial/inwardSporadicFactory/Load.vue'
+import sporadicTareWeightInward from '../components/sporadicMaterial/inwardSporadicFactory/tareWeight.vue'
+import sporadicUnloadInward from '../components/sporadicMaterial/inwardSporadicFactory/unload.vue'
 
 Vue.use(Router)
 const constantRouterMap = [
@@ -134,6 +139,14 @@ const constantRouterMap = [
        {path:'mornThanOUToutFactory',name:'sporadicOUToutFactory',meta:{code:'xtpzgl-yhgl'},component:mornThanOUToutFactory},
        {path:'mornThanOUTtareWeight',name:'sporadicOUTtareWeight',meta:{code:'xtpzgl-yhgl'},component:mornThanOUTtareWeight},
        {path:'mornThanOUTload',name:'mornThanOUTload',meta:{code:'xtpzgl-yhgl'},component:mornThanOUTload},
+
+       //内转零星内转
+       {path:'sporadicEnfactoryInward',name:'sporadicEnfactoryInward',meta:{code:'xtpzgl-yhgl'},component:sporadicEnfactoryInward},
+       {path:'sporadicgrossWeightInward',name:'sporadicgrossWeightInward',meta:{code:'xtpzgl-yhgl'},component:sporadicgrossWeightInward},
+       {path:'sporadicLeavefactoryInward',name:'sporadicLeavefactoryInward',meta:{code:'xtpzgl-yhgl'},component:sporadicLeavefactoryInward},
+       {path:'sporadicLoadInward',name:'sporadicLoadInward',meta:{code:'xtpzgl-yhgl'},component:sporadicLoadInward},
+       {path:'sporadicTareWeightInward',name:'sporadicTareWeightInward',meta:{code:'xtpzgl-yhgl'},component:sporadicTareWeightInward},
+       {path:'sporadicUnloadInward',name:'sporadicUnloadInward',meta:{code:'xtpzgl-yhgl'},component:sporadicUnloadInward},
     ]    
   }
 ];

+ 17 - 7
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

@@ -3,12 +3,12 @@
   <div id="contractDetails">
     <page-title>运输预约</page-title>
     <div class="orderType from">
-      <span class="text">订单类别:</span>
+      <span class="text">卸货厂区:</span>
       <el-select
         class="select"
         v-model="orderType"
         placeholder="请选择"
-
+        @change="onchange()"
       >
         <el-option
           v-for="item in orderTypeList"
@@ -102,7 +102,6 @@
             </template>
           </template>
         </el-table-column>
-
         <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
             <el-button type="text" size="small" @click="onClick(scope.$index)"
@@ -228,15 +227,16 @@ export default {
       //采购订单号
       purchaseOrderNo: "",
       isMoreTrips: false,
+      purchaseOrgId:null,
       //订单类别
       orderTypeList: [
         {
           value: 6,
-          label: "老厂区",
+          label: "一厂",
         },
         {
           value: 7,
-          label: "新厂区",
+          label: "二厂",
         },
       ],
       // 线路名称
@@ -340,6 +340,14 @@ export default {
     onClick(index) {
       this.selectionList.splice(index, 1);
     },
+    onchange(){
+      if(this.orderType == 6){
+        this.purchaseOrgId = 1
+      }else{
+        this.purchaseOrgId = 2
+      }
+      this.getPurchaseOrderNo()
+    },
     onBlur() {
       this.getPurchaseOrderNo();
     },
@@ -347,12 +355,13 @@ export default {
       let map = {
         materialId: this.materialId,
         supplierId: this.supplierId,
+        purchaseOrgId: this.purchaseOrgId
       };
       if (this.remark) {
         map.remark = this.remark;
       }
       console.log(this.map);
-      if (this.materialId && this.supplierId) {
+      if (this.materialId && this.supplierId && this.purchaseOrgId) {
         this.axios.post("/api/v1/oms/selectNewOrderId", map).then((res) => {
           console.log(res);
           if (res.data.code == "200") {
@@ -361,6 +370,7 @@ export default {
                 message: "没有匹配的采购订单号!",
                 type: "warning",
               });
+              this.purchaseOrderNo = null
               this.form1 = [];
             } else {
               console.log();
@@ -494,7 +504,7 @@ export default {
           "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
       } else if (num == 5) {
         this.line.requestUrl =
-          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
+          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date() + "&con=" + "燃料";
       } else if (num == 6) {
         this.purchaseOrder.requestUrl =
           "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId=" +

+ 1 - 1
src/views/TMS/components/purchaseChemicalMaterials/transportationReservationAdd.vue

@@ -441,7 +441,7 @@ export default {
       } else if (num == 4) {
         this.unloadPoint.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
       } else if (num == 5) {
-        this.line.requestUrl ="/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
+        this.line.requestUrl ="/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date() + "&con=化工材料";
       }else if (num == 6) {
         this.purchaseOrder.requestUrl = "/api/v1/ams/getPurchaseOrderList?apiId=81&i=" + new Date();
       }

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

@@ -8,6 +8,10 @@ import '@/config/include.js';
 // 通用store
 import store from '@/store/index.js';
 
+// 导出Excel全局组件
+import tableToExcel from '@/components/exportExcel/exportExcel'
+Vue.use(tableToExcel)
+
 // router
 import router from './router/index.js';
 

+ 209 - 0
src/views/WMS/components/steel/addCheckWarehouse.vue

@@ -0,0 +1,209 @@
+<template>
+  <!-- 新增盘库作业页面 -->
+  <div class="addCheckWarehouse">
+    <page-title>盘库作业</page-title>
+    <div class="material from">
+      <span class="text">仓库:</span>
+      <el-input class="input" v-model="warehouseName" disabled> </el-input>
+      <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
+    </div>
+    <div class="material from">
+      <span class="text">物资:</span>
+      <el-input class="input" v-model="materialName" disabled> </el-input>
+      <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">件数:</span>
+      <el-input class="input" v-model="materialNumber"> </el-input>
+    </div>
+    <!-- 模态窗口 -->
+    <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
+      <div style="margin-bottom: 10px">
+        <el-input
+          placeholder="请输入内容"
+          v-model="input"
+          style="margin-top: 10px; margin-right: 10px; width: 250px"
+          clearable
+        ></el-input>
+        <el-button type="primary" class="btn" @click="onclick(a)">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+      </div>
+      <div v-show="a == 1">
+        <dilTable
+          v-bind.sync="first"
+          @radio-change="currentRadioChange1"
+        ></dilTable>
+      </div>
+      <div v-show="a == 2">
+        <dilTable
+          v-bind.sync="second"
+          @radio-change="currentRadioChange2"
+        ></dilTable>
+      </div>          
+    </el-drawer>
+    <div class="button_box">
+      <el-button @click="onClickCancel">返回</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime, isNumber, isIntegerNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      disabled:false,
+      //仓库名称
+      warehouseName:null,
+      //物资名称
+      materialName: null,
+      //物资编码
+      materialCode:null,
+      //盘点数量
+      materialNumber:null,
+      //物资id
+      materialId: null,
+      //是否需要打开模态窗口
+      drawer: false,
+      a: 1,
+      direction: "rtl",
+      input: "",
+      first: {
+        requestUrl: "",
+        selectionType: "radio",
+        mapList1: [],
+      },
+      second: {
+          requestUrl: "",
+          selectionType:"radio"
+      }
+    };
+  },
+  watch: {
+    drawer(val) {
+      if (!val) {
+        this.input = null;
+      }
+    },
+  },
+  created() {
+      
+  },
+  methods: {
+    onclick(a) {
+      if (a == 1) {
+        this.first.requestUrl =
+          "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
+          this.input;
+      }
+    },
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      if(num==1){
+          this.first.requestUrl = "/api/v1/wms/getSteelMaterialList?apiId=443"
+      }else{
+          this.second.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&index=库" + "&i=" + new Date();
+      }
+    },
+    // 返回
+    onClickCancel() {
+      this.$router.push("/steel_checkWarehouse");
+    },
+    currentRadioChange1(selection) {
+      console.log(selection);
+      this.materialName = selection.materialName + selection.materialSpecification + '(' + selection.materialModel + ')' ;
+      this.materialId = selection.materialId;
+      this.materialCode = selection.materialCode
+    },
+    currentRadioChange2(selection) {
+      this.warehouseId = selection.warehouseId
+      this.warehouseName = selection.warehouseName
+    },
+    // 确认
+    onClickConfirm() {
+      console.log(this.warehouseId,this.materialCode,this.materialNumber);
+      this.disabled = true
+      this.axios.post("/api/v1/wms/insertStockTaking?warehouseId=" + this.warehouseId + "&materialCode=" + this.materialCode + "&quantity=" + this.materialNumber ).then((res) => {
+          if (res.data.code == "200") {
+            this.$message({
+              message: "添加成功!",
+              type: "success",
+            });
+            this.disabled = false
+            this.onClickCancel()
+          }
+        });
+    },
+  },
+};
+</script>
+<style lang="scss" scope>
+.addCheckWarehouse{
+.contractDetails {
+  width: 100%;
+}
+.from {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-top: 5px;
+  margin-bottom: 20px;
+}
+.warehouse {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
+  margin-right: 70px;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
+  }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
+}
+.material {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
+  }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
+}
+.materialNumber {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+        display:inline-block;
+        width: 170px;
+        text-align: right;
+    }
+    .input {
+        width: 250px;
+        margin-right: 20px;
+    }
+}
+.button_box {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 100%;
+  height: 100px;
+}
+}
+</style>

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

@@ -0,0 +1,218 @@
+<template>
+  <!-- 新增入库转预留作业页面 -->
+  <div class="addCheckWarehouse">
+    <page-title>入库转预留作业</page-title>
+    <div class="material from">
+      <span class="text">物资规格型号:</span>
+      <el-input class="input" v-model="materialName" disabled> </el-input>
+      <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">最大预留件数:</span>
+      <el-input class="input" v-model="max" disabled> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">件数:</span>
+      <el-input class="input" v-model="materialNumber"> </el-input>
+    </div>
+    <!-- 模态窗口 -->
+    <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
+      <div style="margin-bottom: 10px">
+        <el-input
+          placeholder="请输入内容"
+          v-model="input"
+          style="margin-top: 10px; margin-right: 10px; width: 250px"
+          clearable
+        ></el-input>
+        <el-button type="primary" class="btn" @click="onclick(a)">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+      </div>
+      <div v-show="a == 1">
+        <dilTable
+          v-bind.sync="first"
+          @radio-change="currentRadioChange1"
+        ></dilTable>
+      </div>
+      <div v-show="a == 2">
+        <dilTable
+          v-bind.sync="second"
+          @radio-change="currentRadioChange2"
+        ></dilTable>
+      </div>          
+    </el-drawer>
+    <div class="button_box">
+      <el-button @click="onClickCancel">返回</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime, isNumber, isIntegerNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      max:null,
+      disabled:false,
+      //仓库名称
+      warehouseName:null,
+      //物资名称
+      materialName: null,
+      //物资编码
+      materialCode:null,
+      //盘点数量
+      materialNumber:null,
+      //物资id
+      materialId: null,
+      //是否需要打开模态窗口
+      drawer: false,
+      a: 1,
+      direction: "rtl",
+      input: "",
+      first: {
+        requestUrl: "",
+        selectionType: "radio",
+        mapList1: [],
+      },
+      second: {
+          requestUrl: "",
+          selectionType:"radio"
+      }
+    };
+  },
+  watch: {
+    drawer(val) {
+      if (!val) {
+        this.input = null;
+      }
+    },
+  },
+  created() {
+      
+  },
+  methods: {
+    onclick(a) {
+      if (a == 1) {
+        this.first.requestUrl =
+          "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
+          this.input;
+      }
+    },
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      if(num==1){
+          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=443&warehouseId="+3+"&status="+1
+      }
+    },
+    // 返回
+    onClickCancel() {
+      this.$router.push("/steel_checkWarehouse");
+    },
+    currentRadioChange1(selection) {
+      console.log(selection);
+      this.materialName = selection.materialName + selection.materialSpecification + '(' + selection.materialModel + ')' ;
+      this.materialId = selection.materialId;
+      this.materialCode = selection.materialCode;
+      this.materialSpecification = selection.materialSpecification;
+      this.materialModel = selection.materialModel;
+      this.max = selection.max;
+    },
+    currentRadioChange2(selection) {
+      this.warehouseId = selection.warehouseId
+      this.warehouseName = selection.warehouseName
+    },
+    // 确认
+    onClickConfirm() {
+      // console.log(this.warehouseId,this.materialCode,this.materialNumber);
+      this.disabled = true
+      this.axios.post("/api/v1/wms/insertReserved?warehouseId=" + 3 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
+        console.log(res.data)
+          if (res.data.code == "200") {
+            this.$message({
+              message: "预留成功!",
+              type: "success",
+            });
+            this.disabled = false
+            this.onClickCancel()
+            this.$router.go(-1)
+          }else if(res.data.code=="201"){
+            this.$message({
+              message:"预留的数量不正确",
+              type:"faile",
+            })
+          }
+          this.$router.go(-1)
+        });
+    },
+  },
+};
+</script>
+<style lang="scss" scope>
+.addCheckWarehouse{
+.contractDetails {
+  width: 100%;
+}
+.from {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-top: 5px;
+  margin-bottom: 20px;
+}
+.warehouse {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
+  margin-right: 70px;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
+  }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
+}
+.material {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
+  }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
+}
+.materialNumber {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+        display:inline-block;
+        width: 170px;
+        text-align: right;
+    }
+    .input {
+        width: 250px;
+        margin-right: 20px;
+    }
+}
+.button_box {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 100%;
+  height: 100px;
+}
+}
+</style>

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

@@ -0,0 +1,218 @@
+<template>
+  <!-- 新增预留转入库作业页面 -->
+  <div class="addCheckWarehouse">
+    <page-title>入库转预留作业</page-title>
+    <div class="material from">
+      <span class="text">物资规格型号:</span>
+      <el-input class="input" v-model="materialName" disabled> </el-input>
+      <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">最大预留件数:</span>
+      <el-input class="input" v-model="max" disabled> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">件数:</span>
+      <el-input class="input" v-model="materialNumber"> </el-input>
+    </div>
+    <!-- 模态窗口 -->
+    <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
+      <div style="margin-bottom: 10px">
+        <el-input
+          placeholder="请输入内容"
+          v-model="input"
+          style="margin-top: 10px; margin-right: 10px; width: 250px"
+          clearable
+        ></el-input>
+        <el-button type="primary" class="btn" @click="onclick(a)">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+      </div>
+      <div v-show="a == 1">
+        <dilTable
+          v-bind.sync="first"
+          @radio-change="currentRadioChange1"
+        ></dilTable>
+      </div>
+      <div v-show="a == 2">
+        <dilTable
+          v-bind.sync="second"
+          @radio-change="currentRadioChange2"
+        ></dilTable>
+      </div>          
+    </el-drawer>
+    <div class="button_box">
+      <el-button @click="onClickCancel">返回</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime, isNumber, isIntegerNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      max:null,
+      disabled:false,
+      //仓库名称
+      warehouseName:null,
+      //物资名称
+      materialName: null,
+      //物资编码
+      materialCode:null,
+      //盘点数量
+      materialNumber:null,
+      //物资id
+      materialId: null,
+      //是否需要打开模态窗口
+      drawer: false,
+      a: 1,
+      direction: "rtl",
+      input: "",
+      first: {
+        requestUrl: "",
+        selectionType: "radio",
+        mapList1: [],
+      },
+      second: {
+          requestUrl: "",
+          selectionType:"radio"
+      }
+    };
+  },
+  watch: {
+    drawer(val) {
+      if (!val) {
+        this.input = null;
+      }
+    },
+  },
+  created() {
+      
+  },
+  methods: {
+    onclick(a) {
+      if (a == 1) {
+        this.first.requestUrl =
+          "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
+          this.input;
+      }
+    },
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      if(num==1){
+          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=443&warehouseId="+3+"&status="+2
+      }
+    },
+    // 返回
+    onClickCancel() {
+      this.$router.push("/steel_checkWarehouse");
+    },
+    currentRadioChange1(selection) {
+      console.log(selection);
+      this.materialName = selection.materialName + selection.materialSpecification + '(' + selection.materialModel + ')' ;
+      this.materialId = selection.materialId;
+      this.materialCode = selection.materialCode;
+      this.materialSpecification = selection.materialSpecification;
+      this.materialModel = selection.materialModel;
+      this.max = selection.max;
+    },
+    currentRadioChange2(selection) {
+      this.warehouseId = selection.warehouseId
+      this.warehouseName = selection.warehouseName
+    },
+    // 确认
+    onClickConfirm() {
+      // console.log(this.warehouseId,this.materialCode,this.materialNumber);
+      this.disabled = true
+      this.axios.post("/api/v1/wms/insertInbounds?warehouseId=" + 3 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
+        console.log(res.data)
+          if (res.data.code == "200") {
+            this.$message({
+              message: "入库成功!",
+              type: "success",
+            });
+            this.disabled = false
+            this.onClickCancel()
+            this.$router.go(-1)
+          }else if(res.data.code=="201"){
+            this.$message({
+              message:"入库的数量不正确",
+              type:"faile",
+            })
+          }
+          this.$router.go(-1)
+        });
+    },
+  },
+};
+</script>
+<style lang="scss" scope>
+.addCheckWarehouse{
+.contractDetails {
+  width: 100%;
+}
+.from {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-top: 5px;
+  margin-bottom: 20px;
+}
+.warehouse {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
+  margin-right: 70px;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
+  }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
+}
+.material {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
+  }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
+}
+.materialNumber {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+        display:inline-block;
+        width: 170px;
+        text-align: right;
+    }
+    .input {
+        width: 250px;
+        margin-right: 20px;
+    }
+}
+.button_box {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 100%;
+  height: 100px;
+}
+}
+</style>

+ 65 - 0
src/views/WMS/components/steel/checkWarehouse.vue

@@ -0,0 +1,65 @@
+// 盘库作业
+<template>
+  <div class="steel_inbound">
+    <div class="top">
+      <!-- 框计算 -->
+      <el-input placeholder="请输入内容" class="input" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn1" @click="AddClick">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="tab">
+      <dilTable v-bind.sync="option">
+      </dilTable>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      // 框计算的输入框的值
+      inputText: null,
+      // 表格渲染的表头及数据
+      option: {
+        requestUrl: "/api/v1/wms/getStockTakingList?apiId=442",
+      },
+    };
+  },
+  methods: {
+    // 框计算查询按钮
+    onclick() {
+      console.log(this.inputText)
+    },
+    // 跳转新增运输路线页面
+    AddClick() {
+      this.$router.push({
+        path: "/steel_addCheckWarehouse",
+      });
+    },
+  },
+};
+</script>
+<style lang="scss">
+.steel_inbound{
+  .top{
+    width: 100%;
+    height: 100px;
+    display: flex;
+    align-items: center;
+    padding-left: 30px;
+    .input{
+      width: 250px;
+    }
+    .btn{
+      margin: 20px;
+    }
+  }
+}
+
+</style>

+ 57 - 9
src/views/WMS/components/steel/steel_inbound.vue

@@ -2,47 +2,95 @@
 <template>
   <div class="steel_inbound">
     <div class="sache">
-      <el-input
+      <!-- <el-input
         placeholder="请输入内容"
         v-model="inputText"
         clearable>
       </el-input>
+       -->
+      <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" class="btn" @click="onreserved">
+        预留
+      </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options">
-        <el-table-column fixed="right" label="操作" width="150">
+      <dilTable v-bind.sync="options" >
+        <!-- <el-table-column fixed="right" label="操作" width="150">
 								<template slot-scope="scope">
 									<el-button type="text" size="mini" @click="inboundDetails(scope)">
 										详情
 									</el-button>
 								</template>
-							</el-table-column>
+				</el-table-column> -->
       </dilTable>
     </div>
   </div>
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from '@/utils/util.js';
 export default {
   data(){
     return{
       inputText:"",
+      startTime: null,
+      endTime: null,
       options:{
         // first请求数据的地址
         requestUrl: "/api/v1/wms/getWmsInboundResult?apiId=371",
+        // selectionType: "select",
+        // mapList: [],
       },
     }
   },
   methods:{
-    inboundDetails(scope){
-      	this.$router.push("/inboundDetails/" + scope.row.inboundId)
-      	
-    },
+    // inboundDetails(scope){
+    //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
+    // },
     onclick(){
-      console.log("点击事件");
+
+      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.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&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()
+      }
+    },
+    selectionChange(selection) {
+      this.options.mapList = selection;
+    },
+    onreserved(){
+      this.$router.push({
+        path: "/addSteelInbound",
+      });
     }
   }
 }

+ 186 - 0
src/views/WMS/components/steel/steel_inboundReal.vue

@@ -0,0 +1,186 @@
+//真实入库作业
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <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-select v-model="region" placeholder="请选择班次">
+        <el-option label="早班" value="1"></el-option>
+        <el-option label="中班" value="2"></el-option>
+        <el-option label="晚班" value="3"></el-option>
+      </el-select>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <!-- <el-button type="primary" class="btn" @click="onreserved">
+        预留
+      </el-button> -->
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options" @selection-change="selectionChange" ref="table">
+        <!-- <el-table-column fixed="right" label="操作" width="150">
+								<template slot-scope="scope">
+									<el-button type="text" size="mini" @click="inboundDetails(scope)">
+										详情
+									</el-button>
+								</template>
+				</el-table-column> -->
+      </dilTable>
+    </div>
+  </div>
+</template>
+
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from '@/utils/util.js';
+export default {
+  data(){
+    return{
+      inputText:"",
+      startTime: null,
+      endTime: null,
+      region: '',
+      options:{
+        // first请求数据的地址
+        requestUrl: "/api/v1/wms/getWmsInboundResults?apiId=371",
+        // selectionType: "select",
+        // mapList: [],
+      },
+    }
+  },
+  methods:{
+    // inboundDetails(scope){
+    //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
+    // },
+    onclick(){
+      let startTime = null;
+      let endTime = null;
+      
+      // 判断用户有没有班次,有班次则提供默认时间
+      if(this.region!=null){
+        // 获取当前的日期时间
+        let date = new Date();
+        let year = date.getFullYear(); // 年
+        let month = date.getMonth() + 1; // 月
+        let day = date.getDate(); // 日
+        // 判断当前用户选择的具体班次
+        if(this.region == 1){
+          this.startTime = year+"-"+month+"-"+day+" "+"07:30:00";
+          this.endTime = year+"-"+month+"-"+day+" "+"15:30:00";
+        }else if(this.region == 2){
+          this.startTime = year+"-"+month+"-"+day+" "+"15:30:00";
+          this.endTime = year+"-"+month+"-"+day+" "+"23:30:00";
+        }else if(this.region == 3){
+          this.endTime = year+"-"+month+"-"+day+" "+"07:30:00";
+          // 将开始时间减一
+          day =day-1;
+          this.startTime = year+"-"+month+"-"+day+" "+"23:30:00";
+        }
+        // 将拼接好的日期转换为时间戳
+        startTime = Date.parse(new Date(this.startTime))
+        endTime = Date.parse(new Date(this.endTime))
+        console.log(startTime)
+        console.log(endTime)
+      }else{
+        if (this.startTime) {
+        startTime = sjTime(this.startTime);
+        }
+        if (this.endTime) {
+          endTime = sjTime(this.endTime);
+        }
+      }
+      
+      // console.log(startTime)
+      // console.log(endTime)
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.options.requestUrl = "/api/v1/wms/getWmsInboundResults?apiId=371&&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          this.options.requestUrl = "/api/v1/wms/getWmsInboundResults?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          }else{
+          this.options.requestUrl = '/api/v1/wms/getWmsInboundResults?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()
+      }
+    },
+    selectionChange(selection) {
+      this.options.mapList = selection;
+    },
+    onreserved(){
+      console.log("fahaahahahaha")
+      if (this.options.mapList.length == 0) {
+        this.$message({
+          type: "warning",
+          message: "请先选择入库单!",
+        });
+      } else {
+        this.$confirm("是否预留", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+          center: true,
+        })
+          .then(() => {
+            //初始化maplist
+            var mapList = [];
+            this.options.mapList.forEach((item, i) => {
+              //初始化mapItem
+              var mapItem = {
+                //入库实绩表id
+                inboundId: 0,
+                // 给一个标记定义其为入库变为预留
+                status: 0,
+              };
+              mapItem.inboundId = item.inboundId;
+              mapList.push(mapItem);
+            });
+            this.$message({
+              type: "success",
+              message: "预留成功!",
+            });
+            console.log(mapList)
+            this.axios.post("/api/v1/wms/changeReserved", mapList).then((res) => {
+              console.log("res.data"+res.data)
+              if (res.data >= 1) {
+                //改变查询条件
+                this.$refs.table.setDataRequestQuery({
+                  
+                });  
+                this.$router.go(0);
+              }
+            });
+            console.log("fdagfaahh")
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "取消上传!",
+            });
+          });
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scode>
+.steel_inbound{
+  .sache{
+    height: 5rem;
+    display: flex;
+    align-items: center;
+    padding-left: 1.875rem;
+  }
+}
+</style>

+ 100 - 0
src/views/WMS/components/steel/steel_inboundStatistics.vue

@@ -0,0 +1,100 @@
+//入库
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <!-- <el-input
+        placeholder="请输入内容"
+        v-model="inputText"
+        clearable>
+      </el-input>
+       -->
+      <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>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options" >
+        <!-- <el-table-column fixed="right" label="操作" width="150">
+								<template slot-scope="scope">
+									<el-button type="text" size="mini" @click="inboundDetails(scope)">
+										详情
+									</el-button>
+								</template>
+				</el-table-column> -->
+      </dilTable>
+    </div>
+  </div>
+</template>
+
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from '@/utils/util.js';
+export default {
+  data(){
+    return{
+      inputText:"",
+      startTime: null,
+      endTime: null,
+      options:{
+        // first请求数据的地址
+        requestUrl: "/api/v1/wms/getWmsInboundResultStatistics?apiId=371&warehouseId="+3,
+        // selectionType: "select",
+        // mapList: [],
+      },
+    }
+  },
+  methods:{
+    // inboundDetails(scope){
+    //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
+    // },
+    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) {
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=371&warehouseId="+3+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=371&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          }else{
+          this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=371&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
+    },
+    selectionChange(selection) {
+      this.options.mapList = selection;
+    },
+  }
+}
+</script>
+
+<style lang="scss" scode>
+.steel_inbound{
+  .sache{
+    height: 5rem;
+    display: flex;
+    align-items: center;
+    padding-left: 1.875rem;
+  }
+}
+</style>

+ 22 - 14
src/views/WMS/components/steel/steel_real.vue

@@ -9,42 +9,50 @@
 			</el-button>
 		</div>
   <dilTable v-bind.sync="option">
-      <el-table-column fixed="right" label="操作" width="110">
+      <!-- <el-table-column fixed="right" label="操作" width="110">
         <template slot-scope="scope">
           <el-button @click="demotionClick(scope.row.gridId)" type="text" size="small"
             >物资不合格</el-button
           >
         </template>
-      </el-table-column>
+      </el-table-column> -->
     </dilTable>
     </div>
 </template>
 
-
-
 <script>
 export default {
  name:"steel_real",
-data(){
-   return {
-     inputText:"",
-     option: {
-      requestUrl: "/api/v1/wms/selectGridMaterialList?apiId=167",
-      },
-    };
-  },
+  data(){
+    return {
+      inputText:"",
+      option: {
+        requestUrl: "/api/v1/wms/selectGridMaterialList?apiId=167",
+        },
+      };
+    },
   mounted(){
 
   },
   methods:{
     demotionClick(gridId){
       this.$router.push("/steel_realDown/" + gridId);
+    },
+    onClick(){
+      this.option.requestUrl= "/api/v1/wms/selectGridMaterialList?apiId=167&&con="+this.inputText;
+      console.log(this.inputText)
     }
   },
 };
 </script>
 <style lang="scss" scode>
-.steel_real {
-    padding: 1.25rem 1.875rem;
+.steel_real{
+  .sache{
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
 }
 </style>

+ 83 - 0
src/views/WMS/components/steel/steel_reserved.vue

@@ -0,0 +1,83 @@
+//预留转入库
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <el-input
+        placeholder="请输入内容"
+        v-model="inputText"
+        clearable>
+      </el-input>
+      
+      <!-- <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" class="btn" @click="onreserved">
+        入库
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options" >
+        <!-- <el-table-column fixed="right" label="操作" width="150">
+								<template slot-scope="scope">
+									<el-button type="text" size="mini" @click="inboundDetails(scope)">
+										详情
+									</el-button>
+								</template>
+				</el-table-column> -->
+      </dilTable>
+    </div>
+  </div>
+</template>
+
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from '@/utils/util.js';
+export default {
+  data(){
+    return{
+      inputText:"",
+      startTime: null,
+      endTime: null,
+      options:{
+        // first请求数据的地址
+        requestUrl: "/api/v1/wms/getWmsReservedResult?apiId=371",
+        // selectionType: "select",
+        // mapList: [],
+      },
+    }
+  },
+  methods:{
+    // inboundDetails(scope){
+    //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
+    // },
+    onclick(){
+      this.options.requestUrl= "/api/v1/wms/getWmsReservedResult?apiId=371&con="+this.inputText;
+    },
+    selectionChange(selection) {
+      this.options.mapList = selection;
+    },
+    onreserved(){
+      this.$router.push({
+        path: "/addSteelReserved",
+      });
+    }
+  }
+}
+</script>
+
+<style lang="scss" scode>
+.steel_inbound{
+  .sache{
+    height: 5rem;
+    display: flex;
+    align-items: center;
+    padding-left: 1.875rem;
+  }
+}
+</style>

+ 1 - 1
src/views/WMS/components/steel/steel_restackAdd.vue

@@ -196,7 +196,7 @@ export default {
     mounted(){
         this.initialization();
         //新增下拉框方法
-        this.initialization1();
+        // this.initialization1();
     },
      methods: {
         //  创建选择物资型号的方法

+ 84 - 27
src/views/WMS/components/steel/steel_sendreceive.vue

@@ -1,49 +1,106 @@
 //收发存报表
 <template>
-  <div class="steel_inbound">
-    <div class="sache">
-      <el-input
-        placeholder="请输入内容"
-        v-model="inputText"
-        clearable>
-      </el-input>
+  <div class="sendReceive">
+    <div class="frameCalculation">
+      <span>库存时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="date"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <!-- <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="date"
+        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>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+      <!-- <span style="margin-left: 1rem;">合计昨日库存:</span>
+      <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input> -->
+      <span style="margin-left: 1rem;">合计今日库存:</span>
+      <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options">
-      </dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
     </div>
   </div>
 </template>
 
 <script>
+import { sjTime } from '@/utils/sharedJsFile'
 export default {
-  data(){
-    return{
-      inputText:"",
-      options:{
-        // first请求数据的地址
-        requestUrl: "/api/v1/wms/getSendReceive?apiId=97",
+  data() {
+    return {
+      option: {
+        requestUrl: "/api/v1/wms/getSendReceive?apiId=97&startTime=null&endTime=null&i=" +new Date(),
       },
-    }
+      startTime: null,
+      endTime: null,
+      //合计今日库存
+      totalNumber: 0,
+      tableTitle:'收发存报表'
+    };
   },
-  methods:{
-    onclick(){
-      console.log("点击事件");
-    }
-  }
-}
+  methods: {
+    refresh(){
+      this.$router.go(0);
+    },
+    func(res){
+      console.log(res)
+      var lastDayTotal = 0
+      res.list.forEach(e => {
+        lastDayTotal = lastDayTotal+e.send_receive_thisday_inventory
+      });
+      this.totalNumber = lastDayTotal
+      //this.totalCapacity = res.total;
+      //获取总记录条数作为合计车数
+      // this.totalCapacity = res.total;
+      this.isKuang = false;
+    },
+    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/wms/getSendReceive?apiId=97&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        this.option.requestUrl = "/api/v1/wms/getSendReceive?apiId=97&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      }
+    },
+  },
+};
 </script>
 
-<style lang="scss" scode>
-.steel_inbound{
-  .sache{
-    height: 5rem;
+<style lang="scss">
+.sendReceive {
+  .frameCalculation {
+    width: 100%;
+    height: 100px;
     display: flex;
     align-items: center;
-    padding-left: 1.875rem;
+    padding-left: 50px;
+    .el-date-editor{
+      margin: 20px;
+    }
   }
 }
 </style>

+ 12 - 0
src/views/WMS/router/index.js

@@ -27,6 +27,8 @@ import insertTransfer from '../components/steel/insertTransfer.vue'
 import steel_check from '../components/steel/steel_check.vue'
 import steel_close from '../components/steel/steel_close.vue'
 import steel_inbound from '../components/steel/steel_inbound.vue'
+import steel_inboundReal from '../components/steel/steel_inboundReal.vue'
+import steel_reserved from '../components/steel/steel_reserved.vue'
 import steel_outbound from '../components/steel/steel_outbound.vue'
 import steel_real from '../components/steel/steel_real.vue'
 import steel_realDown from '../components/steel/steel_realDown.vue'
@@ -35,6 +37,10 @@ import steel_restack from '../components/steel/steel_restack.vue'
 import steel_restackAdd from '../components/steel/steel_restackAdd.vue'
 import steel_sendreceive from '../components/steel/steel_sendreceive.vue'
 import steel_transfer from '../components/steel/steel_transfer.vue'
+import steel_checkWarehouse from '../components/steel/checkWarehouse.vue'
+import steel_addCheckWarehouse from '../components/steel/addCheckWarehouse.vue'
+import addSteelInbound from '../components/steel/addSteelInbound.vue'
+import addSteelReserved from '../components/steel/addSteelReserved.vue'
 Vue.use(Router)
 const constantRouterMap = [
 	{
@@ -66,6 +72,8 @@ const constantRouterMap = [
 		{path: 'steel_check', name: 'steel_check', meta: {code: 'xtpzgl-yhgl'}, component: steel_check},
 		{path: 'steel_close', name: 'steel_close', meta: {code: 'xtpzgl-yhgl'}, component: steel_close},
 		{path: 'steel_inbound', name: 'steel_inbound', meta: {code: 'xtpzgl-yhgl'}, component: steel_inbound},
+		{path: 'steel_inboundReal', name: 'steel_inboundReal', meta: {code: 'xtpzgl-yhgl'}, component: steel_inboundReal},
+		{path: 'steel_reserved', name: 'steel_reserved', meta: {code: 'xtpzgl-yhgl'}, component: steel_reserved},
 		{path: 'steel_outbound', name: 'steel_outbound', meta: {code: 'xtpzgl-yhgl'}, component: steel_outbound},
 		{path: 'steel_real', name: 'steel_real', meta: {code: 'xtpzgl-yhgl'}, component: steel_real},
 		{path: 'steel_realDown/gridId', name: 'steel_realDown', meta: {code: 'xtpzgl-yhgl'}, component: steel_realDown},
@@ -74,6 +82,10 @@ const constantRouterMap = [
 		{path: 'steel_restackAdd', name: 'steel_restackAdd', meta: {code: 'xtpzgl-yhgl'}, component: steel_restackAdd},
 		{path: 'steel_sendreceive', name: 'steel_sendreceive', meta: {code: 'xtpzgl-yhgl'}, component: steel_sendreceive},
 		{path: 'steel_transfer', name: 'steel_transfer', meta: {code: 'xtpzgl-yhgl'}, component: steel_transfer},
+		{path: 'steel_checkWarehouse', name: 'steel_checkWarehouse', meta: {code: 'xtpzgl-yhgl'}, component: steel_checkWarehouse},
+		{path: 'steel_addCheckWarehouse', name: 'steel_addCheckWarehouse', meta: {code: 'xtpzgl-yhgl'}, component: steel_addCheckWarehouse},
+		{path: 'addSteelInbound', name: 'addSteelInbound', meta: {code: 'xtpzgl-yhgl'}, component: addSteelInbound},
+		{path: 'addSteelReserved', name: 'addSteelReserved', meta: {code: 'xtpzgl-yhgl'}, component: addSteelReserved},
 	  ]
 	}
   ];

+ 1 - 1
src/views/appoint/components/saleContract/addSaleCokeSend.vue

@@ -316,7 +316,7 @@ export default {
       addressDrawer:false,
       //线路的表格
       line: {
-        requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
+        requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con="+'销售',
         selectionType: "radio",
       },
       //车辆的表格

+ 1 - 1
src/views/appoint/components/saleContract/addSaleOrderSend.vue

@@ -347,7 +347,7 @@ export default {
       addressDrawer:false,
       //线路的表格
       line: {
-        requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
+        requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con="+'销售',
         selectionType: "radio",
       },
       //车辆的表格

+ 447 - 0
src/views/appoint/components/saleContract/saleOrderCoproduct.vue

@@ -0,0 +1,447 @@
+<template>
+  <!-- 销售订单页面 -->
+  <div class="salePlan">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <!-- 已审批 -->
+       <el-tab-pane label="已审批" name="four">
+        <dilTable v-bind.sync="option4" ref="table">
+          <el-table-column fixed="right" label="操作" width="200">
+            <template slot-scope="scope">
+              <el-button
+                @click="coproductSendClick(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >副产品派车</el-button
+              >
+              <el-button
+                @click="detailclick(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</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-tab-pane label="未上报" name="first">
+        <dilTable v-bind.sync="option" ref="table3">
+          <el-table-column fixed="right" label="操作" align="center" width="200">
+            <template slot-scope="scope">
+              <el-button
+                @click="uploadclick(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >上传</el-button
+              >
+              <el-button
+                @click="click(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >修改</el-button
+              >
+              <el-button
+                type="text"
+                size="small"
+                @click="deleteclick(scope.row.saleOrderId)"
+                >删除</el-button
+              >
+              <el-button
+                @click="detailclick3(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</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="tableData3" 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="option2" ref="table2">
+        <el-table-column fixed="right" label="操作" width="70">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick2(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</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="tableData2" 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>
+  </div>
+</template>
+<script>
+export default {
+  name: "saleOrder",
+  data() {
+    return {
+      activeName: "four",
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getSaleOrderInfoes?apiId=408",
+      },
+      option2: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getSaleOrderReportedes?apiId=408",
+      },
+      option3: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409",
+      },
+      option4: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409",
+      },
+      
+      //记录旧的row对象 (销售公司已审批)
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
+      oldRowCount: 1,
+      //记录旧的row对象 (财务已审批)
+      oldRow1: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (财务已审批)
+      oldRowCount1: 1,
+      //记录旧的row对象 (已上报)
+      oldRow2: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (已上报)
+      oldRowCount2: 1,
+      //记录旧的row对象 (未上报)
+      oldRow3: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (未上报)
+      oldRowCount3: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      //(销售公司已审批)
+      tableData: [],
+      //(财务已审批)
+      tableData1: [],
+      //(已上报)
+      tableData2: [],
+      //(未上报)
+      tableData3: [],
+    };
+  },
+  methods: {
+    refresh(){
+      this.$router.go(0);
+    },
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
+    onclick() {
+      if(this.activeName == "first"){
+        this.option.requestUrl = "/api/v1/ams/getSaleOrderInfoes?apiId=408&con="+this.input;
+      }else if(this.activeName == "second"){
+        this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
+      }else if(this.activeName == "four"){
+        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&con="+this.input;      
+      }
+    },
+    seeclick(saleOrderId) {
+      this.$router.push("/saleOrderDetail/" + saleOrderId);
+    },
+    btnclick() {
+      this.$router.push("/addSaleOrder");
+    },
+    click(saleOrderId) {
+      this.$router.push("/editSaleOrder/" + saleOrderId);
+    },
+    coproductSendClick(saleOrderId){
+      this.$router.push("/addSaleOrderCoproductSend/" + saleOrderId);
+    },
+    // -------查看物资详情 (已审批)
+    detailclick(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;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (财务已审批)
+    detailclick1(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;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData1 = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (已上报)
+    detailclick2(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;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData2 = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (未上报)
+    detailclick3(row) {
+      // 记录重复点击次数
+      if (this.oldRow3 === row) {
+        this.oldRowCount3 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table3.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow3 != "") {
+        if (this.oldRow3 != row) {
+          if (this.oldRowCount3 % 2 === 1) {
+            this.$refs.table3.toggleRowExpansion(this.oldRow3);
+          } else {
+            this.oldRowCount3 = 1;
+          }
+        } else {
+          this.oldRow3 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow3 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData3 = res.data.data;
+        });
+    },
+
+    // 上传
+    uploadclick(saleOrderId) {
+      this.$confirm("是否上传", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "上传成功!",
+          });
+          this.axios
+            .post(
+              "/api/v1/ams/uploadSaleOrder?saleOrderId=" +
+                saleOrderId
+            )
+            .then(() => {
+              this.$router.go(0);
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消上传!",
+          });
+        });
+    },
+    //删除
+    deleteclick(scope) {
+      let saleOrderId = scope;
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "删除成功!",
+          });
+          this.axios
+            .post(
+              "/api/v1/ams/deleteAmsSaleOrderBySaleOrderId?saleOrderId=" +
+                saleOrderId
+            )
+            .then(() => {
+              this.$router.go(0);
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消删除!",
+          });
+        });
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.salePlan {
+  .top {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 2 - 0
src/views/appoint/router/index.js

@@ -50,6 +50,7 @@ import editTruckNoDetail from '../components/saleContract/editTruckNoDetail.vue'
 import saleCokeInward from '../components/saleContract/saleCokeInward.vue'
 import saleOrder from '../components/saleContract/saleOrder.vue'
 import saleOrderArrange from '../components/saleContract/saleOrderArrange.vue'
+import saleOrderCoproduct from '../components/saleContract/saleOrderCoproduct.vue'
 import saleOrderDetail from '../components/saleContract/saleOrderDetail.vue'
 import saleOrderDetailApproved from '../components/saleContract/saleOrderDetailApproved.vue'
 import saleOrderMaterial from '../components/saleContract/saleOrderMaterial.vue'
@@ -111,6 +112,7 @@ const constantRouterMap = [
       {path: 'saleCokeInward', name: 'saleCokeInward', meta: {code: 'xtpzgl-yhgl'}, component: saleCokeInward},
       {path: 'saleOrder', name: 'saleOrder', meta: {code: 'xtpzgl-yhgl'}, component: saleOrder},
       {path: 'saleOrderArrange', name: 'saleOrderArrange', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderArrange},
+      {path: 'saleOrderCoproduct', name: 'saleOrderCoproduct', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderCoproduct},
       {path: 'saleOrderDetail/:saleOrderId', name: 'saleOrderDetail', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderDetail},
       {path: 'saleOrderDetailApproved/:saleOrderId', name: 'saleOrderDetailApproved', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderDetailApproved},
       {path: 'saleOrderUpdateLog/:saleOrderId', name: 'saleOrderUpdateLog', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderUpdateLog},

+ 43 - 38
src/views/inward/components/inwardFactory/enFactoryResult.vue

@@ -1,47 +1,52 @@
-// 进厂作业
+//进厂
 <template>
-    <div class="sale">
-        <div class="top">
-            <!-- 框计算 -->
-            <el-input
-                placeholder="请输入内容"
-                v-model="inputText"
-                clearable>
-            </el-input>
-            <el-button type="primary" class="btn" @click="onclick">
-                <i class="el-icon-search"></i>查询
-            </el-button>
-        </div>
-        <div class="tab">
-            <dilTable v-bind.sync="option"></dilTable>
-        </div>
+  <!-- 内转运输实绩 -->
+  <div class="homeworkPath">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
     </div>
+    <dilTable v-bind.sync="option">      
+    </dilTable>
+  </div>
 </template>
+
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
-    data(){
-        return{
-            inputText:'',
-            option: {       
-                // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getAllEnFactoryResult?apiId=357&orderType=11",
-            },
-        }
+  name: "homeworkPath",
+  data() {
+    return {
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=357&orderType=11"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=357&orderType=11&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onclick() {
+      this.$message.info("功能暂时关闭")
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=357&orderType=11&con="+this.inputText;
-        }
-    }
-}
+  },
+};
 </script>
-<style lang="scss">
-    .sale{
-        .top{
-            width: 100%;height: 5rem;
-            display: flex;
-            align-items: center;
-            padding-left: 2.5rem;
-        }
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
     }
+  }
+}
 </style>

+ 43 - 38
src/views/inward/components/inwardFactory/outFactory.vue

@@ -1,47 +1,52 @@
-// 出厂作业
+//出厂
 <template>
-    <div class="sale">
-        <div class="top">
-            <!-- 框计算 -->
-            <el-input
-                placeholder="请输入内容"
-                v-model="inputText"
-                clearable>
-            </el-input>
-            <el-button type="primary" class="btn" @click="onclick">
-                <i class="el-icon-search"></i>查询
-            </el-button>
-        </div>
-        <div class="tab">
-            <dilTable v-bind.sync="option"></dilTable>
-        </div>
+  <!-- 零星物资出厂作业页面 -->
+  <div class="homeworkPath">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
     </div>
+    <dilTable v-bind.sync="option">      
+    </dilTable>
+  </div>
 </template>
+
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
-    data(){
-        return{
-            inputText:'',
-            option: {       
-                // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getLeaveFactoryResult?apiId=361&orderType=11",
-            },
-        }
+  name: "homeworkPath",
+  data() {
+    return {
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=361&orderType=11"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=361&orderType=11&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onclick() {
+      this.$message.info("功能暂时关闭")
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=361&orderType=11&con="+this.inputText;
-        }
-    }
-}
+  },
+};
 </script>
-<style lang="scss">
-    .sale{
-        .top{
-            width: 100%;height: 5rem;
-            display: flex;
-            align-items: center;
-            padding-left: 2.5rem;
-        }
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
     }
+  }
+}
 </style>

+ 43 - 38
src/views/inward/components/inwardFactory/tareWeightResult.vue

@@ -1,47 +1,52 @@
-// 计量作业
+//计皮
 <template>
-    <div class="sale">
-        <div class="top">
-            <!-- 框计算 -->
-            <el-input
-                placeholder="请输入内容"
-                v-model="inputText"
-                clearable>
-            </el-input>
-            <el-button type="primary" class="btn" @click="onclick">
-                <i class="el-icon-search"></i>查询
-            </el-button>
-        </div>
-        <div class="tab">
-            <dilTable v-bind.sync="option"></dilTable>
-        </div>
+  <!-- 零星物资计皮作业页面 -->
+  <div class="homeworkPath">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
     </div>
+    <dilTable v-bind.sync="option">      
+    </dilTable>
+  </div>
 </template>
+
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
-    data(){
-        return{
-            inputText:'',
-            option: {       
-                // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getAllJiMaoResult?apiId=358&orderType=11",
-            },
-        }
+  name: "homeworkPath",
+  data() {
+    return {
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=358&orderType=11"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=358&orderType=11&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onclick() {
+      this.$message.info("功能暂时关闭")
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=358&orderType=11&con="+this.inputText;
-        }
-    }
-}
+  },
+};
 </script>
-<style lang="scss">
-    .sale{
-        .top{
-            width: 100%;height: 5rem;
-            display: flex;
-            align-items: center;
-            padding-left: 2.5rem;
-        }
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
     }
+  }
+}
 </style>

+ 29 - 84
src/views/inward/components/inwardFactory/truckLoad.vue

@@ -1,107 +1,52 @@
-// 汽车装货
+//装货
 <template>
-  <div class="steel_inbound">
-    <div class="sache">
-      <el-input placeholder="请输入内容" v-model="inputText" clearable>
-      </el-input>
+  <!-- 装货实绩页面 -->
+  <div class="homeworkPath">
+   <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" class="btn" @click="toInsert">
-        <i class="el-icon-plus"></i>新增
-      </el-button>
-    </div>
-    <div class="table">
-      <dilTable v-bind.sync="options">
-        <el-table-column fixed="right" label="操作" width="100">
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              size="small"
-              @click="updateBmsTrainFreight(scope)"
-            >
-              修改
-            </el-button>
-            <el-button
-              type="text"
-              size="mini"
-              @click="deleteBmsTrainFreight(scope)"
-            >
-              删除
-            </el-button>
-          </template>
-        </el-table-column>
-      </dilTable>
     </div>
+    <dilTable v-bind.sync="option"></dilTable>
   </div>
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
+  name: "homeworkPath",
   data() {
     return {
-      inputText: "",
-      options: {
-        // first请求数据的地址
-        requestUrl: "/api/v1/tms/getAllLoadResult?apiId=359&orderType=11",
+      restaurants: [],
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=359&orderType=11&status=0"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=359&orderType=11&status=0&userId=" + getCookie("orgCode")
+      }
+  },
   methods: {
     onclick() {
-      this.option.requestUrl =
-        "/api/v1/tms/getAllLoadResult?apiId=359&orderType=11&con=" +
-        this.inputText;
-    },
-    toInsert() {
-      this.$router.push("/inwardFactoryAddTruckLoad");
+          this.$message.info("功能暂时关闭")
     },
-    updateBmsTrainFreight(scope) {
-      this.$router.push("/updateTruckLoad/" + scope.row.settlementId);
-    },
-    deleteBmsTrainFreight(scope) {
-      this.$confirm("是否删除", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-        .then(() => {
-          this.$axios
-            .post("/api/v1/bms/deleteTrainSettlement/" + scope.row.settlementId)
-            .then((res) => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "删除成功!",
-                });
-                this.$router.go(0);
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning",
-                });
-              }
-            });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "删除操作已取消!",
-          });
-        });
-    },
-  },
+   }
 };
 </script>
-
-<style lang="scss">
-.steel_inbound {
-  .sache {
-    height: 5rem;
-    display: flex;
-    align-items: center;
-    padding-left: 1.875rem;
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
+    }
   }
 }
 </style>

+ 43 - 38
src/views/inward/components/inwardFactory/unload.vue

@@ -1,47 +1,52 @@
-// 卸货作业
+//卸货
 <template>
-    <div class="sale">
-        <div class="top">
-            <!-- 框计算 -->
-            <el-input
-                placeholder="请输入内容"
-                v-model="inputText"
-                clearable>
-            </el-input>
-            <el-button type="primary" class="btn" @click="onclick">
-                <i class="el-icon-search"></i>查询
-            </el-button>
-        </div>
-        <div class="tab">
-            <dilTable v-bind.sync="option"></dilTable>
-        </div>
+  <!-- 卸货卸货实绩页面 -->
+  <div class="homeworkPath">
+   <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
     </div>
+    <dilTable v-bind.sync="option"></dilTable>
+  </div>
 </template>
+
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
-    data(){
-        return{
-            inputText:'',
-            option: {       
-                // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getUnloadResult?apiId=360&orderType=11",
-            },
-        }
+  name: "homeworkPath",
+  data() {
+    return {
+      restaurants: [],
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=360&orderType=11"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=360&orderType=11&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onclick() {
+          this.$message.info("功能暂时关闭")
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=360&orderType=11&con="+this.inputText;
-        }
-    }
-}
+   }
+};
 </script>
-<style lang="scss">
-    .sale{
-        .top{
-            width: 100%;height: 5rem;
-            display: flex;
-            align-items: center;
-            padding-left: 2.5rem;
-        }
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
     }
+  }
+}
 </style>

+ 118 - 10
src/views/inward/components/truckAppoint/addPlan.vue

@@ -2,8 +2,8 @@
 <template>
   <div class="addInwardPlan">
     <page-title>新增计划</page-title>
-<div class="form-box">
-<el-form  class="demo-form-inline"  label-width="80px" label-position="left">
+  <div class="carrier form">
+  <el-form  class="demo-form-inline"  label-width="80px" label-position="left">
   <el-form-item label="承运商">
     <el-autocomplete
       class="inline-input"
@@ -19,16 +19,44 @@
   </template>
     </el-autocomplete>
   </el-form-item>
-  <el-form  class="demo-form-inline"  label-width="80px" label-position="left">
-  <el-form-item label="车数">
+  <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-form-item>
+    </el-form-item>
   </el-form>
+  </div>
 </el-form>
 </div>
     <template>
 			<div>		
-			<dilTable v-bind.sync="first" @radio-change="currentRadioChange">
+			<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>
+                </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>
@@ -58,10 +86,83 @@ 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
       item.carrierName = this.state2
@@ -85,7 +186,7 @@ export default {
       },
       createFilter(queryString) {
         return (restaurants) => {
-          return (restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+          return (restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
         };
       },
     currentRadioChange(selection){
@@ -139,11 +240,11 @@ export default {
 
 <style lang="scss" scoped>
 .addInwardPlan{
-.form-box{
+.carrier{
   display: inline-block !important;
   margin-left: 38%;
   .el-input{
-    width:288px
+    width:250px
   }
   .input{
     margin-left: -10px;
@@ -152,8 +253,15 @@ export default {
     padding: 10px;  
   }
 }
+.truckNum {
+  .el-input{
+    width: 250px;
+  }
+}
 .button-box
 {
+  display: flex;
+  justify-content: center;
   margin-left: 25px !important;
 }
 }

+ 41 - 9
src/views/inward/components/truckAppoint/addRequirement.vue

@@ -2,6 +2,18 @@
   <!-- 新增运输作业页面 -->
   <div class="addPurRequirement">
     <page-title>运输预约</page-title>
+    <div class="purchaseOrder from">
+      <span class="text">卸货厂区:</span>
+      <el-select v-model="purchaseOrgId" placeholder="请选择" @change="onchange()" ref="selectlb">
+        <el-option
+          v-for="item in purchaseOrgList"
+          :key="item.value"
+          :label="item.label" 
+          :value="item.value"
+        >
+      </el-option>
+      </el-select>
+    </div>
     <div class="material from">
       <span class="text">物资:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
@@ -80,12 +92,6 @@
           @radio-change="currentRadioChange4"
         ></dilTable>
       </div>
-      <div v-show="a == 5">
-        <dilTable
-          v-bind.sync="line"
-          @radio-change="currentRadioChange5"
-        ></dilTable>
-      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
@@ -107,7 +113,7 @@ export default {
       //车辆表格数据
       selectionList: [],
       stateCarrier:null,
-
+      purchaseOrgId:null,
       // 表单
       form1: {},
       //采购订单号
@@ -152,6 +158,16 @@ export default {
         requestUrl: "",
         selectionType: "radio",
       },
+      purchaseOrgLable:null,
+      purchaseOrgList : [
+        {
+          value:1,
+          label:'一厂'
+        },{
+          value:2,
+          label:'二厂'
+          }
+      ]
     };
   },
   watch: {
@@ -171,16 +187,28 @@ export default {
     onBlur() {
       this.getPurchaseOrderNo();
     },
+    onchange(){
+      this.getPurchaseOrderNo();
+      console.log(this.purchaseOrgId)
+      if(this.purchaseOrgId == 1) {
+        this.purchaseOrgLable = "一厂"
+        console.log(this.purchaseOrgLable)
+      }else{
+        this.purchaseOrgLable = "二厂"
+        console.log(this.purchaseOrgLable)
+      }  
+    },
     getPurchaseOrderNo() {
       let map = {
         materialId: this.materialId,
         supplierId: this.supplierId,
+        purchaseOrgId:this.purchaseOrgId
       };
       if (this.remark) {
         map.remark = this.remark;
       }
-      console.log(this.map);
-      if (this.materialId && this.supplierId) {
+      console.log(map);
+      if (this.materialId && this.supplierId && this.purchaseOrgId) {
         this.axios.post("/api/v1/oms/selectNewOrderId", map).then((res) => {
           console.log(res);
           if (res.data.code == "200") {
@@ -189,9 +217,11 @@ export default {
                 message: "没有匹配的采购订单号!",
                 type: "warning",
               });
+              this.purchaseOrderNo = null
               this.form1 = [];
             } else {
               console.log();
+              console.log(res.data.data)
               this.remark = res.data.data.remark;
               this.purchaseOrderId = res.data.data.purchaseOrderId;
               this.purchaseOrderNo = res.data.data.purchaseOrderNo ;           
@@ -274,6 +304,8 @@ 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 (

+ 546 - 102
src/views/inward/components/truckAppoint/addRequirement2.vue

@@ -1,55 +1,178 @@
 // 新增厂内内转需求
 <template>
-  <div id="endMaintenance">
+  <div class="inwardRequirement">
     <page-title>新增需求</page-title>
-    <div class="main">
-      
-      <span class="a"></span>
-    </div>
     <div>
-      <div class="form-box f2">
-        <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label="物资">
-            <el-input v-model="materialName" disabled> </el-input>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
-          </el-form-item>
-        </el-form>
-      </div>
-      <div class="form-box f5">
-        <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label="用车地点">
-            <el-input v-model="truckPoint" disabled> </el-input>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
-          </el-form-item>
-        </el-form>
-      </div>
-      <div class="form-box f5">
-        <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label="卸货地点">
-            <el-input v-model="truckPoint1" disabled> </el-input>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="ondrawer(3)">浏览</el-button>
-          </el-form-item>
-        </el-form>
+      <!-- 用车单位 -->
+      <div class="requireUnit form">
+       <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
+      >
+        <el-form-item label="用车单位">
+         <el-autocomplete
+          class="inline-input"
+          v-model="requireUnitName"
+          :fetch-suggestions="querySearchCarrier"
+          placeholder="请输入用车单位名称"
+          :trigger-on-focus="false"
+          @select="handleSelectCarrier"
+        >
+        <template slot-scope="{ item }">
+          <div class="name">{{ item.shipperName }}</div>
+        </template>
+        </el-autocomplete>
+        </el-form-item>
+    </el-form>
+    </div>
+      <div class="form-box">
+        <dil-form :formId="300" v-model="form"></dil-form>
       </div>
-       <div class="form-box f5">
-        <el-form :inline="true" class="demo-form-inline">
-          <el-form-item label="装货月台">
-            <el-input v-model="requirementPlatformName" disabled> </el-input>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="ondrawer(4)">浏览</el-button>
-          </el-form-item>
+      <div class="materialDrawer">
+         <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
+      >
+        <el-form-item label="选择物资">      
+        </el-form-item>
+        <el-form-item > 
+          <el-button type="primary" @click="ondrawer(1)" class="truckBtn"
+          >浏览</el-button>
+        </el-form-item>
         </el-form>
       </div>
-      <div class="form-box" >
-        <dil-form :formId="300" v-model="form"></dil-form>
+      
+      <!-- 物资和装卸点以及装卸货次序 -->
+          <div class="swtichTop">
+    <span class="titile">点击浏览选择物资之前请选择物资单位!</span>
+    <div class="switch" v-if="tableData.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">
+    <div class="selectionTable">
+      <el-table
+        :data="tableData"
+        border
+        style="width: 100%"
+        highlight-current-row
+      >
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          align="center"
+          show-overflow-tooltip
+        >
+          <template slot="scope" v-if="item.label !== '件数'">
+            <span>{{ item.label }}</span>
+          </template>
+          <!-- 插入输入框 -->
+          <template slot-scope="scope">
+            <template v-if="item.slot">
+                <!-- 装货点 -->
+               <template v-if="item.prop == 'requirementPlatformName'">
+                <el-input
+                  class="textinput"
+                  v-model="scope.row.requirementPlatformName"
+                  disabled
+                ></el-input>
+              </template>
+                <!-- 卸货点 -->
+               <template v-if="item.prop == 'truckPoint1'">
+                <el-input
+                  class="textinput"
+                  v-model="scope.row.truckPoint1"
+                  disabled
+                ></el-input>
+              </template>
+                <!-- 装卸货优先级 -->
+               <template v-if="item.prop == 'materialPriority'">
+                <el-input
+                  class="textinput"
+                  v-model.number="scope.row.materialPriority"
+                  @input="onInputPriority(scope.row.materialPriority)"
+                ></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 v-if="item.prop == 'orderMaterialWeight'">
+                <el-input
+                  v-model.number="scope.row.orderMaterialWeight"
+                  @input="onInputWeight(scope.row.orderMaterialWeight)"
+                ></el-input>
+              </template>           
+            </template>
+            <template v-else>
+              <span>{{ scope.row[item.prop] }}</span>
+            </template>
+          </template>
+        </el-table-column>
+        <!-- 操作列 -->
+        <el-table-column fixed="right" label="操作" width="250">
+          <template slot-scope="scope">
+            <el-button type="primary" @click="loadPoint(scope.$index)">装货点</el-button>
+            <el-button type="primary" @click="unloadPoint(scope.$index)">卸货点</el-button>
+            <el-button
+              @click.native.prevent="deleteRow(scope.$index, tableData)"
+              type="text"
+              icon="el-icon-close"
+              size="big"
+            ></el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    </div>
+     <!-- 物资模态框 -->
+    <div class="drawSty">
+      <el-drawer
+      title="选择物资信息"
+      :visible.sync="table"
+      direction="rtl"
+      size="40%"
+      :show-close="false"
+    >
+      <el-input placeholder="请输入内容" v-model="inputMaterial" clearable > </el-input
+      ><el-button type="primary" class="btn" @click="onclickMaterial">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <!-- <el-button @click="open">取消</el-button> -->
+      <el-button type="primary" @click="makeSure1">确定</el-button>
+      <div class="tablecls">
+        <!-- 查询所有的物资 -->
+        <dilTable ref="materialTable" v-bind.sync="materialTable" @selection-change="selectionChange" :drawer="aaadrawer">
+        </dilTable>
       </div>
+    </el-drawer>
+    </div>  
       <el-drawer
         :visible.sync="drawer"
         :direction="direction"
@@ -59,7 +182,7 @@
         <el-input
           placeholder="请输入内容"
           v-model="input"
-          style="margin-top: 10px; margin-left: 20px"
+          style="margin-top: 10px; margin-left: 10px; width: 250px"
           clearable
         >
         </el-input>
@@ -71,13 +194,19 @@
         >
           <i class="el-icon-search"></i>查询
         </el-button>
-        <div v-show="a == 1">
+        <div v-show="a == 2">
           <dilTable
-            v-bind.sync="second"
-            @radio-change="currentRadioChange1"
+            v-bind.sync="second1"
+            @radio-change="currentRadioChange2"
           ></dilTable>
         </div>
-        <div v-show="a !== 1">
+        <div v-show="a == 3">
+          <dilTable
+            v-bind.sync="second1"
+            @radio-change="currentRadioChange2"
+          ></dilTable>
+        </div>
+        <div v-show="a == 4">
           <dilTable
             v-bind.sync="second1"
             @radio-change="currentRadioChange2"
@@ -85,7 +214,7 @@
         </div>
       </el-drawer>
     </div>
-    <div class="button-box" >
+    <div class="button-box">
       <el-button type="primary" @click="makeSure">确认新增</el-button>
       <el-button type="primary" @click="cancel">返回</el-button>
     </div>
@@ -95,102 +224,297 @@
 <script>
 import PageTitle from "@/components/Page/Title";
 import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
-      purchaseOrder: "",
-      foreignShipName: "",
-      materialName: "",
-      requirementPlatformName: "",
+      aaadrawer:false,
+      disabled:false,
+      options: [],
+      value: '',
+      // 件数与重量的开关
+      value: false,
+      //物资模态框开关
+      table: false,
+      //物资表格表头
+      tableTop: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: "140",
+        },
+        {
+          prop: "requirementPlatformName",
+          label: "装货点",
+          slot:true,
+          width: "140",
+        },
+        {
+          prop: "truckPoint1",
+          label: "卸货点",
+          slot:true,
+          width: "140",
+        },
+        {
+          prop: "orderMaterialWeight",
+          label: "重量",
+          slot: true,
+        },
+      ],
+      row: {},
+      //物资表格数据
+      tableData: [],
+      materialName: null,
+      requirementPlatformName: null,
+      materialNum:null,
+      materialWeight:null,
       a: 1,
+      index:null,
       direction: "rtl",
-      input: "",
+      input:null,
       requiremntUnitId: null,
       requirementUnloadUnitId: null,
-      requirementPlatformId:  null,
+      requirementPlatformId: null,
       truckPoint: "",
       materialId: null,
-      truckPoint1:'',
+      requireUnitName:null,
+      inputMaterial:null,
+      shipperId:null,
+      truckPoint1: "",
       drawer: false,
+      selectionList1: [],
       form: {},
-      second: {
-        requestUrl: "/api/v1/uc/queryMaterialByLike?apiId=244",
-        selectionType: "radio",
-        mapList1: [],
+      materialTable: {
+        requestUrl: "",
+        selectionType: "select",
+        mapList1: []
       },
       second1: {
         requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
         selectionType: "radio",
-        mapList2: [],
-      },
+        mapList2: []
+      }
     };
   },
+  watch: {
+    value() {
+      if (this.value) {
+        console.log(this.value)
+        console.log(this.tableTop.length)
+        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,
+        });
+      }
+    },
+    table(val){
+      if(val){
+        this.aaadrawer = false;
+      }else{
+        this.aaadrawer = true;
+      }
+    }
+  },
   methods: {
-    ondrawer(num) {
+     //用车单位弹出层
+    handleSelectCarrier(item){    
+      this.shipperId = item.shipperId
+      this.requireUnitName = item.shipperName 
+    },
+    //以下是用车单位边输边查搜索
+    querySearchCarrier(queryString, cb) {
+        this.axios.post('/api/v1/uc/getRequireUnitName?index='+queryString).then((res)=>{
+        if(res.data.code == "200"){
+          var restaurantsCarrier = res.data.data
+          console.log(restaurantsCarrier,"restaurantsCarrier");
+          var results = queryString ? restaurantsCarrier.filter(this.createFilterCarrier(queryString)) :restaurantsCarrier;
+           // 调用 callback 返回建议列表的数据
+          cb(results);
+        }
+        })     
+      },
+    createFilterCarrier(queryString) {
+        return (restaurantsCarrier)  =>  {
+          return (restaurantsCarrier.shipperName.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+      // 返回选中的物资信息
+    selectionChange(selection) {
+      this.selectionList1 = [];
+      this.selectionList1 = selection;
+    },
+    unloadPoint(index) {
+      console.log(index)
+      this.index= index
+      this.a = 3
       this.drawer = true;
+    },
+    loadPoint(index) {
+      console.log(index)
+      this.index = index
+      this.a = 4
+      this.drawer = true;
+    },
+    //以上是用车单位边输边查搜索
+    ondrawer(num) {   
+      if(num==1){
+        this.table = true
+        this.materialTable.requestUrl = "/api/v1/uc/queryMaterialByLike?apiId=244&i=" + new Date()
+      }else{
+        this.drawer = true;
+      }  
       this.a = num;
     },
     handleClose(done) {
       done();
     },
+    //删除行
+    deleteRow(index, rows) {
+      console.log(index)
+      console.log("这里")
+      rows.splice(index, 1);
+    },
+     // 返回主界面
+    makeSure1() {
+        this.selectionList1.forEach((e) => {
+          console.log(e.materialModel,e.materialSpecification)
+        if(e.materialSpecification == null){
+          e.materialSpecification = ''
+        }
+        if(e.materialModel == null){
+          e.materialModel = ''
+        }
+        var addmap = {
+          materialName: e.materialName + e.materialSpecification+e.materialModel,
+          materialId: e.materialId,
+        };
+        this.tableData.push(addmap);
+      });
+      this.selectionList1 = [];
+      this.table = false;
+    },
+    refreshTable(){
+      var arr = this.tableData
+      this.tableData = []
+      arr.forEach((e) => {
+        var addmap = {
+          materialName : e.materialName,
+          materialId: e.materialId,
+          requirementPlatformName:e.requirementPlatformName,
+          truckPoint1:e.truckPoint1,
+          requirementPlatformId:e.requirementPlatformId,
+          requirementUnloadUnitId:e.requirementUnloadUnitId,
+          orderMaterialNumber:e.orderMaterialNumber,
+          orderMaterialWeight:e.orderMaterialWeight
+        };
+        this.tableData.push(addmap)        
+      })
+    },
     onclick(a) {
-      if (a == 1) {
-        this.second.requestUrl =
+      if(this.input != null){
+        if (a == 1) {
+        this.materialTable.requestUrl =
           "/api/v1/uc/queryMaterialByLike?apiId=244&index=" + this.input;
-      } else {
-        console.log(a)
+          this.input = null
+        } else {
         this.second1.requestUrl =
           "/api/v1/ams/getWareHouse?apiId=251&con=" + this.input;
+          this.input = null
+      }
+      }else{
+        this.materialTable.requestUrl = "/api/v1/uc/queryMaterialByLike?apiId=244&i=" + new Date()
       }
     },
     currentRadioChange1(selection) {
-      this.mapList1 = selection
-      this.purchaseOrder = this.mapList1.purchaseOrderNo
-      this.foreignShipName = this.mapList1.resultForeignShipName
-      this.materialName = this.mapList1.materialName;
+      this.mapList1 = selection;
+      console.log(selection)
+      if(selection.materialSpecification==null||selection.materialModel==null){
+        this.materialName = this.mapList1.materialName
+      }else{
+        this.materialName = this.mapList1.materialName + selection.materialSpecification + '(' + selection.materialModel + ')';
+      }
       this.materialId = selection.materialId;
     },
     currentRadioChange2(selection) {
-      this.mapList2 = selection
-      if(this.a == 2){
+      if (this.a == 2) {
         this.truckPoint = selection.wareHouseName;
         this.requiremntUnitId = selection.wareHouseId;
-      }else if(this.a == 3){
-        this.requirementUnloadUnitId = selection.wareHouseId;
-        this.truckPoint1 = selection.wareHouseName;
-      }else if(this.a == 4){
-        this.requirementPlatformId = selection.wareHouseId;
-        this.requirementPlatformName = selection.wareHouseName;
+      } else if (this.a == 3) {
+        console.log(this.tableData[this.index])
+        this.tableData[this.index].requirementUnloadUnitId = selection.wareHouseId;
+        this.tableData[this.index].truckPoint1 = selection.wareHouseName
+        this.refreshTable()
+      } else if (this.a == 4) {
+        console.log(this.tableData[this.index])
+        this.tableData[this.index].requirementPlatformId = selection.wareHouseId;
+        this.tableData[this.index].requirementPlatformName = selection.wareHouseName;
+        this.refreshTable()
       }
     },
     // 新增
     makeSure() {
+      console.log(this.tableData)
+      console.log(typeof(this.form.requirementEstimatedDuration))
+      if(this.shipperId == null){
+        this.$message.error("请选择用车单位")
+        return
+      }if(typeof(this.form.requirementEstimatedDuration) == 'undefined'){
+        this.$message.error("请输入预计用车时长")
+        return
+      }if(typeof(this.form.requirementTruckTime) == 'undefined'){
+        this.$message.error("请输入用车时间")
+        return
+      }if(typeof(this.form.requirementType) == 'undefined'){
+        this.$message.error("请选择需求类型")
+        return
+      }if(typeof(this.form.requirementWorkType) == 'undefined'){
+        this.$message.error("请输入费用类别")
+        return
+      }if(this.tableData.length == 0){
+        this.$message.error("请点击浏览选择物资")
+        return
+      }
+      var i=0
+      this.tableData.forEach((e) =>{
+        if(e.requirementPlatformId&&e.requirementUnloadUnitId){
+          i++
+        }  
+      })
+      if(i==0){
+         this.$message.error("请选择装卸点")
+         return
+      }
+      console.log(this.tableData)
+      debugger
       let requiremnet = {
-        materialId: this.materialId,
-        requiremntUnitId: this.requiremntUnitId,
-        capacityTypeId: this.form.capacityTypeId,
-        materialWeight: this.form.materialWeight,
-        materialNumber: this.form.materialNumber,
         requirementEstimatedDuration: this.form.requirementEstimatedDuration,
         requirementOverlimit: this.form.requirementOverlimit,
-        requirementShipperId: this.form.requirementShipperId,
         requirementTruckTime: sjTime(this.form.requirementTruckTime),
         requirementType: this.form.requirementType,
         requirementWorkContent: this.form.requirementWorkContent,
         requirementWorkEnvironment: this.form.requirementWorkEnvironment,
         requirementWorkType: this.form.requirementWorkType,
-        requirementUnloadUnitId:this.requirementUnloadUnitId,
-        requirementPlatformId: this.requirementPlatformId
+        requirementShipperId: this.shipperId,
+        mapList:this.tableData,
+        orgCode:getCookie("orgCode")
       };
-      console.log(requiremnet);
       this.axios
         .post("/api/v1/ams/addTruckRequirement", requiremnet)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == 200) {
             this.$message({
               type: "success",
-              message: "新增成功!",
+              message: "新增成功!"
             });
             this.$router.go(-1);
           } else {
@@ -201,23 +525,143 @@ export default {
     // 返回
     cancel() {
       this.$router.go(-1);
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss">
-.el-form-item{
-  display: flex;
+.inwardRequirement {
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
+    }
+  .drawSty{
+  .el-input{
+    width: 240px;
+  }
 }
-.form-box,
-.button-box
-{
+.materialDrawer {
   display: flex;
-  text-align: center;
+  justify-content: center;
   align-items: center;
+  .el-input {
+    width: 320px;
+  }
+  .el-select{
+    width: 320px;
+  }
+  .el-autocomplete{
+    width: 320px;
+  }
+  .el-form {
+    padding: 10px;
+  }
+  .truckBtn{
+    width: 320px;
+  }
+}
+.swtichTop{
+  display: flex;
+  height: 40px;
+  align-content: center;
   justify-content: center;
-  margin-top: 0.3125rem;
-  margin-bottom: 1.25rem;
+  padding-right:20px ;
+  .titile{
+    color: red;
+    font-size: 14px;
+  }
+  .switch{
+    margin-right: -60px
+  }
+}
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+      }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+      }
+    }
+    .materialWeight,
+    .materialNum {
+      display: flex;
+      justify-content: center;
+      margin-top: 20px;
+      margin-right: 100px;
+      .text {
+        display: inline-block;
+        width: 170px;
+        text-align: right;
+        .input {
+          width: 250px;
+          margin-right: 20px;
+        }
+      }
+    }
+    .requireUnit {
+      display: flex;
+      justify-content: center;
+      margin-top: 20px;
+      margin-right: 127px;
+      .text {
+        display: inline-block;
+        width: 170px;
+        text-align: right;
+        .input {
+          width: 250px;
+          margin-right: 90px;
+        }
+      }
+    }
+    .loadPoint,
+    .unloadPoint {
+      display: flex;
+      justify-content: center;
+      margin-top: 20px;
+      margin-right: 10px;
+      .text {
+        display: inline-block;
+        width: 170px;
+        text-align: right;
+        .input {
+          width: 250px;
+          margin-right: 90px;
+        }
+      }
+    }
+  .form-box {
+    display: flex;
+    text-align: center;
+    align-items: center;
+    justify-content: center;
+    margin-top: 20px;
+    margin-bottom: 20px;
+    margin-right: 212px;
+    .el-form-item {
+      display: flex;
+      .el-form-item__label {
+        width: 170px !important;
+      }
+      .el-input {
+        width: 210px !important;
+      }
+    }
+  }
+  .button-box {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 90px;
+  }
 }
-
 </style>

+ 256 - 67
src/views/inward/components/truckAppoint/plan.vue

@@ -26,22 +26,14 @@
     </div>
     <template>
       <div>
-        <el-tabs v-model="activeName">
-          <el-tab-pane label="未接收" name="first">
-            <dilTable v-bind.sync="first">
-              <el-table-column fixed="right" label="操作" width="120">
-                <template slot-scope="scope">
-                  <el-button type="text" size="mini" @click="receiver(scope)">
-                    接收
-                  </el-button>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
+        <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane label="未下发" name="second">
-            <dilTable v-bind.sync="second" @selection-change="selectionChange">
+            <dilTable v-bind.sync="second" @selection-change="selectionChange" ref="table1">
               <el-table-column fixed="right" label="操作" width="180">
                 <template slot-scope="scope">
+                  <el-button type="text" size="mini" @click="getRequirementMaterial1(scope.row)">
+                    物资详情
+                  </el-button>
                   <el-button type="text" size="mini" @click="updatePlan(scope)">
                     修改
                   </el-button>
@@ -50,26 +42,98 @@
                   </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-tab-pane label="已下发" name="third">
-            <dilTable v-bind.sync="third">
+            <dilTable v-bind.sync="third" ref="table2">
               <el-table-column
                 fixed="right"
                 align="center"
                 label="操作"
-                width="80"
+                width="180"
               >
                 <template slot-scope="scope">
+                  <el-button type="text" size="mini" @click="getRequirementMaterial2(scope.row)">
+                    物资详情
+                  </el-button>
                   <el-button type="text" size="mini" @click="finishPlan(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-tab-pane label="已完成" name="fourth">
-            <dilTable v-bind.sync="fourth" @selection-change="selectionChange">
+            <dilTable v-bind.sync="fourth" @selection-change="selectionChange" ref="table3">
+              <el-table-column
+                fixed="right"
+                align="center"
+                label="操作"
+                width="100"
+              >
+                <template slot-scope="scope">
+                  <el-button type="text" size="mini" @click="getRequirementMaterial3(scope.row)">
+                    物资详情
+                  </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>
@@ -84,60 +148,190 @@ export default {
       inputText: "",
       first: {
         // first请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1",
+        requestUrl:"",
       },
       second: {
         // second请求数据的地址
-        requestUrl: "/api/v1/ams/getTruckPlanList?apiId=257&planStatus=0",
+        requestUrl: "",
         selectionType: "select",
         mapList: [],
       },
       third: {
         // second请求数据的地址
-        requestUrl: "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1",
+        requestUrl: "",
       },
       fourth: {
-        requestUrl: "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4",
+        requestUrl: "",
       },
-      activeName: "first",
+      activeName: "second",
+      //记录旧的row对象(未下发)
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
+      oldRowCount: 1,
+      //记录旧的row对象(已下发)
+      oldRow1: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已下发)
+      oldRowCount1: 1,
+      oldRow2: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
+      oldRowCount2: 1,
+       oldRow3: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
+      oldRowCount3: 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: [],
     };
   },
+  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"
+  },
   methods: {
-    receiver(scope) {
-      this.$confirm("是否接收", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
+    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);
+    },
+    getRequirementMaterial3(row) {
+      // 记录重复点击次数
+      if (this.oldRow3 === row) {
+        this.oldRowCount3 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table3.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow3 != "") {
+        if (this.oldRow3 != row) {
+          if (this.oldRowCount3 % 2 === 1) {
+            this.$refs.table3.toggleRowExpansion(this.oldRow2);
+          } else {
+            this.oldRowCount3 = 1;
+          }
+        } else {
+          this.oldRow3 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow3 = 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)
       })
-        .then(() => {
-          this.axios
-            .post("/api/v1/ams/receiveRequirement/" + scope.row.requirementId)
-            .then((res) => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "接收成功!",
-                });
-                this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&test=1"
-                this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=257&planStatus=0&test=1"
-                this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&test=1"
-                this.fourth.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4&test=1"
-              } else {
-                this.$message({
-                  message: "接收失败",
-                  type: "warning",
-                });
-              }
-            });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "接收操作已取消!",
-          });
-        });
+    },
+    handleClick(tab, event) {
+      this.getRequestUrl()
+      this.getRequirementMaterial()
+    },
+    getRequestUrl(){
+      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&i=" + new Date(),
+      this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=257&planStatus=0" + "&i=" + new Date(),
+      this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1" +  "&i=" + new Date(),
+      this.fourth.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4" +  "&i=" + new Date()
     },
     selectionChange(selection) {
       this.second.mapList = selection;
@@ -165,10 +359,7 @@ export default {
                   type: "success",
                   message: "已完成该计划!",
                 });
-                this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&test=1"
-                this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=257&planStatus=0&test=1"
-                this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&test=1"
-                this.fourth.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4&test=1"
+                this.getRequestUrl()
               } else {
                 this.$message({
                   message: "操作失败",
@@ -200,10 +391,7 @@ export default {
                   type: "success",
                   message: "删除成功!",
                 });
-                this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&test=1"
-                this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=257&planStatus=0&test=1"
-                this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&test=1"
-                this.fourth.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4&test=1"
+                this.getRequestUrl()
               } else {
                 this.$message({
                   message: "删除失败",
@@ -220,6 +408,10 @@ export default {
         });
     },
     Issue() {
+      if(this.second.mapList.length == 0){
+        this.$message.error("选择计划后才能下发")
+        return
+      }
       console.log(this.second.mapList);
       this.$confirm("是否下发", "提示", {
         confirmButtonText: "确定",
@@ -236,10 +428,7 @@ export default {
                   type: "success",
                   message: "下发成功!",
                 });
-                this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&test=1"
-                this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=257&planStatus=0&test=1"
-                this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&test=1"
-                this.fourth.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4&test=1"
+                this.getRequestUrl()
                 this.activeName = 'third'
               } else {
                 this.$message({

+ 16 - 2
src/views/inward/components/truckAppoint/purInwardRequirement.vue

@@ -43,7 +43,7 @@
             </dilTable>
           </el-tab-pane>
           <el-tab-pane label="已下发" name="second">
-            <dilTable v-bind.sync="second">
+            <dilTable v-bind.sync="second" @func="func">
               <el-table-column fixed="right" label="操作" width="100">
                 <template slot-scope="scope">
                   <el-button
@@ -51,7 +51,7 @@
                     size="mini"
                     @click="stopRequirement(scope)"
                   >
-                    停用
+                    {{startStop}}
                   </el-button>
                 </template>
               </el-table-column>
@@ -67,6 +67,8 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
+      startStop:null,
+      startStopValue:null,
       inputText: "",
       first: {
         // first请求数据的地址
@@ -93,6 +95,18 @@ export default {
     }
   },
   methods: {
+    func(res){
+        console.log("-----");
+        console.log(res.list)
+        console.log("-----");
+        res.list.forEach(e => {
+            if(e.enable == "未启用"){
+               this.startStop = "停用"
+            }else{
+               this.startStop = "停用"
+            }
+        });
+    },
     getRequestUrl(){
       if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"){
         this.first.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0" + "&t=" + new Date()

+ 186 - 22
src/views/inward/components/truckAppoint/requirement.vue

@@ -7,20 +7,13 @@
       <el-button type="primary" class="btn">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button
-        type="primary"
-        class="btn"
-        @click="toInsert"
-        v-if="activeName == 'first'"
-      >
-        <i class="el-icon-plus"></i>新增</el-button>
       <el-button
         type="primary"
         class="btn"
         @click="toInsert2"
         v-if="activeName == 'first'"
       >
-        <i class="el-icon-plus"></i>新增厂内内转需求
+        <i class="el-icon-plus"></i>新增
       </el-button>
       <el-button
         type="primary"
@@ -33,17 +26,17 @@
     </div>
     <template>
       <div>
-        <el-tabs v-model="activeName">
+        <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane label="未下发" name="first">
-            <dilTable v-bind.sync="first" @selection-change="selectionChange">
-              <el-table-column fixed="right" label="操作" width="100">
+            <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="updateRequirement(scope)"
+                    @click="getRequirementMaterial1(scope.row)"
                   >
-                    修改
+                    物资详情
                   </el-button>
                   <el-button
                     type="text"
@@ -54,10 +47,60 @@
                   </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"> </dilTable>
+            <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>
+                </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>
       </div>
@@ -65,6 +108,7 @@
   </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
@@ -72,25 +116,142 @@ export default {
       first: {
         // first请求数据的地址
         requestUrl:
-          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0",
+          "",
         selectionType: "select",
         mapList: [],
       },
       second: {
         // second请求数据的地址
         requestUrl:
-          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1",
+          "",
       },
+      //记录旧的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: "materialWeight",
+          label: "物资重量",
+          width: 150,
+        },
+        {
+          prop: "materialCount",
+          label: "物资数量",
+          width: 150,
+        },
+      ],
+      tableData: [],
+      tableData1: [
+        {
+          materialCount : 100
+        }
+      ],
       activeName: "first",
     };
   },
+  created(){
+    if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode") == "zidonghuabu"){
+      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0"
+      this.second.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1"
+    }else{
+      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&orgCode=" + getCookie("orgCode")
+      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);
+    },
+    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)
+      })
+    },
+    getRequestUrl(){
+      if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode") == "zidonghuabu"){
+      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&i=" + new Date()
+      this.second.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&i=" + new Date()
+      }else{
+      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&orgCode=" + getCookie("orgCode") + "&i=" + new Date()
+      this.second.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&orgCode=" + getCookie("orgCode") + "&i=" + new Date()
+      }
+    },
     selectionChange(selection) {
       this.first.mapList = selection;
     },
-    toInsert() {
-      this.$router.push("/addRequirement");
-    },
     toInsert2() {
       this.$router.push("/addRequirement2");
     },
@@ -117,7 +278,7 @@ export default {
                   type: "success",
                   message: "删除成功!",
                 });
-                this.$router.go(0);
+                this.getRequestUrl()
               } else {
                 this.$message({
                   message: "删除失败",
@@ -135,6 +296,10 @@ export default {
     },
     Issue() {
       console.log(this.first.mapList);
+      if(this.first.mapList.length == 0){
+        this.$message.warning("请选择需求")
+        return
+      }
       this.$confirm("是否下发", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -150,8 +315,7 @@ export default {
                   type: "success",
                   message: "下发成功!",
                 });
-              this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&test=1"
-              this.second.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&test=1"
+              this.getRequestUrl()
               this.activeName = 'second'
               } else {
                 this.$message({

+ 36 - 2
src/views/inward/components/truckOrder/addPurInwardOrder.vue

@@ -12,7 +12,7 @@
     </div>
     <!-- 表单选择车辆-->
     <div class="from">
-       <div class="line">
+        <div class="line">
         <span class="text">线路</span>
         <el-input
           v-model="lineName"
@@ -21,6 +21,18 @@
         ></el-input>
         <el-button type="primary" @click="onClick(1)">浏览</el-button>
       </div>
+      <div class="orderType">
+        <span class="text">订单类型</span>
+        <el-select v-model="orderType" placeholder="请选择">
+        <el-option
+          v-for="item in orderTypeList"
+          :key="item.value"
+          :label="item.label" 
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      </div>
       <div class="vehicle">
         <span class="text">车辆</span>
         <el-button type="primary" @click="onClick(2)">浏览</el-button>
@@ -170,6 +182,17 @@ export default {
         requestUrl: "",
         selectionType: "radio",
       },
+      //订单类型
+      orderTypeList:[
+        {
+          value:10,
+          label:'采购内转(铁专线-新区)'
+        },{
+          value:20,
+          label:'采购内转(铁专线-老区)'
+          }
+      ],
+      orderType:null,
       //已经选择车辆物资信息
       selectionList:[],
       //销售订单物资信息
@@ -241,7 +264,7 @@ export default {
         this.axios.post('/api/v1/oms/addPurInwardOrder',{
           materialId:this.materialId,
           lineId:this.lineId,
-          orderType:10,
+          orderType:this.orderType,
           orderId:this.orderId,
           planId:this.planId,
           mapList:this.selectionList,
@@ -363,6 +386,17 @@ export default {
       }
     }
   }
+  .orderType{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    margin-top: 20px;
+    margin-right: 130px;
+    .el-select {
+      padding-left: 10px;
+    }
+    
+  }
   .tablecls{
     margin-top: 20px;
   }

+ 159 - 57
src/views/inward/components/truckOrder/decomposePlan.vue

@@ -2,8 +2,34 @@
 <template>
 	<div class="desomposePlan">
 		<page-title>分解计划</page-title>
-        <dilTable v-bind.sync="first" >
-		</dilTable>
+        <dilTable v-bind.sync="first" ref="table">
+          <el-table-column fixed="right" label="操作" width="100">
+                <template slot-scope="scope">
+                  <el-button type="text" size="mini" @click="getRequirementMaterial(scope.row)">
+                    物资详情
+                  </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>
     <div class="form-box">
         <el-form :inline="true" class="demo-form-inline" :label-position="left"  label-width="80px">
           <el-form-item label="选择路线">
@@ -16,6 +42,9 @@
     </div>
      <div class="box-form">
         <dil-form :formId="318" v-model="form"></dil-form>
+    </div>
+    <div class="capacityButton">
+      <el-button type="primary" class="truckBtn" @click="drawerCapacity()">浏览车牌号</el-button>
     </div>
      <el-drawer
       :visible.sync="linedrawer"
@@ -35,19 +64,15 @@
       :before-close="handleClose"
       size="30%"
     >
-      <el-input placeholder="请输入内容" v-model="input"  style="margin-top:10px;margin-right: 10px;width:250px;" clearable> </el-input>
+      <el-input placeholder="请输入内容" v-model="input"  style="margin-top:10px;margin-right: 10px;width:150px;" clearable> </el-input>
       <el-button type="primary" class="btn" @click="onclick()"  style="margin-bottom:15px">
         <i class="el-icon-search"></i>查询
       </el-button>
-   <dilTable v-bind.sync="second" @radio-change="currentRadioChange" ></dilTable>    
+      <el-button type="primary" class="btn" @click="onConfirm()"  style="margin-bottom:15px">
+        <i class="el-icon-search"></i>确认
+      </el-button>
+   <dilTable v-bind.sync="second" @selection-change="currentRadioChange" ></dilTable>    
     </el-drawer>
-		<div style="margin-left:0.625rem">
-			<vxe-toolbar>
-				<template #buttons>
-					<vxe-button icon="fa fa-plus" @click="insertEvent()">新增</vxe-button>
-				</template>
-			</vxe-toolbar>
-		</div>
 		<vxe-table v-model="tableData" keep-source border resizable show-overflow show-footer ref="xTable"
 			max-height="400" :footer-method="footerMethod" :data="tableData"
 			:edit-config="{trigger: 'click', mode: 'cell', showStatus: true}"
@@ -65,7 +90,7 @@
       <vxe-input v-model="row.requirementNo" type="text" disabled></vxe-input>
       </template>
 			</vxe-table-column>
-			<vxe-table-column field="materialName" title="物资名称"
+			<!-- <vxe-table-column field="materialName" title="物资名称"
 			
 			>
       <template #edit="{ row }">
@@ -85,7 +110,7 @@
        <template #edit="{ row }">
       <vxe-input v-model="row.materialNumber" type="text" ></vxe-input>
       </template>       
-			</vxe-table-column>
+			</vxe-table-column> -->
        <vxe-table-column field="capacityNumber" title="车牌号"
 				:edit-render="{}"
 				>
@@ -95,7 +120,6 @@
 			</vxe-table-column>
 		    <vxe-column title="操作" width="200">
             <template #default="{ row }">
-              <vxe-button status="primary" @click="drawerCapacity(row)">选择车牌</vxe-button>
               <vxe-button status="danger" @click="removeRow(row)">删除</vxe-button>
             </template>
           </vxe-column>
@@ -116,50 +140,122 @@ export default {
   },
   data() {
     return {
+      lineId:null,
+      requirementId:null,
+      capacityNumber:null,
       userCarrierId:null,
       lineName:null,
       linedrawer:false,
       tableData:[],
       direction: "rtl",
       input:'',
-      selectRow:null,
+      selectRow:null, 
       drawer:false,
-      purchaseOrderNo:"",
       planNo:"",
       requirementNo:"",
-      materialName:"",
-      materialWeight:null,
-      materialNumber:null,
       carrierId:null,
       form: {},
       first:{
        requestUrl: "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&planId="+this.$route.params.planId,
       },
       second:{
-        requestUrl:"/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + '',
-        selectionType: "radio",
+        requestUrl:"/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null,
+        selectionType: "select",
         mapList1:[]
       },
       zero:{
         requestUrl:"/api/v1/rms/getAllLineDesk?apiId=249",
         selectionType: "radio",
         mapList0:[]
-      }
+      },
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
+      oldRowCount: 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,
+        },
+      ],
+      tableData1: [],
     };
   },
   created(){
     this.userCarrierId = getCookie("userId")
-    this.second.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + this.userCarrierId
+    this.second.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246"
   },
   mounted(){
       this.information()
   },
   methods: {
-    drawerCapacity(row){ 
+    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) => {
+        console.log(res.data.data);
+        this.tableData1 = res.data.data
+      })
+    },
+    drawerCapacity(){ 
       this.drawer = true;
-      this.selectRow = row
-      console.log(row.purchaseOrderNo)
-      console.log(this.second.requestUrl)
+    },
+    onConfirm(){
+      console.log(this.mapList1)
+      this.drawer = false
+      this.mapList1.forEach((e) => {
+          console.log((e.capacityNumber))
+          this.capacityNumber = e.capacityNumber
+          this.insertEvent()
+      })
     },
     drawerLine(){
       this.linedrawer = true
@@ -173,11 +269,12 @@ export default {
     },
     currentRadioChange(selection){
       this.mapList1=selection,
-      this.selectRow.capacityNumber = this.mapList1.capacityNumber
+      console.log(this.mapList1)
     },
     currentRadioChange1(selection){
       this.mapList0=selection
       this.lineName = this.mapList0.lineName
+      this.lineId = this.mapList0.lineId
       console.log(this.mapList0.lineId)
     },
    handleClose(done){
@@ -197,26 +294,26 @@ export default {
           "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&planId=" + this.$route.params.planId
         )
         .then((res) => {
-            console.log(res)
-            const planRow = res.data.data.list
-            this.purchaseOrderNo = planRow[0].purchaseOrderNo,
+            console.log(res.data.data)
+            var planRow = res.data.data.list
             this.requirementNo = planRow[0].requirementNumber,
             this.planNo = planRow[0].planNumber,
-            this.materialName = planRow[0].materialName,
-            this.materialWeight = planRow[0].materialWeight,
-            this.materialNumber = planRow[0].materialNumber,
-            this.carrierId = planRow[0].carrierId
+            this.carrierId = planRow[0].carrierId,
+            this.requirementId = planRow[0].requirementId
+            console.log(this.requirementId)
+            this.axios.post("/api/v1/ams/getRequirementMaterial/" + this.requirementId).then((res) => {
+                console.log(res.data.data);
+                this.tableData1 = res.data.data
+      })    
         });
     },
-    async insertEvent (row) {
+    async insertEvent (row,) {
               const $table = this.$refs.xTable
               const record = {
-                purchaseOrderNo: this.purchaseOrderNo,
                 requirementNo:this.requirementNo,
                 planNo:this.planNo,
-                materialName:this.materialName,
-                materialWeight:this.materialWeight - (this.sumNum(this.$refs.xTable.getInsertRecords(), 'materialWeight')),
-                materialNumber:this.materialNumber - (this.sumNum(this.$refs.xTable.getInsertRecords(), 'materialNumber'))          
+                capacityNumber:this.capacityNumber,
+                orderMaterialList:this.tableData1,   
               }
               const { row: newRow } = await $table.insertAt(record, row)
               await $table.setActiveCell(newRow, 'name')
@@ -228,11 +325,7 @@ export default {
             },
     // 修改
     makeSure() {
-      if(this.mapList0.lineId == null){
-        this.$alert('没有选择运输路线,请选择!')
-        console.log(this.lineId)
-        return
-      }else if(typeof(this.form.orderType) == 'undefined'){
+      if(typeof(this.form.orderType) == 'undefined'){
         this.$alert('没有选择订单类型,请选择')
         return
       }
@@ -244,12 +337,13 @@ export default {
       }
       let BmsTrainFreight = {
           planId:this.$route.params.planId,
-          lineId:this.mapList0.lineId,
+          lineId:this.lineId,
           orderType:this.form.orderType,
           carrierId:this.carrierId,
           mapList:this.$refs.xTable.getInsertRecords()
       };
       console.log(BmsTrainFreight)
+      debugger
       this.axios
         .post("/api/v1/oms/addInwardOrder", BmsTrainFreight)
         .then((res) => {
@@ -286,21 +380,29 @@ export default {
   }
 }
 .box-form{
-  display: inline-block !important;
-  padding-left: 38%;
-  .el-form-item{
-  display: flex;
-  padding: 10px;
-  .el-form-item__label{
-    width: 80px !important;
-  }
-  .el-input{
-    width:288px
+  // display: flex;
+  // justify-content: center;
+  padding-left: 40.5%;
+  margin-right: 100px;
+  .el-form-item__content {
+    display: flex;
   }
+}
+.capacityButton {
+  // width: 800px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-left: 150px;
+  .truckBtn {
+    width: 300px;
   }
+  
 }
 .button-box{
- margin-left: 25px !important;
+  display: flex;
+  justify-content: center;
+  margin-left: 25px !important;
 }
 }
 

+ 120 - 61
src/views/inward/components/truckOrder/dispatchPlan.vue

@@ -7,23 +7,44 @@
       <el-button type="primary" class="btn">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button
-        type="primary"
-        class="btn"
-        @click="dispatch"
-        v-if="activeName == 'first'"
-      >
-        <i class="el-icon-download"></i>分派</el-button
-      >
     </div>
     <template>
       <div>
         <el-tabs v-model="activeName" @tab-click="handleClick">
-          <el-tab-pane label="未分派" name="first">
-            <dilTable v-bind.sync="first" @selection-change="selectionChange">
+          <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="getRequirementMaterial(scope.row)">
+                    物资详情
+                  </el-button>
+                  <el-button type="text" size="mini" @click="updatePlan(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-tab-pane label="已分派" name="second">
+          <el-tab-pane label="已接收" name="second">
             <dilTable v-bind.sync="second"> </dilTable>
           </el-tab-pane>
         </el-tabs>
@@ -39,67 +60,106 @@ export default {
       inputText: "",
       userCarrierId:'',
       first: {
-        // first请求数据的地址
-        requestUrl:
-        "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=3&carrierId=" + '',
-        selectionType: "select",
-        mapList: [],
-      },
-      second: {
-        // second请求数据的地址
+        // 
         requestUrl:
           "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" + '',
       },
       activeName: "first",
+      second: {
+        requestUrl:""
+      },
+       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: [],
+       //记录旧的row对象(未下发)
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
+      oldRowCount: 1,
     };
   },
   created(){
-      this.userCarrierId = getCookie('userId'),
-      this.first.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=3&carrierId=" + this.userCarrierId
-      this.second.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" + this.userCarrierId
+      if(getCookie("orgCode") == "chengyunshang"){
+          this.first.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" + getCookie("userId") 
+          this.second.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5&carrierId=" + getCookie("userId")
+      }else{
+          this.first.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4"
+          this.second.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5"
+      }
   },
   methods: {
-    selectionChange(selection) { 
-      this.first.mapList = selection
+    getRequest(){
+      if(getCookie("orgCode") == "chengyunshang"){
+          this.first.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" + getCookie("userId") + new Date()
+          this.second.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5&carrierId=" + getCookie("userId") + new Date()
+      }else{
+          this.first.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4"
+          this.second.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5"
+      }
+      
     },
-    dispatch() {
-      if(this.first.mapList.length == 0){
-          this.$alert('请选择订单')
-          return
+    handleClick(){
+      this.getRequirementMaterial()
+    },
+    getRequirementMaterial(row) {
+      // 记录重复点击次数
+      if (this.oldRow === row) {
+        this.oldRowCount += 1;
       }
-      this.$confirm("是否分派", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
+      // 切换当前详情表
+      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)
       })
-        .then(() => {
-          this.axios
-            .post("/api/v1/oms/apportionInwardOrder", this.first.mapList)
-            .then((res) => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "分派成功!",
-                });
-                this.first.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=3&carrierId=" + this.userCarrierId + "&test=1"
-                this.second.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" + this.userCarrierId + "&test=1"
-                this.activeName = 'second'
-                this.first.mapList = []
-              } else {
-                this.$message({
-                  message: "分派失败",
-                  type: "warning",
-                });
-              }
-            });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "分派操作已取消!",
-          });
-        });
     },
     deletePlan(scope) {
       this.$confirm("是否删除", "提示", {
@@ -119,7 +179,6 @@ export default {
                   type: "success",
                   message: "删除成功!",
                 });
-                this.$router.go(0);
               } else {
                 this.$message({
                   message: "删除失败",

+ 194 - 38
src/views/inward/components/truckOrder/plan.vue

@@ -11,21 +11,14 @@
     <template>
       <div>
         <el-tabs v-model="activeName" @tab-click="handleClick">
-          <el-tab-pane label="未接收" name="first">
-            <dilTable v-bind.sync="first">
-              <el-table-column fixed="right" label="操作" width="50">
+          
+          <el-tab-pane label="待分解" name="second">
+            <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="receiver(scope)">
-                    接收
+                  <el-button type="text" size="mini" @click="getRequirementMaterial1(scope.row)">
+                    物资详情
                   </el-button>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-          <el-tab-pane label="已接收" name="second">
-            <dilTable v-bind.sync="second">
-              <el-table-column fixed="right" label="操作" width="50">
-                <template slot-scope="scope">
                   <el-button
                     type="text"
                     size="mini"
@@ -35,17 +28,55 @@
                   </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-tab-pane label="已分解" name="third">
-            <dilTable v-bind.sync="third">
-              <el-button
-                type="text"
-                size="mini"
-                @click="getdesponsePlan(scope)"
-              >
-                查看
-              </el-button>
+            <dilTable v-bind.sync="third" ref="table2">
+             <el-table-column fixed="right" label="操作" width="100">
+                <template slot-scope="scope">
+                  <el-button type="text" size="mini" @click="getRequirementMaterial2(scope.row)">
+                    物资详情
+                  </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>
@@ -59,33 +90,162 @@ export default {
   data() {
     return {
       inputText: "",
-      carrierId:null,
+      carrierId:40,
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
+      oldRowCount: 1,
+      oldRow1: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
+      oldRowCount1: 1,
+       oldRow2: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
+      oldRowCount2: 1,
       first: {
         // first请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&carrierId=" + ''
+        requestUrl:"",
       },
       second: {
         // second请求数据的地址
         requestUrl:
-          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" + ''
+          "" 
       },
       third: {
         // second请求数据的地址
         requestUrl:
-          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" + '' 
+          "" 
       },
-      activeName: "first",
+      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&carrierId=" + this.carrierId
-      this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" + this.carrierId
-      this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" + this.carrierId
-      console.log(this.carrierId)
+      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()
+    },
     receiver(scope) {
       this.$confirm("是否接收", "提示", {
         confirmButtonText: "确定",
@@ -102,9 +262,7 @@ export default {
                   type: "success",
                   message: "接收成功!",
                 });
-                this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&carrierId=" + this.carrierId + "&test=1"
-                this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" + this.carrierId + "&test=1"
-                this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" + this.carrierId + "&test=1"
+                this.getRequestUrl()
               } else {
                 this.$message({
                   message: "接收失败",
@@ -144,9 +302,7 @@ export default {
                   type: "success",
                   message: "删除成功!",
                 });
-                 this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&carrierId=" + this.carrierId + "&test=1"
-                this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" + this.carrierId + "&test=1"
-                this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" + this.carrierId + "&test=1"
+                this.getRequestUrl()
               } else {
                 this.$message({
                   message: "删除失败",
@@ -182,7 +338,7 @@ export default {
                   type: "success",
                   message: "下发成功!",
                 });
-                this.first.requestUrl = ""
+                this.getRequestUrl()
               } else {
                 this.$message({
                   message: "下发失败",

+ 56 - 36
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailOrder.vue

@@ -85,15 +85,15 @@
 
       <el-form>
         <el-form-item label="原详单地址" :label-width="formLabelWidth">
-          <el-input style="width:250px" v-model="originalAddress" disabled autocomplete="off"></el-input>
+          <el-input style="width:250px" v-model="originalAddress" disabled></el-input>
           <label>原单价</label>
-          <el-input style="width:100px" v-model="originalPriceValue" disabled autocomplete="off"></el-input>
+          <el-input style="width:100px" v-model="originalPriceValue" disabled></el-input>
           
         </el-form-item>
         <el-form-item label="新详单地址" :label-width="formLabelWidth">
-          <el-input style="width:250px" v-model="newAddress" disabled autocomplete="off"></el-input>
+          <el-input style="width:250px" v-model="newAddress" disabled></el-input>
           <label>现单价</label>
-          <el-input style="width:100px" v-model="newPriceValue" disabled autocomplete="off"></el-input>
+          <el-input style="width:100px" v-model="newPriceValue" disabled></el-input>
           <el-button type="primary" placeholder="()" @click="select">浏览</el-button>
         </el-form-item>
       </el-form>
@@ -103,10 +103,16 @@
       </div>
     </el-dialog>
     <!-- 增加途损 -->
-      <el-dialog title="*注:途损费计算规则为()" width="30%" :visible.sync="dialogDamage">
+      <el-dialog title="增加途损" width="30%" :visible.sync="dialogDamage">
     <el-form>
-      <el-form-item label="请输入途损费" :label-width="formLabelWidth">
-        <el-input v-model="damageFee" autocomplete="off"></el-input>
+      <el-form-item label="达钢的干基" :label-width="formLabelWidth">
+        <el-input v-model="DaDryBasis"></el-input>
+      </el-form-item>
+      <el-form-item label="九江收货的干基" :label-width="formLabelWidth">
+        <el-input v-model="JiuDryBasis"></el-input>
+      </el-form-item>
+      <el-form-item label="单价" :label-width="formLabelWidth">
+        <el-input v-model="Fee"></el-input>
       </el-form-item>
     </el-form>
     <div slot="footer" class="dialog-footer">
@@ -131,6 +137,12 @@ export default {
       addressId:null,
       //省市县(区)查询值
       addresText:null,
+      //达钢的干基
+      DaDryBasis:null,
+      //九江收货的干基
+      JiuDryBasis:null,
+      //单价
+      Fee:null,
       //途损费
       damageFee:null,
       //加载
@@ -246,40 +258,48 @@ export default {
       this.dialogDamage = true;
     },
     makeSureAdd(){
-      if(this.damageFee==null){
-        this.$message.error('还未输入途损费!')
+      if(!this.DaDryBasis){
+        this.$message.error('达钢的干基还未填!')
+      }else if(!this.JiuDryBasis){
+        this.$message.error('九江收货的干基还未填!')
+      }else if(!this.Fee){
+        this.$message.error('单价还未填!')
       }else{
         this.dialogDamage = false;
-        let map = {
+        //计算途损 [(达钢的干基-九江收货的干基)/达钢的干基 - 0.03] * 单价 > 0, 扣除途损
+        this.damageFee = ((this.DaDryBasis - this.JiuDryBasis) / this.DaDryBasis - 0.03) * this.Fee;
+        if(this.damageFee>0){
+          let map = {
         detailsId: this.detailsId,
-        lossFees: this.damageFee
+        lossFees: this.damageFee.toFixed(2)
         }
         //是否确定增加途损费!
-      this.$confirm("是否确定增加途损费", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-      .then(() => {
-        //初始化增加途损费对话框中的信息
-        this.damageFee=null,
-        this.axios.post('/api/v1/bms/addLossFeeOfCoke',map).then((res)=>{
-            if(res.data.code == '0'){
-            this.$message.success('增加途损费成功!')
-            //重置未结算详单表单信息
-            this.options1.requestUrl = "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" + new Date();
-          }else{
-            this.$message.error('增加途损费失败,请联系管理员!')
-          }
-        });
-      })
-      .catch(() => {
-        this.$message({
-          type: "info",
-          message: "取消修改详单单价!",
-        });
-      });
+          this.$confirm("是否确定增加途损费", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+            center: true,
+          })
+          .then(() => {
+            //初始化增加途损费对话框中的信息
+            this.damageFee=null,
+            this.axios.post('/api/v1/bms/addLossFeeOfCoke',map).then((res)=>{
+                if(res.data.code == '0'){
+                this.$message.success('增加途损费成功!')
+                //重置未结算详单表单信息
+                this.options1.requestUrl = "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" + new Date();
+              }else{
+                this.$message.error('增加途损费失败,请联系管理员!')
+              }
+            });
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "取消修改详单单价!",
+            });
+          });
+        }
       }
       
     },

+ 0 - 7
src/views/sale/components/transport_appointment/directionalDispatch.vue

@@ -145,7 +145,6 @@ export default {
         selectionType: "radio",
         mapList: [],
       },
-
       //记录旧的row对象(未下发)
       oldRow: "",
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
@@ -170,11 +169,6 @@ export default {
           label: "物资数量(件数/重量)",
           width: 150,
         },
-        // {
-        //   prop: "materialWeight",
-        //   label: "物资重量",
-        //   width: 100,
-        // },
       ],
       tableData: [],
       tableData1: [],
@@ -274,7 +268,6 @@ export default {
       }
       
     },
-
     // -------查看物资详情(未下发)
     detailclick(row) {
       // 记录重复点击次数

+ 3 - 1
src/views/statisticalReport/components/inwardReport/putInwardReport.vue

@@ -55,12 +55,14 @@ export default {
         console.log(res)
         var resultNetWeightTotalFirst = 0
         var resultNetWeightTotalSecond = 0
+        var currentCapacityTotal = 0
         res.list.forEach(e => {
+          currentCapacityTotal++
           resultNetWeightTotalFirst = resultNetWeightTotalFirst+e.netWeightFirst
           resultNetWeightTotalSecond = resultNetWeightTotalSecond + e.netWeightSecond
         });
         this.totalNumberFrist = resultNetWeightTotalFirst.toFixed(2) + "t" + "/" + resultNetWeightTotalSecond.toFixed(2) + "t"
-        this.totalCapacity = res.total;
+        this.totalCapacity = currentCapacityTotal;
     },
     getRequestUrl(){
         this.option.requestUrl = '/api/v1/tms/getPurInwardReport?apiId=441&startTime=null&endTime=null&i=' +new Date();

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

@@ -64,11 +64,13 @@ export default {
      func(res){
         console.log(res)
         var resultNetWeightTotal = 0
+        var currentCapacityTotal = 0
         res.list.forEach(e => {
+          currentCapacityTotal++
           resultNetWeightTotal = resultNetWeightTotal+e.resultNetWeight
         });
         this.totalNumber = resultNetWeightTotal.toFixed(2) + "t"
-        this.totalCapacity = res.total;
+        this.totalCapacity = currentCapacityTotal;
     },
     getRequestUrl(){
         if (

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

@@ -59,11 +59,13 @@ export default {
     func(res){
         console.log(res)
         var resultNetWeightTotal = 0
+        var currentCapacityTotal = 0
         res.list.forEach(e => {
+          currentCapacityTotal++
           resultNetWeightTotal = resultNetWeightTotal+e.resultNetWeight
         });
         this.totalNumber = resultNetWeightTotal.toFixed(2) + "t"
-        this.totalCapacity = res.total;
+        this.totalCapacity = currentCapacityTotal;
     },
     getRequestUrl(){
         if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){