Browse Source

2026-07-08

Lab Test优化,取消“实验室审批人”属性,“测试人”取“Test Lab”的值作为岗位,“Test Lab”固定取41工厂的数据字典
master
fengyuan_yang 3 weeks ago
parent
commit
c9030d5375
  1. 52
      src/views/modules/lab/labRecord.vue

52
src/views/modules/lab/labRecord.vue

@ -230,25 +230,7 @@
<el-input v-model="modalData.applicationSurface" :disabled="isLabFieldDisabled('applicationSurface')" style="width: 533px"></el-input>
</el-form-item>
<el-form-item label="Test Lab">
<dict-data-select v-model="modalData.testLab" clearable :disabled="isLabFieldDisabled('testLab')" style="width: 225px" dict-type="lab_test_lab" @change="handleTestLabChange"></dict-data-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData">
<el-form-item>
<span style="cursor: pointer" v-if="!isLabFieldDisabled('labApprover')" slot="label" @click="openLabApproverChooseModal"><a herf="#">实验室审批人</a></span>
<span v-else slot="label">实验室审批人</span>
<el-input
v-model="modalData.labApproverName"
readonly
clearable
:disabled="isLabFieldDisabled('labApprover')"
style="width: 772px"
@focus="openLabApproverChooseModal">
<span slot="suffix" v-show="modalData.labApproverName && !isLabFieldDisabled('labApprover')" @click.stop="clearLabApproverSelection">
<i class="el-icon-circle-close"></i>
</span>
</el-input>
<dict-data-select v-model="modalData.testLab" clearable :disabled="isLabFieldDisabled('testLab')" style="width: 225px" dict-type="lab_test_lab" site="41" @change="handleTestLabChange"></dict-data-select>
</el-form-item>
</el-form>
@ -738,12 +720,6 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="currentDetail" style="margin-top: 0px">
<el-form-item label="实验室审批人" style="display: block;">
<el-input :value="currentDetail.labApproverName || currentDetail.labApprover || ''" disabled style="width: 772px"></el-input>
</el-form-item>
</el-form>
<div class="rq" style="width: 772px;margin-top: 0px">
<el-table
:data="currentDetail.propertyItemList || []"
@ -1285,6 +1261,18 @@ export default {
return
}
this.$set(this.modalData, 'testLab', value || '')
this.testerFlag = false
this.testerOptionList = []
this.testerDisplayList = []
this.testerSelectionCache = []
this.testerSearchData = {
operatorId: '',
operatorName: ''
}
this.$set(this.modalData, 'testerCodeList', [])
this.$set(this.modalData, 'testerList', [])
this.$set(this.modalData, 'tester', '')
this.$set(this.modalData, 'testerName', '')
this.resetLabApproverOptionState()
this.clearLabApproverFieldData()
},
@ -1804,7 +1792,8 @@ export default {
this.$set(this.modalData, 'testerCodeList', testerList)
this.$set(this.modalData, 'testerList', testerList)
this.$set(this.modalData, 'tester', testerList.join(';'))
this.$set(this.modalData, 'testerName', testerList.map(item => this.resolveTesterNameById(item)).join(';'))
const testerName = testerList.map(item => this.resolveTesterNameById(item)).join(';')
this.$set(this.modalData, 'testerName', testerName)
},
resolveLabApproverNameById (operatorId) {
const normalizedId = String(operatorId || '').trim()
@ -1833,7 +1822,7 @@ export default {
})
},
loadTesterOptions () {
if (!this.modalData || !this.modalData.site) {
if (!this.modalData || !this.modalData.site || !String(this.modalData.testLab || '').trim()) {
this.testerOptionList = []
this.testerDisplayList = []
this.testerSelectionCache = []
@ -1841,7 +1830,7 @@ export default {
}
const params = {
site: this.modalData.site,
roleNo: 'R025',
roleNo: String(this.modalData.testLab || '').trim(),
active: 'Y'
}
return searchUserListForRole(params).then(({data}) => {
@ -1878,6 +1867,10 @@ export default {
this.$message.warning('请先选择工厂')
return
}
if (!String(this.modalData.testLab || '').trim()) {
this.$message.warning('请先选择Test Lab')
return
}
this.loadTesterOptions().then(() => {
if (!this.testerOptionList || this.testerOptionList.length === 0) {
this.$message.warning('未查询到可选测试人')
@ -2477,7 +2470,6 @@ export default {
this.$set(this.modalData, 'testerName', this.modalData.testerName || this.modalData.tester || '')
this.$set(this.modalData, 'labApproverName', this.modalData.labApproverName || this.modalData.labApprover || '')
this.loadTesterOptions()
this.loadLabApproverOptions()
this.loadModalButtonCondition()
this.loadNodeAuthority(this.modalData.site || row.site, this.modalData.stepId !== null && this.modalData.stepId !== undefined ? this.modalData.stepId : 10)
this.refreshJudgeCriteriaFileList()
@ -2573,7 +2565,6 @@ export default {
return
}
this.syncTesterField()
this.syncLabApproverField()
this.syncPropertyItemList()
const payload = this.buildLabPayload(this.modalData)
const submitMethod = this.modalTitle === 'Lab 新增' ? api.saveLab : api.updateLab
@ -2629,7 +2620,6 @@ export default {
return
}
this.syncTesterField()
this.syncLabApproverField()
this.syncPropertyItemList()
if (!this.nodeAuthorityLoaded) {
this.$message.warning('节点权限加载中,请稍后重试')

Loading…
Cancel
Save