Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
上
上药订单生命周期升级
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sph
上药订单生命周期升级
Commits
18f5b401
Commit
18f5b401
authored
Mar 05, 2021
by
xiejb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加发票列表与发票详情页面
parent
a1a85628
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
591 additions
and
6 deletions
+591
-6
src/router/myInvoice/index.js
src/router/myInvoice/index.js
+9
-0
src/views/myInvoice/index.vue
src/views/myInvoice/index.vue
+11
-2
src/views/myInvoice/invoiecDetail.vue
src/views/myInvoice/invoiecDetail.vue
+110
-0
src/views/myInvoice/invoiecDetail/invoiecDetailList.vue
src/views/myInvoice/invoiecDetail/invoiecDetailList.vue
+138
-0
src/views/myInvoice/invoiecDetail/invoiecHead.vue
src/views/myInvoice/invoiecDetail/invoiecHead.vue
+153
-0
src/views/myInvoice/invoiecDetail/invoiecListItem.vue
src/views/myInvoice/invoiecDetail/invoiecListItem.vue
+162
-0
src/views/myInvoice/myInvoiceList.vue
src/views/myInvoice/myInvoiceList.vue
+8
-4
src/views/myInvoice/myInvoiecListItem.vue
src/views/myInvoice/myInvoiecListItem.vue
+0
-0
No files found.
src/router/myInvoice/index.js
View file @
18f5b401
...
@@ -7,6 +7,15 @@ const myInvoice = [
...
@@ -7,6 +7,15 @@ const myInvoice = [
auth
:
false
auth
:
false
},
},
component
:
resolve
=>
require
([
'
@/views/myInvoice
'
],
resolve
)
component
:
resolve
=>
require
([
'
@/views/myInvoice
'
],
resolve
)
},
{
path
:
'
/invoiecDetail
'
,
name
:
'
invoiecDetail
'
,
meta
:
{
title
:
'
发票详情
'
,
auth
:
false
},
component
:
resolve
=>
require
([
'
@/views/myInvoice/invoiecDetail
'
],
resolve
)
}
}
]
]
export
default
myInvoice
export
default
myInvoice
src/views/myInvoice/index.vue
View file @
18f5b401
<
template
>
<
template
>
<div
id=
"myInvoice"
>
<div
id=
"myInvoice"
>
<my-invoice-list/>
<my-invoice-list
@
gotoDetail=
"gotoDetail"
/>
<high-search
v-model=
"moreSearchShow"
@
onsearch=
"moreSearchConfirm"
@
onclean=
"moreSearchClean"
/>
<high-search
v-model=
"moreSearchShow"
@
onsearch=
"moreSearchConfirm"
@
onclean=
"moreSearchClean"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
import
HighSearch
from
'
./components/HighSearch.vue
'
import
HighSearch
from
'
./components/HighSearch.vue
'
import
{
getFormateDate
}
from
'
@/utils/common
'
import
{
getFormateDate
}
from
'
@/utils/common
'
import
myInvoiceList
from
'
./myInvoiceList.vue
'
import
myInvoiceList
from
'
./myInvoiceList.vue
'
import
invoiecDetail
from
'
./invoiecDetail.vue
'
export
default
{
export
default
{
name
:
'
MyInvoice
'
,
name
:
'
MyInvoice
'
,
components
:
{
components
:
{
...
@@ -65,6 +66,14 @@ export default {
...
@@ -65,6 +66,14 @@ export default {
window
.
removeEventListener
(
'
popstate
'
,
this
.
onBrowserBack
,
false
)
window
.
removeEventListener
(
'
popstate
'
,
this
.
onBrowserBack
,
false
)
},
},
methods
:
{
methods
:
{
// 跳转发票详情
gotoDetail
(
model
)
{
// console.log()
this
.
$router
.
push
({
path
:
'
/invoiecDetail
'
,
query
:
window
.
location
.
href
.
split
(
'
?
'
)[
1
]
});
},
onBrowserBack
()
{
onBrowserBack
()
{
if
(
this
.
moreSearchShow
)
{
if
(
this
.
moreSearchShow
)
{
this
.
moreSearchShow
=
false
this
.
moreSearchShow
=
false
...
...
src/views/myInvoice/invoiecDetail.vue
0 → 100644
View file @
18f5b401
<
template
>
<div
id=
"invoiecDetail"
>
<div
class=
"content"
>
<invoiec-head/>
</div>
<div
class=
"list"
>
<invoiec-detail-list/>
</div>
<!--
<high-search
v-model=
"moreSearchShow"
@
onsearch=
"moreSearchConfirm"
@
onclean=
"moreSearchClean"
/>
-->
</div>
</
template
>
<
script
>
import
{
getFormateDate
}
from
'
@/utils/common
'
import
invoiecHead
from
'
./invoiecDetail/invoiecHead.vue
'
import
invoiecDetailList
from
'
./invoiecDetail/invoiecDetailList.vue
'
export
default
{
name
:
'
InvoiecDetail
'
,
components
:
{
invoiecHead
,
invoiecDetailList
},
data
()
{
return
{
tabsTitle
:
[],
moreSearchShow
:
false
,
activeTab
:
'
home
'
,
moreSearchInfo
:
{
//接收搜索更多回传的数据
supplier
:
{
comPartyId
:
""
},
//供应商ID
goods
:
{
comGoodsId
:
""
},
//商品ID
orderNo
:
""
,
//订单编号
time
:
{
//起始时间
start
:
getFormateDate
(
new
Date
(),
"
yyyy-MM-dd
"
),
end
:
getFormateDate
(
new
Date
(),
"
yyyy-MM-dd
"
),
},
},
invoiceList
:
[]
}
},
computed
:
{
linkInfo
()
{
return
this
.
$store
.
state
.
linkInfo
},
routKey
()
{
return
this
.
$route
.
path
},
searchTime
()
{
let
time
=
this
.
time
.
start
+
'
/
'
+
this
.
time
.
end
return
time
}
},
mounted
()
{
// 设置标题栏关闭返回按钮
this
.
$store
.
commit
(
'
setNavBar
'
,
{
show
:
true
,
leftArrow
:
true
,
rightIcon
:
false
,
title
:
''
,
leftText
:
'
发票明细
'
,
leftClick
:
this
.
onBrowserBack
,
rightClick
:
this
.
onMoreSearch
})
// 给window添加一个popstate事件,拦截返回键,执行this.onBrowserBack事件,addEventListener需要指向一个方法
window
.
addEventListener
(
'
popstate
'
,
this
.
onBrowserBack
,
false
)
},
destroyed
()
{
// 当页面销毁必须要移除这个事件,vue不刷新页面,不移除会重复执行这个事件
window
.
removeEventListener
(
'
popstate
'
,
this
.
onBrowserBack
,
false
)
},
methods
:
{
onBrowserBack
()
{
this
.
$router
.
go
(
-
1
)
},
onSearch
()
{
},
onMoreSearch
()
{
this
.
moreSearchShow
=
!
this
.
moreSearchShow
if
(
this
.
moreSearchShow
)
{
window
.
history
.
pushState
(
null
,
null
,
document
.
URL
)
}
},
// 高级搜索查询
moreSearchConfirm
(
data
)
{
console
.
log
(
'
000000000
'
)
},
// 高级搜索取消
moreSearchClean
(
data
)
{
this
.
moreSearchInfo
=
data
;
},
closeAppPage
()
{
console
.
log
(
'
关闭页面
'
)
bridge
.
closeWindow_c
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
#invoiecDetail
{
height
:
100%
;
width
:
100%
;
.list
{
height
:
calc
(
100vh
-
245
PX
);
margin-top
:
-40
PX
;
}
}
</
style
>
src/views/myInvoice/invoiecDetail/invoiecDetailList.vue
0 → 100644
View file @
18f5b401
<
template
>
<div
id=
"invoiecDetailList"
>
<div
class=
"content"
>
<van-pull-refresh
class=
"list"
ref=
"supplierList"
v-model=
"isRefreshing"
@
refresh=
"onRefresh"
>
<van-list
v-model=
"isLoading"
:finished=
"finished"
finished-text=
"没有更多了"
:error.sync=
"error"
error-text=
"请求失败,点击重新加载"
@
load=
"onLoad"
>
<div
class=
"invoiceItem"
@
click=
"gotoDetail(item)"
v-for=
"(item, index) in invoiceList"
:key=
"index"
>
<invoiec-list-item
:item=
"item"
/>
</div>
</van-list>
</van-pull-refresh>
</div>
</div>
</
template
>
<
script
>
// 引入接口
import
{
getMyInvoiceList
}
from
'
@/api/myInvoice
'
import
invoiecListItem
from
'
./invoiecListItem.vue
'
export
default
{
name
:
'
InvoiecDetailList
'
,
components
:
{
invoiecListItem
},
data
()
{
return
{
currentPage
:
1
,
pageSize
:
10
,
isRefreshing
:
false
,
isLoading
:
false
,
finished
:
false
,
error
:
false
,
logInfoShow
:
false
,
invoiceList
:
[],
invoiceItem
:
{},
sphImage
:
require
(
'
@/assets/img/u48.png
'
),
}
},
computed
:
{
linkInfo
()
{
return
this
.
$store
.
state
.
linkInfo
},
routKey
()
{
return
this
.
$route
.
path
},
searchTime
()
{
let
time
=
this
.
time
.
start
+
'
/
'
+
this
.
time
.
end
return
time
}
},
mounted
()
{
// this.onLoad()
},
methods
:
{
gotoDetail
(
model
)
{
// console.log(model)
this
.
$emit
(
'
gotoDetail
'
,
model
)
},
onRefresh
()
{
this
.
currentPage
=
1
this
.
isRefreshing
=
true
this
.
getPostData
()
},
onLoad
()
{
this
.
isLoading
=
true
this
.
getPostData
()
},
getPostData
()
{
let
_this
=
this
let
data
=
{
'
dbName
'
:
'
erp_test_shaphar-上药控股有限公司-204-23528
'
,
// 'erp_ogg_shaphar',
'
start
'
:
_this
.
currentPage
,
'
length
'
:
_this
.
pageSize
,
'
goods
'
:
''
}
getMyInvoiceList
(
data
).
then
(
rt
=>
{
if
(
rt
.
code
===
1
||
rt
.
code
===
'
1
'
)
{
if
(
_this
.
isRefreshing
)
{
_this
.
invoiceList
=
rt
.
data
}
else
if
(
rt
.
data
||
rt
.
data
.
length
>
0
)
{
_this
.
invoiceList
=
_this
.
invoiceList
.
concat
(
rt
.
data
)
}
// 重置刷新提示
_this
.
isRefreshing
=
false
// 重置加载更多提示
_this
.
isLoading
=
false
if
(
rt
.
data
.
length
<
10
)
{
_this
.
finished
=
true
}
else
{
// 加载成功后下一页自增1
_this
.
currentPage
++
}
}
else
{
_this
.
$toast
(
rt
.
message
)
_this
.
isRefreshing
=
false
_this
.
error
=
true
_this
.
finished
=
false
}
// 加载状态结束
_this
.
isLoading
=
false
}).
catch
(
e
=>
{
this
.
$toast
(
'
获取信息失败!
'
)
_this
.
isRefreshing
=
false
_this
.
isLoading
=
false
_this
.
error
=
true
_this
.
finished
=
true
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
#invoiecDetailList
{
height
:
100%
;
.content
{
height
:
100%
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
margin
:
10
PX
;
.invoiceItem
{
height
:
230
PX
;
background-color
:
white
;
margin-bottom
:
10
PX
;
border-radius
:
10
PX
;
font-size
:
14
PX
;
color
:
#333333
;
}
}
}
</
style
>
src/views/myInvoice/invoiecDetail/invoiecHead.vue
0 → 100644
View file @
18f5b401
<
template
>
<div
id=
"invoiecHead"
>
<div
class=
"content"
>
<div
class=
"taxIncluded"
>
<div
class=
"taxAmount"
>
¥377,898.00
</div>
<div
class=
"taxAmountSub"
>
含税金额
</div>
</div>
<div
class=
"noTaxInfo"
>
<div
class=
"noTax"
>
<div
class=
"noTaxAmount"
>
¥377,000.00
</div>
<div
class=
"noTaxAmountSub"
>
无税金额
</div>
</div>
<div
class=
"taxNumber"
>
<div
class=
"tax"
>
¥377,000.00
</div>
<div
class=
"taxSub"
>
无税金额
</div>
</div>
</div>
<van-divider
:style=
"
{ color: '#FFFFFF', borderColor: '#FFFFFF', margin: '10PX 0 10PX 0'}"/>
<div
class=
"invoiecInfo"
>
<div
class=
"cellInfo"
>
<div
class=
"title"
>
发票号:
</div>
<div
class=
"info"
>
837418787438178
</div>
</div>
<div
class=
"cellInfo"
>
<div
class=
"title"
>
发票代码:
</div>
<div
class=
"info"
>
837418787438178
</div>
</div>
<div
class=
"cellInfo"
>
<div
class=
"title"
>
发票日期:
</div>
<div
class=
"info"
>
2020-11-13 09:00
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getFormateDate
}
from
'
@/utils/common
'
export
default
{
name
:
'
InvoiecHead
'
,
components
:
{
},
data
()
{
return
{
tabsTitle
:
[],
moreSearchShow
:
false
,
activeTab
:
'
home
'
,
moreSearchInfo
:
{
//接收搜索更多回传的数据
supplier
:
{
comPartyId
:
""
},
//供应商ID
goods
:
{
comGoodsId
:
""
},
//商品ID
orderNo
:
""
,
//订单编号
time
:
{
//起始时间
start
:
getFormateDate
(
new
Date
(),
"
yyyy-MM-dd
"
),
end
:
getFormateDate
(
new
Date
(),
"
yyyy-MM-dd
"
),
},
},
invoiceList
:
[]
}
},
computed
:
{
linkInfo
()
{
return
this
.
$store
.
state
.
linkInfo
},
routKey
()
{
return
this
.
$route
.
path
},
searchTime
()
{
let
time
=
this
.
time
.
start
+
'
/
'
+
this
.
time
.
end
return
time
}
},
mounted
()
{
},
methods
:
{
onBrowserBack
()
{
this
.
$router
.
go
(
-
1
)
},
onSearch
()
{
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
#invoiecHead
{
.content
{
height
:
270
PX
;
width
:
100%
;
background-color
:
$main1
;
padding
:
10p
X
;
color
:
white
;
.taxIncluded
{
text-align
:
center
;
margin-bottom
:
10
PX
;
.taxAmount
{
font-size
:
26
PX
;
font-weight
:
550
;
line-height
:
40px
;
height
:
40
PX
}
.taxAmountSub
{
font-size
:
16
PX
;
line-height
:
30px
;
height
:
30
PX
}
}
.noTaxInfo
{
display
:
flex
;
text-align
:
center
;
font-size
:
16
PX
;
line-height
:
25
PX
;
.noTax
{
width
:
50%
;
border-right
:
1px
solid
#ffffff
;
.noTaxAmount
{
font-weight
:
550
;
}
}
.taxNumber
{
width
:
50%
;
.tax
{
font-weight
:
550
;
}
}
}
.invoiecInfo
{
font-size
:
15
PX
;
.cellInfo
{
display
:
flex
;
line-height
:
24
PX
;
.title
{
width
:
25%
;
text-align
:
right
;
}
.info
{
width
:
60%
;
.price
{
font-size
:
16
PX
;
font-weight
:
600
;
color
:
red
;
}
}
.btn
{
width
:
10%
;
}
}
}
}
}
</
style
>
src/views/myInvoice/invoiecDetail/invoiecListItem.vue
0 → 100644
View file @
18f5b401
<
template
>
<div
id=
"invoiecListItem"
>
<div
class=
"itemInfo"
>
<div
class=
"orderNum"
>
<van-image
fit=
"contain"
width=
"45"
height=
"50"
:src=
"sphImage"
/>
<div
class=
"num"
>
订单号:34678649876
</div>
</div>
<div
class=
"divider"
></div>
<div
class=
"invoiecInfo"
>
<div
class=
"name"
>
[132521] 阿西匹林/0.25g*200s/浙江恒瑞制药有限公司
</div>
<div
class=
"cellInfo"
>
<div
class=
"batch"
>
批次号:200409
</div>
<div
class=
"numBer"
>
开票数量:480
</div>
</div>
<van-divider
:style=
"
{ color: '#999999', borderColor: '#999999', margin: '5PX 0 5PX 0'}"/>
<div
class=
"cellInfo"
>
<div
class=
"leftInfo"
>
<div
class=
"title"
>
无税单价:
</div>
<div
class=
"value"
>
7.52
</div>
</div>
<div
class=
"rightInfo"
>
<div
class=
"title"
>
单品无税金额:
</div>
<div
class=
"value"
>
3616.00
</div>
</div>
</div>
<div
class=
"cellInfo"
>
<div
class=
"leftInfo"
>
<div
class=
"title"
>
含税单价:
</div>
<div
class=
"value"
>
7.52
</div>
</div>
<div
class=
"rightInfo"
>
<div
class=
"title"
>
单品含税金额:
</div>
<div
class=
"value"
>
3616.00
</div>
</div>
</div>
<div
class=
"cellInfo"
>
<div
class=
"leftInfo"
>
<div
class=
"title"
>
税率:
</div>
<div
class=
"value"
>
7.52
</div>
</div>
<div
class=
"rightInfo"
>
<div
class=
"title"
>
税额:
</div>
<div
class=
"value"
>
3616.00
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'
InvoiecListItem
'
,
components
:
{
},
data
()
{
return
{
sphImage
:
require
(
'
@/assets/img/u48.png
'
),
}
},
props
:
{
item
:
{
type
:
Object
,
default
:
()
=>
{
return
{
}
}
}
},
computed
:
{
linkInfo
()
{
return
this
.
$store
.
state
.
linkInfo
},
routKey
()
{
return
this
.
$route
.
path
},
searchTime
()
{
let
time
=
this
.
time
.
start
+
'
/
'
+
this
.
time
.
end
return
time
}
},
mounted
()
{
// this.onLoad()
},
methods
:
{
onRefresh
()
{
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
#invoiecListItem
{
.itemInfo
{
.divider
{
width
:
100%
;
height
:
1
PX
;
background
:
linear-gradient
(
to
right
,
#ccc
0%
,
#ccc
50%
,
transparent
50%
);
background-size
:
10
PX
1
PX
;
background-repeat
:
repeat-x
;
}
.orderNum
{
display
:
flex
;
line-height
:
50
PX
;
height
:
50
PX
;
margin
:
0
PX
10
PX
;
.num
{
width
:
80%
;
padding-left
:
5
PX
;
}
}
.invoiecInfo
{
margin
:
0
PX
10
PX
;
// display: flex;
.name
{
margin-top
:
10
PX
;
height
:
50
PX
;
width
:
100%
;
font-weight
:
600
;
white-space
:
pre-line
;
word-break
:
break-all
;
word-wrap
:
break-word
;
}
.cellInfo
{
display
:
flex
;
line-height
:
25
PX
;
.batch
{
width
:
50%
;
}
.numBer
{
width
:
50%
;
text-align
:
right
;
}
.leftInfo
{
width
:
50%
;
display
:
flex
;
.title
{
width
:
45%
;
text-align
:
right
;
}
.value
{
width
:
55%
;
text-align
:
left
;
}
}
.rightInfo
{
width
:
50%
;
display
:
flex
;
.title
{
width
:
65%
;
text-align
:
right
;
}
.value
{
width
:
35%
;
text-align
:
left
;
}
}
}
}
}
}
</
style
>
src/views/myInvoice/myInvoiceList.vue
View file @
18f5b401
...
@@ -9,10 +9,10 @@
...
@@ -9,10 +9,10 @@
:error.sync=
"error"
:error.sync=
"error"
error-text=
"请求失败,点击重新加载"
error-text=
"请求失败,点击重新加载"
@
load=
"onLoad"
>
@
load=
"onLoad"
>
<div
class=
"invoiceItem"
<div
class=
"invoiceItem"
@
click=
"gotoDetail(item)"
v-for=
"(item, index) in invoiceList"
v-for=
"(item, index) in invoiceList"
:key=
"index"
>
:key=
"index"
>
<
invoiec-list-item
:item=
"item"
/>
<my-
invoiec-list-item
:item=
"item"
/>
</div>
</div>
</van-list>
</van-list>
</van-pull-refresh>
</van-pull-refresh>
...
@@ -23,11 +23,11 @@
...
@@ -23,11 +23,11 @@
<
script
>
<
script
>
// 引入接口
// 引入接口
import
{
getMyInvoiceList
}
from
'
@/api/myInvoice
'
import
{
getMyInvoiceList
}
from
'
@/api/myInvoice
'
import
invoiecListItem
from
'
./i
nvoiecListItem.vue
'
import
myInvoiecListItem
from
'
./myI
nvoiecListItem.vue
'
export
default
{
export
default
{
name
:
'
MyInvoiceList
'
,
name
:
'
MyInvoiceList
'
,
components
:
{
components
:
{
i
nvoiecListItem
myI
nvoiecListItem
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -59,6 +59,10 @@ export default {
...
@@ -59,6 +59,10 @@ export default {
// this.onLoad()
// this.onLoad()
},
},
methods
:
{
methods
:
{
gotoDetail
(
model
)
{
// console.log(model)
this
.
$emit
(
'
gotoDetail
'
,
model
)
},
onRefresh
()
{
onRefresh
()
{
this
.
currentPage
=
1
this
.
currentPage
=
1
this
.
isRefreshing
=
true
this
.
isRefreshing
=
true
...
...
src/views/myInvoice/
i
nvoiecListItem.vue
→
src/views/myInvoice/
myI
nvoiecListItem.vue
View file @
18f5b401
File moved
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