Commit b13e7dea by linjinhong

添加驳回接口

parent bfec490b
......@@ -505,3 +505,13 @@ export function updateToWaitShipmentApi(params: {
params,
)
}
// 驳回
export function rejectToApi(params: {
orderStatus: string
productList: ProductList[][]
}) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderUs/rejectTo`,
params,
)
}
......@@ -2144,6 +2144,7 @@ import {
batchDownloadRecomposingApi,
updateToWaitShipmentApi,
exportPodUSInfo,
rejectToApi,
} from '@/api/podUsOrder'
import { BaseRespData } from '@/types/api'
......@@ -3655,8 +3656,31 @@ const getOrderByIdApi = async (type: string) => {
}
}
const rejectOrder = (type: string) => {
console.log(type)
const rejectOrder = async (type: string) => {
if (selection.value.length === 0) {
return ElMessage.warning('请选择数据')
}
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await rejectToApi({
orderStatus: type,
productList: selection.value.map(
(item: PodUsOrderListData) => item.productList as ProductList[],
),
})
if (res.code !== 200) return
ElMessage.success('操作成功')
search()
loadTabData()
} catch (e) {
console.log(e)
} finally {
loading.close()
}
}
const handleStockOut = async (row: PodUsOrderListData) => {
......
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