|
@@ -38,20 +38,20 @@
|
|
<template #title>
|
|
<template #title>
|
|
<div>
|
|
<div>
|
|
<van-icon name="warning-o" v-if="
|
|
<van-icon name="warning-o" v-if="
|
|
- submitData[item.productId].quantity &&
|
|
|
|
- submitData[item.productId].remark &&
|
|
|
|
- submitData[item.productId].fileList.length > 0
|
|
|
|
|
|
+ submitData[item.id].quantity &&
|
|
|
|
+ submitData[item.id].remark &&
|
|
|
|
+ submitData[item.id].fileList.length > 0
|
|
" color="#ee0a24" style="margin-right: 5px" />
|
|
" color="#ee0a24" style="margin-right: 5px" />
|
|
|
|
|
|
{{ item.productName }}
|
|
{{ item.productName }}
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<div>
|
|
<div>
|
|
- <van-field v-model="submitData[item.productId].quantity" label="售后数量" type="digit" placeholder="请输入" label-align="top" />
|
|
|
|
- <van-field v-model="submitData[item.productId].remark" label="售后说明" type="textarea" placeholder="请输入" label-align="top" />
|
|
|
|
|
|
+ <van-field v-model="submitData[item.id].quantity" label="售后数量" type="digit" placeholder="请输入" label-align="top" />
|
|
|
|
+ <van-field v-model="submitData[item.id].remark" label="售后说明" type="textarea" placeholder="请输入" label-align="top" />
|
|
<van-field name="uploader" label="现场照片">
|
|
<van-field name="uploader" label="现场照片">
|
|
<template #input>
|
|
<template #input>
|
|
- <van-uploader v-model="submitData[item.productId].fileList" :after-read="afterRead" multiple :max-size="5 * 1024 * 1024"
|
|
|
|
|
|
+ <van-uploader v-model="submitData[item.id].fileList" :after-read="afterRead" multiple :max-size="5 * 1024 * 1024"
|
|
@oversize="onOversize" />
|
|
@oversize="onOversize" />
|
|
</template>
|
|
</template>
|
|
</van-field>
|
|
</van-field>
|
|
@@ -351,7 +351,8 @@ const getDetails = async (id) => {
|
|
if (status == 0) {
|
|
if (status == 0) {
|
|
for (let i = 0; i < res.data.bomDetailList.length; i++) {
|
|
for (let i = 0; i < res.data.bomDetailList.length; i++) {
|
|
const e = res.data.bomDetailList[i];
|
|
const e = res.data.bomDetailList[i];
|
|
- submitData.value[e.productId] = {
|
|
|
|
|
|
+ submitData.value[e.id] = {
|
|
|
|
+ bomDetailId: e.id,
|
|
accessoriesId: e.productId,
|
|
accessoriesId: e.productId,
|
|
productName: e.productName,
|
|
productName: e.productName,
|
|
quantity: null,
|
|
quantity: null,
|
|
@@ -364,7 +365,8 @@ const getDetails = async (id) => {
|
|
let arr = res.data.bomDetailList.map((x) => x.afterSalesRecordDetail.id);
|
|
let arr = res.data.bomDetailList.map((x) => x.afterSalesRecordDetail.id);
|
|
for (let i = 0; i < res.data.bomDetailList.length; i++) {
|
|
for (let i = 0; i < res.data.bomDetailList.length; i++) {
|
|
const e = res.data.bomDetailList[i];
|
|
const e = res.data.bomDetailList[i];
|
|
- submitData.value[e.productId] = {
|
|
|
|
|
|
+ submitData.value[e.id] = {
|
|
|
|
+ bomDetailId: e.id,
|
|
accessoriesId: e.productId,
|
|
accessoriesId: e.productId,
|
|
productName: e.productName,
|
|
productName: e.productName,
|
|
quantity: e.afterSalesRecordDetail.quantity,
|
|
quantity: e.afterSalesRecordDetail.quantity,
|
|
@@ -380,13 +382,11 @@ const getDetails = async (id) => {
|
|
const e = res.data.bomDetailList[i];
|
|
const e = res.data.bomDetailList[i];
|
|
for (const key in fileObj.data) {
|
|
for (const key in fileObj.data) {
|
|
if (e.afterSalesRecordDetail.id == key) {
|
|
if (e.afterSalesRecordDetail.id == key) {
|
|
- submitData.value[e.productId].fileList = fileObj.data[key].map(
|
|
|
|
- (item) => ({
|
|
|
|
- raw: item,
|
|
|
|
- name: item.fileName,
|
|
|
|
- url: item.fileUrl,
|
|
|
|
- })
|
|
|
|
- );
|
|
|
|
|
|
+ submitData.value[e.id].fileList = fileObj.data[key].map((item) => ({
|
|
|
|
+ raw: item,
|
|
|
|
+ name: item.fileName,
|
|
|
|
+ url: item.fileUrl,
|
|
|
|
+ }));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -436,8 +436,9 @@ onMounted(() => {
|
|
if (route.query.id) {
|
|
if (route.query.id) {
|
|
getDetails(route.query.id);
|
|
getDetails(route.query.id);
|
|
if (route.query.status == 1) {
|
|
if (route.query.status == 1) {
|
|
- formOption.hiddenSubmitBtn = true; //隐藏提交按钮
|
|
|
|
- formOption.readonly = true;
|
|
|
|
|
|
+ formOptionOne.hiddenSubmitBtn = true; //隐藏提交按钮
|
|
|
|
+ formOptionOne.readonly = true;
|
|
|
|
+ formOptionOne.btnConfig.isNeed = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -489,26 +490,26 @@ const onSubmit = async () => {
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
-const handleClickItem = (item) => {
|
|
|
|
- if (item.afterSalesRecordDetail || route.query.status == 0) {
|
|
|
|
- proxy.$router.push({
|
|
|
|
- path: "jxskAfterSalesEditItem",
|
|
|
|
- query: {
|
|
|
|
- data: JSON.stringify({
|
|
|
|
- bomDetailList: [item],
|
|
|
|
- code: formData.data.code,
|
|
|
|
- productName: formData.data.productName,
|
|
|
|
- productSn: formData.data.productSn,
|
|
|
|
- remark: item.afterSalesRecordDetail
|
|
|
|
- ? item.afterSalesRecordDetail.remark
|
|
|
|
- : "",
|
|
|
|
- fileList: [],
|
|
|
|
- status: route.query.status,
|
|
|
|
- }),
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-};
|
|
|
|
|
|
+// const handleClickItem = (item) => {
|
|
|
|
+// if (item.afterSalesRecordDetail || route.query.status == 0) {
|
|
|
|
+// proxy.$router.push({
|
|
|
|
+// path: "jxskAfterSalesEditItem",
|
|
|
|
+// query: {
|
|
|
|
+// data: JSON.stringify({
|
|
|
|
+// bomDetailList: [item],
|
|
|
|
+// code: formData.data.code,
|
|
|
|
+// productName: formData.data.productName,
|
|
|
|
+// productSn: formData.data.productSn,
|
|
|
|
+// remark: item.afterSalesRecordDetail
|
|
|
|
+// ? item.afterSalesRecordDetail.remark
|
|
|
|
+// : "",
|
|
|
|
+// fileList: [],
|
|
|
|
+// status: route.query.status,
|
|
|
|
+// }),
|
|
|
|
+// },
|
|
|
|
+// });
|
|
|
|
+// }
|
|
|
|
+// };
|
|
|
|
|
|
const productData = ref([]);
|
|
const productData = ref([]);
|
|
const getProductData = (keyword) => {
|
|
const getProductData = (keyword) => {
|