zx vor 3 Jahren
Ursprung
Commit
067d28ca60

+ 1 - 3
build/utils.js

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

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

@@ -10,9 +10,12 @@
       <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">
+      <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)">
@@ -33,6 +36,8 @@ export default {
       options:{
         // first请求数据的地址
         requestUrl: "/api/v1/wms/getWmsInboundResult?apiId=371",
+        selectionType: "select",
+        mapList: [],
       },
     }
   },
@@ -43,6 +48,62 @@ export default {
     },
     onclick(){
       console.log("点击事件");
+    },
+    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: "取消上传!",
+            });
+          });
+      }
     }
   }
 }

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

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

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

@@ -0,0 +1,121 @@
+//查询预留
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <el-input
+        placeholder="请输入内容"
+        v-model="inputText"
+        clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <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>
+export default {
+  data(){
+    return{
+      inputText:"",
+      options:{
+        // first请求数据的地址
+        requestUrl: "/api/v1/wms/getWmsReservedResult?apiId=371",
+        selectionType: "select",
+        mapList: [],
+      },
+    }
+  },
+  methods:{
+    inboundDetails(scope){
+      	this.$router.push("/inboundDetails/" + scope.row.inboundId)
+      	
+    },
+    onclick(){
+      console.log("点击事件");
+    },
+    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: "取消上传!",
+            });
+          });
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scode>
+.steel_inbound{
+  .sache{
+    height: 5rem;
+    display: flex;
+    align-items: center;
+    padding-left: 1.875rem;
+  }
+}
+</style>

+ 2 - 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_reserved from '../components/steel/steel_reserved.vue'
 import steel_outbound from '../components/steel/steel_outbound.vue'
 import steel_real from '../components/steel/steel_real.vue'
 import steel_realDown from '../components/steel/steel_realDown.vue'
@@ -68,6 +69,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_reserved', name: 'steel_reserved', meta: {code: 'xtpzgl-yhgl'}, component: steel_reserved},
 		{path: 'steel_outbound', name: 'steel_outbound', meta: {code: 'xtpzgl-yhgl'}, component: steel_outbound},
 		{path: 'steel_real', name: 'steel_real', meta: {code: 'xtpzgl-yhgl'}, component: steel_real},
 		{path: 'steel_realDown/gridId', name: 'steel_realDown', meta: {code: 'xtpzgl-yhgl'}, component: steel_realDown},