57a97faf by 杨炀

no message

1 parent af423e2b
<template>
<view class="page">
<view class="uni-margin-wrap">
<!-- <view class="logobox">
<image class="logo" :src="venue.venueLogo"></image>
<text>{{venue.venueName}}</text>
</view> -->
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration" indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
<!-- <swiper-item v-for="(p, index) in venue.venuePicArr" :key="index">
......
<template>
<view>
<!-- 发票开具 -->
<view v-if="isEdit">
<!-- <view v-if="isEdit">
<view>
<view class="billItem" v-for="b in list" :key="b.id">
<view class="name">
......@@ -26,12 +26,12 @@
</view>
</view>
</view>
</view> -->
<view class="whiteItem">
<uni-forms>
<uni-forms-item label="开票金额">
<!-- <uni-forms-item label="开票金额">
<text class="bigprice">¥{{totalMoney}}</text>
</uni-forms-item>
</uni-forms-item> -->
<uni-forms-item label="是否开具水单" required>
<uni-data-checkbox v-model="form.isReceipt" :localdata="typeSD" />
</uni-forms-item>
......@@ -40,16 +40,17 @@
<uni-data-checkbox v-model="form.invoiceType" :localdata="type2" />
</uni-forms-item>
<uni-forms-item label="发票抬头" required>
<lin-select v-if="form.invoiceType==1" :list="companyList" :loading="companyloading" loading-text="数据加载中" value-key="bilName" max-height="180"
placeholder="请输入公司名称" @input="getComanyInfo" v-model="form.invoiceTitle"/>
<uni-easyinput type="text" v-else v-model="form.invoiceTitle"></uni-easyinput>
<!-- <lin-select v-if="form.invoiceType==1" :list="companyList" :loading="companyloading"
loading-text="数据加载中" value-key="bilName" max-height="180" placeholder="请输入公司名称"
@input="getComanyInfo" v-model="form.invoiceTitle" /> -->
<uni-easyinput type="text" v-model="form.invoiceTitle"></uni-easyinput>
</uni-forms-item>
<uni-forms-item label="税号" required v-if="form.invoiceType=='0'">
<uni-easyinput type="text" v-model="form.invoiceTfn"></uni-easyinput>
</uni-forms-item>
<view>
<uni-forms-item label="地址">
<uni-easyinput type="text" v-model="form.invoiceAddress"></uni-easyinput>
<uni-forms-item label="邮箱" required>
<uni-easyinput type="email" v-model="form.invoiceAddress" @blur="checkEmail"></uni-easyinput>
</uni-forms-item>
<uni-forms-item label="电话">
<uni-easyinput type="text" v-model="form.invoicePhone"></uni-easyinput>
......@@ -95,7 +96,7 @@
isEdit: false,
form: {
invoiceType: '0',
isReceipt:'0'
isReceipt: '0'
},
detail: {},
type: [{
......@@ -129,15 +130,16 @@
regionsList: [],
regionArr: [],
email: '',
companyloading:false,
companyList:[]
companyloading: false,
companyList: []
})
const {
id,
form,
detail,
type,
type2,typeSD,
type2,
typeSD,
totalMoney,
list,
isEdit,
......@@ -145,24 +147,25 @@
remarks,
regionsList,
regionArr,
companyList,companyloading,
companyList,
companyloading,
email
} = toRefs(data);
let orders
let trainId
let invoiceId
onLoad(options => {
console.log(options)
// console.log(options)
if (options.id) {
id.value = options.id
}
trainId = options.trainId
if (options.orders) {
orders = JSON.parse(decodeURIComponent(options.orders));
}
if (options.totalMoney) {
totalMoney.value = options.totalMoney
}
// if (options.orders) {
// orders = JSON.parse(decodeURIComponent(options.orders));
// }
// if (options.totalMoney) {
// totalMoney.value = options.totalMoney
// }
if (options.remarks) {
remarks.value = JSON.parse(decodeURIComponent(options.remarks));
}
......@@ -179,32 +182,49 @@
});
}
function checkEmail() {
var yx = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/;
if (yx.test(form.value.invoiceAddress) == false) {
uni.showToast({
icon:'none',
title:'请输入正确的邮箱'
})
return false;
}
return true;
}
function getList() {
companyloading.value = true
uni.showLoading({
title:'加载中'
title: '加载中'
})
hotel.getInvoiceDetailBills(invoiceId).then(res => {
// 订单
list.value = res.data;
});
// hotel.getInvoiceDetailBills(invoiceId).then(res => {
// // 订单
// list.value = res.data;
// });
hotel.getInvoiceDetail(invoiceId).then(res => {
form.value = res.data
totalMoney.value = form.value.total
// totalMoney.value = form.value.total
companyloading.value = false
uni.hideLoading()
});
}
function getComanyInfo(){
function getComanyInfo() {
companyloading.value = true
hotel.getComanyList({bilName:form.value.invoiceTitle}).then(res=>{
hotel.getComanyList({
bilName: form.value.invoiceTitle
}).then(res => {
companyList.value = res.rows
companyloading.value = false
if(companyList.value.length==1&&companyList.value[0].bilName == form.value.invoiceTitle){
if (companyList.value.length == 1 && companyList.value[0].bilName == form.value.invoiceTitle) {
uni.showLoading({
title:'加载中'
title: '加载中'
})
form.value.invoiceAccount = companyList.value[0].account
form.value.invoiceAddress = companyList.value[0].address
......@@ -219,7 +239,7 @@
}
function submit() {
form.value.total = totalMoney.value
// form.value.total = totalMoney.value
form.value.trainId = trainId
if (!form.value.invoiceTitle) {
uni.showToast({
......@@ -228,6 +248,13 @@
})
return
}
if (!form.value.invoiceAddress) {
uni.showToast({
title: '请输入邮箱 ',
icon: 'none'
})
return
}
if (!form.value.invoiceTfn && form.value.invoiceType == '0') {
uni.showToast({
title: '请完善税号 ',
......@@ -249,7 +276,7 @@
})
})
} else {
form.value.trainOrderInfoList = orders
// form.value.trainOrderInfoList = orders
uni.showLoading({
title: '提交中'
});
......
......@@ -24,7 +24,7 @@
</view>
</view>
<view class="whiteItem">
<!-- <view class="whiteItem">
<view class="qbox">
<image class="m1" v-if="isApply == '0'" @click="goTrainForm" src="./img/btn01.png"></image>
<image class="m1" @click="goTrainForm" v-else style="filter: grayscale(1);" src="./img/btn01.png">
......@@ -32,12 +32,12 @@
<image class="m2" @click="goInfo(1)" src="./img/btn02.png"></image>
<image class="m3" @click="goInfo(2)" src="./img/btn03.png"></image>
</view>
</view>
</view> -->
<view class="whiteItem">
<view class="tt">其他事项</view>
<view class="myList">
<uni-list :border="false">
<uni-list-item :border="true" title="报名提醒" showArrow :clickable="true" @click="goIllustrate">
<uni-list-item :border="true" title="信息提醒" showArrow :clickable="true" @click="goIllustrate">
<template v-slot:header>
<view class="slot-box">
<image class="slot-image" src="./img/qt01.png" mode="widthFix"></image>
......
......@@ -10,14 +10,21 @@
申请日期:
{{ b.createTime }}
</view>
<view style="display: flex;justify-content: space-between;">
<view>
发票抬头:{{b.invoiceTitle}}
</view>
<view>
邮箱:{{b.invoiceAddress}}
</view>
<!-- <view style="display: flex;justify-content: space-between;">
<view> 发票形式 -
<text v-if="b.invoiceForm=='1'">电子发票</text>
<text v-if="b.invoiceForm=='2'">纸质普票</text>
<text v-if="b.invoiceForm=='3'">纸质专票</text>
</view>
<view>¥ <text>{{b.total}}</text></view>
</view>
</view> -->
<view style="margin: 20rpx 0 0;display: flex;justify-content: space-between;">
<view class="status">
<view class="success" v-if="b.isInvoice == '1'"> 已开票</view>
......@@ -43,9 +50,10 @@
</view>
</view>
<view class="fixedBtn" @click="goAdd">
<view class="fixedBtn" @click="goAdd" v-if="list.length==0">
<image class="iconkp" src="./img/kp.png"/>
开发票 </view>
开发票
</view>
<!-- <view class="popContent" v-if="showFirst">
<view class="textbody">
......@@ -114,7 +122,8 @@ function closeFirst(){
}
function goAdd(){
const obj = encodeURIComponent(JSON.stringify(remarks.value))
let path = `/pages_hotel/hotel/canInvoiceBills?trainId=${trainId}&remarks=${obj}&kpType=${kpType}`;
// let path = `/pages_hotel/hotel/canInvoiceBills?trainId=${trainId}&remarks=${obj}&kpType=${kpType}`;
let path =`/pages_hotel/hotel/addInvoice?trainId=${trainId}&remarks=${obj}`;
uni.navigateTo({
url: path
});
......
......@@ -3,7 +3,7 @@
<view class="pads">
<view class="box">
<view class="whiteItem">
<view class="pp">
<!-- <view class="pp">
发票形式
<text v-if="form.invoiceForm=='1'">电子发票</text>
<text v-if="form.invoiceForm=='2'">纸质普票</text>
......@@ -12,7 +12,7 @@
<view class="pp">
开票金额
<text>¥ {{form.total}}</text>
</view>
</view> -->
<!-- <view class="pp" v-if="form.invoiceForm=='1'">
邮箱
<text>{{form.address}}</text>
......@@ -32,17 +32,17 @@
<view class="pp">发票抬头
<text>{{form.invoiceTitle}}</text>
</view>
<view class="pp" v-if="form.invoiceType=='0'">税号
<view class="pp" v-if="form.invoiceTfn">税号
<text>{{form.invoiceTfn}}</text>
</view>
<view v-if="form.invoiceForm=='3'&&form.invoiceType=='0'">
<view class="pp">地址
<view>
<view class="pp" v-if="form.invoiceAddress">邮箱
<text>{{form.invoiceAddress}}</text>
</view>
<view class="pp">电话
<view class="pp" v-if="form.invoicePhone">电话
<text>{{form.invoicePhone}}</text>
</view>
<view class="pp">开户行
<view class="pp" v-if="form.invoiceBank">开户行
<text>{{form.invoiceBank}}</text>
</view>
<view class="pp" v-if="form.invoiceAccount">账户
......@@ -50,8 +50,6 @@
</view>
</view>
</view>
</view>
</view>
......
......@@ -9,13 +9,11 @@
申请日期:
{{ b.createTime }}
</view>
<view style="display: flex;justify-content: space-between;">
<view> 发票形式 -
<text v-if="b.invoiceForm=='1'">电子发票</text>
<text v-if="b.invoiceForm=='2'">纸质普票</text>
<text v-if="b.invoiceForm=='3'">纸质专票</text>
<view>
发票抬头:{{b.invoiceTitle}}
</view>
<view>¥ <text>{{b.total}}</text></view>
<view>
邮箱:{{b.invoiceAddress}}
</view>
<view style="margin: 20rpx 0 0;display: flex;justify-content: space-between;">
<view class="status">
......@@ -26,8 +24,7 @@
</view>
<view>
<button class="billbtn" v-if="b.isInvoice == '0'" @click.stop="editDetail(b)"> 修改发票</button>
<button class="billbtn rbtn-m-kx"
@click.stop="showDetail(b)">详情</button>
<button class="billbtn rbtn-m-kx" @click.stop="showDetail(b)">详情</button>
</view>
</view>
......@@ -44,49 +41,60 @@
</template>
<script setup>
import { ref } from 'vue';
import { onShow,onPullDownRefresh,onReachBottom,onLoad} from '@dcloudio/uni-app';
import * as hotel from '@/common/hotel.js';
import _ from 'lodash';
const app = getApp();
const list = ref([]);
const alertDialog = ref(null);
const showFirst = ref(true);
const queryparam = ref({
pageNum:1,
import {
ref
} from 'vue';
import {
onShow,
onPullDownRefresh,
onReachBottom,
onLoad
} from '@dcloudio/uni-app';
import * as hotel from '@/common/hotel.js';
import _ from 'lodash';
const app = getApp();
const list = ref([]);
const alertDialog = ref(null);
const showFirst = ref(true);
const queryparam = ref({
pageNum: 1,
pageSize: 10
})
const currUser = uni.getStorageSync('currUser');
onShow(() => {
})
const currUser = uni.getStorageSync('currUser');
onShow(() => {
list.value = []
getList()
});
});
onLoad((option) => {
onLoad((option) => {
});
function clickLoadMore() {
if(loadStatus.value=='nomore'){
});
function clickLoadMore() {
if (loadStatus.value == 'nomore') {
return
}
queryparam.value.pageNum+=1
queryparam.value.pageNum += 1
getList()
}
function getList() {
}
function getList() {
hotel.getInvoiceByUserId().then(res => {
list.value = res.rows;
});
}
function showDetail(b) {
}
function showDetail(b) {
let path = `/pages_hotel/hotel/invoiceDetail?invoiceId=${b.id}`;
uni.navigateTo({
url: path
});
}
function editDetail(b) {
}
function editDetail(b) {
hotel.getTrainDetail(b.trainId).then(res => {
let path = `/pages_hotel/hotel/addInvoice?invoiceId=${b.id}&isEdit=true&kpType=${res.data.kpType}`;
......@@ -96,89 +104,191 @@ function editDetail(b) {
})
}
}
</script>
<style lang="scss" scoped>
.fixedBtn{position: fixed;right: 30rpx;bottom: 10%;width: 100rpx;height: 100rpx;color: #fff;
background: linear-gradient(270deg, #54e1b9, #00caa6);border-radius: 50%;
box-shadow: 0 0 15rpx #666;font-size: 24rpx;
text-align: center;}
.pads{padding:0 25rpx 70rpx;}
.billItem {
width: auto; padding: 30rpx 0;margin: 30rpx 0 0;
.fixedBtn {
position: fixed;
right: 30rpx;
bottom: 10%;
width: 100rpx;
height: 100rpx;
color: #fff;
background: linear-gradient(270deg, #54e1b9, #00caa6);
border-radius: 50%;
box-shadow: 0 0 15rpx #666;
font-size: 24rpx;
text-align: center;
}
.pads {
padding: 0 25rpx 70rpx;
}
.billItem {
width: auto;
padding: 30rpx 0;
margin: 30rpx 0 0;
.uni-input {
padding: 15rpx 0;
color: #000;
}
.billFoot{ margin-bottom: 20rpx;}
}
.rrcard .box {
.billFoot {
margin-bottom: 20rpx;
}
}
.rrcard .box {
padding: 0 0 1px;
margin: 20rpx 0 0;
}
.graybg {
}
.graybg {
background: #f7f8fa;
height: 100vh;
width: 100vw;
overflow: auto;
}
.whitebg {
}
.whitebg {
background: #fff;
margin-top: 15rpx;
border-radius: 20rpx;
margin-bottom: 180rpx;
}
}
.name{font-size: 34rpx;color: #000;}
.name {
font-size: 34rpx;
color: #000;
}
.padh20 {
.padh20 {
padding: 0 25rpx;
}
}
.price {
width: 100%;
overflow: hidden;
}
.billbtn {
color: #1EC886;
border: 1px solid #1EC886;
margin: initial;
line-height: 2;
display: inline-block;
border-radius: 0;
background-color: transparent;
font-size: 28rpx;
}
.rbtn-m-kx {
margin: 0 0 0 10rpx;
background: #1EC886;
color: #fff;
}
.price{width: 100%;overflow: hidden;}
.billbtn{color: #1EC886;border: 1px solid #1EC886; margin: initial;line-height: 2; display: inline-block;
border-radius: 0;background-color: transparent; font-size: 28rpx;}
.rbtn-m-kx{margin: 0 0 0 10rpx;background:#1EC886;color: #fff;}
.billFoot .tip {
.billFoot .tip {
font-size: 24rpx;
font-size: 24rpx;
color: #999;
font-weight: 500;
margin: 0 20rpx;
}
.billItem > view{margin-bottom: 10rpx;}
.billFoot text{white-space: nowrap;}
.billFoot text.danger{color: #da2a2a;}
.blueTag{color: #fff;background-color: #1EC886; padding: 10rpx 10rpx;}
.status{
.warning{color: #ff8124;}
.danger{color: #da2a2a;}
.gary{color: #666;}
.success{color: #1EC886;}
}
.popContent{background:#fff; height: auto; position: fixed; width: 80vw; max-height: 50vh; top: 20%; left: 0; right: 0; border-radius: 10rpx;margin: auto;z-index: 99; box-shadow: 0 0 0 100vh rgba(0,0,0,0.4);
.button{ width: 230rpx; margin: 20rpx auto; font-size: 26rpx; color: #fff; background: linear-gradient(90deg, #00C176, #3ed89b); padding: 6rpx 15rpx;text-align: center; border-radius: 6rpx;}
}
.textbody{padding: 40rpx;}
.textbody .h3{ text-align: center;font-size: 32rpx;}
.textbody .texts{ overflow: auto; line-height: 1.6; text-indent: 2em; color: #666; max-height: 30vh; text-align: justify; margin: 20rpx 0 0; font-size: 28rpx;}
.billItem > view{box-sizing: border-box;}
.iconkp{width: 50rpx;
height: 50rpx;
display: block;
margin:10rpx auto 0;}
}
</style>
.billItem>view {
margin-bottom: 10rpx;
}
.billFoot text {
white-space: nowrap;
}
.billFoot text.danger {
color: #da2a2a;
}
.blueTag {
color: #fff;
background-color: #1EC886;
padding: 10rpx 10rpx;
}
.status {
.warning {
color: #ff8124;
}
.danger {
color: #da2a2a;
}
.gary {
color: #666;
}
.success {
color: #1EC886;
}
}
.popContent {
background: #fff;
height: auto;
position: fixed;
width: 80vw;
max-height: 50vh;
top: 20%;
left: 0;
right: 0;
border-radius: 10rpx;
margin: auto;
z-index: 99;
box-shadow: 0 0 0 100vh rgba(0, 0, 0, 0.4);
.button {
width: 230rpx;
margin: 20rpx auto;
font-size: 26rpx;
color: #fff;
background: linear-gradient(90deg, #00C176, #3ed89b);
padding: 6rpx 15rpx;
text-align: center;
border-radius: 6rpx;
}
}
.textbody {
padding: 40rpx;
}
.textbody .h3 {
text-align: center;
font-size: 32rpx;
}
.textbody .texts {
overflow: auto;
line-height: 1.6;
text-indent: 2em;
color: #666;
max-height: 30vh;
text-align: justify;
margin: 20rpx 0 0;
font-size: 28rpx;
}
.billItem>view {
box-sizing: border-box;
}
.iconkp {
width: 50rpx;
height: 50rpx;
display: block;
margin: 10rpx auto 0;
}
</style>
\ No newline at end of file
......
......@@ -21,13 +21,13 @@
</view>
</template>
</uni-list-item>
<uni-list-item :border="false" title="我的订单" showArrow clickable="true" @click="goBills">
<!-- <uni-list-item :border="false" title="我的订单" showArrow clickable="true" @click="goBills">
<template v-slot:header>
<view class="slot-box">
<image class="slot-image" src="/static/user_icon02.png" mode="widthFix"></image>
</view>
</template>
</uni-list-item>
</uni-list-item> -->
<uni-list-item :border="false" title="我的发票" showArrow clickable="true" @click="goMyInvoiceBill">
<template v-slot:header>
<view class="slot-box">
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!