提交 509a164d authored 作者: matian's avatar matian

代码更新提交

上级 34b21ca4
VITE_LOGIN_URL=https://login.ezijing.com/auth/login/index
VITE_SHARE_URL=https://accounts.ezijing.com
\ No newline at end of file
VITE_LOGIN_URL=https://login2.ezijing.com/auth/login/index
VITE_SHARE_URL=https://accounts2.ezijing.com
VITE_LOGIN_URL=https://login2.ezijing.com/auth/login/index
VITE_SHARE_URL=https://accounts2.ezijing.com
......@@ -8,8 +8,10 @@
"version": "0.0.0",
"dependencies": {
"axios": "^0.21.1",
"blueimp-md5": "^2.18.0",
"clipboard": "^2.0.8",
"element-ui": "^2.15.5",
"qrcode.vue": "^1.7.0",
"query-string": "^7.0.1",
"vue": "^2.6.14",
"vue-router": "^3.5.2",
......@@ -2088,6 +2090,11 @@
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
"dev": true
},
"node_modules/blueimp-md5": {
"version": "2.18.0",
"resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.18.0.tgz",
"integrity": "sha512-vE52okJvzsVWhcgUHOv+69OG3Mdg151xyn41aVQN/5W5S+S43qZhxECtYLAEHMSFWX6Mv5IZrzj3T5+JqXfj5Q=="
},
"node_modules/bowser": {
"version": "1.9.4",
"resolved": "https://registry.npmjs.org/bowser/-/bowser-1.9.4.tgz",
......@@ -5039,6 +5046,14 @@
"node": ">=6"
}
},
"node_modules/qrcode.vue": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-1.7.0.tgz",
"integrity": "sha512-R7t6Y3fDDtcU7L4rtqwGUDP9xD64gJhIwpfjhRCTKmBoYF6SS49PIJHRJ048cse6OI7iwTwgyy2C46N9Ygoc6g==",
"peerDependencies": {
"vue": "^2.0.0"
}
},
"node_modules/qs": {
"version": "6.10.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz",
......@@ -8076,6 +8091,11 @@
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
"dev": true
},
"blueimp-md5": {
"version": "2.18.0",
"resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.18.0.tgz",
"integrity": "sha512-vE52okJvzsVWhcgUHOv+69OG3Mdg151xyn41aVQN/5W5S+S43qZhxECtYLAEHMSFWX6Mv5IZrzj3T5+JqXfj5Q=="
},
"bowser": {
"version": "1.9.4",
"resolved": "https://registry.npmjs.org/bowser/-/bowser-1.9.4.tgz",
......@@ -10328,6 +10348,12 @@
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"dev": true
},
"qrcode.vue": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-1.7.0.tgz",
"integrity": "sha512-R7t6Y3fDDtcU7L4rtqwGUDP9xD64gJhIwpfjhRCTKmBoYF6SS49PIJHRJ048cse6OI7iwTwgyy2C46N9Ygoc6g==",
"requires": {}
},
"qs": {
"version": "6.10.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz",
......
......@@ -13,8 +13,10 @@
},
"dependencies": {
"axios": "^0.21.1",
"blueimp-md5": "^2.18.0",
"clipboard": "^2.0.8",
"element-ui": "^2.15.5",
"qrcode.vue": "^1.7.0",
"query-string": "^7.0.1",
"vue": "^2.6.14",
"vue-router": "^3.5.2",
......
import httpRequest from '@/utils/axios'
// 获取oss signature
export function getSignature() {
return httpRequest.get('/api/usercenter/aliyun/get-signature')
}
// 获取用户信息
export function getUser() {
return httpRequest.get('/api/passport/account/get-user-info')
......@@ -15,11 +19,6 @@ export function getToken() {
return httpRequest.get('/api/usercenter/aliyun/assume-role')
}
// 获取oss signature
export function getSignature() {
return httpRequest.get('/api/usercenter/aliyun/get-signature')
}
// 图片上传
export function uploadFile(data) {
return httpRequest.post('https://webapp-pub.oss-cn-beijing.aliyuncs.com', data, {
......
......@@ -8,16 +8,16 @@ export function getCondition(params) {
return httpRequest.get('/api/finance/v1/payments/condition', { params })
}
// 获取支付列表
export function getPayList(data) {
return httpRequest.get('/api/finance/v1/payments/list', data)
export function getPayList(params) {
return httpRequest.get('/api/finance/v1/payments/list', { params })
}
// 查看支付详情
export function payDetail(params) {
return httpRequest.get('/api/finance/v1/payments/details', { params })
}
// 支付列表下载
export function download(data) {
return httpRequest.get('/api/finance/v1/payments/download', data)
export function download(params) {
return httpRequest.get('/api/finance/v1/payments/download', { params })
}
// 是否允许开具发票
export function allowCreate(data) {
......@@ -28,8 +28,8 @@ export function drawBack(data) {
return httpRequest.post('/api/finance/v1/payments/drawback', data)
}
// 获取表头
export function getTableTitle(data) {
return httpRequest.get('/api/finance/v1/payments/title-list', data)
export function getTableTitle(params) {
return httpRequest.get('/api/finance/v1/payments/title-list', { params })
}
// 设置表头
export function updateTableTitle(data) {
......@@ -45,5 +45,11 @@ export function cancelTicket(data) {
}
// 确认(取消)单条缴费到账
export function payConfirm(data) {
return httpRequest.post('/api/finance/v1/payments/details-confirm', data)
return httpRequest.post('/api/finance/v1/payments/details-confirm', data, {
headers: { 'Content-Type': 'multipart/form-data' }
})
}
// 获取oss signature
export function getSignature() {
return httpRequest.get('/api/usercenter/aliyun/get-signature')
}
......@@ -37,8 +37,8 @@ export default {
props: {
dealList: {
type: Object,
// eslint-disable-next-line vue/require-valid-default-prop
default: {}
default: () => {}
}
}
}
......
......@@ -31,8 +31,7 @@ export default {
props: {
dealList: {
type: Object,
// eslint-disable-next-line vue/require-valid-default-prop
default: {}
default: () => {}
}
}
}
......@@ -40,4 +39,4 @@ export default {
<style>
</style>
\ No newline at end of file
</style>
<!--支付详情-商品信息 -->
<template>
<app-card>
<app-list v-bind="tableOptions" ref="list" @selection-change="handleSelectionChange">
</app-list>
</app-card>
</template>
<script>
// 组件
import AppList from '@/components/base/AppList.vue'
import AppCard from '@/components/base/AppCard.vue'
// 接口
// import { getOrderList } from '../api'
export default {
components: { AppCard, AppList },
prop: {
payDetailList: {
type: Array,
default: []
}
},
data() {
return {
}
},
computed: {
// 列表配置
tableOptions() {
return {
remote: {
// httpRequest: getOrderList, // 获取订单列表
params: {},
beforeRequest: this.beforeRequest
},
columns: [
{ label: '商品号', prop: 'id', minWidth: 100 },
{ label: '商品图片', prop: 'img', align: 'center', minWidth: 100 },
{ label: '商品名称', prop: 'name', align: 'center', minWidth: 100 },
{ label: '标准价格', prop: 'standardPrice', align: 'center', minWidth: 100 },
{ label: '数量', prop: 'num', align: 'center', minWidth: 100 },
{ label: '实付单价', prop: 'payPrice', align: 'center', minWidth: 100 }
],
data: [
{
id: 'dfSDfsdf',
img: 'FDZF',
name: 'DSZF',
standardPrice: 'FDSZF',
num: 'dsff',
payPrice: 'aefes'
},
{
id: 'dfSDfsdf',
img: 'FDZF',
name: 'DSZF',
standardPrice: 'FDSZF',
num: 'dsff',
payPrice: 'aefes'
},
{
id: 'dfSDfsdf',
img: 'FDZF',
name: 'DSZF',
standardPrice: 'FDSZF',
num: 'dsff',
payPrice: 'aefes'
},
{
id: 'dfSDfsdf',
img: 'FDZF',
name: 'DSZF',
standardPrice: 'FDSZF',
num: 'dsff',
payPrice: 'aefes'
}
]
}
}
},
methods: {
}
}
</script>
......@@ -3,7 +3,9 @@
<app-card>
<app-list v-bind="tableOptions" ref="list" >
<template v-slot:table-x = "{ row }">
<el-button @click="toDetail(row)">查看</el-button>
<router-link :to="{ name: 'paydetail', params: { id: row.id } }">
<el-button>查看</el-button>
</router-link>
<el-button @click="cancelReceive(row)">取消到账</el-button>
</template>
</app-list>
......@@ -14,7 +16,7 @@
import AppList from '@/components/base/AppList.vue'
import AppCard from '@/components/base/AppCard.vue'
import { payDetail, payConfirm } from '../api'
const payStatusMap = { 20: '支付待确认', 30: '部分到账', 70: '足额支付待确认', 80: '足额支付' }
// 接口
export default {
props: {
......@@ -46,7 +48,15 @@ export default {
{ label: '支付方式', prop: 'payment_method', align: 'center', minWidth: 100 },
{ label: '其他支付方式', prop: 'payment_method_others', align: 'center', minWidth: 100 },
{ label: '交易流水号', prop: 'txn_id', align: 'center', minWidth: 100 },
{ label: '支付状态', prop: 'payment_status', align: 'center', minWidth: 100 },
// eslint-disable-next-line object-curly-newline
{ label: '支付状态',
prop: 'payment_status',
align: 'center',
minWidth: 100,
computed({ row }) {
return payStatusMap[row.payment_status]
}
},
{ label: '创建日期', prop: 'created_time', align: 'center', minWidth: 100 },
{ slots: 'table-x', align: 'center', minWidth: 100 }
]
......@@ -54,18 +64,10 @@ export default {
}
},
methods: {
// 查看支付详情
toDetail() {
this.$router.push({
name: 'paydetail',
params: {
id: this.id
}
})
},
// 取消到账
cancelReceive() {
payConfirm().then(res => {
const params = { id: this.id }
payConfirm(params).then(res => {
if (res.code === 0) {
this.$parent.fetchTicketDetail()
}
......
......@@ -23,8 +23,8 @@ export default {
props: {
dealList: {
type: Object,
// eslint-disable-next-line vue/require-valid-default-prop
default: {}
default: () => {}
}
},
mounted() {
......
......@@ -27,10 +27,10 @@
</template>
<script>
// import QrcodeVue from 'qrcode.vue'
import QrcodeVue from 'qrcode.vue'
import Clipboard from 'clipboard'
export default {
// components: { QrcodeVue },
components: { QrcodeVue },
props: {
title: { type: String, default: '推广' },
value: { type: String, default: '' },
......
......@@ -27,8 +27,8 @@ export default {
props: {
dealList: {
type: Object,
// eslint-disable-next-line vue/require-valid-default-prop
default: {}
default: () => {}
}
}
}
......
<!-- 表头筛选 -->
<template>
<el-dialog title="表头设置" width="40%" v-bind="$attrs"
v-on="$listeners">
<el-form>
<el-form-item label="表头名称">
<span>隐藏/显示</span>
</el-form-item>
<div v-for="(item,index) in TableTitleList" :key="index">
<el-form-item :label="item.label">
<el-switch active-color="#13ce66" v-model="item.status" inactive-color="#ff4949" @change="changeStatus()"></el-switch>
</el-form-item>
</div>
</el-form>
</el-dialog>
</template>
<script>
import { getTableTitle } from '../api'
export default {
data() {
return {
TableTitleList: [
{ label: 'fjdvhsjid09p90nfv', status: false },
{ label: 'fjdvhsjop09p9idnfv', status: false },
{ label: 'fjdvhsjijkjhkuidnfv', status: false },
{ label: 'fjdvhsjihbggdnfv', status: false },
{ label: 'fjdvhsjidsfsdfsdnfv', status: false }
]
}
},
mounted() {
this.fetchTableList() // 获取表头
},
methods: {
fetchTableList() {
getTableTitle().then(res => {
if (res.code === 0) {
this.tableList = res.data
}
})
},
// 改变表头状态
changeStatus() {
this.status = !this.status
this.$emit('changeStatus', status)
}
}
}
</script>
<style></style>
......@@ -2,8 +2,7 @@
<!-- 支付详情-发票表格 -->
<template>
<div class="ticketInfo">
fddsrf
<table border="1" width="1200px" cellspacing="0" v-for="(item, index) in invioceList" :key="index" class="table">
<table border="1" width="1200px" cellspacing="0" class="table" v-for="(item, index) in invioceList" :key="index" >
<tr>
<th colspan="10">发票{{ item.id }}</th>
</tr>
......@@ -49,6 +48,16 @@
<th>操作人</th>
<td>{{ item.created_operator_name }}</td>
</tr>
<tr>
<th>地址</th>
<td>{{item.taxpayer_address}}</td>
<th>电话</th>
<td>{{item.taxpayer_mobile}}</td>
<th>开户行</th>
<td>{{item.taxpayer_bank_name}}</td>
<th>银行账号</th>
<td>{{item.taxpayer_bank_account}}</td>
</tr>
<tr>
<th>邮寄地址</th>
<td colspan="3">{{ item.recipient_address }}</td>
......@@ -72,12 +81,18 @@ export default {
props: {
dealList: {
type: Object,
// eslint-disable-next-line vue/require-valid-default-prop
default: {}
default: () => {}
}
},
data() {
return {
// list: [
// { id: 'sdada', age: 'dnjscf' },
// { id: 'sdada', age: 'dnjscf' },
// { id: 'sdada', age: 'dnjscf' },
// { id: 'sdada', age: 'dnjscf' }
// ]
invioceList: []
}
},
......
......@@ -49,7 +49,7 @@
</div>
<div class="type" style="border: 1px solid #ccc; margin-bottom: 10px">
<el-form-item label="发票信息" label-width="100px" class="title">
<el-button type="text" style="float: right">历史开票信息</el-button>
<!-- <el-button type="text" style="float: right">历史开票信息</el-button> -->
</el-form-item>
<el-form-item label="发票类型" prop="invoice_type">
<!-- change事件 -->
......@@ -57,18 +57,19 @@
<el-option label="普通纸质发票" :value="1"></el-option>
<el-option label="普通电子发票" :value="2"></el-option>
<!-- 纸质专票企业可以开 -->
<el-option label="专用纸质发票" :value="3" v-show="form.people_type === '1'"></el-option>
<el-option label="专用纸质发票" :value="3" v-show="form.people_type === 1"></el-option>
</el-select>
</el-form-item>
<el-form-item label="纳税人名称" prop="taxpayer_name">
<el-input v-model="form.taxpayer_name"></el-input>
</el-form-item>
<!-- 企业发票显示税号 -->
<el-form-item label="纳税人识别号" prop="taxpayer_identifier" v-show="form.people_type === '1'">
<el-form-item label="纳税人识别号" prop="taxpayer_identifier" v-show="form.people_type === 1">
<el-input v-model="form.taxpayer_identifier"></el-input>
</el-form-item>
<div v-show="form.people_type === '1' && form.invioce_type === '3' " >
<el-form-item label="地址" prop="taxpayer_address">
<!-- 企业纸质显示 -->
<div v-show="form.people_type === 1 && form.invioce_type === 3">
<el-form-item label="地址" prop="taxpayer_address" >
<el-input v-model="form.taxpayer_address"></el-input>
</el-form-item>
<el-form-item label="电话" prop="taxpayer_mobile">
......@@ -88,14 +89,14 @@
<span>请填写邮箱地址,方便接收电子发票</span>
</el-form-item>
<!-- 电子发票显示邮箱 -->
<el-form-item label="邮寄地址" prop="recipient_address" v-show="form.people_type === '2'">
<el-form-item label="邮寄地址" prop="recipient_address" v-show="form.invioce_type === 2">
<el-input v-model="form.recipient_address"></el-input>
</el-form-item>
<el-form-item label="收件人名称" prop="recipient_name">
<el-input v-model="form.recipient_name"></el-input>
</el-form-item>
<el-form-item label="收件人手机号" prop="recipient_mobile">
<el-input v-model="form.recipient_mobile"></el-input>
<el-form-item label="收件人手机号" prop="recipient_phone">
<el-input v-model="form.recipient_phone"></el-input>
</el-form-item>
<el-form-item label="票据跟进人" prop="follow">
<el-input v-model="form.follow"></el-input>
......@@ -126,8 +127,8 @@ export default {
return {
detailList: {},
form: {
toticket_type: '',
people_type: '',
toticket_type: 2,
people_type: 1,
ticket_type: '',
taxpayer_name: '',
taxpayer_identifier: '',
......@@ -157,14 +158,22 @@ export default {
{ required: true, message: '请输入地址', trigger: 'blur' },
{ min: 3, max: 30, message: '长度在 3 到 30 个字符', trigger: 'blur' }
],
taxpayer_address: [
{ required: true, message: '请输入地址', trigger: 'blur' },
{ min: 5, max: 30, message: '长度在 5 到 30 个字符', trigger: 'blur' }
],
taxpayer_mobile: [
{ required: true, message: '请输入电话', trigger: 'blur' },
{ min: 11, max: 11, message: '长度在 11 个字符', trigger: 'blur' }
],
bank: [
taxpayer_bank_name: [
{ required: true, message: '请输入开户行', trigger: 'blur' },
{ min: 4, max: 10, message: '长度在 4 到 10 个字符', trigger: 'blur' }
],
taxpayer_bank_account: [
{ required: true, message: '请输入银行账号', trigger: 'blur' },
{ min: 19, max: 19, message: '长度在 19个字符', trigger: 'blur' }
],
account: [
{ required: true, message: '请输入活动名称', trigger: 'blur' },
{ min: 19, max: 19, message: '长度在 19 个字符', trigger: 'blur' }
......
......@@ -3,8 +3,10 @@
<template>
<app-card>
<app-list v-bind="tableOptions" ref="list" >
<template v-slot:status-select>
<el-button @click="toDeal">处理</el-button>
<template v-slot:table-x="{ row }">
<router-link :to="{ name: 'deal', params: { id: row.id } }">
<el-button>处理</el-button>
</router-link>
</template>
</app-list>
</app-card>
......@@ -16,17 +18,13 @@ import AppCard from '@/components/base/AppCard.vue'
// 接口
import { payDetail } from '../api'
export default {
props: {
id: {
type: String,
default: ''
}
},
// props: {
// id: {
// type: String,
// default: ''
// }
// },
components: { AppCard, AppList },
data() {
return {
}
},
computed: {
// 列表配置
tableOptions() {
......@@ -51,15 +49,6 @@ export default {
]
}
}
},
methods: {
// 处理
toDeal() {
console.log('111')
this.$router.push({
name: 'deal'
})
}
}
}
</script>
<template>
<div>
<app-card title="支付明细信息">
<app-card title="支付明细信息" v-if="false">
<table border="1" width="1200px" cellspacing="0">
<tr>
<th>支付人姓名</th>
<td>{{confirmDetail.name}}</td>
<th>费用类型</th>
<td>{{confirmDetail.type}}</td>
<th>支付金额</th>
<td>{{confirmDetail.amount}}</td>
<th>支付状态</th>
<td>{{confirmDetail.payment_status}}</td>
</tr>
<th>支付人姓名</th>
<td>{{ confirmDetail.name }}</td>
<th>费用类型</th>
<td>{{ confirmDetail.type }}</td>
<th>支付金额</th>
<td>{{ confirmDetail.amount }}</td>
<th>支付状态</th>
<td>{{ confirmDetail.payment_status }}</td>
</tr>
<tr>
<th>支付方式</th>
<td>{{confirmDetail.payment_method}}</td>
<th>其他支付方式</th>
<td>{{confirmDetail.payment_method_others}} </td>
<th>支付时间</th>
<td colspan="3">{{confirmDetail.payment_time}}</td>
</tr>
<th>支付方式</th>
<td>{{ confirmDetail.payment_method }}</td>
<th>其他支付方式</th>
<td>{{ confirmDetail.payment_method_others }}</td>
<th>支付时间</th>
<td colspan="3">{{ confirmDetail.payment_time }}</td>
</tr>
<tr>
<td></td>
<td colspan="7">
<img :src="confirmDetail.payment_voucher_filename" alt="">
<img :src="confirmDetail.payment_voucher_filename" alt="" />
</td>
</tr>
<tr>
<th>项目</th>
<td>{{project.project_id}}</td>
<th>销售</th>
<td>{{project.sales_rep_user_id_name}}</td>
<th>渠道</th>
<td colspan="3">{{project.channel_id}}</td>
</tr>
<th>项目</th>
<td>{{ project.project_id }}</td>
<th>销售</th>
<td>{{ project.sales_rep_user_id_name }}</td>
<th>渠道</th>
<td colspan="3">{{ project.channel_id }}</td>
</tr>
<tr>
<th>备注</th>
<td colspan="7">{{ confirmDetail.taxpayer_remark }}</td>
</tr>
<tr>
<th>备注</th>
<td colspan="7">{{confirmDetail.taxpayer_remark}}</td>
</tr>
<tr>
<th>创建时间</th>
<td colspan="3">{{confirmDetail.created_time}}</td>
<th>更新时间</th>
<td colspan="3">{{confirmDetail.updated_time}}</td>
</tr>
<th>创建时间</th>
<td colspan="3">{{ confirmDetail.created_time }}</td>
<th>更新时间</th>
<td colspan="3">{{ confirmDetail.updated_time }}</td>
</tr>
</table>
</app-card>
<app-card>
......@@ -73,14 +73,17 @@
<el-input size="mini" v-model="form.remark"> </el-input>
</el-form-item>
<el-form-item label="到账凭证" label-width="80px" prop="receiving_voucher_filename">
<el-upload class="upload-demo"
drag
action="https://webapp-pub.oss-cn-beijing.aliyuncs.com"
multiple
show-file-list
:file-list="form.receiving_voucher_filename">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<el-upload
class="upload-demo"
drag
action=""
multiple
show-file-list
:before-upload="beforeUpload"
accept="image/*"
>
<img :src="form.receiving_voucher_filename" alt="" />
<!-- <div class="el-upload__text">拖到此处,或<em>点击上传</em></div> -->
</el-upload>
</el-form-item>
<el-form-item>
......@@ -95,22 +98,22 @@
import AppCard from '@/components/base/AppCard.vue'
import { payConfirm, payDetail } from '../api'
// import { splitStrLast } from '@/utils/util'
export default {
components: { AppCard },
data() {
return {
confirmDetail: {},
uploadData: {},
id: '',
form: {
service_charge: '',
payment_status: '',
receiving_time: '',
taxpayer_remark: '',
receiving_voucher_filename: ''
receiving_voucher_filename: []
},
rules: {
payment_status: [
{ required: true, message: '请选择支付状态', trigger: 'change' }
],
payment_status: [{ required: true, message: '请选择支付状态', trigger: 'change' }],
service_charge: [
{ required: true, message: '请输入手续费', trigger: 'blur' },
{ min: 3, max: 10, message: '长度在 3 到 10 个字符', trigger: 'blur' }
......@@ -119,9 +122,7 @@ export default {
{ required: true, message: '请输入备注', trigger: 'blur' },
{ min: 3, max: 10, message: '长度在 3 到 10 个字符', trigger: 'blur' }
],
receiving_voucher_filename: [
{ required: true, message: '请上传到账凭证', trigger: 'change' }
]
receiving_voucher_filename: [{ required: true, message: '请上传到账凭证', trigger: 'change' }]
},
importDisabled: false
}
......@@ -130,11 +131,6 @@ export default {
// 列表配置
tableOptions() {
return {
// remote: {
// // httpRequest: getOrderList, // 获取订单列表
// params: {},
// beforeRequest: this.beforeRequest
// },
filters: [
{
type: 'select',
......@@ -160,24 +156,41 @@ export default {
}
},
mounted() {
this.getPayDetail()
this.id = this.$route.params.id
// this.getPayDetail()
},
methods: {
beforeUpload(file, target) {
console.log(file)
this.form.receiving_voucher_filename.pust(file)
},
handleSuccess(res, file, target) {
this.fileLoading = ''
const _file = file.raw
this.form.receiving_voucher_filename = _file.src
},
// 获取支付信息
getPayDetail() {
payDetail().then(res => {
const params = { id: this.id }
payDetail(params).then(res => {
if (res.code === 0) {
this.project = res.data.list[0]
this.confirmDetail = res.data.list[0].confirmed_details[0]
}
})
},
// 确认支付
dealPay() {
this.$refs.formRef.validate(valid => {
if (valid) {
payConfirm().then(res => {
const params = Object.assign({ id: this.id }, this.form)
console.log(params)
payConfirm(this.form).then(res => {
if (res.code === 0) {
this.$message.success('支付已经到账')
history.go(-1)
} else {
this.$message.error('提交失败')
}
})
}
......
<template>
<div>
<el-button @click="fetchTicketDetail" type="danger">财务确认足额支付</el-button>
<el-button @click="fetchTicketDetail" type="primary">刷新状态及金额</el-button>
<app-card title="订单信息">
<Order :dealList= "dealList" />
</app-card>
......@@ -45,7 +47,6 @@ export default {
},
created() {
this.id = this.$route.params.id // 详情列表
console.log(this.id + '---id')
// 获取发票详情信息
this.fetchTicketDetail()
},
......
......@@ -64,19 +64,19 @@
</template>
<!-- 状态 -->
<template v-slot:status="{ row }">
<el-switch v-model="row.can_add_invoice" :active-value="1" :inactive-value="0" @change="handleStatus(row)"></el-switch>
<el-switch v-model="row.can_add_invoice" active-value="1" inactive-value="0" @change="handleStatus(row)"></el-switch>
</template>
<!-- 操作 -->
<template v-slot:table-x="{ row }">
<router-link :to="{ name: 'paymentView', params: { id: row.id } }">
<router-link target="_blank" :to="{ name: 'paymentView', params: { id: row.id } }">
<el-button>查看</el-button>
</router-link>
<el-dropdown split-button type="primary" size="small">
发票
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="createPop(row)">开具发票</el-dropdown-item>
<el-dropdown-item @click.native="disabledTicketVisible = true">作废发票</el-dropdown-item>
<el-dropdown-item @click.native="QrcodeShow(row)">发票二维码</el-dropdown-item>
<el-dropdown-item @click.native="disabledTicket(row)">作废发票</el-dropdown-item>
<el-dropdown-item @click.native="qrCode(row)">发票二维码</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button @click="backTicket(row)">退费</el-button>
......@@ -88,10 +88,10 @@
</app-list>
<!-- 开具发票 -->
<el-dialog title="开具发票" :visible.sync="ticketVisible" width="900px" append-to-body :destroy-on-close="true">
<TicketForm :id="id" @close="ticketVisible = false" @createTicket="handleCreateTicket(row)" />
<TicketForm :id="id" @close="ticketVisible = false" @createTicket="handleCreateTicket" />
</el-dialog>
<!-- 开票二维码 -->
<ShareQrcode :visible.sync="codeVisible" :id = "id"/>
<ShareQrcode :visible.sync="codeVisible" :value="shareUrl"/>
<!-- 作废弹框 -->
<el-dialog
title="提示"
......@@ -100,7 +100,7 @@
<span>确定要作废此发票吗?作废后不可恢复</span>
<span slot="footer" class="dialog-footer">
<el-button @click="disabledTicketVisible = false">取 消</el-button>
<el-button type="primary" @click="disabledTicket(row)">确 定</el-button>
<el-button type="primary" @click="confirmDisabledTicket">确 定</el-button>
</span>
</el-dialog>
</app-card>
......@@ -115,11 +115,14 @@ import ShareQrcode from '../components/ShareQrcode.vue'
import { getCondition, getPayList, allowCreate, createNewTicket, drawBack, cancelTicket } from '../api'
import XLSX from 'xlsx'
import { funDownload } from '@/utils/util'
const statusMap = { 1: '不可开具', 2: '未开具', 3: '开具中', 4: '已开具', 5: '开票失效', 6: '已作废' }
export default {
components: { AppCard, AppList, TicketForm, ShareQrcode },
data() {
return {
id: '',
shareUrl: '',
conditionList: { // 筛选条件列表
project_id: [], // 项目
channel_id: [], // 渠道
......@@ -246,6 +249,7 @@ export default {
slots: 'lastDate'
}
],
columnsOptions: { key: 'payments' },
columns: [
{ type: 'selection', minWidth: '50px', fixed: 'left' },
{ label: '客户名称', prop: 'name', minWidth: 80 },
......@@ -275,8 +279,24 @@ export default {
{ label: '开学时间', prop: 'bill_customer_class_start_time', align: 'center', minWidth: 200 },
{ label: '学制期限', prop: 'bill_customer_class_length_of_schooling', align: 'center', minWidth: 80 },
{ label: '客户编号', prop: 'customer_id', align: 'center', minWidth: 300 },
{ label: '退费状态', prop: 'refund_time', align: 'center', minWidth: 80 },
{ label: '发票状态', prop: 'invoice_status', align: 'center', minWidth: 80 },
// eslint-disable-next-line object-curly-newline
{ label: '退费状态',
prop: 'refund_time',
align: 'center',
minWidth: 80,
computed({ row }) {
return row.refund_time === null ? '未退费' : '已退费'
}
},
// eslint-disable-next-line object-curly-newline
{ label: '发票状态',
prop: 'invoice_status',
align: 'center',
minWidth: 80,
computed({ row }) {
return statusMap[row.invoice_status]
}
},
{ label: '发票申请日期', prop: 'invoice_application_time', align: 'center', minWidth: 200 },
{ label: '允许开具发票', prop: 'can_add_invoice', slots: 'status', align: 'center', minWidth: 200 },
{ label: '操作', slots: 'table-x', align: 'center', minWidth: 300 }
......@@ -293,8 +313,13 @@ export default {
this.id = row.id
this.ticketVisible = true
},
QrCodeShow(row) {
// 作废发票
disabledTicket(row) {
this.id = row.id
this.disabledTicketVisible = true
},
qrCode(row) {
this.shareUrl = `${import.meta.env.VITE_SHARE_URL}/h5/payment/invoice?id=${row.id}`
this.codeVisible = true
},
// 获取过滤条件
......@@ -310,8 +335,8 @@ export default {
this.multipleSelection = val
},
// 开具发票
handleCreateTicket(row) {
createNewTicket(row.id).then(res => {
handleCreateTicket() {
createNewTicket().then(res => {
if (res.code === 0) {
this.$message.success('开票成功')
this.ticketVisible = false
......@@ -321,7 +346,8 @@ export default {
},
// 是否允许开具发票
handleStatus(row) {
allowCreate(row.id, row.status).then(res => {
const params = { id: row.id, status: row.can_add_invoice }
allowCreate(params).then(res => {
if (res.code === 0) {
this.$message.success('更新状态成功')
} else {
......@@ -330,13 +356,13 @@ export default {
})
},
// 确认作废
disabledTicket(row) {
const params = { id: row.id }
cancelTicket(params).then(res => {
confirmDisabledTicket() {
// const params = { id: row.id }
cancelTicket().then(res => {
if (res.code === 0) {
this.disabledTicketVisible = false
this.getPayList() // 更新订单列表
this.$message.success('发票已作废')
this.getPayList() // 更新订单列表
} else {
this.$message.error('该发票无作废失败')
}
......@@ -356,14 +382,22 @@ export default {
},
// 导出
exportSelect() {
console.log('dsfsf')
const list = this.tableOptions.columns.filter(item => {
return item.prop && item.prop !== 'head_img'
})
const headList = list.map(item => item.label)
const propList = list.map(item => item.prop)
const excelList = []
excelList.push(headList, propList)
excelList.push(headList)
this.multipleSelection.forEach(item => {
const rowValArr = []
propList.forEach(key => {
let val = item[key]
if (key === 'can_add_invoice') val = val === '1' ? '允许' : '不允许'
rowValArr.push(val)
})
excelList.push(rowValArr)
})
const ws = XLSX.utils.aoa_to_sheet(excelList)
ws['!cols'] = [
{ wpx: 120 },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论