Commit 92b10374 by wuqian

添加面料

parent a4d37aa0
......@@ -50,6 +50,7 @@ export function submitReviewApi(
typesettingId: number,
version: number,
examineImages: VersionImageList[],
fabric: string,
) {
return axios.post<never, BaseRespData<never>>(
'supply/supplyTypesettingExamine/submitExamine',
......@@ -57,6 +58,7 @@ export function submitReviewApi(
typesettingId,
version,
examineImages,
fabric,
},
)
}
......
......@@ -59,6 +59,7 @@ export interface VersionList {
opinion?: string
examinePeopleId?: string
examinePeopleName?: string
fabric?:string
state?: number
version?: number
createTime?: string
......
......@@ -77,6 +77,28 @@
>
<div class="image-wrap-url">
<img :src="versionImageUrl" alt="" class="img-sign" />
<div
class="flex items-center"
v-if="
row?.state == 301 ||
(row?.state == 401 && lastVersion == version)
"
>
<span style="width: 50px; font-size: 16px">面料: </span>
<el-input
v-model="fabric"
v-if="
row?.state == 301 ||
(row?.state == 401 && lastVersion == version)
"
></el-input>
</div>
<div class="flex items-center" v-else>
<span style="width: 50px; font-size: 16px">面料: </span>
<span style="font-size: 15px; font-weight: 600">{{
fabric
}}</span>
</div>
</div>
<div
style="
......@@ -410,10 +432,26 @@ watch(visible, (val) => {
}
})
const opinion = ref('')
const fabric = ref('')
const loading = ref(false)
const submitReview = async () => {
if (versionImageList.value.length === 0) {
showError('请上传图片')
// if (versionImageList.value.length === 0) {
// showError('请上传图片')
// return
// }
let BtnIndex = Number(version.value - 1)
// 检查 imagePath 是否为空或 null
if (
versionImageList.value.length == 0 ||
(versionImageList.value[BtnIndex] &&
!versionImageList.value[BtnIndex].imagePath)
) {
ElMessage.warning('请上传样版图片')
return
}
// 检查 fabric 是否为空或 null
if (!fabric.value) {
ElMessage.warning('请填写对应的面料')
return
}
loading.value = true
......@@ -422,6 +460,7 @@ const submitReview = async () => {
props.row?.id,
version.value,
versionImageList.value,
fabric.value,
)
ElMessage.success(res.message)
emit('update:modelValue', false)
......@@ -441,10 +480,12 @@ const prev = () => {
const item = versionList.value.find((item) => item.version == version.value)
if (item) {
versionImageList.value = item.examineImages
fabric.value = item?.fabric || ''
versionImageUrl.value = item.examineImages[0]?.imagePath
} else {
versionImageList.value = []
versionImageUrl.value = ''
fabric.value = ''
}
}
}
......@@ -454,10 +495,12 @@ const next = () => {
const item = versionList.value.find((item) => item.version == version.value)
if (item) {
versionImageList.value = item.examineImages
fabric.value = item?.fabric || ''
versionImageUrl.value = item.examineImages[0]?.imagePath
} else {
versionImageList.value = []
versionImageUrl.value = ''
fabric.value = ''
}
}
const versionImageUrl = ref('')
......@@ -516,9 +559,11 @@ const getExamineInfo = async (data: TypesettingListData) => {
versionImageList.value = res.data[res.data.length - 1]?.examineImages
versionImageUrl.value =
res.data[res.data.length - 1]?.examineImages[0]?.imagePath
fabric.value = res.data[res.data.length - 1].fabric || ''
} else {
versionImageList.value = []
versionImageUrl.value = ''
fabric.value = ''
}
} catch (e) {
console.error(e)
......@@ -680,7 +725,7 @@ defineExpose({ getExamineInfo, reset, getPriceDetail })
text-align: center;
img {
width: 100%;
height: 100%;
height: 90%;
object-fit: contain;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment