Commit 5501333a by zhuzhequan

png排版 功能添加

parent af6efe38
...@@ -347,9 +347,9 @@ export function updateSelfLogistics(params: { ...@@ -347,9 +347,9 @@ export function updateSelfLogistics(params: {
} }
// 更改物流 // 更改物流
export function composingDesignImages(data: number[]) { export function composingDesignImages(data: number[],type:string) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'factory/podJomallOrderUs/composingDesignImages', `factory/podJomallOrderUs/composingDesignImages?type=${type}`,
data, data,
) )
} }
......
...@@ -207,8 +207,12 @@ ...@@ -207,8 +207,12 @@
</ElForm> </ElForm>
<template #reference> <template #reference>
<el-button type="warning" @click="searchVisible = !searchVisible"> <el-button type="warning" @click="searchVisible = !searchVisible">
<el-icon v-if="searchVisible"><CaretTop /></el-icon> <el-icon v-if="searchVisible">
<el-icon v-else><CaretBottom /></el-icon> <CaretTop />
</el-icon>
<el-icon v-else>
<CaretBottom />
</el-icon>
</el-button> </el-button>
</template> </template>
</ElPopover> </ElPopover>
...@@ -296,11 +300,20 @@ ...@@ -296,11 +300,20 @@
<div class="operation-box mb-10"> <div class="operation-box mb-10">
<span v-if="status === 'PICKING'" class="item"> <span v-if="status === 'PICKING'" class="item">
<ElButton <ElButton
:loading="downloadLoading" :loading="tifDownloadLoading"
type="warning"
@click="downloadTif('tiff','tiff')"
>
TIF排版
</ElButton>
</span>
<span v-if="status === 'PICKING'" class="item">
<ElButton
:loading="pngDownloadLoading"
type="warning" type="warning"
@click="downloadTif" @click="downloadTif('png','composingPNG')"
> >
排版 PNG排版
</ElButton> </ElButton>
</span> </span>
<span v-if="status === 'TO_BE_CONFIRMED'" class="item"> <span v-if="status === 'TO_BE_CONFIRMED'" class="item">
...@@ -601,7 +614,8 @@ ...@@ -601,7 +614,8 @@
> >
<!-- <span class="goods-item-info-item-label">补胚状态:</span> --> <!-- <span class="goods-item-info-item-label">补胚状态:</span> -->
<el-tag size="small" effect="dark" type="danger" <el-tag size="small" effect="dark" type="danger"
>补胚中</el-tag >补胚中
</el-tag
> >
</div> </div>
</div> </div>
...@@ -668,7 +682,8 @@ ...@@ -668,7 +682,8 @@
size="small" size="small"
type="success" type="success"
@click="applyForReplenishment(item)" @click="applyForReplenishment(item)"
>申请补胚</el-button >申请补胚
</el-button
> >
<!-- f --> <!-- f -->
</div> </div>
...@@ -1118,7 +1133,8 @@ ...@@ -1118,7 +1133,8 @@
</div> </div>
<div v-if="cardItem.isReplenishment" class="grid-item"> <div v-if="cardItem.isReplenishment" class="grid-item">
<el-tag size="small" type="danger" effect="dark" <el-tag size="small" type="danger" effect="dark"
>补胚中</el-tag >补胚中
</el-tag
> >
</div> </div>
</div> </div>
...@@ -1569,7 +1585,7 @@ import platformJson from '../../../json/platform.json' ...@@ -1569,7 +1585,7 @@ import platformJson from '../../../json/platform.json'
declare global { declare global {
interface Window { interface Window {
ActiveXObject: { ActiveXObject: {
new (type: string): XMLHttpRequest new(type: string): XMLHttpRequest
} }
VBS_BinaryToArray: { VBS_BinaryToArray: {
(data: unknown): { toArray(): number[] } (data: unknown): { toArray(): number[] }
...@@ -1607,7 +1623,8 @@ const logistics = { ...@@ -1607,7 +1623,8 @@ const logistics = {
const logisticsForm = ref<LogisticsFormData>(logistics) const logisticsForm = ref<LogisticsFormData>(logistics)
const resultRefs = ref<InstanceType<typeof ResultInfo> | null>(null) const resultRefs = ref<InstanceType<typeof ResultInfo> | null>(null)
const confirmDialogShow = ref(false) const confirmDialogShow = ref(false)
const downloadLoading = ref(false) const tifDownloadLoading = ref(false)
const pngDownloadLoading = ref(false)
const isChangeWay = ref(false) const isChangeWay = ref(false)
const confirmData = ref([]) const confirmData = ref([])
const logisticsWayData = ref([]) const logisticsWayData = ref([])
...@@ -1635,7 +1652,7 @@ const [searchForm] = useValue<SearchForm>({ ...@@ -1635,7 +1652,7 @@ const [searchForm] = useValue<SearchForm>({
productionClient: '', productionClient: '',
warehouseId: '', warehouseId: '',
thirdSkuCode: '', thirdSkuCode: '',
supplierProductNo:'' supplierProductNo: '',
}) })
const exceptionStatus = ref(1) const exceptionStatus = ref(1)
const userMarkList = ref<string[]>([]) const userMarkList = ref<string[]>([])
...@@ -2106,20 +2123,33 @@ const productionClientVisible = ref(false) ...@@ -2106,20 +2123,33 @@ const productionClientVisible = ref(false)
// productionClientVisible.value = true // productionClientVisible.value = true
// } // }
const downloadTif = async () => { const downloadTif = async (type: string, dir: string) => {
if (!cardSelection.value.length) { if (!cardSelection.value.length) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
} }
downloadLoading.value = true if (type === 'tiff') {
tifDownloadLoading.value = true
} else {
pngDownloadLoading.value = true
}
try { try {
const res = await composingDesignImages( const res = await composingDesignImages(
cardSelection.value.map((el) => el.id), cardSelection.value.map((el) => el.id),
type,
) )
window.open('https://ps.jomalls.com/tiff/' + res.message, '_blank') window.open(`https://ps.jomalls.com/${dir}/` + res.message, '_blank')
downloadLoading.value = false if (type === 'tiff') {
tifDownloadLoading.value = true
} else {
pngDownloadLoading.value = true
}
} catch (e) { } catch (e) {
console.log(e) console.log(e)
downloadLoading.value = false if (type === 'tiff') {
tifDownloadLoading.value = true
} else {
pngDownloadLoading.value = true
}
} }
} }
......
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