Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
ShopXO
提交
9821179c
ShopXO
项目概览
飞鱼0526
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9821179c
编写于
12月 08, 2020
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
支付宝+头条小程序新增开票功能
上级
f65956ed
变更
62
隐藏空白更改
内联
并排
Showing
62 changed file
with
2716 addition
and
18 deletion
+2716
-18
changelog.txt
changelog.txt
+1
-0
config/ueditor.php
config/ueditor.php
+2
-2
extend/base/Excel.php
extend/base/Excel.php
+1
-1
extend/base/Toutiao.php
extend/base/Toutiao.php
+1
-1
sourcecode/alipay/default/app.json
sourcecode/alipay/default/app.json
+6
-1
sourcecode/alipay/default/images/plugins/invoice/user-center-invoice-icon.png
...fault/images/plugins/invoice/user-center-invoice-icon.png
+0
-0
sourcecode/alipay/default/images/plugins/invoice/user-center-order-icon.png
...default/images/plugins/invoice/user-center-order-icon.png
+0
-0
sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.acss
.../pages/plugins/invoice/invoice-detail/invoice-detail.acss
+27
-0
sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.axml
.../pages/plugins/invoice/invoice-detail/invoice-detail.axml
+47
-0
sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.js
...lt/pages/plugins/invoice/invoice-detail/invoice-detail.js
+117
-0
sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.json
.../pages/plugins/invoice/invoice-detail/invoice-detail.json
+4
-0
sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.acss
...es/plugins/invoice/invoice-saveinfo/invoice-saveinfo.acss
+7
-0
sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.axml
...es/plugins/invoice/invoice-saveinfo/invoice-saveinfo.axml
+104
-0
sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
...ages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
+280
-0
sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json
...es/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json
+4
-0
sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.acss
...alipay/default/pages/plugins/invoice/invoice/invoice.acss
+47
-0
sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.axml
...alipay/default/pages/plugins/invoice/invoice/invoice.axml
+56
-0
sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.js
...e/alipay/default/pages/plugins/invoice/invoice/invoice.js
+230
-0
sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.json
...alipay/default/pages/plugins/invoice/invoice/invoice.json
+4
-0
sourcecode/alipay/default/pages/plugins/invoice/order/order.acss
...ode/alipay/default/pages/plugins/invoice/order/order.acss
+43
-0
sourcecode/alipay/default/pages/plugins/invoice/order/order.axml
...ode/alipay/default/pages/plugins/invoice/order/order.axml
+56
-0
sourcecode/alipay/default/pages/plugins/invoice/order/order.js
...ecode/alipay/default/pages/plugins/invoice/order/order.js
+166
-0
sourcecode/alipay/default/pages/plugins/invoice/order/order.json
...ode/alipay/default/pages/plugins/invoice/order/order.json
+4
-0
sourcecode/alipay/default/pages/plugins/invoice/user/user.acss
...ecode/alipay/default/pages/plugins/invoice/user/user.acss
+29
-0
sourcecode/alipay/default/pages/plugins/invoice/user/user.axml
...ecode/alipay/default/pages/plugins/invoice/user/user.axml
+20
-0
sourcecode/alipay/default/pages/plugins/invoice/user/user.js
sourcecode/alipay/default/pages/plugins/invoice/user/user.js
+99
-0
sourcecode/alipay/default/pages/plugins/invoice/user/user.json
...ecode/alipay/default/pages/plugins/invoice/user/user.json
+4
-0
sourcecode/alipay/default/pages/plugins/wallet/cash-auth/cash-auth.js
...lipay/default/pages/plugins/wallet/cash-auth/cash-auth.js
+0
-1
sourcecode/baidu/default/images/plugins/invoice/user-center-invoice-icon.png
...fault/images/plugins/invoice/user-center-invoice-icon.png
+0
-0
sourcecode/baidu/default/images/plugins/invoice/user-center-order-icon.png
...default/images/plugins/invoice/user-center-order-icon.png
+0
-0
sourcecode/baidu/default/pages/user-order-comments/user-order-comments.js
.../default/pages/user-order-comments/user-order-comments.js
+0
-1
sourcecode/qq/default/images/plugins/invoice/user-center-invoice-icon.png
...fault/images/plugins/invoice/user-center-invoice-icon.png
+0
-0
sourcecode/qq/default/images/plugins/invoice/user-center-order-icon.png
...default/images/plugins/invoice/user-center-order-icon.png
+0
-0
sourcecode/qq/default/pages/plugins/wallet/cash-auth/cash-auth.js
...de/qq/default/pages/plugins/wallet/cash-auth/cash-auth.js
+0
-1
sourcecode/toutiao/default/app.json
sourcecode/toutiao/default/app.json
+6
-1
sourcecode/toutiao/default/images/plugins/invoice/user-center-invoice-icon.png
...fault/images/plugins/invoice/user-center-invoice-icon.png
+0
-0
sourcecode/toutiao/default/images/plugins/invoice/user-center-order-icon.png
...default/images/plugins/invoice/user-center-order-icon.png
+0
-0
sourcecode/toutiao/default/pages/goods-detail/goods-detail.js
...cecode/toutiao/default/pages/goods-detail/goods-detail.js
+0
-3
sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.js
...lt/pages/plugins/invoice/invoice-detail/invoice-detail.js
+117
-0
sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.json
.../pages/plugins/invoice/invoice-detail/invoice-detail.json
+4
-0
sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.ttml
.../pages/plugins/invoice/invoice-detail/invoice-detail.ttml
+47
-0
sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.ttss
.../pages/plugins/invoice/invoice-detail/invoice-detail.ttss
+27
-0
sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
...ages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
+280
-0
sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json
...es/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json
+4
-0
sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttml
...es/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttml
+104
-0
sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttss
...es/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttss
+7
-0
sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.js
.../toutiao/default/pages/plugins/invoice/invoice/invoice.js
+230
-0
sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.json
...outiao/default/pages/plugins/invoice/invoice/invoice.json
+4
-0
sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.ttml
...outiao/default/pages/plugins/invoice/invoice/invoice.ttml
+56
-0
sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.ttss
...outiao/default/pages/plugins/invoice/invoice/invoice.ttss
+47
-0
sourcecode/toutiao/default/pages/plugins/invoice/order/order.js
...code/toutiao/default/pages/plugins/invoice/order/order.js
+166
-0
sourcecode/toutiao/default/pages/plugins/invoice/order/order.json
...de/toutiao/default/pages/plugins/invoice/order/order.json
+4
-0
sourcecode/toutiao/default/pages/plugins/invoice/order/order.ttml
...de/toutiao/default/pages/plugins/invoice/order/order.ttml
+57
-0
sourcecode/toutiao/default/pages/plugins/invoice/order/order.ttss
...de/toutiao/default/pages/plugins/invoice/order/order.ttss
+43
-0
sourcecode/toutiao/default/pages/plugins/invoice/user/user.js
...cecode/toutiao/default/pages/plugins/invoice/user/user.js
+99
-0
sourcecode/toutiao/default/pages/plugins/invoice/user/user.json
...code/toutiao/default/pages/plugins/invoice/user/user.json
+4
-0
sourcecode/toutiao/default/pages/plugins/invoice/user/user.ttml
...code/toutiao/default/pages/plugins/invoice/user/user.ttml
+20
-0
sourcecode/toutiao/default/pages/plugins/invoice/user/user.ttss
...code/toutiao/default/pages/plugins/invoice/user/user.ttss
+29
-0
sourcecode/toutiao/default/pages/plugins/wallet/cash-auth/cash-auth.js
...utiao/default/pages/plugins/wallet/cash-auth/cash-auth.js
+2
-2
sourcecode/weixin/default/pages/plugins/invoice/order/order.js
...ecode/weixin/default/pages/plugins/invoice/order/order.js
+0
-1
sourcecode/weixin/default/pages/plugins/invoice/user/user.wxml
...ecode/weixin/default/pages/plugins/invoice/user/user.wxml
+0
-2
sourcecode/weixin/default/pages/plugins/wallet/cash-auth/cash-auth.js
...eixin/default/pages/plugins/wallet/cash-auth/cash-auth.js
+0
-1
未找到文件。
changelog.txt
浏览文件 @
9821179c
...
...
@@ -17,6 +17,7 @@ web端
6. 后端动态表格数据列表组件优化高度固定
7. 首页轮播左侧商品分类和右侧聚合内容新增开关控制
8. 动态表格数据列表自定义条件bug修复
9. 编辑器组件CDN跨域不能使用修复
小程序
1. 支付订单0金额错误修复
...
...
config/ueditor.php
浏览文件 @
9821179c
...
...
@@ -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'
,
...
...
extend/base/Excel.php
浏览文件 @
9821179c
...
...
@@ -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'
:
t
e
im
(
$params
[
'writer_type'
]);
$this
->
writer_type
=
empty
(
$params
[
'writer_type'
])
?
'Excel2007'
:
t
r
im
(
$params
[
'writer_type'
]);
// 引入PHPExcel类库
require
ROOT
.
'extend'
.
DS
.
'phpexcel'
.
DS
.
'PHPExcel.php'
;
...
...
extend/base/Toutiao.php
浏览文件 @
9821179c
...
...
@@ -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'
]];
...
...
sourcecode/alipay/default/app.json
浏览文件 @
9821179c
...
...
@@ -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}}"
,
...
...
sourcecode/alipay/default/images/plugins/invoice/user-center-invoice-icon.png
0 → 100644
浏览文件 @
9821179c
4.5 KB
sourcecode/alipay/default/images/plugins/invoice/user-center-order-icon.png
0 → 100644
浏览文件 @
9821179c
1.8 KB
sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.acss
0 → 100644
浏览文件 @
9821179c
.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
sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.axml
0 → 100644
浏览文件 @
9821179c
<view a:if="{{detail != null}}">
<view a:if="{{detail_list.length > 0}}" class="panel-item">
<view class="panel-title">申请信息</view>
<view class="panel-content bg-white">
<view a:for="{{detail_list}}" a:key="item" class="item br-b oh">
<view class="title fl">{{item.name}}</view>
<view class="content fl br-l">{{item.value}}</view>
</view>
</view>
</view>
<!-- 快递信息 -->
<view a:if="{{detail.status == 2 && detail.invoice_type != 0 && express_data.length > 0}}" class="panel-item spacing-mt">
<view class="panel-title">快递信息</view>
<view class="panel-content bg-white">
<view a:for="{{express_data}}" a:key="item" class="item br-b oh">
<view class="title fl">{{item.name}}</view>
<view class="content fl br-l">{{item.value}}</view>
</view>
</view>
</view>
<!-- 电子发票 -->
<view a:if="{{detail.status == 2 && detail.invoice_type == 0 && (detail.electronic_invoice || null) != null}}" class="panel-item spacing-mt">
<view class="panel-title">电子发票</view>
<view class="panel-content bg-white">
<view a:for="{{detail.electronic_invoice}}" a:key="item" class="item br-b oh">
<view class="content" onTap="electronic_invoice_event" data-value="{{item.url}}">{{item.title}}</view>
</view>
</view>
<view class="tips">可点击发票名称复制后、到浏览器打开地址下载发票。</view>
</view>
<import src="/pages/common/bottom_line.axml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
<view a:if="{{detail == null}}">
<import src="/pages/common/nodata.axml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
<view class="nav-back tc wh-auto">
<navigator open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888 br" hover-class="none">返回</button>
</navigator>
</view>
</view>
\ No newline at end of file
sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.js
0 → 100644
浏览文件 @
9821179c
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
sourcecode/alipay/default/pages/plugins/invoice/invoice-detail/invoice-detail.json
0 → 100644
浏览文件 @
9821179c
{
"pullRefresh"
:
true
,
"defaultTitle"
:
"发票详情"
}
\ No newline at end of file
sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.acss
0 → 100644
浏览文件 @
9821179c
.content-top {
padding: 30rpx 10rpx;
}
.content-top text {
font-size: 38rpx;
font-weight: bold;
}
\ No newline at end of file
sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.axml
0 → 100644
浏览文件 @
9821179c
<view a:if="{{save_base_data != null && save_base_data.total_price > 0}}">
<form onSubmit="formSubmit" a:if="{{data_list_loding_status == 0}}">
<view class="content-top bg-white spacing-mb">
发票金额 <text class="cr-main">{{save_base_data.total_price}}</text> 元
</view>
<view class="form-container spacing-mb oh">
<view class="form-gorup bg-white">
<view class="form-gorup-title">发票类型<text class="form-group-tips-must">必选</text></view>
<picker name="invoice_type" onChange="form_invoice_type_event" value="{{form_invoice_type_index}}" range="{{can_invoice_type_list}}" range-key="name">
<view class="picker {{can_invoice_type_list[form_invoice_type_index] == undefined ? 'cr-ccc' : 'cr-666'}} arrow-right">
{{can_invoice_type_list[form_invoice_type_index] == undefined ? '请选择发票类型' : can_invoice_type_list[form_invoice_type_index]['name']}}
</view>
</picker>
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">申请类型<text class="form-group-tips-must">必选</text></view>
<picker name="apply_type" onChange="form_apply_type_event" disabled="{{form_apply_type_disabled}}" value="{{form_apply_type_index}}" range="{{apply_type_list}}" range-key="name">
<view class="picker {{apply_type_list[form_apply_type_index] == undefined ? 'cr-ccc' : 'cr-666'}} arrow-right">
{{apply_type_list[form_apply_type_index] == undefined ? '请选择申请类型' : apply_type_list[form_apply_type_index]['name']}}
</view>
</picker>
</view>
<view a:if="{{invoice_content_list.length > 0}}" class="form-gorup bg-white">
<view class="form-gorup-title">发票内容<text class="form-group-tips-must">必选</text></view>
<picker name="invoice_content" onChange="form_invoice_content_event" value="{{form_invoice_content_index}}" range="{{invoice_content_list}}">
<view class="picker {{invoice_content_list[form_invoice_content_index] == undefined ? 'cr-ccc' : 'cr-666'}} arrow-right">
{{invoice_content_list[form_invoice_content_index] == undefined ? '请选择发票内容' : invoice_content_list[form_invoice_content_index]}}
</view>
</picker>
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">发票抬头<text class="form-group-tips-must">必填</text></view>
<input type="text" name="invoice_title" placeholder-class="cr-ccc" class="cr-666" placeholder="发票抬头、最多200个字符" maxlength="200" value="{{data.invoice_title || ''}}" />
</view>
<!-- 企业信息 -->
<view a:if="{{company_container}}">
<view class="form-gorup bg-white">
<view class="form-gorup-title">企业统一社会信用代码或纳税识别号<text class="form-group-tips-must">必填</text></view>
<input type="text" name="invoice_code" placeholder-class="cr-ccc" class="cr-666" placeholder="企业统一社会信用代码或纳税识别号、最多160个字符" maxlength="160" value="{{data.invoice_code || ''}}" />
</view>
</view>
<!-- 企业专票信息 -->
<view a:if="{{company_special_container}}">
<view class="form-gorup bg-white">
<view class="form-gorup-title">企业开户行名称<text class="form-group-tips-must">必填</text></view>
<input type="text" name="invoice_bank" placeholder-class="cr-ccc" class="cr-666" placeholder="企业开户行名称、最多200个字符" maxlength="200" value="{{data.invoice_bank || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">企业开户帐号<text class="form-group-tips-must">必填</text></view>
<input type="text" name="invoice_account" placeholder-class="cr-ccc" class="cr-666" placeholder="企业开户帐号、最多160个字符" maxlength="160" value="{{data.invoice_account || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">企业联系电话<text class="form-group-tips-must">必填</text></view>
<input type="text" name="invoice_tel" placeholder-class="cr-ccc" class="cr-666" placeholder="企业联系电话 6~15 个字符" maxlength="15" value="{{data.invoice_tel || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">企业注册地址<text class="form-group-tips-must">必填</text></view>
<input type="text" name="invoice_address" placeholder-class="cr-ccc" class="cr-666" placeholder="企业注册地址、最多230个字符" maxlength="230" value="{{data.invoice_address || ''}}" />
</view>
</view>
<!-- 收件人信息 -->
<view a:if="{{addressee_container}}">
<view class="form-gorup bg-white">
<view class="form-gorup-title">收件人姓名<text class="form-group-tips-must">必填</text></view>
<input type="text" name="name" placeholder-class="cr-ccc" class="cr-666" placeholder="收件人姓名格式 2~30 个字符之间" maxlength="30" value="{{data.name || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">收件人电话<text class="form-group-tips-must">必填</text></view>
<input type="text" name="tel" placeholder-class="cr-ccc" class="cr-666" placeholder="收件人电话 6~15 个字符" maxlength="15" value="{{data.tel || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">收件人地址<text class="form-group-tips-must">必填</text></view>
<input type="text" name="address" placeholder-class="cr-ccc" class="cr-666" placeholder="收件人地址、最多230个字符" maxlength="230" value="{{data.address || ''}}" />
</view>
</view>
<!-- 电子邮箱信息 -->
<view a:if="{{email_container}}">
<view class="form-gorup bg-white">
<view class="form-gorup-title">电子邮箱<text class="form-group-tips">选填</text></view>
<input type="text" name="email" placeholder-class="cr-ccc" class="cr-666" placeholder="电子邮箱、最多60个字符" maxlength="60" value="{{data.email || ''}}" />
</view>
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">备注<text class="form-group-tips">选填</text></view>
<input type="text" name="user_note" placeholder-class="cr-ccc" class="cr-666" placeholder="备注最多230个字符" maxlength="60" value="{{data.user_note || ''}}" />
</view>
<view class="form-gorup">
<button class="bg-main submit-bottom" type="default" formType="submit" hover-class="none" loading="{{form_submit_loading}}" disabled="{{form_submit_loading}}">提交</button>
</view>
</view>
</form>
</view>
<view a:else>
<import src="/pages/common/nodata.axml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
\ No newline at end of file
sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
0 → 100644
浏览文件 @
9821179c
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
sourcecode/alipay/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json
0 → 100644
浏览文件 @
9821179c
{
"pullRefresh"
:
true
,
"defaultTitle"
:
"开票"
}
\ No newline at end of file
sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.acss
0 → 100644
浏览文件 @
9821179c
/*
* 导航
*/
.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
sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.axml
0 → 100644
浏览文件 @
9821179c
<!-- 导航 -->
<view class="nav">
<block a:for="{{nav_status_list}}" a:key="key">
<view class="item fl tc cr-888 {{nav_status_index == index ? 'active' : ''}}" data-index="{{index}}" onTap="nav_event">{{item.name}}</view>
</block>
</view>
<!-- 列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" onScrollToLower="scroll_lower" lower-threshold="30">
<view class="data-list">
<view class="item bg-white spacing-mb" a:if="{{data_list.length > 0}}" a:for="{{data_list}}" a:key="key">
<view class="base oh br-b">
<text class="cr-666">{{item.add_time}}</text>
<text class="fr cr-main">{{item.status_name}}</text>
</view>
<navigator url="/pages/plugins/invoice/invoice-detail/invoice-detail?id={{item.id}}" hover-class="none">
<view class="content">
<view class="multi-text">
<text class="title cr-666">业务类型</text>
<text class="value">{{item.business_type_name}}</text>
</view>
<view class="multi-text">
<text class="title cr-666">申请类型</text>
<text class="value">{{item.apply_type_name}}</text>
</view>
<view class="multi-text">
<text class="title cr-666">发票类型</text>
<text class="value">{{item.invoice_type_name}}</text>
</view>
<view class="multi-text">
<text class="title cr-666">发票金额</text>
<text class="value">{{item.total_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">发票抬头</text>
<text class="value">{{item.invoice_title}}</text>
</view>
</view>
</navigator>
<view a:if="{{item.status == 0 || item.status == 3}}" class="operation tr br-t-dashed">
<button class="cr-666 br" type="default" size="mini" onTap="edit_event" data-value="{{item.id}}" hover-class="none">编辑</button>
<button class="submit-delete" type="default" size="mini" onTap="delete_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">删除</button>
</view>
</view>
<view a:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.axml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
</view>
<import src="/pages/common/bottom_line.axml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
</scroll-view>
\ No newline at end of file
sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.js
0 → 100644
浏览文件 @
9821179c
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
sourcecode/alipay/default/pages/plugins/invoice/invoice/invoice.json
0 → 100644
浏览文件 @
9821179c
{
"pullRefresh"
:
true
,
"defaultTitle"
:
"我的发票"
}
\ No newline at end of file
sourcecode/alipay/default/pages/plugins/invoice/order/order.acss
0 → 100644
浏览文件 @
9821179c
/*
* 列表
*/
.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
sourcecode/alipay/default/pages/plugins/invoice/order/order.axml
0 → 100644
浏览文件 @
9821179c
<scroll-view scroll-y="{{true}}" class="scroll-box" onScrollToLower="scroll_lower" lower-threshold="30">
<view class="data-list">
<block a:if="{{data_list.length > 0}}">
<view class="item bg-white spacing-mb" a:for="{{data_list}}" a:key="key">
<view class="base oh br-b">
<view onTap="selected_event" data-type="node" data-value="{{item.id}}" class="fl selected">
<image class="icon" src="/images/default-select{{select_ids.indexOf(item.id) != -1 ? '-active' : ''}}-icon.png" mode="widthFix" />
</view>
<text class="cr-666">{{item.add_time}}</text>
</view>
<navigator url="/pages/user-order-detail/user-order-detail?id={{item.id}}" hover-class="none">
<view class="content">
<view class="multi-text">
<text class="title cr-666">订单编号</text>
<text class="value">{{item.order_no}}</text>
</view>
<view class="multi-text">
<text class="title cr-666">订单总价</text>
<text class="value">{{item.total_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">支付金额</text>
<text class="value">{{item.pay_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">订单单价</text>
<text class="value">{{item.price}}</text>
<text class="unit cr-888">元</text>
</view>
</view>
</navigator>
<view class="operation tr br-t-dashed">
<navigator url="/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo?ids={{item.id}}&type=order&is_redirect=1" hover-class="none">
<button class="cr-666 br" type="default" size="mini" hover-class="none">开票</button>
</navigator>
</view>
</view>
<!-- 合并开票 -->
<view a:if="{{select_ids.length > 0}}">
<button class="submit-fixed invoice-merge-submit" type="default" size="mini" hover-class="none" onTap="invoice_merge_event">合并开票</button>
</view>
</block>
<view a:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.axml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
</view>
<import src="/pages/common/bottom_line.axml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
</scroll-view>
\ No newline at end of file
sourcecode/alipay/default/pages/plugins/invoice/order/order.js
0 → 100644
浏览文件 @
9821179c
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
sourcecode/alipay/default/pages/plugins/invoice/order/order.json
0 → 100644
浏览文件 @
9821179c
{
"pullRefresh"
:
true
,
"defaultTitle"
:
"订单开票"
}
\ No newline at end of file
sourcecode/alipay/default/pages/plugins/invoice/user/user.acss
0 → 100644
浏览文件 @
9821179c
/*
* 导航
*/
.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
sourcecode/alipay/default/pages/plugins/invoice/user/user.axml
0 → 100644
浏览文件 @
9821179c
<!-- 导航 -->
<view a:if="{{nav_list.length > 0 && (data_base || null) != null}}" class="nav oh bg-white">
<block a:for="{{nav_list}}" a:key="key">
<navigator url="{{item.url}}" hover-class="none">
<view class="item fl tc">
<image src="{{item.icon}}" mode="scaleToFill" class="dis-block" />
<view class="title">{{item.title}}</view>
</view>
</navigator>
</block>
</view>
<!-- 通知 -->
<view a:if="{{(data_base.invoice_desc || null) != null && data_base.invoice_desc.length > 0}}" class="tips-container spacing-mt">
<view class="tips">
<view a:for="{{data_base.invoice_desc}}" a:key="key" class="item">
{{item}}
</view>
</view>
</view>
\ No newline at end of file
sourcecode/alipay/default/pages/plugins/invoice/user/user.js
0 → 100644
浏览文件 @
9821179c
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
sourcecode/alipay/default/pages/plugins/invoice/user/user.json
0 → 100644
浏览文件 @
9821179c
{
"pullRefresh"
:
true
,
"defaultTitle"
:
"我的发票"
}
\ No newline at end of file
sourcecode/alipay/default/pages/plugins/wallet/cash-auth/cash-auth.js
浏览文件 @
9821179c
...
...
@@ -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
))
{
...
...
sourcecode/baidu/default/images/plugins/invoice/user-center-invoice-icon.png
0 → 100644
浏览文件 @
9821179c
4.5 KB
sourcecode/baidu/default/images/plugins/invoice/user-center-order-icon.png
0 → 100644
浏览文件 @
9821179c
1.8 KB
sourcecode/baidu/default/pages/user-order-comments/user-order-comments.js
浏览文件 @
9821179c
...
...
@@ -177,7 +177,6 @@ Page({
// 是否匿名事件
anonymous_event
(
e
)
{
console
.
log
(
e
)
this
.
setData
({
anonymous_value
:
e
.
detail
.
checked
==
true
?
1
:
0
});
},
...
...
sourcecode/qq/default/images/plugins/invoice/user-center-invoice-icon.png
0 → 100644
浏览文件 @
9821179c
4.5 KB
sourcecode/qq/default/images/plugins/invoice/user-center-order-icon.png
0 → 100644
浏览文件 @
9821179c
1.8 KB
sourcecode/qq/default/pages/plugins/wallet/cash-auth/cash-auth.js
浏览文件 @
9821179c
...
...
@@ -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
))
{
...
...
sourcecode/toutiao/default/app.json
浏览文件 @
9821179c
...
...
@@ -60,7 +60,12 @@
"pages/plugins/wallet/user-recharge-detail/user-recharge-detail"
,
"pages/plugins/wallet/user-cash/user-cash"
,
"pages/plugins/wallet/user-cash-detail/user-cash-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"
:
{
"navigationBarTitleText"
:
"{{application_title}}"
,
...
...
sourcecode/toutiao/default/images/plugins/invoice/user-center-invoice-icon.png
0 → 100644
浏览文件 @
9821179c
4.5 KB
sourcecode/toutiao/default/images/plugins/invoice/user-center-order-icon.png
0 → 100644
浏览文件 @
9821179c
1.8 KB
sourcecode/toutiao/default/pages/goods-detail/goods-detail.js
浏览文件 @
9821179c
...
...
@@ -75,9 +75,6 @@ Page({
// 初始化配置
this
.
init_config
();
// 显示分享菜单
app
.
show_share_menu
();
},
// 初始化配置
...
...
sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.js
0 → 100644
浏览文件 @
9821179c
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
;
tt
.
showLoading
({
title
:
"
加载中...
"
});
this
.
setData
({
data_list_loding_status
:
1
});
tt
.
request
({
url
:
app
.
get_request_url
(
"
detail
"
,
"
user
"
,
"
invoice
"
),
method
:
"
POST
"
,
data
:
{
id
:
this
.
data
.
params
.
id
},
dataType
:
"
json
"
,
success
:
res
=>
{
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
sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.json
0 → 100644
浏览文件 @
9821179c
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"发票详情"
}
\ No newline at end of file
sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.ttml
0 → 100644
浏览文件 @
9821179c
<view tt:if="{{detail != null}}">
<view tt:if="{{detail_list.length > 0}}" class="panel-item">
<view class="panel-title">申请信息</view>
<view class="panel-content bg-white">
<view tt:for="{{detail_list}}" tt:key="item" class="item br-b oh">
<view class="title fl">{{item.name}}</view>
<view class="content fl br-l">{{item.value}}</view>
</view>
</view>
</view>
<!-- 快递信息 -->
<view tt:if="{{detail.status == 2 && detail.invoice_type != 0 && express_data.length > 0}}" class="panel-item spacing-mt">
<view class="panel-title">快递信息</view>
<view class="panel-content bg-white">
<view tt:for="{{express_data}}" tt:key="item" class="item br-b oh">
<view class="title fl">{{item.name}}</view>
<view class="content fl br-l">{{item.value}}</view>
</view>
</view>
</view>
<!-- 电子发票 -->
<view tt:if="{{detail.status == 2 && detail.invoice_type == 0 && (detail.electronic_invoice || null) != null}}" class="panel-item spacing-mt">
<view class="panel-title">电子发票</view>
<view class="panel-content bg-white">
<view tt:for="{{detail.electronic_invoice}}" tt:key="item" class="item br-b oh">
<view class="content" bindtap="electronic_invoice_event" data-value="{{item.url}}">{{item.title}}</view>
</view>
</view>
<view class="tips">可点击发票名称复制后、到浏览器打开地址下载发票。</view>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
<view tt:if="{{detail == null}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
<view class="nav-back tc wh-auto">
<navigator open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888 br" hover-class="none">返回</button>
</navigator>
</view>
</view>
\ No newline at end of file
sourcecode/toutiao/default/pages/plugins/invoice/invoice-detail/invoice-detail.ttss
0 → 100644
浏览文件 @
9821179c
.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
sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
0 → 100644
浏览文件 @
9821179c
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
sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.json
0 → 100644
浏览文件 @
9821179c
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"开票"
}
\ No newline at end of file
sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttml
0 → 100644
浏览文件 @
9821179c
<view tt:if="{{save_base_data != null && save_base_data.total_price > 0}}">
<form bindsubmit="formSubmit" tt:if="{{data_list_loding_status == 0}}">
<view class="content-top bg-white spacing-mb">
发票金额 <text class="cr-main">{{save_base_data.total_price}}</text> 元
</view>
<view class="form-container spacing-mb oh">
<view class="form-gorup bg-white">
<view class="form-gorup-title">发票类型<text class="form-group-tips-must">必选</text></view>
<picker name="invoice_type" bindchange="form_invoice_type_event" value="{{form_invoice_type_index}}" range="{{can_invoice_type_list}}" range-key="name">
<view class="picker {{can_invoice_type_list[form_invoice_type_index] == undefined ? 'cr-ccc' : 'cr-666'}} arrow-right">
{{can_invoice_type_list[form_invoice_type_index] == undefined ? '请选择发票类型' : can_invoice_type_list[form_invoice_type_index]['name']}}
</view>
</picker>
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">申请类型<text class="form-group-tips-must">必选</text></view>
<picker name="apply_type" bindchange="form_apply_type_event" disabled="{{form_apply_type_disabled}}" value="{{form_apply_type_index}}" range="{{apply_type_list}}" range-key="name">
<view class="picker {{apply_type_list[form_apply_type_index] == undefined ? 'cr-ccc' : 'cr-666'}} arrow-right">
{{apply_type_list[form_apply_type_index] == undefined ? '请选择申请类型' : apply_type_list[form_apply_type_index]['name']}}
</view>
</picker>
</view>
<view tt:if="{{invoice_content_list.length > 0}}" class="form-gorup bg-white">
<view class="form-gorup-title">发票内容<text class="form-group-tips-must">必选</text></view>
<picker name="invoice_content" bindchange="form_invoice_content_event" value="{{form_invoice_content_index}}" range="{{invoice_content_list}}">
<view class="picker {{invoice_content_list[form_invoice_content_index] == undefined ? 'cr-ccc' : 'cr-666'}} arrow-right">
{{invoice_content_list[form_invoice_content_index] == undefined ? '请选择发票内容' : invoice_content_list[form_invoice_content_index]}}
</view>
</picker>
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">发票抬头<text class="form-group-tips-must">必填</text></view>
<input type="text" name="invoice_title" placeholder-class="cr-ccc" class="cr-666" placeholder="发票抬头、最多200个字符" maxlength="200" value="{{data.invoice_title || ''}}" />
</view>
<!-- 企业信息 -->
<view tt:if="{{company_container}}">
<view class="form-gorup bg-white">
<view class="form-gorup-title">企业统一社会信用代码或纳税识别号<text class="form-group-tips-must">必填</text></view>
<input type="text" name="invoice_code" placeholder-class="cr-ccc" class="cr-666" placeholder="企业统一社会信用代码或纳税识别号、最多160个字符" maxlength="160" value="{{data.invoice_code || ''}}" />
</view>
</view>
<!-- 企业专票信息 -->
<view tt:if="{{company_special_container}}">
<view class="form-gorup bg-white">
<view class="form-gorup-title">企业开户行名称<text class="form-group-tips-must">必填</text></view>
<input type="text" name="invoice_bank" placeholder-class="cr-ccc" class="cr-666" placeholder="企业开户行名称、最多200个字符" maxlength="200" value="{{data.invoice_bank || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">企业开户帐号<text class="form-group-tips-must">必填</text></view>
<input type="text" name="invoice_account" placeholder-class="cr-ccc" class="cr-666" placeholder="企业开户帐号、最多160个字符" maxlength="160" value="{{data.invoice_account || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">企业联系电话<text class="form-group-tips-must">必填</text></view>
<input type="text" name="invoice_tel" placeholder-class="cr-ccc" class="cr-666" placeholder="企业联系电话 6~15 个字符" maxlength="15" value="{{data.invoice_tel || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">企业注册地址<text class="form-group-tips-must">必填</text></view>
<input type="text" name="invoice_address" placeholder-class="cr-ccc" class="cr-666" placeholder="企业注册地址、最多230个字符" maxlength="230" value="{{data.invoice_address || ''}}" />
</view>
</view>
<!-- 收件人信息 -->
<view tt:if="{{addressee_container}}">
<view class="form-gorup bg-white">
<view class="form-gorup-title">收件人姓名<text class="form-group-tips-must">必填</text></view>
<input type="text" name="name" placeholder-class="cr-ccc" class="cr-666" placeholder="收件人姓名格式 2~30 个字符之间" maxlength="30" value="{{data.name || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">收件人电话<text class="form-group-tips-must">必填</text></view>
<input type="text" name="tel" placeholder-class="cr-ccc" class="cr-666" placeholder="收件人电话 6~15 个字符" maxlength="15" value="{{data.tel || ''}}" />
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">收件人地址<text class="form-group-tips-must">必填</text></view>
<input type="text" name="address" placeholder-class="cr-ccc" class="cr-666" placeholder="收件人地址、最多230个字符" maxlength="230" value="{{data.address || ''}}" />
</view>
</view>
<!-- 电子邮箱信息 -->
<view tt:if="{{email_container}}">
<view class="form-gorup bg-white">
<view class="form-gorup-title">电子邮箱<text class="form-group-tips">选填</text></view>
<input type="text" name="email" placeholder-class="cr-ccc" class="cr-666" placeholder="电子邮箱、最多60个字符" maxlength="60" value="{{data.email || ''}}" />
</view>
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">备注<text class="form-group-tips">选填</text></view>
<input type="text" name="user_note" placeholder-class="cr-ccc" class="cr-666" placeholder="备注最多230个字符" maxlength="60" value="{{data.user_note || ''}}" />
</view>
<view class="form-gorup">
<button class="bg-main submit-bottom" type="default" formType="submit" hover-class="none" loading="{{form_submit_loading}}" disabled="{{form_submit_loading}}">提交</button>
</view>
</view>
</form>
</view>
<view tt:else>
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
\ No newline at end of file
sourcecode/toutiao/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.ttss
0 → 100644
浏览文件 @
9821179c
.content-top {
padding: 30rpx 10rpx;
}
.content-top text {
font-size: 38rpx;
font-weight: bold;
}
\ No newline at end of file
sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.js
0 → 100644
浏览文件 @
9821179c
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
sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.json
0 → 100644
浏览文件 @
9821179c
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"我的发票"
}
\ No newline at end of file
sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.ttml
0 → 100644
浏览文件 @
9821179c
<!-- 导航 -->
<view class="nav">
<block tt:for="{{nav_status_list}}" tt:key="key">
<view class="item fl tc cr-888 {{nav_status_index == index ? 'active' : ''}}" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
</block>
</view>
<!-- 列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
<view class="data-list">
<view class="item bg-white spacing-mb" tt:if="{{data_list.length > 0}}" tt:for="{{data_list}}" tt:key="key">
<view class="base oh br-b">
<text class="cr-666">{{item.add_time}}</text>
<text class="fr cr-main">{{item.status_name}}</text>
</view>
<navigator url="/pages/plugins/invoice/invoice-detail/invoice-detail?id={{item.id}}" hover-class="none">
<view class="content">
<view class="multi-text">
<text class="title cr-666">业务类型</text>
<text class="value">{{item.business_type_name}}</text>
</view>
<view class="multi-text">
<text class="title cr-666">申请类型</text>
<text class="value">{{item.apply_type_name}}</text>
</view>
<view class="multi-text">
<text class="title cr-666">发票类型</text>
<text class="value">{{item.invoice_type_name}}</text>
</view>
<view class="multi-text">
<text class="title cr-666">发票金额</text>
<text class="value">{{item.total_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">发票抬头</text>
<text class="value">{{item.invoice_title}}</text>
</view>
</view>
</navigator>
<view tt:if="{{item.status == 0 || item.status == 3}}" class="operation tr br-t-dashed">
<button class="cr-666 br" type="default" size="mini" bindtap="edit_event" data-value="{{item.id}}" hover-class="none">编辑</button>
<button class="submit-delete" type="default" size="mini" bindtap="delete_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">删除</button>
</view>
</view>
<view tt:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
</scroll-view>
\ No newline at end of file
sourcecode/toutiao/default/pages/plugins/invoice/invoice/invoice.ttss
0 → 100644
浏览文件 @
9821179c
/*
* 导航
*/
.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
sourcecode/toutiao/default/pages/plugins/invoice/order/order.js
0 → 100644
浏览文件 @
9821179c
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
sourcecode/toutiao/default/pages/plugins/invoice/order/order.json
0 → 100644
浏览文件 @
9821179c
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"订单开票"
}
\ No newline at end of file
sourcecode/toutiao/default/pages/plugins/invoice/order/order.ttml
0 → 100644
浏览文件 @
9821179c
<sjs src="../../../../utils/tools.sjs" module="tools" />
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
<view class="data-list">
<block tt:if="{{data_list.length > 0}}">
<view class="item bg-white spacing-mb" tt:for="{{data_list}}" tt:key="key">
<view class="base oh br-b">
<view bindtap="selected_event" data-type="node" data-value="{{item.id}}" class="fl selected">
<image class="icon" src="/images/default-select{{tools.indexOf(select_ids, item.id) ? '-active' : ''}}-icon.png" mode="widthFix" />
</view>
<text class="cr-666">{{item.add_time}}</text>
</view>
<navigator url="/pages/user-order-detail/user-order-detail?id={{item.id}}" hover-class="none">
<view class="content">
<view class="multi-text">
<text class="title cr-666">订单编号</text>
<text class="value">{{item.order_no}}</text>
</view>
<view class="multi-text">
<text class="title cr-666">订单总价</text>
<text class="value">{{item.total_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">支付金额</text>
<text class="value">{{item.pay_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">订单单价</text>
<text class="value">{{item.price}}</text>
<text class="unit cr-888">元</text>
</view>
</view>
</navigator>
<view class="operation tr br-t-dashed">
<navigator url="/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo?ids={{item.id}}&type=order&is_redirect=1" hover-class="none">
<button class="cr-666 br" type="default" size="mini" hover-class="none">开票</button>
</navigator>
</view>
</view>
<!-- 合并开票 -->
<view tt:if="{{select_ids.length > 0}}">
<button class="submit-fixed invoice-merge-submit" type="default" size="mini" hover-class="none" bindtap="invoice_merge_event">合并开票</button>
</view>
</block>
<view tt:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
</view>
<import src="/pages/common/bottom_line.ttml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
</scroll-view>
\ No newline at end of file
sourcecode/toutiao/default/pages/plugins/invoice/order/order.ttss
0 → 100644
浏览文件 @
9821179c
/*
* 列表
*/
.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
sourcecode/toutiao/default/pages/plugins/invoice/user/user.js
0 → 100644
浏览文件 @
9821179c
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
sourcecode/toutiao/default/pages/plugins/invoice/user/user.json
0 → 100644
浏览文件 @
9821179c
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"我的发票"
}
\ No newline at end of file
sourcecode/toutiao/default/pages/plugins/invoice/user/user.ttml
0 → 100644
浏览文件 @
9821179c
<!-- 导航 -->
<view tt:if="{{nav_list.length > 0 && (data_base || null) != null}}" class="nav oh bg-white">
<block tt:for="{{nav_list}}" tt:key="key">
<navigator url="{{item.url}}" hover-class="none">
<view class="item fl tc">
<image src="{{item.icon}}" mode="scaleToFill" class="dis-block" />
<view class="title">{{item.title}}</view>
</view>
</navigator>
</block>
</view>
<!-- 通知 -->
<view tt:if="{{(data_base.invoice_desc || null) != null && data_base.invoice_desc.length > 0}}" class="tips-container spacing-mt">
<view class="tips">
<view tt:for="{{data_base.invoice_desc}}" tt:key="key" class="item">
{{item}}
</view>
</view>
</view>
\ No newline at end of file
sourcecode/toutiao/default/pages/plugins/invoice/user/user.ttss
0 → 100644
浏览文件 @
9821179c
/*
* 导航
*/
.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
sourcecode/toutiao/default/pages/plugins/wallet/cash-auth/cash-auth.js
浏览文件 @
9821179c
...
...
@@ -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
({
...
...
sourcecode/weixin/default/pages/plugins/invoice/order/order.js
浏览文件 @
9821179c
...
...
@@ -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
);
},
// 合并开票
...
...
sourcecode/weixin/default/pages/plugins/invoice/user/user.wxml
浏览文件 @
9821179c
<!-- 导航 -->
<view wx:if="{{nav_list.length > 0 && (data_base || null) != null}}" class="nav oh bg-white">
<block wx:for="{{nav_list}}" wx:key="key">
...
...
sourcecode/weixin/default/pages/plugins/wallet/cash-auth/cash-auth.js
浏览文件 @
9821179c
...
...
@@ -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
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录