胡半仙 3 лет назад
Родитель
Сommit
ccb8f9f70d

+ 0 - 1
config/index.js

@@ -66,7 +66,6 @@ let proxyTable = {
   "/api/v1": {
     // target: "http://172.16.33.166:8080",
     target: "http://localhost:8019",
-
     // target: "http://192.168.1.114:8019",
     ws: true,
     pathRewrite: {

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

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

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

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

+ 49 - 62
src/views/WMS/components/steel/steel_inbound.vue

@@ -2,11 +2,18 @@
 <template>
   <div class="steel_inbound">
     <div class="sache">
-      <el-input
+      <!-- <el-input
         placeholder="请输入内容"
         v-model="inputText"
         clearable>
       </el-input>
+       -->
+      <span>入库时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -15,95 +22,75 @@
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options" @selection-change="selectionChange" ref="table">
-        <el-table-column fixed="right" label="操作" width="150">
+      <dilTable v-bind.sync="options" >
+        <!-- <el-table-column fixed="right" label="操作" width="150">
 								<template slot-scope="scope">
 									<el-button type="text" size="mini" @click="inboundDetails(scope)">
 										详情
 									</el-button>
 								</template>
-							</el-table-column>
+				</el-table-column> -->
       </dilTable>
     </div>
   </div>
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from '@/utils/util.js';
 export default {
   data(){
     return{
       inputText:"",
+      startTime: null,
+      endTime: null,
       options:{
         // first请求数据的地址
         requestUrl: "/api/v1/wms/getWmsInboundResult?apiId=371",
-        selectionType: "select",
-        mapList: [],
+        // selectionType: "select",
+        // mapList: [],
       },
     }
   },
   methods:{
-    inboundDetails(scope){
-      	this.$router.push("/inboundDetails/" + scope.row.inboundId)
-      	
-    },
+    // inboundDetails(scope){
+    //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
+    // },
     onclick(){
-      console.log("点击事件");
+
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
+          this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
+          this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          }else{
+          this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+        this.getRequestUrl()
+      }
     },
     selectionChange(selection) {
       this.options.mapList = selection;
     },
     onreserved(){
-      console.log("fahaahahahaha")
-      if (this.options.mapList.length == 0) {
-        this.$message({
-          type: "warning",
-          message: "请先选择入库单!",
-        });
-      } else {
-        this.$confirm("是否预留", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-          center: true,
-        })
-          .then(() => {
-            //初始化maplist
-            var mapList = [];
-            this.options.mapList.forEach((item, i) => {
-              //初始化mapItem
-              var mapItem = {
-                //入库实绩表id
-                inboundId: 0,
-                // 给一个标记定义其为入库变为预留
-                status: 0,
-              };
-              mapItem.inboundId = item.inboundId;
-              mapList.push(mapItem);
-            });
-            this.$message({
-              type: "success",
-              message: "预留成功!",
-            });
-            console.log(mapList)
-            this.axios.post("/api/v1/wms/changeReserved", mapList).then((res) => {
-              console.log("res.data"+res.data)
-              if (res.data >= 1) {
-                //改变查询条件
-                this.$refs.table.setDataRequestQuery({
-                  
-                });  
-                this.$router.go(0);
-              }
-            });
-            console.log("fdagfaahh")
-          })
-          .catch(() => {
-            this.$message({
-              type: "info",
-              message: "取消上传!",
-            });
-          });
-      }
+      this.$router.push({
+        path: "/addSteelInbound",
+      });
     }
   }
 }

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

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

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

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

+ 2 - 2
src/views/WMS/components/steel/steel_real.vue

@@ -9,13 +9,13 @@
 			</el-button>
 		</div>
   <dilTable v-bind.sync="option">
-      <el-table-column fixed="right" label="操作" width="110">
+      <!-- <el-table-column fixed="right" label="操作" width="110">
         <template slot-scope="scope">
           <el-button @click="demotionClick(scope.row.gridId)" type="text" size="small"
             >物资不合格</el-button
           >
         </template>
-      </el-table-column>
+      </el-table-column> -->
     </dilTable>
     </div>
 </template>

+ 24 - 62
src/views/WMS/components/steel/steel_reserved.vue

@@ -1,4 +1,4 @@
-//查询预留
+//预留转入库
 <template>
   <div class="steel_inbound">
     <div class="sache">
@@ -7,6 +7,13 @@
         v-model="inputText"
         clearable>
       </el-input>
+      
+      <!-- <span>入库时间:</span>
+      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker> -->
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -15,95 +22,50 @@
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options" @selection-change="selectionChange" ref="table">
-        <el-table-column fixed="right" label="操作" width="150">
+      <dilTable v-bind.sync="options" >
+        <!-- <el-table-column fixed="right" label="操作" width="150">
 								<template slot-scope="scope">
 									<el-button type="text" size="mini" @click="inboundDetails(scope)">
 										详情
 									</el-button>
 								</template>
-							</el-table-column>
+				</el-table-column> -->
       </dilTable>
     </div>
   </div>
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from '@/utils/util.js';
 export default {
   data(){
     return{
       inputText:"",
+      startTime: null,
+      endTime: null,
       options:{
         // first请求数据的地址
         requestUrl: "/api/v1/wms/getWmsReservedResult?apiId=371",
-        selectionType: "select",
-        mapList: [],
+        // selectionType: "select",
+        // mapList: [],
       },
     }
   },
   methods:{
-    inboundDetails(scope){
-      	this.$router.push("/inboundDetails/" + scope.row.inboundId)
-      	
-    },
+    // inboundDetails(scope){
+    //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
+    // },
     onclick(){
-      console.log("点击事件");
+      this.options.requestUrl= "/api/v1/wms/getWmsReservedResult?apiId=371&con="+this.inputText;
     },
     selectionChange(selection) {
       this.options.mapList = selection;
     },
     onreserved(){
-      console.log("fahaahahahaha")
-      if (this.options.mapList.length == 0) {
-        this.$message({
-          type: "warning",
-          message: "请先选择入库单!",
-        });
-      } else {
-        this.$confirm("是否预留", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-          center: true,
-        })
-          .then(() => {
-            //初始化maplist
-            var mapList = [];
-            this.options.mapList.forEach((item, i) => {
-              //初始化mapItem
-              var mapItem = {
-                //入库实绩表id
-                inboundId: 0,
-                // 给一个标记定义其为预留变为入库
-                status: 1,
-              };
-              mapItem.inboundId = item.inboundId;
-              mapList.push(mapItem);
-            });
-            this.$message({
-              type: "success",
-              message: "预留成功!",
-            });
-            console.log(mapList)
-            this.axios.post("/api/v1/wms/changeReserved", mapList).then((res) => {
-              console.log("res.data"+res.data)
-              if (res.data >= 1) {
-                //改变查询条件
-                this.$refs.table.setDataRequestQuery({
-                  
-                });  
-                this.$router.go(0);
-              }
-            });
-            console.log("fdagfaahh")
-          })
-          .catch(() => {
-            this.$message({
-              type: "info",
-              message: "取消上传!",
-            });
-          });
-      }
+      this.$router.push({
+        path: "/addSteelReserved",
+      });
     }
   }
 }

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

@@ -27,6 +27,7 @@ import insertTransfer from '../components/steel/insertTransfer.vue'
 import steel_check from '../components/steel/steel_check.vue'
 import steel_close from '../components/steel/steel_close.vue'
 import steel_inbound from '../components/steel/steel_inbound.vue'
+import steel_inboundReal from '../components/steel/steel_inboundReal.vue'
 import steel_reserved from '../components/steel/steel_reserved.vue'
 import steel_outbound from '../components/steel/steel_outbound.vue'
 import steel_real from '../components/steel/steel_real.vue'
@@ -38,6 +39,8 @@ import steel_sendreceive from '../components/steel/steel_sendreceive.vue'
 import steel_transfer from '../components/steel/steel_transfer.vue'
 import steel_checkWarehouse from '../components/steel/checkWarehouse.vue'
 import steel_addCheckWarehouse from '../components/steel/addCheckWarehouse.vue'
+import addSteelInbound from '../components/steel/addSteelInbound.vue'
+import addSteelReserved from '../components/steel/addSteelReserved.vue'
 Vue.use(Router)
 const constantRouterMap = [
 	{
@@ -69,6 +72,7 @@ const constantRouterMap = [
 		{path: 'steel_check', name: 'steel_check', meta: {code: 'xtpzgl-yhgl'}, component: steel_check},
 		{path: 'steel_close', name: 'steel_close', meta: {code: 'xtpzgl-yhgl'}, component: steel_close},
 		{path: 'steel_inbound', name: 'steel_inbound', meta: {code: 'xtpzgl-yhgl'}, component: steel_inbound},
+		{path: 'steel_inboundReal', name: 'steel_inboundReal', meta: {code: 'xtpzgl-yhgl'}, component: steel_inboundReal},
 		{path: 'steel_reserved', name: 'steel_reserved', meta: {code: 'xtpzgl-yhgl'}, component: steel_reserved},
 		{path: 'steel_outbound', name: 'steel_outbound', meta: {code: 'xtpzgl-yhgl'}, component: steel_outbound},
 		{path: 'steel_real', name: 'steel_real', meta: {code: 'xtpzgl-yhgl'}, component: steel_real},
@@ -80,6 +84,8 @@ const constantRouterMap = [
 		{path: 'steel_transfer', name: 'steel_transfer', meta: {code: 'xtpzgl-yhgl'}, component: steel_transfer},
 		{path: 'steel_checkWarehouse', name: 'steel_checkWarehouse', meta: {code: 'xtpzgl-yhgl'}, component: steel_checkWarehouse},
 		{path: 'steel_addCheckWarehouse', name: 'steel_addCheckWarehouse', meta: {code: 'xtpzgl-yhgl'}, component: steel_addCheckWarehouse},
+		{path: 'addSteelInbound', name: 'addSteelInbound', meta: {code: 'xtpzgl-yhgl'}, component: addSteelInbound},
+		{path: 'addSteelReserved', name: 'addSteelReserved', meta: {code: 'xtpzgl-yhgl'}, component: addSteelReserved},
 	  ]
 	}
   ];