Commit d28247c8 by 前端

Merge branch 'SAAS+V4.45-0926' into 'master'

上线合并

See merge request !11
2 parents a9a09075 9d0ca014
......@@ -13391,7 +13391,7 @@
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
......@@ -13403,7 +13403,7 @@
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
......@@ -13413,7 +13413,7 @@
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
......@@ -13424,7 +13424,7 @@
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
......@@ -13434,21 +13434,21 @@
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
......
......@@ -181,4 +181,22 @@ const getAllPayAmount = params => {
data: params
})
}
export default { getPayAmount,getAllPayAmount, integralAllOut, integralAllpay, getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getDetails, uploadXlsx, handleSaveImport, getBalance, getSettleAmount }
//积分提现获取业务对应的付款渠道
const getChannel = params => {
params.method = 'scrm.api.shopmall.integral.transfer.out.getChannel'
return http({
url: 'rop-scrm-shopmall/router',
data: params
})
}
// 积分提现根据所选记录或者查询参数校验记录列表是否是同一个提现类型
const checkRecordsTransferType = params => {
params.method = 'scrm.api.shopmall.integral.transfer.out.check.records.transferType'
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,getChannel ,checkRecordsTransferType}
......@@ -56,7 +56,7 @@ const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E']
const channelObj={
'TXIAT':'熠轩',
// 'XYJ':'薪遇见',
'ZX':'中雄',
'YUNHUO':'云获'
}
export default {
......
......@@ -7,11 +7,9 @@
<div class="statistics">
累计结算金额:熠轩
<span class="price">{{ settleAmount.yiXuanSettleAmount }}</span>
元,
<!-- 薪遇见
<span class="price">{{ settleAmount.xyjSettleAmount }}</span>
元, -->
云获
元, 中雄
<span class="price">{{ settleAmount.zxSettleAmount }}</span>
元, 云获
<span class="price">{{ settleAmount.yunHuoSettleAmount }}</span>
元
</div>
......@@ -57,13 +55,13 @@
</span>
</GLDialog>
<!-- 付款 -->
<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 payWrap" 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" v-if="this.payForm.balance ">
<tempalte slot="balance">
<div class="channelMoney">
可用余额:
<span class="price">{{ this.payForm.balance }}</span>
元
<template v-if="this.payForm.balance != '-'">元</template>
</div>
</tempalte>
<template slot="captcha">
......@@ -451,10 +449,10 @@ export default {
confId: 'TXIAT',
confLabel: '熠轩'
},
// {
// confId: 'XYJ',
// confLabel: '薪遇见'
// },
{
confId: 'ZX',
confLabel: '中雄'
},
{
confId: 'YUNHUO',
confLabel: '云获'
......@@ -473,7 +471,8 @@ export default {
confId: '2',
confLabel: '阳光激励'
}
]
],
payChannelList: []
},
showPassDialog: false,
form: {
......@@ -487,6 +486,7 @@ export default {
count: '',
timer: null,
payForm: {
transferType: '',
payMoney: '',
admin: '',
channel: '',
......@@ -503,28 +503,16 @@ export default {
},
{
label: '付款渠道',
type: 'select',
type: 'radio',
name: 'channel',
optionId: 'confId',
optionLabel: 'confLabel',
optionList: [
// {
// confId: 'TXIAT',
// confLabel: '熠轩'
// },
// {
// confId: 'XYJ',
// confLabel: '薪遇见'
// },
{
confId: 'YUNHUO',
confLabel: '云获'
}
]
optionId: 'channel',
optionLabel: 'channelName',
optionsName: 'payChannelList',
optionList: []
},
{
label: '',
name: 'admin',
name: 'balance',
type: 'input',
addHtml: 'balance'
},
......@@ -581,7 +569,10 @@ export default {
}
},
'payForm.channel'(newVal) {
if (newVal) this.getBalance()
if (newVal) {
this.getBalance()
this.getAdmin()
}
}
},
mounted() {
......@@ -599,6 +590,9 @@ export default {
if (index == 0) {
this.handleCheck()
} else if (index == 1) {
//付款前校验记录列表是否是同一个提现类型
this.payForm.transferType = await this.checkRecordsTransferType(type)
this.handlePay()
}
}
......@@ -608,10 +602,9 @@ export default {
getAllPayAmount(index, type) {
return new Promise(resolve => {
let key = index == 0 ? 'canApprove' : 'canPay',
params = {},
Method = type == 'batch' ? 'getPayAmount' : 'getAllPayAmount',
textErr = ['请选择待审核的提现记录', '请选择已审核或受理失败的提现记录']
let params = {}
if (type == 'batch') {
if (!this.ids || this.ids.length == 0) {
this.$message.error(textErr[index])
......@@ -638,6 +631,27 @@ export default {
})
})
},
isZeroTrue(value) {
return value === 0 ? true : Boolean(value)
},
checkRecordsTransferType(type) {
return new Promise(resolve => {
let params = {}
if (type == 'batch') {
params.ids = this.ids
} else {
params = {
...this.tableSearchForm
}
}
this.$apis.withdraw.checkRecordsTransferType(params).then(res => {
console.log(res)
if (this.isZeroTrue(res)) {
resolve(res)
}
})
})
},
getSettleAmount() {
this.$apis.withdraw.getSettleAmount({}).then(res => {
this.settleAmount = res
......@@ -868,20 +882,50 @@ export default {
this.operaForm.select = false
this.ids = [row.id]
this.payForm.payMoney = (row.payAmount / 100).toFixed(2)
this.payForm.transferType = row.transferType
}
this.getAdmin()
// this.getBalance()
// this.payForm.channel= 'TXIAT',
this.getChannel()
this.isPay = true
},
getAdmin() {
this.$apis.withdraw.getAdmin({}).then(res => {
this.payForm.admin = `${res.name} ${res.phone}`
this.$apis.withdraw.getAdmin({ channel: this.payForm.channel }).then(res => {
let data
if (res) {
data = res[0]
this.payForm.admin = `${data.name} ${data.phone}`
this.payForm.phone = data.phone
}
})
},
//积分提现获取业务对应的付款渠道
getChannel(transferType) {
this.$apis.withdraw
.getChannel({
transferType: this.payForm.transferType
})
.then(res => {
if (res) {
this.baseData.payChannelList = res
this.$utils.getOptionsList(this, 'payFormData', false, 'channel')
//默认选择
this.payForm.channel = res[0].channel
}
})
},
getBalance() {
this.$apis.withdraw.getBalance({ channel: this.payForm.channel }).then(res => {
this.payForm.balance = res
if (res) {
this.payForm.balance = res
} else {
this.payForm.balance = '-'
}
// this.payFormData.forEach((item, index) => {
// if (item.name == 'balance') {
// item.isHide = !res
// // this.$set(this.payFormData, index, item)
// }
// })
})
},
comfirmCheck() {
......@@ -938,12 +982,14 @@ export default {
Methods = select ? 'integralAllpay' : 'integralpay', //true为一键操作
params = select
? {
phone: this.payForm.phone,
...this.tableSearchForm,
payChannel: this.payForm.channel,
captcha: this.payForm.captcha,
remark: this.payForm.remark
}
: {
phone: this.payForm.phone,
ids: this.ids,
channel: this.payForm.channel,
captcha: this.payForm.captcha,
......@@ -959,6 +1005,7 @@ export default {
})
.finally(() => {
this.handleReset()
this.getSettleAmount()
this.cancelPay()
this.loading = false
})
......@@ -976,6 +1023,9 @@ export default {
remark: '',
balance: ''
}
this.isCodeDisabled = false
clearInterval(this.timer)
this.timer = null
this.$refs.withdrawRef.clearMutiSelect()
},
......@@ -987,21 +1037,28 @@ export default {
// phoneType: 'RG',
// phone: this.ruleForm.registerPhone
// }
this.$apis.withdraw.getSms({}).then(res => {
if (res.code == 200) {
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)
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)
}
})
}
}
}
......@@ -1052,13 +1109,12 @@ export default {
font-size: 14px;
color: #999999;
}
.channelMoney {
position: relative;
font-size: 12px;
margin-left: 154px;
color: #999999;
right: 322px;
top: 35px;
margin-bottom: 20px;
margin-top: -20px;
.price {
color: #333333;
}
......@@ -1160,4 +1216,11 @@ export default {
}
}
}
.payWrap {
/deep/ {
.el-form--inline .el-form-item {
display: block;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!