小程序编译0.0.0
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">*商品编码</text>
|
||||
<view class="addshowboxinput_inp">
|
||||
<input type="text" placeholder="" v-model="addform.spbm" disabled
|
||||
<input type="text" placeholder="请选择" v-model="addform.spbm" disabled
|
||||
style="background: #f6f6f6;" />
|
||||
<view class="absolute"
|
||||
@click="addtowshow=!addtowshow,selectencoding({selected: true,pid: ''},'index')">
|
||||
@@ -60,7 +60,7 @@
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">编码简称</text>
|
||||
<view class="addshowboxinput_inp">
|
||||
<input type="text" placeholder="" v-model="addform.abbreviation" disabled
|
||||
<input type="text" placeholder="请选择" v-model="addform.abbreviation" disabled
|
||||
style="background: #f6f6f6;" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -159,12 +159,14 @@
|
||||
<u-popup :show="addtowshow" @close="addtowshow = false" mode="bottom" :round="16">
|
||||
<view class="addtowshowclass">
|
||||
<view class="addtowshowclasstop">
|
||||
<!-- <text class="addtowshowclassabsolute">x</text> -->
|
||||
商品编码(税局)选择
|
||||
<u-icon class="addtowshowclassabsolutelet" v-if="this.selectencodinglists.length>1"
|
||||
@click="selectencodingicon" name="arrow-left" color="#999999" size="20"></u-icon>
|
||||
<u-icon @click="addtowshow = false" class="addtowshowclassabsolute" name="close" color="#999999"
|
||||
size="20"></u-icon>
|
||||
<view class="addtowshowclassabsolutelet" v-if="this.selectencodinglists.length>1"
|
||||
@click="selectencodingicon">
|
||||
<u-icon name="arrow-left" color="#999999" size="20"></u-icon>
|
||||
</view>
|
||||
<view @click="addtowshow = false" class="addtowshowclassabsolute">
|
||||
<u-icon name="close" color="#999999" size="20"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="selectencodingitem.tax_rate">
|
||||
<view class="addtowshowpositionitem flex-between">
|
||||
@@ -260,6 +262,27 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 进行赋码
|
||||
async titlecoding() {
|
||||
this.selectencodingitem = {}
|
||||
let {
|
||||
data
|
||||
} = await this.api.invoicecoding({
|
||||
name: this.addform.title
|
||||
})
|
||||
if (data.length == 0) {
|
||||
uni.showToast({
|
||||
title: '赋码失败,请检查商品名称!',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
} else {
|
||||
this.addform.abbreviation = data[0].catalog_name_short
|
||||
this.addform.title = data[0].catalog_name
|
||||
this.addform.spbm = data[0].catalog_code
|
||||
}
|
||||
|
||||
},
|
||||
async clickdelete(item, index) {
|
||||
let res = await this.api.addinvoicegoodsdel({
|
||||
id: item.id
|
||||
@@ -650,6 +673,7 @@
|
||||
}
|
||||
|
||||
.absolute {
|
||||
z-index: 99;
|
||||
padding: 8rpx 18rpx;
|
||||
position: absolute;
|
||||
background: #318AFE;
|
||||
@@ -730,7 +754,6 @@
|
||||
}
|
||||
|
||||
.addtowshowclass {
|
||||
height: 750rpx;
|
||||
overflow: auto;
|
||||
padding: 0 24rpx;
|
||||
|
||||
|
||||
@@ -76,15 +76,15 @@
|
||||
</view>
|
||||
<view class="popupshowbox_box flex-between">
|
||||
<view class="popupshowbox_item" v-for="(item,index) in daylist" :key="index"
|
||||
@click="clickday(item,index)" :class="selectshow == index ?'select':''">
|
||||
@click="clickday(item,index)" :class="selectshow === index ? 'select':''">
|
||||
{{item.name}}
|
||||
</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>
|
||||
@@ -170,24 +170,28 @@
|
||||
|
||||
// 时间
|
||||
clickday(item, index) {
|
||||
|
||||
const d = new Date()
|
||||
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
|
||||
@@ -205,7 +209,7 @@
|
||||
},
|
||||
// 确定
|
||||
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
|
||||
@@ -221,6 +225,9 @@
|
||||
status: 'loadmore',
|
||||
list: []
|
||||
}
|
||||
this.selectshow = ''
|
||||
this.starttime = ''
|
||||
this.endtime = ''
|
||||
this.popupshow = false
|
||||
this.invoicingrecordsthatneed()
|
||||
},
|
||||
@@ -352,6 +359,8 @@
|
||||
}
|
||||
|
||||
.popupshowbox_box {
|
||||
width: 100%;
|
||||
|
||||
.popupshowbox_item {
|
||||
margin-top: 24rpx;
|
||||
width: 176rpx;
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="titletop flex-start" @click="addfourshow=!addfourshow">
|
||||
<text>数电票类型</text>
|
||||
<text class="titletoptext">数电票类型</text>
|
||||
<view class="flex-center titletopone" style="margin-left: 16rpx;">
|
||||
<view>
|
||||
{{form.typename?form.typename:'请选择'}}
|
||||
</view>
|
||||
<image src="@/static/electric/type1.png" mode=""></image>
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/electric/type1.png" mode="">
|
||||
</image>
|
||||
<!-- <u-icon name="arrow-rightward" color="#F39D52" size="14"></u-icon> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="titletop flex-start">
|
||||
<text>购买方信息</text>
|
||||
<text class="titletoptext">购买方信息</text>
|
||||
<view class="flex-center">
|
||||
<u-checkbox-group class="titletopcheckbox">
|
||||
<u-checkbox v-model="form.user_type"></u-checkbox>
|
||||
@@ -58,7 +59,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="titletop flex-start">
|
||||
<text>销售方信息</text>
|
||||
<text class="titletoptext">销售方信息</text>
|
||||
<view class="flex-center" style="margin-left: 16rpx;">
|
||||
<u-icon name="reload" color="#7db5fe" size="14"></u-icon>
|
||||
</view>
|
||||
@@ -94,11 +95,11 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="titletop flex-start">
|
||||
<text>收票方式</text>
|
||||
<view class="flex-center" style="margin-left: 16rpx;">
|
||||
<text class="titletoptext">收票方式</text>
|
||||
<!-- <view class="flex-center" style="margin-left: 16rpx;">
|
||||
<u-icon name="question-circle" color="#585858" size="14" @click="clickicon">
|
||||
</u-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view class="listinput flex-between">
|
||||
<view class="listinput_left">
|
||||
@@ -111,7 +112,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="titletop flex-start">
|
||||
<text>开票商品({{`${form.is_tax?'含税':'不含税'}`}})</text>
|
||||
<text class="titletoptext">开票商品({{`${form.is_tax?'含税':'不含税'}`}})</text>
|
||||
<view class="flex-start" style="margin-right: 10rpx;">
|
||||
<text
|
||||
style="font-family: Source Han Sans CN, Source Han Sans CN;font-weight: 400;font-size: 28rpx;color: #333333;margin-right: 16rpx;"></text>
|
||||
@@ -151,7 +152,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="titletop flex-start">
|
||||
<text>备注信息</text>
|
||||
<text class="titletoptext">备注信息</text>
|
||||
</view>
|
||||
<view class="listinput flex-between">
|
||||
<view class="listinput_left">
|
||||
@@ -217,10 +218,9 @@
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">*商品编码</text>
|
||||
<view class="addshowboxinput_inp">
|
||||
<input type="text" placeholder="" v-model="addform.spbm" disabled
|
||||
<input type="text" placeholder="请选择" v-model="addform.spbm" disabled
|
||||
style="background: #f6f6f6;" />
|
||||
<view class="absolute"
|
||||
@click="addtowshow=!addtowshow,selectencoding({selected: true,pid: ''},'index')">
|
||||
<view class="absolute" @click="clickspbm">
|
||||
选择商品名称
|
||||
</view>
|
||||
</view>
|
||||
@@ -229,7 +229,7 @@
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">编码简称</text>
|
||||
<view class="addshowboxinput_inp">
|
||||
<input type="text" placeholder="" v-model="addform.abbreviation" disabled
|
||||
<input type="text" placeholder="请选择" v-model="addform.abbreviation" disabled
|
||||
style="background: #f6f6f6;" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -663,6 +663,15 @@
|
||||
this.form.typename = value[0].label
|
||||
},
|
||||
methods: {
|
||||
// 选项卡
|
||||
clickspbm() {
|
||||
console.log(1111)
|
||||
this.addtowshow = !this.addtowshow
|
||||
this.selectencoding({
|
||||
selected: true,
|
||||
pid: ''
|
||||
}, 'index')
|
||||
},
|
||||
//返回键
|
||||
selectencodingicon() {
|
||||
this.selectencodingitem = {}
|
||||
@@ -752,6 +761,10 @@
|
||||
this.form.dlzhname = i.name
|
||||
}
|
||||
})
|
||||
if (this.form.dlzh == '') {
|
||||
this.form.dlzh = res.data[0].dlzh
|
||||
this.form.dlzhname = res.data[0].name
|
||||
}
|
||||
console.log(res)
|
||||
},
|
||||
|
||||
@@ -894,10 +907,10 @@
|
||||
if (this.mxListform.spsl) {
|
||||
this.mxListform.dj = this.mxListform.je / this.mxListform.spsl
|
||||
}
|
||||
// if (this.mxListform.dj) {
|
||||
// this.mxListform.spsl = this.mxListform.je / this.mxListform.dj
|
||||
// }
|
||||
this.zongshui()
|
||||
if (this.mxListform.dj) {
|
||||
this.mxListform.spsl = this.mxListform.je / this.mxListform.dj
|
||||
}
|
||||
this.$u.debounce(this.zongshui, 500)
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -912,12 +925,15 @@
|
||||
if (this.mxListform.dj || this.mxListform.je) {
|
||||
if (this.mxListform.dj) {
|
||||
this.mxListform.je = this.mxListform.dj * this.mxListform.spsl
|
||||
this.$forceUpdate()
|
||||
}
|
||||
if (this.mxListform.je) {
|
||||
this.mxListform.dj = this.mxListform.je / this.mxListform.spsl
|
||||
}
|
||||
this.zongshui()
|
||||
if (this.mxListform.spsl == 0) {
|
||||
this.mxListform.se = 0
|
||||
}
|
||||
this.$u.debounce(this.zongshui, 500)
|
||||
this.$forceUpdate()
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -937,7 +953,7 @@
|
||||
if (this.mxListform.je) {
|
||||
this.mxListform.spsl = this.mxListform.je / this.mxListform.dj
|
||||
}
|
||||
this.zongshui()
|
||||
this.$u.debounce(this.zongshui, 500)
|
||||
this.$forceUpdate()
|
||||
} else {
|
||||
return false;
|
||||
@@ -948,7 +964,7 @@
|
||||
if (this.mxListform.sl == null || this.mxListform.sl == '') {
|
||||
return false;
|
||||
}
|
||||
this.$u.throttle(this.mxListformslshowtype, 500)
|
||||
this.mxListformslshowtype()
|
||||
},
|
||||
// 算税率
|
||||
async mxListformslshowtype(item) {
|
||||
@@ -1223,6 +1239,13 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.email == null || this.form.email == '') {
|
||||
uni.showToast({
|
||||
title: '邮箱地址不能为空',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
this.form.is_tax = this.form.is_tax ? 1 : 2
|
||||
this.form.user_type = this.form.user_type ? 1 : 2 // 1 个人 2企业
|
||||
this.form.mxList = JSON.stringify(this.form.mxListes)
|
||||
@@ -1253,7 +1276,7 @@
|
||||
.titletop {
|
||||
padding-top: 32rpx;
|
||||
|
||||
text {
|
||||
.titletoptext {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
@@ -1571,6 +1594,7 @@
|
||||
color: #FFFFFF;
|
||||
right: 16rpx;
|
||||
top: 50%;
|
||||
z-index: 99;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
@@ -1676,12 +1700,13 @@
|
||||
color: #333333;
|
||||
|
||||
input {
|
||||
height: 80rpx;
|
||||
width: auto;
|
||||
padding: 16rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.listinput_leftrelative {
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
width: 25%;
|
||||
width: 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
短信验证
|
||||
</view>
|
||||
<view class="messageboxtoptext">
|
||||
成功:验证码已发送到手机号:{{codephone}}
|
||||
{{codephone}}
|
||||
</view>
|
||||
<view class="messageboxtoptext flex-between">
|
||||
<input type="mobile" v-model="codelang" placeholder="请输入短信验证码" maxlength="6" />
|
||||
@@ -173,8 +173,8 @@
|
||||
data() {
|
||||
return {
|
||||
formCode: {
|
||||
text: '',
|
||||
url: 'www.baidu.com'
|
||||
text: '超掌柜',
|
||||
url: 'https://www.baidu.com/baidu?ie=utf-8&wd=312'
|
||||
}, //成功后
|
||||
text: 'uQRCode',
|
||||
size: 242,
|
||||
@@ -218,6 +218,9 @@
|
||||
this.invoicingrecordsthatneed()
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.merchantStoreshowMerchantStoreReceipt()
|
||||
},
|
||||
methods: {
|
||||
// 设置默认
|
||||
async setdefault(item) {
|
||||
@@ -241,7 +244,7 @@
|
||||
|
||||
},
|
||||
// 二维码
|
||||
async merchantStoreshowMerchantStoreReceipt(lane) {
|
||||
async merchantStoreshowMerchantStoreReceipt() {
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
// 设置二维码内容
|
||||
@@ -266,19 +269,36 @@
|
||||
content: `确定使用办税员【${item.name}】进行人脸吗?`,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
// 这是未登录要发送验证码
|
||||
this.accountqrcode()
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
// 人脸前获取验证码
|
||||
async accountqrcode() {
|
||||
await this.api.accountqrcode({
|
||||
let res = await this.api.accountqrcode({
|
||||
id: this.loginid
|
||||
})
|
||||
this.messageshow = true
|
||||
if (res.data.url) {
|
||||
this.formCode.url = res.data.url
|
||||
this.formCode.text = res.data.text
|
||||
this.canvasshow = true
|
||||
this.$nextTick(() => {
|
||||
this.merchantStoreshowMerchantStoreReceipt()
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
this.yanzhengm(false)
|
||||
this.codephone = res.data.msg
|
||||
this.messageshow = true
|
||||
}
|
||||
},
|
||||
//登录获取验证码
|
||||
login(item, textshow) {
|
||||
@@ -290,6 +310,7 @@
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.getsendsms()
|
||||
this.yanzhengm(false)
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
@@ -298,24 +319,39 @@
|
||||
},
|
||||
// 登录前获取验证码
|
||||
async getsendsms() {
|
||||
await this.api.getsendsms({
|
||||
let res = await this.api.getsendsms({
|
||||
id: this.loginid
|
||||
})
|
||||
this.messageshow = true
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
this.codephone = res.data.msg
|
||||
this.messageshow = true
|
||||
}
|
||||
},
|
||||
// 登录成功上传
|
||||
async sensms() {
|
||||
console.log(this.textshow)
|
||||
let res = await this.api.sensms({
|
||||
id: this.loginid,
|
||||
code: this.codelang,
|
||||
})
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.formCode = res.data
|
||||
uni.showToast({
|
||||
title: '登录成功',
|
||||
icon: 'none'
|
||||
});
|
||||
this.messageshow = false
|
||||
switch (this.textshow) {
|
||||
case '登录':
|
||||
uni.showToast({
|
||||
title: '登录成功',
|
||||
icon: 'none'
|
||||
});
|
||||
this.messageshow = false
|
||||
break;
|
||||
case '人脸':
|
||||
await this.accountqrcode()
|
||||
break;
|
||||
}
|
||||
this.reset() //重置
|
||||
}
|
||||
},
|
||||
@@ -383,7 +419,7 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
this.addform.taxphone = this.codephone
|
||||
// this.addform.taxphone = this.codephone
|
||||
let res = await this.api.szzpyaddinvoicer(this.addform)
|
||||
if (res.code == 1) {
|
||||
this.showpopup = false
|
||||
@@ -418,10 +454,11 @@
|
||||
break;
|
||||
|
||||
}
|
||||
this.yanzhengm() //验证码
|
||||
this.yanzhengm(true) //验证码
|
||||
},
|
||||
//点击确定
|
||||
queding() {
|
||||
console.log(this.textshow)
|
||||
switch (this.textshow) {
|
||||
case '修改':
|
||||
this.szzpyaddinvoicersendsms()
|
||||
@@ -436,11 +473,13 @@
|
||||
|
||||
},
|
||||
// 验证码
|
||||
yanzhengm() {
|
||||
uni.showToast({
|
||||
title: '验证码发送成功',
|
||||
icon: 'none'
|
||||
});
|
||||
yanzhengm(e) {
|
||||
if (e) {
|
||||
uni.showToast({
|
||||
title: '验证码发送成功',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
// 定时器
|
||||
this.showText = false;
|
||||
this.Recapture = '重新获取';
|
||||
@@ -469,6 +508,7 @@
|
||||
this.codelang = ''
|
||||
this.codephone = ''
|
||||
this.popupshow = false
|
||||
this.canvasshow = false
|
||||
this.newissuedbyliststatus()
|
||||
},
|
||||
// 列表
|
||||
@@ -570,6 +610,7 @@
|
||||
padding: 28rpx 32rpx;
|
||||
|
||||
.messageboxtop {
|
||||
padding: 10rpx 0;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
|
||||
@@ -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()
|
||||
},
|
||||
// 搜索
|
||||
|
||||
@@ -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>
|
||||
@@ -83,17 +84,17 @@
|
||||
<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>
|
||||
</view>
|
||||
<view class="detailsclassboxitem" @click="downloadFile(details.ofdUrl)">
|
||||
<text>OFD版式文件</text>
|
||||
<text>下载</text>
|
||||
<text>OFD版式文件</text>
|
||||
<text>下载</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem" @click="downloadFile(details.xmlUrl)">
|
||||
<text>XML版式文件</text>
|
||||
@@ -113,15 +114,15 @@
|
||||
</view>
|
||||
<view class="popupshowbox_box flex-between">
|
||||
<view class="popupshowbox_item" v-for="(item,index) in daylist" :key="index"
|
||||
@click="clickday(item,index)" :class="selectshow == index ?'select':''">
|
||||
@click="clickday(item,index)" :class="selectshow === index ?'select':''">
|
||||
{{item.name}}
|
||||
</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>
|
||||
@@ -194,7 +195,7 @@
|
||||
let res = await this.api.invoiceddetail({
|
||||
id: item.id
|
||||
})
|
||||
if(res.code == 1){
|
||||
if (res.code == 1) {
|
||||
this.details = res.data
|
||||
this.detailsshow = true
|
||||
}
|
||||
@@ -205,27 +206,29 @@
|
||||
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
|
||||
},
|
||||
// 确定时间
|
||||
confirmpicker(e) {
|
||||
console.log(this.clickshowpicker, uni.$u.timeFrom(e.value, 'yyyy-mm-dd'))
|
||||
if (this.clickshowpicker == 1) {
|
||||
this.starttime = uni.$u.timeFrom(e.value, 'yyyy-mm-dd')
|
||||
}
|
||||
@@ -236,7 +239,7 @@
|
||||
},
|
||||
// 确定
|
||||
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
|
||||
@@ -290,7 +293,7 @@
|
||||
}
|
||||
},
|
||||
// 下载
|
||||
downloadFile(url){
|
||||
downloadFile(url) {
|
||||
uni.downloadFile({
|
||||
url: url, //仅为示例,并非真实的资源
|
||||
success: (res) => {
|
||||
|
||||
Reference in New Issue
Block a user