11.8 退款申请新增

master
shilei 2 weeks ago
parent baed8ed29c
commit 26ee88577a

@ -153,4 +153,9 @@ export const OutChargeOrderApi = {
changeoutstatusOrder: async (data: OutChargeOrderVO) => {
return await request.post({ url: `/cloud/out-charge-order/changeStatus`, data })
},
// 退款
createRefundOrder: async (data: OutChargeOrderVO) => {
return await request.post({ url: `/cloud/refund-order/create`, data })
},
}

@ -43,8 +43,8 @@
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item><el-form-item label="" prop="nickName">
/> </el-form-item
><el-form-item label="司机" prop="nickName">
<el-input
v-model="queryParams.nickName"
placeholder="请输入司机"
@ -54,7 +54,6 @@
/>
</el-form-item>
<el-form-item label="车牌号" prop="vehicleNo">
<el-input
v-model="queryParams.vehicleNo"
placeholder="请输入车牌号"
@ -177,9 +176,24 @@
</el-button>
<el-button link type="danger" @click="handleDelete(scope.row.id)"> </el-button>
<el-button link type="primary" @click="open_drawer(scope.row)"> </el-button>
<el-button
link
type="danger"
@click="handle_refund(scope.row)"
v-if="scope.row.orderStatus == 5"
>
申请退款
</el-button>
<!-- <el-button link type="primary" @click="handle_Offline(scope.row) " > 线下结算 </el-button> -->
<el-button link type="primary" @click="handle_Offline(scope.row) " v-if="scope.row.orderStatus == 6"> 线 </el-button>
<el-button
link
type="primary"
@click="handle_Offline(scope.row)"
v-if="scope.row.orderStatus == 6"
>
线下结算
</el-button>
</template>
</el-table-column>
</el-table>
@ -287,7 +301,7 @@ const queryParams = reactive({
dateId: undefined,
timeId: undefined,
vehicleNo: undefined,
nickName:undefined,
nickName: undefined
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
@ -389,6 +403,23 @@ const handleDelete = async (id: number) => {
} catch {}
}
const handle_refund = async (row: any) => {
let params = {
orderNo: row.chargeOrder,
refundPrice: row.totalFee,
type: 2
}
// console.log(params, 'params')
try {
await message.confirm('确定退款吗?', '提示')
await OutChargeOrderApi.createRefundOrder(params)
message.success('创建退款成功')
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {

@ -18,10 +18,9 @@
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审核备注" prop="applyReason">
<el-input v-model="formData.applyReason" placeholder="请输入审核备注" type="textarea" />
<el-form-item label="审核备注" prop="auditReason">
<el-input v-model="formData.auditReason" placeholder="请输入审核备注" type="textarea" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
@ -44,8 +43,8 @@
const formType = ref('') // create - update -
const formData = reactive({
id: undefined,
applyReason: '',
status:undefined,
auditReason: '',
status: undefined
})
const formRules = reactive({
// stationNo: [{ required: true, message: '', trigger: 'blur' }],
@ -56,8 +55,6 @@
const open = async (id?: number) => {
formData.id = id
dialogVisible.value = true
}
defineExpose({ open }) // open
@ -83,12 +80,15 @@
formLoading.value = false
}
}
watch(()=>dialogVisible.value,(newValue)=>{
watch(
() => dialogVisible.value,
(newValue) => {
if (!newValue) {
formData.applyReason=''
formData.auditReason = ''
}
},{
},
{
deep: true
})
}
)
</script>
Loading…
Cancel
Save