Commit c99d7d0f by 前端

Merge branch 'SAAS+V4.46-1031' into 'master'

上线合并

See merge request !12
2 parents d28247c8 e7a2cfbb
......@@ -4,7 +4,7 @@
<div class="wrap edit-box">
<div>
<p class="edit-title">订单信息</p>
<el-form label-width="154px" :inline="true">
<el-form label-width="150px" :inline="true">
<el-row v-for="(item, index) in withdrawDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label + ':'" class="row-item">
<span v-if="subItem.addHtml">
......@@ -30,6 +30,12 @@
<span v-else class="detail-txt ellipsis-1" :title="recordInfo[subItem.name]">{{ recordInfo[subItem.name] ? recordInfo[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
<el-row v-if="this.recordInfo.status == 4">
<el-form-item label="失败原因:">
<span>{{ recordInfo.errorMessage }}</span>
<span class="copy" @click="handleCopy">复制</span>
</el-form-item>
</el-row>
</el-form>
</div>
<div v-if="recordInfo.operationList">
......@@ -54,10 +60,12 @@
<script>
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E']
const channelObj={
'TXIAT':'熠轩',
'ZX':'中雄',
'YUNHUO':'云获'
const channelObj = {
'TXIAT': '熠轩-银行卡',
'ZX': '中雄-银行卡',
'YUNHUO': '云获(嘀加)-银行卡',
"YUNHUO-ZY": '云获(中赢)-银行卡',
'YUNHUO-WX': '云获(中赢)-微信'
}
export default {
name: 'DetailDialog',
......@@ -70,7 +78,25 @@ export default {
withdrawData: [],
paymentData: [],
operationData: [],
isVisible: this.detailVisible
isVisible: this.detailVisible,
sourceList: [
{
confId: '0',
confLabel: '车生活助手'
},
{
confId: '1',
confLabel: '系统导入'
},
{
confId: '2',
confLabel: '生意助手员工版'
},
{
confId: '3',
confLabel: '门店助手'
}
]
}
},
props: {
......@@ -92,6 +118,21 @@ export default {
computed: {},
mounted() {},
methods: {
handleCopy() {
const text = this.recordInfo.errorMessage
const input = document.createElement('input')
input.value = text
// 将临时输入框添加到页面中
document.body.appendChild(input)
// 选中临时输入框的内容
input.select()
const isSuccessful = document.execCommand('copy')
document.body.removeChild(input)
if(isSuccessful){
this.$message.success('复制成功')
}
},
getDetails() {
this.$apis.withdraw.getDetails({ id: this.id }).then(res => {
this.recordInfo = res
......@@ -108,14 +149,21 @@ export default {
label: '提现类型',
name: 'transferType',
addHtml: obj => {
return obj.transferType ==0?'积分提现':obj.transferType==1?'普通提现':'阳光激励'
return obj.transferType == 0 ? '积分提现' : obj.transferType == 1 ? '普通提现' : '阳光激励'
}
},
{
label: '提现方式',
name: 'mode',
addHtml: obj => {
return obj.mode === 1 ? '微信' : obj.mode === 0 ? '银行卡' : '--'
}
},
{
label: '提现金额',
name: 'payAmount',
addHtml: obj => {
return obj.payAmount?(obj.payAmount / 100).toFixed(2):'--'
return obj.payAmount ? (obj.payAmount / 100).toFixed(2) : '--'
}
},
{
......@@ -130,7 +178,7 @@ export default {
label: '提现积分',
name: 'integralAmount'
},
{
label: '所属门店',
name: 'merchantName'
......@@ -138,6 +186,14 @@ export default {
{
label: '申请时间',
name: 'createdDate'
},
{
label: '来源',
name: 'withdrawalSource',
addHtml: obj => {
let arr = this.sourceList.filter(item => item.confId == obj.withdrawalSource)
return arr.length > 0 ? arr[0].confLabel : '--'
}
}
]
this.paymentData = [
......@@ -162,6 +218,10 @@ export default {
name: 'mobile'
},
{
label: '微信openid',
name: 'customerOpenId'
},
{
label: '付款渠道',
name: 'channel',
addHtml: obj => {
......@@ -172,7 +232,7 @@ export default {
label: '结算金额',
name: 'settleAmount',
addHtml: obj => {
return obj.settleAmount?(obj.settleAmount / 100).toFixed(2):'--'
return obj.settleAmount ? (obj.settleAmount / 100).toFixed(2) : '--'
}
},
{
......@@ -188,27 +248,30 @@ export default {
color: colors[obj.status]
}
}
},
{
label: '失败原因',
name: 'errorMessage'
}
// {
// label: '失败原因',
// name: 'errorMessage'
// }
]
this.operationData = [
{
label: obj => {
return ['审核', '付款'][obj.type]
return ['审核', '付款','受理'][obj.type]
},
name: 'type',
addHtml: obj => {
let status = '--',
color;
color
if (obj.result == 0) {
status = '通过'
color = '#2CCA74'
} else if (obj.result == 1) {
status = '驳回'
color = '#EB4E4E'
}else if(obj.result == 2){
status = '失败'
color = '#999999'
}
return {
status,
......@@ -219,12 +282,14 @@ export default {
{
// label: ['审核人', '付款人', '操作人'],
label: obj => {
let arr = ['审核人', '付款人','受理人'],
let arr = ['审核人', '付款人', '受理人'],
label
if (obj.result == 0) {
label = arr[obj.type]
} else if (obj.result == 1) {
label = '操作人'
}else{
label = arr[obj.type]
}
return label
},
......@@ -232,12 +297,14 @@ export default {
},
{
label: obj => {
let arr = ['审核时间', '付款时间','受理时间'],
let arr = ['审核时间', '付款时间', '受理时间'],
label
if (obj.result == 0) {
label = arr[obj.type]
} else if (obj.result == 1) {
label = '操作时间'
}else{
label = arr[obj.type]
}
return label
},
......@@ -250,9 +317,9 @@ export default {
name: 'remark'
}
]
if (this.recordInfo.status != 4) {
this.handleJudgment(this.paymentData, 'errorMessage')
}
// if () {
// this.handleJudgment(this.paymentData, 'errorMessage')
// }
this.formToRow('withdrawData')
this.formToRow('operationData')
this.formToRow('paymentData')
......@@ -293,7 +360,7 @@ export default {
</script>
<style scoped lang="scss">
.edit-box .row-item {
width: 28%;
width: 30%;
/deep/ {
.el-form-item__content {
height: 30px;
......@@ -302,7 +369,7 @@ export default {
}
.detail-txt {
display: inline-block;
width: 133px;
width: 136px;
}
.edit-title {
font-weight: 600;
......@@ -322,4 +389,9 @@ export default {
border-radius: 50%;
margin-right: 8px;
}
.copy {
color: #5850ff;
margin-left: 20px;
cursor: pointer;
}
</style>
\ No newline at end of file
......@@ -5,13 +5,16 @@
<div class="table-header">
<!-- <h2>积分提现列表</h2> -->
<div class="statistics">
累计结算金额:熠轩
累计结算金额:熠轩-银行卡
<span class="price">{{ settleAmount.yiXuanSettleAmount }}</span>
元, 中雄
元, 中雄-银行卡
<span class="price">{{ settleAmount.zxSettleAmount }}</span>
元, 云获
元,云获(嘀加)-银行卡
<span class="price">{{ settleAmount.yunHuoSettleAmount }}</span>
元
元, 云获(中赢)-银行卡
<span class="price">{{ settleAmount.yunHuoZYSettleAmount }}</span>
元, 云获(中赢)-微信
<span class="price">{{ settleAmount.yunHuoWXSettleAmount }}</span>
</div>
<div>
<div class="select-wrap flex">
......@@ -153,7 +156,9 @@ export default {
status: '',
channel: '',
merchantName: '',
transferType: ''
transferType: '',
mode: '',
withdrawalSource: ''
},
hasFooter: false,
tableSearchForm: {},
......@@ -235,6 +240,24 @@ export default {
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'withdrawalTypeList'
},
{
label: '提现方式',
name: 'mode',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'modeTypeList'
},
{
label: '来源',
name: 'withdrawalSource',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'sourceList'
}
],
tableButtonList: [
......@@ -316,6 +339,25 @@ export default {
minWidth: 200
},
{
label: '提现类型',
prop: 'transferType',
width: '200px',
formatter: cellValue => {
let arr = this.baseData.withdrawalTypeList.filter(item => item.confId == cellValue.transferType)
return arr.length > 0 ? arr[0].confLabel : '--'
}
},
{
label: '提现方式',
prop: 'mode',
width: '200px',
formatter: cellValue => {
let arr = this.baseData.modeTypeList.filter(item => item.confId == cellValue.mode)
return arr.length > 0 ? arr[0].confLabel : '--'
}
},
{
label: '客户名称',
prop: 'customerName',
width: 150
......@@ -371,6 +413,11 @@ export default {
width: '130px'
},
{
label: '微信openid',
prop: 'customerOpenId',
width: '130px'
},
{
label: '状态',
prop: 'status',
width: '200px',
......@@ -382,6 +429,15 @@ export default {
width: '200px'
},
{
label: '来源',
prop: 'withdrawalSource',
width: '200px',
formatter: cellValue => {
let arr = this.baseData.sourceList.filter(item => item.confId == cellValue.withdrawalSource)
return arr.length > 0 ? arr[0].confLabel : '--'
}
},
{
label: '付款时间',
prop: 'payDate',
width: '200px'
......@@ -413,6 +469,7 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据
baseData: {
adminList: [],
merchantList: [],
auditStatusStatusList: [
{
......@@ -447,15 +504,23 @@ export default {
channelList: [
{
confId: 'TXIAT',
confLabel: '熠轩'
confLabel: '熠轩-银行卡'
},
{
confId: 'ZX',
confLabel: '中雄'
confLabel: '中雄-银行卡'
},
{
confId: 'YUNHUO',
confLabel: '云获'
confLabel: '云获(嘀加)-银行卡'
},
{
confId: 'YUNHUO-ZY',
confLabel: '云获(中赢)-银行卡'
},
{
confId: 'YUNHUO-WX',
confLabel: '云获(中赢)-微信'
}
],
withdrawalTypeList: [
......@@ -472,6 +537,34 @@ export default {
confLabel: '阳光激励'
}
],
modeTypeList: [
{
confId: '0',
confLabel: '银行卡'
},
{
confId: '1',
confLabel: '微信'
}
],
sourceList: [
{
confId: '0',
confLabel: '车生活助手'
},
{
confId: '1',
confLabel: '系统导入'
},
{
confId: '2',
confLabel: '生意助手员工版'
},
{
confId: '3',
confLabel: '门店助手'
}
],
payChannelList: []
},
showPassDialog: false,
......@@ -519,8 +612,13 @@ export default {
{
label: '管理员',
name: 'admin',
type: 'input',
isDisabled: 'true'
type: 'select',
optionsName: 'adminList',
optionId: 'adminId',
optionLabel: 'adminName',
changeAttr: val => {
this.payForm.phone = val.phone
}
},
{
label: '验证码',
......@@ -591,8 +689,9 @@ export default {
this.handleCheck()
} else if (index == 1) {
//付款前校验记录列表是否是同一个提现类型
this.payForm.transferType = await this.checkRecordsTransferType(type)
let data = await this.checkRecordsTransferType(type)
this.payForm.transferType = data.transferType
this.payForm.mode = data.mode
this.handlePay()
}
}
......@@ -645,7 +744,7 @@ export default {
}
}
this.$apis.withdraw.checkRecordsTransferType(params).then(res => {
console.log(res)
// console.log(res)
if (this.isZeroTrue(res)) {
resolve(res)
}
......@@ -653,7 +752,10 @@ export default {
})
},
getSettleAmount() {
this.$apis.withdraw.getSettleAmount({}).then(res => {
let params = {
...this.tableSearchForm
}
this.$apis.withdraw.getSettleAmount(params).then(res => {
this.settleAmount = res
})
},
......@@ -695,6 +797,7 @@ export default {
},
handleSearch() {
this.$refs.withdrawRef.refreshTable()
this.getSettleAmount()
},
handleReset() {
this.searchForm = {
......@@ -703,7 +806,9 @@ export default {
customerPhone: '',
status: '',
channel: '',
merchantName: ''
merchantName: '',
mode: '',
withdrawalSource: ''
}
this.handleSearch()
},
......@@ -883,18 +988,25 @@ export default {
this.ids = [row.id]
this.payForm.payMoney = (row.payAmount / 100).toFixed(2)
this.payForm.transferType = row.transferType
this.payForm.mode = row.mode
}
// this.payForm.channel= 'TXIAT',
this.getChannel()
this.isPay = true
},
getAdmin() {
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
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
}
})
},
......@@ -902,7 +1014,8 @@ export default {
getChannel(transferType) {
this.$apis.withdraw
.getChannel({
transferType: this.payForm.transferType
transferType: this.payForm.transferType,
mode: this.payForm.mode
})
.then(res => {
if (res) {
......@@ -1223,4 +1336,19 @@ export default {
}
}
}
/deep/ {
.el-form-item:has(.el-radio-group) {
// display: flex!important;
// align-items: flex-start;
}
.el-radio-group {
width: 200px;
.el-radio {
margin-bottom: 4px;
// height: 32px;
width: 180px;
line-height: 32px;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!