Commit 6387276b by wangzhihui

积分提现审批

1 parent 19c29cf9
...@@ -276,8 +276,7 @@ const getPaymentEntityList = params => { ...@@ -276,8 +276,7 @@ const getPaymentEntityList = params => {
url: 'rop-scrm-shopmall/router', url: 'rop-scrm-shopmall/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true
returnAll: true
}) })
} }
// 移除审批积分提现记录 // 移除审批积分提现记录
...@@ -291,4 +290,16 @@ const removeApproval = params => { ...@@ -291,4 +290,16 @@ const removeApproval = params => {
returnAll: 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}
// 积分提现获取付款渠道收款账号
const getChannelAccount = (params={}) => {
params.method = `scrm.api.shopmall.integral.transfer.out.getChannel.account`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default {getChannelAccount,approvalDetail,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}
export const colors = ['#B8B8B8', '#F59619', '#2CCA74', '#EB4E4EFF', '#2CCA74FF', '#EB4E4EFF']
export const tableStatus = ['待审批', '审批中', '审批通过', '审批驳回', '已付款', '到账异常']
export const operate_status = {
1: '付款审核',
2: '批次关闭',
3: 'OA审批',
4: '渠道到账',
5: '渠道付款'
}
export const modeTypeList = [
{
confId: '0',
confLabel: '银行卡'
},
{
confId: '1',
confLabel: '微信'
}
]
export const sourceList = [
{
confId: '0',
confLabel: '车生活助手'
},
{
confId: '1',
confLabel: '系统导入'
},
{
confId: '2',
confLabel: '生意助手员工版'
},
{
confId: '3',
confLabel: '门店助手'
}
]
export const withdrawalTypeList = [
{
confId: '0',
confLabel: '积分提现'
},
{
confId: '1',
confLabel: '普通提现'
},
{
confId: '2',
confLabel: '阳光激励'
}
]
export const PayerelList = [
{
confId: '深圳广联数科科技有限公司',
confLabel: '深圳广联数科科技有限公司'
},
{
confId: '深圳市嘀加智慧云服务有限公司',
confLabel: '深圳市嘀加智慧云服务有限公司'
},
{
confId: '深圳市优加智汇科技有限公司',
confLabel: '深圳市优加智汇科技有限公司'
}
]
export const statusList = [
{
confId: '0',
confLabel: '待审批'
},
{
confId: '1',
confLabel: '审批中'
},
{
confId: '2',
confLabel: '审批通过'
},
{
confId: '3',
confLabel: '已驳回'
},
{
confId: '4',
confLabel: '已付款'
},
{
confId: '5',
confLabel: '到账异常'
}
]
export const channelList = [
{
confId: 'BIRDWORK',
confLabel: '智鸟-银行卡'
},
{
confId: 'SHENBIANYUN_JX',
confLabel: '身边云(江西)-银行卡'
}
]
export const auditStatusStatusList = [
{
confId: '0',
confLabel: '待审核'
},
{
confId: '1',
confLabel: '已审核'
},
{
confId: '2',
confLabel: '第三方处理'
},
{
confId: '3',
confLabel: '成功'
},
{
confId: '4',
confLabel: '失败'
},
{
confId: '5',
confLabel: '驳回'
},
{
confId: '6',
confLabel: '受理失败'
}
]
export const channelObj = {
'TXIAT': '熠轩-银行卡',
'ZX': '中雄-银行卡',
'YUNHUO': '云获(嘀加)-银行卡',
"YUNHUO-ZY": '云获(中赢)-银行卡',
'YUNHUO-WX': '云获(中赢)-微信',
'SHENBIANYUN':'身边云-银行卡',
'BIRDWORK':'智鸟-银行卡',
'SHENBIANYUN_JX':'身边云(江西)-银行卡'
}
...@@ -17,18 +17,16 @@ ...@@ -17,18 +17,16 @@
</div> </div>
<!-- 详情 --> <!-- 详情 -->
<detail-dialog :detail-visible="detailVisible" :id="id" @dialogClose="dialogClose"></detail-dialog> <detail-dialog :detail-visible="detailVisible" :id="id" @dialogClose="dialogClose"></detail-dialog>
<pay-approval :payVisible="payVisible" :id="id" @cancelPay="cancelPay"></pay-approval> <pay-approval :payVisible="payVisible" :recordInfo="recordInfo" @cancelPay="cancelPay"></pay-approval>
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import util from '@/utils/index'
import DetailDialog from './approveView.vue' import DetailDialog from './approveView.vue'
import PayApproval from './payApproval.vue' import PayApproval from './payApproval.vue'
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E', '#2CCA74'] import { colors, tableStatus,PayerelList,channelList,statusList } from '@/utils/constants.js'
const tableStatus = ['待审批', '审批中', '审批通过', '审批驳回', '已付款', '到账异常']
export default { export default {
components: { components: {
DetailDialog, DetailDialog,
...@@ -48,7 +46,6 @@ export default { ...@@ -48,7 +46,6 @@ export default {
url: url, url: url,
searchForm: { searchForm: {
batchNo: '', batchNo: '',
paymentSubject: '',
paymentChannel: '', paymentChannel: '',
approvalTime: [], approvalTime: [],
oaApprovalTime: [], oaApprovalTime: [],
...@@ -65,6 +62,13 @@ export default { ...@@ -65,6 +62,13 @@ export default {
maxlength: 20 maxlength: 20
}, },
{ {
label: 'OA审批编号',
name: 'oaSpNo',
type: 'input',
isClear: true,
maxlength: 20
},
{
label: '付款渠道', label: '付款渠道',
name: 'paymentChannel', name: 'paymentChannel',
type: 'select', type: 'select',
...@@ -188,7 +192,7 @@ export default { ...@@ -188,7 +192,7 @@ export default {
} }
], ],
// 表格 // 表格
getListApi: this.$apis.withdraw.getList, getListApi: this.$apis.withdraw.getApprovalPage,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: { tableOption: {
...@@ -197,17 +201,18 @@ export default { ...@@ -197,17 +201,18 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '批次号', label: '批次号',
prop: 'batchNo' prop: 'batchNo',
width: 120
}, },
{ {
label: '客户数量', label: '客户数量',
prop: 'customerCount', prop: 'customerCount',
width: 110, width: 110
}, },
{ {
label: '积分总额', label: '积分总额',
prop: 'pointTotal', prop: 'pointTotal',
width: 110, width: 110
}, },
{ {
label: '付款总额/元', label: '付款总额/元',
...@@ -220,20 +225,12 @@ export default { ...@@ -220,20 +225,12 @@ export default {
{ {
label: '付款渠道', label: '付款渠道',
prop: 'paymentChannel', prop: 'paymentChannel',
width: '200px', width: '200px'
formatter: cellValue => {
let arr = this.baseData.channelList.filter(item => item.confId == cellValue.paymentChannel)
return arr.length > 0 ? arr[0].label : '--'
}
}, },
{ {
label: '付款主体', label: '付款主体',
prop: 'paymentSubject', prop: 'paymentSubject',
width: '200px', width: '200px'
// formatter: cellValue => {
// let arr = this.baseData.withdrawalTypeList.filter(item => item.confId == cellValue.transferType)
// return arr.length > 0 ? arr[0].confLabel : '--'
// }
}, },
{ {
...@@ -244,12 +241,12 @@ export default { ...@@ -244,12 +241,12 @@ export default {
}, },
{ {
label: '批次生成时间', label: '批次生成时间',
prop: 'updatedDate', prop: 'createdDate',
width: 150 width: 150
}, },
{ {
label: '审批人', label: '审批人',
prop: 'customerName', prop: 'approver',
width: 150 width: 150
}, },
{ {
...@@ -258,8 +255,13 @@ export default { ...@@ -258,8 +255,13 @@ export default {
width: '200px' width: '200px'
}, },
{ {
label: 'OA审批编号',
prop: 'oaSpNo',
width: '200px'
},
{
label: 'OA审批时间', label: 'OA审批时间',
prop: 'oaApprovalTimeStart', prop: 'oaApprovalTime',
line: 1, line: 1,
width: 150 width: 150
}, },
...@@ -280,67 +282,10 @@ export default { ...@@ -280,67 +282,10 @@ export default {
// 基本数据 // 基本数据
baseData: { baseData: {
//付款主体 //付款主体
PayerelList: [ PayerelList,
{
confId: '深圳广联数科科技有限公司',
confLabel: '深圳广联数科科技有限公司'
},
{
confId: '深圳市嘀加智慧云服务有限公司',
confLabel: '深圳市嘀加智慧云服务有限公司'
}
],
merchantList: [], merchantList: [],
statusList: [ statusList,
{ channelList,
confId: '0',
confLabel: '待审批'
},
{
confId: '1',
confLabel: '审批中'
},
{
confId: '2',
confLabel: '审批通过'
},
{
confId: '3',
confLabel: '已驳回'
},
{
confId: '4',
confLabel: '已付款'
},
{
confId: '5',
confLabel: '到账异常'
}
],
channelList: [
{
confId: 'BIRDWORK',
confLabel: '智鸟-银行卡'
},
{
confId: 'SHENBIANYUN_JX',
confLabel: '身边云(江西)-银行卡'
}
],
withdrawalTypeList: [
{
confId: '0',
confLabel: '积分提现'
},
{
confId: '1',
confLabel: '普通提现'
},
{
confId: '2',
confLabel: '阳光激励'
}
]
} }
} }
}, },
...@@ -357,8 +302,8 @@ export default { ...@@ -357,8 +302,8 @@ export default {
this.payVisible = true this.payVisible = true
}, },
cancelPay() { cancelPay() {
console.log('取消')
this.payVisible = false this.payVisible = false
this.handleSearch()
}, },
//查看 //查看
handleDetail(row) { handleDetail(row) {
...@@ -388,15 +333,15 @@ export default { ...@@ -388,15 +333,15 @@ export default {
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.approvalTime) { if (this.searchForm.approvalTime && this.searchForm.approvalTime.length) {
params.approvalTimeStart = dayjs(this.searchForm.approvalTime[0]).format('YYYY-MM-DD') + ' 00:00:01' params.approvalTimeStart = dayjs(this.searchForm.approvalTime[0]).format('YYYY-MM-DD') + ' 00:00:01'
params.approvalTimeEnd = dayjs(this.searchForm.approvalTime[1]).format('YYYY-MM-DD') + ' 23:59:59' params.approvalTimeEnd = dayjs(this.searchForm.approvalTime[1]).format('YYYY-MM-DD') + ' 23:59:59'
} }
if (this.searchForm.userSettleTime) { if (this.searchForm.userSettleTime && this.searchForm.userSettleTime.length) {
params.userSettleTimeStart = dayjs(this.searchForm.userSettleTime[0]).format('YYYY-MM-DD') + ' 00:00:01' params.userSettleTimeStart = dayjs(this.searchForm.userSettleTime[0]).format('YYYY-MM-DD') + ' 00:00:01'
params.userSettleTimeEnd = dayjs(this.searchForm.userSettleTime[1]).format('YYYY-MM-DD') + ' 23:59:59' params.userSettleTimeEnd = dayjs(this.searchForm.userSettleTime[1]).format('YYYY-MM-DD') + ' 23:59:59'
} }
if (this.searchForm.oaApprovalTime) { if (this.searchForm.oaApprovalTime && this.searchForm.oaApprovalTime.length) {
params.oaApprovalTimeStart = dayjs(this.searchForm.oaApprovalTime[0]).format('YYYY-MM-DD') + ' 00:00:01' params.oaApprovalTimeStart = dayjs(this.searchForm.oaApprovalTime[0]).format('YYYY-MM-DD') + ' 00:00:01'
params.oaApprovalTimeEnd = dayjs(this.searchForm.oaApprovalTime[1]).format('YYYY-MM-DD') + ' 23:59:59' params.oaApprovalTimeEnd = dayjs(this.searchForm.oaApprovalTime[1]).format('YYYY-MM-DD') + ' 23:59:59'
} }
...@@ -416,6 +361,7 @@ export default { ...@@ -416,6 +361,7 @@ export default {
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
batchNo: '', batchNo: '',
oaSpNo:'',
paymentSubject: '', paymentSubject: '',
paymentChannel: '', paymentChannel: '',
approvalTime: [], approvalTime: [],
...@@ -444,5 +390,6 @@ export default { ...@@ -444,5 +390,6 @@ export default {
.gl-form-page /deep/ .el-dialog__footer { .gl-form-page /deep/ .el-dialog__footer {
text-align: center !important; text-align: center !important;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -7,12 +7,9 @@ ...@@ -7,12 +7,9 @@
</div> </div>
<div class="container gl-form-page"> <div class="container gl-form-page">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="withdrawRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable"> <GLTable ref="withdrawRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span>{{ tableStatus[scope.scope.status] }}</span>
</div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
...@@ -20,26 +17,18 @@ ...@@ -20,26 +17,18 @@
</template> </template>
<script> <script>
import * as XLSX from 'xlsx'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import util from '@/utils/index' import { modeTypeList } from '@/utils/constants.js'
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回', '受理失败']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E', '#2CCA74']
const tabelHeaderModel = ['商户名称', '商户号', '客户名称', '客户手机号', '提现金额', '收款人姓名', '收款人身份证', '收款银行卡号', '收款银行', '收款人手机号']
export default { export default {
data() { data() {
return { return {
id: '', id: this.$route.query.id,
colors,
tableStatus,
size: 'small', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
customerName: '', customerName: '',
customerPhone:'' customerPhone: ''
}, },
hasFooter: false,
tableSearchForm: {}, tableSearchForm: {},
showFormData: [ showFormData: [
{ {
...@@ -95,71 +84,15 @@ export default { ...@@ -95,71 +84,15 @@ export default {
{ {
label: '提现金额/元', label: '提现金额/元',
prop: 'payAmount', prop: 'payAmount',
width: 100, width: 110,
formatter: cellValue => {
return cellValue.payAmount ? (cellValue.payAmount / 100).toFixed(2) : '--'
}
},
{
label: '收款人姓名',
prop: 'name',
width: '110px'
},
{
label: '收款人身份证',
prop: 'idCardNo',
width: '180px'
},
{
label: '收款银行卡号',
prop: 'recvBankCardNo',
width: 230
},
{
label: '收款银行',
prop: 'recvBank',
line: 1,
width: 150
},
{
label: '收款手机号',
prop: 'mobile',
width: '130px'
},
{
label: '客户名称',
prop: 'customerName',
width: 150
},
{
label: '客户手机号',
prop: 'customerPhone',
width: '140px'
},
{
label: '所属门店',
prop: 'merchantName',
line: 1,
width: 150
},
{
label: '提现积分',
prop: 'integralAmount',
width: 100
},
{
label: '提现金额',
prop: 'payAmount',
width: 100,
formatter: cellValue => { formatter: cellValue => {
return cellValue.payAmount ? (cellValue.payAmount / 100).toFixed(2) : '--' return cellValue.payAmount ? (cellValue.payAmount / 100).toFixed(2) : '--'
} }
}, },
{ {
label: '提现时间', label: '提现时间',
prop: 'updatedDate', prop: 'createdDate',
width: 150 width: 170
}, },
{ {
label: '收款人姓名', label: '收款人姓名',
...@@ -192,16 +125,7 @@ export default { ...@@ -192,16 +125,7 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据 // 基本数据
baseData: { baseData: {
modeTypeList: [ modeTypeList
{
confId: '0',
confLabel: '银行卡'
},
{
confId: '1',
confLabel: '微信'
}
],
} }
} }
}, },
...@@ -209,6 +133,7 @@ export default { ...@@ -209,6 +133,7 @@ export default {
methods: { methods: {
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
params.approvalId=this.id
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
...@@ -223,7 +148,7 @@ export default { ...@@ -223,7 +148,7 @@ export default {
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
customerName: '', customerName: '',
customerPhone:'' customerPhone: ''
} }
this.handleSearch() this.handleSearch()
} }
...@@ -240,8 +165,15 @@ export default { ...@@ -240,8 +165,15 @@ export default {
font-weight: 600; font-weight: 600;
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
} }
} .table-header {
align-items: center;
h2 {
color: #333333;
font-size: 16px;
}
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -14,60 +14,28 @@ ...@@ -14,60 +14,28 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="withdrawRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable"> <GLTable ref="withdrawRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span>{{ tableStatus[scope.scope.status] }}</span>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<!-- 驳回 -->
<GLDialog class="gl-form-page gl-form-min" :title="isAll ? '全部驳回' : '驳回'" mode="mid" :visible.sync="showPassDialog" :close-on-click-modal="false" :before-close="clearSelect">
<div class="remind">
<img class="tip" src="@/assets/tips.png" alt="" />
请填写驳回原因,{{ isAll ? '全部驳回' : '驳回' }}后本批次将关闭,且提现积分原路返回。
</div>
<el-form ref="form" :model="form" label-width="154px" :rules="formRule">
<el-form-item label="驳回原因:" prop="remark" required>
<el-input type="textarea" v-model="form.remark" :rows="3" maxlength="50"></el-input>
</el-form-item>
</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>
</div> </div>
</template> </template>
<script> <script>
import * as XLSX from 'xlsx'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import util from '@/utils/index' import { modeTypeList } from '@/utils/constants.js'
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回', '受理失败']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E', '#2CCA74']
const tabelHeaderModel = ['商户名称', '商户号', '客户名称', '客户手机号', '提现金额', '收款人姓名', '收款人身份证', '收款银行卡号', '收款银行', '收款人手机号']
export default { export default {
data() { data() {
return { return {
id: '', id: this.$route.query.id,
isAll: true,
checkLoading: false,
loading: false,
colors,
tableStatus,
size: 'small', size: 'small',
url: url, url: url,
settleAmount: {},
searchForm: { searchForm: {
customerName: '', customerName: '',
customerPhone: '' customerPhone: ''
}, },
hasFooter: false,
tableSearchForm: {}, tableSearchForm: {},
tableButtonList: [ tableButtonList: [
{ {
...@@ -141,71 +109,15 @@ export default { ...@@ -141,71 +109,15 @@ export default {
{ {
label: '提现金额/元', label: '提现金额/元',
prop: 'payAmount', prop: 'payAmount',
width: 100, width: 110,
formatter: cellValue => {
return cellValue.payAmount ? (cellValue.payAmount / 100).toFixed(2) : '--'
}
},
{
label: '收款人姓名',
prop: 'name',
width: '110px'
},
{
label: '收款人身份证',
prop: 'idCardNo',
width: '180px'
},
{
label: '收款银行卡号',
prop: 'recvBankCardNo',
width: 230
},
{
label: '收款银行',
prop: 'recvBank',
line: 1,
width: 150
},
{
label: '收款手机号',
prop: 'mobile',
width: '130px'
},
{
label: '客户名称',
prop: 'customerName',
width: 150
},
{
label: '客户手机号',
prop: 'customerPhone',
width: '140px'
},
{
label: '所属门店',
prop: 'merchantName',
line: 1,
width: 150
},
{
label: '提现积分',
prop: 'integralAmount',
width: 100
},
{
label: '提现金额',
prop: 'payAmount',
width: 100,
formatter: cellValue => { formatter: cellValue => {
return cellValue.payAmount ? (cellValue.payAmount / 100).toFixed(2) : '--' return cellValue.payAmount ? (cellValue.payAmount / 100).toFixed(2) : '--'
} }
}, },
{ {
label: '提现时间', label: '提现时间',
prop: 'updatedDate', prop: 'createdDate',
width: 150 width: 170
}, },
{ {
label: '收款人姓名', label: '收款人姓名',
...@@ -235,25 +147,10 @@ export default { ...@@ -235,25 +147,10 @@ export default {
} }
] ]
}, },
form: {
remark: ''
},
formRule: {
remark: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据 // 基本数据
baseData: { baseData: {
modeTypeList: [ modeTypeList
{
confId: '0',
confLabel: '银行卡'
},
{
confId: '1',
confLabel: '微信'
}
]
} }
} }
}, },
...@@ -266,12 +163,12 @@ export default { ...@@ -266,12 +163,12 @@ export default {
type: isAll ? 2 : 1 type: isAll ? 2 : 1
}, },
Method = 'removeApproval' Method = 'removeApproval'
!isAll ? (params.id = row.id) : '' !isAll ? (params.id = row.id) : (params.id = this.id) //单个移除时传明细id,解散批次时传审批批次id
this.$utils.secondConfirm(this, title, cxt, 'withdraw', Method, params) this.$utils.secondConfirm(this, title, cxt, 'withdraw', Method, params)
}, },
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
params.approvalId = this.id
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
......
...@@ -11,7 +11,11 @@ ...@@ -11,7 +11,11 @@
<span v-if="subItem.addHtml"> <span v-if="subItem.addHtml">
{{ subItem.addHtml(recordInfo) }} {{ subItem.addHtml(recordInfo) }}
</span> </span>
<span v-else class="detail-txt ellipsis-1" :title="recordInfo[subItem.name]">{{ recordInfo[subItem.name] ? recordInfo[subItem.name] + (subItem.suffix || '') : '-' }}</span> <span v-else-if="subItem.addStyle" class="flex_sc">
<div class="table_point" :style="{ background: subItem.addStyle(recordInfo).color }"></div>
{{ subItem.addStyle(recordInfo).status }}
</span>
<span v-else class="detail-txt ellipsis-1" :title="recordInfo[subItem.name]">{{ recordInfo[subItem.name] || recordInfo[subItem.name] === 0 ? recordInfo[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
...@@ -33,50 +37,41 @@ ...@@ -33,50 +37,41 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div v-if="recordInfo.operationList"> <div v-if="operationList&&operationList.length">
<p class="edit-title">操作记录</p> <p class="edit-title">操作记录</p>
<!-- <template v-for="(record, recordIdx) in recordInfo.operationList"> <div class="block">
<el-form label-width="154px" :inline="true" :key="recordIdx"> <el-timeline>
<el-row v-for="(item, index) in operationDataRow" :key="index"> <template v-for="(item, index) in operationList">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label(record) + ':'" class="row-item"> <el-timeline-item :key="index">
<span v-if="subItem.addHtml" class="flex_sc"> <div class="timeline-item">
<div class="table_point" :style="{ background: subItem.addHtml(record).color }"></div> <div class="operation-result">
{{ subItem.addHtml(record).status }} {{item.operationTypetext}}
</span> <span :class="item.active">{{item.operationResult}}</span>
<span v-else class="detail-txt ellipsis-1" :title="record[subItem.name]">{{ record[subItem.name] ? record[subItem.name] + (subItem.suffix || '') : '-' }}</span> </div>
</el-form-item> <div class="operation-Note">{{item.operationNote}}</div>
</el-row> </div>
</el-form> </el-timeline-item>
</template> --> </template>
</el-timeline>
</div>
</div> </div>
</div> </div>
</GLDialog> </GLDialog>
</template> </template>
<script> <script>
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回'] import { colors, tableStatus, operate_status } from '@/utils/constants.js'
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E']
const channelObj = {
TXIAT: '熠轩-银行卡',
ZX: '中雄-银行卡',
YUNHUO: '云获(嘀加)-银行卡',
'YUNHUO-ZY': '云获(中赢)-银行卡',
'YUNHUO-WX': '云获(中赢)-微信',
SHENBIANYUN: '身边云-银行卡'
}
export default { export default {
name: 'DetailDialog', name: 'DetailDialog',
data() { data() {
return { return {
recordInfo: { recordInfo: {},
detail:{}, operationList: [],
operationList:[]
},
withdrawDataRow: [], withdrawDataRow: [],
paymentDataRow: [], paymentDataRow: [],
operationDataRow: [],
withdrawData: [], withdrawData: [],
paymentData: [], paymentData: [],
operationData: [],
isVisible: this.detailVisible isVisible: this.detailVisible
} }
}, },
...@@ -101,35 +96,51 @@ export default { ...@@ -101,35 +96,51 @@ export default {
methods: { methods: {
getDetails() { getDetails() {
this.$apis.withdraw.approvalDetail({ id: this.id }).then(res => { this.$apis.withdraw.approvalDetail({ id: this.id }).then(res => {
this.recordInfo.detail = res this.recordInfo = res
this.getApprovalLog()
this.getConfig() this.getConfig()
}) })
}, },
getApprovalLog() { getApprovalLog() {
let arr
this.$apis.withdraw.getApprovalLog({ id: this.id }).then(res => { this.$apis.withdraw.getApprovalLog({ id: this.id }).then(res => {
this.recordInfo.operationList = res arr = res.map(item => {
let active,operationTypetext
if (item.operationResult == '审批中') {
active = 'wait'
} else if (item.operationResult == '通过') {
active = 'success'
} else {
active = 'fail'
}
operationTypetext=operate_status[item.operationType]
return {
...item,
active,
operationTypetext
}
})
this.operationList = arr
}) })
}, },
getConfig() { getConfig() {
this.withdrawData = [ this.withdrawData = [
{ {
label: '批次号', label: '批次号',
name: 'batchNo ' name: 'batchNo'
}, },
{ {
label: '客户数量', label: '客户数量',
name: 'customerCount' name: 'customerCount'
}, },
{ {
label: '积分总额:', label: '积分总额',
name: 'pointTotal' name: 'pointTotal'
}, },
{ {
label: '付款总额/元:', label: '付款总额/元',
name: 'paymentTotal', name: 'paymentTotal'
addHtml: obj => {
return obj.paymentTotal ? (obj.paymentTotal / 100).toFixed(2) : '--'
}
}, },
{ {
label: '状态', label: '状态',
...@@ -158,7 +169,6 @@ export default { ...@@ -158,7 +169,6 @@ export default {
} }
] ]
this.formToRow('withdrawData') this.formToRow('withdrawData')
// this.formToRow('operationData')
this.formToRow('paymentData') this.formToRow('paymentData')
}, },
...@@ -226,9 +236,31 @@ export default { ...@@ -226,9 +236,31 @@ export default {
border-radius: 50%; border-radius: 50%;
margin-right: 8px; margin-right: 8px;
} }
.copy { .block {
color: #5850ff; margin-top: 20px;
margin-left: 20px; }
cursor: pointer; .timeline-item {
.operation-result {
color: #1d2129ff;
font-size: 14px;
line-height: 20px;
span {
margin-left: 12px;
}
.success {
color: #2cca74ff;
}
.wait {
color: #f59619ff;
}
.close {
color: #999999ff;
}
}
.operation-Note {
color: #999999ff;
font-size: 12px;
margin-top: 4px;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div v-if="recordInfo.operationList"> <div v-if="recordInfo.operationList&&recordInfo.operationList.length">
<p class="edit-title">操作记录</p> <p class="edit-title">操作记录</p>
<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">
...@@ -60,16 +60,8 @@ ...@@ -60,16 +60,8 @@
<script> <script>
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回'] const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E'] const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E']
const channelObj = {
'TXIAT': '熠轩-银行卡', import { channelObj,sourceList } from '@/utils/constants.js'
'ZX': '中雄-银行卡',
'YUNHUO': '云获(嘀加)-银行卡',
"YUNHUO-ZY": '云获(中赢)-银行卡',
'YUNHUO-WX': '云获(中赢)-微信',
'SHENBIANYUN':'身边云-银行卡',
'BIRDWORK':'智鸟-银行卡',
'SHENBIANYUN_JX':'身边云(江西)-银行卡'
}
export default { export default {
name: 'DetailDialog', name: 'DetailDialog',
data() { data() {
...@@ -82,24 +74,7 @@ export default { ...@@ -82,24 +74,7 @@ export default {
paymentData: [], paymentData: [],
operationData: [], operationData: [],
isVisible: this.detailVisible, isVisible: this.detailVisible,
sourceList: [ sourceList:sourceList
{
confId: '0',
confLabel: '车生活助手'
},
{
confId: '1',
confLabel: '系统导入'
},
{
confId: '2',
confLabel: '生意助手员工版'
},
{
confId: '3',
confLabel: '门店助手'
}
]
} }
}, },
props: { props: {
......
...@@ -45,6 +45,10 @@ ...@@ -45,6 +45,10 @@
<span class="price">{{ settleAmount.shenBianYunBCSettleAmount }}</span> <span class="price">{{ settleAmount.shenBianYunBCSettleAmount }}</span>
元, 身边云(晨景)-银行卡 元, 身边云(晨景)-银行卡
<span class="price">{{ settleAmount.shenBianYunCJSettleAmount }}</span> <span class="price">{{ settleAmount.shenBianYunCJSettleAmount }}</span>
元, 智鸟-银行卡
<span class="price">{{ settleAmount.birdWorkSettleAmount }}</span>
元, 身边云(江西)-银行卡
<span class="price">{{ settleAmount.shenBianYunJXSettleAmount }}</span>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="withdrawRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable"> <GLTable ref="withdrawRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable">
...@@ -53,10 +57,10 @@ ...@@ -53,10 +57,10 @@
<span>{{ tableStatus[scope.scope.status] }}</span> <span>{{ tableStatus[scope.scope.status] }}</span>
</div> </div>
<div slot="idCardNo" slot-scope="scope"> <div slot="idCardNo" slot-scope="scope">
<span class="idCardNo" @click="openIdCardDialog">{{ scope.scope.idCardNo }}</span> <span :class="{ idCardNo: scope.scope.idCardFront }" @click="openIdCardDialog(scope.scope)">{{ scope.scope.idCardNo }}</span>
</div> </div>
<div slot="agreement" slot-scope="scope"> <div slot="agreement" slot-scope="scope">
<span class="agreement" @click="openAgreement(scope.scope)">协议</span> <span :class="{ 'agreement': scope.scope.disclaimerAgreementUrl }" @click="openAgreement(scope.scope.disclaimerAgreementUrl)">{{scope.scope.disclaimerAgreementUrl?'协议':'--'}}</span>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
...@@ -154,13 +158,16 @@ ...@@ -154,13 +158,16 @@
</GLDialog> </GLDialog>
<!-- 身份证 --> <!-- 身份证 -->
<GLDialog class="gl-form-page gl-form-min idCard-dialog" title="身份证图片" mode="mid" :visible.sync="isIdCard" :close-on-click-modal="false" :before-close="CloseIdCard" :hasFooter="hasFooter"> <GLDialog class="gl-form-page gl-form-min idCard-dialog" title="身份证图片" mode="mid" :visible.sync="isIdCard" :close-on-click-modal="false" :before-close="CloseIdCard" :hasFooter="hasFooter">
<!-- <div class="idCard-wrap"> <div class="idCard-wrap">
<div class="idCard-item" v-for="(item, index) in idCardList" :key="index">
<div class="idCard-title">{{ item.label }}</div>
<div class="idCard-img"> <div class="idCard-img">
<img :src="idCardUrl" alt /> <img :src="idCardForm[item.name]" alt class="idCard-img" />
</div>
</div>
</div> </div>
</div> -->
</GLDialog> </GLDialog>
<GLDialog class="gl-form-page gl-form-min idCard-dialog" title="协议" mode="mid" :visible.sync="isAgreement" :close-on-click-modal="false" :before-close="(isAgreement = false)" :hasFooter="hasFooter"> <GLDialog class="gl-form-page gl-form-min" title="协议" mode="big" :visible.sync="isAgreement" :close-on-click-modal="false" :hasFooter="hasFooter">
<iframe width="100%" height="700px" scrolling="yes" frameborder="0" :src="pdfUrl"></iframe> <iframe width="100%" height="700px" scrolling="yes" frameborder="0" :src="pdfUrl"></iframe>
</GLDialog> </GLDialog>
<!-- 详情 --> <!-- 详情 -->
...@@ -174,6 +181,7 @@ import DetailDialog from './detail.vue' ...@@ -174,6 +181,7 @@ import DetailDialog from './detail.vue'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import util from '@/utils/index' import util from '@/utils/index'
import { modeTypeList,auditStatusStatusList,sourceList,withdrawalTypeList } from '@/utils/constants.js'
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回', '受理失败'] const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回', '受理失败']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E', '#2CCA74'] const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E', '#2CCA74']
const tabelHeaderModel = ['商户名称', '商户号', '客户名称', '客户手机号', '提现金额', '收款人姓名', '收款人身份证', '收款银行卡号', '收款银行', '收款人手机号'] const tabelHeaderModel = ['商户名称', '商户号', '客户名称', '客户手机号', '提现金额', '收款人姓名', '收款人身份证', '收款银行卡号', '收款银行', '收款人手机号']
...@@ -194,7 +202,19 @@ export default { ...@@ -194,7 +202,19 @@ export default {
url: url, url: url,
settleAmount: {}, settleAmount: {},
pdfUrl: '', pdfUrl: '',
idCardForm: {},
idCardList: [
{
label: '身份证正面:',
name: 'idCardFront'
},
{
label: '身份证反面:',
name: 'idCardBack'
}
],
searchForm: { searchForm: {
name:'',
outSettleOrderId: '', outSettleOrderId: '',
customerName: '', customerName: '',
customerPhone: '', customerPhone: '',
...@@ -231,7 +251,7 @@ export default { ...@@ -231,7 +251,7 @@ export default {
}, },
{ {
label: '收款人姓名', label: '收款人姓名',
name: 'customerPhone', name: 'name',
type: 'input', type: 'input',
isClear: true, isClear: true,
maxlength: 20 maxlength: 20
...@@ -365,7 +385,7 @@ export default { ...@@ -365,7 +385,7 @@ export default {
fn: '付款' fn: '付款'
}, },
condition: row => { condition: row => {
return row.status == 1 || row.status == 6 return (row.status == 1 || row.status == 6)&&row.transferType!=0
}, },
listeners: { listeners: {
click: row => { click: row => {
...@@ -493,11 +513,11 @@ export default { ...@@ -493,11 +513,11 @@ export default {
}, },
{ {
label: '付款主体', label: '付款主体',
prop: 'withdrawalSource', prop: 'paymentSubject',
width: '200px', width: '200px',
formatter: cellValue => { formatter: cellValue => {
let arr = this.baseData.sourceList.filter(item => item.confId == cellValue.withdrawalSource) // 类型为「积分提现」该提现记录所归属的提现批次审批时选择的付款主体(嘀加/数科),非「积分提现」类型,或「积分提现」待审批,则展示=“-”
return arr.length > 0 ? arr[0].confLabel : '--' cellValue.transferType ==0&&cellValue.status!=0?cellValue.paymentSubject:'--'
} }
}, },
{ {
...@@ -567,36 +587,7 @@ export default { ...@@ -567,36 +587,7 @@ export default {
baseData: { baseData: {
adminList: [], adminList: [],
merchantList: [], merchantList: [],
auditStatusStatusList: [ auditStatusStatusList:auditStatusStatusList,
{
confId: '0',
confLabel: '待审核'
},
{
confId: '1',
confLabel: '已审核'
},
{
confId: '2',
confLabel: '第三方处理'
},
{
confId: '3',
confLabel: '成功'
},
{
confId: '4',
confLabel: '失败'
},
{
confId: '5',
confLabel: '驳回'
},
{
confId: '6',
confLabel: '受理失败'
}
],
channelList: [ channelList: [
{ {
value: 'SHENBIANYUN', value: 'SHENBIANYUN',
...@@ -649,48 +640,9 @@ export default { ...@@ -649,48 +640,9 @@ export default {
label: '身边云(江西)-银行卡' label: '身边云(江西)-银行卡'
} }
], ],
withdrawalTypeList: [ withdrawalTypeList:withdrawalTypeList,
{ modeTypeList:modeTypeList,
confId: '0', sourceList:sourceList,
confLabel: '积分提现'
},
{
confId: '1',
confLabel: '普通提现'
},
{
confId: '2',
confLabel: '阳光激励'
}
],
modeTypeList: [
{
confId: '0',
confLabel: '银行卡'
},
{
confId: '1',
confLabel: '微信'
}
],
sourceList: [
{
confId: '0',
confLabel: '车生活助手'
},
{
confId: '1',
confLabel: '系统导入'
},
{
confId: '2',
confLabel: '生意助手员工版'
},
{
confId: '3',
confLabel: '门店助手'
}
],
payChannelList: [] payChannelList: []
}, },
showPassDialog: false, showPassDialog: false,
...@@ -849,7 +801,7 @@ export default { ...@@ -849,7 +801,7 @@ export default {
async handleAllBatch(all = true) { async handleAllBatch(all = true) {
let title = all ? '全部生成批次提示' : '生成批次提示', let title = all ? '全部生成批次提示' : '生成批次提示',
// cxt = await this.generateBatchCount(all), // cxt = await this.generateBatchCount(all),
cxt='当前共 ${numberOfRecord}条未处理【积分提现】记录,付款金额共', cxt = '当前共 ${numberOfRecord}条未处理【积分提现】记录,付款金额共',
params = { params = {
type: all ? 2 : 1 type: all ? 2 : 1
}, },
...@@ -857,11 +809,18 @@ export default { ...@@ -857,11 +809,18 @@ export default {
!all ? (params.ids = this.ids) : '' !all ? (params.ids = this.ids) : ''
this.$utils.secondConfirm(this, title, cxt, 'withdraw', Method, params) this.$utils.secondConfirm(this, title, cxt, 'withdraw', Method, params)
}, },
openIdCardDialog() { openIdCardDialog(row) {
if (row.idCardFront) {
this.idCardForm = row
console.log( this.idCardForm)
this.isIdCard = true this.isIdCard = true
}
}, },
openAgreement() { //协议
openAgreement(url) {
this.pdfUrl=url
this.isAgreement = true this.isAgreement = true
console.log(this.pdfUrl)
}, },
CloseIdCard() { CloseIdCard() {
this.isIdCard = false this.isIdCard = false
...@@ -1612,6 +1571,23 @@ export default { ...@@ -1612,6 +1571,23 @@ export default {
.agreement { .agreement {
color: #5850ff; color: #5850ff;
font-size: 14px; font-size: 14px;
cursor: pointer;
}
.idCard-wrap {
.idCard-item {
display: flex;
align-items: flex-start;
margin-bottom: 30px;
.idCard-title {
width: 154px;
text-align: right;
}
.idCard-img {
width: 286px;
height: 180px;
border-radius: 4px;
}
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
</div> </div>
</div> </div>
</template> </template>
<template slot="textHtml" slot-scope="scope">
{{ recordInfo[scope.scope.name] }}
</template>
</glsx-combi-form> </glsx-combi-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="cancelPay">取消</el-button> <el-button plain size="small" class="btn-three" @click="cancelPay">取消</el-button>
...@@ -21,31 +24,32 @@ ...@@ -21,31 +24,32 @@
export default { export default {
data() { data() {
return { return {
loading:false,
isVisible: false, isVisible: false,
count: '', count: '',
timer: null, timer: null,
isCodeDisabled: false, isCodeDisabled: false,
payForm: { payForm: {
transferType: '', paymentChannelId: '',
withdrawalSource: '', paymentSubjectId: '',
payMoney: '', explain: '',
admin: '', approver: '',
channel: '', phone: '',
captcha: '', captcha: '',
remark: '', remark: ''
channelProvider: ''
}, },
payFormData: [ payFormData: [
{ {
label: '此次付款渠道', label: '此次付款渠道',
name: 'channel', name: 'paymentChannelId',
type: 'select', type: 'select',
optionsName: 'payChannelList', optionsName: 'payChannelList',
optionId: 'channel', optionId: 'id',
optionLabel: 'channelName', optionLabel: 'channelInfo',
changeAttr: val => { changeAttr: val => {
console.log(val) this.payForm.channel = this.baseData.payChannelList.find(item => item.id === val).channel
this.getAdmin() this.getAdmin()
this.getPaymentEntityList()
this.isCodeDisabled = false this.isCodeDisabled = false
clearInterval(this.timer) clearInterval(this.timer)
this.timer = null this.timer = null
...@@ -54,36 +58,36 @@ export default { ...@@ -54,36 +58,36 @@ export default {
}, },
{ {
label: '此次付款主体', label: '此次付款主体',
name: 'withdrawalSource', name: 'paymentSubjectId',
type: 'select', type: 'select',
optionsName: 'PayerelList', optionsName: 'paymentEntityList',
optionId: 'confId', optionId: 'id',
optionLabel: 'confLabel', optionLabel: 'name',
changeAttr: val => {} changeAttr: val => {}
}, },
{ {
label: '批次号', label: '批次号',
name: 'batchNo', name: 'batchNo',
addHtml: 'batchNo' addHtml: 'textHtml'
}, },
{ {
label: '积分总额', label: '积分总额',
name: 'payMoney', name: 'pointTotal',
addHtml: 'batchNo' addHtml: 'textHtml'
}, },
{ {
label: '付款总额/元', label: '付款总额/元',
name: 'payMoney', name: 'paymentTotal',
addHtml: 'batchNo' addHtml: 'textHtml'
}, },
{ {
label: '税点', label: '税点',
name: 'payMoney', name: 'taxRate',
addHtml: 'batchNo' addHtml: 'textHtml'
}, },
{ {
label: '管理员', label: '管理员',
name: 'admin', name: 'approver',
type: 'select', type: 'select',
optionsName: 'adminList', optionsName: 'adminList',
optionId: 'adminId', optionId: 'adminId',
...@@ -103,7 +107,7 @@ export default { ...@@ -103,7 +107,7 @@ export default {
}, },
{ {
label: '发票及其他说明', label: '发票及其他说明',
name: 'remark', name: 'explain',
type: 'input', type: 'input',
inputType: 'textarea', inputType: 'textarea',
maxlength: 200 maxlength: 200
...@@ -117,25 +121,17 @@ export default { ...@@ -117,25 +121,17 @@ export default {
} }
], ],
payRule: { payRule: {
admin: [{ required: true, message: '请选择管理员', trigger: 'change' }], approver: [{ required: true, message: '请选择管理员', trigger: 'change' }],
channel: [{ required: true, message: '请选择付款渠道', trigger: 'change' }], paymentChannelId: [{ required: true, message: '请选择付款渠道', trigger: 'change' }],
withdrawalSource: [{ required: true, message: '请选择付款主体', trigger: 'change' }], paymentSubjectId: [{ required: true, message: '请选择付款主体', trigger: 'change' }],
captcha: [{ required: true, message: '请输入验证码', trigger: 'blur' }] captcha: [{ required: true, message: '请输入验证码', trigger: 'blur' }],
explain: [{ required: true, message: '请输入发票及其他说明', trigger: 'blur' }]
}, },
// 基本数据 // 基本数据
baseData: { baseData: {
payChannelList: [], payChannelList: [],
//付款主体 //付款主体
PayerelList: [ paymentEntityList: []
{
confId: '深圳广联数科科技有限公司',
confLabel: '深圳广联数科科技有限公司'
},
{
confId: '深圳市嘀加智慧云服务有限公司',
confLabel: '深圳市嘀加智慧云服务有限公司'
}
]
} }
} }
}, },
...@@ -162,24 +158,44 @@ export default { ...@@ -162,24 +158,44 @@ export default {
methods: { methods: {
//积分提现获取业务对应的付款渠道 //积分提现获取业务对应的付款渠道
getChannel(transferType) { getChannel(transferType) {
this.$apis.withdraw let arr = []
.getChannel({ this.$apis.withdraw.getChannelAccount().then(res => {
transferType: this.recordInfo.transferType,
mode: this.recordInfo.mode,
isBatch: 1
})
.then(res => {
if (res) { if (res) {
this.baseData.payChannelList = res console.log(res)
this.$utils.getOptionsList(this, 'payFormData', false, 'channel') arr = res.map(item => {
let channelInfo = item.channelName + item.name
return {
channelInfo,
...item
}
})
this.baseData.payChannelList = arr
this.$utils.getOptionsList(this, 'payFormData', false, 'paymentChannelId')
//默认选择 //默认选择
if (this.baseData.payChannelList.length > 0) { if (this.baseData.payChannelList.length > 0) {
this.payForm.paymentChannelId = this.baseData.payChannelList[0].id
this.payForm.channel = this.baseData.payChannelList[0].channel this.payForm.channel = this.baseData.payChannelList[0].channel
} }
this.getPaymentEntityList()
this.getAdmin() this.getAdmin()
} }
}) })
}, },
//支付主体
getPaymentEntityList() {
let params = { channelAccountId: this.payForm.paymentChannelId }
this.$apis.withdraw.getPaymentEntityList(params).then(res => {
if (res) {
console.log(res)
this.baseData.paymentEntityList = res
this.$utils.getOptionsList(this, 'payFormData', false, 'paymentSubjectId')
// 默认选择
if (this.baseData.paymentEntityList.length > 0) {
this.payForm.paymentSubjectId = this.baseData.paymentEntityList[0].id
}
}
})
},
getAdmin() { getAdmin() {
this.$apis.withdraw.getAdmin({ channel: this.payForm.channel }).then(res => { this.$apis.withdraw.getAdmin({ channel: this.payForm.channel }).then(res => {
if (res) { if (res) {
...@@ -191,25 +207,49 @@ export default { ...@@ -191,25 +207,49 @@ export default {
phone: item.phone phone: item.phone
} }
}) })
this.$utils.getOptionsList(this, 'payFormData', false, 'admin') this.$utils.getOptionsList(this, 'payFormData', false, 'approver')
this.payForm.admin = this.baseData.adminList[0].adminId this.payForm.approver = this.baseData.adminList[0].adminId
this.payForm.phone = this.baseData.adminList[0].phone this.payForm.phone = this.baseData.adminList[0].phone
} }
}) })
}, },
//付款 //付款
comfirmPay() { comfirmPay() {
// this.$refs.payFormRef.$refs.payChildRef.validate(valid => { this.$refs.payFormRef.$refs.payChildRef.validate(valid => {
// if (valid) { if (valid) {
// } this.loading = true
// }) let params = {
phone: this.payForm.phone,
id: this.recordInfo.id,
paymentChannelId: this.payForm.paymentChannelId,
paymentSubjectId: this.payForm.paymentSubjectId,
approver: this.payForm.approver,
captcha: this.payForm.captcha,
explain: this.payForm.explain,
remark: this.payForm.remark
}
this.$apis.withdraw.applyApprovalOA(params)
.then(res => {
this.$message({
message: res.code == '0' ? '付款审批成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
})
.finally(() => {
this.cancelPay()
this.loading = false
})
}
})
}, },
cancelPay() { cancelPay() {
this.ids = '' this.ids = ''
this.payForm = { this.payForm = {
payMoney: '', paymentChannelId: '',
admin: '', paymentSubjectId: '',
channel: '', explain: '',
approver: '',
phone: '',
captcha: '', captcha: '',
remark: '' remark: ''
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!