小程序编译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) => {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<view class="content" @click.stop="stopPropagation">
|
||||
<navseat :opacity='false' :title='"开票提交"' :titleshow='true' :iconshow='false' :heightshow='true'
|
||||
:namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="content_top">
|
||||
<view :class="form.user_type == 1 ? 'content_topview' : ''" @click="clickakex(1)">个人</view>
|
||||
<view :class="form.user_type == 2 ? 'content_topview' : ''" @click="clickakex(2)">企业</view>
|
||||
@@ -79,7 +81,7 @@
|
||||
<image :src="form.img" style="width: 100%; height: 100%;" mode=""></image>
|
||||
</view>
|
||||
<view class="Box_boxtow" v-else>
|
||||
<image src="@/static/xj.png" style="width: 60rpx;height: 58rpx;" mode=""></image>
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/xj.png" style="width: 60rpx;height: 58rpx;" mode=""></image>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="preservation flex-colum">
|
||||
@@ -100,7 +102,11 @@
|
||||
// import jWeixin from 'jweixin-module'
|
||||
import wx from 'weixin-js-sdk';
|
||||
import _ from 'lodash';
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showtext: 0,
|
||||
@@ -116,16 +122,48 @@
|
||||
c_address: '',
|
||||
c_phone: '',
|
||||
c_bank_name: '',
|
||||
c_bank_account: ''
|
||||
c_bank_account: '',
|
||||
open_id: '',
|
||||
id: ''
|
||||
},
|
||||
showElse: false,
|
||||
showtitle: false
|
||||
};
|
||||
},
|
||||
async onLoad(e) {
|
||||
await this.$onLaunched;
|
||||
if (e.q) {
|
||||
try {
|
||||
const q = decodeURIComponent(e.q) // 获取到二维码原始链接内容
|
||||
// this.form.id = e.id
|
||||
let queryParams = {};
|
||||
let queryString = q.split('?')[1];
|
||||
if (queryString) {
|
||||
// 将查询字符串分割成单个参数
|
||||
let params = queryString.split('&');
|
||||
params.forEach((param) => {
|
||||
console.log(param)
|
||||
this.form.id = param.split('=')[1];
|
||||
queryParams[name] = value;
|
||||
});
|
||||
}
|
||||
} catch (e) {}
|
||||
} else {
|
||||
this.form.id = e.id
|
||||
}
|
||||
|
||||
// 获取开票抬头
|
||||
// 这是H5
|
||||
// #ifdef H5
|
||||
this.getInvoiceList()
|
||||
this.form.id = e.id;
|
||||
this.form.open_id = e.open_id;
|
||||
this.form.open_id = e.open_id
|
||||
// #endif
|
||||
// 这是微信
|
||||
// #ifdef MP-WEIXIN
|
||||
this.showtitle = true
|
||||
this.form.open_id = uni.cache.get('open_id')
|
||||
// #endif
|
||||
// 开票失败的回显
|
||||
if (e.view_type == 'fail') {
|
||||
this.form.view_type = e.view_type;
|
||||
let res = await this.api.szzpyfailccho({
|
||||
@@ -141,6 +179,7 @@
|
||||
//TODO handle the exception
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
stopPropagation() {
|
||||
@@ -178,6 +217,7 @@
|
||||
|
||||
},
|
||||
doReady() {
|
||||
// #ifndef MP-WEIXIN
|
||||
let _this = this
|
||||
wx.invoke('chooseInvoiceTitle', {
|
||||
"scene": "1"
|
||||
@@ -196,6 +236,30 @@
|
||||
_this.showElse = true
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
console.log(1111)
|
||||
uni.chooseInvoiceTitle({
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
let infoJ = res
|
||||
this.form.user_name = infoJ.title ? infoJ.title : '' //发票抬头
|
||||
this.form.user_duty = infoJ.taxNumber ? infoJ.taxNumber : '' //税号
|
||||
this.form.c_address = infoJ.companyAddress ? infoJ.companyAddress : '' //公司地址
|
||||
this.form.c_phone = infoJ.telephone ? infoJ.telephone : '' //电话
|
||||
this.form.c_bank_account = infoJ.bankAccount ? infoJ.bankAccount : '' //开户银行
|
||||
this.form.c_bank_name = infoJ.bankName ? infoJ.bankName : '' // 银行账号
|
||||
this.form.user_type = infoJ.type == 0 ? 2 : 1 //发票抬头类型 微信返回0是企业 1是个人
|
||||
if (infoJ.type == 0) {
|
||||
this.showElse = true
|
||||
}
|
||||
},
|
||||
fail(res) {
|
||||
console.log(res, 236)
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
|
||||
},
|
||||
onInput(e) {
|
||||
if (this.form.user_type == 2) {
|
||||
@@ -301,17 +365,24 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.usersubopeninvoice({
|
||||
id: this.form.id,
|
||||
open_id: this.form.open_id,
|
||||
...this.form
|
||||
});
|
||||
let res = await this.api.usersubopeninvoice(this.form);
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
console.log('t_type===', res.data.t_type);
|
||||
// #ifdef MP-WEIXIN
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/hindex/invodetail?id=' + this.form.id
|
||||
// })
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.navigateTo({
|
||||
url: '/pages/hindex/involist?typeshow=' + 1
|
||||
})
|
||||
// #endif
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
switch (res.data.t_type) {
|
||||
case '1':
|
||||
console.log(1);
|
||||
@@ -348,6 +419,7 @@
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// #endif
|
||||
// window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money"
|
||||
}
|
||||
|
||||
@@ -396,7 +468,7 @@
|
||||
.t {
|
||||
margin-right: 8upx;
|
||||
color: #808080;
|
||||
font-size: 32upx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.arrow-icon {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<navseat :opacity='false' :title='"开票审核"' :titleshow='true' :iconshow='false' :heightshow='true'
|
||||
:namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="content_top">
|
||||
<view :class="form.user_type == 1 ? 'content_topview':''" @click="clickakex(1)">
|
||||
个人
|
||||
@@ -52,7 +54,8 @@
|
||||
<image :src="form.img" style="width: 100%; height: 100%;" mode=""></image>
|
||||
</view>
|
||||
<view class="Box_boxtow" v-else>
|
||||
<image src="@/static/xj.png" style="width: 60rpx;height: 58rpx;" mode=""></image>
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/xj.png"
|
||||
style="width: 60rpx;height: 58rpx;" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="preservation flex-colum">
|
||||
@@ -69,7 +72,12 @@
|
||||
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
import navseat from '@/components/navseat.vue'
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showtext: 0,
|
||||
@@ -87,28 +95,61 @@
|
||||
status_note: '', //原因备注
|
||||
price: '',
|
||||
|
||||
},
|
||||
queryParams: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
if (e.id) {
|
||||
console.log(e)
|
||||
this.form.id = e.id
|
||||
this.form.open_id = e.open_id
|
||||
await this.$onLaunched;
|
||||
// e.id是从列表进的id
|
||||
if (e.q) {
|
||||
try {
|
||||
if (e.q) {
|
||||
const q = decodeURIComponent(e.q) // 获取到二维码原始链接内容
|
||||
// this.form.id = e.id
|
||||
let queryParams = {};
|
||||
let queryString = q.split('?')[1];
|
||||
if (queryString) {
|
||||
// 将查询字符串分割成单个参数
|
||||
let params = queryString.split('&');
|
||||
params.forEach((param) => {
|
||||
this.form.body = param.split('=')[1] ? param.split('=')[1] : '';
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {}
|
||||
} else {
|
||||
this.form.body = e.id
|
||||
}
|
||||
// 获取开票抬头
|
||||
// 这是H5
|
||||
// #ifdef H5
|
||||
this.getInvoiceList()
|
||||
this.form.body = e.id
|
||||
this.form.open_id = e.open_id
|
||||
// #endif
|
||||
|
||||
|
||||
// 这是微信
|
||||
// #ifdef MP-WEIXIN
|
||||
this.showtitle = true
|
||||
this.form.open_id = uni.cache.get('open_id')
|
||||
// #endif
|
||||
|
||||
|
||||
try {
|
||||
let res = await this.api.szzpyfailccho({
|
||||
id: this.form.id,
|
||||
id: this.form.body,
|
||||
view_type: this.form.view_type
|
||||
})
|
||||
try {
|
||||
if (res.code == 1) {
|
||||
this.form = res.data
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
if (res.code == 1) {
|
||||
this.form = res.data
|
||||
}
|
||||
} else {
|
||||
this.form.body = e.body
|
||||
this.form.open_id = e.open_id
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -134,35 +175,32 @@
|
||||
this.subCategoryList = []
|
||||
},
|
||||
upload() {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
})
|
||||
uni.chooseImage({
|
||||
success: (chooseImageRes) => {
|
||||
uni.pro.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
});
|
||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||
uni.uploadFile({
|
||||
url: 'https://cashieradmin.sxczgkj.cn' + '/api/qiNiuContent',
|
||||
filePath: tempFilePaths[0],
|
||||
name: 'file',
|
||||
formData: {
|
||||
open_id: this.form.open_id,
|
||||
},
|
||||
|
||||
success: (uploadFileRes) => {
|
||||
count: 1, //默认9
|
||||
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], //从相册选择,和摄像头功能,默认二者都有
|
||||
success: res => {
|
||||
var thisimgUrlcaca = res.tempFilePaths[0];
|
||||
uploadImage(thisimgUrlcaca, 'merchantinformation/',
|
||||
result => {
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'none',
|
||||
})
|
||||
uni.pro.hideLoading();
|
||||
let data = JSON.parse(uploadFileRes.data)
|
||||
this.form.img = data.data[0]
|
||||
});
|
||||
this.form.img = result
|
||||
console.log(this.form)
|
||||
},
|
||||
fail: () => {
|
||||
uni.pro.hideLoading();
|
||||
}
|
||||
});
|
||||
uni.hideLoading()
|
||||
}, result => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: result.message || result.msg,
|
||||
icon: 'none',
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -211,11 +249,19 @@
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.navigateTo({
|
||||
url: '/pages/hindex/involist?typeshow=' + 1
|
||||
})
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
setTimeout(() => {
|
||||
if (res.data.url) {
|
||||
window.location.href = res.data.url
|
||||
}
|
||||
}, 1000);
|
||||
// #endif
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -1,105 +1,78 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<!-- <view class="content_boxtop flex-between">
|
||||
<navseat :opacity='false' :title='"开票详情"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="content_boxtop flex-between">
|
||||
<view class="content_boxtopone">
|
||||
{{datalsit.type}}
|
||||
{{ datalsit.type }}
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
<view class="content_boxt_tow" id="printSection" ref="print">
|
||||
<view class="content_boxt_towtext">
|
||||
扫码绑定公众号,将会收到通知
|
||||
<view class="content_boxtoptow" v-if="datalsit.status == 3 ||datalsit.status == 5||datalsit.status == 1"
|
||||
style="color: #0c6ec8;">开票中</view>
|
||||
<view class="content_boxtoptow" style="color: #3dc85e" v-if="datalsit.status == 2">开票成功</view>
|
||||
<view class="content_boxtoptow" v-if="datalsit.status == 4">已作废</view>
|
||||
</view>
|
||||
<view class="content_boxt_one">
|
||||
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">{{ datalsit.user_type == 2 ? '公司名称' : '发票抬头' }}:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.user_name }}</text>
|
||||
</view>
|
||||
<view class="content_boxt_towrelative" style="242px;height: 242px;">
|
||||
<canvas id="qrcode" style="242px;height: 242px;" ref="qrcode" canvas-id="qrcode"></canvas>
|
||||
<!-- <image class="content_boxt_towabsolute" src="@/static/icons.png" mode=""></image> -->
|
||||
<view class="classvie_item flex-start" v-if="datalsit.user_type == 2 ">
|
||||
<text class="classvie_itemone">公司税号:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.user_duty }}</text>
|
||||
</view>
|
||||
<view class="" id="viewtext" ref="viewtext">
|
||||
<div style="width: 100%;font-size: 12px; ">
|
||||
销售方名称:任公司任公司任公司任公司任公司任公司任公司任公司任公司
|
||||
</div>
|
||||
<!-- <div style="width: 100%;font-size: 12px; margin-top: 10rpx;">
|
||||
企业联系电话:18092145635
|
||||
</div> -->
|
||||
<div style="width: 100%;font-size: 12px; margin-top: 10rpx;">
|
||||
开票金额:1135.42
|
||||
</div>
|
||||
<!-- <div style="width: 100%;font-size: 12px;margin-top: 10rpx;">
|
||||
订单号:1775391602999693313
|
||||
</div> -->
|
||||
<div style="width: 100%;font-size: 12px;margin-top: 10rpx;">
|
||||
生成时间:2024-04-03 13:15:17
|
||||
</div>
|
||||
<div style="width: 100%;font-size: 12px;margin-top: 10rpx;">
|
||||
二维码有效期:30天
|
||||
</div>
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">发票金额:</text>
|
||||
<text class="classvie_itemtow" style="color: #ff6565">¥{{ datalsit.price }}</text>
|
||||
</view>
|
||||
<button @click="print">打印</button>
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">项目名称:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.article }}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">开票时间:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.ktime }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin-top:80rpx;text-align: center;color:#3088fd ;" v-if="datalsit.status != 2" @click="makePhoneCall(datalsit)">
|
||||
联系商家
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import getLodop from '@/common/js/LodopFuncs.js'
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
text: 'uQRCode',
|
||||
size: 242,
|
||||
size: 240,
|
||||
datalsit: {},
|
||||
ID: '',
|
||||
resurl: ''
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.ID = e.id
|
||||
this.status = e.status
|
||||
// for (let i = 0; i <= 100; i++) {
|
||||
// this.print();
|
||||
// }
|
||||
// var interval = setInterval(() => {
|
||||
// this.print();
|
||||
// }, 1000);
|
||||
// setTimeout(() => {
|
||||
// clearInterval(interval);
|
||||
// }, 60000);
|
||||
this.ID = e.id;
|
||||
},
|
||||
onReady() {
|
||||
setTimeout(() => {
|
||||
uni.$u.debounce(this.storeinvoicelist(), 500)
|
||||
}, 500)
|
||||
this.storeinvoicelist();
|
||||
},
|
||||
methods: {
|
||||
print() {
|
||||
let LODOP = getLodop();
|
||||
if (LODOP == null) {
|
||||
alert('请先安装打印控件')
|
||||
return;
|
||||
}
|
||||
LODOP.PRINT_INIT('')
|
||||
// 设置打印纸大小
|
||||
// LODOP.SET_PRINT_PAGESIZE(1, 800, '50px', "");
|
||||
LODOP.SET_PRINT_PAGESIZE(1, 800, '120px', "");
|
||||
// // 二维码控制大小
|
||||
LODOP.ADD_PRINT_BARCODE('', '30px', '150px', '150px', "QRCode", 'https://www.baidu.com'); //打印产品代码条码
|
||||
|
||||
// LODOP.PREVIEW(); //带预览的打印
|
||||
LODOP.PRINT()
|
||||
|
||||
|
||||
},
|
||||
async storeinvoicelist() {
|
||||
let res = await this.api.storebindinginvopush({
|
||||
store_id: uni.getStorageSync('userId')
|
||||
let res = await this.api.userinvodetail({
|
||||
id: this.ID,
|
||||
open_id: uni.cache.get('open_id'),
|
||||
})
|
||||
if (res) {
|
||||
this.datalsit = res.data.qrcode;
|
||||
console.log(this.datalsit)
|
||||
this.datalsit = res.data;
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = res.data.qrcode;
|
||||
qr.data = res.data.url;
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = this.size;
|
||||
// 调用制作二维码方法
|
||||
@@ -112,9 +85,14 @@
|
||||
qr.drawCanvas();
|
||||
}
|
||||
},
|
||||
makePhoneCall(e) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: e.store_mobile //仅为示例
|
||||
});
|
||||
},
|
||||
savealbum(e) {
|
||||
uni.pro.navigateBack();
|
||||
},
|
||||
}
|
||||
// savealbum(e) {
|
||||
// // #ifdef APP
|
||||
// uni.showLoading({
|
||||
@@ -162,34 +140,12 @@
|
||||
// // #endif
|
||||
// },
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style media="print">
|
||||
@page {
|
||||
size: 56mm 60mm;
|
||||
/* 宽度50mm, 高度100mm */
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
body {
|
||||
width: 50px;
|
||||
/* 小票宽度 */
|
||||
height: 60mm;
|
||||
/* 小票宽度 */
|
||||
border: 1px solid #999;
|
||||
}
|
||||
|
||||
#printSection {
|
||||
width: 60mm;
|
||||
/* 小票宽度 */
|
||||
height: 60mm;
|
||||
/* 小票高度 */
|
||||
}
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -197,7 +153,7 @@
|
||||
|
||||
.content_boxtop {
|
||||
padding: 22rpx 16rpx;
|
||||
background: #FFFFFF;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
.content_boxtopone {
|
||||
@@ -219,13 +175,13 @@
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
background: #FFFFFF;
|
||||
background: #ffffff;
|
||||
|
||||
.content_boxt_oneone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #FF6565;
|
||||
color: #ff6565;
|
||||
}
|
||||
|
||||
.classvie_item {
|
||||
@@ -254,7 +210,7 @@
|
||||
.content_boxt_tow {
|
||||
margin: 32rpx 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
padding-bottom: 50rpx;
|
||||
|
||||
@@ -272,22 +228,21 @@
|
||||
margin: 50rpx auto 0 auto;
|
||||
width: 558rpx;
|
||||
height: 84rpx;
|
||||
background: #288EFB;
|
||||
background: #288efb;
|
||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
line-height: 84rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
|
||||
}
|
||||
|
||||
.content_boxt_towrelative {
|
||||
position: relative;
|
||||
width: 242px;
|
||||
height: 242px;
|
||||
width: 484rpx;
|
||||
height: 484rpx;
|
||||
margin: 32rpx auto;
|
||||
|
||||
.content_boxt_towabsolute {
|
||||
205
pages/hindex/involist.vue
Normal file
205
pages/hindex/involist.vue
Normal file
@@ -0,0 +1,205 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<navseat :opacity='false' :title='"开票记录"' :titleshow='true' :iconshow='iconshow' :namecolor='"#fff"'
|
||||
iconcolor='#fff'></navseat>
|
||||
<view class="content_item" v-for="(item,index) in list" :key="index" @click="clickoange(item)">
|
||||
<view class="content_item_top flex-between">
|
||||
<view class="content_item_topone flex-start">
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/sz.png" mode="aspectFill">
|
||||
</image>
|
||||
<text>{{item.createtime}}</text>
|
||||
</view>
|
||||
<view class="content_item_toptow flex-start">
|
||||
<text class="content_item_toptowtext">¥{{item.price}}</text>
|
||||
<u-icon name="arrow-right" color="#9d9d9d" size="10"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_item_bottom" style="background: #318AFE;" v-if="item.status == 0">
|
||||
未提交开票信息
|
||||
</view>
|
||||
<view class="content_item_bottom" style="background:#8B8B8B;" v-if="item.status == 1 || item.status == 3">
|
||||
开票中
|
||||
</view>
|
||||
<view class="content_item_bottom" v-if="item.status == 2">
|
||||
已开票
|
||||
</view>
|
||||
<view class="content_item_bottom" style="background:#e4b9c0;" v-if="item.status == -1">
|
||||
待商家审核
|
||||
</view>
|
||||
<view class="content_item_bottom" style="background: #ffbb76;" v-if="item.status == 4">
|
||||
已作废
|
||||
</view>
|
||||
<view class="content_item_bottom" style="background: #fdc539;" v-if="item.status == 6">
|
||||
商家拒绝
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty-wrap">
|
||||
<u-loadmore :status="form.status" fontSize="16" color="#999" iconSize="16" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
form: {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
iconshow: true,
|
||||
off_openid: '',
|
||||
type: '1',
|
||||
};
|
||||
},
|
||||
async onLoad(e) {
|
||||
await this.$onLaunched;
|
||||
if (e.off_openid) {
|
||||
this.off_openid = e.off_openid
|
||||
this.iconshow = false
|
||||
} else {
|
||||
this.iconshow = true
|
||||
}
|
||||
// 内链跳转进来 返回按钮判断
|
||||
try {
|
||||
if (e.typeshow == 1) {
|
||||
this.iconshow = true
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
//判断微信扫码进来
|
||||
if (this.type == 1) {
|
||||
this.initial()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (this.type == 2) {
|
||||
this.initial()
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.form.status != 'nomore') {
|
||||
this.form.page = ++this.form.page;
|
||||
this.storeinvoicelist()
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
initial() {
|
||||
this.form = {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
this.storeinvoicelist()
|
||||
},
|
||||
clickoange(e) {
|
||||
if (e.status == -1) {
|
||||
return false;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: e.t_url
|
||||
})
|
||||
},
|
||||
async storeinvoicelist() {
|
||||
this.form.status = 'loading';
|
||||
this.type = 2
|
||||
let res = await this.api.useroauthcallback({
|
||||
open_id: uni.cache.get('open_id'),
|
||||
page: this.form.page,
|
||||
off_openid: this.off_openid
|
||||
|
||||
})
|
||||
if (this.form.page == 1 && res.data.invo.length == 0) {
|
||||
this.form.status = 'nomore'
|
||||
this.list = []
|
||||
return false;
|
||||
} else {
|
||||
|
||||
setTimeout(() => {
|
||||
if (this.form.page == 1) {
|
||||
this.list = res.data.invo
|
||||
} else {
|
||||
this.list = [...this.list, ...res.data.invo];
|
||||
}
|
||||
if (res.data.invo.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
} else {
|
||||
this.form.status = 'loadmore';
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
console.log(this.list)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 6px 28rpx;
|
||||
|
||||
.content_item {
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||
|
||||
.content_item_top {
|
||||
padding: 34rpx 16rpx 30rpx 42rpx;
|
||||
|
||||
.content_item_topone {
|
||||
image {
|
||||
width: 37.11rpx;
|
||||
height: 37.11rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-left: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
.content_item_toptow {
|
||||
.content_item_toptowtext {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content_item_bottom {
|
||||
padding: 16rpx 0 16rpx 108rpx;
|
||||
background: rgba(85, 159, 255, 0.74);
|
||||
box-shadow: 0px 3rpx 6rpx 1px rgba(0, 0, 0, 0.16);
|
||||
border-radius: 0rpx 0rpx 30rpx 30rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,12 +1,13 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<navseat :opacity='false' :title='"极速开票"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="Box_box_O">
|
||||
<view class="Box_box flex-between" @click="showpopupclick">
|
||||
<view>*项目名称</view>
|
||||
<view class=""
|
||||
style="width: 60%; overflow:hidden; font-size:32rpx;text-overflow: ellipsis;white-space: nowrap; "
|
||||
v-model="form.article">{{ form.article}} <text v-if="!form.article"
|
||||
style="color: #86909c;">选择项目名称</text>
|
||||
style="width: 60%; overflow:hidden; font-size:32rpx;text-overflow: ellipsis;white-space: nowrap;">
|
||||
<text v-if="form.article"> {{ form.article}} </text>
|
||||
<text v-else style="color: #86909c;">选择项目名称</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
@@ -27,13 +28,15 @@
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>*税额</view>
|
||||
<view><input type="text" disabled='false' v-model="form.tax_amount" placeholder="请填写税额"
|
||||
data-key="mobile" /></view>
|
||||
<view class="Box_box_bouttme_item_T">
|
||||
<text>{{ form.tax_amount || '请填写税额' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>*单价</view>
|
||||
<view><input type="text" disabled='false' v-model="form.d_price" placeholder="请填写单价"
|
||||
data-key="mobile" /></view>
|
||||
<view class="Box_box_bouttme_item_T">
|
||||
<text>{{ form.d_price || '请填写单价' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box flex-between" @click="Issuedbyshowpicker = true">
|
||||
<view class="Box_boxlang Box_box_bouttme_item_O">*开票人</view>
|
||||
@@ -68,7 +71,7 @@
|
||||
<view class="preservation flex-colum">
|
||||
<view class="preservation_box" @tap="$u.throttle(saveMerchantBaseInfoV2, 1000)">提交</view>
|
||||
</view>
|
||||
<u-popup :show="showpopup" @close="showpopup = false" @open="openpopup">
|
||||
<u-popup :show="showpopup" @close="showpopup = false">
|
||||
<view class="popupshow">
|
||||
<view class="popupshowone">请选择项目名称</view>
|
||||
<view class="popupshowone_item" style=" border-bottom: 1rpx solid #E5E5E5;" v-if="keyword">
|
||||
@@ -86,10 +89,14 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyword: uni.getStorageSync('keyword').name,
|
||||
keyword: uni.getStorageSync('keyword').name ? uni.getStorageSync('keyword').name : '',
|
||||
showpopup: false,
|
||||
showpicker: false,
|
||||
Issuedbyshowpicker: false,
|
||||
@@ -101,7 +108,7 @@
|
||||
showElse: false,
|
||||
form: {
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
article: uni.cache.get('keyword').name,
|
||||
article: uni.cache.get('keyword').name ? uni.getStorageSync('keyword').name : '',
|
||||
type: '',
|
||||
price: '',
|
||||
se_amount: '',
|
||||
@@ -109,7 +116,7 @@
|
||||
tax_amount: '',
|
||||
d_price: '',
|
||||
notes: '',
|
||||
mcc: uni.cache.get('keyword').code,
|
||||
mcc: uni.cache.get('keyword').code ? uni.getStorageSync('keyword').code : '',
|
||||
dlzh: '',
|
||||
dlzhid: "",
|
||||
is_new: 1,
|
||||
@@ -148,7 +155,7 @@
|
||||
},
|
||||
methods: {
|
||||
showpopupclick() {
|
||||
this.keyword = uni.getStorageSync('keyword').name
|
||||
this.keyword = uni.getStorageSync('keyword').name ? uni.getStorageSync('keyword').name : ''
|
||||
this.showpopup = true
|
||||
},
|
||||
popupshowone_itemone() {
|
||||
@@ -296,13 +303,14 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if([...this.form.dw].length > 22){
|
||||
if ([...this.form.dw].length > 22) {
|
||||
uni.showToast({
|
||||
title: '单位不能多余22个字体!',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
console.log(this.form)
|
||||
let res = await this.api.storesubinvoicing(this.form)
|
||||
if (res) {
|
||||
this.form = {
|
||||
@@ -321,7 +329,17 @@
|
||||
ggxh: '',
|
||||
dw: ''
|
||||
}
|
||||
// #ifdef MP-WEIXIN
|
||||
let params = JSON.stringify(res.data.invoice_records);
|
||||
params = encodeURIComponent(params);
|
||||
// 跳转页面,附带编码后的参数
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/wxinvoicing?data=" + params
|
||||
});
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
uni.pro.navigateTo('index/wxinvoicing', res.data.invoice_records)
|
||||
// #endif
|
||||
}
|
||||
|
||||
}
|
||||
@@ -333,24 +351,26 @@
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
||||
.t {
|
||||
margin-right: 8upx;
|
||||
color: #808080;
|
||||
font-size: 32upx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
|
||||
.arrow-icon {
|
||||
transition: all 0.3s ease-in-out;
|
||||
|
||||
|
||||
&.active {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Box {
|
||||
.Box_box_O {
|
||||
padding: 0 28rpx;
|
||||
@@ -374,6 +394,10 @@
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
|
||||
input {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.Box_box_T {
|
||||
@@ -399,7 +423,7 @@
|
||||
background: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx dashed #707070;
|
||||
background: url(@/static/my2.png) no-repeat;
|
||||
background: url(https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/my2.png) no-repeat;
|
||||
background-position: 50% 50%;
|
||||
background-size: 50%;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<navseat :opacity='false' :title='"审核开票"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="contentbox" v-for="(item,index) in list" :key="index" @click.stop="clickinof(item)">
|
||||
<view class="contentboxitemtop flex-between">
|
||||
<view class="contentboxitemone">
|
||||
@@ -52,7 +53,11 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
clickconfirmshow: false,
|
||||
@@ -159,6 +164,7 @@
|
||||
if (res.data.length == 0) {
|
||||
this.is_end = true
|
||||
this.form.status = 'nomore'
|
||||
this.list = []
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<navseat :opacity='false' :title='"开票码"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="Box_box_O">
|
||||
<view class="Box_box flex-between" @click="showpopupclick">
|
||||
<view>*项目名称</view>
|
||||
<view class=""
|
||||
style="width: 60%; overflow:hidden; font-size:32rpx;color:grey;text-overflow: ellipsis;white-space: nowrap; "
|
||||
style="width: 60%; overflow:hidden; font-size:32rpx;color:grey;text-overflow: ellipsis;white-space: nowrap; font-size: 28rpx;"
|
||||
v-model="form.article">{{ form.article || '选择项目名称' }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -22,7 +23,7 @@
|
||||
<view class="preservation flex-colum">
|
||||
<view class="preservation_box" @tap="$u.throttle(saveMerchantBaseInfoV2, 1000)">提交</view>
|
||||
</view>
|
||||
<u-popup :show="showpopup" @close="showpopup = false" @open="openpopup">
|
||||
<u-popup :show="showpopup" @close="showpopup = false">
|
||||
<view class="popupshow">
|
||||
<view class="popupshowone">请选择项目名称</view>
|
||||
<view class="popupshowone_item" style=" border-bottom: 1rpx solid #E5E5E5;" v-if="keyword">
|
||||
@@ -38,7 +39,11 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyword: uni.getStorageSync('keyword'),
|
||||
@@ -136,11 +141,26 @@
|
||||
let res = await this.api.storemerchantfixedinvoicinglink(this.form)
|
||||
// console.log(res)
|
||||
setTimeout(() => {
|
||||
uni.pro.navigateTo('index/wxinvoicing',{
|
||||
url:res.data.url,
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
let params = JSON.stringify({
|
||||
url: res.data.url,
|
||||
// url:'0',
|
||||
tope:0
|
||||
tope: 0
|
||||
});
|
||||
params = encodeURIComponent(params);
|
||||
// 跳转页面,附带编码后的参数
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/wxinvoicing?data=" + params
|
||||
});
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
uni.pro.navigateTo('index/wxinvoicing', {
|
||||
url: res.data.url,
|
||||
// url:'0',
|
||||
tope: 0
|
||||
})
|
||||
// #endif
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
@@ -200,7 +220,7 @@
|
||||
background: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx dashed #707070;
|
||||
background: url(@/static/my2.png) no-repeat;
|
||||
background: url(https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/my2.png) no-repeat;
|
||||
background-position: 50% 50%;
|
||||
background-size: 50%;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<view class="Box_top"><input placeholder="请输入开票服务名称" :showAction='false' :focus='true' v-model="keyword"
|
||||
<navseat :opacity='false' :title='"行业列表"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="Box_top"><input placeholder="请输入开票服务名称" :showAction='false' :focus='true' v-model="modelkeyword"
|
||||
@input="onInput" />
|
||||
</view>
|
||||
<view class="nav">
|
||||
@@ -16,14 +17,18 @@
|
||||
</view>
|
||||
<view class="empty-wrap">
|
||||
<!-- <view class="empty" v-if="!subCategoryList.length && loadStatus == 'nomore'"><u-empty text="暂无数据"
|
||||
:icon="require('@/static/notice/icon_empty.png')"></u-empty></view>
|
||||
:icon="require('https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/notice/icon_empty.png')"></u-empty></view>
|
||||
<u-loadmore color="#999" :status="loadStatus" v-else></u-loadmore> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
// import category from '@/components/qiyue-category/qiyue-category.vue';
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
// components: {
|
||||
// category
|
||||
// },
|
||||
@@ -32,7 +37,7 @@
|
||||
current: 1,
|
||||
size: 20,
|
||||
page: 1,
|
||||
keyWord: '',
|
||||
modelkeyword: '',
|
||||
subCategoryList: [],
|
||||
loadStatus: 'nomore',
|
||||
h: null,
|
||||
@@ -52,9 +57,7 @@
|
||||
},
|
||||
methods: {
|
||||
onInput(e) {
|
||||
// 【不用v-model绑定表单,直接时间获取值】这种方式是uni-app官方的方式,测试结果正确!
|
||||
console.log(e.detail)
|
||||
this.keyword = e.detail.value
|
||||
this.modelkeyword = e.detail.value
|
||||
if (e.detail.value) {
|
||||
uni.$u.debounce(this.getOrder(), 500)
|
||||
} else {
|
||||
@@ -76,6 +79,7 @@
|
||||
}
|
||||
},
|
||||
categorySubClick(category) {
|
||||
console.log(11,category)
|
||||
uni.cache.set('keyword', category)
|
||||
uni.$emit("businesscategorys", category)
|
||||
uni.pro.navigateBack();
|
||||
@@ -95,7 +99,7 @@
|
||||
},
|
||||
async getOrder() {
|
||||
let res = await this.api.storeindustrylist({
|
||||
name: this.keyword,
|
||||
name: this.modelkeyword,
|
||||
page: this.page
|
||||
})
|
||||
if (res) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<navseat :opacity='false' :title='"新增开票员"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="Box_box_O">
|
||||
|
||||
<view class="Box_box flex-between">
|
||||
@@ -59,9 +60,11 @@
|
||||
</template>
|
||||
<script>
|
||||
import selectaddress from '@/components/yixuan-selectAddress/yixuan-selectAddress.vue';
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
selectaddress
|
||||
selectaddress,
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -333,7 +336,7 @@
|
||||
background: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx dashed #707070;
|
||||
background: url(@/static/my2.png) no-repeat;
|
||||
background: url(https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/my2.png) no-repeat;
|
||||
background-position: 50% 50%;
|
||||
background-size: 50%;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<navseat :opacity='false' :title='"开票员列表"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="contentitem" v-for="(item,index) in list" :key="index">
|
||||
<view class="contentitemtop flex-start">
|
||||
<view>{{item.name}}</view>
|
||||
@@ -9,19 +10,23 @@
|
||||
{{item.dlzh}}
|
||||
</view>
|
||||
<view class="contentitemabsolute flex-start" @click="szzpydeltaxation(item)">
|
||||
<image src="@/static/drawerlistdelete.png" mode="aspectFill"></image>
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/drawerlistdelete.png" mode="aspectFill"></image>
|
||||
<text>删除</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentitemadd flex-start" @click="clickadd">
|
||||
<u-icon name="plus-circle-fill" color="#2979ff" size="16"></u-icon>
|
||||
<text>添加开票员</text>
|
||||
<view>添加开票员</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import dayjs from 'dayjs'
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
@@ -84,7 +89,7 @@
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx 24rpx;
|
||||
background: url(@/static/drawerlist.png) no-repeat;
|
||||
background: url(https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/drawerlist.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.contentitemabsolute {
|
||||
@@ -139,7 +144,7 @@
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
text {
|
||||
view {
|
||||
margin-left: 10rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
|
||||
@@ -1,36 +1,42 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="Box flex-between">
|
||||
<view class="content flex-colum" @click="indexInvoicing" v-if="improveinformation">
|
||||
<image src="@/static/item3.png" mode="aspectFill"></image>
|
||||
<!-- 占位符导航栏 -->
|
||||
<navseat :opacity='false' :title='"首页"' :titleshow='true' :iconshow='false' :heightshow='true'
|
||||
:namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="topswiper" v-if="restype == 2">
|
||||
<u-swiper :list="swiperlist" height="166"></u-swiper>
|
||||
<view class="onetopswiper">
|
||||
发票服务
|
||||
</view>
|
||||
<view class="towtopswiper flex-between" @click="wodekaifapiao">
|
||||
<view class="flex-colum-start" style="color: #2b378a;">
|
||||
我的发票
|
||||
</view>
|
||||
<view class="towtopswipertow">
|
||||
票
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box flex-between" v-if="restype == 1 && improveinformation">
|
||||
<view class="content flex-colum" @click="merchantindex" v-if="store_status == 2">
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item3.png" mode="aspectFill">
|
||||
</image>
|
||||
<text>固定开票</text>
|
||||
</view>
|
||||
<view class="content flex-colum" @click="indexInvoicing" v-if="store_status == 1">
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item3.png" mode="aspectFill">
|
||||
</image>
|
||||
<text>极速开票</text>
|
||||
</view>
|
||||
<view class="content flex-colum" @click="webview" v-if="improveinformation">
|
||||
<image src="@/static/item2.png" mode="aspectFill"></image>
|
||||
<text>后台管理</text>
|
||||
</view>
|
||||
<view class="content flex-colum" @click="indexorder" v-if="improveinformation">
|
||||
<image src="@/static/item1.png" mode="aspectFill"></image>
|
||||
<text>开票记录</text>
|
||||
</view>
|
||||
<view class="content flex-colum" @click="notification" v-if="improveinformation">
|
||||
<image src="@/static/item6.png" mode="aspectFill"></image>
|
||||
<text>绑定通知</text>
|
||||
</view>
|
||||
<view class="content flex-colum" @click="drawer" v-if="improveinformation">
|
||||
<image src="@/static/item5.png" mode="aspectFill"></image>
|
||||
<text>开票员列表</text>
|
||||
</view>
|
||||
<view class="content flex-colum" @click="billingcode" v-if="improveinformation">
|
||||
<image src="@/static/item7.png" mode="aspectFill"></image>
|
||||
<text>开票码</text>
|
||||
</view>
|
||||
<view class="content flex-colum" @click="auditbilling" v-if="improveinformation">
|
||||
<image src="@/static/item8.png" mode="aspectFill"></image>
|
||||
<text>审核开票</text>
|
||||
|
||||
<view class="content flex-colum" v-for="(item,index) in list" @click="clickcontent(item)" :key="index"
|
||||
v-if="item.show">
|
||||
<image :src="item.imge" mode="aspectFill">
|
||||
</image>
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
<!-- <view class="content flex-colum" @click="jumpToMiniProgram" v-if="improveinformation">
|
||||
<image src="@/static/item8.png" mode="aspectFill"></image>
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item8.png" mode="aspectFill"></image>
|
||||
<text>跳转小程序</text>
|
||||
</view>
|
||||
<wx-open-launch-weapp class="content flex-colum" id="launch-btn" @launch="handleLaunch" @error="handleError"
|
||||
@@ -55,35 +61,114 @@
|
||||
</template>
|
||||
<script>
|
||||
import wx from 'weixin-js-sdk';
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
restype: 1,
|
||||
swiperlist: [
|
||||
'https://shuzu-download.oss-cn-shanghai.aliyuncs.com/advertise/2024-05-08-10-52-th-663ae8fc73220.png'
|
||||
],
|
||||
improveinformation: false,
|
||||
improveinformationlist: {},
|
||||
onLoaduserId: '',
|
||||
infos: uni.getSystemInfoSync()
|
||||
infos: uni.getSystemInfoSync(),
|
||||
store_status: uni.cache.get('store_status'),
|
||||
list: [{
|
||||
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item2.png',
|
||||
name: '后台管理',
|
||||
show: true,
|
||||
text: 'houtai',
|
||||
url: 'electric/index',
|
||||
type: 2 //1是内链 2是外链 类型
|
||||
},
|
||||
{
|
||||
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item1.png',
|
||||
name: '开票记录',
|
||||
show: true,
|
||||
text: 'jilu',
|
||||
url: 'electric/index',
|
||||
type: 1 //1是内链 2是外链 类型
|
||||
}, {
|
||||
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item6.png',
|
||||
name: '绑定通知',
|
||||
show: true,
|
||||
text: 'tongzhi',
|
||||
url: 'electric/index',
|
||||
type: 1 //1是内链 2是外链 类型
|
||||
}, {
|
||||
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item5.png',
|
||||
name: '开票员列表',
|
||||
show: true,
|
||||
text: 'kaipiaoyuan',
|
||||
url: 'electric/index',
|
||||
type: 1 //1是内链 2是外链 类型
|
||||
}, {
|
||||
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item7.png',
|
||||
name: '开票码',
|
||||
show: true,
|
||||
text: 'kaipiaoma',
|
||||
url: 'electric/index',
|
||||
type: 1 //1是内链 2是外链 类型
|
||||
}, {
|
||||
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item8.png',
|
||||
name: '审核开票',
|
||||
show: true,
|
||||
text: 'shenhe',
|
||||
url: 'electric/index',
|
||||
type: 1 //1是内链 2是外链 类型
|
||||
}, {
|
||||
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item10.png',
|
||||
name: '退出登录',
|
||||
show: true,
|
||||
text: 'tuchu',
|
||||
url: 'electric/index',
|
||||
type: 3 //1是内链 2是外链 3退出 类型
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
async onLoad(e) {
|
||||
// await this.$onLaunched;
|
||||
|
||||
// alert(location.href.split('#')[0])
|
||||
if (e.userId) {
|
||||
// this.onLoaduserId = e.userId
|
||||
uni.cache.set('Type', e.type);
|
||||
uni.cache.set('userId', e.userId);
|
||||
await this.$onLaunched;
|
||||
// #ifdef MP-WEIXIN
|
||||
// 判断商家还是个体
|
||||
let restype = await this.api.judgeuseridentity({
|
||||
open_id: uni.cache.get('open_id') //临时登录凭证
|
||||
})
|
||||
console.log(restype.data)
|
||||
this.restype = restype.data.type
|
||||
if (this.restype == 1 && !uni.getStorageSync('logintoken')) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
// #endif
|
||||
try {
|
||||
if (e.userId) {
|
||||
uni.cache.set('Type', e.type);
|
||||
uni.cache.set('userId', e.userId);
|
||||
// 传参进来肯定是极速开票固然store_status=1
|
||||
uni.cache.set('store_status', 1);
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
|
||||
// 总?
|
||||
let token = await this.api.h5encryption({
|
||||
store_id: uni.cache.get('userId')
|
||||
})
|
||||
if (token.code == 1) {
|
||||
uni.cache.set('token', token.data.token);
|
||||
}
|
||||
console.log(token)
|
||||
}
|
||||
let res = await this.api.storestorestatus({
|
||||
store_id: uni.cache.get('userId')
|
||||
})
|
||||
if (res.code == 1) {
|
||||
if (res.code == 1 && uni.cache.get('store_status') == 1) {
|
||||
this.improveinformationform = res.data.store
|
||||
uni.cache.set('form', this.improveinformationform);
|
||||
if (res.data.sz_status == 0) {
|
||||
@@ -93,7 +178,20 @@
|
||||
} else {
|
||||
this.improveinformation = true
|
||||
}
|
||||
} else {
|
||||
// 这是固定开票的判断
|
||||
if (res.data.status == 4) { //如果极速开票和固定开票共存的情况下 直接跳转到极速开票的上传信息
|
||||
this.improveinformation = true
|
||||
return false
|
||||
} else {
|
||||
if (res.data.status == -1 || res.data.status == 2 || res.data.status == 0) {
|
||||
uni.pro.navigateTo('merchant/information', res.data.store);
|
||||
} else {
|
||||
uni.pro.navigateTo('merchant/index');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
// 监听跳转
|
||||
handleLaunch() {
|
||||
@@ -103,7 +201,14 @@
|
||||
handleError() {
|
||||
console.log('失败');
|
||||
},
|
||||
onShow() {},
|
||||
async onShow() {
|
||||
try {
|
||||
let res = await this.api.getrulelist()
|
||||
this.list = res.data
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async jumpToMiniProgram() {
|
||||
let res = await this.api.userttwechat({
|
||||
@@ -174,12 +279,62 @@
|
||||
// // jumpToMiniProgram('小程序的appid', '小程序页面路径');
|
||||
// // #endif
|
||||
},
|
||||
async quit() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定退出开票系统吗?',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
await this.api.userlogout()
|
||||
uni.removeStorageSync('logintoken');
|
||||
uni.removeStorageSync('token');
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
setClipboardData() {
|
||||
uni.setClipboardData({
|
||||
data: 'https://h5-invoice.sxczgkj.cn/?userId=' + uni.cache.get('userId'),
|
||||
success: function() {}
|
||||
});
|
||||
},
|
||||
// 跳转
|
||||
async clickcontent(item) {
|
||||
switch (item.type) {
|
||||
case 1:
|
||||
uni.pro.navigateTo(item.url);
|
||||
break;
|
||||
case 2:
|
||||
uni.navigateTo({
|
||||
url: '/pages/webview/webview?tape=' + 1
|
||||
})
|
||||
break;
|
||||
case 3:
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定退出开票系统吗?',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
await this.api.userlogout()
|
||||
uni.removeStorageSync('logintoken');
|
||||
uni.removeStorageSync('token');
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
break;
|
||||
}
|
||||
},
|
||||
auditbilling() {
|
||||
uni.pro.navigateTo('index/auditbilling');
|
||||
},
|
||||
@@ -201,17 +356,23 @@
|
||||
indexInvoicing() {
|
||||
uni.pro.navigateTo('index/Invoicing');
|
||||
},
|
||||
merchantindex() {
|
||||
uni.pro.navigateTo('merchant/index');
|
||||
},
|
||||
wodekaifapiao() {
|
||||
uni.pro.navigateTo('hindex/involist');
|
||||
},
|
||||
async webview() {
|
||||
uni.pro.navigateTo('electric/index');
|
||||
// let res = await this.api.szzpyhurl({
|
||||
// store_id: uni.getStorageSync('userId')
|
||||
// })
|
||||
// if (res) {
|
||||
// uni.pro.navigateTo('webview/webview', {
|
||||
// url: res.data.url,
|
||||
// tape: 1
|
||||
// });
|
||||
// }
|
||||
// uni.pro.navigateTo('electric/index');
|
||||
let res = await this.api.szzpyhurl({
|
||||
store_id: uni.getStorageSync('userId')
|
||||
})
|
||||
if (res) {
|
||||
uni.pro.navigateTo('webview/webview', {
|
||||
url: res.data.url,
|
||||
tape: 1
|
||||
});
|
||||
}
|
||||
},
|
||||
indexorder() {
|
||||
uni.pro.navigateTo('index/order');
|
||||
@@ -235,6 +396,36 @@
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.topswiper {
|
||||
width: 100%;
|
||||
padding: 32rpx 32rpx 0 32rpx;
|
||||
|
||||
.onetopswiper {
|
||||
font-weight: bold;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
.towtopswiper {
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
padding: 24rpx 32rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #d8eafe;
|
||||
|
||||
.towtopswipertow {
|
||||
padding: 24rpx;
|
||||
color: #fff;
|
||||
background: #2a3aa1;
|
||||
font-size: 40rpx;
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
text-align: center;
|
||||
line-height: 45rpx;
|
||||
border-radius: 45rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Box {
|
||||
|
||||
padding: 0rpx 28rpx;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<navseat :opacity='false' :title='"完善商户信息"' :titleshow='true' :iconshow='false' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="Box_box_O">
|
||||
<view class="Box_box flex-between">
|
||||
<view>公司名字</view>
|
||||
<view>公司名称</view>
|
||||
<view class="Box_box_input"><input type="text" :disabled="disabled" v-model="form.title"
|
||||
placeholder="请填写公司名字" data-key="mobile" /></view>
|
||||
placeholder="请填写公司名称" data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>法人姓名</view>
|
||||
@@ -115,9 +116,12 @@
|
||||
</template>
|
||||
<script>
|
||||
import selectaddress from '@/components/yixuan-selectAddress/yixuan-selectAddress.vue';
|
||||
import navseat from '@/components/navseat.vue'
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
export default {
|
||||
components: {
|
||||
selectaddress
|
||||
selectaddress,
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -374,66 +378,44 @@
|
||||
if (this.disabled) {
|
||||
return false;
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
})
|
||||
this.Uploadurlnumber = i;
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], //从相册选择,和摄像头功能,默认二者都有
|
||||
success: res => {
|
||||
uni.pro.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
});
|
||||
var thisimgUrlcaca = res.tempFilePaths[0];
|
||||
var that = this;
|
||||
uni.uploadFile({
|
||||
url: 'https://cashieradmin.sxczgkj.cn' + '/api/qiNiuContent',
|
||||
filePath: thisimgUrlcaca,
|
||||
name: 'file', // 后端接收的文件名
|
||||
header: {
|
||||
userId: uni.cache.get('userId'),
|
||||
token: uni.cache.get('token'),
|
||||
myLoginName: uni.cache.get('myLoginName')
|
||||
},
|
||||
success: res => {
|
||||
console.log(res)
|
||||
var thisdata_ = JSON.parse(res.data);
|
||||
uploadImage(thisimgUrlcaca, 'merchantinformation/',
|
||||
result => {
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'none',
|
||||
success: () => {
|
||||
uni.pro.hideLoading();
|
||||
console.log(thisdata_.data[0]);
|
||||
if (this.Uploadurlnumber == 0) {
|
||||
this.$set(this.form,
|
||||
'id_card_straight', thisdata_
|
||||
.data[0])
|
||||
} else if (this.Uploadurlnumber == 1) {
|
||||
this.$set(this.form, 'id_card_reverse',
|
||||
thisdata_.data[0])
|
||||
} else {
|
||||
this.$set(this.form,
|
||||
'business_license', thisdata_
|
||||
.data[0])
|
||||
this.storerecog() //营业执照图片
|
||||
|
||||
}
|
||||
console.log(this.form)
|
||||
}
|
||||
});
|
||||
},
|
||||
fail: err => {
|
||||
uni.pro.hideLoading();
|
||||
if (this.Uploadurlnumber == 0) {
|
||||
this.$set(this.form,
|
||||
'id_card_straight', result)
|
||||
} else if (this.Uploadurlnumber == 1) {
|
||||
this.$set(this.form, 'id_card_reverse', result)
|
||||
} else {
|
||||
this.$set(this.form,
|
||||
'business_license', result)
|
||||
this.storerecog() //营业执照图片
|
||||
}
|
||||
uni.hideLoading()
|
||||
}, result => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: thisdata_.message || thisdata_.msg,
|
||||
title: result.message || result.msg,
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
async storerecog() {
|
||||
let res = await this.api.storerecog({
|
||||
@@ -511,7 +493,7 @@
|
||||
background: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx dashed #707070;
|
||||
background: url(@/static/my2.png) no-repeat;
|
||||
background: url(https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/my2.png) no-repeat;
|
||||
background-position: 50% 50%;
|
||||
background-size: 50%;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<!-- <view class="content_boxtop flex-between">
|
||||
<navseat :opacity='false' :title='"绑定通知"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<!-- <view class="content_boxtop flex-between">
|
||||
<view class="content_boxtopone">
|
||||
{{datalsit.type}}
|
||||
</view>
|
||||
@@ -12,7 +13,7 @@
|
||||
</view>
|
||||
<view class="content_boxt_towrelative" style="242px;height: 242px;">
|
||||
<canvas id="qrcode" style="242px;height: 242px;" ref="qrcode" canvas-id="qrcode"></canvas>
|
||||
<image class="content_boxt_towabsolute" src="@/static/icons.png" mode=""></image>
|
||||
<image class="content_boxt_towabsolute" src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/icons.png" mode=""></image>
|
||||
</view>
|
||||
<!-- <view class="content_boxt_towtexts" style="color: blue; " @click="savealbum">
|
||||
已完成
|
||||
@@ -23,7 +24,11 @@
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
text: 'uQRCode',
|
||||
@@ -48,7 +53,7 @@
|
||||
let res = await this.api.storebindinginvopush({
|
||||
store_id: uni.getStorageSync('userId')
|
||||
})
|
||||
if(res){
|
||||
if (res) {
|
||||
this.datalsit = res.data.qrcode;
|
||||
console.log(this.datalsit)
|
||||
// 获取uQRCode实例
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<navseat :opacity='false' :title='"开票记录"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="content_item" v-for="(item,index) in list" :key="index" @click="clickoange(item)">
|
||||
<view class="content_item_top flex-between">
|
||||
<view class="content_item_topone flex-start">
|
||||
<image src="@/static/sz.png" mode="aspectFill"></image>
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/sz.png" mode="aspectFill"></image>
|
||||
<text>{{item.createtime}}</text>
|
||||
</view>
|
||||
<view class="content_item_toptow flex-start">
|
||||
@@ -34,7 +35,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
@@ -44,14 +49,8 @@
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.list = []
|
||||
this.form = {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
this.storeinvoicelist()
|
||||
this.initial()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.form.status != 'nomore') {
|
||||
@@ -61,6 +60,13 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
initial() {
|
||||
this.form = {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
this.storeinvoicelist()
|
||||
},
|
||||
clickoange(e) {
|
||||
if (e.status == 2 || e.status == 4 || e.status == 3) {
|
||||
uni.pro.navigateTo('index/orderinfo', {
|
||||
@@ -86,8 +92,13 @@
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
|
||||
setTimeout(() => {
|
||||
this.list = [...this.list, ...res.data.list];
|
||||
if (this.form.page == 1) {
|
||||
this.list = res.data.list
|
||||
} else {
|
||||
this.list = [...this.list, ...res.data.list];
|
||||
}
|
||||
if (res.data.list.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
} else {
|
||||
@@ -95,6 +106,7 @@
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
console.log(this.list)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<navseat :opacity='false' :title='"开票详情"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="content_boxtop flex-between">
|
||||
<view class="content_boxtopone">
|
||||
{{ datalsit.type }}
|
||||
@@ -18,7 +19,8 @@
|
||||
<text class="classvie_itemone">{{ datalsit.user_type == 2 ? '公司名称' : '发票抬头' }}:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.user_name }}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.user_type == 2 && (datalsit.status == 2 || datalsit.status == 4)">
|
||||
<view class="classvie_item flex-start"
|
||||
v-if="datalsit.user_type == 2 && (datalsit.status == 2 || datalsit.status == 4)">
|
||||
<text class="classvie_itemone">公司税号:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.user_duty }}</text>
|
||||
</view>
|
||||
@@ -43,214 +45,218 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
text: 'uQRCode',
|
||||
size: 240,
|
||||
datalsit: {},
|
||||
ID: '',
|
||||
resurl: ''
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.ID = e.id;
|
||||
this.status = e.status;
|
||||
},
|
||||
onReady() {
|
||||
this.storeinvoicelist();
|
||||
},
|
||||
methods: {
|
||||
async storeinvoicelist() {
|
||||
let res = await this.api.storeinvoicedetail({
|
||||
id: this.ID
|
||||
})
|
||||
if(res){
|
||||
this.datalsit = res.data;
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = res.data.url;
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = this.size;
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
// 获取canvas上下文
|
||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||
// 设置uQRCode实例的canvas上下文
|
||||
qr.canvasContext = canvasContext;
|
||||
// 调用绘制方法将二维码图案绘制到canvas上
|
||||
qr.drawCanvas();
|
||||
}
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
savealbum(e) {
|
||||
uni.pro.navigateBack();
|
||||
data() {
|
||||
return {
|
||||
text: 'uQRCode',
|
||||
size: 240,
|
||||
datalsit: {},
|
||||
ID: '',
|
||||
resurl: ''
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.ID = e.id;
|
||||
this.status = e.status;
|
||||
},
|
||||
onReady() {
|
||||
this.storeinvoicelist();
|
||||
},
|
||||
methods: {
|
||||
async storeinvoicelist() {
|
||||
let res = await this.api.storeinvoicedetail({
|
||||
id: this.ID
|
||||
})
|
||||
if (res) {
|
||||
this.datalsit = res.data;
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = res.data.url;
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = this.size;
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
// 获取canvas上下文
|
||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||
// 设置uQRCode实例的canvas上下文
|
||||
qr.canvasContext = canvasContext;
|
||||
// 调用绘制方法将二维码图案绘制到canvas上
|
||||
qr.drawCanvas();
|
||||
}
|
||||
},
|
||||
savealbum(e) {
|
||||
uni.pro.navigateBack();
|
||||
}
|
||||
// savealbum(e) {
|
||||
// // #ifdef APP
|
||||
// uni.showLoading({
|
||||
// //加载框
|
||||
// title: '保存中...',
|
||||
// mask: true
|
||||
// });
|
||||
// var pages = getCurrentPages();
|
||||
// var page = pages[pages.length - 1];
|
||||
// console.log('当前页' + pages.length - 1);
|
||||
// var bitmap = null;
|
||||
// var currentWebview = page.$getAppWebview();
|
||||
// bitmap = new plus.nativeObj.Bitmap('amway_img');
|
||||
// // 将webview内容绘制到Bitmap对象中
|
||||
// currentWebview.draw(
|
||||
// bitmap,
|
||||
// function() {
|
||||
// console.log('截屏绘制图片成功');
|
||||
// bitmap.save(
|
||||
// '_doc/a.jpg', {},
|
||||
// function(i) {
|
||||
// console.log('保存图片成功:' + JSON.stringify(i));
|
||||
// uni.saveImageToPhotosAlbum({
|
||||
// filePath: i.target,
|
||||
// success: function() {
|
||||
// bitmap.clear(); //销毁Bitmap图片
|
||||
// uni.showToast({
|
||||
// title: '保存图片成功',
|
||||
// mask: false,
|
||||
// duration: 1500
|
||||
// });
|
||||
// uni.hideLoading();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('保存图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('截屏绘制图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// // #endif
|
||||
// },
|
||||
}
|
||||
// savealbum(e) {
|
||||
// // #ifdef APP
|
||||
// uni.showLoading({
|
||||
// //加载框
|
||||
// title: '保存中...',
|
||||
// mask: true
|
||||
// });
|
||||
// var pages = getCurrentPages();
|
||||
// var page = pages[pages.length - 1];
|
||||
// console.log('当前页' + pages.length - 1);
|
||||
// var bitmap = null;
|
||||
// var currentWebview = page.$getAppWebview();
|
||||
// bitmap = new plus.nativeObj.Bitmap('amway_img');
|
||||
// // 将webview内容绘制到Bitmap对象中
|
||||
// currentWebview.draw(
|
||||
// bitmap,
|
||||
// function() {
|
||||
// console.log('截屏绘制图片成功');
|
||||
// bitmap.save(
|
||||
// '_doc/a.jpg', {},
|
||||
// function(i) {
|
||||
// console.log('保存图片成功:' + JSON.stringify(i));
|
||||
// uni.saveImageToPhotosAlbum({
|
||||
// filePath: i.target,
|
||||
// success: function() {
|
||||
// bitmap.clear(); //销毁Bitmap图片
|
||||
// uni.showToast({
|
||||
// title: '保存图片成功',
|
||||
// mask: false,
|
||||
// duration: 1500
|
||||
// });
|
||||
// uni.hideLoading();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('保存图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// },
|
||||
// function(e) {
|
||||
// console.log('截屏绘制图片失败:' + JSON.stringify(e));
|
||||
// }
|
||||
// );
|
||||
// // #endif
|
||||
// },
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.content_boxtop {
|
||||
padding: 22rpx 16rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
.content_boxtopone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.content_boxtoptow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.content_boxt_one {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
background: #ffffff;
|
||||
.content {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.content_boxt_oneone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #ff6565;
|
||||
}
|
||||
.content_boxtop {
|
||||
padding: 22rpx 16rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
.classvie_item {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.classvie_itemone {
|
||||
.content_boxtopone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.classvie_itemtow {
|
||||
.content_boxtoptow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.content_boxt_one {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
background: #ffffff;
|
||||
|
||||
.content_boxt_oneone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #ff6565;
|
||||
}
|
||||
|
||||
.classvie_item {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.classvie_itemone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.classvie_itemtow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content_boxt_tow {
|
||||
margin: 32rpx 0;
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
padding-bottom: 50rpx;
|
||||
|
||||
.content_boxt_towtext {
|
||||
padding-top: 32rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.content_boxt_towtexts {
|
||||
margin: 50rpx auto 0 auto;
|
||||
width: 558rpx;
|
||||
height: 84rpx;
|
||||
background: #288efb;
|
||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #ffffff;
|
||||
line-height: 84rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.content_boxt_towrelative {
|
||||
position: relative;
|
||||
width: 484rpx;
|
||||
height: 484rpx;
|
||||
margin: 32rpx auto;
|
||||
|
||||
.content_boxt_towabsolute {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -50rpx;
|
||||
margin-left: -50rpx;
|
||||
border-radius: 16rpx;
|
||||
// transform: translate(-50% -50%);
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content_boxt_tow {
|
||||
margin: 32rpx 0;
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
padding-bottom: 50rpx;
|
||||
|
||||
.content_boxt_towtext {
|
||||
padding-top: 32rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.content_boxt_towtexts {
|
||||
margin: 50rpx auto 0 auto;
|
||||
width: 558rpx;
|
||||
height: 84rpx;
|
||||
background: #288efb;
|
||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #ffffff;
|
||||
line-height: 84rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.content_boxt_towrelative {
|
||||
position: relative;
|
||||
width: 484rpx;
|
||||
height: 484rpx;
|
||||
margin: 32rpx auto;
|
||||
|
||||
.content_boxt_towabsolute {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -50rpx;
|
||||
margin-left: -50rpx;
|
||||
border-radius: 16rpx;
|
||||
// transform: translate(-50% -50%);
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<navseat :opacity='false' :title='"开票详情"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="content_boxtop flex-between">
|
||||
<view class="content_boxtopone">
|
||||
{{datalsit.type}}
|
||||
@@ -27,14 +28,15 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_boxt_one">
|
||||
<view class="content_boxt_oneone" v-if="datalsit.status == 2">
|
||||
<view class="content_boxt_oneone" v-if="datalsit.status == 2">
|
||||
{{datalsit.string2}}
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">
|
||||
<text class="classvie_itemone">{{datalsit.user_type == 2 ? '公司名称':'发票抬头'}}:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.user_name}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.user_type == 2 && (datalsit.status == 2 || datalsit.status == 4) ">
|
||||
<view class="classvie_item flex-start"
|
||||
v-if="datalsit.user_type == 2 && (datalsit.status == 2 || datalsit.status == 4) ">
|
||||
<text class="classvie_itemone">公司税号:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.user_duty}}</text>
|
||||
</view>
|
||||
@@ -42,7 +44,7 @@
|
||||
<text class="classvie_itemone">发票金额:</text>
|
||||
<text class="classvie_itemtow" style="color: #FF6565;">¥{{datalsit.price}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start" >
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">发票类型:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.type}}</text>
|
||||
</view>
|
||||
@@ -59,13 +61,17 @@
|
||||
<u-icon name="arrow-right" color="#666" size="16"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
text: 'uQRCode',
|
||||
@@ -77,17 +83,17 @@
|
||||
},
|
||||
onLoad(e) {
|
||||
this.ID = e.id
|
||||
|
||||
|
||||
},
|
||||
onReady(){
|
||||
onReady() {
|
||||
this.storeinvoicelist()
|
||||
},
|
||||
methods: {
|
||||
async storeinvoicelist() {
|
||||
let res = await this.api.invoicingrecordsthatneeddetailstore({
|
||||
id:this.ID
|
||||
id: this.ID
|
||||
})
|
||||
if(res.code = 1){
|
||||
if (res.code = 1) {
|
||||
this.datalsit = res.data;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<navseat :opacity='false' :title='"固定开票详情"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="content_boxtop flex-between">
|
||||
<view class="content_boxtopone">
|
||||
{{datalsit.type}}
|
||||
@@ -56,7 +57,8 @@
|
||||
</view>
|
||||
<view class="content_boxt_towrelative" style="242px;height: 242px;">
|
||||
<canvas id="qrcode" style="242px;height: 242px;" ref="qrcode" canvas-id="qrcode"></canvas>
|
||||
<image class="content_boxt_towabsolute" src="@/static/icons.png" mode=""></image>
|
||||
<image class="content_boxt_towabsolute"
|
||||
src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/icons.png" mode=""></image>
|
||||
</view>
|
||||
<!-- <view class="content_boxt_towtexts" style="color: blue; " @click="savealbum">
|
||||
已完成
|
||||
@@ -67,7 +69,11 @@
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
text: 'uQRCode',
|
||||
@@ -92,7 +98,8 @@
|
||||
let res = await this.api.storeinvoicedetail({
|
||||
id: this.ID
|
||||
})
|
||||
if(res){
|
||||
console.log(res)
|
||||
if (res) {
|
||||
this.datalsit = res.data;
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
@@ -108,6 +115,10 @@
|
||||
qr.canvasContext = canvasContext;
|
||||
// 调用绘制方法将二维码图案绘制到canvas上
|
||||
qr.drawCanvas();
|
||||
} else {
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack()
|
||||
},1000)
|
||||
}
|
||||
},
|
||||
savealbum(e) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<navseat :opacity='false' :title='"微信扫码开票"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="Box_item" v-show="qrodeshow == 0">
|
||||
<view id="Box">
|
||||
<view class="Box_item_content flex-colum">
|
||||
@@ -50,8 +51,14 @@
|
||||
import html2canvas from 'html2canvas';
|
||||
// #endif
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
import getLodop from '@/common/js/LodopFuncs.js'
|
||||
// // #ifndef H5
|
||||
// import getLodop from '@/common/js/LodopFuncs.js'
|
||||
// // #endif
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
text: 'uQRCode',
|
||||
@@ -67,19 +74,36 @@
|
||||
fowxAuditInfo: {},
|
||||
imgShow: false,
|
||||
img: '',
|
||||
datares:{
|
||||
tope:''
|
||||
datares: {
|
||||
tope: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e)
|
||||
if(e.tope == 0){
|
||||
// #ifdef MP-WEIXIN
|
||||
// 获取参数并解码
|
||||
var decodedParam = decodeURIComponent(e.data);
|
||||
// 使用解码后的参数
|
||||
console.log(decodedParam);
|
||||
decodedParam = JSON.parse(decodedParam)
|
||||
if (decodedParam.tope == 0) {
|
||||
this.datares = decodedParam
|
||||
this.datares.tope = 0
|
||||
} else {
|
||||
this.datares = decodedParam
|
||||
}
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
if (e.tope == 0) {
|
||||
this.datares = e
|
||||
this.datares.tope = 0
|
||||
}else{
|
||||
} else {
|
||||
this.datares = e
|
||||
}
|
||||
// #endif
|
||||
|
||||
console.log(e)
|
||||
|
||||
},
|
||||
onReady() {
|
||||
this.merchantStoreshowMerchantStoreReceipt();
|
||||
@@ -139,7 +163,7 @@
|
||||
uni.navigateBack();
|
||||
},
|
||||
savealbum(e) {
|
||||
// #ifdef APP
|
||||
// #ifdef APP || MP-WEIXIN
|
||||
uni.showLoading({
|
||||
//加载框
|
||||
title: '保存中...',
|
||||
|
||||
249
pages/login/login.vue
Normal file
249
pages/login/login.vue
Normal file
@@ -0,0 +1,249 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="contentnav">
|
||||
欢迎您登录开票系统
|
||||
</view>
|
||||
<view class="top_box">
|
||||
<view class="top_box_one">
|
||||
<text class="top_box_one_text">手机号码</text>
|
||||
<input type="text" v-model="form.account" :adjust-position="false" placeholder="请输入手机号码" maxlength="-1"
|
||||
data-key="mobile" />
|
||||
</view>
|
||||
<!-- <view class="top_box_one">
|
||||
<text class="top_box_one_text">密码</text>
|
||||
<input type="mobile" v-model="form.password" :adjust-position="false" placeholder="8-16位密码"
|
||||
maxlength="16" :password="!showPassword" />
|
||||
<view class="repeat" @click="display">
|
||||
<u-icon name="eye" v-if="showPassword"></u-icon>
|
||||
<u-icon v-else name="eye-off"></u-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="top_box_one">
|
||||
<text class="top_box_one_text">验证码</text>
|
||||
<input type="mobile" v-model="form.captcha" placeholder="请输入短信验证码" maxlength="6" />
|
||||
<view class="repeats">
|
||||
<view v-if="showText == true"
|
||||
style="padding: 8rpx 16rpx 6rpx 16rpx;background: #288EFB; border-radius: 15rpx;"
|
||||
@click="CodeRegister">{{ Recapture }}</view>
|
||||
<view v-else
|
||||
style="color: #ccc; background-color: #f9f9f9; padding: 8rpx 16rpx 6rpx 16rpx; border-radius: 15rpx;">
|
||||
{{ second }}s重新发送
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="toLogin" @click="userlogin">登录</view>
|
||||
<!-- <view class="agreement flex-start">
|
||||
<u-checkbox-group><u-checkbox shape="circle" @change="radioChange"
|
||||
size="12"></u-checkbox></u-checkbox-group>
|
||||
<text>阅读并同意银收客</text>
|
||||
<view class="agreement-Item" @click="Privacy(1)">《用户协议》</view>
|
||||
及
|
||||
<view class="agreement-Item" @click="Privacy(2)">《隐私政策》</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showPassword: false, //是否显示密码
|
||||
form: {
|
||||
account: '',
|
||||
password: '',
|
||||
captcha: ''
|
||||
},
|
||||
// 注册定时器 初始值
|
||||
second: 60,
|
||||
showText: true,
|
||||
Recapture: '发送验证码',
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
await this.$onLaunched;
|
||||
if (e.userId) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
// this.onLoaduserId = e.userId
|
||||
uni.cache.set('Type', e.type);
|
||||
uni.cache.set('userId', e.userId);
|
||||
let token = await this.api.h5encryption({
|
||||
store_id: uni.cache.get('userId')
|
||||
})
|
||||
if (token.code == 1) {
|
||||
uni.cache.set('token', token.data.token);
|
||||
uni.cache.set('store_status', 1);
|
||||
uni.pro.navigateTo('index/index');
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async CodeRegister() {
|
||||
//发起验证码
|
||||
if (this.form.account == null || this.form.account == '') {
|
||||
uni.showToast({
|
||||
title: '请输入电话号码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
const res = await this.api.smssend({ // post 手机验证码
|
||||
mobile: this.form.account,
|
||||
event: 'mobilelogin'
|
||||
});
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: '验证码获取成功',
|
||||
icon: 'none'
|
||||
});
|
||||
// 定时器
|
||||
this.showText = false;
|
||||
this.Recapture = '重新获取';
|
||||
var interval = setInterval(() => {
|
||||
let times = --this.second;
|
||||
this.second = times < 10 ? '0' + times : times; //小于10秒补 0
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
clearInterval(interval);
|
||||
this.second = 60;
|
||||
this.showText = true;
|
||||
}, 60000);
|
||||
}
|
||||
},
|
||||
display() {
|
||||
// 切换图片显示隐藏
|
||||
this.showPassword = !this.showPassword;
|
||||
},
|
||||
async userlogin() {
|
||||
if (this.form.account == null || this.form.account == '') {
|
||||
uni.showToast({
|
||||
title: '请输入电话号码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.captcha == null || this.form.captcha == '') {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.userlogin({
|
||||
account: this.form.account,
|
||||
captcha: this.form.captcha,
|
||||
open_id: uni.cache.get('open_id'),
|
||||
})
|
||||
uni.cache.set('userId', res.data.userinfo.store_id);
|
||||
uni.cache.set('logintoken', res.data.userinfo.token);
|
||||
uni.cache.set('store_status', res.data.store_status);
|
||||
uni.cache.set('Type', res.data.type);
|
||||
uni.pro.navigateTo('index/index');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
.contentnav {
|
||||
padding-left: 48rpx;
|
||||
padding-top: 200rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 56rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.top_box {
|
||||
margin-top: 88rpx;
|
||||
z-index: 9;
|
||||
padding: 0 64rpx;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background: #ffffff;
|
||||
border-radius: 40rpx 40rpx 0px 0px;
|
||||
|
||||
.top_box_one {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin-top: 64rpx;
|
||||
border-bottom: 6rpx solid #e5e5e5;
|
||||
|
||||
.top_box_one_text {
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.repeat {
|
||||
position: absolute;
|
||||
bottom: 26rpx;
|
||||
right: 0;
|
||||
width: 25rpx;
|
||||
height: 17rpx;
|
||||
}
|
||||
|
||||
.repeats {
|
||||
z-index: 99;
|
||||
position: absolute;
|
||||
bottom: 26rpx;
|
||||
right: 0;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
input {
|
||||
height: auto;
|
||||
padding: 18rpx 0 20rpx 0;
|
||||
}
|
||||
}
|
||||
|
||||
.top_box_tow {
|
||||
width: 100%;
|
||||
|
||||
text {
|
||||
margin-top: 34rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.toLogin {
|
||||
width: 570rpx;
|
||||
margin-top: 112rpx;
|
||||
padding: 10rpx 0;
|
||||
text-align: center;
|
||||
background: #288efb;
|
||||
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.agreement {
|
||||
margin-top: 14rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #7c8e97;
|
||||
|
||||
.agreement-Item {
|
||||
color: #4ca1fc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
307
pages/login/password.vue
Normal file
307
pages/login/password.vue
Normal file
@@ -0,0 +1,307 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar class="top" title="忘记密码" @rightClick="leftClick" :autoBack="true" leftIconColor="#fff" :titleStyle="{color:'#FFF',}" bgColor="transparent"></u-navbar>
|
||||
<view class="top_box_xx">
|
||||
<view class="top_box">
|
||||
<view class="top_box_one">
|
||||
<text class="top_box_one_text">手机号码</text>
|
||||
<input type="text" v-model="form.phone" placeholder="请输入手机号码" data-key="mobile" />
|
||||
</view>
|
||||
<view class="top_box_one">
|
||||
<text class="top_box_one_text">密码</text>
|
||||
<input type="mobile" v-model="form.password" placeholder="8-16位密码" maxlength="16" :password="!showPassword" />
|
||||
<view class="repeat" @click="display">
|
||||
<u-icon name="eye" v-if="showPassword"></u-icon>
|
||||
<u-icon v-else name="eye-off"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="top_box_one">
|
||||
<text class="top_box_one_text">确认密码</text>
|
||||
<input type="mobile" v-model="form.confirmpassword" placeholder="请再次输入密码" maxlength="16" :password="!showPassword" />
|
||||
<view class="repeat" @click="display">
|
||||
<u-icon name="eye" v-if="showPassword"></u-icon>
|
||||
<u-icon v-else name="eye-off"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="top_box_one">
|
||||
<text class="top_box_one_text">验证码</text>
|
||||
<input type="mobile" v-model="form.checkCode" placeholder="请输入短信验证码" maxlength="6" />
|
||||
<view class="repeats">
|
||||
<view v-if="showText == true" style="padding: 8rpx 16rpx 6rpx 16rpx;background: #288EFB; border-radius: 15rpx;" @click="CodeRegister">{{ Recapture }}</view>
|
||||
<view v-else style="color: #ccc; background-color: #f9f9f9; padding: 8rpx 16rpx 6rpx 16rpx; border-radius: 15rpx;">{{ second }}s重新发送</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="forgetPassword" @click="forgetPassword">重置密码</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
radioChangeItem: false, //单选框
|
||||
h: null,
|
||||
showPassword: false,
|
||||
// 注册定时器 初始值
|
||||
second: 60,
|
||||
showText: true,
|
||||
Recapture: '发送验证码',
|
||||
form: {
|
||||
phone: '',
|
||||
password: '',
|
||||
confirmpassword: '',
|
||||
checkCode: '',
|
||||
source: 'promoter'
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
leftClick() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
async CodeRegister() {
|
||||
//发起验证码
|
||||
if (this.form.phone == null || this.form.phone == '') {
|
||||
uni.showToast({
|
||||
title: '请输入电话号码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
const res = await this.api.verifyPhoneIsExist({// post 手机验证码
|
||||
phone: this.form.phone,
|
||||
});
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: '验证码获取成功',
|
||||
icon: 'none'
|
||||
});
|
||||
// 定时器
|
||||
this.showText = false;
|
||||
this.Recapture = '重新获取';
|
||||
var interval = setInterval(() => {
|
||||
let times = --this.second;
|
||||
this.second = times < 10 ? '0' + times : times; //小于10秒补 0
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
clearInterval(interval);
|
||||
this.second = 60;
|
||||
this.showText = true;
|
||||
}, 60000);
|
||||
}
|
||||
},
|
||||
radioChange(n) {
|
||||
//是否同意
|
||||
console.log(n);
|
||||
this.radioChangeItem = n;
|
||||
},
|
||||
display() {
|
||||
// 切换图片显示隐藏
|
||||
this.showPassword = !this.showPassword;
|
||||
},
|
||||
Privacy(e) {
|
||||
if (e == 1) {
|
||||
//用户协议
|
||||
uni.navigateTo({
|
||||
url: '../login/Privacy'
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
//隐私政策
|
||||
url: '../login/Privacy'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
async forgetPassword() {
|
||||
//注册
|
||||
if (this.form.phone == null || this.form.phone == '') {
|
||||
uni.showToast({
|
||||
title: '请输入电话号码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.password == null || this.form.password == "" || uni.$u.trim(this.form.password,'all') == ''){
|
||||
uni.showToast({
|
||||
title: "请输入密码或密码不能输入空格",
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (this.form.confirmpassword == null || this.form.confirmpassword == '' || uni.$u.trim(this.form.confirmpassword,'all') == '') {
|
||||
uni.showToast({
|
||||
title: '请输入确认密码或确认密码不能输入空格',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.checkCode == null || this.form.checkCode == '') {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.confirmpassword != this.form.password) {
|
||||
uni.showToast({
|
||||
title: '两次密码不一致',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.forgetPassword({
|
||||
phone: this.form.phone,
|
||||
password: this.form.password,
|
||||
checkCode: this.form.checkCode,
|
||||
source: 'promoter'
|
||||
});
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'none',
|
||||
success: () => {
|
||||
uni.navigateTo({
|
||||
url: '../login/login'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(104deg, #4679ff 0%, #2868e8 47%, #2a94fc 100%);
|
||||
}
|
||||
.container {
|
||||
padding: 0 34rpx;
|
||||
position: relative;
|
||||
.top{
|
||||
position: absolute;
|
||||
left: 64rpx;
|
||||
.u-navbar--fixed{
|
||||
top: 88rpx;
|
||||
}
|
||||
}
|
||||
.box {
|
||||
padding-left: 64rpx;
|
||||
padding-bottom: 144rpx;
|
||||
box-sizing: border-box;
|
||||
text {
|
||||
font-size: 40rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.top_box_xx {
|
||||
.top_box::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 50rpx;
|
||||
z-index: 1;
|
||||
bottom: -20rpx;
|
||||
background: #9ec9fb;
|
||||
border-radius: 0 0 40rpx 40rpx;
|
||||
}
|
||||
.top_box::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 50rpx;
|
||||
bottom: 0rpx;
|
||||
z-index: 2;
|
||||
background: #fff;
|
||||
border-radius: 0 0 40rpx 40rpx;
|
||||
}
|
||||
.top_box {
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
top: 200rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0 64rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background: #ffffff;
|
||||
border-radius: 40rpx;
|
||||
padding-bottom: 108rpx;
|
||||
.top_box_one {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin-top: 64rpx;
|
||||
border-bottom: 6rpx solid #e5e5e5;
|
||||
.top_box_one_text {
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
input {
|
||||
padding: 18rpx 0 20rpx 0;
|
||||
}
|
||||
.repeat {
|
||||
position: absolute;
|
||||
bottom: 26rpx;
|
||||
right: 0;
|
||||
width: 25rpx;
|
||||
height: 17rpx;
|
||||
}
|
||||
.repeats {
|
||||
position: absolute;
|
||||
bottom: 26rpx;
|
||||
right: 0;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
}
|
||||
.top_box_tow {
|
||||
width: 100%;
|
||||
text {
|
||||
margin-top: 34rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
.forgetPassword {
|
||||
width: 75%;
|
||||
margin-top: 120rpx;
|
||||
padding: 10rpx 0;
|
||||
text-align: center;
|
||||
background: #288efb;
|
||||
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
.agreement {
|
||||
margin-top: 14rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #7c8e97;
|
||||
.agreement-Item {
|
||||
color: #4ca1fc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
336
pages/login/register.vue
Normal file
336
pages/login/register.vue
Normal file
@@ -0,0 +1,336 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-navbar class="top" @rightClick="leftClick" :autoBack="true" leftIconColor="#fff" bgColor="transparent"></u-navbar>
|
||||
<view class="box flex-colum-start">
|
||||
<text>您好,</text>
|
||||
<text>欢迎使用银收客</text>
|
||||
</view>
|
||||
<view class="top_box" :style="h">
|
||||
<view class="top_box_one">
|
||||
<text class="top_box_one_text">手机号码</text>
|
||||
<input type="text" v-model="form.phone" placeholder="请输入手机号码" data-key="mobile" />
|
||||
</view>
|
||||
<view class="top_box_one">
|
||||
<text class="top_box_one_text">密码</text>
|
||||
<input type="mobile" v-model="form.password" placeholder="8-16位密码" maxlength="16" :password="!showPassword" />
|
||||
<view class="repeat" @click="display">
|
||||
<u-icon name="eye" v-if="showPassword"></u-icon>
|
||||
<u-icon v-else name="eye-off"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="top_box_one">
|
||||
<text class="top_box_one_text">验证码</text>
|
||||
<input type="mobile" v-model="form.checkCode" placeholder="请输入短信验证码" maxlength="6" />
|
||||
<view class="repeats">
|
||||
<view v-if="showText == true" class="yzm" style="padding: 8rpx 16rpx 6rpx 16rpx; background: #288efb; border-radius: 15rpx" @click="CodeRegister">
|
||||
{{ Recapture }}
|
||||
</view>
|
||||
<view v-else style="color: #ccc; background-color: #f9f9f9; padding: 8rpx 16rpx 6rpx 16rpx; border-radius: 15rpx">{{ second }}s重新发送</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="top_box_one">
|
||||
<text class="top_box_one_text" @click="showTips">
|
||||
邀请码(选填)
|
||||
<uni-icons type="help" size="18"></uni-icons>
|
||||
</text>
|
||||
<input type="mobile" v-model="form.inviteCode" placeholder="请输入邀请人邀请码" />
|
||||
</view>
|
||||
<view class="Register" @click="Register">注册</view>
|
||||
<view class="agreement flex-start">
|
||||
<u-checkbox-group><u-checkbox shape="circle" @change="radioChange" size="12"></u-checkbox></u-checkbox-group>
|
||||
<text>阅读并同意银收客</text>
|
||||
<view class="agreement-Item" @click="Privacy(1)">《用户协议》</view>
|
||||
及
|
||||
<view class="agreement-Item" @click="Privacy(3)">《隐私政策》</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
radioChangeItem: false, //单选框
|
||||
h: null,
|
||||
showPassword: false,
|
||||
// 注册定时器 初始值
|
||||
second: 60,
|
||||
showText: true,
|
||||
Recapture: '发送验证码',
|
||||
form: {
|
||||
phone: '',
|
||||
password: '',
|
||||
checkCode: '',
|
||||
inviteCode: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.computed_h();
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
showTips() {
|
||||
uni.showModal({
|
||||
title: '注意',
|
||||
content: '若该邀请码的用户无推广权限,将自动绑定到其上级名下',
|
||||
showCancel: false
|
||||
});
|
||||
},
|
||||
leftClick() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
async CodeRegister() {
|
||||
//发起验证码
|
||||
if (this.form.phone == null || this.form.phone == '') {
|
||||
uni.showToast({
|
||||
title: '请输入电话号码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.password == null || this.form.password == '') {
|
||||
uni.showToast({
|
||||
title: '请输入密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
const res = await this.api.verifyPhoneIsExist({
|
||||
// post 手机验证码
|
||||
phone: this.form.phone
|
||||
});
|
||||
console.log(res);
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: '验证码获取成功',
|
||||
icon: 'none'
|
||||
});
|
||||
// 定时器
|
||||
this.showText = false;
|
||||
this.Recapture = '重新获取';
|
||||
var interval = setInterval(() => {
|
||||
let times = --this.second;
|
||||
this.second = times < 10 ? '0' + times : times; //小于10秒补 0
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
clearInterval(interval);
|
||||
this.second = 60;
|
||||
this.showText = true;
|
||||
}, 60000);
|
||||
}
|
||||
},
|
||||
radioChange(n) {
|
||||
//是否同意
|
||||
console.log(n);
|
||||
this.radioChangeItem = n;
|
||||
},
|
||||
display() {
|
||||
// 切换密码显示隐藏
|
||||
this.showPassword = !this.showPassword;
|
||||
},
|
||||
async Privacy(e) {
|
||||
if (e == 1) {
|
||||
//用户协议
|
||||
let res = await this.api.agreementgetAgreementOne({
|
||||
discern: 0
|
||||
});
|
||||
uni.pro.navigateTo('my/about/agreement', { discern: 0, list: res.data.content });
|
||||
} else {
|
||||
let res3 = await this.api.agreementgetAgreementOne({
|
||||
discern: 3
|
||||
});
|
||||
uni.pro.navigateTo('my/about/agreement', { discern: 3, list: res3.data.content });
|
||||
}
|
||||
},
|
||||
async computed_h() {
|
||||
//获取div宽度
|
||||
let content_Icon = await uni.utils.info_distance('box');
|
||||
let content_top_box = await uni.utils.info_distance('top_box');
|
||||
let system_info = await uni.pro.getSystemInfo();
|
||||
var h_ = null;
|
||||
if (content_Icon.height + content_top_box.height > system_info.windowHeight) {
|
||||
console.log(135);
|
||||
h_ = content_top_box.height + 30 + 'px';
|
||||
} else {
|
||||
h_ = system_info.windowHeight - content_Icon.height + 'px';
|
||||
}
|
||||
this.h = {
|
||||
height: h_
|
||||
};
|
||||
},
|
||||
async Register() {
|
||||
//注册
|
||||
if (this.form.phone == null || this.form.phone == '') {
|
||||
uni.showToast({
|
||||
title: '请输入电话号码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.password == null || this.form.password == '' || uni.$u.trim(this.form.password, 'all') == '') {
|
||||
uni.showToast({
|
||||
title: '请输入密码或密码不能输入空格',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.checkCode == null || this.form.checkCode == '') {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.radioChangeItem == false) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先阅读《用户协议》和《隐私政策》'
|
||||
});
|
||||
return;
|
||||
}
|
||||
let res = await this.api.register({
|
||||
phone: this.form.phone,
|
||||
password: this.form.password,
|
||||
checkCode: this.form.checkCode,
|
||||
inviteCode: this.form.inviteCode,
|
||||
source: 'promoter'
|
||||
});
|
||||
if (res) {
|
||||
setTimeout((res) => {
|
||||
uni.showToast({
|
||||
title: '注册成功',
|
||||
icon: 'none',
|
||||
success: () => {
|
||||
uni.navigateTo({
|
||||
url: '../login/login'
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 1500);
|
||||
// uni.cache.set('storage:authorization', res.data.auth_token);
|
||||
// this.$store.commit('set_login', true);
|
||||
// uni.pro.switchTab('index/index');
|
||||
}
|
||||
// if (result.status === 1) {
|
||||
// this.login(result.data);
|
||||
// uni.navigateBack();
|
||||
// } else {
|
||||
// this.$api.msg(result.msg);
|
||||
// this.logining = false;
|
||||
// }
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
width: 100%;
|
||||
background: linear-gradient(104deg, #4679ff 0%, #2868e8 47%, #2a94fc 100%);
|
||||
}
|
||||
.container {
|
||||
position: relative;
|
||||
.top {
|
||||
position: absolute;
|
||||
left: 64rpx;
|
||||
.u-navbar--fixed {
|
||||
top: 88rpx;
|
||||
}
|
||||
}
|
||||
.box {
|
||||
padding-top: 228rpx;
|
||||
padding-left: 64rpx;
|
||||
padding-bottom: 144rpx;
|
||||
text {
|
||||
font-size: 40rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.top_box::after {
|
||||
position: absolute;
|
||||
content: url(https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/icons.png);
|
||||
width: 282rpx;
|
||||
height: 280rpx;
|
||||
top: -240rpx;
|
||||
right: 32rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
.top_box {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background: #ffffff;
|
||||
border-radius: 40rpx 40rpx 0px 0px;
|
||||
.top_box_one {
|
||||
position: relative;
|
||||
width: 85%;
|
||||
margin-top: 64rpx;
|
||||
border-bottom: 6rpx solid #e5e5e5;
|
||||
.top_box_one_text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
input {
|
||||
padding: 18rpx 0 20rpx 0;
|
||||
}
|
||||
.repeat {
|
||||
position: absolute;
|
||||
bottom: 26rpx;
|
||||
right: 0;
|
||||
width: 25rpx;
|
||||
height: 17rpx;
|
||||
}
|
||||
.repeats {
|
||||
position: absolute;
|
||||
bottom: 26rpx;
|
||||
right: 0;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
}
|
||||
.top_box_tow {
|
||||
width: 85%;
|
||||
text {
|
||||
margin-top: 34rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
.Register {
|
||||
width: 75%;
|
||||
margin-top: 112rpx;
|
||||
padding: 10rpx 0;
|
||||
text-align: center;
|
||||
background: #288efb;
|
||||
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
.agreement {
|
||||
margin-top: 14rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #7c8e97;
|
||||
.agreement-Item {
|
||||
color: #4ca1fc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
365
pages/merchant/index.vue
Normal file
365
pages/merchant/index.vue
Normal file
@@ -0,0 +1,365 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<navseat :opacity='false' :title='"开发票"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="Box_box_O">
|
||||
<view class="Box_box flex-between" @click="showpopupclick">
|
||||
<view>*项目名称</view>
|
||||
<view class=""
|
||||
style="width: 60%; overflow:hidden; font-size:32rpx;color:grey;text-overflow: ellipsis;white-space: nowrap; "
|
||||
v-model="form.article">{{ form.article || '选择项目名称' }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>*金额</view>
|
||||
<view><input type="digit" v-model="form.price" @input="handleInputChange" placeholder="请填写金额" /></view>
|
||||
</view>
|
||||
|
||||
<view class="Box_box flex-between">
|
||||
<view>*数量:</view>
|
||||
<view><input type="number" v-model="form.number" @input="handleInputChange" placeholder="请填写数量"
|
||||
data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between" @click="showpicker = true">
|
||||
<view class="Box_boxlang Box_box_bouttme_item_O">*发票类型</view>
|
||||
<view class="Box_box_bouttme_item_T">
|
||||
<text type="text" v-model="form.type">{{ form.type || '请输入发票类型' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>*税额:</view>
|
||||
<view><input type="text" disabled='false' v-model="form.tax_amount" placeholder="请填写税额"
|
||||
data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>*单价:</view>
|
||||
<view><input type="text" disabled='false' v-model="form.d_price" placeholder="请填写单价"
|
||||
data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>备注:</view>
|
||||
<u--textarea v-model="form.notes" placeholder="请输入内容"></u--textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="preservation flex-colum">
|
||||
<view class="preservation_box" @tap="$u.throttle(saveMerchantBaseInfoV2, 1000)">提交</view>
|
||||
</view>
|
||||
<u-popup :show="showpopup" @close="showpopup = false">
|
||||
<view class="popupshow">
|
||||
<view class="popupshowone">请选择项目名称</view>
|
||||
<view class="popupshowone_item" style=" border-bottom: 1rpx solid #E5E5E5;" v-if="keyword">
|
||||
<view class="popupshowone_itemone" @click="popupshowone_itemone">
|
||||
{{keyword}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="popupshowonebotton" @click="businesscategory">搜索其他项目名称</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<u-picker :show="showpicker" @confirm="showpickerconfirm" :columns="columns"
|
||||
@cancel="showpicker = false"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyword: uni.getStorageSync('keyword').name ? uni.getStorageSync('keyword').name : '',
|
||||
showpopup: false,
|
||||
showpicker: false,
|
||||
columns: [
|
||||
[],
|
||||
[]
|
||||
],
|
||||
Uploadurlnumber: '',
|
||||
namelang: '',
|
||||
merchantAuditStatus: '',
|
||||
form: {
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
article: '',
|
||||
type: '',
|
||||
price: '',
|
||||
se_amount: '',
|
||||
number: '',
|
||||
tax_amount: '',
|
||||
d_price: '',
|
||||
notes: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
// 删除
|
||||
onNavigationBarButtonTap() {
|
||||
uni.pro.navigateTo('index/merchant/order');
|
||||
},
|
||||
async onLoad(e) {
|
||||
// #ifdef APP-PLUS
|
||||
let webView = this.$mp.page.$getAppWebview();
|
||||
webView.setTitleNViewButtonStyle(0, {
|
||||
width: '70px'
|
||||
});
|
||||
// #endif
|
||||
let res = await this.api.storedigitalinvoice()
|
||||
this.columns = res.data
|
||||
},
|
||||
onShow() {
|
||||
uni.$on('businesscategorys', res => {
|
||||
console.log(res);
|
||||
this.form.mcc = res.code;
|
||||
this.form.article = res.name;
|
||||
this.keyword = uni.cache.get('keyword')
|
||||
// this.form.contactLine = res.unionpayCode
|
||||
// this.form.branchName = res.branchName
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
showpopupclick() {
|
||||
this.keyword = uni.getStorageSync('keyword').name ? uni.getStorageSync('keyword').name : ''
|
||||
this.showpopup = true
|
||||
},
|
||||
popupshowone_itemone() {
|
||||
this.showpopup = false
|
||||
this.form.article = this.keyword
|
||||
},
|
||||
handleInputChange() {
|
||||
if (this.form.price == null || this.form.price == '') {
|
||||
return false;
|
||||
}
|
||||
if (this.form.number == null || this.form.number == '') {
|
||||
return false;
|
||||
}
|
||||
if (this.form.type == null || this.form.type == '') {
|
||||
return false;
|
||||
}
|
||||
uni.$u.debounce(this.showpickerconfirm(), 1000)
|
||||
|
||||
},
|
||||
async showpickerconfirm(e) {
|
||||
if (this.form.price == null || this.form.price == '') {
|
||||
uni.showToast({
|
||||
title: '请输入开票金额',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.number == null || this.form.number == '') {
|
||||
uni.showToast({
|
||||
title: '请输入数量',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
if (e.value) {
|
||||
if (e.value[1] == "1%") {
|
||||
this.form.se_amount = 1
|
||||
} else {
|
||||
this.form.se_amount = 3
|
||||
}
|
||||
this.form.type = e.value.toString();
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
|
||||
let res = await this.api.storese({
|
||||
amount: this.form.price,
|
||||
se_amount: this.form.se_amount
|
||||
})
|
||||
this.form.tax_amount = res.data.tx
|
||||
this.form.d_price = res.data.d_amount
|
||||
this.showpicker = false;
|
||||
},
|
||||
businesscategory() {
|
||||
this.showpopup = false
|
||||
uni.pro.navigateTo('index/businesscategory');
|
||||
},
|
||||
|
||||
async saveMerchantBaseInfoV2() {
|
||||
if (this.form.article == null || this.form.article == '') {
|
||||
uni.showToast({
|
||||
title: '选择项目名称',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.type == null || this.form.type == '') {
|
||||
uni.showToast({
|
||||
title: '请选择类型',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.price == null || this.form.price == '') {
|
||||
uni.showToast({
|
||||
title: '请输入开票金额',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.number == null || this.form.number == '') {
|
||||
uni.showToast({
|
||||
title: '请输入数量',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.tax_amount == null || this.form.tax_amount == '') {
|
||||
uni.showToast({
|
||||
title: '请输入税额',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.d_price == null || this.form.d_price == '') {
|
||||
uni.showToast({
|
||||
title: '请输入单价',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.storesubinvoicing(this.form)
|
||||
console.log(res)
|
||||
this.form = {
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
article: '',
|
||||
type: '',
|
||||
price: '',
|
||||
number: '',
|
||||
tax_amount: '',
|
||||
d_price: '',
|
||||
notes: '',
|
||||
se_amount: ''
|
||||
}
|
||||
uni.pro.navigateTo('index/wxinvoicing', res.data.invoice_records)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.Box {
|
||||
.Box_box_O {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.Box_box {
|
||||
text-align: right;
|
||||
padding: 24rpx;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.Box_box_bouttme_item_T {
|
||||
padding-left: 30rpx;
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
|
||||
text {
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Box_box_T {
|
||||
padding: 0 28rpx;
|
||||
border-top: 16rpx solid #e5e5e5;
|
||||
|
||||
.Box_box_T_o {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
.flex-colum {
|
||||
image {
|
||||
width: 396rpx;
|
||||
height: 240rpx;
|
||||
}
|
||||
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.Box_box_Ts {
|
||||
width: 396rpx;
|
||||
height: 240rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx dashed #707070;
|
||||
background: url(https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/my2.png) no-repeat;
|
||||
background-position: 50% 50%;
|
||||
background-size: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.preservation {
|
||||
margin-top: 50rpx;
|
||||
width: 100%;
|
||||
|
||||
.preservation_box {
|
||||
width: 70%;
|
||||
height: 72rpx;
|
||||
background: #288efb;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
border-radius: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.popupshow {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx 20rpx 0rpx 0rpx;
|
||||
padding-bottom: 50rpx;
|
||||
|
||||
.popupshowone {
|
||||
margin-top: 22rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.popupshowone_item {
|
||||
padding: 26rpx 52rpx;
|
||||
|
||||
.popupshowone_itemone {
|
||||
text-align: center;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.popupshowonebotton {
|
||||
margin: 100rpx auto 0 auto;
|
||||
width: 558rpx;
|
||||
height: 84rpx;
|
||||
background: #288EFB;
|
||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 84rpx;
|
||||
text-align: center;
|
||||
padding-bottom: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
301
pages/merchant/information.vue
Normal file
301
pages/merchant/information.vue
Normal file
@@ -0,0 +1,301 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<navseat :opacity='false' :title='"完善商户信息"' :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="Box_box_O">
|
||||
<view class="Box_box flex-between">
|
||||
<view>请填写公司名字</view>
|
||||
<view class="Box_box_input"><input type="text" :disabled="disabled" v-model="form.title"
|
||||
placeholder="请填写" data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>请填写法人姓名</view>
|
||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.legal_person_name"
|
||||
placeholder="请填写" data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>请填写法人手机号</view>
|
||||
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.phone"
|
||||
placeholder="请填写" data-key="mobile" /></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box_T">
|
||||
<view class="Box_box_T_o">请上传法人身份证图片</view>
|
||||
<view class="flex-colum" style="width: 100%;">
|
||||
<view class="Box_box_d" v-if="form.id_card_straight" @click="Upload(0)">
|
||||
<image :src="form.id_card_straight" mode=""></image>
|
||||
</view>
|
||||
<view v-else class="Box_box_Ts" @click="Upload(0)"></view>
|
||||
</view>
|
||||
<view class="Box_box_T_o">请上传法人国徽身份证图片</view>
|
||||
<view class="flex-colum" style="width: 100%;">
|
||||
<view class="Box_box_d" v-if="form.id_card_reverse" @click="Upload(1)">
|
||||
<image :src="form.id_card_reverse" mode=""></image>
|
||||
</view>
|
||||
<view v-else class="Box_box_Ts" @click="Upload(1)"></view>
|
||||
</view>
|
||||
<view class="Box_box_T_o">请拍摄并上传你的营业执照</view>
|
||||
<view class="flex-colum" style="width: 100%;">
|
||||
<view class="Box_box_d" v-if="form.business_license" @click="Upload(2)">
|
||||
<image :src="form.business_license" mode=""></image>
|
||||
</view>
|
||||
<view v-else class="Box_box_Ts" @click="Upload(2)"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="preservation flex-colum">
|
||||
<view v-if="form.status == '2'" style="color: #FF2B2B; padding: 28rpx 0;">
|
||||
({{form.no|| '无'}})</view>
|
||||
<view v-if="disabled" class="preservation_boxs">审核中</view>
|
||||
<view v-else class="preservation_box" @tap="$u.throttle(saveMerchantBaseInfoV2, 1000)">提交</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
disabled: true,
|
||||
Uploadurlnumber: '',
|
||||
namelang: '',
|
||||
merchantAuditStatus: '',
|
||||
form: {
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
title: '',
|
||||
id_card_straight: '',
|
||||
id_card_reverse: '',
|
||||
business_license: '',
|
||||
phone: '',
|
||||
legal_person_name: '',
|
||||
no: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
if (e.status == '0') {
|
||||
this.disabled = true
|
||||
} else {
|
||||
this.disabled = false
|
||||
}
|
||||
if (e.phone) {
|
||||
this.form.store_id = uni.getStorageSync('userId')
|
||||
this.form.title = e.title
|
||||
this.form.status = e.status
|
||||
this.form.id_card_straight = e.id_card_straight
|
||||
this.form.id_card_reverse = e.id_card_reverse
|
||||
this.form.business_license = e.business_license
|
||||
this.form.phone = e.phone
|
||||
this.form.legal_person_name = e.legal_person_name
|
||||
this.form.no = e.no
|
||||
}
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
Upload(i) {
|
||||
if (this.disabled) {
|
||||
return false;
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
})
|
||||
this.Uploadurlnumber = i;
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], //从相册选择,和摄像头功能,默认二者都有
|
||||
success: res => {
|
||||
var thisimgUrlcaca = res.tempFilePaths[0];
|
||||
uploadImage(thisimgUrlcaca, 'merchantinformation/',
|
||||
result => {
|
||||
//将上传后的图片以对象(官方要求的格式)的形式存入uni-file-picker的value值imageValue(imageValue值的结构为数组包对象)用于图片回显
|
||||
console.log(result)
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'none',
|
||||
success: () => {
|
||||
|
||||
}
|
||||
});
|
||||
if (this.Uploadurlnumber == 0) {
|
||||
this.form.id_card_straight = result
|
||||
} else if (this.Uploadurlnumber == 1) {
|
||||
this.form.id_card_reverse = result
|
||||
} else {
|
||||
this.form.business_license = result
|
||||
}
|
||||
uni.hideLoading()
|
||||
}, result => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: result.message || result.msg,
|
||||
icon: 'none',
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
async saveMerchantBaseInfoV2() {
|
||||
if (this.form.title == null || this.form.title == '') {
|
||||
uni.showToast({
|
||||
title: '请填写公司名字',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.phone == null || this.form.phone == '') {
|
||||
uni.showToast({
|
||||
title: '请填写法人手机号',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.legal_person_name == null || this.form.legal_person_name == '') {
|
||||
uni.showToast({
|
||||
title: '请填写法人姓名',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.id_card_straight == null || this.form.id_card_straight == '') {
|
||||
uni.showToast({
|
||||
title: '请上传身份证人像面',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.id_card_reverse == null || this.form.id_card_reverse == '') {
|
||||
uni.showToast({
|
||||
title: '请上传身份证国徽面',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.business_license == null || this.form.business_license == '') {
|
||||
uni.showToast({
|
||||
title: '请上传营业执照',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
// if (/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig
|
||||
// .test(this.form.alias)) {
|
||||
// uni.showToast({
|
||||
// title: '请不要输入Emoji!!!',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return false;
|
||||
// }
|
||||
let res = await this.api.storestoreinfo(this.form)
|
||||
uni.showToast({
|
||||
title: res.message || res.msg,
|
||||
icon: 'none',
|
||||
success: () => {
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
if (res.code == 1) {
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.Box {
|
||||
.Box_box_O {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.Box_box {
|
||||
text-align: right;
|
||||
padding: 24rpx;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
|
||||
.Box_box_input {
|
||||
width: 60%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Box_box_T {
|
||||
padding: 0 28rpx;
|
||||
border-top: 16rpx solid #e5e5e5;
|
||||
|
||||
.Box_box_T_o {
|
||||
padding: 28rpx 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.flex-colum {
|
||||
image {
|
||||
width: 396rpx;
|
||||
height: 240rpx;
|
||||
}
|
||||
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.Box_box_Ts {
|
||||
width: 396rpx;
|
||||
height: 240rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx dashed #707070;
|
||||
background: url(https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/my2.png) no-repeat;
|
||||
background-position: 50% 50%;
|
||||
background-size: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.preservation {
|
||||
width: 100%;
|
||||
padding-bottom: 50rpx;
|
||||
|
||||
.preservation_box {
|
||||
width: 70%;
|
||||
height: 72rpx;
|
||||
background: #288efb;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
border-radius: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.preservation_boxs {
|
||||
width: 70%;
|
||||
height: 72rpx;
|
||||
background: #999999;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
border-radius: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -12,7 +12,10 @@
|
||||
async onLoad(options) {
|
||||
console.log(options)
|
||||
if (options.tape == 1) {
|
||||
this.url = options.url;
|
||||
let res = await this.api.szzpyhurl({
|
||||
store_id: uni.getStorageSync('userId')
|
||||
})
|
||||
this.url = res.data.url;
|
||||
} else {
|
||||
let res = await this.api.szzpydownloadurl({
|
||||
id: options.id
|
||||
|
||||
Reference in New Issue
Block a user