瀏覽代碼

业务审核取消

master
yangpeilai 1 周之前
父節點
當前提交
7e5b9b548a
共有 1 個檔案被更改,包括 21 行新增16 行删除
  1. 21
    16
      src/views/onlineBusinessHall/assOrderInfoBusinessAudit/index.vue

+ 21
- 16
src/views/onlineBusinessHall/assOrderInfoBusinessAudit/index.vue 查看文件

@@ -25,7 +25,7 @@
</template>

<template #operation="{ scope }">
<el-button v-if="IsPermission(route, 'CANCEL_LIST')" type="warning" size="small" class="code-btn" @click="auditCancel(scope.row)">取消</el-button>
<el-button v-if="IsPermission(route, 'CANCEL_LIST') && scope.row.orderStatus === 'NORMAL'" type="warning" size="small" class="code-btn" @click="auditCancel(scope.row)">取消</el-button>
<el-button v-if="IsPermission(route, 'INFO_LIST')" type="success" size="small" class="code-btn" @click="showInfo(scope.row)">详情</el-button>
<el-button v-if="IsPermission(route, 'AUDIT_LIST') && scope.row.orderStatus === 'NORMAL' && scope.row.orderStep === 'WAITING_AUDIT' &&
(scope.row.orderType === 'USER_UPDATE' || scope.row.orderType === 'LOSS' || scope.row.orderType === 'RELEASE_VEHICLE')
@@ -131,7 +131,7 @@
<div v-loading="cancelLoading">
<el-form ref="cancelFormRef" :model="cancelForm" label-width="auto" :rules="rules">
<el-form-item label="取消原因" prop="cancelReason">
<el-input v-model="cancelForm.reason" maxlength="30" show-word-limit type="textarea" rows="3" placeholder="请输入取消原因"/>
<el-input v-model="cancelForm.cancelReason" maxlength="30" show-word-limit type="textarea" rows="3" placeholder="请输入取消原因"/>
</el-form-item>
</el-form>

@@ -279,7 +279,7 @@ const cancelLoading = ref(false)
const cancelTitle = ref('取消')
const cancelForm = ref({
orderNo: '',
reason: '',
cancelReason: '',
});

//操作类型
@@ -296,25 +296,30 @@ const name = computed(() => {
function auditCancel(row:any){
cancelTitle.value = getDictLabel(ORDER_TYPE, row.orderType)+'取消'
cancelForm.value.orderNo = row.orderNo
cancelForm.value.reason = ''
cancelForm.value.cancelReason = ''
cancelDialog.value = true
cancelFormRef.value.clearValidate();
}

function cancelSubmit(){
cancelLoading.value = true
let params = {
...cancelForm.value
}
BaseService.postN('/managew/api/assOrderinfo/cancel', params).then((res: any) => {
if (res && res.statusCode === 0) {
ElMessage.success("操作成功");
cancelDialog.value = false
cancelLoading.value = false
cancelFormRef.value.validate().then((valid: any) => {
if(valid){
cancelLoading.value = true
let params = {
orderNo: cancelForm.value.orderNo,
reason: cancelForm.value.cancelReason
}
BaseService.postN('/managew/api/assOrderinfo/cancel', params).then((res: any) => {
if (res && res.statusCode === 0) {
ElMessage.success("操作成功");
cancelDialog.value = false
cancelLoading.value = false
getList();
}
}).catch((error) => {
cancelLoading.value = false
})
}
}).catch((error) => {
cancelDialog.value = false
cancelLoading.value = false
})
}


Loading…
取消
儲存