Commit 772478b6 by 王志慧

Merge branch 'v3.23.2' into 'v3.24.0'

V3.23.2

See merge request !8
2 parents 7db69437 68732d5e
......@@ -56,7 +56,7 @@ const integralApprove = params => {
returnAll: true
})
}
// 用户积分提现审核/驳回
// 用户积分提现驳回
const integralOut = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.approve`
return http({
......@@ -67,6 +67,28 @@ const integralOut = params => {
returnAll: true
})
}
// 积分提现一键审核
const integralAllOut = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.all.approve`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 积分提现一键支付
const integralAllpay = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.all.pay`
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`
......@@ -91,7 +113,7 @@ const getMerchantList = params => {
}
// 根据id列表获取提现金额(分)合计
const getAllpayAmount = params => {
const getPayAmount = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.pay.amount`
return http({
url: 'rop-scrm-shopmall/router',
......@@ -120,19 +142,19 @@ const uploadXlsx = params => {
data: params,
sign: true,
noSignAttr: ['file'],
returnAll:true
returnAll: true
})
}
// 根据批次号更新普通提现导入为成功状态
const handleSaveImport =params => {
const handleSaveImport = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.import.confirm`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll:true
returnAll: true
})
}
/*第三方余额查询 */
......@@ -151,4 +173,12 @@ const getSettleAmount = params => {
data: params
})
}
export default { getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getAllpayAmount, getDetails,uploadXlsx,handleSaveImport,getBalance,getSettleAmount }
const getAllPayAmount = params => {
params.method = 'scrm.api.shopmall.integral.transfer.out.all.pay.amount'
return http({
url: 'rop-scrm-shopmall/router',
data: params
})
}
export default { getPayAmount,getAllPayAmount, integralAllOut, integralAllpay, getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getDetails, uploadXlsx, handleSaveImport, getBalance, getSettleAmount }
......@@ -54,6 +54,11 @@
<script>
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E']
const channelObj={
'TXIAT':'熠轩',
// 'XYJ':'薪遇见',
'YUNHUO':'云获'
}
export default {
name: 'DetailDialog',
data() {
......@@ -160,7 +165,7 @@ export default {
label: '付款渠道',
name: 'channel',
addHtml: obj => {
return obj.channel == 'TXIAT' ? '熠轩' : '--'
return channelObj[obj.channel] ? channelObj[obj.channel] : '--'
}
},
{
......
......@@ -6,13 +6,25 @@
<!-- <h2>积分提现列表</h2> -->
<div class="statistics">
累计结算金额:熠轩
<span class="price">{{settleAmount.yiXuanSettleAmount}}</span>
<span class="price">{{ settleAmount.yiXuanSettleAmount }}</span>
元,
<!-- 薪遇见
<span class="price">{{ settleAmount.xyjSettleAmount }}</span>
元, -->
云获
<span class="price">{{ settleAmount.yunHuoSettleAmount }}</span>
元
</div>
<div>
<div class="flex">
<el-button size="small" @click="handleCheck()" type="primary" plain>批量审核</el-button>
<el-button size="small" @click="handlePay()">批量付款</el-button>
<div class="select-wrap flex">
<el-select v-model="operaForm.batch" placeholder="批量操作" class="selectBtn">
<el-option v-for="(item, index) in batchOptions" :key="index" :label="item" :value="index" @click.native="handleSelectBtn(index, 'batch')"></el-option>
</el-select>
<el-select v-model="operaForm.key" placeholder="一键操作" class="selectBtn">
<el-option v-for="(item, index) in keyOptions" :key="index" :label="item" :value="index" @click.native="handleSelectBtn(index, 'key')"></el-option>
</el-select>
<!-- <el-button size="small" @click="handleCheck()" type="primary" plain>批量审核</el-button>
<el-button size="small" @click="handlePay()">批量付款</el-button> -->
<el-button size="small" @click="handleImport">提现导入</el-button>
<el-button size="small" @click="exportExcel">导出</el-button>
</div>
......@@ -47,10 +59,10 @@
<!-- 付款 -->
<GLDialog class="gl-form-page gl-form-min" title="付款" mode="mid" :visible.sync="isPay" :close-on-click-modal="false" :before-close="cancelPay">
<glsx-combi-form formRef="payChildRef" defaultWidth="284px" ref="payFormRef" :formObj="payForm" :formData="payFormData" :formRules="payRule">
<tempalte slot="balance">
<tempalte slot="balance" v-if="this.payForm.balance ">
<div class="channelMoney">
可用余额:
<span class="price">{{this.payForm.balance}}</span>
<span class="price">{{ this.payForm.balance }}</span>
元
</div>
</tempalte>
......@@ -119,8 +131,8 @@ import DetailDialog from './detail.vue'
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']
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回', '受理失败']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E', '#2CCA74']
const tabelHeaderModel = ['商户名称', '商户号', '客户名称', '客户手机号', '提现金额', '收款人姓名', '收款人身份证', '收款银行卡号', '收款银行', '收款人手机号']
export default {
components: {
......@@ -135,7 +147,7 @@ export default {
tableStatus,
size: 'small',
url: url,
settleAmount:{},
settleAmount: {},
searchForm: {
outSettleOrderId: '',
customerName: '',
......@@ -263,7 +275,7 @@ export default {
fn: '驳回'
},
condition: row => {
return row.status == 0 || row.status == 1|| row.status == 6
return row.status == 0 || row.status == 1 || row.status == 6
},
listeners: {
click: row => {
......@@ -279,7 +291,7 @@ export default {
fn: '付款'
},
condition: row => {
return row.status == 1||row.status == 6
return row.status == 1 || row.status == 6
},
listeners: {
click: row => {
......@@ -331,7 +343,7 @@ export default {
prop: 'payAmount',
width: 100,
formatter: cellValue => {
return cellValue.payAmount?(cellValue.payAmount / 100).toFixed(2):'--'
return cellValue.payAmount ? (cellValue.payAmount / 100).toFixed(2) : '--'
}
},
{
......@@ -394,10 +406,10 @@ export default {
label: '结算金额/元',
prop: 'settleAmount',
formatter: cellValue => {
return cellValue.settleAmount?(cellValue.settleAmount / 100).toFixed(2):'--'
return cellValue.settleAmount ? (cellValue.settleAmount / 100).toFixed(2) : '--'
},
width: '150px'
},
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
......@@ -438,6 +450,14 @@ export default {
{
confId: 'TXIAT',
confLabel: '熠轩'
},
// {
// confId: 'XYJ',
// confLabel: '薪遇见'
// },
{
confId: 'YUNHUO',
confLabel: '云获'
}
],
withdrawalTypeList: [
......@@ -465,10 +485,10 @@ export default {
payForm: {
payMoney: '',
admin: '',
channel: 'TXIAT',
channel: '',
captcha: '',
remark: '',
balance:''
balance: ''
},
payFormData: [
{
......@@ -487,6 +507,14 @@ export default {
{
confId: 'TXIAT',
confLabel: '熠轩'
},
// {
// confId: 'XYJ',
// confLabel: '薪遇见'
// },
{
confId: 'YUNHUO',
confLabel: '云获'
}
]
},
......@@ -532,7 +560,14 @@ export default {
batchNo: '',
errorUrl: ''
},
isImport: false
operaForm: {
select: true,
batch: '',
key: ''
},
isImport: false,
batchOptions: ['批量审核', '批量付款'],
keyOptions: ['一键审核', '一键付款']
}
},
watch: {
......@@ -540,6 +575,9 @@ export default {
if (isNaN(Number(newVal))) {
this.searchForm.customerPhone = newVal.replace(/[^\d]/g, '')
}
},
'payForm.channel'(newVal) {
if (newVal) this.getBalance()
}
},
mounted() {
......@@ -548,9 +586,57 @@ export default {
this.getSettleAmount()
},
methods: {
getSettleAmount(){
//批量操作/一键操作
async handleSelectBtn(index, type) {
this.operaForm.select = type == 'batch' ? false : true
this.operaForm[type] = ''
let result = await this.getAllPayAmount(index, type)
if (result) {
if (index == 0) {
this.handleCheck()
} else if (index == 1) {
this.handlePay()
}
}
},
//canApprove=false的时候就提示只能选待审核的,付款的时候canPay=false就提示只能选待付款和受理失败的
//获取批量付款的金额
getAllPayAmount(index, type) {
return new Promise(resolve => {
let key = index == 0 ? 'canApprove' : 'canPay',
params = {},
Method = type == 'batch' ? 'getPayAmount' : 'getAllPayAmount',
textErr = ['请选择待审核的提现记录', '请选择已审核或受理失败的提现记录']
if (type == 'batch') {
if (!this.ids || this.ids.length == 0) {
this.$message.error(textErr[index])
return
}
params.ids = this.ids
} else {
params = {
...this.tableSearchForm
}
}
params[key] = false
this.$apis.withdraw[Method](params).then(res => {
if (!res[key]) {
this.$message.error(textErr[index])
resolve(false)
} else {
if (index == 1) {
this.payForm.payMoney = (res.payAmount / 100).toFixed(2)
}
resolve(true)
}
})
})
},
getSettleAmount() {
this.$apis.withdraw.getSettleAmount({}).then(res => {
this.settleAmount =res
this.settleAmount = res
})
},
getMerchantList() {
......@@ -578,8 +664,7 @@ export default {
params.receiptDateEnd = dayjs(this.searchForm.receiptDateStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
delete params.payTimeStr, delete params.applyDateStr,
delete params.receiptDateStr
delete params.payTimeStr, delete params.applyDateStr, delete params.receiptDateStr
return params
},
beforeSearchFn() {
......@@ -690,7 +775,7 @@ export default {
batchNo: this.importForm.batchNo
}
this.$apis.withdraw.handleSaveImport(params).then(res => {
this.handleSearch()
this.handleReset()
})
},
//提现导入
......@@ -766,15 +851,8 @@ export default {
// console.log(row)
// isRefuse: 0:审批,2:驳回
if (row) {
this.operaForm.select = false
this.ids = isRefuse == 0 ? [row.id] : row.id
} else {
if (!this.ids || this.ids.length == 0) {
this.$message({
message: '请选择待审核的提现记录',
type: 'error'
})
return
}
}
//驳回
this.isRefuse = isRefuse
......@@ -783,37 +861,23 @@ export default {
//付款
handlePay(row) {
if (row) {
this.operaForm.select = false
this.ids = [row.id]
this.payForm.payMoney = (row.payAmount / 100).toFixed(2)
} else {
if (!this.ids || this.ids.length == 0) {
this.$message({
message: '请选择已审核的提现记录',
type: 'error'
})
return
}
this.getAllpayAmount()
}
this.getAdmin()
this.getBalance()
// this.getBalance()
// this.payForm.channel= 'TXIAT',
this.isPay = true
},
//获取批量付款的金额
getAllpayAmount() {
this.$apis.withdraw.getAllpayAmount({ ids: this.ids }).then(res => {
this.payForm.payMoney = (res / 100).toFixed(2)
})
},
getAdmin() {
this.$apis.withdraw.getAdmin({}).then(res => {
this.payForm.admin = `${res.name} ${res.phone}`
})
},
getBalance(){
this.$apis.withdraw.getBalance({ channel: this.payForm.channel }).then(res => {
console.log(res)
this.payForm.balance=res
getBalance() {
this.$apis.withdraw.getBalance({ channel: this.payForm.channel }).then(res => {
this.payForm.balance = res
})
},
comfirmCheck() {
......@@ -827,12 +891,18 @@ export default {
}
this.checkLoading = true
let { isRefuse } = this,
Methods = this.isRefuse == 2 ? 'integralOut' : 'integralApprove',
params = {
remark: this.form.remark,
[isRefuse == 2 ? 'id' : 'ids']: this.ids,
type: isRefuse
}
{ select } = this.operaForm, //true为一键操作
Methods = select ? 'integralAllOut' : this.isRefuse == 2 ? 'integralOut' : 'integralApprove',
params = select
? {
...this.tableSearchForm,
remark: this.form.remark
}
: {
remark: this.form.remark,
[isRefuse == 2 ? 'id' : 'ids']: this.ids,
type: isRefuse
}
this.$apis.withdraw[Methods](params)
.then(res => {
......@@ -842,7 +912,7 @@ export default {
})
})
.finally(() => {
this.handleSearch()
this.handleReset()
this.clearSelect()
this.checkLoading = false
})
......@@ -860,15 +930,23 @@ export default {
comfirmPay() {
this.$refs.payFormRef.$refs.payChildRef.validate(valid => {
if (valid) {
let params = {
ids: this.ids,
channel: this.payForm.channel,
captcha: this.payForm.captcha,
remark: this.payForm.remark
}
let { select } = this.operaForm,
Methods = select ? 'integralAllpay' : 'integralpay', //true为一键操作
params = select
? {
...this.tableSearchForm,
payChannel: this.payForm.channel,
captcha: this.payForm.captcha,
remark: this.payForm.remark
}
: {
ids: this.ids,
channel: this.payForm.channel,
captcha: this.payForm.captcha,
remark: this.payForm.remark
}
this.loading = true
this.$apis.withdraw
.integralpay(params)
this.$apis.withdraw[Methods](params)
.then(res => {
this.$message({
message: res.code == '0' ? '付款成功' : res.message,
......@@ -876,7 +954,7 @@ export default {
})
})
.finally(() => {
this.handleSearch()
this.handleReset()
this.cancelPay()
this.loading = false
})
......@@ -889,10 +967,10 @@ export default {
this.payForm = {
payMoney: '',
admin: '',
channel: 'TXIAT',
channel: '',
captcha: '',
remark: '',
balance:''
balance: ''
}
this.$refs.withdrawRef.clearMutiSelect()
},
......@@ -955,6 +1033,13 @@ export default {
.el-button + .el-button {
margin-left: 10px;
}
.selectBtn {
width: 100px;
margin-right: 10px;
/deep/.el-input__inner {
padding: 0 10px;
}
}
}
.price {
color: #5850ff;
......@@ -1047,4 +1132,28 @@ export default {
.gl-form-page /deep/ .el-dialog__footer {
text-align: center !important;
}
.select-wrap {
/deep/ {
::-webkit-input-placeholder {
/*Webkit browsers*/
color: #606266;
font-size: 14px;
}
:-moz-placeholder {
/*Mozilla Firefox 4 to 8*/
color: #606266;
font-size: 14px;
}
::moz-placeholder {
/*Mozilla Firefox 19+*/
color: #606266;
font-size: 14px;
}
:-ms-input-placeholder {
/*Internet Explorer 10+*/
color: #606266;
font-size: 14px;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!