Kaynağa Gözat

修改承运商

Tiroble 3 yıl önce
ebeveyn
işleme
497a992447
24 değiştirilmiş dosya ile 2911 ekleme ve 26 silme
  1. 4 3
      build/utils.js
  2. 3 0
      config/index.js
  3. 116 0
      src/views/SporadicManage/components/oldAreaSporadic/inwardSporadicFactory/LeaveFactory.vue
  4. 89 0
      src/views/SporadicManage/components/oldAreaSporadic/inwardSporadicFactory/Load.vue
  5. 122 0
      src/views/SporadicManage/components/oldAreaSporadic/inwardSporadicFactory/enFactory.vue
  6. 89 0
      src/views/SporadicManage/components/oldAreaSporadic/inwardSporadicFactory/grossWeight.vue
  7. 90 0
      src/views/SporadicManage/components/oldAreaSporadic/inwardSporadicFactory/tareWeight.vue
  8. 89 0
      src/views/SporadicManage/components/oldAreaSporadic/inwardSporadicFactory/unload.vue
  9. 694 0
      src/views/SporadicManage/components/oldAreaSporadic/transportAppoint/addSporadicTransportAppoint.vue
  10. 1 0
      src/views/SporadicManage/components/oldAreaSporadic/transportAppoint/editTransportAppoint.vue
  11. 455 0
      src/views/SporadicManage/components/oldAreaSporadic/transportAppoint/transportAppoint.vue
  12. 401 0
      src/views/SporadicManage/components/oldAreaSporadic/transportOrder/addTransportOrder.vue
  13. 0 0
      src/views/SporadicManage/components/oldAreaSporadic/transportOrder/editTransportOrder.vue
  14. 524 0
      src/views/SporadicManage/components/oldAreaSporadic/transportOrder/transportOrder.vue
  15. 31 0
      src/views/SporadicManage/router/index.js
  16. 1 0
      src/views/TMS/components/importedIngredients/transportReserveFuAddIngredients.vue
  17. 0 1
      src/views/appoint/components/saleContract/saleOrder.vue
  18. 5 5
      src/views/inward/app.js
  19. 5 5
      src/views/inward/components/inwardFactory/countResult.vue
  20. 77 9
      src/views/inward/components/inwardFactory/timeTaskResult.vue
  21. 1 0
      src/views/inward/components/truckOrder/decomposePlan.vue
  22. 1 1
      src/views/statisticalReport/components/inwardReport/inwardFactory.vue
  23. 110 0
      src/views/statisticalReport/components/sporadicReport/inwardSporadicReport.vue
  24. 3 2
      src/views/statisticalReport/router/index.js

+ 4 - 3
build/utils.js

@@ -18,9 +18,10 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 
 
 
-//  let devModules = ['all']
-let devModules = ['index','RMS']
-// let devModules = ['index','TMS','SporadicManage']
+ let devModules = ['all']
+// let devModules = ['index','inward']
+// let devModules = ['index','SporadicManage','RMS','statisticalReport']
+// let devModules = ['index','inward','statisticalReport']
 //  let devModules = ['index','WMS','sale','TMS','inward','SporadicManage']
 // let devModules = ['index','SporadicManage','TMS','statisticalReport','RMS'];
 // let devModules = ['index','RMS'];

+ 3 - 0
config/index.js

@@ -68,6 +68,9 @@ let proxyTable = {
     // target: "http://localhost:8080",
     // target: "http://localhost:8019",
     // target: "http://192.168.1.107:8019",
+    // target: "http://192.168.1.112:8019",
+    // target: "http://localhost:8019",
+    // target: "http://192.168.1.107:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 116 - 0
src/views/SporadicManage/components/oldAreaSporadic/inwardSporadicFactory/LeaveFactory.vue

@@ -0,0 +1,116 @@
+//出厂
+<template>
+  <!-- 零星物资出厂作业页面 -->
+  <div class="homeworkPath">
+    <div class="top">
+       <span class="text">出厂时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text1">至</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>
+      <span class="text">流向:</span>
+      <el-select
+        class="select"
+        v-model="flow"
+        placeholder="请选择"
+        @change="onchange()"
+      >
+        <el-option
+          v-for="item in flowList"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      <span class="span"></span>
+    </div>
+    <dilTable v-bind.sync="option">      
+    </dilTable>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      input: "",
+      startTime: null,
+      endTime: null,
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+      flow:null,
+      flowList:[{
+          value: 12,
+          label: "进厂",
+        },
+        {
+          value: 13,
+          label: "出厂",
+        },
+        {
+          value: 14,
+          label: "中转",
+        },
+        ]
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baowei"){
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=100"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=100&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onchange(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baowei"){
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=" + this.flow
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&userId=" + getCookie("orgCode") + "&orderType=" + this.flow
+      }
+    },
+    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/getLeaveFactoryResult?apiId=421&orderType=20&startTime="+startTime+"&endTime="+endTime+"&i=" +new Date();
+          }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        this.option.requestUrl = "/api/v1/tms/getLeaveFactoryResult?apiId=421&orderType=20&startTime="+startTime+"&endTime="+endTime+"&i=" +new Date();
+        
+      }  
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
+    }
+  }
+}
+</style>

+ 89 - 0
src/views/SporadicManage/components/oldAreaSporadic/inwardSporadicFactory/Load.vue

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

+ 122 - 0
src/views/SporadicManage/components/oldAreaSporadic/inwardSporadicFactory/enFactory.vue

@@ -0,0 +1,122 @@
+//进厂
+<template>
+  <!-- 零星物资进厂作业页面 -->
+  <div class="homeworkPath">
+    <div class="top">
+      <span class="text">进门时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span class="text">至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <span class="text">流向:</span>
+      <el-select
+        class="select"
+        v-model="flow"
+        placeholder="请选择"
+        @change="onchange()"
+      >
+        <el-option
+          v-for="item in flowList"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      <span class="span"></span>
+    </div>
+    <dilTable v-bind.sync="option">      
+    </dilTable>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      input: "",
+      startTime: null,
+      endTime: null,
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+      flow:null,
+      flowList:[{
+          value: 12,
+          label: "进厂",
+        },
+        {
+          value: 13,
+          label: "出厂",
+        },
+        {
+          value: 14,
+          label: "中转",
+        },
+        ]
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baowei"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=100"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=100&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onchange(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baowei"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=" + this.flow
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&userId=" + getCookie("orgCode") + "&orderType=" + this.flow
+      }
+    },
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=416&orderType=100&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+
+          // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }else{
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
+    }
+  }
+}
+</style>

+ 89 - 0
src/views/SporadicManage/components/oldAreaSporadic/inwardSporadicFactory/grossWeight.vue

@@ -0,0 +1,89 @@
+//计毛
+<template>
+  <!-- 零星物资计毛作业页面 -->
+  <div class="homeworkPath">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <span class="text">流向:</span>
+      <el-select
+        class="select"
+        v-model="flow"
+        placeholder="请选择"
+        @change="onchange()"
+      >
+        <el-option
+          v-for="item in flowList"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      <span class="span"></span>
+    </div>
+    
+    <dilTable v-bind.sync="option">      
+    </dilTable>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+      flow:null,
+      flowList:[{
+          value: 12,
+          label: "进厂",
+        },
+        {
+          value: 13,
+          label: "出厂",
+        },
+        {
+          value: 14,
+          label: "中转",
+        },
+        ]
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baowei"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=100"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=100&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onchange(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baowei"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiMaoResult?apiId=405&orderType=" + this.flow
+      }else{
+      }
+    },
+    onclick() {
+      this.$message.info("功能暂时关闭")
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
+    }
+  }
+}
+</style>

+ 90 - 0
src/views/SporadicManage/components/oldAreaSporadic/inwardSporadicFactory/tareWeight.vue

@@ -0,0 +1,90 @@
+//计皮
+<template>
+  <!-- 零星物资计皮作业页面 -->
+  <div class="homeworkPath">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <span class="text">流向:</span>
+      <el-select
+        class="select"
+        v-model="flow"
+        placeholder="请选择"
+        @change="onchange()"
+      >
+        <el-option
+          v-for="item in flowList"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      <span class="span"></span>
+    </div>
+
+    <dilTable v-bind.sync="option">      
+    </dilTable>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "",
+      },
+      flow:null,
+      flowList:[{
+          value: 12,
+          label: "进厂",
+        },
+        {
+          value: 13,
+          label: "出厂",
+        },
+        {
+          value: 14,
+          label: "中转",
+        },
+        ]
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baowei"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=100"
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=100&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    onchange(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "baowei"){
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&orderType=" + this.flow
+      }else{
+          this.option.requestUrl = "/api/v1/tms/getAllJiPiResult?apiId=392&userId=" + getCookie("orgCode") + "&orderType=" + this.flow
+      }
+    },
+    onclick() {
+      this.$message.info("功能暂时关闭")
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
+    }
+  }
+}
+</style>

+ 89 - 0
src/views/SporadicManage/components/oldAreaSporadic/inwardSporadicFactory/unload.vue

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

+ 694 - 0
src/views/SporadicManage/components/oldAreaSporadic/transportAppoint/addSporadicTransportAppoint.vue

@@ -0,0 +1,694 @@
+//新增运输需求
+<template>
+  <!-- 新增运输作业页面 -->
+  <div class="addSporadic">
+    <page-title>运输预约</page-title>
+    <div class="form-box">
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
+        >
+        <el-form-item label="发货单位">
+         <el-autocomplete
+          class="inline-input"
+          v-model="stateSupplier"
+          :fetch-suggestions="querySearchSupplier"
+          placeholder="请输入发货单位名称"
+          :trigger-on-focus="false"
+          @select="handleSelectSupplier"
+        >
+        <template slot-scope="{ item }">
+          <div class="name">{{ item.supplierName }}</div>
+        </template>
+        </el-autocomplete>
+        </el-form-item>
+        </el-form>
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
+        >
+        <el-form-item label="收货单位">
+         <el-autocomplete
+          class="inline-input"
+          v-model="stateConsignee"
+          :fetch-suggestions="querySearchConsignee"
+          placeholder="请输入收货单位名称"
+          :trigger-on-focus="false"
+          @select="handleSelectConsignee"
+        >
+        <template slot-scope="{ item }">
+          <div class="name">{{ item.consigneeCompanyName }}</div>
+        </template>
+        </el-autocomplete>
+        </el-form-item>
+        </el-form>
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
+      >
+        <el-form-item label="流向">
+        <el-select v-model="orderType" placeholder="请选择" @change="flowChange">
+        <el-option
+          v-for="item in orderTypeList"
+          :key="item.value"
+          :label="item.label" 
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      </el-form-item>
+        </el-form>
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
+      >
+        <el-form-item label="选择路线">
+          <el-input v-model="lineName" placeholder="必填" disabled>
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="ondrawer(5)">浏览</el-button>
+        </el-form-item>
+        </el-form>
+         <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
+      >
+        <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>
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
+      >
+        <el-form-item label="选择物资">      
+        </el-form-item>
+        <el-form-item > 
+          <el-button type="primary" @click="drawTable" class="truckBtn"
+          >浏览</el-button>
+        </el-form-item>
+        </el-form>
+    </div>
+    <div class="lineId from">
+      <span class="text">该批车辆是否一车多趟:</span>
+      <el-switch v-model="isMoreTrips" active-text="是" inactive-text="否">
+      </el-switch>
+    </div>
+    <div class="swtichTop">
+    <span class="titile">点击浏览选择物资之前请选择物资单位!</span>
+    <div class="switch" v-if="tableData.length > 0">
+      <el-tooltip placement="top">
+        <div slot="content">下面表格已有数据,不能进行更改!!!</div>
+        <el-switch
+          v-model="value"
+          active-text="件数"
+          inactive-text="重量"
+          disabled
+        >
+        </el-switch>
+      </el-tooltip>
+    </div>
+    <div class="switch" v-else>
+      <el-tooltip placement="top">
+        <div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
+        <el-switch v-model="value" active-text="件数" inactive-text="重量">
+        </el-switch>
+      </el-tooltip>
+    </div>
+    </div>
+    <!-- 物资表格 -->
+    <div class="truckListTable">
+    <div class="selectionTable">
+      <el-table
+        :data="tableData"
+        border
+        style="width: 100%"
+        highlight-current-row
+      >
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          align="center"
+          show-overflow-tooltip
+        >
+          <template slot="scope" v-if="item.label !== '件数'">
+            <span>{{ item.label }}</span>
+          </template>
+          <!-- 插入输入框 -->
+          <template slot-scope="scope">
+            <template v-if="item.slot">
+                <!-- 装卸货优先级 -->
+               <template v-if="item.prop == 'materialPriority'">
+                <el-input
+                  class="textinput"
+                  v-model.number="scope.row.materialPriority"
+                  @input="onInputPriority(scope.row.materialPriority)"
+                ></el-input>
+              </template>
+              <!-- 物资件数 -->
+              <template v-if="item.prop == 'orderMaterialNumber'">
+                <el-input
+                  class="textinput"
+                  v-model.number="scope.row.orderMaterialNumber"
+                  @input="onInputNumber(scope.row.orderMaterialNumber)"
+                ></el-input>
+              </template>
+              <!-- 物资重量 -->
+               <template v-if="item.prop == 'orderMaterialWeight'">
+                <el-input
+                  v-model.number="scope.row.orderMaterialWeight"
+                  @input="onInputWeight(scope.row.orderMaterialWeight)"
+                ></el-input>
+              </template>           
+            </template>
+            <template v-else>
+              <span>{{ scope.row[item.prop] }}</span>
+            </template>
+          </template>
+        </el-table-column>
+        <!-- 操作列 -->
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button
+              @click.native.prevent="deleteRow(scope.$index, tableData)"
+              type="text"
+              icon="el-icon-close"
+              size="big"
+            ></el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    </div>
+    <!-- 物资模态框 -->
+    <div class="drawSty">
+      <el-drawer
+      title="选择物资信息"
+      :visible.sync="table"
+      direction="rtl"
+      size="40%"
+      :show-close="false"
+    >
+      <el-input placeholder="请输入内容" v-model="inputMaterial" clearable > </el-input
+      ><el-button type="primary" class="btn" @click="onclickMaterial">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <!-- <el-button @click="open">取消</el-button> -->
+      <el-button type="primary" @click="makeSure1">确定</el-button>
+      <div class="tablecls">
+        <!-- 查询所有的物资 -->
+        <dilTable ref="materialTable" v-bind.sync="materialOptions" @selection-change="selectionChange" :drawer="aaadrawer">
+        </dilTable>
+      </div>
+    </el-drawer>
+    <!-- 模态窗口 -->
+    <el-drawer :visible.sync="drawer" :direction="direction" size="30%" :before-close="handleClose">
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 20px"
+        clearable
+      ></el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 0.9375rem"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="line"
+          @radio-change="currentRadioChange5"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    </div>  
+    <div class="button-box">
+      <el-button @click="onClickCancel">返回</el-button>
+      <el-button type="primary" @click="makeSure" :disabled = "disabled">确认</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      inputLine:null,
+      aaadrawer:false,
+      disabled:false,
+      materialTimes:null,
+      options: [],
+      value: '',
+      receiveName:'',
+      stateCarrier:null,
+      stateSupplier:null,
+      stateConsignee:null,
+      restaurantsConsignee:null,
+      restaurantsSupplier:null,
+      orderTypeList:[
+        {
+          value:12,
+          label:'进厂'
+        },{
+          value:13,
+          label:'出厂'
+        },
+        {
+          value:14,
+          label:'中转'
+        }
+      ],
+      orderType:null,
+      restaurantsCarrier:null,
+      // 线路名称
+      lineName: "",
+      //线路id
+      lineId: null,
+      // 件数与重量的开关
+      value: false,
+      //物资模态框开关
+      table: false,
+      //一车多趟开关
+      isMoreTrips: false,
+      //物资表格表头
+      tableTop: [
+        {
+          prop: "materialCode",
+          label: "物资编码",
+          width: "160",
+        },
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: "140",
+        },
+        {
+          prop: "materialSpecification",
+          label: "规格型号",
+          width: "140",
+        },
+        {
+          prop: "materialPriority",
+          label: "装卸货优先级",
+          slot: true,
+        },
+        {
+          prop: "orderMaterialWeight",
+          label: "重量",
+          slot: true,
+        },
+      ],
+      // 收货单位ID
+      receiveId:null,
+      //承运商ID
+      carrierId:null,
+      //物资表格数据
+      tableData: [],
+      selectionList1: [],
+      newsArr:[],
+      //物资名称
+      materialName: "",
+      //发货单位名称
+      supplierName: "",
+      //发货单位id
+      supplierId: null,
+      //物资id
+      materialId: null,
+      //承运商id
+      carrierId:null,
+      //是否需要打开模态窗口
+      drawer: false,
+      a: 1,
+      direction: "rtl",
+      inputMaterial:null,
+      input:null,
+      //物资模态框
+      materialOptions:{
+          requestUrl:"",
+          selectionType: "select",
+      },
+      line: {
+        requestUrl: "",
+        selectionType: "radio",
+      },
+      row: {},
+    };
+  },
+  watch: {
+    value() {
+      if (this.value) {
+        console.log(this.value)
+        console.log(this.tableTop.length)
+        this.tableTop.splice(this.tableTop.length - 1, 1);
+        this.tableTop.push({
+          prop: "orderMaterialNumber",
+          label: "件数",
+          slot: true,
+        });
+      } else {
+        this.tableTop.splice(this.tableTop.length - 1, 1);
+        this.tableTop.push({
+          prop: "orderMaterialWeight",
+          label: "重量",
+          slot: true,
+        });
+      }
+    },
+  },
+  methods: {
+    //关闭运输线路
+    handleClose(done){
+        done()
+        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"
+    },
+    onclickMaterial(){
+        if(this.inputMaterial != null){
+          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&index=" + this.inputMaterial
+        }
+        else{
+          this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"
+        }
+    },
+    onInputTimes(){
+      if(!isNumber(this.materialTimes)){
+        this.$message.warning('趟次请输入数字')
+      }
+    },
+    onInputPriority(scope){
+      if(!isNumber(scope)){
+        this.$message.warning('装卸货次序请输入数字')
+      }
+    },
+    onInputWeight(scope){
+      if(!isNumber(scope)){
+        this.$message.warning('重量请输入数字')
+      }
+    },
+    onInputNumber(scope){
+      if(!isNumber(scope)){
+        this.$message.warning('件数请输入数字')
+      }
+    },
+    //流向选择框变动后
+    flowChange(){
+      if(this.orderType == 12){
+        this.inputLine = "零星进厂"
+      }
+      if(this.orderType == 13){
+        this.inputLine = "零星出厂"
+      }
+      if(this.orderType == 14){
+        this.inputLine = "零星中转"
+      }
+    },
+    drawTable(){
+      this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395" +"&test=" + new Date()
+      this.selectionList1 = []
+      this.table = true
+    },
+    //收货单位弹出层
+    handleSelectConsignee(item){   
+      this.consigneeId = item.consigneeId
+      item.consigneeCompanyName = this.consigneeCompanyName
+  
+    },
+    //以下是发货单位边输边查搜索
+    querySearchConsignee(queryString, cb) {
+      this.axios.post('/api/v1/uc/getConsigneeByLike?index='+queryString).then((res)=>{
+        if(res.data.code == "200"){
+          console.log(res)
+          var restaurantsConsignee = res.data.data
+          var results = queryString ? restaurantsConsignee.filter(this.createFilterConsignee(queryString)) :restaurantsConsignee;
+            // 调用 callback 返回建议列表的数据
+          cb(results);
+        }
+      })    
+      },
+    createFilterConsignee(queryString) {
+        return (restaurantsConsignee) => {
+          return (restaurantsConsignee.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+      //以上是返回单位边输边查搜索
+     //发货单位弹出层
+    handleSelectSupplier(item){
+      this.supplierId = item.supplierId
+      item.supplierName = this.supplierName
+    },
+    //以下是发货单位边输边查搜索
+    querySearchSupplier(queryString, cb) {
+        this.axios.post('/api/v1/uc/getSupplierMesByLike?index='+this.stateSupplier).then((res)=>{
+        if(res.data.code == "200"){    
+          var restaurantsSupplier = res.data.data
+          var results = queryString ? restaurantsSupplier.filter(this.createFilterSupplier(queryString)) :restaurantsSupplier;
+          // 调用 callback 返回建议列表的数据
+          cb(results);
+        }
+      })  
+      },
+    createFilterSupplier(queryString) {
+        return (restaurantsSupplier) => {
+          return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+    //承运商弹出层
+    handleSelectCarrier(item){    
+      this.carrierId = item.carrierId
+      item.carrierName = this.stateCarrier
+    },
+    //以下是承运商边输边查搜索
+    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);
+        };
+      },
+    //以上是承运商边输边查搜索
+    //删除行
+    deleteRow(index, rows) {
+      rows.splice(index, 1);
+    },
+    // 返回主界面
+    makeSure1() {
+        var arr = []
+        for (let i = 0; i < this.newsArr.length; i++) {
+        if(arr.indexOf(this.newsArr[i]) === -1){
+            arr.push(this.newsArr[i]);
+        }
+        }
+        arr.forEach( (e) => {
+          let addmap = {
+            materialSpecification:e.materialSpecification,
+            materialName:e.materialName,
+            materialCode:e.materialCode,
+            materialId:e.materialId
+          }
+          this.tableData.push(addmap)
+        })
+        this.newsArr = []
+        this.table = false
+    },
+      // 返回选中的物资信息
+    selectionChange(selection) {
+      console.log(selection)
+      this.selectionList1 = []
+      this.selectionList1 = selection
+      this.newsArr = []
+      for (let i = 0; i < this.selectionList1.length; i++) {
+        if(this.newsArr.indexOf(this.selectionList1[i]) === -1){
+        this.newsArr.push(this.selectionList1[i]);
+        }
+        }
+    },
+    onclick(a) {
+      if (a == 5) {
+        this.line.requestUrl =
+          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
+      }
+    },
+    ondrawer(num) {
+      this.line.requestUrl =
+          "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" + "&t=" + new Date() + "&con=" + this.inputLine;
+      this.drawer = true;
+      this.a = num;
+    },
+    // 返回
+    onClickCancel() {
+      this.$router.push("/oldSporadicAppoint");
+    },
+    currentRadioChange5(selection) {
+      if(selection.lineName == null &&selection.lineDesk == null){
+          this.lineName = ''
+      }else{
+          this.lineName = selection.lineName+'  '+selection.lineDesk 
+          this.lineId = selection.lineId;
+      }    
+    },
+    // 确认
+    makeSure() {
+        let amOrder = {
+          supplierId:this.supplierId,
+          lineId:this.lineId,
+          carrierId: this.carrierId,
+          orderType:this.orderType,
+          receiveId: this.consigneeId,
+          userId:getCookie("orgCode"),
+          mapList: this.tableData,
+          isMoreTrips:Number(this.isMoreTrips)
+        }
+        console.log(amOrder)
+        debugger
+        this.disabled = true
+        if(this.supplierId==null||this.lineId==null||this.consigneeId==null||this.carrierId==null){
+          this.disabled = false
+          this.$message.warning("存在值未填写")
+          return
+        }else if(this.tableData.length == 0){
+          this.disabled = false
+          this.$message.warning("请点击浏览勾选物资")
+          return
+        }
+        var i = 0;
+        var j = 0;
+        this.tableData.forEach((e) => {
+          if(e.materialPriority == null){
+            i++
+          }else if(e.orderMaterialWeight == null){            
+            j++
+          }            
+        })
+        if(i != 0){
+           this.$message.warning("装卸货优先级未填写")
+           this.disabled = false
+           return
+        }else if(j != 0){
+           this.$message.warning("物资重量未填写")
+           this.disabled = false
+           return
+        }
+        let amsOrder = {
+          supplierId:this.supplierId,
+          lineId:this.lineId,
+          carrierId: this.carrierId,
+          orderType:this.orderType,
+          receiveId: this.consigneeId,
+          userId:getCookie("orgCode"),
+          mapList: this.tableData,
+          isMoreTrips:Number(this.isMoreTrips)
+          
+        };
+        this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then((res) => {
+          if (res.data.code == "200") {
+            this.onClickCancel()
+            this.disabled = false
+          }else{
+            this.disabled = false
+          }
+        });
+      }
+    },
+};
+</script>
+<style lang="scss" scoped>
+.addSporadic{
+  .contractDetails {
+  width: 100%;
+}
+.drawSty{
+  .el-input{
+    width: 240px;
+  }
+}
+.lineId {
+  display: flex;
+  justify-content: center;
+  .text {
+    display: inline-block;
+    width: 190px;
+    text-align: right;
+    font-size: 16px;
+  }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
+  .span {
+    display: inline-block;
+    width: 70px;
+    height: 1px;
+  }
+}
+.swtichTop{
+  display: flex;
+  height: 40px;
+  align-content: center;
+  justify-content: center;
+  padding-right:20px ;
+  .titile{
+    color: red;
+    font-size: 14px;
+  }
+  .switch{
+    margin-right: -60px
+  }
+}
+.form-box {
+  display: inline-block !important;
+  margin-left: 488px;
+  .el-input {
+    width: 320px;
+  }
+  .el-select{
+    width: 320px;
+  }
+  .el-autocomplete{
+    width: 320px;
+  }
+  .el-form {
+    padding: 10px;
+  }
+  .truckBtn{
+    width: 320px;
+  }
+}
+.button-box {
+  margin-left: 45% ;
+}
+}
+</style>

+ 1 - 0
src/views/SporadicManage/components/oldAreaSporadic/transportAppoint/editTransportAppoint.vue

@@ -0,0 +1 @@
+//编辑运输预约

+ 455 - 0
src/views/SporadicManage/components/oldAreaSporadic/transportAppoint/transportAppoint.vue

@@ -0,0 +1,455 @@
+//运输预约展现
+<template>
+  <!-- 零星物资运输预约 -->
+  <div class="homeworkPath">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="insertClick">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+      <el-button
+        type="primary"
+        @click="sendClick()"
+        v-if="this.activeName == 'first'"
+      >
+        <i class="el-icon-bottom"></i>下发
+      </el-button>
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <!-- 未下发 -->
+      <el-tab-pane label="未下发" name="first">
+        <dilTable
+          v-bind.sync="option1"
+          ref="table"
+          @selection-change="selectionChange"
+        >
+          <el-table-column
+            fixed="right"
+            label="操作"
+            width="120"
+          >
+            <template slot-scope="scope">
+              <el-button @click="deleteClick(scope)" type="text" size="small">
+                删除
+              </el-button>
+              <el-button @click="getMatrialDetails1(scope.row)" type="text" size="small">
+                物资详情
+              </el-button>
+            </template>
+          </el-table-column>
+          //物资详情抽屉
+          <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+      <!-- 已下发 -->
+      <el-tab-pane label="已下发" name="second">
+        <dilTable v-bind.sync="option2" ref="table1">
+          <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-button @click="getMatrialDetails2(scope.row)" type="text" size="small">
+                物资详情
+              </el-button>
+              <el-button @click="stopSpoOrder(scope)" type="text" size="small">
+                停止
+              </el-button>
+            </template>
+          </el-table-column>
+          //物资详情抽屉
+          <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="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="third">
+        <dilTable v-bind.sync="option3" ref="table2">
+           <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-button @click="getMatrialDetails3(scope.row)" type="text" size="small">
+                物资详情
+              </el-button>
+            </template>
+          </el-table-column>
+          //物资详情抽屉
+          <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="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-tabs>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "inplantTMS",
+  data() {
+    return {
+      input: null,
+      Time: "",
+      activeName: "first",
+      option1: {
+        // 表格请求数据的地址
+        requestUrl:
+          "",
+        // 控制显示多选列
+        selectionType: "select",
+      },
+      option2: {
+        // 表格请求数据的地址
+        requestUrl:
+          "",
+      },
+      option3: {
+        // 表格请求数据的地址
+        requestUrl:
+          "",
+      },
+      selection: [],
+      maplist:[],
+       //记录旧的row对象
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态
+      oldRowCount: 1,
+      //记录旧的row对象
+      oldRow1: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态
+      oldRowCount1: 1,
+      oldRow2: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态
+      oldRowCount2: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      tableData: [],
+      tableData1:[],
+      tableData2:[]
+    };
+  },
+  created(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0",
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1",
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1"       
+      }else{
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&userId=" + getCookie("orgCode"),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&userId=" + getCookie("orgCode"),
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&userId=" + getCookie("orgCode")
+      } 
+  },
+  methods: {
+    getRequestUrl(){
+      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&test=" + new Date(),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&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=439&issueStatus=0&userId=" + getCookie("orgCode") + "&test=" + new Date(),
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&userId=" + getCookie("orgCode") + "&test=" + new Date(),
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&type1=1&userId=" + getCookie("orgCode") + "&test=" + new Date()
+     }
+    },
+    stopSpoOrder(scope){
+      this.$confirm("是否停止", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios
+            .post("/api/v1/ams/closeSporadicOrder" ,{
+              sporadicOrderId : scope.row.sporadicOrderId
+            })
+            .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: "停止操作已取消!",
+          });
+        });
+    },
+    //获取选中的订单
+    selectionChange(selection) {
+      this.maplist = selection;
+    },
+    onclick() {
+      if(this.input != null){
+        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu")
+        {
+          if(this.activeName == "first"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&orderType=12&dispatchStatus=0&con=" + this.input
+          }else if(this.activeName == "second"){
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&con=" + this.input
+          }else{
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=11&con=" + this.input
+          }                
+        }else
+        {
+          if(this.activeName == "first"){
+            this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=0&orderType=12&dispatchStatus=0&userId=" + getCookie("orgCode") + "&con=" + this.input
+          }else if(this.activeName == "second"){
+            this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&orderType=12&userId=" + getCookie("orgCode") + "&con=" + this.input
+          }else{
+            this.option3.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=11&userId=" + getCookie("orgCode") + "&con=" + this.input
+          }       
+        }
+        }else{
+        this.$message.warning("未输入查询条件")
+        }
+    },
+    handleClick(tab, event) {
+      this.getRequestUrl()
+    },
+    // 下发
+    sendClick() {
+      if(this.maplist.length == 0){
+        this.$message.warning('未选择零星订单')
+        return
+      }
+      this.axios
+        .post("/api/v1/ams/issueSporadicOrders", this.maplist)
+        .then((res) => {
+          if (res.data.code == "200") {
+            this.getRequestUrl()
+            // this.$router.go(0)
+            this.$message({
+              type: "success",
+              message: "下发成功!",
+            });
+            this.maplist = []
+          }
+        });
+    },
+    // 删除
+    deleteClick(scope) {
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.axios
+          .post(
+          "/api/v1/ams/deleteSporadicOrders?sporadicOrderId=" +
+            scope.row.sporadicOrderId
+            )
+            .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: "删除操作已取消!",
+          });
+        });
+    },
+    //新增
+    insertClick() {
+      this.$router.push("addOldSporadicAppoint");
+    },
+    //获取物资详情--未下发
+    getMatrialDetails1(row){
+      console.log("wuzixq")
+      // 记录重复点击次数
+      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.axios.post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId).then((res) =>{
+        console.log(res.data.data)
+        this.tableData = res.data.data
+      })
+    },
+    //获取物资详情--已下发
+
+    getMatrialDetails2(row){
+      console.log("wuzixq")
+      // 记录重复点击次数
+      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.axios.post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId).then((res) =>{
+        console.log(res.data.data)
+        this.tableData1 = res.data.data
+      })
+    },
+    getMatrialDetails3(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.axios.post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId).then((res) =>{
+        console.log(res.data.data)
+        this.tableData1 = res.data.data
+      })
+    }
+  },
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 40px;
+    .el-input {
+      width: 250px;
+      margin-right: 20px;
+    }
+  }
+}
+</style>

+ 401 - 0
src/views/SporadicManage/components/oldAreaSporadic/transportOrder/addTransportOrder.vue

@@ -0,0 +1,401 @@
+//新增运输派单
+//新增运输订单
+<template>
+  <div class="addSaleOrderSend">
+    <page-title>新增运输订单派车</page-title>
+    <!-- 零星订单表的数据 -->
+    <div class="saleOrder">
+      <dilTable
+        v-bind.sync="option"
+        @radio-change="currentRadioChange"
+        ref="table"
+      >
+        <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-button @click="getMatrialDetails1(scope.row)" type="text" size="small">
+                物资详情
+              </el-button>
+            </template>
+          </el-table-column>
+          //物资详情抽屉
+          <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+    <!-- 表单选择车辆-->
+    <div class="from">
+      <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="truckDrawer" 
+      :with-header="false"
+      :destroy-on-close="false"
+      direction="rtl"
+      size="40%"
+      :show-close="false"
+      :wrapperClosable="false"
+      modal
+      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 {
+      disabled:false,
+      //零星订单ID
+      sporadicOrderId:null,
+      //运输订单ID
+      orderId:null,
+      //线路名称
+      lineName:null,
+      //已经选择车辆物资信息
+      selectionList:[],
+      //销售订单物资信息
+      option: {
+        // 表格请求数据的地址
+        requestUrl:"",
+        // 控制显示当选列
+        selectionType: "radio",
+        isPagination: false,
+      },
+      //当前选中的物资id
+      materialId: null,
+      //当前选中的物资名称
+      materialName: null,   
+      //是否打开选择车辆的模态框
+      truckDrawer:false,
+      //车辆的表格
+      truck: {
+        requestUrl: "",
+        selectionType: "select",
+      },
+      tableTop: [
+        {
+          prop: "capacityNumber",
+          label: "车牌号",
+        }
+      ],
+      truckText:null,
+      //当前多选选中的车辆
+      selectTruck:[],
+       //记录旧的row对象
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态
+      oldRowCount: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      tableData: [],
+    };
+  },
+  created() {
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId");
+        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&carrierSsoId=" + getCookie("userId");
+    } else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
+        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0";
+    }else{
+        this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
+        this.option.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=439&issueStatus=1&dispatchStatus=0&sporadicStatus=0&userId=" + getCookie("orgCode");
+    }
+  },
+  methods: {
+    //点击确定按钮的事件
+    makeSure(){
+       console.log(this.selectionList)
+        this.disabled = true
+        console.log(this.orderId)
+        if(this.orderId == 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/ams/addSporadicOrderTimes',{
+          orderId:this.orderId,
+          sporadicOrderId:this.sporadicOrderId,
+          mapList:this.selectionList,
+        }).then((res)=>{
+          if(res.data.code == '200'){
+            this.$message.success('派车成功')
+            this.disabled = false
+            this.cancel();
+          }
+        })
+    },
+    //点击取消按钮的事件
+    cancel(){
+      this.$router.push('/oldSporadicOrder')
+    },
+    //点击删除按钮删除当前点击的对象
+    deleteRow(index){
+      this.selectionList.splice(index,1)
+    },
+    //车辆模态框的确定事件
+    AddTruckClick(){
+      this.selectTruck.forEach(e => {
+        this.selectionList.push({
+          capacityId:e.capacityId,
+          capacityNumber:e.capacityNumber,
+        })
+      });
+      this.truckDrawer = false;
+    },
+    //车辆模态框框计算
+    selectTruckClick(){
+      if(this.truckText != null){
+        if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") + "&index="+this.truckText;
+      }else {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&index="+this.truckText;
+      }
+        this.truckText = null
+      }else{
+         if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") + "&i=" + new Date()
+      }else {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&i=" + new Date()
+      }
+      }
+    
+    },
+    //车辆表格
+    currentRadioChange1(select){
+      this.selectTruck = [];
+      this.selectTruck = select;
+    },
+    //主界面表格单选
+    currentRadioChange(row) {
+      console.log(row)
+      this.sporadicOrderId = row.sporadicOrderId
+      this.orderId = row.orderId
+    },
+    //获取物资详情--未下发
+    getMatrialDetails1(row){
+      console.log("wuzixq")
+      // 记录重复点击次数
+      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.axios.post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId).then((res) =>{
+        console.log(res.data.data)
+        this.tableData = res.data.data
+      })
+    },
+    onClick() {
+      if(getCookie("orgCode") == "chengyunshang") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        getCookie("userId") + "&t=" + new Date();
+    }else if(getCookie("orgCode") == "biemeierchejian") {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&con=" + "铁专线精煤" + "&t=" + new Date();
+    }
+     else {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null  + "&t=" + new Date();
+    } 
+      this.truckDrawer = true
+    },
+  },
+};
+</script>
+<style lang='scss'>
+.addSaleOrderSend {
+  .el-drawer__body {
+   overflow: auto;
+  }
+  .el-drawer__container ::-webkit-scrollbar{
+    display: none;
+  }
+  .from {
+    margin-top: 20px;
+    .line {
+      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>

+ 0 - 0
src/views/SporadicManage/components/oldAreaSporadic/transportOrder/editTransportOrder.vue


+ 524 - 0
src/views/SporadicManage/components/oldAreaSporadic/transportOrder/transportOrder.vue

@@ -0,0 +1,524 @@
+//运输派单
+<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">
+    <el-input style="width:250px" v-model="truckText"></el-input>
+    <el-button type="primary" @click="getCapacity" >查询</el-button>
+    <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" ref="table">
+            <el-table-column
+            fixed="right"
+            label="操作"
+            width="150"
+          >
+            <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>
+              <el-button @click="getMatrialDetails1(scope.row)" type="text" size="small">
+                物资详情
+              </el-button>
+            </template>
+          </el-table-column>
+          //物资详情抽屉
+          <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+        <!-- 已接收 -->
+        <el-tab-pane label="已接收" name="Received">
+          <dilTable v-bind.sync="Received" ref="table1">
+            <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-button @click="deleteClick(scope)" type="text" size="small">
+                关闭
+              </el-button>
+              <el-button @click="getMatrialDetails2(scope.row)" type="text" size="small">
+                物资详情
+              </el-button>
+            </template>
+          </el-table-column>
+          //物资详情抽屉
+          <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="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="completed">
+          <dilTable v-bind.sync="completed" ref="table2">
+            <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-button @click="getMatrialDetails3(scope.row)" type="text" size="small">
+                物资详情
+              </el-button>
+            </template>
+          </el-table-column>
+          //物资详情抽屉
+          <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData2" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+         <!-- 已拒绝 -->
+        <el-tab-pane label="已拒绝" name="refused">
+          <dilTable v-bind.sync="refused">
+            <el-table-column
+            fixed="right"
+            label="操作"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-button @click="ctrlZClick(scope)" type="text" size="small">
+                撤销
+              </el-button>
+            </template>
+          </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div> 
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      carrierUserId:'',
+      //模态窗的框计算
+      inputText: null,
+      //车辆输入框
+      truckText:null,
+      //是否弹出对话框
+      dialogTableVisible: false,
+      //输入框的值
+      input: "",
+      //选项卡的当前选中的值
+      activeName: "first",
+      //已下发的表格
+      first: {
+        requestUrl:"",
+      },
+      //车辆信息的表格
+      truck: {
+        requestUrl: "" ,
+        // 控制显示当选列
+        selectionType: "radio",
+      },
+      Received:{
+        requestUrl: "",
+      },
+      completed:{
+        requestUrl:"",
+      },
+      refused:{
+        requestUrl:"",
+      },
+       //车辆的表格
+      truck: {
+        requestUrl: "",
+        selectionType: "radio",
+      },
+      //记录旧的row对象
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态
+      oldRowCount: 1,
+      //记录旧的row对象
+      oldRow1: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态
+      oldRowCount1: 1,
+      oldRow2: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态
+      oldRowCount2: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      tableData: [],
+      tableData1:[],
+      tableData2:[],
+      //当前选中的订单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/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + getCookie("userId") ,
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + getCookie("userId"),
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&carrierId=" + getCookie("userId"),
+        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&carrierId=" + getCookie("userId")
+      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4"
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5"
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2"
+        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6"
+      }else{
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&userId=" + getCookie("orgCode")
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&userId=" + getCookie("orgCode")
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&userId=" + getCookie("orgCode")
+        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&userId=" + getCookie("orgCode")
+      }
+  },
+  methods: {
+    //撤销已拒绝的运输订单
+    ctrlZClick(scope){
+        console.log(scope.row.orderId)
+        this.axios.post("/api/v1/oms/refuseCtrlZ",{
+          orderId:scope.row.orderId
+        }).then((res) => {
+          if(res.data.code == '200'){
+             this.$message.success("撤单成功")
+             this.getRequestUrl()
+          }
+        })
+    },
+    handleClose(done){
+      done()
+      this.$message.info("取消修改运力")
+    },
+    getRequestUrl(){
+        if(getCookie('orgCode') == "chengyunshang"){
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + getCookie("userId") + "&test=" + new Date() ,
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + getCookie("userId") + "&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&carrierId=" + getCookie("userId") + "&test=" + new Date()
+        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&carrierId=" + getCookie("userId") + "&test=" + new Date()
+      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4" + "&test=" + new Date()
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5" + "&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2" + "&test=" + new Date()
+        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6" + "&test=" + new Date()
+      }else{
+        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&userId=" + getCookie("orgCode") + "&test=" + new Date()
+        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&userId=" + getCookie("orgCode") + "&test=" + new Date()
+        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&userId=" + getCookie("orgCode") + "&test=" + new Date()
+        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&userId=" + getCookie("orgCode") + "&test=" + new Date()
+      }
+    },
+    getTruckRequestUrl(){
+        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()
+    },
+    Insert(){
+      this.$router.push("addOldSporadicOrder")
+    },
+    getCapacity(){
+      if(this.truckText != null){
+        if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") + "&index="+this.truckText;
+      }else {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&index="+this.truckText;
+      }
+        this.truckText = null
+      }else{
+         if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") + "&i=" + new Date()
+      }else {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&i=" + new Date()
+      }
+      }
+    },
+    //获取物资详情--未接收
+    getMatrialDetails1(row){
+      console.log(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.axios.post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId).then((res) =>{
+        console.log(res.data.data)
+        this.tableData = res.data.data
+      })
+    },
+     //获取物资详情--已接收
+    getMatrialDetails2(row){
+      console.log(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.axios.post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId).then((res) =>{
+        console.log(res.data.data)
+        this.tableData1 = res.data.data
+      })
+    },
+    //获取物资详情--已完成
+    getMatrialDetails3(row){
+      console.log(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.axios.post("/api/v1/ams/getSporadic?sporadicId=" + row.sporadicOrderId).then((res) =>{
+        this.tableData2 = res.data.data
+      })
+    },
+  },
+};
+</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>

+ 31 - 0
src/views/SporadicManage/router/index.js

@@ -30,6 +30,22 @@ import sporadicOUToutFactory from '../components/sporadicMaterial/sporadicOutfac
 import sporadicOUTtareWeight from '../components/sporadicMaterial/sporadicOutfactory/tareWeight.vue'
 import sporadicOUTload from '../components/sporadicMaterial/sporadicOutfactory/load.vue'
 
+//老区零星进出厂
+//老厂零星物资运输预约
+import oldSporadicAppoint from '../components/oldAreaSporadic/transportAppoint/transportAppoint.vue'
+import addOldSporadicAppoint from '../components/oldAreaSporadic/transportAppoint/addSporadicTransportAppoint.vue'
+import editOldSporadicAppoint from '../components/oldAreaSporadic/transportAppoint/editTransportAppoint.vue'
+//老厂零星物资运输派单
+import oldSporadicOrder from '../components/oldAreaSporadic/transportOrder/transportOrder.vue'
+import addOldSporadicOrder from '../components/oldAreaSporadic/transportOrder/addTransportOrder.vue'
+
+//老厂零星物资中转
+import oldSporadicInwardTenfactory from '../components/oldAreaSporadic/inwardSporadicFactory/enFactory.vue'
+import oldSporadicInwardGrossWeight from '../components/oldAreaSporadic/inwardSporadicFactory/grossWeight.vue'
+import oldSporadicInwardoutFactory from '../components/oldAreaSporadic/inwardSporadicFactory/LeaveFactory.vue'
+import oldSporadicInwardtareWeight from '../components/oldAreaSporadic/inwardSporadicFactory/tareWeight.vue'
+import oldSporadicInwardload from '../components/oldAreaSporadic/inwardSporadicFactory/tareWeight.vue'
+import oldSporadicInwardUnload from '../components/oldAreaSporadic/inwardSporadicFactory/unload.vue'
 
 //钢材退货运输预约
 import steelReturnTransportAppoint from '../components/steelReturn/transportAppoint/transportAppoint.vue'
@@ -147,6 +163,21 @@ const constantRouterMap = [
        {path:'sporadicLoadInward',name:'sporadicLoadInward',meta:{code:'xtpzgl-yhgl'},component:sporadicLoadInward},
        {path:'sporadicTareWeightInward',name:'sporadicTareWeightInward',meta:{code:'xtpzgl-yhgl'},component:sporadicTareWeightInward},
        {path:'sporadicUnloadInward',name:'sporadicUnloadInward',meta:{code:'xtpzgl-yhgl'},component:sporadicUnloadInward},
+
+      //老厂零星物资运输预约
+      {path:'addOldSporadicAppoint',name:'addOldSporadicAppoint',meta:{code:'xtpzgl-jggl'},component:addOldSporadicAppoint},
+      {path:'oldSporadicAppoint',name:'oldSporadicAppoint',meta:{code:'xtpzgl-yhgl'},component:oldSporadicAppoint},
+      {path: 'editSporadicTransportAppoint', name: 'editSporadicTransportAppoint', meta: {code: 'xtpzgl-yhgl'}, component: editSporadicTransportAppoint},
+      //零星物资运输订单
+      {path:'addOldSporadicOrder',name:'addOldSporadicOrder',meta:{code:'xtpzgl-jggl'},component:addOldSporadicOrder},
+      {path:'oldSporadicOrder',name:'oldSporadicOrder',meta:{code:'xtpzgl-yhgl'},component:oldSporadicOrder},
+      //零星物资运输执行
+      {path:'oldSporadicInwardTenfactory',name:'oldSporadicInwardTenfactory',meta:{code:'xtpzgl-yhgl'},component:oldSporadicInwardTenfactory},
+      {path:'oldSporadicInwardGrossWeight',name:'oldSporadicInwardGrossWeight',meta:{code:'xtpzgl-yhgl'},component:oldSporadicInwardGrossWeight},
+      {path:'oldSporadicInwardoutFactory',name:'oldSporadicInwardoutFactory',meta:{code:'xtpzgl-yhgl'},component:oldSporadicInwardoutFactory},
+      {path:'oldSporadicInwardtareWeight',name:'oldSporadicInwardtareWeight',meta:{code:'xtpzgl-yhgl'},component:oldSporadicInwardtareWeight},
+      {path:'oldSporadicInwardUnload',name:'oldSporadicInwardUnload',meta:{code:'xtpzgl-yhgl'},component:oldSporadicInwardUnload},
+
     ]    
   }
 ];

+ 1 - 0
src/views/TMS/components/importedIngredients/transportReserveFuAddIngredients.vue

@@ -593,6 +593,7 @@ export default {
       this.lineId = selection.lineId;
     },
     currentRadioChange6(selection) {
+      console.log(selection.orgId);
       this.materialName = selection.materialName;
       this.materialId = selection.materialId;
       this.supplierId = selection.supplierId;

+ 0 - 1
src/views/appoint/components/saleContract/saleOrder.vue

@@ -78,7 +78,6 @@
             </el-form>
           </template>
         </el-table-column>
-
         </dilTable>
       </el-tab-pane>
       <!-- 未上报 -->

+ 5 - 5
src/views/inward/app.js

@@ -19,12 +19,12 @@ import apollo from '@/config/apolloConfig.js'
 import DilCommonUI from "@/components/DilCommonUI";
 Vue.use(DilCommonUI);
 
-// import 'xe-utils' 
+import 'xe-utils' 
 
-// import VXETable from 'vxe-table'
-// import 'vxe-table/lib/style.css'
-// Vue.use(VXETable)
-// Vue.prototype.$XModal = VXETable.modal
+import VXETable from 'vxe-table'
+import 'vxe-table/lib/style.css'
+Vue.use(VXETable)
+Vue.prototype.$XModal = VXETable.modal
 
 
 // 关闭生产模式下给出的提示

+ 5 - 5
src/views/inward/components/inwardFactory/countResult.vue

@@ -41,11 +41,11 @@ export default {
 </script>
 <style lang="scss">
     .sale{
-        .top{
-            width: 100%;height: 5rem;
-            display: flex;
-            align-items: center;
-            padding-left: 2.5rem;
+        .top {
+            padding: 1.25rem 1.875rem;
+            .el-input{
+            width: 20%;
+            }
         }
     }
 </style>

+ 77 - 9
src/views/inward/components/inwardFactory/timeTaskResult.vue

@@ -13,11 +13,39 @@
             </el-button>
         </div>
         <div class="tab">
-            <dilTable v-bind.sync="option"></dilTable>
+            <dilTable v-bind.sync="option" ref="table1">
+                <!-- <el-table-column fixed="right" label="操作" width="180">
+                <template slot-scope="scope">
+                  <el-button type="text" size="mini" @click="getRequirementMaterial1(scope.row)">
+                    运单详情
+                  </el-button>
+                </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>
     </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
     data(){
         return{
@@ -26,25 +54,65 @@ export default {
                 // 表格请求数据的地址
                 requestUrl: "",
             },
+            tableData: [],
+            oldRow1: "",
+            oldRowCount1: 1,
         }
     },
     created(){
-        this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=363"
+        if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode") == "zidonghuabu"||getCookie("orgCode") == "wuliuchuyunzhongxin"){
+            this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458"
+        }else{
+            console.log("cookier"+getCookie("userId"))
+            this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458&orgCode="+getCookie("userId");
+        }
+        
     },
     methods:{
-        onclick(){
-            this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=363&con="+this.inputText;
+        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.orderId);
+        },
+        onclick(){
+            this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458&orgCode="+getCookie("userId")+"&con="+this.inputText;
+        },
+        getMaterial(orderId){
+            console.log(orderId)
+            this.axios.post("/api/v1/oms/getPauseTimeTaskDetail/" + orderId).then((res) => {
+                console.log(res)
+                this.tableData = res.data.data
+            })
+        },
     }
 }
 </script>
 <style lang="scss">
     .sale{
-        .top{
-            width: 100%;height: 5rem;
-            display: flex;
-            align-items: center;
-            padding-left: 2.5rem;
+        .top {
+            padding: 1.25rem 1.875rem;
+            .el-input{
+            width: 20%;
+            }
         }
     }
 </style>

+ 1 - 0
src/views/inward/components/truckOrder/decomposePlan.vue

@@ -339,6 +339,7 @@ export default {
           planId:Number(this.$route.params.planId),
           orderType:11,
           carrierId:this.carrierId,
+          userId:getCookie("userId"),
           mapList:this.$refs.xTable.getInsertRecords()
       };
       this.axios

+ 1 - 1
src/views/statisticalReport/components/inwardReport/inwardFactory.vue

@@ -75,7 +75,7 @@ export default {
       }
       if(startTime && endTime){
         if(startTime < endTime){
-          this.option.requestUrl = '/api/v1/tms/getPurInwardReport?apiId=441' + "&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          this.option.requestUrl = '/api/v1/tms/getInwardReport?apiId=441' + "&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
         }else{
           this.startTime = null;
           this.endTime = null;

+ 110 - 0
src/views/statisticalReport/components/sporadicReport/inwardSporadicReport.vue

@@ -0,0 +1,110 @@
+<template>
+  <div class="purchasFuelNewMonitor">
+    <div class="frameCalculation">
+      <span>净重时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <span style="margin-left: 1rem;">首次/二次合计净重:</span>
+      <el-input v-model="totalNumberFrist" :disabled="true" style="width: 140px;"></el-input>
+      <span style="margin-left: 1rem;">合计车数:</span>
+      <el-input v-model="totalCapacity" :disabled="true" style="width: 100px;"></el-input>
+    </div>
+    <div class="table">
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
+    </div>
+  </div>
+</template>
+
+<script>
+import { sjTime } from '@/utils/sharedJsFile';
+import { getCookie } from '@/utils/util.js';
+export default {
+  data() {
+    return {
+      totalNumberSecond:null,
+      totalNumberFrist:null,
+      totalCapacity:null,
+      option: {
+        requestUrl: "",
+      },
+      startTime: null,
+      endTime: null,
+      tableTitle:'零星出厂统计报表'
+    };
+  }, 
+  created(){
+          this.option.requestUrl = '/api/v1/tms/getLXInwardReport?apiId=457&startTime=null&endTime=null&i=' +new Date()
+  },
+  methods: {
+    func(res){
+        console.log(res)
+        var resultNetWeightTotalFirst = 0
+        var resultNetWeightTotalSecond = 0
+        var currentCapacityTotal = 0
+        res.list.forEach(e => {
+          currentCapacityTotal++
+          resultNetWeightTotalFirst = resultNetWeightTotalFirst+e.netWeightFirst
+          resultNetWeightTotalSecond = resultNetWeightTotalSecond + e.netWeightSecond
+        });
+        this.totalNumberFrist = resultNetWeightTotalFirst.toFixed(2) + "t" + "/" + resultNetWeightTotalSecond.toFixed(2) + "t"
+        this.totalCapacity = currentCapacityTotal;
+    },
+    getRequestUrl(){
+        this.option.requestUrl = '/api/v1/tms/getLXInwardReport?apiId=457&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/getLXInwardReport?apiId=457' + "&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

@@ -20,6 +20,7 @@ import inwardFactory from '../components/inwardReport/inwardFactory.vue'
 import getLoading from '../components/inwardReport/getLoading.vue'
 import getUnLoading from '../components/inwardReport/getUnLoading.vue'
 import purchaseMineral from '../components/purachaseMineral.vue'
+import inwardSporadicReport from '../components/sporadicReport/inwardSporadicReport.vue'
 
 
 Vue.use(Router)
@@ -45,11 +46,11 @@ const constantRouterMap = [
       {path: 'inwardFactory', name: 'inwardFactory', meta: {code: 'xtpzgl-yhgl'}, component: inwardFactory},
       {path: 'getLoading', name: 'getLoading', meta: {code: 'xtpzgl-yhgl'}, component: getLoading},
       {path: 'getUnLoading', name: 'getUnLoading', meta: {code: 'xtpzgl-yhgl'}, component: getUnLoading},
-      {path: 'purchaseMineral', name: 'purchaseMineral', meta: {code: 'xtpzgl-yhgl'}, component: purchaseMineral}
+      {path: 'purchaseMineral', name: 'purchaseMineral', meta: {code: 'xtpzgl-yhgl'}, component: purchaseMineral},
+      {path: 'inwardSporadicReport', name: 'inwardSporadicReport', meta: {code: 'xtpzgl-yhgl'}, component: inwardSporadicReport}
     ]
   }
 ];
-
 const router = new Router({
   routes: constantRouterMap
 })