|
|
|
@ -304,7 +304,7 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in detailColumnsAfterIpqc" :key="'after-' + index" |
|
|
|
v-for="(item,index) in detailColumnsAfterIpqcBeforeQty" :key="'after-before-qty-' + index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
@ -323,31 +323,53 @@ |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="170" |
|
|
|
label="检验水平"> |
|
|
|
label="抽样方案"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" @click="chooseLevel(scope.row)" style="width:18%;padding: 3px 7px">· · ·</el-button> |
|
|
|
<el-input v-model="scope.row.samplingLevelDesc" readonly style="width:77%"></el-input> |
|
|
|
<el-button type="primary" @click="chooseProgrammeRow(scope.row)" style="width:18%;padding: 3px 7px" >· · ·</el-button> |
|
|
|
<el-input v-model="scope.row.samplingProgrammeDesc" readonly style="width:77%"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="60" |
|
|
|
label="检验周期(h)"> |
|
|
|
min-width="170" |
|
|
|
label="检验水平"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.inspectionCycle" type="number" style="height: 11px;padding: 0px " allow-create>;width:98%"</el-input> |
|
|
|
<el-button type="primary" @click="chooseLevel(scope.row)" style="width:18%;padding: 3px 7px">· · ·</el-button> |
|
|
|
<el-input v-model="scope.row.samplingLevelDesc" readonly style="width:77%"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in detailColumnsAfterIpqcFromQty" :key="'after-from-qty-' + index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed===''?false:item.fixed" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input |
|
|
|
v-if="item.columnProp === 'defaultSamplingQuantity' || item.columnProp === 'defaultSamplingProportion'" |
|
|
|
v-model="scope.row[item.columnProp]" |
|
|
|
type="number" |
|
|
|
size="mini" |
|
|
|
@input="onDetailSamplingFieldInput(scope.row, item.columnProp)"> |
|
|
|
</el-input> |
|
|
|
<span v-else-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="170" |
|
|
|
label="抽样方案"> |
|
|
|
min-width="60" |
|
|
|
label="检验周期(h)"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" @click="chooseProgrammeRow(scope.row)" style="width:18%;padding: 3px 7px" >· · ·</el-button> |
|
|
|
<el-input v-model="scope.row.samplingProgrammeDesc" readonly style="width:77%"></el-input> |
|
|
|
<el-input v-model="scope.row.inspectionCycle" type="number" style="height: 11px;padding: 0px " allow-create>;width:98%"</el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
@ -2085,6 +2107,18 @@ |
|
|
|
const idx = list.findIndex(i => i.columnProp === 'inspectionTypeName') |
|
|
|
if (idx === -1) return [] |
|
|
|
return list.slice(idx + 1) |
|
|
|
}, |
|
|
|
detailColumnsAfterIpqcBeforeQty () { |
|
|
|
const list = this.detailColumnsAfterIpqc |
|
|
|
const idx = list.findIndex(i => i.columnProp === 'defaultSamplingQuantity') |
|
|
|
if (idx === -1) return list |
|
|
|
return list.slice(0, idx) |
|
|
|
}, |
|
|
|
detailColumnsAfterIpqcFromQty () { |
|
|
|
const list = this.detailColumnsAfterIpqc |
|
|
|
const idx = list.findIndex(i => i.columnProp === 'defaultSamplingQuantity') |
|
|
|
if (idx === -1) return [] |
|
|
|
return list.slice(idx) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -2226,6 +2260,30 @@ |
|
|
|
this.detailList.forEach(r => this.normalizeIpqcInspectionMethod(r)) |
|
|
|
}, |
|
|
|
|
|
|
|
hasSamplingValue (val) { |
|
|
|
return val !== null && val !== undefined && String(val).trim() !== '' |
|
|
|
}, |
|
|
|
onDetailSamplingPlanOrLevelChange (row) { |
|
|
|
if (this.hasSamplingValue(row.samplingProgrammeNo) || this.hasSamplingValue(row.samplingLevelNo)) { |
|
|
|
this.$set(row, 'defaultSamplingQuantity', '') |
|
|
|
this.$set(row, 'defaultSamplingProportion', '') |
|
|
|
} |
|
|
|
}, |
|
|
|
onDetailSamplingFieldInput (row, field) { |
|
|
|
if (field === 'defaultSamplingQuantity' && this.hasSamplingValue(row.defaultSamplingQuantity)) { |
|
|
|
this.$set(row, 'samplingProgrammeNo', '') |
|
|
|
this.$set(row, 'samplingProgrammeDesc', '') |
|
|
|
this.$set(row, 'samplingLevelNo', '') |
|
|
|
this.$set(row, 'samplingLevelDesc', '') |
|
|
|
this.$set(row, 'defaultSamplingProportion', '') |
|
|
|
} else if (field === 'defaultSamplingProportion' && this.hasSamplingValue(row.defaultSamplingProportion)) { |
|
|
|
this.$set(row, 'samplingProgrammeNo', '') |
|
|
|
this.$set(row, 'samplingProgrammeDesc', '') |
|
|
|
this.$set(row, 'samplingLevelNo', '') |
|
|
|
this.$set(row, 'samplingLevelDesc', '') |
|
|
|
this.$set(row, 'defaultSamplingQuantity', '') |
|
|
|
} |
|
|
|
}, |
|
|
|
chooseLevel (row) { |
|
|
|
this.tempLevelRow = row |
|
|
|
this.getBaseList(208) |
|
|
|
@ -2269,10 +2327,12 @@ |
|
|
|
if (this.tagNo === 208) { |
|
|
|
this.tempLevelRow.samplingLevelNo = val.sampling_level_no |
|
|
|
this.tempLevelRow.samplingLevelDesc = val.sampling_level_desc |
|
|
|
this.onDetailSamplingPlanOrLevelChange(this.tempLevelRow) |
|
|
|
} |
|
|
|
if (this.tagNo === 207) { |
|
|
|
this.tempProgrammeRow.samplingProgrammeNo = val.sampling_programme_no |
|
|
|
this.tempProgrammeRow.samplingProgrammeDesc = val.sampling_programme_desc |
|
|
|
this.onDetailSamplingPlanOrLevelChange(this.tempProgrammeRow) |
|
|
|
} |
|
|
|
if (this.tagNo === 1056) { |
|
|
|
this.modalData.supplierNo = val.supplier_id |
|
|
|
|