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