|
|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<div class="mrb-register"> |
|
|
|
<el-dialog title="MRB异常单登记" :close-on-click-modal="false" v-drag :visible.sync="visible" width="550px" :append-to-body="true" @close="handleClose"> |
|
|
|
<el-dialog title="MRB异常单登记" :close-on-click-modal="false" v-drag :visible.sync="visible" width="500px" :append-to-body="true" @close="handleClose"> |
|
|
|
<el-form :model="formData" :rules="rules" ref="mrbForm" label-width="65px" class="mrb-form"> |
|
|
|
<el-form-item prop="mrb"> |
|
|
|
<span slot="label" class="required-label">MRB</span> |
|
|
|
@ -14,7 +14,7 @@ |
|
|
|
<el-input type="textarea" v-model="formData.mrbRemark" :rows="3"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:35px;margin-top: 55px;text-align:center"> |
|
|
|
<el-footer style="height:35px;margin-top: 15px;text-align:center"> |
|
|
|
<el-button type="primary" :loading="loading" @click="submitForm">确定</el-button> |
|
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
@ -23,7 +23,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { updateScheduleMrbInfo } from '@/api/yieldReport/produce_order.js'; |
|
|
|
import { updateScheduleMrbInfo, getScheduleMrbInfo } from '@/api/yieldReport/produce_order.js'; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'ComMrbRegister', |
|
|
|
@ -91,6 +91,34 @@ export default { |
|
|
|
this.$refs.mrbForm.clearValidate(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
// 查询原有的MRB数据 |
|
|
|
this.loadMrbData(); |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 加载MRB数据 |
|
|
|
*/ |
|
|
|
loadMrbData() { |
|
|
|
const params = { |
|
|
|
site: this.scheduleData.site, |
|
|
|
orderNo: this.scheduleData.orderNo, |
|
|
|
itemNo: this.scheduleData.itemNo, |
|
|
|
seqNo: this.scheduleData.seqNo |
|
|
|
}; |
|
|
|
|
|
|
|
getScheduleMrbInfo(params).then(({ data }) => { |
|
|
|
if (data.code === 0 || data.code === 200) { |
|
|
|
if (data.mrbInfo) { |
|
|
|
// 填充原有数据 |
|
|
|
this.formData.mrb = data.mrbInfo.mrb || ''; |
|
|
|
this.formData.mrbInspectionReport = data.mrbInfo.mrbInspectionReport || ''; |
|
|
|
this.formData.mrbRemark = data.mrbInfo.mrbRemark || ''; |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch((error) => { |
|
|
|
console.error('查询MRB信息失败:', error); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
|