|
|
@@ -137,6 +137,7 @@
|
|
|
getById
|
|
|
} from '@/api/bpm/components/qualityReportApproval/qualityReportApproval';
|
|
|
import { enterprisePage } from '@/api/bpm/components/contractManage/contractBook.js';
|
|
|
+ import { fileGetByIdsAPI } from '@/components/addDoc/api/index.js';
|
|
|
import browse from '@/components/jimureport/browse.vue';
|
|
|
import inspection_report3 from './inspection_report3.vue';
|
|
|
import unqualifiedProduct from './unqualifiedProduct.vue';
|
|
|
@@ -206,6 +207,9 @@
|
|
|
let api = getDetailById;
|
|
|
|
|
|
let detail = null;
|
|
|
+ let vehiclePhotoUrl = [];
|
|
|
+ let inspectImage = [];
|
|
|
+
|
|
|
if (this.businessType?.includes('质检任务单')) {
|
|
|
api = taskmonadGetById;
|
|
|
}
|
|
|
@@ -222,13 +226,20 @@
|
|
|
size: 200
|
|
|
});
|
|
|
detail = await api(data.qualityWorkOrderId);
|
|
|
- let inspectImage = [];
|
|
|
detail.data.templateList.forEach((item) => {
|
|
|
if (item.inspectImage) {
|
|
|
inspectImage.push(...item.inspectImage);
|
|
|
}
|
|
|
});
|
|
|
- console.log(inspectImage, 'inspectImage');
|
|
|
+ // console.log(inspectImage, 'inspectImage');
|
|
|
+ try {
|
|
|
+ if (inspectImage.length) {
|
|
|
+ vehiclePhotoUrl = await fileGetByIdsAPI(inspectImage);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error, 'error');
|
|
|
+ }
|
|
|
+
|
|
|
this.tabOptions.unshift({
|
|
|
key: 'unqualifiedHtml',
|
|
|
name: '不合格品处置单'
|
|
|
@@ -252,6 +263,9 @@
|
|
|
batchNo: data.batchNo,
|
|
|
total: data.quantity,
|
|
|
sampleMeasureUnit: data.measureUnit,
|
|
|
+ vehiclePhotoUrl: vehiclePhotoUrl?.map(
|
|
|
+ (item) => item.storagePath[0]?.storePath
|
|
|
+ ),
|
|
|
remark:
|
|
|
(data.poList[0]?.supplierName || '') +
|
|
|
',' +
|