Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c98eb7406a | |||
| 4dad65e0e0 | |||
|
|
2fb7c3683e | ||
|
|
d7eabb34d9 | ||
|
|
38e0f9d222 | ||
|
|
eddd7b949e | ||
|
|
71a8f48e70 | ||
|
|
6e174be3b2 | ||
|
|
82d4aa5f6c | ||
|
|
4d1d6f0425 | ||
|
|
2cbc3fa65f | ||
|
|
bfd37cddf5 | ||
|
|
2147f86b93 | ||
|
|
1fbf346aec |
@@ -4,23 +4,24 @@
|
||||
"version" : "0.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"app-plus" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"default" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"mp-weixin" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
"app-plus" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"default" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"mp-weixin" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
},
|
||||
{
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
"openVueDevtools" : false,
|
||||
"type" : "uni-app:miniProgram"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
36
App.vue
@@ -1,8 +1,44 @@
|
||||
<script>
|
||||
import Api from '@/common/js/api.js'
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.cache.set('menuInfo', uni.getMenuButtonBoundingClientRect());
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: async (data) => {
|
||||
let res = await Api.getminiuserinfo({
|
||||
code: data.code
|
||||
})
|
||||
uni.cache.set('open_id', res.data.openid)
|
||||
this.$isResolve()
|
||||
},
|
||||
})
|
||||
// #endif
|
||||
// 异步获取系统信息
|
||||
// uni.getSystemInfo({
|
||||
// success: function(info) {
|
||||
// console.log(info)
|
||||
// if (info.platform === 'h5') {
|
||||
// // H5环境
|
||||
// if (uni.getStorageSync('navigationStyle') === 'custom') {
|
||||
// // 全局原生导航栏被隐藏
|
||||
// uni.hideNavigationBarLoading();
|
||||
// } else {
|
||||
// // 显示全局原生导航栏
|
||||
// }
|
||||
// } else {
|
||||
// // 非H5环境
|
||||
// if (uni.getStorageSync('navigationStyle') === 'custom') {
|
||||
// // 自定义导航
|
||||
// } else {
|
||||
// // 非自定义导航
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// #ifndef MP-WEIXIN
|
||||
this.$isResolve()
|
||||
// #endif
|
||||
},
|
||||
onShow: function() {
|
||||
|
||||
126
common/js/api.js
@@ -1,4 +1,10 @@
|
||||
export default {
|
||||
smssend(data) { //发送验证码
|
||||
return uni.api.post("sms/send", data);
|
||||
},
|
||||
userlogin(data) { //登录
|
||||
return uni.api.post("user/login", data);
|
||||
},
|
||||
storestorestatus(data) { //首页获取状态
|
||||
return uni.api.post("store/storestatus", data);
|
||||
},
|
||||
@@ -36,7 +42,7 @@ export default {
|
||||
return uni.api.post("user/subopeninvoicefixed", data);
|
||||
},
|
||||
szzpyfailccho(data) { //开票审核失败回显
|
||||
return uni.api.post("szzpy/failccho", data);
|
||||
return uni.api.post("szzpy/failccho", data, false);
|
||||
},
|
||||
storeinvoicingrecordsthatneed(data) { //开票记录(固定开票)
|
||||
return uni.api.post("store/invoicingrecordsthatneed", data);
|
||||
@@ -69,7 +75,7 @@ export default {
|
||||
return uni.api.post("store/enterprise", data, false);
|
||||
},
|
||||
storese(data) {
|
||||
return uni.api.post("store/se", data);
|
||||
return uni.api.post("store/se", data, false);
|
||||
},
|
||||
storesubinvoicing(data) {
|
||||
return uni.api.post("store/subinvoicing", data);
|
||||
@@ -80,7 +86,7 @@ export default {
|
||||
szzpyhurl(data) {
|
||||
return uni.api.post("szzpy/h5url", data);
|
||||
},
|
||||
szzpygetprovinceno(data) {
|
||||
szzpygetprovinceno(data) { //地区
|
||||
return uni.api.post("szzpy/getprovinceno", data);
|
||||
},
|
||||
storebindinginvopush(data) {
|
||||
@@ -96,6 +102,118 @@ export default {
|
||||
return uni.api.post("user/getwechatjssdk", data);
|
||||
},
|
||||
h5encryption(data) {
|
||||
return uni.api.post("store/h5encryption", data);
|
||||
return uni.api.post("store/h5encryption", data, false);
|
||||
},
|
||||
hfivegetstoreinfo(data) {
|
||||
return uni.api.post("hfive/getstoreinfo", data, false);
|
||||
},
|
||||
storestoreinfo(data) { //固定开票的接口上传
|
||||
return uni.api.post("store/storeinfo", data);
|
||||
},
|
||||
|
||||
hfivestoreqy(data) {
|
||||
return uni.api.post("hfive/storeqy", data);
|
||||
},
|
||||
hfiveenterprise(data) {
|
||||
return uni.api.post("hfive/enterprise", data, false);
|
||||
},
|
||||
directinvoicingopen(data) { //数电普票开具
|
||||
return uni.api.post("hfive/directinvoicingopen", data);
|
||||
},
|
||||
newissuedbylist(data) { //开票人列表
|
||||
return uni.api.post("hfive/newissuedbylist", data);
|
||||
},
|
||||
hfivelslbs(data) { //税率标识
|
||||
return uni.api.post("hfive/lslbs", data, false);
|
||||
},
|
||||
addinvoicegoods(data) { //税率标识
|
||||
return uni.api.post("hfive/addinvoicegoods", data);
|
||||
},
|
||||
selectencoding(data) { //行业列表 (选择编码)
|
||||
return uni.api.post("hfive/selectencoding", data, false);
|
||||
},
|
||||
invoicecoding(data) { //行业列表 (选择编码)
|
||||
return uni.api.post("hfive/invoicecoding", data, false);
|
||||
},
|
||||
invoicegoodslist(data) { //商品列表
|
||||
return uni.api.post("hfive/invoicegoodslist", data);
|
||||
},
|
||||
invoicedlist(data) { //商品列表
|
||||
return uni.api.post("hfive/invoicedlist", data, false);
|
||||
},
|
||||
addinvoicegoodsdel(data) { //删除商品
|
||||
return uni.api.post("hfive/addinvoicegoodsdel", data);
|
||||
},
|
||||
setdefault(data) { //商品设为默认
|
||||
return uni.api.post("hfive/setdefault", data);
|
||||
},
|
||||
invoicedorderlist(data) { //订单列表
|
||||
return uni.api.post("hfive/invoicedorderlist", data, false);
|
||||
},
|
||||
hfivestatuslist(data) { //订单列表
|
||||
return uni.api.post("hfive/statuslist", data);
|
||||
},
|
||||
invoicingrecordsthatneed(data) { //审核开票记录
|
||||
return uni.api.post("hfive/invoicingrecordsthatneed", data, false);
|
||||
},
|
||||
newissuedbyliststatus(data) { //开票人列表(带状态)
|
||||
return uni.api.post("hfive/newissuedbyliststatus", data);
|
||||
},
|
||||
getsendsms(data) { //获取验证码(登录)
|
||||
return uni.api.post("hfive/getsendsms", data);
|
||||
},
|
||||
sensms(data) { //获取验证码(登录)
|
||||
return uni.api.post("hfive/sensms", data);
|
||||
},
|
||||
accountqrcode(data) { //获取人脸识别二维码
|
||||
return uni.api.post("hfive/accountqrcode", data);
|
||||
},
|
||||
kpdefault(data) { //默认开票人
|
||||
return uni.api.post("hfive/kpdefault", data);
|
||||
},
|
||||
invoiceddetail(data) { //发票/订单详情
|
||||
return uni.api.post("hfive/invoiceddetail", data);
|
||||
},
|
||||
userlogout(data) { //退出登录
|
||||
return uni.api.post("user/logout", data);
|
||||
},
|
||||
getminiuserinfo(data) { //code
|
||||
return uni.api.post("user/getminiuserinfo", data);
|
||||
},
|
||||
useroauthcallback(data) { //用户开票记录
|
||||
return uni.api.post("user/oauthcallback", data);
|
||||
},
|
||||
userinvodetail(data) { //用户开票详情
|
||||
return uni.api.post("user/invodetail", data);
|
||||
},
|
||||
judgeuseridentity(data) { //判断用户身份用户/商家
|
||||
return uni.api.post("user/judgeuseridentity", data);
|
||||
},
|
||||
getrulelist(data) { //菜单列表
|
||||
return uni.api.post("store/getrulelist", data, false);
|
||||
},
|
||||
usersetuserpwd(data) { //设置/修改密码
|
||||
return uni.api.post("user/setuserpwd", data);
|
||||
},
|
||||
userswitchstore(data) { //切换商户
|
||||
return uni.api.post("user/switchstore", data);
|
||||
},
|
||||
kstorelist(data) { //开票人商户列表
|
||||
return uni.api.post("user/kstorelist", data);
|
||||
},
|
||||
userforgetpwd(data) { //修改密码
|
||||
return uni.api.post("user/forgetpwd", data);
|
||||
},
|
||||
userminidymessage(data) { //订阅消息
|
||||
return uni.api.post("user/minidymessage", data);
|
||||
},
|
||||
monthssearch(data) { //根据月份查询
|
||||
return uni.api.post("hfive/monthssearch", data);
|
||||
},
|
||||
researhqrcode(data) { //查询人脸认证结果
|
||||
return uni.api.post("hfive/researhqrcode", data);
|
||||
},
|
||||
checkqrcodestatus(data) { //检查二维码状态
|
||||
return uni.api.post("user/checkqrcodestatus", data);
|
||||
},
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="navbarcontent">
|
||||
<!-- 导航栏 -->
|
||||
<view class="navbar" :class="{active:opacity}">
|
||||
<view class="navbar" :class="{active:opacity}" v-if="shownav">
|
||||
<!-- #ifndef APP-PLUS || MP-WEIXIN -->
|
||||
<view class="status-bar"></view>
|
||||
<view class="navbar_tow flex-between"
|
||||
@@ -12,52 +12,175 @@
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="navbar_tow flex-between"
|
||||
:style="{'height':HeighT.customBar+'px','marginTop':HeighT.heightBar+'px','padding-right':HeighT.custwidth + 'px'}">
|
||||
:style="{'height':HeighT.customBar + ( (HeighT.heightBar - systemInfo.statusBarHeight)*2 )+'px','marginTop': ( HeighT.heightBar - (HeighT.heightBar - systemInfo.statusBarHeight))+'px','padding-right':HeighT.custwidth + 'px'}">
|
||||
<!-- #endif -->
|
||||
<!-- 标题搜索框 -->
|
||||
<view class="flex-between" @click="clicknavigateBack">
|
||||
<view class="navbar_tow_one flex-start">
|
||||
<u-icon name="arrow-left" color="#000" size="24"></u-icon>
|
||||
<view class="flex-between" v-if="opacity&&inputshow">
|
||||
<view class="navbar_tow_one flex-start" v-if="iconshow" @click="clicknavigateBack">
|
||||
<u-icon name="arrow-left" :color="iconcolor" size="20"></u-icon>
|
||||
</view>
|
||||
<view class="navbar_tow_tow" v-if="opacity || titleshow">
|
||||
{{title}}
|
||||
<view class="navbar_tow_tow " @click="inputFocus" style="position: relative;">
|
||||
<u--input placeholder="请输入内容" class="custom-input" border="surround" :focus="focus"
|
||||
@confirm="confirmSearch" v-model="searchVal" :readonly="readonly"
|
||||
prefixIcon="search" prefixIconStyle="font-size: 18px;color: #909399"
|
||||
placeholderStyle="font-size: 14px;color: #999" fontSize="14px"
|
||||
:customStyle="{padding: '3rpx 10rpx ',width: '400rpx',borderRadius: '30rpx',backgroundColor: '#eee'}">
|
||||
</u--input>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 正常导航栏 -->
|
||||
<view class="flex-between" @click="clicknavigateBack" v-else>
|
||||
<view class="navbar_tow_one flex-start" v-if="iconshow">
|
||||
<u-icon name="arrow-left" :color="iconcolor" size="20"></u-icon>
|
||||
</view>
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<view class="navbar_tow_tow" v-if="opacity || titleshow" :style="{color: namecolor}">
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="navbar_tow_tow" v-if="opacity || titleshow"
|
||||
:style="{'padding-left':HeighT.custwidth-14 + 'px',color: namecolor}">
|
||||
<!-- #endif -->
|
||||
{{title}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" :style="{'height':HeighT.customBar+'px'}">
|
||||
|
||||
<view class="" v-if="heightshow" :style="{height:Topdistance +'px'}">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
Topdistance: '',
|
||||
searchVal: "",
|
||||
systemInfo: '',
|
||||
// keyword
|
||||
};
|
||||
},
|
||||
props: {
|
||||
// // #ifdef H5
|
||||
// shownav: {
|
||||
// type: Boolean,
|
||||
// default: false
|
||||
// },
|
||||
// // #endif
|
||||
// // #ifdef MP-WEIXIN
|
||||
// shownav: {
|
||||
// type: Boolean,
|
||||
// default: true
|
||||
// },
|
||||
// // #endif
|
||||
shownav: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
namecolor: {
|
||||
type: String,
|
||||
default: '#333333'
|
||||
},
|
||||
search: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
opacity: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
titleshow: {
|
||||
titleshow: { //标题是否显示
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
heightshow: { //是否要占位高度
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
iconshow: { //返回键是否显示
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
iconcolor: { //返回键颜色
|
||||
type: String,
|
||||
default: '#000'
|
||||
},
|
||||
navigateBacknavtitle: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
inputshow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
focus: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
HeighT() { //手机类型的尺寸
|
||||
return this.$store.getters.is_BarHeight
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
wx.getSystemInfo({
|
||||
success: res => {
|
||||
this.systemInfo = res;
|
||||
// #ifdef H5
|
||||
this.GetTop()
|
||||
// #endif
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
// 当组件挂载完成后获取距离
|
||||
},
|
||||
onReady() {
|
||||
this.$nextTick(() => {
|
||||
this.GetTop()
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
clicknavigateBack(){
|
||||
uni.navigateBack()
|
||||
async GetTop() {
|
||||
setTimeout(async () => {
|
||||
let res = await this.$u.getRect('.navbar')
|
||||
console.log(res)
|
||||
this.Topdistance = res.height //滚动距离
|
||||
this.$emit('Topdistance', res.height)
|
||||
}, 100)
|
||||
},
|
||||
clicknavigateBack() {
|
||||
// if (this.navigateBacknavtitle) {
|
||||
// this.$emit('navigateBacknav')
|
||||
// } else {
|
||||
uni.navigateBack()
|
||||
// }
|
||||
},
|
||||
|
||||
/**
|
||||
* 搜索点击处理
|
||||
*/
|
||||
inputFocus() {
|
||||
console.log(123)
|
||||
this.$emit('searchStatus', 'searchClick')
|
||||
},
|
||||
confirmSearch() {
|
||||
this.$emit('searchVal', this.searchVal)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,15 +189,16 @@
|
||||
|
||||
<style scoped lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
.navbarcontent {
|
||||
position: relative;
|
||||
top: 0;
|
||||
z-index: 999999;
|
||||
background: #2f87fd;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 9999;
|
||||
|
||||
.active {
|
||||
background: rgba(249, 249, 249, 1);
|
||||
}
|
||||
@@ -97,9 +221,10 @@
|
||||
.navbar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 99;
|
||||
|
||||
background: #3088fd;
|
||||
.navbar_tow {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
@@ -138,12 +263,24 @@
|
||||
}
|
||||
|
||||
.navbar_tow_tow {
|
||||
width: 200rpx;
|
||||
text-align: center;
|
||||
flex: auto;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
position: relative;
|
||||
|
||||
.u--input {
|
||||
width: 200rpx;
|
||||
|
||||
input {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,17 +2,27 @@ const uploadUrl = 'https://upload-z2.qbox.me'
|
||||
// const debug = process.env.NODE_ENV === 'development'
|
||||
const debug = process.env.NODE_ENV == 'development' ? true : false;
|
||||
const proxyApi = "/api/"
|
||||
|
||||
// #ifdef H5
|
||||
// const baseUrl = debug ? proxyApi : "https://invoice.sxczgkj.cn/api/"
|
||||
// const baseUrl = debug ? proxyApi : "https://invoice.sxczgkj.cn/api"
|
||||
const baseUrl = 'https://invoice.sxczgkj.cn/api/' //正式
|
||||
// const baseUrl = 'http://192.168.2.23:8888/api/'//正式
|
||||
// const baseUrl = 'http://test.invoice.sxczgkj.cn/api/'//测试
|
||||
// #endif
|
||||
import VConsole from "./vConsole.js"
|
||||
// const baseUrl = 'http://192.168.1.6:8888/api/'//本地
|
||||
// const baseUrl = 'https://test.invoice.sxczgkj.cn/api/'//测试
|
||||
// import VConsole from "./vConsole.js"
|
||||
if (debug) {
|
||||
// new VConsole()
|
||||
}
|
||||
const version = '120'
|
||||
|
||||
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN || APP
|
||||
const baseUrl = 'https://invoice.sxczgkj.cn/api/' //正式
|
||||
// const baseUrl = 'http://192.168.1.6:8888/api/'//本地
|
||||
// const baseUrl = 'https://test.invoice.sxczgkj.cn/api/'//测试
|
||||
// #endif
|
||||
|
||||
|
||||
const version = '100'
|
||||
const autoRemoveCache = {
|
||||
count: 100000,
|
||||
size: 100000
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const preCacheKeyClearFetch = 'storage:clear:fetch:'
|
||||
import Api from '@/common/js/api.js'
|
||||
|
||||
uni.pro.interceptor('request', {
|
||||
config(paramOptions) {
|
||||
let options = Object.assign({}, paramOptions)
|
||||
@@ -16,6 +17,22 @@ uni.pro.interceptor('request', {
|
||||
}
|
||||
})
|
||||
|
||||
function requestrequest(options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
...options,
|
||||
success: res => {
|
||||
// resolve(res.data) //异步操作执行成功
|
||||
if (res.data.code == 1) {
|
||||
resolve(res.data) //异步操作执行成功
|
||||
} else {
|
||||
resolve(res.data) //异步操作执行失败
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
async function request(options) {
|
||||
let networkType = ''
|
||||
uni.getNetworkType({
|
||||
@@ -32,7 +49,7 @@ async function request(options) {
|
||||
}
|
||||
try {
|
||||
if (options.toast) {
|
||||
uni.pro.showLoading({
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
@@ -41,26 +58,56 @@ async function request(options) {
|
||||
userId: uni.getStorageSync('userId'),
|
||||
minitype: uni.getStorageSync('Type'),
|
||||
fatoken: uni.getStorageSync('token'),
|
||||
token: uni.getStorageSync('logintoken'),
|
||||
isnew: 'isnew',
|
||||
'content-type': 'application/json'
|
||||
}
|
||||
let res = await uni.pro.request(options)
|
||||
// #ifdef MP-WEIXIN || APP-PLUS
|
||||
options.url = uni.conf.baseUrl + options.url
|
||||
let res = await requestrequest(options);
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
let res = await uni.pro.request(options);
|
||||
// #endif
|
||||
if (res.code != 1) {
|
||||
if (options.toast) {
|
||||
uni.showToast({
|
||||
title: res.message || res.msg,
|
||||
icon: "none",
|
||||
success() {
|
||||
setTimeout(res => {
|
||||
// if (options.toast) {
|
||||
uni.hideLoading()
|
||||
// }
|
||||
}, 2000)
|
||||
try {
|
||||
if (res.msg.length > 10 || res.message.length > 10) {
|
||||
uni.showModal({
|
||||
title: '提示', //标题
|
||||
content: res.message || res.msg,
|
||||
showCancel: false //不显示取消按钮
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message || res.msg,
|
||||
icon: "none",
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
title: res.message || res.msg,
|
||||
icon: "none",
|
||||
})
|
||||
}
|
||||
setTimeout(res => {
|
||||
uni.hideLoading()
|
||||
}, 1000)
|
||||
}
|
||||
if (res.code == 400) {
|
||||
return Promise.reject(res.message)
|
||||
} else if (res.code == 401) {
|
||||
uni.showToast({
|
||||
title: res.message || res.msg,
|
||||
icon: "none",
|
||||
success: () => {
|
||||
uni.removeStorageSync('logintoken');
|
||||
uni.removeStorageSync('token');
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (res.code == 405) {
|
||||
let token = await Api.h5encryption({
|
||||
store_id: uni.cache.get('userId')
|
||||
@@ -98,7 +145,9 @@ async function request(options) {
|
||||
throw err;
|
||||
} finally {
|
||||
if (options.toast) {
|
||||
uni.pro.hideLoading()
|
||||
setTimeout(res => {
|
||||
uni.hideLoading()
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
143
js_sdk/yushijie-ossutil/ossutil/base64.js
Normal file
@@ -0,0 +1,143 @@
|
||||
|
||||
var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
var base64DecodeChars = new Array(
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
|
||||
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
|
||||
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
|
||||
-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
||||
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
|
||||
function encode(str) {
|
||||
var out, i, len;
|
||||
var c1, c2, c3;
|
||||
len = str.length;
|
||||
i = 0;
|
||||
out = "";
|
||||
while (i < len) {
|
||||
c1 = str.charCodeAt(i++) & 0xff;
|
||||
if (i == len) {
|
||||
out += base64EncodeChars.charAt(c1 >> 2);
|
||||
out += base64EncodeChars.charAt((c1 & 0x3) << 4);
|
||||
out += "==";
|
||||
break;
|
||||
}
|
||||
c2 = str.charCodeAt(i++);
|
||||
if (i == len) {
|
||||
out += base64EncodeChars.charAt(c1 >> 2);
|
||||
out += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
|
||||
out += base64EncodeChars.charAt((c2 & 0xF) << 2);
|
||||
out += "=";
|
||||
break;
|
||||
}
|
||||
c3 = str.charCodeAt(i++);
|
||||
out += base64EncodeChars.charAt(c1 >> 2);
|
||||
out += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
|
||||
out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6));
|
||||
out += base64EncodeChars.charAt(c3 & 0x3F);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
function decode(str) {
|
||||
var c1, c2, c3, c4;
|
||||
var i, len, out;
|
||||
len = str.length;
|
||||
i = 0;
|
||||
out = "";
|
||||
while (i < len) {
|
||||
/* c1 */
|
||||
do {
|
||||
c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
|
||||
} while (i < len && c1 == -1);
|
||||
if (c1 == -1)
|
||||
break;
|
||||
/* c2 */
|
||||
do {
|
||||
c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
|
||||
} while (i < len && c2 == -1);
|
||||
if (c2 == -1)
|
||||
break;
|
||||
out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));
|
||||
/* c3 */
|
||||
do {
|
||||
c3 = str.charCodeAt(i++) & 0xff;
|
||||
if (c3 == 61)
|
||||
return out;
|
||||
c3 = base64DecodeChars[c3];
|
||||
} while (i < len && c3 == -1);
|
||||
if (c3 == -1)
|
||||
break;
|
||||
out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));
|
||||
/* c4 */
|
||||
do {
|
||||
c4 = str.charCodeAt(i++) & 0xff;
|
||||
if (c4 == 61)
|
||||
return out;
|
||||
c4 = base64DecodeChars[c4];
|
||||
} while (i < len && c4 == -1);
|
||||
if (c4 == -1)
|
||||
break;
|
||||
out += String.fromCharCode(((c3 & 0x03) << 6) | c4);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
function utf16to8(str) {
|
||||
var out, i, len, c;
|
||||
out = "";
|
||||
len = str.length;
|
||||
for (i = 0; i < len; i++) {
|
||||
c = str.charCodeAt(i);
|
||||
if ((c >= 0x0001) && (c <= 0x007F)) {
|
||||
out += str.charAt(i);
|
||||
} else if (c > 0x07FF) {
|
||||
out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
|
||||
out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
|
||||
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
|
||||
} else {
|
||||
out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
|
||||
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
function utf8to16(str) {
|
||||
var out, i, len, c;
|
||||
var char2, char3;
|
||||
out = "";
|
||||
len = str.length;
|
||||
i = 0;
|
||||
while (i < len) {
|
||||
c = str.charCodeAt(i++);
|
||||
switch (c >> 4) {
|
||||
case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
|
||||
// 0xxxxxxx
|
||||
out += str.charAt(i - 1);
|
||||
break;
|
||||
case 12: case 13:
|
||||
// 110x xxxx 10xx xxxx
|
||||
char2 = str.charCodeAt(i++);
|
||||
out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
|
||||
break;
|
||||
case 14:
|
||||
// 1110 xxxx 10xx xxxx 10xx xxxx
|
||||
char2 = str.charCodeAt(i++);
|
||||
char3 = str.charCodeAt(i++);
|
||||
out += String.fromCharCode(((c & 0x0F) << 12) |
|
||||
((char2 & 0x3F) << 6) |
|
||||
((char3 & 0x3F) << 0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
module.exports = {
|
||||
encode: encode,
|
||||
decode: decode,
|
||||
utf16to8: utf16to8,
|
||||
utf8to16: utf8to16
|
||||
}
|
||||
8
js_sdk/yushijie-ossutil/ossutil/config.js
Normal file
@@ -0,0 +1,8 @@
|
||||
var config = {
|
||||
//aliyun OSS config
|
||||
uploadImageUrl: `https://czg-invoicing.oss-cn-beijing.aliyuncs.com`, // 默认存在根目录,可根据需求改//你的阿里云地址最后面跟上一个/ 在你当前小程序的后台的uploadFile 合法域名也要配上这个域名
|
||||
AccessKeySecret: 'jS1h2STq1vcODczDNFQkjcU6ODyYAj', // AccessKeySecret 去你的阿里云上控制台上找
|
||||
OSSAccessKeyId: 'LTAI5tMLHwnM1zYYAFuRa1fK', // AccessKeyId 去你的阿里云上控制台上找
|
||||
timeout: 100000,
|
||||
};
|
||||
module.exports = config
|
||||
178
js_sdk/yushijie-ossutil/ossutil/crypto.js
Normal file
@@ -0,0 +1,178 @@
|
||||
const Crypto = {};
|
||||
|
||||
(function(){
|
||||
|
||||
var base64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
|
||||
|
||||
// Crypto utilities
|
||||
var util = Crypto.util = {
|
||||
|
||||
// Bit-wise rotate left
|
||||
rotl: function (n, b) {
|
||||
return (n << b) | (n >>> (32 - b));
|
||||
},
|
||||
|
||||
// Bit-wise rotate right
|
||||
rotr: function (n, b) {
|
||||
return (n << (32 - b)) | (n >>> b);
|
||||
},
|
||||
|
||||
// Swap big-endian to little-endian and vice versa
|
||||
endian: function (n) {
|
||||
|
||||
// If number given, swap endian
|
||||
if (n.constructor == Number) {
|
||||
return util.rotl(n, 8) & 0x00FF00FF |
|
||||
util.rotl(n, 24) & 0xFF00FF00;
|
||||
}
|
||||
|
||||
// Else, assume array and swap all items
|
||||
for (var i = 0; i < n.length; i++)
|
||||
n[i] = util.endian(n[i]);
|
||||
return n;
|
||||
|
||||
},
|
||||
|
||||
// Generate an array of any length of random bytes
|
||||
randomBytes: function (n) {
|
||||
for (var bytes = []; n > 0; n--)
|
||||
bytes.push(Math.floor(Math.random() * 256));
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a string to a byte array
|
||||
stringToBytes: function (str) {
|
||||
var bytes = [];
|
||||
for (var i = 0; i < str.length; i++)
|
||||
bytes.push(str.charCodeAt(i));
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to a string
|
||||
bytesToString: function (bytes) {
|
||||
var str = [];
|
||||
for (var i = 0; i < bytes.length; i++)
|
||||
str.push(String.fromCharCode(bytes[i]));
|
||||
return str.join("");
|
||||
},
|
||||
|
||||
// Convert a string to big-endian 32-bit words
|
||||
stringToWords: function (str) {
|
||||
var words = [];
|
||||
for (var c = 0, b = 0; c < str.length; c++, b += 8)
|
||||
words[b >>> 5] |= str.charCodeAt(c) << (24 - b % 32);
|
||||
return words;
|
||||
},
|
||||
|
||||
// Convert a byte array to big-endian 32-bits words
|
||||
bytesToWords: function (bytes) {
|
||||
var words = [];
|
||||
for (var i = 0, b = 0; i < bytes.length; i++, b += 8)
|
||||
words[b >>> 5] |= bytes[i] << (24 - b % 32);
|
||||
return words;
|
||||
},
|
||||
|
||||
// Convert big-endian 32-bit words to a byte array
|
||||
wordsToBytes: function (words) {
|
||||
var bytes = [];
|
||||
for (var b = 0; b < words.length * 32; b += 8)
|
||||
bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to a hex string
|
||||
bytesToHex: function (bytes) {
|
||||
var hex = [];
|
||||
for (var i = 0; i < bytes.length; i++) {
|
||||
hex.push((bytes[i] >>> 4).toString(16));
|
||||
hex.push((bytes[i] & 0xF).toString(16));
|
||||
}
|
||||
return hex.join("");
|
||||
},
|
||||
|
||||
// Convert a hex string to a byte array
|
||||
hexToBytes: function (hex) {
|
||||
var bytes = [];
|
||||
for (var c = 0; c < hex.length; c += 2)
|
||||
bytes.push(parseInt(hex.substr(c, 2), 16));
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to a base-64 string
|
||||
bytesToBase64: function (bytes) {
|
||||
|
||||
// Use browser-native function if it exists
|
||||
if (typeof btoa == "function") return btoa(util.bytesToString(bytes));
|
||||
|
||||
var base64 = [],
|
||||
overflow;
|
||||
|
||||
for (var i = 0; i < bytes.length; i++) {
|
||||
switch (i % 3) {
|
||||
case 0:
|
||||
base64.push(base64map.charAt(bytes[i] >>> 2));
|
||||
overflow = (bytes[i] & 0x3) << 4;
|
||||
break;
|
||||
case 1:
|
||||
base64.push(base64map.charAt(overflow | (bytes[i] >>> 4)));
|
||||
overflow = (bytes[i] & 0xF) << 2;
|
||||
break;
|
||||
case 2:
|
||||
base64.push(base64map.charAt(overflow | (bytes[i] >>> 6)));
|
||||
base64.push(base64map.charAt(bytes[i] & 0x3F));
|
||||
overflow = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Encode overflow bits, if there are any
|
||||
if (overflow != undefined && overflow != -1)
|
||||
base64.push(base64map.charAt(overflow));
|
||||
|
||||
// Add padding
|
||||
while (base64.length % 4 != 0) base64.push("=");
|
||||
|
||||
return base64.join("");
|
||||
|
||||
},
|
||||
|
||||
// Convert a base-64 string to a byte array
|
||||
base64ToBytes: function (base64) {
|
||||
|
||||
// Use browser-native function if it exists
|
||||
if (typeof atob == "function") return util.stringToBytes(atob(base64));
|
||||
|
||||
// Remove non-base-64 characters
|
||||
base64 = base64.replace(/[^A-Z0-9+\/]/ig, "");
|
||||
|
||||
var bytes = [];
|
||||
|
||||
for (var i = 0; i < base64.length; i++) {
|
||||
switch (i % 4) {
|
||||
case 1:
|
||||
bytes.push((base64map.indexOf(base64.charAt(i - 1)) << 2) |
|
||||
(base64map.indexOf(base64.charAt(i)) >>> 4));
|
||||
break;
|
||||
case 2:
|
||||
bytes.push(((base64map.indexOf(base64.charAt(i - 1)) & 0xF) << 4) |
|
||||
(base64map.indexOf(base64.charAt(i)) >>> 2));
|
||||
break;
|
||||
case 3:
|
||||
bytes.push(((base64map.indexOf(base64.charAt(i - 1)) & 0x3) << 6) |
|
||||
(base64map.indexOf(base64.charAt(i))));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return bytes;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Crypto mode namespace
|
||||
Crypto.mode = {};
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Crypto;
|
||||
34
js_sdk/yushijie-ossutil/ossutil/hmac.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const Crypto = require('./crypto.js');
|
||||
|
||||
(function(){
|
||||
|
||||
// Shortcut
|
||||
var util = Crypto.util;
|
||||
|
||||
Crypto.HMAC = function (hasher, message, key, options) {
|
||||
|
||||
// Allow arbitrary length keys
|
||||
key = key.length > hasher._blocksize * 4 ?
|
||||
hasher(key, { asBytes: true }) :
|
||||
util.stringToBytes(key);
|
||||
|
||||
// XOR keys with pad constants
|
||||
var okey = key,
|
||||
ikey = key.slice(0);
|
||||
for (var i = 0; i < hasher._blocksize * 4; i++) {
|
||||
okey[i] ^= 0x5C;
|
||||
ikey[i] ^= 0x36;
|
||||
}
|
||||
|
||||
var hmacbytes = hasher(util.bytesToString(okey) +
|
||||
hasher(util.bytesToString(ikey) + message, { asString: true }),
|
||||
{ asBytes: true });
|
||||
return options && options.asBytes ? hmacbytes :
|
||||
options && options.asString ? util.bytesToString(hmacbytes) :
|
||||
util.bytesToHex(hmacbytes);
|
||||
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Crypto;
|
||||
79
js_sdk/yushijie-ossutil/ossutil/sha1.js
Normal file
@@ -0,0 +1,79 @@
|
||||
const Crypto = require('./crypto.js');
|
||||
|
||||
(function(){
|
||||
|
||||
// Shortcut
|
||||
var util = Crypto.util;
|
||||
|
||||
// Public API
|
||||
var SHA1 = Crypto.SHA1 = function (message, options) {
|
||||
var digestbytes = util.wordsToBytes(SHA1._sha1(message));
|
||||
return options && options.asBytes ? digestbytes :
|
||||
options && options.asString ? util.bytesToString(digestbytes) :
|
||||
util.bytesToHex(digestbytes);
|
||||
};
|
||||
|
||||
// The core
|
||||
SHA1._sha1 = function (message) {
|
||||
|
||||
var m = util.stringToWords(message),
|
||||
l = message.length * 8,
|
||||
w = [],
|
||||
H0 = 1732584193,
|
||||
H1 = -271733879,
|
||||
H2 = -1732584194,
|
||||
H3 = 271733878,
|
||||
H4 = -1009589776;
|
||||
|
||||
// Padding
|
||||
m[l >> 5] |= 0x80 << (24 - l % 32);
|
||||
m[((l + 64 >>> 9) << 4) + 15] = l;
|
||||
|
||||
for (var i = 0; i < m.length; i += 16) {
|
||||
|
||||
var a = H0,
|
||||
b = H1,
|
||||
c = H2,
|
||||
d = H3,
|
||||
e = H4;
|
||||
|
||||
for (var j = 0; j < 80; j++) {
|
||||
|
||||
if (j < 16) w[j] = m[i + j];
|
||||
else {
|
||||
var n = w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16];
|
||||
w[j] = (n << 1) | (n >>> 31);
|
||||
}
|
||||
|
||||
var t = ((H0 << 5) | (H0 >>> 27)) + H4 + (w[j] >>> 0) + (
|
||||
j < 20 ? (H1 & H2 | ~H1 & H3) + 1518500249 :
|
||||
j < 40 ? (H1 ^ H2 ^ H3) + 1859775393 :
|
||||
j < 60 ? (H1 & H2 | H1 & H3 | H2 & H3) - 1894007588 :
|
||||
(H1 ^ H2 ^ H3) - 899497514);
|
||||
|
||||
H4 = H3;
|
||||
H3 = H2;
|
||||
H2 = (H1 << 30) | (H1 >>> 2);
|
||||
H1 = H0;
|
||||
H0 = t;
|
||||
|
||||
}
|
||||
|
||||
H0 += a;
|
||||
H1 += b;
|
||||
H2 += c;
|
||||
H3 += d;
|
||||
H4 += e;
|
||||
|
||||
}
|
||||
|
||||
return [H0, H1, H2, H3, H4];
|
||||
|
||||
};
|
||||
|
||||
// Package private blocksize
|
||||
SHA1._blocksize = 16;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Crypto;
|
||||
86
js_sdk/yushijie-ossutil/ossutil/uploadFile.js
Normal file
@@ -0,0 +1,86 @@
|
||||
const env = require('./config.js'); //配置文件,在这文件里配置你的OSS keyId和KeySecret,timeout:87600;
|
||||
|
||||
const base64 = require('./base64.js');//Base64,hmac,sha1,crypto相关算法
|
||||
require('./hmac.js');
|
||||
require('./sha1.js');
|
||||
const Crypto = require('./crypto.js');
|
||||
|
||||
/*
|
||||
*上传文件到阿里云oss
|
||||
*@param - filePath :图片的本地资源路径
|
||||
*@param - dir:表示要传到哪个目录下
|
||||
*@param - successc:成功回调
|
||||
*@param - failc:失败回调
|
||||
*/
|
||||
const uploadFile = function (filePath, dir, successc, failc) {
|
||||
if (!filePath || filePath.length < 9) {
|
||||
uni.showModal({
|
||||
title: '图片错误',
|
||||
content: '请重试',
|
||||
showCancel: false,
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
//图片名字 可以自行定义, 这里是采用当前的时间戳 + 150内的随机数来给图片命名的
|
||||
const aliyunFileKey = dir + new Date().getTime() + Math.floor(Math.random() * 150) + '.png';
|
||||
|
||||
const aliyunServerURL = env.uploadImageUrl;//OSS地址,需要https
|
||||
const accessid = env.OSSAccessKeyId;
|
||||
const policyBase64 = getPolicyBase64();
|
||||
const signature = getSignature(policyBase64);//获取签名
|
||||
|
||||
uni.uploadFile({
|
||||
url: aliyunServerURL,//开发者服务器 url
|
||||
filePath: filePath,//要上传文件资源的路径
|
||||
name: 'file',//必须填file
|
||||
formData: {
|
||||
'key': aliyunFileKey,
|
||||
'policy': policyBase64,
|
||||
'OSSAccessKeyId': accessid,
|
||||
'signature': signature,
|
||||
'success_action_status': '200',
|
||||
},
|
||||
success: function (res) {
|
||||
console.log(res,45);
|
||||
if (res.statusCode != 200) {
|
||||
failc(new Error('上传错误:' + JSON.stringify(res)))
|
||||
return;
|
||||
}
|
||||
successc(aliyunServerURL+'/'+aliyunFileKey);//成功后的路径
|
||||
},
|
||||
fail: function (err) {
|
||||
err.wxaddinfo = aliyunServerURL;
|
||||
failc(err);
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
const getPolicyBase64 = function () {
|
||||
let date = new Date();
|
||||
date.setHours(date.getHours() + env.timeout);
|
||||
let srcT = date.toISOString();
|
||||
const policyText = {
|
||||
"expiration": srcT, //设置该Policy的失效时间,超过这个失效时间之后,就没有办法通过这个policy上传文件了
|
||||
"conditions": [
|
||||
["content-length-range", 0, 5 * 1024 * 1024] // 设置上传文件的大小限制,5mb
|
||||
]
|
||||
};
|
||||
|
||||
const policyBase64 = base64.encode(JSON.stringify(policyText));
|
||||
console.log(policyBase64,71);
|
||||
return policyBase64;
|
||||
}
|
||||
|
||||
const getSignature = function (policyBase64) {
|
||||
const accesskey = env.AccessKeySecret;
|
||||
|
||||
const bytes = Crypto.HMAC(Crypto.SHA1, policyBase64, accesskey, {
|
||||
asBytes: true
|
||||
});
|
||||
const signature = Crypto.util.bytesToBase64(bytes);
|
||||
console.log(signature,84);
|
||||
return signature;
|
||||
}
|
||||
|
||||
module.exports = uploadFile;
|
||||
2
main.js
@@ -2,12 +2,12 @@ import App from './App'
|
||||
import './framework/bootstrap'
|
||||
import store from './store'
|
||||
import Api from "./common/js/api.js"
|
||||
import uView from '@/uni_modules/uview-ui'
|
||||
// #ifndef VUE3
|
||||
import Vue from 'vue'
|
||||
import './uni.promisify.adaptor'
|
||||
Vue.config.productionTip = false
|
||||
// main.js,注意要在use方法之后执行
|
||||
import uView from '@/uni_modules/uview-ui'
|
||||
Vue.prototype.$store = store
|
||||
Vue.prototype.api = Api;
|
||||
// 让页面的 onLoad 在 onLaunch 之后执行
|
||||
|
||||
@@ -52,9 +52,12 @@
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"appid" : "wxcf9fdee37e8a4803",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
"urlCheck" : false,
|
||||
"es6" : true,
|
||||
"minified" : true,
|
||||
"postcss" : true
|
||||
},
|
||||
"usingComponents" : true
|
||||
},
|
||||
@@ -64,7 +67,7 @@
|
||||
"disableHostCheck" : false,
|
||||
"proxy" : {
|
||||
"/api" : {
|
||||
"target" : "http://192.168.1.13:8888/api/",
|
||||
"target" : "http://192.168.1.24:8888/api/",
|
||||
"ws" : false,
|
||||
"changeOrigin" : true, //是否跨域
|
||||
"secure" : false, // 设置支持https协议的代理
|
||||
|
||||
105
pages.json
@@ -9,6 +9,40 @@
|
||||
"navigationBarTitleText": "开票",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/login/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/login/password",
|
||||
"style": {
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/login/register",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/login/switch",
|
||||
"style": {
|
||||
"navigationBarTitleText": "切换商户",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/login/repairpassword",
|
||||
"style": {
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/index/information",
|
||||
"style": {
|
||||
@@ -45,12 +79,6 @@
|
||||
"navigationBarTitleText": "绑定通知",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/index/notificationdd",
|
||||
"style": {
|
||||
"navigationBarTitleText": "绑定通知",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/index/merchant",
|
||||
"style": {
|
||||
@@ -60,7 +88,7 @@
|
||||
}, {
|
||||
"path": "pages/index/Invoicing",
|
||||
"style": {
|
||||
"navigationBarTitleText": "开发票",
|
||||
"navigationBarTitleText": "极速开票",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
@@ -118,10 +146,59 @@
|
||||
"navigationBarTitleText": "提交成功",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/hindex/involist",
|
||||
"style": {
|
||||
"navigationBarTitleText": "开票记录",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/hindex/invodetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "开票详情",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/electric/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
"navigationBarTitleText": "后台管理"
|
||||
|
||||
}
|
||||
}, {
|
||||
"path": "pages/electric/bluetools",
|
||||
"style": {
|
||||
"navigationBarTitleText": "蓝票开具"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/electric/toexamine",
|
||||
"style": {
|
||||
"navigationBarTitleText": "已开发票"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/electric/issuer",
|
||||
"style": {
|
||||
"navigationBarTitleText": "开票人"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/electric/Invoicedgoods",
|
||||
"style": {
|
||||
"navigationBarTitleText": "开票商品"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/electric/orderinquiry",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单查询"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/electric/auditrecords",
|
||||
"style": {
|
||||
"navigationBarTitleText": "审核开票"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/webview/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/webview/webview",
|
||||
@@ -129,6 +206,18 @@
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/merchant/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "开发票",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/merchant/information",
|
||||
"style": {
|
||||
"navigationBarTitleText": "完善商户信息",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
||||
814
pages/electric/Invoicedgoods.vue
Normal file
@@ -0,0 +1,814 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="contenttop">
|
||||
<view class="flex-start">
|
||||
<input type="text" placeholder="请输入抬头名称" v-model="form.like" @input="onInput" />
|
||||
<!-- <text @click="popupshow = !popupshow">筛选</text> -->
|
||||
<text@click="itemmodify()">新增</text>
|
||||
</view>
|
||||
<view class="contenttopbox flex-center">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentbox">
|
||||
<view class="contentboxitem" v-for="(item,index) in form.list" :key="index">
|
||||
<view class="contentboxitemtop flex-between">
|
||||
<text>*{{item.abbreviation}}*{{item.title}}</text>
|
||||
<!-- <text>删除</text> -->
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>商品编码</text>
|
||||
<text>{{item.spbm}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>商品规格</text>
|
||||
<text>{{item.ggxh}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>单位</text>
|
||||
<text>{{item.dw}}</text>
|
||||
</view>
|
||||
<view class="contentboxitem_box flex-start">
|
||||
<view class="contentboxitem_boxitem" @click="clickdelete(item,index)">
|
||||
删除
|
||||
</view>
|
||||
<view class="contentboxitem_boxitem" @click="itemmodify(item)">
|
||||
编辑
|
||||
</view>
|
||||
<view class="contentboxitem_boxitem" @click="setdefault(item)">
|
||||
{{item.is_default == 1?'取消默认':'设为默认'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="form.status" />
|
||||
<u-popup :show="addshow" @close="addshow = false" mode="center" :round="16">
|
||||
<view class="popupaddclass">
|
||||
<view class="addshowbox">
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">*商品编码</text>
|
||||
<view class="addshowboxinput_inp">
|
||||
<input type="text" placeholder="请选择" v-model="addform.spbm" disabled
|
||||
style="background: #f6f6f6;" />
|
||||
<view class="absolute"
|
||||
@click="addtowshow=!addtowshow,selectencoding({selected: true,pid: ''},'index')">
|
||||
选择商品名称
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">编码简称</text>
|
||||
<view class="addshowboxinput_inp">
|
||||
<input type="text" placeholder="请选择" v-model="addform.abbreviation" disabled
|
||||
style="background: #f6f6f6;" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">*商品名称</text>
|
||||
<view class="addshowboxinput_inp">
|
||||
<input type="text" placeholder="请输入" v-model="addform.title" />
|
||||
<view class="absolute" @click="titlecoding">
|
||||
赋码
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">规格型号</text>
|
||||
<view class="addshowboxinput_inp">
|
||||
<input type="text" placeholder="请输入" v-model="addform.spec" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">计量单位</text>
|
||||
<view class="addshowboxinput_inp">
|
||||
<input type="text" placeholder="请输入" v-model="addform.unit" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">单价(元)</text>
|
||||
<view class="addshowboxinput_inp flex-between">
|
||||
<input style="width: auto;" type="text" placeholder="请输入" v-model="addform.unit_price" />
|
||||
<!-- <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>
|
||||
<u-switch v-model="addform.priceswitch" size="18"></u-switch>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="addshowboxinput flex-colum-start" @click="selectshowlslbs = !selectshowlslbs">
|
||||
<text class="addshowboxinputtext">免税类型</text>
|
||||
<view class="addshowboxinput_inp flex-between">
|
||||
<view class="listinput_leftrelative">
|
||||
<text class="leftrelativetext">{{addform.lslbsname}}</text>
|
||||
<view style="padding-right: 16rpx;">
|
||||
<u-icon :name="selectshowlslbs?'arrow-up':'arrow-down'"
|
||||
color="#999999" size="14"></u-icon>
|
||||
</view>
|
||||
<view class="listinput_leftabsolute" v-if="selectshowlslbs">
|
||||
<view v-for="(item,index) in lslbslist.lslbs" :key="index"
|
||||
:class="addform.lslbs == item.id?'class':''" @click="taxexempttype(item,index)">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="addshowboxinput flex-colum-start"
|
||||
@click="taxrateselectionshow = !taxrateselectionshow">
|
||||
<text class="addshowboxinputtext">*税率</text>
|
||||
<view class="addshowboxinput_inp flex-between">
|
||||
<view class="listinput_leftrelative">
|
||||
<text class="leftrelativetext">{{addform.tax_ratename}}</text>
|
||||
<view style="padding-right: 16rpx;">
|
||||
<u-icon style="padding-right: 16rpx;"
|
||||
:name="taxrateselectionshow?'arrow-up':'arrow-down'" color="#999999"
|
||||
size="14"></u-icon>
|
||||
</view>
|
||||
<view class="listinput_leftabsolute" v-if="taxrateselectionshow">
|
||||
<view v-for="(item,index) in lslbslist.taxrateselection" :key="index"
|
||||
:class="addform.tax_rate == item.id?'class':''"
|
||||
@click="taxrateselectiontype(item,index)">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="addshowboxinput flex-colum-start" @click="zzstsglshow = !zzstsglshow">
|
||||
<text class="addshowboxinputtext">优惠政策类型</text>
|
||||
<view class="addshowboxinput_inp flex-between">
|
||||
<view class="listinput_leftrelative">
|
||||
<text class="leftrelativetext">{{addform.zzstsgl}}</text>
|
||||
<view style="padding-right: 16rpx;">
|
||||
<u-icon :name="zzstsglshow?'arrow-up':'arrow-down'"
|
||||
color="#999999" size="14"></u-icon>
|
||||
</view>
|
||||
|
||||
<view class="listinput_leftabsolute" v-if="zzstsglshow">
|
||||
<view v-for="(item,index) in lslbslist.zzstsgl" :key="index"
|
||||
:class="addform.zzstsgl == item.id?'class':''" @click="zzstsgltype(item,index)">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
style="margin:32rpx 0 32rpx auto;width: 112rpx;height: 56rpx;background: #318AFE;border-radius: 4rpx 4rpx 4rpx 4rpx;font-family: Source Han Sans CN, Source Han Sans CN;font-weight: 400;font-size: 28rpx;color: #FFFFFF;line-height: 56rpx;text-align: center;"
|
||||
@click="addinvoicegoods">
|
||||
保存
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<u-popup :show="addtowshow" @close="addtowshow = false" mode="bottom" :round="16">
|
||||
<view class="addtowshowclass">
|
||||
<view class="addtowshowclasstop">
|
||||
商品编码(税局)选择
|
||||
<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">
|
||||
<view>
|
||||
商品编码
|
||||
</view>
|
||||
<view style="color: #999999;">
|
||||
{{selectencodingitem.pid}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="addtowshowpositionitem flex-between">
|
||||
<view>
|
||||
编码名称
|
||||
|
||||
</view>
|
||||
<view style="color: #999999;">
|
||||
{{selectencodingitem.catalog_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="addtowshowpositionitem flex-between">
|
||||
<view>
|
||||
编码简称
|
||||
</view>
|
||||
<view style="color: #999999;">
|
||||
{{selectencodingitem.catalog_name_short}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="addtowshowpositionitem flex-between">
|
||||
<view>
|
||||
商品税率
|
||||
</view>
|
||||
<view style="color: #999999;">
|
||||
{{selectencodingitem.tax_rate}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="selecconfirm" @click="selecconfirm">
|
||||
确认选择
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="addtowshowpositionitem flex-between" v-for="(item,index) in selectencodinglist"
|
||||
:key="index" @click="selectencoding(item,index)">
|
||||
<view>
|
||||
{{item.catalog_name}}
|
||||
</view>
|
||||
<view class="flex-start">
|
||||
{{item.tax_rate?item.tax_rate:''}}
|
||||
<u-icon name="arrow-right" color="#999999" size="18"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
addshow: false,
|
||||
addtowshow: false,
|
||||
form: {
|
||||
like: '',
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
list: []
|
||||
},
|
||||
addform: {
|
||||
|
||||
},
|
||||
taxrateselectionshow: false, //税率
|
||||
selectshowlslbs: false, //免税类型
|
||||
zzstsglshow: false,
|
||||
lslbslist: {},
|
||||
selectencodingitem: {},
|
||||
selectencodinglists: [], //总数据
|
||||
selectencodinglist: [],
|
||||
}
|
||||
},
|
||||
async onLoad() {
|
||||
let {
|
||||
data
|
||||
} = await this.api.hfivelslbs()
|
||||
this.lslbslist = data
|
||||
},
|
||||
onShow() {
|
||||
this.init()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.form.status != 'nomore') {
|
||||
this.form.page = ++this.form.page;
|
||||
this.invoicegoodslist()
|
||||
}
|
||||
},
|
||||
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
|
||||
})
|
||||
this.form.list.splice(index, 1)
|
||||
|
||||
},
|
||||
// 设置默认
|
||||
async setdefault(item) {
|
||||
let res = await this.api.setdefault({
|
||||
is_default: item.is_default == 0 ? 1 : 0,
|
||||
id: item.id
|
||||
})
|
||||
this.init()
|
||||
},
|
||||
// 初始化
|
||||
init() {
|
||||
this.form.like = ''
|
||||
this.form.page = 1
|
||||
this.form.status = 'loadmore'
|
||||
this.form.list = []
|
||||
this.invoicegoodslist()
|
||||
},
|
||||
// 修改
|
||||
itemmodify(item) {
|
||||
console.log(item)
|
||||
if (item) {
|
||||
this.addform = item
|
||||
this.addform.lslbsname = this.lslbslist.lslbs[item.lslbs].name
|
||||
this.lslbslist.taxrateselection.forEach((i) => {
|
||||
if (i.id == item.tax_rate) {
|
||||
this.addform.tax_ratename = i.name
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.addform = {}
|
||||
}
|
||||
this.addshow = true
|
||||
},
|
||||
//行业列表 (选择编码)列表
|
||||
async selectencoding(item, index) {
|
||||
this.selectencodingitem = {}
|
||||
if (index == 'index') {
|
||||
this.selectencodinglists = []
|
||||
}
|
||||
if (item.selected) {
|
||||
let {
|
||||
data
|
||||
} = await this.api.selectencoding({
|
||||
pid: item.pid
|
||||
})
|
||||
this.selectencodinglist = data
|
||||
this.selectencodinglists.push(this.selectencodinglist) //暂存一个空数组
|
||||
console.log(this.selectencodinglists)
|
||||
|
||||
} else {
|
||||
this.selected = false
|
||||
this.selectencodingitem = item
|
||||
}
|
||||
|
||||
},
|
||||
//编码简称点击确定
|
||||
selecconfirm() {
|
||||
this.addtowshow = false
|
||||
this.addform.abbreviation = this.selectencodingitem.catalog_name_short
|
||||
this.addform.title = this.selectencodingitem.catalog_name
|
||||
this.addform.spbm = this.selectencodingitem.pid
|
||||
},
|
||||
//返回键
|
||||
selectencodingicon() {
|
||||
this.selectencodingitem = {}
|
||||
this.selectencodinglists.splice(this.selectencodinglists.length - 1, 1)
|
||||
this.selectencodinglist = this.selectencodinglists[this.selectencodinglists.length - 1]
|
||||
},
|
||||
//免税类型
|
||||
taxexempttype(item, index) {
|
||||
console.log(item)
|
||||
this.addform.lslbsname = item.name
|
||||
this.addform.lslbs = item.id
|
||||
},
|
||||
//税率
|
||||
taxrateselectiontype(item, index) {
|
||||
this.addform.tax_ratename = item.name
|
||||
this.addform.tax_rate = item.id
|
||||
},
|
||||
|
||||
//优惠政策类型
|
||||
zzstsgltype(item, index) {
|
||||
this.addform.zzstsglname = item.name
|
||||
this.addform.zzstsgl = item.id
|
||||
},
|
||||
// 搜索
|
||||
onInput(e) {
|
||||
if ([...e.detail.value].length >= 2) {
|
||||
this.form.page = 1
|
||||
this.form.status = 'loadmore'
|
||||
this.form.list = []
|
||||
uni.$u.debounce(this.invoicegoodslist, 500)
|
||||
}
|
||||
},
|
||||
//商品列表
|
||||
async invoicegoodslist() {
|
||||
let res = await this.api.invoicegoodslist({
|
||||
page: this.form.page,
|
||||
like: this.form.like
|
||||
})
|
||||
if (this.form.page == 1 && res.data.length == 0) {
|
||||
this.form.list = res.data
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
if (this.form.page == 1) {
|
||||
this.form.list = res.data
|
||||
} else {
|
||||
this.form.list = [...this.form.list, ...res.data]
|
||||
}
|
||||
if (res.data.length < 10) this.form.status = 'nomore';
|
||||
else this.form.status = 'loadmore';
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
// 保存
|
||||
async addinvoicegoods() {
|
||||
console.log(this.addform)
|
||||
if (this.addform.title == null || this.addform.title == '') {
|
||||
uni.showToast({
|
||||
title: '请选择商品名称',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.addform.spbm == null || this.addform.spbm == '') {
|
||||
uni.showToast({
|
||||
title: '请输入商品编码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.addform.tax_rate == null || this.addform.tax_rate === '') {
|
||||
uni.showToast({
|
||||
title: '请选择税率',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.addinvoicegoods({
|
||||
id: this.addform.id,
|
||||
title: this.addform.title,
|
||||
spbm: this.addform.spbm,
|
||||
spec: this.addform.spec,
|
||||
unit: this.addform.unit,
|
||||
unit_price: this.addform.unit_price,
|
||||
tax_rate: this.addform.tax_rate,
|
||||
lslbs: this.addform.lslbs,
|
||||
zzstsgl: this.addform.zzstsgl,
|
||||
priceswitch: this.addform.priceswitch,
|
||||
abbreviation: this.addform.abbreviation,
|
||||
spsl: 1 //初始化数量
|
||||
})
|
||||
this.init()
|
||||
this.addshow = false
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0;
|
||||
|
||||
.contenttop {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 48rpx 28rpx 32rpx 28rpx;
|
||||
|
||||
.flex-start {
|
||||
input {
|
||||
padding: 18rpx 24rpx;
|
||||
height: 64rpx;
|
||||
background: #F6F6F6;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
flex: auto;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
text {
|
||||
padding: 0 0 0 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contentbox {
|
||||
width: 100%;
|
||||
padding: 0 28rpx;
|
||||
|
||||
.contentboxitem {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
|
||||
.contentboxitemtop {
|
||||
text:nth-child(1) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.contentboxitemtext {
|
||||
margin-top: 24rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
margin-left: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.contentboxitem_box {
|
||||
justify-content: flex-end;
|
||||
|
||||
.contentboxitem_boxitem {
|
||||
margin-left: 12rpx;
|
||||
padding: 8rpx 16rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.contentboxitem_boxitem:nth-child(1) {
|
||||
background-color: #faad14;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.contentboxitem_boxitem:nth-child(2) {
|
||||
background-color: #5473e8;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.contentboxitem_boxitem:nth-child(3) {
|
||||
background-color: #5473e8;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.popupaddclass {
|
||||
|
||||
padding: 32rpx 34rpx;
|
||||
width: 694rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
|
||||
.addshowtop {
|
||||
border-bottom: 2rpx solid #E5E5E5;
|
||||
|
||||
text:nth-child(1) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
text {
|
||||
padding-bottom: 26rpx;
|
||||
display: inline-block;
|
||||
margin-left: 64rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.select {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #318AFE;
|
||||
border-bottom: 1rpx solid #318AFE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.addshowbox {
|
||||
max-height: 750rpx;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
|
||||
.addshowboxinput {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.addshowboxinputtext {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.addshowboxinput_inp {
|
||||
margin-top: 24rpx;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 66rpx;
|
||||
background: #fff;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
|
||||
.listinput_leftrelative {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex: auto;
|
||||
height: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
|
||||
.leftrelativetext {
|
||||
padding: 6rpx 24rpx;
|
||||
color: #6f6f6f;
|
||||
}
|
||||
|
||||
.listinput_leftabsolute {
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
top: 65rpx;
|
||||
max-height: 250rpx;
|
||||
overflow: auto;
|
||||
background: #fff;
|
||||
border: 1px solid #D9D9D9;
|
||||
|
||||
view {
|
||||
padding: 6rpx 24rpx;
|
||||
color: #6f6f6f;
|
||||
}
|
||||
|
||||
.class {
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
border-bottom: 1rpx solid #e3d8d8;
|
||||
background: #f1f1f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0 16rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.absolute {
|
||||
z-index: 99;
|
||||
padding: 8rpx 18rpx;
|
||||
position: absolute;
|
||||
background: #318AFE;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
right: 16rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.addshowinput {
|
||||
margin-top: 30rpx;
|
||||
width: 100%;
|
||||
height: 64rpx;
|
||||
background: #F6F6F6;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
padding: 0 16rpx;
|
||||
|
||||
input {
|
||||
padding-left: 16rpx;
|
||||
flex: auto;
|
||||
height: 64rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
line-height: 64rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.boxaddshowitem {
|
||||
overflow: auto;
|
||||
max-height: 500rpx;
|
||||
|
||||
.addshowitem {
|
||||
padding: 28rpx 24rpx;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 12rpx;
|
||||
margin-top: 12rpx;
|
||||
|
||||
.addshowitembox {
|
||||
margin-left: 12rpx;
|
||||
width: 80%;
|
||||
|
||||
.addshowitemboxtext {
|
||||
width: 100%;
|
||||
font-weight: 700;
|
||||
font-size: 28rpx;
|
||||
overflow: hidden; //超出的文本隐藏
|
||||
text-overflow: ellipsis; //溢出用省略号显示
|
||||
white-space: nowrap; //溢出不换行
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.tianjia {
|
||||
margin: 20rpx 0 0rpx auto;
|
||||
width: 112rpx;
|
||||
height: 56rpx;
|
||||
background: #F6F6F6;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
line-height: 56rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.addtowshowclass {
|
||||
overflow: auto;
|
||||
padding: 0 24rpx;
|
||||
|
||||
.addtowshowclasstop {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
padding: 32rpx 0;
|
||||
position: relative;
|
||||
|
||||
.addtowshowclassabsolutelet {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 32rpx;
|
||||
}
|
||||
|
||||
.addtowshowclassabsolute {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.selecconfirm {
|
||||
margin: 42rpx auto;
|
||||
width: 524rpx;
|
||||
height: 72rpx;
|
||||
background: #2F87FD;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.addtowshowpositionitem {
|
||||
padding: 24rpx 0;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
border-bottom: 1rpx solid #E5E5E5;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
580
pages/electric/auditrecords.vue
Normal file
@@ -0,0 +1,580 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="contenttop">
|
||||
<view class="flex-start">
|
||||
<input type="text" placeholder="请输入抬头名称" v-model="form.user_name" @input="onInput" />
|
||||
<text @click="popupshow = !popupshow">筛选</text>
|
||||
</view>
|
||||
<view class="contenttopbox flex-center">
|
||||
<text @click="form.type = '-1',form.page = '1',form.user_name = '',invoicingrecordsthatneed()"
|
||||
:class="form.type == '-1'?'classtext':''">待审核</text>
|
||||
<text @click="form.type = '1',form.page = '1',form.user_name = '',invoicingrecordsthatneed()"
|
||||
:class="form.type == '1'?'classtext':''">已处理</text>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentbox">
|
||||
<view class="contentboxitem" v-for="(item,index) in form.list" :key="index">
|
||||
<view class="contentboxitemtop flex-between">
|
||||
<text>{{item.user_name}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>发票状态:</text>
|
||||
<text>{{item.status}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>发票类型:</text>
|
||||
<text>{{item.type}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>发票金额:</text>
|
||||
<text>{{item.price}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>创建时间</text>
|
||||
<text>{{item.createtime}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext flex-start" @click="previewImage(item.img)">
|
||||
<text>开票凭证</text>
|
||||
<image :src="item.img" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view v-if="item.status == '待审核'" class="contentboxitembutton flex-center">
|
||||
<view class="buttonone" @click="storereviewandinvoicing(item,1)">
|
||||
通过
|
||||
</view>
|
||||
<view class="buttontow" @click="clickconfirmshow = true,no = ''">
|
||||
拒绝
|
||||
</view>
|
||||
</view>
|
||||
<u-popup :show="clickconfirmshow" mode="center" :round="10">
|
||||
<view class="popupshow">
|
||||
<view class="Box_box flex-between">
|
||||
<view>拒绝理由:</view>
|
||||
<u--textarea v-model="no" placeholder="请输入拒绝理由"></u--textarea>
|
||||
</view>
|
||||
<view class="content_bottom">
|
||||
<view class="content_bottomone" @click="storereviewandinvoicing(item,6)">
|
||||
确定
|
||||
</view>
|
||||
<view class="content_bottomtow" @click="clickconfirmshow = false,no = ''">
|
||||
取消
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="form.status" />
|
||||
<u-popup :show="popupshow" @close="popupshow = !popupshow" :round="10">
|
||||
<view class="popupshow">
|
||||
<view class="popupshowtop">
|
||||
筛选
|
||||
</view>
|
||||
<view class="popupshowbox">
|
||||
<view class="popupshowboxtitel">
|
||||
按时间筛选
|
||||
</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':''">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="popupshowbox_itemzdy flex-between" v-if="showpickerbox && selectshow == 2">
|
||||
<view class="popupshowbox_item" @click="showpicker=!showpicker,clickshowpicker = 1">
|
||||
{{starttime}}
|
||||
</view>
|
||||
-<view class="popupshowbox_item" @click="showpicker=!showpicker,clickshowpicker = 2">
|
||||
{{endtime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="boxboutton flex-between">
|
||||
<view class="boxbouttonitem" @click="reset">
|
||||
重置
|
||||
</view>
|
||||
<view class="boxbouttonitem" @click="clickdetermine">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-datetime-picker :show="showpicker" mode="date" @cancel="showpicker = !showpicker"
|
||||
@confirm="confirmpicker"></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
clickconfirmshow: false,
|
||||
popupshow: false,
|
||||
showpicker: false, //选择时间
|
||||
showpickerbox: false, //是否显示这个盒子
|
||||
clickshowpicker: '',
|
||||
starttime: '', //起始时间
|
||||
endtime: '',
|
||||
selectshow: '', //选中
|
||||
no: '',
|
||||
form: {
|
||||
user_name: '',
|
||||
time: "",
|
||||
page: 1,
|
||||
type: '-1',
|
||||
status: 'loadmore',
|
||||
list: []
|
||||
},
|
||||
daylist: [{
|
||||
id: 1,
|
||||
name: '仅30天'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '近180天'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '自定义'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
this.invoicingrecordsthatneed()
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.form.status != 'nomore') {
|
||||
this.form.page = ++this.form.page;
|
||||
this.invoicingrecordsthatneed()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 审核
|
||||
async storereviewandinvoicing(item, i) {
|
||||
let res = await this.api.storereviewandinvoicing({
|
||||
id: item.id,
|
||||
no: this.no,
|
||||
s_type: i
|
||||
})
|
||||
this.reset()
|
||||
},
|
||||
// 查看图片
|
||||
previewImage(url) {
|
||||
uni.previewImage({
|
||||
current: 1,
|
||||
urls: [url]
|
||||
});
|
||||
},
|
||||
|
||||
// 时间
|
||||
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}-${(month-1)==0?12:(month-1)}-${date}`
|
||||
this.endtime = `${year}-${month}-${date}`
|
||||
this.showpickerbox = false
|
||||
break;
|
||||
case 1:
|
||||
this.starttime = `${year}-${month>6?(month-6):(month+12-6)}-${date}`
|
||||
this.endtime = `${year}-${month}-${date}`
|
||||
this.showpickerbox = false
|
||||
break;
|
||||
case 2:
|
||||
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')
|
||||
}
|
||||
if (this.clickshowpicker == 2) {
|
||||
this.endtime = uni.$u.timeFrom(e.value, 'yyyy-mm-dd')
|
||||
}
|
||||
this.showpicker = !this.showpicker
|
||||
},
|
||||
// 确定
|
||||
clickdetermine() {
|
||||
if (this.starttime != '' && this.endtime != '') {
|
||||
this.form.time = `${this.starttime} 00:00:00,${this.endtime} 00:00:00`
|
||||
}
|
||||
this.popupshow = false
|
||||
this.invoicingrecordsthatneed()
|
||||
},
|
||||
// 重置
|
||||
reset() {
|
||||
this.form = {
|
||||
user_name: '',
|
||||
time: "",
|
||||
page: 1,
|
||||
type: '-1',
|
||||
status: 'loadmore',
|
||||
list: []
|
||||
}
|
||||
this.selectshow = ''
|
||||
this.starttime = ''
|
||||
this.endtime = ''
|
||||
this.popupshow = false
|
||||
this.invoicingrecordsthatneed()
|
||||
},
|
||||
// 搜索
|
||||
onInput(e) {
|
||||
if ([...e.detail.value].length >= 2) {
|
||||
this.form.page = 1
|
||||
this.form.list = []
|
||||
uni.$u.debounce(this.invoicingrecordsthatneed, 500)
|
||||
}
|
||||
},
|
||||
// 列表
|
||||
async invoicingrecordsthatneed() {
|
||||
this.form.status = 'loading';
|
||||
let res = await this.api.invoicingrecordsthatneed({
|
||||
user_name: this.form.user_name,
|
||||
time: this.form.time,
|
||||
page: this.form.page,
|
||||
status: this.form.type,
|
||||
})
|
||||
if (this.form.page == 1 && res.data.length == 0) {
|
||||
this.form.list = res.data
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
if (this.form.page == 1) {
|
||||
this.form.list = res.data
|
||||
} else {
|
||||
this.form.list = [...this.form.list, ...res.data]
|
||||
}
|
||||
if (res.data.length < 10) this.form.status = 'nomore';
|
||||
else this.form.status = 'loadmore';
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0;
|
||||
|
||||
.contenttop {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 48rpx 28rpx 0rpx 28rpx;
|
||||
|
||||
.flex-start {
|
||||
input {
|
||||
padding: 18rpx 24rpx;
|
||||
height: 64rpx;
|
||||
background: #F6F6F6;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
flex: auto;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
text {
|
||||
padding: 0 0 0 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.contenttopbox {
|
||||
text {
|
||||
width: 33%;
|
||||
text-align: center;
|
||||
padding: 32rpx 0 24rpx 0;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.classtext {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
width: 30%;
|
||||
border-bottom: 5rpx solid #318AFE;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
content: '';
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.popupshow {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.popupshowtop {
|
||||
margin-top: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.popupshowbox {
|
||||
.popupshowboxtitel {
|
||||
margin-top: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.popupshowbox_box {
|
||||
width: 100%;
|
||||
|
||||
.popupshowbox_item {
|
||||
margin-top: 24rpx;
|
||||
width: 176rpx;
|
||||
height: 56rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
width: 176rpx;
|
||||
}
|
||||
|
||||
.select {
|
||||
border: 1px solid #1b00ff;
|
||||
color: #0600ff;
|
||||
}
|
||||
|
||||
.popupshowbox_itemzdy {
|
||||
width: 100%;
|
||||
|
||||
.popupshowbox_item {
|
||||
margin-top: 24rpx;
|
||||
width: 40%;
|
||||
height: 56rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.boxboutton {
|
||||
margin: 400rpx 0 50rpx 0;
|
||||
|
||||
.boxbouttonitem {
|
||||
width: 330rpx;
|
||||
height: 72rpx;
|
||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||
}
|
||||
|
||||
.boxbouttonitem:nth-child(1) {
|
||||
border: 2rpx solid #D9D9D9;
|
||||
background: #FFFFFF;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
}
|
||||
|
||||
.boxbouttonitem:nth-child(2) {
|
||||
background: #2F87FD;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contentbox {
|
||||
width: 100%;
|
||||
padding: 0 28rpx;
|
||||
|
||||
.contentboxitem {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
|
||||
.contentboxitemtop {
|
||||
text:nth-child(1) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #F39D52;
|
||||
}
|
||||
}
|
||||
|
||||
.contentboxitemtext {
|
||||
margin-top: 24rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
margin-left: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
image {
|
||||
margin-left: 24rpx;
|
||||
width: 158rpx;
|
||||
height: 94rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
}
|
||||
}
|
||||
|
||||
.contentboxitembutton {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.buttonone {
|
||||
width: 244rpx;
|
||||
height: 72rpx;
|
||||
background: #2F87FD;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
}
|
||||
|
||||
.buttontow {
|
||||
margin-left: 32rpx;
|
||||
width: 244rpx;
|
||||
height: 72rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #707070;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.popupshow {
|
||||
width: 600rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
.Box_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
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;
|
||||
}
|
||||
|
||||
.content_bottom {
|
||||
margin: 70rpx auto 60rpx auto;
|
||||
width: 70%;
|
||||
height: 84rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.content_bottomone {
|
||||
padding: 16rpx 60rpx;
|
||||
background: #288EFB;
|
||||
border-radius: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content_bottomtow {
|
||||
padding: 16rpx 60rpx;
|
||||
background: red;
|
||||
border-radius: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
1885
pages/electric/bluetools.vue
Normal file
@@ -1,129 +1,178 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="topswiper">
|
||||
<u-swiper :list="swiperlist" height="336"></u-swiper>
|
||||
<u-swiper :list="swiperlist" height="166"></u-swiper>
|
||||
</view>
|
||||
<view class="contentgrid flex-between">
|
||||
<view class="flex-colum" v-for="(item,index) in 8" :key="index" @click="clicknavigateTo(item,index)">
|
||||
<image src="@/static/logo.png" mode=""></image>
|
||||
<text>蓝票开具</text>
|
||||
<view class="flex-colum" v-for="(item,index) in blueticket.img" :key="index"
|
||||
@click="clicknavigateTo(item,index)">
|
||||
<image :src="item.img" mode="aspectFill"></image>
|
||||
<text>{{item.title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentlist" v-for="(item,index) in 3" :key="index">
|
||||
<view class="contentlist">
|
||||
<view class="contentlisttitle">
|
||||
企业信息
|
||||
</view>
|
||||
<view class="contentlistitem flex-between" style="margin-top: 32rpx;">
|
||||
<text class="contentlistitemone">企业名称</text>
|
||||
<text class="contentlistitemtow">西安市高新区范家大院饭馆</text>
|
||||
<text class="contentlistitemtow">{{blueticket.store.title}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">纳税人税号</text>
|
||||
<text class="contentlistitemtow">92610131MA6W52456</text>
|
||||
<text class="contentlistitemtow">{{blueticket.store.creditCode}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">纳税人性质</text>
|
||||
<text class="contentlistitemtow">——</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">当前默认开票账号</text>
|
||||
<text class="contentlistitemtow">9261013115897462</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">授信类别</text>
|
||||
<text class="contentlistitemtow">——</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">预警级别</text>
|
||||
<text class="contentlistitemtow">——</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">数电业务到期时间</text>
|
||||
<text class="contentlistitemtow">2025-05-31</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">报税截止日期</text>
|
||||
<text class="contentlistitemtow">2025-05-31</text>
|
||||
<text class="contentlistitemone">地址</text>
|
||||
<text class="contentlistitemtow">{{monthssearchlist.title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentbotton">
|
||||
<view class="contentlist">
|
||||
<view class="contentlisttitle">
|
||||
蓝票数据概况
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">发票合计金额</text>
|
||||
<text class="contentlistitemtow">{{blueticket.xj.fphjje}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">发票合计税额</text>
|
||||
<text class="contentlistitemtow">{{blueticket.xj.fphjse}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">剩余授信额度</text>
|
||||
<text class="contentlistitemtow">{{blueticket.xj.sysxed}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">剩余纸质发票张数</text>
|
||||
<text class="contentlistitemtow">{{blueticket.xj.syzzfpzs}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">已开具蓝票张数</text>
|
||||
<text class="contentlistitemtow">{{blueticket.xj.ykjlpzs}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">已使用发票授信额度</text>
|
||||
<text class="contentlistitemtow">{{blueticket.xj.ysyfpsxed}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">已使用发票张数</text>
|
||||
<text class="contentlistitemtow">{{blueticket.xj.ysyfpzs}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">总授信额度</text>
|
||||
<text class="contentlistitemtow">{{blueticket.xj.zsxed}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentlist" style=" margin-bottom: 80prx;">
|
||||
<view class="contentlisttitle flex-between">
|
||||
<view>
|
||||
开票统计
|
||||
</view>
|
||||
<view class="flex-start" @click="showpickeshow = true">
|
||||
<text style="font-size: 30rpx;">{{date}}</text>
|
||||
<view style="margin-left: 14rpx;">
|
||||
<u-icon name="arrow-right" color="#909399" size="18"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between" style="margin-top: 32rpx;">
|
||||
<text class="contentlistitemone">类型</text>
|
||||
<text class="contentlistitemtow">{{monthssearchlist.invo_type}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">已开金额</text>
|
||||
<text class="contentlistitemtow">{{monthssearchlist.d_price}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">已开税额</text>
|
||||
<text class="contentlistitemtow">{{monthssearchlist.tax_amount}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">价税合计</text>
|
||||
<text class="contentlistitemtow">{{monthssearchlist.price}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">开票成功(张)</text>
|
||||
<text class="contentlistitemtow">{{monthssearchlist.ok_number}}</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">开票总数(张)</text>
|
||||
<text class="contentlistitemtow">{{monthssearchlist.number}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-datetime-picker :show="showpickeshow" v-model="datetimemodel" @confirm='confirmdate' mode="year-month"
|
||||
@cancel='showpickeshow =false'></u-datetime-picker>
|
||||
<!-- <view class="contentbotton">
|
||||
<view class="contentbottontitle flex-between">
|
||||
<text class="contentbottontitleone">最近开票申请</text>
|
||||
<text class="contentbottontitletow">更多申请</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from 'dayjs'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
swiperlist: [{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||
},
|
||||
{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
|
||||
title: '身无彩凤双飞翼,心有灵犀一点通'
|
||||
},
|
||||
{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
|
||||
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
|
||||
}
|
||||
swiperlist: [
|
||||
'https://shuzu-download.oss-cn-shanghai.aliyuncs.com/advertise/2024-05-08-10-52-th-663ae8fc73220.png'
|
||||
],
|
||||
datetimemodel:Number(new Date()),
|
||||
showpickeshow: false,
|
||||
enterprise: {}, //企业
|
||||
blueticket: {
|
||||
xj: '',
|
||||
store: ''
|
||||
}, //蓝票
|
||||
date: dayjs().format("YYYY-MM"),
|
||||
monthssearchlist: {}
|
||||
}
|
||||
},
|
||||
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);
|
||||
}
|
||||
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) {
|
||||
this.improveinformationform = res.data.store
|
||||
uni.cache.set('form', this.improveinformationform);
|
||||
if (res.data.sz_status == 0) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/information'
|
||||
});
|
||||
} else {
|
||||
this.improveinformation = true
|
||||
}
|
||||
}
|
||||
let data = await this.api.hfivestoreqy()
|
||||
this.blueticket = data.data
|
||||
this.monthssearch()
|
||||
},
|
||||
methods: {
|
||||
confirmdate(e) {
|
||||
this.date = dayjs(e.value).format("YYYY-MM")
|
||||
this.monthssearch()
|
||||
},
|
||||
async monthssearch() {
|
||||
let res = await this.api.monthssearch({
|
||||
m: this.date
|
||||
})
|
||||
this.monthssearchlist = res.data[0]
|
||||
this.showpickeshow = false
|
||||
},
|
||||
clicknavigateTo(item, index) {
|
||||
console.log(index)
|
||||
switch (index) {
|
||||
case '0':
|
||||
uni.pro.navigateTo('webview/webview', {
|
||||
url: c
|
||||
});
|
||||
case 0:
|
||||
// uni.pro.navigateTo('webview/webview', {
|
||||
// url: c
|
||||
// });
|
||||
uni.pro.navigateTo('electric/bluetools');
|
||||
break;
|
||||
case 1:
|
||||
uni.pro.navigateTo('bluetools/index');
|
||||
uni.pro.navigateTo('electric/toexamine');
|
||||
// uni.pro.navigateTo(b, {
|
||||
// url: c
|
||||
// });
|
||||
break;
|
||||
case 2:
|
||||
uni.pro.navigateTo('issuer/index');
|
||||
uni.pro.navigateTo('electric/Invoicedgoods');
|
||||
break;
|
||||
case 3:
|
||||
uni.pro.navigateTo('toexamine/index');
|
||||
uni.pro.navigateTo('electric/orderinquiry');
|
||||
break;
|
||||
case 4:
|
||||
uni.pro.navigateTo('electric/auditrecords');
|
||||
break;
|
||||
case 5:
|
||||
uni.pro.navigateTo('electric/issuer');
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -151,6 +200,12 @@
|
||||
background: #FFFFFF;
|
||||
border-radius: 24px 24px 24px 24px;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
width: 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.flex-colum {
|
||||
width: 25%;
|
||||
margin-top: 36rpx;
|
||||
@@ -195,6 +250,11 @@
|
||||
}
|
||||
|
||||
.contentlistitemtow {
|
||||
width: 55%;
|
||||
text-align: right;
|
||||
overflow: hidden; //超出的文本隐藏
|
||||
text-overflow: ellipsis; //溢出用省略号显示
|
||||
white-space: nowrap; //溢出不换行
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
|
||||
861
pages/electric/issuer.vue
Normal file
@@ -0,0 +1,861 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="contentitem" v-for="(item,index) in form.list" :key="index">
|
||||
<view class="contentitemtop flex-between">
|
||||
<text>{{item.name}}</text>
|
||||
<text v-if="item.dlzh_status == 0" style="color: green;">无需登录</text>
|
||||
<text v-if="item.dlzh_status == 1" style="color: red;">需要登录</text>
|
||||
<text v-if="item.dlzh_status == 9">未知</text>
|
||||
</view>
|
||||
<text v-if="item.is_default == 1"
|
||||
style="background: #1989fa;color: #fff; padding:0 6rpx; border-radius: 10rpx;font-size: 24rpx;">默认</text>
|
||||
<view class="contentitemtext">
|
||||
电局账号: {{item.dlzh}}
|
||||
</view>
|
||||
<view class="contentitemtext">
|
||||
登录身份: {{item.k_identity}}
|
||||
</view>
|
||||
<view class="contentitemtext">
|
||||
手机号码: {{item.phone}}
|
||||
</view>
|
||||
<view class="contentitembotton flex-between">
|
||||
<view class="flex-colum" @click="login(item,'登录')">
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/issuername5.png" mode="aspectFill">
|
||||
</image>
|
||||
<text>登录</text>
|
||||
</view>
|
||||
<view class="flex-colum" @click="renlian(item,'人脸')">
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/issuername1.png" mode="aspectFill">
|
||||
</image>
|
||||
<text>人脸</text>
|
||||
</view>
|
||||
<view class="flex-colum" @click="modify(item,'修改')">
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/issuername2.png" mode="aspectFill">
|
||||
</image>
|
||||
<text>修改</text>
|
||||
</view>
|
||||
<view class="flex-colum" @click="setdefault(item,'默认')">
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/issuername3.png" mode="aspectFill">
|
||||
</image>
|
||||
<text>默认</text>
|
||||
</view>
|
||||
<!-- <view class="flex-colum">
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/issuername4.png" mode="aspectFill">
|
||||
</image>
|
||||
<text>解绑</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<u-popup :show="canvasshow" mode="center" :round="14">
|
||||
<view class="messagebox">
|
||||
<view class="flex-center tabs">
|
||||
<text :class="accountqrcodetype == 1?'tabsselect':''"
|
||||
@click="accountqrcodetype=1,accountqrcode()">电子税务局</text>
|
||||
<text :class="accountqrcodetype == 2?'tabsselect':''"
|
||||
@click="accountqrcodetype=2,accountqrcode()">个人所得税</text>
|
||||
</view>
|
||||
<view style="text-align: center; margin: 16rpx;">
|
||||
{{formCode.text}}
|
||||
</view>
|
||||
<view class="Box_item_content_T flex-center" style="padding: 16rpx;">
|
||||
<view style="width:242px; height:242px;"><canvas style="width:100%; height:100%;" id="qrcode"
|
||||
ref="qrcode" canvas-id="qrcode"></canvas></view>
|
||||
</view>
|
||||
<view v-if="textshow == '人脸'"
|
||||
style="padding:10rpx 0; text-align: center; margin: 32rpx auto 0rpx auto; background: #1989fa; width: 200rpx;color: #fff; border-radius: 30rpx;"
|
||||
@click="clicktextshow(loginid,textshow)">
|
||||
已认证
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup :show="messageshow" @close="messageshow = !messageshow" mode="center" :round="14">
|
||||
<view class="messagebox">
|
||||
<view class="messageboxtop">
|
||||
短信验证
|
||||
</view>
|
||||
<view class="messageboxtoptext">
|
||||
{{codephone}}
|
||||
</view>
|
||||
<view class="messageboxtoptext flex-between">
|
||||
<input type="mobile" v-model="codelang" placeholder="请输入短信验证码" maxlength="6" />
|
||||
<view class="repeats">
|
||||
<view v-if="showText == true"
|
||||
style="padding: 8rpx 16rpx 6rpx 16rpx;background: #288EFB; border-radius: 15rpx;color: #fff;"
|
||||
@click="clickfasongyanzhengm">{{ 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="box" @click="queding">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup :show="showpopup" @close="showpopup = !showpopup" mode="center" :round="14">
|
||||
<view class="popupbox">
|
||||
<view class="popupboxtop">
|
||||
<text>开票人登记信息</text>
|
||||
<view style="position: absolute;right:22rpx;top: 40rpx; ">
|
||||
<u-icon name="close" color="#999999" @click="showpopup = false" size="20"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popupboxform">
|
||||
<view class="addshowboxinput flex-colum-start" @click="selectshowlslbs = !selectshowlslbs">
|
||||
<text class="addshowboxinputtext">*选择等录身份</text>
|
||||
<view class="addshowboxinput_inp flex-between">
|
||||
<view class="listinput_leftrelative">
|
||||
<text class="leftrelativetext">{{addform.dlsfname}}</text>
|
||||
<u-icon style="padding-right: 16rpx;" :name="selectshowlslbs?'arrow-up':'arrow-down'"
|
||||
color="#999999" size="14"></u-icon>
|
||||
<view class="listinput_leftabsolute" v-if="selectshowlslbs">
|
||||
<view v-for="(item,index) in columnsdlsf" :key="index"
|
||||
:class="addform.dlsf == item.id?'class':''" @click="taxexempttype(item,index)">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">*电子税务局账号</text>
|
||||
<view class="addshowboxinput_inp">
|
||||
<input type="text" disabled style="background: #f6f6f6;" placeholder="请输入"
|
||||
v-model="addform.dlzh" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">*电子税务局登录密码</text>
|
||||
<view class="addshowboxinput_inp">
|
||||
<input type="text" placeholder="请输入" v-model="addform.dlmm" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">*电子税务局地区</text>
|
||||
<view class="addshowboxinput_inp flex-between">
|
||||
<view class="listinput_leftrelative" disabled style="background: #f6f6f6;">
|
||||
<text class="leftrelativetext">{{addform.dqbmname}}</text>
|
||||
<u-icon style="padding-right: 16rpx;" :name="regionshow?'arrow-up':'arrow-down'"
|
||||
color="#999999" size="14"></u-icon>
|
||||
<!-- <view class="listinput_leftabsolute" v-if="regionshow">
|
||||
<view v-for="(item,index) in region" :key="index"
|
||||
:class="addform.region == item.code?'class':''"
|
||||
@click="regionclick(item,index)">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">*办税人姓名</text>
|
||||
<view class="addshowboxinput_inp">
|
||||
<input type="text" placeholder="请输入" v-model="addform.taxname" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="addshowboxinput flex-colum-start">
|
||||
<text class="addshowboxinputtext">*办税人手机号码</text>
|
||||
<view class="addshowboxinput_inp">
|
||||
<input type="number" disabled placeholder="请输入" v-model="addform.taxphone" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="addshowbox_box">
|
||||
<view class="addshowbox_boxitem" @click="showpopup = false">
|
||||
取消
|
||||
</view>
|
||||
<view class="addshowbox_boxitem" @click="szzpyaddinvoicer">
|
||||
保存
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formCode: {
|
||||
text: '超掌柜',
|
||||
url: 'https://www.baidu.com/baidu?ie=utf-8&wd=312'
|
||||
}, //成功后
|
||||
text: 'uQRCode',
|
||||
size: 242,
|
||||
codephone: '', //公共手机号
|
||||
codelang: '', //公共验证码
|
||||
textshow: '', //判断显示那个
|
||||
loginid: '', //公共id
|
||||
showpopup: false,
|
||||
messageshow: false, //短信
|
||||
canvasshow: false, //二维码
|
||||
columnsdlsf: [],
|
||||
selectshowlslbs: false, //免税类型
|
||||
regionshow: false, //省份显示
|
||||
// 注册定时器 初始值
|
||||
second: 60,
|
||||
showText: false,
|
||||
Recapture: '发送验证码',
|
||||
accountqrcodetype: 1,
|
||||
form: {
|
||||
user_name: '',
|
||||
time: "",
|
||||
page: 1,
|
||||
type: '-1',
|
||||
status: 'loadmore',
|
||||
list: []
|
||||
},
|
||||
addform: {},
|
||||
region: [], //省份
|
||||
}
|
||||
},
|
||||
async onLoad() {
|
||||
this.newissuedbyliststatus()
|
||||
let res = await this.api.szzpygetprovinceno()
|
||||
this.region = res.data
|
||||
this.onShowdatadlsf()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.form.status != 'nomore') {
|
||||
this.form.page = ++this.form.page;
|
||||
this.invoicingrecordsthatneed()
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.merchantStoreshowMerchantStoreReceipt()
|
||||
},
|
||||
methods: {
|
||||
// 设置默认
|
||||
async setdefault(item) {
|
||||
uni.showModal({
|
||||
title: '设置默认开票人',
|
||||
content: `确定设置办税员【${item.name}】为默认吗?`,
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
let resdata = await this.api.kpdefault({
|
||||
is_default: item.is_default == 0 ? 1 : 0,
|
||||
id: item.id
|
||||
})
|
||||
if (resdata.code == 1) {
|
||||
this.reset()
|
||||
}
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
// 二维码
|
||||
async merchantStoreshowMerchantStoreReceipt() {
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
// 设置二维码内容
|
||||
qr.data = this.formCode.url;
|
||||
// 设置二维码大小,必须与canvas设置的宽高一致
|
||||
qr.size = this.size;
|
||||
// 调用制作二维码方法
|
||||
qr.make();
|
||||
// 获取canvas上下文
|
||||
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
|
||||
// 设置uQRCode实例的canvas上下文
|
||||
qr.canvasContext = canvasContext;
|
||||
// 调用绘制方法将二维码图案绘制到canvas上
|
||||
qr.drawCanvas();
|
||||
},
|
||||
// 人脸
|
||||
renlian(item, textshow) {
|
||||
this.textshow = textshow
|
||||
this.loginid = item.id
|
||||
uni.showModal({
|
||||
title: '人脸验证',
|
||||
content: `确定使用办税员【${item.name}】进行人脸吗?`,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
// 这是未登录要发送验证码
|
||||
this.accountqrcode()
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
// 人脸前获取验证码
|
||||
async accountqrcode() {
|
||||
let res = await this.api.accountqrcode({
|
||||
type: this.accountqrcodetype,
|
||||
id: this.loginid
|
||||
})
|
||||
if (res.data.url) {
|
||||
this.messageshow = false
|
||||
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) {
|
||||
this.textshow = textshow
|
||||
this.loginid = item.id
|
||||
uni.showModal({
|
||||
title: '登录验证',
|
||||
content: `确定使用办税员【${item.name}】进行登录验证吗?`,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.getsendsms()
|
||||
this.yanzhengm(false)
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 登录前获取验证码
|
||||
async getsendsms() {
|
||||
let res = await this.api.getsendsms({
|
||||
id: this.loginid
|
||||
})
|
||||
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) {
|
||||
switch (this.textshow) {
|
||||
case '登录':
|
||||
uni.showToast({
|
||||
title: '登录成功',
|
||||
icon: 'none'
|
||||
});
|
||||
this.messageshow = false
|
||||
this.reset() //重置
|
||||
break;
|
||||
case '人脸':
|
||||
await this.accountqrcode()
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
//开票员类型列表
|
||||
async onShowdatadlsf() {
|
||||
let res = await this.api.szzpytypeofinvoicer()
|
||||
this.columnsdlsf = res.data
|
||||
},
|
||||
taxexempttype(item, index) {
|
||||
this.addform.dlsfname = item.name
|
||||
this.addform.dlsf = item.id
|
||||
},
|
||||
regionclick(item, index) {
|
||||
this.addform.regionname = item.name
|
||||
this.addform.region = item.code
|
||||
},
|
||||
// 修改
|
||||
modify(item, textshow) {
|
||||
this.textshow = textshow
|
||||
this.addform = item
|
||||
this.addform.taxname = item.name
|
||||
this.addform.taxphone = item.phone
|
||||
this.addform.dlsf = item.dlsf
|
||||
// 税务地区
|
||||
this.region.forEach((i) => {
|
||||
if (i.code == item.dqbm) {
|
||||
this.addform.dqbmname = i.name
|
||||
}
|
||||
})
|
||||
// 开票人类型
|
||||
this.columnsdlsf.forEach((i) => {
|
||||
if (i.id == item.dlsf) {
|
||||
this.addform.dlsfname = i.name
|
||||
}
|
||||
})
|
||||
this.showpopup = true
|
||||
},
|
||||
// 修改开票人
|
||||
async szzpyaddinvoicer() {
|
||||
if (this.addform.dlsfname == null || this.addform.dlsfname == '') {
|
||||
uni.showToast({
|
||||
title: '选择等录身份不能为空',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.addform.dlmm == null || this.addform.dlmm == '') {
|
||||
uni.showToast({
|
||||
title: '电子税务局登录密码不能为空',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.addform.taxname == null || this.addform.taxname == '') {
|
||||
uni.showToast({
|
||||
title: '办税人姓名不能为空',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.addform.taxphone == null || this.addform.taxphone == '') {
|
||||
uni.showToast({
|
||||
title: '办税人手机号码不能为空',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
// this.addform.taxphone = this.codephone
|
||||
let res = await this.api.szzpyaddinvoicer(this.addform)
|
||||
if (res.code == 1) {
|
||||
this.showpopup = false
|
||||
this.messageshow = true
|
||||
}
|
||||
},
|
||||
// 修改后的下一步
|
||||
async szzpyaddinvoicersendsms() {
|
||||
this.addform.code = this.codelang
|
||||
let res = await this.api.szzpyaddinvoicersendsms(this.addform)
|
||||
if (res.code == 1) {
|
||||
this.showpopup = false
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'none'
|
||||
});
|
||||
this.messageshow = false
|
||||
this.reset() //重置
|
||||
}
|
||||
},
|
||||
//再次获取验证码
|
||||
async clickfasongyanzhengm() {
|
||||
switch (this.textshow) {
|
||||
case '修改':
|
||||
await this.szzpyaddinvoicer()
|
||||
break;
|
||||
case '登录':
|
||||
await this.getsendsms()
|
||||
break;
|
||||
case '人脸':
|
||||
await this.accountqrcode()
|
||||
break;
|
||||
|
||||
}
|
||||
this.yanzhengm(true) //验证码
|
||||
},
|
||||
//点击确定
|
||||
queding() {
|
||||
console.log(this.textshow)
|
||||
switch (this.textshow) {
|
||||
case '修改':
|
||||
this.szzpyaddinvoicersendsms()
|
||||
break;
|
||||
case '登录':
|
||||
this.sensms()
|
||||
break;
|
||||
case '人脸':
|
||||
this.sensms()
|
||||
break;
|
||||
}
|
||||
|
||||
},
|
||||
// 验证码
|
||||
yanzhengm(e) {
|
||||
if (e) {
|
||||
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);
|
||||
},
|
||||
// 重置
|
||||
reset() {
|
||||
// this.form = {
|
||||
// user_name: '',
|
||||
// time: "",
|
||||
// page: 1,
|
||||
// type: '-1',
|
||||
// status: 'loadmore',
|
||||
// }
|
||||
this.form.user_name = ''
|
||||
this.form.time = ''
|
||||
this.form.page = 1
|
||||
this.form.type = '-1'
|
||||
this.form.status = 'loadmore'
|
||||
this.textshow = ''
|
||||
this.loginid = ''
|
||||
this.codelang = ''
|
||||
this.codephone = ''
|
||||
this.popupshow = false
|
||||
this.canvasshow = false
|
||||
this.newissuedbyliststatus()
|
||||
},
|
||||
//查询人脸认证结果 其他没有
|
||||
async clicktextshow(loginid, textshow) {
|
||||
if (textshow == '人脸') {
|
||||
let res = await this.api.researhqrcode({
|
||||
id: this.loginid
|
||||
})
|
||||
this.canvasshow = false
|
||||
uni.showToast({
|
||||
title: res.message || res.msg,
|
||||
icon: "none",
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.reset()
|
||||
},1000)
|
||||
}
|
||||
},
|
||||
// 列表
|
||||
async newissuedbyliststatus() {
|
||||
this.form.status = 'loading';
|
||||
let res = await this.api.newissuedbyliststatus({
|
||||
user_name: this.form.user_name,
|
||||
time: this.form.time,
|
||||
page: this.form.page,
|
||||
status: this.form.type,
|
||||
})
|
||||
if (this.form.page == 1 && res.data.length == 0) {
|
||||
this.form.list = res.data
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
if (this.form.page == 1) {
|
||||
this.form.list = res.data
|
||||
} else {
|
||||
this.form.list = [...this.form.list, ...res.data]
|
||||
}
|
||||
if (res.data.length < 10) this.form.status = 'nomore';
|
||||
else this.form.status = 'loadmore';
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.contentitem {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
|
||||
.contentitemtop {
|
||||
text:nth-child(1) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #F39D52;
|
||||
}
|
||||
}
|
||||
|
||||
.contentitemtext {
|
||||
margin-top: 26rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.contentitembotton {
|
||||
margin-top: 34rpx;
|
||||
border-top: 1rpx solid #E5E5E5;
|
||||
padding-top: 30rpx;
|
||||
|
||||
.flex-colum {
|
||||
padding: 0 22rpx;
|
||||
|
||||
image {
|
||||
width: 37.89rpx;
|
||||
height: 37.89rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-top: 8rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.messagebox {
|
||||
width: 694rpx;
|
||||
max-height: 870rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
padding: 28rpx 32rpx;
|
||||
|
||||
.tabs {
|
||||
text {
|
||||
margin-left: 10rpx;
|
||||
font-size: 34rpx;
|
||||
text-align: center;
|
||||
margin: 16rpx;
|
||||
}
|
||||
|
||||
text:nth-child(1) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.tabsselect {
|
||||
color: #318afe;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.messageboxtop {
|
||||
padding: 10rpx 0;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
border-bottom: 2rpx solid #E5E5E5;
|
||||
}
|
||||
|
||||
.messageboxtoptext {
|
||||
position: relative;
|
||||
margin-top: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 300;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
|
||||
input {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.repeat {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 26rpx;
|
||||
width: 25rpx;
|
||||
height: 17rpx;
|
||||
}
|
||||
|
||||
.repeats {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 26rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 300rpx;
|
||||
margin: 100rpx auto 0rpx auto;
|
||||
text-align: center;
|
||||
padding: 8rpx 16rpx 6rpx 16rpx;
|
||||
background: #288EFB;
|
||||
border-radius: 15rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.popupbox {
|
||||
width: 694rpx;
|
||||
max-height: 870rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
|
||||
.popupboxtop {
|
||||
position: relative;
|
||||
padding: 32rpx 0 26rpx 38rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
border-bottom: 2rpx solid #E5E5E5;
|
||||
}
|
||||
|
||||
.popupboxform {
|
||||
padding: 0rpx 32rpx 30rpx 32rpx;
|
||||
overflow: auto;
|
||||
height: 74%;
|
||||
|
||||
.addshowboxinput {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.addshowboxinputtext {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.addshowboxinput_inp {
|
||||
margin-top: 24rpx;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 66rpx;
|
||||
background: #fff;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
|
||||
.listinput_leftrelative {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex: auto;
|
||||
height: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
|
||||
.leftrelativetext {
|
||||
padding: 6rpx 24rpx;
|
||||
color: #6f6f6f;
|
||||
}
|
||||
|
||||
.listinput_leftabsolute {
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
top: 65rpx;
|
||||
max-height: 250rpx;
|
||||
overflow: auto;
|
||||
background: #fff;
|
||||
border: 1px solid #D9D9D9;
|
||||
|
||||
view {
|
||||
padding: 6rpx 24rpx;
|
||||
color: #6f6f6f;
|
||||
}
|
||||
|
||||
.class {
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
border-bottom: 1rpx solid #e3d8d8;
|
||||
background: #f1f1f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0 16rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.absolute {
|
||||
padding: 8rpx 18rpx;
|
||||
position: absolute;
|
||||
background: #318AFE;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
right: 16rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.addshowbox_box {
|
||||
padding-top: 32rpx;
|
||||
padding-right: 16rpx;
|
||||
width: 100%;
|
||||
border-top: 2rpx solid #E5E5E5;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: flex-start;
|
||||
|
||||
.addshowbox_boxitem {
|
||||
width: 112rpx;
|
||||
height: 56rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 56rpx;
|
||||
margin-left: 16rpx;
|
||||
|
||||
}
|
||||
|
||||
.addshowbox_boxitem:nth-child(1) {
|
||||
text-align: center;
|
||||
background: #FFFFFF;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.addshowbox_boxitem:nth-child(2) {
|
||||
text-align: center;
|
||||
background: #318AFE;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
761
pages/electric/orderinquiry.vue
Normal file
@@ -0,0 +1,761 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="contenttop">
|
||||
<view class="flex-start">
|
||||
<input type="text" placeholder="请输入抬头名称" v-model="form.user_name" @input="onInput" />
|
||||
<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()"
|
||||
:class="form.type == '全部'?'classtext':''">全部发票</text>
|
||||
<text @click="form.type = '普票',form.page = '1',form.user_name = '',invoicedorderlist()"
|
||||
:class="form.type == '普票'?'classtext':''">普通发票</text>
|
||||
<text @click="form.type = '专票',form.page = '1',form.user_name = '',invoicedorderlist()"
|
||||
:class="form.type == '专票'?'classtext':''">专用发票</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentbox">
|
||||
<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>
|
||||
<view class="contentboxitemtext">
|
||||
<text>发票状态:</text>
|
||||
<text>{{item.status}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>发票类型:</text>
|
||||
<text>{{item.type}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>发票金额:</text>
|
||||
<text>{{item.price}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>创建时间:</text>
|
||||
<text>{{item.createtime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="form.status" />
|
||||
<u-popup :show="detailsshow" @close="detailsshow = !detailsshow" mode="bottom" :round="10">
|
||||
<view class="detailsclass">
|
||||
<view class="detailsclasstop">
|
||||
<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">
|
||||
<text>购方名称</text>
|
||||
<text>{{details.user_name}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem">
|
||||
<text>购方税号</text>
|
||||
<text>{{details.user_duty}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detailsclassboxtext">
|
||||
发票信息
|
||||
</view>
|
||||
<view class="detailsclassbox">
|
||||
<view class="detailsclassboxitem">
|
||||
<text>发票类型</text>
|
||||
<text>{{details.type}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem">
|
||||
<text>发票号码</text>
|
||||
<text>{{details.fphm}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem">
|
||||
<text>开票日期</text>
|
||||
<text>{{details.ktime}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem">
|
||||
<text>开票金额</text>
|
||||
<text>{{details.price}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem">
|
||||
<text>开票税额</text>
|
||||
<text>{{details.tax_amount}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem" v-if="details.email">
|
||||
<text>邮箱</text>
|
||||
<text>{{details.email}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem" v-if="details.mobile">
|
||||
<text>手机号</text>
|
||||
<text>{{details.mobile}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem">
|
||||
<text>发票状态</text>
|
||||
<text>{{details.status}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem" v-if="details.status == '开票失败'">
|
||||
<text>失败原因</text>
|
||||
<text style="color:red;padding:0 20rpx;">{{details.status_note}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detailsclassboxtext" v-if="details.status =='开票成功'">
|
||||
发票信息
|
||||
</view>
|
||||
<view class="detailsclassbox" v-if="details.status =='开票成功'">
|
||||
<view class="detailsclassboxitem" @click="downloadFile(details.pdfUrl)">
|
||||
<text>PDF版式文件</text>
|
||||
<text style="color:#3089fd;">下载</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem" @click="downloadFile(details.ofdUrl)">
|
||||
<text>OFD版式文件</text>
|
||||
<text style="color: #3089fd;">下载</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem" @click="downloadFile(details.xmlUrl)">
|
||||
<text>XML版式文件</text>
|
||||
<text style="color:#3089fd;">下载</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup :show="popupshow" @close="popupshow = !popupshow" :round="10">
|
||||
<view class="popupshow">
|
||||
<view class="popupshowtop">
|
||||
筛选
|
||||
</view>
|
||||
<view class="popupshowbox">
|
||||
<view class="popupshowboxtitel">
|
||||
按时间筛选
|
||||
</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':''">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="popupshowbox_itemzdy flex-between" v-if="showpickerbox && selectshow == 2">
|
||||
<view class="popupshowbox_item" @click="showpicker=!showpicker,clickshowpicker = 1">
|
||||
{{starttime}}
|
||||
</view>
|
||||
-<view class="popupshowbox_item" @click="showpicker=!showpicker,clickshowpicker = 2">
|
||||
{{endtime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popupshowbox">
|
||||
<view class="popupshowboxtitel">
|
||||
按订单状态选择
|
||||
</view>
|
||||
<view class="popupshowbox_box flex-between">
|
||||
<view class="popupshowbox_item" v-for="(item,index) in datastatuslist" :key="index"
|
||||
@click="clickdatastatuslist(item,index)"
|
||||
:class="datastatuslistshow == item.id ?'select':''">
|
||||
{{item.text}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="boxboutton flex-between">
|
||||
<view class="boxbouttonitem" @click="reset">
|
||||
重置
|
||||
</view>
|
||||
<view class="boxbouttonitem" @click="clickdetermine">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup :show="qrcodeshow" @close="qrcodeshow = !qrcodeshow" :round="10" mode="center">
|
||||
<view class="qrcodeclass">
|
||||
<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="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/icons.png" mode=""></image>
|
||||
</view>
|
||||
<view class="content_boxt_towtexts" @click="setClipboardData">
|
||||
复制
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-datetime-picker :show="showpicker" mode="date" @cancel="showpicker = !showpicker"
|
||||
@confirm="confirmpicker"></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
uqrCodeurl: '',
|
||||
size: 242,
|
||||
detailsshow: false, //详情
|
||||
popupshow: false,
|
||||
qrcodeshow: false,
|
||||
showpicker: false, //选择时间
|
||||
showpickerbox: false, //是否显示这个盒子
|
||||
clickshowpicker: '',
|
||||
starttime: '', //起始时间
|
||||
endtime: '',
|
||||
selectshow: '', //选中
|
||||
datastatuslistshow: '',
|
||||
details: {},
|
||||
form: {
|
||||
user_name: '',
|
||||
time: "",
|
||||
page: 1,
|
||||
type: '全部',
|
||||
status: 'loadmore',
|
||||
list: []
|
||||
},
|
||||
daylist: [{
|
||||
id: 1,
|
||||
name: '仅30天'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '近180天'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '自定义'
|
||||
}
|
||||
],
|
||||
datastatuslist: []
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
this.invoicedorderlist()
|
||||
let res = await this.api.hfivestatuslist()
|
||||
this.datastatuslist = res.data
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.form.status != 'nomore') {
|
||||
this.form.page = ++this.form.page;
|
||||
this.invoicedorderlist()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async clickdetails(item) {
|
||||
console.log(item)
|
||||
let res = await this.api.invoiceddetail({
|
||||
id: item.id
|
||||
})
|
||||
if (res.code == 1) {
|
||||
this.details = res.data
|
||||
this.detailsshow = true
|
||||
}
|
||||
},
|
||||
// 复制
|
||||
setClipboardData() {
|
||||
uni.setClipboardData({
|
||||
data: this.uqrCodeurl,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '复制成功'
|
||||
})
|
||||
this.qrcodeshow = false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 下载
|
||||
downloadFile(url) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
try {
|
||||
this.uqrCodeurl = url
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
// 设置二维码内容
|
||||
qr.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();
|
||||
this.qrcodeshow = true
|
||||
} catch (error) {
|
||||
//TODO handle the exceptio
|
||||
}
|
||||
uni.hideLoading()
|
||||
// uni.downloadFile({
|
||||
// url: url,
|
||||
// success: res => {
|
||||
// console.log(res)
|
||||
// if (res.statusCode === 200) {
|
||||
// // 预览pdf文件
|
||||
// uni.openDocument({
|
||||
// filePath: res.tempFilePath,
|
||||
// showMenu: true, // 右上角菜单,可以进行分享保存pdf
|
||||
// success: function(file) {
|
||||
// console.log("文件打开成功", file)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
},
|
||||
clickdatastatuslist(item, index) {
|
||||
this.datastatuslistshow = item.id
|
||||
},
|
||||
// 时间
|
||||
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}-${(month-1)==0?12:(month-1)}-${date}`
|
||||
this.endtime = `${year}-${month}-${date}`
|
||||
this.showpickerbox = false
|
||||
break;
|
||||
case 1:
|
||||
this.starttime = `${year}-${month>6?(month-6):(month+12-6)}-${date}`
|
||||
this.endtime = `${year}-${month}-${date}`
|
||||
this.showpickerbox = false
|
||||
break;
|
||||
case 2:
|
||||
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'))
|
||||
let tiem = uni.$u.timeFrom(e.value, 'yyyy-mm-dd')
|
||||
if (this.clickshowpicker == 1) {
|
||||
this.$set(this, 'starttime', tiem);
|
||||
// this.starttime = tiem
|
||||
}
|
||||
if (this.clickshowpicker == 2) {
|
||||
this.$set(this, 'endtime', tiem);
|
||||
// this.endtime = tiem
|
||||
}
|
||||
this.$forceUpdate()
|
||||
this.showpicker = !this.showpicker
|
||||
},
|
||||
// 确定
|
||||
clickdetermine() {
|
||||
if (this.starttime != '' && this.endtime != '') {
|
||||
this.form.time = `${this.starttime} 00:00:00,${this.endtime} 00:00:00`
|
||||
}
|
||||
this.popupshow = false
|
||||
this.invoicedorderlist()
|
||||
},
|
||||
// 重置
|
||||
reset() {
|
||||
this.form = {
|
||||
user_name: '',
|
||||
time: "",
|
||||
page: 1,
|
||||
type: '全部',
|
||||
status: 'loadmore',
|
||||
list: []
|
||||
}
|
||||
this.datastatuslistshow = ''
|
||||
this.popupshow = false
|
||||
this.selectshow = ''
|
||||
|
||||
this.invoicedorderlist()
|
||||
},
|
||||
// 搜索
|
||||
onInput(e) {
|
||||
if ([...e.detail.value].length >= 2) {
|
||||
this.form.page = 1
|
||||
this.form.list = []
|
||||
this.datastatuslistshow = ''
|
||||
uni.$u.debounce(this.invoicedorderlist, 500)
|
||||
}
|
||||
},
|
||||
// 列表
|
||||
async invoicedorderlist() {
|
||||
this.form.status = 'loading';
|
||||
let res = await this.api.invoicedorderlist({
|
||||
user_name: this.form.user_name,
|
||||
time: this.form.time,
|
||||
page: this.form.page,
|
||||
type: this.form.type,
|
||||
status: this.datastatuslistshow
|
||||
})
|
||||
if (this.form.page == 1 && res.data.length == 0) {
|
||||
this.form.list = res.data
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
if (this.form.page == 1) {
|
||||
this.form.list = res.data
|
||||
} else {
|
||||
this.form.list = [...this.form.list, ...res.data]
|
||||
}
|
||||
this.form.status = res.data.length < 10 ? 'nomore' : 'loadmore'
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0;
|
||||
|
||||
.contenttop {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 48rpx 28rpx 0rpx 28rpx;
|
||||
|
||||
.flex-start {
|
||||
input {
|
||||
padding: 18rpx 24rpx;
|
||||
height: 64rpx;
|
||||
background: #F6F6F6;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
flex: auto;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
text {
|
||||
padding: 0 0 0 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.contenttopbox {
|
||||
text {
|
||||
width: 33%;
|
||||
text-align: center;
|
||||
padding: 32rpx 0 24rpx 0;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.classtext {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
width: 30%;
|
||||
border-bottom: 5rpx solid #318AFE;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
content: '';
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.qrcodeclass {
|
||||
padding: 0 28rpx;
|
||||
width: 100%;
|
||||
|
||||
padding: 0 28rpx;
|
||||
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: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popupshow {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.popupshowtop {
|
||||
margin-top: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.popupshowbox {
|
||||
.popupshowboxtitel {
|
||||
margin-top: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.popupshowbox_box {
|
||||
.popupshowbox_item {
|
||||
margin-top: 24rpx;
|
||||
width: 176rpx;
|
||||
height: 56rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
width: 176rpx;
|
||||
}
|
||||
|
||||
.select {
|
||||
border: 1px solid #1b00ff;
|
||||
color: #0600ff;
|
||||
}
|
||||
|
||||
.popupshowbox_itemzdy {
|
||||
width: 100%;
|
||||
|
||||
.popupshowbox_item {
|
||||
margin-top: 24rpx;
|
||||
width: 40%;
|
||||
height: 56rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.boxboutton {
|
||||
margin: 400rpx 0 50rpx 0;
|
||||
|
||||
.boxbouttonitem {
|
||||
width: 330rpx;
|
||||
height: 72rpx;
|
||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||
}
|
||||
|
||||
.boxbouttonitem:nth-child(1) {
|
||||
border: 2rpx solid #D9D9D9;
|
||||
background: #FFFFFF;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
}
|
||||
|
||||
.boxbouttonitem:nth-child(2) {
|
||||
background: #2F87FD;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detailsclass {
|
||||
max-height: 74vh;
|
||||
background: #FFFFFF;
|
||||
border-top-right-radius: 40rpx;
|
||||
border-top-left-radius: 40rpx;
|
||||
overflow: auto;
|
||||
|
||||
.detailsclasstop {
|
||||
position: relative;
|
||||
padding: 32rpx 0 48rpx 0;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
|
||||
.icon {
|
||||
position: absolute;
|
||||
right: 32rpx;
|
||||
top: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.detailsclassbox {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.detailsclassboxitem {
|
||||
margin-top: 48rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
text:nth-child(1) {
|
||||
width: 30%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
width: 70%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.detailsclassboxitem:nth-child(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.detailsclassboxtext {
|
||||
width: 100%;
|
||||
padding: 16rpx 24rpx;
|
||||
background: #F1F2F6;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.contentbox {
|
||||
width: 100%;
|
||||
padding: 0 28rpx;
|
||||
|
||||
.contentboxitem {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
|
||||
.contentboxitemtop {
|
||||
text:nth-child(1) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #F39D52;
|
||||
}
|
||||
}
|
||||
|
||||
.contentboxitemtext {
|
||||
margin-top: 24rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
margin-left: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
image {
|
||||
margin-left: 24rpx;
|
||||
width: 158rpx;
|
||||
height: 94rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
727
pages/electric/toexamine.vue
Normal file
@@ -0,0 +1,727 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="contenttop">
|
||||
<view class="flex-start">
|
||||
<input type="text" placeholder="请输入抬头名称" v-model="form.user_name" @input="onInput" />
|
||||
<text @click="popupshow = !popupshow">筛选</text>
|
||||
</view>
|
||||
<view class="contenttopbox flex-center">
|
||||
<text @click="form.type = '全部',form.page = '1',form.user_name = '',invoicedlist()"
|
||||
:class="form.type == '全部'?'classtext':''">全部发票</text>
|
||||
<text @click="form.type = '普票',form.page = '1',form.user_name = '',invoicedlist()"
|
||||
:class="form.type == '普票'?'classtext':''">普通发票</text>
|
||||
<text @click="form.type = '专票',form.page = '1',form.user_name = '',invoicedlist()"
|
||||
:class="form.type == '专票'?'classtext':''">专用发票</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentbox">
|
||||
<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>
|
||||
<view class="contentboxitemtext">
|
||||
<text>发票状态:</text>
|
||||
<text>{{item.status}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>发票类型:</text>
|
||||
<text>{{item.type}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>发票金额:</text>
|
||||
<text>{{item.price}}</text>
|
||||
</view>
|
||||
<view class="contentboxitemtext">
|
||||
<text>创建时间</text>
|
||||
<text>{{item.createtime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="form.status" />
|
||||
<u-popup :show="detailsshow" @close="detailsshow = !detailsshow" mode="bottom" :round="10">
|
||||
<view class="detailsclass">
|
||||
<view class="detailsclasstop">
|
||||
<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">
|
||||
<text>购方名称</text>
|
||||
<text>{{details.user_name}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem">
|
||||
<text>购方税号</text>
|
||||
<text>{{details.user_duty}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detailsclassboxtext">
|
||||
发票信息
|
||||
</view>
|
||||
<view class="detailsclassbox">
|
||||
<view class="detailsclassboxitem">
|
||||
<text>发票类型</text>
|
||||
<text>{{details.type}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem">
|
||||
<text>发票号码</text>
|
||||
<text>{{details.fphm}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem">
|
||||
<text>开票日期</text>
|
||||
<text>{{details.ktime}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem">
|
||||
<text>开票金额</text>
|
||||
<text>{{details.price}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem">
|
||||
<text>开票税额</text>
|
||||
<text>{{details.tax_amount}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem" v-if="details.email">
|
||||
<text>邮箱</text>
|
||||
<text>{{details.email}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem" v-if="details.mobile">
|
||||
<text>手机号</text>
|
||||
<text>{{details.mobile}}</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem">
|
||||
<text>发票状态</text>
|
||||
<text>{{details.status}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detailsclassboxtext" v-if="details.status == '开票成功'">
|
||||
发票信息
|
||||
</view>
|
||||
<view class="detailsclassbox" v-if="details.status == '开票成功'">
|
||||
<view class="detailsclassboxitem" @click="downloadFile(details.pdfUrl)">
|
||||
<text>PDF版式文件</text>
|
||||
<text style="color:#3089fd;">下载</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem" @click="downloadFile(details.ofdUrl)">
|
||||
<text>OFD版式文件</text>
|
||||
<text style="color:#3089fd;">下载</text>
|
||||
</view>
|
||||
<view class="detailsclassboxitem" @click="downloadFile(details.xmlUrl)">
|
||||
<text>XML版式文件</text>
|
||||
<text style="color:#3089fd;">下载</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup :show="popupshow" @close="popupshow = !popupshow" :round="10">
|
||||
<view class="popupshow">
|
||||
<view class="popupshowtop">
|
||||
筛选
|
||||
</view>
|
||||
<view class="popupshowbox">
|
||||
<view class="popupshowboxtitel">
|
||||
按时间筛选
|
||||
</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':''">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="popupshowbox_itemzdy flex-between" v-if="showpickerbox && selectshow == 2">
|
||||
<view class="popupshowbox_item" @click="showpicker=!showpicker,clickshowpicker = 1">
|
||||
{{starttime}}
|
||||
</view>
|
||||
-<view class="popupshowbox_item" @click="showpicker=!showpicker,clickshowpicker = 2">
|
||||
{{endtime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="boxboutton flex-between">
|
||||
<view class="boxbouttonitem" @click="reset">
|
||||
重置
|
||||
</view>
|
||||
<view class="boxbouttonitem" @click="clickdetermine">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup :show="qrcodeshow" @close="qrcodeshow = !qrcodeshow" :round="10" mode="center">
|
||||
<view class="qrcodeclass">
|
||||
<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="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/icons.png" mode=""></image>
|
||||
</view>
|
||||
<view class="content_boxt_towtexts" @click="setClipboardData">
|
||||
复制
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-datetime-picker :show="showpicker" mode="date" @cancel="showpicker = !showpicker"
|
||||
@confirm="confirmpicker"></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
uqrCodeurl: '',
|
||||
size: 242,
|
||||
qrcodeshow: false,
|
||||
detailsshow: false, //详情
|
||||
popupshow: false,
|
||||
showpicker: false, //选择时间
|
||||
showpickerbox: false, //是否显示这个盒子
|
||||
clickshowpicker: '',
|
||||
starttime: '', //起始时间
|
||||
endtime: '',
|
||||
selectshow: '', //选中
|
||||
form: {
|
||||
user_name: '',
|
||||
time: "",
|
||||
page: 1,
|
||||
type: '全部',
|
||||
status: 'loadmore',
|
||||
list: []
|
||||
},
|
||||
daylist: [{
|
||||
id: 1,
|
||||
name: '仅30天'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '近180天'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '自定义'
|
||||
}
|
||||
],
|
||||
details: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
this.invoicedlist()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.form.status != 'nomore') {
|
||||
this.form.page = ++this.form.page;
|
||||
this.invoicedlist()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async clickdetails(item) {
|
||||
console.log(item)
|
||||
let res = await this.api.invoiceddetail({
|
||||
id: item.id
|
||||
})
|
||||
if (res.code == 1) {
|
||||
this.details = res.data
|
||||
this.detailsshow = true
|
||||
}
|
||||
},
|
||||
// 时间
|
||||
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}-${(month-1)==0?12:(month-1)}-${date}`
|
||||
this.endtime = `${year}-${month}-${date}`
|
||||
this.showpickerbox = false
|
||||
break;
|
||||
case 1:
|
||||
this.starttime = `${year}-${month>6?(month-6):(month+12-6)}-${date}`
|
||||
this.endtime = `${year}-${month}-${date}`
|
||||
this.showpickerbox = false
|
||||
break;
|
||||
case 2:
|
||||
this.starttime = '' //起始时间
|
||||
this.endtime = ''
|
||||
this.showpickerbox = true
|
||||
break;
|
||||
}
|
||||
this.selectshow = index
|
||||
},
|
||||
// 确定时间
|
||||
confirmpicker(e) {
|
||||
if (this.clickshowpicker == 1) {
|
||||
this.starttime = uni.$u.timeFrom(e.value, 'yyyy-mm-dd')
|
||||
}
|
||||
if (this.clickshowpicker == 2) {
|
||||
this.endtime = uni.$u.timeFrom(e.value, 'yyyy-mm-dd')
|
||||
}
|
||||
this.showpicker = !this.showpicker
|
||||
},
|
||||
// 确定
|
||||
clickdetermine() {
|
||||
if (this.starttime != '' && this.endtime != '') {
|
||||
this.form.time = `${this.starttime} 00:00:00,${this.endtime} 00:00:00`
|
||||
}
|
||||
this.popupshow = false
|
||||
this.invoicedlist()
|
||||
},
|
||||
// 重置
|
||||
reset() {
|
||||
this.form = {
|
||||
user_name: '',
|
||||
time: "",
|
||||
page: 1,
|
||||
type: '全部',
|
||||
status: 'loadmore',
|
||||
list: []
|
||||
}
|
||||
this.popupshow = false
|
||||
this.invoicedlist()
|
||||
},
|
||||
// 搜索
|
||||
onInput(e) {
|
||||
if ([...e.detail.value].length >= 2) {
|
||||
this.form.page = 1
|
||||
this.form.list = []
|
||||
uni.$u.debounce(this.invoicedlist, 500)
|
||||
}
|
||||
},
|
||||
// 列表
|
||||
async invoicedlist() {
|
||||
this.form.status = 'loading';
|
||||
let res = await this.api.invoicedlist({
|
||||
user_name: this.form.user_name,
|
||||
time: this.form.time,
|
||||
page: this.form.page,
|
||||
type: this.form.type
|
||||
})
|
||||
console.log(res)
|
||||
if (this.form.page == 1 && res.data.length == 0) {
|
||||
this.form.list = res.data
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
if (this.form.page == 1) {
|
||||
this.form.list = res.data
|
||||
} else {
|
||||
this.form.list = [...this.form.list, ...res.data]
|
||||
}
|
||||
if (res.data.length < 10) this.form.status = 'nomore';
|
||||
else this.form.status = 'loadmore';
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
// 复制
|
||||
setClipboardData() {
|
||||
uni.setClipboardData({
|
||||
data: this.uqrCodeurl,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '复制成功'
|
||||
})
|
||||
this.qrcodeshow = false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 下载
|
||||
downloadFile(url) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
try {
|
||||
this.uqrCodeurl = url
|
||||
// 获取uQRCode实例
|
||||
var qr = new uQRCode();
|
||||
// 设置二维码内容
|
||||
qr.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();
|
||||
this.qrcodeshow = true
|
||||
} catch (error) {
|
||||
//TODO handle the exceptio
|
||||
}
|
||||
uni.hideLoading()
|
||||
// uni.downloadFile({
|
||||
// url: url,
|
||||
// success: res => {
|
||||
// console.log(res)
|
||||
// if (res.statusCode === 200) {
|
||||
// // 预览pdf文件
|
||||
// uni.openDocument({
|
||||
// filePath: res.tempFilePath,
|
||||
// showMenu: true, // 右上角菜单,可以进行分享保存pdf
|
||||
// success: function(file) {
|
||||
// console.log("文件打开成功", file)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0;
|
||||
|
||||
.contenttop {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 48rpx 28rpx 0rpx 28rpx;
|
||||
|
||||
.flex-start {
|
||||
input {
|
||||
padding: 18rpx 24rpx;
|
||||
height: 64rpx;
|
||||
background: #F6F6F6;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
flex: auto;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
text {
|
||||
padding: 0 0 0 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.contenttopbox {
|
||||
text {
|
||||
width: 33%;
|
||||
text-align: center;
|
||||
padding: 32rpx 0 24rpx 0;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.classtext {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
width: 30%;
|
||||
border-bottom: 5rpx solid #318AFE;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
content: '';
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.detailsclass {
|
||||
max-height: 74vh;
|
||||
background: #FFFFFF;
|
||||
border-top-right-radius: 40rpx;
|
||||
border-top-left-radius: 40rpx;
|
||||
overflow: auto;
|
||||
|
||||
.detailsclasstop {
|
||||
position: relative;
|
||||
padding: 32rpx 0 48rpx 0;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
|
||||
.icon {
|
||||
position: absolute;
|
||||
right: 32rpx;
|
||||
top: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.detailsclassbox {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.detailsclassboxitem {
|
||||
margin-top: 48rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
text:nth-child(1) {
|
||||
width: 30%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
width: 70%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.detailsclassboxitem:nth-child(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.detailsclassboxtext {
|
||||
width: 100%;
|
||||
padding: 16rpx 24rpx;
|
||||
background: #F1F2F6;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.qrcodeclass {
|
||||
padding: 0 28rpx;
|
||||
width: 100%;
|
||||
|
||||
padding: 0 28rpx;
|
||||
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: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popupshow {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.popupshowtop {
|
||||
margin-top: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.popupshowbox {
|
||||
.popupshowboxtitel {
|
||||
margin-top: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.popupshowbox_box {
|
||||
.popupshowbox_item {
|
||||
margin-top: 24rpx;
|
||||
width: 176rpx;
|
||||
height: 56rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
|
||||
.select {
|
||||
border: 1px solid #1b00ff;
|
||||
color: #0600ff;
|
||||
}
|
||||
|
||||
.popupshowbox_itemzdy {
|
||||
width: 100%;
|
||||
|
||||
.popupshowbox_item {
|
||||
margin-top: 24rpx;
|
||||
width: 40%;
|
||||
height: 56rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.boxboutton {
|
||||
margin: 400rpx 0 50rpx 0;
|
||||
|
||||
.boxbouttonitem {
|
||||
width: 330rpx;
|
||||
height: 72rpx;
|
||||
border-radius: 50rpx 50rpx 50rpx 50rpx;
|
||||
}
|
||||
|
||||
.boxbouttonitem:nth-child(1) {
|
||||
border: 2rpx solid #D9D9D9;
|
||||
background: #FFFFFF;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
}
|
||||
|
||||
.boxbouttonitem:nth-child(2) {
|
||||
background: #2F87FD;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contentbox {
|
||||
width: 100%;
|
||||
padding: 0 28rpx;
|
||||
|
||||
.contentboxitem {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
|
||||
.contentboxitemtop {
|
||||
text:nth-child(1) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #F39D52;
|
||||
}
|
||||
}
|
||||
|
||||
.contentboxitemtext {
|
||||
margin-top: 24rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
margin-left: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
image {
|
||||
margin-left: 24rpx;
|
||||
width: 158rpx;
|
||||
height: 94rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #D9D9D9;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -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>
|
||||
@@ -32,7 +34,7 @@
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view class="Box_boxone">*手机号</view>
|
||||
<view class="Box_boxtow"><input type="text" v-model="form.mobile" placeholder="请填写联系电话" /></view>
|
||||
<view class="Box_boxtow"><input type="number" v-model="form.mobile" placeholder="请填写联系电话" /></view>
|
||||
</view>
|
||||
<template v-if="form.user_type == 2">
|
||||
<view class="Box_box flex-between" @click="showElse = !showElse">
|
||||
@@ -50,7 +52,7 @@
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view class="Box_boxone">联系电话</view>
|
||||
<view class="Box_boxtow"><input type="text" v-model="form.c_phone" placeholder="请填写公司联系电话" />
|
||||
<view class="Box_boxtow"><input type="number" v-model="form.c_phone" placeholder="请填写公司联系电话" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
@@ -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">
|
||||
@@ -92,7 +94,8 @@
|
||||
<u-icon name="weixin-fill" color="#04be02" size="28"></u-icon>
|
||||
微信抬头一键导入
|
||||
</view>
|
||||
<view class="content_bottom" @click="saveMerchantBaseInfo">确定</view>
|
||||
<view class="content_bottom" @click="requestSubscribeMessage"
|
||||
:style="disabled?'':'background:rgb(219 214 214);color: #666666;'">确定</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -100,7 +103,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 +123,57 @@
|
||||
c_address: '',
|
||||
c_phone: '',
|
||||
c_bank_name: '',
|
||||
c_bank_account: ''
|
||||
c_bank_account: '',
|
||||
open_id: '',
|
||||
id: ''
|
||||
},
|
||||
showElse: false,
|
||||
showtitle: false
|
||||
showtitle: false,
|
||||
disabled: 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
|
||||
// 这是状态
|
||||
let RES = await this.api.checkqrcodestatus({
|
||||
id: this.form.id
|
||||
})
|
||||
if (RES.code == 1) {
|
||||
this.disabled = true
|
||||
} else {
|
||||
this.disabled = false
|
||||
}
|
||||
// 开票失败的回显
|
||||
if (e.view_type == 'fail') {
|
||||
this.form.view_type = e.view_type;
|
||||
let res = await this.api.szzpyfailccho({
|
||||
@@ -141,6 +189,7 @@
|
||||
//TODO handle the exception
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
stopPropagation() {
|
||||
@@ -178,6 +227,7 @@
|
||||
|
||||
},
|
||||
doReady() {
|
||||
// #ifndef MP-WEIXIN
|
||||
let _this = this
|
||||
wx.invoke('chooseInvoiceTitle', {
|
||||
"scene": "1"
|
||||
@@ -196,6 +246,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) {
|
||||
@@ -270,7 +344,102 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
async saveMerchantBaseInfo() {
|
||||
requestSubscribeMessage() {
|
||||
if (!this.disabled) {
|
||||
return false;
|
||||
}
|
||||
var this_ = this
|
||||
var tmplIds = 'LQ4X2dgvpxC6iuZhbxv8qtqVWT9_DFEBPxu-PmggjfY'
|
||||
uni.getSetting({
|
||||
withSubscriptions: true,
|
||||
success(res) {
|
||||
// 调起授权界面弹窗
|
||||
if (res.subscriptionsSetting.mainSwitch) { // 用户打开了订阅消息总开关
|
||||
if (res.subscriptionsSetting.itemSettings !=
|
||||
null) { // 用户同意总是保持是否推送消息的选择, 这里表示以后不会再拉起推送消息的授权
|
||||
let moIdState = res.subscriptionsSetting.itemSettings[tmplIds]; // 用户同意的消息模板id
|
||||
if (moIdState === 'accept') {
|
||||
uni.requestSubscribeMessage({ // 调起消息订阅界面
|
||||
tmplIds: [tmplIds],
|
||||
success(res) {
|
||||
if (res[tmplIds] == 'accept') {
|
||||
this_.overlayshowclick(1)
|
||||
} else if (res[tmplIds] == 'reject') {
|
||||
this_.overlayshowclick(0)
|
||||
} else if (res[tmplIds] == 'ban') {
|
||||
this_.overlayshowclick(0)
|
||||
} else if (res[tmplIds] == 'accept') {
|
||||
this_.overlayshowclick(0)
|
||||
} else {
|
||||
this_.overlayshowclick(0)
|
||||
}
|
||||
},
|
||||
fail(er) {
|
||||
this_.overlayshowclick(0)
|
||||
console.log(er);
|
||||
}
|
||||
})
|
||||
|
||||
} else if (moIdState === 'reject') {
|
||||
console.log("拒绝消息推送");
|
||||
this_.overlayshowclick(0)
|
||||
|
||||
} else if (moIdState === 'ban') {
|
||||
console.log("已被后台封禁");
|
||||
this_.overlayshowclick(0)
|
||||
}
|
||||
} else {
|
||||
// 当用户没有点击 ’总是保持以上选择,不再询问‘ 按钮。那每次执到这都会拉起授权弹窗
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请授权开通服务通知',
|
||||
showCancel: true,
|
||||
success: function(ress) {
|
||||
if (ress.confirm) {
|
||||
// console.log('用户点击确定')
|
||||
uni.requestSubscribeMessage({ // 调起消息订阅界面
|
||||
tmplIds: [tmplIds],
|
||||
success(res) {
|
||||
if (res[tmplIds] == 'accept') {
|
||||
this_.overlayshowclick(1)
|
||||
} else if (res[tmplIds] == 'reject') {
|
||||
this_.overlayshowclick(0)
|
||||
} else if (res[tmplIds] == 'ban') {
|
||||
this_.overlayshowclick(0)
|
||||
} else if (res[tmplIds] == 'accept') {
|
||||
this_.overlayshowclick(0)
|
||||
} else {
|
||||
this_.overlayshowclick(0)
|
||||
}
|
||||
},
|
||||
fail(er) {
|
||||
this_.overlayshowclick(0)
|
||||
console.log(er);
|
||||
}
|
||||
})
|
||||
|
||||
} else if (ress.cancel) {
|
||||
this_.overlayshowclick(0)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this_.overlayshowclick(0)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async overlayshowclick(e) {
|
||||
try {
|
||||
if (e == 1) {
|
||||
await this.api.userminidymessage({
|
||||
open_id: this.form.open_id,
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
if (this.form.user_name == null || this.form.user_name == '') {
|
||||
uni.showToast({
|
||||
title: '请输入名称',
|
||||
@@ -301,17 +470,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 +524,7 @@
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// #endif
|
||||
// window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money"
|
||||
}
|
||||
|
||||
@@ -396,7 +573,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)">
|
||||
个人
|
||||
@@ -36,7 +38,7 @@
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>*手机号</view>
|
||||
<view><input type="text" v-model="form.mobile" placeholder="请填写联系电话" /></view>
|
||||
<view><input type="number" v-model="form.mobile" placeholder="请填写联系电话" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>*开票价格</view>
|
||||
@@ -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">
|
||||
@@ -61,7 +64,7 @@
|
||||
拒绝理由:{{form.no|| '无'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_bottom" @click="saveMerchantBaseInfo">
|
||||
<view class="content_bottom" @click="requestSubscribeMessage">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
@@ -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 ? e.id : e.body
|
||||
}
|
||||
// 获取开票抬头
|
||||
// 这是H5
|
||||
// #ifdef H5
|
||||
this.getInvoiceList()
|
||||
this.form.body = e.id ? e.id : e.body
|
||||
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,39 +175,128 @@
|
||||
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',
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
async saveMerchantBaseInfo() {
|
||||
requestSubscribeMessage() {
|
||||
var this_ = this
|
||||
var tmplIds = 'LQ4X2dgvpxC6iuZhbxv8qtqVWT9_DFEBPxu-PmggjfY'
|
||||
uni.getSetting({
|
||||
withSubscriptions: true,
|
||||
success(res) {
|
||||
// 调起授权界面弹窗
|
||||
if (res.subscriptionsSetting.mainSwitch) { // 用户打开了订阅消息总开关
|
||||
if (res.subscriptionsSetting.itemSettings !=
|
||||
null) { // 用户同意总是保持是否推送消息的选择, 这里表示以后不会再拉起推送消息的授权
|
||||
let moIdState = res.subscriptionsSetting.itemSettings[tmplIds]; // 用户同意的消息模板id
|
||||
if (moIdState === 'accept') {
|
||||
uni.requestSubscribeMessage({ // 调起消息订阅界面
|
||||
tmplIds: [tmplIds],
|
||||
success(res) {
|
||||
if (res[tmplIds] == 'accept') {
|
||||
this_.overlayshowclick(1)
|
||||
} else if (res[tmplIds] == 'reject') {
|
||||
this_.overlayshowclick(0)
|
||||
} else if (res[tmplIds] == 'ban') {
|
||||
this_.overlayshowclick(0)
|
||||
} else if (res[tmplIds] == 'accept') {
|
||||
this_.overlayshowclick(0)
|
||||
} else {
|
||||
this_.overlayshowclick(0)
|
||||
}
|
||||
},
|
||||
fail(er) {
|
||||
this_.overlayshowclick(0)
|
||||
console.log(er);
|
||||
}
|
||||
})
|
||||
|
||||
} else if (moIdState === 'reject') {
|
||||
console.log("拒绝消息推送");
|
||||
this_.overlayshowclick(0)
|
||||
|
||||
} else if (moIdState === 'ban') {
|
||||
console.log("已被后台封禁");
|
||||
this_.overlayshowclick(0)
|
||||
}
|
||||
} else {
|
||||
// 当用户没有点击 ’总是保持以上选择,不再询问‘ 按钮。那每次执到这都会拉起授权弹窗
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请授权开通服务通知',
|
||||
showCancel: true,
|
||||
success: function(ress) {
|
||||
if (ress.confirm) {
|
||||
// console.log('用户点击确定')
|
||||
uni.requestSubscribeMessage({ // 调起消息订阅界面
|
||||
tmplIds: [tmplIds],
|
||||
success(res) {
|
||||
if (res[tmplIds] == 'accept') {
|
||||
this_.overlayshowclick(1)
|
||||
} else if (res[tmplIds] == 'reject') {
|
||||
this_.overlayshowclick(0)
|
||||
} else if (res[tmplIds] == 'ban') {
|
||||
this_.overlayshowclick(0)
|
||||
} else if (res[tmplIds] == 'accept') {
|
||||
this_.overlayshowclick(0)
|
||||
} else {
|
||||
this_.overlayshowclick(0)
|
||||
}
|
||||
},
|
||||
fail(er) {
|
||||
this_.overlayshowclick(0)
|
||||
console.log(er);
|
||||
}
|
||||
})
|
||||
|
||||
} else if (ress.cancel) {
|
||||
this_.overlayshowclick(0)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this_.overlayshowclick(0)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async overlayshowclick(e) {
|
||||
try {
|
||||
if (e == 1) {
|
||||
await this.api.userminidymessage({
|
||||
open_id: this.form.open_id,
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
if (this.form.user_name == null || this.form.user_name == '') {
|
||||
uni.showToast({
|
||||
title: '请输入名称',
|
||||
@@ -211,11 +341,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,87 @@
|
||||
<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>
|
||||
<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 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="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="classvie_item flex-start">
|
||||
<text class="classvie_itemone">发票金额:</text>
|
||||
<text class="classvie_itemtow" style="color: #ff6565">¥{{ datalsit.price }}</text>
|
||||
</view>
|
||||
<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>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- <view style="margin-top:80rpx;text-align: center;color:#3088fd ;" v-if="datalsit.status != 2"
|
||||
@click="makePhoneCall(datalsit)">
|
||||
联系客服
|
||||
</view> -->
|
||||
<!-- #endif -->
|
||||
<button open-type="contact" class="contactbutton">联系客服</button>
|
||||
<!-- <view style="margin-top:80rpx;text-align: center;color:#3088fd ;" v-if="datalsit.status != 2"
|
||||
@click="makePhoneCall(datalsit)">
|
||||
联系客服
|
||||
</view> -->
|
||||
<!-- <button open-type='contact'>联系客服</button> -->
|
||||
</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 +94,20 @@
|
||||
qr.drawCanvas();
|
||||
}
|
||||
},
|
||||
makePhoneCall(e) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/webview/index'
|
||||
// })
|
||||
uni.openCustomerServiceChat({
|
||||
corpId: 'wwc76ab19fa6df267f',
|
||||
success(res) {
|
||||
console.log('成功了', res)
|
||||
}
|
||||
})
|
||||
},
|
||||
savealbum(e) {
|
||||
uni.pro.navigateBack();
|
||||
},
|
||||
}
|
||||
// savealbum(e) {
|
||||
// // #ifdef APP
|
||||
// uni.showLoading({
|
||||
@@ -162,42 +155,34 @@
|
||||
// // #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 {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.contactbutton {
|
||||
margin: 40rpx 0;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
border-radius: 0;
|
||||
background-color: transparent;
|
||||
line-height: inherit;
|
||||
color: #3088fd;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.content_boxtop {
|
||||
padding: 22rpx 16rpx;
|
||||
background: #FFFFFF;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
.content_boxtopone {
|
||||
@@ -219,13 +204,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 +239,7 @@
|
||||
.content_boxt_tow {
|
||||
margin: 32rpx 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
padding-bottom: 50rpx;
|
||||
|
||||
@@ -272,22 +257,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
@@ -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';
|
||||
@@ -195,6 +201,7 @@
|
||||
background: #FFFFFF;
|
||||
|
||||
.contentboxitemtop {
|
||||
flex-wrap: nowrap;
|
||||
padding-bottom: 18rpx;
|
||||
border-bottom: 1rpx solid #E3E3E3;
|
||||
|
||||
|
||||
@@ -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">
|
||||
@@ -9,7 +10,7 @@
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>开票员电话</view>
|
||||
<view class="Box_box_input"><input type="text" v-model="form.taxphone" placeholder="请填写开票员电话"
|
||||
<view class="Box_box_input"><input type="number" v-model="form.taxphone" placeholder="请填写开票员电话"
|
||||
data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between" @click="showpicker = true">
|
||||
@@ -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,34 @@
|
||||
<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 style="margin-top: 80rpx; text-align: center; color: #3088fd; position: fixed; bottom: 40rpx; left: 50%; transform: translate(-50%, -50%)" @click="qushangjia()">
|
||||
我是商家
|
||||
</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"
|
||||
@@ -42,6 +40,25 @@
|
||||
<button class="btn">打开小程序</button>
|
||||
</script>
|
||||
</wx-open-launch-weapp> -->
|
||||
<view
|
||||
class="flex-colum"
|
||||
style="
|
||||
width: 100%;
|
||||
margin-top: 80rpx;
|
||||
text-align: center;
|
||||
position: fixed;
|
||||
font-size: 24rpx;
|
||||
bottom: 40rpx;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
padding: 0 40rpx;
|
||||
"
|
||||
>
|
||||
<text>{{ improveinformationform.store.title }}</text>
|
||||
<text v-if="improveinformationform.is_tax == 1" style="margin-top: 20rpx; text-align: center; color: #3088fd; margin-left: 10rpx" @click="clickswitch()">
|
||||
切换商户
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="setClipboardDataclass" @click="setClipboardData" v-if="infos.deviceType != 'pc'">
|
||||
网页版地址:https://h5-invoice.sxczgkj.cn
|
||||
@@ -50,220 +67,401 @@
|
||||
src="https://dppt.shaanxi.chinatax.gov.cn:8443/kpfw/fpjfzz/v1/exportDzfpwjEwm?Wjgs=PDF&Jym=124C&Fphm=24612000000037614300&Kprq=20240430152603&Czsj=1714461964182">
|
||||
</pdf> -->
|
||||
<!-- <iframe width="100%" height="100%" src="https://dppt.shaanxi.chinatax.gov.cn:8443/kpfw/fpjfzz/v1/exportDzfpwjEwm?Wjgs=PDF&Jym=124C&Fphm=24612000000037614300&Kprq=20240430152603&Czsj=1714461964182" frameborder="0"></iframe> -->
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import wx from 'weixin-js-sdk';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
improveinformation: false,
|
||||
improveinformationlist: {},
|
||||
onLoaduserId: '',
|
||||
infos: uni.getSystemInfoSync()
|
||||
};
|
||||
},
|
||||
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);
|
||||
}
|
||||
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) {
|
||||
this.improveinformationform = res.data.store
|
||||
uni.cache.set('form', this.improveinformationform);
|
||||
if (res.data.sz_status == 0) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/information'
|
||||
});
|
||||
} else {
|
||||
this.improveinformation = true
|
||||
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(),
|
||||
store_status: uni.cache.get('store_status'),
|
||||
list: [],
|
||||
is_k_list: '', // 开票员列表 1 显示 2不显示
|
||||
improveinformationform: {
|
||||
is_tax: '',
|
||||
store: {
|
||||
title: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
// 监听跳转
|
||||
handleLaunch() {
|
||||
console.log('跳转');
|
||||
},
|
||||
// 监听错误
|
||||
handleError() {
|
||||
console.log('失败');
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
async jumpToMiniProgram() {
|
||||
let res = await this.api.userttwechat({
|
||||
url: location.href.split('#')[0]
|
||||
})
|
||||
console.log(res)
|
||||
// plus.share.getServices(function (res) {
|
||||
// var sweixin = null;
|
||||
// for (var i = 0; i < res.length; i++) {
|
||||
// var t = res[i];
|
||||
// if (t.id == 'weixin') {
|
||||
// sweixin = t;
|
||||
// }
|
||||
// }
|
||||
// if (sweixin) {
|
||||
// sweixin.launchMiniProgram({
|
||||
// id:'gh_fa9286427a5b', //这里写你的小程序原始id(以gh开头)
|
||||
// type: 0, // //小程序版本 0-正式版; 1-测试版; 2-体验版
|
||||
// path: 'pages/index/index' //这里是指定页的路径,如需传参直接字符串拼接(首页可以省略)
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// wx.config({
|
||||
// "debug": true,
|
||||
// "beta": false,
|
||||
// "jsApiList": ['wx-open-launch-weapp'],
|
||||
// openTagList: ['wx-open-launch-weapp'], // 跳转小程序时必填
|
||||
// "appId": res.data.wechat_mini.appId,
|
||||
// "nonceStr": res.data.wechat_mini.nonceStr,
|
||||
// "timestamp": res.data.wechat_mini.timestamp,
|
||||
// "url": res.data.wechat_mini.url,
|
||||
// "signature": res.data.wechat_mini.signature,
|
||||
// });
|
||||
wx.config(res.data.wechat_mini);
|
||||
// res.data.wechat_mini
|
||||
// 在wx.ready内调用
|
||||
wx.ready(res => {
|
||||
console.log(res);
|
||||
this.$nextTick(() => {
|
||||
let btn = document.getElementById('launch-btn');
|
||||
btn.addEventListener('launch', e => {
|
||||
console.log('success');
|
||||
});
|
||||
btn.addEventListener('error', e => {
|
||||
alert('小程序打开失败');
|
||||
console.log('fail', e.detail);
|
||||
});
|
||||
});
|
||||
});
|
||||
wx.error(function(res) {
|
||||
console.log('err', res)
|
||||
});
|
||||
// // #ifdef H5
|
||||
// // 在H5环境中,调用此函数来跳转到小程序
|
||||
// wx.navigateToMiniProgram({
|
||||
// appId: 'wxd88fffa983758a30', // 小程序的appid
|
||||
// path: 'pages/index/index', // 打开的页面路径,若为空则打开首页
|
||||
// extraData: {}, // 需要传递给小程序的数据
|
||||
// success(res) {
|
||||
// // 打开成功的回调
|
||||
// console.log('跳转成功');
|
||||
// },
|
||||
// fail(err) {
|
||||
// // 打开失败的回调
|
||||
// console.error('跳转失败', err);
|
||||
// }
|
||||
// });
|
||||
// // jumpToMiniProgram('小程序的appid', '小程序页面路径');
|
||||
// // #endif
|
||||
},
|
||||
setClipboardData() {
|
||||
uni.setClipboardData({
|
||||
data: 'https://h5-invoice.sxczgkj.cn/?userId=' + uni.cache.get('userId'),
|
||||
success: function() {}
|
||||
});
|
||||
},
|
||||
auditbilling() {
|
||||
uni.pro.navigateTo('index/auditbilling');
|
||||
},
|
||||
billingcode() {
|
||||
uni.pro.navigateTo('index/billingcode');
|
||||
},
|
||||
drawer() {
|
||||
uni.pro.navigateTo('index/drawerlist');
|
||||
},
|
||||
merchant() {
|
||||
uni.pro.navigateTo('index/merchant');
|
||||
},
|
||||
information() {
|
||||
uni.pro.navigateTo('index/information', this.improveinformationform);
|
||||
},
|
||||
notification() {
|
||||
uni.pro.navigateTo('index/notification');
|
||||
},
|
||||
indexInvoicing() {
|
||||
uni.pro.navigateTo('index/Invoicing');
|
||||
},
|
||||
async webview() {
|
||||
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');
|
||||
};
|
||||
},
|
||||
async onLoad(e) {
|
||||
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.restype) {
|
||||
this.restype = e.restype;
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
};
|
||||
// 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
|
||||
// }
|
||||
if (this.restype == 1) {
|
||||
if (uni.cache.get('userId')) {
|
||||
// 总?
|
||||
let token = await this.api.h5encryption({
|
||||
store_id: uni.cache.get('userId')
|
||||
});
|
||||
if (token.code == 1) {
|
||||
uni.cache.set('token', token.data.token);
|
||||
}
|
||||
let res = await this.api.storestorestatus({
|
||||
store_id: uni.cache.get('userId')
|
||||
});
|
||||
// try {
|
||||
// this.is_k_list = res.data.is_k_list
|
||||
// } catch (e) {
|
||||
// //TODO handle the exception
|
||||
// }
|
||||
if (res.code == 1 && uni.cache.get('store_status') == 1) {
|
||||
this.improveinformationform = res.data;
|
||||
uni.cache.set('form', this.improveinformationform);
|
||||
if (res.data.sz_status == 0) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/information'
|
||||
});
|
||||
} 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');
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.restype == 2;
|
||||
}
|
||||
},
|
||||
// 监听跳转
|
||||
handleLaunch() {
|
||||
console.log('跳转');
|
||||
},
|
||||
// 监听错误
|
||||
handleError() {
|
||||
console.log('失败');
|
||||
},
|
||||
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({
|
||||
url: location.href.split('#')[0]
|
||||
});
|
||||
console.log(res);
|
||||
// plus.share.getServices(function (res) {
|
||||
// var sweixin = null;
|
||||
// for (var i = 0; i < res.length; i++) {
|
||||
// var t = res[i];
|
||||
// if (t.id == 'weixin') {
|
||||
// sweixin = t;
|
||||
// }
|
||||
// }
|
||||
// if (sweixin) {
|
||||
// sweixin.launchMiniProgram({
|
||||
// id:'gh_fa9286427a5b', //这里写你的小程序原始id(以gh开头)
|
||||
// type: 0, // //小程序版本 0-正式版; 1-测试版; 2-体验版
|
||||
// path: 'pages/index/index' //这里是指定页的路径,如需传参直接字符串拼接(首页可以省略)
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// wx.config({
|
||||
// "debug": true,
|
||||
// "beta": false,
|
||||
// "jsApiList": ['wx-open-launch-weapp'],
|
||||
// openTagList: ['wx-open-launch-weapp'], // 跳转小程序时必填
|
||||
// "appId": res.data.wechat_mini.appId,
|
||||
// "nonceStr": res.data.wechat_mini.nonceStr,
|
||||
// "timestamp": res.data.wechat_mini.timestamp,
|
||||
// "url": res.data.wechat_mini.url,
|
||||
// "signature": res.data.wechat_mini.signature,
|
||||
// });
|
||||
wx.config(res.data.wechat_mini);
|
||||
// res.data.wechat_mini
|
||||
// 在wx.ready内调用
|
||||
wx.ready((res) => {
|
||||
console.log(res);
|
||||
this.$nextTick(() => {
|
||||
let btn = document.getElementById('launch-btn');
|
||||
btn.addEventListener('launch', (e) => {
|
||||
console.log('success');
|
||||
});
|
||||
btn.addEventListener('error', (e) => {
|
||||
alert('小程序打开失败');
|
||||
console.log('fail', e.detail);
|
||||
});
|
||||
});
|
||||
});
|
||||
wx.error(function (res) {
|
||||
console.log('err', res);
|
||||
});
|
||||
// // #ifdef H5
|
||||
// // 在H5环境中,调用此函数来跳转到小程序
|
||||
// wx.navigateToMiniProgram({
|
||||
// appId: 'wxd88fffa983758a30', // 小程序的appid
|
||||
// path: 'pages/index/index', // 打开的页面路径,若为空则打开首页
|
||||
// extraData: {}, // 需要传递给小程序的数据
|
||||
// success(res) {
|
||||
// // 打开成功的回调
|
||||
// console.log('跳转成功');
|
||||
// },
|
||||
// fail(err) {
|
||||
// // 打开失败的回调
|
||||
// console.error('跳转失败', err);
|
||||
// }
|
||||
// });
|
||||
// // jumpToMiniProgram('小程序的appid', '小程序页面路径');
|
||||
// // #endif
|
||||
},
|
||||
async quit() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定退出开票系统吗?',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
await this.api.userlogout();
|
||||
uni.clearStorageSync();
|
||||
// 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 () {}
|
||||
});
|
||||
},
|
||||
clickswitch() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/switch'
|
||||
});
|
||||
},
|
||||
// 跳转
|
||||
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.clearStorageSync();
|
||||
// uni.removeStorageSync('logintoken');
|
||||
// uni.removeStorageSync('token');
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
qushangjia() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定去商家开票系统吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.removeStorageSync('logintoken');
|
||||
uni.removeStorageSync('token');
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
auditbilling() {
|
||||
uni.pro.navigateTo('index/auditbilling');
|
||||
},
|
||||
billingcode() {
|
||||
uni.pro.navigateTo('index/billingcode');
|
||||
},
|
||||
drawer() {
|
||||
uni.pro.navigateTo('index/drawerlist');
|
||||
},
|
||||
merchant() {
|
||||
uni.pro.navigateTo('index/merchant');
|
||||
},
|
||||
information() {
|
||||
uni.pro.navigateTo('index/information', this.improveinformationform.store);
|
||||
},
|
||||
notification() {
|
||||
uni.pro.navigateTo('index/notification');
|
||||
},
|
||||
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
|
||||
});
|
||||
}
|
||||
},
|
||||
indexorder() {
|
||||
uni.pro.navigateTo('index/order');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.content {
|
||||
.setClipboardDataclass {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 90rpx;
|
||||
color: #2f87fd;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
.setClipboardDataclass {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 90rpx;
|
||||
color: #2f87fd;
|
||||
.topswiper {
|
||||
width: 100%;
|
||||
padding: 32rpx 32rpx 0 32rpx;
|
||||
|
||||
.onetopswiper {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
.Box {
|
||||
.towtopswiper {
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
padding: 24rpx 32rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #d8eafe;
|
||||
|
||||
padding: 0rpx 28rpx;
|
||||
.towtopswipertow {
|
||||
padding: 24rpx;
|
||||
color: #fff;
|
||||
background: #2a3aa1;
|
||||
font-size: 40rpx;
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
text-align: center;
|
||||
line-height: 45rpx;
|
||||
border-radius: 45rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-top: 32rpx;
|
||||
width: 30%;
|
||||
height: 218rpx;
|
||||
background: #FFFFFF;
|
||||
.Box {
|
||||
padding: 0rpx 28rpx;
|
||||
|
||||
image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
.content {
|
||||
margin-top: 32rpx;
|
||||
width: 30%;
|
||||
height: 218rpx;
|
||||
background: #ffffff;
|
||||
|
||||
text {
|
||||
margin-top: 16rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.Box::after {
|
||||
content: '';
|
||||
width: 30%;
|
||||
display: inline-block;
|
||||
text {
|
||||
margin-top: 16rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.Box::after {
|
||||
content: '';
|
||||
width: 30%;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -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">
|
||||
@@ -28,24 +29,44 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty-wrap">
|
||||
<view class="empty" v-if="!list.length"><u-empty text="暂无数据"
|
||||
:icon="require('@/static/icon_empty.png')"></u-empty></view>
|
||||
<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: []
|
||||
list: [],
|
||||
form: {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.storeinvoicelist()
|
||||
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 == 2 || e.status == 4 || e.status == 3) {
|
||||
uni.pro.navigateTo('index/orderinfo', {
|
||||
@@ -61,10 +82,31 @@
|
||||
}
|
||||
},
|
||||
async storeinvoicelist() {
|
||||
this.form.status = 'loading';
|
||||
let res = await this.api.storeinvoicelist({
|
||||
store_id: uni.getStorageSync('userId')
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
page: this.form.page
|
||||
|
||||
})
|
||||
this.list = res.data
|
||||
if (this.form.page == 1 && res.data.list.length == 0) {
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
|
||||
setTimeout(() => {
|
||||
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 {
|
||||
this.form.status = 'loadmore';
|
||||
}
|
||||
}, 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 }}
|
||||
@@ -11,14 +12,15 @@
|
||||
<view class="content_boxtoptow" v-if="datalsit.status == 4">已作废</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.string2">
|
||||
{{ 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>
|
||||
@@ -34,223 +36,239 @@
|
||||
<text class="classvie_itemone">项目名称:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.article }}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start">
|
||||
<text class="classvie_itemone">开票时间:</text>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.email">
|
||||
<text class="classvie_itemone">邮箱:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.email }}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.mobile">
|
||||
<text class="classvie_itemone">手机号:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.mobile }}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.createtime">
|
||||
<text class="classvie_itemone">创建时间:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.createtime }}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.kprq">
|
||||
<text class="classvie_itemone">开票时间:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.kprq }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</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">
|
||||
{{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}}
|
||||
@@ -21,7 +22,7 @@
|
||||
</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.string2">
|
||||
{{datalsit.string2}}
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">
|
||||
@@ -45,18 +46,31 @@
|
||||
<text class="classvie_itemone">项目名称:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.article}}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start">
|
||||
<view class="classvie_item flex-start" v-if="datalsit.email">
|
||||
<text class="classvie_itemone">邮箱:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.email }}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.mobile">
|
||||
<text class="classvie_itemone">手机号:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.mobile }}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.createtime">
|
||||
<text class="classvie_itemone">创建时间:</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.createtime }}</text>
|
||||
</view>
|
||||
<view class="classvie_item flex-start" v-if="datalsit.kprq">
|
||||
<text class="classvie_itemone">开票时间:</text>
|
||||
<text class="classvie_itemtow">{{datalsit.createtime}}</text>
|
||||
<text class="classvie_itemtow">{{ datalsit.kprq }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_boxt_tow">
|
||||
<view class="content_boxt_tow" v-if="datalsit.url">
|
||||
<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>
|
||||
<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 +81,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 +110,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 +127,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: '保存中...',
|
||||
|
||||
300
pages/login/login.vue
Normal file
@@ -0,0 +1,300 @@
|
||||
<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="number" 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="请输入密码" 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 class="agreement" @click="clickpassword">忘记密码</view>
|
||||
</view>
|
||||
<view style="margin-top: 80rpx; text-align: center; color: #3088fd; position: fixed; bottom: 40rpx; left: 50%; transform: translate(-50%, -50%)" @click="quyonghu">
|
||||
我是用户
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Api from '@/common/js/api.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showPassword: false, //是否显示密码
|
||||
form: {
|
||||
account: '',
|
||||
password: '',
|
||||
captcha: ''
|
||||
},
|
||||
// 注册定时器 初始值
|
||||
second: 60,
|
||||
showText: true,
|
||||
Recapture: '发送验证码'
|
||||
};
|
||||
},
|
||||
async onLoad(e) {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: async (data) => {
|
||||
let openid = uni.cache.get('open_id');
|
||||
|
||||
if (!openid) {
|
||||
let res = await Api.getminiuserinfo({
|
||||
code: data.code
|
||||
});
|
||||
uni.cache.set('open_id', res.data.openid);
|
||||
}
|
||||
|
||||
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.navigateTo({
|
||||
url: '/pages/index/index?restype=' + 1
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
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;
|
||||
},
|
||||
quyonghu() {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index?restype=' + 2
|
||||
});
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/index/index?restype=' + 2
|
||||
// })
|
||||
},
|
||||
clickpassword() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/password'
|
||||
});
|
||||
},
|
||||
async userlogin() {
|
||||
if (this.form.account == null || this.form.account == '') {
|
||||
uni.showToast({
|
||||
title: '请输入电话号码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.password == null || this.form.password == '') {
|
||||
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,
|
||||
password: this.form.password,
|
||||
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('userinfo', res.data.userinfo);
|
||||
uni.cache.set('Type', res.data.type);
|
||||
uni.cache.set('set_pwd', res.data.set_pwd);
|
||||
if (res.data.set_pwd == 1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/repairpassword'
|
||||
});
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index?restype=' + 1
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</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;
|
||||
z-index: 99;
|
||||
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 {
|
||||
text-align: right;
|
||||
width: 570rpx;
|
||||
margin-top: 14rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #7c8e97;
|
||||
|
||||
.agreement-Item {
|
||||
color: #4ca1fc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
363
pages/login/password.vue
Normal file
@@ -0,0 +1,363 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<navseat :opacity='false' title="忘记密码" :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="top_box">
|
||||
<view class="top_box_one">
|
||||
<text class="top_box_one_text">手机号码</text>
|
||||
<input type="number" v-model="form.account" placeholder="请输入手机号码" />
|
||||
</view>
|
||||
<view class="top_box_one">
|
||||
<text class="top_box_one_text">密码</text>
|
||||
<input type="text" v-model="form.password" placeholder="请输入密码" :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="text" v-model="form.payPassword" placeholder="请再次输入密码" :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="number" 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="forgetPassword" @click="forgetPassword">重置密码</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
radioChangeItem: false, //单选框
|
||||
h: null,
|
||||
showPassword: false,
|
||||
// 注册定时器 初始值
|
||||
second: 60,
|
||||
showText: true,
|
||||
Recapture: '发送验证码',
|
||||
form: {
|
||||
account: '',
|
||||
password: '',
|
||||
payPassword: '',
|
||||
captcha: '',
|
||||
source: 'promoter'
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
async CodeRegister() {
|
||||
if (this.form.password == null || this.form.password == '') {
|
||||
uni.showToast({
|
||||
title: '请输入密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.payPassword == null || this.form.payPassword == '') {
|
||||
uni.showToast({
|
||||
title: '请输入确认密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!uni.$u.test.rangeLength(this.form.password, [6, 24])) {
|
||||
uni.showToast({
|
||||
title: "请输入密码长度为6-24",
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (this.form.payPassword != this.form.password) {
|
||||
uni.showToast({
|
||||
title: '密码和确认密码不一致',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
//发起验证码
|
||||
const res = await this.api.smssend({
|
||||
mobile: this.form.account,
|
||||
event: 'forgetpwd'
|
||||
});
|
||||
if (res.code == 1) {
|
||||
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.account.length != 11) {
|
||||
uni.showToast({
|
||||
title: '手机号必须是11位',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.password == null || this.form.password == '') {
|
||||
uni.showToast({
|
||||
title: '请输入密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.payPassword == null || this.form.payPassword == '') {
|
||||
uni.showToast({
|
||||
title: '请输入确认密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!uni.$u.test.rangeLength(this.form.password, [6, 24])) {
|
||||
uni.showToast({
|
||||
title: "请输入密码长度为6-24",
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (this.form.payPassword != this.form.password) {
|
||||
uni.showToast({
|
||||
title: '密码和确认密码不一致',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!uni.$u.test.rangeLength(this.form.password, [6, 24])) {
|
||||
uni.showToast({
|
||||
title: "请输入密码长度为6-24",
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (this.form.captcha == null || this.form.captcha == '') {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.userforgetpwd({
|
||||
account: this.form.account,
|
||||
password: this.form.password,
|
||||
captcha: this.form.captcha
|
||||
});
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'none',
|
||||
success: () => {
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1500);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</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::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: 120rpx;
|
||||
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;
|
||||
z-index: 99;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
.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
@@ -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="number" 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>
|
||||
251
pages/login/repairpassword.vue
Normal file
@@ -0,0 +1,251 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<navseat :opacity='false' :title="titles" :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="box_item flex-between">
|
||||
<text class="top_box_one_text">手机号</text>
|
||||
<input type="number" v-model="form.account" placeholder="请输入手机号" maxlength="11" disabled="disabled" />
|
||||
</view>
|
||||
<view class="box_item flex-between">
|
||||
<text class="top_box_one_text">密码</text>
|
||||
<input type="text" v-model="form.password" placeholder="请输入密码" :password="!passwords" />
|
||||
</view>
|
||||
<view class="box_item flex-between">
|
||||
<text class="top_box_one_text">确认密码</text>
|
||||
<input type="text" v-model="form.payPassword" placeholder="确认密码" :password="!payPasswords" />
|
||||
</view>
|
||||
<view class="box_item flex-between" style="position:relative;">
|
||||
<text class="top_box_one_text">验证码</text>
|
||||
<input type="number" v-model="form.captcha" placeholder="请输入验证码" style="padding-right: 140rpx;" />
|
||||
<view class="top_box_one_texts">
|
||||
<view v-if="showText == true" class="yzm" @click="CodeRegister">{{ Recapture }}</view>
|
||||
<view v-else style="color: #ccc; background-color: #f9f9f9; border-radius:16px; padding: 10rpx;">
|
||||
{{ second }}s重新发送
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-colum">
|
||||
<view class="Box_bottom" @click="userInfosavePayPassword">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
account: uni.cache.get('userinfo').mobile,
|
||||
password: '',
|
||||
payPassword: '',
|
||||
captcha: ''
|
||||
},
|
||||
titles: uni.cache.get('set_pwd') == 0 ? '修改密码' : '设置密码',
|
||||
passwords: false,
|
||||
payPasswords: false,
|
||||
// 注册定时器 初始值
|
||||
second: 60,
|
||||
showText: true,
|
||||
Recapture: '发送验证码'
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
|
||||
methods: {
|
||||
async CodeRegister() {
|
||||
if (this.form.password == null || this.form.password == '') {
|
||||
uni.showToast({
|
||||
title: '请输入密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.payPassword == null || this.form.payPassword == '') {
|
||||
uni.showToast({
|
||||
title: '请输入确认密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!uni.$u.test.rangeLength(this.form.password, [6, 24])) {
|
||||
uni.showToast({
|
||||
title: "请输入密码长度为6-24",
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (this.form.payPassword != this.form.password) {
|
||||
uni.showToast({
|
||||
title: '密码和确认密码不一致',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
//发起验证码
|
||||
const res = await this.api.smssend({
|
||||
mobile: this.form.account,
|
||||
event: 'resetpwd'
|
||||
});
|
||||
if (res.code == 1) {
|
||||
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);
|
||||
}
|
||||
},
|
||||
async userInfosavePayPassword() {
|
||||
if (this.form.account.length != 11) {
|
||||
uni.showToast({
|
||||
title: '手机号必须是11位',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.password == null || this.form.password == '') {
|
||||
uni.showToast({
|
||||
title: '请输入密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.payPassword == null || this.form.payPassword == '') {
|
||||
uni.showToast({
|
||||
title: '请输入确认密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!uni.$u.test.rangeLength(this.form.password, [6, 24])) {
|
||||
uni.showToast({
|
||||
title: "请输入密码长度为6-24",
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (this.form.payPassword != this.form.password) {
|
||||
uni.showToast({
|
||||
title: '密码和确认密码不一致',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (!uni.$u.test.rangeLength(this.form.password, [6, 24])) {
|
||||
uni.showToast({
|
||||
title: "请输入密码长度为6-24",
|
||||
icon: "none"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
if (this.form.captcha == null || this.form.captcha == '') {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.usersetuserpwd({
|
||||
account: this.form.account,
|
||||
password: this.form.password,
|
||||
captcha: this.form.captcha
|
||||
})
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: this.titles + '成功',
|
||||
icon: 'none'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index?restype=' + 1
|
||||
});
|
||||
}, 1500);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.Box {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.box_one {
|
||||
margin-top: 26rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.box_item {
|
||||
padding: 36rpx 0 0 0;
|
||||
|
||||
.top_box_one_text {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 75%;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.repeat {
|
||||
position: absolute;
|
||||
bottom: 26rpx;
|
||||
right: 0;
|
||||
width: 25rpx;
|
||||
height: 17rpx;
|
||||
}
|
||||
|
||||
.top_box_one_texts {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #5082fd;
|
||||
}
|
||||
}
|
||||
|
||||
.flex-colum {
|
||||
width: 100%;
|
||||
margin-top: 156rpx;
|
||||
|
||||
.Box_bottom {
|
||||
width: 558rpx;
|
||||
height: 72rpx;
|
||||
background: #5082fd;
|
||||
border-radius: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
167
pages/login/switch.vue
Normal file
@@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<view class="index flex-colum">
|
||||
<navseat :opacity='false' title=" " :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="index_text">
|
||||
点击切换商户账号
|
||||
</view>
|
||||
<view class="index_box">
|
||||
<view class="index_item flex-between" v-for="(item,index) in list" :key="index" @click="clickes(item)">
|
||||
<view class="index_itemone flex-start">
|
||||
<!-- <image class="index_itemoneimage" :src="item.avatar" mode=""></image> -->
|
||||
<view class="flex-colum-start">
|
||||
<view class="index_itemone_one">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<!-- <view class="index_itemone_tow">
|
||||
{{item.class}}
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="index_itemonetext" v-if="item.is_online == 1">
|
||||
当前使用
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import navseat from '@/components/navseat.vue'
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
screenheight: '',
|
||||
list: [],
|
||||
storeid: uni.cache.get('user').store_id
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.useraccountlist()
|
||||
uni.getSystemInfo({
|
||||
success: (e) => {
|
||||
let screenHeight = 0
|
||||
console.log(e)
|
||||
screenHeight = e.windowHeight
|
||||
this.screenheight = {
|
||||
'height': screenHeight + 'px'
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async useraccountlist() {
|
||||
let res = await this.api.kstorelist()
|
||||
if (res.code = 1) {
|
||||
this.list = res.data
|
||||
}
|
||||
},
|
||||
// 切换商户
|
||||
async postuserswitchstore() {
|
||||
|
||||
},
|
||||
async clickes(e) {
|
||||
if (e.is_online == 1) {
|
||||
return false;
|
||||
}
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定切换商家吗?',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
let res = await this.api.userswitchstore({
|
||||
id: e.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('userinfo', res.data.userinfo);
|
||||
uni.cache.set('Type', res.data.type);
|
||||
uni.cache.set('set_pwd', res.data.set_pwd);
|
||||
if (res.data.set_pwd == 1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/repairpassword'
|
||||
})
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index?restype=' + 1
|
||||
});
|
||||
}
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
|
||||
background: #EDEDED;
|
||||
}
|
||||
|
||||
.index {
|
||||
height: 100%;
|
||||
|
||||
.index_text {
|
||||
font-size: 52rpx;
|
||||
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
|
||||
.index_box {
|
||||
padding: 0 48rpx 60rpx 48rpx;
|
||||
width: 100%;
|
||||
|
||||
.index_item {
|
||||
align-items: flex-start;
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx 28rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.index_itemone {
|
||||
.index_itemoneimage {
|
||||
width: 114rpx;
|
||||
height: 114rpx;
|
||||
}
|
||||
|
||||
.flex-colum-start {
|
||||
// margin-left: 32rpx;
|
||||
|
||||
.index_itemone_one {
|
||||
width: 400rpx;
|
||||
font-size: 30rpx;
|
||||
font-family: SourceHanSansCN-Bold, SourceHanSansCN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.index_itemone_tow {
|
||||
margin-top: 10rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.index_itemonetext {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
|
||||
font-weight: 400;
|
||||
color: #2F87FD;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
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
@@ -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="number" :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>
|
||||
18
pages/webview/index.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<!-- <web-view :src="url"></web-view> -->
|
||||
<web-view src="https://work.weixin.qq.com/kfid/kfc4219d976242c5106"></web-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url: '', //PDF路径
|
||||
};
|
||||
},
|
||||
async onLoad(options) {
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -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
|
||||
|
||||
177
static/LICENSE
@@ -1,177 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 359 B |
|
Before Width: | Height: | Size: 32 KiB |
BIN
static/icons.png
|
Before Width: | Height: | Size: 86 KiB |
BIN
static/item1.png
|
Before Width: | Height: | Size: 907 B |
BIN
static/item2.png
|
Before Width: | Height: | Size: 898 B |
BIN
static/item3.png
|
Before Width: | Height: | Size: 791 B |
BIN
static/item4.png
|
Before Width: | Height: | Size: 593 B |
BIN
static/item5.png
|
Before Width: | Height: | Size: 2.9 KiB |
BIN
static/item6.png
|
Before Width: | Height: | Size: 903 B |
BIN
static/item7.png
|
Before Width: | Height: | Size: 893 B |
BIN
static/item8.png
|
Before Width: | Height: | Size: 1.3 KiB |
BIN
static/logo.png
|
Before Width: | Height: | Size: 3.9 KiB |
BIN
static/my2.png
|
Before Width: | Height: | Size: 3.5 KiB |
BIN
static/sz.png
|
Before Width: | Height: | Size: 627 B |
BIN
static/xj.png
|
Before Width: | Height: | Size: 923 B |
2
unpackage/dist/build/web/index.html
vendored
@@ -3,4 +3,4 @@
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') +
|
||||
'" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.41073de1.js></script><script src=/static/js/index.caeea1e4.js></script></body></html>
|
||||
'" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.02fb05d3.js></script><script src=/static/js/index.a34fe316.js></script></body></html>
|
||||