Commit a85d1012 by linjinhong

修改驳回按钮

parent fd4bb34b
...@@ -509,6 +509,7 @@ export function updateToWaitShipmentApi(params: { ...@@ -509,6 +509,7 @@ export function updateToWaitShipmentApi(params: {
export function rejectToApi(params: { export function rejectToApi(params: {
orderStatus: string orderStatus: string
productList: ProductList[] productList: ProductList[]
reasonStr: string
}) { }) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderUs/rejectTo`, `factory/podJomallOrderUs/rejectTo`,
......
...@@ -505,13 +505,6 @@ ...@@ -505,13 +505,6 @@
<template #dropdown> <template #dropdown>
<ElDropdownMenu> <ElDropdownMenu>
<ElDropdownItem <ElDropdownItem
v-if="
status === 'STOCK_OUT' ||
status === 'CREATE_LOGISTICS' ||
status === 'TO_BE_ARRANGE' ||
status === 'PICKING' ||
status === 'IN_PRODUCTION'
"
:disabled=" :disabled="
selection.length === 0 && cardSelection.length === 0 selection.length === 0 && cardSelection.length === 0
" "
...@@ -3655,7 +3648,17 @@ const rejectOrder = async (type: string) => { ...@@ -3655,7 +3648,17 @@ const rejectOrder = async (type: string) => {
text: '操作中...', text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)', background: 'rgba(0, 0, 0, 0.3)',
}) })
try { try {
const { value } = await ElMessageBox.prompt('驳回确认', {
confirmButtonText: '确认',
cancelButtonText: '取消',
inputType: 'textarea',
inputPlaceholder: '驳回原因',
inputPattern: /\S+/, // 非空验证,至少一个非空白字符
inputErrorMessage: '内容不能为空',
})
const res = await rejectToApi({ const res = await rejectToApi({
orderStatus: type, orderStatus: type,
productList: selection.value.length productList: selection.value.length
...@@ -3663,6 +3666,7 @@ const rejectOrder = async (type: string) => { ...@@ -3663,6 +3666,7 @@ const rejectOrder = async (type: string) => {
(item: PodUsOrderListData) => item.productList || [], (item: PodUsOrderListData) => item.productList || [],
) )
: cardSelection.value, : cardSelection.value,
reasonStr: value,
}) })
if (res.code !== 200) return if (res.code !== 200) return
......
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