Commit 805b061f by zhuzhequan

添加同步素材图

parent a4d05755
......@@ -88,6 +88,12 @@ export function applyForReplenishmentApi(data: unknown) {
data,
)
}
export function syncSubOrderDesignImages(data: unknown) {
return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderProduct/syncSubOrderDesignImages',
data,
)
}
// 发货保存
export function saveOrder(
sumbitSendOutList: ShipmentOrderRes[],
......
......@@ -227,6 +227,14 @@
申请补胚</ElButton
>
</span>
<span
v-if="['TO_BE_CONFIRMED', 'IN_PRODUCTION'].includes(status)"
class="item"
>
<ElButton type="warning" is-dark @click="synchronousPlan">
同步素材图</ElButton
>
</span>
</div>
<template
v-if="
......@@ -535,7 +543,7 @@
@click.stop="openMaterial(cardItem as PodProductList)"
>
<img width="20" src="@/assets/images/id.png" />
<span title="素材ID">
<span class="over-hidden" title="素材ID">
{{ cardItem?.productionFileId }}
</span>
</a>
......@@ -1062,6 +1070,7 @@ import {
getWaitShipmentCount,
refreshJMProductInfo,
reasonInvalidationApi,
syncSubOrderDesignImages,
applyForReplenishmentApi,
completeDeliveryApi,
} from '@/api/podOrder'
......@@ -1093,6 +1102,7 @@ import {
SearchForm,
Tab,
LogListData,
PodProductList,
cardImages,
imageAryInter,
......@@ -1792,6 +1802,32 @@ const applyForReplacement = async () => {
// showError(e)
}
}
const synchronousPlan = async () => {
if (selection.value.length === 0) {
return ElMessage({
message: '请选择订单',
type: 'warning',
offset: window.innerHeight / 2,
})
}
try {
await showConfirm('是否同步素材图?', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
}
try {
const res = await syncSubOrderDesignImages(selection.value.map(item=>item.id))
await loadDiffList()
await loadTabData()
ElMessage.success(res.message)
} catch (e) {
// showError(e)
}
}
// 下载稿件
const downloadMaterial = async () => {
if (selection.value.length === 0) {
......@@ -2448,4 +2484,11 @@ onBeforeUnmount(() => {
display: flex;
align-items: center;
}
.over-hidden{
width: 150px;
display:inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
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