|
@@ -1,13 +1,7 @@
|
|
|
<template>
|
|
|
<div class="tenant">
|
|
|
- <byTable
|
|
|
- :source="sourceList.data"
|
|
|
- :pagination="sourceList.pagination"
|
|
|
- :config="config"
|
|
|
- :loading="loading"
|
|
|
- :selectConfig="selectConfig"
|
|
|
- highlight-current-row
|
|
|
- @get-list="getList">
|
|
|
+ <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
|
|
|
+ highlight-current-row @get-list="getList">
|
|
|
<template #amount="{ item }">
|
|
|
<div>
|
|
|
<span style="padding-right: 4px">{{ item.currency }}</span>
|
|
@@ -19,13 +13,8 @@
|
|
|
<el-dialog title="质检" v-if="openInspection" v-model="openInspection" width="90%">
|
|
|
<div style="width: 100%">
|
|
|
<el-steps align-center>
|
|
|
- <el-step
|
|
|
- v-for="(item, index) in steps"
|
|
|
- :key="index"
|
|
|
- :title="item.label"
|
|
|
- style="cursor: pointer"
|
|
|
- :status="getStepStatus(item)"
|
|
|
- @click="clickSteps(item.value)" />
|
|
|
+ <el-step v-for="(item, index) in steps" :key="index" :title="item.label" style="cursor: pointer" :status="getStepStatus(item)"
|
|
|
+ @click="clickSteps(item.value)" />
|
|
|
</el-steps>
|
|
|
<div v-show="selectSteps === 1" style="width: 100%">
|
|
|
<byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit1">
|
|
@@ -82,7 +71,8 @@
|
|
|
<el-table-column>
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'inspectionSummaryList.' + $index + '.summaryLabel'" :rules="rules.summaryLabel" :inline-message="true">
|
|
|
+ <el-form-item :prop="'inspectionSummaryList.' + $index + '.summaryLabel'" :rules="rules.summaryLabel"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.summaryLabel" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -91,7 +81,8 @@
|
|
|
<el-table-column>
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'inspectionSummaryList.' + $index + '.summaryValue'" :rules="rules.summaryValue" :inline-message="true">
|
|
|
+ <el-form-item :prop="'inspectionSummaryList.' + $index + '.summaryValue'" :rules="rules.summaryValue"
|
|
|
+ :inline-message="true">
|
|
|
<el-radio-group v-model="row.summaryValue" class="ml-4">
|
|
|
<el-radio v-for="(item, index) in summaryType" :key="index" :label="item.label"></el-radio>
|
|
|
</el-radio-group>
|
|
@@ -211,15 +202,11 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<el-form-item label="Sample Collection Record" style="margin-top: 20px">
|
|
|
- <el-upload
|
|
|
- v-model:fileList="fileListOne"
|
|
|
- action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
- :data="uploadDataOne"
|
|
|
- multiple
|
|
|
- list-type="picture-card"
|
|
|
- :before-upload="uploadFileOne"
|
|
|
- accept=".gif, .jpeg, .jpg, .png">
|
|
|
- <el-icon><Plus /></el-icon>
|
|
|
+ <el-upload v-model:fileList="fileListOne" :action="uploadUrl" :data="uploadDataOne" multiple list-type="picture-card"
|
|
|
+ :before-upload="uploadFileOne" accept=".gif, .jpeg, .jpg, .png">
|
|
|
+ <el-icon>
|
|
|
+ <Plus />
|
|
|
+ </el-icon>
|
|
|
<template #file="{ file }">
|
|
|
<div>
|
|
|
<div>
|
|
@@ -229,7 +216,9 @@
|
|
|
<el-icon><zoom-in /></el-icon>
|
|
|
</span>
|
|
|
<span class="el-upload-list__item-delete" @click="onRemoveOne(file)">
|
|
|
- <el-icon><Delete /></el-icon>
|
|
|
+ <el-icon>
|
|
|
+ <Delete />
|
|
|
+ </el-icon>
|
|
|
</span>
|
|
|
</span>
|
|
|
<el-button type="primary" @click="clickFileRemark(file, 1)" text>Remark</el-button>
|
|
@@ -280,7 +269,8 @@
|
|
|
<el-table-column label="Order Cartons" width="150">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityProductList.' + $index + '.orderCartons'" :rules="rules.orderCartons" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityProductList.' + $index + '.orderCartons'" :rules="rules.orderCartons"
|
|
|
+ :inline-message="true">
|
|
|
<el-input-number onmousewheel="return false;" v-model="row.orderCartons" :precision="0" :controls="false" :min="0" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -320,7 +310,8 @@
|
|
|
<el-table-column label="Packed" width="150">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityProductList.' + $index + '.samplePacked'" :rules="rules.samplePacked" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityProductList.' + $index + '.samplePacked'" :rules="rules.samplePacked"
|
|
|
+ :inline-message="true">
|
|
|
<el-input-number onmousewheel="return false;" v-model="row.samplePacked" :precision="0" :controls="false" :min="0" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -329,7 +320,8 @@
|
|
|
<el-table-column label="Unpacked" width="150">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityProductList.' + $index + '.sampleUnpacked'" :rules="rules.sampleUnpacked" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityProductList.' + $index + '.sampleUnpacked'" :rules="rules.sampleUnpacked"
|
|
|
+ :inline-message="true">
|
|
|
<el-input-number onmousewheel="return false;" v-model="row.sampleUnpacked" :precision="0" :controls="false" :min="0" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -347,7 +339,8 @@
|
|
|
<el-table-column label="Carton Number" width="160">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityCartonsList.' + index + '.cartonNumber'" :rules="rules.cartonNumber" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityCartonsList.' + index + '.cartonNumber'" :rules="rules.cartonNumber"
|
|
|
+ :inline-message="true">
|
|
|
<el-input-number onmousewheel="return false;" v-model="item.cartonNumber" :precision="0" :controls="false" :min="0" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -372,7 +365,8 @@
|
|
|
<div style="margin-top: 20px">Workmanship Defectives / Function Inspection Findings</div>
|
|
|
<div>
|
|
|
<el-button type="primary" @click="clickWorkShipAdd()" plain>添加行</el-button>
|
|
|
- <el-table :data="formData.data.ehsdQualityWorkshipList" style="width: 100%; margin-top: 16px" show-summary :summary-method="getSummaries">
|
|
|
+ <el-table :data="formData.data.ehsdQualityWorkshipList" style="width: 100%; margin-top: 16px" show-summary
|
|
|
+ :summary-method="getSummaries">
|
|
|
<el-table-column label="#" width="50">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
@@ -383,7 +377,8 @@
|
|
|
<el-table-column label="Description">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityWorkshipList.' + $index + '.description'" :rules="rules.description" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityWorkshipList.' + $index + '.description'" :rules="rules.description"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.description" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -424,15 +419,11 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<el-form-item label="Defect photos of Items" style="margin-top: 20px">
|
|
|
- <el-upload
|
|
|
- v-model:fileList="fileListTwo"
|
|
|
- action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
- :data="uploadDataTwo"
|
|
|
- multiple
|
|
|
- list-type="picture-card"
|
|
|
- :before-upload="uploadFileTwo"
|
|
|
- accept=".gif, .jpeg, .jpg, .png">
|
|
|
- <el-icon><Plus /></el-icon>
|
|
|
+ <el-upload v-model:fileList="fileListTwo" :action="uploadUrl" :data="uploadDataTwo" multiple list-type="picture-card"
|
|
|
+ :before-upload="uploadFileTwo" accept=".gif, .jpeg, .jpg, .png">
|
|
|
+ <el-icon>
|
|
|
+ <Plus />
|
|
|
+ </el-icon>
|
|
|
<template #file="{ file }">
|
|
|
<div>
|
|
|
<div>
|
|
@@ -442,7 +433,9 @@
|
|
|
<el-icon><zoom-in /></el-icon>
|
|
|
</span>
|
|
|
<span class="el-upload-list__item-delete" @click="onRemoveTwo(file)">
|
|
|
- <el-icon><Delete /></el-icon>
|
|
|
+ <el-icon>
|
|
|
+ <Delete />
|
|
|
+ </el-icon>
|
|
|
</span>
|
|
|
</span>
|
|
|
<el-button type="primary" @click="clickFileRemark(file, 2)" text>Remark</el-button>
|
|
@@ -473,7 +466,8 @@
|
|
|
<el-table-column label="Description" min-width="160">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualitySiteTestList.' + $index + '.description'" :rules="rules.description" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualitySiteTestList.' + $index + '.description'" :rules="rules.description"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.description" :rows="4" type="textarea" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -531,15 +525,11 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-form-item label="Photos" style="margin-top: 20px">
|
|
|
- <el-upload
|
|
|
- v-model:fileList="fileListThree"
|
|
|
- action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
- :data="uploadDataThree"
|
|
|
- multiple
|
|
|
- list-type="picture-card"
|
|
|
- :before-upload="uploadFileThree"
|
|
|
- accept=".gif, .jpeg, .jpg, .png">
|
|
|
- <el-icon><Plus /></el-icon>
|
|
|
+ <el-upload v-model:fileList="fileListThree" :action="uploadUrl" :data="uploadDataThree" multiple list-type="picture-card"
|
|
|
+ :before-upload="uploadFileThree" accept=".gif, .jpeg, .jpg, .png">
|
|
|
+ <el-icon>
|
|
|
+ <Plus />
|
|
|
+ </el-icon>
|
|
|
<template #file="{ file }">
|
|
|
<div>
|
|
|
<div>
|
|
@@ -549,7 +539,9 @@
|
|
|
<el-icon><zoom-in /></el-icon>
|
|
|
</span>
|
|
|
<span class="el-upload-list__item-delete" @click="onRemoveThree(file)">
|
|
|
- <el-icon><Delete /></el-icon>
|
|
|
+ <el-icon>
|
|
|
+ <Delete />
|
|
|
+ </el-icon>
|
|
|
</span>
|
|
|
</span>
|
|
|
<el-button type="primary" @click="clickFileRemark(file, 3)" text>Remark</el-button>
|
|
@@ -581,7 +573,8 @@
|
|
|
<el-table-column label="Ref. Sample" width="180">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSample'" :rules="rules.refSample" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSample'" :rules="rules.refSample"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.refSample" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -590,7 +583,8 @@
|
|
|
<el-table-column label="1# Sample" width="180">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSampleOne'" :rules="rules.refSampleOne" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSampleOne'" :rules="rules.refSampleOne"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.refSampleOne" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -599,7 +593,8 @@
|
|
|
<el-table-column label="2# Sample" width="180">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSampleTwo'" :rules="rules.refSampleTwo" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSampleTwo'" :rules="rules.refSampleTwo"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.refSampleTwo" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -608,10 +603,8 @@
|
|
|
<el-table-column label="3# Sample" width="180">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item
|
|
|
- :prop="'ehsdQualityProductColorList.' + $index + '.refSampleThree'"
|
|
|
- :rules="rules.refSampleThree"
|
|
|
- :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityProductColorList.' + $index + '.refSampleThree'" :rules="rules.refSampleThree"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.refSampleThree" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -658,7 +651,8 @@
|
|
|
<el-table-column label="Actual" width="180">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityPackList.' + $index + '.cartonActual'" :rules="rules.cartonActual" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityPackList.' + $index + '.cartonActual'" :rules="rules.cartonActual"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.cartonActual" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -669,7 +663,8 @@
|
|
|
<el-table-column label="Marking/Spec." width="160">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityPackList.' + $index + '.cartonSizeSpec'" :rules="rules.cartonSizeSpec" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityPackList.' + $index + '.cartonSizeSpec'" :rules="rules.cartonSizeSpec"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.cartonSizeSpec" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -678,7 +673,8 @@
|
|
|
<el-table-column label="Actual" width="180">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityPackList.' + $index + '.cartonSizeActual'" :rules="rules.cartonSizeActual" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityPackList.' + $index + '.cartonSizeActual'" :rules="rules.cartonSizeActual"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.cartonSizeActual" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -689,7 +685,8 @@
|
|
|
<el-table-column label="Marking/Spec." width="160">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityPackList.' + $index + '.grossWeightSpec'" :rules="rules.grossWeightSpec" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityPackList.' + $index + '.grossWeightSpec'" :rules="rules.grossWeightSpec"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.grossWeightSpec" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -698,10 +695,8 @@
|
|
|
<el-table-column label="Actual" width="180">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item
|
|
|
- :prop="'ehsdQualityPackList.' + $index + '.grossWeightActual'"
|
|
|
- :rules="rules.grossWeightActual"
|
|
|
- :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityPackList.' + $index + '.grossWeightActual'" :rules="rules.grossWeightActual"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.grossWeightActual" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -712,7 +707,8 @@
|
|
|
<el-table-column label="Marking/Spec." width="160">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityPackList.' + $index + '.innerBoxSpec'" :rules="rules.innerBoxSpec" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityPackList.' + $index + '.innerBoxSpec'" :rules="rules.innerBoxSpec"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.innerBoxSpec" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -721,7 +717,8 @@
|
|
|
<el-table-column label="Actual" width="180">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'ehsdQualityPackList.' + $index + '.innerBoxActual'" :rules="rules.innerBoxActual" :inline-message="true">
|
|
|
+ <el-form-item :prop="'ehsdQualityPackList.' + $index + '.innerBoxActual'" :rules="rules.innerBoxActual"
|
|
|
+ :inline-message="true">
|
|
|
<el-input v-model="row.innerBoxActual" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -806,20 +803,13 @@
|
|
|
<div style="width: 100%">
|
|
|
<div style="margin-top: 20px">SUPPORT DOCUMENTATION</div>
|
|
|
<el-form-item label="Video" required>
|
|
|
- <el-upload
|
|
|
- class="avatar-uploader"
|
|
|
- action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
- :data="uploadDataFour"
|
|
|
- :show-file-list="false"
|
|
|
- :on-success="onSuccess"
|
|
|
- :before-upload="uploadFileFour"
|
|
|
- accept=".mp4">
|
|
|
- <video
|
|
|
- v-if="formData.data.supportDocumentationFileList && formData.data.supportDocumentationFileList.length > 0"
|
|
|
- :src="formData.data.supportDocumentationFileList[0].fileUrl"
|
|
|
- style="width: 300px; height: 300px"
|
|
|
- controls></video>
|
|
|
- <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
|
|
+ <el-upload class="avatar-uploader" :action="uploadUrl" :data="uploadDataFour" :show-file-list="false" :on-success="onSuccess"
|
|
|
+ :before-upload="uploadFileFour" accept=".mp4">
|
|
|
+ <video v-if="formData.data.supportDocumentationFileList && formData.data.supportDocumentationFileList.length > 0"
|
|
|
+ :src="formData.data.supportDocumentationFileList[0].fileUrl" style="width: 300px; height: 300px" controls></video>
|
|
|
+ <el-icon v-else class="avatar-uploader-icon">
|
|
|
+ <Plus />
|
|
|
+ </el-icon>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -1113,8 +1103,12 @@ const rules = ref({
|
|
|
siteTestRemark: [{ required: true, message: "请输入", trigger: "blur" }],
|
|
|
passed: [{ required: true, message: "请输入", trigger: "blur" }],
|
|
|
failed: [{ required: true, message: "请输入", trigger: "blur" }],
|
|
|
- productSpecificationResult: [{ required: true, message: "请选择", trigger: "change" }],
|
|
|
- productSpecificationRemark: [{ required: true, message: "请输入", trigger: "blur" }],
|
|
|
+ productSpecificationResult: [
|
|
|
+ { required: true, message: "请选择", trigger: "change" },
|
|
|
+ ],
|
|
|
+ productSpecificationRemark: [
|
|
|
+ { required: true, message: "请输入", trigger: "blur" },
|
|
|
+ ],
|
|
|
cartonSpec: [{ required: true, message: "请输入", trigger: "blur" }],
|
|
|
cartonActual: [{ required: true, message: "请输入", trigger: "blur" }],
|
|
|
cartonSizeSpec: [{ required: true, message: "请输入", trigger: "blur" }],
|
|
@@ -1299,50 +1293,75 @@ const clickInspectionTwo = (row) => {
|
|
|
proxy.post("/ehsdQuality/detail", { id: row.id }).then((res) => {
|
|
|
formData.data = res;
|
|
|
if (formData.data.inspectionSummary) {
|
|
|
- formData.data.inspectionSummaryList = JSON.parse(formData.data.inspectionSummary);
|
|
|
+ formData.data.inspectionSummaryList = JSON.parse(
|
|
|
+ formData.data.inspectionSummary
|
|
|
+ );
|
|
|
}
|
|
|
if (formData.data.shippingMarks) {
|
|
|
formData.data.shippingMarksList = JSON.parse(formData.data.shippingMarks);
|
|
|
}
|
|
|
- proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 10 }).then((fileObj) => {
|
|
|
- formData.data.sampleCollectionRecordFileList = fileObj[res.id] || [];
|
|
|
- if (formData.data.sampleCollectionRecordFileList && formData.data.sampleCollectionRecordFileList.length > 0) {
|
|
|
- fileListOne.value = formData.data.sampleCollectionRecordFileList.map((item) => {
|
|
|
- return {
|
|
|
- raw: item,
|
|
|
- name: item.fileName,
|
|
|
- url: item.fileUrl,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 20 }).then((fileObj) => {
|
|
|
- formData.data.workshipPhotoFileList = fileObj[res.id] || [];
|
|
|
- if (formData.data.workshipPhotoFileList && formData.data.workshipPhotoFileList.length > 0) {
|
|
|
- fileListTwo.value = formData.data.workshipPhotoFileList.map((item) => {
|
|
|
- return {
|
|
|
- raw: item,
|
|
|
- name: item.fileName,
|
|
|
- url: item.fileUrl,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 30 }).then((fileObj) => {
|
|
|
- formData.data.defectPhotosOfItemsFileList = fileObj[res.id] || [];
|
|
|
- if (formData.data.defectPhotosOfItemsFileList && formData.data.defectPhotosOfItemsFileList.length > 0) {
|
|
|
- fileListThree.value = formData.data.defectPhotosOfItemsFileList.map((item) => {
|
|
|
- return {
|
|
|
- raw: item,
|
|
|
- name: item.fileName,
|
|
|
- url: item.fileUrl,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 40 }).then((fileObj) => {
|
|
|
- formData.data.supportDocumentationFileList = fileObj[res.id] || [];
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 10 })
|
|
|
+ .then((fileObj) => {
|
|
|
+ formData.data.sampleCollectionRecordFileList = fileObj[res.id] || [];
|
|
|
+ if (
|
|
|
+ formData.data.sampleCollectionRecordFileList &&
|
|
|
+ formData.data.sampleCollectionRecordFileList.length > 0
|
|
|
+ ) {
|
|
|
+ fileListOne.value = formData.data.sampleCollectionRecordFileList.map(
|
|
|
+ (item) => {
|
|
|
+ return {
|
|
|
+ raw: item,
|
|
|
+ name: item.fileName,
|
|
|
+ url: item.fileUrl,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
+ proxy
|
|
|
+ .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 20 })
|
|
|
+ .then((fileObj) => {
|
|
|
+ formData.data.workshipPhotoFileList = fileObj[res.id] || [];
|
|
|
+ if (
|
|
|
+ formData.data.workshipPhotoFileList &&
|
|
|
+ formData.data.workshipPhotoFileList.length > 0
|
|
|
+ ) {
|
|
|
+ fileListTwo.value = formData.data.workshipPhotoFileList.map(
|
|
|
+ (item) => {
|
|
|
+ return {
|
|
|
+ raw: item,
|
|
|
+ name: item.fileName,
|
|
|
+ url: item.fileUrl,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
+ proxy
|
|
|
+ .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 30 })
|
|
|
+ .then((fileObj) => {
|
|
|
+ formData.data.defectPhotosOfItemsFileList = fileObj[res.id] || [];
|
|
|
+ if (
|
|
|
+ formData.data.defectPhotosOfItemsFileList &&
|
|
|
+ formData.data.defectPhotosOfItemsFileList.length > 0
|
|
|
+ ) {
|
|
|
+ fileListThree.value = formData.data.defectPhotosOfItemsFileList.map(
|
|
|
+ (item) => {
|
|
|
+ return {
|
|
|
+ raw: item,
|
|
|
+ name: item.fileName,
|
|
|
+ url: item.fileUrl,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
+ proxy
|
|
|
+ .post("/fileInfo/getList", { businessIdList: [res.id], fileType: 40 })
|
|
|
+ .then((fileObj) => {
|
|
|
+ formData.data.supportDocumentationFileList = fileObj[res.id] || [];
|
|
|
+ });
|
|
|
});
|
|
|
};
|
|
|
const clickSteps = (val) => {
|
|
@@ -1411,25 +1430,30 @@ const submitFollow = async (status) => {
|
|
|
selectSteps.value = 11;
|
|
|
return ElMessage("SUPPORT DOCUMENTATION填写不正确");
|
|
|
}
|
|
|
- formData.data.inspectionSummary = JSON.stringify(formData.data.inspectionSummaryList);
|
|
|
+ formData.data.inspectionSummary = JSON.stringify(
|
|
|
+ formData.data.inspectionSummaryList
|
|
|
+ );
|
|
|
if (fileListOne.value && fileListOne.value.length > 0) {
|
|
|
- formData.data.sampleCollectionRecordFileList = fileListOne.value.map((item) => {
|
|
|
- return {
|
|
|
- id: item.raw.id,
|
|
|
- fileName: item.raw.fileName,
|
|
|
- fileUrl: item.raw.fileUrl,
|
|
|
- remark: item.raw.remark,
|
|
|
- };
|
|
|
- });
|
|
|
+ formData.data.sampleCollectionRecordFileList = fileListOne.value.map(
|
|
|
+ (item) => {
|
|
|
+ return {
|
|
|
+ id: item.raw.id,
|
|
|
+ fileName: item.raw.fileName,
|
|
|
+ fileUrl: item.raw.fileUrl,
|
|
|
+ remark: item.raw.remark,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ );
|
|
|
} else {
|
|
|
formData.data.sampleCollectionRecordFileList = [];
|
|
|
}
|
|
|
- formData.data.ehsdQualityCartonsList = formData.data.ehsdQualityCartonsList.map((item) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- total: formData.data.ehsdQualityCartonsList.length,
|
|
|
- };
|
|
|
- });
|
|
|
+ formData.data.ehsdQualityCartonsList =
|
|
|
+ formData.data.ehsdQualityCartonsList.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ total: formData.data.ehsdQualityCartonsList.length,
|
|
|
+ };
|
|
|
+ });
|
|
|
if (fileListTwo.value && fileListTwo.value.length > 0) {
|
|
|
formData.data.workshipPhotoFileList = fileListTwo.value.map((item) => {
|
|
|
return {
|
|
@@ -1443,19 +1467,28 @@ const submitFollow = async (status) => {
|
|
|
formData.data.workshipPhotoFileList = [];
|
|
|
}
|
|
|
if (fileListThree.value && fileListThree.value.length > 0) {
|
|
|
- formData.data.defectPhotosOfItemsFileList = fileListThree.value.map((item) => {
|
|
|
- return {
|
|
|
- id: item.raw.id,
|
|
|
- fileName: item.raw.fileName,
|
|
|
- fileUrl: item.raw.fileUrl,
|
|
|
- remark: item.raw.remark,
|
|
|
- };
|
|
|
- });
|
|
|
+ formData.data.defectPhotosOfItemsFileList = fileListThree.value.map(
|
|
|
+ (item) => {
|
|
|
+ return {
|
|
|
+ id: item.raw.id,
|
|
|
+ fileName: item.raw.fileName,
|
|
|
+ fileUrl: item.raw.fileUrl,
|
|
|
+ remark: item.raw.remark,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ );
|
|
|
} else {
|
|
|
formData.data.defectPhotosOfItemsFileList = [];
|
|
|
}
|
|
|
- formData.data.shippingMarks = JSON.stringify(formData.data.shippingMarksList);
|
|
|
- if (!(formData.data.supportDocumentationFileList && formData.data.supportDocumentationFileList.length > 0)) {
|
|
|
+ formData.data.shippingMarks = JSON.stringify(
|
|
|
+ formData.data.shippingMarksList
|
|
|
+ );
|
|
|
+ if (
|
|
|
+ !(
|
|
|
+ formData.data.supportDocumentationFileList &&
|
|
|
+ formData.data.supportDocumentationFileList.length > 0
|
|
|
+ )
|
|
|
+ ) {
|
|
|
return ElMessage("请上传视频");
|
|
|
}
|
|
|
formData.data.step = "1,2,3,4,5,6,7,8,9,10,11";
|
|
@@ -1468,25 +1501,30 @@ const submitFollow = async (status) => {
|
|
|
openInspection.value = false;
|
|
|
});
|
|
|
} else {
|
|
|
- formData.data.inspectionSummary = JSON.stringify(formData.data.inspectionSummaryList);
|
|
|
+ formData.data.inspectionSummary = JSON.stringify(
|
|
|
+ formData.data.inspectionSummaryList
|
|
|
+ );
|
|
|
if (fileListOne.value && fileListOne.value.length > 0) {
|
|
|
- formData.data.sampleCollectionRecordFileList = fileListOne.value.map((item) => {
|
|
|
- return {
|
|
|
- id: item.raw.id,
|
|
|
- fileName: item.raw.fileName,
|
|
|
- fileUrl: item.raw.fileUrl,
|
|
|
- remark: item.raw.remark,
|
|
|
- };
|
|
|
- });
|
|
|
+ formData.data.sampleCollectionRecordFileList = fileListOne.value.map(
|
|
|
+ (item) => {
|
|
|
+ return {
|
|
|
+ id: item.raw.id,
|
|
|
+ fileName: item.raw.fileName,
|
|
|
+ fileUrl: item.raw.fileUrl,
|
|
|
+ remark: item.raw.remark,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ );
|
|
|
} else {
|
|
|
formData.data.sampleCollectionRecordFileList = [];
|
|
|
}
|
|
|
- formData.data.ehsdQualityCartonsList = formData.data.ehsdQualityCartonsList.map((item) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- total: formData.data.ehsdQualityCartonsList.length,
|
|
|
- };
|
|
|
- });
|
|
|
+ formData.data.ehsdQualityCartonsList =
|
|
|
+ formData.data.ehsdQualityCartonsList.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ total: formData.data.ehsdQualityCartonsList.length,
|
|
|
+ };
|
|
|
+ });
|
|
|
if (fileListTwo.value && fileListTwo.value.length > 0) {
|
|
|
formData.data.workshipPhotoFileList = fileListTwo.value.map((item) => {
|
|
|
return {
|
|
@@ -1500,18 +1538,22 @@ const submitFollow = async (status) => {
|
|
|
formData.data.workshipPhotoFileList = [];
|
|
|
}
|
|
|
if (fileListThree.value && fileListThree.value.length > 0) {
|
|
|
- formData.data.defectPhotosOfItemsFileList = fileListThree.value.map((item) => {
|
|
|
- return {
|
|
|
- id: item.raw.id,
|
|
|
- fileName: item.raw.fileName,
|
|
|
- fileUrl: item.raw.fileUrl,
|
|
|
- remark: item.raw.remark,
|
|
|
- };
|
|
|
- });
|
|
|
+ formData.data.defectPhotosOfItemsFileList = fileListThree.value.map(
|
|
|
+ (item) => {
|
|
|
+ return {
|
|
|
+ id: item.raw.id,
|
|
|
+ fileName: item.raw.fileName,
|
|
|
+ fileUrl: item.raw.fileUrl,
|
|
|
+ remark: item.raw.remark,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ );
|
|
|
} else {
|
|
|
formData.data.defectPhotosOfItemsFileList = [];
|
|
|
}
|
|
|
- formData.data.shippingMarks = JSON.stringify(formData.data.shippingMarksList);
|
|
|
+ formData.data.shippingMarks = JSON.stringify(
|
|
|
+ formData.data.shippingMarksList
|
|
|
+ );
|
|
|
proxy.post("/ehsdQuality/submit", formData.data).then(() => {
|
|
|
ElMessage({
|
|
|
message: "暂存成功",
|
|
@@ -1521,7 +1563,10 @@ const submitFollow = async (status) => {
|
|
|
}
|
|
|
};
|
|
|
const clickAdd = () => {
|
|
|
- if (formData.data.inspectionSummaryList && formData.data.inspectionSummaryList.length > 0) {
|
|
|
+ if (
|
|
|
+ formData.data.inspectionSummaryList &&
|
|
|
+ formData.data.inspectionSummaryList.length > 0
|
|
|
+ ) {
|
|
|
formData.data.inspectionSummaryList.push({
|
|
|
summaryLabel: "",
|
|
|
summaryValue: "Passed",
|
|
@@ -1539,7 +1584,9 @@ const handleDelete = (index) => {
|
|
|
formData.data.inspectionSummaryList.splice(index, 1);
|
|
|
};
|
|
|
const changeAqlResult = () => {
|
|
|
- let data = formData.data.ehsdQualityAqlList.filter((item) => item.aqlResult === 0);
|
|
|
+ let data = formData.data.ehsdQualityAqlList.filter(
|
|
|
+ (item) => item.aqlResult === 0
|
|
|
+ );
|
|
|
if (data && data.length === 3) {
|
|
|
formData.data.summaryResult = 0;
|
|
|
} else {
|
|
@@ -1547,7 +1594,10 @@ const changeAqlResult = () => {
|
|
|
}
|
|
|
};
|
|
|
const clickProblemAdd = () => {
|
|
|
- if (formData.data.ehsdQualityProblemList && formData.data.ehsdQualityProblemList.length > 0) {
|
|
|
+ if (
|
|
|
+ formData.data.ehsdQualityProblemList &&
|
|
|
+ formData.data.ehsdQualityProblemList.length > 0
|
|
|
+ ) {
|
|
|
formData.data.ehsdQualityProblemList.push({
|
|
|
remark: "",
|
|
|
});
|
|
@@ -1577,7 +1627,9 @@ const uploadFileOne = async (file) => {
|
|
|
return true;
|
|
|
};
|
|
|
const onRemoveOne = (file) => {
|
|
|
- fileListOne.value = fileListOne.value.filter((item) => item.raw.fileUrl !== file.raw.fileUrl);
|
|
|
+ fileListOne.value = fileListOne.value.filter(
|
|
|
+ (item) => item.raw.fileUrl !== file.raw.fileUrl
|
|
|
+ );
|
|
|
};
|
|
|
const fileListTwo = ref([]);
|
|
|
const uploadDataTwo = ref({});
|
|
@@ -1591,7 +1643,9 @@ const uploadFileTwo = async (file) => {
|
|
|
return true;
|
|
|
};
|
|
|
const onRemoveTwo = (file) => {
|
|
|
- fileListTwo.value = fileListTwo.value.filter((item) => item.raw.fileUrl !== file.raw.fileUrl);
|
|
|
+ fileListTwo.value = fileListTwo.value.filter(
|
|
|
+ (item) => item.raw.fileUrl !== file.raw.fileUrl
|
|
|
+ );
|
|
|
};
|
|
|
const fileListThree = ref([]);
|
|
|
const uploadDataThree = ref({});
|
|
@@ -1605,7 +1659,9 @@ const uploadFileThree = async (file) => {
|
|
|
return true;
|
|
|
};
|
|
|
const onRemoveThree = (file) => {
|
|
|
- fileListThree.value = fileListThree.value.filter((item) => item.raw.fileUrl !== file.raw.fileUrl);
|
|
|
+ fileListThree.value = fileListThree.value.filter(
|
|
|
+ (item) => item.raw.fileUrl !== file.raw.fileUrl
|
|
|
+ );
|
|
|
};
|
|
|
const uploadDataFour = ref({});
|
|
|
const uploadFileFour = async (file) => {
|
|
@@ -1698,7 +1754,10 @@ const changeClass = ({ row, rowIndex }) => {
|
|
|
}
|
|
|
};
|
|
|
const clickWorkShipAdd = () => {
|
|
|
- if (formData.data.ehsdQualityWorkshipList && formData.data.ehsdQualityWorkshipList.length > 0) {
|
|
|
+ if (
|
|
|
+ formData.data.ehsdQualityWorkshipList &&
|
|
|
+ formData.data.ehsdQualityWorkshipList.length > 0
|
|
|
+ ) {
|
|
|
formData.data.ehsdQualityWorkshipList.push({
|
|
|
description: "",
|
|
|
remark: "",
|
|
@@ -1763,7 +1822,10 @@ const getSummaries = (param) => {
|
|
|
return sums;
|
|
|
};
|
|
|
const clickSiteTestAdd = () => {
|
|
|
- if (formData.data.ehsdQualitySiteTestList && formData.data.ehsdQualitySiteTestList.length > 0) {
|
|
|
+ if (
|
|
|
+ formData.data.ehsdQualitySiteTestList &&
|
|
|
+ formData.data.ehsdQualitySiteTestList.length > 0
|
|
|
+ ) {
|
|
|
formData.data.ehsdQualitySiteTestList.push({
|
|
|
description: "",
|
|
|
sampleSize: undefined,
|
|
@@ -1786,7 +1848,9 @@ const clickSiteTestAdd = () => {
|
|
|
}
|
|
|
};
|
|
|
const changeSiteTestResult = () => {
|
|
|
- let data = formData.data.ehsdQualitySiteTestList.filter((item) => item.result === 0);
|
|
|
+ let data = formData.data.ehsdQualitySiteTestList.filter(
|
|
|
+ (item) => item.result === 0
|
|
|
+ );
|
|
|
if (data && data.length === formData.data.ehsdQualitySiteTestList.length) {
|
|
|
formData.data.siteTestResult = 0;
|
|
|
} else {
|
|
@@ -1794,7 +1858,10 @@ const changeSiteTestResult = () => {
|
|
|
}
|
|
|
};
|
|
|
const clickMarkingAdd = () => {
|
|
|
- if (formData.data.markingDetailList && formData.data.markingDetailList.length > 0) {
|
|
|
+ if (
|
|
|
+ formData.data.markingDetailList &&
|
|
|
+ formData.data.markingDetailList.length > 0
|
|
|
+ ) {
|
|
|
formData.data.markingDetailList.push({
|
|
|
name: "",
|
|
|
result: "",
|