生产报工单
This commit is contained in:
parent
a7a444de4f
commit
195f9ec4b2
@ -136,6 +136,13 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="100px" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="100px" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-query"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-hasPermi="['mes:pro:feedback:query']"
|
||||||
|
>查看</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@ -189,7 +196,7 @@
|
|||||||
<WorkorderSelect ref="woSelect" @onSelected="onWorkorderSelected"></WorkorderSelect>
|
<WorkorderSelect ref="woSelect" @onSelected="onWorkorderSelected"></WorkorderSelect>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="生产任务" prop="taskName">
|
<el-form-item label="生产任务" prop="taskCode">
|
||||||
<el-input v-model="form.taskCode" placeholder="请选择生产任务" >
|
<el-input v-model="form.taskCode" placeholder="请选择生产任务" >
|
||||||
<el-button slot="append" icon="el-icon-search" @click="handleTaskSelect"></el-button>
|
<el-button slot="append" icon="el-icon-search" @click="handleTaskSelect"></el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
@ -277,7 +284,7 @@
|
|||||||
<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="handleExecute" v-if="form.status =='PREPARE' && optType !='view' && form.workorderId !=null">审 批</el-button>
|
<el-button type="success" @click="handleExecute" v-if="form.status =='PREPARE' && optType !='view' && form.feedbackId !=null">审 批</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -352,8 +359,8 @@ export default {
|
|||||||
feedbackType: [
|
feedbackType: [
|
||||||
{ required: true, message: "报工类型不能为空", trigger: "change" }
|
{ required: true, message: "报工类型不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
workstationName: [
|
taskCode: [
|
||||||
{ required: true, message: "工作站不能为空", trigger: "blur" }
|
{ required: true, message: "请选择生产任务", trigger: "blur" }
|
||||||
],
|
],
|
||||||
workorderCode: [
|
workorderCode: [
|
||||||
{ required: true, message: "生产工单不能为空", trigger: "blur" }
|
{ required: true, message: "生产工单不能为空", trigger: "blur" }
|
||||||
@ -458,6 +465,7 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加生产报工记录";
|
this.title = "添加生产报工记录";
|
||||||
|
this.optType = "add";
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
@ -467,6 +475,18 @@ export default {
|
|||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改生产报工记录";
|
this.title = "修改生产报工记录";
|
||||||
|
this.optType = "edit";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 查询明细按钮操作
|
||||||
|
handleView(row){
|
||||||
|
this.reset();
|
||||||
|
const recordId = row.recordId || this.ids;
|
||||||
|
getFeedback(recordId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "查看生产报工单信息";
|
||||||
|
this.optType = "view";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
@ -476,13 +496,11 @@ export default {
|
|||||||
if (this.form.recordId != null) {
|
if (this.form.recordId != null) {
|
||||||
updateFeedback(this.form).then(response => {
|
updateFeedback(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addFeedback(this.form).then(response => {
|
addFeedback(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -511,6 +529,7 @@ export default {
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("执行成功");
|
this.$modal.msgSuccess("执行成功");
|
||||||
|
this.open = false;
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
|
Loading…
Reference in New Issue
Block a user