From fb7d0cc232fc05d09196b581b4697f8c17e73392 Mon Sep 17 00:00:00 2001
From: wzz <1144797966@qq.com>
Date: Mon, 5 Aug 2024 09:14:54 +0800
Subject: [PATCH] 1
---
common/js/api.js | 33 ++
manifest.json | 2 +-
package.json | 1 -
pages.json | 6 +
pages/hindex/index.vue | 114 ++---
pages/hindex/indexs.vue | 59 +--
pages/index/Invoicing.vue | 85 ++--
pages/index/auditbilling.vue | 14 +-
pages/index/billingcode.vue | 41 +-
pages/index/businesscategory.vue | 46 +-
pages/index/index.vue | 71 +---
pages/index/information - 副本.vue | 579 --------------------------
pages/index/information.vue | 27 +-
pages/index/notification.vue | 95 +----
pages/index/notificationdd.vue | 59 +--
pages/index/orderinfo.vue | 46 +-
pages/index/orderinfoauditbilling.vue | 24 --
pages/index/orderinfos.vue | 47 +--
pages/index/wxinvoicing.vue | 20 -
pages/webview/webview.vue | 44 +-
unpackage/dist/build/web/index.html | 2 +-
vue.config.js | 22 -
22 files changed, 300 insertions(+), 1137 deletions(-)
delete mode 100644 pages/index/information - 副本.vue
delete mode 100644 vue.config.js
diff --git a/common/js/api.js b/common/js/api.js
index fc1887d..95a57ef 100644
--- a/common/js/api.js
+++ b/common/js/api.js
@@ -59,4 +59,37 @@ export default {
storepaidkeywordsearch(data) { //企业关键词搜索Paid
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);
+ },
}
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index 4409fad..3227787 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,6 @@
{
"name" : "invoice_H5",
- "appid" : "__UNI__E4501F1",
+ "appid" : "__UNI__93601F2",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
diff --git a/package.json b/package.json
index 32b87a8..e83ed7f 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,6 @@
"dayjs": "^1.11.11",
"html2canvas": "^1.4.1",
"uview-ui": "^2.0.36",
- "vue-pdf": "^4.3.0",
"weixin-js-sdk": "^1.6.5"
}
}
diff --git a/pages.json b/pages.json
index e9bdd8d..99b58db 100644
--- a/pages.json
+++ b/pages.json
@@ -33,6 +33,12 @@
"navigationBarTitleText": "新增开票员",
"navigationStyle": "custom"
}
+ }, {
+ "path": "pages/index/drawerlist",
+ "style": {
+ "navigationBarTitleText": "开票员列表",
+ "navigationStyle": "custom"
+ }
}, {
"path": "pages/index/notification",
"style": {
diff --git a/pages/hindex/index.vue b/pages/hindex/index.vue
index b575e78..e533f2d 100644
--- a/pages/hindex/index.vue
+++ b/pages/hindex/index.vue
@@ -44,19 +44,23 @@
公司地址
-
+
+
联系电话
-
+
+
开户行名称
-
+
开户行账号
-
+
@@ -133,7 +137,6 @@
},
methods: {
stopPropagation() {
- console.log(1111)
this.subCategoryList = [];
},
wxInit() {
@@ -168,6 +171,7 @@
// 函数执行内容
}, 500),
async categorySubClick(category) {
+ console.log(category)
if (category.companyName == '以上都不是') {
let res = await this.api.storepaidkeywordsearch({
sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe'),
@@ -176,9 +180,14 @@
})
this.subCategoryList = res.data
} else {
- this.form.user_name = category.companyName;
- this.form.user_duty = category.creditCode;
- this.subCategoryList = [];
+ setTimeout(() => {
+ this.$set(this.form, 'user_name', category.companyName);
+ 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"
}
- // 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) {
this.form.user_type = e;
@@ -343,34 +318,22 @@
this.form.email = '';
this.form.mobile = '';
},
- async getOrder() {
- //搜索值
- uni.request({
- url: 'https://invoice.sxczgkj.cn/api/' + 'store/enterprise',
- data: {
- //参数
- sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe'),
- like: this.form.user_name,
- open_id: this.form.open_id
- },
- method: 'POST', //请求方式,必须为大写
- success: async (res) => {
- console.log('接口返回------', res);
- setTimeout(() => {
- // if (this.page == 1) {
- // if (res.data.data.length != 0) {
- this.subCategoryList = [...res.data.data, ...[{
- companyName: '以上都不是'
- }]];
- // }
- // } else {
- // this.subCategoryList.push(...res.data.data);
- // }
-
- }, 500);
-
- }
- });
+ async getOrder() { //搜索值
+ let res = await this.api.enterprisestore({
+ like: this.form.user_name,
+ open_id: this.form.open_id,
+ sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe')
+ })
+ if (res.code == 1) {
+ this.subCategoryList = res.data
+ // this.subCategoryList = [...res.data,{'companyName':'以上都不是','creditCode':''}] ;
+ // this.subCategoryList = [...res.data,{'companyName':'以上都不是','creditCode':''}] ;
+ // if (this.page == 1) {
+ // this.subCategoryList = res.data;
+ // } else {
+ // this.subCategoryList.push(...res.data);
+ // }
+ }
}
}
};
@@ -445,13 +408,16 @@
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #333333;
- .Box_boxone{
+
+ .Box_boxone {
width: 160rpx;
text-align: left;
}
- .Box_boxtow{
- flex:auto;
+
+ .Box_boxtow {
+ flex: auto;
}
+
.position {
position: absolute;
right: 0;
@@ -511,7 +477,7 @@
font-size: 28rpx;
color: #333333;
}
-
+
.Box_boxtowimge {
display: flex;
justify-content: center;
diff --git a/pages/hindex/indexs.vue b/pages/hindex/indexs.vue
index c4e8c9a..b8c480e 100644
--- a/pages/hindex/indexs.vue
+++ b/pages/hindex/indexs.vue
@@ -74,13 +74,14 @@
return {
showtext: 0,
subCategoryList: [],
+ open_id: '',
form: {
id: '',
- open_id: '',
user_type: 2,
img: '',
user_name: "",
user_duty: "",
+ open_id: '',
email: "",
mobile: '',
status_note: '', //原因备注
@@ -91,7 +92,9 @@
},
async onLoad(e) {
if (e.id) {
+ console.log(e)
this.form.id = e.id
+ this.form.open_id = e.open_id
let res = await this.api.szzpyfailccho({
id: this.form.id,
view_type: this.form.view_type
@@ -107,29 +110,11 @@
this.form.body = e.body
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: {
onInput(e) {
if (this.form.user_type == 2) {
if ([...e.detail.value].length >= 6) {
- console.log(100000)
this.handleClick()
} else {
this.subCategoryList = []
@@ -138,7 +123,6 @@
},
handleClick: _.debounce(function() {
- console.log(100000)
this.getOrder()
// 函数执行内容
@@ -244,26 +228,21 @@
this.form.mobile = ''
},
async getOrder() { //搜索值
- uni.request({
- url: 'https://invoice.sxczgkj.cn/api/' + 'store/enterprise',
- data: {
- //参数
- like: this.form.user_name,
- open_id: this.form.open_id
- },
- method: 'POST', //请求方式,必须为大写
- success: res => {
- console.log('接口返回------', res);
- setTimeout(() => {
- if (this.page == 1) {
- this.subCategoryList = res.data.data;
- } else {
- this.subCategoryList.push(...res.data.data);
- }
- }, 500)
-
- }
- });
+ console.log(this.form.open_id)
+ let res = await this.api.enterprisestore({
+ like: this.form.user_name,
+ open_id: this.form.open_id,
+ sign: uni.utils.md5(this.form.user_name + 'd2e862a1-02b5-4405-8c69-c74ca871bcfe')
+ })
+ if (res.code == 1) {
+ setTimeout(() => {
+ if (this.page == 1) {
+ this.subCategoryList = res.data;
+ } else {
+ this.subCategoryList.push(...res.data);
+ }
+ }, 500)
+ }
}
}
}
diff --git a/pages/index/Invoicing.vue b/pages/index/Invoicing.vue
index 43b3cda..d287a83 100644
--- a/pages/index/Invoicing.vue
+++ b/pages/index/Invoicing.vue
@@ -18,6 +18,14 @@
+
+ 规格型号
+
+
+
+ 单位
+
+
*发票类型
@@ -91,7 +99,9 @@
mcc: uni.cache.get('keyword').code,
dlzh: '',
dlzhid: "",
- is_new: 1
+ is_new: 1,
+ ggxh: '',
+ dw: ''
}
};
},
@@ -161,7 +171,7 @@
this.subCategoryList = []
}
},
- showpickerconfirm(e) {
+ async showpickerconfirm(e) {
if (this.form.price == null || this.form.price == '') {
uni.showToast({
title: '请输入开票金额',
@@ -188,20 +198,15 @@
} catch (e) {
//TODO handle the exception
}
- uni.request({
- url: uni.conf.baseUrl + 'store/se',
- data: {
- //参数
- amount: this.form.price,
- se_amount: this.form.se_amount
- },
- method: 'POST', //请求方式,必须为大写
- success: res => {
- this.form.tax_amount = res.data.data.tx
- this.form.d_price = res.data.data.d_amount
- this.showpicker = false;
- }
- });
+ let res = await this.api.storese({
+ amount: this.form.price,
+ se_amount: this.form.se_amount
+ })
+ if (res) {
+ this.form.tax_amount = res.data.tx
+ this.form.d_price = res.data.d_amount
+ this.showpicker = false;
+ }
},
Issuedbyconfirm(e) {
this.Issuedbyshowpicker = false
@@ -266,37 +271,27 @@
});
return false;
}
- 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: uni.cache.get('keyword').name,
- type: '',
- price: '',
- se_amount: '',
- number: '',
- tax_amount: '',
- d_price: '',
- notes: '',
- mcc: uni.cache.get('keyword').code,
- 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)
-
+ let res = await this.api.storesubinvoicing(this.form)
+ if (res) {
+ this.form = {
+ store_id: uni.getStorageSync('userId'),
+ article: uni.cache.get('keyword').name,
+ type: '',
+ price: '',
+ se_amount: '',
+ number: '',
+ tax_amount: '',
+ d_price: '',
+ notes: '',
+ mcc: uni.cache.get('keyword').code,
+ dlzh: '',
+ is_new: 1,
+ ggxh: '',
+ dw: ''
}
+ uni.pro.navigateTo('index/wxinvoicing', res.data.invoice_records)
+ }
- });
}
}
};
diff --git a/pages/index/auditbilling.vue b/pages/index/auditbilling.vue
index 1e1af78..dffef57 100644
--- a/pages/index/auditbilling.vue
+++ b/pages/index/auditbilling.vue
@@ -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() {
+ this.list = []
+ this.is_end = false
+ this.form.status = 'loadmore'
+ this.form.page = 0
this.storeinvoicingrecordsthatneed()
},
methods: {
diff --git a/pages/index/billingcode.vue b/pages/index/billingcode.vue
index 3ad726d..d42f4fc 100644
--- a/pages/index/billingcode.vue
+++ b/pages/index/billingcode.vue
@@ -27,7 +27,7 @@
@@ -60,22 +60,15 @@
onNavigationBarButtonTap() {
uni.pro.navigateTo('index/order');
},
- onLoad(e) {
+ async onLoad(e) {
// #ifdef APP-PLUS
let webView = this.$mp.page.$getAppWebview();
webView.setTitleNViewButtonStyle(0, {
width: '70px'
});
// #endif
- uni.request({
- url: uni.conf.baseUrl + 'store/digitalinvoice',
-
- method: 'POST', //请求方式,必须为大写
- success: res => {
- console.log(res.data.data)
- this.columns = res.data.data
- }
- });
+ let res = await this.api.storedigitalinvoice()
+ this.columns = res.data
},
onShow() {
@@ -95,7 +88,7 @@
},
popupshowone_itemone() {
this.showpopup = false
- this.form.article = this.keyword
+ this.form.article = this.keyword.name
},
handleInputChange() {
if (this.form.type == null || this.form.type == '') {
@@ -149,30 +142,6 @@
tope:0
})
}, 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)
-
- // }
-
- // });
}
}
};
diff --git a/pages/index/businesscategory.vue b/pages/index/businesscategory.vue
index bfdbf48..49c6b3c 100644
--- a/pages/index/businesscategory.vue
+++ b/pages/index/businesscategory.vue
@@ -94,32 +94,26 @@
this.getOrder()
},
async getOrder() {
- uni.request({
- url: uni.conf.baseUrl + 'store/industrylist',
- data: {
- //参数
- name: this.keyword,
- page: this.page
- },
- method: 'POST', //请求方式,必须为大写
- success: res => {
- setTimeout(() => {
- if (this.page == 1) {
- this.subCategoryList = res.data.msg;
- this.loadStatus = 'loadmore'
- } else {
- this.subCategoryList.push(...res.data.msg);
- }
- if (res.data.msg.length == 20) {
- this.loadStatus = 'loadmore';
- } else {
- this.loadStatus = 'nomore';
- }
- console.log('接口返回------', res);
- }, 500)
-
- }
- });
+ let res = await this.api.storeindustrylist({
+ name: this.keyword,
+ page: this.page
+ })
+ if (res) {
+ setTimeout(() => {
+ if (this.page == 1) {
+ this.subCategoryList = res.msg;
+ this.loadStatus = 'loadmore'
+ } else {
+ this.subCategoryList.push(...res.msg);
+ }
+ if (res.msg.length == 20) {
+ this.loadStatus = 'loadmore';
+ } else {
+ this.loadStatus = 'nomore';
+ }
+ console.log('接口返回------', res);
+ }, 500)
+ }
}
},
};
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 5788bb9..c346eca 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -19,7 +19,7 @@
- 新增开票员
+ 开票员列表
@@ -43,29 +43,24 @@
-->
-
+
+
-
+
-
-
\ No newline at end of file
diff --git a/pages/index/information.vue b/pages/index/information.vue
index 0ef22b4..4d8b55c 100644
--- a/pages/index/information.vue
+++ b/pages/index/information.vue
@@ -153,7 +153,7 @@
dlzh: '',
dlmm: '',
code: '',
- creditCode:''
+ creditCode: ''
}
};
},
@@ -347,26 +347,11 @@
}, 2000);
}
},
- 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();
- }
- });
- }
- });
+ async onShowdata() {
+ let res = await this.api.szzpygetprovinceno(this.form)
+ if (res) {
+ this.columns = [res.data]
+ }
},
confirm(e) {
console.log('confirm', e)
diff --git a/pages/index/notification.vue b/pages/index/notification.vue
index a09950f..fe04b19 100644
--- a/pages/index/notification.vue
+++ b/pages/index/notification.vue
@@ -44,83 +44,32 @@
}, 500)
},
methods: {
- storeinvoicelist() {
- uni.request({
- url: uni.conf.baseUrl + 'store/bindinginvopush',
- data: {
- //参数
- store_id: uni.getStorageSync('userId')
- },
- method: 'POST', //请求方式,必须为大写
- success: res => {
- this.datalsit = res.data.data.qrcode;
- console.log(this.datalsit)
- // 获取uQRCode实例
- var qr = new uQRCode();
- // 设置二维码内容
- qr.data = res.data.data.qrcode;
- // 设置二维码大小,必须与canvas设置的宽高一致
- qr.size = this.size;
- // 调用制作二维码方法
- qr.make();
- // 获取canvas上下文
- var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
- // 设置uQRCode实例的canvas上下文
- qr.canvasContext = canvasContext;
- // 调用绘制方法将二维码图案绘制到canvas上
- qr.drawCanvas();
- }
- });
+ async storeinvoicelist() {
+ let res = await this.api.storebindinginvopush({
+ store_id: uni.getStorageSync('userId')
+ })
+ if(res){
+ this.datalsit = res.data.qrcode;
+ console.log(this.datalsit)
+ // 获取uQRCode实例
+ var qr = new uQRCode();
+ // 设置二维码内容
+ qr.data = res.data.qrcode;
+ // 设置二维码大小,必须与canvas设置的宽高一致
+ qr.size = this.size;
+ // 调用制作二维码方法
+ qr.make();
+ // 获取canvas上下文
+ var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
+ // 设置uQRCode实例的canvas上下文
+ qr.canvasContext = canvasContext;
+ // 调用绘制方法将二维码图案绘制到canvas上
+ qr.drawCanvas();
+ }
},
savealbum(e) {
uni.pro.navigateBack();
},
- // savealbum(e) {
- // // #ifdef APP
- // uni.showLoading({
- // //加载框
- // title: '保存中...',
- // mask: true
- // });
- // var pages = getCurrentPages();
- // var page = pages[pages.length - 1];
- // console.log('当前页' + pages.length - 1);
- // var bitmap = null;
- // var currentWebview = page.$getAppWebview();
- // bitmap = new plus.nativeObj.Bitmap('amway_img');
- // // 将webview内容绘制到Bitmap对象中
- // currentWebview.draw(
- // bitmap,
- // function() {
- // console.log('截屏绘制图片成功');
- // bitmap.save(
- // '_doc/a.jpg', {},
- // function(i) {
- // console.log('保存图片成功:' + JSON.stringify(i));
- // uni.saveImageToPhotosAlbum({
- // filePath: i.target,
- // success: function() {
- // bitmap.clear(); //销毁Bitmap图片
- // uni.showToast({
- // title: '保存图片成功',
- // mask: false,
- // duration: 1500
- // });
- // uni.hideLoading();
- // }
- // });
- // },
- // function(e) {
- // console.log('保存图片失败:' + JSON.stringify(e));
- // }
- // );
- // },
- // function(e) {
- // console.log('截屏绘制图片失败:' + JSON.stringify(e));
- // }
- // );
- // // #endif
- // },
}
}
diff --git a/pages/index/notificationdd.vue b/pages/index/notificationdd.vue
index ce57ab3..ffb19cc 100644
--- a/pages/index/notificationdd.vue
+++ b/pages/index/notificationdd.vue
@@ -73,7 +73,6 @@
methods: {
print() {
let LODOP = getLodop();
- console.log(LODOP)
if (LODOP == null) {
alert('请先安装打印控件')
return;
@@ -82,50 +81,36 @@
// 设置打印纸大小
// LODOP.SET_PRINT_PAGESIZE(1, 800, '50px', "");
LODOP.SET_PRINT_PAGESIZE(1, 800, '120px', "");
-
// // 二维码控制大小
LODOP.ADD_PRINT_BARCODE('', '30px', '150px', '150px', "QRCode", 'https://www.baidu.com'); //打印产品代码条码
- // LODOP.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%",
- // `销售方名称:${this.ID}
开票金额:${this.ID}
生成时间:${this.ID}
生成时间:${this.ID}
二维码有效期:30天
您可以使用微信,扫码开票
`
- // );
- LODOP.SET_LICENSES("", "DCFF409304DFCEB3E2C644BF96CD0720", "", "");
// LODOP.PREVIEW(); //带预览的打印
LODOP.PRINT()
},
- storeinvoicelist() {
- uni.request({
- url: uni.conf.baseUrl + 'store/bindinginvopush',
- data: {
- //参数
- store_id: uni.getStorageSync('userId')
- },
- method: 'POST', //请求方式,必须为大写
- success: res => {
- this.datalsit = res.data.data.qrcode;
- // 获取uQRCode实例
- var qr = new uQRCode();
- // 设置二维码内容
- qr.data = res.data.data.qrcode;
- // 设置二维码大小,必须与canvas设置的宽高一致
- qr.size = this.size;
- // 调用制作二维码方法
- qr.make();
- // 获取canvas上下文
- var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
- // 设置uQRCode实例的canvas上下文
- qr.canvasContext = canvasContext;
- // 调用绘制方法将二维码图案绘制到canvas上
- qr.drawCanvas();
- }
- });
+ async storeinvoicelist() {
+ let res = await this.api.storebindinginvopush({
+ store_id: uni.getStorageSync('userId')
+ })
+ if (res) {
+ this.datalsit = res.data.qrcode;
+ console.log(this.datalsit)
+ // 获取uQRCode实例
+ var qr = new uQRCode();
+ // 设置二维码内容
+ qr.data = res.data.qrcode;
+ // 设置二维码大小,必须与canvas设置的宽高一致
+ qr.size = this.size;
+ // 调用制作二维码方法
+ qr.make();
+ // 获取canvas上下文
+ var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
+ // 设置uQRCode实例的canvas上下文
+ qr.canvasContext = canvasContext;
+ // 调用绘制方法将二维码图案绘制到canvas上
+ qr.drawCanvas();
+ }
},
savealbum(e) {
uni.pro.navigateBack();
diff --git a/pages/index/orderinfo.vue b/pages/index/orderinfo.vue
index 8d9c2c9..b257880 100644
--- a/pages/index/orderinfo.vue
+++ b/pages/index/orderinfo.vue
@@ -62,31 +62,27 @@ export default {
this.storeinvoicelist();
},
methods: {
- storeinvoicelist() {
- 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();
- }
- });
+ async storeinvoicelist() {
+ let res = await this.api.storeinvoicedetail({
+ id: this.ID
+ })
+ if(res){
+ this.datalsit = res.data;
+ // 获取uQRCode实例
+ var qr = new uQRCode();
+ // 设置二维码内容
+ qr.data = res.data.url;
+ // 设置二维码大小,必须与canvas设置的宽高一致
+ qr.size = this.size;
+ // 调用制作二维码方法
+ qr.make();
+ // 获取canvas上下文
+ var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
+ // 设置uQRCode实例的canvas上下文
+ qr.canvasContext = canvasContext;
+ // 调用绘制方法将二维码图案绘制到canvas上
+ qr.drawCanvas();
+ }
},
savealbum(e) {
uni.pro.navigateBack();
diff --git a/pages/index/orderinfoauditbilling.vue b/pages/index/orderinfoauditbilling.vue
index 9969cfc..7ec5020 100644
--- a/pages/index/orderinfoauditbilling.vue
+++ b/pages/index/orderinfoauditbilling.vue
@@ -90,30 +90,6 @@
if(res.code = 1){
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) {
diff --git a/pages/index/orderinfos.vue b/pages/index/orderinfos.vue
index c02bae7..78a3991 100644
--- a/pages/index/orderinfos.vue
+++ b/pages/index/orderinfos.vue
@@ -88,32 +88,27 @@
}, 500)
},
methods: {
- storeinvoicelist() {
- uni.request({
- url: uni.conf.baseUrl + 'store/invoicedetail',
- // url:'http://192.168.1.117:8084/wap/merchant/authPay',
- 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();
- }
- });
+ async storeinvoicelist() {
+ let res = await this.api.storeinvoicedetail({
+ id: this.ID
+ })
+ if(res){
+ this.datalsit = res.data;
+ // 获取uQRCode实例
+ var qr = new uQRCode();
+ // 设置二维码内容
+ qr.data = res.data.url;
+ // 设置二维码大小,必须与canvas设置的宽高一致
+ qr.size = this.size;
+ // 调用制作二维码方法
+ qr.make();
+ // 获取canvas上下文
+ var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入
+ // 设置uQRCode实例的canvas上下文
+ qr.canvasContext = canvasContext;
+ // 调用绘制方法将二维码图案绘制到canvas上
+ qr.drawCanvas();
+ }
},
savealbum(e) {
uni.pro.navigateBack();
diff --git a/pages/index/wxinvoicing.vue b/pages/index/wxinvoicing.vue
index 0edb662..afdbb1a 100644
--- a/pages/index/wxinvoicing.vue
+++ b/pages/index/wxinvoicing.vue
@@ -224,26 +224,6 @@
}
}, 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);
- }
- });
- },
}
};
diff --git a/pages/webview/webview.vue b/pages/webview/webview.vue
index b5ae8bb..49910dc 100644
--- a/pages/webview/webview.vue
+++ b/pages/webview/webview.vue
@@ -9,39 +9,27 @@
url: '', //PDF路径
};
},
- onLoad(options) {
+ async onLoad(options) {
console.log(options)
if (options.tape == 1) {
this.url = options.url;
} else {
- uni.request({
- url: uni.conf.baseUrl + 'szzpy/downloadurl',
- data: {
- //参数
- id: options.id
- },
- method: 'POST', //请求方式,必须为大写
- success: res => {
- let fileUrl = options.url
- // this.url = 'https://www.pfile.com.cn/api/profile/onlinePreview?url=' +
- // encodeURIComponent(res.data.data);
-
- // this.url = 'https://view.officeapps.live.com/op/view.aspx?src=' + res.data.data
- // console.log(this.url)
- 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)
+ let res = await this.api.szzpydownloadurl({
+ id: options.id
+ })
+ if (res) {
+ let fileUrl = options.url
+ 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)
+ } else if (isiOS) {
+ window.location.href = res.data;
}
- });
-
+ }
}
}
diff --git a/unpackage/dist/build/web/index.html b/unpackage/dist/build/web/index.html
index 3de32fd..2d01f18 100644
--- a/unpackage/dist/build/web/index.html
+++ b/unpackage/dist/build/web/index.html
@@ -3,4 +3,4 @@
document.write(
'')