生产退料
This commit is contained in:
parent
531496cd60
commit
faef7ddc41
@ -38,8 +38,7 @@ export function updateRtissue(data) {
|
||||
export function execute(rtId){
|
||||
return request({
|
||||
url: '/mes/wm/rtissue/'+rtId,
|
||||
method: 'put',
|
||||
data: data
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -105,13 +105,21 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-if="scope.row.status =='PREPARE'"
|
||||
@click="handleExecute(scope.row)"
|
||||
v-hasPermi="['mes:wm:productrecpt:edit']"
|
||||
>执行入库</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-if="scope.row.status =='PREPARE'"
|
||||
v-hasPermi="['wm:productrecpt:edit']"
|
||||
v-hasPermi="['mes:wm:productrecpt:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -119,7 +127,7 @@
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-if="scope.row.status =='PREPARE'"
|
||||
v-hasPermi="['wm:productrecpt:remove']"
|
||||
v-hasPermi="['mes:wm:productrecpt:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -159,8 +167,8 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产工单编码" prop="workorderCode">
|
||||
<el-input v-model="form.workorderCode" placeholder="请输入生产工单编码" >
|
||||
<el-form-item label="生产工单编号" prop="workorderCode">
|
||||
<el-input v-model="form.workorderCode" placeholder="请输入生产工单编号" >
|
||||
<el-button slot="append" icon="el-icon-search" @click="handleWorkorderSelect"></el-button>
|
||||
</el-input>
|
||||
<WorkorderSelect ref="woSelect" @onSelected="onWorkorderSelected"></WorkorderSelect>
|
||||
@ -235,8 +243,7 @@
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">确 定</el-button>
|
||||
<el-button type="success" @click="doconfirm" v-if="form.status =='PREPARE' && optType !='view' && form.recptId !=null">完成</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">保 存</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -314,6 +321,9 @@ export default {
|
||||
recptDate: [
|
||||
{ required: true, message: "请选择入库日期", trigger: "blur" }
|
||||
],
|
||||
workorderCode: [
|
||||
{ required: true, message: "请选择生产工单", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -406,7 +416,7 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加产品入库录";
|
||||
this.title = "添加产品入库单";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
@ -415,7 +425,7 @@ export default {
|
||||
getProductrecpt(recptId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改产品入库录";
|
||||
this.title = "修改产品入库单";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
@ -438,18 +448,10 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
//完成单据
|
||||
doconfirm(){
|
||||
let that = this;
|
||||
this.$modal.confirm('是否完成入库单编制?【完成后将不能更改】').then(function(){
|
||||
that.form.status = 'CONFIRMED';
|
||||
that.submitForm();
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const recptIds = row.recptId || this.ids;
|
||||
this.$modal.confirm('是否确认删除产品入库录编号为"' + recptIds + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除产品入库单编号为"' + recptIds + '"的数据项?').then(function() {
|
||||
return delProductrecpt(recptIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
|
@ -263,7 +263,7 @@ export default {
|
||||
reset() {
|
||||
this.form = {
|
||||
lineId: null,
|
||||
recptId: null,
|
||||
recptId: this.recptId,
|
||||
materialStockId: null,
|
||||
itemId: null,
|
||||
itemCode: null,
|
||||
|
@ -102,11 +102,12 @@
|
||||
v-if="scope.row.status =='PREPARE'"
|
||||
@click="handleExecute(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtissue:edit']"
|
||||
>执行入库</el-button>
|
||||
>执行退料</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.status =='PREPARE'"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtissue:edit']"
|
||||
>修改</el-button>
|
||||
@ -114,6 +115,7 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-if="scope.row.status =='PREPARE'"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtissue:remove']"
|
||||
>删除</el-button>
|
||||
@ -197,7 +199,7 @@
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">确 定</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">保 存</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
@ -119,7 +119,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="接收仓库">
|
||||
<el-form-item label="接收仓库" prop="warehouseId">
|
||||
<el-cascader v-model="warehouseInfo"
|
||||
:options="warehouseOptions"
|
||||
:props="warehouseProps"
|
||||
@ -181,7 +181,7 @@ export default {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
rtId: null,
|
||||
rtId: this.rtId,
|
||||
materialStockId: null,
|
||||
itemId: null,
|
||||
itemCode: null,
|
||||
@ -210,7 +210,7 @@ export default {
|
||||
quantityRt: [
|
||||
{ required: true, message: "退料数量不能为空", trigger: "blur" }
|
||||
],
|
||||
warehouseName: [
|
||||
warehouseId: [
|
||||
{ required: true, message: "接收仓库不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
@ -256,7 +256,7 @@ export default {
|
||||
reset() {
|
||||
this.form = {
|
||||
lineId: null,
|
||||
rtId: null,
|
||||
rtId: this.rtId,
|
||||
materialStockId: null,
|
||||
itemId: null,
|
||||
itemCode: null,
|
||||
@ -372,6 +372,9 @@ export default {
|
||||
this.form.specification = obj.specification;
|
||||
this.form.unitOfMeasure = obj.unitOfMeasure;
|
||||
this.form.batchCode = obj.batchCode;
|
||||
this.form.warehouseId = obj.warehouseId;
|
||||
this.form.locationId = obj.locationId;
|
||||
this.form.areaId = obj.areaId;
|
||||
this.form.quantityRt = obj.quantityOnhand;
|
||||
this.form.quantityMax = obj.quantityOnhand;
|
||||
}
|
||||
@ -379,9 +382,10 @@ export default {
|
||||
//选择默认的仓库、库区、库位
|
||||
handleWarehouseChanged(obj){
|
||||
if(obj !=null){
|
||||
debugger;
|
||||
this.form.warehouseId = obj[0];
|
||||
this.form.locationId = obj[1];
|
||||
this.form.areaId = obj[2];
|
||||
this.form.areaId = obj[2];
|
||||
}
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user