11.8 退款申请新增

master
shilei 2 weeks ago
parent baed8ed29c
commit 26ee88577a

@ -153,4 +153,9 @@ export const OutChargeOrderApi = {
changeoutstatusOrder: async (data: OutChargeOrderVO) => { changeoutstatusOrder: async (data: OutChargeOrderVO) => {
return await request.post({ url: `/cloud/out-charge-order/changeStatus`, data }) 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 clearable
@keyup.enter="handleQuery" @keyup.enter="handleQuery"
class="!w-240px" class="!w-240px"
/> /> </el-form-item
</el-form-item><el-form-item label="" prop="nickName"> ><el-form-item label="司机" prop="nickName">
<el-input <el-input
v-model="queryParams.nickName" v-model="queryParams.nickName"
placeholder="请输入司机" placeholder="请输入司机"
@ -54,7 +54,6 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="车牌号" prop="vehicleNo"> <el-form-item label="车牌号" prop="vehicleNo">
<el-input <el-input
v-model="queryParams.vehicleNo" v-model="queryParams.vehicleNo"
placeholder="请输入车牌号" placeholder="请输入车牌号"
@ -177,9 +176,24 @@
</el-button> </el-button>
<el-button link type="danger" @click="handleDelete(scope.row.id)"> </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="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) " > 线下结算 </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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -287,7 +301,7 @@ const queryParams = reactive({
dateId: undefined, dateId: undefined,
timeId: undefined, timeId: undefined,
vehicleNo: undefined, vehicleNo: undefined,
nickName:undefined, nickName: undefined
}) })
const queryFormRef = ref() // const queryFormRef = ref() //
const exportLoading = ref(false) // const exportLoading = ref(false) //
@ -389,6 +403,23 @@ const handleDelete = async (id: number) => {
} catch {} } 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 () => { const handleExport = async () => {
try { try {

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