|
@@ -76,9 +76,9 @@
|
|
|
<div style="width: 100%; display: flex">
|
|
|
<div style="flex: 1">
|
|
|
<el-icon color="red" 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
|
|
|
" style="margin-right: 10px">
|
|
|
<WarnTriangleFilled />
|
|
|
</el-icon>
|
|
@@ -91,15 +91,15 @@
|
|
|
</template>
|
|
|
<div>
|
|
|
<el-form-item label="售后数量">
|
|
|
- <el-input-number onmousewheel="return false;" v-model="submitData[item.productId].quantity" placeholder="请输入"
|
|
|
- style="width: 100%" :precision="0" :controls="false" :min="0" :disabled="isDetail" />
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="submitData[item.id].quantity" placeholder="请输入" style="width: 100%"
|
|
|
+ :precision="0" :controls="false" :min="0" :disabled="isDetail" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="售后说明">
|
|
|
- <el-input v-model="submitData[item.productId].remark" type="textarea" :disabled="isDetail" />
|
|
|
+ <el-input v-model="submitData[item.id].remark" type="textarea" :disabled="isDetail" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="现场照片" style="margin-top: 20px">
|
|
|
<div>
|
|
|
- <el-upload v-model:fileList="submitData[item.productId].fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
+ <el-upload v-model:fileList="submitData[item.id].fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
:data="uploadData" multiple :before-upload="handleBeforeUpload" :on-success="handleSuccess"
|
|
|
:on-preview="onPreviewFile">
|
|
|
<el-button type="primary" plain :disabled="isDetail">选择</el-button>
|
|
@@ -134,7 +134,7 @@
|
|
|
<div style="width: 100%">
|
|
|
<TitleInfo content="申请物料" style="margin: 20px 0 20px 0"></TitleInfo>
|
|
|
<div style="width: 100%">
|
|
|
- <el-button type="primary" plain @click="openMaterial = true">
|
|
|
+ <el-button type="primary" plain @click="openMaterial = true" v-if="!isDetail">
|
|
|
添加物料/半成品
|
|
|
</el-button>
|
|
|
<el-table :data="formData.followData.afterSalesMaterialsList" style="margin-top: 15px">
|
|
@@ -143,8 +143,8 @@
|
|
|
<el-table-column prop="quantity" label="数量" width="150">
|
|
|
<template #default="{ row, $index }">
|
|
|
<el-form-item :prop="'afterSalesMaterialsList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
|
|
|
- <el-input-number onmousewheel="return false;" v-model="row.quantity" :precision="0" :controls="false" :min="0"
|
|
|
- @change="changeAmount" style="width:80%" />
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" :disabled="isDetail" :precision="0" :controls="false"
|
|
|
+ :min="0" @change="changeAmount" style="width:80%" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -157,7 +157,7 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column> -->
|
|
|
- <el-table-column prop="zip" label="操作" width="60">
|
|
|
+ <el-table-column prop="zip" label="操作" width="60" v-if="!isDetail">
|
|
|
<template #default="{ $index }">
|
|
|
<el-button type="primary" link @click="handleRemove($index)">删除</el-button>
|
|
|
</template>
|
|
@@ -714,7 +714,8 @@ const handleFollow = (row) => {
|
|
|
if (row.status == 0) {
|
|
|
for (let i = 0; i < res.bomDetailList.length; i++) {
|
|
|
const e = res.bomDetailList[i];
|
|
|
- submitData.value[e.productId] = {
|
|
|
+ submitData.value[e.id] = {
|
|
|
+ bomDetailId: e.id,
|
|
|
accessoriesId: e.productId,
|
|
|
productName: e.productName,
|
|
|
quantity: null,
|
|
@@ -730,7 +731,8 @@ const handleFollow = (row) => {
|
|
|
let arr = res.bomDetailList.map((x) => x.afterSalesRecordDetail.id);
|
|
|
for (let i = 0; i < res.bomDetailList.length; i++) {
|
|
|
const e = res.bomDetailList[i];
|
|
|
- submitData.value[e.productId] = {
|
|
|
+ submitData.value[e.id] = {
|
|
|
+ bomDetailId: e.id,
|
|
|
accessoriesId: e.productId,
|
|
|
productName: e.productName,
|
|
|
quantity: e.afterSalesRecordDetail.quantity,
|
|
@@ -740,7 +742,7 @@ const handleFollow = (row) => {
|
|
|
}
|
|
|
formData.followData = res;
|
|
|
formData.followData.id = row.id;
|
|
|
- formData.followData.afterSalesMaterialsList = [];
|
|
|
+ // formData.followData.afterSalesMaterialsList = [];
|
|
|
openFollow.value = true;
|
|
|
const fileObj = await proxy.post("/fileInfo/getList", {
|
|
|
businessIdList: arr,
|
|
@@ -749,13 +751,11 @@ const handleFollow = (row) => {
|
|
|
const e = res.bomDetailList[i];
|
|
|
for (const key in fileObj) {
|
|
|
if (e.afterSalesRecordDetail.id == key) {
|
|
|
- submitData.value[e.productId].fileList = fileObj[key].map(
|
|
|
- (item) => ({
|
|
|
- raw: item,
|
|
|
- name: item.fileName,
|
|
|
- url: item.fileUrl,
|
|
|
- })
|
|
|
- );
|
|
|
+ submitData.value[e.id].fileList = fileObj[key].map((item) => ({
|
|
|
+ raw: item,
|
|
|
+ name: item.fileName,
|
|
|
+ url: item.fileUrl,
|
|
|
+ }));
|
|
|
}
|
|
|
}
|
|
|
}
|