Commit ae9f34c2 by qinjianhui

fix: pod订单下载素材

parent 9f418589
...@@ -7,8 +7,7 @@ export {} ...@@ -7,8 +7,7 @@ export {}
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
CardPods: typeof import('./src/components/CardPods.vue')['default'] CommonCard: typeof import('./src/components/CommonCard.vue')['default']
CardWrapper: typeof import('./src/components/CardWrapper.vue')['default']
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
ElCarousel: typeof import('element-plus/es')['ElCarousel'] ElCarousel: typeof import('element-plus/es')['ElCarousel']
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
......
...@@ -111,6 +111,7 @@ export interface ProductList { ...@@ -111,6 +111,7 @@ export interface ProductList {
podOrderId?: number | string podOrderId?: number | string
isProduction?: boolean isProduction?: boolean
imageAry?: string imageAry?: string
productionFileId?: string
} }
export interface MemoList { export interface MemoList {
......
...@@ -20,6 +20,7 @@ export interface SearchForm { ...@@ -20,6 +20,7 @@ export interface SearchForm {
startTime?: string | null startTime?: string | null
endTime?: string | null endTime?: string | null
internalMemo?: string internalMemo?: string
productionFileId?: string
} }
export interface CardOrderData { export interface CardOrderData {
id: number id: number
......
...@@ -123,6 +123,20 @@ ...@@ -123,6 +123,20 @@
</span> </span>
</div> </div>
<div <div
v-if="isPod"
:title="item.productionFileId || ''"
class="order-list-expand_item_info_title"
>
<span class="order-list-expand_item_label">素材ID:</span>
<span class="order-list-expand_item_value"
><a
href="javascript:void(0)"
@click="openMaterial(item.productionFileId || '')"
>{{ item.productionFileId || '--' }}</a
>
</span>
</div>
<div
v-if="!isPod" v-if="!isPod"
:title="item.material || ''" :title="item.material || ''"
class="order-list-expand_item_info_title" class="order-list-expand_item_info_title"
...@@ -228,7 +242,10 @@ defineProps({ ...@@ -228,7 +242,10 @@ defineProps({
default: false, default: false,
}, },
}) })
const emit = defineEmits(['openMaterial'])
const openMaterial = (id: string) => {
emit('openMaterial', id)
}
const copy = (text: string) => { const copy = (text: string) => {
navigator.clipboard.writeText(text) navigator.clipboard.writeText(text)
ElMessage.success('复制成功') ElMessage.success('复制成功')
......
...@@ -87,6 +87,14 @@ ...@@ -87,6 +87,14 @@
style="width: 130px" style="width: 130px"
/> />
</ElFormItem> </ElFormItem>
<ElFormItem label="素材ID">
<ElInput
v-model.trim="searchForm.productionFileId"
placeholder="素材ID"
clearable
style="width: 130px"
></ElInput>
</ElFormItem>
<ElFormItem label="内部标签"> <ElFormItem label="内部标签">
<ElInput <ElInput
v-model.trim="searchForm.internalMemo" v-model.trim="searchForm.internalMemo"
...@@ -117,6 +125,7 @@ ...@@ -117,6 +125,7 @@
<el-option value="multiple" label="多面"></el-option> <el-option value="multiple" label="多面"></el-option>
</el-select> </el-select>
</ElFormItem> </ElFormItem>
<ElFormItem> <ElFormItem>
<ElButton type="primary" @click="loadDiffList">查询</ElButton> <ElButton type="primary" @click="loadDiffList">查询</ElButton>
</ElFormItem> </ElFormItem>
...@@ -506,8 +515,9 @@ ...@@ -506,8 +515,9 @@
</span> </span>
</el-col> </el-col>
<el-col :span="12" :offset="0" style="text-align: right"> <el-col :span="12" :offset="0" style="text-align: right">
<span title="期望交货时间"> <span v-if="!cardItem?.expectDeliveryTime">期望交货时间:--</span>
{{ cardItem?.expectDeliveryTime }} <span v-else title="期望交货时间">
{{ cardItem?.expectDeliveryTime || '--' }}
</span> </span>
</el-col> </el-col>
</el-row> </el-row>
...@@ -517,6 +527,24 @@ ...@@ -517,6 +527,24 @@
:offset="0" :offset="0"
style="white-space: nowrap" style="white-space: nowrap"
> >
<a
href="javascript:void(0)"
style="display: flex; align-items: center;gap: 4px;"
@click.stop="
openMaterial(String(cardItem?.productionFileId))
"
>
<img width="20" src="@/assets/images/id.png" />
<span title="素材ID">
{{ cardItem?.productionFileId }}
</span>
</a>
</el-col>
<el-col
:span="12"
:offset="0"
style="white-space: nowrap; text-align: right"
>
<span <span
:title="`第三方订单号:${cardItem?.thirdOrderNumber}`" :title="`第三方订单号:${cardItem?.thirdOrderNumber}`"
style=" style="
...@@ -563,7 +591,12 @@ ...@@ -563,7 +591,12 @@
class="order-list-expand" class="order-list-expand"
:style="{ width: `${thOrderDetailWidth + 50}px` }" :style="{ width: `${thOrderDetailWidth + 50}px` }"
> >
<ProductInfo :row="row" :status="status" :is-pod="true"> <ProductInfo
:row="row"
:status="status"
:is-pod="true"
@open-material="openMaterial"
>
<template #operation="{ productItem }"> <template #operation="{ productItem }">
<div class="operation-item" title="添加备注"> <div class="operation-item" title="添加备注">
<el-icon <el-icon
...@@ -2117,6 +2150,21 @@ const getUserMark = async () => { ...@@ -2117,6 +2150,21 @@ const getUserMark = async () => {
//showError(error) //showError(error)
} }
} }
const openMaterial = async (id: string) => {
if (!id) return
const ids = id.split(',')
const res = await downloadMaterialApi(ids.map(Number))
const { data } = res
data.forEach((item: string) => {
const a = document.createElement('a')
a.href = filePath + item
a.download = item
a.target = '_blank'
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
})
}
onMounted(async () => { onMounted(async () => {
document.addEventListener('keydown', listenerKeydown) document.addEventListener('keydown', listenerKeydown)
document.addEventListener('click', listenerClick) document.addEventListener('click', listenerClick)
......
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