修改点发票开始之前提交版本
This commit is contained in:
@@ -95,4 +95,7 @@ export default {
|
||||
usergetwechatjssdk(data) {
|
||||
return uni.api.post("user/getwechatjssdk", data);
|
||||
},
|
||||
h5encryption(data) {
|
||||
return uni.api.post("store/h5encryption", data);
|
||||
},
|
||||
}
|
||||
@@ -1,15 +1,16 @@
|
||||
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 : "http://wxgzh.sxczgkj.cn"
|
||||
// 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"
|
||||
if (debug) {
|
||||
new VConsole()
|
||||
// new VConsole()
|
||||
}
|
||||
const version = '120'
|
||||
const autoRemoveCache = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const preCacheKeyClearFetch = 'storage:clear:fetch:'
|
||||
|
||||
import Api from '@/common/js/api.js'
|
||||
uni.pro.interceptor('request', {
|
||||
config(paramOptions) {
|
||||
let options = Object.assign({}, paramOptions)
|
||||
@@ -39,7 +39,9 @@ async function request(options) {
|
||||
}
|
||||
options.header = {
|
||||
userId: uni.getStorageSync('userId'),
|
||||
minitype:uni.getStorageSync('Type'),
|
||||
minitype: uni.getStorageSync('Type'),
|
||||
fatoken: uni.getStorageSync('token'),
|
||||
isnew: 'isnew',
|
||||
'content-type': 'application/json'
|
||||
}
|
||||
let res = await uni.pro.request(options)
|
||||
@@ -59,18 +61,13 @@ async function request(options) {
|
||||
}
|
||||
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.cache.clear();
|
||||
uni.removeStorageSync("token");
|
||||
uni.removeStorageSync("userId");
|
||||
uni.removeStorageSync('myLoginName')
|
||||
uni.pro.redirectTo("login/login");
|
||||
}
|
||||
} else if (res.code == 405) {
|
||||
let token = await Api.h5encryption({
|
||||
store_id: uni.cache.get('userId')
|
||||
})
|
||||
if (token.code == 1) {
|
||||
uni.cache.set('token', token.data.token);
|
||||
}
|
||||
} else if (res.code == 482) {
|
||||
let nowTime = new Date() / 1000 | 0
|
||||
let offset = parseInt(res.message) - parseInt(nowTime);
|
||||
|
||||
19
main.js
19
main.js
@@ -10,22 +10,29 @@ Vue.config.productionTip = false
|
||||
import uView from '@/uni_modules/uview-ui'
|
||||
Vue.prototype.$store = store
|
||||
Vue.prototype.api = Api;
|
||||
// 让页面的 onLoad 在 onLaunch 之后执行
|
||||
Vue.prototype.$onLaunched = new Promise(resolve => {
|
||||
Vue.prototype.$isResolve = resolve
|
||||
})
|
||||
Vue.use(uView)
|
||||
// 如此配置即可
|
||||
App.mpType = 'app'
|
||||
const app = new Vue({
|
||||
store,
|
||||
...App
|
||||
...App
|
||||
})
|
||||
app.$mount()
|
||||
// #endif
|
||||
|
||||
|
||||
// #ifdef VUE3
|
||||
import { createSSRApp } from 'vue'
|
||||
import {
|
||||
createSSRApp
|
||||
} from 'vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
return {
|
||||
app
|
||||
}
|
||||
const app = createSSRApp(App)
|
||||
return {
|
||||
app
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
@@ -64,7 +64,7 @@
|
||||
"disableHostCheck" : false,
|
||||
"proxy" : {
|
||||
"/api" : {
|
||||
"target" : "https://ky.sxczgkj.cn/api/",
|
||||
"target" : "http://192.168.1.13:8888/api/",
|
||||
"ws" : false,
|
||||
"changeOrigin" : true, //是否跨域
|
||||
"secure" : false, // 设置支持https协议的代理
|
||||
|
||||
11
pages.json
11
pages.json
@@ -9,12 +9,6 @@
|
||||
"navigationBarTitleText": "开票",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "pages/hindex/indexess",
|
||||
"style": {
|
||||
"navigationBarTitleText": "开票",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/index/information",
|
||||
"style": {
|
||||
@@ -124,6 +118,11 @@
|
||||
"navigationBarTitleText": "提交成功",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/electric/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}, {
|
||||
"path": "pages/webview/webview",
|
||||
"style": {
|
||||
|
||||
230
pages/electric/index.vue
Normal file
230
pages/electric/index.vue
Normal file
@@ -0,0 +1,230 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="topswiper">
|
||||
<u-swiper :list="swiperlist" height="336"></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>
|
||||
</view>
|
||||
<view class="contentlist" v-for="(item,index) in 3" :key="index">
|
||||
<view class="contentlisttitle">
|
||||
企业信息
|
||||
</view>
|
||||
<view class="contentlistitem flex-between" style="margin-top: 32rpx;">
|
||||
<text class="contentlistitemone">企业名称</text>
|
||||
<text class="contentlistitemtow">西安市高新区范家大院饭馆</text>
|
||||
</view>
|
||||
<view class="contentlistitem flex-between">
|
||||
<text class="contentlistitemone">纳税人税号</text>
|
||||
<text class="contentlistitemtow">92610131MA6W52456</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>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentbotton">
|
||||
<view class="contentbottontitle flex-between">
|
||||
<text class="contentbottontitleone">最近开票申请</text>
|
||||
<text class="contentbottontitletow">更多申请</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
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: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
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
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clicknavigateTo(item, index) {
|
||||
console.log(index)
|
||||
switch (index) {
|
||||
case '0':
|
||||
uni.pro.navigateTo('webview/webview', {
|
||||
url: c
|
||||
});
|
||||
break;
|
||||
case 1:
|
||||
uni.pro.navigateTo('bluetools/index');
|
||||
// uni.pro.navigateTo(b, {
|
||||
// url: c
|
||||
// });
|
||||
break;
|
||||
case 2:
|
||||
uni.pro.navigateTo('issuer/index');
|
||||
break;
|
||||
case 3:
|
||||
uni.pro.navigateTo('toexamine/index');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.topswiper {
|
||||
padding-top: 32rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.contentgrid {
|
||||
margin-top: 32rpx;
|
||||
padding: 0 32rpx 32rpx 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24px 24px 24px 24px;
|
||||
|
||||
.flex-colum {
|
||||
width: 25%;
|
||||
margin-top: 36rpx;
|
||||
|
||||
image {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-top: 16rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contentlist {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
|
||||
.contentlisttitle {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.contentlistitem {
|
||||
margin-top: 24rpx;
|
||||
|
||||
.contentlistitemone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.contentlistitemtow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contentbotton {
|
||||
margin-top: 44rpx;
|
||||
width: 100%;
|
||||
padding: 20rpx 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
|
||||
.contentbottontitle {
|
||||
.contentbottontitleone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.contentbottontitletow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #5872C9;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -189,22 +189,12 @@
|
||||
_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_name = infoJ.bankAccount ? infoJ.bankAccount : '' //开户银行
|
||||
_this.form.c_bank_account = infoJ.bankName ? infoJ.bankName : '' // 银行账号
|
||||
_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是个人
|
||||
// form: {
|
||||
// user_type: 2,
|
||||
// img: '',
|
||||
// user_name: '',
|
||||
// user_duty: '',
|
||||
// email: '',
|
||||
// mobile: '',
|
||||
// status_note: '',
|
||||
// c_address: '',
|
||||
// c_phone: '',
|
||||
// c_bank_name: '',
|
||||
// c_bank_account: ''
|
||||
// },
|
||||
if (infoJ.type == 0) {
|
||||
_this.showElse = true
|
||||
}
|
||||
})
|
||||
},
|
||||
onInput(e) {
|
||||
@@ -368,7 +358,10 @@
|
||||
this.form.img = '';
|
||||
this.form.user_duty = '';
|
||||
this.form.email = '';
|
||||
this.form.mobile = '';
|
||||
this.form.c_address = '';
|
||||
this.form.c_phone = '';
|
||||
this.form.c_bank_account = '';
|
||||
this.form.c_bank_name = '';
|
||||
},
|
||||
async getOrder() { //搜索值
|
||||
let res = await this.api.enterprisestore({
|
||||
|
||||
@@ -18,14 +18,7 @@
|
||||
<view><input type="number" v-model="form.number" @input="handleInputChange" placeholder="请填写数量"
|
||||
data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>规格型号</view>
|
||||
<view><input v-model="form.ggxh" placeholder="请填写规格型号" data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>单位</view>
|
||||
<view><input v-model="form.dw" 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">
|
||||
@@ -48,6 +41,25 @@
|
||||
<text type="text" v-model="form.dlzhid">{{ form.dlzhid || '请选择开票人' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<template>
|
||||
<view class="Box_box flex-between" @click="showElse = !showElse">
|
||||
<view class="Box_boxone">其他信息</view>
|
||||
<view class="arrow">
|
||||
<text class="t">规格、单位</text>
|
||||
<u-icon name="arrow-down" class="arrow-icon" :class="{ active: showElse }"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="showElse">
|
||||
<view class="Box_box flex-between">
|
||||
<view>规格型号</view>
|
||||
<view><input v-model="form.ggxh" placeholder="请填写规格型号" data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>单位</view>
|
||||
<view><input v-model="form.dw" placeholder="请填写单位" data-key="mobile" /></view>
|
||||
</view>
|
||||
</template>
|
||||
</template>
|
||||
<view class="Box_box flex-between">
|
||||
<view>备注:</view>
|
||||
<u--textarea v-model="form.notes" placeholder="请输入内容"></u--textarea>
|
||||
@@ -86,13 +98,14 @@
|
||||
Uploadurlnumber: '',
|
||||
namelang: '',
|
||||
merchantAuditStatus: '',
|
||||
showElse: false,
|
||||
form: {
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
article: uni.cache.get('keyword').name,
|
||||
type: '',
|
||||
price: '',
|
||||
se_amount: '',
|
||||
number: '',
|
||||
number: 1,
|
||||
tax_amount: '',
|
||||
d_price: '',
|
||||
notes: '',
|
||||
@@ -172,6 +185,7 @@
|
||||
}
|
||||
},
|
||||
async showpickerconfirm(e) {
|
||||
console.log(e, 1)
|
||||
if (this.form.price == null || this.form.price == '') {
|
||||
uni.showToast({
|
||||
title: '请输入开票金额',
|
||||
@@ -193,6 +207,17 @@
|
||||
} else {
|
||||
this.form.se_amount = 3
|
||||
}
|
||||
switch (e.value[1]) {
|
||||
case '1%':
|
||||
this.form.se_amount = 1
|
||||
break;
|
||||
case '3%':
|
||||
this.form.se_amount = 3
|
||||
break;
|
||||
case '6%':
|
||||
this.form.se_amount = 6
|
||||
break;
|
||||
}
|
||||
this.form.type = e.value.toString();
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -271,6 +296,13 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if([...this.form.dw].length > 22){
|
||||
uni.showToast({
|
||||
title: '单位不能多余22个字体!',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.storesubinvoicing(this.form)
|
||||
if (res) {
|
||||
this.form = {
|
||||
@@ -301,7 +333,24 @@
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
.arrow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.t {
|
||||
margin-right: 8upx;
|
||||
color: #808080;
|
||||
font-size: 32upx;
|
||||
}
|
||||
|
||||
.arrow-icon {
|
||||
transition: all 0.3s ease-in-out;
|
||||
|
||||
&.active {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
.Box {
|
||||
.Box_box_O {
|
||||
padding: 0 28rpx;
|
||||
|
||||
@@ -79,6 +79,14 @@
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
let token = await this.api.h5encryption({
|
||||
store_id: uni.cache.get('userId')
|
||||
})
|
||||
if (token.code == 1) {
|
||||
uni.cache.set('token', token.data.token);
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.list = []
|
||||
|
||||
@@ -65,20 +65,27 @@
|
||||
};
|
||||
},
|
||||
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);
|
||||
}
|
||||
// this.jumpToMiniProgram()
|
||||
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);
|
||||
// uni.cache.set('userId', this.improveinformationform.id);
|
||||
if (res.data.sz_status == 0) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/information'
|
||||
@@ -198,7 +205,7 @@
|
||||
let res = await this.api.szzpyhurl({
|
||||
store_id: uni.getStorageSync('userId')
|
||||
})
|
||||
if(res){
|
||||
if (res) {
|
||||
uni.pro.navigateTo('webview/webview', {
|
||||
url: res.data.url,
|
||||
tape: 1
|
||||
|
||||
2
unpackage/dist/build/web/index.html
vendored
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.8ef16d6b.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.41073de1.js></script><script src=/static/js/index.caeea1e4.js></script></body></html>
|
||||
Reference in New Issue
Block a user