Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
d9e2d8dd
ShopXO
项目概览
starsw001
/
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,体验更适合开发者的 AI 搜索 >>
提交
d9e2d8dd
编写于
12月 08, 2020
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
小程序发票优化
上级
61766ace
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
124 addition
and
37 deletion
+124
-37
changelog.txt
changelog.txt
+1
-0
sourcecode/weixin/default/app.js
sourcecode/weixin/default/app.js
+1
-1
sourcecode/weixin/default/pages/plugins/invoice/invoice-detail/invoice-detail.js
...lt/pages/plugins/invoice/invoice-detail/invoice-detail.js
+1
-1
sourcecode/weixin/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
...ages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
+26
-6
sourcecode/weixin/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.wxml
...es/plugins/invoice/invoice-saveinfo/invoice-saveinfo.wxml
+9
-0
sourcecode/weixin/default/pages/plugins/invoice/order/order.js
...ecode/weixin/default/pages/plugins/invoice/order/order.js
+28
-0
sourcecode/weixin/default/pages/plugins/invoice/order/order.wxml
...ode/weixin/default/pages/plugins/invoice/order/order.wxml
+40
-29
sourcecode/weixin/default/pages/plugins/invoice/order/order.wxss
...ode/weixin/default/pages/plugins/invoice/order/order.wxss
+18
-0
未找到文件。
changelog.txt
浏览文件 @
d9e2d8dd
...
...
@@ -6,6 +6,7 @@
2. 首页左侧二级商品分类支持自定义配置
3. 快捷导航新增开关控制
4. 用户地址[地图/身份证]新增开关控制
5. 新增开票插件
web端
1. 后台管理小程序列表新增主题管理
...
...
sourcecode/weixin/default/app.js
浏览文件 @
d9e2d8dd
...
...
@@ -74,7 +74,7 @@ App({
// 请求地址
request_url
:
"
{{request_url}}
"
,
request_url
:
'
http://shopxo.com/
'
,
//
request_url: 'https://dev.shopxo.net/',
request_url
:
'
https://dev.shopxo.net/
'
,
// 基础信息
application_title
:
"
{{application_title}}
"
,
...
...
sourcecode/weixin/default/pages/plugins/invoice/invoice-detail/invoice-detail.js
浏览文件 @
d9e2d8dd
...
...
@@ -45,7 +45,7 @@ Page({
{
name
:
"
发票类型
"
,
value
:
data
.
data
.
invoice_type_name
||
''
},
{
name
:
"
发票金额
"
,
value
:
data
.
data
.
total_price
||
''
},
{
name
:
"
状态
"
,
value
:
data
.
data
.
status_name
||
''
},
{
name
:
"
发票内容
"
,
value
:
data
.
data
.
invoice_
accou
nt
||
''
},
{
name
:
"
发票内容
"
,
value
:
data
.
data
.
invoice_
conte
nt
||
''
},
{
name
:
"
发票抬头
"
,
value
:
data
.
data
.
invoice_title
||
''
},
{
name
:
"
纳税识别号
"
,
value
:
data
.
data
.
invoice_code
||
''
},
{
name
:
"
企业开户行名称
"
,
value
:
data
.
data
.
invoice_bank
||
''
},
...
...
sourcecode/weixin/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.js
浏览文件 @
d9e2d8dd
...
...
@@ -7,14 +7,15 @@ Page({
data_list_loding_msg
:
''
,
data_bottom_line_status
:
false
,
data_base
:
null
,
apply_type_list
:
null
,
can_invoice_type_list
:
null
,
invoice_content_list
:
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
,
...
...
@@ -48,15 +49,18 @@ Page({
var
data
=
res
.
data
.
data
;
self
.
setData
({
data_base
:
data
.
base
||
null
,
apply_type_list
:
data
.
apply_type_list
||
null
,
can_invoice_type_list
:
data
.
can_invoice_type_list
||
null
,
invoice_content_list
:
data
.
invoice_content_list
||
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
,
...
...
@@ -103,6 +107,13 @@ Page({
this
.
invoice_container_handle
();
},
// 发票内容事件
form_invoice_content_event
(
e
)
{
this
.
setData
({
form_invoice_content_index
:
e
.
detail
.
value
});
},
// 容器显隐处理
invoice_container_handle
()
{
// 发票类型
...
...
@@ -210,6 +221,15 @@ Page({
}
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
];
}
wx
.
showLoading
({
title
:
'
提交中...
'
});
this
.
setData
({
form_submit_loading
:
true
});
...
...
sourcecode/weixin/default/pages/plugins/invoice/invoice-saveinfo/invoice-saveinfo.wxml
浏览文件 @
d9e2d8dd
...
...
@@ -22,6 +22,15 @@
</picker>
</view>
<view wx: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 || ''}}" />
...
...
sourcecode/weixin/default/pages/plugins/invoice/order/order.js
浏览文件 @
d9e2d8dd
...
...
@@ -8,6 +8,7 @@ Page({
data_list_loding_status
:
1
,
data_bottom_line_status
:
false
,
params
:
null
,
select_ids
:
[],
},
onLoad
(
params
)
{
...
...
@@ -136,4 +137,31 @@ Page({
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
});
console
.
log
(
value
,
index
,
temp_select_ids
);
},
// 合并开票
invoice_merge_event
(
e
)
{
if
(
this
.
data
.
select_ids
.
length
<=
0
)
{
app
.
showToast
(
'
请先选择数据
'
);
return
false
;
}
wx
.
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/weixin/default/pages/plugins/invoice/order/order.wxml
浏览文件 @
d9e2d8dd
<wxs src="../../../../utils/tools.wxs" module="tools" />
<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" wx:if="{{data_list.length > 0}}" wx:for="{{data_list}}" wx:key="key">
<view class="base oh br-b">
<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>
<block wx:if="{{data_list.length > 0}}">
<view class="item bg-white spacing-mb" wx:for="{{data_list}}" wx: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>
<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 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>
<!-- 合并开票 -->
<view wx: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 wx:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.wxml" />
...
...
sourcecode/weixin/default/pages/plugins/invoice/order/order.wxss
浏览文件 @
d9e2d8dd
...
...
@@ -22,4 +22,22 @@
}
.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
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录