Commit a742cff4 by 王志慧

fixed

1 parent 32103c8b
...@@ -58,15 +58,15 @@ const integralApprove = params => { ...@@ -58,15 +58,15 @@ const integralApprove = params => {
} }
// 用户积分提现审核/驳回 // 用户积分提现审核/驳回
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({
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
}) })
} }
// 积分提现向管理员发送验证码 // 积分提现向管理员发送验证码
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`
...@@ -92,13 +92,23 @@ const getMerchantList = params => { ...@@ -92,13 +92,23 @@ const getMerchantList = params => {
// 根据id列表获取提现金额(分)合计 // 根据id列表获取提现金额(分)合计
const getAllpayAmount = params => { const getAllpayAmount = 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',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
export default { getList, getAdmin, orderExport, integralpay, integralApprove, integralOut,getSms, getMerchantList,getAllpayAmount } // 用户积分提现明细
const getDetails = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.getById`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getAllpayAmount, getDetails }
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<template v-for="(record, recordIdx) in recordInfo.operationList"> <template v-for="(record, recordIdx) in recordInfo.operationList">
<el-form label-width="154px" :inline="true" :key="recordIdx"> <el-form label-width="154px" :inline="true" :key="recordIdx">
<el-row v-for="(item, index) in operationDataRow" :key="index"> <el-row v-for="(item, index) in operationDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label + ':'" class="row-item"> <el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label[record.type] + ':'" class="row-item">
<span v-if="subItem.addHtml" class="flex_sc"> <span v-if="subItem.addHtml" class="flex_sc">
<div class="table_point" :style="{ background: subItem.addHtml(record).color }"></div> <div class="table_point" :style="{ background: subItem.addHtml(record).color }"></div>
{{ subItem.addHtml(record).status }} {{ subItem.addHtml(record).status }}
...@@ -55,6 +55,7 @@ export default { ...@@ -55,6 +55,7 @@ export default {
name: 'DetailDialog', name: 'DetailDialog',
data() { data() {
return { return {
recordInfo: {},
withdrawDataRow: [], withdrawDataRow: [],
paymentDataRow: [], paymentDataRow: [],
operationDataRow: [], operationDataRow: [],
...@@ -69,126 +70,140 @@ export default { ...@@ -69,126 +70,140 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
recordInfo: { id: {
type: Object, type: Number,
default: () => {} default: 0
} }
}, },
watch: { watch: {
detailVisible(newVal) { detailVisible(newVal) {
this.isVisible = newVal this.isVisible = newVal
this.getDetails()
this.getConfig() this.getConfig()
} }
}, },
computed: {}, computed: {},
mounted() {}, mounted() {},
methods: { methods: {
getDetails() {
this.$apis.withdraw.getDetails({ id: this.id }).then(res => {
this.recordInfo = res
})
},
getConfig() { getConfig() {
let withdrawData = [ this.withdrawData = [
{ {
label: '提现单号', label: '提现单号',
name: 'outSettleOrderId' name: 'outSettleOrderId'
}, },
{ {
label: '客户名称', label: '客户名称',
name: 'customerName' name: 'customerName'
}, },
{ {
label: '客户手机', label: '客户手机',
name: 'customerPhone' name: 'customerPhone'
}, },
{ {
label: '提现积分', label: '提现积分',
name: 'integralAmount' name: 'integralAmount'
}, },
{ {
label: '提现金额', label: '提现金额',
name: 'payAmount', name: 'payAmount',
addHtml: obj => { addHtml: obj => {
return (obj.payAmount / 100).toFixed(2) return (obj.payAmount / 100).toFixed(2)
}
},
{
label: '所属门店',
name: 'merchantName'
},
{
label: '申请时间',
name: 'applyDateStart'
} }
], },
paymentData = [ {
{ label: '所属门店',
label: '收款人姓名', name: 'merchantName'
name: 'name' },
}, {
{ label: '申请时间',
label: '收款人身份证', name: 'applyDateStart'
name: 'idCardNo' }
}, ]
{ this.paymentData = [
label: '收款银行卡号', {
name: 'recvBankCardNo' label: '收款人姓名',
}, name: 'name'
{ },
label: '收款银行', {
name: 'recvBank' label: '收款人身份证',
}, name: 'idCardNo'
{ },
label: '收款手机号', {
name: 'mobile' label: '收款银行卡号',
}, name: 'recvBankCardNo'
{ },
label: '付款渠道', {
name: 'channel' label: '收款银行',
}, name: 'recvBank'
{ },
label: '状态', {
name: 'status', label: '收款手机号',
addHtml: obj => { name: 'mobile'
return { },
status: tableStatus[obj.status], {
color: colors[obj.status] label: '付款渠道',
} name: 'channel'
},
{
label: '状态',
name: 'status',
addHtml: obj => {
return {
status: tableStatus[obj.status],
color: colors[obj.status]
} }
},
{
label: '失败原因',
name: 'errorMessage'
} }
], },
operationData = [ {
{ label: '失败原因',
label: '审核', name: 'errorMessage'
name: 'type', }
addHtml: obj => { ]
return { this.operationData = [
status: tableStatus[obj.type], {
color: colors[obj.type] label: ['审核', '付款', '驳回'],
} name: 'type',
addHtml: obj => {
let status = '--',
color = '#2CCA74'
if (this.recordInfo.status == 1 && obj.type == 0) {
status = '通过'
} else if (this.recordInfo.status == 3 && obj.type == 1) {
status = '通过'
} else {
status = '驳回'
color = '#EB4E4E'
}
return {
status,
color
} }
},
{
label: '审核人',
name: 'createdBy'
},
{
label: '审核时间',
name: 'createdDate'
},
{
label: '备注',
name: 'remark'
} }
] },
{
if (this.recordInfo.status !== 4) { label: ['审核人', '付款人', '操作人'],
this.handleJudgment(paymentData, 'errorMessage') name: 'createdBy'
},
{
label: ['审核时间', '付款时间', '操作时间'],
name: 'createdDate'
},
{
label: ['备注', '备注', '备注'],
name: 'remark'
}
]
if (this.recordInfo.status != 4) {
this.handleJudgment(this.paymentData, 'errorMessage')
} }
this.withdrawData = withdrawData
this.operationData = operationData
this.formToRow('withdrawData') this.formToRow('withdrawData')
this.formToRow('operationData') this.formToRow('operationData')
this.formToRow('paymentData')
}, },
handleJudgment(target, key) { handleJudgment(target, key) {
...@@ -201,8 +216,6 @@ export default { ...@@ -201,8 +216,6 @@ export default {
arr.splice(i, 1) arr.splice(i, 1)
} }
} }
this.paymentData = arr
this.formToRow('paymentData')
}, },
formToRow(formName, numOfRow = 3) { formToRow(formName, numOfRow = 3) {
var rowNum = Math.ceil(this[formName].length / numOfRow) var rowNum = Math.ceil(this[formName].length / numOfRow)
...@@ -237,7 +250,7 @@ export default { ...@@ -237,7 +250,7 @@ export default {
} }
.detail-txt { .detail-txt {
display: inline-block; display: inline-block;
width: 100px; width: 133px;
} }
.edit-title { .edit-title {
font-weight: 600; font-weight: 600;
......
...@@ -26,16 +26,20 @@ ...@@ -26,16 +26,20 @@
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<!-- 审核驳回 --> <!-- 审核驳回 -->
<GLDialog class="gl-form-page gl-form-min" :title="isRefuse != 2 ? '审核' : '驳回'" mode="mid" :visible.sync="showPassDialog" @onOk="comfirmCheck" @onCancel="clearSelect" :close-on-click-modal="false" :before-close="clearSelect"> <GLDialog class="gl-form-page gl-form-min" :title="isRefuse != 2 ? '审核' : '驳回'" mode="mid" :visible.sync="showPassDialog" :close-on-click-modal="false" :before-close="clearSelect">
<el-form ref="form" :model="form" label-width="154px"> <el-form ref="form" :model="form" label-width="154px">
<el-form-item label="备注:"> <el-form-item :label="isRefuse != 2 ? '备注:' : '驳回原因:'">
<el-input type="textarea" v-model="form.remark" :rows="3"></el-input> <el-input type="textarea" v-model="form.remark" :rows="3"></el-input>
</el-form-item> </el-form-item>
<span class="describe" v-if="isRefuse != 2">审核通过后,转账业务单据自动流转至财务确认。</span> <span class="describe" v-if="isRefuse != 2">审核通过后,转账业务单据自动流转至财务确认。</span>
</el-form> </el-form>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="clearSelect">取消</el-button>
<el-button type="primary" size="small" :loading="checkLoading" @click="comfirmCheck">确定</el-button>
</span>
</GLDialog> </GLDialog>
<!-- 付款 --> <!-- 付款 -->
<GLDialog class="gl-form-page gl-form-min" title="付款" mode="mid" :visible.sync="isPay" @onOk="comfirmPay" @onCancel="cancelPay" :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">
<template slot="captcha"> <template slot="captcha">
<div class="captcha-wrap"> <div class="captcha-wrap">
...@@ -46,9 +50,13 @@ ...@@ -46,9 +50,13 @@
</div> </div>
</template> </template>
</glsx-combi-form> </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> </GLDialog>
<!-- 详情 --> <!-- 详情 -->
<detail-dialog :detail-visible="detailVisible" :recordInfo="recordInfo" @dialogClose="dialogClose"></detail-dialog> <detail-dialog :detail-visible="detailVisible" :id="id" @dialogClose="dialogClose"></detail-dialog>
</div> </div>
</template> </template>
...@@ -64,6 +72,9 @@ export default { ...@@ -64,6 +72,9 @@ export default {
}, },
data() { data() {
return { return {
id: '',
checkLoading: false,
loading: false,
colors, colors,
tableStatus, tableStatus,
size: 'small', size: 'small',
...@@ -74,8 +85,9 @@ export default { ...@@ -74,8 +85,9 @@ export default {
customerPhone: '', customerPhone: '',
status: '', status: '',
channel: '', channel: '',
merchantName:'' merchantName: ''
}, },
hasFooter: false,
tableSearchForm: {}, tableSearchForm: {},
showFormData: [ showFormData: [
{ {
...@@ -279,7 +291,7 @@ export default { ...@@ -279,7 +291,7 @@ export default {
}, },
{ {
label: '申请时间', label: '申请时间',
prop: 'applyDateStart', prop: 'createdDate',
width: '200px' width: '200px'
}, },
{ {
...@@ -326,10 +338,6 @@ export default { ...@@ -326,10 +338,6 @@ export default {
], ],
channelList: [ channelList: [
{ {
confId: 'LG',
confLabel: '拓博'
},
{
confId: 'TXIAT', confId: 'TXIAT',
confLabel: '熠轩' confLabel: '熠轩'
} }
...@@ -349,7 +357,7 @@ export default { ...@@ -349,7 +357,7 @@ export default {
payForm: { payForm: {
payMoney: '', payMoney: '',
admin: '', admin: '',
channel: 'LG', channel: 'TXIAT',
captcha: '', captcha: '',
remark: '' remark: ''
}, },
...@@ -402,7 +410,14 @@ export default { ...@@ -402,7 +410,14 @@ export default {
} }
} }
}, },
watch: {
'searchForm.customerPhone'(newVal) {
if(isNaN(Number(newVal))) {
this.searchForm.customerPhone=newVal.replace(/[^\d]/g,'')
}
}
},
mounted() { mounted() {
this.$utils.getOptionsList(this, 'showFormData') this.$utils.getOptionsList(this, 'showFormData')
this.getMerchantList() this.getMerchantList()
...@@ -428,7 +443,7 @@ export default { ...@@ -428,7 +443,7 @@ export default {
params.payDateStart = dayjs(this.searchForm.payTimeStr[0]).format('YYYY-MM-DD') + ' 00:00:01' params.payDateStart = dayjs(this.searchForm.payTimeStr[0]).format('YYYY-MM-DD') + ' 00:00:01'
params.payDateEnd = dayjs(this.searchForm.payTimeStr[1]).format('YYYY-MM-DD') + ' 23:59:59' params.payDateEnd = dayjs(this.searchForm.payTimeStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
} }
delete params.payTimeStr, delete params.applyDateStr delete params.payTimeStr, delete params.applyDateStr
return params return params
}, },
...@@ -450,13 +465,13 @@ export default { ...@@ -450,13 +465,13 @@ export default {
customerPhone: '', customerPhone: '',
status: '', status: '',
channel: '', channel: '',
merchantName:'' merchantName: ''
} }
this.handleSearch() this.handleSearch()
}, },
handleDetail(row) { handleDetail(row) {
// console.log(row) // console.log(row)
this.recordInfo = row this.id = row.id
this.detailVisible = true this.detailVisible = true
}, },
exportExcel() { exportExcel() {
...@@ -491,7 +506,6 @@ export default { ...@@ -491,7 +506,6 @@ export default {
//付款 //付款
handlePay(row) { handlePay(row) {
if (row) { if (row) {
console.log(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)
this.$refs.withdrawRef.clearMutiSelect() this.$refs.withdrawRef.clearMutiSelect()
...@@ -509,10 +523,10 @@ export default { ...@@ -509,10 +523,10 @@ export default {
this.isPay = true this.isPay = true
}, },
//获取批量付款的金额 //获取批量付款的金额
getAllpayAmount(){ getAllpayAmount() {
this.$apis.withdraw.getAllpayAmount({ids:this.ids}).then(res=>{ this.$apis.withdraw.getAllpayAmount({ ids: this.ids }).then(res => {
this.payForm.payMoney = (res/ 100).toFixed(2) this.payForm.payMoney = (res / 100).toFixed(2)
}) })
}, },
getAdmin() { getAdmin() {
this.$apis.withdraw.getAdmin({}).then(res => { this.$apis.withdraw.getAdmin({}).then(res => {
...@@ -521,6 +535,7 @@ export default { ...@@ -521,6 +535,7 @@ export default {
}) })
}, },
comfirmCheck() { comfirmCheck() {
this.checkLoading = true
let { isRefuse } = this, let { isRefuse } = this,
Methods = this.isRefuse == 2 ? 'integralOut' : 'integralApprove', Methods = this.isRefuse == 2 ? 'integralOut' : 'integralApprove',
params = { params = {
...@@ -528,7 +543,7 @@ export default { ...@@ -528,7 +543,7 @@ export default {
[isRefuse == 2 ? 'id' : 'ids']: this.ids, [isRefuse == 2 ? 'id' : 'ids']: this.ids,
type: isRefuse type: isRefuse
} }
if (!this.form.remark) return
this.$apis.withdraw[Methods](params) this.$apis.withdraw[Methods](params)
.then(res => { .then(res => {
this.$message({ this.$message({
...@@ -539,6 +554,7 @@ export default { ...@@ -539,6 +554,7 @@ export default {
.finally(() => { .finally(() => {
this.handleSearch() this.handleSearch()
this.clearSelect() this.clearSelect()
this.checkLoading = false
}) })
}, },
clearSelect() { clearSelect() {
...@@ -560,6 +576,7 @@ export default { ...@@ -560,6 +576,7 @@ export default {
captcha: this.payForm.captcha, captcha: this.payForm.captcha,
remark: this.payForm.remark remark: this.payForm.remark
} }
this.loading = true
this.$apis.withdraw this.$apis.withdraw
.integralpay(params) .integralpay(params)
.then(res => { .then(res => {
...@@ -571,6 +588,7 @@ export default { ...@@ -571,6 +588,7 @@ export default {
.finally(() => { .finally(() => {
this.handleSearch() this.handleSearch()
this.cancelPay() this.cancelPay()
this.loading = false
}) })
} }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!