Browse Source

qms工序修改

master
shenzhouyu 4 weeks ago
parent
commit
f8ff46d1d3
  1. 62
      cclqms-vue/src/views/modules/qc/OQCResultEntry.vue
  2. 114
      cclqms-vue/src/views/modules/qc/qcPartAttribute.vue

62
cclqms-vue/src/views/modules/qc/OQCResultEntry.vue

@ -86,6 +86,13 @@
<el-input v-model="searchData.spec" :placeholder="$t('qc.iqcPage.enterSpec')" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item :label="$t('qc.ipqcPage.process')">
<el-select v-model="searchData.operationDesc" clearable filterable :placeholder="$t('qc.ipqcPage.selectProcess')">
<el-option v-for="item in operationDescList" :key="item" :label="item" :value="item"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<!-- 第三行检验相关信息 -->
@ -1319,6 +1326,7 @@
<el-table-column prop="orderNo" :label="$t('qc.ipqcPage.workOrderNo')" align="center" width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="releaseNo" :label="$t('qc.table.releaseNo')" align="center" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="lineNo" :label="$t('qc.table.lineNo')" align="center" width="70" show-overflow-tooltip></el-table-column>
<el-table-column prop="operationDesc" :label="$t('qc.ipqcPage.process')" align="left" width="120" show-overflow-tooltip></el-table-column>
<el-table-column prop="rollNo" :label="$t('qc.table.tagBarcode')" align="center" width="120" show-overflow-tooltip></el-table-column>
</el-table>
<el-pagination
@ -1408,7 +1416,8 @@
importOQCTemplateItems,
evaluateItemSpecWarning,
searchQcSopFileList,
downloadSopFile
downloadSopFile,
getAllOperationDescList
} from "@/api/qc/qc.js"
import {getSite2} from '@/api/factory/site.js'
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
@ -1538,7 +1547,9 @@
states: ['未开始','待检验'],
customerNo: '',
customerName: '',
poOrderNo: ''
poOrderNo: '',
spec: '',
operationDesc: ''
},
pageIndex: 1,
pageSize: 200,
@ -1604,6 +1615,7 @@
inspectorByType: [{ required: true, message: ' ', trigger: ['blur', 'change'] }]
},
operationList: [],
operationDescList: [],
resourceList: [],
partList: [],
addTemplateList: [],
@ -1968,6 +1980,24 @@
fixed: '',
columnWidth: 80,
},
{
userId: this.$store.state.user.name,
functionId: 301017,
serialNumber: '301017Table1OperationDesc',
tableId: "301017Table1",
tableName: "OQC检验记录表",
columnProp: 'operationDesc',
headerAlign: "center",
align: "left",
columnLabel: '工序',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
userId: this.$store.state.user.name,
functionId: 301017,
@ -2889,6 +2919,7 @@
this.inspectionTypeSearch()
this.umSearch()
this.queryController()
this.loadOperationDescList()
//
this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
@ -3015,6 +3046,7 @@
'工单号': 'qc.table.workOrderNo',
'下达号': 'qc.table.releaseNo',
'行号': 'qc.table.lineNo',
'工序': 'qc.ipqcPage.process',
'客户零件号': 'qc.table.customerPartNo',
'客户料号': 'qc.table.customerMaterialNo',
'计划员': 'qc.table.planner',
@ -3053,6 +3085,16 @@
this.searchExpanded = !this.searchExpanded;
this.calculateTableHeight();
},
//
loadOperationDescList () {
getAllOperationDescList({
userName: this.$store.state.user.name
}).then(({ data }) => {
if (data && data.code === 0) {
this.operationDescList = data.rows || []
}
})
},
//
calculateTableHeight() {
this.$nextTick(() => {
@ -3081,6 +3123,8 @@
customerName: '',
inspectionResult: '',
disposalMeasures: '',
spec: '',
operationDesc: '',
states: []
};
this.getDataList();
@ -5121,7 +5165,7 @@
return columns
}
const props = columns.map(item => item.columnProp)
if (props.includes('releaseNo') && props.includes('lineNo')) {
if (props.includes('releaseNo') && props.includes('lineNo') && props.includes('operationDesc')) {
return columns
}
const baseColumn = columns[0] || {}
@ -5150,6 +5194,14 @@
columnLabel: '行号',
columnWidth: 80,
}
const operationCol = {
...releaseCol,
serialNumber: (baseColumn.tableId || '301017Table1') + 'OperationDesc',
columnProp: 'operationDesc',
columnLabel: '工序',
align: 'left',
columnWidth: 120,
}
const result = [...columns]
let insertIdx = result.findIndex(item => item.columnProp === 'poOrderNo')
if (insertIdx < 0) {
@ -5165,6 +5217,10 @@
const lineIdx = result.findIndex(item => item.columnProp === 'lineNo')
result.splice(lineIdx >= 0 ? lineIdx : insertIdx + 1, 0, releaseCol)
}
if (!props.includes('operationDesc')) {
const lineIdx = result.findIndex(item => item.columnProp === 'lineNo')
result.splice(lineIdx >= 0 ? lineIdx + 1 : insertIdx + 2, 0, operationCol)
}
return result
},

114
cclqms-vue/src/views/modules/qc/qcPartAttribute.vue

@ -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;
}

Loading…
Cancel
Save