hujh преди 3 години
родител
ревизия
87d35a110f
променени са 5 файла, в които са добавени 171 реда и са изтрити 26 реда
  1. 1 1
      .eslintrc.js
  2. 2 1
      build/utils.js
  3. 2 2
      config/index.js
  4. 4 2
      src/views/WMS/components/steel/steel_restack.vue
  5. 162 20
      src/views/WMS/components/steel/steel_restackAdd.vue

+ 1 - 1
.eslintrc.js

@@ -57,6 +57,6 @@ module.exports = {
     'no-dupe-args': 2,
     // 不能有声明后未被使用的变量或参数
     'no-unused-vars': 0,
-    "space-before-function-paren": 0
+    'space-before-function-paren': 0
   }
 };

+ 2 - 1
build/utils.js

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

+ 2 - 2
config/index.js

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

+ 4 - 2
src/views/WMS/components/steel/steel_restack.vue

@@ -54,13 +54,15 @@ export default {
       inputText:"",
       first: {
         // 未分配地址
+        // 请求未下发的数据
         requestUrl:
-          "/api/v1/wms/selectRestackList?apiId=370&DistrubtionStatus=0",
+          "/api/v1/wms/selectRestackList?apiId=438&DistrubtionStatus=0",
       },
       second: {
         // second请求数据的地址
+        // 请求已下发的数据
         requestUrl:
-          "/api/v1/wms/selectRestackList?apiId=370&DistrubtionStatus=1",
+          "/api/v1/wms/selectRestackList2?apiId=440&DistrubtionStatus=1",
       },
       //默认显示待下发的标签页
       activeName: "first",

+ 162 - 20
src/views/WMS/components/steel/steel_restackAdd.vue

@@ -1,6 +1,7 @@
 // 新增倒垛作业
 <template>
     <div class="steel_restackAdd">
+         <PageTitle>返回</PageTitle>
         <div class="search">
             <div class="warehouse">
                 <span>仓库名称:</span>
@@ -36,8 +37,80 @@
                     :value="item.value">
                     </el-option>
                 </el-select>
+
+                <el-button type="primary" class="btn" @click="selectMaterial()">新增倒垛单</el-button>
             </div>
         </div>
+        <el-drawer
+            :visible.sync="table"
+            direction="rtl"
+            size="50%"
+            :show-close="false"
+            >
+            <el-button @click="open">取消</el-button>
+            <el-button type="primary" @click="makeSure1">新增</el-button>
+            <div class="warehouse">
+                <span>仓库名称:</span>
+                <el-select v-model="value1" placeholder="请选择" @change="onchange1()">
+                    <el-option
+                    v-for="(item,i) in options1"
+                    :key="i"
+                    :label="item.label"
+                    :value="item.value"
+                    >
+                    </el-option>
+                </el-select>
+            </div>
+            <div class="stack">
+                <span>垛位:</span>
+                <el-select v-model="value2" placeholder="请选择" @change ="onchange2()">
+                    <el-option
+                        v-for="(item,i) in options2"
+                        :key="i"
+                        :label="item.label"
+                        :value="item.value"
+                    >
+                    </el-option>
+                </el-select>
+            </div>
+            <div class="gradationnumber">
+                <span>层次:</span>
+                <el-select v-model="value3" placeholder="请选择" @change="onchange3()">
+                    <el-option
+                    v-for="(item,i) in options3"
+                    :key="i"
+                    :label="item.label"
+                    :value="item.value">
+                    </el-option>
+                </el-select>
+            </div>
+            <div class="stack">
+                <span>新垛位:</span>
+                <el-select v-model="value5" placeholder="请选择" @change ="onchange5()">
+                    <el-option
+                        v-for="(item,i) in options5"
+                        :key="i"
+                        :label="item.label"
+                        :value="item.value"
+                    >
+                    </el-option>
+                </el-select>
+            </div>
+            <div class="tablecls">
+                <!-- 查询所有的物资 -->
+                <dilTable v-bind.sync="option" @selection-change="selectionChange1">
+                    <!-- 操作列 -->
+                <el-table-column fixed="right" label="件数" prop="quantity" width="100">
+                <template slot-scope="scope">
+                    <el-input
+                    class="textinput1"
+                    v-model.number="scope.row.quantity"
+                    ></el-input>
+                </template>
+                </el-table-column>
+                </dilTable>
+            </div>
+        </el-drawer> 
         <div class="table" >
             <dilTable v-bind.sync="options11"  @selection-change="selectionChange"></diltable>
         </div>
@@ -55,7 +128,7 @@
                 </el-select>
             </div>
             <div class="stack">
-                <span>垛位:</span>
+                <span>垛位:</span>
                 <el-select v-model="value5" placeholder="请选择" @change ="onchange5()">
                     <el-option
                         v-for="(item,i) in options5"
@@ -71,10 +144,6 @@
          <div class="table">
             <dilTable v-bind.sync="options" ></diltable>
         </div>
-        <div class="button_box">
-            <el-button @click="cancel">取消</el-button>
-            <el-button type="primary" @click="onClickConfirm()">确定</el-button>
-        </div>
     </div>  
 </template>
 
@@ -83,13 +152,15 @@
 export default {
   data(){
     return{
+      table:false,
+      sselectionList1: [],
       form1:{},
       inputText:"",
-        options11:{
-        // first请求数据的地址
-      requestUrl: "/api/v1/wms/getWmspRestackMakeResultList?apiId=106",
-      selectionType: "select",
-      },
+      options11:{
+        // first请求数据的地址
+        requestUrl: "/api/v1/wms/getWmspRestackMakeResultList?apiId=106",
+        selectionType: "select",
+      },
       options:{
         // first请求数据的地址
       requestUrl: "/api/v1/wms/getWmspRestackMakeResultList?apiId=106",
@@ -111,7 +182,15 @@ export default {
         options5:[],
         // 选中垛位
         value5:'',
-        inf: {}
+        inf: {},
+        // 每个物资型号的件数
+        quantity:[],
+        option: {
+            // 表格请求物资型号
+            requestUrl: "/api/v1/wms/getMaterialTypeList?warehouseid="+this.value1+"&stackingId="+this.value2+"&gradtionNumber="+this.value3+"&apiId=437",
+            // 控制显示多选列
+            selectionType: "select",
+        },
     }
   },
     mounted(){
@@ -120,6 +199,70 @@ export default {
         this.initialization1();
     },
      methods: {
+        //  创建选择物资型号的方法
+        selectMaterial(){
+            this.table =true
+            this.option.requestUrl="/api/v1/wms/getMaterialTypeList?warehouseid="+this.value1+"&stackingId="+this.value2+"&gradtionNumber="+this.value3+"&apiId=437";
+        },
+         // 返回选中的物资信息
+        selectionChange1(selection) {
+            this.selectionList1 = [];
+            this.selectionList1 = selection;
+        },
+         // 新增倒垛单
+        makeSure1() {
+            this.table = false;
+            let maps =this.selectionList1;
+            console.log("maps",maps)
+            if(
+                maps[0]==null 
+            )this.$message.error("存在空值!");
+            else
+            this.axios
+                .post("/api/v1/wms/createRestackMakeResult?keeperId=2&beforeLevel="+this.value3+"&afterStackingId="+this.value5+"&afterWarehouseId="+this.value1+"&afterBeforeStackingId="+this.value2+"&resultRemark="+"",maps)
+                .then((res) => {
+                    if (res.data.code == 200) {
+                        this.$message({
+                        type: "success",
+                        message: "新增成功!",
+                        });
+                        this.$router.go(-1);
+                    }else{
+                        this.$message.error("新增失败,可能存在重复!");
+                    }
+                    });
+        },
+         open() {
+            if (this.selectionList1.length != 0) {
+                this.$confirm("取消会将已选择的数据清空, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+                })
+                .then(() => {
+                    this.selectionList1 = [];
+                    this.table = false;
+                })
+                .catch(() => {});
+            } else {
+                this.table = false;
+            }
+        },
+        //  添加倒垛单
+        toInsert() {
+        this.$router.push({
+          name: 'steel_restackTransfer',
+          params: {
+              mapValue:{
+                valus:"ssss",
+                cangku:this.value1,
+                 duowei:this.value2,
+                 cengci:this.value3
+              }
+              
+          }
+        })
+        },
          //初始化选择仓库垛位
      initialization(){
          this.axios.get('/api/v1/wms/selectWarehouse').then((res)=>{
@@ -149,15 +292,17 @@ export default {
         }else{
             console.log('-----')
             console.log(this.value2)
-            this.options11.requestUrl="/api/v1/wms/getWmspRestackMakeResultList?apiId=106&warehouseid="+this.value1+"&stackingId="+this.value2;        
+        //     this.options11.requestUrl="/api/v1/wms/getWmspRestackMakeResultList?apiId=106&warehouseid="+this.value1+"&stackingId="+this.value2;        
+        //     this.options.requestUrl ="/api/v1/wms/getWmspRestackMakeResultList?apiId=106&warehouseid="+this.value1+"&stackingId="+this.value2;   
+        //    console.log(this.options11.requestUrl)
             //选择仓库层次号
             this.axios.get('/api/v1/wms/selectGardationNumber?warehouseid='+this.value1+'&stackingId='+this.value2).then((res)=>{
             this.options3 = res.data.data;
-            
-            
-         })
+            console.log("层次选择"+this.options3)})
+            console.log("fasdsaf")
     }},
     onchange3(){
+        console.log("change3")
         if(this.value2 == ''||this.value1==''){
             this.$message({
                 message: '请选择仓库和垛位之后!再选择',
@@ -171,8 +316,7 @@ export default {
             "&stackingId="+this.value2+"&gradtionNumber="  + this.value3 
         }
     },
-  
-       onchange4(){
+    onchange4(){
         //  console.log(1);
         //  查询选中的仓库垛位
              this.axios.get('/api/v1/wms/selectStackingId?warehouseid='+this.value1).then((res)=>{
@@ -183,9 +327,7 @@ export default {
          })
      },
      onchange5(){
-             this.options.requestUrl = "/api/v1/wms/getWmspRestackMakeResultList?apiId=106&warehouseid="+this.value1+"&stackingId="+this.value5;    
-       
-            
+        this.options.requestUrl = "/api/v1/wms/getWmspRestackMakeResultList?apiId=106&warehouseid="+this.value1+"&stackingId="+this.value5;    
     },
 
      onclick(){