yangpeilai 4 дней назад
Родитель
Сommit
79d692630f

+ 4
- 4
src/views/onlineBusinessHall/assOrderInfoBusinessAudit/AuditInfo.vue Просмотреть файл

@@ -27,8 +27,8 @@ import { computed } from 'vue'
import $storeinitData from "@/store/initData";
import {getDictLabel} from "@/utils/utils";
//审核状态
const AUDIT_STATUS = computed(() => {
return $storeinitData.state.dictData["AUDIT_STATUS"] || [];
const ASS_ORDER_STEP = computed(() => {
return $storeinitData.state.dictData["ASS_ORDER_STEP"] || [];
});
const props = defineProps({
// 审核信息数据(从父组件传入)
@@ -53,8 +53,8 @@ const props = defineProps({
})
// 审核信息配置(定义字段映射关系)
const auditInfoConfig = [
{ prop: 'auditUserName', label: '审核人' },
{ prop: 'auditStatus', label: '审核状态', listData: AUDIT_STATUS },
{ prop: 'auditName', label: '审核人' },
{ prop: 'orderStep', label: '订单阶段', listData: ASS_ORDER_STEP },
{ prop: 'auditTime', label: '审核时间' },
{ prop: 'auditFailureCase', label: '审核意见', span: 3 },
{ prop: 'auditReason', label: '机审提示', span: 3 }

+ 8
- 3
src/views/onlineBusinessHall/assOrderInfoBusinessAudit/ChangeInfo.vue Просмотреть файл

@@ -17,13 +17,13 @@
<div class="table-row" v-else>
<span>{{ item.title }}</span>
<span>
<el-image v-if="item.oldValue"
style="height: 150px;width: auto; cursor: pointer;"
<el-image v-if="item.oldValue" class="my-img-box"
style="max-height: 150px;width: 100%; cursor: pointer;"
:src="changeAddress(item.oldValue)"
:hide-on-click-modal="true"
:preview-teleported="true"
:preview-src-list="[changeAddress(item.oldValue)]"
fit="cover">
fit="contain">
<template #error>
<div class="image-error">
<el-icon><Picture /></el-icon>
@@ -224,4 +224,9 @@ const changeItems = computed(() => {
background: #fdf6ec;
color: red;
}
::v-deep.my-img-box .el-image__preview{
width: 100%;
max-height: 150px;
object-fit: cover;
}
</style>

+ 7
- 2
src/views/onlineBusinessHall/assOrderInfoBusinessAudit/LossInfo.vue Просмотреть файл

@@ -12,11 +12,11 @@
<!-- 图片类型处理 -->
<template v-if="item.isImage">
<el-image
v-if="item.value"
v-if="item.value" class="my-img-box"
:src="changeAddress(item.value)"
:preview-src-list="[changeAddress(item.value)]"
fit="cover"
style="width: 190px; height: auto; cursor: pointer;"
style="width: 100%; max-height: 150px; cursor: pointer;"
:hide-on-click-modal="true"
:preview-teleported="true"
>
@@ -118,4 +118,9 @@ const computedLossInfo = computed(() => {
color: #909399;
font-size: 20px;
}
::v-deep.my-img-box .el-image__preview{
width: 100%;
max-height: 150px;
object-fit: cover;
}
</style>

+ 130
- 94
src/views/onlineBusinessHall/assOrderInfoBusinessAudit/index.vue Просмотреть файл

@@ -7,34 +7,35 @@
<el-select clearable v-model="searchForm.orderType" style="width: 140px;" placeholder="业务类型">
<el-option v-for="item in ORDER_TYPE" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>
<el-select clearable v-model="searchForm.auditStatus" style="width: 140px;" placeholder="审核状态">
<el-option v-for="item in AUDIT_STATUS" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>
<el-input maxlength="30" v-trim clearable v-model="searchForm.customerId" style="width: 180px"
placeholder="用户编号"/>
<el-input maxlength="30" v-trim clearable v-model="searchForm.customerName" style="width: 180px"
placeholder="用户名称"/>
<el-input maxlength="20" v-trim clearable v-model="searchForm.customerIdNum" style="width: 180px"
placeholder="用户证件号码"/>
<el-input maxlength="20" v-trim clearable v-model="searchForm.customerTel" style="width: 140px"
placeholder="用户手机号"/>
<!-- <el-select clearable v-model="searchForm.auditStatus" style="width: 140px;" placeholder="审核状态">-->
<!-- <el-option v-for="item in AUDIT_STATUS" :key="item.value" :label="item.label" :value="item.value"/>-->
<!-- </el-select>-->
<el-input maxlength="30" v-trim clearable v-model="searchForm.customerName" style="width: 180px" placeholder="用户名称"/>
<el-input maxlength="20" v-trim clearable v-model="searchForm.customerIdNum" style="width: 180px" placeholder="用户证件号码"/>
<el-input maxlength="20" v-trim clearable v-model="searchForm.customerTel" style="width: 140px" placeholder="用户手机号"/>
<el-input maxlength="60" v-trim clearable v-model="searchForm.vehiclePlate" placeholder="请输入车牌号"
:style="{ width: '240px', margin: '0 10px 10px 0' }">
<template #append>
<el-select clearable v-model="searchForm.vehiclePlateColor" placeholder="车牌颜色" style="width: 120px">
<el-option :label="item.label" :key="item.label" :value="item.value" v-for="item in VEHICLE_COLOR_TYPE" />
</el-select>
</template>
</el-input>
<el-input maxlength="30" v-trim clearable v-model="searchForm.customerId" style="width: 180px" placeholder="用户编号"/>
</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, '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.auditStatus === 'AUDIT' &&
<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')
" type="primary" size="small" class="code-btn" @click="audit(scope.row)">审核</el-button>
</template>

</crud-template>

<el-dialog
v-model="auditDialog"
:title="infoTitle"
width="800"
:before-close="handleClose"
>
<!--审核、查看-->
<el-dialog v-model="auditDialog" :title="infoTitle" width="800" :before-close="handleClose">
<div v-loading="auditLoading">
<div v-if="operationType==='audit'">
<el-button type="primary" @click="auditSubmit()">提 交</el-button>
@@ -43,8 +44,7 @@
</div>

<!--提示框-->
<TipText v-if="tipTextStr" :text="tipTextStr"
:auditShow="auditShow" :operationType="operationType" @showAudit="showAudit"/>
<TipText v-if="tipTextStr" :text="tipTextStr" :auditShow="auditShow" :operationType="operationType" @showAudit="showAudit"/>

<div v-if="operationType==='audit'">
<h4>审核信息</h4>
@@ -57,9 +57,9 @@
</el-col>
<el-col :span="8">
<el-form-item label="审核结果" prop="auditStatus" :error="formErrors.auditStatus">
<el-select v-model="auditForm.auditStatus" placeholder="请选择审核结果">
<el-option label="通过" value="COMPLETE"/>
<el-option label="不通过" value="FAIL"/>
<el-select v-model="auditForm.auditStatus" @change="handleAuditChange" placeholder="请选择审核结果">
<el-option label="通过" :value="true"/>
<el-option label="不通过" :value="false"/>
</el-select>
</el-form-item>
</el-col>
@@ -69,9 +69,8 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见" prop="auditReason" :error="formErrors.auditReason">
<el-input v-model="auditForm.auditReason" maxlength="30" show-word-limit type="textarea" rows="3"
placeholder="请输入审核意见"/>
<el-form-item label="审核意见" prop="reason" :error="formErrors.reason">
<el-input v-model="auditForm.reason" maxlength="30" show-word-limit type="textarea" rows="3" placeholder="请输入审核意见"/>
</el-form-item>
</el-col>
</el-row>
@@ -127,6 +126,23 @@
</div>
</el-dialog>

<!--取消-->
<el-dialog v-model="cancelDialog" :title="cancelTitle" width="500">
<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-form-item>
</el-form>

<div class="btn-bom">
<el-button type="primary" @click="cancelSubmit()">确 定</el-button>
<el-button @click="cancelDialog = false">取 消</el-button>
</div>
</div>
</el-dialog>


</div>
</template>
<!-- 用户信息修改审核 -->
@@ -219,7 +235,8 @@ const rules = reactive({
auditStatus: [{required: true, message: '请选择审核结果', trigger: 'change'}],
auditName: [{required: true, message: '审核人不能为空', trigger: 'blur'}],
auditTime: [{required: true, message: '审核时间不能为空', trigger: 'blur'}],
auditReason: [{required: true, message: '审核意见不能为空', trigger: 'blur'}],
reason: [{required: false, message: '审核意见不能为空', trigger: 'blur'}],
cancelReason: [{required: true, message: '取消原因不能为空', trigger: 'blur'}],
})

//查询参数
@@ -231,6 +248,8 @@ const searchForm = ref({
customerTel: '', // 用户手机号
orderType: '',
orderStatus: '',
vehiclePlate: '',
vehiclePlateColor: '',
});

let tableData: any = ref([]);
@@ -241,20 +260,27 @@ const auditLoading = ref(true);
const infoTitle = ref('查看');
const auditFormRef = ref();
const formErrors = ref({
auditReason: '',
reason: '',
auditStatus: '',
auditTime: '',
auditName: '',
});
const auditForm = ref({
orderNo: '',
userType: '',
auditName:'',
auditStatus:'',
auditTime: '',
auditReason:'',
}
);
orderNo: '',
auditName: '',
auditStatus: '',
auditTime: '',
reason: '',
});

const cancelFormRef = ref()
const cancelDialog = ref(false)
const cancelLoading = ref(false)
const cancelTitle = ref('取消')
const cancelForm = ref({
orderNo: '',
reason: '',
});

//操作类型
const orderType = ref('')
@@ -267,6 +293,31 @@ const name = computed(() => {
return $storeInitData.getters.userName
})

function auditCancel(row:any){
cancelTitle.value = getDictLabel(ORDER_TYPE, row.orderType)+'取消'
cancelForm.value.orderNo = row.orderNo
cancelForm.value.reason = ''
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
}
}).catch((error) => {
cancelDialog.value = false
cancelLoading.value = false
})
}

function showInfo(row:any){
// console.log("row.assOrderType",row.orderType)
infoTitle.value = getDictLabel(ORDER_TYPE, row.orderType)+'查看'
@@ -291,6 +342,8 @@ function showInfo(row:any){
auditLoading.value = false;
activeNames.value = ['1','0'];
}
}).catch((error) => {
refreshData()
}).finally(() => {
auditLoading.value = false;
crudRef.value.tableLoding = false;
@@ -322,11 +375,10 @@ function audit(row:any){
auditShow.value = true;
auditForm.value = {
orderNo: row.orderNo,
userType: row.userType,
auditName: name.value,
auditStatus:'COMPLETE',
auditStatus: true,
auditTime: new Date(),
auditReason:'',
reason:'',
}
if(orderType.value === 'USER_UPDATE'){
customerChangeInfoGet(row);
@@ -346,6 +398,8 @@ function customerChangeInfoGet(row:any){
auditLoading.value = false;
activeNames.value = ['1','0'];
}
}).catch((error) => {
refreshData()
}).finally(() => {
auditLoading.value = false;
crudRef.value.tableLoding = false;
@@ -405,6 +459,8 @@ function releasePlateInfoGet(row:any){
auditLoading.value = false;
activeNames.value = ['1','0'];
}
}).catch((error) => {
refreshData()
}).finally(() => {
auditLoading.value = false;
crudRef.value.tableLoding = false;
@@ -540,64 +596,29 @@ function showAudit(show){
auditShow.value = show;
}

function auditSubmit(){
if(orderType.value==='USER_UPDATE'){
customerChangeAuditSubmit()
}else if(orderType.value==='RELEASE_VEHICLE'){
releasePlateAuditSubmit()
}
function handleAuditChange(){
let auditStatus = auditForm.value.auditStatus
rules.reason = [{
required: !auditStatus,
message: '请输入审核意见',
trigger: 'blur'
}];
}

function customerChangeAuditSubmit(){
function auditSubmit(){
formErrors.value = Object.keys(formErrors.value).reduce((acc, key) => {
acc[key] = '';
return acc;
}, {} as Record<string, string>);
auditFormRef.value.validate((valid: any) => {
let params = {
...auditForm.value,
...auditForm.value
}
delete params.auditTime;
delete params.auditName;
if (valid) {
auditLoading.value = true;
BaseService.postN('/managew/customerInfoChange/audit', params).then((res: any) => {
if (res && res.statusCode === 0) {
ElMessage.success('操作成功');
auditDialog.value = false;
activeNames.value = [];
auditLoading.value = false;
getList();
}
}).catch((error) => {
auditLoading.value = false;
// console.log("error", error)
//匹配错误提示
// 遍历后端返回的所有错误字段
Object.keys(error).forEach((key) => {
if (formErrors.value[key] !== undefined) {
// 动态更新对应字段的错误信息
formErrors.value[key] = error[key];
}
});
});
}
})
}

function releasePlateAuditSubmit(){
formErrors.value = Object.keys(formErrors.value).reduce((acc, key) => {
acc[key] = '';
return acc;
}, {} as Record<string, string>);
auditFormRef.value.validate((valid: any) => {
let params = {
orderNo: auditForm.value.orderNo,
failReason: auditForm.value.auditReason,
pass:auditForm.value.auditStatus==='COMPLETE'?'1':'0',
}
if (valid) {
auditLoading.value = true;
BaseService.postN('/managew/api/afterSale/releasePlate/review', params).then((res: any) => {
BaseService.postN('/managew/api/assOrderinfo/review', params).then((res: any) => {
if (res && res.statusCode === 0) {
ElMessage.success('操作成功');
auditDialog.value = false;
@@ -625,7 +646,7 @@ const handleClose = (done: () => void) => {
done()
refreshData()
}).catch(() => {
refreshData()
// refreshData()
// catch error
})
}
@@ -672,6 +693,8 @@ function refreshLeft() {
customerIdType: '',
customerIdNum: '',
customerTel: '',
vehiclePlate: '',
vehiclePlateColor: '',
};
field.value.paging.currentPage = 1;
getList();
@@ -721,6 +744,19 @@ function getList() {
}
}

let vehiclePlate = params.vehiclePlate || ''
let vehiclePlateColor = params.vehiclePlateColor || ''

if(vehiclePlate !== '' && vehiclePlateColor !== ''){
params.vehicleId = vehiclePlate + '_' + vehiclePlateColor
}else if(vehiclePlate === '' && vehiclePlateColor !== ''){
ElMessage.error("请输入车牌号");
return
} else if(vehiclePlate !== '' && vehiclePlateColor === ''){
ElMessage.error("请选择车牌颜色");
return
}

crudRef.value.tableLoding = true;
BaseService.postN('/managew/api/assOrderinfo/page', params).then((res: any) => {
if (res && res.statusCode === 0) {
@@ -745,11 +781,11 @@ let field: any = ref({
dialogCustom: true,
border: true, //是否添加边框(默认false)
searchShow: IsPermission(route, 'QUERY_BASE'), //搜索展示
crudChildShow: true,
crudChildShow: false,
operateFixed: true,
paginStart: true, //是否显示分页查询 (默认false)
dialogWidth: "60%",
operateWidth: "130", //操作栏宽度
operateWidth: "190", //操作栏宽度
operateTitle: '操作', //操作栏标题(默认为"")
crud: {
add: false,
@@ -817,12 +853,12 @@ let field: any = ref({
prop: "applyTime",
label: "申请时间",
},
{
prop: "auditStatus",
label: "审核状态",
width: '80',
listData: AUDIT_STATUS,
},
// {
// prop: "auditStatus",
// label: "审核状态",
// width: '80',
// listData: AUDIT_STATUS,
// },
{
width: '80',
prop: "auditName",

+ 10
- 1
src/views/onlineBusinessHall/informationManagement/userInfo/index.vue Просмотреть файл

@@ -72,7 +72,11 @@
</el-descriptions-item>
<el-descriptions-item class-name="my-content" :label="value.label" width="33%" v-else :span="1">
<template v-if="value.value!=='--'">
<el-image :src="changeAddress(value.value)" style="width: 100%;height: auto"></el-image>
<el-image class="my-img-box" :src="changeAddress(value.value)" style="width: 100%;max-height: 150px;"
:hide-on-click-modal="true"
:preview-teleported="true"
:preview-src-list="[changeAddress(value.value)]"
/>
</template>
<template v-else><sapn>无</sapn></template>
</el-descriptions-item>
@@ -1360,4 +1364,9 @@
display: flex;
overflow: hidden
}
::v-deep.my-img-box .el-image__preview{
width: 100%;
max-height: 150px;
object-fit: cover;
}
</style>

Загрузка…
Отмена
Сохранить