|
|
|
@ -221,7 +221,7 @@
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-button type="primary">首页</el-button>
|
|
|
|
<el-button type="primary">首页</el-button>
|
|
|
|
<el-button type="success" @click="handleProductInstock">成品入库</el-button>
|
|
|
|
<el-button type="success" @click="handleProductInstock">成品入库</el-button>
|
|
|
|
<!--el-button type="warning" @click="connectSerialPort" ref="connectSerialBtn">连接条码枪</el-button-->
|
|
|
|
<el-button type="warning" @click="handleProductOutstock">成品出库</el-button>
|
|
|
|
<!--el-button type="info">最小化</el-button-->
|
|
|
|
<!--el-button type="info">最小化</el-button-->
|
|
|
|
<el-button type="danger" @click="logout">退出</el-button>
|
|
|
|
<el-button type="danger" @click="logout">退出</el-button>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
@ -329,7 +329,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
<el-dialog
|
|
|
|
:visible.sync="productInstockVisible"
|
|
|
|
:visible.sync="productInstockVisible"
|
|
|
|
title="成品入库"
|
|
|
|
:title="productInstockTitle"
|
|
|
|
width="40%">
|
|
|
|
width="40%">
|
|
|
|
<el-form ref="productInstockForm" :model="productInstockForm" :rules="productInstockRules" label-width="80px">
|
|
|
|
<el-form ref="productInstockForm" :model="productInstockForm" :rules="productInstockRules" label-width="80px">
|
|
|
|
<el-form-item label="成品条码" prop="materialBarcode">
|
|
|
|
<el-form-item label="成品条码" prop="materialBarcode">
|
|
|
|
@ -378,7 +378,8 @@
|
|
|
|
<el-input v-model="returnModelForm.materialName" autocomplete="off" disabled></el-input>
|
|
|
|
<el-input v-model="returnModelForm.materialName" autocomplete="off" disabled></el-input>
|
|
|
|
</el-form-item-->
|
|
|
|
</el-form-item-->
|
|
|
|
<el-form-item label="物料条码">
|
|
|
|
<el-form-item label="物料条码">
|
|
|
|
<el-input placeholder="请扫描或输入物料条码" v-model="returnModelForm.materialBarcode" suffix-icon="el-icon-full-screen">
|
|
|
|
<el-input placeholder="请扫描或输入物料条码" v-model="returnModelForm.materialBarcode"
|
|
|
|
|
|
|
|
suffix-icon="el-icon-full-screen">
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="仓库">
|
|
|
|
<el-form-item label="仓库">
|
|
|
|
@ -388,7 +389,8 @@
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="数量" prop="planAmount">
|
|
|
|
<el-form-item label="数量" prop="planAmount">
|
|
|
|
<el-input-number v-model="returnModelForm.planAmount" controls-position="right" :min="1" style="width: 260px"></el-input-number>
|
|
|
|
<el-input-number v-model="returnModelForm.planAmount" controls-position="right" :min="1"
|
|
|
|
|
|
|
|
style="width: 260px"></el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="退库类型" prop="taskType">
|
|
|
|
<el-form-item label="退库类型" prop="taskType">
|
|
|
|
<el-select v-model="returnModelForm.taskType" placeholder="请选择退库类型" style="width: 260px">
|
|
|
|
<el-select v-model="returnModelForm.taskType" placeholder="请选择退库类型" style="width: 260px">
|
|
|
|
@ -421,6 +423,8 @@ import {
|
|
|
|
insertProductPlanDetails,
|
|
|
|
insertProductPlanDetails,
|
|
|
|
startProductPlanDetail,
|
|
|
|
startProductPlanDetail,
|
|
|
|
fourthFloorProduceInstock,
|
|
|
|
fourthFloorProduceInstock,
|
|
|
|
|
|
|
|
check4thFloorProduceOutstock,
|
|
|
|
|
|
|
|
fourthFloorProduceOutstock,
|
|
|
|
scanMaterial2Confirm, applyRawReturn
|
|
|
|
scanMaterial2Confirm, applyRawReturn
|
|
|
|
} from "@/api/board";
|
|
|
|
} from "@/api/board";
|
|
|
|
import {monitorSerialData} from "@/utils/serial"
|
|
|
|
import {monitorSerialData} from "@/utils/serial"
|
|
|
|
@ -461,7 +465,13 @@ export default {
|
|
|
|
tableData: [],
|
|
|
|
tableData: [],
|
|
|
|
tableData1: [],
|
|
|
|
tableData1: [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
productInstockType: null,//类型,出库还是入库
|
|
|
|
|
|
|
|
PRODUCT_INSTOCK_TYPE: {
|
|
|
|
|
|
|
|
INSTOCK: "1",//入库
|
|
|
|
|
|
|
|
OUTSTOCK: "2",//出库
|
|
|
|
|
|
|
|
},
|
|
|
|
productInstockVisible: false,
|
|
|
|
productInstockVisible: false,
|
|
|
|
|
|
|
|
productInstockTitle:'',
|
|
|
|
productInstockForm: {
|
|
|
|
productInstockForm: {
|
|
|
|
materialBarcode: null
|
|
|
|
materialBarcode: null
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -497,11 +507,11 @@ export default {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
PLAN_DETAIL_STATUS:{
|
|
|
|
PLAN_DETAIL_STATUS: {
|
|
|
|
TO_START : '1',
|
|
|
|
TO_START: '1',
|
|
|
|
STARTED : '2',
|
|
|
|
STARTED: '2',
|
|
|
|
FINISHED : '3',
|
|
|
|
FINISHED: '3',
|
|
|
|
ABNORMAL_FINISHED : '9'
|
|
|
|
ABNORMAL_FINISHED: '9'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -764,8 +774,6 @@ export default {
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async logout() {
|
|
|
|
async logout() {
|
|
|
|
this.$confirm('确定退出系统吗?', '提示', {
|
|
|
|
this.$confirm('确定退出系统吗?', '提示', {
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
@ -912,7 +920,7 @@ export default {
|
|
|
|
wmsRawOutstockDetailList: []
|
|
|
|
wmsRawOutstockDetailList: []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 获取仓库信息
|
|
|
|
// 获取仓库信息
|
|
|
|
getWarehouses({"warehouseFloor": 4,"mesAreaType" : 4}).then(e => {
|
|
|
|
getWarehouses({"warehouseFloor": 4, "mesAreaType": 4}).then(e => {
|
|
|
|
this.warehouseList = e.data
|
|
|
|
this.warehouseList = e.data
|
|
|
|
this.form.warehouseId = e.data[0]?.warehouseId
|
|
|
|
this.form.warehouseId = e.data[0]?.warehouseId
|
|
|
|
this.searchMaterial("");
|
|
|
|
this.searchMaterial("");
|
|
|
|
@ -977,6 +985,19 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
/** 成品入库按钮操作 */
|
|
|
|
/** 成品入库按钮操作 */
|
|
|
|
handleProductInstock() {
|
|
|
|
handleProductInstock() {
|
|
|
|
|
|
|
|
this.productInstockTitle = "成品入库";
|
|
|
|
|
|
|
|
this.productInstockType = this.PRODUCT_INSTOCK_TYPE.INSTOCK;
|
|
|
|
|
|
|
|
this.handleProductStock();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 成品出库按钮操作 */
|
|
|
|
|
|
|
|
handleProductOutstock() {
|
|
|
|
|
|
|
|
this.productInstockTitle = "成品出库";
|
|
|
|
|
|
|
|
this.productInstockType = this.PRODUCT_INSTOCK_TYPE.OUTSTOCK;
|
|
|
|
|
|
|
|
this.handleProductStock();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleProductStock() {
|
|
|
|
this.resetProductInstock();
|
|
|
|
this.resetProductInstock();
|
|
|
|
this.productInstockVisible = true;
|
|
|
|
this.productInstockVisible = true;
|
|
|
|
if (!this.checkSerialConnected()) {
|
|
|
|
if (!this.checkSerialConnected()) {
|
|
|
|
@ -993,22 +1014,28 @@ export default {
|
|
|
|
showCancelButton: true,
|
|
|
|
showCancelButton: true,
|
|
|
|
type: 'warning'
|
|
|
|
type: 'warning'
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
console.log("dddd")
|
|
|
|
|
|
|
|
this.connectSerial(this.setSerialData);
|
|
|
|
this.connectSerial(this.setSerialData);
|
|
|
|
}).catch(() => {
|
|
|
|
}).catch(() => {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submitProductInstock() {
|
|
|
|
submitProductInstock() {
|
|
|
|
this.$refs["productInstockForm"].validate(valid => {
|
|
|
|
this.$refs["productInstockForm"].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
if (this.productInstockType === this.PRODUCT_INSTOCK_TYPE.INSTOCK) {
|
|
|
|
fourthFloorProduceInstock(this.productInstockForm).then(response => {
|
|
|
|
fourthFloorProduceInstock(this.productInstockForm).then(response => {
|
|
|
|
this.$modal.msgSuccess("入库成功");
|
|
|
|
this.$modal.msgSuccess("入库成功");
|
|
|
|
this.cancelProductInstock();
|
|
|
|
this.cancelProductInstock();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
} else if (this.productInstockType === this.PRODUCT_INSTOCK_TYPE.OUTSTOCK) {
|
|
|
|
|
|
|
|
check4thFloorProduceOutstock(this.productInstockForm.materialBarcode).then(response => {
|
|
|
|
|
|
|
|
fourthFloorProduceOutstock(this.productInstockForm).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("出库成功");
|
|
|
|
|
|
|
|
this.cancelProductInstock();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -1096,7 +1123,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setReturnModelForm() {
|
|
|
|
setReturnModelForm() {
|
|
|
|
getWarehouses({
|
|
|
|
getWarehouses({
|
|
|
|
mesAreaType : 3, //4楼装配区域
|
|
|
|
mesAreaType: 3, //4楼装配区域
|
|
|
|
//warehouseFloor: 4,
|
|
|
|
//warehouseFloor: 4,
|
|
|
|
//materialBarcode: this.returnModelForm.materialBarcode
|
|
|
|
//materialBarcode: this.returnModelForm.materialBarcode
|
|
|
|
}).then(e => {
|
|
|
|
}).then(e => {
|
|
|
|
@ -1107,7 +1134,7 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if(this.WarehousesList && this.WarehousesList.length>0){
|
|
|
|
if (this.WarehousesList && this.WarehousesList.length > 0) {
|
|
|
|
this.returnModelForm.warehouseId = this.WarehousesList[0].value;
|
|
|
|
this.returnModelForm.warehouseId = this.WarehousesList[0].value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
@ -1161,7 +1188,7 @@ export default {
|
|
|
|
this.materialConfirmForm.materialBarcode = this.serialData;
|
|
|
|
this.materialConfirmForm.materialBarcode = this.serialData;
|
|
|
|
} else if (this.productInstockVisible) {
|
|
|
|
} else if (this.productInstockVisible) {
|
|
|
|
this.productInstockForm.materialBarcode = this.serialData;
|
|
|
|
this.productInstockForm.materialBarcode = this.serialData;
|
|
|
|
} else if(this.returnModelVisible){
|
|
|
|
} else if (this.returnModelVisible) {
|
|
|
|
this.returnModelForm.materialBarcode = this.serialData;
|
|
|
|
this.returnModelForm.materialBarcode = this.serialData;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// console.log(this.serialData)
|
|
|
|
// console.log(this.serialData)
|
|
|
|
|