txf 3 lat temu
rodzic
commit
7c07a146e5

+ 5 - 0
build/utils.js

@@ -16,8 +16,13 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 
+<<<<<<< HEAD
 //  let devModules = ['all']
 let devModules = ['index','TMS']
+=======
+ let devModules = ['all']
+// let devModules = ['index','inward','statisticalReport']
+>>>>>>> 4e7aba9da88d4e043601bc5efcf05d8298469d32
 //  let devModules = ['index','WMS','sale','TMS','inward','SporadicManage']
 // let devModules = ['index','SporadicManage','TMS','statisticalReport','RMS'];
 // let devModules = ['index','RMS'];

+ 2 - 2
config/index.js

@@ -65,8 +65,8 @@ let proxyTable = {
   // 所有数据的请求域名地址
   "/api/v1": {
     target: "http://172.16.33.166:8080",
-    // target: "http://localhost:8019",
-    // target: "http://localhost:8082",
+    // target: "http://localhost:8080",
+    // target: "http://192.168.1.107:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

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

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

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

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

+ 36 - 94
src/views/inward/components/truckAppoint/addPlan.vue

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

+ 7 - 2
src/views/inward/components/truckAppoint/addRequirement2.vue

@@ -254,7 +254,7 @@ export default {
       disabled:false,
       options: [],
       value: '',
-      isOpenDueTime : false,
+      isOpenDueTime : true,
       DueTime:null,
       // 件数与重量的开关
       value: false,
@@ -550,6 +550,11 @@ export default {
       }
       // console.log(this.tableData)
       var DueTime;
+      if(this.DueTime == null){
+        this.$message.warning("截止日期必填")
+        this.disabled = false
+        return
+      }
       if(this.DueTime==null){
         DueTime = null;
       }else{
@@ -568,7 +573,7 @@ export default {
         DueTime:DueTime,
         mapList:this.tableData,
         orgCode:getCookie("orgCode"),
-        remark:this.form.Tel
+        remark:this.form.Tel + this.form.capacityType
       };
       console.log("requirement",requiremnet);
       this.axios

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

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

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

@@ -222,8 +222,7 @@ export default {
       this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1",
       this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=257&planStatus=0",
       this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1",
-      this.fourth.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4"
-      
+      this.fourth.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4"  
   },
   mounted(){
     this.getAddPlan()

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

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

+ 18 - 22
src/views/inward/components/truckOrder/decomposePlan.vue

@@ -127,7 +127,6 @@ export default {
       shiyHeigth:140,
       isHeigth:true,
       isKuang:false,
-      lineId:null,
       requirementId:null,
       capacityNumber:null,
       userCarrierId:null,
@@ -143,7 +142,7 @@ export default {
       carrierId:null,
       form: {},
       first:{
-       requestUrl: "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&planId="+this.$route.params.planId,
+       requestUrl: "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=100&planId="+this.$route.params.planId,
       },
       second:{
         requestUrl:"/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null,
@@ -186,6 +185,7 @@ export default {
         },
       ],
       tableData1: [],
+      newsArr:[]
     };
   },
   created(){
@@ -195,10 +195,10 @@ export default {
         getCookie("userId");
     } else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
       this.second.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&con="+"物流储运中心";
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con="+"物流储运中心";
     }else {
       this.second.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null
     }
   },
   mounted(){
@@ -208,14 +208,14 @@ export default {
     getInwardRequestUrl(){
       if (getCookie("orgCode") == "chengyunshang") {
       this.second.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId") + "&i=" + new Date();
     } else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
       this.second.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&con="+"物流储运中心" + "&i=" + new Date();
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con="+"物流储运中心" + "&i=" + new Date();
     }else {
       this.second.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&i=" + new Date();
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&i=" + new Date();
     }
     },
     getRequirementMaterial(row) {
@@ -257,14 +257,12 @@ export default {
     onConfirm(){
       console.log(this.mapList1)
       this.drawer = false
-      this.mapList1.forEach((e) => {
+      this.newsArr.forEach((e) => {
           console.log((e.capacityNumber))
           this.capacityNumber = e.capacityNumber
           this.insertEvent()
       })
-    },
-    drawerLine(){
-      this.linedrawer = true
+      this.newsArr = []
     },
     onclick(){
       if(this.truckText != null){
@@ -274,14 +272,12 @@ export default {
       }     
     },
     currentRadioChange(selection){
-      this.mapList1=selection,
-      console.log(this.mapList1)
-    },
-    currentRadioChange1(selection){
-      this.mapList0=selection
-      this.lineName = this.mapList0.lineName
-      this.lineId = this.mapList0.lineId
-      console.log(this.mapList0.lineId)
+      this.mapList1=selection
+      for (let i = 0; i < selection.length; i++) {
+        if(this.newsArr.indexOf(selection[i]) === -1){
+        this.newsArr.push(selection[i]);
+        }
+        }
     },
    handleClose(done){
       done();
@@ -297,7 +293,7 @@ export default {
       //查看需求详情
       this.axios
         .post(
-          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&planId=" + this.$route.params.planId
+          "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=200&planId=" + this.$route.params.planId
         )
         .then((res) => {
             console.log(res.data.data)
@@ -349,12 +345,12 @@ export default {
         .post("/api/v1/oms/addInwardOrder", BmsTrainFreight)
         .then((res) => {
           if (res.data.code == 200) {
-            this.$router.go(-1);
             this.$message({
               type: "success",
               message: "分解成功!",
             });
-            
+            this.cancel()
+            this.disabled = false
           } else {
             this.$message.error("分解失败!");
             this.disabled = false

+ 9 - 103
src/views/inward/components/truckOrder/getPlanOrder.vue

@@ -37,13 +37,6 @@
             <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>
@@ -52,34 +45,14 @@
                   </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">
             <dilTable v-bind.sync="second"> </dilTable>
           </el-tab-pane>
+          <el-tab-pane label="已完成" name="third">
+            <dilTable v-bind.sync="third"> </dilTable>
+          </el-tab-pane>
         </el-tabs>
       </div>
     </template>
@@ -97,9 +70,7 @@ export default {
       dialogTableVisible: false,
       first: {
         //
-        requestUrl:
-          "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" +
-          "",
+        requestUrl:""
       },
       //车辆信息的表格
       truck: {
@@ -114,43 +85,9 @@ export default {
       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,
+      third: {
+        requestUrl: "",
+      },
     };
   },
   created() {
@@ -158,6 +95,8 @@ export default {
         "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=4" + "&planId=" + this.$route.params.planId
       this.second.requestUrl =
         "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=5" + "&planId=" + this.$route.params.planId
+      this.third.requestUrl =
+        "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=2" + "&planId=" + this.$route.params.planId
   },
   methods: {
     getRequest() {
@@ -221,39 +160,6 @@ export default {
     },
     clickTruck(){
       this.truck.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&index=" + this.truckInput
-    },
-    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);
-        });
     },
       //删除运输订单
     deleteClick(scope){

+ 2 - 125
src/views/inward/components/truckOrder/plan.vue

@@ -16,9 +16,6 @@
             <dilTable v-bind.sync="second" ref="table1">
               <el-table-column fixed="right" label="操作" width="100">
                 <template slot-scope="scope">
-                  <el-button type="text" size="mini" @click="getRequirementMaterial1(scope.row)">
-                    物资详情
-                  </el-button>
                   <el-button
                     type="text"
                     size="mini"
@@ -53,8 +50,8 @@
             <dilTable v-bind.sync="third" ref="table2">
              <el-table-column fixed="right" label="操作" width="150">
                 <template slot-scope="scope">
-                  <el-button type="text" size="mini" @click="getRequirementMaterial2(scope.row)">
-                    物资详情
+                  <el-button type="text" size="mini" @click="desponsePlan(scope)">
+                    继续分解
                   </el-button>
                   <el-button type="text" size="mini" @click="getPlanOrder(scope)">
                     运单
@@ -94,15 +91,6 @@ export default {
     return {
       inputText: "",
       carrierId:40,
-      oldRow: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
-      oldRowCount: 1,
-      oldRow1: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
-      oldRowCount1: 1,
-       oldRow2: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
-      oldRowCount2: 1,
       first: {
         // first请求数据的地址
         requestUrl:"",
@@ -118,38 +106,6 @@ export default {
           "" 
       },
       activeName: "second",
-      tableHead: [
-        {
-          prop: "materialName",
-          label: "物资名称",
-          width: 150,
-        },
-        {
-          prop:"loadName",
-          label:"装货点",
-          width:150
-        },
-        {
-          prop:"unloadName",
-          label:"卸货点",
-          width:150
-        },
-        {
-          prop:"loadSequence",
-          label:"装卸货次序",
-          width:150
-        },
-        {
-          prop: "materialWeight",
-          label: "物资重量",
-          width: 150,
-        },
-        {
-          prop: "materialCount",
-          label: "物资数量",
-          width: 150,
-        },
-      ],
       tableData: [],
     };
   },
@@ -165,85 +121,6 @@ export default {
       } 
   },
   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()

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

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

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

@@ -0,0 +1,106 @@
+<template>
+  <div class="purchasFuelNewMonitor">
+    <div class="frameCalculation">
+      <span>净重时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <span style="margin-left: 1rem;">合计净重:</span>
+      <el-input v-model="totalNumberFrist" :disabled="true" style="width: 140px;"></el-input>
+      <span style="margin-left: 1rem;">合计车数:</span>
+      <el-input v-model="totalCapacity" :disabled="true" style="width: 100px;"></el-input>
+    </div>
+    <div class="table">
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
+    </div>
+  </div>
+</template>
+
+<script>
+import { sjTime } from '@/utils/sharedJsFile';
+export default {
+  data() {
+    return {
+      totalNumberFrist:null,
+      totalCapacity:null,
+      option: {
+        requestUrl: "",
+      },
+      startTime: null,
+      endTime: null,
+      tableTitle:'达钢厂内统计报表'
+    };
+  }, 
+  created(){
+          this.option.requestUrl = '/api/v1/tms/getInwardReport?apiId=452&startTime=null&endTime=null&i=' +new Date()
+  },
+  methods: {
+    func(res){
+        console.log(res.list)
+        var resultNetWeightTotalFirst = 0
+        var currentCapacityTotal = 0
+        res.list.forEach(e => {
+          currentCapacityTotal++
+          resultNetWeightTotalFirst = resultNetWeightTotalFirst+e.resultNetWeight
+        });
+        this.totalNumberFrist = resultNetWeightTotalFirst.toFixed(2)
+        this.totalCapacity = currentCapacityTotal;
+    },
+    getRequestUrl(){
+        this.option.requestUrl = '/api/v1/tms/getInwardReport?apiId=452&startTime=null&endTime=null&i=' +new Date();
+     
+    },
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if(this.startTime){
+        startTime = sjTime(this.startTime);
+      }
+      if(this.endTime){
+        endTime = sjTime(this.endTime);
+      }
+      if(startTime && endTime){
+        if(startTime < endTime){
+          this.option.requestUrl = '/api/v1/tms/getPurInwardReport?apiId=441' + "&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        console.log(startTime && endTime)
+        this.getRequestUrl()
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss">
+.purchasFuelNewMonitor {
+  .frameCalculation {
+    width: 100%;
+    height: 100px;
+    display: flex;
+    align-items: center;
+    padding-left: 50px;
+    .el-date-editor{
+      margin: 20px;
+    }
+  }
+}
+</style>

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

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