小程序编译0.0.0
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<view class="contenttop">
|
||||
<view class="flex-start">
|
||||
<input type="text" placeholder="请输入抬头名称" v-model="form.user_name" @input="onInput" />
|
||||
<text @click="popupshow = !popupshow">筛选</text>
|
||||
<text @click="popupshow = !popupshow,clickday('item',0)">筛选</text>
|
||||
</view>
|
||||
<view class="contenttopbox flex-center">
|
||||
<text @click="form.type = '全部',form.page = '1',form.user_name = '',invoicedorderlist()"
|
||||
@@ -15,7 +15,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentbox">
|
||||
<view class="contentboxitem" v-for="(item,index) in form.list" :key="index" @click.stop="clickdetails(item)">
|
||||
<view class="contentboxitem" v-for="(item,index) in form.list" :key="index"
|
||||
@click.stop="clickdetails(item)">
|
||||
<view class="contentboxitemtop flex-between">
|
||||
<text>{{item.user_name}}</text>
|
||||
</view>
|
||||
@@ -32,7 +33,7 @@
|
||||
<text>{{item.price}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>创建时间</text>
|
||||
<text>创建时间:</text>
|
||||
<text>{{item.createtime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -41,8 +42,10 @@
|
||||
<u-popup :show="detailsshow" @close="detailsshow = !detailsshow" mode="bottom" :round="10">
|
||||
<view class="detailsclass">
|
||||
<view class="detailsclasstop">
|
||||
<text> 详情</text>
|
||||
<u-icon class="icon" name="close" @click="detailsshow = false" color="#999999" size="20"></u-icon>
|
||||
<text>详情</text>
|
||||
<view class="icon">
|
||||
<u-icon name="close" @click="detailsshow = false" color="#999999" size="20"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detailsclassbox">
|
||||
<view class="detailsclassboxitem">
|
||||
@@ -83,10 +86,10 @@
|
||||
<text>{{details.status}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detailsclassboxtext">
|
||||
<view class="detailsclassboxtext" v-if="details.status =='开票成功'">
|
||||
发票信息
|
||||
</view>
|
||||
<view class="detailsclassbox">
|
||||
<view class="detailsclassbox" v-if="details.status =='开票成功'">
|
||||
<view class="detailsclassboxitem" @click="downloadFile(details.pdfUrl)">
|
||||
<text>PDF版式文件</text>
|
||||
<text>下载</text>
|
||||
@@ -118,10 +121,10 @@
|
||||
</view>
|
||||
<view class="popupshowbox_itemzdy flex-between" v-if="showpickerbox && selectshow == 2">
|
||||
<view class="popupshowbox_item" @click="showpicker=!showpicker,clickshowpicker = 1">
|
||||
{{this.starttime}}
|
||||
{{starttime}}
|
||||
</view>
|
||||
-<view class="popupshowbox_item" @click="showpicker=!showpicker,clickshowpicker = 2">
|
||||
{{this.endtime}}
|
||||
{{endtime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -166,7 +169,7 @@
|
||||
endtime: '',
|
||||
selectshow: '', //选中
|
||||
datastatuslistshow: '',
|
||||
details:{},
|
||||
details: {},
|
||||
form: {
|
||||
user_name: '',
|
||||
time: "",
|
||||
@@ -208,13 +211,13 @@
|
||||
let res = await this.api.invoiceddetail({
|
||||
id: item.id
|
||||
})
|
||||
if(res.code == 1){
|
||||
if (res.code == 1) {
|
||||
this.details = res.data
|
||||
this.detailsshow = true
|
||||
}
|
||||
},
|
||||
// 下载
|
||||
downloadFile(url){
|
||||
downloadFile(url) {
|
||||
uni.downloadFile({
|
||||
url: url, //仅为示例,并非真实的资源
|
||||
success: (res) => {
|
||||
@@ -233,20 +236,23 @@
|
||||
const year = d.getFullYear()
|
||||
let month = d.getMonth() + 1
|
||||
let date = d.getDate()
|
||||
month = month < 10 ? `0${month}` : month
|
||||
date = date < 10 ? `0${date}` : date
|
||||
switch (index) {
|
||||
case 0:
|
||||
this.starttime = `${(month-1)==0?(year-1):year}-0${(month-1)==0?12:(month-1)}-${date}`
|
||||
this.endtime = `${year}-0${month}-${date}`
|
||||
this.starttime = `${(month-1)==0?(year-1):year}-${(month-1)==0?12:(month-1)}-${date}`
|
||||
this.endtime = `${year}-${month}-${date}`
|
||||
this.showpickerbox = false
|
||||
break;
|
||||
case 1:
|
||||
this.starttime = `${year}-0${month>6?(month-6):(month+12-6)}-${date}`
|
||||
this.endtime = `${year}-0${month}-${date}`
|
||||
this.starttime = `${year}-${month>6?(month-6):(month+12-6)}-${date}`
|
||||
this.endtime = `${year}-${month}-${date}`
|
||||
this.showpickerbox = false
|
||||
break;
|
||||
case 2:
|
||||
this.showpickerbox = !this.showpickerbox
|
||||
this.starttime = '' //起始时间
|
||||
this.endtime = ''
|
||||
this.showpickerbox = true
|
||||
break;
|
||||
}
|
||||
this.selectshow = index
|
||||
@@ -254,17 +260,21 @@
|
||||
// 确定时间
|
||||
confirmpicker(e) {
|
||||
console.log(this.clickshowpicker, uni.$u.timeFrom(e.value, 'yyyy-mm-dd'))
|
||||
let tiem = uni.$u.timeFrom(e.value, 'yyyy-mm-dd')
|
||||
if (this.clickshowpicker == 1) {
|
||||
this.starttime = uni.$u.timeFrom(e.value, 'yyyy-mm-dd')
|
||||
this.$set(this, 'starttime', tiem);
|
||||
// this.starttime = tiem
|
||||
}
|
||||
if (this.clickshowpicker == 2) {
|
||||
this.endtime = uni.$u.timeFrom(e.value, 'yyyy-mm-dd')
|
||||
this.$set(this, 'endtime', tiem);
|
||||
// this.endtime = tiem
|
||||
}
|
||||
this.$forceUpdate()
|
||||
this.showpicker = !this.showpicker
|
||||
},
|
||||
// 确定
|
||||
clickdetermine() {
|
||||
if (!this.starttime == '' || !this.endtime == '') {
|
||||
if (this.starttime != '' && this.endtime != '') {
|
||||
this.form.time = `${this.starttime} 00:00:00,${this.endtime} 00:00:00`
|
||||
}
|
||||
this.popupshow = false
|
||||
@@ -282,6 +292,8 @@
|
||||
}
|
||||
this.datastatuslistshow = ''
|
||||
this.popupshow = false
|
||||
this.selectshow = ''
|
||||
|
||||
this.invoicedorderlist()
|
||||
},
|
||||
// 搜索
|
||||
|
||||
Reference in New Issue
Block a user