Commit 33e8bc95 by qinjianhui

Merge branch 'dev_intercept_refund' into 'dev'

Dev intercept refund

See merge request !235
parents 872fe8df 0e64c95c
...@@ -537,10 +537,14 @@ export function completeDeliveryApi(ids: (number | string)[]) { ...@@ -537,10 +537,14 @@ export function completeDeliveryApi(ids: (number | string)[]) {
} }
// 生产扫码 // 生产扫码
export function productionScanApi(id: number | string, status: string) { export function productionScanApi(
id: number | string,
status: string,
type: string,
) {
return axios.get<never, BaseRespData<never>>( return axios.get<never, BaseRespData<never>>(
'factory/podOrderOperation/scan-produce', 'factory/podOrderOperation/scan-produce',
{ params: { id, status } }, { params: { id, status, type } },
) )
} }
...@@ -655,7 +659,7 @@ export function interceptUpdateApi(ids: (string | number)[]) { ...@@ -655,7 +659,7 @@ export function interceptUpdateApi(ids: (string | number)[]) {
} }
export function interceptSuccessApi( export function interceptSuccessApi(
data: { factoryOrderNumber: string; suspendSussessType: number }[], data: { factoryOrderNumber: string; blockSuccessType: number }[],
) { ) {
return axios.post<never, BaseRespData<ResultInfoDataItem[]>>( return axios.post<never, BaseRespData<ResultInfoDataItem[]>>(
'factory/podOrder/factoryOrderBlockSuccess', 'factory/podOrder/factoryOrderBlockSuccess',
......
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
/> />
</ElSelect> </ElSelect>
</ElFormItem> </ElFormItem>
<div style="color: #f56c6c; margin-left: 100px; margin-top: -10px">
注意: 取消订单后金额将原路返回
</div>
</ElForm> </ElForm>
<template #footer> <template #footer>
<div class="dialog-footer" style="text-align: center"> <div class="dialog-footer" style="text-align: center">
......
...@@ -449,7 +449,7 @@ ...@@ -449,7 +449,7 @@
<span <span
v-if=" v-if="
status === 'PENDING_RECEIVE' || status === 'PENDING_RECEIVE' ||
(status === 'SUSPEND' && suspendedSubTab !== 1) (status === 'SUSPEND' && suspendedSubTab === 4)
" "
class="item" class="item"
> >
...@@ -654,12 +654,12 @@ ...@@ -654,12 +654,12 @@
</span> </span>
<span v-if="suspendedSubTab === 1" class="item"> <span v-if="suspendedSubTab === 1" class="item">
<ElButton type="success" @click="() => handleInterceptionSuccess()" <ElButton type="success" @click="() => handleInterceptionSuccess()"
>拦截成功</ElButton >处理拦截</ElButton
> >
</span> </span>
<span v-if="suspendedSubTab === 1" class="item"> <span v-if="suspendedSubTab === 1" class="item">
<ElButton type="danger" @click="() => handleInterceptionFail()" <ElButton type="danger" @click="() => handleInterceptionFail()"
>拦截失败</ElButton >取消拦截</ElButton
> >
</span> </span>
<span class="item"> <span class="item">
...@@ -896,7 +896,7 @@ ...@@ -896,7 +896,7 @@
size="small" size="small"
@click.stop="handleInterceptionSuccess(row)" @click.stop="handleInterceptionSuccess(row)"
> >
拦截成功 处理拦截
</ElButton> </ElButton>
</span> </span>
<span <span
...@@ -909,7 +909,7 @@ ...@@ -909,7 +909,7 @@
size="small" size="small"
@click.stop="handleInterceptionFail(row)" @click.stop="handleInterceptionFail(row)"
> >
拦截失败 取消拦截
</ElButton> </ElButton>
</span> </span>
</div> </div>
...@@ -1115,24 +1115,24 @@ ...@@ -1115,24 +1115,24 @@
/> />
<ElDialog <ElDialog
v-model="interceptSuccessDialogVisible" v-model="interceptSuccessDialogVisible"
title="拦截成功" title="处理拦截"
width="480px" width="480px"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<ElForm ref="interceptSuccessFormRef" :model="interceptSuccessForm"> <ElForm ref="interceptSuccessFormRef" :model="interceptSuccessForm">
<ElFormItem <ElFormItem
label="拦截成功类型" label="处理拦截类型"
prop="suspendSussessType" prop="blockSuccessType"
:rules="[ :rules="[
{ {
required: true, required: true,
message: '请选择拦截成功类型', message: '请选择处理拦截类型',
trigger: 'change', trigger: 'change',
}, },
]" ]"
> >
<ElSelect <ElSelect
v-model="interceptSuccessForm.suspendSussessType" v-model="interceptSuccessForm.blockSuccessType"
placeholder="请选择" placeholder="请选择"
style="width: 100%" style="width: 100%"
clearable clearable
...@@ -1307,8 +1307,8 @@ const interceptSuccessTypeOptions = [ ...@@ -1307,8 +1307,8 @@ const interceptSuccessTypeOptions = [
{ label: '生产拦截成功', value: 1 }, { label: '生产拦截成功', value: 1 },
{ label: '发货拦截成功', value: 2 }, { label: '发货拦截成功', value: 2 },
] ]
const interceptSuccessForm = ref<{ suspendSussessType: number | undefined }>({ const interceptSuccessForm = ref<{ blockSuccessType: number | undefined }>({
suspendSussessType: undefined, blockSuccessType: undefined,
}) })
const interceptSuccessRows = ref<FactoryOrderNewListData[]>([]) const interceptSuccessRows = ref<FactoryOrderNewListData[]>([])
const sizes = ['FS', 'XS', 'S', 'M', 'L', 'XL', 'XXL', '3XL', '4XL', '5XL'] const sizes = ['FS', 'XS', 'S', 'M', 'L', 'XL', 'XXL', '3XL', '4XL', '5XL']
...@@ -3006,7 +3006,7 @@ const completeOperationById = ( ...@@ -3006,7 +3006,7 @@ const completeOperationById = (
) => { ) => {
if (trigger === 'auto') { if (trigger === 'auto') {
const detailStatus = String(detailData?.status ?? '') const detailStatus = String(detailData?.status ?? '')
return productionScanApi(ids[0], detailStatus) return productionScanApi(ids[0], detailStatus, 'web')
} }
return completeDeliveryApi(ids) return completeDeliveryApi(ids)
} }
...@@ -3110,7 +3110,7 @@ const handleInterceptionSuccess = (row?: FactoryOrderNewListData) => { ...@@ -3110,7 +3110,7 @@ const handleInterceptionSuccess = (row?: FactoryOrderNewListData) => {
if (!ensureSelection()) return if (!ensureSelection()) return
interceptSuccessRows.value = [...selectedRows.value] interceptSuccessRows.value = [...selectedRows.value]
} }
interceptSuccessForm.value.suspendSussessType = undefined interceptSuccessForm.value.blockSuccessType = undefined
interceptSuccessDialogVisible.value = true interceptSuccessDialogVisible.value = true
nextTick(() => interceptSuccessFormRef.value?.clearValidate()) nextTick(() => interceptSuccessFormRef.value?.clearValidate())
} }
...@@ -3123,8 +3123,8 @@ const submitInterceptSuccess = async () => { ...@@ -3123,8 +3123,8 @@ const submitInterceptSuccess = async () => {
} catch { } catch {
return return
} }
const suspendSussessType = interceptSuccessForm.value.suspendSussessType const blockSuccessType = interceptSuccessForm.value.blockSuccessType
if (suspendSussessType === undefined) return if (blockSuccessType === undefined) return
const loading = ElLoading.service({ const loading = ElLoading.service({
fullscreen: true, fullscreen: true,
...@@ -3135,9 +3135,9 @@ const submitInterceptSuccess = async () => { ...@@ -3135,9 +3135,9 @@ const submitInterceptSuccess = async () => {
const data = rows.map((item: FactoryOrderNewListData) => { const data = rows.map((item: FactoryOrderNewListData) => {
return { return {
factoryOrderNumber: item.factoryOrderNumber as string, factoryOrderNumber: item.factoryOrderNumber as string,
suspendSussessType, blockSuccessType,
} }
}) as { factoryOrderNumber: string; suspendSussessType: number }[] }) as { factoryOrderNumber: string; blockSuccessType: number }[]
try { try {
const res = await interceptSuccessApi(data) const res = await interceptSuccessApi(data)
if (res.code !== 200) return if (res.code !== 200) return
...@@ -3163,7 +3163,7 @@ const handleInterceptionFail = async (row?: FactoryOrderNewListData) => { ...@@ -3163,7 +3163,7 @@ const handleInterceptionFail = async (row?: FactoryOrderNewListData) => {
item.factoryOrderNumber as string, item.factoryOrderNumber as string,
), ),
api: (ids) => interceptUpdateApi(ids as string[]), api: (ids) => interceptUpdateApi(ids as string[]),
confirmText: '拦截失败,订单会恢复到拦截前的状态,确认是否拒绝拦截申请?', confirmText: '取消拦截,订单会恢复到拦截前的状态,确认是否拒绝拦截申请?',
onSuccess: (res) => { onSuccess: (res) => {
const data = Array.isArray(res.data) const data = Array.isArray(res.data)
? (res.data as ResultInfoDataItem[]) ? (res.data as ResultInfoDataItem[])
......
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