Commit 84e3c8f0 authored by chenzj's avatar chenzj

新增异常报告的完成按钮功能

parent 3caac670
......@@ -42,3 +42,11 @@ export function delReport(abnormalReportId) {
method: 'delete'
})
}
// 完成按钮功能
export function completeReport(abnormalReportId) {
return request({
url: '/qc/report/complete/' + abnormalReportId,
method: 'put'
})
}
......@@ -97,6 +97,11 @@
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag"/>
</template>
</el-table-column>
<el-table-column label="是否故障" align="center" prop="faultFlag" >
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.faultFlag"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
......@@ -172,6 +177,26 @@
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label="是否故障" label-width="120px">
<el-radio-group v-model="form.faultFlag" disabled v-if="optType=='view'">
<el-radio
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
<el-radio-group v-model="form.faultFlag" v-else>
<el-radio
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
......@@ -230,6 +255,7 @@ export default {
workunitCode: null,
workunitName: null,
enableFlag: null,
faultFlag: null,
},
// 表单参数
form: {
......@@ -239,6 +265,7 @@ export default {
workstation: '',
workunitName: '',
enableFlag: 'Y',
faultFlag: 'N',
},
// 表单校验
rules: {
......@@ -281,6 +308,7 @@ export default {
workstation: '',
workunitName: '',
enableFlag: 'Y',
faultFlag: 'N',
}
this.autoGenFlag = false;
this.resetForm("form");
......
......@@ -134,6 +134,13 @@
</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-edit"
@click="handleComplete(scope.row)"
v-hasPermi="['qc:report:edit']"
>完成</el-button>
<el-button
size="mini"
type="primary"
......@@ -249,7 +256,7 @@
</template>
<script>
import { listReport, getReport, delReport, addReport, updateReport } from "@/api/mes/qc/report";
import { listReport, getReport, delReport, addReport, updateReport,completeReport } from "@/api/mes/qc/report";
export default {
dicts: ['qc_submit_status','pc_abnormal_type'],
......@@ -404,6 +411,16 @@ export default {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 完成按钮操作 */
handleComplete(row) {
const abnormalReportIds = row.abnormalReportId || this.ids;
this.$modal.confirm('是否确认完成车间异常单编号为"' + abnormalReportIds + '"的数据项?').then(function() {
return completeReport(abnormalReportIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("提交成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment