Commit 8c45b231 by wangzhihui

积分管理需求开发

1 parent 236e5d08
...@@ -20,6 +20,11 @@ p{ ...@@ -20,6 +20,11 @@ p{
display: flex; display: flex;
align-items: center; align-items: center;
} }
.flex-sb{
align-items: center;
display: flex;
justify-content: space-between;
}
.points .container { .points .container {
background: #ffffff; background: #ffffff;
padding: 20px; padding: 20px;
......
<!-- 到账明细 -->
<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 \ 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 \ No newline at end of file
<!-- 付款审批 -->
<template>
<GLDialog class="gl-form-page gl-form-min payWrap" title="付款审批" mode="mid" :visible.sync="isVisible" :close-on-click-modal="false" :before-close="cancelPay">
<glsx-combi-form formRef="payChildRef" defaultWidth="284px" ref="payFormRef" :formObj="payForm" :formData="payFormData" :formRules="payRule">
<template slot="captcha">
<div class="captcha-wrap">
<el-input v-model="payForm.captcha" placeholder="请输入"></el-input>
<div class="captcha-text" @click.prevent="getCode">
{{ !isCodeDisabled ? '获取验证码' : count + 's' }}
</div>
</div>
</template>
</glsx-combi-form>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="cancelPay">取消</el-button>
<el-button type="primary" size="small" :loading="loading" @click="comfirmPay">确定</el-button>
</span>
</GLDialog>
</template>
<script>
export default {
data() {
return {
isVisible: true,
timer: null,
isCodeDisabled: false,
payForm: {
transferType: '',
payMoney: '',
admin: '',
channel: '',
captcha: '',
remark: '',
balance: '',
channelProvider: ''
},
payFormData: [
{
label: '此次付款渠道',
name: 'admin',
type: 'select',
optionsName: 'payChannelList',
optionId: 'confId',
optionLabel: 'confLabel',
changeAttr: val => {}
},
{
label: '此次付款主体',
name: 'admin',
type: 'select',
optionsName: 'PayerelList',
optionId: 'confId',
optionLabel: 'confLabel',
changeAttr: val => {}
},
{
label: '批次号',
name: 'batchNo',
addHtml: 'batchNo'
},
{
label: '积分总额',
name: 'payMoney',
addHtml: 'batchNo'
},
{
label: '付款总额/元',
name: 'payMoney',
addHtml: 'batchNo'
},
{
label: '税点',
name: 'payMoney',
addHtml: 'batchNo'
},
{
label: '管理员',
name: 'admin',
type: 'select',
optionsName: 'adminList',
optionId: 'adminId',
optionLabel: 'adminName',
changeAttr: val => {
this.payForm.phone = val
this.isCodeDisabled = false
clearInterval(this.timer)
this.timer = null
this.payForm.captcha = ''
}
},
{
label: '验证码',
addHtml: 'captcha',
name: 'captcha'
},
{
label: '发票及其他说明',
name: 'remark',
type: 'input',
inputType: 'textarea',
maxlength: 200
},
{
label: '备注',
name: 'remark',
type: 'input',
inputType: 'textarea',
maxlength: 50
}
],
payRule: {
admin: [{ required: true, message: '请选择管理员', trigger: 'change' }],
channel: [{ required: true, message: '请选择付款渠道', trigger: 'change' }],
captcha: [{ required: true, message: '请输入验证码', trigger: 'blur' }]
},
// 基本数据
baseData: {
payChannelList: [
{
confId: '微信',
confLabel: '微信'
},
{
confId: '支付宝',
confLabel: '支付宝'
}
],
//付款主体
PayerelList: [
{
confId: '深圳广联数科科技有限公司',
confLabel: '深圳广联数科科技有限公司'
},
{
confId: '深圳市嘀加智慧云服务有限公司',
confLabel: '深圳市嘀加智慧云服务有限公司'
}
]
}
}
},
props: {
payVisible: { type: Boolean, default: false },
detailData: {
type: Object,
default: () => {
return {}
}
}
},
watch: {
payVisible(newVal) {
this.isVisible = newVal
// this.getDetails()
}
},
mounted() {
this.$utils.getOptionsList(this, 'payFormData', false)
},
methods: {
//付款
comfirmPay() {
// this.$refs.payFormRef.$refs.payChildRef.validate(valid => {
// if (valid) {
// }
// })
},
cancelPay() {
this.ids = ''
this.isVisible = false
this.payForm = {
payMoney: '',
admin: '',
channel: '',
captcha: '',
remark: '',
balance: ''
}
this.isCodeDisabled = false
clearInterval(this.timer)
this.timer = null
this.$emit('cancelPay')
},
getCode() {
if (this.isCodeDisabled) return
if (!this.timer) {
this.count = 60
// var params = {
// phoneType: 'RG',
// phone: this.ruleForm.registerPhone
// }
this.$apis.withdraw
.getSms({
channel: this.payForm.channel,
phone: this.payForm.phone
})
.then(res => {
if (res.code == 0) {
this.$message.success('短信验证码发送成功')
this.isCodeDisabled = true
this.timer = setInterval(() => {
if (this.count > 0 && this.count <= 60) {
this.count--
} else {
this.isCodeDisabled = false
clearInterval(this.timer)
this.timer = null
}
}, 1000)
} else {
this.$message.error(res.message)
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
.payWrap {
/deep/ {
.el-form--inline .el-form-item {
display: block;
}
}
.captcha-wrap {
.captcha-text {
font-size: 12px;
color: #5850ff;
position: absolute;
right: 0;
top: 2px;
margin-right: 10px;
cursor: pointer;
width: 100px;
height: 32px;
text-align: right;
}
}
}
</style>
\ No newline at end of file \ 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!