|
|
@@ -1,19 +1,19 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<crud-template |
|
|
|
v-if="itemStart" |
|
|
|
class="as-weight" |
|
|
|
:ref="(el) => (crudRef = el)" |
|
|
|
:home-data="field" |
|
|
|
@btnSearch="btnSearch" |
|
|
|
@refreshLeft="refreshLeft" |
|
|
|
:initData="initItem" |
|
|
|
:tableData="tableData" |
|
|
|
@handleEdit="handleEdit" |
|
|
|
@cancel="cancel" |
|
|
|
@importData="importData" |
|
|
|
@CurrentChange="handleCurrentChange" |
|
|
|
@download="downloadHandle" |
|
|
|
v-if="itemStart" |
|
|
|
class="as-weight" |
|
|
|
:ref="(el) => (crudRef = el)" |
|
|
|
:home-data="field" |
|
|
|
@btnSearch="btnSearch" |
|
|
|
@refreshLeft="refreshLeft" |
|
|
|
:initData="initItem" |
|
|
|
:tableData="tableData" |
|
|
|
@handleEdit="handleEdit" |
|
|
|
@cancel="cancel" |
|
|
|
@importData="importData" |
|
|
|
@CurrentChange="handleCurrentChange" |
|
|
|
@download="downloadHandle" |
|
|
|
> |
|
|
|
<template #search> |
|
|
|
<el-form |
|
|
@@ -38,25 +38,25 @@ |
|
|
|
</el-form> |
|
|
|
|
|
|
|
<el-input |
|
|
|
maxlength="60" |
|
|
|
v-trim |
|
|
|
clearable |
|
|
|
v-model="searchForm.vehiclePlate" |
|
|
|
placeholder="请输入车牌号" |
|
|
|
style="width: 320px" |
|
|
|
maxlength="60" |
|
|
|
v-trim |
|
|
|
clearable |
|
|
|
v-model="searchForm.vehiclePlate" |
|
|
|
placeholder="请输入车牌号" |
|
|
|
style="width: 320px" |
|
|
|
> |
|
|
|
<template #append> |
|
|
|
<el-select |
|
|
|
clearable |
|
|
|
v-model="searchForm.vehiclePlateColor" |
|
|
|
placeholder="请选择车牌颜色" |
|
|
|
style="width: 150px" |
|
|
|
clearable |
|
|
|
v-model="searchForm.vehiclePlateColor" |
|
|
|
placeholder="请选择车牌颜色" |
|
|
|
style="width: 150px" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
:label="item.label" |
|
|
|
:key="item.label" |
|
|
|
:value="item.value" |
|
|
|
v-for="item in VEHICLE_COLOR_TYPE" |
|
|
|
:label="item.label" |
|
|
|
:key="item.label" |
|
|
|
:value="item.value" |
|
|
|
v-for="item in VEHICLE_COLOR_TYPE" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
@@ -64,73 +64,74 @@ |
|
|
|
</template> |
|
|
|
<template #tableOperation> |
|
|
|
<el-button |
|
|
|
v-if="IsPermission(route, 'LOWER_BLACK')" |
|
|
|
type="primary" |
|
|
|
@click="addBlack" |
|
|
|
v-if="IsPermission(route, 'LOWER_BLACK')" |
|
|
|
type="primary" |
|
|
|
@click="addBlack" |
|
|
|
> |
|
|
|
下黑 |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #dialog> |
|
|
|
<el-form |
|
|
|
label-position="right" |
|
|
|
label-width="110px" |
|
|
|
:model="addForm" |
|
|
|
:rules="rules" |
|
|
|
:ref="(el) => (dataFormRef = el)" |
|
|
|
v-loading="formLoding" |
|
|
|
label-position="right" |
|
|
|
label-width="110px" |
|
|
|
:model="addForm" |
|
|
|
:rules="rules" |
|
|
|
:ref="(el) => (dataFormRef = el)" |
|
|
|
v-loading="formLoding" |
|
|
|
> |
|
|
|
<el-form-item |
|
|
|
label="卡号:" |
|
|
|
prop="cardId" |
|
|
|
v-if="typeOption === '下黑'" |
|
|
|
label="卡号:" |
|
|
|
prop="cardId" |
|
|
|
v-if="typeOption === '下黑'" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
maxlength="60" |
|
|
|
v-trim |
|
|
|
clearable |
|
|
|
v-model="addForm.cardId" |
|
|
|
placeholder="请输入卡号" |
|
|
|
type="text" |
|
|
|
maxlength="60" |
|
|
|
v-trim |
|
|
|
clearable |
|
|
|
v-model="addForm.cardId" |
|
|
|
placeholder="请输入卡号" |
|
|
|
type="text" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
label="黑名单类型:" |
|
|
|
prop="type" |
|
|
|
v-if="typeOption === '下黑'" |
|
|
|
label="黑名单类型:" |
|
|
|
prop="type" |
|
|
|
v-if="typeOption === '下黑'" |
|
|
|
> |
|
|
|
<el-select |
|
|
|
clearable |
|
|
|
v-model="addForm.type" |
|
|
|
style="width: 100%" |
|
|
|
placeholder="请选择黑名单类型" |
|
|
|
clearable |
|
|
|
v-model="addForm.type" |
|
|
|
style="width: 100%" |
|
|
|
placeholder="请选择黑名单类型" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in typeList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
v-for="item in typeList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="原因:" prop="reason"> |
|
|
|
<el-form-item label="原因:" prop="reason" v-if="typeOption === '下黑'"> |
|
|
|
<el-input |
|
|
|
maxlength="200" |
|
|
|
v-trim |
|
|
|
clearable |
|
|
|
v-model="addForm.reason" |
|
|
|
placeholder="请输入原因" |
|
|
|
:autosize="{ minRows: 2, maxRows: 4 }" |
|
|
|
type="textarea" |
|
|
|
maxlength="200" |
|
|
|
v-trim |
|
|
|
clearable |
|
|
|
v-model="addForm.reason" |
|
|
|
placeholder="模板:1.账户透支:贵A12345因(尾号1234银行卡账户、尾号1457微信账户、尾号1111支付宝账户)余额不足无法扣款,欠费X元,请保障(银行卡、微信钱包、支付宝账户)余额充足,每日X时会再次扣款。 2.签约异常:贵A12345因所有涉及的地方,下黑原因需格式化,例如卡下黑时,下黑原因尾号1234银行卡账户解约/冻结字段要包含下黑的原因及解决方案且符合模版要求,不需要单独·无法扣款,欠费X元,请通过的解决方案字段:签下黑时必须要有原因。XX平台-XX功能换绑银行卡(可换绑本人储蓄卡/信用卡或均可签约换绑成功后,每日X时会再次扣款。) 3.其它异常情况:贵A12345因XXXX被限制通行,可以XXX解除。" |
|
|
|
:autosize="{ minRows: 2, maxRows: 4 }" |
|
|
|
type="textarea" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="解决方案:" prop="solution" v-if="typeOption === '下黑'"> |
|
|
|
|
|
|
|
<el-form-item label="原因:" prop="reason" v-if="typeOption === '反白'"> |
|
|
|
<el-input |
|
|
|
maxlength="200" |
|
|
|
v-trim |
|
|
|
clearable |
|
|
|
v-model="addForm.solution" |
|
|
|
placeholder="请输入解决方案" |
|
|
|
v-model="addForm.reason" |
|
|
|
placeholder="请填写原因" |
|
|
|
:autosize="{ minRows: 2, maxRows: 4 }" |
|
|
|
type="textarea" |
|
|
|
/> |
|
|
@@ -139,10 +140,10 @@ |
|
|
|
</template> |
|
|
|
<template #operation="{ scope }"> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
@click="handleEdit(scope.row, '反白')" |
|
|
|
size="small" |
|
|
|
v-if=" |
|
|
|
type="primary" |
|
|
|
@click="handleEdit(scope.row, '反白')" |
|
|
|
size="small" |
|
|
|
v-if=" |
|
|
|
scope.row.status === 1 && |
|
|
|
IsPermission(route, 'REVERSE') && |
|
|
|
scope.row.type != 2 && |
|
|
@@ -164,15 +165,15 @@ |
|
|
|
<script lang="ts" setup> |
|
|
|
// @ts-ignore crudFrom模板 |
|
|
|
import CrudTemplate from '@/crud/index.vue' |
|
|
|
import { ref, onMounted, computed } from 'vue' |
|
|
|
import { ElMessage } from 'element-plus' |
|
|
|
import { useDebounce, getDictLabel } from '@/utils/utils' |
|
|
|
import {ref, onMounted, computed} from 'vue' |
|
|
|
import {ElMessage} from 'element-plus' |
|
|
|
import {useDebounce, getDictLabel} from '@/utils/utils' |
|
|
|
import BaseService from '@/utils/baseService' |
|
|
|
import $storeinitData from '@/store/initData' //引入tab vuex |
|
|
|
import { blacklistApi, inversionApi } from '@/api/onlineBusinessHall/afterSales' |
|
|
|
import { useRoute } from 'vue-router' |
|
|
|
import { IsPermission } from '@/router/routerUtil' |
|
|
|
import { getCache } from '@/utils/cache' |
|
|
|
import {blacklistApi, inversionApi} from '@/api/onlineBusinessHall/afterSales' |
|
|
|
import {useRoute} from 'vue-router' |
|
|
|
import {IsPermission} from '@/router/routerUtil' |
|
|
|
import {getCache} from '@/utils/cache' |
|
|
|
|
|
|
|
//车牌颜色 |
|
|
|
const VEHICLE_COLOR_TYPE = computed(() => { |
|
|
@@ -205,10 +206,9 @@ const addForm: any = ref({ |
|
|
|
}) |
|
|
|
const formLoding = ref(false) |
|
|
|
const rules = { |
|
|
|
reason: [{ required: true, message: '请输入原因', trigger: 'blur' }], |
|
|
|
solution: [{ required: true, message: '请输入解决方案', trigger: 'blur' }], |
|
|
|
type: [{ required: true, message: '请选择类型', trigger: 'change' }], |
|
|
|
cardId: [{ required: true, message: '请输入卡号', trigger: 'blur' }], |
|
|
|
reason: [{required: true, message: '请输入原因', trigger: 'blur'}], |
|
|
|
type: [{required: true, message: '请选择类型', trigger: 'change'}], |
|
|
|
cardId: [{required: true, message: '请输入卡号', trigger: 'blur'}], |
|
|
|
} |
|
|
|
const tableData = ref([] as any[]) |
|
|
|
const typeList = computed(() => { |
|
|
@@ -466,6 +466,7 @@ const field = ref({ |
|
|
|
}, |
|
|
|
], |
|
|
|
}) |
|
|
|
|
|
|
|
// 搜索按钮 |
|
|
|
function btnSearch() { |
|
|
|
searchFormRef.value.validate((valid: boolean) => { |
|
|
@@ -476,6 +477,7 @@ function btnSearch() { |
|
|
|
getList() |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
// 搜索重置 |
|
|
|
function refreshLeft() { |
|
|
|
searchForm.value = { |
|
|
@@ -499,6 +501,7 @@ function handleEdit(row: any, text) { |
|
|
|
typeOption.value = text |
|
|
|
console.log('====', addForm.value) |
|
|
|
} |
|
|
|
|
|
|
|
// 取消 |
|
|
|
function cancel() { |
|
|
|
addForm.value = { |
|
|
@@ -511,7 +514,7 @@ function cancel() { |
|
|
|
} |
|
|
|
|
|
|
|
function importData(url) { |
|
|
|
BaseService.postN('/managew/api/bls/card/cardImport', { excelUrl: url }).then((res: any) => { |
|
|
|
BaseService.postN('/managew/api/bls/card/cardImport', {excelUrl: url}).then((res: any) => { |
|
|
|
if (res && res.code === 0) { |
|
|
|
console.log(res) |
|
|
|
const errUrl = res.data?.excelUrl ?? '' |
|
|
@@ -527,10 +530,12 @@ function importData(url) { |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
function handleCurrentChange(val: number) { |
|
|
|
field.value.paging.currentPage = val |
|
|
|
getList() |
|
|
|
} |
|
|
|
|
|
|
|
// 提交 |
|
|
|
function submitClick() { |
|
|
|
dataFormRef.value.validate((valid: boolean) => { |
|
|
@@ -540,10 +545,10 @@ function submitClick() { |
|
|
|
let api = '/managew/api/bls/card/cardIn' |
|
|
|
let params = { |
|
|
|
...addForm.value, |
|
|
|
channelType:2, |
|
|
|
staffId:cacheAccessToken['openId'] |
|
|
|
channelType: 2, |
|
|
|
staffId: cacheAccessToken['openId'] |
|
|
|
} |
|
|
|
if(params.status == 2){ |
|
|
|
if (params.status == 2) { |
|
|
|
api = '/managew/api/bls/card/cardOut' |
|
|
|
} |
|
|
|
console.log(params, 'paramsparams') |
|
|
@@ -576,26 +581,26 @@ function getList() { |
|
|
|
pageNo: field.value.paging.currentPage, |
|
|
|
pageSize: field.value.paging.pageSize, |
|
|
|
} |
|
|
|
let searchFormList = { ...searchForm.value } |
|
|
|
let searchFormList = {...searchForm.value} |
|
|
|
for (let key in searchFormList) { |
|
|
|
if (searchFormList[key]) { |
|
|
|
params[key] = searchFormList[key] |
|
|
|
} |
|
|
|
} |
|
|
|
BaseService.post('/managew/api/bls/card/query', params).then( |
|
|
|
(res: any) => { |
|
|
|
if (res && res.statusCode === 0) { |
|
|
|
let bizContent = res.data |
|
|
|
let data = bizContent.results || [] |
|
|
|
tableData.value = data |
|
|
|
console.log('===bizContentData', bizContent) |
|
|
|
crudRef.value.tableLoding = false |
|
|
|
// field.value.paging.total = bizContent.totalCount |
|
|
|
} else { |
|
|
|
crudRef.value.tableLoding = false |
|
|
|
ElMessage.error(res.message) |
|
|
|
(res: any) => { |
|
|
|
if (res && res.statusCode === 0) { |
|
|
|
let bizContent = res.data |
|
|
|
let data = bizContent.results || [] |
|
|
|
tableData.value = data |
|
|
|
console.log('===bizContentData', bizContent) |
|
|
|
crudRef.value.tableLoding = false |
|
|
|
// field.value.paging.total = bizContent.totalCount |
|
|
|
} else { |
|
|
|
crudRef.value.tableLoding = false |
|
|
|
ElMessage.error(res.message) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
crudRef.value.tableLoding = false |
|
|
|
// tableData.value = [ |
|
|
@@ -604,6 +609,7 @@ function getList() { |
|
|
|
// } |
|
|
|
// ] |
|
|
|
} |
|
|
|
|
|
|
|
// 新增下黑 |
|
|
|
function addBlack() { |
|
|
|
addForm.value.status = 1 //下黑 |
|
|
@@ -611,14 +617,18 @@ function addBlack() { |
|
|
|
crudRef.value.title = '下黑' |
|
|
|
typeOption.value = '下黑' |
|
|
|
} |
|
|
|
//用户标识 |
|
|
|
let cacheAccessToken = getCache( |
|
|
|
|
|
|
|
//用户标识 |
|
|
|
let cacheAccessToken = getCache( |
|
|
|
'cacheAccessToken', |
|
|
|
{ isSessionStorage: false }, |
|
|
|
{isSessionStorage: false}, |
|
|
|
{} |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
// 导出 |
|
|
|
function downloadHandle() {} |
|
|
|
function downloadHandle() { |
|
|
|
} |
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
//getList(); |
|
|
|
}) |