Commit 0fdc9778 by zhuzhequan

Merge branch 'dev_replenishment' into 'release'

feat: CN & US 订单 打印生产单接口替换

See merge request !142
parents d840ce93 7ac3a66b
......@@ -246,9 +246,9 @@ export function productionQueryApi(id: number, podJomallOrderCnId: number) {
},
)
}
export function printProductionOrderApi(orderIds: number[]) {
export function printProductionOrderApi(url: string, orderIds: number[]) {
return axios.post<never, BaseRespData<string>>(
'factory/podJomallOrderProductCn/printProducePdf',
url,
orderIds,
)
}
......
......@@ -179,9 +179,9 @@ export function productionQueryApi(id: number, podJomallOrderUsId: number) {
},
)
}
export function printProductionOrderApi(orderIds: number[]) {
export function printProductionOrderApi(url: string, orderIds: number[]) {
return axios.post<never, BaseRespData<string>>(
'factory/podJomallOrderProductUs/printProducePdf',
url,
orderIds,
)
}
......
......@@ -4519,8 +4519,12 @@ const printProductionOrder = async () => {
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
const url =
status.value === 'TO_BE_REPLENISHMENT'
? 'factory/podJomallOrderProductCn/replenishmentPrintProducePdf'
: 'factory/podJomallOrderProductCn/printProducePdf'
try {
const res = await printProductionOrderApi(orderIds)
const res = await printProductionOrderApi(url, orderIds)
if (res.code !== 200) return
ElMessage.success('操作成功')
window.open(filePath + res.message)
......
......@@ -4837,37 +4837,6 @@ const assignOrder = async () => {
currentOrderIds.value = selection.value.map((item) => item.id)
exceptionDialogVisible.value = true
}
// const handleExceptionOrder = async () => {
// if (selection.value.length === 0) {
// return ElMessage.warning('请选择数据')
// }
// try {
// await showConfirm('确定处理异常吗?', {
// confirmButtonText: '确认',
// cancelButtonText: '取消',
// type: 'warning',
// })
// } catch {
// return
// }
// const orderIds = selection.value.map((item) => item.id)
// const loading = ElLoading.service({
// fullscreen: true,
// text: '操作中...',
// background: 'rgba(0, 0, 0, 0.3)',
// })
// try {
// const res = await handleExceptionOrderApi(orderIds)
// if (res.code !== 200) return
// ElMessage.success('操作成功')
// search()
// loadTabData()
// } catch (e) {
// console.error(e)
// } finally {
// loading.close()
// }
// }
const printProductionOrder = async (
type: 1 | 2,
item: PodUsOrderListData | null,
......@@ -4883,8 +4852,12 @@ const printProductionOrder = async (
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
const url =
status.value === 'TO_BE_REPLENISHMENT'
? 'factory/podJomallOrderProductUs/replenishmentPrintProducePdf'
: 'factory/podJomallOrderProductUs/printProducePdf'
try {
const res = await printProductionOrderApi(orderIds)
const res = await printProductionOrderApi(url, orderIds)
if (res.code !== 200) return
ElMessage.success('操作成功')
window.open(filePath + res.message)
......
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