diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 9b0d791..fe7f40f 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -4,13 +4,19 @@ "version" : "0.0", "configurations" : [ { - "app-plus" : { - "launchtype" : "local" - }, - "default" : { - "launchtype" : "local" - }, - "type" : "uniCloud" + "app-plus" : + { + "launchtype" : "local" + }, + "default" : + { + "launchtype" : "local" + }, + "mp-weixin" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" }, { "playground" : "standard", diff --git a/common/js/api.js b/common/js/api.js index 3606199..02ac0c7 100644 --- a/common/js/api.js +++ b/common/js/api.js @@ -23,4 +23,28 @@ export default { szzpyaddinvoicersendsms(data) { //上传验证码(新增开票员) return uni.api.post("szzpy/addinvoicersendsms", data); }, + storerecog(data) { //营业执照识别 + return uni.api.post("store/recog", data); + }, + storemerchantfixedinvoicinglink(data) { //商家固定开票链接 + return uni.api.post("store/merchantfixedinvoicinglink", data); + }, + usersubopeninvoice(data) { //首页获取状态 + return uni.api.post("user/subopeninvoice", data); + }, + usersubopeninvoicefixed(data) { //用户提交开票信息(固定开票) + return uni.api.post("user/subopeninvoicefixed", data); + }, + szzpyfailccho(data) { //开票审核失败回显 + return uni.api.post("szzpy/failccho", data); + }, + storeinvoicingrecordsthatneed(data) { //开票记录(固定开票) + return uni.api.post("store/invoicingrecordsthatneed", data); + }, + storereviewandinvoicing(data) { //审核开票 + return uni.api.post("store/reviewandinvoicing", data); + }, + invoicingrecordsthatneeddetailstore(data) { //开票详情 + return uni.api.post("store/invoicingrecordsthatneeddetail", data); + } } \ No newline at end of file diff --git a/framework/0-conf.js b/framework/0-conf.js index 46e8a39..317ed6d 100644 --- a/framework/0-conf.js +++ b/framework/0-conf.js @@ -3,7 +3,7 @@ const uploadUrl = 'https://upload-z2.qbox.me' const debug = process.env.NODE_ENV == 'development' ? true : false; // #ifdef H5 // 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/'//测试 // #endif diff --git a/framework/11-api.js b/framework/11-api.js index a0a491e..8045d8b 100644 --- a/framework/11-api.js +++ b/framework/11-api.js @@ -37,17 +37,11 @@ async function request(options) { mask: true }) } - const system = uni.getSystemInfoSync(); - const platformInfo = { - 'ios': 2, - 'android': 1 - } options.header = { - userId: uni.getStorageSync('userId'), + // userId: uni.getStorageSync('userId'), 'content-type': 'application/json' } let res = await uni.pro.request(options) - console.log(res) if (res.code != 1) { if (options.toast) { uni.showToast({ @@ -99,7 +93,7 @@ async function request(options) { }) } return res - + } } catch (err) { console.warn('uni.request fail [network]', options, err) @@ -173,7 +167,7 @@ function get(url, data, toast = true) { return request({ url, data, - toast + toast, }) } diff --git a/manifest.json b/manifest.json index 355496e..c218c3d 100644 --- a/manifest.json +++ b/manifest.json @@ -76,7 +76,7 @@ }, "router" : { "mode" : "history", - "base" : "/h5/" + "base" : "" }, "uniStatistics" : { "enable" : true diff --git a/pages.json b/pages.json index c08a8e4..e9bdd8d 100644 --- a/pages.json +++ b/pages.json @@ -15,6 +15,18 @@ "navigationBarTitleText": "完善商户信息", "navigationStyle": "custom" } + }, { + "path": "pages/index/billingcode", + "style": { + "navigationBarTitleText": "开票码", + "navigationStyle": "custom" + } + }, { + "path": "pages/index/auditbilling", + "style": { + "navigationBarTitleText": "审核开票", + "navigationStyle": "custom" + } }, { "path": "pages/index/drawer", "style": { @@ -65,6 +77,12 @@ } }, { "path": "pages/index/orderinfos", + "style": { + "navigationBarTitleText": "固定开票详情", + "navigationStyle": "custom" + } + }, { + "path": "pages/index/orderinfoauditbilling", "style": { "navigationBarTitleText": "开票详情", "navigationStyle": "custom" @@ -75,6 +93,25 @@ "navigationBarTitleText": "微信扫码开票", "navigationStyle": "custom" } + }, { + "path": "pages/hindex/index", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom" + } + }, + { + "path": "pages/hindex/indexs", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom" + } + }, { + "path": "pages/hindex/web", + "style": { + "navigationBarTitleText": "提交成功", + "navigationStyle": "custom" + } }, { "path": "pages/webview/webview", "style": { diff --git a/pages/hindex/index.vue b/pages/hindex/index.vue new file mode 100644 index 0000000..cfe7e94 --- /dev/null +++ b/pages/hindex/index.vue @@ -0,0 +1,434 @@ + + + + + \ No newline at end of file diff --git a/pages/hindex/indexs.vue b/pages/hindex/indexs.vue new file mode 100644 index 0000000..c4e8c9a --- /dev/null +++ b/pages/hindex/indexs.vue @@ -0,0 +1,412 @@ + + + + + \ No newline at end of file diff --git a/pages/hindex/web.vue b/pages/hindex/web.vue new file mode 100644 index 0000000..b795a97 --- /dev/null +++ b/pages/hindex/web.vue @@ -0,0 +1,25 @@ + + + + \ No newline at end of file diff --git a/pages/index/Invoicing.vue b/pages/index/Invoicing.vue index 126d26b..97ded76 100644 --- a/pages/index/Invoicing.vue +++ b/pages/index/Invoicing.vue @@ -77,7 +77,8 @@ number: '', tax_amount: '', d_price: '', - notes: '' + notes: '', + // new: 'new' } }; }, diff --git a/pages/index/auditbilling.vue b/pages/index/auditbilling.vue new file mode 100644 index 0000000..eae290a --- /dev/null +++ b/pages/index/auditbilling.vue @@ -0,0 +1,311 @@ + + + + \ No newline at end of file diff --git a/pages/index/billingcode.vue b/pages/index/billingcode.vue new file mode 100644 index 0000000..3ad726d --- /dev/null +++ b/pages/index/billingcode.vue @@ -0,0 +1,304 @@ + + + + \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index d1c0ec5..5232655 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -21,6 +21,14 @@ 新增开票员 + + + 开票码 + + + + 审核开票 + 网页版地址:https://h5-invoice.sxczgkj.cn @@ -60,37 +68,43 @@ 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 - // } - // }, + 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 + } + }, - // }); + }); }, onShow() {}, methods: { setClipboardData() { uni.setClipboardData({ - data: 'https://h5-invoice.sxczgkj.cn/?userId=' + uni.utils.md5(uni.cache.get('userId')), + data: 'https://h5-invoice.sxczgkj.cn/?userId=' + uni.cache.get('userId'), success: function() {} }); }, + auditbilling(){ + uni.pro.navigateTo('index/auditbilling'); + }, + billingcode(){ + uni.pro.navigateTo('index/billingcode'); + }, drawer() { uni.pro.navigateTo('index/drawer'); }, diff --git a/pages/index/information.vue b/pages/index/information.vue index 5f241e0..0ef22b4 100644 --- a/pages/index/information.vue +++ b/pages/index/information.vue @@ -70,6 +70,11 @@ + + 统一社会信用代码 + + 请上传法人身份证图片 @@ -148,6 +153,7 @@ dlzh: '', dlmm: '', code: '', + creditCode:'' } }; }, @@ -180,6 +186,7 @@ this.form.taxphone = data.taxphone this.form.dlsf_name = data.dlsf_name this.form.dlsf = data.dlsf + this.form.creditCode = data.creditCode } }, @@ -279,6 +286,13 @@ }); return false; } + if (this.form.creditCode == null || this.form.creditCode == '') { + uni.showToast({ + title: '请填写统一社会信用代码', + icon: 'none' + }); + return false; + } let res = await this.api.invoicerregistrationszzpy(this.form) if (res.code == 1) { uni.showToast({ @@ -416,6 +430,8 @@ this.$set(this.form, 'business_license', thisdata_ .data[0]) + this.storerecog() //营业执照图片 + } console.log(this.form) } @@ -434,6 +450,14 @@ } }, + async storerecog() { + let res = await this.api.storerecog({ + store_id: uni.getStorageSync('userId'), + business_license: this.form.business_license + }) + console.log(res) + this.form.creditCode = res.data.creditCode + } } }; diff --git a/pages/index/notificationdd.vue b/pages/index/notificationdd.vue index a630d1c..ce57ab3 100644 --- a/pages/index/notificationdd.vue +++ b/pages/index/notificationdd.vue @@ -55,7 +55,15 @@ onLoad(e) { this.ID = e.id this.status = e.status - + // for (let i = 0; i <= 100; i++) { + // this.print(); + // } + // var interval = setInterval(() => { + // this.print(); + // }, 1000); + // setTimeout(() => { + // clearInterval(interval); + // }, 60000); }, onReady() { setTimeout(() => { @@ -72,11 +80,11 @@ } LODOP.PRINT_INIT('') // 设置打印纸大小 - LODOP.SET_PRINT_PAGESIZE(1, 800, '50px', ""); - // LODOP.SET_PRINT_PAGESIZE(1, 800, '300px', ""); + // 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.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"); //设置默认打印机(这里用的是打印机名称) @@ -86,7 +94,7 @@ // LODOP.ADD_PRINT_HTM('150px', '5px', "100%", "100%", // `
销售方名称:${this.ID}
开票金额:${this.ID}
生成时间:${this.ID}
生成时间:${this.ID}
二维码有效期:30天
您可以使用微信,扫码开票
` // ); - LODOP.SET_LICENSES("","DCFF409304DFCEB3E2C644BF96CD0720","",""); + LODOP.SET_LICENSES("", "DCFF409304DFCEB3E2C644BF96CD0720", "", ""); // LODOP.PREVIEW(); //带预览的打印 LODOP.PRINT() diff --git a/pages/index/orderinfoauditbilling.vue b/pages/index/orderinfoauditbilling.vue new file mode 100644 index 0000000..9969cfc --- /dev/null +++ b/pages/index/orderinfoauditbilling.vue @@ -0,0 +1,303 @@ + + + + + \ No newline at end of file diff --git a/pages/index/web.vue b/pages/index/web.vue new file mode 100644 index 0000000..b795a97 --- /dev/null +++ b/pages/index/web.vue @@ -0,0 +1,25 @@ + + + + \ No newline at end of file diff --git a/pages/index/wxinvoicing.vue b/pages/index/wxinvoicing.vue index ced47ca..0edb662 100644 --- a/pages/index/wxinvoicing.vue +++ b/pages/index/wxinvoicing.vue @@ -11,7 +11,7 @@ {{datares.string1}}
- + 发票金额: ¥{{datares.price}} @@ -66,12 +66,20 @@ data: {}, fowxAuditInfo: {}, imgShow: false, - img: '' + img: '', + datares:{ + tope:'' + } }; }, onLoad(e) { console.log(e) - this.datares = e + if(e.tope == 0){ + this.datares = e + this.datares.tope = 0 + }else{ + this.datares = e + } }, onReady() { this.merchantStoreshowMerchantStoreReceipt(); diff --git a/static/item7.png b/static/item7.png new file mode 100644 index 0000000..83fe836 Binary files /dev/null and b/static/item7.png differ diff --git a/static/item8.png b/static/item8.png new file mode 100644 index 0000000..15decfd Binary files /dev/null and b/static/item8.png differ diff --git a/static/xj.png b/static/xj.png new file mode 100644 index 0000000..2c89a3d Binary files /dev/null and b/static/xj.png differ diff --git a/unpackage/dist/build/web/index.html b/unpackage/dist/build/web/index.html index fcc183a..46e81b9 100644 --- a/unpackage/dist/build/web/index.html +++ b/unpackage/dist/build/web/index.html @@ -1,2 +1,2 @@ 发票
\ No newline at end of file + document.write('')
\ No newline at end of file