Commit 92b10374 by wuqian

添加面料

parent a4d37aa0
...@@ -50,6 +50,7 @@ export function submitReviewApi( ...@@ -50,6 +50,7 @@ export function submitReviewApi(
typesettingId: number, typesettingId: number,
version: number, version: number,
examineImages: VersionImageList[], examineImages: VersionImageList[],
fabric: string,
) { ) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'supply/supplyTypesettingExamine/submitExamine', 'supply/supplyTypesettingExamine/submitExamine',
...@@ -57,6 +58,7 @@ export function submitReviewApi( ...@@ -57,6 +58,7 @@ export function submitReviewApi(
typesettingId, typesettingId,
version, version,
examineImages, examineImages,
fabric,
}, },
) )
} }
......
...@@ -59,6 +59,7 @@ export interface VersionList { ...@@ -59,6 +59,7 @@ export interface VersionList {
opinion?: string opinion?: string
examinePeopleId?: string examinePeopleId?: string
examinePeopleName?: string examinePeopleName?: string
fabric?:string
state?: number state?: number
version?: number version?: number
createTime?: string createTime?: string
......
...@@ -77,6 +77,28 @@ ...@@ -77,6 +77,28 @@
> >
<div class="image-wrap-url"> <div class="image-wrap-url">
<img :src="versionImageUrl" alt="" class="img-sign" /> <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>
<div <div
style=" style="
...@@ -410,10 +432,26 @@ watch(visible, (val) => { ...@@ -410,10 +432,26 @@ watch(visible, (val) => {
} }
}) })
const opinion = ref('') const opinion = ref('')
const fabric = ref('')
const loading = ref(false) const loading = ref(false)
const submitReview = async () => { const submitReview = async () => {
if (versionImageList.value.length === 0) { // if (versionImageList.value.length === 0) {
showError('请上传图片') // 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 return
} }
loading.value = true loading.value = true
...@@ -422,6 +460,7 @@ const submitReview = async () => { ...@@ -422,6 +460,7 @@ const submitReview = async () => {
props.row?.id, props.row?.id,
version.value, version.value,
versionImageList.value, versionImageList.value,
fabric.value,
) )
ElMessage.success(res.message) ElMessage.success(res.message)
emit('update:modelValue', false) emit('update:modelValue', false)
...@@ -441,10 +480,12 @@ const prev = () => { ...@@ -441,10 +480,12 @@ const prev = () => {
const item = versionList.value.find((item) => item.version == version.value) const item = versionList.value.find((item) => item.version == version.value)
if (item) { if (item) {
versionImageList.value = item.examineImages versionImageList.value = item.examineImages
fabric.value = item?.fabric || ''
versionImageUrl.value = item.examineImages[0]?.imagePath versionImageUrl.value = item.examineImages[0]?.imagePath
} else { } else {
versionImageList.value = [] versionImageList.value = []
versionImageUrl.value = '' versionImageUrl.value = ''
fabric.value = ''
} }
} }
} }
...@@ -454,10 +495,12 @@ const next = () => { ...@@ -454,10 +495,12 @@ const next = () => {
const item = versionList.value.find((item) => item.version == version.value) const item = versionList.value.find((item) => item.version == version.value)
if (item) { if (item) {
versionImageList.value = item.examineImages versionImageList.value = item.examineImages
fabric.value = item?.fabric || ''
versionImageUrl.value = item.examineImages[0]?.imagePath versionImageUrl.value = item.examineImages[0]?.imagePath
} else { } else {
versionImageList.value = [] versionImageList.value = []
versionImageUrl.value = '' versionImageUrl.value = ''
fabric.value = ''
} }
} }
const versionImageUrl = ref('') const versionImageUrl = ref('')
...@@ -516,9 +559,11 @@ const getExamineInfo = async (data: TypesettingListData) => { ...@@ -516,9 +559,11 @@ const getExamineInfo = async (data: TypesettingListData) => {
versionImageList.value = res.data[res.data.length - 1]?.examineImages versionImageList.value = res.data[res.data.length - 1]?.examineImages
versionImageUrl.value = versionImageUrl.value =
res.data[res.data.length - 1]?.examineImages[0]?.imagePath res.data[res.data.length - 1]?.examineImages[0]?.imagePath
fabric.value = res.data[res.data.length - 1].fabric || ''
} else { } else {
versionImageList.value = [] versionImageList.value = []
versionImageUrl.value = '' versionImageUrl.value = ''
fabric.value = ''
} }
} catch (e) { } catch (e) {
console.error(e) console.error(e)
...@@ -680,7 +725,7 @@ defineExpose({ getExamineInfo, reset, getPriceDetail }) ...@@ -680,7 +725,7 @@ defineExpose({ getExamineInfo, reset, getPriceDetail })
text-align: center; text-align: center;
img { img {
width: 100%; width: 100%;
height: 100%; height: 90%;
object-fit: contain; 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