Commit 68d0b00e by 王志慧

fixed

1 parent ef918f30
......@@ -79,9 +79,9 @@ const getSms = params => {
})
}
// 用户积分明细详情-客户积分详情
const customerDetail = params => {
params.method = `scrm.api.shopmall.integralcustomer.detail`
// 积分提现获取有业务的门店名列表
const getMerchantList = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.merchant.list`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
......@@ -90,4 +90,15 @@ const customerDetail = params => {
})
}
export default { getList, getAdmin, orderExport, integralpay, integralApprove, integralOut,getSms, customerDetail }
// 根据id列表获取提现金额(分)合计
const getAllpayAmount = params => {
params.method = `scrm.api.shopmall.integral.transfer.out.pay.amount`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getList, getAdmin, orderExport, integralpay, integralApprove, integralOut,getSms, getMerchantList,getAllpayAmount }
......@@ -7,7 +7,10 @@
<el-form label-width="154px" :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 class="detail-txt ellipsis-1" :title="recordInfo[subItem.name]">{{ recordInfo[subItem.name] ? recordInfo[subItem.name] + (subItem.suffix || '') : '-' }}</span>
<span v-if="subItem.addHtml">
{{ subItem.addHtml(recordInfo) }}
</span>
<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-form>
......@@ -17,25 +20,37 @@
<el-form label-width="154px" :inline="true">
<el-row v-for="(item, index) in paymentDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label + ':'" class="row-item">
<span class="detail-txt ellipsis-1" :title="recordInfo[subItem.name]">{{ recordInfo[subItem.name] ? recordInfo[subItem.name] + (subItem.suffix || '') : '-' }}</span>
<span v-if="subItem.addHtml" class="flex_sc">
<div class="table_point" :style="{ background: subItem.addHtml(recordInfo).color }"></div>
{{ subItem.addHtml(recordInfo).status }}
</span>
<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-form>
</div>
<div>
<div v-if="recordInfo.operationList">
<p class="edit-title">操作记录</p>
<el-form label-width="154px" :inline="true">
<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">
<span class="detail-txt ellipsis-1" :title="recordInfo[subItem.name]">{{ recordInfo[subItem.name] ? recordInfo[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
</el-form>
<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">
<span v-if="subItem.addHtml" class="flex_sc">
<div class="table_point" :style="{ background: subItem.addHtml(record).color }"></div>
{{ subItem.addHtml(record).status }}
</span>
<span v-else class="detail-txt ellipsis-1" :title="record[subItem.name]">{{ record[subItem.name] ? record[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
</el-form>
</template>
</div>
</div>
</GLDialog>
</template>
<script>
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E']
export default {
name: 'DetailDialog',
data() {
......@@ -68,7 +83,7 @@ export default {
computed: {},
mounted() {},
methods: {
async getConfig() {
getConfig() {
let withdrawData = [
{
label: '提现单号',
......@@ -88,7 +103,10 @@ export default {
},
{
label: '提现金额',
name: 'payAmount'
name: 'payAmount',
addHtml: obj => {
return (obj.payAmount / 100).toFixed(2)
}
},
{
label: '所属门店',
......@@ -96,7 +114,7 @@ export default {
},
{
label: '申请时间',
name: 'createdDate'
name: 'applyDateStart'
}
],
paymentData = [
......@@ -114,8 +132,7 @@ export default {
},
{
label: '收款银行',
name: 'recvBank',
suffix: '%'
name: 'recvBank'
},
{
label: '收款手机号',
......@@ -127,39 +144,66 @@ export default {
},
{
label: '状态',
name: 'status'
name: 'status',
addHtml: obj => {
return {
status: tableStatus[obj.status],
color: colors[obj.status]
}
}
},
{
label: '失败原因',
name: 'crowdFundingPrice'
name: 'errorMessage'
}
],
operationData = [
{
label: '审核',
name: 'shipAddress'
name: 'type',
addHtml: obj => {
return {
status: tableStatus[obj.type],
color: colors[obj.type]
}
}
},
{
label: '审核人',
name: 'weChatName'
name: 'createdBy'
},
{
label: '审核时间',
name: 'activityName'
name: 'createdDate'
},
{
label: '备注',
name: 'goodsName'
name: 'remark'
}
]
if (this.recordInfo.status !== 4) {
this.handleJudgment(paymentData, 'errorMessage')
}
this.withdrawData = withdrawData
this.paymentData = paymentData
this.operationData = operationData
// this.getInfo()
this.formToRow('withdrawData')
this.formToRow('paymentData')
this.formToRow('operationData')
},
handleJudgment(target, key) {
let arr = target,
len = arr.length,
item
for (let i = 0; i < len; i++) {
item = arr[i]
if (item.name == key) {
arr.splice(i, 1)
}
}
this.paymentData = arr
this.formToRow('paymentData')
},
formToRow(formName, numOfRow = 3) {
var rowNum = Math.ceil(this[formName].length / numOfRow)
for (var i = 0; i < rowNum; i++) {
......@@ -174,10 +218,9 @@ export default {
}
}
}
console.log(this[formName + 'Row'])
},
handleClose() {
this.isVisible =false
this.isVisible = false
this.$emit('dialogClose')
}
}
......@@ -188,8 +231,8 @@ export default {
width: 28%;
/deep/ {
.el-form-item__content {
height: 30px;
}
height: 30px;
}
}
}
.detail-txt {
......@@ -206,7 +249,12 @@ export default {
margin-top: 20px;
}
/deep/ .el-form-item {
margin-bottom:0;
margin-bottom: 0;
}
.table_point {
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
</style>
\ No newline at end of file
......@@ -73,7 +73,8 @@ export default {
customerName: '',
customerPhone: '',
status: '',
channel: ''
channel: '',
merchantName:''
},
tableSearchForm: {},
showFormData: [
......@@ -122,6 +123,15 @@ export default {
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '所属门店',
name: 'merchantName',
type: 'select',
optionList: [],
optionId: 'merchantName',
optionLabel: 'merchantName',
optionsName: 'merchantList'
},
{
label: '付款渠道',
name: 'channel',
type: 'select',
......@@ -204,7 +214,7 @@ export default {
label: '提现单号',
prop: 'outSettleOrderId',
line: 1,
width: 180
minWidth: 200
},
{
label: '客户名称',
......@@ -230,10 +240,13 @@ export default {
{
label: '提现金额',
prop: 'payAmount',
width: 100
width: 100,
formatter: cellValue => {
return (cellValue.payAmount / 100).toFixed(2)
}
},
{
label: '收货人姓名',
label: '收款人姓名',
prop: 'name',
width: '110px'
},
......@@ -266,7 +279,7 @@ export default {
},
{
label: '申请时间',
prop: 'createdDate',
prop: 'applyDateStart',
width: '200px'
},
{
......@@ -284,6 +297,7 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// 基本数据
baseData: {
merchantList: [],
auditStatusStatusList: [
{
confId: '0',
......@@ -391,8 +405,19 @@ export default {
mounted() {
this.$utils.getOptionsList(this, 'showFormData')
this.getMerchantList()
},
methods: {
getMerchantList() {
this.$apis.withdraw.getMerchantList({}).then(res => {
this.baseData.merchantList = res.map(item => {
return {
merchantName: item
}
})
this.$utils.getOptionsList(this, 'showFormData', false, 'merchantName')
})
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.applyDateStr) {
......@@ -403,14 +428,15 @@ export default {
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'
}
delete params.payTimeStr, delete params.applyDateStr
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.verificationTimeStr
delete this.tableSearchForm.payTimeStr
delete this.tableSearchForm.applyDateStr
resolve()
})
},
......@@ -419,50 +445,23 @@ export default {
},
handleReset() {
this.searchForm = {
settlementStatus: ''
outSettleOrderId: '',
customerName: '',
customerPhone: '',
status: '',
channel: '',
merchantName:''
}
this.handleSearch()
},
handleSettlement(row) {
const params = {
id: row.id,
settlementStatus: row.settlementStatus ? 0 : 1
}
this.$utils.secondConfirm(this, '结算', '是否要' + (row.settlementStatus ? '取消结算' : '结算') + '?', 'points', 'integralorderSettle', params)
},
handleDetail(row) {
// console.log(row)
this.recordInfo = row
this.detailVisible = true
},
handleImport(e) {
var reader = new FileReader()
var file = e.srcElement.files[0]
const isLt = file.size / 1024 / 1024 < 10
if (isLt > 10) {
this.$message({
message: '文件大小不能超过10M',
type: 'error'
})
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.points.orderImport({ file: base64 }).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
document.getElementById('fileUpload').value = ''
this.handleSearch()
})
}
},
exportExcel() {
const params = this.getParams()
this.$apis.points.orderExport(params).then(res => {
this.$apis.withdraw.orderExport(params).then(res => {
this.$utils.aToExport(res)
})
},
......@@ -492,7 +491,9 @@ 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()
} else {
if (!this.ids) {
......@@ -502,10 +503,17 @@ export default {
})
return
}
this.getAllpayAmount()
}
this.getAdmin()
this.isPay = true
},
//获取批量付款的金额
getAllpayAmount(){
this.$apis.withdraw.getAllpayAmount({ids:this.ids}).then(res=>{
this.payForm.payMoney = (res/ 100).toFixed(2)
})
},
getAdmin() {
this.$apis.withdraw.getAdmin({}).then(res => {
this.payForm.admin = `${res.name} ${res.phone}`
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!