From 7cd5649764303618851c12649015f1fb4e205558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com> Date: Fri, 17 May 2024 18:30:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hbuilderx/launch.json | 20 +- common/js/api.js | 24 ++ framework/0-conf.js | 2 +- framework/11-api.js | 12 +- manifest.json | 2 +- pages.json | 37 +++ pages/hindex/index.vue | 434 ++++++++++++++++++++++++++ pages/hindex/indexs.vue | 412 ++++++++++++++++++++++++ pages/hindex/web.vue | 25 ++ pages/index/Invoicing.vue | 3 +- pages/index/auditbilling.vue | 311 ++++++++++++++++++ pages/index/billingcode.vue | 304 ++++++++++++++++++ pages/index/index.vue | 58 ++-- pages/index/information.vue | 24 ++ pages/index/notificationdd.vue | 18 +- pages/index/orderinfoauditbilling.vue | 303 ++++++++++++++++++ pages/index/web.vue | 25 ++ pages/index/wxinvoicing.vue | 14 +- static/item7.png | Bin 0 -> 893 bytes static/item8.png | Bin 0 -> 1380 bytes static/xj.png | Bin 0 -> 923 bytes unpackage/dist/build/web/index.html | 2 +- 22 files changed, 1980 insertions(+), 50 deletions(-) create mode 100644 pages/hindex/index.vue create mode 100644 pages/hindex/indexs.vue create mode 100644 pages/hindex/web.vue create mode 100644 pages/index/auditbilling.vue create mode 100644 pages/index/billingcode.vue create mode 100644 pages/index/orderinfoauditbilling.vue create mode 100644 pages/index/web.vue create mode 100644 static/item7.png create mode 100644 static/item8.png create mode 100644 static/xj.png 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 0000000000000000000000000000000000000000..83fe836a7ddb9dda8794c87be90717c4a21da1bb GIT binary patch literal 893 zcmV-@1A_dCP)TZ-2`D#cmkA5Pf@Vp%K{x^2 zfb;}3DUU7f4cc{+5t7@y=h!p0Gm)LN8E>*kM$*^UNMmWDV9Or0Wq2U~e(a3r7>@h6 zi#z5QaUY9;N4Pc$k1x8dp-pD{WOk$!d==Bjf)Ia>d#!g_nK{6ud`QaQiz-hHfa`HD zdX|;@;tR%4wD~QrFTo7QlU{V1mTdt%9Vw;W)M3C3^xHpOHA>5VIlxW?6j3!i2=IB* zjrsv_+5_#Az_3`bg^(s!hCM76Ph1!Tk`|@*2g>eTa`s(5 zk^yY-8Y`?4n!bR?-N>DD90s z`Zz4AD!vTUHd;6j&vlSa*2j9Sk4Vy5rA+z)_SG2x`($ZfZ}YmqaK)tM>*Ns9O^5WY z(Xao0ROe~NsvJpcX1J!F7QhYF)7`A`@c{P_%s*dHMe7XUhiv1}+O;%0=2Wzihj4X^ z`XI~h+}Kxx>7ho|r(*tG3OMcGZ`98^%E}9kcqtEWs+_>^rZOXCS73PVNgjbvW96xY zX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4=pSr~$=h#-D;xC5{JX^X@tS z-`sQWJ@;IK1!HELrfH{iT|Yxa?Ep?Pb3lX=Q3}8sGk=gI>6Optn z*lf0b05<^0<-~T!RbAKb>bgD{2n5o_Vv2%QRlN$}Hh@}-!2NDN0Nj#g`O!h~|A3j< zscG5}GhaC*a8DQ!J@NT`eMFQi9M}V1T3T|tT&@HWwH*btK;zxk*4F7zD72mbW`dcS zG))^}=5t33HRPCiSeE5pB4T4x<{_%8-rQZ&N^tXG&VM(wY9aVKM_3^GkyyoR!VhbWMt29AP_(#5`o+8#`^j? zW@cvgq`sk{0c~w1OF=?_zXAwb1q*0rXD4Q7XR*1tiEua!r_+h?@o_UN7Qo*GSS*;s zD!8Mg1Dd8`dV1OjAtLnj^k8ag3M(rs#y1P#tN;t|daK~>?rtNs%gf7VNGuk^>gp=y z=H{$|zYFju08y*pXfz6s$AihqNl^yj^?K3O)rCYNA?kr8FcEze;9&sgt%4m62jcNK zs;a7tqg7K=gZcS+Bh`7ckm{G>I9+1qXI8<&Pm(0m)z!h}azRlPbEf|R?#)*&acSF& z!NS8$Vw6WTdT!j zGMNn6?e@002ovPDHLkV1l=Fu!sNv literal 0 HcmV?d00001 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