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
6cfd2826
authored
May 24, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
发票管理
parent
43b76cce
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
161 additions
and
12 deletions
assets/css/mine/invoice.scss
pages/mine/invoice.vue
pages/mine/invoiceAdd.vue
pages/mine/invoiceEdit.vue
pages/mine/userAddressEdit.vue
assets/css/mine/invoice.scss
View file @
6cfd2826
...
@@ -68,9 +68,9 @@
...
@@ -68,9 +68,9 @@
}
}
}
}
.p3
{
.p3
{
height
:
66rpx
;
font-size
:
24rpx
;
font-size
:
24rpx
;
color
:
#919399
;
color
:
#919399
;
margin-bottom
:
16rpx
;
}
}
.operate
{
.operate
{
.edit
{
.edit
{
...
@@ -221,6 +221,11 @@
...
@@ -221,6 +221,11 @@
width
:
155rpx
;
width
:
155rpx
;
font-size
:
26rpx
;
font-size
:
26rpx
;
color
:
#484b59
;
color
:
#484b59
;
&.
required
:
:
before
{
content
:
'*'
;
font-size
:
26rpx
;
color
:
#1969f9
;
}
}
}
.intl_code
{
.intl_code
{
.uni-input
{
.uni-input
{
...
...
pages/mine/invoice.vue
View file @
6cfd2826
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
</view>
</view>
</
template
>
</
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?tax_id=' + item.tax_id + '&inv_type=' + item.inv_type
"
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>
...
...
pages/mine/invoiceAdd.vue
View file @
6cfd2826
...
@@ -100,12 +100,12 @@
...
@@ -100,12 +100,12 @@
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<view
class=
"setting-default row verCenter bothSide"
>
<view
class=
"setting-default row verCenter bothSide"
style=
"margin-bottom: 24rpx;"
>
<text
class=
"tt"
>
设为默认发票
</text>
<text
class=
"tt"
>
设为默认发票
</text>
<view><switch
@
change=
"onSwitchChange"
checked
style=
"transform:scale(0.7)"
/></view>
<view><switch
@
change=
"onSwitchChange"
checked
style=
"transform:scale(0.7)"
/></view>
</view>
</view>
<!-- 收票信息 -->
<!-- 收票信息 -->
<view
class=
"info-title row bothSide verCenter"
@
click=
"toggle = !toggle"
>
<view
class=
"info-title row bothSide verCenter"
@
click=
"toggle = !toggle"
v-if=
"curr == 0"
>
<text
class=
"info-title-t1"
>
展开收票信息(非必填)
</text>
<text
class=
"info-title-t1"
>
展开收票信息(非必填)
</text>
<
template
v-if=
"toggle"
>
<
template
v-if=
"toggle"
>
<text
class=
"iconfont icon-arrtop"
></text>
<text
class=
"iconfont icon-arrtop"
></text>
...
@@ -116,11 +116,11 @@
...
@@ -116,11 +116,11 @@
</view>
</view>
<view
class=
"form-box"
v-if=
"toggle"
>
<view
class=
"form-box"
v-if=
"toggle"
>
<view
class=
"input-box input row verCenter"
>
<view
class=
"input-box input row verCenter"
>
<text
class=
"tt"
>
收货
人
</text>
<text
class=
"tt"
:class=
"{ required: curr == 1 }"
>
收票
人
</text>
<input
type=
"text"
placeholder=
"请输入收
货
人"
class=
"uni-input"
v-model=
"formParams.consignee"
/>
<input
type=
"text"
placeholder=
"请输入收
票
人"
class=
"uni-input"
v-model=
"formParams.consignee"
/>
</view>
</view>
<view
class=
"input-box input row verCenter"
>
<view
class=
"input-box input row verCenter"
>
<text
class=
"tt"
>
手机号码
</text>
<text
class=
"tt"
:class=
"{ required: curr == 1 }"
>
手机号码
</text>
<picker
@
change=
"bindPickerChange"
:value=
"index"
:range=
"array"
class=
"intl_code"
>
<picker
@
change=
"bindPickerChange"
:value=
"index"
:range=
"array"
class=
"intl_code"
>
<view
class=
"row verCenter bothSide"
>
<view
class=
"row verCenter bothSide"
>
<view
class=
"uni-input"
>
{{ array[index] }}
</view>
<view
class=
"uni-input"
>
{{ array[index] }}
</view>
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
<input
type=
"number"
placeholder=
"请输入手机号"
class=
"uni-input"
style=
"margin-left: 24rpx;"
v-model=
"formParams.consignee_phone"
/>
<input
type=
"number"
placeholder=
"请输入手机号"
class=
"uni-input"
style=
"margin-left: 24rpx;"
v-model=
"formParams.consignee_phone"
/>
</view>
</view>
<view
class=
"input-box input row verCenter"
>
<view
class=
"input-box input row verCenter"
>
<text
class=
"tt"
>
所在地区
</text>
<text
class=
"tt"
:class=
"{ required: curr == 1 }"
>
所在地区
</text>
<picker
mode=
"multiSelector"
@
change=
"pickerChange"
@
columnchange=
"bindMultiPickerColumnChange"
:value=
"multiIndex"
:range=
"multiArray"
:range-key=
"'name'"
>
<picker
mode=
"multiSelector"
@
change=
"pickerChange"
@
columnchange=
"bindMultiPickerColumnChange"
:value=
"multiIndex"
:range=
"multiArray"
:range-key=
"'name'"
>
<view>
{{ selectText }}
</view>
<view>
{{ selectText }}
</view>
</picker>
</picker>
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
<view
class=
"input-box textarea row verCenter"
><textarea
placeholder=
"请输入详细街道地址"
v-model=
"formParams.consignee_address"
></textarea></view>
<view
class=
"input-box textarea row verCenter"
><textarea
placeholder=
"请输入详细街道地址"
v-model=
"formParams.consignee_address"
></textarea></view>
</view>
</view>
<view
class=
"btn row verCenter"
>
<view
class=
"btn row verCenter"
>
<view
class=
"btn1 row rowCenter verCenter"
><text
class=
"text"
>
保存
</text></view>
<view
class=
"btn1 row rowCenter verCenter"
@
click=
"invoiceCreate()"
><text
class=
"text"
>
保存
</text></view>
</view>
</view>
</view>
</view>
</template>
</template>
...
@@ -178,7 +178,7 @@ export default {
...
@@ -178,7 +178,7 @@ export default {
consignee_city
:
''
,
//寄送地址市
consignee_city
:
''
,
//寄送地址市
consignee_district
:
''
,
//寄送地址区
consignee_district
:
''
,
//寄送地址区
consignee_address
:
''
,
//详细地址
consignee_address
:
''
,
//详细地址
is_default
:
''
//设置默认
is_default
:
1
//设置默认
}
}
};
};
},
},
...
@@ -189,8 +189,20 @@ export default {
...
@@ -189,8 +189,20 @@ export default {
tab
(
index
,
type
)
{
tab
(
index
,
type
)
{
if
(
type
==
1
)
{
if
(
type
==
1
)
{
this
.
curr
=
index
;
this
.
curr
=
index
;
if
(
this
.
curr
==
0
)
{
this
.
formParams
.
inv_type
=
4
;
}
else
if
(
this
.
curr
==
1
)
{
this
.
formParams
.
inv_type
=
3
;
this
.
toggle
=
true
;
}
}
else
if
(
type
==
2
)
{
}
else
if
(
type
==
2
)
{
//增值税普通发票公司-个人切换
this
.
taxIndex
=
index
;
this
.
taxIndex
=
index
;
if
(
this
.
taxIndex
==
0
)
{
this
.
formParams
.
inv_type
=
4
;
}
else
if
(
this
.
taxIndex
==
1
)
{
this
.
formParams
.
inv_type
=
2
;
}
}
}
},
},
/**
/**
...
@@ -206,6 +218,137 @@ export default {
...
@@ -206,6 +218,137 @@ export default {
this
.
formParams
.
intl_code
=
this
.
array
[
e
.
detail
.
value
];
this
.
formParams
.
intl_code
=
this
.
array
[
e
.
detail
.
value
];
},
},
/**
/**
* 新增发票
*/
invoiceCreate
()
{
if
(
this
.
curr
==
0
)
{
if
(
this
.
taxIndex
==
0
)
{
//增值税普通发票-公司
if
(
!
this
.
formParams
.
tax_title
)
{
uni
.
showToast
({
title
:
'请输入开票公司名称'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
tax_no
)
{
uni
.
showToast
({
title
:
'请输入税务登记号'
,
icon
:
'none'
});
return
false
;
}
var
params
=
Object
.
assign
({},
this
.
formParams
,
{
is_self
:
1
});
}
else
if
(
this
.
taxIndex
==
1
)
{
//增值税普通发票-个人
if
(
!
this
.
formParams
.
tax_title
)
{
uni
.
showToast
({
title
:
'请输入开票人名称'
,
icon
:
'none'
});
return
false
;
}
var
params
=
Object
.
assign
({},
this
.
formParams
,
{
is_self
:
1
});
}
}
else
{
//增值税专用发票
if
(
!
this
.
formParams
.
tax_title
)
{
uni
.
showToast
({
title
:
'请输入开票公司名称'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
company_address
)
{
uni
.
showToast
({
title
:
'请输入注册地址'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
company_phone
)
{
uni
.
showToast
({
title
:
'请输入电话号码'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
tax_no
)
{
uni
.
showToast
({
title
:
'请输入纳税人识别号'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
bank_name
)
{
uni
.
showToast
({
title
:
'请输入开户银行'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
bank_account
)
{
uni
.
showToast
({
title
:
'请输入开户银行账号'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
consignee
)
{
uni
.
showToast
({
title
:
'请输入收票人'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
consignee_phone
)
{
uni
.
showToast
({
title
:
'请输入手机号'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
consignee_province
)
{
uni
.
showToast
({
title
:
'请输入省、市、区'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
consignee_address
)
{
uni
.
showToast
({
title
:
'请输入详细街道地址'
,
icon
:
'none'
});
return
false
;
}
var
params
=
Object
.
assign
({},
this
.
formParams
);
}
this
.
request
(
Api_Url
+
'/invoice/create'
,
'POST'
,
params
,
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
showToast
({
title
:
'新增发票成功'
,
icon
:
'success'
});
setTimeout
(()
=>
{
uni
.
navigateBack
({
delta
:
1
});
},
2000
);
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
},
/**
* 省市区联动监听
* 省市区联动监听
* @param {Object} e
* @param {Object} e
*/
*/
...
...
pages/mine/invoiceEdit.vue
View file @
6cfd2826
This diff is collapsed.
Click to expand it.
pages/mine/userAddressEdit.vue
View file @
6cfd2826
...
@@ -111,7 +111,7 @@ export default {
...
@@ -111,7 +111,7 @@ export default {
return
result
;
return
result
;
},
},
/**
/**
*
地址
监听
*
省市区联动
监听
* @param {Object} e
* @param {Object} e
*/
*/
bindMultiPickerColumnChange
(
e
)
{
bindMultiPickerColumnChange
(
e
)
{
...
@@ -138,7 +138,7 @@ export default {
...
@@ -138,7 +138,7 @@ export default {
this
.
$forceUpdate
();
this
.
$forceUpdate
();
},
},
/**
/**
* 省市区
完成
* 省市区
选择确定
* @param {Object} e
* @param {Object} e
*/
*/
pickerChange
(
e
)
{
pickerChange
(
e
)
{
...
@@ -250,6 +250,7 @@ export default {
...
@@ -250,6 +250,7 @@ export default {
});
});
},
},
/**
/**
* 获取市数据
* @param {Object} id
* @param {Object} id
* @param {Object} defaultValue
* @param {Object} defaultValue
*/
*/
...
...
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