Commit 29738c7c by cen

Merge branch 'SAAS+V5.3.0-1117' of http://192.168.3.233:8090/saas_plus/dj-car-li…

…fe-system into SAAS+V5.3.0-1117
2 parents a54b9248 10e49ec3
import request from "./request"
// 分页查询潜客数据
export function potentialCustomersPage(data) {
data.method = 'dj.api.smartcarlife.sale.potentialCustomers.page'
return request(data, "post")
}
// 分页查询大区
export function regionPage(data) {
data.method = 'dj.api.smartcarlife.sale.region.page'
return request(data, "post")
}
...@@ -140,3 +140,58 @@ export const batchTransferDetail = (data) => { ...@@ -140,3 +140,58 @@ export const batchTransferDetail = (data) => {
data.method = 'dj.smartcarlife.api.nbcb.batch.transfer.detail' data.method = 'dj.smartcarlife.api.nbcb.batch.transfer.detail'
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
/**
* 查询资金使用额度列表
*/
export const getFundUsageLimitList = (data) => {
data.method = 'dj.smartcarlife.api.fund.usage.limit.page'
return request(data, RequestMethods.POST)
}
/**
* 查询资金使用额度关联审批列表
*/
export const getFundUsageLimitOaList = (data) => {
data.method = 'dj.smartcarlife.api.fund.usage.limit.oa.page'
return request(data, RequestMethods.POST)
}
/**
* 查询资金使用额度详情
*/
export const getFundUsageLimitDetail = (data) => {
data.method = 'dj.smartcarlife.api.fund.usage.limit.detail'
return request(data, RequestMethods.POST)
}
/**
*新增资金使用额度
*/
export const addFundUsageLimit = (data) => {
data.method = 'dj.smartcarlife.api.fund.usage.limit.add'
return request(data, RequestMethods.POST)
}
/**
* 账户余额
*/
export const getAccountBalance = (data = {}) => {
data.method = 'dj.smartcarlife.api.nbcb.acc.bal'
return request(data, RequestMethods.POST)
}
/**
* 发送验证码
*/
export const sendSmsCode = (data = {}) => {
data.method = 'dj.api.smartcarlife.sms.common.sendSmsCode'
return request(data, RequestMethods.POST)
}
/**
* 校验验证码
*/
export const verifySmsCode = (data = {}) => {
data.method = 'dj.api.smartcarlife.sms.common.verifySmsCode'
return request(data, RequestMethods.POST)
}
\ No newline at end of file \ No newline at end of file
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<el-button <el-button
type="primary" type="primary"
@click="confirmBtn" @click="confirmBtn"
v-if="!config.hideConfirmBtn"
:loading="$store.state.d2admin.loading.value || btnLoding" :loading="$store.state.d2admin.loading.value || btnLoding"
> >
{{ config.confirm_name }} {{ config.confirm_name }}
......
...@@ -57,7 +57,7 @@ export default { ...@@ -57,7 +57,7 @@ export default {
* size 按钮样式,默认mini * size 按钮样式,默认mini
* showBtnIds 按需显示按钮 * showBtnIds 按需显示按钮
*/ */
const { category, data, mapping, label, size, showBtnIds } = ctx.props const { category, data, mapping, label, size, showBtnIds ,loading } = ctx.props
let curBtns = [] let curBtns = []
/** /**
* 判断一个按钮(btn)是否存在与当前行(data) 的映射关系(mapping)中 * 判断一个按钮(btn)是否存在与当前行(data) 的映射关系(mapping)中
...@@ -103,6 +103,7 @@ export default { ...@@ -103,6 +103,7 @@ export default {
'el-button', 'el-button',
{ {
props: { props: {
loading: loading,
type: btn.type || (btn.category === 'Button' ? '' : 'text'), type: btn.type || (btn.category === 'Button' ? '' : 'text'),
icon: btn.icon ? `el-icon-${btn.icon}` : '', icon: btn.icon ? `el-icon-${btn.icon}` : '',
size: size, size: size,
......
...@@ -26,7 +26,7 @@ export default { ...@@ -26,7 +26,7 @@ export default {
methods: { methods: {
getTrackData (e) { getTrackData (e) {
setTimeout(() => { setTimeout(() => {
if (e.id == 'app') return if (!e || e.id == 'app') return
let target = e.target || e let target = e.target || e
if (target.dataset && Object.keys(target.dataset).length && target.dataset.eventCode) { if (target.dataset && Object.keys(target.dataset).length && target.dataset.eventCode) {
this.setReportTrackData(0, target.dataset.eventCode, JSON.parse(target.dataset?.track || '{}')) this.setReportTrackData(0, target.dataset.eventCode, JSON.parse(target.dataset?.track || '{}'))
......
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
921: {
path: "/salesManagement",
name: "salesManagement",
meta: {
title: "销售管理",
authId: "921",
parentId: "1",
cache: false
}
},
92101: {
path: "/customer",
name: "customer",
meta: {
title: "客户管理",
authId: "92101",
parentId: "921",
cache: false
},
auth: [
{
authId: "9210101",
parentId: "92101",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9210102",
parentId: "92101",
label: "首次绑定",
handle: "handleEdit"
},
{
authId: "9210103",
parentId: "92101",
label: "详情",
handle: "handleDetail"
}
],
component: _import("salesManagement/customer/index")
},
92102: {
path: "/organize",
name: "organize",
meta: {
title: "组织架构管理",
authId: "92102",
parentId: "921",
cache: false
},
auth: [
{
authId: "9210201",
parentId: "92102",
label: "编辑",
handle: "handleEdit",
addRoutePath: [
{
authId: "92103",
name: "编辑",
parentId: "92102"
}
]
}
],
component: _import("salesManagement/organize/index")
},
92103: {
path: "/editOrganize",
name: "editOrganize",
meta: {
title: "编辑",
authId: "92103",
parentId: "92102",
sideHidden: true,
activePath: "/editOrganize"
},
component: _import("salesManagement/organize/editOrganize")
}
}
...@@ -72,11 +72,11 @@ export default { ...@@ -72,11 +72,11 @@ export default {
endPlaceholder: String, endPlaceholder: String,
infinity: Boolean, infinity: Boolean,
maxLength:{ maxLength:{
type: Number, type: [Number,String],
default: 20 default: 20
}, },
inputMaxLength:{ inputMaxLength:{
type: Number, type: [Number,String],
default: -1 default: -1
}, },
}, },
......
<template>
<baseDialog
:is-show.sync="dialogShow"
:dialog-config="dialogConfig.config"
class="detail-content-warn"
@handleClick="submit"
>
<el-form
class="form"
label-width="150px"
size="small"
>
<el-form-item
label="手机号:"
required
:error="phoneError"
>
<el-input
v-model="phoneText"
class="input-width"
disabled
></el-input>
</el-form-item>
<el-form-item
label="验证码:"
required
:error="smsError"
>
<div class="sms-code flex">
<el-input
v-model="smsCode"
class="input-width"
maxlength="6"
>
</el-input>
<el-button
ref="smsCodeBtn"
type="primary"
:plain="countDownStatus"
:disabled="countDownStatus"
class="get-sms-code"
@click="getSmsCode"
>{{smsBtnText}}</el-button>
</div>
</el-form-item>
</el-form>
</basedialog>
</template>
<script>
import { sendSmsCode, verifySmsCode } from "@api/usedCarManagement"
export default {
name: "AuthPhoneDialog",
inject: ['userInfo'],
props: {
visible: {
type: Boolean,
default: false
},
},
computed: {
dialogShow: {
get () {
return this.visible
},
set (val) {
this.$emit('dialogClose', { flag: this.refreshFlag })
}
},
phoneText () {
let phone = this.userInfo.loginAccount.phone
return `${phone || ''}(默认带入登录人手机号码)`
},
phone () {
return this.userInfo.loginAccount.phone
}
},
mounted () {
},
data () {
return {
phoneError: '',
smsError: '',
smsBtnText: '获取验证码',
count: 60,
smsCode: '',
countDownStatus: false,
dialogConfig: {
config: {
title: "短信验证",
width: "640px"
}
},
}
},
methods: {
async getSmsCode (e) {
let { phone } = this
if (!phone) return this.phoneError = '手机号不能为空'
if (!/^1[3456789]\d{9}$/.test(phone)) return this.phoneError = '手机号格式错误'
this.countDownStatus = true
let data = await sendSmsCode({
phone
})
if (data) {
this.countDown()
let target = e.target
if (target.nodeName == 'SPAN') target = e.target.parentNode
target.blur()
this.notice.okTips('发送短信成功')
} else {
this.notice.errorTips('发送短信失败')
this.countDownStatus = false
}
},
countDown () {
this.count--
let count = this.count
this.smsBtnText = `获取验证码(${count})`
if (count <= 0) {
this.count = 60
this.countDownStatus = false
this.smsBtnText = '获取验证码'
return
}
setTimeout(() => {
this.countDown()
}, 1e3)
},
async submit () {
this.smsError = ''
this.phoneError = ''
let { phone, smsCode } = this
if (!phone) return this.phoneError = '手机号不能为空'
if (!/^1[3456789]\d{9}$/.test(phone)) return this.phoneError = '手机号格式错误'
if (!smsCode) return this.smsError = '验证码不能为空'
if (smsCode.length < 6) return this.smsError = '验证码错误,请重试!'
let data = await verifySmsCode({
phone,
smsCode
})
if (data) {
this.$emit('loginSuccess')
this.count = 60
this.countDownStatus = false
this.smsBtnText = '获取验证码'
this.smsCode = ''
} else this.smsError = '验证码错误,请重试!'
}
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
}
.detail-content-warn {
::v-deep .el-dialog {
height: 360px;
}
.form {
height: 195px;
padding: 17px 22px 0 0;
box-sizing: border-box;
}
.sms-code {
gap: 8px;
.get-sms-code {
width: 160px;
}
}
}
</style>
<template>
<baseDialog
:is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn"
>
<div
v-loading="loading"
class="form_div"
>
<div class="div-title">使用情况</div>
<el-form
class="edit-sub-block"
label-width="150px"
:inline="true"
>
<div class="itemDiv">
<template v-for="(item,index) in formList">
<el-form-item
:label="`${item.label}:`"
class="halfItem"
:key="index"
>
{{ detailInfo[item.value] || "-" }}
</el-form-item>
</template>
</div>
</el-form>
<div class="div-title flex">
关联审批单列表
<el-button
type="primary"
class="btn"
size="mini"
@click="handleExport"
>导出</el-button>
</div>
<template v-if="loadingComplete">
<d2-table
ref="oaTable"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
>
</d2-table>
</template>
<div class="block"></div>
</div>
</basedialog>
</template>
<script>
import { getFundUsageLimitDetail, getFundUsageLimitOaList } from "@api/usedCarManagement"
import { mapActions, mapState } from "vuex"
export default {
name: "DetailDialog",
components: {
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
}),
dialogShow: {
get () {
return this.visible
},
set (val) {
this.$emit('dialogClose', { flag: this.refreshFlag })
}
}
},
mounted () {
},
watch: {
visible: {
handler (val) {
if (val) {
this.loading = true
this.getDetail()
}
else {
this.loadingComplete = false
this.detailInfo = {}
this.refreshFlag = false
}
},
immediate: true,
deep: true
}
},
data () {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: true,
},
config: {
title: "资金使用详情",
width: "1080px"
}
},
detailInfo: {},
loading: true,
tableData: [],
getListApi: getFundUsageLimitOaList,
searchFormSearch: {},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '支付方式',
prop: 'paymentReason',
width: 100
}, {
label: '支付金额',
prop: 'amt',
minWidth: 120,
formatter: (cellValue) => {
return cellValue.amt != null ? `¥${cellValue.amt}` : "-"
}
},
{
label: '收款人',
prop: 'rcvName',
minWidth: 120
},
{
label: '车牌号',
prop: 'licensePlate',
width: '100px'
},
{
label: '企微审批单号',
prop: 'spNo',
minWidth: 120
},
{
label: '评估单编号',
prop: 'evalOrderNo',
minWidth: 120
}
]
},
refreshFlag: false,
formList: [
{
label: '使用额度',
value: 'usageLimitText'
},
{
label: '已用金额',
value: 'usedAmountText'
},
{
label: '当期额度使用率',
value: 'usageRate'
},
{
label: '操作时间',
value: 'operationTime'
},
{
label: '操作人姓名',
value: 'operatorName'
},
{
label: '认证手机号',
value: 'authPhone'
},
{
label: '预警通知邮箱',
value: 'warningEmail'
},
],
loadingComplete: false,
}
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
async getDetail () {
const data = await getFundUsageLimitDetail({ id: this.paramsObj.id })
this.detailInfo = data
this.dataProcess(this.detailInfo)
this.loadingComplete = true
this.loading = false
},
dataProcess (info) {
if (info) {
info.usageLimitText = info.usageLimit != null ? `${info.usageLimit.toLocaleString()}元` : '-'
info.usedAmountText = info.usedAmount != null ? `${info.usedAmount.toLocaleString()}元` : '-'
}
},
beforeSearchFn () {
return new Promise((resolve) => {
this.searchFormSearch = {
fundUsageLimitId: this.paramsObj.id
}
resolve()
})
},
handleExport () {
let params = {
method: "dj.smartcarlife.api.fund.usage.limit.oa.export.async",
fundUsageLimitId: this.paramsObj.id
}
const list = [
...this.dowloadList,
{
name: "关联审批单列表",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
}
.detail-content-warn {
::v-deep .el-dialog {
.el-dialog__body {
overflow-y: scroll;
max-height: calc(70vh - 61px);
padding-top: 0;
}
}
.tipsText {
.circle {
display: inline-block;
border-radius: 50%;
width: 6px;
height: 6px;
margin-right: 8px;
vertical-align: middle;
}
}
.tipsError {
margin-left: 102px;
}
.tipsBt {
margin-left: auto;
}
.div-title {
display: flex;
align-items: center;
height: 50px;
font-size: 16px;
font-weight: 600;
color: #333333;
.btn {
margin-left: auto;
}
}
.el-icon-circle-close {
color: #ffffff;
}
.form_div {
max-height: 80vh;
color: #333333;
.tipsDiv {
display: flex;
align-items: center;
border-radius: 4px;
opacity: 1;
border: 1px solid #e5e5e5;
background: #fafafa;
padding: 16px 20px;
margin-bottom: 20px;
}
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
::v-deep .el-form-item__label {
padding: 0;
}
.el-form-item {
width: 100%;
// margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
flex-wrap: wrap;
.halfItem {
width: 50%;
margin: 0 !important;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
.edit-sub-block-two {
.el-form-item__label {
padding: 0;
}
.el-form-item {
// width: 300px;
margin: 0px;
}
}
}
.receiptBtn {
margin-left: 8px;
}
.block {
height: 24px;
}
}
</style>
<template>
<baseDialog
:is-show.sync="dialogShow"
:dialog-config="dialogConfig.config"
class="detail-content-warn"
@handleClick="submit"
>
<div class="usage-box flex">
<div class="progress-box">
<el-steps
direction="vertical"
:active="3"
>
<el-step title="请阅读功能使用注意事项"></el-step>
<el-step title="请填写当期使用额度"></el-step>
<el-step title="请填写预警通知邮箱"></el-step>
</el-steps>
</div>
<div class="form">
<div class="tips">
每次“新增使用额度”都会重置上次限额,且上次未使用额度不会延续叠加使用(仅当期有效);
预警通知触发条件:当额度使用率达到70%、80%、90%、95%时,各触发一次预警;
“使用额度”仅控制二手车业务自动付款,超过当期额度后无法自动付款。
<!-- 每次“新增使用额度”都会重置上次限额,且上次未使用额度不会延续叠加使用(仅当期有效);
预警通知触发条件:当额度使用率达到70%、80%、90%、95%时,各触发一次预警;
“使用额度”仅控制二手车业务自动付款,超过当期额度后无法自动付款。 -->
</div>
<el-form
label-width="150px"
size="small"
:model="infoForm"
ref="editRef"
:rules="formRules"
>
<el-form-item
label="当期使用额度:"
class="usage-limit"
prop="usageLimit"
>
<el-input
v-model="infoForm.usageLimit"
class="input-width"
:maxlength="15"
@input="handleUsageLimitNum"
>
</el-input>
<span class="unit">元</span>
</el-form-item>
<el-form-item
label="预警通知邮箱:"
prop="warningEmail"
>
<el-input
v-model="infoForm.warningEmail"
class="input-width"
>
</el-input>
</el-form-item>
</el-form>
</div>
</div>
</basedialog>
</template>
<script>
import { addFundUsageLimit } from "@api/usedCarManagement"
import { limitPrice } from '@/common/format'
import { deepClone } from "@/common/util"
export default {
name: "UsageLimitDialog",
inject: ['userInfo'],
props: {
visible: {
type: Boolean,
default: false
},
},
computed: {
dialogShow: {
get () {
return this.visible
},
set (val) {
this.$emit('dialogClose', { flag: this.refreshFlag })
}
},
authPhone () {
return this.userInfo.loginAccount.phone
}
},
watch: {
visible: {
handler (val) {
if (val) {
this.infoForm = this.$options.data.call(this).infoForm
}
},
immediate: true,
deep: true
}
},
mounted () {
},
data () {
return {
dialogConfig: {
config: {
title: "新增使用额度",
width: "840px"
}
},
infoForm: {
usageLimit: '',
warningEmail: ''
},
oldVal: '',
formRules: {
usageLimit: [
{ required: true, message: "请填写当期使用额度", trigger: "blur" }
],
warningEmail: [{
validator: (rule, value, callback) => {
if (!value) {
return callback(new Error(`请填写预警通知邮箱`))
}
// 去除首尾空格,并按逗号分割
const emailArray = value.split(',').map(email => email.trim())
if (emailArray.length > 5) {
return callback(new Error(`最多只能填写5个邮箱`))
}
// 邮箱格式正则(基础版)
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/
// 检查每个邮箱是否合法
const invalidEmails = emailArray.filter(email => {
return email && !emailRegex.test(email) // 过滤非法邮箱
})
if (invalidEmails.length > 0) {
return callback(new Error(`以下邮箱格式不正确: ${invalidEmails.join(', ')}`))
}
// 可选:检查是否有重复邮箱
const unique = [...new Set(emailArray)]
if (unique.length !== emailArray.length) {
return callback(new Error('存在重复的邮箱地址'))
}
callback() // 验证通过
},
trigger: "blur"
}]
},
}
},
methods: {
handleUsageLimitNum (event) {
this.infoForm.usageLimit = limitPrice(event, this.oldVal, 15, 2)
this.oldVal = this.infoForm.usageLimit
},
submit () {
this.$refs.editRef.validate(async (valid) => {
if (valid) {
let { infoForm, authPhone } = this,
params = deepClone(infoForm)
// 提交前清理末尾逗号
params.warningEmail = params.warningEmail.trim().replace(/,+$/, '')
const data = await addFundUsageLimit({
...params,
authPhone
})
if (data) {
this.notice.okTips('新增使用额度成功')
this.$emit('addUsageLimitSuccess')
} else this.notice.errorTips('新增使用额度失败')
}
})
}
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
}
.detail-content-warn {
::v-deep .el-dialog {
height: 428px;
}
.usage-box {
height: 263px;
.progress-box {
width: 210px;
height: 244px;
::v-deep .el-step__main {
padding: 4px 0 0 18px;
.el-step__title {
font-size: 14px;
}
}
::v-deep .el-step__line {
left: 15px;
background: none;
.el-step__line-inner {
height: 29px !important;
position: absolute;
top: 54px;
}
}
::v-deep .el-step__icon {
width: 32px;
height: 32px;
}
}
.form {
width: calc(100% - 210px);
height: 263px;
.tips {
border-radius: 4px;
opacity: 1;
border: 1px solid #e5e5e5;
background: #fafafa;
color: #666666;
font-size: 13px;
line-height: 20px;
padding: 8px 16px;
margin-bottom: 41px;
}
.usage-limit {
margin-bottom: 70px;
position: relative;
.unit {
position: absolute;
right: 8px;
top: 6px;
color: #333333;
font-size: 14px;
line-height: 20px;
}
}
}
}
}
</style>
const CAR_STATUS = {
0: '库存中',
2: '待售',
3: '已预定',
5: '待拍卖',
6: '拍卖中',
1: '已售出',
4: '已交付',
7: '已退库',
}
/**
* key : value : level
* 0库存中1→
* 2待售2→
* 3已预定3→
* 5待拍卖4→
* 6拍卖中5→
* 1已售出6→
* 4已交付7→
* 7已退库8
*/
const CAR_STATUS_LEVEL = {
0: 1,
1: 6,
2: 2,
3: 3,
4: 7,
5: 4,
6: 5,
7: 8,
}
const CAR_STATUS_ORDER = [0, 2, 3, 5, 6, 1, 4, 7]
const CAR_STATUS_OPTIONS = CAR_STATUS_ORDER.map(key => {
return {
label: CAR_STATUS[key],
value: +key,
level: CAR_STATUS_LEVEL[key],
}
})
const CAR_STATUS_COLOR = {
0: '#fdb757',
1: '#8c8c8c',
2: '#eb4e4e',
3: '#2cca74',
4: '#2cca74',
5: '#eb4e4e',
6: '#fdb757',
7: '#8c8c8c',
}
const USAGE_TYPE = {
1: '非营运',
2: '营运',
3: '营转非'
}
const USAGE_TYPE_OPTIONS = Object.keys(USAGE_TYPE).map(key => {
return {
label: USAGE_TYPE[key],
value: key,
}
})
const OWNER_TYPE = {
1: '个人',
2: '单位',
}
const OWNER_TYPE_OPTIONS = Object.keys(OWNER_TYPE).map(key => {
return {
label: OWNER_TYPE[key],
value: key,
}
})
const HAS_ACCIDENT = {
0: '否',
1: '是',
}
const HAS_ACCIDENT_OPTIONS = Object.keys(HAS_ACCIDENT).map(key => {
return {
label: HAS_ACCIDENT[key],
value: key,
}
})
module.exports = {
CAR_STATUS,
CAR_STATUS_LEVEL,
CAR_STATUS_COLOR,
CAR_STATUS_OPTIONS,
USAGE_TYPE,
USAGE_TYPE_OPTIONS,
OWNER_TYPE,
OWNER_TYPE_OPTIONS,
HAS_ACCIDENT,
HAS_ACCIDENT_OPTIONS
}
\ No newline at end of file \ No newline at end of file
<template>
<baseDialog
:is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn"
>
<div
v-loading="loading"
class="form_div"
>
<div class="tipsDiv">
<div class="labelCla">付款单推送状态:</div>
<div class="tipsText flex">
<span
class="circle"
:style="{
background: PUSH_STATUS_COLOR[detailInfo.pushStatus]
}"
></span>
{{ detailInfo.pushStatusText }}
</div>
<template v-if="detailInfo.pushStatus == 2">
<div class="tipsError">
原因:【{{ detailInfo.failReason || '-' }}】
</div>
</template>
<template v-if="detailInfo.pushStatus != 1">
<div class="tipsBt">
<el-button
size="small"
type="primary"
@click="dataPush"
:loading="pushLoading"
>重推付款单</el-button>
</div>
</template>
</div>
<el-form
class="edit-sub-block"
label-width="150px"
:inline="true"
>
<div class="itemDiv">
<template v-for="(item,index) in formList">
<el-form-item
:label="`${item.label}:`"
class="halfItem"
:key="index"
>
{{ detailInfo[item.value] || "-" }}
</el-form-item>
</template>
</div>
<div class="itemDiv">
<el-form-item
label="回单状态:"
class="halfItem"
>
{{ detailInfo.receiptStatusText || "-" }}
<el-button
type="text"
class="receiptBtn"
@click="handleReceipt(detailInfo.receiptUrl)"
v-if="detailInfo.receiptUrl"
>查看回单</el-button>
</el-form-item>
</div>
</el-form>
<div class="div-title">操作日志</div>
<d2-table
ref="recordTable"
:has-page="false"
:table-data="detailInfo.logList"
:table-params="tableParams"
>
</d2-table>
<div class="block"></div>
</div>
</basedialog>
</template>
<script>
import { batchRepush, batchTransferDetail } from "@api/usedCarManagement"
import {
RECEIPT_STATUS,
PUSH_STATUS,
PUSH_STATUS_COLOR,
NB_TRANSFER_STATUS,
} from "../contant"
import dayjs from 'dayjs'
export default {
name: "DetailDialog",
components: {
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get () {
return this.visible
},
set (val) {
this.$emit('dialogClose', { flag: this.refreshFlag })
}
}
},
mounted () {
},
watch: {
visible: {
handler (val) {
if (val) {
this.loading = true
this.getDetail()
}
else {
this.detailInfo = {}
this.refreshFlag = false
}
},
immediate: true,
deep: true
}
},
data () {
return {
PUSH_STATUS_COLOR,
dialogConfig: {
setting: {
isShowFooter: true,
showClose: true,
appendToBody: false,
btnList: [],
hideConfirmBtn: true,
cancel_name: '返回'
},
config: {
title: "付款单详情",
width: "1080px"
}
},
detailInfo: {},
loading: true,
tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [{
label: '操作项',
prop: 'transferStatus',
formatter: (cellValue) => {
return {
0: '获取付款单',
1: '推送付款单',
2: '重推付款单'
}[cellValue.transferStatus] || '-'
}
}, {
label: '操作时间',
prop: 'createdDate',
formatter: (cellValue) => {
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
}, {
label: '操作结果',
prop: 'failReason'
}, {
label: '操作人',
prop: 'createdBy'
}]
},
refreshFlag: false,
formList: [
{
label: '车牌号',
value: 'licensePlate'
},
{
label: '车架号',
value: 'vin'
},
{
label: '付款单时间',
value: 'createdDate'
},
{
label: '推送财资时间',
value: 'pushNbTime'
},
{
label: '本方户名',
value: 'payName'
},
{
label: '本方账号',
value: 'payAcc'
},
{
label: '对方户名',
value: 'rcvName'
},
{
label: '对方账号',
value: 'rcvAcc'
},
{
label: '交易金额',
value: 'amtText'
},
{
label: '银行摘要',
value: 'bankSummary'
},
{
label: '支付方式',
value: 'paymentReason'
},
{
label: '评估单编号 ',
value: 'evalOrderNo'
},
{
label: '审批编号',
value: 'spNo'
},
{
label: '推送财资状态',
value: 'pushStatusText'
},
{
label: '财资付款状态',
value: 'nbTransferStatusText'
}
],
pushLoading: false
}
},
methods: {
getDetail () {
const params = { id: this.paramsObj.id }
batchTransferDetail(params).then(res => {
this.detailInfo = res
this.dataProcess(this.detailInfo)
this.loading = false
})
},
dataProcess (info) {
if (info) {
info.pushStatusText = PUSH_STATUS[info.pushStatus]
info.nbTransferStatusText = NB_TRANSFER_STATUS[info.nbTransferStatus]
info.receiptStatusText = RECEIPT_STATUS[info.receiptStatus]
info.amtText = info.amt != null ? `${info.amt.toLocaleString()}元` : '-'
}
},
dataPush () {
this.pushLoading = true
this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
const ids = [this.paramsObj.id]
batchRepush({ idList: ids }).then(res => {
this.notice.okTips()
this.getDetail()
this.refreshFlag = true
}).catch(err => {
this.pushLoading = false
})
}).catch(err => {
this.pushLoading = false
console.log(err)
})
},
handleReceipt (url) {
window.open(url)
}
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
}
.detail-content-warn {
::v-deep .el-dialog {
height: 70vh;
.el-dialog__body {
overflow-y: scroll;
border-bottom: 1px solid #e5e5e5;
padding-bottom: 24px;
}
}
.tipsText {
.circle {
display: inline-block;
border-radius: 50%;
width: 6px;
height: 6px;
margin-right: 8px;
vertical-align: middle;
}
}
.tipsError {
margin-left: 102px;
}
.tipsBt {
margin-left: auto;
}
.div-title {
display: flex;
align-items: center;
height: 50px;
font-size: 16px;
font-weight: 600;
color: #333333;
// margin: 10px 0 20px 0;
}
.el-icon-circle-close {
color: #ffffff;
}
.form_div {
max-height: 80vh;
color: #333333;
.tipsDiv {
display: flex;
align-items: center;
border-radius: 4px;
opacity: 1;
border: 1px solid #e5e5e5;
background: #fafafa;
padding: 16px 20px;
margin-bottom: 20px;
}
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
::v-deep .el-form-item__label {
padding: 0;
}
.el-form-item {
width: 100%;
// margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
flex-wrap: wrap;
.halfItem {
width: 50%;
margin: 0 !important;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
.edit-sub-block-two {
.el-form-item__label {
padding: 0;
}
.el-form-item {
// width: 300px;
margin: 0px;
}
}
}
.receiptBtn {
margin-left: 8px;
}
.block{
height: 24px;
}
}
</style>
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
<auth-button <auth-button
category="Button" category="Button"
:show-btn-ids="['9051401']" :show-btn-ids="['9051401']"
:loading="pushPayBillLoading"
/> />
</span> </span>
<span data-event-code="usedcar_payment_management_list_export"> <span data-event-code="usedcar_payment_management_list_export">
...@@ -97,10 +98,10 @@ ...@@ -97,10 +98,10 @@
<span <span
class="circle" class="circle"
:style="{ :style="{
background: CAR_STATUS_COLOR[scope.scope.carStatus] background: baseData[scope.columnsObj.colorKey][scope.scope[scope.prop]]
}" }"
></span> ></span>
{{ CAR_STATUS[scope.scope.carStatus] || "-" }} {{ baseData[scope.columnsObj.enumKey][scope.scope[scope.prop]] || "-" }}
</div> </div>
<div <div
slot="auth-button" slot="auth-button"
...@@ -123,13 +124,18 @@ ...@@ -123,13 +124,18 @@
</div> </div>
</d2-table> </d2-table>
</div> </div>
<detailDialog
:visible="detailDialogVisible"
:params-obj="detailDialogParams"
@dialogClose="closeDetailDialog"
/>
</d2-container> </d2-container>
</template> </template>
<script> <script>
import inputRange from '../pendingPaymentBill/components/inputRange' import inputRange from '../pendingPaymentBill/components/inputRange'
import { deepClone } from "@/common/util" import { deepClone } from "@/common/util"
import { getUsedCarPaymentList } from "@api/usedCarManagement" import { getUsedCarPaymentList, batchRepush } from "@api/usedCarManagement"
import { mapActions, mapState } from "vuex" import { mapActions, mapState } from "vuex"
import dayjs from "dayjs" import dayjs from "dayjs"
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin" import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
...@@ -144,14 +150,17 @@ import { ...@@ -144,14 +150,17 @@ import {
RECEIPT_STATUS_OPTIONS, RECEIPT_STATUS_OPTIONS,
NB_TRANSFER_STATUS_OPTIONS NB_TRANSFER_STATUS_OPTIONS
} from "./contant" } from "./contant"
import detailDialog from './components/detailDialog.vue'
export default { export default {
name: "usedCarPaymentManage", name: "usedCarPaymentManage",
mixins: [reportTrackPageMixin], mixins: [reportTrackPageMixin],
components: { components: {
inputRange, inputRange,
detailDialog,
}, },
data () { data () {
return { return {
pushPayBillLoading: false,
selectOption: [ selectOption: [
{ {
label: '付款单时间', label: '付款单时间',
...@@ -289,7 +298,7 @@ export default { ...@@ -289,7 +298,7 @@ export default {
maxlength: 50 maxlength: 50
}, },
{ {
label: "审批编号", label: "评估单编号",
name: "evalOrderNo", name: "evalOrderNo",
type: "input", type: "input",
isClear: true, isClear: true,
...@@ -305,8 +314,11 @@ export default { ...@@ -305,8 +314,11 @@ export default {
pushStatusOpts: deepClone(PUSH_STATUS_OPTIONS), //推送财资状态 pushStatusOpts: deepClone(PUSH_STATUS_OPTIONS), //推送财资状态
receiptStatusOpts: deepClone(RECEIPT_STATUS_OPTIONS), //回单状态 receiptStatusOpts: deepClone(RECEIPT_STATUS_OPTIONS), //回单状态
nbTransferStatusOpts: deepClone(NB_TRANSFER_STATUS_OPTIONS), //财资付款状态 nbTransferStatusOpts: deepClone(NB_TRANSFER_STATUS_OPTIONS), //财资付款状态
pushStatusColor: deepClone(PUSH_STATUS_COLOR),
nbTransferStatusColor: deepClone(NB_TRANSFER_STATUS_COLOR),
pushStatus: deepClone(PUSH_STATUS),
nbTransferStatus: deepClone(NB_TRANSFER_STATUS),
}, },
tableSearchForm: {},
getListApi: getUsedCarPaymentList, getListApi: getUsedCarPaymentList,
searchFormSearch: {}, searchFormSearch: {},
tableParams: { tableParams: {
...@@ -326,22 +338,22 @@ export default { ...@@ -326,22 +338,22 @@ export default {
{ {
label: "车架号", label: "车架号",
prop: "vin", prop: "vin",
minWidth: 120 minWidth: 160
}, },
{ {
label: "付款单时间", label: "付款单时间",
prop: "createdDate", prop: "createdDate",
minWidth: 120 minWidth: 160
}, },
{ {
label: "本方户名", label: "本方户名",
prop: "payName", prop: "payName",
minWidth: 120 minWidth: 160
}, },
{ {
label: "本方账号", label: "本方账号",
prop: "payAcc", prop: "payAcc",
minWidth: 120 minWidth: 160
}, },
{ {
label: "交易金额", label: "交易金额",
...@@ -354,25 +366,25 @@ export default { ...@@ -354,25 +366,25 @@ export default {
{ {
label: "对方户名", label: "对方户名",
prop: "rcvName", prop: "rcvName",
minWidth: 120 minWidth: 160
}, },
{ {
label: "对方账号", label: "对方账号",
prop: "rcvAcc", prop: "rcvAcc",
minWidth: 120 minWidth: 160
}, },
{ {
label: "推送财资时间", label: "推送财资时间",
prop: "pushNbTime", prop: "pushNbTime",
minWidth: 120 minWidth: 160
}, },
{ {
label: "推送财资状态", label: "推送财资状态",
prop: "pushStatus", prop: "pushStatus",
minWidth: 120, minWidth: 120,
addHtml: "statusHtml", addHtml: "statusHtml",
enum: PUSH_STATUS, colorKey: 'pushStatusColor',
color: PUSH_STATUS_COLOR enumKey: 'pushStatus'
}, },
{ {
label: "审批编号", label: "审批编号",
...@@ -394,8 +406,8 @@ export default { ...@@ -394,8 +406,8 @@ export default {
prop: "nbTransferStatus", prop: "nbTransferStatus",
minWidth: 120, minWidth: 120,
addHtml: "statusHtml", addHtml: "statusHtml",
enum: NB_TRANSFER_STATUS, colorKey: 'nbTransferStatusColor',
color: NB_TRANSFER_STATUS_COLOR enumKey: 'nbTransferStatus'
}, },
{ {
label: "回单状态", label: "回单状态",
...@@ -412,7 +424,9 @@ export default { ...@@ -412,7 +424,9 @@ export default {
}, },
] ]
}, },
track_event_code: "vehicle_management" track_event_code: "used_car_payment_management",
detailDialogVisible: false,
detailDialogParams: {}
} }
}, },
computed: { computed: {
...@@ -484,13 +498,68 @@ export default { ...@@ -484,13 +498,68 @@ export default {
return params return params
}, },
handleDetail (row) { handleDetail (row) {
console.log('详情') this.detailDialogParams = row
}, this.detailDialogVisible = true
handlePushPayBill (row) { },
console.log('批量重推') handlePushPayBill () {
this.pushPayBillLoading = true
var selectedData = []
if (this.$refs.usedCarPaymentManageTable.mutiSelectArr.contentIndex) {
selectedData = this.$refs.usedCarPaymentManageTable.mutiSelectArr.contentIndex
}
this.handleBatchRepush_commit(selectedData)
},
handleBatchRepush_commit (selectedData) {
if (!selectedData?.length) {
this.pushPayBillLoading = false
this.$message({
message: "请选择要重推的明细",
type: "warning",
showClose: true
})
return false
}
const flag = selectedData.some((item) => {
return item.status == 1 // 已推送成功的无需再推
})
if (flag) {
this.$message({
message: "所选条件包含不能重推数据,请修改后重试",
type: "warning",
showClose: true
})
this.pushPayBillLoading = false
return false
}
const ids = selectedData.map((item) => {
return item.id
})
this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.pushPayBillLoading = false
batchRepush({ idList: ids }).then(res => {
this.notice.okTips()
this.$refs.usedCarPaymentManageTable.refreshTable()
})
}).catch(err => {
this.pushPayBillLoading = false
console.log(err)
})
}, },
handleReceipt (row) { handleReceipt (row) {
console.log('回单') if (row.receiptUrl) {
window.open(row.receiptUrl)
} else {
this.$message({
message: "暂无回单,请稍后再试",
type: "warning",
showClose: true
})
}
}, },
filterIds () { filterIds () {
let ids = [] let ids = []
...@@ -511,7 +580,16 @@ export default { ...@@ -511,7 +580,16 @@ export default {
...this.getParams() ...this.getParams()
}, },
ids = this.filterIds() ids = this.filterIds()
if (ids.length) params.idsStr = ids.join(",") if (ids.length) {
ids.map((e, index) => {
params[`idList[${index}]`] = e
})
}
Object.keys(params).forEach((key) => {
if (params[key] == null || params[key] == "") {
delete params[key]
}
})
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
{ {
...@@ -522,6 +600,10 @@ export default { ...@@ -522,6 +600,10 @@ export default {
} }
] ]
this.actionSetDownloadList({ list, type: "dowloadList" }) this.actionSetDownloadList({ list, type: "dowloadList" })
},
closeDetailDialog (obj) {
this.detailDialogVisible = false
if (obj.flag) this.$refs.usedCarPaymentManageTable.refreshTable(true, true)
} }
} }
} }
...@@ -556,7 +638,7 @@ export default { ...@@ -556,7 +638,7 @@ export default {
} }
::v-deep .el-range-editor.is-active, ::v-deep .el-range-editor.is-active,
::v-deep .el-range-editor.is-active:hover { ::v-deep .el-range-editor.is-active:hover {
border-left-color: #2A58AD; border-left-color: #2a58ad;
} }
} }
</style> </style>
export const busTypeOpt = [
{
confId: "1",
confLabel: "1.1 精品升级"
},
{
confId: "2",
confLabel: "2.1权益升级"
},
{
confId: "3",
confLabel: "2.2续保积分"
},
{
confId: "4",
confLabel: "2.3延保升级"
},
{
confId: "5",
confLabel: "6.1二手车"
}
]
export const cooperModeOpt = [
{
confId: "1",
confLabel: "直营"
},
{
confId: "2",
confLabel: "服务商"
}
]
export const flowSituateOpt = [
{
confId: "1",
confLabel: "30以下"
},
{
confId: "2",
confLabel: "30-50"
},
{
confId: "3",
confLabel: "50-80"
},
{
confId: "4",
confLabel: "80-120"
},
{
confId: "5",
confLabel: "120以上"
}
]
<!-- 销售管理 - 组织架构管理 - 列表 -->
<template>
<div>
<d2-container>
<div class="d2-container-content" style="margin-top: 0;">
<d2-table ref="organizeTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
</d2-table>
</div>
</d2-container>
</div>
</template>
<script>
import { busTypeOpt, cooperModeOpt, flowSituateOpt } from '../constant/baseData'
import { regionPage } from '@api/salesManagement'
export default {
name: 'Customer',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
getListApi: regionPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: true,
tableColumns: [{
label: '创建时间',
prop: 'createdDate',
width: '150px'
}, {
label: '大区名称',
prop: 'regionName'
}, {
label: '创建人',
prop: 'createdBy'
}, {
label: '大区经理',
prop: 'userList',
formatter: (cellValue) => {
// 人员类型(1.大区经理,2.销售人员)
return cellValue.userList.length ? cellValue.userList.filter(item => item.userType == 1).map(item => item.userName).join(',') : '--'
}
}, {
label: '销售人员',
prop: 'userList',
formatter: (cellValue) => {
// 人员类型(1.大区经理,2.销售人员)
return cellValue.userList.length ? cellValue.userList.filter(item => item.userType == 2).map(item => item.userName).join(',') : '--'
}
}]
},
baseData: {
tmplTypeList: [],
provinceInfoList: [],
cityList: [],
brandList: [],
busTypeOpt: busTypeOpt,
cooperModeOpt: cooperModeOpt,
flowSituateOpt: flowSituateOpt
}
}
},
mounted() {
},
methods: {
handleEdit(row = {}) {
const editType = row?.id ? 'edit' : 'add'
this.$router.push({
name: "editOrganize",
query: {
editType: editType,
id: row?.id || ''
}
})
}
}
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
.fields-txt {
width: 346px;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!