From 9821179c454a03c26d08a24726af09d88cf703ef Mon Sep 17 00:00:00 2001 From: Devil Date: Tue, 8 Dec 2020 22:58:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=AE=9D+=E5=A4=B4=E6=9D=A1?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=96=B0=E5=A2=9E=E5=BC=80=E7=A5=A8?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.txt | 1 + config/ueditor.php | 4 +- extend/base/Excel.php | 2 +- extend/base/Toutiao.php | 2 +- sourcecode/alipay/default/app.json | 7 +- .../invoice/user-center-invoice-icon.png | Bin 0 -> 4622 bytes .../invoice/user-center-order-icon.png | Bin 0 -> 1824 bytes .../invoice-detail/invoice-detail.acss | 27 ++ .../invoice-detail/invoice-detail.axml | 47 +++ .../invoice/invoice-detail/invoice-detail.js | 117 ++++++++ .../invoice-detail/invoice-detail.json | 4 + .../invoice-saveinfo/invoice-saveinfo.acss | 7 + .../invoice-saveinfo/invoice-saveinfo.axml | 104 +++++++ .../invoice-saveinfo/invoice-saveinfo.js | 280 ++++++++++++++++++ .../invoice-saveinfo/invoice-saveinfo.json | 4 + .../plugins/invoice/invoice/invoice.acss | 47 +++ .../plugins/invoice/invoice/invoice.axml | 56 ++++ .../pages/plugins/invoice/invoice/invoice.js | 230 ++++++++++++++ .../plugins/invoice/invoice/invoice.json | 4 + .../pages/plugins/invoice/order/order.acss | 43 +++ .../pages/plugins/invoice/order/order.axml | 56 ++++ .../pages/plugins/invoice/order/order.js | 166 +++++++++++ .../pages/plugins/invoice/order/order.json | 4 + .../pages/plugins/invoice/user/user.acss | 29 ++ .../pages/plugins/invoice/user/user.axml | 20 ++ .../pages/plugins/invoice/user/user.js | 99 +++++++ .../pages/plugins/invoice/user/user.json | 4 + .../plugins/wallet/cash-auth/cash-auth.js | 1 - .../invoice/user-center-invoice-icon.png | Bin 0 -> 4622 bytes .../invoice/user-center-order-icon.png | Bin 0 -> 1824 bytes .../user-order-comments.js | 1 - .../invoice/user-center-invoice-icon.png | Bin 0 -> 4622 bytes .../invoice/user-center-order-icon.png | Bin 0 -> 1824 bytes .../plugins/wallet/cash-auth/cash-auth.js | 1 - sourcecode/toutiao/default/app.json | 7 +- .../invoice/user-center-invoice-icon.png | Bin 0 -> 4622 bytes .../invoice/user-center-order-icon.png | Bin 0 -> 1824 bytes .../pages/goods-detail/goods-detail.js | 3 - .../invoice/invoice-detail/invoice-detail.js | 117 ++++++++ .../invoice-detail/invoice-detail.json | 4 + .../invoice-detail/invoice-detail.ttml | 47 +++ .../invoice-detail/invoice-detail.ttss | 27 ++ .../invoice-saveinfo/invoice-saveinfo.js | 280 ++++++++++++++++++ .../invoice-saveinfo/invoice-saveinfo.json | 4 + .../invoice-saveinfo/invoice-saveinfo.ttml | 104 +++++++ .../invoice-saveinfo/invoice-saveinfo.ttss | 7 + .../pages/plugins/invoice/invoice/invoice.js | 230 ++++++++++++++ .../plugins/invoice/invoice/invoice.json | 4 + .../plugins/invoice/invoice/invoice.ttml | 56 ++++ .../plugins/invoice/invoice/invoice.ttss | 47 +++ .../pages/plugins/invoice/order/order.js | 166 +++++++++++ .../pages/plugins/invoice/order/order.json | 4 + .../pages/plugins/invoice/order/order.ttml | 57 ++++ .../pages/plugins/invoice/order/order.ttss | 43 +++ .../pages/plugins/invoice/user/user.js | 99 +++++++ .../pages/plugins/invoice/user/user.json | 4 + .../pages/plugins/invoice/user/user.ttml | 20 ++ .../pages/plugins/invoice/user/user.ttss | 29 ++ .../plugins/wallet/cash-auth/cash-auth.js | 4 +- .../pages/plugins/invoice/order/order.js | 1 - .../pages/plugins/invoice/user/user.wxml | 2 - .../plugins/wallet/cash-auth/cash-auth.js | 1 - 62 files changed, 2716 insertions(+), 18 deletions(-) create mode 100644 sourcecode/alipay/default/images/plugins/invoice/user-center-invoice-icon.png create mode 100644 sourcecode/alipay/default/images/plugins/invoice/user-center-order-icon.png create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.acss create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.axml create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.js create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.json create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.acss create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.axml create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.acss create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.axml create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.js create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.json create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/order/order.acss create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/order/order.axml create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/order/order.js create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/order/order.json create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/user/user.acss create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/user/user.axml create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/user/user.js create mode 100644 sourcecode/alipay/default/pages/plugins/invoice/user/user.json create mode 100644 sourcecode/baidu/default/images/plugins/invoice/user-center-invoice-icon.png create mode 100644 sourcecode/baidu/default/images/plugins/invoice/user-center-order-icon.png create mode 100644 sourcecode/qq/default/images/plugins/invoice/user-center-invoice-icon.png create mode 100644 sourcecode/qq/default/images/plugins/invoice/user-center-order-icon.png create mode 100644 sourcecode/toutiao/default/images/plugins/invoice/user-center-invoice-icon.png create mode 100644 sourcecode/toutiao/default/images/plugins/invoice/user-center-order-icon.png create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.js create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.json create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.ttml create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.ttss create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttml create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttss create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.js create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.json create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.ttml create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.ttss create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/order/order.js create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/order/order.json create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/order/order.ttml create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/order/order.ttss create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/user/user.js create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/user/user.json create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/user/user.ttml create mode 100644 sourcecode/toutiao/default/pages/plugins/invoice/user/user.ttss diff --git a/changelog.txt b/changelog.txt index 9d6df50cf..3bd4533e5 100755 --- a/changelog.txt +++ b/changelog.txt @@ -17,6 +17,7 @@ web端 6. 后端动态表格数据列表组件优化高度固定 7. 首页轮播左侧商品分类和右侧聚合内容新增开关控制 8. 动态表格数据列表自定义条件bug修复 + 9. 编辑器组件CDN跨域不能使用修复 小程序 1. 支付订单0金额错误修复 diff --git a/config/ueditor.php b/config/ueditor.php index 487e98e52..1366dc7e3 100644 --- a/config/ueditor.php +++ b/config/ueditor.php @@ -145,7 +145,7 @@ return [ 'fileMaxSize' => MyFileConfig('home_max_limit_file', '', 51200000, true), // 上传文件格式显示 - 'fileAllowFiles' => ['.png', '.jpg', '.jpeg', '.gif', '.bmp', '.flv', '.swf', '.mkv', '.avi', '.rm', '.rmvb', '.mpeg', '.mpg', '.ogg', '.ogv', '.mov', '.wmv', '.mp4', '.webm', '.mp3', '.wav', '.mid','.rar', '.zip', '.tar', '.gz', '.7z', '.bz2', '.cab', '.iso', '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.pdf', '.txt', '.md', '.xml'], + 'fileAllowFiles' => ['.png', '.jpg', '.jpeg', '.gif', '.bmp', '.flv', '.swf', '.mkv', '.avi', '.rm', '.rmvb', '.mpeg', '.mpg', '.ogg', '.ogv', '.mov', '.wmv', '.mp4', '.webm', '.mp3', '.wav', '.mid','.rar', '.zip', '.tar', '.gz', '.7z', '.bz2', '.cab', '.iso', '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.pdf', '.txt', '.md', '.xml', '.ofd'], // 列出指定目录下的图片 @@ -182,7 +182,7 @@ return [ 'fileManagerListSize' => 20, // 列出的文件类型 - 'fileManagerAllowFiles' => ['.png', '.jpg', '.jpeg', '.gif', '.bmp', '.flv', '.swf', '.mkv', '.avi', '.rm', '.rmvb', '.mpeg', '.mpg', '.ogg', '.ogv', '.mov', '.wmv', '.mp4', '.webm', '.mp3', '.wav', '.mid','.rar', '.zip', '.tar', '.gz', '.7z', '.bz2', '.cab', '.iso', '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.pdf', '.txt', '.md', '.xml'], + 'fileManagerAllowFiles' => ['.png', '.jpg', '.jpeg', '.gif', '.bmp', '.flv', '.swf', '.mkv', '.avi', '.rm', '.rmvb', '.mpeg', '.mpg', '.ogg', '.ogv', '.mov', '.wmv', '.mp4', '.webm', '.mp3', '.wav', '.mid','.rar', '.zip', '.tar', '.gz', '.7z', '.bz2', '.cab', '.iso', '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.pdf', '.txt', '.md', '.xml', '.ofd'], // 执行视频管理的action名称 'videoManagerActionName' => 'listvideo', diff --git a/extend/base/Excel.php b/extend/base/Excel.php index f1820e11b..d8f4a5364 100755 --- a/extend/base/Excel.php +++ b/extend/base/Excel.php @@ -81,7 +81,7 @@ class Excel $this->warap_text = isset($params['warap_text']) ? intval($params['warap_text']) : 1; // excel写入类型 - $this->writer_type = empty($params['writer_type']) ? 'Excel2007' : teim($params['writer_type']); + $this->writer_type = empty($params['writer_type']) ? 'Excel2007' : trim($params['writer_type']); // 引入PHPExcel类库 require ROOT.'extend'.DS.'phpexcel'.DS.'PHPExcel.php'; diff --git a/extend/base/Toutiao.php b/extend/base/Toutiao.php index 39590b0fa..b0b785571 100644 --- a/extend/base/Toutiao.php +++ b/extend/base/Toutiao.php @@ -55,7 +55,7 @@ class Toutiao // 获取授权 $url = 'https://developer.toutiao.com/api/apps/jscode2session?appid='.$this->config['appid'].'&secret='.$this->config['secret'].'&code='.$params['authcode']; - $result = json_decode(file_get_contents($url), true); + $result = json_decode(RequestGet($url), true); if(empty($result['openid'])) { return ['status'=>-1, 'msg'=>$result['errmsg']]; diff --git a/sourcecode/alipay/default/app.json b/sourcecode/alipay/default/app.json index 6d686e492..bd8c099d4 100644 --- a/sourcecode/alipay/default/app.json +++ b/sourcecode/alipay/default/app.json @@ -63,7 +63,12 @@ "pages/plugins/wallet/user-cash-detail/user-cash-detail", "pages/plugins/excellentbuyreturntocash/profit/profit", "pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail", - "pages/plugins/exchangerate/currency/currency" + "pages/plugins/exchangerate/currency/currency", + "pages/plugins/invoice/user/user", + "pages/plugins/invoice/invoice/invoice", + "pages/plugins/invoice/invoice-detail/invoice-detail", + "pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo", + "pages/plugins/invoice/order/order" ], "window": { "defaultTitle": "{{application_title}}", diff --git a/sourcecode/alipay/default/images/plugins/invoice/user-center-invoice-icon.png b/sourcecode/alipay/default/images/plugins/invoice/user-center-invoice-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ad612e227f84e52acc33abf1c6ff2c1fcfd617a3 GIT binary patch literal 4622 zcmbVQXH-*J*9Hd!snVr~(AAI-2$Eo6B($I)y|<7=h(Hoa5C|YcP@1%f3JM5Fq$wap zrIU%+6%Yjm1OzNJK|txvH#q8=_gnL|_pWvCJ@=gFJbOR;?7e^7WIJ0+VF5V-E-o%% zw3V3y=Z)LB`FC@k;1FC#*FaAn4nGKhLUawm5JRx89!S>!p$|bop@8ofkYgs=MNtGdK3LMR79Ufff@tCj_<$#NC4M~R1C$c^fn zR{l5>r4(Ke&?)$7t#f9hKkDk8zJZaYbz~pu+&<=>hkWPkUH#}Z9_5g36kR-B=IXf% zr-ah)30zFHW63~M`qLDPKt&yNqiPiQK#=I=TW898G+uphb8Pf+SliN5j3(007WI&Q z>DktE#8TP5JvUB>)?PNQq8L1Wx6Z)}BpXw1+nI%JJ8L8?oV2 zG&2u1m_N)#X1?yyO|dSl=kV3kOhR&Iar(pEvXoEuM|U4iXoW{sidAYSr+oG$$?{Eq z!f8LV5y&r0Io9U6nZI2A$_G?<*1;&s>Qb4TcHu?O$2?b=YO%{8=1^nY4L{R|dtY4f zR<(}7Tffx}dz3v!t+>a2dO^x?=)7-==nd5RmzOJGYgD%g+N-}Yv-Z5jkgSUPLY?3h z<CP{)5r@vWJD6_E8Ms&6 z`zmIfsHv7VE+`vSqckybxLHOyJK-}tSmOCIurAD`-1Tb9nUvUDLm=$&3&)33zRt9r z#3pOLm#9@7d9r0D^M!AVqJEVD7BX;@Xz7Qf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>MH^^&)#YtlDffW?es8ygc$lWN1worJ8!8~|TCXv7LZr8S;PqX8rsmlP zmA4O`+Z7}|U3T^5Es0`3m+>=q#z>aw3jj4#rpHWZi%YEJ{>lXA^YCy5eS(xwMy9Rj z=n-v$nWnbs)D$g)}kr0bm0aMxlCw< zbo8$zaJ80L3p&hbSabeSL(L<(0;jbZ8qQ@ok(@PJjybj&uUIS4A5rB2vgC=eN z(Q@E{ju2|f?>E(sX6`?evi>w|0<|yE1hvBi+5oD|l%>_^4|8#YA-j)S4frG)xp$X7 z@XBBn1~ch5sckD;z2n2g&JBv?8g=((n8S@=#eFX=P6a0K!{*vT%d9IRCA_eGF#OL`4`Y zx8f;M{BDkGwR`oo+Oe=&xmn85)=POW4?j;f)?BTo_HBCTPC&-E{TrS>(3U^8 zG4WJjipCCeI9~xQD)Yn3L#>T(zRydT6qI?JAPozY@;GTru9TDt%#fVj@MqV1#FlUS zUw-;PUTV0=DY9c~LSv}HsO!rw4NmN}l+zQLckKoK=o3CIxPAL&{K<^r2yuCyky$7! zzZ-1oaiAu?nJ4>v{;fKK+JmQ>JoVGZmR206&iS?hu1;jre(ysTOCKNG)vHBI>rWBo z&kz3Ha%5M{%K6N#9LtvB{S9tsq9b1(Z8M`<=0fxLw#XOER@=@-SngMkB{g2ZGG8^0td&_1(OGd3!=h)KXIK$ z)Ou|FQ)f*6)k_YopDx~093PAF?z^d-V%u2Z8@a__TArU)BuZyf`@a3u%} zwrJ*ANwJmOjQ)UjpI@P`q$u6|*yTR+aJjQ!zM;k^ lX$ilf7F&(Wd!fYDSf|HI_EXOG`*;4>pv`T~s!aXp{{jvT`JDg& literal 0 HcmV?d00001 diff --git a/sourcecode/alipay/default/images/plugins/invoice/user-center-order-icon.png b/sourcecode/alipay/default/images/plugins/invoice/user-center-order-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c48293ce441b6dd657b8ce77e86834dfed9ecd94 GIT binary patch literal 1824 zcmV+*2jBRKP)LL9HMve(-^>x|!WlQ47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*!a0slHst1=_X zEy^PS8Ja043T$?shdQu5)6MjO+hkj4aLNC1zyYyrgK$7B1M&~hEpwp;J>4Gw O0000 + + 申请信息 + + + {{item.name}} + {{item.value}} + + + + + + + 快递信息 + + + {{item.name}} + {{item.value}} + + + + + + + 电子发票 + + + {{item.title}} + + + 可点击发票名称复制后、到浏览器打开地址下载发票。 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.js b/sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.js new file mode 100644 index 000000000..f6632f13c --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.js @@ -0,0 +1,117 @@ +const app = getApp(); +Page({ + data: { + params: null, + data_list_loding_status: 1, + data_list_loding_msg: '', + data_bottom_line_status: false, + detail: null, + detail_list: [], + express_data: [], + }, + + onLoad(params) { + //params['id'] = 1; + this.setData({ params: params }); + this.init(); + }, + + onShow() {}, + + init() { + var self = this; + my.showLoading({ content: "加载中..." }); + this.setData({ + data_list_loding_status: 1 + }); + + my.request({ + url: app.get_request_url("detail", "user", "invoice"), + method: "POST", + data: { + id: this.data.params.id + }, + dataType: "json", + success: res => { + my.hideLoading(); + my.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + self.setData({ + detail: data.data, + detail_list: [ + { name: "业务类型", value: data.data.business_type_name || '' }, + { name: "申请类型", value: data.data.apply_type_name || '' }, + { name: "发票类型", value: data.data.invoice_type_name || '' }, + { name: "发票金额", value: data.data.total_price || '' }, + { name: "状态", value: data.data.status_name || '' }, + { name: "发票内容", value: data.data.invoice_content || '' }, + { name: "发票抬头", value: data.data.invoice_title || '' }, + { name: "纳税识别号", value: data.data.invoice_code || '' }, + { name: "企业开户行名称", value: data.data.invoice_bank || '' }, + { name: "企业开户帐号", value: data.data.invoice_account || '' }, + { name: "企业联系电话", value: data.data.invoice_tel || '' }, + { name: "企业注册地址", value: data.data.invoice_address || '' }, + { name: "收件人姓名", value: data.data.name || '' }, + { name: "收件人电话", value: data.data.tel || '' }, + { name: "收件人地址", value: data.data.address || '' }, + { name: "电子邮箱", value: data.data.email || '' }, + { name: "拒绝原因", value: data.data.refuse_reason || '' }, + { name: "用户备注", value: data.data.user_note || '' }, + { name: "创建时间", value: data.data.add_time || '' }, + { name: "更新时间", value: data.data.upd_time || '' }, + ], + express_data: [ + { name: "快递名称", value: data.data.express_name || '' }, + { name: "快递单号", value: data.data.express_number || '' }, + ], + + data_list_loding_status: 3, + data_bottom_line_status: true, + data_list_loding_msg: '', + }); + } else { + self.setData({ + data_list_loding_status: 2, + data_bottom_line_status: false, + data_list_loding_msg: res.data.msg, + }); + if (app.is_login_check(res.data, self, 'init')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + my.hideLoading(); + my.stopPullDownRefresh(); + self.setData({ + data_list_loding_status: 2, + data_bottom_line_status: false, + data_list_loding_msg: '服务器请求出错', + }); + + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.init(); + }, + + // 电子发票复制 + electronic_invoice_event(e) { + var value = e.currentTarget.dataset.value || null; + if (value != null) { + my.setClipboard({ + text: value, + success(res) { + app.showToast('复制成功', 'success'); + } + }); + } else { + app.showToast('链接地址有误'); + } + }, +}); \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.json b/sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.json new file mode 100644 index 000000000..e9488f124 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.json @@ -0,0 +1,4 @@ +{ + "pullRefresh": true, + "defaultTitle": "发票详情" +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.acss b/sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.acss new file mode 100644 index 000000000..3122fa5c2 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.acss @@ -0,0 +1,7 @@ +.content-top { + padding: 30rpx 10rpx; +} +.content-top text { + font-size: 38rpx; + font-weight: bold; +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.axml b/sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.axml new file mode 100644 index 000000000..37ee843fe --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.axml @@ -0,0 +1,104 @@ + +
+ + 发票金额 {{save_base_data.total_price}} 元 + + + + 发票类型必选 + + + {{can_invoice_type_list[form_invoice_type_index] == undefined ? '请选择发票类型' : can_invoice_type_list[form_invoice_type_index]['name']}} + + + + + + 申请类型必选 + + + {{apply_type_list[form_apply_type_index] == undefined ? '请选择申请类型' : apply_type_list[form_apply_type_index]['name']}} + + + + + + 发票内容必选 + + + {{invoice_content_list[form_invoice_content_index] == undefined ? '请选择发票内容' : invoice_content_list[form_invoice_content_index]}} + + + + + + 发票抬头必填 + + + + + + + 企业统一社会信用代码或纳税识别号必填 + + + + + + + + 企业开户行名称必填 + + + + 企业开户帐号必填 + + + + 企业联系电话必填 + + + + 企业注册地址必填 + + + + + + + + 收件人姓名必填 + + + + 收件人电话必填 + + + + 收件人地址必填 + + + + + + + + 电子邮箱选填 + + + + + + 备注选填 + + + + + + +
+
+ + + + \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js b/sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js new file mode 100644 index 000000000..40aa1d9b3 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js @@ -0,0 +1,280 @@ +const app = getApp(); +Page({ + data: { + params: null, + form_submit_loading: false, + data_list_loding_status: 1, + data_list_loding_msg: '', + data_bottom_line_status: false, + data_base: null, + apply_type_list: [], + can_invoice_type_list: [], + invoice_content_list: [], + save_base_data: null, + data: null, + + form_invoice_type_index: 0, + form_apply_type_index: 0, + form_invoice_content_index: 0, + form_apply_type_disabled: false, + company_container: false, + company_special_container: false, + addressee_container: false, + email_container: true, + }, + + onLoad(params) { + this.setData({ params: params }); + this.init(); + }, + + onShow() {}, + + init() { + var self = this; + my.showLoading({ content: "加载中..." }); + this.setData({ + data_list_loding_status: 1 + }); + + my.request({ + url: app.get_request_url("saveinfo", "user", "invoice"), + method: "POST", + data: this.data.params, + dataType: "json", + success: res => { + my.hideLoading(); + my.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + self.setData({ + data_base: data.base || null, + apply_type_list: data.apply_type_list || [], + can_invoice_type_list: data.can_invoice_type_list || [], + invoice_content_list: data.invoice_content_list || [], + save_base_data: data.save_base_data, + data: ((data.data || null) == null || data.data.length == 0) ? null : data.data, + data_list_loding_status: 0, + data_bottom_line_status: true, + data_list_loding_msg: (data.save_base_data.total_price <= 0) ? '发票金额必须大于0' : '', + }); + + // 数据容器处理 + this.invoice_container_handle(); + } else { + self.setData({ + data_list_loding_status: 2, + data_bottom_line_status: false, + data_list_loding_msg: res.data.msg, + }); + if (app.is_login_check(res.data, self, 'init')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + my.hideLoading(); + my.stopPullDownRefresh(); + self.setData({ + data_list_loding_status: 2, + data_bottom_line_status: false, + data_list_loding_msg: '服务器请求出错', + }); + + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.init(); + }, + + // 发票类型事件 + form_invoice_type_event(e) { + this.setData({ + form_invoice_type_index: e.detail.value + }); + this.invoice_container_handle(); + }, + + // 发票类型事件 + form_apply_type_event(e) { + this.setData({ + form_apply_type_index: e.detail.value + }); + this.invoice_container_handle(); + }, + + // 发票内容事件 + form_invoice_content_event(e) { + this.setData({ + form_invoice_content_index: e.detail.value + }); + }, + + // 容器显隐处理 + invoice_container_handle() { + // 发票类型 + var invoice_type = this.data.can_invoice_type_list[this.data.form_invoice_type_index]['id']; + if(invoice_type == 2) + { + // 选择专票的时候申请类型必须是企业 + this.setData({ + form_apply_type_index: 1, + form_apply_type_disabled: true, + }); + } else { + this.setData({ + form_apply_type_disabled: false, + }); + } + + // 申请类型 + switch(invoice_type) + { + // 增值税普通电子发票 + case 0 : + this.setData({ + company_special_container: false, + addressee_container: false, + email_container: true, + }); + break; + + // 增值税普通纸质发票 + case 1 : + this.setData({ + company_special_container: false, + addressee_container: true, + email_container: false, + }); + break; + + // 增值税专业纸质发票 + case 2 : + this.setData({ + company_container: true, + company_special_container: true, + addressee_container: true, + email_container: false, + }); + break; + } + + // 增值税专业纸质发票情况下个人类型处理 + if(invoice_type != 2) + { + var apply_type = this.data.apply_type_list[this.data.form_apply_type_index]['id']; + if(apply_type == 0) + { + this.setData({ + company_container: false, + }); + } else { + this.setData({ + company_container: true, + }); + } + } + }, + + // 表单提交 + formSubmit(e) + { + var data = e.detail.value; + if((this.data.data || null) == null) + { + data['ids'] = this.data.params.ids || ''; + data['type'] = this.data.params.type || ''; + } else { + data['id'] = this.data.data.id; + } + + // 数据验证 + var validation = [ + {fields: 'invoice_type', msg: '请选择发票类型', is_can_zero: 1}, + {fields: 'apply_type', msg: '请选择申请类型', is_can_zero: 1}, + {fields: 'invoice_title', msg: '请填写发票抬头、最多200个字符'} + ]; + if(app.fields_check(data, validation)) + { + var invoice_type = this.data.can_invoice_type_list[this.data.form_invoice_type_index]['id']; + var apply_type = this.data.apply_type_list[this.data.form_apply_type_index]['id']; + if(apply_type == 1) + { + validation.push({fields: 'invoice_code', msg: '请填写企业统一社会信用代码或纳税识别号、最多160个字符'}); + } + if(invoice_type == 2) + { + validation.push({fields: 'invoice_bank', msg: '请填写企业开户行名称、最多200个字符'}); + validation.push({fields: 'invoice_account', msg: '请填写企业开户帐号、最多160个字符'}); + validation.push({fields: 'invoice_tel', msg: '请填写企业联系电话 6~15 个字符'}); + validation.push({fields: 'invoice_address', msg: '请填写企业注册地址、最多230个字符'}); + } + if(invoice_type != 0) + { + validation.push({fields: 'name', msg: '请填写收件人姓名格式 2~30 个字符之间'}); + validation.push({fields: 'tel', msg: '请填写收件人电话 6~15 个字符'}); + validation.push({fields: 'address', msg: '请填写收件人地址、最多230个字符'}); + } + if(app.fields_check(data, validation)) + { + // 发票类型 + data['invoice_type'] = this.data.can_invoice_type_list[this.data.form_invoice_type_index]['id']; + + // 发票内容 + if(this.data.invoice_content_list.length > 0 && this.data.invoice_content_list[this.data.form_invoice_content_index] != undefined) + { + data['invoice_content'] = this.data.invoice_content_list[this.data.form_invoice_content_index]; + } + + my.showLoading({content: '提交中...'}); + this.setData({form_submit_loading: true}); + + // 网络请求 + var self = this; + my.request({ + url: app.get_request_url("save", "user", "invoice"), + method: 'POST', + data: data, + dataType: 'json', + header: { 'content-type': 'application/x-www-form-urlencoded' }, + success: (res) => { + my.hideLoading(); + + if(res.data.code == 0) + { + app.showToast(res.data.msg, "success"); + setTimeout(function() + { + // 是否关闭页面进入我的发票、适合从订单开票中过来提交成功直接进入我的发票列表 + if((self.data.params || null) != null && (self.data.params.is_redirect || 0) == 1) + { + my.redirectTo({ + url: "/pages/plugins/invoice/invoice/invoice" + }); + } else { + my.navigateBack(); + } + }, 2000); + } else { + this.setData({form_submit_loading: false}); + if (app.is_login_check(res.data)) { + app.showToast(res.data.msg); + } else { + app.showToast('提交失败,请重试!'); + } + } + }, + fail: () => { + my.hideLoading(); + this.setData({form_submit_loading: false}); + app.showToast('服务器请求出错'); + } + }); + } + } + }, +}); \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json b/sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json new file mode 100644 index 000000000..9477efae0 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json @@ -0,0 +1,4 @@ +{ + "pullRefresh": true, + "defaultTitle": "开票" +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.acss b/sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.acss new file mode 100644 index 000000000..a282c04c7 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.acss @@ -0,0 +1,47 @@ +/* + * 导航 + */ + .nav { + background: #eee; + height: 80rpx; + line-height: 80rpx; +} +.nav .item { + width: 20%; +} +.nav .active { + color: #d2364c; +} + +/* + * 列表 + */ +.scroll-box { + height: calc(100vh - 80rpx); +} +.data-list .item .base, +.data-list .item .content { + padding: 20rpx 10rpx; +} +.data-list .item .content .multi-text { + line-height: 50rpx; +} +.data-list .item .content .multi-text .title { + margin-right: 30rpx; +} +.data-list .item .content .multi-text .value { + font-weight: 500; +} +.data-list .item .content .multi-text .unit { + margin-left: 10rpx; +} +.data-list .item .operation { + padding: 20rpx 10rpx; +} +.data-list .item .operation button:not(:first-child) { + margin-left: 30rpx; +} +.data-list .item .submit-delete { + border: 1px solid #dc7f7f; + color: #dc7f7f !important; +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.axml b/sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.axml new file mode 100644 index 000000000..8023bdc7d --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.axml @@ -0,0 +1,56 @@ + + + + {{item.name}} + + + + + + + + + {{item.add_time}} + {{item.status_name}} + + + + + 业务类型 + {{item.business_type_name}} + + + 申请类型 + {{item.apply_type_name}} + + + 发票类型 + {{item.invoice_type_name}} + + + 发票金额 + {{item.total_price}} + + + + 发票抬头 + {{item.invoice_title}} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.js b/sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.js new file mode 100644 index 000000000..ed267addf --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.js @@ -0,0 +1,230 @@ +const app = getApp(); +Page({ + data: { + data_base: null, + data_list: [], + data_page_total: 0, + data_page: 1, + data_list_loding_status: 1, + data_bottom_line_status: false, + params: null, + nav_status_list: [ + { name: "全部", value: "-1" }, + { name: "待审核", value: "0" }, + { name: "待开票", value: "1" }, + { name: "已开票", value: "2" }, + { name: "已拒绝", value: "3" }, + ], + nav_status_index: 0, + }, + + onLoad(params) { + // 是否指定状态 + var nav_status_index = 0; + if ((params.status || null) != null) { + for (var i in this.data.nav_status_list) { + if (this.data.nav_status_list[i]['value'] == params.status) { + nav_status_index = i; + break; + } + } + } + + this.setData({ + params: params, + nav_status_index: nav_status_index, + }); + }, + + onShow() { + this.init(); + }, + + init() { + var user = app.get_user_info(this, 'init'); + if (user != false) { + // 用户未绑定用户则转到登录页面 + if (app.user_is_need_login(user)) { + my.redirectTo({ + url: "/pages/login/login?event_callback=init" + }); + return false; + } else { + // 获取数据 + this.get_data_list(); + } + } else { + this.setData({ + data_list_loding_status: 0, + data_bottom_line_status: false, + }); + } + }, + + // 获取数据 + get_data_list(is_mandatory) { + // 分页是否还有数据 + if ((is_mandatory || 0) == 0) { + if (this.data.data_bottom_line_status == true) { + return false; + } + } + + // 加载loding + my.showLoading({ content: "加载中..." }); + this.setData({ + data_list_loding_status: 1 + }); + + // 请求数据 + var data = { + page: this.data.data_page + }; + + // 参数 + var status = ((this.data.nav_status_list[this.data.nav_status_index] || null) == null) ? -1 : this.data.nav_status_list[this.data.nav_status_index]['value']; + if(status != -1) + { + data['status'] = status; + } + + // 获取数据 + my.request({ + url: app.get_request_url("index", "user", "invoice"), + method: "POST", + data: data, + dataType: "json", + success: res => { + my.hideLoading(); + my.stopPullDownRefresh(); + if (res.data.code == 0) { + if (res.data.data.data.length > 0) { + if (this.data.data_page <= 1) { + var temp_data_list = res.data.data.data; + } else { + var temp_data_list = this.data.data_list; + var temp_data = res.data.data.data; + for (var i in temp_data) { + temp_data_list.push(temp_data[i]); + } + } + this.setData({ + data_base: res.data.data.base || null, + data_list: temp_data_list, + data_total: res.data.data.total, + data_page_total: res.data.data.page_total, + data_list_loding_status: 3, + data_page: this.data.data_page + 1, + }); + + // 是否还有数据 + if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) { + this.setData({ data_bottom_line_status: true }); + } else { + this.setData({ data_bottom_line_status: false }); + } + } else { + this.setData({ + data_list_loding_status: 0, + data_list: [], + data_bottom_line_status: false, + }); + } + } else { + this.setData({ + data_list_loding_status: 0, + }); + if (app.is_login_check(res.data, this, 'get_data_list')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + my.hideLoading(); + my.stopPullDownRefresh(); + + this.setData({ + data_list_loding_status: 2, + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.setData({ + data_page: 1 + }); + this.get_data_list(1); + }, + + // 滚动加载 + scroll_lower(e) { + this.get_data_list(); + }, + + // 导航事件 + nav_event(e) { + this.setData({ + nav_status_index: e.currentTarget.dataset.index || 0, + data_page: 1, + }); + this.get_data_list(1); + }, + + // 编辑事件 + edit_event(e) { + my.navigateTo({ + url: '/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo?id='+e.currentTarget.dataset.value, + }); + }, + + // 删除 + delete_event(e) { + my.confirm({ + title: "温馨提示", + content: "删除后不可恢复,确定继续吗?", + confirmButtonText: "确认", + cancelButtonText: "不了", + success: result => { + if (result.confirm) { + // 参数 + var value = e.currentTarget.dataset.value; + var index = e.currentTarget.dataset.index; + + // 加载loding + my.showLoading({ content: "处理中..." }); + + my.request({ + url: app.get_request_url("delete", "user", "invoice"), + method: "POST", + data: { ids: value }, + dataType: "json", + success: res => { + my.hideLoading(); + if (res.data.code == 0) { + var temp_data_list = this.data.data_list; + temp_data_list.splice(index, 1); + this.setData({ data_list: temp_data_list }); + if (temp_data_list.length == 0) { + this.setData({ + data_list_loding_status: 0, + data_bottom_line_status: false, + }); + } + app.showToast(res.data.msg, "success"); + } else { + app.showToast(res.data.msg); + } + }, + fail: () => { + my.hideLoading(); + app.showToast("服务器请求出错"); + } + }); + } + } + }); + }, +}); \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.json b/sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.json new file mode 100644 index 000000000..8d209247c --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.json @@ -0,0 +1,4 @@ +{ + "pullRefresh": true, + "defaultTitle": "我的发票" +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/order/order.acss b/sourcecode/alipay/default/pages/plugins/invoice/order/order.acss new file mode 100644 index 000000000..20027e637 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/order/order.acss @@ -0,0 +1,43 @@ +/* + * 列表 + */ +.data-list .item .base, +.data-list .item .content { + padding: 20rpx 10rpx; +} +.data-list .item .content .multi-text { + line-height: 50rpx; +} +.data-list .item .content .multi-text .title { + margin-right: 30rpx; +} +.data-list .item .content .multi-text .value { + font-weight: 500; +} +.data-list .item .content .multi-text .unit { + margin-left: 10rpx; +} +.data-list .item .operation { + padding: 20rpx 10rpx; +} +.data-list .item .operation button:not(:first-child) { + margin-left: 30rpx; +} + +/* + * 选择 + */ + .selected .icon { + width: 40rpx; + height: 40rpx !important; + margin-left: 10rpx; + margin-right: 20rpx; + vertical-align: middle; +} + .invoice-merge-submit { + width: 220rpx; + height: 70rpx !important; + line-height: 74rpx !important; + left: calc(50% - 110rpx); + bottom: 50rpx; +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/order/order.axml b/sourcecode/alipay/default/pages/plugins/invoice/order/order.axml new file mode 100644 index 000000000..25f58538d --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/order/order.axml @@ -0,0 +1,56 @@ + + + + + + + + + {{item.add_time}} + + + + + 订单编号 + {{item.order_no}} + + + 订单总价 + {{item.total_price}} + + + + 支付金额 + {{item.pay_price}} + + + + 订单单价 + {{item.price}} + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/order/order.js b/sourcecode/alipay/default/pages/plugins/invoice/order/order.js new file mode 100644 index 000000000..9c47650a7 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/order/order.js @@ -0,0 +1,166 @@ +const app = getApp(); +Page({ + data: { + data_base: null, + data_list: [], + data_page_total: 0, + data_page: 1, + data_list_loding_status: 1, + data_bottom_line_status: false, + params: null, + select_ids: [], + }, + + onLoad(params) { + this.setData({ + params: params, + }); + }, + + onShow() { + this.init(); + }, + + init() { + var user = app.get_user_info(this, 'init'); + if (user != false) { + // 用户未绑定用户则转到登录页面 + if (app.user_is_need_login(user)) { + my.redirectTo({ + url: "/pages/login/login?event_callback=init" + }); + return false; + } else { + // 获取数据 + this.get_data_list(); + } + } else { + this.setData({ + data_list_loding_status: 0, + data_bottom_line_status: false, + }); + } + }, + + // 获取数据 + get_data_list(is_mandatory) { + // 分页是否还有数据 + if ((is_mandatory || 0) == 0) { + if (this.data.data_bottom_line_status == true) { + return false; + } + } + + // 加载loding + my.showLoading({ content: "加载中..." }); + this.setData({ + data_list_loding_status: 1 + }); + + // 请求数据 + var data = { + page: this.data.data_page + }; + + // 获取数据 + my.request({ + url: app.get_request_url("index", "order", "invoice"), + method: "POST", + data: data, + dataType: "json", + success: res => { + my.hideLoading(); + my.stopPullDownRefresh(); + if (res.data.code == 0) { + if (res.data.data.data.length > 0) { + if (this.data.data_page <= 1) { + var temp_data_list = res.data.data.data; + } else { + var temp_data_list = this.data.data_list; + var temp_data = res.data.data.data; + for (var i in temp_data) { + temp_data_list.push(temp_data[i]); + } + } + this.setData({ + data_base: res.data.data.base || null, + data_list: temp_data_list, + data_total: res.data.data.total, + data_page_total: res.data.data.page_total, + data_list_loding_status: 3, + data_page: this.data.data_page + 1, + }); + + // 是否还有数据 + if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) { + this.setData({ data_bottom_line_status: true }); + } else { + this.setData({ data_bottom_line_status: false }); + } + } else { + this.setData({ + data_list_loding_status: 0, + data_list: [], + data_bottom_line_status: false, + }); + } + } else { + this.setData({ + data_list_loding_status: 0, + }); + if (app.is_login_check(res.data, this, 'get_data_list')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + my.hideLoading(); + my.stopPullDownRefresh(); + + this.setData({ + data_list_loding_status: 2, + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.setData({ + data_page: 1 + }); + this.get_data_list(1); + }, + + // 滚动加载 + scroll_lower(e) { + this.get_data_list(); + }, + + // 选择 + selected_event(e) { + var value = e.currentTarget.dataset.value; + var temp_select_ids = this.data.select_ids; + var index = temp_select_ids.indexOf(value); + if(index == -1) + { + temp_select_ids.push(value); + } else { + temp_select_ids.splice(index, 1); + } + this.setData({select_ids: temp_select_ids}); + }, + + // 合并开票 + invoice_merge_event(e) { + if(this.data.select_ids.length <= 0) + { + app.showToast('请先选择数据'); + return false; + } + my.navigateTo({ + url: '/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo?ids='+this.data.select_ids.join(',')+'&type=order&is_redirect=1', + }); + }, +}); \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/order/order.json b/sourcecode/alipay/default/pages/plugins/invoice/order/order.json new file mode 100644 index 000000000..139a3cb35 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/order/order.json @@ -0,0 +1,4 @@ +{ + "pullRefresh": true, + "defaultTitle": "订单开票" +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/user/user.acss b/sourcecode/alipay/default/pages/plugins/invoice/user/user.acss new file mode 100644 index 000000000..c3245db62 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/user/user.acss @@ -0,0 +1,29 @@ +/* + * 导航 + */ +.nav { + border-top: 1px solid #eee; +} +.nav .item { + padding: 30rpx 0; + width: calc(50% - 1px); + border-bottom: 1px solid #eee; +} +.nav .item:nth-child(odd) { + border-right: 1px solid #eee; +} +.nav .item image { + width: 100rpx; + height: 100rpx; + margin: 0 auto; +} +.nav .item .title { + margin-top: 20rpx; +} + +/* + * 提示信息 + */ +.tips-container { + padding: 0 10rpx; +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/user/user.axml b/sourcecode/alipay/default/pages/plugins/invoice/user/user.axml new file mode 100644 index 000000000..ab80f21a8 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/user/user.axml @@ -0,0 +1,20 @@ + + + + + + + {{item.title}} + + + + + + + + + + {{item}} + + + \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/user/user.js b/sourcecode/alipay/default/pages/plugins/invoice/user/user.js new file mode 100644 index 000000000..bb997ae3f --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/user/user.js @@ -0,0 +1,99 @@ +const app = getApp(); +Page({ + data: { + data_bottom_line_status: false, + data_list_loding_status: 1, + data_list_loding_msg: '', + data_base: null, + nav_list: [ + { + icon: "/images/plugins/invoice/user-center-invoice-icon.png", + title: "我的发票", + url: "/pages/plugins/invoice/invoice/invoice", + }, + { + icon: "/images/plugins/invoice/user-center-order-icon.png", + title: "订单开票", + url: "/pages/plugins/invoice/order/order", + } + ], + }, + + onLoad(params) {}, + + onShow() { + this.init(); + }, + + init(e) { + var user = app.get_user_info(this, "init"), + self = this; + if (user != false) { + // 用户未绑定用户则转到登录页面 + if (app.user_is_need_login(user)) { + my.confirm({ + title: '温馨提示', + content: '绑定手机号码', + confirmButtonText: '确认', + cancelButtonText: '暂不', + success: (result) => { + my.stopPullDownRefresh(); + if (result.confirm) { + my.navigateTo({ + url: "/pages/login/login?event_callback=init" + }); + } + }, + }); + } else { + self.get_data(); + } + } + }, + + // 获取数据 + get_data() { + var self = this; + my.request({ + url: app.get_request_url("center", "user", "invoice"), + method: "POST", + data: {}, + dataType: "json", + success: res => { + my.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + self.setData({ + data_base: data.base || null, + data_list_loding_msg: '', + data_list_loding_status: 0, + data_bottom_line_status: false, + }); + } else { + self.setData({ + data_bottom_line_status: false, + data_list_loding_status: 2, + data_list_loding_msg: res.data.msg, + }); + if (app.is_login_check(res.data, self, 'get_data')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + my.stopPullDownRefresh(); + self.setData({ + data_bottom_line_status: false, + data_list_loding_status: 2, + data_list_loding_msg: '服务器请求出错', + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.get_data(); + }, +}); \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/invoice/user/user.json b/sourcecode/alipay/default/pages/plugins/invoice/user/user.json new file mode 100644 index 000000000..8d209247c --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/invoice/user/user.json @@ -0,0 +1,4 @@ +{ + "pullRefresh": true, + "defaultTitle": "我的发票" +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/wallet/cash-auth/cash-auth.js b/sourcecode/alipay/default/pages/plugins/wallet/cash-auth/cash-auth.js index e04da2c87..c1cb2f7ce 100644 --- a/sourcecode/alipay/default/pages/plugins/wallet/cash-auth/cash-auth.js +++ b/sourcecode/alipay/default/pages/plugins/wallet/cash-auth/cash-auth.js @@ -150,7 +150,6 @@ Page({ { fields: "account_type", msg: "请选择认证方式", "is_can_zero": 1 }, { fields: "verify", msg: "请输入验证码" }, ]; - console.log(form_data); // 验证提交表单 if (app.fields_check(form_data, validation)) { diff --git a/sourcecode/baidu/default/images/plugins/invoice/user-center-invoice-icon.png b/sourcecode/baidu/default/images/plugins/invoice/user-center-invoice-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ad612e227f84e52acc33abf1c6ff2c1fcfd617a3 GIT binary patch literal 4622 zcmbVQXH-*J*9Hd!snVr~(AAI-2$Eo6B($I)y|<7=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IRCA_eGF#OL`4`Y zx8f;M{BDkGwR`oo+Oe=&xmn85)=POW4?j;f)?BTo_HBCTPC&-E{TrS>(3U^8 zG4WJjipCCeI9~xQD)Yn3L#>T(zRydT6qI?JAPozY@;GTru9TDt%#fVj@MqV1#FlUS zUw-;PUTV0=DY9c~LSv}HsO!rw4NmN}l+zQLckKoK=o3CIxPAL&{K<^r2yuCyky$7! zzZ-1oaiAu?nJ4>v{;fKK+JmQ>JoVGZmR206&iS?hu1;jre(ysTOCKNG)vHBI>rWBo z&kz3Ha%5M{%K6N#9LtvB{S9tsq9b1(Z8M`<=0fxLw#XOER@=@-SngMkB{g2ZGG8^0td&_1(OGd3!=h)KXIK$ z)Ou|FQ)f*6)k_YopDx~093PAF?z^d-V%u2Z8@a__TArU)BuZyf`@a3u%} zwrJ*ANwJmOjQ)UjpI@P`q$u6|*yTR+aJjQ!zM;k^ lX$ilf7F&(Wd!fYDSf|HI_EXOG`*;4>pv`T~s!aXp{{jvT`JDg& literal 0 HcmV?d00001 diff --git a/sourcecode/baidu/default/images/plugins/invoice/user-center-order-icon.png b/sourcecode/baidu/default/images/plugins/invoice/user-center-order-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c48293ce441b6dd657b8ce77e86834dfed9ecd94 GIT binary patch literal 1824 zcmV+*2jBRKP)LL9HMve(-^>x|!WlQ47`=s32O@TD1y3tL-LM=>z?seo%aTs7ZW3 zK3GLZd@}sAeLw7BGgO%h9IDD>g#9hk+R}Ce27#XteiGQo zB-WO1k)M+ek_d=b(pe~TfQyng(jocpAiU`J%ksE-Vgcz{s%K@ocm(K+J8*~R4b-YE z+_XT}Mb#M@$PkRRQ3slc@wF;5qC$xTq^F>#XM_(XqPcN3*OW6h<>f=ud}AP9K`%vk z!>F*bO@(ibV%sz*BOIhkk5T)|Og}HHOk$0IOnF2P=-!u)fRh^)6=99mc!etK{X1l< z$>8lCGo`3Ubivsf;Tl!WYoh0~-G6i1rwirJFwI6lyrSL(+~1(scfiAbP96&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)k_YopDx~093PAF?z^d-V%u2Z8@a__TArU)BuZyf`@a3u%} zwrJ*ANwJmOjQ)UjpI@P`q$u6|*yTR+aJjQ!zM;k^ lX$ilf7F&(Wd!fYDSf|HI_EXOG`*;4>pv`T~s!aXp{{jvT`JDg& literal 0 HcmV?d00001 diff --git a/sourcecode/qq/default/images/plugins/invoice/user-center-order-icon.png b/sourcecode/qq/default/images/plugins/invoice/user-center-order-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c48293ce441b6dd657b8ce77e86834dfed9ecd94 GIT binary patch literal 1824 zcmV+*2jBRKP)LL9HMve(-^>x|!WlQ47`=s32O@TD1y3tL-LM=>z?seo%aTs7ZW3 zK3GLZd@}sAeLw7BGgO%h9IDD>g#9hk+R}Ce27#XteiGQo zB-WO1k)M+ek_d=b(pe~TfQyng(jocpAiU`J%ksE-Vgcz{s%K@ocm(K+J8*~R4b-YE z+_XT}Mb#M@$PkRRQ3slc@wF;5qC$xTq^F>#XM_(XqPcN3*OW6h<>f=ud}AP9K`%vk z!>F*bO@(ibV%sz*BOIhkk5T)|Og}HHOk$0IOnF2P=-!u)fRh^)6=99mc!etK{X1l< z$>8lCGo`3Ubivsf;Tl!WYoh0~-G6i1rwirJFwI6lyrSL(+~1(scfiAbP96&ztdrmO ziaH-y1RU8w=iPoz9tiWm6v&srF?EXV%)prgIjMvVG!fqKD{8g|8=&t0U|ap192@3C zD3E45a#gOa~X(Ai}wpcCV~qH3K_ zm35Vz%y2-)fw%)Q4yHF7(gATm+&;w35X)wP1LA;y`?ELRR^WE(@q9}y%K=Hv+IWQ> zka)hOmgRt?W^KH}4oE!TQp<8cQnNN*VFx6hZ>eQDAgNg!udww%j(_sbI|ecB78$$3g9!mNr>Zt?T-j7d+{0tuS;iuwa^xQP&3 zV?@|o?w5w=HjnPxY9K+g*@CVRp+#ZfjE>w!cO(+RN-h-DNV5C_Dab<%7b za5Kcs5H~~I46$q$I3Ny4YtGBcmUONtcQ&|Au^nt)jj}Q9>Zg%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rsmlP zmA4O`+Z7}|U3T^5Es0`3m+>=q#z>aw3jj4#rpHWZi%YEJ{>lXA^YCy5eS(xwMy9Rj z=n-v$nWnbs)D$g)}kr0bm0aMxlCw< zbo8$zaJ80L3p&hbSabeSL(L<(0;jbZ8qQ@ok(@PJjybj&uUIS4A5rB2vgC=eN z(Q@E{ju2|f?>E(sX6`?evi>w|0<|yE1hvBi+5oD|l%>_^4|8#YA-j)S4frG)xp$X7 z@XBBn1~ch5sckD;z2n2g&JBv?8g=((n8S@=#eFX=P6a0K!{*vT%d9IRCA_eGF#OL`4`Y zx8f;M{BDkGwR`oo+Oe=&xmn85)=POW4?j;f)?BTo_HBCTPC&-E{TrS>(3U^8 zG4WJjipCCeI9~xQD)Yn3L#>T(zRydT6qI?JAPozY@;GTru9TDt%#fVj@MqV1#FlUS zUw-;PUTV0=DY9c~LSv}HsO!rw4NmN}l+zQLckKoK=o3CIxPAL&{K<^r2yuCyky$7! zzZ-1oaiAu?nJ4>v{;fKK+JmQ>JoVGZmR206&iS?hu1;jre(ysTOCKNG)vHBI>rWBo z&kz3Ha%5M{%K6N#9LtvB{S9tsq9b1(Z8M`<=0fxLw#XOER@=@-SngMkB{g2ZGG8^0td&_1(OGd3!=h)KXIK$ z)Ou|FQ)f*6)k_YopDx~093PAF?z^d-V%u2Z8@a__TArU)BuZyf`@a3u%} zwrJ*ANwJmOjQ)UjpI@P`q$u6|*yTR+aJjQ!zM;k^ lX$ilf7F&(Wd!fYDSf|HI_EXOG`*;4>pv`T~s!aXp{{jvT`JDg& literal 0 HcmV?d00001 diff --git a/sourcecode/toutiao/default/images/plugins/invoice/user-center-order-icon.png b/sourcecode/toutiao/default/images/plugins/invoice/user-center-order-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c48293ce441b6dd657b8ce77e86834dfed9ecd94 GIT binary patch literal 1824 zcmV+*2jBRKP)LL9HMve(-^>x|!WlQ47`=s32O@TD1y3tL-LM=>z?seo%aTs7ZW3 zK3GLZd@}sAeLw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yYyrgK$7B1M&~hEpwp;J>4Gw O0000 { + tt.hideLoading(); + tt.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + self.setData({ + detail: data.data, + detail_list: [ + { name: "业务类型", value: data.data.business_type_name || '' }, + { name: "申请类型", value: data.data.apply_type_name || '' }, + { name: "发票类型", value: data.data.invoice_type_name || '' }, + { name: "发票金额", value: data.data.total_price || '' }, + { name: "状态", value: data.data.status_name || '' }, + { name: "发票内容", value: data.data.invoice_content || '' }, + { name: "发票抬头", value: data.data.invoice_title || '' }, + { name: "纳税识别号", value: data.data.invoice_code || '' }, + { name: "企业开户行名称", value: data.data.invoice_bank || '' }, + { name: "企业开户帐号", value: data.data.invoice_account || '' }, + { name: "企业联系电话", value: data.data.invoice_tel || '' }, + { name: "企业注册地址", value: data.data.invoice_address || '' }, + { name: "收件人姓名", value: data.data.name || '' }, + { name: "收件人电话", value: data.data.tel || '' }, + { name: "收件人地址", value: data.data.address || '' }, + { name: "电子邮箱", value: data.data.email || '' }, + { name: "拒绝原因", value: data.data.refuse_reason || '' }, + { name: "用户备注", value: data.data.user_note || '' }, + { name: "创建时间", value: data.data.add_time || '' }, + { name: "更新时间", value: data.data.upd_time || '' }, + ], + express_data: [ + { name: "快递名称", value: data.data.express_name || '' }, + { name: "快递单号", value: data.data.express_number || '' }, + ], + + data_list_loding_status: 3, + data_bottom_line_status: true, + data_list_loding_msg: '', + }); + } else { + self.setData({ + data_list_loding_status: 2, + data_bottom_line_status: false, + data_list_loding_msg: res.data.msg, + }); + if (app.is_login_check(res.data, self, 'init')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + tt.hideLoading(); + tt.stopPullDownRefresh(); + self.setData({ + data_list_loding_status: 2, + data_bottom_line_status: false, + data_list_loding_msg: '服务器请求出错', + }); + + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.init(); + }, + + // 电子发票复制 + electronic_invoice_event(e) { + var value = e.currentTarget.dataset.value || null; + if (value != null) { + tt.setClipboardData({ + data: value, + success(res) { + app.showToast('复制成功', 'success'); + } + }); + } else { + app.showToast('链接地址有误'); + } + }, +}); \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.json b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.json new file mode 100644 index 000000000..7e909a850 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.json @@ -0,0 +1,4 @@ +{ + "enablePullDownRefresh": true, + "navigationBarTitleText": "发票详情" +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.ttml b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.ttml new file mode 100644 index 000000000..522315a07 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.ttml @@ -0,0 +1,47 @@ + + + 申请信息 + + + {{item.name}} + {{item.value}} + + + + + + + 快递信息 + + + {{item.name}} + {{item.value}} + + + + + + + 电子发票 + + + {{item.title}} + + + 可点击发票名称复制后、到浏览器打开地址下载发票。 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.ttss b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.ttss new file mode 100644 index 000000000..bf22478b7 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.ttss @@ -0,0 +1,27 @@ +.panel-item .panel-title { + background: #fff; + font-weight: bold; + padding: 15rpx; + border-bottom: 2px solid #eee; + font-size: 34rpx; +} +.panel-item .panel-content .item { + padding: 20rpx 0; +} +.panel-item .panel-content .item:last-child { + border: 0; +} +.panel-item .panel-content .item .title { + width: 25%; + padding-left: 20rpx; +} +.panel-item .panel-content .item .content { + width: calc(75% - 50rpx); + padding-left: 20rpx; + min-height: 46rpx; + word-wrap: break-word; + word-break: normal; +} +.panel-item .panel-content .item view { + line-height: 46rpx; +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js new file mode 100644 index 000000000..c54bb99dd --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js @@ -0,0 +1,280 @@ +const app = getApp(); +Page({ + data: { + params: null, + form_submit_loading: false, + data_list_loding_status: 1, + data_list_loding_msg: '', + data_bottom_line_status: false, + data_base: null, + apply_type_list: [], + can_invoice_type_list: [], + invoice_content_list: [], + save_base_data: null, + data: null, + + form_invoice_type_index: 0, + form_apply_type_index: 0, + form_invoice_content_index: 0, + form_apply_type_disabled: false, + company_container: false, + company_special_container: false, + addressee_container: false, + email_container: true, + }, + + onLoad(params) { + this.setData({ params: params }); + this.init(); + }, + + onShow() {}, + + init() { + var self = this; + tt.showLoading({ title: "加载中..." }); + this.setData({ + data_list_loding_status: 1 + }); + + tt.request({ + url: app.get_request_url("saveinfo", "user", "invoice"), + method: "POST", + data: this.data.params, + dataType: "json", + success: res => { + tt.hideLoading(); + tt.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + self.setData({ + data_base: data.base || null, + apply_type_list: data.apply_type_list || [], + can_invoice_type_list: data.can_invoice_type_list || [], + invoice_content_list: data.invoice_content_list || [], + save_base_data: data.save_base_data, + data: ((data.data || null) == null || data.data.length == 0) ? null : data.data, + data_list_loding_status: 0, + data_bottom_line_status: true, + data_list_loding_msg: (data.save_base_data.total_price <= 0) ? '发票金额必须大于0' : '', + }); + + // 数据容器处理 + this.invoice_container_handle(); + } else { + self.setData({ + data_list_loding_status: 2, + data_bottom_line_status: false, + data_list_loding_msg: res.data.msg, + }); + if (app.is_login_check(res.data, self, 'init')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + tt.hideLoading(); + tt.stopPullDownRefresh(); + self.setData({ + data_list_loding_status: 2, + data_bottom_line_status: false, + data_list_loding_msg: '服务器请求出错', + }); + + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.init(); + }, + + // 发票类型事件 + form_invoice_type_event(e) { + this.setData({ + form_invoice_type_index: e.detail.value + }); + this.invoice_container_handle(); + }, + + // 发票类型事件 + form_apply_type_event(e) { + this.setData({ + form_apply_type_index: e.detail.value + }); + this.invoice_container_handle(); + }, + + // 发票内容事件 + form_invoice_content_event(e) { + this.setData({ + form_invoice_content_index: e.detail.value + }); + }, + + // 容器显隐处理 + invoice_container_handle() { + // 发票类型 + var invoice_type = this.data.can_invoice_type_list[this.data.form_invoice_type_index]['id']; + if(invoice_type == 2) + { + // 选择专票的时候申请类型必须是企业 + this.setData({ + form_apply_type_index: 1, + form_apply_type_disabled: true, + }); + } else { + this.setData({ + form_apply_type_disabled: false, + }); + } + + // 申请类型 + switch(invoice_type) + { + // 增值税普通电子发票 + case 0 : + this.setData({ + company_special_container: false, + addressee_container: false, + email_container: true, + }); + break; + + // 增值税普通纸质发票 + case 1 : + this.setData({ + company_special_container: false, + addressee_container: true, + email_container: false, + }); + break; + + // 增值税专业纸质发票 + case 2 : + this.setData({ + company_container: true, + company_special_container: true, + addressee_container: true, + email_container: false, + }); + break; + } + + // 增值税专业纸质发票情况下个人类型处理 + if(invoice_type != 2) + { + var apply_type = this.data.apply_type_list[this.data.form_apply_type_index]['id']; + if(apply_type == 0) + { + this.setData({ + company_container: false, + }); + } else { + this.setData({ + company_container: true, + }); + } + } + }, + + // 表单提交 + formSubmit(e) + { + var data = e.detail.value; + if((this.data.data || null) == null) + { + data['ids'] = this.data.params.ids || ''; + data['type'] = this.data.params.type || ''; + } else { + data['id'] = this.data.data.id; + } + + // 数据验证 + var validation = [ + {fields: 'invoice_type', msg: '请选择发票类型', is_can_zero: 1}, + {fields: 'apply_type', msg: '请选择申请类型', is_can_zero: 1}, + {fields: 'invoice_title', msg: '请填写发票抬头、最多200个字符'} + ]; + if(app.fields_check(data, validation)) + { + var invoice_type = this.data.can_invoice_type_list[this.data.form_invoice_type_index]['id']; + var apply_type = this.data.apply_type_list[this.data.form_apply_type_index]['id']; + if(apply_type == 1) + { + validation.push({fields: 'invoice_code', msg: '请填写企业统一社会信用代码或纳税识别号、最多160个字符'}); + } + if(invoice_type == 2) + { + validation.push({fields: 'invoice_bank', msg: '请填写企业开户行名称、最多200个字符'}); + validation.push({fields: 'invoice_account', msg: '请填写企业开户帐号、最多160个字符'}); + validation.push({fields: 'invoice_tel', msg: '请填写企业联系电话 6~15 个字符'}); + validation.push({fields: 'invoice_address', msg: '请填写企业注册地址、最多230个字符'}); + } + if(invoice_type != 0) + { + validation.push({fields: 'name', msg: '请填写收件人姓名格式 2~30 个字符之间'}); + validation.push({fields: 'tel', msg: '请填写收件人电话 6~15 个字符'}); + validation.push({fields: 'address', msg: '请填写收件人地址、最多230个字符'}); + } + if(app.fields_check(data, validation)) + { + // 发票类型 + data['invoice_type'] = this.data.can_invoice_type_list[this.data.form_invoice_type_index]['id']; + + // 发票内容 + if(this.data.invoice_content_list.length > 0 && this.data.invoice_content_list[this.data.form_invoice_content_index] != undefined) + { + data['invoice_content'] = this.data.invoice_content_list[this.data.form_invoice_content_index]; + } + + tt.showLoading({title: '提交中...'}); + this.setData({form_submit_loading: true}); + + // 网络请求 + var self = this; + tt.request({ + url: app.get_request_url("save", "user", "invoice"), + method: 'POST', + data: data, + dataType: 'json', + header: { 'content-type': 'application/x-www-form-urlencoded' }, + success: (res) => { + tt.hideLoading(); + + if(res.data.code == 0) + { + app.showToast(res.data.msg, "success"); + setTimeout(function() + { + // 是否关闭页面进入我的发票、适合从订单开票中过来提交成功直接进入我的发票列表 + if((self.data.params || null) != null && (self.data.params.is_redirect || 0) == 1) + { + tt.redirectTo({ + url: "/pages/plugins/invoice/invoice/invoice" + }); + } else { + tt:tt.navigateBack(); + } + }, 2000); + } else { + this.setData({form_submit_loading: false}); + if (app.is_login_check(res.data)) { + app.showToast(res.data.msg); + } else { + app.showToast('提交失败,请重试!'); + } + } + }, + fail: () => { + tt.hideLoading(); + this.setData({form_submit_loading: false}); + app.showToast('服务器请求出错'); + } + }); + } + } + }, +}); \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json new file mode 100644 index 000000000..2f2feff85 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json @@ -0,0 +1,4 @@ +{ + "enablePullDownRefresh": true, + "navigationBarTitleText": "开票" +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttml b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttml new file mode 100644 index 000000000..0c9408ffc --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttml @@ -0,0 +1,104 @@ + +
+ + 发票金额 {{save_base_data.total_price}} 元 + + + + 发票类型必选 + + + {{can_invoice_type_list[form_invoice_type_index] == undefined ? '请选择发票类型' : can_invoice_type_list[form_invoice_type_index]['name']}} + + + + + + 申请类型必选 + + + {{apply_type_list[form_apply_type_index] == undefined ? '请选择申请类型' : apply_type_list[form_apply_type_index]['name']}} + + + + + + 发票内容必选 + + + {{invoice_content_list[form_invoice_content_index] == undefined ? '请选择发票内容' : invoice_content_list[form_invoice_content_index]}} + + + + + + 发票抬头必填 + + + + + + + 企业统一社会信用代码或纳税识别号必填 + + + + + + + + 企业开户行名称必填 + + + + 企业开户帐号必填 + + + + 企业联系电话必填 + + + + 企业注册地址必填 + + + + + + + + 收件人姓名必填 + + + + 收件人电话必填 + + + + 收件人地址必填 + + + + + + + + 电子邮箱选填 + + + + + + 备注选填 + + + + + + +
+
+ + + + \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttss b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttss new file mode 100644 index 000000000..3122fa5c2 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttss @@ -0,0 +1,7 @@ +.content-top { + padding: 30rpx 10rpx; +} +.content-top text { + font-size: 38rpx; + font-weight: bold; +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.js b/sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.js new file mode 100644 index 000000000..aeb33ade3 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.js @@ -0,0 +1,230 @@ +const app = getApp(); +Page({ + data: { + data_base: null, + data_list: [], + data_page_total: 0, + data_page: 1, + data_list_loding_status: 1, + data_bottom_line_status: false, + params: null, + nav_status_list: [ + { name: "全部", value: "-1" }, + { name: "待审核", value: "0" }, + { name: "待开票", value: "1" }, + { name: "已开票", value: "2" }, + { name: "已拒绝", value: "3" }, + ], + nav_status_index: 0, + }, + + onLoad(params) { + // 是否指定状态 + var nav_status_index = 0; + if ((params.status || null) != null) { + for (var i in this.data.nav_status_list) { + if (this.data.nav_status_list[i]['value'] == params.status) { + nav_status_index = i; + break; + } + } + } + + this.setData({ + params: params, + nav_status_index: nav_status_index, + }); + }, + + onShow() { + this.init(); + }, + + init() { + var user = app.get_user_info(this, 'init'); + if (user != false) { + // 用户未绑定用户则转到登录页面 + if (app.user_is_need_login(user)) { + tt.redirectTo({ + url: "/pages/login/login?event_callback=init" + }); + return false; + } else { + // 获取数据 + this.get_data_list(); + } + } else { + this.setData({ + data_list_loding_status: 0, + data_bottom_line_status: false, + }); + } + }, + + // 获取数据 + get_data_list(is_mandatory) { + // 分页是否还有数据 + if ((is_mandatory || 0) == 0) { + if (this.data.data_bottom_line_status == true) { + return false; + } + } + + // 加载loding + tt.showLoading({ title: "加载中..." }); + this.setData({ + data_list_loding_status: 1 + }); + + // 请求数据 + var data = { + page: this.data.data_page + }; + + // 参数 + var status = ((this.data.nav_status_list[this.data.nav_status_index] || null) == null) ? -1 : this.data.nav_status_list[this.data.nav_status_index]['value']; + if(status != -1) + { + data['status'] = status; + } + + // 获取数据 + tt.request({ + url: app.get_request_url("index", "user", "invoice"), + method: "POST", + data: data, + dataType: "json", + success: res => { + tt.hideLoading(); + tt.stopPullDownRefresh(); + if (res.data.code == 0) { + if (res.data.data.data.length > 0) { + if (this.data.data_page <= 1) { + var temp_data_list = res.data.data.data; + } else { + var temp_data_list = this.data.data_list; + var temp_data = res.data.data.data; + for (var i in temp_data) { + temp_data_list.push(temp_data[i]); + } + } + this.setData({ + data_base: res.data.data.base || null, + data_list: temp_data_list, + data_total: res.data.data.total, + data_page_total: res.data.data.page_total, + data_list_loding_status: 3, + data_page: this.data.data_page + 1, + }); + + // 是否还有数据 + if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) { + this.setData({ data_bottom_line_status: true }); + } else { + this.setData({ data_bottom_line_status: false }); + } + } else { + this.setData({ + data_list_loding_status: 0, + data_list: [], + data_bottom_line_status: false, + }); + } + } else { + this.setData({ + data_list_loding_status: 0, + }); + if (app.is_login_check(res.data, this, 'get_data_list')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + tt.hideLoading(); + tt.stopPullDownRefresh(); + + this.setData({ + data_list_loding_status: 2, + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.setData({ + data_page: 1 + }); + this.get_data_list(1); + }, + + // 滚动加载 + scroll_lower(e) { + this.get_data_list(); + }, + + // 导航事件 + nav_event(e) { + this.setData({ + nav_status_index: e.currentTarget.dataset.index || 0, + data_page: 1, + }); + this.get_data_list(1); + }, + + // 编辑事件 + edit_event(e) { + tt.navigateTo({ + url: '/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo?id='+e.currentTarget.dataset.value, + }); + }, + + // 删除 + delete_event(e) { + tt.showModal({ + title: "温馨提示", + content: "删除后不可恢复,确定继续吗?", + confirmText: "确认", + cancelText: "不了", + success: result => { + if (result.confirm) { + // 参数 + var value = e.currentTarget.dataset.value; + var index = e.currentTarget.dataset.index; + + // 加载loding + tt.showLoading({ title: "处理中..." }); + + tt.request({ + url: app.get_request_url("delete", "user", "invoice"), + method: "POST", + data: { ids: value }, + dataType: "json", + success: res => { + tt.hideLoading(); + if (res.data.code == 0) { + var temp_data_list = this.data.data_list; + temp_data_list.splice(index, 1); + this.setData({ data_list: temp_data_list }); + if (temp_data_list.length == 0) { + this.setData({ + data_list_loding_status: 0, + data_bottom_line_status: false, + }); + } + app.showToast(res.data.msg, "success"); + } else { + app.showToast(res.data.msg); + } + }, + fail: () => { + tt.hideLoading(); + app.showToast("服务器请求出错"); + } + }); + } + } + }); + }, +}); \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.json b/sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.json new file mode 100644 index 000000000..557e8cfc0 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.json @@ -0,0 +1,4 @@ +{ + "enablePullDownRefresh": true, + "navigationBarTitleText": "我的发票" +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.ttml b/sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.ttml new file mode 100644 index 000000000..e4a94ca0b --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.ttml @@ -0,0 +1,56 @@ + + + + {{item.name}} + + + + + + + + + {{item.add_time}} + {{item.status_name}} + + + + + 业务类型 + {{item.business_type_name}} + + + 申请类型 + {{item.apply_type_name}} + + + 发票类型 + {{item.invoice_type_name}} + + + 发票金额 + {{item.total_price}} + + + + 发票抬头 + {{item.invoice_title}} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.ttss b/sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.ttss new file mode 100644 index 000000000..a282c04c7 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.ttss @@ -0,0 +1,47 @@ +/* + * 导航 + */ + .nav { + background: #eee; + height: 80rpx; + line-height: 80rpx; +} +.nav .item { + width: 20%; +} +.nav .active { + color: #d2364c; +} + +/* + * 列表 + */ +.scroll-box { + height: calc(100vh - 80rpx); +} +.data-list .item .base, +.data-list .item .content { + padding: 20rpx 10rpx; +} +.data-list .item .content .multi-text { + line-height: 50rpx; +} +.data-list .item .content .multi-text .title { + margin-right: 30rpx; +} +.data-list .item .content .multi-text .value { + font-weight: 500; +} +.data-list .item .content .multi-text .unit { + margin-left: 10rpx; +} +.data-list .item .operation { + padding: 20rpx 10rpx; +} +.data-list .item .operation button:not(:first-child) { + margin-left: 30rpx; +} +.data-list .item .submit-delete { + border: 1px solid #dc7f7f; + color: #dc7f7f !important; +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/order/order.js b/sourcecode/toutiao/default/pages/plugins/invoice/order/order.js new file mode 100644 index 000000000..1d71eadcf --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/order/order.js @@ -0,0 +1,166 @@ +const app = getApp(); +Page({ + data: { + data_base: null, + data_list: [], + data_page_total: 0, + data_page: 1, + data_list_loding_status: 1, + data_bottom_line_status: false, + params: null, + select_ids: [], + }, + + onLoad(params) { + this.setData({ + params: params, + }); + }, + + onShow() { + this.init(); + }, + + init() { + var user = app.get_user_info(this, 'init'); + if (user != false) { + // 用户未绑定用户则转到登录页面 + if (app.user_is_need_login(user)) { + tt.redirectTo({ + url: "/pages/login/login?event_callback=init" + }); + return false; + } else { + // 获取数据 + this.get_data_list(); + } + } else { + this.setData({ + data_list_loding_status: 0, + data_bottom_line_status: false, + }); + } + }, + + // 获取数据 + get_data_list(is_mandatory) { + // 分页是否还有数据 + if ((is_mandatory || 0) == 0) { + if (this.data.data_bottom_line_status == true) { + return false; + } + } + + // 加载loding + tt.showLoading({ title: "加载中..." }); + this.setData({ + data_list_loding_status: 1 + }); + + // 请求数据 + var data = { + page: this.data.data_page + }; + + // 获取数据 + tt.request({ + url: app.get_request_url("index", "order", "invoice"), + method: "POST", + data: data, + dataType: "json", + success: res => { + tt.hideLoading(); + tt.stopPullDownRefresh(); + if (res.data.code == 0) { + if (res.data.data.data.length > 0) { + if (this.data.data_page <= 1) { + var temp_data_list = res.data.data.data; + } else { + var temp_data_list = this.data.data_list; + var temp_data = res.data.data.data; + for (var i in temp_data) { + temp_data_list.push(temp_data[i]); + } + } + this.setData({ + data_base: res.data.data.base || null, + data_list: temp_data_list, + data_total: res.data.data.total, + data_page_total: res.data.data.page_total, + data_list_loding_status: 3, + data_page: this.data.data_page + 1, + }); + + // 是否还有数据 + if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) { + this.setData({ data_bottom_line_status: true }); + } else { + this.setData({ data_bottom_line_status: false }); + } + } else { + this.setData({ + data_list_loding_status: 0, + data_list: [], + data_bottom_line_status: false, + }); + } + } else { + this.setData({ + data_list_loding_status: 0, + }); + if (app.is_login_check(res.data, this, 'get_data_list')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + tt.hideLoading(); + tt.stopPullDownRefresh(); + + this.setData({ + data_list_loding_status: 2, + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.setData({ + data_page: 1 + }); + this.get_data_list(1); + }, + + // 滚动加载 + scroll_lower(e) { + this.get_data_list(); + }, + + // 选择 + selected_event(e) { + var value = e.currentTarget.dataset.value; + var temp_select_ids = this.data.select_ids; + var index = temp_select_ids.indexOf(value); + if(index == -1) + { + temp_select_ids.push(value); + } else { + temp_select_ids.splice(index, 1); + } + this.setData({select_ids: temp_select_ids}); + }, + + // 合并开票 + invoice_merge_event(e) { + if(this.data.select_ids.length <= 0) + { + app.showToast('请先选择数据'); + return false; + } + tt.navigateTo({ + url: '/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo?ids='+this.data.select_ids.join(',')+'&type=order&is_redirect=1', + }); + }, +}); \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/order/order.json b/sourcecode/toutiao/default/pages/plugins/invoice/order/order.json new file mode 100644 index 000000000..f2c1b95c8 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/order/order.json @@ -0,0 +1,4 @@ +{ + "enablePullDownRefresh": true, + "navigationBarTitleText": "订单开票" +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/order/order.ttml b/sourcecode/toutiao/default/pages/plugins/invoice/order/order.ttml new file mode 100644 index 000000000..c50491029 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/order/order.ttml @@ -0,0 +1,57 @@ + + + + + + + + + + {{item.add_time}} + + + + + 订单编号 + {{item.order_no}} + + + 订单总价 + {{item.total_price}} + + + + 支付金额 + {{item.pay_price}} + + + + 订单单价 + {{item.price}} + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/order/order.ttss b/sourcecode/toutiao/default/pages/plugins/invoice/order/order.ttss new file mode 100644 index 000000000..20027e637 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/order/order.ttss @@ -0,0 +1,43 @@ +/* + * 列表 + */ +.data-list .item .base, +.data-list .item .content { + padding: 20rpx 10rpx; +} +.data-list .item .content .multi-text { + line-height: 50rpx; +} +.data-list .item .content .multi-text .title { + margin-right: 30rpx; +} +.data-list .item .content .multi-text .value { + font-weight: 500; +} +.data-list .item .content .multi-text .unit { + margin-left: 10rpx; +} +.data-list .item .operation { + padding: 20rpx 10rpx; +} +.data-list .item .operation button:not(:first-child) { + margin-left: 30rpx; +} + +/* + * 选择 + */ + .selected .icon { + width: 40rpx; + height: 40rpx !important; + margin-left: 10rpx; + margin-right: 20rpx; + vertical-align: middle; +} + .invoice-merge-submit { + width: 220rpx; + height: 70rpx !important; + line-height: 74rpx !important; + left: calc(50% - 110rpx); + bottom: 50rpx; +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/user/user.js b/sourcecode/toutiao/default/pages/plugins/invoice/user/user.js new file mode 100644 index 000000000..3163e67fa --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/user/user.js @@ -0,0 +1,99 @@ +const app = getApp(); +Page({ + data: { + data_bottom_line_status: false, + data_list_loding_status: 1, + data_list_loding_msg: '', + data_base: null, + nav_list: [ + { + icon: "/images/plugins/invoice/user-center-invoice-icon.png", + title: "我的发票", + url: "/pages/plugins/invoice/invoice/invoice", + }, + { + icon: "/images/plugins/invoice/user-center-order-icon.png", + title: "订单开票", + url: "/pages/plugins/invoice/order/order", + } + ], + }, + + onLoad(params) {}, + + onShow() { + this.init(); + }, + + init(e) { + var user = app.get_user_info(this, "init"), + self = this; + if (user != false) { + // 用户未绑定用户则转到登录页面 + if (app.user_is_need_login(user)) { + tt.showModal({ + title: '温馨提示', + content: '绑定手机号码', + confirmText: '确认', + cancelText: '暂不', + success: (result) => { + tt.stopPullDownRefresh(); + if (result.confirm) { + tt.navigateTo({ + url: "/pages/login/login?event_callback=init" + }); + } + }, + }); + } else { + self.get_data(); + } + } + }, + + // 获取数据 + get_data() { + var self = this; + tt.request({ + url: app.get_request_url("center", "user", "invoice"), + method: "POST", + data: {}, + dataType: "json", + success: res => { + tt.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + self.setData({ + data_base: data.base || null, + data_list_loding_msg: '', + data_list_loding_status: 0, + data_bottom_line_status: false, + }); + } else { + self.setData({ + data_bottom_line_status: false, + data_list_loding_status: 2, + data_list_loding_msg: res.data.msg, + }); + if (app.is_login_check(res.data, self, 'get_data')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + tt.stopPullDownRefresh(); + self.setData({ + data_bottom_line_status: false, + data_list_loding_status: 2, + data_list_loding_msg: '服务器请求出错', + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.get_data(); + }, +}); \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/user/user.json b/sourcecode/toutiao/default/pages/plugins/invoice/user/user.json new file mode 100644 index 000000000..557e8cfc0 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/user/user.json @@ -0,0 +1,4 @@ +{ + "enablePullDownRefresh": true, + "navigationBarTitleText": "我的发票" +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/user/user.ttml b/sourcecode/toutiao/default/pages/plugins/invoice/user/user.ttml new file mode 100644 index 000000000..d209a4020 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/user/user.ttml @@ -0,0 +1,20 @@ + + + + + + + {{item.title}} + + + + + + + + + + {{item}} + + + \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/invoice/user/user.ttss b/sourcecode/toutiao/default/pages/plugins/invoice/user/user.ttss new file mode 100644 index 000000000..c3245db62 --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/invoice/user/user.ttss @@ -0,0 +1,29 @@ +/* + * 导航 + */ +.nav { + border-top: 1px solid #eee; +} +.nav .item { + padding: 30rpx 0; + width: calc(50% - 1px); + border-bottom: 1px solid #eee; +} +.nav .item:nth-child(odd) { + border-right: 1px solid #eee; +} +.nav .item image { + width: 100rpx; + height: 100rpx; + margin: 0 auto; +} +.nav .item .title { + margin-top: 20rpx; +} + +/* + * 提示信息 + */ +.tips-container { + padding: 0 10rpx; +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/wallet/cash-auth/cash-auth.js b/sourcecode/toutiao/default/pages/plugins/wallet/cash-auth/cash-auth.js index 874610866..a4dd14ee2 100644 --- a/sourcecode/toutiao/default/pages/plugins/wallet/cash-auth/cash-auth.js +++ b/sourcecode/toutiao/default/pages/plugins/wallet/cash-auth/cash-auth.js @@ -179,8 +179,8 @@ Page({ fields: "verify", msg: "请输入验证码" }]; - console.log(form_data); // 验证提交表单 - + + // 验证提交表单 if (app.fields_check(form_data, validation)) { form_data["account_type"] = self.data.check_account_list[self.data.check_account_value]['field']; self.setData({ diff --git a/sourcecode/weixin/default/pages/plugins/invoice/order/order.js b/sourcecode/weixin/default/pages/plugins/invoice/order/order.js index 929c9e62e..e232b17c7 100644 --- a/sourcecode/weixin/default/pages/plugins/invoice/order/order.js +++ b/sourcecode/weixin/default/pages/plugins/invoice/order/order.js @@ -150,7 +150,6 @@ Page({ temp_select_ids.splice(index, 1); } this.setData({select_ids: temp_select_ids}); - console.log(value, index, temp_select_ids); }, // 合并开票 diff --git a/sourcecode/weixin/default/pages/plugins/invoice/user/user.wxml b/sourcecode/weixin/default/pages/plugins/invoice/user/user.wxml index 0f60ee7b7..4af9062b6 100644 --- a/sourcecode/weixin/default/pages/plugins/invoice/user/user.wxml +++ b/sourcecode/weixin/default/pages/plugins/invoice/user/user.wxml @@ -1,5 +1,3 @@ - - diff --git a/sourcecode/weixin/default/pages/plugins/wallet/cash-auth/cash-auth.js b/sourcecode/weixin/default/pages/plugins/wallet/cash-auth/cash-auth.js index 04ae63d99..a41352664 100644 --- a/sourcecode/weixin/default/pages/plugins/wallet/cash-auth/cash-auth.js +++ b/sourcecode/weixin/default/pages/plugins/wallet/cash-auth/cash-auth.js @@ -150,7 +150,6 @@ Page({ { fields: "account_type", msg: "请选择认证方式", "is_can_zero": 1 }, { fields: "verify", msg: "请输入验证码" }, ]; - console.log(form_data); // 验证提交表单 if (app.fields_check(form_data, validation)) {