Commit 75cb871b by 王志慧

积分管理3.23.2需求开发

1 parent d344e2d0
...@@ -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 }
...@@ -6,13 +6,22 @@ ...@@ -6,13 +6,22 @@
<!-- <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="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>
...@@ -50,7 +59,7 @@ ...@@ -50,7 +59,7 @@
<tempalte slot="balance"> <tempalte slot="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>
...@@ -135,7 +144,7 @@ export default { ...@@ -135,7 +144,7 @@ export default {
tableStatus, tableStatus,
size: 'small', size: 'small',
url: url, url: url,
settleAmount:{}, settleAmount: {},
searchForm: { searchForm: {
outSettleOrderId: '', outSettleOrderId: '',
customerName: '', customerName: '',
...@@ -263,7 +272,7 @@ export default { ...@@ -263,7 +272,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 +288,7 @@ export default { ...@@ -279,7 +288,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 +340,7 @@ export default { ...@@ -331,7 +340,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 +403,10 @@ export default { ...@@ -394,10 +403,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 +447,14 @@ export default { ...@@ -438,6 +447,14 @@ export default {
{ {
confId: 'TXIAT', confId: 'TXIAT',
confLabel: '熠轩' confLabel: '熠轩'
},
{
confId: 'XYJ',
confLabel: '薪遇见'
},
{
confId: 'YUNHUO',
confLabel: '云获'
} }
], ],
withdrawalTypeList: [ withdrawalTypeList: [
...@@ -465,10 +482,10 @@ export default { ...@@ -465,10 +482,10 @@ export default {
payForm: { payForm: {
payMoney: '', payMoney: '',
admin: '', admin: '',
channel: 'TXIAT', channel: '',
captcha: '', captcha: '',
remark: '', remark: '',
balance:'' balance: ''
}, },
payFormData: [ payFormData: [
{ {
...@@ -487,8 +504,19 @@ export default { ...@@ -487,8 +504,19 @@ export default {
{ {
confId: 'TXIAT', confId: 'TXIAT',
confLabel: '熠轩' confLabel: '熠轩'
},
{
confId: 'XYJ',
confLabel: '薪遇见'
},
{
confId: 'YUNHUO',
confLabel: '云获'
} }
] ],
listeners:()=>{
this.getBalance()
}
}, },
{ {
label: '', label: '',
...@@ -532,7 +560,14 @@ export default { ...@@ -532,7 +560,14 @@ export default {
batchNo: '', batchNo: '',
errorUrl: '' errorUrl: ''
}, },
isImport: false operaForm: {
select: true,
batch: 0,
key: 0
},
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,58 @@ export default { ...@@ -548,9 +586,58 @@ export default {
this.getSettleAmount() this.getSettleAmount()
}, },
methods: { methods: {
getSettleAmount(){ //批量操作/一键操作
async handleSelectBtn(index, type) {
this.operaForm.select = type == 'batch' ? false : true
this.operaForm[type] = 0
if(index == 0) return ;
let result = await this.getAllPayAmount(index, type)
if (result) {
if (index == 1) {
this.handleCheck()
} else if (index == 2) {
this.handlePay()
}
}
},
//canApprove=false的时候就提示只能选待审核的,付款的时候canPay=false就提示只能选待付款和受理失败的
//获取批量付款的金额
getAllPayAmount(index, type) {
return new Promise(resolve => {
let key = index == 1 ? 'canApprove' : 'canPay',
params = {},
Method = type == 'batch' ? 'getPayAmount' : 'getAllPayAmount',
textErr = ['请选择待审核的提现记录', '请选择已审核或受理失败的提现记录']
if (type == 'batch') {
if (!this.ids || this.ids.length == 0) {
this.$message.error(textErr[index - 1])
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 - 1])
resolve(false)
} else {
if (index == 2) {
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 +665,7 @@ export default { ...@@ -578,8 +665,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 +776,7 @@ export default { ...@@ -690,7 +776,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()
}) })
}, },
//提现导入 //提现导入
...@@ -767,14 +853,6 @@ export default { ...@@ -767,14 +853,6 @@ export default {
// isRefuse: 0:审批,2:驳回 // isRefuse: 0:审批,2:驳回
if (row) { if (row) {
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
...@@ -785,35 +863,20 @@ export default { ...@@ -785,35 +863,20 @@ export default {
if (row) { if (row) {
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,12 +890,18 @@ export default { ...@@ -827,12 +890,18 @@ 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',
remark: this.form.remark, params = select
[isRefuse == 2 ? 'id' : 'ids']: this.ids, ? {
type: isRefuse ...this.tableSearchForm,
} remark: this.form.remark
}
: {
remark: this.form.remark,
[isRefuse == 2 ? 'id' : 'ids']: this.ids,
type: isRefuse
}
this.$apis.withdraw[Methods](params) this.$apis.withdraw[Methods](params)
.then(res => { .then(res => {
...@@ -842,7 +911,7 @@ export default { ...@@ -842,7 +911,7 @@ export default {
}) })
}) })
.finally(() => { .finally(() => {
this.handleSearch() this.handleReset()
this.clearSelect() this.clearSelect()
this.checkLoading = false this.checkLoading = false
}) })
...@@ -860,15 +929,23 @@ export default { ...@@ -860,15 +929,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,
ids: this.ids, Methods = select ? 'integralAllpay' : 'integralpay', //true为一键操作
channel: this.payForm.channel, params = select
captcha: this.payForm.captcha, ? {
remark: this.payForm.remark ...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.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 +953,7 @@ export default { ...@@ -876,7 +953,7 @@ export default {
}) })
}) })
.finally(() => { .finally(() => {
this.handleSearch() this.handleReset()
this.cancelPay() this.cancelPay()
this.loading = false this.loading = false
}) })
...@@ -889,10 +966,10 @@ export default { ...@@ -889,10 +966,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 +1032,13 @@ export default { ...@@ -955,6 +1032,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;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!