Browse Source

2026-07-07

RoHS优化,显示IFS物料编码和描述,并给查询条件
master
fengyuan_yang 3 weeks ago
parent
commit
deec579ad0
  1. 48
      src/views/modules/rohs/rohsRecord.vue

48
src/views/modules/rohs/rohsRecord.vue

@ -31,6 +31,12 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="IFS物料编码">
<el-input v-model="searchData.ifsPartNo" clearable style="width: 140px"></el-input>
</el-form-item>
<el-form-item label="IFS物料描述">
<el-input v-model="searchData.materialDesc" clearable style="width: 180px"></el-input>
</el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button v-if="authSearch" @click="getDataList">查询</el-button> <el-button v-if="authSearch" @click="getDataList">查询</el-button>
<el-button v-if="authUpdate" @click="addOrUpdateHandle()">新增</el-button> <el-button v-if="authUpdate" @click="addOrUpdateHandle()">新增</el-button>
@ -135,7 +141,16 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="isSameMaterialDiffSize" header-align="center" align="center" label="同材不同规格" width="220"></el-table-column> <el-table-column prop="isSameMaterialDiffSize" header-align="center" align="center" label="同材不同规格" width="220"></el-table-column>
<el-table-column prop="ifsPartNo" header-align="center" align="center" label="IFS编号" width="150"></el-table-column>
<el-table-column prop="mainIfsPartNo" header-align="center" align="center" label="IFS物料编码" width="150">
<template slot-scope="scope">
<span>{{ scope.row.mainIfsPartNo || scope.row.ifsPartNo || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="mainPartDesc" header-align="center" align="center" label="IFS物料描述" width="220" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.mainPartDesc || scope.row.materialDesc || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="remark" header-align="center" align="center" label="备注" width="220" :show-overflow-tooltip="true"></el-table-column> <el-table-column prop="remark" header-align="center" align="center" label="备注" width="220" :show-overflow-tooltip="true"></el-table-column>
<el-table-column fixed="right" header-align="center" align="center" width="130" label="操作"> <el-table-column fixed="right" header-align="center" align="center" width="130" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
@ -1636,7 +1651,9 @@ export default {
status: '', status: '',
rohsStatus: '', rohsStatus: '',
currentApprover: '', currentApprover: '',
nodeId: ''
nodeId: '',
ifsPartNo: '',
materialDesc: ''
}, },
exportLoading: false, exportLoading: false,
exportData: [], exportData: [],
@ -3234,6 +3251,25 @@ export default {
this.$set(target, 'plannedMassProductionDate', this.normalizeDateOnly(plannedMassProductionDate)) this.$set(target, 'plannedMassProductionDate', this.normalizeDateOnly(plannedMassProductionDate))
this.$set(target, 'expiredDate', normalizedExpiredDate) this.$set(target, 'expiredDate', normalizedExpiredDate)
this.$set(target, 'expiryDate', this.calculateExpiryDateByRule(normalizedExpiredDate, target.validUntilValue, target.validUntil)) this.$set(target, 'expiryDate', this.calculateExpiryDateByRule(normalizedExpiredDate, target.validUntilValue, target.validUntil))
const firstMaterialDisplay = this.resolveFirstMaterialDisplay(target)
const fallbackMainIfsPartNo = fallbackData.mainIfsPartNo || fallbackData.ifsPartNo || ''
const fallbackMainPartDesc = fallbackData.mainPartDesc || fallbackData.materialDesc || ''
this.$set(target, 'mainIfsPartNo', firstMaterialDisplay.mainIfsPartNo || target.mainIfsPartNo || fallbackMainIfsPartNo)
this.$set(target, 'mainPartDesc', firstMaterialDisplay.mainPartDesc || target.mainPartDesc || fallbackMainPartDesc)
},
resolveFirstMaterialDisplay (target) {
const materialList = Array.isArray(target && target.materialList) ? target.materialList : []
if (!materialList.length) {
return {
mainIfsPartNo: '',
mainPartDesc: ''
}
}
const firstMaterial = materialList[0] || {}
return {
mainIfsPartNo: String(firstMaterial.finalPartNo || firstMaterial.final_part_no || '').trim(),
mainPartDesc: String(firstMaterial.partDesc || firstMaterial.part_desc || '').trim()
}
}, },
refreshCurrentTabTable () { refreshCurrentTabTable () {
if (this.activeTable === 'approvalInformation') { if (this.activeTable === 'approvalInformation') {
@ -3290,7 +3326,9 @@ export default {
status: this.searchData.status, status: this.searchData.status,
rohsStatus: this.searchData.rohsStatus, rohsStatus: this.searchData.rohsStatus,
currentApprover: this.searchData.currentApprover, currentApprover: this.searchData.currentApprover,
nodeId: this.searchData.nodeId
nodeId: this.searchData.nodeId,
ifsPartNo: this.searchData.ifsPartNo,
materialDesc: this.searchData.materialDesc
} }
api.getRohsList(params).then(({data}) => { api.getRohsList(params).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -3312,6 +3350,8 @@ export default {
commGroup3Desc: '', commGroup3Desc: '',
hsfApproverName: '', hsfApproverName: '',
relatedPeopleName: '', relatedPeopleName: '',
mainIfsPartNo: '',
mainPartDesc: '',
...item ...item
} }
}) })
@ -3398,6 +3438,8 @@ export default {
commGroup3Desc: '', commGroup3Desc: '',
hsfApproverName: '', hsfApproverName: '',
relatedPeopleName: '', relatedPeopleName: '',
mainIfsPartNo: '',
mainPartDesc: '',
...item ...item
} }
}) })

Loading…
Cancel
Save