huk 3 rokov pred
rodič
commit
2ffa0580f3
22 zmenil súbory, kde vykonal 1480 pridanie a 343 odobranie
  1. 1 1
      src/components/DilCommonUI/packages/table/src/table.vue
  2. 2 1
      src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/load.vue
  3. 0 5
      src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/addTransportOrder.vue
  4. 13 5
      src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/transportOrder.vue
  5. 6 6
      src/views/SporadicManage/components/sporadicMaterial/transportAppoint/transportAppoint.vue
  6. 1 0
      src/views/SporadicManage/components/sporadicMaterial/transportOrder/addTransportOrder.vue
  7. 12 10
      src/views/SporadicManage/components/sporadicMaterial/transportOrder/transportOrder.vue
  8. 18 5
      src/views/inward/components/inwardImport/oldAreaRailScale/enFactory.vue
  9. 12 4
      src/views/inward/components/inwardImport/oldAreaRailScale/grossWeightResult.vue
  10. 12 4
      src/views/inward/components/inwardImport/oldAreaRailScale/outFactory.vue
  11. 10 3
      src/views/inward/components/inwardImport/oldAreaRailScale/qualityResult.vue
  12. 12 4
      src/views/inward/components/inwardImport/oldAreaRailScale/tareWeightResult.vue
  13. 14 6
      src/views/inward/components/inwardImport/oldAreaRailScale/truckLoad.vue
  14. 12 4
      src/views/inward/components/inwardImport/oldAreaRailScale/unload.vue
  15. 376 265
      src/views/inward/components/truckAppoint/addRequirement.vue
  16. 225 0
      src/views/inward/components/truckAppoint/purInwardRequirement.vue
  17. 1 2
      src/views/inward/components/truckAppoint/requirement.vue
  18. 368 0
      src/views/inward/components/truckOrder/addPurInwardOrder.vue
  19. 300 0
      src/views/inward/components/truckOrder/purInwardTruckOrder.vue
  20. 12 1
      src/views/inward/router/index.js
  21. 46 15
      src/views/statisticalReport/components/sporadicReport/sporadicReportEnterFactory.vue
  22. 27 2
      src/views/statisticalReport/components/sporadicReport/sporadicReportExFactory.vue

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

@@ -205,7 +205,7 @@ export default {
     // 每页显示个数选择器的选项设置
     pageSizes: {
       default() {
-        return [10, 20, 50, 100, 200];
+        return [10, 20, 50, 100, 200,1000];
       },
     },
     // 每页显示条目个数,支持 .sync 修饰符

+ 2 - 1
src/views/SporadicManage/components/moreThanMaterialTruck/sporadicOutfactory/load.vue

@@ -13,6 +13,7 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   name: "homeworkPath",
   data() {
@@ -21,7 +22,7 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllLoadResult?apiId=430&orderType=16&status=0",
+        requestUrl: "",
       },
     };
   },

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

@@ -152,11 +152,6 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
       this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=15&dispatchStatus=0";
-    } 
-    else if(getCookie("orgCode")=="baohua"){
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + getCookie("userId");
-      this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=15&dispatchStatus=0&userId=" + getCookie("orgCode");
     }
     else{
       this.truck.requestUrl =

+ 13 - 5
src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/transportOrder.vue

@@ -10,13 +10,13 @@
         <i class="el-icon-plus"></i>新增
       </el-button>
     </div>
-     <el-dialog title="车辆信息" :visible.sync="dialogTableVisible">
+    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
     <dilTable
           v-bind.sync="truck"
           @radio-change="currentRadioChange1"
         ></dilTable>
     <span slot="footer" class="dialog-footer">
-    <!-- <el-button @click="dialogVisible = false">取 消</el-button> -->
+    <el-button @click="cancelUpdate()">取 消</el-button>
     <el-button type="primary" @click="updateTruckCapacity()">确 定</el-button>
     </span>
     </el-dialog>
@@ -70,7 +70,7 @@ export default {
       //模态窗的框计算
       inputText: null,
       //是否弹出对话框
-      dialogVisible: false,
+      dialogTableVisible: false,
       //输入框的值
       input: "",
       //选项卡的当前选中的值
@@ -130,11 +130,10 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
-      } else {
+      }else {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
       }
-      console.log("一车多趟")
       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")
@@ -148,6 +147,14 @@ export default {
   },
   
   methods: {
+    handleClose(done){
+      done()
+      this.$message.info("取消修改运力")
+    },
+    cancelUpdate(){
+      this.dialogTableVisible = false
+      this.$message.info("取消修改运力")
+    },
     getRequestUrl(){
       if(getCookie('orgCode') == "chengyunshang"){
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" + getCookie("userId") + "&test=" + new Date(),
@@ -230,6 +237,7 @@ export default {
       console.log(row)
       this.capacityId = row.capacityId
     },
+    
     onclick(){
       console.log("dianji")
     },

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

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

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

@@ -170,6 +170,7 @@ export default {
     makeSure(){
        console.log(this.selectionList)
         this.disabled = true
+        console.log(this.orderId)
         if(this.orderId == null){
           this.$message.error("未勾选零星订单")
           this.disabled = false

+ 12 - 10
src/views/SporadicManage/components/sporadicMaterial/transportOrder/transportOrder.vue

@@ -10,13 +10,13 @@
         <i class="el-icon-plus"></i>新增
       </el-button>
     </div>
-    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible">
+    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
     <dilTable
           v-bind.sync="truck"
           @radio-change="currentRadioChange1"
         ></dilTable>
     <span slot="footer" class="dialog-footer">
-    <!-- <el-button @click="dialogVisible = false">取 消</el-button> -->
+    <el-button @click="dialogTableVisible = false">取 消</el-button>
     <el-button type="primary" @click="updateTruckCapacity()">确 定</el-button>
     </span>
     </el-dialog>
@@ -71,7 +71,7 @@ export default {
       //模态窗的框计算
       inputText: null,
       //是否弹出对话框
-      dialogVisible: false,
+      dialogTableVisible: false,
       //输入框的值
       input: "",
       //选项卡的当前选中的值
@@ -82,7 +82,7 @@ export default {
       },
       //车辆信息的表格
       truck: {
-        requestUrl: "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + '',
+        requestUrl: "" ,
         // 控制显示当选列
         selectionType: "radio",
       },
@@ -130,7 +130,6 @@ export default {
       selectionList: [],
       //区别点击的是添加运力,还是修改
       index: null,
-      dialogTableVisible: false,
     };
   },
   created(){
@@ -142,10 +141,9 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
       }
-
       if(getCookie('orgCode') == "chengyunshang"){
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + this.carrierUserId ,
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + this.carrierUserId
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + getCookie("userId") ,
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + getCookie("userId")
       }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4"
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5"
@@ -155,10 +153,14 @@ export default {
       }
   },
   methods: {
+    handleClose(done){
+      done()
+      this.$message.info("取消修改运力")
+    },
     getRequestUrl(){
         if(getCookie('orgCode') == "chengyunshang"){
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + this.carrierUserId + "&test=" + new Date() ,
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + this.carrierUserId + "&test=" + new Date()
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + getCookie("userId") + "&test=" + new Date() ,
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + getCookie("userId") + "&test=" + new Date()
       }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
         this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4" + "&test=" + new Date()
         this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5" + "&test=" + new Date()

+ 18 - 5
src/views/inward/components/inwardImport/oldAreaRailScale/enFactory.vue

@@ -18,20 +18,33 @@
     </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
     data(){
         return{
-            inputText:'',
+            inputText:null,
             option: {       
                 // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getAllEnFactoryResult?apiId=99&orderType=10",
+                requestUrl: "",
             },
         }
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=99&orderType=10&con=" + this.inputText;
+    created(){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10&userId=" + getCookie("orgCode")
         }
+    },
+    methods:{
+        // onclick(){
+        //     if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+        //     this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10"
+        //     }else{
+        //     this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10&userId=" + getCookie("orgCode")
+        //     }
+        //     this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=434&orderType=10&con=" + this.inputText;
+        //     }
     }
 }
 </script>

+ 12 - 4
src/views/inward/components/inwardImport/oldAreaRailScale/grossWeightResult.vue

@@ -18,20 +18,28 @@
     </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
     data(){
         return{
             inputText:'',
             option: {       
                 // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getAllJiMaoResult?apiId=354&orderType=10",
+                requestUrl: "",
             },
         }
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=354&orderType=10&con="+this.inputText;
+    created(){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=354&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=354&orderType=10&userId=" + getCookie("orgCode")
         }
+    },
+    methods:{
+        // onclick(){
+        //     this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=354&orderType=10&con="+this.inputText;
+        // }
     }
 }
 </script>

+ 12 - 4
src/views/inward/components/inwardImport/oldAreaRailScale/outFactory.vue

@@ -18,20 +18,28 @@
     </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
     data(){
         return{
             inputText:'',
             option: {       
                 // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getLeaveFactoryResult?apiId=110&orderType=10",
+                requestUrl: "",
             },
         }
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=110&orderType=10&con="+this.inputText;
+    created(){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=110&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=110&orderType=10&userId=" + getCookie("orgCode")
         }
+    },
+    methods:{
+        // onclick(){
+        //     this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=110&orderType=10&con="+this.inputText;
+        // }
     }
 }
 </script>

+ 10 - 3
src/views/inward/components/inwardImport/oldAreaRailScale/qualityResult.vue

@@ -28,10 +28,17 @@ export default {
             },
         }
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getQualityResult?apiId=111&orderType=10&con="+this.inputText;
+    created(){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option.requestUrl = "/api/v1/tms/getQualityResult?apiId=111&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getQualityResult?apiId=111&orderType=10&userId=" + getCookie("orgCode")
         }
+    },
+    methods:{
+        // onclick(){
+        //     this.option.requestUrl = "/api/v1/tms/getQualityResult?apiId=111&orderType=10&con="+this.inputText;
+        // }
     }
 }
 </script>

+ 12 - 4
src/views/inward/components/inwardImport/oldAreaRailScale/tareWeightResult.vue

@@ -18,20 +18,28 @@
     </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
     data(){
         return{
             inputText:'',
             option: {       
                 // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getAllJiPiResult?apiId=104&orderType=10",
+                requestUrl: "",
             },
         }
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=104&orderType=10&con="+this.inputText;
+    created(){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=436&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=436&orderType=10&userId=" + getCookie("orgCode")
         }
+    },
+    methods:{
+        // onclick(){
+        //     this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=104&orderType=10&con="+this.inputText;
+        // }
     }
 }
 </script>

+ 14 - 6
src/views/inward/components/inwardImport/oldAreaRailScale/truckLoad.vue

@@ -15,22 +15,30 @@
   </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
       inputText: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getAllLoadResult?apiId=353&orderType=10",
+        requestUrl: "",
       },
     };
   },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=435&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getAllLoadResult?apiId=435&orderType=10&userId=" + getCookie("orgCode")
+        }
+  },
   methods: {
-    onclick() {
-      this.option.requestUrl =
-        "/api/v1/tms/getAllLoadResult?apiId=353&orderType=10&con=" +
-        this.inputText;
-    },
+    // onclick() {
+    //   this.option.requestUrl =
+    //     "/api/v1/tms/getAllLoadResult?apiId=353&orderType=10&con=" +
+    //     this.inputText;
+    // },
   },
 };
 </script>

+ 12 - 4
src/views/inward/components/inwardImport/oldAreaRailScale/unload.vue

@@ -18,20 +18,28 @@
     </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
     data(){
         return{
             inputText:'',
             option: {       
                 // 表格请求数据的地址
-                requestUrl: "/api/v1/tms/getUnloadResult?apiId=356&orderType=10",
+                requestUrl: "",
             },
         }
     },
-    methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=356&orderType=10&con="+this.inputText;
+    created(){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=356&orderType=10"
+        }else{
+            this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=356&orderType=10&userId=" + getCookie("orgCode")
         }
+    },
+    methods:{
+        // onclick(){
+        //     this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=356&orderType=10&con="+this.inputText;
+        // }
     }
 }
 </script>

+ 376 - 265
src/views/inward/components/truckAppoint/addRequirement.vue

@@ -1,348 +1,459 @@
-// 新增采购内转需求
 <template>
-  <div class="addInwardRequirement">
-    <page-title>新增需求</page-title>
-    <div class="form-box f2">
-      <el-form
-        :inline="true"
-        class="demo-form-inline"
-        :label-position="left"
-        label-width="80px"
-      >
-        <el-form-item label="采购订单号">
-          <el-input v-model="purchaseOrder" placeholder="必填" disabled>
-          </el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
-        </el-form-item>
-      </el-form>
-      <el-form
-        :inline="true"
-        class="demo-form-inline"
-        :label-position="left"
-        label-width="80px"
-      >
-        <el-form-item label="外轮船名" class="tx">
-          <el-input v-model="foreignShipName" disabled></el-input>
-        </el-form-item>
-      </el-form>
-      <el-form
-        :inline="true"
-        class="demo-form-inline"
-        :label-position="left"
-        label-width="80px"
-      >
-        <el-form-item label="发货单位" class="tx">
-          <el-input v-model="supplierName" disabled></el-input>
-        </el-form-item>
-      </el-form>
-      <el-form
-        :inline="true"
-        class="demo-form-inline"
-        :label-position="left"
-        label-width="80px"
-      >
-        <el-form-item label="收货单位" class="tx">
-          <el-input v-model="shipperName" disabled></el-input>
-        </el-form-item>
-      </el-form>
-      <el-form
-        :inline="true"
-        class="demo-form-inline"
-        :label-position="left"
-        label-width="80px"
-      >
-        <el-form-item label="物资名称" class="tx">
-          <el-input v-model="materialName" disabled></el-input>
-        </el-form-item>
-      </el-form>
-      <el-form
-        :inline="true"
-        class="demo-form-inline"
-        :label-position="left"
-        label-width="80px"
-      >
-        <el-form-item label="装车点">
-          <el-input v-model="truckPoint" placeholder="必填" disabled>
-          </el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
-        </el-form-item>
-      </el-form>
-      <el-form
+  <!-- 新增运输作业页面 -->
+  <div class="addPurRequirement">
+    <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="forwardingUnit from">
+      <span class="text">发货单位:</span>
+      <el-input class="input" v-model="supplierName" disabled> </el-input>
+      <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
+    </div>
+    <div class="forwardingUnit from">
+      <span class="text">卸货点:</span>
+      <el-input class="input" v-model="unloadPointName" disabled> </el-input>
+      <el-button type="primary" @click="ondrawer(4)">浏览</el-button>
+    </div>
+    <div class="forwardingUnit from">
+       <el-form
         :inline="true"
         class="demo-form-inline"
-        :label-position="left"
         label-width="80px"
       >
-        <el-form-item label="卸车点">
-          <el-input v-model="truckPoint1" placeholder="必填" disabled>
-          </el-input>
+        <el-form-item label="选择承运商">
+         <el-autocomplete
+          class="inline-input"
+          v-model="stateCarrier"
+          :fetch-suggestions="querySearchCarrier"
+          placeholder="请输入承运商名称"
+          :trigger-on-focus="false"
+          @select="handleSelectCarrier"
+        >
+        <template slot-scope="{ item }">
+          <div class="name">{{ item.carrierName }}</div>
+        </template>
+        </el-autocomplete>
         </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="ondrawer(3)">浏览</el-button>
-        </el-form-item>
-      </el-form>
+    </el-form>
     </div>
-    <el-drawer
-      :visible.sync="drawer"
-      :direction="direction"
-      :before-close="handleClose"
-      size="30%"
-    >
-      <el-input
-        placeholder="请输入内容"
-        v-model="input"
-        style="margin-top: 10px ;width:50%"
-        clearable
-      >
-      </el-input>
-      <el-button
-        type="primary"
-        class="btn"
-        @click="onclick(a)"
-        style="margin-bottom: 15px"
-      >
-        <i class="el-icon-search"></i>查询
-      </el-button>
+    <div class="contractTitle from">
+      <dil-form :formId="219" v-model="form1"></dil-form>
+    </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="second"
+          v-bind.sync="frist"
           @radio-change="currentRadioChange1"
         ></dilTable>
       </div>
       <div v-show="a == 2">
         <dilTable
-          v-bind.sync="second1"
+          v-bind.sync="secend"
           @radio-change="currentRadioChange2"
         ></dilTable>
       </div>
       <div v-show="a == 3">
         <dilTable
-          v-bind.sync="second2"
-          @radio-change="currentRadioChange3"
+          v-bind.sync="third"
+          @selection-change="currentRadioChange3"
         ></dilTable>
       </div>
       <div v-show="a == 4">
         <dilTable
-          v-bind.sync="second3"
+          v-bind.sync="unloadPoint"
           @radio-change="currentRadioChange4"
         ></dilTable>
       </div>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="line"
+          @radio-change="currentRadioChange5"
+        ></dilTable>
+      </div>
     </el-drawer>
-    <div class="box-form">
-      <dil-form :formId="300" v-model="form"></dil-form>
-    </div>
-    <div class="button-box">
-      <el-button type="primary" @click="makeSure">确认新增</el-button>
-      <el-button type="primary" @click="cancel">返回</el-button>
+    <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 } from "@/utils/sharedJsFile";
+import { sjTime, isNumber, isIntegerNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
-      purchaseOrder: null,
-      foreignShipName: null,
-      materialName: null,
-      shipperName: null,
-      supplierName: null,
+      disabled:false,
+      //船名
+      remark: null,
+      //车辆表格数据
+      selectionList: [],
+      stateCarrier:null,
+
+      // 表单
+      form1: {},
+      //采购订单id
+      purchaseOrderId: "",
+      //物资名称
+      materialName: "",
+      //发货单位名称
+      supplierName: "",
+      //发货单位id
+      supplierId: null,
+      carrierId:null,
+      //物资id
+      materialId: null,
+      //是否需要打开模态窗口
+      drawer: false,
+      //卸货点id
+      unloadPointId: "",
+      //卸货点名称
+      unloadPointName: "",
       a: 1,
       direction: "rtl",
       input: "",
-      truckPoint: null,
-      truckPoint1: null,
-      drawer: false,
-      form: {},
-      second: {
-        requestUrl: "/api/v1/ams/getPurchaseIdByBatch?apiId=252",
+      frist: {
+        requestUrl: "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050",
         selectionType: "radio",
-        mapList1: []
+        mapList1: [],
       },
-      second1: {
-        requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
+      secend: {
+        requestUrl:
+          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=",
         selectionType: "radio",
-        mapList2: []
+        mapList2: [],
       },
-      second2: {
-        requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
-        selectionType: "radio",
-        mapList3: []
+      third: {
+        requestUrl: "",
+        selectionType: "select",
+        mapList3: [],
       },
-      second3: {
-        requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
+      unloadPoint: {
+        requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
         selectionType: "radio",
-        mapList4: []
-      }
+      },
     };
+  },
+  watch: {
+    drawer(val) {
+      if (!val) {
+        this.input = null;
+      }
+    },
+  },
+  created() {
+   
   },
   methods: {
+    onClick(index) {
+      this.selectionList.splice(index, 1);
+    },
+    onBlur() {
+      this.getPurchaseOrderNo();
+    },
+    getPurchaseOrderNo() {
+      let map = {
+        materialId: this.materialId,
+        supplierId: this.supplierId,
+      };
+      if (this.remark) {
+        map.remark = this.remark;
+      }
+      console.log(this.map);
+      if (this.materialId && this.supplierId) {
+        this.axios.post("/api/v1/oms/selectNewOrderId", map).then((res) => {
+          console.log(res);
+          if (res.data.code == "200") {
+            if (res.data.data == null) {
+              this.$message({
+                message: "没有匹配的采购订单号!",
+                type: "warning",
+              });
+              this.form1 = [];
+            } else {
+              console.log();
+              this.remark = res.data.data.remark;
+              this.purchaseOrderId = res.data.data.purchaseOrderId;
+              this.form1 = { purchaseOrderNo: res.data.data.purchaseOrderNo };
+              if (res.data.data.receiveUnitId == 1) {
+                this.orderType = 6;
+              } else {
+                this.orderType = 7;
+              }
+            }
+          } else {
+            this.$message.error("请求失败");
+          }
+        });
+      }
+    },
+    onclick(a) {
+      if (a == 1) {
+        this.frist.requestUrl =
+          "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
+          this.input;
+      } else if (a == 2) {
+        this.secend.requestUrl =
+          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
+          this.materialId +
+          "&index=" +
+          this.input;
+      } else if (a == 4) {
+        this.unloadPoint.requestUrl =
+          "/api/v1/uc/getUnloadingMesByLike?apiId=347&index=" + this.input;
+      }
+    },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
+      if (num == 2) {
+        this.secend.requestUrl =
+          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
+          this.materialId;
+      }
     },
-    handleClose(done) {
-      done();
+     //承运商弹出层
+    handleSelectCarrier(item){    
+      this.carrierId = item.carrierId
+      item.carrierName = this.stateCarrier
     },
-    onclick(a) {
-      if (a == 1) {
-        console.log(a);
-        this.second.requestUrl =
-          "/api/v1/ams/getPurchaseIdByBatch?apiId=252&con=" + this.input;
-      } else {
-        if (this.input == "") {
-          this.second1.requestUrl = "/api/v1/ams/getWareHouse?apiId=251";
-        } else {
-          this.second1.requestUrl =
-            "/api/v1/ams/getWareHouse?apiId=251&con=" + this.input;
+    //以下是承运商边输边查搜索
+    querySearchCarrier(queryString, cb) {
+        this.axios.post('/api/v1/uc/getCarrierMesByLike?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.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+    //以上是承运商边输边查搜索
+    // 返回
+    onClickCancel() {
+      this.$router.push("/purInwardRequirement");
     },
     currentRadioChange1(selection) {
-      this.mapList1 = selection;
-      this.purchaseOrder = this.mapList1.purchaseOrderNo;
-      this.foreignShipName = this.mapList1.resultForeignShipName;
-      this.supplierName = this.mapList1.supplierName;
-      this.shipperName = this.mapList1.shipperName;
-      this.materialName = this.mapList1.materialName;
+      this.materialName = selection.materialName;
+      this.materialId = selection.materialId;
+      this.getPurchaseOrderNo();
     },
     currentRadioChange2(selection) {
-      this.mapList2 = selection;
-      console.log(this.mapList2);
-      if (this.mapList2.companyBranchName == null) {
-        this.mapList2.companyBranchName = "";
-      }
-      if (this.mapList2.branchFactory == null) {
-        this.mapList2.branchFactory = "";
-      }
-      if (this.mapList2.wareHouseName == null) {
-        this.mapList2.wareHouseName = "";
-      }
-      this.truckPoint =
-        this.mapList2.companyBranchName +
-        this.mapList2.branchFactory +
-        this.mapList2.wareHouseName;
+      this.supplierName = selection.supplierName;
+      this.supplierId = selection.supplierId;
+      this.getPurchaseOrderNo();
+    },
+    currentRadioChange4(selection) {
+      this.unloadPointId = selection.warehouseId;
+      this.unloadPointName = selection.warehouseName;
     },
     currentRadioChange3(selection) {
-      this.mapList3 = selection;
-      console.log(selection);
-      if (this.mapList3.companyBranchName == null) {
-        this.mapList3.companyBranchName = "";
-      }
-      if (this.mapList3.branchFactory == null) {
-        this.mapList3.branchFactory = "";
-      }
-      if (this.mapList3.wareHouseName == null) {
-        this.mapList3.wareHouseName = "";
-      }
-      this.truckPoint1 =
-        this.mapList3.companyBranchName +
-        this.mapList3.branchFactory +
-        this.mapList3.wareHouseName;
+      this.selectionList = [];
+      this.selectionList = selection;
     },
-    // 新增
-    makeSure() {
-      if (this.purchaseOrder == null) {
-        this.$alert("没有选择采购订单,请点击浏览选择采购订单!");
-        return;
-      } else if (this.truckPoint == null) {
-        this.$alert("没有选择装车点,请点击浏览选择装车点!");
-        return;
-      } else if (this.truckPoint1 == null) {
-        this.$alert("没有选择卸货点,请点击浏览选择卸货点!");
-        return;
-      } else if (typeof this.form.materialWeight == "undefined") {
-        this.$alert("没有输入物资重量,请输入!");
-        return;
-      } else if (typeof this.form.requirementType == "undefined") {
-        this.$alert("没有选择需求类型,请选择!");
-        return;
-      } else if (typeof this.form.requirementTruckTime == "undefined") {
-        this.$alert("没有选择用车时间,请选择!");
-        return;
-      } else if (typeof this.form.requirementShipperId == "undefined") {
-        this.$alert("没有选择用车单位,请选择!");
-        return;
-      } else if (typeof this.form.requirementWorkType == "undefined") {
-        this.$alert("没有选择费用类别,请选择!");
-        return;
-      } else if (typeof this.form.requirementEstimatedDuration == "undefined") {
-        this.$alert("没有输入预计作业时长,请输入!");
-        return;
+    // 确认
+    onClickConfirm() {
+      this.disabled = true
+      var state = 0;
+      if (
+        this.materialId &&
+        this.supplierId &&
+        this.purchaseOrderId &&
+        this.unloadPointId
+      ) {
+        state = 1;
+      } else {
+        if (!this.materialId) {
+          this.$message({
+            message: "请选择物资!",
+            type: "warning",
+          });
+          this.disabled = false
+        } else if (!this.supplierId) {
+          this.$message({
+            message: "请选择发货单位!",
+            type: "warning",
+          });
+          this.disabled = false
+        } else if (!this.purchaseOrderId) {
+          this.$message({
+            message: "没有匹配的采购订单号!",
+            type: "warning",
+          });
+          this.disabled = false
+        } else if (!this.unloadPointId) {
+          this.$message({
+            message: "请选择卸货地点!",
+            type: "warning",
+          });
+          this.disabled = false
+        }
       }
-      let requiremnet = {
-        purchaseOrderId: this.mapList1.purchaseOrderId,
-        requiremntUnitId: this.mapList2.wareHouseId,
-        materialWeight: this.form.materialWeight,
-        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.mapList3.wareHouseId
-      };
-      this.axios
-        .post("/api/v1/ams/addTruckRequirement", requiremnet)
-        .then(res => {
-          if (res.data.code == 200) {
+      if (state == 1) {
+        let map = {
+          materialId: this.materialId,
+          purchaseOrderId: this.purchaseOrderId,
+          unloadPointId: this.unloadPointId,
+          carrierId:this.carrierId,
+          userId:getCookie("orgCode")
+        };
+        console.log(map, map);
+        this.axios.post("/api/v1/ams/addPurInwardRequirement", map).then((res) => {
+          if (res.data.code == "200") {
             this.$message({
+              message: "添加成功!",
               type: "success",
-              message: "新增成功!"
             });
-            this.$router.go(-1);
-          } else {
-            this.$message.error("新增失败!");
+            this.disabled = false
+            this.onClickCancel()
           }
         });
+      }
     },
-    // 返回
-    cancel() {
-      this.$router.go(-1);
-    }
-  }
+  },
 };
 </script>
-<style lang="scss" scoped>
-.addInwardRequirement{
-.form-box {
-  display: inline-block !important;
-  margin-left: 38% !important;
-  .el-input {
-    width: 288px;
+<style lang="scss" scope>
+.addPurRequirement{
+.contractDetails {
+  width: 100%;
+}
+.from {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-top: 5px;
+  margin-bottom: 20px;
+}
+.remark {
+  display: flex;
+  justify-content: center;
+  .text {
+    display: inline-block;
+    width: 100px;
+    text-align: right;
   }
-  .el-form {
-    padding: 10px;
+  .input {
+    width: 250px;
+    margin-right: 20px;
   }
-  .tx{
-    margin-left: -75px;
+}
+.lineId {
+  display: flex;
+  justify-content: center;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
+  }
+  .input {
+    width: 250px;
+    margin-right: 20px;
   }
 }
-.box-form {
-  display: flex ;
-  padding-left: 38%;
+.material {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
+  }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
+}
+.orderType {
+  display: flex;
+  justify-content: center;
+  .text {
+    display: inline-block;
+    width: 110px;
+    text-align: right;
+  }
+  .select {
+    width: 250px;
+  }
+  .span {
+    display: inline-block;
+    width: 30px;
+    height: 10px;
+  }
+}
+.contractTitle {
+  display: flex;
+  justify-content: center;
   .el-form-item {
-    display: flex !important;
-    padding: 10px;
+    display: flex;
+    justify-content: center;
     .el-form-item__label {
-      width: 80px !important;
+      display: flex;
+      align-items: center;
     }
     .el-input {
-      width: 288px;
+      width: 250px;
     }
   }
 }
-.button-box {
-  margin-left: 25px !important;
+.forwardingUnit {
+  display: flex;
+  justify-content: center;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
+  }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
 }
+.truckList1 {
+  width: 100%;
+  .truckList {
+    width: 96%;
+    .text {
+      display: inline-block;
+      width: 120px;
+      text-align: right;
+    }
+    .truckBtn {
+      width: 250px;
+    }
+  }
 }
-</style>
+.button_box {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 100%;
+  height: 100px;
+}
+}
+
+</style>

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

@@ -0,0 +1,225 @@
+// 采购内转需求
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="toInsert"
+        v-if="activeName == 'first'"
+      >
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="Issue"
+        v-if="activeName == 'first'"
+      >
+        <i class="el-icon-download"></i>下发
+      </el-button>
+    </div>
+    <template>
+      <div>
+        <el-tabs v-model="activeName">
+          <el-tab-pane label="未下发" name="first">
+            <dilTable v-bind.sync="first" @selection-change="selectionChange">
+              <el-table-column fixed="right" label="操作" width="100">
+                <template slot-scope="scope">
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="deleteRequirement(scope)"
+                  >
+                    删除
+                  </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="100">
+                <template slot-scope="scope">
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="stopRequirement(scope)"
+                  >
+                    停用
+                  </el-button>
+                </template>
+              </el-table-column>
+            </dilTable>
+          </el-tab-pane>
+        </el-tabs>
+      </div>
+    </template>
+  </div>
+</template>
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      inputText: "",
+      first: {
+        // first请求数据的地址
+        requestUrl:
+          "",
+        selectionType: "select",
+        mapList: [],
+      },
+      second: {
+        // second请求数据的地址
+        requestUrl:
+          "",
+      },
+      activeName: "first",
+    };
+  },
+  created(){
+    if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"){
+        this.first.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0" 
+        this.second.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1"
+    }else{
+         this.first.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0&userId=" + getCookie("orgCode")
+         this.second.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&userId=" + getCookie("orgCode")
+    }
+  },
+  methods: {
+    getRequestUrl(){
+      if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"){
+        this.first.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0" + "&t=" + new Date()
+        this.second.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1"  + "&t=" + new Date()
+    }else{
+         this.first.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0&userId=" + getCookie("orgCode") + "&t=" + new Date()
+         this.second.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&userId=" + getCookie("orgCode") + "&t=" + new Date()
+    }
+    },
+    selectionChange(selection) {
+      this.first.mapList = selection;
+    },
+    toInsert() {
+      this.$router.push("/addRequirement");
+    },
+    deleteRequirement(scope) {
+      console.log(scope.row.requirementId)
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios
+            .post(
+              "/api/v1/ams/deleteTruckRequirement/" + scope.row.requirementId
+            )
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });
+                this.getRequestUrl()
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!",
+          });
+        });
+    },
+    stopRequirement(scope){
+
+      this.$confirm("是否停用", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios
+            .post("/api/v1/ams/changePlanStatus/" + scope.row.planId)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "停用成功!",
+                });
+              this.getRequestUrl()
+              } else {
+                this.$message({
+                  message: "停用失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消下发!",
+          });
+        });
+    },
+    Issue() {
+      this.$confirm("是否下发", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios
+            .post("/api/v1/ams/downRequirement", this.first.mapList)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "下发成功!",
+                });
+              this.getRequestUrl()
+              this.activeName = 'second'
+              } else {
+                this.$message({
+                  message: "下发失败",
+                  type: "warning",
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消下发!",
+          });
+        });
+    },
+  },
+};
+</script>
+<style lang="scss">
+.steel_inbound{
+  .sache{
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+  }
+</style>

+ 1 - 2
src/views/inward/components/truckAppoint/requirement.vue

@@ -13,8 +13,7 @@
         @click="toInsert"
         v-if="activeName == 'first'"
       >
-        <i class="el-icon-plus"></i>新增采购内转需求
-      </el-button>
+        <i class="el-icon-plus"></i>新增</el-button>
       <!-- <el-button
         type="primary"
         class="btn"

+ 368 - 0
src/views/inward/components/truckOrder/addPurInwardOrder.vue

@@ -0,0 +1,368 @@
+//新增运输派单
+//新增运输订单
+<template>
+  <div class="addSaleOrderSend">
+    <page-title>新增运输订单派车</page-title>
+    <!-- 零星订单表的数据 -->
+    <div class="saleOrder">
+      <dilTable
+        v-bind.sync="option"
+        @radio-change="currentRadioChange"
+      ></dilTable>
+    </div>
+    <!-- 表单选择车辆-->
+    <div class="from">
+       <div class="line">
+        <span class="text">线路</span>
+        <el-input
+          v-model="lineName"
+          placeholder="请选择线路"
+          disabled
+        ></el-input>
+        <el-button type="primary" @click="onClick(1)">浏览</el-button>
+      </div>
+      <div class="vehicle">
+        <span class="text">车辆</span>
+        <el-button type="primary" @click="onClick(2)">浏览</el-button>
+        <span class="span"></span>
+      </div>
+    </div>
+    <!-- 派车表格 -->
+    <div class="selectionTable from">
+      <el-table
+        :data="selectionList"
+        border
+        style="width: 100%"
+        highlight-current-row
+      >
+        <el-table-column type="index" label="序号" width="50">
+        </el-table-column>
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          :width="item.width"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <!-- 操作列 -->
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button
+              @click="deleteRow(scope.$index)"
+              type="text"
+              icon="el-icon-close"
+              size="big"
+            ></el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <el-drawer 
+      :visible.sync="lineDrawer" 
+      :with-header="false"
+      :destroy-on-close="true"
+      direction="rtl"
+      size="40%"
+      :show-close="true"
+      :wrapperClosable="false"
+      close-on-press-escape
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="lineText"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="selectClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="AddTruckClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-check"></i>确定
+      </el-button>
+      <div class="tablecls">
+        <!-- 查询所有的车辆 -->
+        <dilTable
+          v-bind.sync="line"
+          @radio-change="currentRadioChange2"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 车辆模态框 -->
+    <el-drawer 
+      :visible.sync="truckDrawer" 
+      :with-header="false"
+      :destroy-on-close="true"
+      direction="rtl"
+      size="40%"
+      :show-close="true"
+      :wrapperClosable="false"
+      close-on-press-escape
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="truckText"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="selectTruckClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="AddTruckClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-check"></i>确定
+      </el-button>
+      <div class="tablecls">
+        <!-- 查询所有的车辆 -->
+        <dilTable
+          v-bind.sync="truck"
+          @selection-change="currentRadioChange1"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <div class="button_box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :disabled = "disabled" >确定</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      planId : null ,
+      disabled:false,
+      //线路名称
+      lineId:null,
+      lineName:null,
+      lineText:null,
+      materialId:null,
+      lineDrawer:false,
+      //线路的表格
+      line: {
+        requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
+        selectionType: "radio",
+      },
+      //已经选择车辆物资信息
+      selectionList:[],
+      //销售订单物资信息
+      option: {
+        // 表格请求数据的地址
+        requestUrl:"",
+        // 控制显示当选列
+        selectionType: "radio",
+        isPagination: false,
+      },
+      //是否打开选择车辆的模态框
+      truckDrawer:false,
+      //车辆的表格
+      truck: {
+        requestUrl: "",
+        selectionType: "select",
+      },
+      tableTop: [
+        {
+          prop: "capacityNumber",
+          label: "车牌号",
+        }
+      ],
+      truckText:null,
+      //当前多选选中的车辆
+      selectTruck:[],
+    };
+  },
+  created() {
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId");
+        this.option.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2&carrierSsoId=" + getCookie("userId");
+    } else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
+        this.option.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2";
+    } 
+  },
+  methods: {
+    //点击确定按钮的事件
+    makeSure(){
+        console.log(this.planId,this.lineId);
+       console.log(this.selectionList)
+        this.disabled = true
+        if(this.planId == null){
+          this.$message.error("未勾选计划")
+          this.disabled = false
+          return 
+        }else if(this.lineId == null){
+          this.$message.error("未选择路线") 
+          this.disabled = false
+          return
+        }
+        else if(this.selectionList.length == 0){
+          this.$message.error("未选择车辆")
+          this.disabled = false
+          return
+        }
+        this.axios.post('/api/v1/oms/addPurInwardOrder',{
+          materialId:this.materialId,
+          lineId:this.lineId,
+          orderType:10,
+          orderId:this.orderId,
+          planId:this.planId,
+          mapList:this.selectionList,
+        }).then((res)=>{
+          if(res.data.code == '200'){
+            this.$message.success('派车成功')
+            this.disabled = false
+            this.cancel();
+          }
+        })
+    },
+    //点击取消按钮的事件
+    cancel(){
+      this.$router.push('/purInwardTruckOrder')
+    },
+    //点击删除按钮删除当前点击的对象
+    deleteRow(index){
+      this.selectionList.splice(index,1)
+    },
+    //车辆模态框的确定事件
+    AddTruckClick(){
+        if(this.a==2){
+            this.selectTruck.forEach(e => {
+        this.selectionList.push({
+          capacityId:e.capacityId,
+          capacityNumber:e.capacityNumber,
+        })
+      });
+      this.truckDrawer = false;
+        }else{
+            this.lineDrawer = false
+        }
+      
+    },
+    //车辆模态框框计算
+    selectTruckClick(){
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+          getCookie("userId") + "&index="+this.truckText;
+      } else {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index="+this.truckText;
+      }
+    },
+    //车辆表格
+    currentRadioChange1(select){
+      this.selectTruck = [];
+      this.selectTruck = select;
+    },
+    currentRadioChange2(selection){
+        this.lineId = selection.lineId
+        if(selection.lineName == null &&selection.lineDesk == null){
+          this.lineName = ''
+        }else{
+          this.lineName = selection.lineName+'  '+selection.lineDesk 
+          this.lineId = selection.lineId;
+      }  
+    },
+    //主界面表格单选
+    currentRadioChange(row) {
+      console.log(row)
+      this.planId = row.planId
+      this.materialId = row.materialId
+    },
+    onClick(num) {
+      this.a = num
+      if(num == 2){
+      if(getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId");
+    } else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
+    } 
+        this.truckDrawer = true
+        }else{
+            this.lineDrawer = true
+        }
+    },
+    //线路表格的框计算
+    selectClick(){
+      this.line.requestUrl = '/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con='+this.lineText;
+    },
+  },
+};
+</script>
+
+<style lang='scss'>
+.addSaleOrderSend {
+  .from {
+    margin-top: 20px;
+    .line {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+    }
+    .vehicle {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin-top: 20px;
+      .el-button {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+      .span {
+        width: 70px;
+      }
+    }
+  }
+  .tablecls{
+    margin-top: 20px;
+  }
+  .button_box{
+    display: flex;
+    justify-content: center;
+    margin: 20px;
+    .el-button{
+      width: 100px;
+      margin-left: 20px;
+    }
+  }
+}
+</style>

+ 300 - 0
src/views/inward/components/truckOrder/purInwardTruckOrder.vue

@@ -0,0 +1,300 @@
+//运输派单
+<template>
+  <div class="transportOrder">
+    <div class="transportOrder_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="Insert" v-if="activeName == 'first'">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
+    <dilTable
+          v-bind.sync="truck"
+          @radio-change="currentRadioChange1"
+        ></dilTable>
+    <span slot="footer" class="dialog-footer">
+    <el-button @click="dialogTableVisible = false">取 消</el-button>
+    <el-button type="primary" @click="updateTruckCapacity()">确 定</el-button>
+    </span>
+    </el-dialog>
+    <div class="transportOrder_bottom">
+      <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="100"
+          >
+            <template slot-scope="scope">
+               <el-button @click="updateClick(scope)" type="text" size="small">
+                修改
+              </el-button>
+             <el-button @click="deleteClick(scope)" type="text" size="small">
+                删除
+              </el-button>
+            </template>
+          </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+        <!-- 已接收 -->
+        <el-tab-pane label="已接收" name="Received">
+          <dilTable v-bind.sync="Received">
+            <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-button @click="deleteClick(scope)" type="text" size="small">
+                关闭
+              </el-button>
+            </template>
+          </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>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      //模态窗的框计算
+      inputText: null,
+      //是否弹出对话框
+      dialogTableVisible: false,
+      //输入框的值
+      input: null,
+      //选项卡的当前选中的值
+      activeName: "first",
+      //已下发的表格
+      first: {
+        requestUrl:"",
+      },
+      //车辆信息的表格
+      truck: {
+        requestUrl: "" ,
+        // 控制显示当选列
+        selectionType: "radio",
+      },
+      Received:{
+        requestUrl: "",
+      },
+      completed:{
+        requestUrl: "",
+      },
+       //车辆的表格
+      truck: {
+        requestUrl: "",
+        selectionType: "radio",
+      },
+      //当前选中的订单id
+      selectOrderId: null,
+      //选中的车辆号
+      capacityNumber: "",
+      //选中的运力id
+      capacityId: null,
+      //是否关闭模态框
+      drawer: false,
+      //模态框从左往右打开
+      direction: "rtl",
+
+      orderId:null,
+      //多选的选中的订单id
+      selectionList: [],
+      //区别点击的是添加运力,还是修改
+      index: null,
+    };
+  },
+  created(){
+      if (getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId");
+      } else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
+      }
+      if(getCookie('orgCode') == "chengyunshang"){
+        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1&carrierId=" + getCookie("userId"),
+        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5&carrierId=" + getCookie("userId")
+        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2&carrierId=" + getCookie("userId")
+      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1"
+        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5"
+        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
+      }else{
+        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1"
+        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5"
+        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
+      }
+  },
+  methods: {
+    handleClose(done){
+      done()
+      this.$message.info("取消修改运力")
+    },
+    getRequestUrl(){
+        if(getCookie('orgCode') == "chengyunshang"){
+        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1&carrierId=" + this.carrierUserId + "&test=" + new Date() ,
+        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5&planEnableStatus=1&carrierId=" + this.carrierUserId + "&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2&carrierId=" + getCookie("userId")
+      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1" + "&test=" + new Date()
+        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5" + "&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
+      }else{
+        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1" + "&test=" + new Date()
+        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5" + "&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
+      }
+    },
+    getTruckRequestUrl(){
+        if (getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId") + "&test=" + new Date();
+      } else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+      }
+    },
+    currentRadioChange1(row){
+      console.log(row)
+      this.capacityId = row.capacityId
+    },
+     //删除运输订单
+    deleteClick(scope){
+      this.$confirm('是否删除?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        }).then(() => {
+            this.axios
+            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });     
+                this.getRequestUrl()
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning",
+                });
+              }
+            });
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });          
+        });
+    },
+    //修改运输订单
+    updateClick(scope){
+      this.getTruckRequestUrl()
+      this.orderId = scope.row.orderId
+      this.dialogTableVisible = true
+      console.log(scope.row.orderId)
+    },
+    updateTruckCapacity(){
+        if(this.capacityId == null){
+            this.$message.error("未选中运力")
+            return
+        }
+        this.axios.post("/api/v1/oms/updateCapacityId",{
+          capacityId:this.capacityId,
+          orderId :this.orderId
+        }).then((res) =>{
+          if(res.data.code == "200"){
+            this.$message.success("修改运力成功")
+            this.getRequestUrl()
+            this.dialogTableVisible = false
+          }else{
+            this.$message.error("修改运力失败")
+          }
+        })
+    },
+    handleClick(tab, event) {
+      this.getRequestUrl()
+    },
+    // 查看物资详情
+    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;
+      this.materialDetails(row.orderId);
+    },
+    //查看当前订单的物资信息
+    materialDetails(orderId) {
+      this.axios
+        .post("/api/v1/uc/getOrderMaterialMesByOrderId/" + orderId)
+        .then((res) => {
+          if (res.data.code == "200") {
+            this.tableData = res.data.data;
+          }
+        });
+    },
+    Insert(){
+      this.$router.push("addPurInwardOrder")
+    }
+  },
+};
+</script>
+
+<style lang="scss">
+
+.transportOrder {
+  .transportOrder_top {
+    width: 100%;
+    height: 100px;
+    display: flex;
+    align-items: center;
+    padding-left: 50px;
+    .el-input{
+  width: 20%;
+}
+  }
+  .drawer_top {
+    width: 100%;
+    height: 50px;
+    padding-left: 20px;
+    display: flex;
+    align-items: center;
+  }
+}
+</style>

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

@@ -8,8 +8,15 @@ import main from '@/components/main.vue'
 // 系统配置管理
 //运输预约--提出需求
 import requirement from '@/views/inward/components/truckAppoint/requirement.vue'
+//运输预约--提出采购内转需求
+import purInwardRequirement from '@/views/inward/components/truckAppoint/purInwardRequirement.vue'
 //运输预约--制定计划
 import truckAppointPlan from '@/views/inward/components/truckAppoint/plan.vue'
+//运输订单--新增采购内转派单
+import addPurInwardOrder from '@/views/inward/components/truckOrder/addPurInwardOrder.vue'
+//运输订单--采购内转派单
+import purInwardTruckOrder from '@/views/inward/components/truckOrder/purInwardTruckOrder.vue'
+
 //运输预约--制定内转钢材到异地库计划
 import RailPlan from '@/views/inward/components/truckAppoint/RailPlan.vue'
 //运输订单--分解计划
@@ -156,7 +163,11 @@ const constantRouterMap = [{
   },
   children: [
     {path: 'requirement',name: 'requirement',meta: {code: 'xtpzgl-yhgl'},component: requirement}, 
-    {path: 'truckAppointPlan',name: 'truckAppointPlan',meta: {code: 'xtpzgl-yhgl'},component: truckAppointPlan}, 
+    {path: 'purInwardRequirement',name: 'purInwardRequirement',meta: {code: 'xtpzgl-yhgl'},component: purInwardRequirement}, 
+    {path: 'truckAppointPlan',name: 'truckAppointPlan',meta: {code: 'xtpzgl-yhgl'},component: truckAppointPlan},
+    {path: 'purInwardTruckOrder',name: 'purInwardTruckOrder',meta: {code: 'xtpzgl-yhgl'},component: purInwardTruckOrder},
+    {path: 'addPurInwardOrder',name: 'addPurInwardOrder',meta: {code: 'xtpzgl-yhgl'},component: addPurInwardOrder},
+    {path: 'truckAppointPlan',name: 'truckAppointPlan',meta: {code: 'xtpzgl-yhgl'},component: truckAppointPlan},
     {path: 'RailPlan',name: 'RailPlan',meta: {code: 'xtpzgl-yhgl'},component: RailPlan}, 
     {path: 'truckOrderPlan',name: 'truckOrderPlan',meta: {code: 'xtpzgl-yhgl'},component: truckOrderPlan}, 
     {path: 'truckOrderRailPlan',name: 'truckOrderRailPlan',meta: {code: 'xtpzgl-yhgl'},component: truckOrderRailPlan}, 

+ 46 - 15
src/views/statisticalReport/components/sporadicReport/sporadicReportEnterFactory.vue

@@ -46,7 +46,14 @@ export default {
       this.option.requestUrl =
         "/api/v1/tms/getSporadicSuppliesReport1?apiId=425&orderType=12&startTime=null&endTime=null&i=" +
         new Date();
-    } else {
+    }else if(getCookie("orgCode") == "baohua" || getCookie("orgCode") == "xiaoshougongsi"){
+            this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=" +
+        getCookie("orgCode") +
+        "&startTime=null&endTime=null&i=" +
+        new Date();
+    }
+    else {
       this.option.requestUrl =
         "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=" +
         getCookie("userId") +
@@ -55,6 +62,33 @@ export default {
     }
   },
   methods: {
+    getRequestUrl(){
+        if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu"
+    ) {
+      this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=null&endTime=null&i=" +
+        new Date();
+    } else if (getCookie("orgCode") == "wuliuchuyunzhongxin") {
+      this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport1?apiId=425&orderType=12&startTime=null&endTime=null&i=" +
+        new Date();
+    }else if(getCookie("orgCode") == "baohua" || getCookie("orgCode") == "xiaoshougongsi"){
+            this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=" +
+        getCookie("orgCode") +
+        "&startTime=null&endTime=null&i=" +
+        new Date();
+    }
+    else {
+      this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=" +
+        getCookie("userId") +
+        "&startTime=null&endTime=null&i=" +
+        new Date();
+    }
+    },
     onclick() {
       let startTime = null;
       let endTime = null;
@@ -66,26 +100,23 @@ export default {
       }
       if (startTime && endTime) {
         if (startTime < endTime) {
-          this.option.requestUrl =
-            "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=" +
-            startTime +
-            "&endTime=" +
-            endTime +
-            "&i=" +
-            new Date();
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          }else if(getCookie("orgCode") == "baohua" || getCookie("orgCode") == "xiaoshougongsi"){
+          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=' + getCookie("orgCode")+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          }
+          else{
+          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=' + getCookie("userId")+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          }
         } else {
           this.startTime = null;
           this.endTime = null;
           this.$message.warning("开始时间要比结束时间早");
         }
       } else {
-        this.option.requestUrl =
-          "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=" +
-          startTime +
-          "&endTime=" +
-          endTime +
-          "&i=" +
-          new Date();
+        this.getRequestUrl()
       }
     },
   },

+ 27 - 2
src/views/statisticalReport/components/sporadicReport/sporadicReportExFactory.vue

@@ -45,11 +45,26 @@ export default {
           this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=null&endTime=null&i=' +new Date();
       }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
           this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&orderType=13&startTime=null&endTime=null&i=" +new Date();
-      }else{
+      }else if(getCookie("orgCode") == "baohua" || getCookie("orgCode") == "xiaoshougongsi"){
+          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=' + getCookie("orgCode")+"&startTime=null&endTime=null&i=" +new Date();
+      }
+      else{
           this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=' + getCookie("userId")+"&startTime=null&endTime=null&i=" +new Date();
       }
   },
   methods: {
+    getRequestUrl(){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=null&endTime=null&i=' +new Date();
+      }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&orderType=13&startTime=null&endTime=null&i=" +new Date();
+      }else if(getCookie("orgCode") == "baohua" || getCookie("orgCode") == "xiaoshougongsi"){
+          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=' + getCookie("orgCode")+"&startTime=null&endTime=null&i=" +new Date();
+      }
+      else{
+          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=' + getCookie("userId")+"&startTime=null&endTime=null&i=" +new Date();
+      }
+    },
     onclick() {
       let startTime = null;
       let endTime = null;
@@ -61,14 +76,24 @@ export default {
       }
       if(startTime && endTime){
         if(startTime < endTime){
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
           this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          }else if(getCookie("orgCode") == "baohua" || getCookie("orgCode") == "xiaoshougongsi"){
+          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=' + getCookie("orgCode")+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          }
+          else{
+          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=' + getCookie("userId")+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          }
         }else{
           this.startTime = null;
           this.endTime = null;
           this.$message.warning('开始时间要比结束时间早')
         }
       }else{
-        this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+        console.log(startTime && endTime)
+        this.getRequestUrl()
       }
     },
   },