提交 c7cdfc73 authored 作者: matian's avatar matian

bug fixes

上级 d7a30bec
...@@ -139,8 +139,7 @@ export default { ...@@ -139,8 +139,7 @@ export default {
], ],
jump_url: { required: true, message: '请填写跳转链接', trigger: 'blur' }, jump_url: { required: true, message: '请填写跳转链接', trigger: 'blur' },
shop_id: { required: true, message: '请选择支付平台', trigger: 'change' }, shop_id: { required: true, message: '请选择支付平台', trigger: 'change' },
skip_pay_title: { required: true, message: '请填写跳过支付文案', trigger: 'blur' }, skip_pay_title: { required: true, message: '请填写跳过支付文案', trigger: 'blur' }
offline_info: { required: true, message: '请填写线下支付联系方式', trigger: 'blur' }
}, },
options: [], options: [],
checkList: [], checkList: [],
......
...@@ -127,7 +127,8 @@ export default { ...@@ -127,7 +127,8 @@ export default {
params.details.map(item => { params.details.map(item => {
if (parseInt(item.type) === 2) { if (parseInt(item.type) === 2) {
item.user_fields = JSON.stringify(item.user_fields) item.user_fields = JSON.stringify(item.user_fields)
item.pay_type = item.pay_type.split(',') // item.pay_type = item.pay_type.split(',')
item.pay_type = item.pay_type.split(',').toString()
} }
return item return item
}) })
......
<template>
<el-dialog v-bind="$attrs" v-on="$listeners" center width="40%">
<img :src="row" alt="" class="voucher_img" />
<!-- <div class="voucher_img" v-html="row"></div> -->
</el-dialog>
</template>
<script>
export default {
props: {
row: {
type: String,
default: ''
}
}
}
</script>
<style lang="scss" scoped>
::v-deep {
.el-dialog__body {
width: 80% !important;
.voucher_img {
width: 100%;
margin-left: 50px;
}
}
}
</style>
...@@ -3,14 +3,21 @@ ...@@ -3,14 +3,21 @@
<app-list v-bind="tableOptions" ref="list"> <app-list v-bind="tableOptions" ref="list">
<el-divider></el-divider> <el-divider></el-divider>
<template v-slot:voucher="{ row }"> <template v-slot:voucher="{ row }">
<el-button type="text" @click="handleLook(row)">点击查看</el-button> <div v-if="row.voucher.length > 0">
<el-image
style="width: 100px; height: 100px; padding-top: 10px"
:src="row.voucher.indexOf('[') === -1 ? [row.voucher][0] : JSON.parse(row.voucher)[0]"
:preview-src-list="row.voucher.indexOf('[') === -1 ? [row.voucher] : JSON.parse(row.voucher)"
>
</el-image>
</div>
<div v-else>-</div>
</template> </template>
<template v-slot:table-x="{ row }"> <template v-slot:table-x="{ row }">
<el-button type="text" @click="handleAudltDialog(row)">审核</el-button> <el-button type="text" @click="handleAudltDialog(row)">审核</el-button>
</template> </template>
</app-list> </app-list>
<!-- 点击查看凭证 -->
<pay-voucher :visible.sync="centerDialogVisible" :row="voucher" />
<!-- 审核弹框 --> <!-- 审核弹框 -->
<audlt-dialog <audlt-dialog
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
...@@ -25,7 +32,6 @@ ...@@ -25,7 +32,6 @@
<script> <script>
import { getAuditList, auditResult } from '../api' import { getAuditList, auditResult } from '../api'
import audltDialog from '../components/audltDialog.vue' import audltDialog from '../components/audltDialog.vue'
import PayVoucher from '../components/payVoucher.vue'
const statusMap = [ const statusMap = [
{ value: '待审核', id: '0' }, { value: '待审核', id: '0' },
{ value: '审核通过', id: '1' }, { value: '审核通过', id: '1' },
...@@ -33,11 +39,10 @@ const statusMap = [ ...@@ -33,11 +39,10 @@ const statusMap = [
] ]
export default { export default {
components: { audltDialog, PayVoucher }, components: { audltDialog },
data() { data() {
return { return {
isDisabled: '', isDisabled: '',
voucher: '',
auditInfo: { auditInfo: {
cause: '', cause: '',
status: '', status: '',
...@@ -101,20 +106,22 @@ export default { ...@@ -101,20 +106,22 @@ export default {
{ label: '姓名', prop: 'user_name', align: 'center' }, { label: '姓名', prop: 'user_name', align: 'center' },
{ label: '手机号', prop: 'user_mobile', align: 'center' }, { label: '手机号', prop: 'user_mobile', align: 'center' },
{ label: '支付金额', prop: 'amount', align: 'center' }, { label: '支付金额', prop: 'amount', align: 'center' },
{ label: '凭证', align: 'center', slots: 'voucher', prop: 'voucher' }, {
label: '凭证',
align: 'center',
slots: 'voucher',
prop: 'voucher'
},
{ label: '备注', align: 'center', prop: 'comment' }, { label: '备注', align: 'center', prop: 'comment' },
{ label: '操作', slots: 'table-x', align: 'center' } { label: '操作', slots: 'table-x', align: 'center' }
] ]
} }
} }
}, },
methods: { methods: {
handleLook(row) {
this.voucher = row.voucher
this.centerDialogVisible = true
},
handleAudltDialog(row) { handleAudltDialog(row) {
console.log(row.status, row.cause, row.id, '123') console.log(row.status, row.cause, row.id, '123', row.voucher)
this.auditInfo.status = row.status this.auditInfo.status = row.status
this.auditInfo.cause = row.cause this.auditInfo.cause = row.cause
this.auditInfo.id = row.id this.auditInfo.id = row.id
......
<template> <template>
<div class="pay-list"> <div>
<div class="item" v-for="(item, index) in checkList" :key="index"> <div style="display: flex; justify-content: center">
<el-radio-group v-model="pay_type"> <el-radio-group v-model="pay_type">
<el-radio :label="1">微信扫码支付</el-radio> <el-radio :label="1">微信扫码支付</el-radio>
<el-radio :label="11">支付宝扫码支付</el-radio> <el-radio :label="11">支付宝扫码支付</el-radio>
</el-radio-group> </el-radio-group>
<div class="title">{{ item.title }}</div> </div>
<div class="checkbox"> <div class="pay-list">
<el-checkbox-group v-model="item.form"> <div class="item" v-for="(item, index) in checkList" :key="index">
<el-checkbox <div class="title">{{ item.title }}</div>
:disabled="item.isDisabled" <div class="checkbox">
v-for="opt in item.option" <el-checkbox-group v-model="item.form">
:key="opt.id" <el-checkbox
style="margin-bottom: 15px" :disabled="opt.isDisabled"
:label="opt.id" v-for="opt in item.option"
>{{ opt.user_name }}</el-checkbox :key="opt.id"
> style="margin-bottom: 15px"
</el-checkbox-group> :label="opt.id"
<el-button type="primary" @click="recordsQr(index)">生成支付链接</el-button> >{{ opt.user_name }}</el-checkbox
>
</el-checkbox-group>
<el-button type="primary" @click="recordsQr(index)">生成支付链接</el-button>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -29,7 +33,7 @@ export default { ...@@ -29,7 +33,7 @@ export default {
data() { data() {
return { return {
checkList: [], checkList: [],
pay_type: '' pay_type: 1
} }
}, },
mounted() { mounted() {
...@@ -43,7 +47,8 @@ export default { ...@@ -43,7 +47,8 @@ export default {
datas.option = [] datas.option = []
datas.form = [] datas.form = []
b.forEach(item => { b.forEach(item => {
const params = { user_name: item.user_name, id: item.id, isDisabled: !!parseInt(item.pay_status) } console.log(['1', '2'].includes(item.pay_status), '123')
const params = { user_name: item.user_name, id: item.id, isDisabled: ['1', '2'].includes(item.pay_status) }
!parseInt(item.pay_status) && datas.form.push(item.id) !parseInt(item.pay_status) && datas.form.push(item.id)
datas.option.push(params) datas.option.push(params)
}) })
...@@ -51,6 +56,9 @@ export default { ...@@ -51,6 +56,9 @@ export default {
return a return a
}, []) }, [])
console.log(this.checkList, 'list') console.log(this.checkList, 'list')
this.checkList.forEach(item => {})
console.log(this.checkList, 'list111')
}) })
}, },
recordsQr(index) { recordsQr(index) {
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</el-table> </el-table>
</div> </div>
</div> </div>
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%"> <el-dialog :visible.sync="dialogVisible" width="30%">
<pay></pay> <pay></pay>
</el-dialog> </el-dialog>
<set-tabel-heade <set-tabel-heade
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论