|
|
@ -120,11 +120,14 @@ |
|
|
</el-form-item> --> |
|
|
</el-form-item> --> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
|
|
<el-form-item label="方法编码:" prop="methodNo" :rules="rules.methodNoType"> |
|
|
|
|
|
<el-input v-model="modalData.methodNo" :disabled="modalDisableFlag" placeholder="请输入方法编码" style="width: 221px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
<el-form-item label="方法名称:" prop="methodName" :rules="rules.methodNameType"> |
|
|
<el-form-item label="方法名称:" prop="methodName" :rules="rules.methodNameType"> |
|
|
<el-input v-model="modalData.methodName" style="width: 221px"></el-input> |
|
|
<el-input v-model="modalData.methodName" style="width: 221px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="检验类型:" prop="inspectionTypeNo" :rules="rules.inspectionTypeNoType"> |
|
|
<el-form-item label="检验类型:" prop="inspectionTypeNo" :rules="rules.inspectionTypeNoType"> |
|
|
<el-select v-model="modalData.inspectionTypeNo" :disabled="lineInspectionRoleFlag" placeholder="请选择" style="width: 221px"> |
|
|
|
|
|
|
|
|
<el-select v-model="modalData.inspectionTypeNo" :disabled="modalData.flag === '1' || lineInspectionRoleFlag" placeholder="请选择" style="width: 221px"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for = "i in options" |
|
|
v-for = "i in options" |
|
|
:key = "i.inspectionTypeNo" |
|
|
:key = "i.inspectionTypeNo" |
|
|
@ -150,7 +153,7 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
import { |
|
|
qcMethodSearch, // 检验方法查询 |
|
|
qcMethodSearch, // 检验方法查询 |
|
|
qcMethodSave, // 检验方法新增 |
|
|
|
|
|
|
|
|
qcMethodSaveIqc, // 检验方法新增(IQC手动编码) |
|
|
qcMethodUpdate, // 检验方法修改 |
|
|
qcMethodUpdate, // 检验方法修改 |
|
|
qcMethodDelete, // 检验方法删除 |
|
|
qcMethodDelete, // 检验方法删除 |
|
|
inspectionTypeSearch, // 搜索所有检验类型 |
|
|
inspectionTypeSearch, // 搜索所有检验类型 |
|
|
@ -367,6 +370,7 @@ |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
rules: { |
|
|
rules: { |
|
|
|
|
|
methodNoType:[{ required: true, message: ' ', trigger: ['blur','change'] }], |
|
|
methodNameType:[ |
|
|
methodNameType:[ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
@ -512,7 +516,7 @@ |
|
|
methodNo: '', |
|
|
methodNo: '', |
|
|
methodName: '', |
|
|
methodName: '', |
|
|
methodRemark: '', |
|
|
methodRemark: '', |
|
|
inspectionTypeNo: this.lineInspectionRoleFlag ? this.getPqcInspectionTypeNo() : '' |
|
|
|
|
|
|
|
|
inspectionTypeNo: '105' |
|
|
} |
|
|
} |
|
|
this.modalDisableFlag = false |
|
|
this.modalDisableFlag = false |
|
|
this.modalFlag = true |
|
|
this.modalFlag = true |
|
|
@ -564,10 +568,18 @@ |
|
|
// 新增/修改方法 |
|
|
// 新增/修改方法 |
|
|
saveData () { |
|
|
saveData () { |
|
|
this.applyPqcInspectionTypeLimit() |
|
|
this.applyPqcInspectionTypeLimit() |
|
|
|
|
|
// 新增时强制 IQC |
|
|
|
|
|
if (this.modalData.flag === '1') { |
|
|
|
|
|
this.modalData.inspectionTypeNo = '105' |
|
|
|
|
|
} |
|
|
if (this.modalData.bu === '' || this.modalData.bu == null) { |
|
|
if (this.modalData.bu === '' || this.modalData.bu == null) { |
|
|
this.$message.warning('请选择BU!') |
|
|
this.$message.warning('请选择BU!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
if (this.modalData.flag === '1' && (this.modalData.methodNo === '' || this.modalData.methodNo == null)) { |
|
|
|
|
|
this.$message.warning('请输入方法编码!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
if (this.modalData.methodName === '' || this.modalData.methodName == null) { |
|
|
if (this.modalData.methodName === '' || this.modalData.methodName == null) { |
|
|
this.$message.warning('请输入检验方法名称!') |
|
|
this.$message.warning('请输入检验方法名称!') |
|
|
return |
|
|
return |
|
|
@ -577,7 +589,7 @@ |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (this.modalData.flag === '1') { // 新增 |
|
|
if (this.modalData.flag === '1') { // 新增 |
|
|
qcMethodSave(this.modalData).then(({data}) => { |
|
|
|
|
|
|
|
|
qcMethodSaveIqc(this.modalData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
this.modalFlag = false |
|
|
this.modalFlag = false |
|
|
|