|
|
|
@ -62,7 +62,7 @@ |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed === '' ? false : item.fixed" |
|
|
|
:fixed="item.fixed == '' ? false : item.fixed" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
@ -121,23 +121,45 @@ |
|
|
|
<span slot="label" style="" @click="getBaseList(1036)"><a herf="#">方法编码</a></span> |
|
|
|
<el-input v-model="modalData.methodNo" style="width: 143px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="方法名称:" prop="methodName" :rules="rules.methodNameType"> |
|
|
|
<el-input v-model="modalData.methodName" disabled style="width: 143px"></el-input> |
|
|
|
<el-form-item label="方法名称" prop="methodName" :rules="rules.methodNameType"> |
|
|
|
<el-input v-model="modalData.methodName" disabled style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="抽样数量:"> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item> |
|
|
|
<span slot="label" @click="getBaseList(1051)"><a herf="#">抽样方案编码</a></span> |
|
|
|
<el-input v-model="modalData.samplingProgrammeNo" style="width: 143px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="抽样方案名称"> |
|
|
|
<el-input v-model="modalData.samplingProgrammeDesc" disabled style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item> |
|
|
|
<span slot="label" @click="getBaseList(1048)"><a herf="#">检验水平编码</a></span> |
|
|
|
<el-input v-model="modalData.samplingLevelNo" style="width: 143px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="检验水平名称"> |
|
|
|
<el-input v-model="modalData.samplingLevelDesc" disabled style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="抽样数量"> |
|
|
|
<el-input v-model="modalData.itemSamplingQuantity" type="number" style="width: 143px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="抽样比例%"> |
|
|
|
<el-input v-model="modalData.defaultSamplingProportion" type="number" style="width: 143px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="参照值:"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="参照值"> |
|
|
|
<el-input v-model="modalData.defaultValue" style="width: 143px"></el-input> |
|
|
|
<!-- <el-input v-if="modalData.valueTypeDb === 'N'" v-model="modalData.defaultValue" type="number" style="width: 143px"></el-input>--> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="最大值:"> |
|
|
|
<el-form-item label="最大值"> |
|
|
|
<el-input v-if="modalData.valueTypeDb === 'T'" v-model="modalData.maxValue" type="number" disabled style="width: 143px"></el-input> |
|
|
|
<el-input v-if="modalData.valueTypeDb === 'N'" v-model="modalData.maxValue" type="number" style="width: 143px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="最小值:"> |
|
|
|
<el-form-item label="最小值"> |
|
|
|
<el-input v-if="modalData.valueTypeDb === 'T'" v-model="modalData.minValue" type="number" disabled style="width: 143px"></el-input> |
|
|
|
<el-input v-if="modalData.valueTypeDb === 'N'" v-model="modalData.minValue" type="number" style="width: 143px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -228,7 +250,12 @@ |
|
|
|
methodName: '', |
|
|
|
updateBy: '', |
|
|
|
inspectionTypeNo: '', |
|
|
|
itemSamplingQuantity: '' |
|
|
|
itemSamplingQuantity: '', |
|
|
|
samplingProgrammeNo: '', |
|
|
|
samplingProgrammeDesc: '', |
|
|
|
samplingLevelNo: '', |
|
|
|
samplingLevelDesc: '', |
|
|
|
defaultSamplingProportion: '' |
|
|
|
}, |
|
|
|
// 检验项目展示标头 |
|
|
|
columnList: [ |
|
|
|
@ -340,6 +367,30 @@ |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'samplingProgrammeDesc', |
|
|
|
headerAlign: 'center', |
|
|
|
align: "center", |
|
|
|
columnLabel: '抽样方案', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'samplingLevelDesc', |
|
|
|
headerAlign: 'center', |
|
|
|
align: "center", |
|
|
|
columnLabel: '检验水平', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'itemSamplingQuantity', |
|
|
|
headerAlign: 'center', |
|
|
|
@ -352,6 +403,18 @@ |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'defaultSamplingProportion', |
|
|
|
headerAlign: 'center', |
|
|
|
align: "right", |
|
|
|
columnLabel: '抽样比例', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'createdDate', |
|
|
|
headerAlign: 'center', |
|
|
|
@ -496,6 +559,14 @@ |
|
|
|
strVal = this.modalData.methodNo |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
} |
|
|
|
if (val === 1051) { |
|
|
|
strVal = this.modalData.samplingProgrammeNo |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
} |
|
|
|
if (val === 1048) { |
|
|
|
strVal = this.modalData.samplingLevelNo |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 每页数 |
|
|
|
@ -526,6 +597,14 @@ |
|
|
|
this.modalData.methodNo = val.method_no |
|
|
|
this.modalData.methodName = val.method_name |
|
|
|
} |
|
|
|
if (this.tagNo === 1051) { |
|
|
|
this.modalData.samplingProgrammeNo = val.sampling_programme_no |
|
|
|
this.modalData.samplingProgrammeDesc = val.sampling_programme_desc |
|
|
|
} |
|
|
|
if (this.tagNo === 1048) { |
|
|
|
this.modalData.samplingLevelNo = val.sampling_level_no |
|
|
|
this.modalData.samplingLevelDesc = val.sampling_level_desc |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取数据列表 |
|
|
|
getDataList () { |
|
|
|
@ -555,7 +634,12 @@ |
|
|
|
methodName: '', |
|
|
|
updateBy: '', |
|
|
|
inspectionTypeNo: '', |
|
|
|
itemSamplingQuantity: '' |
|
|
|
itemSamplingQuantity: '', |
|
|
|
samplingProgrammeNo: '', |
|
|
|
samplingProgrammeDesc: '', |
|
|
|
samplingLevelNo: '', |
|
|
|
samplingLevelDesc: '', |
|
|
|
defaultSamplingProportion: '' |
|
|
|
} |
|
|
|
this.modalDisableFlag = false |
|
|
|
this.modalFlag = true |
|
|
|
@ -577,7 +661,12 @@ |
|
|
|
methodName: row.methodName, |
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
inspectionTypeNo: row.inspectionTypeNo, |
|
|
|
itemSamplingQuantity: row.itemSamplingQuantity |
|
|
|
itemSamplingQuantity: row.itemSamplingQuantity, |
|
|
|
samplingProgrammeNo: row.samplingProgrammeNo, |
|
|
|
samplingProgrammeDesc: row.samplingProgrammeDesc, |
|
|
|
samplingLevelNo: row.samplingLevelNo, |
|
|
|
samplingLevelDesc: row.samplingLevelDesc, |
|
|
|
defaultSamplingProportion: row.defaultSamplingProportion |
|
|
|
} |
|
|
|
this.modalDisableFlag = true |
|
|
|
this.modalFlag = true |
|
|
|
@ -625,6 +714,14 @@ |
|
|
|
this.$message.warning('请选择检验方法!') |
|
|
|
return |
|
|
|
} |
|
|
|
if ((this.modalData.samplingProgrammeNo === '' || this.modalData.samplingProgrammeNo == null) && (this.modalData.itemSamplingQuantity === '' || this.modalData.itemSamplingQuantity == null) && (this.modalData.defaultSamplingProportion === '' || this.modalData.defaultSamplingProportion == null)) { |
|
|
|
this.$message.warning('抽样方案、抽样数量、抽样比例至少选择一项!') |
|
|
|
return |
|
|
|
} |
|
|
|
if ((this.modalData.samplingProgrammeNo !== '' && this.modalData.samplingProgrammeNo != null) && (this.modalData.samplingLevelNo === '' || this.modalData.samplingLevelNo == null)) { |
|
|
|
this.$message.warning('请选择检验水平!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.flag === '1') { |
|
|
|
qcItemSave(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
@ -634,8 +731,7 @@ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
@ -652,8 +748,7 @@ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|