Commit de6049c9 by wangzhihui

积分审批

1 parent d0dfde16
...@@ -199,4 +199,87 @@ const checkRecordsTransferType = params => { ...@@ -199,4 +199,87 @@ const checkRecordsTransferType = params => {
}) })
} }
export default { getPayAmount,getAllPayAmount, integralAllOut, integralAllpay, getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getDetails, uploadXlsx, handleSaveImport, getBalance, getSettleAmount,getChannel ,checkRecordsTransferType}
// 积分提现 生成批次
const integralorderBatch = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.approval.generate`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 生成审批-数据统计
const generateBatchCount = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.approval.generate.count`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 操作记录列表查询
const getApprovalLog = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.approval.log`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 积分提现审批分页查询
const getApprovalPage = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.approval.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 付款OA审批提交
const applyApprovalOA = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.approval.oa.apply`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 查询支付主体列表
const getPaymentEntityList = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.approval.payment.entity`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 移除审批积分提现记录
const removeApproval = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.approval.remove`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default {removeApproval,getPaymentEntityList,applyApprovalOA,getApprovalLog,getApprovalPage,generateBatchCount, integralorderBatch,getPayAmount,getAllPayAmount, integralAllOut, integralAllpay, getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getDetails, uploadXlsx, handleSaveImport, getBalance, getSettleAmount,getChannel ,checkRecordsTransferType}
...@@ -66,7 +66,9 @@ const channelObj = { ...@@ -66,7 +66,9 @@ const channelObj = {
'YUNHUO': '云获(嘀加)-银行卡', 'YUNHUO': '云获(嘀加)-银行卡',
"YUNHUO-ZY": '云获(中赢)-银行卡', "YUNHUO-ZY": '云获(中赢)-银行卡',
'YUNHUO-WX': '云获(中赢)-微信', 'YUNHUO-WX': '云获(中赢)-微信',
'SHENBIANYUN':'身边云-银行卡' 'SHENBIANYUN':'身边云-银行卡',
'BIRDWORK':'智鸟-银行卡',
'SHENBIANYUN_JX':'身边云(江西)-银行卡'
} }
export default { export default {
name: 'DetailDialog', name: 'DetailDialog',
......
<!-- 付款审批 -->
<template>
<GLDialog class="gl-form-page gl-form-min payWrap" title="付款审批" mode="mid" :visible.sync="isVisible" :close-on-click-modal="false" :before-close="cancelPay">
<glsx-combi-form formRef="payChildRef" defaultWidth="284px" ref="payFormRef" :formObj="payForm" :formData="payFormData" :formRules="payRule">
<template slot="captcha">
<div class="captcha-wrap">
<el-input v-model="payForm.captcha" placeholder="请输入"></el-input>
<div class="captcha-text" @click.prevent="getCode">
{{ !isCodeDisabled ? '获取验证码' : count + 's' }}
</div>
</div>
</template>
</glsx-combi-form>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="cancelPay">取消</el-button>
<el-button type="primary" size="small" :loading="loading" @click="comfirmPay">确定</el-button>
</span>
</GLDialog>
</template>
<script>
export default {
data() {
return {
isVisible: false,
count: '',
timer: null,
isCodeDisabled: false,
payForm: {
transferType: '',
withdrawalSource: '',
payMoney: '',
admin: '',
channel: '',
captcha: '',
remark: '',
channelProvider: ''
},
payFormData: [
{
label: '此次付款渠道',
name: 'channel',
type: 'select',
optionsName: 'payChannelList',
optionId: 'channel',
optionLabel: 'channelName',
changeAttr: val => {
console.log(val)
this.getAdmin()
this.isCodeDisabled = false
clearInterval(this.timer)
this.timer = null
this.payForm.captcha = ''
}
},
{
label: '此次付款主体',
name: 'withdrawalSource',
type: 'select',
optionsName: 'PayerelList',
optionId: 'confId',
optionLabel: 'confLabel',
changeAttr: val => {}
},
{
label: '批次号',
name: 'batchNo',
addHtml: 'batchNo'
},
{
label: '积分总额',
name: 'payMoney',
addHtml: 'batchNo'
},
{
label: '付款总额/元',
name: 'payMoney',
addHtml: 'batchNo'
},
{
label: '税点',
name: 'payMoney',
addHtml: 'batchNo'
},
{
label: '管理员',
name: 'admin',
type: 'select',
optionsName: 'adminList',
optionId: 'adminId',
optionLabel: 'adminName',
changeAttr: val => {
this.payForm.phone = val
this.isCodeDisabled = false
clearInterval(this.timer)
this.timer = null
this.payForm.captcha = ''
}
},
{
label: '验证码',
addHtml: 'captcha',
name: 'captcha'
},
{
label: '发票及其他说明',
name: 'remark',
type: 'input',
inputType: 'textarea',
maxlength: 200
},
{
label: '备注',
name: 'remark',
type: 'input',
inputType: 'textarea',
maxlength: 50
}
],
payRule: {
admin: [{ required: true, message: '请选择管理员', trigger: 'change' }],
channel: [{ required: true, message: '请选择付款渠道', trigger: 'change' }],
withdrawalSource: [{ required: true, message: '请选择付款主体', trigger: 'change' }],
captcha: [{ required: true, message: '请输入验证码', trigger: 'blur' }]
},
// 基本数据
baseData: {
payChannelList: [],
//付款主体
PayerelList: [
{
confId: '深圳广联数科科技有限公司',
confLabel: '深圳广联数科科技有限公司'
},
{
confId: '深圳市嘀加智慧云服务有限公司',
confLabel: '深圳市嘀加智慧云服务有限公司'
}
]
}
}
},
props: {
payVisible: { type: Boolean, default: false },
recordInfo: {
type: Object,
default: () => {
return {}
}
}
},
watch: {
payVisible(newVal) {
console.log(newVal)
this.isVisible = newVal
if (newVal) {
this.getChannel()
this.$utils.getOptionsList(this, 'payFormData', false)
}
}
},
mounted() {},
methods: {
//积分提现获取业务对应的付款渠道
getChannel(transferType) {
this.$apis.withdraw
.getChannel({
transferType: this.recordInfo.transferType,
mode: this.recordInfo.mode,
isBatch: 1
})
.then(res => {
if (res) {
this.baseData.payChannelList = res
this.$utils.getOptionsList(this, 'payFormData', false, 'channel')
//默认选择
if (this.baseData.payChannelList.length > 0) {
this.payForm.channel = this.baseData.payChannelList[0].channel
}
this.getAdmin()
}
})
},
getAdmin() {
this.$apis.withdraw.getAdmin({ channel: this.payForm.channel }).then(res => {
if (res) {
this.baseData.adminList = res.map(item => {
return {
adminId: `${item.phone}`,
adminName: `${item.name} ${item.phone}`,
name: item.name,
phone: item.phone
}
})
this.$utils.getOptionsList(this, 'payFormData', false, 'admin')
this.payForm.admin = this.baseData.adminList[0].adminId
this.payForm.phone = this.baseData.adminList[0].phone
}
})
},
//付款
comfirmPay() {
// this.$refs.payFormRef.$refs.payChildRef.validate(valid => {
// if (valid) {
// }
// })
},
cancelPay() {
this.ids = ''
this.payForm = {
payMoney: '',
admin: '',
channel: '',
captcha: '',
remark: ''
}
this.isCodeDisabled = false
clearInterval(this.timer)
this.timer = null
this.$emit('cancelPay')
},
getCode() {
if (this.isCodeDisabled) return
if (!this.timer) {
this.count = 60
// var params = {
// phoneType: 'RG',
// phone: this.ruleForm.registerPhone
// }
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)
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
.payWrap {
/deep/ {
.el-form--inline .el-form-item {
display: block;
}
}
.captcha-wrap {
.captcha-text {
font-size: 12px;
color: #5850ff;
position: absolute;
right: 0;
top: 2px;
margin-right: 10px;
cursor: pointer;
width: 100px;
height: 32px;
text-align: right;
}
}
}
</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!