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