|
|
|
@ -782,21 +782,27 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="samplingProgrammeDesc" header-align="center" align="center" |
|
|
|
:label="$t('qc.partAttributePage.samplingProgramme')" min-width="150" show-overflow-tooltip> |
|
|
|
:label="$t('qc.partAttributePage.samplingProgramme')" min-width="180" |
|
|
|
:show-overflow-tooltip="!editQcSpecBatchVisible"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="editQcSpecBatchVisible"> |
|
|
|
<el-button type="text" @click="chooseProgrammeRow(scope.row)" style="padding: 3px 4px">{{ $t('qc.partAttributePage.selectBtn') }}</el-button> |
|
|
|
<el-input v-model="scope.row.samplingProgrammeDesc" readonly size="mini" style="width: calc(100% - 42px)"></el-input> |
|
|
|
<span v-if="editQcSpecBatchVisible" class="qc-spec-cell-picker"> |
|
|
|
<el-button type="text" class="qc-spec-cell-picker-btn" |
|
|
|
@click="chooseProgrammeRow(scope.row)">{{ $t('qc.partAttributePage.selectBtn') }}</el-button> |
|
|
|
<el-input v-model="scope.row.samplingProgrammeDesc" readonly size="mini" |
|
|
|
class="qc-spec-cell-picker-input"></el-input> |
|
|
|
</span> |
|
|
|
<span v-else>{{ scope.row.samplingProgrammeDesc }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="samplingLevelDesc" header-align="center" align="center" |
|
|
|
:label="$t('qc.partAttributePage.samplingLevel')" min-width="150" show-overflow-tooltip> |
|
|
|
:label="$t('qc.partAttributePage.samplingLevel')" min-width="180" |
|
|
|
:show-overflow-tooltip="!editQcSpecBatchVisible"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="editQcSpecBatchVisible"> |
|
|
|
<el-button type="text" @click="chooseLevel(scope.row)" style="padding: 3px 4px">{{ $t('qc.partAttributePage.selectBtn') }}</el-button> |
|
|
|
<el-input v-model="scope.row.samplingLevelDesc" readonly size="mini" style="width: calc(100% - 42px)"></el-input> |
|
|
|
<span v-if="editQcSpecBatchVisible" class="qc-spec-cell-picker"> |
|
|
|
<el-button type="text" class="qc-spec-cell-picker-btn" |
|
|
|
@click="chooseLevel(scope.row)">{{ $t('qc.partAttributePage.selectBtn') }}</el-button> |
|
|
|
<el-input v-model="scope.row.samplingLevelDesc" readonly size="mini" |
|
|
|
class="qc-spec-cell-picker-input"></el-input> |
|
|
|
</span> |
|
|
|
<span v-else>{{ scope.row.samplingLevelDesc }}</span> |
|
|
|
</template> |
|
|
|
@ -977,6 +983,8 @@ |
|
|
|
<el-table ref="fileCollectTable" :data="fileCollectList" :height="secondHeight - 100" border |
|
|
|
v-loading="fileCollectLoading" @selection-change="handleFileCollectSelectionChange" style="width: 100%;"> |
|
|
|
<el-table-column type="selection" width="50" align="center"></el-table-column> |
|
|
|
<el-table-column prop="buNo" :label="$t('qc.method.colBu')" header-align="center" align="left" |
|
|
|
min-width="90" show-overflow-tooltip></el-table-column> |
|
|
|
<el-table-column prop="equipmentNo" :label="$t('qc.itemPage.deviceCode')" header-align="center" align="left" |
|
|
|
min-width="110" show-overflow-tooltip></el-table-column> |
|
|
|
<el-table-column prop="equipmentDesc" :label="$t('qc.itemPage.deviceName')" header-align="center" |
|
|
|
@ -1011,6 +1019,20 @@ |
|
|
|
<span>{{ scope.row.itemDesc }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="operation" :label="$t('qc.table.process')" header-align="center" align="left" |
|
|
|
min-width="140" show-overflow-tooltip> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="editFileCollectBatchVisible"> |
|
|
|
<el-button type="text" @click="openFileCollectOperationPicker(scope.row)" |
|
|
|
style="padding: 3px 4px">{{ $t('qc.partAttributePage.selectBtn') }}</el-button> |
|
|
|
<span>{{ scope.row.operation }}</span> |
|
|
|
<el-button v-if="qcSpecHasValue(scope.row.operation)" type="text" icon="el-icon-close" |
|
|
|
class="qc-spec-pending-clear-btn" |
|
|
|
@click="clearFileCollectOperation(scope.row)"></el-button> |
|
|
|
</span> |
|
|
|
<span v-else>{{ scope.row.operation }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="fileColumnNo" :label="$t('qc.partAttributePage.fileColumnNo')" header-align="center" |
|
|
|
align="right" width="90"></el-table-column> |
|
|
|
<el-table-column prop="originalColumnName" :label="$t('qc.partAttributePage.originalFileColumnName')" |
|
|
|
@ -2327,6 +2349,19 @@ |
|
|
|
<el-dialog :title="$t('qc.itemPage.uiDialogItemList')" :close-on-click-modal="false" v-drag |
|
|
|
:visible.sync="fileCollectItemFlag" width="920px" append-to-body @close="fileCollectPickerRow = null"> |
|
|
|
<el-form :inline="true" label-position="top" :model="fileCollectItemQuery"> |
|
|
|
<el-form-item :label="$t('qc.method.colBu')"> |
|
|
|
<el-select v-model="fileCollectItemBuKey" :placeholder="$t('qc.common.selectPlaceholder')" clearable |
|
|
|
style="width: 160px" @change="onFileCollectItemBuChange"> |
|
|
|
<el-option v-for="i in buList" :key="i.site + '_' + i.buNo" :label="i.sitename + ' ' + i.buDesc" |
|
|
|
:value="i.buNo"> |
|
|
|
<span style="float: left;width: 100px">{{ i.sitename }}</span> |
|
|
|
<span |
|
|
|
style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px"> |
|
|
|
{{ i.buDesc }} |
|
|
|
</span> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="$t('qc.table.inspectionType')" required> |
|
|
|
<el-select v-model="fileCollectItemQuery.inspectionTypeNo" :placeholder="$t('qc.common.selectPlaceholder')" |
|
|
|
clearable style="width: 120px"> |
|
|
|
@ -2677,6 +2712,7 @@ export default { |
|
|
|
fileCollectItemList: [], |
|
|
|
fileCollectItemSelections: [], |
|
|
|
fileCollectExcludeItemNos: [], |
|
|
|
fileCollectItemBuKey: '', |
|
|
|
fileCollectItemQuery: { |
|
|
|
site: '', |
|
|
|
buNo: '', |
|
|
|
@ -3957,9 +3993,29 @@ export default { |
|
|
|
openFileCollectItemPicker(row) { |
|
|
|
if (!this.partCurrentRow.partNo || !row) return |
|
|
|
this.fileCollectPickerRow = row |
|
|
|
const preferredBuNo = row.buNo || this.partCurrentRow.buNo || '' |
|
|
|
const preferredSite = this.partCurrentRow.site || '' |
|
|
|
// buList.buNo 本身已是 site_bu(如 41_Flexo) |
|
|
|
const preferredKey = |
|
|
|
preferredBuNo.indexOf('_') >= 0 |
|
|
|
? preferredBuNo |
|
|
|
: preferredBuNo |
|
|
|
? `${preferredSite}_${preferredBuNo}` |
|
|
|
: '' |
|
|
|
const matchedBu = |
|
|
|
(this.buList || []).find((i) => i.buNo === preferredKey) || |
|
|
|
(this.buList || []).find((i) => this.parseBuNo(i.buNo) === preferredBuNo) || |
|
|
|
null |
|
|
|
const buKey = matchedBu |
|
|
|
? matchedBu.buNo |
|
|
|
: preferredKey || (this.buList.length > 0 ? this.buList[0].buNo : '') |
|
|
|
const site = matchedBu |
|
|
|
? matchedBu.site |
|
|
|
: preferredSite || (this.buList.length > 0 ? this.buList[0].site : '') |
|
|
|
this.fileCollectItemBuKey = buKey |
|
|
|
this.fileCollectItemQuery = { |
|
|
|
site: this.partCurrentRow.site, |
|
|
|
buNo: this.partCurrentRow.buNo, |
|
|
|
site: site, |
|
|
|
buNo: this.parseBuNo(buKey) || preferredBuNo, |
|
|
|
inspectionTypeNo: '105', |
|
|
|
itemNo: '', |
|
|
|
itemDesc: '', |
|
|
|
@ -3975,6 +4031,27 @@ export default { |
|
|
|
this.searchFileCollectItem() |
|
|
|
}) |
|
|
|
}, |
|
|
|
onFileCollectItemBuChange(val) { |
|
|
|
if (!val) { |
|
|
|
this.fileCollectItemQuery.buNo = '' |
|
|
|
return |
|
|
|
} |
|
|
|
const matched = (this.buList || []).find((i) => i.buNo === val) |
|
|
|
if (matched) { |
|
|
|
this.fileCollectItemQuery.site = matched.site |
|
|
|
this.fileCollectItemQuery.buNo = this.parseBuNo(matched.buNo) |
|
|
|
} else { |
|
|
|
this.fileCollectItemQuery.buNo = this.parseBuNo(val) |
|
|
|
} |
|
|
|
}, |
|
|
|
openFileCollectOperationPicker(row) { |
|
|
|
if (!this.editFileCollectBatchVisible || !row) return |
|
|
|
this.openQcSpecLinkedOperationPicker(row) |
|
|
|
}, |
|
|
|
clearFileCollectOperation(row) { |
|
|
|
if (!row) return |
|
|
|
row.operation = '' |
|
|
|
}, |
|
|
|
loadFileCollectExcludeItemNos() { |
|
|
|
const currentItemNo = ((this.fileCollectPickerRow && this.fileCollectPickerRow.itemNo) || '').trim() |
|
|
|
return qcPartFileCollectSearch({ |
|
|
|
@ -9137,6 +9214,23 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.qc-spec-cell-picker { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
width: 100%; |
|
|
|
gap: 4px; |
|
|
|
} |
|
|
|
|
|
|
|
.qc-spec-cell-picker-btn { |
|
|
|
flex-shrink: 0; |
|
|
|
padding: 3px 4px; |
|
|
|
} |
|
|
|
|
|
|
|
.qc-spec-cell-picker-input { |
|
|
|
flex: 1; |
|
|
|
min-width: 0; |
|
|
|
} |
|
|
|
|
|
|
|
.qc-spec-table ::v-deep .qc-spec-row-draggable { |
|
|
|
cursor: move; |
|
|
|
} |
|
|
|
|