|
|
@ -176,7 +176,7 @@
|
|
|
|
@click="returnMaterial(scope)"
|
|
|
|
@click="returnMaterial(scope)"
|
|
|
|
v-if="scope.row.planDetailStatus !== PLAN_DETAIL_STATUS.TO_START"
|
|
|
|
v-if="scope.row.planDetailStatus !== PLAN_DETAIL_STATUS.TO_START"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
退料
|
|
|
|
退库
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
@ -358,7 +358,7 @@
|
|
|
|
<el-button @click="cancelMaterialConfirm">取 消</el-button>
|
|
|
|
<el-button @click="cancelMaterialConfirm">取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
<el-dialog :visible.sync="returnModelVisible" title="退料" width="25%">
|
|
|
|
<el-dialog :visible.sync="returnModelVisible" title="申请退库" width="400">
|
|
|
|
<el-form ref="returnModelForm" :model="returnModelForm" label-width="80px" :rules="returnModelFormRules">
|
|
|
|
<el-form ref="returnModelForm" :model="returnModelForm" label-width="80px" :rules="returnModelFormRules">
|
|
|
|
<el-form-item label="计划编号">
|
|
|
|
<el-form-item label="计划编号">
|
|
|
|
<el-input v-model="returnModelForm.planCode" autocomplete="off" disabled></el-input>
|
|
|
|
<el-input v-model="returnModelForm.planCode" autocomplete="off" disabled></el-input>
|
|
|
@ -366,26 +366,24 @@
|
|
|
|
<el-form-item label="明细编号">
|
|
|
|
<el-form-item label="明细编号">
|
|
|
|
<el-input v-model="returnModelForm.planDetailCode" autocomplete="off" disabled></el-input>
|
|
|
|
<el-input v-model="returnModelForm.planDetailCode" autocomplete="off" disabled></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="成品">
|
|
|
|
<!--el-form-item label="成品">
|
|
|
|
<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" class="input-with-select"
|
|
|
|
<el-input placeholder="请扫描或输入物料条码" v-model="returnModelForm.materialBarcode" suffix-icon="el-icon-camera">
|
|
|
|
@blur="setReturnModelForm">
|
|
|
|
|
|
|
|
<el-button slot="append" icon="el-icon-search"></el-button>
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="仓库">
|
|
|
|
<el-form-item label="仓库">
|
|
|
|
<el-select v-model="returnModelForm.warehouseId" placeholder="请选择仓库"
|
|
|
|
<el-select v-model="returnModelForm.warehouseId" placeholder="请选择仓库"
|
|
|
|
:disabled="!returnModelForm.materialBarcode">
|
|
|
|
style="width: 260px">
|
|
|
|
<el-option :label="i.label" :key="i.value" :value="i.value" v-for="i in WarehousesList"></el-option>
|
|
|
|
<el-option :label="i.label" :key="i.value" :value="i.value" v-for="i in WarehousesList"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="数量">
|
|
|
|
<el-form-item label="数量" prop="planAmount">
|
|
|
|
<el-input-number v-model="returnModelForm.planAmount" controls-position="right" :min="1"></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="请选择退库类型">
|
|
|
|
<el-select v-model="returnModelForm.taskType" placeholder="请选择退库类型" style="width: 260px">
|
|
|
|
<el-option :label="i.label" :key="i.value" :value="i.value"
|
|
|
|
<el-option :label="i.label" :key="i.value" :value="i.value"
|
|
|
|
v-for="i in dict.type.wms_raw_return_task_type"></el-option>
|
|
|
|
v-for="i in dict.type.wms_raw_return_task_type"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
@ -486,6 +484,9 @@ export default {
|
|
|
|
taskType: [
|
|
|
|
taskType: [
|
|
|
|
{required: true, message: '请选择退库类型', trigger: 'change'}
|
|
|
|
{required: true, message: '请选择退库类型', trigger: 'change'}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
planAmount: [
|
|
|
|
|
|
|
|
{required: true, message: '请输入数量', trigger: 'change'}
|
|
|
|
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
PLAN_DETAIL_STATUS:{
|
|
|
|
PLAN_DETAIL_STATUS:{
|
|
|
@ -493,7 +494,7 @@ export default {
|
|
|
|
STARTED : '2',
|
|
|
|
STARTED : '2',
|
|
|
|
FINISHED : '3',
|
|
|
|
FINISHED : '3',
|
|
|
|
ABNORMAL_FINISHED : '9'
|
|
|
|
ABNORMAL_FINISHED : '9'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
@ -1068,32 +1069,48 @@ export default {
|
|
|
|
returnMaterial(e) {
|
|
|
|
returnMaterial(e) {
|
|
|
|
this.returnModelVisible = true
|
|
|
|
this.returnModelVisible = true
|
|
|
|
this.returnModelForm = e.row
|
|
|
|
this.returnModelForm = e.row
|
|
|
|
|
|
|
|
this.setReturnModelForm();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.checkSerialConnected()) {
|
|
|
|
|
|
|
|
this.$confirm('请连接条码枪', '提示', {
|
|
|
|
|
|
|
|
confirmButtonText: '连接',
|
|
|
|
|
|
|
|
showClose: true,
|
|
|
|
|
|
|
|
showCancelButton: true,
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
console.log("dddd")
|
|
|
|
|
|
|
|
this.connectSerial(this.setSerialData);
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setReturnModelForm() {
|
|
|
|
setReturnModelForm() {
|
|
|
|
getWarehouses({
|
|
|
|
getWarehouses({
|
|
|
|
warehouseFloor: 4,
|
|
|
|
mesAreaType : 3, //4楼装配区域
|
|
|
|
materialBarcode: this.returnModelForm.materialBarcode
|
|
|
|
//warehouseFloor: 4,
|
|
|
|
|
|
|
|
//materialBarcode: this.returnModelForm.materialBarcode
|
|
|
|
}).then(e => {
|
|
|
|
}).then(e => {
|
|
|
|
this.WarehousesList = e.data.map(v => {
|
|
|
|
this.WarehousesList = e.data.map(v => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
label: v.warehouseName,
|
|
|
|
label: v.warehouseName,
|
|
|
|
value: v.warehouseId,
|
|
|
|
value: v.warehouseId,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.WarehousesList && this.WarehousesList.length>0){
|
|
|
|
|
|
|
|
this.returnModelForm.warehouseId = this.WarehousesList[0].value;
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
returnModelConfirm() {
|
|
|
|
returnModelConfirm() {
|
|
|
|
this.$refs.returnModelForm.validate((valid) => {
|
|
|
|
this.$refs.returnModelForm.validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
let data = {}
|
|
|
|
let data = [this.returnModelForm]
|
|
|
|
let keys = ['warehouseId', 'planCode', 'planDetailCode', 'productId', 'materialBarcode', 'planAmount', 'taskType', 'applyReason']
|
|
|
|
|
|
|
|
keys.forEach(v => {
|
|
|
|
|
|
|
|
data[v] = this.returnModelForm[v]
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
applyRawReturn(data).then(v => {
|
|
|
|
applyRawReturn(data).then(v => {
|
|
|
|
if (v.code === 200) {
|
|
|
|
if (v.code === 200) {
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
|
message: '退库成功',
|
|
|
|
message: '申请退库成功',
|
|
|
|
type: 'success'
|
|
|
|
type: 'success'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1135,6 +1152,8 @@ 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){
|
|
|
|
|
|
|
|
this.returnModelForm.materialBarcode = this.serialData;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// console.log(this.serialData)
|
|
|
|
// console.log(this.serialData)
|
|
|
|
}
|
|
|
|
}
|
|
|
|