Commit 6021ffa4 by zhangxw

Merge branch 'SAAS+V4.47.2-1218' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.47.2-1218
2 parents 1c95929c fc373bd5
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.smartcarlife.api."
// 交易明细列表
export function nbcbAccDetailPage(data) {
data.method = `${path}nbcb.acc.detail.page`
return request(data, RequestMethods.POST)
}
// 财资数据筛选项列表
export function nbcbAccDetailConfig(data) {
data.method = `${path}nbcb.acc.detail.config`
return request(data, RequestMethods.POST)
}
// 交易明细重取
export function nbcbAccDetailRefetch(data) {
data.method = `${path}nbcb.acc.detail.refetch`
return request(data, RequestMethods.POST)
}
// 批量同步交易明细
export function nbcbAccDetailBatchSync(data) {
data.method = `${path}nbcb.acc.detail.batch.sync`
return request(data, RequestMethods.POST)
}
// 交易明细详情
export function nbcbAccDetail(data) {
data.method = `${path}nbcb.acc.detail`
return request(data, RequestMethods.POST)
}
// 交易明细关联回单pdf
export function nbcbReceiptPdfUrl(data) {
data.method = `${path}nbcb.receipt.pdf.url`
return request(data, RequestMethods.POST)
}
......@@ -987,6 +987,31 @@ export const staffLevelList = [
// 所属业务
export const staffSceneLabelList = [
{ confId: '1', confValue: '轻改' },
{ confId: '0', confValue: '会员权益/升级' }
{ confId: "1", confValue: "轻改" },
{ confId: "0", confValue: "会员权益/升级" }
]
// 财资数据 收支标志
export const cdSignOpt = [
{ confId: 0, confValue: "收入" },
{ confId: 1, confValue: "支出" }
]
// 财资数据 同步状态
export const jdSyncOpt = [
{ confId: 0, confValue: "失败" },
{ confId: 1, confValue: "成功" }
]
// 财资数据 操作项
export const operationTypeOpt = [
{ confId: 1, confValue: "重推财资数据" },
{ confId: 2, confValue: "推送财资数据" },
{ confId: 3, confValue: "获取财资数据" }
]
// 财资数据 操作项
export const operationResultOpt = [
{ confId: "Y", confValue: "成功" },
{ confId: "N", confValue: "失败" }
]
......@@ -21,13 +21,13 @@ export const routerName = {
},
auth: [
{
authId: '9050103',
parentId: '90501',
label: '下载对账单',
icon: 'download',
category: 'Button',
type: 'primary',
handle: 'downloadAccount'
authId: "9050103",
parentId: "90501",
label: "下载对账单",
icon: "download",
category: "Button",
type: "primary",
handle: "downloadAccount"
},
{
authId: "9050101",
......@@ -292,5 +292,54 @@ export const routerName = {
}
],
component: _import("financeManage/balanceStatistics/index")
},
90509: {
path: "/theAssetData",
name: "theAssetData",
meta: {
title: "财资数据",
authId: "90509",
parentId: "905",
cache: false
},
auth: [
{
authId: "9050901",
parentId: "90509",
label: "重取明细",
category: "Button",
type: "primary",
handle: "handleRefetchDetail"
},
{
authId: "9050902",
parentId: "90509",
label: "批量重推",
category: "Button",
type: "primary",
handle: "handleBatchRepush"
},
{
authId: "9050903",
parentId: "90509",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9050904",
parentId: "90509",
label: "详情",
handle: "handleDetail"
},
{
authId: "9050905",
parentId: "90509",
label: "回单",
handle: "handleReceipt"
}
],
component: _import("financeManage/theAssetData/index")
}
}
......@@ -44,7 +44,6 @@ import { saveFollowRecord } from '@api/earlyWarningManager'
import { deepClone } from '@/common/util'
import { findMerchantStaffList } from '@api/index'
import { afterPickerOptions_timeChoose } from '@/common/format'
// import { baseConfig } from '@/main'
export default {
name: 'HandleDialog',
data() {
......@@ -65,10 +64,8 @@ export default {
},
handleFormRef: 'handleFormRef',
formRules: {
// followStatus: [{ required: true, message: '请选择处理结果', trigger: 'change' }],
followNotes: [{ required: true, message: '请输入跟进内容', trigger: 'blur' }],
nextFollowerId: [{ required: true, message: '请选择下次跟进人', trigger: 'change' }]
// nextFollowerTime: [{ required: true, message: '请选择下次跟进时间', trigger: 'change' }]
},
editFormData: [{
label: '处理结果',
......@@ -161,11 +158,6 @@ export default {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', deepClone(this.baseData[item.optionsName]))
if (this[formName][index].label == '业务场景') { // 业务场景默认选中第一项
console.log(this.baseData[item.optionsName])
this.infoForm.sceneType = this.baseData[item.optionsName][0].confId
}
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
......@@ -184,13 +176,6 @@ export default {
this[formName][idx].isHide = isHide
},
// showOrHideAttr_transferType(formName, addHtml, isHide) {
// const idx = this[formName].findIndex(item => item.addHtml == addHtml)
// console.log('idx', idx)
// console.log('this[formName][idx].isHide', this[formName][idx].isHide)
// this[formName][idx].isHide = isHide
// },
// 获取全部员工 过滤出服务商负责人可选数据
findMerchantStaffList() {
return new Promise((resolve, reject) => {
......@@ -198,13 +183,11 @@ export default {
// 服务商负责人(根据角色名过滤)
const arr = []
res?.map(val => {
// if (val.roleName == baseConfig.roleName) {
arr.push({
userId: val.uuid,
userName: val.staffName,
userPhone: val.staffPhone
})
// }
})
this.baseData.followUpPersonOpt = arr
this.getOptionsList('editFormData', false)
......
......@@ -496,28 +496,6 @@ export default {
handleExport() {
var params = this.searchForm
// if (params.statuses.length > 0) {
// const statuses = `statuses[0]`
// params[statuses] = params.statuses[0]
// delete params.statuses
// }
// 去除为null的值
// for (const key in params) {
// if (params[key] === null || params[key] === '') {
// delete params[key]
// }
// }
// params.method = 'dj.api.smartcarlife.warningmsg.warningMsgDetailListWithPageExport'
// const list = [
// ...this.dowloadList,
// {
// name: '员工预警明细',
// exportParam: JSON.stringify(params),
// status: 'waiting',
// timeid: new Date().getTime()
// }
// ]
// this.actionSetDownloadList({ list, type: 'dowloadList' })
warningMsgDetailListWithPageExport(params).then((res) => {
res && downLoadFile(res)
......@@ -529,13 +507,6 @@ export default {
this.detailVisible = true
},
// dialogClose(flag) {
// this.categoryVisible = !this.categoryVisible
// if (flag) {
// this.$refs.detailListTable.refreshTable()
// }
// },
handleDeal(row) {
this.recordInfo = row
this.handleVisible = true
......
......@@ -44,7 +44,6 @@ import { saveFollowRecord } from '@api/earlyWarningManager'
import { deepClone } from '@/common/util'
import { findMerchantStaffList } from '@api/index'
import { afterPickerOptions_timeChoose } from '@/common/format'
// import { baseConfig } from '@/main'
export default {
name: 'HandleDialog',
data() {
......@@ -65,10 +64,8 @@ export default {
},
handleFormRef: 'handleFormRef',
formRules: {
// followStatus: [{ required: true, message: '请选择处理结果', trigger: 'change' }],
followNotes: [{ required: true, message: '请输入跟进内容', trigger: 'blur' }],
nextFollowerId: [{ required: true, message: '请选择下次跟进人', trigger: 'change' }]
// nextFollowerTime: [{ required: true, message: '请选择下次跟进时间', trigger: 'change' }]
},
editFormData: [{
label: '处理结果',
......@@ -160,11 +157,6 @@ export default {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', deepClone(this.baseData[item.optionsName]))
if (this[formName][index].label == '业务场景') { // 业务场景默认选中第一项
console.log(this.baseData[item.optionsName])
this.infoForm.sceneType = this.baseData[item.optionsName][0].confId
}
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
......@@ -183,13 +175,6 @@ export default {
this[formName][idx].isHide = isHide
},
// showOrHideAttr_transferType(formName, addHtml, isHide) {
// const idx = this[formName].findIndex(item => item.addHtml == addHtml)
// console.log('idx', idx)
// console.log('this[formName][idx].isHide', this[formName][idx].isHide)
// this[formName][idx].isHide = isHide
// },
// 获取全部员工 过滤出服务商负责人可选数据
findMerchantStaffList() {
return new Promise((resolve, reject) => {
......@@ -197,13 +182,11 @@ export default {
// 服务商负责人(根据角色名过滤)
const arr = []
res?.map(val => {
// if (val.roleName == baseConfig.roleName) {
arr.push({
userId: val.uuid,
userName: val.staffName,
userPhone: val.staffPhone
})
// }
})
this.baseData.followUpPersonOpt = arr
this.getOptionsList('editFormData', false)
......
......@@ -80,7 +80,6 @@
</template>
<script>
// import { mapActions, mapState } from 'vuex'
import { Util, deepClone, downLoadFile } from '@/common/util'
import detailDialog from './components/detailDialog'
import handleDialog from './components/handleDialog'
......@@ -352,9 +351,6 @@ export default {
handleDialog
},
computed: {
// ...mapState({
// dowloadList: (state) => state.d2admin.user.dowloadList
// })
},
mounted() {
console.log('this.paramsObj', this.paramsObj)
......@@ -368,11 +364,6 @@ export default {
},
methods: {
// ...mapActions({
// get: 'd2admin/base/get',
// close: 'd2admin/page/close'
// }),
// ...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.findAllData(2)
......@@ -386,7 +377,6 @@ export default {
if (this.searchForm.warnCycle) {
this.searchForm.warningStartDate = Util.dateFormate(this.searchForm.warnCycle[0], 'YYYY-MM-DD')
this.searchForm.warningEndDate = Util.dateFormate(this.searchForm.warnCycle[1], 'YYYY-MM-DD')
// delete this.searchForm.warnCycle
} else {
delete this.searchForm.warningStartDate
delete this.searchForm.warningEndDate
......@@ -394,7 +384,6 @@ export default {
if (this.searchForm.createTime) {
this.searchForm.startDate = Util.dateFormate(this.searchForm.createTime[0], 'YYYY-MM-DD')
this.searchForm.endDate = Util.dateFormate(this.searchForm.createTime[1], 'YYYY-MM-DD')
// delete this.searchForm.createTime
} else {
delete this.searchForm.startDate
delete this.searchForm.endDate
......@@ -474,29 +463,6 @@ export default {
handleExport() {
var params = this.searchForm
// if (params.statuses.length > 0) {
// const statuses = `statuses[0]`
// params[statuses] = params.statuses[0]
// delete params.statuses
// }
// 去除为null的值
// for (const key in params) {
// if (params[key] === null || params[key] === '') {
// delete params[key]
// }
// }
// params.method = 'dj.api.smartcarlife.warningmsg.warningMsgDetailListWithPageExport'
// const list = [
// ...this.dowloadList,
// {
// name: '员工预警明细',
// exportParam: JSON.stringify(params),
// status: 'waiting',
// timeid: new Date().getTime()
// }
// ]
// this.actionSetDownloadList({ list, type: 'dowloadList' })
warningMsgDetailListWithPageExport(params).then((res) => {
res && downLoadFile(res)
})
......@@ -507,13 +473,6 @@ export default {
this.detailVisible = true
},
// dialogClose(flag) {
// this.categoryVisible = !this.categoryVisible
// if (flag) {
// this.$refs.detailListTable.refreshTable()
// }
// },
handleDeal(row) {
this.recordInfo = row
this.handleVisible = true
......
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<div class="tipsDiv"
v-if="detailInfo.jdSync == 1">
<div class="tipsText">
<img src="../image/info-circle-fill.png"
class="imgCla">财资数据推送金蝶系统成功
</div>
</div>
<div class="tipsDiv"
v-if="detailInfo.jdSync == 0">
<div class="tipsText">
<img src="../image/icon.png"
class="imgCla">财资数据推送金蝶系统失败
</div>
<div class="tipsError">原因:【{{ detailInfo.failReason ? detailInfo.failReason : "-" }}】
</div>
<div class="tipsBt">
<el-button size="small"
type="primary"
@click="dataPush">数据重推</el-button>
</div>
</div>
<el-form class="edit-sub-block"
label-width="150px"
:inline="true">
<div class="itemDiv">
<el-form-item label="交易流水号:"
class="halfItem">
{{ detailInfo.serialId ? detailInfo.serialId : "-" }}
</el-form-item>
<el-form-item label="交易时间:"
class="halfItem">
{{ detailInfo.transTime
? detailInfo.transTime
: "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="本方户名:"
class="halfItem">
{{ detailInfo.accName ? detailInfo.accName : "-" }}
</el-form-item>
<el-form-item label="本方账号:"
class="halfItem">
{{
detailInfo.bankAcc ? detailInfo.bankAcc : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="本方开户行:"
class="halfItem">
{{
detailInfo.bankName ? detailInfo.bankName : "-"
}}
</el-form-item>
<!-- <el-form-item label="所属销售:"
class="halfItem"
:title="detailInfo.salesperson">
{{ detailInfo.salesperson ? (detailInfo.salesperson.length > 15 ? (detailInfo.salesperson.slice(0, 15) + '...') : detailInfo.salesperson) : '' }}
</el-form-item> -->
</div>
<div class="itemDiv">
<el-form-item label="交易金额:"
class="halfItem">
{{ detailInfo.amt ? detailInfo.amt.toLocaleString() : "-" }}
</el-form-item>
<el-form-item label="账户余额:"
class="halfItem">
{{
detailInfo.bal ? detailInfo.bal.toLocaleString() : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="对方户名:"
class="halfItem">
{{ detailInfo.oppAccName ? detailInfo.oppAccName : "-" }}
</el-form-item>
<el-form-item label="对方账号:"
class="halfItem">
{{
detailInfo.oppAccNo ? detailInfo.oppAccNo : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="对方开户行:"
class="halfItem">
{{ detailInfo.oppAccBank ? detailInfo.oppAccBank : "-" }}
</el-form-item>
<el-form-item label="对方联行号:"
class="halfItem">
{{
detailInfo.oppBankNo ? detailInfo.oppBankNo : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="币种:"
class="halfItem">
{{ detailInfo.curCode ? detailInfo.curCode : "-" }}
</el-form-item>
<el-form-item label="交易备注:"
class="halfItem">
{{
detailInfo.postScript ? detailInfo.postScript : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="收支标志:"
class="halfItem">
{{ detailInfo.cdSignShow }}
</el-form-item>
<el-form-item label="现转标志:"
class="halfItem">
{{
detailInfo.cashTfrFlg ? detailInfo.cashTfrFlg : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="集团内交易:"
class="halfItem">
{{ detailInfo.groupTrans ? detailInfo.groupTrans : "-" }}
</el-form-item>
<el-form-item label="资金划拨:"
class="halfItem">
{{
detailInfo.capitalTrans ? detailInfo.capitalTrans : "-"
}}
</el-form-item>
</div>
</el-form>
<div class="div-title">操作日志</div>
<div class="d2-container-content">
<d2-table ref="recordTable"
:has-page="false"
:table-data="detailInfo.logList"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
</d2-table>
</div>
</div>
</div>
</basedialog>
</div>
</template>
<script>
import { nbcbAccDetail, nbcbAccDetailBatchSync } from '@api/theAssetData'
import { Util, deepClone } from "@/common/util"
import { cdSignOpt, operationResultOpt, operationTypeOpt } from '@/common/constants.js'
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("update:visible", val)
console.log('this.refreshFlag', this.refreshFlag)
this.$emit('dialogClose', { flag: this.refreshFlag })
}
}
},
mounted() {
this.getDetail()
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "详情",
width: "1080px"
}
},
detailInfo: {},
loading: true,
searchForm: {
id: ''
},
searchFormSearch: {},
tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [{
label: '操作项',
prop: 'operationType',
formatter: (cellValue) => {
return this.operationTypeOpt.find(item => item.confId === cellValue.operationType)?.confValue || '--'
}
}, {
label: '操作时间',
prop: 'createdDate'
}, {
label: '操作结果',
prop: 'operationResult',
// width: '100',
formatter: (cellValue) => {
return this.operationResultOpt.find(item => item.confId === cellValue.operationResult)?.confValue || '--'
},
className: (cellValue) => {
return {
N: 'redSpot',
Y: 'greenSpot'
}[cellValue.operationResult]
}
}, {
label: '操作人',
prop: 'createdBy'
// width: '100'
}]
},
cdSignOpt: deepClone(cdSignOpt),
operationResultOpt: deepClone(operationResultOpt),
operationTypeOpt: deepClone(operationTypeOpt),
refreshFlag: false
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
// this.searchForm.msgId = this.paramsObj.id
// this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
getDetail() {
var params = { id: this.paramsObj.id }
nbcbAccDetail(params).then(res => {
this.detailInfo = res
this.dataProcess(this.detailInfo)
this.loading = false
})
},
dataProcess(info) {
if (info) {
info.cdSignShow = info.cdSign ? this.cdSignOpt.find(item => item.confId + '' === info.cdSign)?.confValue : '-'
}
},
// handleDetailClose() {
// console.log('this.refreshFlag', this.refreshFlag)
// if (this.refreshFlag) {
// this.$emit('dialogClose', this.refreshFlag)
// } else {
// this.$emit('dialogClose')
// }
// },
dataPush() {
this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
const ids = [this.paramsObj.id]
nbcbAccDetailBatchSync({ ids: ids }).then(res => {
this.notice.okTips()
this.getDetail()
this.refreshFlag = true
})
}).catch(err => {
console.log(err)
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.div-title {
width: 1040px;
height: 30px;
border-bottom: 1px solid #e5e5e5;
font-size: 16px;
font-weight: 600;
color: #333333;
margin: 10px 0 20px 0;
}
.el-icon-circle-close {
color: #ffffff;
}
.examine-record {
box-sizing: border-box;
width: 1040px;
min-height: 157px;
// border: 1px solid #e5e5e5;
border-radius: 4px;
background: #fafafa;
padding: 16px 20px;
.title {
// width: 64px;
height: 23px;
font-family: PingFangSC-Medium;
font-weight: 600;
color: #333333;
font-size: 16px;
text-align: left;
}
.title .edit-btn {
color: #185efe;
font-size: 14px;
margin-left: 8px;
font-weight: 400;
}
.txt-bold {
font-weight: bold;
}
.blueTxt {
color: #185efe;
}
.redTxt {
color: #eb4e4e;
}
.orangedot {
width: 6px;
height: 6px;
background: #f47f13;
border-radius: 6px;
display: inline-block;
}
.greendot {
width: 6px;
height: 6px;
background: #4aca74;
border-radius: 6px;
display: inline-block;
}
.reddot {
width: 6px;
height: 6px;
background: #eb4e4e;
border-radius: 6px;
display: inline-block;
}
.record-div {
margin: 16px 0;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #666666;
letter-spacing: 0;
.record-div-d {
margin-top: 10px;
}
.span-txt-one {
display: inline-block;
margin-left: 14px;
width: 90px;
height: 21px;
}
.span-txt-two {
margin-left: 40px;
}
.greenSp {
color: #4aca74;
}
.redSp {
color: #eb4e4e;
}
}
}
.form_div {
color: #333333;
.tipsDiv {
display: flex;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
flex-direction: column;
margin: 20px 0 34px 0;
.tipsText {
display: flex;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
font-weight: 600;
font-size: 16px;
color: #000000e6;
}
.imgCla {
margin-right: 8px;
}
.tipsError {
font-size: 12px;
color: #eb4e4e;
margin-top: 8px;
}
.tipsBt {
margin-top: 10px;
}
}
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.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;
}
}
.edit-sub-block-two {
.el-form-item__label {
padding: 0;
}
.el-form-item {
// width: 300px;
margin: 0px;
}
}
.busi-info {
box-sizing: border-box;
width: 890px;
border-radius: 4px;
border: 1px solid #e5e5e5;
padding: 6px 0;
color: #333333;
font-size: 14px;
margin-bottom: 14px;
.info-row {
height: 20px;
line-height: 20px;
margin-bottom: 16px;
}
.info-row:last-child {
margin-bottom: 0;
}
.info-item {
display: inline-block;
width: 50%;
height: 20px;
line-height: 20px;
margin-bottom: 6px;
.item-label {
display: inline-block;
width: 150px;
color: #666666;
text-align: right;
}
}
}
}
}
</style>
<style >
.detailDialog-tooltip-width {
max-width: 500px;
}
</style>
<template>
<div class="range">
<div :class="[
' el-date-editor',
'el-range-editor',
'el-input__inner',
'el-date-editor--daterange',
'el-range-editor--small',
pickerVisible ? 'is-active' : ''
]"
@click="handleRangeClick"
@mouseleave="showClose = false"
@mousemove="handleMove"
ref="reference">
<template v-if="infinity">
<el-input-number class="el-range-input hide-btn"
:placeholder="startPlaceholder"
v-model="userInput[0]"
@blur="handleBlur(0)"></el-input-number>
<span class="el-range-separator">至</span>
<el-input-number class="el-range-input hide-btn"
:placeholder="endPlaceholder"
v-model="userInput[1]"
@blur="handleBlur(1)"></el-input-number>
</template>
<template v-else>
<el-input v-model="userInput[0]"
:placeholder="startPlaceholder"
@blur="handleBlur(0)"
@input="handleStartInput"
class="el-range-input"></el-input>
<span class="el-range-separator">至</span>
<el-input v-model="userInput[1]"
:placeholder="endPlaceholder"
@input="handleEndInput"
@focus="handleFocus"
@blur="handleBlur(1)"
class="el-range-input"></el-input>
</template>
<i v-show="showClose"
@click="handleClickIcon"
class="el-icon-circle-close"></i>
</div>
<!----><!---->
</div>
</template>
<script>
import { limitPrice } from '@/common/format'
export default {
data() {
return {
pickerVisible: false,
showClose: false,
userInput: this.displayValue,
oldVal: {
startInput: '',
endInput: ''
}
}
},
props: {
displayValue: Array,
placeholder: String,
startPlaceholder: String,
endPlaceholder: String,
infinity: Boolean
},
watch: {
displayValue(val) {
if (val) {
this.userInput = val
}
}
},
methods: {
handleStartInput(event) {
// const isNumber = /^\d+$/.test(event)
// if (!isNumber) {
// event = null
// }
// if (event > 100) event = 100
// this.userInput[0] = event
this.userInput[0] = limitPrice(event, this.oldVal.startInput, 20, 2)
this.oldVal.startInput = this.userInput[0]
},
handleEndInput(event) {
// const isNumber = /^\d+$/.test(event)
// if (!isNumber) {
// event = null
// }
// if (event > 100) event = 100
// this.userInput[1] = event
this.userInput[1] = limitPrice(event, this.oldVal.endInput, 20, 2)
this.oldVal.endInput = this.userInput[1]
},
handleClickIcon(event) {
this.userInput[0] = null
this.userInput[1] = null
},
valueIsEmpty() {
const val = this.userInput
if (Array.isArray(val)) {
for (let i = 0, len = val.length; i < len; i++) {
if (val[i]) {
return false
}
}
}
return true
},
handleRangeClick() {
this.pickerVisible = true
},
handleMove() {
if (this.valueIsEmpty()) {
this.showClose = false
} else {
this.showClose = true
}
},
handleFocus() {
if (!this.pickerVisible) {
this.pickerVisible = true
this.$emit("focus", this)
}
},
handleBlur(index) {
this.pickerVisible = false
this.contrastValue()
},
contrastValue() {
const val = this.userInput
if (Array.isArray(val)) {
if (+val[0] > +val[1]) {
val[1] = null
}
}
}
}
}
</script>
<style scoped lang="scss">
.range {
.el-range-input {
::v-deep {
input {
border: 0;
margin-top: -2px;
height: 28px;
}
}
}
.el-icon-circle-close {
color: #dcdfe6;
margin-left: 10px;
}
.hide-btn {
::v-deep {
span {
display: none;
}
input {
padding: 0;
}
}
}
}
</style>
<!-- 重取明细 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="dialogShow"
class="accountDailog"
@handleClick="handleAddConfirm">
<div class="tipFont">重新获取银行明细与回单,需等待15分钟,且接口限制单次获取上限1000条,请谨慎选择筛选条件!</div>
<div class="add-dialog">
<glsx-combi-form class="edit-form-container"
ref="editFormRef"
label-width="150px"
default-width="400px"
:form-ref="handleFormRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules">
</glsx-combi-form>
</div>
<!-- <span class="dialog-footer">
<el-button size="small"
@click="dialogShow = false">取 消</el-button>
<el-button size="small"
type="primary"
@click="handleSelect">确 定</el-button>
</span> -->
</baseDialog>
</template>
<script>
import { nbcbAccDetailConfig, nbcbAccDetailRefetch } from '@api/theAssetData'
import { Util, deepClone } from '@/common/util'
export default {
name: 'RefetchDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
accNameList: [],
bankType: '',
bankAcc: '',
transactionTime: ''
},
dialogConfig: {
title: '重取明细',
width: '720px'
// isShowFooter: false
},
config: {
// isShowFooter: false
},
handleFormRef: 'handleFormRef',
formRules: {
transactionTime: [{ required: true, message: '请选择交易时间', trigger: 'change' }],
},
editFormData: [{
label: '单位名称',
name: 'accNameList',
type: 'select',
isClear: true,
multiple: true,
collapseTags: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'accNameList'
}, {
label: '银行类别',
name: 'bankType',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'bankTypeList'
}, {
label: '本方账号',
name: 'bankAcc',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'bankAccList'
}, {
label: '交易时间',
name: 'transactionTime',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}],
baseData: {
accNameList: [],
bankTypeList: [],
bankAccList: []
}
}
},
props: {
visible: {
type: Boolean,
default: false
}
// paramsObj: {
// type: Object,
// default: {}
// }
},
watch: {
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'visible' })
}
}
},
mounted() {
this.nbcbAccDetailConfig()
// this.getOptionsList()
},
methods: {
getOptionsList() {
this.editFormData.forEach((item, index) => {
if (item.type === 'select') {
// if (
// this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部' && item.label != '单位名称'
// ) {
// const temp = {}
// temp[this.showFormData[index].optionId] = ''
// temp[this.showFormData[index].optionLabel] = '全部'
// this.baseData[item.optionsName].unshift(temp)
// }
this.$set(
this.editFormData[index],
'optionList',
this.baseData[item.optionsName]
)
}
})
},
// 财资数据筛选项列表
nbcbAccDetailConfig() {
nbcbAccDetailConfig({}).then(res => {
for (var key in res) {
if (this.baseData[key]) {
this.baseData[key] = res[key]
this.baseData[key] = this.baseData[key].map(item => {
return {
confId: item,
confValue: item
}
})
}
}
this.getOptionsList()
})
},
handleAddConfirm() {
this.$refs.editFormRef.$refs[this.handleFormRef].validate(valid => {
if (valid) {
var params = deepClone(this.infoForm)
if (params.accNameList.length == 0 && params.bankType == '' && params.bankAcc == '') {
// this.notice.warningTips('请选择除日期外的任意一个或多个条件!')
this.$message({
message: "请选择除日期外的任意一个或多个条件!",
type: "warning",
showClose: true
})
return
}
if (params.transactionTime) {
params.transTimeStart = Util.dateFormate(params.transactionTime[0], 'YYYY-MM-DD')
params.transTimeEnd = Util.dateFormate(params.transactionTime[1], 'YYYY-MM-DD')
} else {
delete params.transTimeStart
delete params.transTimeEnd
}
this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
nbcbAccDetailRefetch(params).then(res => {
this.notice.okTips()
this.dialogShow = true
})
}).catch(err => {
console.log(err)
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.add-dialog {
margin: 20px 0;
.reject-input {
::v-deep .el-textarea__inner {
height: 70px;
}
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
.down-cla {
width: 56px;
height: 32px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #185efe;
text-align: right;
line-height: 32px;
padding-left: 8px;
// cursor: pointer;
}
.upload-file {
::v-deep .el-upload-dragger {
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
width: 300px;
height: 160px;
background: #f7f7f7;
.el-icon-upload {
margin: 0;
}
.el-upload__text {
font-size: 14px;
color: #000000;
}
.item-tips {
font-size: 12px;
color: #999999;
height: 22px;
line-height: 22px;
}
.text-tips {
font-size: 14px;
}
}
}
.file-box {
width: 350px;
.file-item {
margin-top: 6px;
position: relative;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
::v-deep .el-progress-bar {
width: 320px;
background: #ffffff;
border: 1px solid #f4f6fc;
border-radius: 4px;
.el-progress-bar__outer {
background: transparent;
border-radius: 4px;
.el-progress-bar__inner {
background: #f5f7fa;
border-radius: 4px;
}
}
}
::v-deep .el-image-viewer__wrapper {
width: 100vw;
height: 100vh;
}
.file-name {
position: absolute;
left: 12px;
top: 6px;
transform: translateY(-50%);
color: #333333;
font-size: 14px;
max-width: 300px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.image-file {
z-index: -1;
}
}
.file-item:first-child {
margin-top: 15px;
.file-name {
position: absolute;
left: 12px;
top: 15px;
transform: translateY(-50%);
color: #333333;
font-size: 14px;
}
}
}
}
.tipFont {
margin: 10px 0 0 60px;
width: 535px;
height: 22px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 12px;
color: #eb4e4e;
}
</style>
<!-- 财资管理 - 列表 -->
<template>
<div>
<d2-container>
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData">
<!-- 交易金额 -->
<div slot="transactionMoneyHtml">
<input-range start-placeholder="请输入"
end-placeholder="请输入"
:display-value="searchForm.qualityTestScore"></input-range>
</div>
<!-- 交易时间 -->
<!-- <div slot="transactionTimeHtml">
<el-date-picker v-model="searchForm.transactionTime"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOption['rangePickerOptions']">
</el-date-picker>
</div> -->
</d2-search>
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
:selectable-fn="selectableFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
</d2-table>
</div>
</d2-container>
<!-- 重取明细 -->
<refetch-dialog :visible.sync="refetchVisible"
v-if="refetchVisible"
@dialogClose="closeRefetchDialog" />
<!-- 详细信息 -->
<detail-dialog :visible.sync="detailVisible"
v-if="detailVisible"
:params-obj="recordInfo"
@dialogClose="closeDetailDialog" />
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
// import { rangePickerOptions } from '@/common/format'
import { mapActions, mapState } from 'vuex'
import { cdSignOpt, jdSyncOpt } from '@/common/constants.js'
import { nbcbAccDetailPage, nbcbAccDetailConfig, nbcbAccDetailBatchSync, nbcbReceiptPdfUrl } from '@api/theAssetData'
import inputRange from './components/inputRange'
import refetchDialog from './components/refetchDialog'
import detailDialog from './components/detailDialog'
export default {
name: 'TransferAccountsList',
components: {
inputRange,
refetchDialog,
detailDialog
},
data() {
return {
// pickerOption: {
// rangePickerOptions: rangePickerOptions
// },
userInfo: this.$store.state.d2admin.user.info,
labelWidth: '100px',
searchForm: {
accNameList: [],
qualityTestScore: [],
bankType: '',
bankAcc: '',
bankName: '',
oppAccName: '',
oppAccNo: '',
curCode: '',
cdSign: '',
postScript: '',
jdSync: '',
transactionTime: ''
},
searchFormSearch: {},
showFormData: [{
label: '单位名称',
name: 'accNameList',
type: 'select',
multiple: true,
collapseTags: true,
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'accNameList'
}, {
label: '银行类别',
name: 'bankType',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'bankTypeList'
}, {
label: '本方账号',
name: 'bankAcc',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'bankAccList'
}, {
label: '开户银行',
name: 'bankName',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'bankNameList'
}, {
label: '对方户名',
name: 'oppAccName',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '对方账号',
name: 'oppAccNo',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '币种',
name: 'curCode',
type: 'select',
isClear: true,
optionList: [],
optionId: 'curCode',
optionLabel: 'curName',
optionsName: 'curCodeList'
}, {
label: '交易金额',
name: 'transactionMoney',
addHtml: "transactionMoneyHtml"
}, {
label: '收支标志',
name: 'cdSign',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'cdSignOpt'
}, {
label: '交易备注',
name: 'postScript',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '同步状态',
name: 'jdSync',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'jdSyncOpt'
}, {
label: '交易时间',
name: 'transactionTime',
// addHtml: "transactionTimeHtml"
type: 'datePicker',
isClear: true,
pickerOptions: 'rangePickerOptions'
}],
getListApi: nbcbAccDetailPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
mutiSelectUniqueKey: 'id',
mutiSelectName: 'transferAccounts',
tableOption: { width: '200px' },
tableColumns: [{
label: '交易时间',
prop: 'transTime',
width: '160px',
formatter: (cellValue) => {
return cellValue.transTime ? Util.dateFormate(cellValue.transTime, 'YYYY-MM-DD HH:mm:ss') : '-'
}
}, {
label: '本方户名',
prop: 'accName',
width: '250px'
}, {
label: '本方账号',
prop: 'bankAcc',
width: '200px'
}, {
label: '收入',
prop: 'amt',
width: '150px',
formatter: (cellValue) => {
let amtShow = '-'
if (cellValue.cdSign == 0) {
amtShow = cellValue.amt.toLocaleString()
}
return amtShow
}
}, {
label: '支出',
prop: 'amt',
width: '150px',
formatter: (cellValue) => {
let amtShow = '-'
if (cellValue.cdSign == 1) {
amtShow = cellValue.amt.toLocaleString()
}
return amtShow
}
}, {
label: '账户余额',
prop: 'bal',
width: '150px',
formatter: (cellValue) => {
return cellValue.bal.toLocaleString() || '-'
}
}, {
label: '对方户名',
prop: 'oppAccName',
width: '250px'
}, {
label: '对方账号',
prop: 'oppAccNo',
width: '200px'
}, {
label: '币种',
prop: 'curCode',
width: '120px'
}, {
label: '交易备注',
prop: 'postScript',
width: '200px'
}, {
label: '同步状态',
prop: 'jdSync',
width: '100px',
formatter: (cellValue) => {
return this.baseData.jdSyncOpt.find(item => item.confId === cellValue.jdSync)?.confValue
},
className: (cellValue) => {
return {
0: 'redSpot',
1: 'greenSpot'
}[cellValue.jdSync]
}
}
]
},
baseData: {
accNameList: [],
bankTypeList: [],
bankAccList: [],
bankNameList: [],
curCodeList: [],
cdSignOpt: deepClone(cdSignOpt),
jdSyncOpt: deepClone(jdSyncOpt)
},
recordInfo: null,
refetchVisible: false,
detailVisible: false
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.nbcbAccDetailConfig()
this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.getOptionsList()
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.transactionTime) {
this.searchFormSearch.transTimeStart = Util.dateFormate(this.searchFormSearch.transactionTime[0], 'YYYY-MM-DD HH:mm:ss')
this.searchFormSearch.transTimeEnd = Util.dateFormate(this.searchFormSearch.transactionTime[1], 'YYYY-MM-DD') + ' 23:59:59'
} else {
delete this.searchFormSearch.transTimeStart
delete this.searchFormSearch.transTimeEnd
}
if (this.searchFormSearch.qualityTestScore && this.searchFormSearch.qualityTestScore.length > 0) {
this.searchFormSearch.amtMin = this.searchFormSearch.qualityTestScore[0]
this.searchFormSearch.amtMax = this.searchFormSearch.qualityTestScore[1]
} else {
delete this.searchFormSearch.amtMin
delete this.searchFormSearch.amtMax
}
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (
this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部' && item.label != '单位名称'
) {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(
this.showFormData[index],
'optionList',
this.baseData[item.optionsName]
)
}
})
},
selectableFn(row, index) {
var isSelect = true
if (row.jdSync == 1) { // 已同步不可勾选
isSelect = false
}
return isSelect
},
handleSearch() {
this.$refs.recordTable.refreshTable(false, true)
},
handleReset() {
this.searchForm = {
accNameList: [],
qualityTestScore: [],
bankType: '',
bankAcc: '',
bankName: '',
oppAccName: '',
oppAccNo: '',
curCode: '',
cdSign: '',
postScript: '',
jdSync: '',
transactionTime: ''
}
this.$refs.recordTable.refreshTable(false, true)
},
// 重取明细
handleRefetchDetail() {
this.refetchVisible = true
},
closeRefetchDialog(obj) {
this.refetchVisible = !this.refetchVisible
if (obj.flag) {
this.$refs.recordTable.refreshTable(false, true)
}
},
// 批量重推
handleBatchRepush() {
var selectedData = []
console.log(this.$refs.recordTable.mutiSelectArr.transferAccounts)
if (this.$refs.recordTable.mutiSelectArr.transferAccounts) {
selectedData = this.$refs.recordTable.mutiSelectArr.transferAccounts
}
this.handleBatchRepush_commit(selectedData)
},
handleBatchRepush_commit(selectedData) {
if (!selectedData?.length) {
this.$message({
message: "请选择要重推的明细",
type: "warning",
showClose: true
})
return false
}
console.log(selectedData)
const ids = selectedData.map((item) => {
return item.id
})
this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
nbcbAccDetailBatchSync({ ids: ids }).then(res => {
this.notice.okTips()
this.$refs.recordTable.refreshTable()
})
}).catch(err => {
console.log(err)
})
},
handleExport() {
var params = deepClone(this.searchFormSearch)
if (params.accNameList.length > 0) {
params.accNameList.forEach((item, index) => {
const name = `accNameList[${index}]`
params[name] = item
})
delete params.accNameList
}
// console.log(params)
// 去除为null的值
for (const key in params) {
// console.log(params[key])
if (params[key] === null || params[key] === '' || params[key].length == 0) {
delete params[key]
}
}
params.method = 'dj.smartcarlife.api.nbcb.acc.detail.export.async'
const list = [
...this.dowloadList,
{
name: '财资数据导出',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 查看详情
handleDetail(row) {
this.recordInfo = row
this.detailVisible = !this.detailVisible
},
closeDetailDialog(obj) {
console.log('obj', obj)
this.detailVisible = !this.detailVisible
if (obj.flag) {
this.$refs.recordTable.refreshTable(false, true)
}
},
// 财资数据筛选项列表
nbcbAccDetailConfig() {
nbcbAccDetailConfig({}).then(res => {
for (var key in res) {
console.log('this.base[key]', this.baseData[key])
if (this.baseData[key]) {
this.baseData[key] = res[key]
if (key != 'curCodeList') {
this.baseData[key] = this.baseData[key].map(item => {
return {
confId: item,
confValue: item
}
})
}
}
}
this.getOptionsList()
})
},
handleReceipt(row) {
nbcbReceiptPdfUrl({ id: row.id }).then(res => {
if (res && res.length > 0) {
window.open(res)
} else {
this.$message({
message: "暂无回单,请稍后再试",
type: "warning",
showClose: true
})
}
})
// window.open('http://qcimg01.glsx.com.cn:7060/group1/M00/07/46/wKgD3mdD9oaARUE4AABxS-wgZWk991.pdf')
}
}
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
.tableHeaderBtn {
margin-left: 10px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!