首页修改

This commit is contained in:
魏啾
2024-05-08 19:37:19 +08:00
parent 56863dd624
commit 9d6e4bb57c
36 changed files with 1003 additions and 288 deletions

10
.gitignore vendored Normal file
View File

@@ -0,0 +1,10 @@
/node_modules
.env
.env.backup
.phpunit.result.cache
docker-compose.override.yml
npm-debug.log
yarn-error.log
/unpackage
.DS_Store
*/.DS_Store

17
common/js/api.js Normal file
View File

@@ -0,0 +1,17 @@
export default {
storestorestatus(data) { //首页获取状态
return uni.api.post("store/storestatus", data);
},
szzpyauthorization(data) { //数电授权
return uni.api.post("szzpy/authorization", data);
},
invoicerregistrationszzpy(data) { //获取验证码
return uni.api.post("szzpy/invoicerregistration", data);
},
szzpysendverification(data) { //提交
return uni.api.post("szzpy/sendverification", data);
},
storeinvoicelist(data) { //记录
return uni.api.post("store/invoicelist", data);
},
}

View File

@@ -4,6 +4,7 @@ const debug = process.env.NODE_ENV == 'development' ? true : false;
// #ifdef H5 // #ifdef H5
// const baseUrl = debug ? proxyApi : "http://wxgzh.sxczgkj.cn" // const baseUrl = debug ? proxyApi : "http://wxgzh.sxczgkj.cn"
const baseUrl = '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/'//测试 // const baseUrl = 'http://test.invoice.sxczgkj.cn/api/'//测试
// #endif // #endif
// import VConsole from "./vConsole.js" // import VConsole from "./vConsole.js"

View File

@@ -43,15 +43,12 @@ async function request(options) {
'android': 1 'android': 1
} }
options.header = { options.header = {
type: platformInfo[system.platform],
userId: uni.getStorageSync('userId'), userId: uni.getStorageSync('userId'),
token: uni.getStorageSync('token'),
myLoginName: uni.getStorageSync('myLoginName'),
version: uni.conf.version,
'content-type': 'application/json' 'content-type': 'application/json'
} }
let res = await uni.pro.request(options) let res = await uni.pro.request(options)
if (res.code >= 400) { console.log(res)
if (res.code != 1) {
if (options.toast) { if (options.toast) {
uni.showToast({ uni.showToast({
title: res.message || res.msg, title: res.message || res.msg,
@@ -88,25 +85,19 @@ async function request(options) {
return Promise.reject(res.message) return Promise.reject(res.message)
} }
} else { } else {
console.log(res) if (!options.toast) {
// if (options.toast) { uni.showToast({
// uni.showToast({ title: res.message || res.msg,
// title: res.message || res.msg, icon: "none",
// icon: "none", success() {
// success: () => { setTimeout(res => {
// setTimeout(res => { // if (options.toast) {
// if (options.toast) { uni.hideLoading()
// // #ifdef MP-WEIXIN // }
// uni.hideLoading() }, 2000)
// // #endif }
// // #ifndef MP-WEIXIN })
// uni.pro.hideLoading() }
// // #endif
// }
// },2000)
// }
// })
// }
return res return res
} }

View File

@@ -1,6 +1,7 @@
import App from './App' import App from './App'
import './framework/bootstrap' import './framework/bootstrap'
import store from './store' import store from './store'
import Api from "./common/js/api.js"
// #ifndef VUE3 // #ifndef VUE3
import Vue from 'vue' import Vue from 'vue'
import './uni.promisify.adaptor' import './uni.promisify.adaptor'
@@ -8,6 +9,7 @@ Vue.config.productionTip = false
// main.js注意要在use方法之后执行 // main.js注意要在use方法之后执行
import uView from 'uview-ui' import uView from 'uview-ui'
Vue.prototype.$store = store Vue.prototype.$store = store
Vue.prototype.api = Api;
Vue.use(uView) Vue.use(uView)
// 如此配置即可 // 如此配置即可
App.mpType = 'app' App.mpType = 'app'

View File

@@ -43,7 +43,9 @@
/* ios */ /* ios */
"ios" : {}, "ios" : {},
/* SDK */ /* SDK */
"sdkConfigs" : {} "sdkConfigs" : {
"geolocation" : {}
}
} }
}, },
/* */ /* */
@@ -79,7 +81,10 @@
"uniStatistics" : { "uniStatistics" : {
"enable" : true "enable" : true
}, },
"title" : "发票" "title" : "发票",
"sdkConfigs" : {
"maps" : {}
}
}, },
"mp-alipay" : { "mp-alipay" : {
"usingComponents" : true "usingComponents" : true

7
node_modules/.package-lock.json generated vendored
View File

@@ -1,8 +1,13 @@
{ {
"name": "invoice_H5", "name": "Hfive",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"node_modules/dayjs": {
"version": "1.11.11",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.11.tgz",
"integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg=="
},
"node_modules/uview-ui": { "node_modules/uview-ui": {
"version": "2.0.36", "version": "2.0.36",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.36.tgz", "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.36.tgz",

8
package-lock.json generated
View File

@@ -1,13 +1,19 @@
{ {
"name": "invoice_H5", "name": "Hfive",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"dependencies": { "dependencies": {
"dayjs": "^1.11.11",
"uview-ui": "^2.0.36" "uview-ui": "^2.0.36"
} }
}, },
"node_modules/dayjs": {
"version": "1.11.11",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.11.tgz",
"integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg=="
},
"node_modules/uview-ui": { "node_modules/uview-ui": {
"version": "2.0.36", "version": "2.0.36",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.36.tgz", "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.36.tgz",

View File

@@ -1,6 +1,6 @@
{ {
"dependencies": { "dependencies": {
"dayjs": "^1.11.10", "dayjs": "^1.11.11",
"uview-ui": "^2.0.36" "uview-ui": "^2.0.36"
} }
} }

View File

@@ -21,6 +21,12 @@
"navigationBarTitleText": "绑定通知", "navigationBarTitleText": "绑定通知",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, {
"path": "pages/index/merchant",
"style": {
"navigationBarTitleText": "商户列表",
"navigationStyle": "custom"
}
}, { }, {
"path": "pages/index/Invoicing", "path": "pages/index/Invoicing",
"style": { "style": {

View File

@@ -103,14 +103,14 @@
}, },
onShow() { onShow() {
// uni.$on('businesscategorys', res => { uni.$on('businesscategorys', res => {
// console.log(res); console.log(res);
// this.form.mcc = res.code; this.form.mcc = res.code;
// this.form.article = res.name; this.form.article = res.name;
// this.keyword = uni.cache.get('keyword') this.keyword = uni.cache.get('keyword')
// // this.form.contactLine = res.unionpayCode // this.form.contactLine = res.unionpayCode
// // this.form.branchName = res.branchName // this.form.branchName = res.branchName
// }); });
}, },
methods: { methods: {
showpopupclick() { showpopupclick() {

View File

@@ -2,20 +2,16 @@
<view class="Box flex-between"> <view class="Box flex-between">
<view class="content flex-colum" @click="indexInvoicing" v-if="improveinformation"> <view class="content flex-colum" @click="indexInvoicing" v-if="improveinformation">
<image src="@/static/item3.png" mode="aspectFill"></image> <image src="@/static/item3.png" mode="aspectFill"></image>
<text>开票</text> <text>极速开票</text>
</view> </view>
<view class="content flex-colum" @click="webview" v-if="improveinformation"> <view class="content flex-colum" @click="webview" v-if="improveinformation">
<image src="@/static/item2.png" mode="aspectFill"></image> <image src="@/static/item2.png" mode="aspectFill"></image>
<text>开票员管理</text> <text>后台管理</text>
</view> </view>
<view class="content flex-colum" @click="indexorder" v-if="improveinformation"> <view class="content flex-colum" @click="indexorder" v-if="improveinformation">
<image src="@/static/item1.png" mode="aspectFill"></image> <image src="@/static/item1.png" mode="aspectFill"></image>
<text>开票记录</text> <text>开票记录</text>
</view> </view>
<!-- <view class="content flex-colum" @click="information">
<image src="@/static/item4.png" mode="aspectFill"></image>
<text>完善商家信息</text>
</view> -->
<view class="content flex-colum" @click="notification" v-if="improveinformation"> <view class="content flex-colum" @click="notification" v-if="improveinformation">
<image src="@/static/item6.png" mode="aspectFill"></image> <image src="@/static/item6.png" mode="aspectFill"></image>
<text>绑定通知</text> <text>绑定通知</text>
@@ -28,54 +24,60 @@
data() { data() {
return { return {
improveinformation: false, improveinformation: false,
improveinformationlist: {} improveinformationlist: {},
onLoaduserId: '',
onLoadtype: ''
}; };
}, },
onLoad(e) { async onLoad(e) {
// getLocationInfo() {
// uni.getLocation({
// type: 'wgs84',
// success: (res) => {
// console.log(res, '获取距离')
// // this.lng = res.longitude
// // this.lat = res.latitude
// // this.positionindex()
// },
// fail: (err) => {
// // this.positionindex()
// console.log(err, '获取错误')
// }
// });
// },
if (e.userId) { if (e.userId) {
// this.onLoaduserId = e.userId
// this.onLoadtype = e.type
uni.cache.set('userId', e.userId); uni.cache.set('userId', e.userId);
} }
uni.request({ let res = await this.api.storestorestatus({
url: uni.conf.baseUrl + 'store/storestatus', store_id: uni.cache.get('userId')
data: { })
//参数 if(res.code == 1){
store_id: uni.getStorageSync('userId') this.improveinformationform = res.data.store
}, uni.cache.set('form', this.improveinformationform);
method: 'POST', //请求方式,必须为大写 // uni.cache.set('userId', this.improveinformationform.id);
success: res => { if (res.data.sz_status == 0) {
this.improveinformationform = res.data.data.store uni.reLaunch({
uni.cache.set('form', this.improveinformationform); url: '/pages/index/information'
if (res.data.data.sz_status == 0) { });
uni.reLaunch({ } else {
url: '/pages/index/information' this.improveinformation = true
}); }
// uni.redirectTo({ }
// url: '/pages/index/information?store=' + JSON.stringify(this.improveinformationform) // uni.request({
// }); // url: uni.conf.baseUrl + 'store/storestatus',
} else { // data: {
this.improveinformation = true // //参数
} // store_id: uni.cache.get('userId')
}, // // type: this.onLoadtype
// },
// method: 'POST', //请求方式,必须为大写
// success: res => {
// this.improveinformationform = res.data.data.store
// uni.cache.set('form', this.improveinformationform);
// // uni.cache.set('userId', this.improveinformationform.id);
// if (res.data.data.sz_status == 0) {
// uni.reLaunch({
// url: '/pages/index/information'
// });
// } else {
// this.improveinformation = true
// }
// },
}); // });
}, },
onShow() {}, onShow() {},
methods: { methods: {
merchant() {
uni.pro.navigateTo('index/merchant');
},
information() { information() {
uni.pro.navigateTo('index/information', this.improveinformationform); uni.pro.navigateTo('index/information', this.improveinformationform);
}, },

View File

@@ -0,0 +1,579 @@
<template>
<view class="Box">
<view class="Box_box_O">
<view class="Box_box flex-between">
<view>请填写公司名字</view>
<view class="Box_box_input"><input type="text" :disabled="disabled" v-model="form.title"
placeholder="请填写" data-key="mobile" /></view>
</view>
<view class="Box_box flex-between">
<view>请填写法人姓名</view>
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.legal_person_name"
placeholder="请填写" data-key="mobile" /></view>
</view>
<view class="Box_box flex-between">
<view>请填写法人手机号</view>
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.phone"
placeholder="请填写" data-key="mobile" /></view>
</view>
<view class="Box_box flex-between">
<view>电子税局账号</view>
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.dlzh"
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.dlmm"
placeholder="请填写" data-key="mobile" /></view>
</view>
<view class="Box_box flex-between" @click="showpicker = true">
<view>省份</view>
<view class="flex-start">
{{form.provinceno_name || ''}}<u-icon name="arrow-right" color="#999999" size="16"></u-icon>
</view>
</view>
<view class="Box_box flex-between">
<view>邀请码</view>
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.code"
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.taxname"
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.taxphone"
placeholder="请填写" data-key="mobile" /></view>
</view>
<view class="Box_box flex-between">
<view>验证码</view>
<view class="Box_box_input" style="display: flex; justify-content: flex-start;align-items: center;">
<input class="Box_box_inpuinputt" type="text" v-model="form.verification" placeholder="请填写"
data-key="mobile" />
<view class="repeats">
<view v-if="showText == true"
style="padding: 8rpx 0;background: #288EFB; border-radius: 15rpx;"
@tap="$u.debounce(CodeRegister, 500)">
{{ Recapture }}
</view>
<view v-else
style="color: #ccc; background-color: #f9f9f9; padding: 8rpx 0; border-radius: 15rpx;">
{{ second }}s重新发送
</view>
</view>
</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="width: 100%; color: #FF2B2B; padding: 28rpx 0;word-wrap: break-word;">
拒接原因:({{form.no|| '无'}})</view> -->
<view v-if="disabled || !codefailed" class="preservation_boxs">提交</view>
<view v-else class="preservation_box" @tap="$u.throttle(saveMerchantBaseInfoV2, 1000)">提交</view>
</view>
<u-picker :show="showpicker" :columns="columns" @confirm='confirm' keyName="name"
@cancel='showpicker = false'></u-picker>
</view>
</template>
<script>
import selectaddress from '@/components/yixuan-selectAddress/yixuan-selectAddress.vue';
export default {
components: {
selectaddress
},
data() {
return {
showpicker: false,
disabled: true,
Uploadurlnumber: '',
namelang: '',
merchantAuditStatus: '',
columns: [
],
codefailed: false, //验证码是否发送成功
store_id: '',
// 注册定时器 初始值
second: 60,
showText: true,
Recapture: '发送验证码',
form: {
store_id: uni.getStorageSync('userId'),
title: '',
id_card_straight: '',
id_card_reverse: '',
business_license: '',
phone: '',
legal_person_name: '',
no: '',
provinceno: '',
provinceno_name: '',
dlzh: '',
dlmm: '',
code: '',
}
};
},
onLoad(e) {
console.log(e.store)
let data = uni.getStorageSync('form')
if (data.status == '0') {
this.disabled = true
} else {
this.disabled = false
}
if (data.phone) {
this.form.store_id = uni.getStorageSync('userId')
this.form.title = data.title
this.form.status = data.status
this.form.id_card_straight = data.id_card_straight
this.form.id_card_reverse = data.id_card_reverse
this.form.business_license = data.business_license
this.form.phone = data.phone
this.form.legal_person_name = data.legal_person_name
this.form.no = data.no
this.form.dlzh = data.dlzh
this.form.dlmm = data.dlmm
this.form.code = data.invitation
this.form.provinceno = data.provinceno
this.form.provinceno_name = data.provinceno_name
}
},
onShow() {
this.onShowdata()
},
methods: {
async CodeRegister() {
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 (this.form.provinceno == null || this.form.provinceno == '') {
uni.showToast({
title: '请选择省份编码',
icon: 'none'
});
return false;
}
if (this.form.dlzh == null || this.form.dlzh == '') {
uni.showToast({
title: '请填写电子税局账号',
icon: 'none'
});
return false;
}
if (this.form.dlmm == null || this.form.dlmm == '') {
uni.showToast({
title: '请填写电子税局账密码',
icon: 'none'
});
return false;
}
if (this.form.taxname == null || this.form.taxname == '') {
uni.showToast({
title: '请填写办税人姓名',
icon: 'none'
});
return false;
}
if (this.form.taxphone == null || this.form.taxphone == '') {
uni.showToast({
title: '请填写办税人手机号码',
icon: 'none'
});
return false;
}
uni.pro.showLoading({
title: '加载中',
mask: true
})
uni.request({
url: uni.conf.baseUrl + 'szzpy/invoicerregistration',
data: this.form,
method: 'POST', //请求方式,必须为大写
success: res => {
if (res.data.code == 0) { //失败
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
});
return false;
}
if (res.data.code == 1) {
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
// 定时器
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);
this.store_id = res.data.data.store_id
this.codefailed = true
}
// setTimeout(() => {
// uni.pro.hideLoading();
// }, 2000)
},
fail: (res) => {
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
}
});
},
onShowdata() {
uni.request({
url: uni.conf.baseUrl + 'szzpy/getprovinceno',
data: this.form,
method: 'POST', //请求方式,必须为大写
success: res => {
if (res.data.data) {
this.columns = [res.data.data]
}
},
fail(res) {
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
}
});
},
confirm(e) {
console.log('confirm', e)
this.form.provinceno_name = e.value[0].name
this.form.provinceno = e.value[0].code
this.showpicker = false
},
Upload(i) {
if (this.disabled) {
return false;
} else {
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);
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])
}
console.log(this.form)
}
});
},
fail: err => {
uni.pro.hideLoading();
uni.showToast({
title: thisdata_.message || thisdata_.msg,
icon: 'none',
});
}
});
}
});
}
},
async saveMerchantBaseInfoV2() {
if (this.form.verification == null || this.form.verification == '') {
uni.showToast({
title: '请填写验证码',
icon: 'none'
});
return false;
}
uni.request({
url: uni.conf.baseUrl + 'szzpy/sendverification',
data: {
code: this.form.verification,
store_id: this.store_id
},
method: 'POST',
success: res => {
if (res.data.code == 0) { //失败
this.codefailed = false
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
return false;
}
if (res.data.code == 1) {
this.store_id = res.data.data.store_id
//请求数电授权
this.szzpyauthorization()
}
console.log('接口返回------', res);
},
fail(res) {
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
}
});
},
szzpyauthorization() {
uni.request({
url: uni.conf.baseUrl + 'szzpy/authorization',
data: {
store_id: this.store_id
},
method: 'POST',
success: res => {
if (res.data.code == 0) {
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
return false;
}
if (res.data.code == 1) {
setTimeout(() => {
uni.cache.set('form', '');
uni.reLaunch({
url: '/pages/index/index'
});
// uni.navigateBack();
}, 2000);
}
console.log('接口返回------', res);
},
});
}
}
};
</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 {
position: relative;
width: 60%;
.Box_box_inpuinputt {
padding-right: 15rpx;
}
.repeats {
width: 280rpx;
text-align: center;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #ffffff;
border-radius: 12rpx;
}
}
}
}
.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(@/static/my2.png) no-repeat;
background-position: 50% 50%;
background-size: 50%;
}
}
}
.preservation {
width: 100%;
padding: 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>

View File

@@ -37,6 +37,34 @@
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.code" <view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.code"
placeholder="请填写" data-key="mobile" /></view> placeholder="请填写" data-key="mobile" /></view>
</view> </view>
<view class="Box_box flex-between">
<view>办税人姓名</view>
<view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.taxname"
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.taxphone"
placeholder="请填写" data-key="mobile" /></view>
</view>
<view class="Box_box flex-between">
<view>验证码</view>
<view class="Box_box_input" style="display: flex; justify-content: flex-start;align-items: center;">
<input class="Box_box_inpuinputt" type="text" v-model="form.verification" placeholder="请填写"
data-key="mobile" />
<view class="repeats">
<view v-if="showText == true"
style="padding: 8rpx 0;background: #288EFB; border-radius: 15rpx;"
@tap="$u.debounce(CodeRegister, 500)">
{{ Recapture }}
</view>
<view v-else
style="color: #ccc; background-color: #f9f9f9; padding: 8rpx 0; border-radius: 15rpx;">
{{ second }}s重新发送
</view>
</view>
</view>
</view>
</view> </view>
<view class="Box_box_T"> <view class="Box_box_T">
<view class="Box_box_T_o">请上传法人身份证图片</view> <view class="Box_box_T_o">请上传法人身份证图片</view>
@@ -62,9 +90,10 @@
</view> </view>
</view> </view>
<view class="preservation flex-colum"> <view class="preservation flex-colum">
<view v-if="form.status == '2'" style="width: 100%; color: #FF2B2B; padding: 28rpx 0;word-wrap: break-word;"> <!-- <view v-if="form.status == '2'"
拒接原因:({{form.no|| ''}})</view> style="width: 100%; color: #FF2B2B; padding: 28rpx 0;word-wrap: break-word;">
<view v-if="disabled" class="preservation_boxs">审核中</view> 拒接原因:({{form.no|| '无'}})</view> -->
<view v-if="!codefailed" class="preservation_boxs">提交</view>
<view v-else class="preservation_box" @tap="$u.throttle(saveMerchantBaseInfoV2, 1000)">提交</view> <view v-else class="preservation_box" @tap="$u.throttle(saveMerchantBaseInfoV2, 1000)">提交</view>
</view> </view>
@@ -81,13 +110,19 @@
data() { data() {
return { return {
showpicker: false, showpicker: false,
disabled: true, disabled: false,
Uploadurlnumber: '', Uploadurlnumber: '',
namelang: '', namelang: '',
merchantAuditStatus: '', merchantAuditStatus: '',
columns: [ columns: [
], ],
codefailed: false, //验证码是否发送成功
store_id: '',
// 注册定时器 初始值
second: 60,
showText: true,
Recapture: '发送验证码',
form: { form: {
store_id: uni.getStorageSync('userId'), store_id: uni.getStorageSync('userId'),
title: '', title: '',
@@ -108,11 +143,12 @@
onLoad(e) { onLoad(e) {
console.log(e.store) console.log(e.store)
let data = uni.getStorageSync('form') let data = uni.getStorageSync('form')
if (data.status == '0') { console.log(data)
this.disabled = true // if (data.status == '0') {
} else { // this.disabled = true
this.disabled = false // } else {
} // this.disabled = false
// }
if (data.phone) { if (data.phone) {
this.form.store_id = uni.getStorageSync('userId') this.form.store_id = uni.getStorageSync('userId')
this.form.title = data.title this.form.title = data.title
@@ -128,14 +164,155 @@
this.form.code = data.invitation this.form.code = data.invitation
this.form.provinceno = data.provinceno this.form.provinceno = data.provinceno
this.form.provinceno_name = data.provinceno_name this.form.provinceno_name = data.provinceno_name
this.form.taxname = data.bsryxm
this.form.taxphone = data.taxphone
} }
}, },
onShow() { onShow() {
this.onShowdata() this.onShowdata()
}, },
methods: { methods: {
onShowdata(){ async CodeRegister() {
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 (this.form.provinceno == null || this.form.provinceno == '') {
uni.showToast({
title: '请选择省份编码',
icon: 'none'
});
return false;
}
if (this.form.code == null || this.form.code == '') {
uni.showToast({
title: '请填写邀请码',
icon: 'none'
});
return false;
}
if (this.form.dlzh == null || this.form.dlzh == '') {
uni.showToast({
title: '请填写电子税局账号',
icon: 'none'
});
return false;
}
if (this.form.dlmm == null || this.form.dlmm == '') {
uni.showToast({
title: '请填写电子税局账密码',
icon: 'none'
});
return false;
}
if (this.form.taxname == null || this.form.taxname == '') {
uni.showToast({
title: '请填写办税人姓名',
icon: 'none'
});
return false;
}
if (this.form.taxphone == null || this.form.taxphone == '') {
uni.showToast({
title: '请填写办税人手机号码',
icon: 'none'
});
return false;
}
let res = await this.api.invoicerregistrationszzpy(this.form)
if (res.code == 1) {
uni.showToast({
title: res.message || res.msg,
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);
this.store_id = res.data.store_id
this.codefailed = true
}
},
async saveMerchantBaseInfoV2() {
if (this.form.verification == null || this.form.verification == '') {
uni.showToast({
title: '请填写验证码',
icon: 'none'
});
return false;
}
let res = await this.api.szzpysendverification({
code: this.form.verification,
store_id: this.store_id
})
if (res.code == 1) {
this.store_id = res.data.store_id
//请求数电授权
this.szzpyauthorization()
}
},
async szzpyauthorization() {
let res = await this.api.szzpyauthorization({
store_id: this.store_id
})
if (res.code == 1) {
setTimeout(() => {
uni.cache.set('form', '');
uni.reLaunch({
url: '/pages/index/index'
});
}, 2000);
}
},
onShowdata() {
uni.request({ uni.request({
url: uni.conf.baseUrl + 'szzpy/getprovinceno', url: uni.conf.baseUrl + 'szzpy/getprovinceno',
data: this.form, data: this.form,
@@ -188,6 +365,7 @@
myLoginName: uni.cache.get('myLoginName') myLoginName: uni.cache.get('myLoginName')
}, },
success: res => { success: res => {
console.log(res)
var thisdata_ = JSON.parse(res.data); var thisdata_ = JSON.parse(res.data);
uni.showToast({ uni.showToast({
title: '上传成功', title: '上传成功',
@@ -224,124 +402,7 @@
} }
}, },
async saveMerchantBaseInfoV2() {
console.log(this.form)
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 (this.form.provinceno == null || this.form.provinceno == '') {
uni.showToast({
title: '请选择省份编码',
icon: 'none'
});
return false;
}
if (this.form.dlzh == null || this.form.dlzh == '') {
uni.showToast({
title: '请填写电子税局账号',
icon: 'none'
});
return false;
}
if (this.form.dlmm == null || this.form.dlmm == '') {
uni.showToast({
title: '请填写电子税局账密码',
icon: 'none'
});
return false;
}
if (this.form.code == null || this.form.code == '') {
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;
// }
uni.request({
url: uni.conf.baseUrl + 'store/storeinfo',
data: this.form,
method: 'POST', //请求方式,必须为大写
success: res => {
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
if (res.data.code == 1) {
setTimeout(() => {
uni.cache.set('form','');
uni.reLaunch({
url: '/pages/index/index'
});
// uni.navigateBack();
}, 2000);
}
console.log(res)
// this.form = res.data.data
console.log('接口返回------', res);
},
fail(res) {
uni.showToast({
title: res.data.message || res.data.msg,
icon: 'none',
success: () => {
uni.pro.hideLoading();
}
});
}
});
}
} }
}; };
</script> </script>
@@ -365,7 +426,22 @@
color: #333333; color: #333333;
.Box_box_input { .Box_box_input {
position: relative;
width: 60%; width: 60%;
.Box_box_inpuinputt {
padding-right: 15rpx;
}
.repeats {
width: 280rpx;
text-align: center;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #ffffff;
border-radius: 12rpx;
}
} }
} }
} }

72
pages/index/merchant.vue Normal file
View File

@@ -0,0 +1,72 @@
<template>
<view class="content">
<view class="contentitem">
<view class="contentitemone flex-between">
<view class="contentitem_o">
西安国强有限公司
</view>
<u-icon name="arrow-right" color="#999999" size="14"></u-icon>
</view>
<view class="contentitemtow">
陕西省西安市五路口A口600m
</view>
</view>
<view class="contentitem">
<view class="contentitemone flex-between">
<view class="contentitem_o">
西安国强有限公司
</view>
<u-icon name="arrow-right" color="#999999" size="14"></u-icon>
</view>
<view class="contentitemtow">
陕西省西安市五路口A口600m
</view>
</view>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
};
},
onLoad(e) {},
onShow() {},
methods: {}
};
</script>
<style lang="scss">
page {
background: #F9F9F9;
}
.content {
padding: 32rpx 28rpx;
.contentitem{
background: #FFFFFF;
padding: 32rpx 24rpx 0rpx 24rpx;
border-radius: 18rpx 18rpx 0 0;
width: 100%;
.contentitemone{
.contentitem_o{
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 32rpx;
color: #333333;
}
}
.contentitemtow{
padding-bottom: 32rpx;
margin-top: 16rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #999999;
border-bottom: 2rpx solid #E5E5E5;
}
}
}
</style>

View File

@@ -20,6 +20,9 @@
<view class="content_item_bottom" v-if="item.status == 2"> <view class="content_item_bottom" v-if="item.status == 2">
已开票 已开票
</view> </view>
<view class="content_item_bottom" style="background:#FD482C;" v-if="item.status == 3">
开票失败
</view>
<view class="content_item_bottom" style="background: #ffbb76;" v-if="item.status == 4"> <view class="content_item_bottom" style="background: #ffbb76;" v-if="item.status == 4">
已作废 已作废
</view> </view>
@@ -44,7 +47,7 @@
}, },
methods: { methods: {
clickoange(e) { clickoange(e) {
if (e.status == 2 || e.status == 4) { if (e.status == 2 || e.status == 4 || e.status == 3) {
uni.pro.navigateTo('index/orderinfo', { uni.pro.navigateTo('index/orderinfo', {
id: e.id, id: e.id,
status: e.status status: e.status
@@ -56,21 +59,12 @@
status: e.status status: e.status
}); });
} }
// uni.pro.navigateTo('index/merchant/orderinfo');
}, },
storeinvoicelist() { async storeinvoicelist() {
uni.request({ let res = await this.api.storeinvoicelist({
url: uni.conf.baseUrl + 'store/invoicelist', store_id: uni.getStorageSync('userId')
// url:'http://192.168.1.117:8084/merchant/sz/merchant/authPay', })
data: { this.list = res.data
store_id: uni.getStorageSync('userId'),
},
method: 'POST', //请求方式,必须为大写
success: res => {
this.list = res.data.data
console.log('接口返回------', res);
}
});
}, },
} }
} }

View File

@@ -10,6 +10,9 @@
<view class="content_boxtoptow" v-if="datalsit.status ==1"> <view class="content_boxtoptow" v-if="datalsit.status ==1">
开票中 开票中
</view> </view>
<view class="content_boxtoptow" style="color:#FD482C;" v-if="datalsit.status == 3">
开票失败
</view>
<view class="content_boxtoptow" style="color:#3DC85E;" v-if="datalsit.status == 2"> <view class="content_boxtoptow" style="color:#3DC85E;" v-if="datalsit.status == 2">
开票成功 开票成功
</view> </view>

View File

@@ -10,6 +10,9 @@
<view class="content_boxtoptow" v-if="datalsit.status ==1"> <view class="content_boxtoptow" v-if="datalsit.status ==1">
开票中 开票中
</view> </view>
<view class="content_boxtoptow" style="color:#FD482C;" v-if="datalsit.status == 3">
开票失败
</view>
<view class="content_boxtoptow" style="color:#3DC85E;" v-if="datalsit.status == 2"> <view class="content_boxtoptow" style="color:#3DC85E;" v-if="datalsit.status == 2">
开票成功 开票成功
</view> </view>

View File

@@ -128,9 +128,6 @@
.then(canvas => { .then(canvas => {
uni.hideLoading(); uni.hideLoading();
// const dataURL = canvas.toDataURL('image/png'); // const dataURL = canvas.toDataURL('image/png');
// this.imgShow = true;
// this.img = dataURL;
// console.log(this.img)
const dataURL = canvas.toDataURL('image/png'); const dataURL = canvas.toDataURL('image/png');
const creatDom = document.createElement('a'); const creatDom = document.createElement('a');
document.body.appendChild(creatDom); document.body.appendChild(creatDom);
@@ -138,7 +135,7 @@
console.log(creatDom.href) console.log(creatDom.href)
creatDom.download = dayjs().valueOf(); creatDom.download = dayjs().valueOf();
creatDom.click(); creatDom.click();
creatDom.remove(); // 下载之后把创建的元素删除 // creatDom.remove(); // 下载之后把创建的元素删除
}) })
.catch(err => { .catch(err => {
console.log(err); console.log(err);

View File

@@ -23,8 +23,11 @@
method: 'POST', //请求方式,必须为大写 method: 'POST', //请求方式,必须为大写
success: res => { success: res => {
let fileUrl = options.url let fileUrl = options.url
this.url = 'http://www.pfile.com.cn/api/profile/onlinePreview?url=' + this.url = 'https://www.pfile.com.cn/api/profile/onlinePreview?url=' +
encodeURIComponent(res.data.data); encodeURIComponent(res.data.data);
// this.url = 'https://view.officeapps.live.com/op/view.aspx?src=' + res.data.data
// console.log(this.url)
// window.open('https://view.officeapps.live.com/op/view.aspx?src=' + res.data.data)
} }
}); });

View File

@@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>发票</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>发票</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
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=/h5/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/h5/static/js/chunk-vendors.e1222a40.js></script><script src=/h5/static/js/index.4a116455.js></script></body></html> 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=/h5/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/h5/static/js/chunk-vendors.517faf40.js></script><script src=/h5/static/js/index.b0f06631.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-webview-webview"],{"071d":function(n,e,t){"use strict";t.d(e,"b",(function(){return u})),t.d(e,"c",(function(){return r})),t.d(e,"a",(function(){}));var u=function(){var n=this.$createElement,e=this._self._c||n;return e("v-uni-web-view",{attrs:{src:this.url}})},r=[]},"3cae":function(n,e,t){"use strict";t.r(e);var u=t("3e86"),r=t.n(u);for(var i in u)["default"].indexOf(i)<0&&function(n){t.d(e,n,(function(){return u[n]}))}(i);e["default"]=r.a},"3e86":function(n,e,t){"use strict";t("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u={data:function(){return{url:""}},onLoad:function(n){var e=this;console.log(n),1==n.tape?this.url=n.url:uni.request({url:uni.conf.baseUrl+"szzpy/downloadurl",data:{id:n.id},method:"POST",success:function(t){n.url;e.url="http://www.pfile.com.cn/api/profile/onlinePreview?url="+encodeURIComponent(t.data.data)}})}};e.default=u},9213:function(n,e,t){"use strict";t.r(e);var u=t("071d"),r=t("3cae");for(var i in r)["default"].indexOf(i)<0&&function(n){t.d(e,n,(function(){return r[n]}))}(i);var a=t("f0c5"),o=Object(a["a"])(r["default"],u["b"],u["c"],!1,null,null,null,!1,u["a"],void 0);e["default"]=o.exports}}]);