Commit 5501333a by zhuzhequan

png排版 功能添加

parent af6efe38
......@@ -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>>(
'factory/podJomallOrderUs/composingDesignImages',
`factory/podJomallOrderUs/composingDesignImages?type=${type}`,
data,
)
}
......
......@@ -207,8 +207,12 @@
</ElForm>
<template #reference>
<el-button type="warning" @click="searchVisible = !searchVisible">
<el-icon v-if="searchVisible"><CaretTop /></el-icon>
<el-icon v-else><CaretBottom /></el-icon>
<el-icon v-if="searchVisible">
<CaretTop />
</el-icon>
<el-icon v-else>
<CaretBottom />
</el-icon>
</el-button>
</template>
</ElPopover>
......@@ -231,7 +235,7 @@
blue: item.quantity && item.quantity > 0,
red: item.status === 'EXCEPTION_ORDER',
}"
>{{ item.quantity }}</span
>{{ item.quantity }}</span
>
</div>
<!-- <div
......@@ -296,11 +300,20 @@
<div class="operation-box mb-10">
<span v-if="status === 'PICKING'" class="item">
<ElButton
:loading="downloadLoading"
:loading="tifDownloadLoading"
type="warning"
@click="downloadTif"
@click="downloadTif('tiff','tiff')"
>
排版
TIF排版
</ElButton>
</span>
<span v-if="status === 'PICKING'" class="item">
<ElButton
:loading="pngDownloadLoading"
type="warning"
@click="downloadTif('png','composingPNG')"
>
PNG排版
</ElButton>
</span>
<span v-if="status === 'TO_BE_CONFIRMED'" class="item">
......@@ -407,19 +420,19 @@
<template #dropdown>
<ElDropdownMenu>
<ElDropdownItem @click="getOrderByIdApi('createLogisticsOrder')"
>创建物流订单</ElDropdownItem
>创建物流订单</ElDropdownItem
>
<ElDropdownItem @click="getOrderByIdApi('getTrackingNumber')"
>获取跟踪号</ElDropdownItem
>获取跟踪号</ElDropdownItem
>
<ElDropdownItem @click="getOrderByIdApi('getPrintOrder')"
>获取打印面单</ElDropdownItem
>获取打印面单</ElDropdownItem
>
<ElDropdownItem @click="getOrderByIdApi('cancelLogisticsOrder')"
>取消物流订单</ElDropdownItem
>取消物流订单</ElDropdownItem
>
<ElDropdownItem @click="getOrderByIdApi('batchChangeLogistics')"
>更换物流</ElDropdownItem
>更换物流</ElDropdownItem
>
</ElDropdownMenu>
</template>
......@@ -568,7 +581,7 @@
</div>
<div class="goods-item-info-item">
<span class="goods-item-info-item-label"
>第三方生产单号:</span
>第三方生产单号:</span
>
<span
class="goods-item-info-item-value"
......@@ -601,7 +614,8 @@
>
<!-- <span class="goods-item-info-item-label">补胚状态:</span> -->
<el-tag size="small" effect="dark" type="danger"
>补胚中</el-tag
>补胚中
</el-tag
>
</div>
</div>
......@@ -633,13 +647,13 @@
<div class="goods-item-info-item">
<span class="goods-item-info-item-label">{{
status === 'EXCEPTION_ORDER' ||
status === 'PICKING' ||
status === 'TO_BE_CONFIRMED' ||
status === 'STOCK_OUT'
? '数量:'
: '已生产数量:'
}}</span>
status === 'EXCEPTION_ORDER' ||
status === 'PICKING' ||
status === 'TO_BE_CONFIRMED' ||
status === 'STOCK_OUT'
? '数量:'
: '已生产数量:'
}}</span>
<span class="goods-item-info-item-value">
{{
status === 'EXCEPTION_ORDER' ||
......@@ -668,7 +682,8 @@
size="small"
type="success"
@click="applyForReplenishment(item)"
>申请补胚</el-button
>申请补胚
</el-button
>
<!-- f -->
</div>
......@@ -854,17 +869,17 @@
<el-timeline-item
:color="row.createTime ? '#409EFF' : ''"
:timestamp="row.createTime"
>创建时间
>创建时间
</el-timeline-item>
<el-timeline-item
:color="row.startStockingTime ? '#E6A23C' : ''"
:timestamp="row.startStockingTime"
>确认时间
>确认时间
</el-timeline-item>
<el-timeline-item
:color="row.finishTime ? '#67C23A' : ''"
:timestamp="row.finishTime"
>完成时间
>完成时间
</el-timeline-item>
</el-timeline>
<!-- <div class="order-time-box">
......@@ -1037,7 +1052,7 @@
<div class="grid-container">
<div class="grid-item" title="商品名称">
<span class="grid-item-value"
>{{ cardItem?.productName }}
>{{ cardItem?.productName }}
</span>
</div>
<div
......@@ -1118,7 +1133,8 @@
</div>
<div v-if="cardItem.isReplenishment" class="grid-item">
<el-tag size="small" type="danger" effect="dark"
>补胚中</el-tag
>补胚中
</el-tag
>
</div>
</div>
......@@ -1569,7 +1585,7 @@ import platformJson from '../../../json/platform.json'
declare global {
interface Window {
ActiveXObject: {
new (type: string): XMLHttpRequest
new(type: string): XMLHttpRequest
}
VBS_BinaryToArray: {
(data: unknown): { toArray(): number[] }
......@@ -1607,7 +1623,8 @@ const logistics = {
const logisticsForm = ref<LogisticsFormData>(logistics)
const resultRefs = ref<InstanceType<typeof ResultInfo> | null>(null)
const confirmDialogShow = ref(false)
const downloadLoading = ref(false)
const tifDownloadLoading = ref(false)
const pngDownloadLoading = ref(false)
const isChangeWay = ref(false)
const confirmData = ref([])
const logisticsWayData = ref([])
......@@ -1635,7 +1652,7 @@ const [searchForm] = useValue<SearchForm>({
productionClient: '',
warehouseId: '',
thirdSkuCode: '',
supplierProductNo:''
supplierProductNo: '',
})
const exceptionStatus = ref(1)
const userMarkList = ref<string[]>([])
......@@ -2106,20 +2123,33 @@ const productionClientVisible = ref(false)
// productionClientVisible.value = true
// }
const downloadTif = async () => {
const downloadTif = async (type: string, dir: string) => {
if (!cardSelection.value.length) {
return ElMessage.warning('请选择数据')
}
downloadLoading.value = true
if (type === 'tiff') {
tifDownloadLoading.value = true
} else {
pngDownloadLoading.value = true
}
try {
const res = await composingDesignImages(
cardSelection.value.map((el) => el.id),
type,
)
window.open('https://ps.jomalls.com/tiff/' + res.message, '_blank')
downloadLoading.value = false
window.open(`https://ps.jomalls.com/${dir}/` + res.message, '_blank')
if (type === 'tiff') {
tifDownloadLoading.value = true
} else {
pngDownloadLoading.value = true
}
} catch (e) {
console.log(e)
downloadLoading.value = false
if (type === 'tiff') {
tifDownloadLoading.value = true
} else {
pngDownloadLoading.value = true
}
}
}
......@@ -2617,7 +2647,7 @@ const getOrderByIdApi = async (type: string) => {
factoryOrderNumber?: string
message: string
}[]) || []
resultRefs.value?.showDialog()
resultRefs.value?.showDialog()
} else if (isString(res.data)) {
window.open(filePath + res.data)
}
......
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