Commit b13e7dea by linjinhong

添加驳回接口

parent bfec490b
...@@ -505,3 +505,13 @@ export function updateToWaitShipmentApi(params: { ...@@ -505,3 +505,13 @@ export function updateToWaitShipmentApi(params: {
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 { ...@@ -2144,6 +2144,7 @@ import {
batchDownloadRecomposingApi, batchDownloadRecomposingApi,
updateToWaitShipmentApi, updateToWaitShipmentApi,
exportPodUSInfo, exportPodUSInfo,
rejectToApi,
} from '@/api/podUsOrder' } from '@/api/podUsOrder'
import { BaseRespData } from '@/types/api' import { BaseRespData } from '@/types/api'
...@@ -3655,8 +3656,31 @@ const getOrderByIdApi = async (type: string) => { ...@@ -3655,8 +3656,31 @@ const getOrderByIdApi = async (type: string) => {
} }
} }
const rejectOrder = (type: string) => { const rejectOrder = async (type: string) => {
console.log(type) 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) => { 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