Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
h5
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
vanke
h5
Commits
40355709
Commit
40355709
authored
Jul 02, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
库存统计,领用记录,库存统计,领用详情
parent
fb5fe92a
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
588 additions
and
201 deletions
+588
-201
code.js
src/api/code.js
+72
-0
NavBar.vue
src/components/NavBar.vue
+18
-1
Stepper.vue
src/components/Stepper.vue
+3
-2
main.js
src/main.js
+3
-1
index.vue
src/views/Admin/index.vue
+1
-1
inventory.vue
src/views/Admin/inventory.vue
+169
-74
receiveAdmin.vue
src/views/Admin/receiveAdmin.vue
+176
-80
receiveDetail.vue
src/views/Admin/receiveDetail.vue
+18
-10
scan.vue
src/views/Admin/scan.vue
+114
-23
index.vue
src/views/Employee/index.vue
+13
-7
receiveRecords.vue
src/views/Employee/receiveRecords.vue
+0
-1
index.vue
src/views/Home/index.vue
+1
-1
No files found.
src/api/code.js
View file @
40355709
...
@@ -24,3 +24,75 @@ export function getOutboundOrderList (params) {
...
@@ -24,3 +24,75 @@ export function getOutboundOrderList (params) {
params
params
})
})
}
}
// 根据会员id查询一条数据
export
function
getMemberInfo
(
params
)
{
return
request
({
url
:
'sso/selectOneByMemberId'
,
method
:
'get'
,
params
})
}
// 万科h5_查询一条商品记录
export
function
getGoodsInfo
(
data
)
{
return
request
({
url
:
'vankeGoods/selectOneByOter'
,
method
:
'post'
,
data
})
}
// 万科h5_出库操作
export
function
outBoundGoods
(
data
)
{
return
request
({
url
:
'vankeGoods/selectOneByOutBoundNo'
,
method
:
'post'
,
data
})
}
// 万科h5_部门分页操作
export
function
getDepartList
(
params
)
{
return
request
({
url
:
'vankeDepartment/list'
,
method
:
'get'
,
params
})
}
// 万科h5_根据出库单号查询一条出库详情
export
function
getOutBountDetail
(
params
)
{
return
request
({
url
:
'vankeOutboundOrder/selectOneByOutBoundNo'
,
method
:
'get'
,
params
})
}
// 万科h5_获取管理员今日数据
export
function
getHomeData
(
params
)
{
return
request
({
url
:
'vankeStatisticalChart/getHomeData'
,
method
:
'post'
,
params
})
}
// 万科h5_物品分页操作
export
function
getGoodsList
(
params
)
{
return
request
({
url
:
'vankeGoods/list'
,
method
:
'get'
,
params
})
}
// 万科h5_物品类别分页操作
export
function
getCategoryList
(
params
)
{
return
request
({
url
:
'vankeGoodsCategory/list'
,
method
:
'get'
,
params
})
}
// 万科后台_得到一条系统配置信息
export
function
getSetting
(
params
)
{
return
request
({
url
:
'vankeConfig/getOne'
,
method
:
'get'
,
params
})
}
src/components/NavBar.vue
View file @
40355709
...
@@ -28,7 +28,24 @@ export default {
...
@@ -28,7 +28,24 @@ export default {
},
},
methods
:
{
methods
:
{
onClickLeft
()
{
onClickLeft
()
{
this
.
$router
.
go
(
-
1
)
console
.
log
(
'this.$route.path'
,
this
.
$route
.
name
)
if
(
!
this
.
leftArrow
)
{
return
}
if
(
this
.
$route
.
name
===
'scan'
)
{
this
.
$dialog
.
confirm
({
title
:
'提示'
,
message
:
'操作尚未完成,请确认是否退出'
})
.
then
(()
=>
{
this
.
$router
.
go
(
-
1
)
})
.
catch
(()
=>
{
// on cancel
})
}
else
{
this
.
$router
.
go
(
-
1
)
}
},
},
onClickRight
()
{
onClickRight
()
{
this
.
$emit
(
'rightClick'
)
this
.
$emit
(
'rightClick'
)
...
...
src/components/Stepper.vue
View file @
40355709
...
@@ -12,7 +12,8 @@ export default {
...
@@ -12,7 +12,8 @@ export default {
},
},
props
:
{
props
:
{
maxNum
:
Number
,
maxNum
:
Number
,
inputNum
:
Number
inputNum
:
Number
,
id
:
Number
},
},
watch
:
{
watch
:
{
inputNum
(
val
)
{
inputNum
(
val
)
{
...
@@ -21,7 +22,7 @@ export default {
...
@@ -21,7 +22,7 @@ export default {
},
},
num
(
val
)
{
num
(
val
)
{
console
.
log
(
1
,
val
)
console
.
log
(
1
,
val
)
this
.
$emit
(
'changeNum'
,
this
.
num
)
this
.
$emit
(
'changeNum'
,
this
.
num
,
this
.
id
)
}
}
}
}
...
...
src/main.js
View file @
40355709
...
@@ -4,10 +4,12 @@ import router from './router'
...
@@ -4,10 +4,12 @@ import router from './router'
import
store
from
'./store'
import
store
from
'./store'
import
'@/assets/less/common.less'
import
'@/assets/less/common.less'
import
MyNavBar
from
'@/components/NavBar'
import
MyNavBar
from
'@/components/NavBar'
import
{
Toast
,
Col
,
Row
,
Button
,
PullRefresh
,
DropdownMenu
,
DropdownItem
,
Tabbar
,
TabbarItem
,
Cell
,
CellGroup
,
Popup
,
Search
,
Swipe
,
SwipeItem
,
Grid
,
GridItem
,
Image
,
Tab
,
Tabs
,
NavBar
,
Icon
,
List
,
Card
,
Checkbox
,
CheckboxGroup
,
Stepper
,
Sticky
,
Divider
,
RadioGroup
,
Radio
,
Field
}
from
'vant'
import
{
Toast
,
Dialog
,
Col
,
Row
,
DatetimePicker
,
Button
,
PullRefresh
,
DropdownMenu
,
DropdownItem
,
Tabbar
,
TabbarItem
,
Cell
,
CellGroup
,
Popup
,
Search
,
Swipe
,
SwipeItem
,
Grid
,
GridItem
,
Image
,
Tab
,
Tabs
,
NavBar
,
Icon
,
List
,
Card
,
Checkbox
,
CheckboxGroup
,
Stepper
,
Sticky
,
Divider
,
RadioGroup
,
Radio
,
Field
}
from
'vant'
Vue
.
component
(
'navbar'
,
MyNavBar
)
Vue
.
component
(
'navbar'
,
MyNavBar
)
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
Vue
.
use
(
PullRefresh
)
Vue
.
use
(
PullRefresh
)
Vue
.
use
(
DatetimePicker
)
Vue
.
use
(
Dialog
)
Vue
.
use
(
Col
)
Vue
.
use
(
Col
)
Vue
.
use
(
Row
)
Vue
.
use
(
Row
)
Vue
.
use
(
Toast
)
Vue
.
use
(
Toast
)
...
...
src/views/Admin/index.vue
View file @
40355709
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<navbar
title=
"办公用品管理"
:leftArrow=
"false"
></navbar>
<navbar
title=
"办公用品管理"
></navbar>
<div
class=
"container"
>
<div
class=
"container"
>
<router-link
:to=
"
{path: 'scan'}" class="collect">
<router-link
:to=
"
{path: 'scan'}" class="collect">
<img
class=
"bg"
src=
"@/assets/images/Outbound@2x.png"
alt=
""
>
<img
class=
"bg"
src=
"@/assets/images/Outbound@2x.png"
alt=
""
>
...
...
src/views/Admin/inventory.vue
View file @
40355709
...
@@ -4,98 +4,179 @@
...
@@ -4,98 +4,179 @@
<div
class=
"container"
>
<div
class=
"container"
>
<van-grid
class=
"my-grid"
:column-num=
"3"
>
<van-grid
class=
"my-grid"
:column-num=
"3"
>
<van-grid-item>
<van-grid-item>
<p
class=
"num"
>
70
</p>
<p
class=
"num"
>
{{
homeData
[
'今日出库'
]
||
0
}}
</p>
<p
class=
"notice"
>
今日出库
</p>
<p
class=
"notice"
>
今日出库
</p>
</van-grid-item>
</van-grid-item>
<van-grid-item>
<van-grid-item>
<p
class=
"num"
>
70
</p>
<p
class=
"num"
>
{{
homeData
[
'今日入库'
]
||
0
}}
</p>
<p
class=
"notice"
>
今日入库
</p>
<p
class=
"notice"
>
今日入库
</p>
</van-grid-item>
</van-grid-item>
<van-grid-item>
<van-grid-item>
<p
class=
"num"
>
70
</p>
<p
class=
"num"
>
{{
homeData
[
'库存预警'
]
||
0
}}
</p>
<p
class=
"notice"
>
库存预警
</p>
<p
class=
"notice"
>
库存预警
</p>
</van-grid-item>
</van-grid-item>
<van-grid-item>
<van-grid-item>
<p
class=
"num"
>
70
</p>
<p
class=
"num"
>
{{
homeData
[
'今日申领人'
]
||
0
}}
</p>
<p
class=
"notice"
>
今日申领人
</p>
<p
class=
"notice"
>
今日申领人
</p>
</van-grid-item>
</van-grid-item>
<van-grid-item>
<van-grid-item>
<p
class=
"num"
>
70
</p>
<p
class=
"num"
>
{{
homeData
[
'剩余库存'
]
||
0
}}
</p>
<p
class=
"notice"
>
总库存
</p>
<p
class=
"notice"
>
总库存
</p>
</van-grid-item>
</van-grid-item>
</van-grid>
</van-grid>
<!-- 筛选/-->
<van-row
type=
"flex"
align=
"center"
class=
"menu"
>
<van-row
type=
"flex"
align=
"center"
class=
"menu"
>
<van-col
span=
"8"
:class=
"defaultValue?'checked': ''"
>
全部库存
</van-col>
<van-col
span=
"8"
:class=
"(!params.goodsCategoryId) && (!params.stockWarning)?'checked': ''"
@
click=
"queryAll"
>
全部库存
</van-col>
<van-col
span=
"16"
class=
"menu-dropdown"
>
<van-dropdown-menu>
<van-col
span=
"8"
class=
"menu-dropdown"
>
<van-dropdown-item
v-model=
"value1"
:options=
"option1"
/>
<van-dropdown-menu>
<van-dropdown-item
v-model=
"value2"
:options=
"option2"
/>
<van-dropdown-item
:title=
"categoryTitle"
v-model=
"params.goodsCategoryId"
:options=
"categoryOptions"
</van-dropdown-menu></van-col>
@
change=
"changeCategory"
/>
</van-dropdown-menu>
</van-col>
<van-col
span=
"8"
:class=
"params.stockWarning?'checked': ''"
@
click=
"changeStock"
>
库存预警
</van-col>
</van-row>
</van-row>
<!-- 表头-->
<table>
<div
class=
"title"
>
<tr>
<div>
物品名称
</div>
<th>
物品名称
</th>
<div>
型号
</div>
<th>
型号
</th>
<div>
物品类别
</div>
<th>
物品类别
</th>
<div>
数量
</div>
<th>
数量
</th>
</div>
</tr>
<!-- 列表-->
<tr
v-for=
"(item,index) in 6"
:key=
"index"
>
<van-pull-refresh
class=
"width_100"
v-model=
"refreshing"
@
refresh=
"onRefresh"
>
<td>
圆珠笔
</td>
<van-list
<td>
nhg
</td>
v-model=
"loading"
<td>
办公五品
</td>
:finished=
"finished"
<td>
finished-text=
"没有更多了"
1
@
load=
"onLoad"
</td>
>
</tr>
<div
v-for=
"(item,index) in list"
:key=
"index"
class=
"tr"
>
</table>
<div>
{{
item
.
name
}}
</div>
<div>
{{
item
.
goodsNo
}}
</div>
<div>
{{
item
.
goodsCategoryName
}}
</div>
<div>
{{
item
.
goodsNum
}}
</div>
</div>
</van-list>
</van-pull-refresh>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getHomeData
,
getGoodsList
,
getCategoryList
,
getSetting
}
from
'@/api/code'
export
default
{
export
default
{
name
:
'inventory'
,
name
:
'inventory'
,
components
:
{},
components
:
{},
data
()
{
data
()
{
return
{
return
{
defaultValue
:
1
,
homeData
:
{},
value1
:
'a'
,
categoryOptions
:
[],
value2
:
'a'
,
total
:
null
,
option1
:
[
list
:
[],
{
loading
:
false
,
text
:
'物品类别'
,
finished
:
false
,
value
:
'a'
refreshing
:
false
,
},
params
:
{
{
goodsCategoryId
:
null
,
text
:
'好评排序'
,
pageNum
:
1
,
value
:
'b'
pageSize
:
10
,
},
stockWarning
:
null
{
},
text
:
'销量排序'
,
categoryTitle
:
'物品类别'
,
value
:
'c'
stockWarns
:
[]
}
],
option2
:
[
{
text
:
'库存预警'
,
value
:
'a'
},
{
text
:
'好评排序'
,
value
:
'b'
},
{
text
:
'销量排序'
,
value
:
'c'
}
]
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getHomeData
()
this
.
getList
()
this
.
getCategoryList
()
this
.
getSetting
()
},
},
methods
:
{
methods
:
{
// 改变类别/
changeCategory
(
id
)
{
const
itemObj
=
this
.
categoryOptions
.
find
(
item
=>
item
.
id
===
id
)
this
.
categoryTitle
=
itemObj
.
text
this
.
list
=
[]
this
.
params
.
pageNum
=
1
this
.
getList
()
},
// 改变库存预警
changeStock
(
name
)
{
this
.
params
.
stockWarning
=
this
.
warn
this
.
list
=
[]
this
.
params
.
pageNum
=
1
this
.
getList
()
},
// 全部库存
queryAll
()
{
this
.
params
.
stockWarning
=
null
this
.
params
.
goodsCategoryId
=
null
this
.
categoryTitle
=
'物品类别'
this
.
list
=
[]
this
.
params
.
pageNum
=
1
this
.
getList
()
},
// 配置
getSetting
()
{
getSetting
().
then
(
res
=>
{
this
.
warn
=
res
.
data
.
stockWarning
})
},
// 数据
getHomeData
()
{
const
d
=
new
Date
()
const
queryTime
=
d
.
getFullYear
()
+
'-'
+
(
d
.
getMonth
()
+
1
)
+
'-'
+
d
.
getDate
()
getHomeData
({
queryTime
:
queryTime
}).
then
(
res
=>
{
this
.
homeData
=
res
.
data
})
},
// 类别
getCategoryList
()
{
getCategoryList
().
then
(
res
=>
{
res
.
data
.
list
.
forEach
(
item
=>
{
item
.
text
=
item
.
name
item
.
value
=
item
.
id
})
this
.
categoryOptions
=
res
.
data
.
list
})
},
getList
()
{
getGoodsList
(
this
.
params
).
then
(
res
=>
{
console
.
log
(
'列表'
,
this
.
params
,
res
)
for
(
var
i
of
res
.
data
.
list
)
{
this
.
list
.
push
(
i
)
}
this
.
total
=
Number
(
res
.
data
.
total
)
this
.
params
.
pageNum
++
this
.
loading
=
false
if
(
this
.
list
.
length
>=
this
.
total
)
{
this
.
finished
=
true
}
})
},
onLoad
()
{
console
.
log
(
'onload'
)
// this.finished = true
if
(
this
.
refreshing
)
{
this
.
list
=
[]
this
.
params
.
pageNum
=
1
this
.
refreshing
=
false
}
this
.
getList
()
},
onRefresh
()
{
console
.
log
(
'onrefresh'
)
// 清空列表数据
this
.
finished
=
false
// 重新加载数据
// 将 loading 设置为 true,表示处于加载状态
this
.
loading
=
true
this
.
onLoad
()
},
submit
()
{
submit
()
{
console
.
log
(
'提交'
)
console
.
log
(
'提交'
)
}
}
...
@@ -104,44 +185,58 @@ export default {
...
@@ -104,44 +185,58 @@ export default {
</
script
>
</
script
>
<
style
lang=
'scss'
scoped
>
<
style
lang=
'scss'
scoped
>
.num
{
.num
{
font-size
:
17px
;
font-size
:
17px
;
font-weight
:
bold
;
font-weight
:
bold
;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
}
}
.notice
{
.notice
{
color
:
#8B8C90
;
color
:
#8B8C90
;
}
}
.width_100
{
width
:
100%
;
}
.menu
{
.menu
{
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.my-grid
{
.my-grid
{
width
:
100%
;
width
:
100%
;
background
:
#ffffff
;
background
:
#ffffff
;
}
}
tab
le
{
.tit
le
{
width
:
100%
;
width
:
100%
;
background
:
#ffffff
;
border-collapse
:
collapse
;
}
table
tr
:first-child
{
background
:
#f6f7f9
;
background
:
#f6f7f9
;
height
:
34px
;
height
:
34px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-top
:
10px
;
font-size
:
13px
;
color
:
#666666
;
}
}
table
tr
{
.tr
{
width
:
100%
;
font-size
:
14px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
height
:
42px
;
height
:
42px
;
background
:
#ffffff
;
}
}
table
th
{
.tr
+
.tr
{
color
:
#666666
;
border-top
:
1px
solid
#E8E8E8
;
font-size
:
14px
;
}
}
table
td
{
.tr
div
,
.title
div
{
font-size
:
14px
;
width
:
25%
;
text-align
:
center
;
}
}
</
style
>
</
style
>
src/views/Admin/receiveAdmin.vue
View file @
40355709
...
@@ -2,97 +2,186 @@
...
@@ -2,97 +2,186 @@
<div
class=
"page"
>
<div
class=
"page"
>
<navbar
title=
"领用记录"
></navbar>
<navbar
title=
"领用记录"
></navbar>
<div
class=
"container"
>
<div
class=
"container"
>
<!-- 条件筛选/-->
<van-row
type=
"flex"
align=
"center"
class=
"menu"
>
<van-row
type=
"flex"
align=
"center"
class=
"menu"
>
<van-col
span=
"5"
:class=
"defaultValue?'checked': ''"
>
全部记录
</van-col>
<van-col
span=
"8"
:class=
"(!params.departId) && (!params.queryTime)?'checked': ''"
@
click=
"queryAll"
>
全部记录
<van-col
span=
"19"
class=
"menu-dropdown"
>
<van-dropdown-menu>
</van-col>
<van-dropdown-item
v-model=
"value1"
:options=
"option1"
/>
<van-col
span=
"16"
class=
"menu-dropdown"
>
<van-dropdown-item
v-model=
"value2"
:options=
"option2"
/>
<van-dropdown-menu>
<van-dropdown-item
v-model=
"value3"
:options=
"option3"
/>
<van-dropdown-item
:title=
"departTitle"
v-model=
"params.departId"
:options=
"departOptions"
</van-dropdown-menu></van-col>
@
change=
"changeDepart"
/>
<van-dropdown-item
:title=
"timeTitle"
ref=
"myPicker"
>
<van-datetime-picker
v-model=
"currentDate"
type=
"date"
title=
"选择年月日"
@
confirm=
"confirmDate"
/>
</van-dropdown-item>
</van-dropdown-menu>
</van-col>
</van-row>
</van-row>
<!-- 列表-->
<div
class=
"row"
v-for=
"(item,index) in 3"
:key=
"index"
>
<van-pull-refresh
class=
"width_100"
v-model=
"refreshing"
@
refresh=
"onRefresh"
>
<p
class=
"title"
>
<van-list
<span>
研发部:98293023
</span>
v-model=
"loading"
<span>
2020-03-02 19:30
</span>
:finished=
"finished"
</p>
finished-text=
"没有更多了"
<div
class=
"main"
v-for=
"(item,index) in 2"
:key=
"index"
>
@
load=
"onLoad"
<p>
16开记事本
</p>
>
<div
class=
"info"
>
<div
class=
"row"
v-for=
"(item,index) in list"
:key=
"index"
>
<p>
类别:办公用品
</p>
<p
class=
"title"
>
<p>
<span>
{{
item
.
departmentName
}}
:
{{
item
.
memberName
}}
</span>
<span
class=
"num"
>
数量:
</span>
<span>
{{
item
.
createtime
|
formatTime
}}
</span>
<span>
3
</span>
</p>
</p>
</div>
<div
class=
"main"
v-for=
"(vor,v_index) in item.vorList"
:key=
"v_index"
@
click=
"goDetail(item.outboundNo)"
>
<p>
{{
vor
.
goodsName
}}
</p>
<div
class=
"info"
>
<p>
类别:
{{
vor
.
categoryName
}}
</p>
<p>
<span
class=
"num"
>
数量:
</span>
<span>
{{
vor
.
outboundNum
}}
</span>
</p>
</div>
</div>
</div>
<div
class=
"btn-group"
>
<div
class=
"btn-group"
>
<van-button
:to=
"
{path: 'receiveDetail'}" plain type="info" size="small">查看详情
</van-button>
<van-button
plain
type=
"info"
size=
"small"
@
click=
"goDetail(item.outboundNo)"
>
查看详情
</div>
</van-button>
</div>
</div>
</div>
</van-list>
</van-pull-refresh>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getOutboundOrderList
,
getDepartList
}
from
'@/api/code'
import
{
formatDate
}
from
'@/utils/date'
export
default
{
export
default
{
name
:
'receiveAdmin'
,
name
:
'receiveAdmin'
,
components
:
{},
components
:
{},
data
()
{
data
()
{
return
{
return
{
currentDate
:
new
Date
(),
defaultValue
:
1
,
defaultValue
:
1
,
value1
:
0
,
departOptions
:
[],
value2
:
'a'
,
total
:
null
,
value3
:
'a'
,
list
:
[],
option1
:
[
loading
:
false
,
{
finished
:
false
,
text
:
'所属部门'
,
refreshing
:
false
,
value
:
0
params
:
{
},
pageNum
:
1
,
{
pageSize
:
10
,
text
:
'新款商品'
,
departId
:
null
,
value
:
1
queryTime
:
null
},
},
{
departTitle
:
'所属部门'
,
text
:
'活动商品'
,
timeTitle
:
'领用时间'
value
:
2
}
},
mounted
()
{
this
.
getList
()
this
.
getDepartList
()
},
methods
:
{
// 部门
getDepartList
()
{
getDepartList
().
then
(
res
=>
{
res
.
data
.
list
.
forEach
(
item
=>
{
item
.
text
=
item
.
name
item
.
value
=
item
.
id
})
this
.
departOptions
=
res
.
data
.
list
console
.
log
(
'this.departOptions'
,
this
.
departOptions
,
res
.
data
.
list
)
})
},
// 查看详情
goDetail
(
outboundNo
)
{
this
.
$router
.
push
({
path
:
'receiveDetail'
,
query
:
{
outboundNo
:
outboundNo
}
}
],
})
option2
:
[
},
{
getList
()
{
text
:
'物品类别'
,
getOutboundOrderList
(
this
.
params
).
then
(
res
=>
{
value
:
'a'
console
.
log
(
'列表'
,
this
.
params
,
res
)
},
for
(
var
i
of
res
.
data
.
list
)
{
{
this
.
list
.
push
(
i
)
text
:
'好评排序'
,
value
:
'b'
},
{
text
:
'销量排序'
,
value
:
'c'
}
}
],
this
.
total
=
Number
(
res
.
data
.
total
)
option3
:
[
this
.
params
.
pageNum
++
{
this
.
loading
=
false
text
:
'领用日期'
,
value
:
'a'
if
(
this
.
list
.
length
>=
this
.
total
)
{
},
this
.
finished
=
true
{
text
:
'好评排序'
,
value
:
'b'
},
{
text
:
'销量排序'
,
value
:
'c'
}
}
]
})
},
onLoad
()
{
console
.
log
(
'onload'
)
// this.finished = true
if
(
this
.
refreshing
)
{
this
.
list
=
[]
this
.
params
.
pageNum
=
1
this
.
refreshing
=
false
}
this
.
getList
()
},
onRefresh
()
{
console
.
log
(
'onrefresh'
)
// 清空列表数据
this
.
finished
=
false
// 重新加载数据
// 将 loading 设置为 true,表示处于加载状态
this
.
loading
=
true
this
.
onLoad
()
},
// 改变
changeDepart
(
id
)
{
console
.
log
(
id
)
const
itemObj
=
this
.
departOptions
.
find
(
item
=>
item
.
id
===
id
)
this
.
departTitle
=
itemObj
.
text
this
.
list
=
[]
this
.
params
.
pageNum
=
1
this
.
getList
()
},
// 日期
confirmDate
(
data
)
{
const
d
=
new
Date
(
data
)
this
.
params
.
queryTime
=
d
.
getFullYear
()
+
'-'
+
(
d
.
getMonth
()
+
1
)
+
'-'
+
d
.
getDate
()
this
.
timeTitle
=
this
.
params
.
queryTime
this
.
$refs
.
myPicker
.
toggle
()
this
.
list
=
[]
this
.
params
.
pageNum
=
1
this
.
getList
()
},
// 全部记录
queryAll
()
{
this
.
params
.
queryTime
=
null
this
.
params
.
departId
=
null
this
.
departTitle
=
'所属部门'
this
.
timeTitle
=
'领用时间'
this
.
list
=
[]
this
.
params
.
pageNum
=
1
this
.
getList
()
}
}
},
},
mounted
()
{
filters
:
{
},
formatTime
(
time
)
{
methods
:
{}
if
(
!
time
)
{
return
'--'
}
const
date
=
new
Date
(
time
)
return
formatDate
(
date
,
'yyyy-MM-dd hh:mm:ss'
)
}
}
}
}
</
script
>
</
script
>
...
@@ -117,22 +206,29 @@ export default {
...
@@ -117,22 +206,29 @@ export default {
.title
span
:last-child
,
.num
{
.title
span
:last-child
,
.num
{
color
:
#999
;
color
:
#999
;
}
}
.row
.main
{
padding
:
15px
;
.row
.main
{
font-size
:
14px
;
padding
:
15px
;
background
:
#ffffff
;
font-size
:
14px
;
text-align
:
left
;
background
:
#ffffff
;
border-bottom
:
1px
solid
#e8e8e8
;
text-align
:
left
;
}
border-bottom
:
1px
solid
#e8e8e8
;
}
.row
.info
{
.row
.info
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
margin-top
:
5px
;
}
}
.btn-group
{
.btn-group
{
background
:
#ffffff
;
background
:
#ffffff
;
text-align
:
right
;
text-align
:
right
;
padding
:
20px
;
padding
:
10px
20px
;
}
.width_100
{
width
:
100%
;
}
}
</
style
>
</
style
>
src/views/Admin/receiveDetail.vue
View file @
40355709
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
<navbar
title=
"详情"
></navbar>
<navbar
title=
"详情"
></navbar>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"info"
>
<div
class=
"info"
>
<p>
申领人:
<span>
王志军
</span></p>
<p>
申领人:
<span>
{{
detail
.
memberName
}}
</span></p>
<p>
所属部门:
<span>
王志军
</span></p>
<p>
所属部门:
<span>
{{
detail
.
departmentName
}}
</span></p>
<p>
员工编号:
<span>
王志军
</span></p>
<p>
员工编号:
<span>
{{
detail
.
jobNo
||
'--'
}}
</span></p>
</div>
</div>
<table>
<table>
<tr>
<tr>
...
@@ -14,12 +14,12 @@
...
@@ -14,12 +14,12 @@
<th>
物品类别
</th>
<th>
物品类别
</th>
<th>
数量
</th>
<th>
数量
</th>
</tr>
</tr>
<tr
v-for=
"(
item,index) in 6"
:key=
"
index"
>
<tr
v-for=
"(
vor,v_index) in detail.vorList"
:key=
"v_
index"
>
<td>
圆珠笔
</td>
<td>
{{
vor
.
goodsName
}}
</td>
<td>
nhg
</td>
<td>
{{
vor
.
goodsNo
}}
</td>
<td>
办公五品
</td>
<td>
{{
vor
.
categoryName
}}
</td>
<td>
<td>
1
{{
vor
.
outboundNum
}}
</td>
</td>
</tr>
</tr>
</table>
</table>
...
@@ -28,17 +28,25 @@
...
@@ -28,17 +28,25 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getOutBountDetail
}
from
'@/api/code'
export
default
{
export
default
{
name
:
'receiveDetail'
,
name
:
'receiveDetail'
,
components
:
{
components
:
{
},
},
data
()
{
data
()
{
return
{}
return
{
detail
:
{}
}
},
},
mounted
()
{
mounted
()
{
this
.
getOutBountDetail
()
},
},
methods
:
{
methods
:
{
getOutBountDetail
()
{
getOutBountDetail
({
outboundNo
:
this
.
$route
.
query
.
outboundNo
}).
then
(
res
=>
{
this
.
detail
=
res
.
data
})
},
submit
()
{
submit
()
{
console
.
log
(
'提交'
)
console
.
log
(
'提交'
)
}
}
...
...
src/views/Admin/scan.vue
View file @
40355709
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<navbar
title=
"扫码出库"
rightText=
"完成"
@
rightClick=
"submit"
></navbar>
<navbar
title=
"扫码出库"
rightText=
"完成"
@
rightClick=
"submit"
></navbar>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"info"
>
<div
class=
"info"
v-if=
"JSON.stringify(userInfo)!= '
{}'"
>
<p>
申领人:
<span>
王志军
</span></p>
<p>
申领人:
<span>
{{
userInfo
.
name
}}
</span></p>
<p>
所属部门:
<span>
王志军
</span></p>
<p>
所属部门:
<span>
{{
userInfo
.
departName
}}
</span></p>
<p>
员工编号:
<span>
王志军
</span></p>
<p>
员工编号:
<span>
{{
userInfo
.
jobNo
}}
</span></p>
</div>
</div>
<table>
<table
v-if=
"list && list.length"
>
<tr>
<tr>
<th>
物品名称
</th>
<th>
物品名称
</th>
<th>
型号
</th>
<th>
型号
</th>
<th>
物品类别
</th>
<th>
物品类别
</th>
<th>
数量
</th>
<th>
数量
</th>
</tr>
</tr>
<tr
v-for=
"(item, index) in
6
"
:key=
"index"
>
<tr
v-for=
"(item, index) in
list
"
:key=
"index"
>
<td>
圆珠笔
</td>
<td>
{{
item
.
name
}}
</td>
<td>
nhg
</td>
<td>
{{
item
.
goodsNo
}}
</td>
<td>
办公五品
</td>
<td>
{{
item
.
goodsCategoryName
}}
</td>
<td
style=
"width: 30%;"
>
<td
style=
"width: 30%;"
>
<stepper
<stepper
:maxNum=
"item.num"
:id=
item.id
:inputNum=
"item.count"
:maxNum=
"item.maxNum"
:inputNum=
"item.goodsNum"
@
changeNum=
"changeNum"
@
changeNum=
"changeNum"
></stepper>
></stepper>
</td>
</td>
...
@@ -29,15 +30,15 @@
...
@@ -29,15 +30,15 @@
</table>
</table>
</div>
</div>
<div
class=
"bottom-fixed"
>
<div
class=
"bottom-fixed"
>
<van-button
plain
type=
"primary"
@
click=
"scanCode"
>
扫描物品条形
码
</van-button>
<van-button
type=
"primary"
@
click=
"scanQrCode"
>
扫描员工二维
码
</van-button>
<van-button
type=
"primary"
@
click=
"scanCode"
>
扫描员工二维
码
</van-button>
<van-button
plain
type=
"primary"
@
click=
"scanBarCode"
>
扫描物品条形
码
</van-button>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Stepper
from
'@/components/Stepper.vue'
import
Stepper
from
'@/components/Stepper.vue'
import
{
checkQcode
}
from
'@/api/code'
import
{
checkQcode
,
getMemberInfo
,
getGoodsInfo
,
outBoundGoods
}
from
'@/api/code'
export
default
{
export
default
{
name
:
'scan'
,
name
:
'scan'
,
...
@@ -45,14 +46,16 @@ export default {
...
@@ -45,14 +46,16 @@ export default {
Stepper
Stepper
},
},
data
()
{
data
()
{
return
{}
return
{
userInfo
:
{},
list
:
[]
}
},
},
mounted
()
{
mounted
()
{
this
.
scanCode
()
// this.scanQRCode()
},
},
methods
:
{
methods
:
{
scanCode
()
{
// 员工二维码扫描
scanQrCode
()
{
console
.
log
(
'扫描'
,
window
.
qing
)
console
.
log
(
'扫描'
,
window
.
qing
)
window
.
qing
.
config
({
window
.
qing
.
config
({
debug
:
true
,
debug
:
true
,
...
@@ -64,24 +67,112 @@ export default {
...
@@ -64,24 +67,112 @@ export default {
window
.
qing
.
call
(
'scanQRCode'
,
{
window
.
qing
.
call
(
'scanQRCode'
,
{
needResult
:
1
,
needResult
:
1
,
success
:
function
(
result
)
{
success
:
function
(
result
)
{
// result.data = '{"onlyId":"f7c3af254e5a40caaf7dab1b06fd7a1c","memberId":53}'
const
data
=
JSON
.
parse
(
result
.
data
.
qrcode_str
)
const
data
=
JSON
.
parse
(
result
.
data
)
checkQcode
(
data
).
then
(
res
=>
{
checkQcode
(
data
).
then
(
res
=>
{
console
.
log
(
'校验结果'
,
res
)
console
.
log
(
'校验结果'
,
res
)
getMemberInfo
({
memberId
:
data
.
memberId
}).
then
(
res
=>
{
console
.
log
(
'userId'
,
res
)
this
.
userInfo
=
res
.
data
})
})
})
console
.
log
(
'成功'
,
result
)
console
.
log
(
'成功'
,
result
)
}
}
})
})
// const result = '{"onlyId":"
62cd399e83184651bb6d15fe403fdac4","memberId":53
}'
// const result = '{"onlyId":"
84c322654e1a4ae4bf93c99839a5af72","memberId":36
}'
// const data = JSON.parse(result)
// const data = JSON.parse(result)
// checkQcode(data).then(res => {
// checkQcode(data).then(res => {
// console.log('校验结果', res)
// console.log('校验结果', res)
// getMemberInfo({ memberId: data.memberId }).then(res => {
// console.log('userId', res)
// this.userInfo = res.data
// })
// })
// })
// console.log('成功', result)
// console.log('成功', result)
},
},
changeNum
()
{
// 物品条形码扫描
scanBarCode
()
{
/* eslint-disable */
if
(
JSON
.
stringify
(
this
.
userInfo
)
==
'{}'
)
{
this
.
$toast
.
fail
(
'请先扫描员工二维码'
)
return
}
window
.
qing
.
call
(
'scanQRCode'
,
{
needResult
:
1
,
success
:
function
(
result
)
{
// result.data = '{"barCode":"f7c3af254e5a40caaf7dab1b06fd7a1c","memberId":53}'
// const data = JSON.parse(result.data)
getGoodsInfo
({
barCode
:
result
.
data
.
qrcode_str
}).
then
(
res
=>
{
let
data
=
res
.
data
let
params
=
{
id
:
data
.
id
,
name
:
data
.
name
,
goodsNo
:
data
.
goodsNo
,
goodsCategoryId
:
data
.
goodsCategoryId
,
goodsCategoryName
:
data
.
goodsCategoryName
,
goodsNum
:
1
,
maxNum
:
data
.
goodsNum
}
let
isExist
=
this
.
list
.
findIndex
(
item
=>
item
.
id
===
data
.
id
)
if
(
isExist
===
-
1
)
{
this
.
list
.
push
(
params
)
}
else
{
this
.
list
[
isExist
].
goodsNum
=
this
.
list
[
isExist
].
goodsNum
+
1
}
console
.
log
(
'要出库的商品'
,
this
.
list
)
})
}
})
// getGoodsInfo({ barCode: result.data.qrcode_str}).then(res => {
// let data = res.data
// let params = {
// id: data.id,
// name: data.name,
// goodsNo: data.goodsNo,
// goodsCategoryId: data.goodsCategoryId,
// goodsCategoryName: data.goodsCategoryName,
// goodsNum: 1,
// maxNum: data.goodsNum
// }
// let isExist = this.list.findIndex(item =>
// item.id === data.id
// )
// if (isExist === -1) {
// this.list.push(params)
// } else {
// this.list[isExist].goodsNum = this.list[isExist].goodsNum + 1
// }
// console.log('要出库的商品', this.list)
// })
},
},
// 数量修改
changeNum
(
value
,
id
)
{
console
.
log
(
'value'
,
value
,
id
)
let
isIndex
=
this
.
list
.
findIndex
(
item
=>
item
.
id
===
id
)
this
.
list
[
isIndex
].
goodsNum
=
value
console
.
log
(
'修改数量'
,
this
.
list
)
},
// 提交
submit
()
{
submit
()
{
if
(
!
this
.
list
.
length
)
{
this
.
$toast
.
fail
(
'请先扫描物品'
)
return
}
console
.
log
(
'this.userInfo.id'
,
this
.
userInfo
.
id
)
let
params
=
{
memberId
:
this
.
userInfo
.
id
,
outMemberId
:
this
.
$store
.
getters
.
memberId
,
vankeGoodsDtoList
:
this
.
list
}
outBoundGoods
(
params
).
then
(
res
=>
{
this
.
$toast
.
success
(
'出库成功'
)
this
.
list
=
[]
this
.
userInfo
=
{}
})
console
.
log
(
'提交'
)
console
.
log
(
'提交'
)
}
}
}
}
...
...
src/views/Employee/index.vue
View file @
40355709
...
@@ -24,12 +24,14 @@ export default {
...
@@ -24,12 +24,14 @@ export default {
data
()
{
data
()
{
return
{
return
{
onlyId
:
null
,
onlyId
:
null
,
timer
:
''
timer
:
''
,
cwidth
:
(
window
.
innerWidth
*
0.6
)
}
}
},
},
mounted
()
{
mounted
()
{
this
.
timer
=
setInterval
(
this
.
generateQrcode
(),
1000
)
this
.
timer
=
setInterval
(
this
.
generateQrcode
,
60000
)
// this.generateQrcode()
this
.
generateQrcode
()
console
.
log
(
'window.innerWidth'
,
window
.
innerWidth
,
this
.
cwidth
)
},
},
methods
:
{
methods
:
{
generateQrcode
()
{
generateQrcode
()
{
...
@@ -39,14 +41,15 @@ export default {
...
@@ -39,14 +41,15 @@ export default {
})
})
},
},
qrcode
(
onlyId
)
{
qrcode
(
onlyId
)
{
document
.
getElementById
(
'qrcode'
).
innerHTML
=
''
const
params
=
{
const
params
=
{
onlyId
:
onlyId
,
onlyId
:
onlyId
,
memberId
:
this
.
$store
.
getters
.
memberId
memberId
:
this
.
$store
.
getters
.
memberId
}
}
console
.
log
(
'memberId'
,
this
.
$store
.
getters
.
memberId
,
JSON
.
stringify
(
params
),
typeof
(
JSON
.
stringify
(
params
)))
console
.
log
(
'memberId'
,
this
.
$store
.
getters
.
memberId
,
JSON
.
stringify
(
params
),
typeof
(
JSON
.
stringify
(
params
)))
const
qrcode
=
new
QRCode
(
'qrcode'
,
{
const
qrcode
=
new
QRCode
(
'qrcode'
,
{
width
:
100
,
width
:
this
.
cwidth
,
height
:
100
,
// 高度
height
:
this
.
cwidth
,
// 高度
text
:
JSON
.
stringify
(
params
)
// 二维码内容
text
:
JSON
.
stringify
(
params
)
// 二维码内容
// render: 'canvas' // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
// render: 'canvas' // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
// background: '#f0f'
// background: '#f0f'
...
@@ -88,13 +91,16 @@ export default {
...
@@ -88,13 +91,16 @@ export default {
}
}
.code
.qr
{
.code
.qr
{
width
:
7
0%
;
width
:
10
0%
;
text-align
:
center
;
text-align
:
center
;
margin
:
10px
auto
5
0px
;
margin
:
10px
auto
2
0px
;
}
}
.code
.notice
{
.code
.notice
{
color
:
#999999
;
color
:
#999999
;
}
}
img
{
width
:
70%
;
}
</
style
>
</
style
>
src/views/Employee/receiveRecords.vue
View file @
40355709
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
</div>
</div>
</div>
</div>
</van-list>
</van-list>
<div
v-if=
"!list.length"
>
暂无领用记录
</div>
</van-pull-refresh>
</van-pull-refresh>
</div>
</div>
...
...
src/views/Home/index.vue
View file @
40355709
...
@@ -38,7 +38,7 @@ export default {
...
@@ -38,7 +38,7 @@ export default {
getToken
()
{
getToken
()
{
this
.
$store
.
dispatch
(
'Login'
,
{
jobNo
:
this
.
$route
.
query
.
jobNo
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
'Login'
,
{
jobNo
:
this
.
$route
.
query
.
jobNo
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
'GetUserInfo'
).
then
(
res
=>
{
this
.
$store
.
dispatch
(
'GetUserInfo'
).
then
(
res
=>
{
res
.
data
.
accouuntType
=
0
//
res.data.accouuntType = 0
this
.
userInfo
=
res
.
data
this
.
userInfo
=
res
.
data
console
.
log
(
'userInof'
,
this
.
userInfo
)
console
.
log
(
'userInof'
,
this
.
userInfo
)
}).
catch
(()
=>
{
}).
catch
(()
=>
{
...
...
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