Commit 3a9d7297 by wangzhihui

积分审批

1 parent de6049c9
<!-- 到账明细 -->
<template>
<div class="points">
<div class="header">
<div class="title">到账明细</div>
</div>
<div class="container gl-form-page">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="withdrawRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span>{{ tableStatus[scope.scope.status] }}</span>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as XLSX from 'xlsx'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import util from '@/utils/index'
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回', '受理失败']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E', '#2CCA74']
const tabelHeaderModel = ['商户名称', '商户号', '客户名称', '客户手机号', '提现金额', '收款人姓名', '收款人身份证', '收款银行卡号', '收款银行', '收款人手机号']
export default {
data() {
return {
id: '',
checkLoading: false,
loading: false,
colors,
tableStatus,
size: 'small',
url: url,
settleAmount: {},
searchForm: {
customerName: ''
},
hasFooter: false,
tableSearchForm: {},
showFormData: [
{
label: '',
labelWidth: '0',
name: 'customerName',
placeholder: '客户名称/手机号',
type: 'input',
isClear: true,
maxlength: 20
}
],
// 表格
getListApi: this.$apis.withdraw.getList,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '客户名称',
prop: 'customerName',
width: 150
},
{
label: '提现方式',
prop: 'mode',
width: '200px'
// formatter: cellValue => {
// let arr = this.baseData.modeTypeList.filter(item => item.confId == cellValue.mode)
// return arr.length > 0 ? arr[0].confLabel : '--'
// }
},
{
label: '手机号',
prop: 'customerPhone',
width: '140px'
},
{
label: '所属门店',
prop: 'merchantName',
line: 1,
width: 150
},
{
label: '提现积分',
prop: 'integralAmount',
width: 100
},
{
label: '提现金额/元',
prop: 'payAmount',
width: 100,
formatter: cellValue => {
return cellValue.payAmount ? (cellValue.payAmount / 100).toFixed(2) : '--'
}
},
{
label: '收款人姓名',
prop: 'name',
width: '110px'
},
{
label: '收款人身份证',
prop: 'idCardNo',
width: '180px'
},
{
label: '收款银行卡号',
prop: 'recvBankCardNo',
width: 230
},
{
label: '收款银行',
prop: 'recvBank',
line: 1,
width: 150
},
{
label: '收款手机号',
prop: 'mobile',
width: '130px'
},
{
label: '客户名称',
prop: 'customerName',
width: 150
},
{
label: '客户手机号',
prop: 'customerPhone',
width: '140px'
},
{
label: '所属门店',
prop: 'merchantName',
line: 1,
width: 150
},
{
label: '提现积分',
prop: 'integralAmount',
width: 100
},
{
label: '提现金额',
prop: 'payAmount',
width: 100,
formatter: cellValue => {
return cellValue.payAmount ? (cellValue.payAmount / 100).toFixed(2) : '--'
}
},
{
label: '收款人姓名',
prop: 'name',
width: '110px'
},
{
label: '收款人身份证',
prop: 'idCardNo',
width: '180px'
},
{
label: '收款银行卡号',
prop: 'recvBankCardNo',
width: 230
},
{
label: '收款银行',
prop: 'recvBank',
line: 1,
width: 150
},
{
label: '收款手机号',
prop: 'mobile',
width: '130px'
},
{
label: '到账情况',
prop: 'customerOpenId',
width: '130px'
},
{
label: '到账时间',
prop: 'receiptDate',
width: '200px'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据
baseData: {}
}
},
mounted() {},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
console.log(this.searchForm)
if (this.searchForm.applyDateStr) {
params.applyDateStart = dayjs(this.searchForm.applyDateStr[0]).format('YYYY-MM-DD') + ' 00:00:01'
params.applyDateEnd = dayjs(this.searchForm.applyDateStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
if (this.searchForm.payTimeStr) {
params.payDateStart = dayjs(this.searchForm.payTimeStr[0]).format('YYYY-MM-DD') + ' 00:00:01'
params.payDateEnd = dayjs(this.searchForm.payTimeStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
if (this.searchForm.receiptDateStr) {
params.receiptDateStart = dayjs(this.searchForm.receiptDateStr[0]).format('YYYY-MM-DD') + ' 00:00:01'
params.receiptDateEnd = dayjs(this.searchForm.receiptDateStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
if (this.searchForm.channel) {
params.channel = this.searchForm.channel[0]
params.channelProvider = this.searchForm.channel.length > 1 ? this.searchForm.channel[1] : ''
}
delete params.payTimeStr, delete params.applyDateStr, delete params.receiptDateStr
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.payTimeStr
delete this.tableSearchForm.applyDateStr
resolve()
})
},
handleSearch() {
this.$refs.withdrawRef.refreshTable()
},
handleReset() {
this.searchForm = {
outSettleOrderId: '',
customerName: '',
customerPhone: '',
status: '',
channel: '',
merchantName: '',
mode: '',
withdrawalSource: ''
}
this.handleSearch()
}
}
}
</script>
<style scoped lang='scss'>
.points {
.header {
padding: 14px 20px;
background: #fff;
color: #333333;
font-size: 20px;
font-weight: 600;
border-bottom: 1px solid #e5e5e5;
}
}
.gl-form-page /deep/ .search-list .search-item .name {
width: 0px !important;
}
.gl-form-page /deep/ .glsx-combi-form .el-form-item--small {
width: auto;
}
</style>
\ No newline at end of file
<!-- 查看 -->
<!-- 盘点详情弹窗弹窗 -->
<template>
<GLDialog bigTitle="详细信息" :visible.sync="isVisible" :hasFooter="false" :before-close="handleClose" class="points" mode="big" okText="关闭" @onCancel="handleClose" @onOk="handleClose">
<div class="wrap edit-box">
<div>
<p class="edit-title">订单信息</p>
<el-form label-width="150px" :inline="true">
<el-row v-for="(item, index) in withdrawDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label + ':'" class="row-item">
<span v-if="subItem.addHtml">
{{ subItem.addHtml(recordInfo) }}
</span>
<span v-else class="detail-txt ellipsis-1" :title="recordInfo[subItem.name]">{{ recordInfo[subItem.name] ? recordInfo[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
</el-form>
</div>
<div>
<p class="edit-title">付款信息</p>
<el-form label-width="154px" :inline="true">
<el-row v-for="(item, index) in paymentDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label + ':'" class="row-item">
<span v-if="subItem.addHtml">
{{ subItem.addHtml(recordInfo) }}
</span>
<span v-else-if="subItem.addStyle" class="flex_sc">
<div class="table_point" :style="{ background: subItem.addStyle(recordInfo).color }"></div>
{{ subItem.addStyle(recordInfo).status }}
</span>
<span v-else class="detail-txt ellipsis-1" :title="recordInfo[subItem.name]">{{ recordInfo[subItem.name] ? recordInfo[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
</el-form>
</div>
<div v-if="recordInfo.operationList">
<p class="edit-title">操作记录</p>
<!-- <template v-for="(record, recordIdx) in recordInfo.operationList">
<el-form label-width="154px" :inline="true" :key="recordIdx">
<el-row v-for="(item, index) in operationDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label(record) + ':'" class="row-item">
<span v-if="subItem.addHtml" class="flex_sc">
<div class="table_point" :style="{ background: subItem.addHtml(record).color }"></div>
{{ subItem.addHtml(record).status }}
</span>
<span v-else class="detail-txt ellipsis-1" :title="record[subItem.name]">{{ record[subItem.name] ? record[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
</el-form>
</template> -->
</div>
</div>
</GLDialog>
</template>
<script>
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E']
const channelObj = {
'TXIAT': '熠轩-银行卡',
'ZX': '中雄-银行卡',
'YUNHUO': '云获(嘀加)-银行卡',
"YUNHUO-ZY": '云获(中赢)-银行卡',
'YUNHUO-WX': '云获(中赢)-微信',
'SHENBIANYUN':'身边云-银行卡'
}
export default {
name: 'DetailDialog',
data() {
return {
recordInfo: {},
withdrawDataRow: [],
paymentDataRow: [],
operationDataRow: [],
withdrawData: [],
paymentData: [],
operationData: [],
isVisible: this.detailVisible,
}
},
props: {
detailVisible: {
type: Boolean,
default: false
},
id: {
type: Number,
default: 0
}
},
watch: {
detailVisible(newVal) {
this.isVisible = newVal
this.getDetails()
}
},
computed: {},
mounted() {},
methods: {
getDetails() {
this.$apis.withdraw.getDetails({ id: this.id }).then(res => {
this.recordInfo = res
this.getConfig()
})
},
getConfig() {
this.withdrawData = [
{
label: '批次号',
name: 'outSettleOrderId'
},
{
label: '客户数量',
name: 'transferType',
addHtml: obj => {
return obj.transferType == 0 ? '积分提现' : obj.transferType == 1 ? '普通提现' : '阳光激励'
}
},
{
label: '积分总额:',
name: 'integralAmount'
},
{
label: '付款总额/元:',
name: 'payAmount',
addHtml: obj => {
return obj.payAmount ? (obj.payAmount / 100).toFixed(2) : '--'
}
},
{
label: '状态',
name: 'status',
addStyle: obj => {
return {
status: tableStatus[obj.status],
color: colors[obj.status]
}
}
}
]
this.paymentData = [
{
label: '付款渠道',
name: 'name'
},
{
label: '付款主体',
name: 'idCardNo'
},
{
label: '渠道到账时间',
name: 'receiptDate'
}
]
this.formToRow('withdrawData')
// this.formToRow('operationData')
this.formToRow('paymentData')
},
handleJudgment(target, key) {
let arr = target,
len = arr.length,
item
for (let i = 0; i < len; i++) {
item = arr[i]
if (item.name == key) {
arr.splice(i, 1)
}
}
},
formToRow(formName, numOfRow = 3) {
var rowNum = Math.ceil(this[formName].length / numOfRow)
for (var i = 0; i < rowNum; i++) {
for (var j = 0; j < numOfRow; j++) {
if (j == 0) {
this[formName + 'Row'][i] = {
rowList: []
}
}
if (i * numOfRow + j < this[formName].length) {
this[formName + 'Row'][i].rowList.push(this[formName][i * numOfRow + j])
}
}
}
},
handleClose() {
this.isVisible = false
this.$emit('dialogClose')
}
}
}
</script>
<style scoped lang="scss">
.edit-box .row-item {
width: 30%;
/deep/ {
.el-form-item__content {
height: 30px;
}
}
}
.detail-txt {
display: inline-block;
width: 136px;
}
.edit-title {
font-weight: 600;
font-size: 16px;
color: #000000d9;
line-height: 24px;
}
.m-b-20 {
margin-top: 20px;
}
/deep/ .el-form-item {
margin-bottom: 0;
}
.table_point {
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
.copy {
color: #5850ff;
margin-left: 20px;
cursor: pointer;
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!