Browse Source

oqc开始检验未出现设备选择bug修改

master
shenzhouyu 4 hours ago
parent
commit
602b3a5f18
  1. 1
      cclqms-vue/src/api/qc/qc.js
  2. 102
      cclqms-vue/src/views/modules/qc/OQCResultEntry.vue

1
cclqms-vue/src/api/qc/qc.js

@ -353,6 +353,7 @@ export const saveFQASSubmitResult = data => createAPI(`/pms/qc/saveFQASSubmitRes
export const fqasRecordDelete = data => createAPI(`/pms/qc/fqasRecordDelete`,'post',data)
export const fqasRecordOverLoad = data => createAPI(`/pms/qc/fqasRecordOverLoad`,'post',data)
export const actionFQASInspection = data => createAPI(`/pms/qc/actionFQASInspection`,'post',data)
export const getOQCItemObjectList = data => createAPI(`/pms/qc/getOQCItemObjectList`,'post',data)
export const changeInspectionWay = data => createAPI(`/pms/qc/changeInspectionWay`,'post',data)
/** 同步 EDS 检验结果 */
export const syncEdsInspectionResults = data => createAPI(`/pms/qc/syncEdsInspectionResults`,'post',data)

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

@ -1461,7 +1461,12 @@
:maintaining.sync="maintainingAcquisitionEquipment"
:inspection="detailData"
flag="oqc"
:start-visible.sync="startEquipmentVisible"
:start-order="startInspectionRow"
:start-items="startEquipmentItems"
:can-start-save="!authStartInspection"
:can-batch-select="true"
@start-save="confirmStartInspection(startInspectionRow)"
></QcItemDeviceDialog>
<QcDataAcquisitionDialog
@ -1518,6 +1523,7 @@
getSiteAndBuByUserName,
getSiteAndBuByUserName2,
actionFQASInspection, // 开始检验
getOQCItemObjectList, // 查询项目设备
dataAcquisition, // 数据采集
getLatestEquipmentParseTime, // 最近设备解析时间
changeInspectionWay, // 更改检验方式
@ -3053,6 +3059,10 @@
],
acquisitionList: [],
maintainingAcquisitionEquipment: false,
startEquipmentVisible: false,
startInspectionRow: null,
startEquipmentItems: [],
startInspectionBusy: false,
dataAcquisitionDialogVisible: false,
dataAcquisitionItem: null,
measuredValueCopyDialogVisible: false,
@ -4732,39 +4742,77 @@
},
// 开始检验
actionModal (row) {
this.$confirm(this.$t('qc.entry.confirmStart'), this.$t('qc.common.tip'), {
confirmButtonText: this.$t('qc.common.confirm'),
cancelButtonText: this.$t('qc.common.cancel'),
type: 'warning'
}).then(() => {
let tempData = {
async actionModal (row) {
if (this.startInspectionBusy || this.startEquipmentVisible) return
this.startInspectionBusy = true
try {
const { data } = await getOQCItemObjectList({
site: row.site,
buNo: row.buNo,
inspectionNo: row.inspectionNo
})
if (!data || data.code !== 0) {
this.$message.error((data && data.msg) || this.$t('qc.common.systemError'))
return
}
this.startInspectionRow = row
this.startEquipmentItems = data.rows || []
if (this.startEquipmentItems.length) {
this.startEquipmentVisible = true
return
}
} catch (error) {
this.$message.error(this.$t('qc.common.systemError'))
return
} finally {
this.startInspectionBusy = false
}
return this.confirmStartInspection(row)
},
async confirmStartInspection (row) {
if (this.startInspectionBusy) return
this.startInspectionBusy = true
try {
const confirmed = await this.$confirm(this.$t('qc.entry.confirmStart'), this.$t('qc.common.tip'), {
confirmButtonText: this.$t('qc.common.confirm'),
cancelButtonText: this.$t('qc.common.cancel'),
type: 'warning'
}).then(() => true, () => false)
if (!confirmed) return
const tempData = {
site: row.site,
buNo: row.buNo,
inspectionNo: row.inspectionNo,
actionBy: this.$store.state.user.name,
state: '待检验'
state: '待检验',
equipmentCollectList: this.startEquipmentItems
.filter(item => item.equipmentNo)
.map(({ itemNo, equipmentNo }) => ({ itemNo, equipmentNo }))
}
actionFQASInspection(tempData).then(async ({data}) => {
if (data && data.code === 0) {
this.$message({
message: this.$t('qc.common.operationSuccess'),
type: 'success',
duration: 1500,
onClose: () => {
}
})
this.searchData.inspectionNo = row.inspectionNo
row.state = tempData.state
await this.getDataList()
this.detailModal(row)
} else {
await this.$alert(data.msg, this.$t('qc.common.errorTitle'), {
confirmButtonText: this.$t('qc.common.confirm')
})
}
const { data } = await actionFQASInspection(tempData)
if (!data || data.code !== 0) {
await this.$alert((data && data.msg) || this.$t('qc.common.systemError'), this.$t('qc.common.errorTitle'), {
confirmButtonText: this.$t('qc.common.confirm')
}).catch(() => {})
return
}
this.startEquipmentVisible = false
this.$message({
message: this.$t('qc.common.operationSuccess'),
type: 'success',
duration: 1500
})
})
this.searchData.inspectionNo = row.inspectionNo
row.state = tempData.state
this.getDataList()
this.detailModal(row)
} catch (error) {
this.$message.error(this.$t('qc.common.systemError'))
} finally {
this.startInspectionBusy = false
}
},
// 明细记录信息查询

Loading…
Cancel
Save