小程序编译0.0.0

This commit is contained in:
魏啾
2024-11-13 09:25:34 +08:00
parent 1fbf346aec
commit 2147f86b93
65 changed files with 3745 additions and 852 deletions

View File

@@ -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%;
}

View File

@@ -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';

View File

@@ -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%;
}

View File

@@ -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) {

View File

@@ -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%;
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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%;
}

View File

@@ -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实例

View File

@@ -1,307 +0,0 @@
<template>
<view class="content">
<!-- <view class="content_boxtop flex-between">
<view class="content_boxtopone">
{{datalsit.type}}
</view>
</view> -->
<view class="content_boxt_tow" id="printSection" ref="print">
<view class="content_boxt_towtext">
扫码绑定公众号将会收到通知
</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>
<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>
<button @click="print">打印</button>
</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
export default {
data() {
return {
text: 'uQRCode',
size: 242,
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);
},
onReady() {
setTimeout(() => {
uni.$u.debounce(this.storeinvoicelist(), 500)
}, 500)
},
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')
})
if (res) {
this.datalsit = res.data.qrcode;
console.log(this.datalsit)
// 获取uQRCode实例
var qr = new uQRCode();
// 设置二维码内容
qr.data = res.data.qrcode;
// 设置二维码大小必须与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
// },
}
}
</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;
/* 小票高度 */
}
}
.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;
}
}
.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;
}
.content_boxt_towrelative {
position: relative;
width: 242px;
height: 242px;
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>

View File

@@ -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)
},
}
}

View File

@@ -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>

View File

@@ -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;
}
},

View File

@@ -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) {

View File

@@ -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: '保存中...',