Commit e4819ff6 by 前端

Merge branch 'v3.21.1' into 'master'

V3.21.1

See merge request !3
2 parents 4517feb0 025a9be6
import { http } from '@/main'
// 积分提现订单列表
const getList = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 获分提现获取管理员信息
const getAdmin = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.getAdmin`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 积分提现列表-导出
const orderExport = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.export`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 积分提现支付
const integralpay = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.batch.pay`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 用户积分提现批量审核
const integralApprove = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.batch.approve`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 用户积分提现审核/驳回
const integralOut = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.approve`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 积分提现向管理员发送验证码
const getSms = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.admin.sms`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 积分提现获取有业务的门店名列表
const getMerchantList = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.merchant.list`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 根据id列表获取提现金额(分)合计
const getAllpayAmount = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.pay.amount`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 用户积分提现明细
const getDetails = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.getById`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getAllpayAmount, getDetails }
.left{float:left}.right{float:right}.align-right{text-align:right} .left {
float: left
}
.right {
float: right
}
.align-right {
text-align: right
}
\ No newline at end of file \ No newline at end of file
...@@ -7,11 +7,19 @@ html { ...@@ -7,11 +7,19 @@ html {
overflow: hidden; overflow: hidden;
background-color: #f4f5fa; background-color: #f4f5fa;
} }
div,
p{
margin:0;
box-sizing: border-box;
}
.flex { .flex {
display: flex; display: flex;
} }
.flex_sc{
display: flex;
align-items: center;
}
.points .container { .points .container {
background: #ffffff; background: #ffffff;
padding: 20px; padding: 20px;
...@@ -60,3 +68,9 @@ html { ...@@ -60,3 +68,9 @@ html {
.el-cascader-menu__wrap { .el-cascader-menu__wrap {
height: 204px !important; height: 204px !important;
} }
.ellipsis-1{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
\ No newline at end of file \ No newline at end of file
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-10 16:40:01
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-22 16:25:00
* @FilePath: \outbound\src\components\glsx-combi-form\common.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/**
* 时间控件-限制月份
*/
export const rangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const rangetimePickerOptions = {
disabledDate(date) {
let dateHour = new Date()
dateHour.setDate(date.getDate())
dateHour.setHours(8)
dateHour.setMinutes(0)
dateHour.setSeconds(0)
if (dateHour.getTime() < date.getTime() < new Date(2016, 9, 10, 20, 0).getTime()) {
return true
}
return false
}
}
export const beforeRangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const afterRangePickerOptions = {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate() - 1))
if (date < yesterday) {
return true
}
return false
}
}
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
import Vue from 'vue' import Vue from 'vue'
import glsxDialog from '@/components/glsx-dialog/index.vue' import glsxDialog from '@/components/glsx-dialog/index.vue'
import InputNumRange from '@/components/InputNumRange/index.vue' import InputNumRange from '@/components/InputNumRange/index.vue'
import glsxCombiForm from '@/components/glsx-combi-form/index.vue'
Vue.component('glsx-dialog', glsxDialog) Vue.component('glsx-dialog', glsxDialog)
Vue.component('input-num-range', InputNumRange) Vue.component('input-num-range', InputNumRange)
Vue.component('glsx-combi-form', glsxCombiForm)
<!-- 盘点详情弹窗弹窗 -->
<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="154px" :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']
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: 'customerName'
},
{
label: '客户手机',
name: 'customerPhone'
},
{
label: '提现积分',
name: 'integralAmount'
},
{
label: '提现金额',
name: 'payAmount',
addHtml: obj => {
return (obj.payAmount / 100).toFixed(2)
}
},
{
label: '所属门店',
name: 'merchantName'
},
{
label: '申请时间',
name: 'createdDate'
}
]
this.paymentData = [
{
label: '收款人姓名',
name: 'name'
},
{
label: '收款人身份证',
name: 'idCardNo'
},
{
label: '收款银行卡号',
name: 'recvBankCardNo'
},
{
label: '收款银行',
name: 'recvBank'
},
{
label: '收款手机号',
name: 'mobile'
},
{
label: '付款渠道',
name: 'channel',
addHtml: obj => {
return obj.channel == 'TXIAT' ? '熠轩' : '--'
}
},
{
label: '状态',
name: 'status',
addStyle: obj => {
return {
status: tableStatus[obj.status],
color: colors[obj.status]
}
}
},
{
label: '失败原因',
name: 'errorMessage'
}
]
this.operationData = [
{
label: obj => {
return ['审核', '付款'][obj.type]
},
name: 'type',
addHtml: obj => {
let status = '--',
color;
if (obj.result == 0) {
status = '通过'
color = '#2CCA74'
} else if (obj.result == 1) {
status = '驳回'
color = '#EB4E4E'
}
return {
status,
color
}
}
},
{
// label: ['审核人', '付款人', '操作人'],
label: obj => {
let arr = ['审核人', '付款人'],
label
if (obj.result == 0) {
label = arr[obj.type]
} else if (obj.result == 1) {
label = '操作人'
}
return label
},
name: 'createdBy'
},
{
label: obj => {
let arr = ['审核时间', '付款时间'],
label
if (obj.result == 0) {
label = arr[obj.type]
} else if (obj.result == 1) {
label = '操作时间'
}
return label
},
name: 'createdDate'
},
{
label: () => {
return '备注'
},
name: 'remark'
}
]
if (this.recordInfo.status != 4) {
this.handleJudgment(this.paymentData, 'errorMessage')
}
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: 28%;
/deep/ {
.el-form-item__content {
height: 30px;
}
}
}
.detail-txt {
display: inline-block;
width: 133px;
}
.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;
}
</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!