|
@@ -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(){
|