Commit 89e98c3d by wusiyi

feat: podus已完成新增状态推送按钮

parent a21fd7a9
......@@ -535,3 +535,11 @@ export function rejectToApi(params: {
params,
)
}
// 状态推送
export function statusPushApi(params: (string | number)[]) {
return axios.post<never, BaseRespData<never>>(
`factory/podJomallOrderUs/statusPush`,
params,
)
}
......@@ -572,6 +572,9 @@
</ElDropdown>
</span>
<span v-if="status === 'COMPLETE'" class="item">
<ElButton type="warning" @click="statusPush">状态推送</ElButton>
</span>
<span v-if="status === 'COMPLETE'" class="item">
<ElButton type="success" @click="exportData">导出</ElButton>
</span>
</ElFormItem>
......@@ -2229,6 +2232,7 @@ import {
getgetInterceptStateGroupList,
interceptUpdateApi,
rejectToApi,
statusPushApi,
} from '@/api/podUsOrder'
import { BaseRespData } from '@/types/api'
......@@ -4718,6 +4722,39 @@ const interceptChange = async (status: boolean) => {
}
}
// 状态推送
const statusPush = async () => {
if (selection.value.length === 0) {
return ElMessage.warning('请选择数据')
}
try {
await ElMessageBox.confirm('是否确认状态推送?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
}
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await statusPushApi(selection.value.map((item) => item.id))
if (res.code !== 200) return
ElMessage.success('操作成功')
search()
loadTabData()
} catch (e) {
resultInfo.value = []
console.error(e)
} finally {
loading.close()
}
}
useRouter().beforeEach((to, from, next) => {
handleBeforeRouteLeave(to, from, next)
})
......
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