This commit is contained in:
wzz
2024-08-05 09:14:54 +08:00
parent 1dd22ddb54
commit fb7d0cc232
22 changed files with 300 additions and 1137 deletions

View File

@@ -59,4 +59,37 @@ export default {
storepaidkeywordsearch(data) { //企业关键词搜索Paid storepaidkeywordsearch(data) { //企业关键词搜索Paid
return uni.api.post("store/paidkeywordsearch", data); return uni.api.post("store/paidkeywordsearch", data);
}, },
szzpydeltaxation(data) { //删除开票人2
return uni.api.post("szzpy/deltaxation", data);
},
szzpynewissuedbylist(data) { //开票人列表2
return uni.api.post("szzpy/newissuedbylist", data);
},
enterprisestore(data) { //开票人列表2
return uni.api.post("store/enterprise", data, false);
},
storese(data) {
return uni.api.post("store/se", data);
},
storesubinvoicing(data) {
return uni.api.post("store/subinvoicing", data);
},
storeindustrylist(data) {
return uni.api.post("store/industrylist", data);
},
szzpyhurl(data) {
return uni.api.post("szzpy/h5url", data);
},
szzpygetprovinceno(data) {
return uni.api.post("szzpy/getprovinceno", data);
},
storebindinginvopush(data) {
return uni.api.post("store/bindinginvopush", data);
},
storeinvoicedetail(data) {
return uni.api.post("store/invoicedetail", data);
},
szzpydownloadurl(data) {
return uni.api.post("szzpy/downloadurl", data);
},
} }

View File

@@ -1,6 +1,6 @@
{ {
"name" : "invoice_H5", "name" : "invoice_H5",
"appid" : "__UNI__E4501F1", "appid" : "__UNI__93601F2",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",

View File

@@ -3,7 +3,6 @@
"dayjs": "^1.11.11", "dayjs": "^1.11.11",
"html2canvas": "^1.4.1", "html2canvas": "^1.4.1",
"uview-ui": "^2.0.36", "uview-ui": "^2.0.36",
"vue-pdf": "^4.3.0",
"weixin-js-sdk": "^1.6.5" "weixin-js-sdk": "^1.6.5"
} }
} }

View File

@@ -33,6 +33,12 @@
"navigationBarTitleText": "新增开票员", "navigationBarTitleText": "新增开票员",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, {
"path": "pages/index/drawerlist",
"style": {
"navigationBarTitleText": "开票员列表",
"navigationStyle": "custom"
}
}, { }, {
"path": "pages/index/notification", "path": "pages/index/notification",
"style": { "style": {

View File

@@ -44,19 +44,23 @@
<template v-if="showElse"> <template v-if="showElse">
<view class="Box_box flex-between"> <view class="Box_box flex-between">
<view class="Box_boxone">公司地址</view> <view class="Box_boxone">公司地址</view>
<view class="Box_boxtow"><input type="text" v-model="form.c_address" placeholder="请填写公司地址" /></view> <view class="Box_boxtow"><input type="text" v-model="form.c_address" placeholder="请填写公司地址" />
</view>
</view> </view>
<view class="Box_box flex-between"> <view class="Box_box flex-between">
<view class="Box_boxone">联系电话</view> <view class="Box_boxone">联系电话</view>
<view class="Box_boxtow"><input type="text" v-model="form.c_phone" placeholder="请填写公司联系电话" /></view> <view class="Box_boxtow"><input type="text" v-model="form.c_phone" placeholder="请填写公司联系电话" />
</view>
</view> </view>
<view class="Box_box flex-between"> <view class="Box_box flex-between">
<view class="Box_boxone">开户行名称</view> <view class="Box_boxone">开户行名称</view>
<view class="Box_boxtow"><input type="text" v-model="form.c_bank_name" placeholder="请填写公司开户行名称" /></view> <view class="Box_boxtow"><input type="text" v-model="form.c_bank_name"
placeholder="请填写公司开户行名称" /></view>
</view> </view>
<view class="Box_box flex-between"> <view class="Box_box flex-between">
<view class="Box_boxone">开户行账号</view> <view class="Box_boxone">开户行账号</view>
<view class="Box_boxtow"><input type="text" v-model="form.c_bank_account" placeholder="请填写公司开户行账号" /></view> <view class="Box_boxtow"><input type="text" v-model="form.c_bank_account"
placeholder="请填写公司开户行账号" /></view>
</view> </view>
</template> </template>
</template> </template>
@@ -133,7 +137,6 @@
}, },
methods: { methods: {
stopPropagation() { stopPropagation() {
console.log(1111)
this.subCategoryList = []; this.subCategoryList = [];
}, },
wxInit() { wxInit() {
@@ -168,6 +171,7 @@
// 函数执行内容 // 函数执行内容
}, 500), }, 500),
async categorySubClick(category) { async categorySubClick(category) {
console.log(category)
if (category.companyName == '以上都不是') { if (category.companyName == '以上都不是') {
let res = await this.api.storepaidkeywordsearch({ let res = await this.api.storepaidkeywordsearch({
sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe'), sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe'),
@@ -176,9 +180,14 @@
}) })
this.subCategoryList = res.data this.subCategoryList = res.data
} else { } else {
this.form.user_name = category.companyName; setTimeout(() => {
this.form.user_duty = category.creditCode; this.$set(this.form, 'user_name', category.companyName);
this.subCategoryList = []; this.$set(this.form, 'user_duty', category.creditCode);
// this.form.user_name = category.companyName;
// this.form.user_duty = category.creditCode;
this.subCategoryList = [];
}, 500)
} }
@@ -299,41 +308,7 @@
} }
// window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money" // window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money"
} }
// uni.request({
// url: 'https://invoice.sxczgkj.cn/api/' + 'user/subopeninvoice',
// data: {
// //参数
// id: this.form.id,
// open_id: this.form.open_id,
// user_name: this.form.user_name,
// user_type: this.form.user_type,
// user_duty: this.form.user_duty,
// email: this.form.email,
// img: this.form.img,
// mobile: this.form.mobile,
// notes: this.form.notes
// },
// method: 'POST', //请求方式,必须为大写
// success: res => {
// uni.showToast({
// title: res.data.message || res.data.msg,
// icon: "none",
// })
// if (res.data.code == 1) {
// setTimeout(() => {
// if (res.data.data.url) {
// window.location.href = res.data.data.url
// }
// // let data = encodeURIComponent(res.data.data.url);
// // uni.navigateTo({
// // url: '/pages/index/web?src=' + data
// // })
// }, 1000);
// // window.location.href = "https://i.hangzhouyiyao.cn/activities?appKey=3f4ca8be626445e8b306c2badafd6f46&appEntrance=1&business=money"
// }
// }
// });
}, },
clickakex(e) { clickakex(e) {
this.form.user_type = e; this.form.user_type = e;
@@ -343,34 +318,22 @@
this.form.email = ''; this.form.email = '';
this.form.mobile = ''; this.form.mobile = '';
}, },
async getOrder() { async getOrder() { //搜索值
//搜索值 let res = await this.api.enterprisestore({
uni.request({ like: this.form.user_name,
url: 'https://invoice.sxczgkj.cn/api/' + 'store/enterprise', open_id: this.form.open_id,
data: { sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe')
//参数 })
sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe'), if (res.code == 1) {
like: this.form.user_name, this.subCategoryList = res.data
open_id: this.form.open_id // this.subCategoryList = [...res.data,{'companyName':'以上都不是','creditCode':''}] ;
}, // this.subCategoryList = [...res.data,{'companyName':'以上都不是','creditCode':''}] ;
method: 'POST', //请求方式,必须为大写 // if (this.page == 1) {
success: async (res) => { // this.subCategoryList = res.data;
console.log('接口返回------', res); // } else {
setTimeout(() => { // this.subCategoryList.push(...res.data);
// if (this.page == 1) { // }
// if (res.data.data.length != 0) { }
this.subCategoryList = [...res.data.data, ...[{
companyName: '以上都不是'
}]];
// }
// } else {
// this.subCategoryList.push(...res.data.data);
// }
}, 500);
}
});
} }
} }
}; };
@@ -445,13 +408,16 @@
font-family: Source Han Sans CN-Regular, Source Han Sans CN; font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
.Box_boxone{
.Box_boxone {
width: 160rpx; width: 160rpx;
text-align: left; text-align: left;
} }
.Box_boxtow{
flex:auto; .Box_boxtow {
flex: auto;
} }
.position { .position {
position: absolute; position: absolute;
right: 0; right: 0;
@@ -511,7 +477,7 @@
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
} }
.Box_boxtowimge { .Box_boxtowimge {
display: flex; display: flex;
justify-content: center; justify-content: center;

View File

@@ -74,13 +74,14 @@
return { return {
showtext: 0, showtext: 0,
subCategoryList: [], subCategoryList: [],
open_id: '',
form: { form: {
id: '', id: '',
open_id: '',
user_type: 2, user_type: 2,
img: '', img: '',
user_name: "", user_name: "",
user_duty: "", user_duty: "",
open_id: '',
email: "", email: "",
mobile: '', mobile: '',
status_note: '', //原因备注 status_note: '', //原因备注
@@ -91,7 +92,9 @@
}, },
async onLoad(e) { async onLoad(e) {
if (e.id) { if (e.id) {
console.log(e)
this.form.id = e.id this.form.id = e.id
this.form.open_id = e.open_id
let res = await this.api.szzpyfailccho({ let res = await this.api.szzpyfailccho({
id: this.form.id, id: this.form.id,
view_type: this.form.view_type view_type: this.form.view_type
@@ -107,29 +110,11 @@
this.form.body = e.body this.form.body = e.body
this.form.open_id = e.open_id this.form.open_id = e.open_id
} }
// this.form.id = e.id
// this.form.open_id = e.open_id
// if (e.view_type == 'fail') {
// // http://localhost:8080/pages/hindex/indexs?id=7668&open_id=102132&view_type=fail
// this.form.view_type = e.view_type
// let res = await this.api.szzpyfailccho({
// id: this.form.id,
// view_type: this.form.view_type
// })
// try {
// if (res.code == 1) {
// this.form = res.data
// }
// } catch (e) {
// //TODO handle the exception
// }
// }
}, },
methods: { methods: {
onInput(e) { onInput(e) {
if (this.form.user_type == 2) { if (this.form.user_type == 2) {
if ([...e.detail.value].length >= 6) { if ([...e.detail.value].length >= 6) {
console.log(100000)
this.handleClick() this.handleClick()
} else { } else {
this.subCategoryList = [] this.subCategoryList = []
@@ -138,7 +123,6 @@
}, },
handleClick: _.debounce(function() { handleClick: _.debounce(function() {
console.log(100000)
this.getOrder() this.getOrder()
// 函数执行内容 // 函数执行内容
@@ -244,26 +228,21 @@
this.form.mobile = '' this.form.mobile = ''
}, },
async getOrder() { //搜索值 async getOrder() { //搜索值
uni.request({ console.log(this.form.open_id)
url: 'https://invoice.sxczgkj.cn/api/' + 'store/enterprise', let res = await this.api.enterprisestore({
data: { like: this.form.user_name,
//参数 open_id: this.form.open_id,
like: this.form.user_name, sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe')
open_id: this.form.open_id })
}, if (res.code == 1) {
method: 'POST', //请求方式,必须为大写 setTimeout(() => {
success: res => { if (this.page == 1) {
console.log('接口返回------', res); this.subCategoryList = res.data;
setTimeout(() => { } else {
if (this.page == 1) { this.subCategoryList.push(...res.data);
this.subCategoryList = res.data.data; }
} else { }, 500)
this.subCategoryList.push(...res.data.data); }
}
}, 500)
}
});
} }
} }
} }

View File

@@ -18,6 +18,14 @@
<view><input type="number" v-model="form.number" @input="handleInputChange" placeholder="请填写数量" <view><input type="number" v-model="form.number" @input="handleInputChange" placeholder="请填写数量"
data-key="mobile" /></view> data-key="mobile" /></view>
</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_box flex-between" @click="showpicker = true">
<view class="Box_boxlang Box_box_bouttme_item_O">*发票类型</view> <view class="Box_boxlang Box_box_bouttme_item_O">*发票类型</view>
<view class="Box_box_bouttme_item_T"> <view class="Box_box_bouttme_item_T">
@@ -91,7 +99,9 @@
mcc: uni.cache.get('keyword').code, mcc: uni.cache.get('keyword').code,
dlzh: '', dlzh: '',
dlzhid: "", dlzhid: "",
is_new: 1 is_new: 1,
ggxh: '',
dw: ''
} }
}; };
}, },
@@ -161,7 +171,7 @@
this.subCategoryList = [] this.subCategoryList = []
} }
}, },
showpickerconfirm(e) { async showpickerconfirm(e) {
if (this.form.price == null || this.form.price == '') { if (this.form.price == null || this.form.price == '') {
uni.showToast({ uni.showToast({
title: '请输入开票金额', title: '请输入开票金额',
@@ -188,20 +198,15 @@
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
} }
uni.request({ let res = await this.api.storese({
url: uni.conf.baseUrl + 'store/se', amount: this.form.price,
data: { se_amount: this.form.se_amount
//参数 })
amount: this.form.price, if (res) {
se_amount: this.form.se_amount this.form.tax_amount = res.data.tx
}, this.form.d_price = res.data.d_amount
method: 'POST', //请求方式,必须为大写 this.showpicker = false;
success: res => { }
this.form.tax_amount = res.data.data.tx
this.form.d_price = res.data.data.d_amount
this.showpicker = false;
}
});
}, },
Issuedbyconfirm(e) { Issuedbyconfirm(e) {
this.Issuedbyshowpicker = false this.Issuedbyshowpicker = false
@@ -266,37 +271,27 @@
}); });
return false; return false;
} }
uni.request({ let res = await this.api.storesubinvoicing(this.form)
url: uni.conf.baseUrl + 'store/subinvoicing', if (res) {
data: this.form, this.form = {
method: 'POST', //请求方式,必须为大写 store_id: uni.getStorageSync('userId'),
success: res => { article: uni.cache.get('keyword').name,
console.log(res) type: '',
this.form = { price: '',
store_id: uni.getStorageSync('userId'), se_amount: '',
article: uni.cache.get('keyword').name, number: '',
type: '', tax_amount: '',
price: '', d_price: '',
se_amount: '', notes: '',
number: '', mcc: uni.cache.get('keyword').code,
tax_amount: '', dlzh: '',
d_price: '', is_new: 1,
notes: '', ggxh: '',
mcc: uni.cache.get('keyword').code, dw: ''
dlzh: '',
is_new:1
}
uni.showToast({
title: res.data.message || res.data.msg,
icon: "none",
})
setTimeout(datalange => {
uni.pro.navigateTo('index/wxinvoicing', res.data.data.invoice_records)
}, 2000)
} }
uni.pro.navigateTo('index/wxinvoicing', res.data.invoice_records)
}
});
} }
} }
}; };

View File

@@ -71,8 +71,20 @@
} }
}; };
}, },
async onLoad(e) {}, async onLoad(e) {
try {
if (e.userId) {
uni.cache.set('userId', e.userId);
}
} catch (e) {
//TODO handle the exception
}
},
onShow() { onShow() {
this.list = []
this.is_end = false
this.form.status = 'loadmore'
this.form.page = 0
this.storeinvoicingrecordsthatneed() this.storeinvoicingrecordsthatneed()
}, },
methods: { methods: {

View File

@@ -27,7 +27,7 @@
<view class="popupshowone">请选择项目名称</view> <view class="popupshowone">请选择项目名称</view>
<view class="popupshowone_item" style=" border-bottom: 1rpx solid #E5E5E5;" v-if="keyword"> <view class="popupshowone_item" style=" border-bottom: 1rpx solid #E5E5E5;" v-if="keyword">
<view class="popupshowone_itemone" @click="popupshowone_itemone"> <view class="popupshowone_itemone" @click="popupshowone_itemone">
{{keyword}} {{keyword.name}}
</view> </view>
</view> </view>
<view class="popupshowonebotton" @click="businesscategory">搜索其他项目名称</view> <view class="popupshowonebotton" @click="businesscategory">搜索其他项目名称</view>
@@ -60,22 +60,15 @@
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
uni.pro.navigateTo('index/order'); uni.pro.navigateTo('index/order');
}, },
onLoad(e) { async onLoad(e) {
// #ifdef APP-PLUS // #ifdef APP-PLUS
let webView = this.$mp.page.$getAppWebview(); let webView = this.$mp.page.$getAppWebview();
webView.setTitleNViewButtonStyle(0, { webView.setTitleNViewButtonStyle(0, {
width: '70px' width: '70px'
}); });
// #endif // #endif
uni.request({ let res = await this.api.storedigitalinvoice()
url: uni.conf.baseUrl + 'store/digitalinvoice', this.columns = res.data
method: 'POST', //请求方式,必须为大写
success: res => {
console.log(res.data.data)
this.columns = res.data.data
}
});
}, },
onShow() { onShow() {
@@ -95,7 +88,7 @@
}, },
popupshowone_itemone() { popupshowone_itemone() {
this.showpopup = false this.showpopup = false
this.form.article = this.keyword this.form.article = this.keyword.name
}, },
handleInputChange() { handleInputChange() {
if (this.form.type == null || this.form.type == '') { if (this.form.type == null || this.form.type == '') {
@@ -149,30 +142,6 @@
tope:0 tope:0
}) })
}, 1000) }, 1000)
// uni.request({
// url: uni.conf.baseUrl + 'store/subinvoicing',
// data: this.form,
// method: 'POST', //请求方式,必须为大写
// success: res => {
// console.log(res)
// this.form = {
// store_id: uni.getStorageSync('userId'),
// article: '',
// type: '',
// notes: '',
// se_amount: ''
// }
// uni.showToast({
// title: res.data.message || res.data.msg,
// icon: "none",
// })
// setTimeout(datalange => {
// uni.pro.navigateTo('index/wxinvoicing', res.data.data.invoice_records)
// }, 2000)
// }
// });
} }
} }
}; };

View File

@@ -94,32 +94,26 @@
this.getOrder() this.getOrder()
}, },
async getOrder() { async getOrder() {
uni.request({ let res = await this.api.storeindustrylist({
url: uni.conf.baseUrl + 'store/industrylist', name: this.keyword,
data: { page: this.page
//参数 })
name: this.keyword, if (res) {
page: this.page setTimeout(() => {
}, if (this.page == 1) {
method: 'POST', //请求方式,必须为大写 this.subCategoryList = res.msg;
success: res => { this.loadStatus = 'loadmore'
setTimeout(() => { } else {
if (this.page == 1) { this.subCategoryList.push(...res.msg);
this.subCategoryList = res.data.msg; }
this.loadStatus = 'loadmore' if (res.msg.length == 20) {
} else { this.loadStatus = 'loadmore';
this.subCategoryList.push(...res.data.msg); } else {
} this.loadStatus = 'nomore';
if (res.data.msg.length == 20) { }
this.loadStatus = 'loadmore'; console.log('接口返回------', res);
} else { }, 500)
this.loadStatus = 'nomore'; }
}
console.log('接口返回------', res);
}, 500)
}
});
} }
}, },
}; };

View File

@@ -19,7 +19,7 @@
</view> </view>
<view class="content flex-colum" @click="drawer" v-if="improveinformation"> <view class="content flex-colum" @click="drawer" v-if="improveinformation">
<image src="@/static/item5.png" mode="aspectFill"></image> <image src="@/static/item5.png" mode="aspectFill"></image>
<text>新增开票员</text> <text>开票员列表</text>
</view> </view>
<view class="content flex-colum" @click="billingcode" v-if="improveinformation"> <view class="content flex-colum" @click="billingcode" v-if="improveinformation">
<image src="@/static/item7.png" mode="aspectFill"></image> <image src="@/static/item7.png" mode="aspectFill"></image>
@@ -43,29 +43,24 @@
</script> </script>
</wx-open-launch-weapp> --> </wx-open-launch-weapp> -->
</view> </view>
<view class="setClipboardDataclass" @click="setClipboardData" v-if="infos.deviceType != 'pc'"> <!-- <view class="setClipboardDataclass" @click="setClipboardData" v-if="infos.deviceType != 'pc'">
网页版地址:https://h5-invoice.sxczgkj.cn 网页版地址:https://h5-invoice.sxczgkj.cn
</view> </view> -->
<!-- <pdf style="width: 400px; height: 400px;" <!-- <pdf style="width: 400px; height: 400px;"
src="https://dppt.shaanxi.chinatax.gov.cn:8443/kpfw/fpjfzz/v1/exportDzfpwjEwm?Wjgs=PDF&Jym=124C&Fphm=24612000000037614300&Kprq=20240430152603&Czsj=1714461964182"> src="https://dppt.shaanxi.chinatax.gov.cn:8443/kpfw/fpjfzz/v1/exportDzfpwjEwm?Wjgs=PDF&Jym=124C&Fphm=24612000000037614300&Kprq=20240430152603&Czsj=1714461964182">
</pdf> --> </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> --> <!-- <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> </view>
</template> </template>
<script> <script>
import pdf from 'vue-pdf'
import wx from 'weixin-js-sdk'; import wx from 'weixin-js-sdk';
export default { export default {
components: {
pdf
},
data() { data() {
return { return {
improveinformation: false, improveinformation: false,
improveinformationlist: {}, improveinformationlist: {},
onLoaduserId: '', onLoaduserId: '',
onLoadtype: '',
infos: uni.getSystemInfoSync() infos: uni.getSystemInfoSync()
}; };
}, },
@@ -73,7 +68,7 @@
// alert(location.href.split('#')[0]) // alert(location.href.split('#')[0])
if (e.userId) { if (e.userId) {
// this.onLoaduserId = e.userId // this.onLoaduserId = e.userId
// this.onLoadtype = e.type//295 uni.cache.set('Type', e.type);
uni.cache.set('userId', e.userId); uni.cache.set('userId', e.userId);
} }
// this.jumpToMiniProgram() // this.jumpToMiniProgram()
@@ -92,28 +87,6 @@
this.improveinformation = true this.improveinformation = true
} }
} }
uni.request({
url: uni.conf.baseUrl + 'store/storestatus',
data: {
//参数
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
}
},
});
}, },
// 监听跳转 // 监听跳转
handleLaunch() { handleLaunch() {
@@ -207,7 +180,7 @@
uni.pro.navigateTo('index/billingcode'); uni.pro.navigateTo('index/billingcode');
}, },
drawer() { drawer() {
uni.pro.navigateTo('index/drawer'); uni.pro.navigateTo('index/drawerlist');
}, },
merchant() { merchant() {
uni.pro.navigateTo('index/merchant'); uni.pro.navigateTo('index/merchant');
@@ -221,32 +194,16 @@
indexInvoicing() { indexInvoicing() {
uni.pro.navigateTo('index/Invoicing'); uni.pro.navigateTo('index/Invoicing');
}, },
webview() { async webview() {
uni.pro.showLoading({ let res = await this.api.szzpyhurl({
title: '加载中', store_id: uni.getStorageSync('userId')
mask: true
}) })
try { if(res){
uni.request({ uni.pro.navigateTo('webview/webview', {
url: uni.conf.baseUrl + 'szzpy/h5url', url: res.data.url,
data: { tape: 1
//参数
store_id: uni.getStorageSync('userId')
},
method: 'POST', //请求方式,必须为大写
success: res => {
console.log(res.data.data.url)
uni.pro.navigateTo('webview/webview', {
url: res.data.data.url,
tape: 1
});
uni.pro.hideLoading()
}
}); });
} catch (e) {
uni.pro.hideLoading()
} }
}, },
indexorder() { indexorder() {
uni.pro.navigateTo('index/order'); uni.pro.navigateTo('index/order');

View File

@@ -1,579 +0,0 @@
<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

@@ -153,7 +153,7 @@
dlzh: '', dlzh: '',
dlmm: '', dlmm: '',
code: '', code: '',
creditCode:'' creditCode: ''
} }
}; };
}, },
@@ -347,26 +347,11 @@
}, 2000); }, 2000);
} }
}, },
onShowdata() { async onShowdata() {
uni.request({ let res = await this.api.szzpygetprovinceno(this.form)
url: uni.conf.baseUrl + 'szzpy/getprovinceno', if (res) {
data: this.form, this.columns = [res.data]
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) { confirm(e) {
console.log('confirm', e) console.log('confirm', e)

View File

@@ -44,83 +44,32 @@
}, 500) }, 500)
}, },
methods: { methods: {
storeinvoicelist() { async storeinvoicelist() {
uni.request({ let res = await this.api.storebindinginvopush({
url: uni.conf.baseUrl + 'store/bindinginvopush', store_id: uni.getStorageSync('userId')
data: { })
//参数 if(res){
store_id: uni.getStorageSync('userId') this.datalsit = res.data.qrcode;
}, console.log(this.datalsit)
method: 'POST', //请求方式,必须为大写 // 获取uQRCode实例
success: res => { var qr = new uQRCode();
this.datalsit = res.data.data.qrcode; // 设置二维码内容
console.log(this.datalsit) qr.data = res.data.qrcode;
// 获取uQRCode实例 // 设置二维码大小必须与canvas设置的宽高一致
var qr = new uQRCode(); qr.size = this.size;
// 设置二维码内容 // 调用制作二维码方法
qr.data = res.data.data.qrcode; qr.make();
// 设置二维码大小必须与canvas设置的宽高一致 // 获取canvas上下文
qr.size = this.size; var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件this必须传入
// 调用制作二维码方法 // 设置uQRCode实例的canvas上下文
qr.make(); qr.canvasContext = canvasContext;
// 获取canvas上下文 // 调用绘制方法将二维码图案绘制到canvas上
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件this必须传入 qr.drawCanvas();
// 设置uQRCode实例的canvas上下文 }
qr.canvasContext = canvasContext;
// 调用绘制方法将二维码图案绘制到canvas上
qr.drawCanvas();
}
});
}, },
savealbum(e) { savealbum(e) {
uni.pro.navigateBack(); uni.pro.navigateBack();
}, },
// savealbum(e) {
// // #ifdef APP
// uni.showLoading({
// //加载框
// title: '保存中...',
// mask: true
// });
// var pages = getCurrentPages();
// var page = pages[pages.length - 1];
// console.log('当前页' + pages.length - 1);
// var bitmap = null;
// var currentWebview = page.$getAppWebview();
// bitmap = new plus.nativeObj.Bitmap('amway_img');
// // 将webview内容绘制到Bitmap对象中
// currentWebview.draw(
// bitmap,
// function() {
// console.log('截屏绘制图片成功');
// bitmap.save(
// '_doc/a.jpg', {},
// function(i) {
// console.log('保存图片成功:' + JSON.stringify(i));
// uni.saveImageToPhotosAlbum({
// filePath: i.target,
// success: function() {
// bitmap.clear(); //销毁Bitmap图片
// uni.showToast({
// title: '保存图片成功',
// mask: false,
// duration: 1500
// });
// uni.hideLoading();
// }
// });
// },
// function(e) {
// console.log('保存图片失败:' + JSON.stringify(e));
// }
// );
// },
// function(e) {
// console.log('截屏绘制图片失败:' + JSON.stringify(e));
// }
// );
// // #endif
// },
} }
} }
</script> </script>

View File

@@ -73,7 +73,6 @@
methods: { methods: {
print() { print() {
let LODOP = getLodop(); let LODOP = getLodop();
console.log(LODOP)
if (LODOP == null) { if (LODOP == null) {
alert('请先安装打印控件') alert('请先安装打印控件')
return; return;
@@ -82,50 +81,36 @@
// 设置打印纸大小 // 设置打印纸大小
// LODOP.SET_PRINT_PAGESIZE(1, 800, '50px', ""); // LODOP.SET_PRINT_PAGESIZE(1, 800, '50px', "");
LODOP.SET_PRINT_PAGESIZE(1, 800, '120px', ""); LODOP.SET_PRINT_PAGESIZE(1, 800, '120px', "");
// // 二维码控制大小 // // 二维码控制大小
LODOP.ADD_PRINT_BARCODE('', '30px', '150px', '150px', "QRCode", 'https://www.baidu.com'); //打印产品代码条码 LODOP.ADD_PRINT_BARCODE('', '30px', '150px', '150px', "QRCode", 'https://www.baidu.com'); //打印产品代码条码
// LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Width "); //设置打印风格,这里是等宽打印
// LODOP.SET_PRINTER_INDEX("GP-58MB Series"); //设置默认打印机(这里用的是打印机名称)
// // 文字内容
// var strHTML = document.getElementById('viewtext')
// console.log(strHTML.innerHTML)
// LODOP.ADD_PRINT_HTM('150px', '5px', "100%", "100%",
// `<div style="width: 100%;font-size: 12px; ">销售方名称:${this.ID}</div><div style="width: 100%;font-size: 12px; margin-top:6px;">开票金额:${this.ID}</div><div style="width: 100%;font-size: 12px; margin-top:6px;">生成时间:${this.ID}</div><div style="width: 100%;font-size: 12px; margin-top:6px;">生成时间:${this.ID}</div><div style="width: 100%;font-size: 12px; margin-top:6px;">二维码有效期:30天</div><div style="width: 100%;font-size: 14px; margin-top: 15px;">您可以使用微信,扫码开票</div>`
// );
LODOP.SET_LICENSES("", "DCFF409304DFCEB3E2C644BF96CD0720", "", "");
// LODOP.PREVIEW(); //带预览的打印 // LODOP.PREVIEW(); //带预览的打印
LODOP.PRINT() LODOP.PRINT()
}, },
storeinvoicelist() { async storeinvoicelist() {
uni.request({ let res = await this.api.storebindinginvopush({
url: uni.conf.baseUrl + 'store/bindinginvopush', store_id: uni.getStorageSync('userId')
data: { })
//参数 if (res) {
store_id: uni.getStorageSync('userId') this.datalsit = res.data.qrcode;
}, console.log(this.datalsit)
method: 'POST', //请求方式,必须为大写 // 获取uQRCode实例
success: res => { var qr = new uQRCode();
this.datalsit = res.data.data.qrcode; // 设置二维码内容
// 获取uQRCode实例 qr.data = res.data.qrcode;
var qr = new uQRCode(); // 设置二维码大小必须与canvas设置的宽高一致
// 设置二维码内容 qr.size = this.size;
qr.data = res.data.data.qrcode; // 调用制作二维码方法
// 设置二维码大小必须与canvas设置的宽高一致 qr.make();
qr.size = this.size; // 获取canvas上下文
// 调用制作二维码方法 var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件this必须传入
qr.make(); // 设置uQRCode实例的canvas上下文
// 获取canvas上下文 qr.canvasContext = canvasContext;
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件this必须传入 // 调用绘制方法将二维码图案绘制到canvas上
// 设置uQRCode实例的canvas上下文 qr.drawCanvas();
qr.canvasContext = canvasContext; }
// 调用绘制方法将二维码图案绘制到canvas上
qr.drawCanvas();
}
});
}, },
savealbum(e) { savealbum(e) {
uni.pro.navigateBack(); uni.pro.navigateBack();

View File

@@ -62,31 +62,27 @@ export default {
this.storeinvoicelist(); this.storeinvoicelist();
}, },
methods: { methods: {
storeinvoicelist() { async storeinvoicelist() {
uni.request({ let res = await this.api.storeinvoicedetail({
url: uni.conf.baseUrl + 'store/invoicedetail', id: this.ID
data: { })
id: this.ID if(res){
}, this.datalsit = res.data;
method: 'POST', //请求方式,必须为大写 // 获取uQRCode实例
success: (res) => { var qr = new uQRCode();
this.datalsit = res.data.data; // 设置二维码内容
// 获取uQRCode实例 qr.data = res.data.url;
var qr = new uQRCode(); // 设置二维码大小必须与canvas设置的宽高一致
// 设置二维码内容 qr.size = this.size;
qr.data = res.data.data.url; // 调用制作二维码方法
// 设置二维码大小必须与canvas设置的宽高一致 qr.make();
qr.size = this.size; // 获取canvas上下文
// 调用制作二维码方法 var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件this必须传入
qr.make(); // 设置uQRCode实例的canvas上下文
// 获取canvas上下文 qr.canvasContext = canvasContext;
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件this必须传入 // 调用绘制方法将二维码图案绘制到canvas上
// 设置uQRCode实例的canvas上下文 qr.drawCanvas();
qr.canvasContext = canvasContext; }
// 调用绘制方法将二维码图案绘制到canvas上
qr.drawCanvas();
}
});
}, },
savealbum(e) { savealbum(e) {
uni.pro.navigateBack(); uni.pro.navigateBack();

View File

@@ -90,30 +90,6 @@
if(res.code = 1){ if(res.code = 1){
this.datalsit = res.data; this.datalsit = res.data;
} }
// uni.request({
// url: uni.conf.baseUrl + 'store/invoicedetail',
// data: {
// id: this.ID,
// },
// method: 'POST', //请求方式,必须为大写
// success: res => {
// this.datalsit = res.data.data;
// // 获取uQRCode实例
// var qr = new uQRCode();
// // 设置二维码内容
// qr.data = res.data.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();
// }
// });
}, },
// 预览图片 // 预览图片
previewImage(e) { previewImage(e) {

View File

@@ -88,32 +88,27 @@
}, 500) }, 500)
}, },
methods: { methods: {
storeinvoicelist() { async storeinvoicelist() {
uni.request({ let res = await this.api.storeinvoicedetail({
url: uni.conf.baseUrl + 'store/invoicedetail', id: this.ID
// url:'http://192.168.1.117:8084/wap/merchant/authPay', })
data: { if(res){
id: this.ID, this.datalsit = res.data;
}, // 获取uQRCode实例
method: 'POST', //请求方式,必须为大写 var qr = new uQRCode();
success: res => { // 设置二维码内容
this.datalsit = res.data.data; qr.data = res.data.url;
// 获取uQRCode实例 // 设置二维码大小必须与canvas设置的宽高一致
var qr = new uQRCode(); qr.size = this.size;
// 设置二维码内容 // 调用制作二维码方法
qr.data = res.data.data.url; qr.make();
// 设置二维码大小必须与canvas设置的宽高一致 // 获取canvas上下文
qr.size = this.size; var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件this必须传入
// 调用制作二维码方法 // 设置uQRCode实例的canvas上下文
qr.make(); qr.canvasContext = canvasContext;
// 获取canvas上下文 // 调用绘制方法将二维码图案绘制到canvas上
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件this必须传入 qr.drawCanvas();
// 设置uQRCode实例的canvas上下文 }
qr.canvasContext = canvasContext;
// 调用绘制方法将二维码图案绘制到canvas上
qr.drawCanvas();
}
});
}, },
savealbum(e) { savealbum(e) {
uni.pro.navigateBack(); uni.pro.navigateBack();

View File

@@ -224,26 +224,6 @@
} }
}, 1000) }, 1000)
}, },
requestlang() {
uni.request({
url: uni.conf.baseUrl + 'wap/merchant/authPay',
// url:'http://192.168.1.117:8084/wap/merchant/authPay',
data: {
//参数
userAppId: 2,
channel: 1,
qrNo: 1,
view: 1
},
header: {
'user-agent': 'micromessenger' //自定义请求头信息
},
method: 'GET', //请求方式,必须为大写
success: res => {
console.log('接口返回------', res);
}
});
},
} }
}; };
</script> </script>

View File

@@ -9,39 +9,27 @@
url: '', //PDF路径 url: '', //PDF路径
}; };
}, },
onLoad(options) { async onLoad(options) {
console.log(options) console.log(options)
if (options.tape == 1) { if (options.tape == 1) {
this.url = options.url; this.url = options.url;
} else { } else {
uni.request({ let res = await this.api.szzpydownloadurl({
url: uni.conf.baseUrl + 'szzpy/downloadurl', id: options.id
data: { })
//参数 if (res) {
id: options.id let fileUrl = options.url
}, var user = navigator.userAgent;
method: 'POST', //请求方式,必须为大写 //android端
success: res => { var isAndroid = user.indexOf("Android") > -1 || user.indexOf("Adr") > -1;
let fileUrl = options.url //ios端
// this.url = 'https://www.pfile.com.cn/api/profile/onlinePreview?url=' + var isiOS = !!user.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
// encodeURIComponent(res.data.data); if (isAndroid) {
window.open(res.data)
// this.url = 'https://view.officeapps.live.com/op/view.aspx?src=' + res.data.data } else if (isiOS) {
// console.log(this.url) window.location.href = res.data;
var user = navigator.userAgent;
//android端
var isAndroid = user.indexOf("Android") > -1 || user.indexOf("Adr") > -1;
//ios端
var isiOS = !!user.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
if(isAndroid) {
window.open(res.data.data)
}else if(isiOS) {
window.location.href = res.data.data;
}
// window.open(res.data.data)
} }
}); }
} }
} }

View File

@@ -3,4 +3,4 @@
document.write( document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + '<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' : '') + (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="/chunk-vendors.js?v=1717141437954"></script><script src="/index.js?v=1717141437954"></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.eb42db61.js></script></body></html>

View File

@@ -1,22 +0,0 @@
if (process.env.UNI_PLATFORM === 'h5') {
// 由于这种方式的打包,会导致编译生成微信小程序(只验证了微信小程序)无法正常使用,所以必须分开
let filePath = ''
let Timestamp = new Date().getTime()
module.exports = {
// ... webpack 相关配置
filenameHashing: false,
configureWebpack: { // webpack 配置 解决js缓存的问题目前只适配H5端打包
output: { // 输出重构 打包编译后的 文件目录 文件名称 【模块名称.时间戳】
filename: `${filePath}[name].js?v=${Timestamp}`,
chunkFilename: `${filePath}[name].js?v=${Timestamp}`
},
}
}
} else {
// 其他打包需要的相关配置
//由于vue-cli打包vue文件的时候静态文件会默认会带有hash值我们首先要去掉hash值。
module.exports = {
// ... webpack 相关配置
filenameHashing: false
}
}