Commit a742cff4 by 王志慧

fixed

1 parent 32103c8b
......@@ -66,7 +66,7 @@ const integralOut = params => {
sign: true,
returnAll: true
})
}
}
// 积分提现向管理员发送验证码
const getSms = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.admin.sms`
......@@ -99,6 +99,16 @@ const getAllpayAmount = params => {
data: params,
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 @@
<template v-for="(record, recordIdx) in recordInfo.operationList">
<el-form label-width="154px" :inline="true" :key="recordIdx">
<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">
<div class="table_point" :style="{ background: subItem.addHtml(record).color }"></div>
{{ subItem.addHtml(record).status }}
......@@ -55,6 +55,7 @@ export default {
name: 'DetailDialog',
data() {
return {
recordInfo: {},
withdrawDataRow: [],
paymentDataRow: [],
operationDataRow: [],
......@@ -69,22 +70,28 @@ export default {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => {}
id: {
type: Number,
default: 0
}
},
watch: {
detailVisible(newVal) {
this.isVisible = newVal
this.getDetails()
this.getConfig()
}
},
computed: {},
mounted() {},
methods: {
getDetails() {
this.$apis.withdraw.getDetails({ id: this.id }).then(res => {
this.recordInfo = res
})
},
getConfig() {
let withdrawData = [
this.withdrawData = [
{
label: '提现单号',
name: 'outSettleOrderId'
......@@ -116,8 +123,8 @@ export default {
label: '申请时间',
name: 'applyDateStart'
}
],
paymentData = [
]
this.paymentData = [
{
label: '收款人姓名',
name: 'name'
......@@ -156,39 +163,47 @@ export default {
label: '失败原因',
name: 'errorMessage'
}
],
operationData = [
]
this.operationData = [
{
label: '审核',
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: tableStatus[obj.type],
color: colors[obj.type]
status,
color
}
}
},
{
label: '审核人',
label: ['审核人', '付款人', '操作人'],
name: 'createdBy'
},
{
label: '审核时间',
label: ['审核时间', '付款时间', '操作时间'],
name: 'createdDate'
},
{
label: '备注',
label: ['备注', '备注', '备注'],
name: 'remark'
}
]
if (this.recordInfo.status !== 4) {
this.handleJudgment(paymentData, 'errorMessage')
if (this.recordInfo.status != 4) {
this.handleJudgment(this.paymentData, 'errorMessage')
}
this.withdrawData = withdrawData
this.operationData = operationData
this.formToRow('withdrawData')
this.formToRow('operationData')
this.formToRow('paymentData')
},
handleJudgment(target, key) {
......@@ -201,8 +216,6 @@ export default {
arr.splice(i, 1)
}
}
this.paymentData = arr
this.formToRow('paymentData')
},
formToRow(formName, numOfRow = 3) {
var rowNum = Math.ceil(this[formName].length / numOfRow)
......@@ -237,7 +250,7 @@ export default {
}
.detail-txt {
display: inline-block;
width: 100px;
width: 133px;
}
.edit-title {
font-weight: 600;
......
......@@ -26,16 +26,20 @@
<!-- 表格区域 end -->
</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-item label="备注:">
<el-form-item :label="isRefuse != 2 ? '备注:' : '驳回原因:'">
<el-input type="textarea" v-model="form.remark" :rows="3"></el-input>
</el-form-item>
<span class="describe" v-if="isRefuse != 2">审核通过后,转账业务单据自动流转至财务确认。</span>
</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 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">
<template slot="captcha">
<div class="captcha-wrap">
......@@ -46,9 +50,13 @@
</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>
<!-- 详情 -->
<detail-dialog :detail-visible="detailVisible" :recordInfo="recordInfo" @dialogClose="dialogClose"></detail-dialog>
<detail-dialog :detail-visible="detailVisible" :id="id" @dialogClose="dialogClose"></detail-dialog>
</div>
</template>
......@@ -64,6 +72,9 @@ export default {
},
data() {
return {
id: '',
checkLoading: false,
loading: false,
colors,
tableStatus,
size: 'small',
......@@ -74,8 +85,9 @@ export default {
customerPhone: '',
status: '',
channel: '',
merchantName:''
merchantName: ''
},
hasFooter: false,
tableSearchForm: {},
showFormData: [
{
......@@ -279,7 +291,7 @@ export default {
},
{
label: '申请时间',
prop: 'applyDateStart',
prop: 'createdDate',
width: '200px'
},
{
......@@ -326,10 +338,6 @@ export default {
],
channelList: [
{
confId: 'LG',
confLabel: '拓博'
},
{
confId: 'TXIAT',
confLabel: '熠轩'
}
......@@ -349,7 +357,7 @@ export default {
payForm: {
payMoney: '',
admin: '',
channel: 'LG',
channel: 'TXIAT',
captcha: '',
remark: ''
},
......@@ -402,7 +410,14 @@ export default {
}
}
},
watch: {
'searchForm.customerPhone'(newVal) {
if(isNaN(Number(newVal))) {
this.searchForm.customerPhone=newVal.replace(/[^\d]/g,'')
}
}
},
mounted() {
this.$utils.getOptionsList(this, 'showFormData')
this.getMerchantList()
......@@ -450,13 +465,13 @@ export default {
customerPhone: '',
status: '',
channel: '',
merchantName:''
merchantName: ''
}
this.handleSearch()
},
handleDetail(row) {
// console.log(row)
this.recordInfo = row
this.id = row.id
this.detailVisible = true
},
exportExcel() {
......@@ -491,7 +506,6 @@ export default {
//付款
handlePay(row) {
if (row) {
console.log(row)
this.ids = [row.id]
this.payForm.payMoney = (row.payAmount / 100).toFixed(2)
this.$refs.withdrawRef.clearMutiSelect()
......@@ -509,9 +523,9 @@ export default {
this.isPay = true
},
//获取批量付款的金额
getAllpayAmount(){
this.$apis.withdraw.getAllpayAmount({ids:this.ids}).then(res=>{
this.payForm.payMoney = (res/ 100).toFixed(2)
getAllpayAmount() {
this.$apis.withdraw.getAllpayAmount({ ids: this.ids }).then(res => {
this.payForm.payMoney = (res / 100).toFixed(2)
})
},
getAdmin() {
......@@ -521,6 +535,7 @@ export default {
})
},
comfirmCheck() {
this.checkLoading = true
let { isRefuse } = this,
Methods = this.isRefuse == 2 ? 'integralOut' : 'integralApprove',
params = {
......@@ -528,7 +543,7 @@ export default {
[isRefuse == 2 ? 'id' : 'ids']: this.ids,
type: isRefuse
}
if (!this.form.remark) return
this.$apis.withdraw[Methods](params)
.then(res => {
this.$message({
......@@ -539,6 +554,7 @@ export default {
.finally(() => {
this.handleSearch()
this.clearSelect()
this.checkLoading = false
})
},
clearSelect() {
......@@ -560,6 +576,7 @@ export default {
captcha: this.payForm.captcha,
remark: this.payForm.remark
}
this.loading = true
this.$apis.withdraw
.integralpay(params)
.then(res => {
......@@ -571,6 +588,7 @@ export default {
.finally(() => {
this.handleSearch()
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!