|
|
|
@ -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 |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 明细记录信息查询 |
|
|
|
|