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) { ...@@ -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>>( return axios.post<never, BaseRespData<string>>(
'factory/podJomallOrderProductCn/printProducePdf', url,
orderIds, orderIds,
) )
} }
......
...@@ -179,9 +179,9 @@ export function productionQueryApi(id: number, podJomallOrderUsId: number) { ...@@ -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>>( return axios.post<never, BaseRespData<string>>(
'factory/podJomallOrderProductUs/printProducePdf', url,
orderIds, orderIds,
) )
} }
......
...@@ -4519,8 +4519,12 @@ const printProductionOrder = async () => { ...@@ -4519,8 +4519,12 @@ const printProductionOrder = async () => {
text: '操作中...', text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)', background: 'rgba(0, 0, 0, 0.3)',
}) })
const url =
status.value === 'TO_BE_REPLENISHMENT'
? 'factory/podJomallOrderProductCn/replenishmentPrintProducePdf'
: 'factory/podJomallOrderProductCn/printProducePdf'
try { try {
const res = await printProductionOrderApi(orderIds) const res = await printProductionOrderApi(url, orderIds)
if (res.code !== 200) return if (res.code !== 200) return
ElMessage.success('操作成功') ElMessage.success('操作成功')
window.open(filePath + res.message) window.open(filePath + res.message)
......
...@@ -4837,37 +4837,6 @@ const assignOrder = async () => { ...@@ -4837,37 +4837,6 @@ const assignOrder = async () => {
currentOrderIds.value = selection.value.map((item) => item.id) currentOrderIds.value = selection.value.map((item) => item.id)
exceptionDialogVisible.value = true 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 ( const printProductionOrder = async (
type: 1 | 2, type: 1 | 2,
item: PodUsOrderListData | null, item: PodUsOrderListData | null,
...@@ -4883,8 +4852,12 @@ const printProductionOrder = async ( ...@@ -4883,8 +4852,12 @@ const printProductionOrder = async (
text: '操作中...', text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)', background: 'rgba(0, 0, 0, 0.3)',
}) })
const url =
status.value === 'TO_BE_REPLENISHMENT'
? 'factory/podJomallOrderProductUs/replenishmentPrintProducePdf'
: 'factory/podJomallOrderProductUs/printProducePdf'
try { try {
const res = await printProductionOrderApi(orderIds) const res = await printProductionOrderApi(url, orderIds)
if (res.code !== 200) return if (res.code !== 200) return
ElMessage.success('操作成功') ElMessage.success('操作成功')
window.open(filePath + res.message) 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