|
@@ -20,18 +20,16 @@
|
|
|
<byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
|
|
|
<template #steps>
|
|
|
<div style="width: 100%">
|
|
|
- <div class="steps-aaa">
|
|
|
- <el-steps :space="200" align-center style="width: 2200px">
|
|
|
- <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>
|
|
|
- <div v-if="selectSteps === 1" 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-steps>
|
|
|
+ <div v-show="selectSteps === 1" style="width: 100%">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="Supplier" prop="supplyName" style="margin-top: 20px">
|
|
@@ -69,7 +67,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
- <div v-else-if="selectSteps === 2" style="width: 100%">
|
|
|
+ <div v-show="selectSteps === 2" style="width: 100%">
|
|
|
<div style="margin-top: 20px; font-weight: 700">INSPECTION SUMMARY</div>
|
|
|
<div>
|
|
|
<el-button type="primary" @click="clickAdd()" plain>添加行</el-button>
|
|
@@ -171,7 +169,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
- <div v-else-if="selectSteps === 3" style="width: 100%">
|
|
|
+ <div v-show="selectSteps === 3" style="width: 100%">
|
|
|
<div style="margin-top: 20px">Problem Remarks</div>
|
|
|
<div>
|
|
|
<el-button type="primary" @click="clickProblemAdd()" plain>添加行</el-button>
|
|
@@ -228,8 +226,8 @@
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div v-else-if="selectSteps === 4" style="width: 100%"></div>
|
|
|
- <div v-else-if="selectSteps === 5" style="width: 100%">
|
|
|
+ <div v-show="selectSteps === 4" style="width: 100%"></div>
|
|
|
+ <div v-show="selectSteps === 5" style="width: 100%">
|
|
|
<div style="margin-top: 20px">Quantity</div>
|
|
|
<div>
|
|
|
<el-table :data="formData.data.ehsdQualityProductList" style="width: 100%; margin-top: 16px">
|
|
@@ -339,7 +337,7 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-else-if="selectSteps === 6" style="width: 100%">
|
|
|
+ <div v-show="selectSteps === 6" style="width: 100%">
|
|
|
<div style="margin-top: 20px">Workmanship Defectives / Function Inspection Findings</div>
|
|
|
<div>
|
|
|
<el-button type="primary" @click="clickWorkShipAdd()" plain>添加行</el-button>
|
|
@@ -423,7 +421,7 @@
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div v-else-if="selectSteps === 7" style="width: 100%">
|
|
|
+ <div v-show="selectSteps === 7" style="width: 100%">
|
|
|
<div style="margin-top: 20px">ON-SITE TESTS</div>
|
|
|
<div>
|
|
|
<el-button type="primary" @click="clickSiteTestAdd()" plain>添加行</el-button>
|
|
@@ -524,7 +522,7 @@
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div v-else-if="selectSteps === 8" style="width: 100%">
|
|
|
+ <div v-show="selectSteps === 8" style="width: 100%">
|
|
|
<div style="margin-top: 20px">PRODUCT SPECIFICATION</div>
|
|
|
<div>
|
|
|
<el-table :data="formData.data.ehsdQualityProductColorList" style="width: 100%; margin-top: 16px">
|
|
@@ -588,7 +586,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
- <div v-else-if="selectSteps === 9" style="width: 100%">
|
|
|
+ <div v-show="selectSteps === 9" style="width: 100%">
|
|
|
<div style="margin-top: 20px">Package Details</div>
|
|
|
<div>
|
|
|
<el-table :data="formData.data.ehsdQualityPackList" style="width: 100%; margin-top: 16px">
|
|
@@ -678,7 +676,7 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-else-if="selectSteps === 10" style="width: 100%">
|
|
|
+ <div v-show="selectSteps === 10" style="width: 100%">
|
|
|
<div style="margin-top: 20px">MARKING & LABELING</div>
|
|
|
<el-form-item label="Marking type" prop="markingType" style="margin-top: 20px">
|
|
|
<el-select v-model="formData.data.markingType">
|
|
@@ -738,7 +736,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
- <div v-else-if="selectSteps === 11" style="width: 100%">
|
|
|
+ <div v-show="selectSteps === 11" style="width: 100%">
|
|
|
<div style="margin-top: 20px">SUPPORT DOCUMENTATION</div>
|
|
|
<el-form-item label="Video" required>
|
|
|
<el-upload
|
|
@@ -762,7 +760,7 @@
|
|
|
</template>
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
- <div v-if="selectSteps">
|
|
|
+ <div>
|
|
|
<el-button @click="openInspection = false" size="large">取 消</el-button>
|
|
|
<el-button @click="submitFollow(false)" size="large" plain>暂 存</el-button>
|
|
|
<el-button type="primary" @click="submitFollow(true)" size="large">确 定</el-button>
|
|
@@ -797,15 +795,15 @@ const { proxy } = getCurrentInstance();
|
|
|
const qualityStatus = ref([
|
|
|
{
|
|
|
label: "未质检",
|
|
|
- value: null,
|
|
|
+ value: 0,
|
|
|
},
|
|
|
{
|
|
|
label: "质检中",
|
|
|
- value: 0,
|
|
|
+ value: 10,
|
|
|
},
|
|
|
{
|
|
|
label: "已质检",
|
|
|
- value: 10,
|
|
|
+ value: 20,
|
|
|
},
|
|
|
]);
|
|
|
const orderType = ref([
|
|
@@ -943,7 +941,7 @@ const config = computed(() => {
|
|
|
},
|
|
|
renderHTML(row) {
|
|
|
return [
|
|
|
- !row.qualityStatus && row.qualityStatus !== 0
|
|
|
+ row.qualityStatus === 0
|
|
|
? {
|
|
|
attrs: {
|
|
|
label: "质检",
|
|
@@ -956,7 +954,7 @@ const config = computed(() => {
|
|
|
},
|
|
|
}
|
|
|
: {},
|
|
|
- row.qualityStatus === 0
|
|
|
+ row.qualityStatus === 10
|
|
|
? {
|
|
|
attrs: {
|
|
|
label: "继续质检",
|
|
@@ -1071,7 +1069,7 @@ const submit = ref(null);
|
|
|
const formData = reactive({
|
|
|
data: {},
|
|
|
});
|
|
|
-const selectSteps = ref("");
|
|
|
+const selectSteps = ref("1");
|
|
|
const aqlResult = ref([
|
|
|
{
|
|
|
label: "Failed",
|
|
@@ -1100,7 +1098,7 @@ const clickInspection = (row) => {
|
|
|
fileListOne.value = [];
|
|
|
fileListTwo.value = [];
|
|
|
fileListThree.value = [];
|
|
|
- selectSteps.value = "";
|
|
|
+ selectSteps.value = "1";
|
|
|
let orderType = 0;
|
|
|
if (row.orderType === "外销合同") {
|
|
|
orderType = 1;
|
|
@@ -1221,12 +1219,19 @@ const clickInspection = (row) => {
|
|
|
openInspection.value = true;
|
|
|
};
|
|
|
const clickInspectionTwo = (row) => {
|
|
|
+ selectSteps.value = "1";
|
|
|
fileListOne.value = [];
|
|
|
fileListTwo.value = [];
|
|
|
fileListThree.value = [];
|
|
|
openInspection.value = true;
|
|
|
proxy.post("/ehsdQuality/detail", { id: row.id }).then((res) => {
|
|
|
formData.data = res;
|
|
|
+ if (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) {
|
|
@@ -1269,22 +1274,9 @@ const clickInspectionTwo = (row) => {
|
|
|
});
|
|
|
};
|
|
|
const clickSteps = (val) => {
|
|
|
- if (formData.data.step) {
|
|
|
- let step = formData.data.step.split(",");
|
|
|
- if (!step.includes(val + "")) {
|
|
|
- selectSteps.value = val;
|
|
|
- }
|
|
|
- } else {
|
|
|
- selectSteps.value = val;
|
|
|
- }
|
|
|
+ selectSteps.value = val;
|
|
|
};
|
|
|
const getStepStatus = (item) => {
|
|
|
- if (formData.data.step) {
|
|
|
- let step = formData.data.step.split(",");
|
|
|
- if (step.includes(item.value + "")) {
|
|
|
- return "wait";
|
|
|
- }
|
|
|
- }
|
|
|
if (selectSteps.value === item.value) {
|
|
|
return "success";
|
|
|
}
|
|
@@ -1293,124 +1285,7 @@ const getStepStatus = (item) => {
|
|
|
const submitFollow = (status) => {
|
|
|
if (status) {
|
|
|
submit.value.handleSubmit(() => {
|
|
|
- if (formData.data.step) {
|
|
|
- formData.data.step = formData.data.step + "," + selectSteps.value;
|
|
|
- } else {
|
|
|
- formData.data.step = selectSteps.value + "";
|
|
|
- }
|
|
|
- if (selectSteps.value === 2) {
|
|
|
- formData.data.inspectionSummary = JSON.stringify(formData.data.inspectionSummaryList);
|
|
|
- } else if (selectSteps.value === 3) {
|
|
|
- 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,
|
|
|
- };
|
|
|
- });
|
|
|
- } else {
|
|
|
- formData.data.sampleCollectionRecordFileList = [];
|
|
|
- }
|
|
|
- } else if (selectSteps.value === 5) {
|
|
|
- formData.data.ehsdQualityCartonsList = formData.data.ehsdQualityCartonsList.map((item) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- total: formData.data.ehsdQualityCartonsList.length,
|
|
|
- };
|
|
|
- });
|
|
|
- } else if (selectSteps.value === 6) {
|
|
|
- if (fileListTwo.value && fileListTwo.value.length > 0) {
|
|
|
- formData.data.workshipPhotoFileList = fileListTwo.value.map((item) => {
|
|
|
- return {
|
|
|
- id: item.raw.id,
|
|
|
- fileName: item.raw.fileName,
|
|
|
- fileUrl: item.raw.fileUrl,
|
|
|
- remark: item.raw.remark,
|
|
|
- };
|
|
|
- });
|
|
|
- } else {
|
|
|
- formData.data.workshipPhotoFileList = [];
|
|
|
- }
|
|
|
- } else if (selectSteps.value === 7) {
|
|
|
- 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,
|
|
|
- };
|
|
|
- });
|
|
|
- } else {
|
|
|
- formData.data.defectPhotosOfItemsFileList = [];
|
|
|
- }
|
|
|
- } else if (selectSteps.value === 10) {
|
|
|
- formData.data.shippingMarks = JSON.stringify(formData.data.shippingMarksList);
|
|
|
- } else if (selectSteps.value === 11) {
|
|
|
- if (!(formData.data.supportDocumentationFileList && formData.data.supportDocumentationFileList.length > 0)) {
|
|
|
- return ElMessage("请上传视频");
|
|
|
- }
|
|
|
- }
|
|
|
- proxy.post("/ehsdQuality/submit", formData.data).then(() => {
|
|
|
- ElMessage({
|
|
|
- message: "保存成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- getList();
|
|
|
- fileListOne.value = [];
|
|
|
- fileListTwo.value = [];
|
|
|
- fileListThree.value = [];
|
|
|
- selectSteps.value = "";
|
|
|
- proxy.post("/ehsdQuality/detail", { id: formData.data.businessId }).then((res) => {
|
|
|
- formData.data = res;
|
|
|
- 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] || [];
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- } else {
|
|
|
- if (selectSteps.value === 2) {
|
|
|
formData.data.inspectionSummary = JSON.stringify(formData.data.inspectionSummaryList);
|
|
|
- } else if (selectSteps.value === 3) {
|
|
|
if (fileListOne.value && fileListOne.value.length > 0) {
|
|
|
formData.data.sampleCollectionRecordFileList = fileListOne.value.map((item) => {
|
|
|
return {
|
|
@@ -1423,14 +1298,12 @@ const submitFollow = (status) => {
|
|
|
} else {
|
|
|
formData.data.sampleCollectionRecordFileList = [];
|
|
|
}
|
|
|
- } else if (selectSteps.value === 5) {
|
|
|
formData.data.ehsdQualityCartonsList = formData.data.ehsdQualityCartonsList.map((item) => {
|
|
|
return {
|
|
|
...item,
|
|
|
total: formData.data.ehsdQualityCartonsList.length,
|
|
|
};
|
|
|
});
|
|
|
- } else if (selectSteps.value === 6) {
|
|
|
if (fileListTwo.value && fileListTwo.value.length > 0) {
|
|
|
formData.data.workshipPhotoFileList = fileListTwo.value.map((item) => {
|
|
|
return {
|
|
@@ -1443,7 +1316,6 @@ const submitFollow = (status) => {
|
|
|
} else {
|
|
|
formData.data.workshipPhotoFileList = [];
|
|
|
}
|
|
|
- } else if (selectSteps.value === 7) {
|
|
|
if (fileListThree.value && fileListThree.value.length > 0) {
|
|
|
formData.data.defectPhotosOfItemsFileList = fileListThree.value.map((item) => {
|
|
|
return {
|
|
@@ -1456,9 +1328,65 @@ const submitFollow = (status) => {
|
|
|
} else {
|
|
|
formData.data.defectPhotosOfItemsFileList = [];
|
|
|
}
|
|
|
- } else if (selectSteps.value === 10) {
|
|
|
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";
|
|
|
+ proxy.post("/ehsdQuality/submit", formData.data).then(() => {
|
|
|
+ ElMessage({
|
|
|
+ message: "保存成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ getList();
|
|
|
+ openInspection.value = false;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ 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,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ formData.data.sampleCollectionRecordFileList = [];
|
|
|
+ }
|
|
|
+ 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 {
|
|
|
+ id: item.raw.id,
|
|
|
+ fileName: item.raw.fileName,
|
|
|
+ fileUrl: item.raw.fileUrl,
|
|
|
+ remark: item.raw.remark,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ 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,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ formData.data.defectPhotosOfItemsFileList = [];
|
|
|
+ }
|
|
|
+ formData.data.shippingMarks = JSON.stringify(formData.data.shippingMarksList);
|
|
|
proxy.post("/ehsdQuality/submit", formData.data).then(() => {
|
|
|
ElMessage({
|
|
|
message: "暂存成功",
|
|
@@ -1775,12 +1703,6 @@ const clickMarkingAdd = () => {
|
|
|
width: 110px !important;
|
|
|
height: 110px !important;
|
|
|
}
|
|
|
-.steps-aaa {
|
|
|
- overflow-x: auto;
|
|
|
- overflow-y: hidden;
|
|
|
- width: 100%;
|
|
|
- padding: 0 10px;
|
|
|
-}
|
|
|
::v-deep(.hideClass) {
|
|
|
display: none;
|
|
|
}
|