Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
H5_2.0
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
43b76cce
authored
May 24, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
发票
parent
49e40f44
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
15 deletions
assets/css/mine/invoice.scss
pages/mine/invoice.vue
pages/mine/invoiceAdd.vue
pages/mine/userAddressAdd.vue
assets/css/mine/invoice.scss
View file @
43b76cce
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
}
}
.page-userAddress-add
{
.page-userAddress-add
{
padding
:
180rpx
24rpx
1
0
0rpx
24rpx
;
padding
:
180rpx
24rpx
1
5
0rpx
24rpx
;
.tip
{
.tip
{
margin-top
:
16rpx
;
margin-top
:
16rpx
;
margin-bottom
:
16rpx
;
margin-bottom
:
16rpx
;
...
@@ -166,13 +166,11 @@
...
@@ -166,13 +166,11 @@
.text
{
.text
{
margin-left
:
16rpx
;
margin-left
:
16rpx
;
.t1
{
.t1
{
max-width
:
560rpx
;
text-align
:
justify
;
font-size
:
22rpx
;
font-size
:
22rpx
;
color
:
#f98119
;
color
:
#f98119
;
}
}
.t2
{
font-size
:
22rpx
;
color
:
#1969f9
;
}
}
}
}
}
.tab
{
.tab
{
...
...
pages/mine/invoice.vue
View file @
43b76cce
...
@@ -22,16 +22,24 @@
...
@@ -22,16 +22,24 @@
</view>
</view>
<view
class=
"p3"
>
{{
item
.
consignee_province_val
}}{{
item
.
consignee_city_val
}}{{
item
.
consignee_district_val
}}{{
item
.
consignee_address
}}
</view>
<view
class=
"p3"
>
{{
item
.
consignee_province_val
}}{{
item
.
consignee_city_val
}}{{
item
.
consignee_district_val
}}{{
item
.
consignee_address
}}
</view>
<view
class=
"operate row bothSide verCenter"
>
<view
class=
"operate row bothSide verCenter"
>
<view
class=
"row verCenter"
>
<template
v-if=
"item.is_default == 1"
>
<view
class=
"default"
></view>
<view
class=
"row verCenter default-curr"
>
<text
class=
"default-text"
>
设为默认
</text>
<view
class=
"default"
></view>
</view>
<text
class=
"default-text"
>
默认发票
</text>
</view>
</
template
>
<
template
v-else
>
<view
class=
"row verCenter"
@
click=
"setdefault(item.tax_id)"
>
<view
class=
"default"
></view>
<text
class=
"default-text"
>
设为默认
</text>
</view>
</
template
>
<view
class=
"row verCenter"
>
<view
class=
"row verCenter"
>
<navigator
class=
"edit row verCenter"
url=
"/user/invoiceEdit"
hover-class=
"none"
>
<navigator
class=
"edit row verCenter"
url=
"/user/invoiceEdit"
hover-class=
"none"
>
<text
class=
"iconfont icon-bjt"
></text>
<text
class=
"iconfont icon-bjt"
></text>
<text
class=
"tt"
>
编辑
</text>
<text
class=
"tt"
>
编辑
</text>
</navigator>
</navigator>
<view
class=
"delete row verCenter"
>
<view
class=
"delete row verCenter"
@
click=
"deleteInvoice(item.tax_id)"
>
<text
class=
"iconfont icon-del"
></text>
<text
class=
"iconfont icon-del"
></text>
<text
class=
"tt"
>
删除
</text>
<text
class=
"tt"
>
删除
</text>
</view>
</view>
...
@@ -69,6 +77,53 @@ export default {
...
@@ -69,6 +77,53 @@ export default {
this
.
getData
();
this
.
getData
();
},
},
methods
:
{
methods
:
{
/**
* 删除发票
*/
deleteInvoice
(
tax_id
)
{
uni
.
showModal
({
title
:
''
,
content
:
'您确定删除该发票嘛'
,
success
:
res
=>
{
if
(
res
.
confirm
)
{
this
.
request
(
Api_Url
+
'/invoice/delete'
,
'POST'
,
{
tax_id
:
tax_id
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'success'
});
setTimeout
(()
=>
{
this
.
getData
();
},
2000
);
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
},
/**
* 设置默认地址
* @param {Object} tax_id
*/
setdefault
(
tax_id
)
{
this
.
request
(
Api_Url
+
'/invoice/setdefault'
,
'POST'
,
{
tax_id
:
tax_id
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
getData
();
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
},
getData
()
{
getData
()
{
this
.
request
(
Api_Url
+
'/invoice/lists'
,
'POST'
,
{},
true
,
true
).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/invoice/lists'
,
'POST'
,
{},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
...
...
pages/mine/invoiceAdd.vue
View file @
43b76cce
This diff is collapsed.
Click to expand it.
pages/mine/userAddressAdd.vue
View file @
43b76cce
...
@@ -71,11 +71,15 @@ export default {
...
@@ -71,11 +71,15 @@ export default {
this
.
index
=
e
.
detail
.
value
;
this
.
index
=
e
.
detail
.
value
;
this
.
formParams
.
intl_code
=
this
.
array
[
e
.
detail
.
value
];
this
.
formParams
.
intl_code
=
this
.
array
[
e
.
detail
.
value
];
},
},
/**
* 设置默认监听
* @param {Object} e
*/
onSwitchChange
(
e
)
{
onSwitchChange
(
e
)
{
this
.
formParams
.
is_default
=
e
.
detail
.
value
?
1
:
0
;
this
.
formParams
.
is_default
=
e
.
detail
.
value
?
1
:
0
;
},
},
/**
/**
*
地址
监听
*
省市区联动
监听
* @param {Object} e
* @param {Object} e
*/
*/
bindMultiPickerColumnChange
(
e
)
{
bindMultiPickerColumnChange
(
e
)
{
...
@@ -102,7 +106,7 @@ export default {
...
@@ -102,7 +106,7 @@ export default {
this
.
$forceUpdate
();
this
.
$forceUpdate
();
},
},
/**
/**
* 省市区
完成
* 省市区
选择确定
* @param {Object} e
* @param {Object} e
*/
*/
pickerChange
(
e
)
{
pickerChange
(
e
)
{
...
@@ -118,7 +122,7 @@ export default {
...
@@ -118,7 +122,7 @@ export default {
*/
*/
getProvince
(
id
=
1
)
{
getProvince
(
id
=
1
)
{
console
.
log
(
'获取省数据id:'
+
id
);
console
.
log
(
'获取省数据id:'
+
id
);
this
.
request
(
Api_Url
+
'/address/pcd'
,
'POST'
,
{
id
:
id
},
tru
e
,
true
).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/address/pcd'
,
'POST'
,
{
id
:
id
},
fals
e
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
var
arr
=
[];
var
arr
=
[];
for
(
var
key
in
res
.
data
)
{
for
(
var
key
in
res
.
data
)
{
...
@@ -136,7 +140,7 @@ export default {
...
@@ -136,7 +140,7 @@ export default {
*/
*/
getCity
(
id
,
defaultParms
)
{
getCity
(
id
,
defaultParms
)
{
console
.
log
(
'获取市数据id:'
+
id
);
console
.
log
(
'获取市数据id:'
+
id
);
this
.
request
(
Api_Url
+
'/address/pcd'
,
'POST'
,
{
id
:
id
},
tru
e
,
true
).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/address/pcd'
,
'POST'
,
{
id
:
id
},
fals
e
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
var
arr
=
[];
var
arr
=
[];
for
(
var
key
in
res
.
data
)
{
for
(
var
key
in
res
.
data
)
{
...
@@ -156,7 +160,7 @@ export default {
...
@@ -156,7 +160,7 @@ export default {
*/
*/
getDistrict
(
id
)
{
getDistrict
(
id
)
{
console
.
log
(
'获取区数据id:'
+
id
);
console
.
log
(
'获取区数据id:'
+
id
);
this
.
request
(
Api_Url
+
'/address/pcd'
,
'POST'
,
{
id
:
id
},
tru
e
,
true
).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/address/pcd'
,
'POST'
,
{
id
:
id
},
fals
e
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
var
arr
=
[];
var
arr
=
[];
for
(
var
key
in
res
.
data
)
{
for
(
var
key
in
res
.
data
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment