Commit 0a232b26 by qinjianhui

fix: 问题修改

parent 74808dd1
...@@ -86,11 +86,12 @@ export function downloadMaterialApi(id: Array<number>) { ...@@ -86,11 +86,12 @@ export function downloadMaterialApi(id: Array<number>) {
id, id,
) )
} }
export function productionQueryApi(id: number) { export function productionQueryApi(id: number, podJomallOrderUsId: number) {
return axios.post<never, BasePaginationData<never>>( return axios.post<never, BasePaginationData<never>>(
'factory/podJomallOrderProductUs/completeDelivery', 'factory/podJomallOrderProductUs/completeDelivery',
{ {
id, id,
podJomallOrderUsId,
}, },
) )
} }
...@@ -92,6 +92,7 @@ export interface cardImages { ...@@ -92,6 +92,7 @@ export interface cardImages {
title: string title: string
url: string url: string
sort: number sort: number
id?: number
} }
export interface LogListData { export interface LogListData {
id: number id: number
...@@ -102,3 +103,17 @@ export interface LogListData { ...@@ -102,3 +103,17 @@ export interface LogListData {
deleteContent: string deleteContent: string
createTime: string createTime: string
} }
export interface PodOrderRes extends ProductList {
expectDeliveryTime?: string | null
thirdOrderNumber?: string | null
startStockingTime?: string | null
factoryOrderNumber?: string | null
userMark?: string | null
craftName?: string | null
craftId?: string | null
shopNumber?: string | null
color?: string | null
size?: string | null
note?: Array<{ prop: string | number; value: string | number }>
imgList: cardImages[]
}
...@@ -22,31 +22,22 @@ ...@@ -22,31 +22,22 @@
:key="index" :key="index"
style="height: 100%" style="height: 100%"
> >
<el-row :gutter="10" style="width: 100%; height: 100%"> <div class="left-image">
<el-col <b v-show="item?.title && item?.url">
v-for="(it, i) in item" {{ item?.title }}
:key="i" <span
style="height: 100%" v-if="item?.id"
:span="12" style="
> text-decoration: underline;
<div class="left-image"> cursor: pointer;
<b v-show="it?.title && it?.url"> color: blue;
{{ it?.title }} "
<span >
v-if="it?.id" (DID:{{ item?.id }}
style=" </span>
text-decoration: underline; </b>
cursor: pointer; <img :src="item.url" alt="" />
color: blue; </div>
"
>
(DID:{{ it?.id }}
</span>
</b>
<img :src="it?.url" alt="" />
</div>
</el-col>
</el-row>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</div> </div>
...@@ -100,10 +91,10 @@ ...@@ -100,10 +91,10 @@
{{ detail?.thirdSubOrderNumber }} {{ detail?.thirdSubOrderNumber }}
</p> </p>
</div> </div>
<div :title="String(detail?.process)" class="div-item"> <div :title="String(detail?.craftName)" class="div-item">
<span>生产工艺</span> <span>生产工艺</span>
<p> <p>
{{ detail?.process }} {{ detail?.craftName }}
</p> </p>
</div> </div>
<div :title="detail?.baseSku" class="div-item"> <div :title="detail?.baseSku" class="div-item">
...@@ -125,9 +116,9 @@ ...@@ -125,9 +116,9 @@
<p>{{ detail?.size }}</p> <p>{{ detail?.size }}</p>
</div> </div>
<div :title="detail?.shopNumber" class="div-item"> <div :title="detail?.shopNumber ?? ''" class="div-item">
<span>店铺单号</span> <span>店铺单号</span>
<p>{{ detail?.shopNumber }}</p> <p>{{ detail?.shopNumber ?? '' }}</p>
</div> </div>
<div :title="detail?.createTime" class="div-item"> <div :title="detail?.createTime" class="div-item">
...@@ -200,7 +191,7 @@ import { ...@@ -200,7 +191,7 @@ import {
getSubOrderBySubOrderNumber, getSubOrderBySubOrderNumber,
downloadMaterialApi, downloadMaterialApi,
} from '@/api/podUsOrder' } from '@/api/podUsOrder'
import { PodOrderRes, ImageItemInter } from '@/types/api/podOrder' import { cardImages, PodOrderRes } from '@/types/api/podUsOrder'
import { showConfirm } from '@/utils/ui' import { showConfirm } from '@/utils/ui'
import { filePath } from '@/api/axios' import { filePath } from '@/api/axios'
import { ref, watch, defineProps, nextTick, defineEmits } from 'vue' import { ref, watch, defineProps, nextTick, defineEmits } from 'vue'
...@@ -218,8 +209,8 @@ const isDownloadImage = ref(false) ...@@ -218,8 +209,8 @@ const isDownloadImage = ref(false)
const isAutoSure = ref(false) const isAutoSure = ref(false)
const detail = ref<PodOrderRes>({ const detail = ref<PodOrderRes>({
id: -1, id: -1,
podOrderId: -1, podJomallOrderUsId: -1,
imgList: [] as ImageItemInter[][], imgList: [] as cardImages[],
}) })
const dialogVisible = ref(false) const dialogVisible = ref(false)
// 通过import动态导入音频文件 // 通过import动态导入音频文件
...@@ -261,7 +252,7 @@ watch( ...@@ -261,7 +252,7 @@ watch(
() => props.detailVisible, () => props.detailVisible,
(newVal: boolean) => { (newVal: boolean) => {
dialogVisible.value = newVal dialogVisible.value = newVal
detail.value = { id: -1, podOrderId: -1, imgList: [] } detail.value = { id: -1, podJomallOrderUsId: -1, imgList: [] }
if (newVal) { if (newVal) {
const history = localStorage.getItem('historyUsData') const history = localStorage.getItem('historyUsData')
historyData.value = history ? JSON.parse(history) : [] historyData.value = history ? JSON.parse(history) : []
...@@ -270,6 +261,7 @@ watch( ...@@ -270,6 +261,7 @@ watch(
if (len.length > 0) { if (len.length > 0) {
confirmQuery(len, 0) confirmQuery(len, 0)
} }
TrackingNumber.value = '' TrackingNumber.value = ''
isAutoSure.value = false isAutoSure.value = false
...@@ -332,8 +324,9 @@ const changeStatus = async () => { ...@@ -332,8 +324,9 @@ const changeStatus = async () => {
const setData = async (orderNumber: string) => { const setData = async (orderNumber: string) => {
if (detail.value && detail.value?.id != -1) { if (detail.value && detail.value?.id != -1) {
try { try {
const id = detail.value?.id const id = detail.value.id
await productionQueryApi(id) const podJomallOrderUsId = detail.value.podJomallOrderUsId
await productionQueryApi(id, podJomallOrderUsId)
if (orderNumber) { if (orderNumber) {
const index = historyData.value.findIndex( const index = historyData.value.findIndex(
...@@ -350,10 +343,18 @@ const setData = async (orderNumber: string) => { ...@@ -350,10 +343,18 @@ const setData = async (orderNumber: string) => {
} }
emit('onSuccess') emit('onSuccess')
playAudio('weight_success') playAudio('weight_success')
detail.value = { id: -1, podOrderId: -1, imgList: [] } detail.value = {
id: -1,
podJomallOrderUsId: -1,
imgList: [] as cardImages[],
}
} catch (e) { } catch (e) {
console.error(e) console.error(e)
detail.value = { id: -1, podOrderId: -1, imgList: [] } detail.value = {
id: -1,
podJomallOrderUsId: -1,
imgList: [] as cardImages[],
}
playAudio('weight_search_error') playAudio('weight_search_error')
} }
} }
...@@ -455,40 +456,13 @@ const trackcodeInput = async () => { ...@@ -455,40 +456,13 @@ const trackcodeInput = async () => {
} else { } else {
d.note = [] d.note = []
} }
let arr = [] if (d.imageAry) {
if (!d.imageAry) { d.imgList = JSON.parse(d.imageAry)
arr = [
{ url: d.variantImage, title: '正面', id: d.designId },
{ url: d.negativeImage, title: '反面', id: d.negativeDesignId },
].filter((el) => el.url)
} else { } else {
arr = typeof d.imageAry == 'string' ? JSON.parse(d.imageAry) : d.imageAry d.imgList = []
arr = arr.concat([
{ url: d.negativeImage, title: '反面', id: d.negativeDesignId },
])
} }
const result = []
arr = arr.filter((el: ImageItemInter) => el.url)
arr = arr.map((el: ImageItemInter) => {
return {
...el,
...{
url: el.url.includes('http')
? el.url
: window.location.origin + '/upload/erp' + el.url,
},
}
})
for (let i = 0; i < arr.length; i += 2) {
result.push(arr.slice(i, i + 2))
}
d.imgList = result
detail.value = d detail.value = d
if (detail.value?.importFactory) {
ElMessage.warning('只支持自有工厂的订单')
return
}
if (isDownloadImage.value) { if (isDownloadImage.value) {
download() download()
} }
......
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