|
|
|
@ -25,10 +25,16 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div style="text-align: center">
|
|
|
|
|
<el-button type="primary" @click="getMaterials">领柜体</el-button>
|
|
|
|
|
<el-button v-if="($route.query && $route.query.id) === '2'" type="info" @click="handleBindBarcode">绑定</el-button>
|
|
|
|
|
<el-button v-if="($route.query && $route.query.id) === '2'" type="warning" @click="handleRawBack">返库</el-button>
|
|
|
|
|
<el-button :disabled="form.planDetailStatus === '已完成'" type="primary" @click="finish">完成</el-button>
|
|
|
|
|
<el-button type="success" v-if="(!$route.query || $route.query.id!=='2')" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="getMaterials('0')">领料
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="primary" v-if="($route.query && $route.query.id) === '2'" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="getMaterials('1')">
|
|
|
|
|
领柜体
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button v-if="($route.query && $route.query.id) === '2'" type="info" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="handleBindBarcode">绑定
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button v-if="($route.query && $route.query.id) === '2'" type="warning" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="handleRawBack">返库
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" type="primary" @click="finish">完成</el-button>
|
|
|
|
|
<el-popover
|
|
|
|
|
v-if="($route.query && $route.query.id) === '2'"
|
|
|
|
|
v-model="assignModel"
|
|
|
|
@ -42,7 +48,9 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="工位">
|
|
|
|
|
<el-radio-group v-model="assignTaskForm.stationId">
|
|
|
|
|
<el-radio v-for="i in stationData" :label="i.stationId" :value="i.stationId" :key="i.stationId">{{i.stationName}}</el-radio>
|
|
|
|
|
<el-radio v-for="i in stationData" :label="i.stationId" :value="i.stationId" :key="i.stationId">
|
|
|
|
|
{{ i.stationName }}
|
|
|
|
|
</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
@ -203,7 +211,7 @@
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
:visible.sync="dialogVisible"
|
|
|
|
|
title="领柜体"
|
|
|
|
|
:title="applyMaterialTitle"
|
|
|
|
|
width="40%">
|
|
|
|
|
<el-form ref="form" :model="form1" label-width="100px">
|
|
|
|
|
<el-form-item label="工单编号">
|
|
|
|
@ -212,13 +220,13 @@
|
|
|
|
|
<el-form-item label="明细编号">
|
|
|
|
|
<el-input v-model="form1.planDetailCode" disabled></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="领柜体仓库">
|
|
|
|
|
<el-select v-model="form1.warehouseId" placeholder="请选择领柜体仓库" @change="warehouseChange">
|
|
|
|
|
<el-form-item label="仓库">
|
|
|
|
|
<el-select v-model="form1.warehouseId" placeholder="请选择仓库" @change="warehouseChange">
|
|
|
|
|
<el-option v-for="item in warehouseList" :key="item.warehouseId" :label="item.warehouseName"
|
|
|
|
|
:value="item.warehouseId"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="领柜体原因">
|
|
|
|
|
<el-form-item label="领取原因">
|
|
|
|
|
<el-input v-model="form1.applyReason" type="textarea"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
@ -258,7 +266,7 @@
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="scope.row.planAmount"
|
|
|
|
|
:min="1"
|
|
|
|
|
disabled="true"
|
|
|
|
|
:disabled="planAmountDisabled"
|
|
|
|
|
controls-position="right"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
>
|
|
|
|
@ -293,8 +301,6 @@
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
:visible.sync="bindBarcodeVisible"
|
|
|
|
|
title="柜体绑定"
|
|
|
|
@ -413,6 +419,10 @@ export default {
|
|
|
|
|
nowNum1: 1,
|
|
|
|
|
totalNum1: 0,
|
|
|
|
|
getMaterialsModel: false,
|
|
|
|
|
applyMaterialTitle: '',
|
|
|
|
|
planAmount : null,
|
|
|
|
|
planAmountDisabled : true,
|
|
|
|
|
taskType:'',
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
form: {},
|
|
|
|
|
form1: {},
|
|
|
|
@ -422,10 +432,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
assignTaskRules: {
|
|
|
|
|
materialBarcode: [
|
|
|
|
|
{ required: true, message: "物料条码不能为空", trigger: "blur" }
|
|
|
|
|
{required: true, message: "物料条码不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
stationId: [
|
|
|
|
|
{ required: true, message: "工位不能为空", trigger: "change" }
|
|
|
|
|
{required: true, message: "工位不能为空", trigger: "change"}
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
submitAssignLoading: false,
|
|
|
|
@ -469,10 +479,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
bindBarcodeRules: {
|
|
|
|
|
productBarcode: [
|
|
|
|
|
{ required: true, message: "成品条码不能为空", trigger: "blur" }
|
|
|
|
|
{required: true, message: "成品条码不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
materialBarcode: [
|
|
|
|
|
{ required: true, message: "物料条码不能为空", trigger: "blur" }
|
|
|
|
|
{required: true, message: "物料条码不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -483,10 +493,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
rawBackRules: {
|
|
|
|
|
materialBarcode: [
|
|
|
|
|
{ required: true, message: "物料条码不能为空", trigger: "blur" }
|
|
|
|
|
{required: true, message: "物料条码不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
warehouseId: [
|
|
|
|
|
{ required: true, message: "仓库不能为空", trigger: "change" }
|
|
|
|
|
{required: true, message: "仓库不能为空", trigger: "change"}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -722,19 +732,18 @@ export default {
|
|
|
|
|
resetAssignTask() {
|
|
|
|
|
this.assignTaskForm = {
|
|
|
|
|
materialBarcode: null,
|
|
|
|
|
stationNo:null
|
|
|
|
|
stationNo: null
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("assignTaskForm");
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
cancelAssignTask(){
|
|
|
|
|
cancelAssignTask() {
|
|
|
|
|
this.assignModel = false;
|
|
|
|
|
this.submitAssignLoading = false;
|
|
|
|
|
this.resetAssignTask();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
completeStation() {
|
|
|
|
|
this.submitAssignLoading = true;
|
|
|
|
|
this.$refs["assignTaskForm"].validate(valid => {
|
|
|
|
@ -751,7 +760,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getInfo(e) {
|
|
|
|
|
this.$refs.chart1_1.setData({
|
|
|
|
|
series: [
|
|
|
|
@ -1109,7 +1117,19 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 领柜体页面
|
|
|
|
|
getMaterials() {
|
|
|
|
|
getMaterials(returnFlag) {
|
|
|
|
|
if (returnFlag == '1') {
|
|
|
|
|
this.applyMaterialTitle = "领柜体";
|
|
|
|
|
this.planAmount = 1;
|
|
|
|
|
this.planAmountDisabled = true;
|
|
|
|
|
this.taskType = '2';//拆分出库
|
|
|
|
|
} else {
|
|
|
|
|
this.applyMaterialTitle = "领料";
|
|
|
|
|
this.planAmount = null;
|
|
|
|
|
this.planAmountDisabled = false;
|
|
|
|
|
this.taskType='1';//生产领料
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.searchMaterialValue = ''
|
|
|
|
|
this.dialogVisible = true
|
|
|
|
|
this.form1 = {
|
|
|
|
@ -1122,18 +1142,18 @@ export default {
|
|
|
|
|
wmsRawOutstockDetailList: []
|
|
|
|
|
}
|
|
|
|
|
// 获取仓库信息
|
|
|
|
|
getWarehouses({"warehouseFloor": 5,"returnFlag":1}).then(e => {
|
|
|
|
|
getWarehouses({"warehouseFloor": 5, "returnFlag": returnFlag}).then(e => {
|
|
|
|
|
this.warehouseList = e.data
|
|
|
|
|
this.form1.warehouseId = e.data[0]?.warehouseId
|
|
|
|
|
this.searchMaterial("");
|
|
|
|
|
this.searchMaterial();
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 物料搜索
|
|
|
|
|
searchMaterial(val) {
|
|
|
|
|
if(this.form1.warehouseId==null || this.form1.warehouseId == undefined
|
|
|
|
|
|| this.form1.warehouseId==""){
|
|
|
|
|
if (this.form1.warehouseId == null || this.form1.warehouseId == undefined
|
|
|
|
|
|| this.form1.warehouseId == "") {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
getStockTotal({
|
|
|
|
@ -1147,7 +1167,7 @@ export default {
|
|
|
|
|
materialName: r.materialName,
|
|
|
|
|
availableAmount: r.totalAmount - r.occupyAmount - r.frozenAmount,
|
|
|
|
|
unavailableAmount: r.occupyAmount + r.frozenAmount,
|
|
|
|
|
planAmount: 1
|
|
|
|
|
planAmount: this.planAmount
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
@ -1161,7 +1181,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
receiveMaterial() {
|
|
|
|
|
this.form1.taskType = '2';//拆分出库
|
|
|
|
|
this.form1.taskType = this.taskType;
|
|
|
|
|
applyRawOutstock(this.form1).then(e => {
|
|
|
|
|
if (e.code === 200) {
|
|
|
|
|
this.dialogVisible = false
|
|
|
|
@ -1199,7 +1219,7 @@ export default {
|
|
|
|
|
this.bindBarcodeVisible = true;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
submitBindBarcode(){
|
|
|
|
|
submitBindBarcode() {
|
|
|
|
|
this.$refs["bindBarcodeForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
bindBarcode(this.bindBarcodeForm).then(response => {
|
|
|
|
@ -1210,7 +1230,7 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
cancelBindBarcode(){
|
|
|
|
|
cancelBindBarcode() {
|
|
|
|
|
this.bindBarcodeVisible = false;
|
|
|
|
|
this.resetBindBarcode();
|
|
|
|
|
},
|
|
|
|
@ -1220,7 +1240,7 @@ export default {
|
|
|
|
|
resetRawBack() {
|
|
|
|
|
this.rawBackForm = {
|
|
|
|
|
materialBarcode: null,
|
|
|
|
|
warehouseId:null
|
|
|
|
|
warehouseId: null
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("rawBackForm");
|
|
|
|
|
},
|
|
|
|
@ -1229,12 +1249,12 @@ export default {
|
|
|
|
|
handleRawBack(scope) {
|
|
|
|
|
this.resetRawBack();
|
|
|
|
|
// 获取仓库信息
|
|
|
|
|
if(this.warehouseList==null || this.warehouseList.length==0){
|
|
|
|
|
getWarehouses({"warehouseFloor": 5,"returnFlag":1}).then(e => {
|
|
|
|
|
if (this.warehouseList == null || this.warehouseList.length == 0) {
|
|
|
|
|
getWarehouses({"warehouseFloor": 5, "returnFlag": 1}).then(e => {
|
|
|
|
|
this.warehouseList = e.data
|
|
|
|
|
this.rawBackForm.warehouseId = this.warehouseList[0]?.warehouseId
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.rawBackForm.warehouseId = this.warehouseList[0]?.warehouseId
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1242,7 +1262,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submitRawBack(){
|
|
|
|
|
submitRawBack() {
|
|
|
|
|
this.$refs["rawBackForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
applyRawBack(this.rawBackForm).then(response => {
|
|
|
|
@ -1253,7 +1273,7 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
cancelRawBack(){
|
|
|
|
|
cancelRawBack() {
|
|
|
|
|
this.rawBackVisible = false;
|
|
|
|
|
this.resetRawBack();
|
|
|
|
|
}
|
|
|
|
|