|
@@ -3,7 +3,45 @@
|
|
|
<ujp-navbar title="我的发票">
|
|
|
<text class="management" @click="gotoUrl('pagesFinance/MyInvoice/invoiceTitleManagement')">抬头管理</text>
|
|
|
</ujp-navbar>
|
|
|
-
|
|
|
+
|
|
|
+<!-- 弹窗 -->
|
|
|
+ <view class="modal">
|
|
|
+
|
|
|
+ <u-modal v-model="showTime" title="按时间开票" @confirm="confirmmodal"
|
|
|
+ :show-cancel-button="true" confirm-text="去开票" cancel-text="取消">
|
|
|
+ <u-picker v-model="showTimePicker"
|
|
|
+ @confirm="confirmTimePicker"
|
|
|
+ mode="time" :params="params" ></u-picker>
|
|
|
+
|
|
|
+ <view class="infos">
|
|
|
+
|
|
|
+ <view class="item">
|
|
|
+ <view class="name">
|
|
|
+ 开始时间
|
|
|
+ </view>
|
|
|
+ <view class="content" @click="TimeKey='A',showTimePicker=true">
|
|
|
+ {{defaultTimeA?defaultTimeA:'请选择开始时间'}}
|
|
|
+ <u-icon name="arrow-right"></u-icon>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="item">
|
|
|
+ <view class="name">
|
|
|
+ 结束时间
|
|
|
+ </view>
|
|
|
+ <view class="content" @click="TimeKey='B',showTimePicker=true">
|
|
|
+ {{defaultTimeB?defaultTimeB:'请选择结束时间'}}
|
|
|
+ <u-icon name="arrow-right"></u-icon>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ </u-modal>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
<u-tabs inactive-color="#888888" active-color="#101010" :list="list" :is-scroll="true"
|
|
|
:current="current" @change="change"></u-tabs>
|
|
|
|
|
@@ -14,7 +52,7 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 未开票 -->
|
|
|
- <view class="not-invoiced" v-show="current==0">
|
|
|
+ <view class="not-invoiced" v-show="current==0">
|
|
|
|
|
|
<view class="not-invoiced-item flex" v-for="(item,index) in list[0].list" :key="index">
|
|
|
<view class="radio">
|
|
@@ -41,17 +79,15 @@
|
|
|
|
|
|
|
|
|
<view class="bottom">
|
|
|
- <view class="radio">
|
|
|
- <u-checkbox v-model="allck" @change="allckBtn"></u-checkbox>
|
|
|
- </view>
|
|
|
- <view class="check-all">
|
|
|
- 全选
|
|
|
- </view>
|
|
|
+ <u-button type="info" @click="showsheet=true" v-if="list[0].list.length" shape="primary">更多方式</u-button>
|
|
|
+
|
|
|
<view class="total">
|
|
|
<p class="total-price">共<text style="color: #FF7300;" >{{sumActualFee.toFixed(2)}}元</text></p>
|
|
|
<p class="order">{{selectcount}}个订单</p>
|
|
|
</view>
|
|
|
- <u-button type="success" @click="submit()" shape="circle">去开票</u-button>
|
|
|
+ <u-button type="primary" @click="submit()" >去开票</u-button>
|
|
|
+ <u-action-sheet :list="listsheet" @click="clicksheet" v-model="showsheet"></u-action-sheet>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 已开票 -->
|
|
@@ -87,8 +123,12 @@
|
|
|
|
|
|
<script>
|
|
|
import * as API from '@/apis/invoiceApi.js'
|
|
|
+ import udoublepicker from '@/components/u-double-picker.vue'
|
|
|
|
|
|
- export default {
|
|
|
+ export default {
|
|
|
+ components: {
|
|
|
+ udoublepicker
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
id:"",
|
|
@@ -107,9 +147,27 @@
|
|
|
list:[],
|
|
|
}],
|
|
|
current: 0,
|
|
|
- personInfo:{},
|
|
|
- description:"游客模式下需要补全手机号信息,点击前往",
|
|
|
-
|
|
|
+ personInfo:{},
|
|
|
+
|
|
|
+ listsheet:[ {
|
|
|
+ text: '全部开票'
|
|
|
+ }, {
|
|
|
+ text: '按时间选择'
|
|
|
+ }],
|
|
|
+ showTime:false,
|
|
|
+ showsheet:false,
|
|
|
+ showTimePicker:false,
|
|
|
+ TimeKey:"",
|
|
|
+ defaultTimeA:'',
|
|
|
+ defaultTimeB:'',
|
|
|
+ params: {
|
|
|
+ year: true,
|
|
|
+ month: true,
|
|
|
+ day: true,
|
|
|
+ hour: false,
|
|
|
+ minute: false,
|
|
|
+ second: false
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
onReachBottom() {
|
|
@@ -175,7 +233,51 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- methods: {
|
|
|
+ methods: {
|
|
|
+ confirmmodal(){
|
|
|
+ if(!this.defaultTimeA){
|
|
|
+ uni.showToast({
|
|
|
+ title:"请选择开始时间"
|
|
|
+ })
|
|
|
+ this.showTime=true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(!this.defaultTimeB){
|
|
|
+ uni.showToast({
|
|
|
+ title:"请选择结束时间"
|
|
|
+ })
|
|
|
+ this.showTime=true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.defaultTimeA>this.defaultTimeB){
|
|
|
+ uni.showToast({
|
|
|
+ title:"结束时间需要大于开始时间"
|
|
|
+ })
|
|
|
+ this.showTime=true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pagesFinance/MyInvoice/issueInvoice?startDate='+this.defaultTimeA+'&endDate='+this.defaultTimeB+'&id='+this.id,
|
|
|
+ events: {
|
|
|
+ refreshData: () => {
|
|
|
+ this.init()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ confirmTimePicker(e){
|
|
|
+ console.log(e)
|
|
|
+ var time=e.year+'-'+e.month+'-'+e.day
|
|
|
+
|
|
|
+
|
|
|
+ if(this.TimeKey=='A'){
|
|
|
+ this.defaultTimeA=time
|
|
|
+ }
|
|
|
+ if(this.TimeKey=='B'){
|
|
|
+ this.defaultTimeB=time
|
|
|
+ }
|
|
|
+ },
|
|
|
alerttipsCk(){
|
|
|
uni.redirectTo({
|
|
|
url:"/pagesFinance/login/login?jpcode2=invoice"
|
|
@@ -268,6 +370,10 @@
|
|
|
this.current = index;
|
|
|
var list =this.list[this.current].list
|
|
|
this.getlist(true);
|
|
|
+ },
|
|
|
+ init() {
|
|
|
+
|
|
|
+ this.getList(true)
|
|
|
},
|
|
|
submit(id){
|
|
|
|
|
@@ -282,8 +388,33 @@
|
|
|
}
|
|
|
|
|
|
uni.navigateTo({
|
|
|
- url:'/pagesFinance/MyInvoice/issueInvoice?ids='+id
|
|
|
+ url:'/pagesFinance/MyInvoice/issueInvoice?ids='+id+'&id='+this.id,
|
|
|
+ events: {
|
|
|
+ refreshData: () => {
|
|
|
+ this.init()
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
+ },
|
|
|
+ clicksheet(index){
|
|
|
+ if(index==0){
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pagesFinance/MyInvoice/issueInvoice?saveAll=1'+'&id='+this.id,
|
|
|
+ events: {
|
|
|
+ refreshData: () => {
|
|
|
+ this.init()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.showTime=true
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ submit1(){
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -402,34 +533,32 @@
|
|
|
|
|
|
.bottom{
|
|
|
width: 100%;
|
|
|
- padding: 14px 13px;
|
|
|
+ padding: 28rpx ;
|
|
|
background-color: rgba(255, 255, 255, 100);
|
|
|
position: fixed;
|
|
|
bottom: 0;
|
|
|
left: 0;
|
|
|
- display: flex;
|
|
|
+ display: flex;
|
|
|
+ /deep/.u-btn{
|
|
|
+ margin: 0 16rpx;
|
|
|
+ }
|
|
|
.check-all{
|
|
|
- font-size: 16px;
|
|
|
- margin: auto 5px;
|
|
|
+ font-size: 32rpx;
|
|
|
+ margin: auto 10rpx;
|
|
|
}
|
|
|
.total{
|
|
|
flex: 1;
|
|
|
// margin-left: 80px;
|
|
|
text-align: right;
|
|
|
.total-price{
|
|
|
- font-size:16px
|
|
|
+ font-size:32rpx
|
|
|
}
|
|
|
.order{
|
|
|
- font-size: 12px;
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- /deep/.u-btn{
|
|
|
- width: 27.7%;
|
|
|
- line-height: 40px;
|
|
|
- font-size: 18px;
|
|
|
- margin-left:20px;
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
.invoice{
|
|
|
color: rgba(255, 97, 0, 100) !important;
|
|
@@ -440,5 +569,45 @@
|
|
|
.tips{
|
|
|
color: rgba(153, 153, 153, 100);
|
|
|
text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 弹窗
|
|
|
+ .modal {
|
|
|
+ background-color: #101010;
|
|
|
+
|
|
|
+ .title {
|
|
|
+
|
|
|
+ line-height: 20px;
|
|
|
+ padding: 18px 52px;
|
|
|
+ background-image: linear-gradient(rgb(0, 217, 115), #00A457);
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .infos {
|
|
|
+ padding: 20px 14px;
|
|
|
+
|
|
|
+ .item {
|
|
|
+ white-space: pre;
|
|
|
+ line-height: 28px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ color: #666666;
|
|
|
+ font-size: 16px
|
|
|
+
|
|
|
+ }
|
|
|
+ .content{
|
|
|
+ color: #000;
|
|
|
+ }
|
|
|
+ .hint {
|
|
|
+ color: rgba(238, 49, 56, 100);
|
|
|
+ margin-top: 16px;
|
|
|
+
|
|
|
+ font-size: 14px
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
</style>
|