Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
police-bigdata-vue-all
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
Tian
police-bigdata-vue-all
Commits
49731180
Commit
49731180
authored
Dec 30, 2022
by
Tian
Browse files
Options
Browse Files
Download
Plain Diff
合并分支 'develop' 到 'master'
Develop 查看合并请求
!1
parents
8ee61fd2
9818d45e
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
482 行增加
和
43 行删除
+482
-43
App.vue
src/App.vue
+83
-1
request.js
src/utils/request.js
+16
-15
PanelGroup.vue
src/views/dashboard/PanelGroup.vue
+18
-15
form.vue
src/views/warehouse/borrow/apply/form.vue
+23
-0
common.vue
src/views/warehouse/changePost/main/common.vue
+2
-1
index.vue
src/views/warehouse/inAndOut/index.vue
+6
-2
warehouseDetail.vue
src/views/warehouse/inAndOut/warehouseDetail.vue
+2
-1
warehouseLog.vue
src/views/warehouse/inAndOut/warehouseLog.vue
+2
-1
index.vue
src/views/warehouse/inventoryList/index.vue
+4
-0
form.vue
src/views/warehouse/maintenance/form.vue
+3
-1
addPoliceForm.vue
src/views/warehouse/receive/apply/addPoliceForm.vue
+287
-0
form.vue
src/views/warehouse/receive/apply/form.vue
+35
-5
index.vue
src/views/warehouse/usingReport/index.vue
+1
-1
没有找到文件。
src/App.vue
View file @
49731180
...
...
@@ -5,7 +5,89 @@
</
template
>
<
script
>
import
{
MessageBox
}
from
'element-ui'
import
store
from
'./store'
export
default
{
name
:
'App'
name
:
'App'
,
data
()
{
return
{
//设置超时时间: 30分种
timeOut
:
30
*
60
*
1000
,
//timeOut : 10 * 1000,
lastTimeStoreId
:
'lastTime_jc'
}
},
methods
:
{
// 存储当前时间
setLastTime
()
{
localStorage
.
setItem
(
this
.
lastTimeStoreId
,
new
Date
().
getTime
());
// console.log('当前时间')
},
// 获取时间
getLastTime
()
{
//console.log('获取时间')
return
localStorage
.
getItem
(
this
.
lastTimeStoreId
);
},
// 删除
removeLastTime
()
{
localStorage
.
removeItem
(
this
.
lastTimeStoreId
)
//console.log('操作了删除时间')
},
checkTimeout
()
{
// 登录页面不监听
if
(
this
.
timeOut
&&
this
.
$router
.
currentRoute
.
path
===
'/login'
)
{
//console.log(this.$router.currentRoute.path)
this
.
setLastTime
();
// console.log('不监听')
}
else
{
//更新当前时间
let
currentTime
=
new
Date
().
getTime
();
let
lastTime
=
this
.
getLastTime
();
// console.log(currentTime, lastTime, (currentTime - lastTime), this.timeOut);
//判断是否超时
if
(
currentTime
-
lastTime
>
this
.
timeOut
)
{
this
.
$message
({
type
:
'warning'
,
message
:
'登录状态已过期或超过30分钟未操作,需重新登录'
})
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
location
.
reload
()
// 为了重新实例化vue-router对象 避免bug
})
// MessageBox.confirm(
// '登录状态已过期,您可以继续留在该页面,或者重新登录',
// '系统提示',
// {
// confirmButtonText: '重新登录',
// cancelButtonText: '取消',
// type: 'warning'
// }
// ).then(() => {
// store.dispatch('LogOut').then(() => {
// location.reload() // 为了重新实例化vue-router对象 避免bug
// })
// })
}
}
},
},
mounted
()
{
let
that
=
this
;
// 每15分钟 调用检查时间的方法
this
.
$nextTick
(
function
()
{
//setInterval(this.checkTimeout, 30000);
setInterval
(
this
.
checkTimeout
,
15
*
60
*
1000
);
console
.
log
(
'检查时间'
)
})
// 页面监听 按下鼠标更新操作时间
window
.
onload
=
function
()
{
window
.
document
.
onmousedown
=
function
()
{
that
.
setLastTime
();
//console.log('按下鼠标更新操作时间')
}
window
.
document
.
onkeydown
=
function
()
{
that
.
setLastTime
();
//console.log('按下鼠标更新操作时间')
}
};
}
}
</
script
>
src/utils/request.js
View file @
49731180
...
...
@@ -63,21 +63,22 @@ service.interceptors.response.use(
return
Promise
.
reject
(
error
)
}
}
if
(
code
===
401
)
{
MessageBox
.
confirm
(
'登录状态已过期,您可以继续留在该页面,或者重新登录'
,
'系统提示'
,
{
confirmButtonText
:
'重新登录'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}
).
then
(()
=>
{
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
location
.
reload
()
// 为了重新实例化vue-router对象 避免bug
})
})
}
else
if
(
code
===
403
)
{
// if (code === 401) {
// MessageBox.confirm(
// '登录状态已过期,您可以继续留在该页面,或者重新登录',
// '系统提示',
// {
// confirmButtonText: '重新登录',
// cancelButtonText: '取消',
// type: 'warning'
// }
// ).then(() => {
// store.dispatch('LogOut').then(() => {
// location.reload() // 为了重新实例化vue-router对象 避免bug
// })
// })
// } else
if
(
code
===
403
)
{
router
.
push
({
path
:
'/401'
})
}
else
{
const
errorMsg
=
error
.
response
.
data
.
message
...
...
src/views/dashboard/PanelGroup.vue
View file @
49731180
<
template
>
<el-row
:gutter=
"
15
"
class=
"panel-group"
>
<el-row
:gutter=
"
20
"
class=
"panel-group"
>
<!-- 总平台 -->
<div
class=
"all"
v-if=
"orgCode !== '330200000000'"
>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-4'}" class="card-panel-col">
...
...
@@ -9,7 +9,7 @@
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
装备总数
</div>
<count-to
:start-val=
"0"
:end-val=
"count.zkTopCount"
:duration=
"2600"
class=
"card-panel-num"
/>
<count-to
:start-val=
"0"
:end-val=
"count.zkTopCount
-count.bfCount
"
:duration=
"2600"
class=
"card-panel-num"
/>
</div>
</div>
</el-col>
...
...
@@ -68,7 +68,7 @@
</div>
</div>
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-4'}" class="card-panel-col" >
<
!--
<
el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-4'}" class="card-panel-col" >
<div
class=
"card-panel"
@
click=
"nextpage('报废数量')"
>
<div
class=
"card-panel-icon-wrapper icon-people"
>
<svg-icon
icon-class=
"garbage"
class-name=
"card-panel-icon"
/>
...
...
@@ -78,23 +78,23 @@
<count-to
:start-val=
"0"
:end-val=
"count.bfCount"
:duration=
"2600"
class=
"card-panel-num"
/>
</div>
</div>
</el-col>
</el-col>
-->
</div>
<!-- 宁波市局 -->
<div
class=
"nb"
v-if=
"orgCode === '330200000000'"
>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-
4
'}" class="card-panel-col">
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-
5
'}" class="card-panel-col">
<div
class=
"card-panel"
@
click=
"nextpageNb('装备总数')"
>
<div
class=
"card-panel-icon-wrapper icon-people"
>
<svg-icon
icon-class=
"total"
class-name=
"card-panel-icon"
/>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
装备总数
</div>
<count-to
:start-val=
"0"
:end-val=
"count.zkTopCount"
:duration=
"2600"
class=
"card-panel-num"
/>
<count-to
:start-val=
"0"
:end-val=
"count.zkTopCount
-count.bfCount
"
:duration=
"2600"
class=
"card-panel-num"
/>
</div>
</div>
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-
4
'}" class="card-panel-col">
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-
5
'}" class="card-panel-col">
<div
class=
"card-panel"
@
click=
"nextpageNb('在库数量')"
>
<div
class=
"card-panel-icon-wrapper icon-money"
>
<svg-icon
icon-class=
"zaiku"
class-name=
"card-panel-icon"
/>
...
...
@@ -105,7 +105,7 @@
</div>
</div>
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-
4
'}" class="card-panel-col">
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-
5
'}" class="card-panel-col">
<div
class=
"card-panel"
@
click=
"nextpageNb('调拨数量')"
>
<div
class=
"card-panel-icon-wrapper icon-message"
>
<svg-icon
icon-class=
"available"
class-name=
"card-panel-icon"
/>
...
...
@@ -116,7 +116,7 @@
</div>
</div>
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-
4
'}" class="card-panel-col">
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-
5
'}" class="card-panel-col">
<div
class=
"card-panel"
@
click=
"nextpageNb('领用数量')"
>
<div
class=
"card-panel-icon-wrapper icon-shopping"
>
<svg-icon
icon-class=
"collecting"
class-name=
"card-panel-icon"
/>
...
...
@@ -127,7 +127,7 @@
</div>
</div>
</el-col>
<
el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-4
'}" class="card-panel-col">
<
!--
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-5
'}" class="card-panel-col">
<div
class=
"card-panel"
@
click=
"nextpageNb('即将报废数量')"
>
<div
class=
"card-panel-icon-wrapper icon-people"
>
<svg-icon
icon-class=
"30天"
class-name=
"card-panel-icon1"
/>
...
...
@@ -137,10 +137,10 @@
<count-to
:start-val=
"0"
:end-val=
"count.jjbfCount"
:duration=
"2600"
class=
"card-panel-num"
/>
</div>
</div>
</el-col>
</el-col>
-->
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-
4
'}" class="card-panel-col" >
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-
5
'}" class="card-panel-col" >
<div
class=
"card-panel"
@
click=
"nextpageNb('报废区数量')"
>
<div
class=
"card-panel-icon-wrapper icon-people"
>
<svg-icon
icon-class=
"garbage"
class-name=
"card-panel-icon1"
/>
...
...
@@ -153,7 +153,7 @@
</el-col>
<
el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-4
'}" class="card-panel-col" >
<
!--
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"
{span: '3-5
'}" class="card-panel-col" >
<div
class=
"card-panel"
@
click=
"nextpageNb('销毁数量')"
>
<div
class=
"card-panel-icon-wrapper icon-xh"
>
<svg-icon
icon-class=
"系统"
class-name=
"card-panel-icon"
/>
...
...
@@ -163,7 +163,7 @@
<count-to
:start-val=
"0"
:end-val=
"count.bfCount"
:duration=
"2600"
class=
"card-panel-num"
/>
</div>
</div>
</el-col>
</el-col>
-->
</div>
</el-row>
</
template
>
...
...
@@ -274,7 +274,10 @@ export default {
.panel-group
{
margin-top
:
-10px
;
.el-col-lg-3-4
{
width
:
14.28%
;
width
:
16.65%
;
}
.el-col-lg-3-5
{
width
:
19.98%
;
}
.card-panel-col
{
margin-bottom
:
15px
;
...
...
src/views/warehouse/borrow/apply/form.vue
View file @
49731180
...
...
@@ -69,6 +69,13 @@
</el-select>
<!-- <el-input v-model="form.policeNote" style="width: 240px;"
placeholder="请填写借用人名称"/> -->
<el-popover
placement=
"top-start"
width=
"190"
trigger=
"hover"
content=
"没有警员?点击去添加"
>
<el-button
class=
"el-icon-circle-plus-outline"
slot=
"reference"
@
click=
"addPoliceForm"
></el-button>
</el-popover>
</el-form-item>
</el-collapse-item>
<el-collapse-item
name=
"2"
>
...
...
@@ -310,6 +317,8 @@
>
确认
</el-button
>
</div>
<!-- 表单组件-引用新增警员页面 -->
<pForm
ref=
"addPoliceForm"
:is-add=
"isAdd"
@
ok=
"handeleInit"
/>
</el-dialog>
</template>
...
...
@@ -321,6 +330,7 @@ import { getProcess, getAllProcess } from "@/api/process";
import
{
getPagePoliceman
}
from
"@/api/policeman"
;
import
{
deleteTxt
,
addTxt
,
getListTxt
}
from
"@/api/policeman"
;
import
cnchar
from
"cnchar"
;
import
pForm
from
'@/views/warehouse/receive/apply/addPoliceForm'
export
default
{
props
:
{
isAdd
:
{
...
...
@@ -328,6 +338,7 @@ export default {
required
:
true
,
},
},
components
:
{
pForm
},
data
()
{
return
{
loading
:
false
,
...
...
@@ -626,6 +637,18 @@ export default {
}
});
},
//添加警员
addPoliceForm
()
{
this
.
isAdd
=
true
const
_this
=
this
.
$refs
.
addPoliceForm
_this
.
initOrg
()
_this
.
initCabinets
(
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
id
)
_this
.
dialog
=
true
console
.
log
(
'添加警员'
)
},
handeleInit
()
{
this
.
getPolicemans
()
},
//获取装备库存
getAllInventoryList
()
{
this
.
equipmentList
=
[];
...
...
src/views/warehouse/changePost/main/common.vue
View file @
49731180
...
...
@@ -163,9 +163,10 @@ export default {
const
_this
=
this
.
$refs
.
applyForm
_this
.
form
=
data
_this
.
form
.
orgCode
=
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
code
.
substring
(
0
,
6
)
_this
.
detailList
=
data
.
detailList
//
_this.detailList = data.detailList
_this
.
initOrgTree
()
_this
.
initPolicemanList
()
_this
.
changePoliceman
(
data
.
policeId
)
_this
.
getProcess
(
data
.
nextStepId
)
_this
.
dialog
=
true
},
...
...
src/views/warehouse/inAndOut/index.vue
View file @
49731180
...
...
@@ -32,12 +32,16 @@
<el-tab-pane
label=
"报废"
name=
"7"
>
<warehouse-log
:orgList=
"orgList"
:warehouseList=
"warehouseList"
:actionState=
"selectedOrder"
@
changeOrg=
"changeOrg"
/>
</el-tab-pane>
<el-tab-pane
label=
"
盘亏"
name=
"23
"
>
<el-tab-pane
label=
"
销毁"
name=
'25'
v-if=
"orgCode === '330200000000'
"
>
<warehouse-log
:orgList=
"orgList"
:warehouseList=
"warehouseList"
:actionState=
"selectedOrder"
@
changeOrg=
"changeOrg"
/>
</el-tab-pane>
<el-tab-pane
label=
"销毁"
name=
'25'
v-if=
"orgCode === '330200000000'"
>
<el-tab-pane
label=
"盘库(赢)"
name=
"22"
>
<warehouse-log
:orgList=
"orgList"
:warehouseList=
"warehouseList"
:actionState=
"selectedOrder"
@
changeOrg=
"changeOrg"
/>
</el-tab-pane>
<el-tab-pane
label=
"盘库(亏)"
name=
"23"
>
<warehouse-log
:orgList=
"orgList"
:warehouseList=
"warehouseList"
:actionState=
"selectedOrder"
@
changeOrg=
"changeOrg"
/>
</el-tab-pane>
<!--
<el-tab-pane
label=
"跨库借用"
name=
"15"
>
<warehouse-log
:orgList=
"orgList"
:warehouseList=
"warehouseList"
:actionState=
"selectedOrder"
@
changeOrg=
"changeOrg"
/>
</el-tab-pane>
...
...
src/views/warehouse/inAndOut/warehouseDetail.vue
View file @
49731180
...
...
@@ -27,7 +27,8 @@
<el-tag
v-else-if=
"scope.row.actionState === 19"
type=
"success"
>
装备回库
</el-tag>
<el-tag
v-else-if=
"scope.row.actionState == 24"
type=
"success"
>
调岗出库
</el-tag>
<el-tag
v-else-if=
"scope.row.actionState == 25"
type=
"danger"
>
销毁
</el-tag>
<el-tag
v-else-if=
"scope.row.actionState == 23"
type=
"warning"
>
盘亏
</el-tag>
<el-tag
v-else-if=
"scope.row.actionState == 22"
type=
"warning"
>
盘库(赢)
</el-tag>
<el-tag
v-else-if=
"scope.row.actionState == 23"
type=
"warning"
>
盘库(亏)
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"安全等级"
align=
"center"
width=
"150px"
prop=
"safeLevel"
>
...
...
src/views/warehouse/inAndOut/warehouseLog.vue
View file @
49731180
...
...
@@ -81,7 +81,8 @@
<el-tag
v-else-if=
"scope.row.actionState === 19"
type=
"success"
>
装备回库
</el-tag>
<el-tag
v-else-if=
"scope.row.actionState == 24"
type=
"success"
>
调岗出库
</el-tag>
<el-tag
v-else-if=
"scope.row.actionState == 25"
type=
"danger"
>
销毁
</el-tag>
<el-tag
v-else-if=
"scope.row.actionState == 23"
type=
"warning"
>
盘亏
</el-tag>
<el-tag
v-else-if=
"scope.row.actionState == 22"
type=
"danger"
>
盘库(赢)
</el-tag>
<el-tag
v-else-if=
"scope.row.actionState == 23"
type=
"danger"
>
盘库(亏)
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"安全等级"
align=
"center"
width=
"150px"
prop=
"safeLevel"
>
...
...
src/views/warehouse/inventoryList/index.vue
View file @
49731180
...
...
@@ -160,19 +160,23 @@ export default {
typeList
:
[
{
name
:
"全部装备"
,
value
:
"装备总数"
},
{
name
:
"在库装备"
,
value
:
"在库数量"
},
{
name
:
"仓库装备"
,
value
:
"仓库装备"
},
{
name
:
"调拨中"
,
value
:
"调拨数量"
},
{
name
:
"使用中"
,
value
:
"领用数量"
},
{
name
:
"维修装备"
,
value
:
"维修数量"
},
{
name
:
"报废装备"
,
value
:
"报废数量"
},
{
name
:
"单警柜装备"
,
value
:
"单警柜装备"
},
],
typeListNb
:
[
{
name
:
"全部装备"
,
value
:
"装备总数"
},
{
name
:
"在库装备"
,
value
:
"在库数量"
},
{
name
:
"仓库装备"
,
value
:
"仓库装备"
},
{
name
:
"调拨中"
,
value
:
"调拨数量"
},
{
name
:
"使用中"
,
value
:
"领用数量"
},
{
name
:
"维修装备"
,
value
:
"维修数量"
},
{
name
:
"报废装备"
,
value
:
"报废区数量"
},
{
name
:
"销毁装备"
,
value
:
"销毁数量"
},
{
name
:
"单警柜装备"
,
value
:
"单警柜装备"
},
],
orgCode
:
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
code
,
tData
:
[],
...
...
src/views/warehouse/maintenance/form.vue
View file @
49731180
...
...
@@ -97,6 +97,7 @@
<span
v-else-if=
"scope.row.actionState == 15 || scope.row.actionState == 16"
>
跨仓库借用
</span>
<span
v-else-if=
"scope.row.actionState == 17 || scope.row.actionState == 18"
>
跨仓库归还
</span>
<span
v-else-if=
"scope.row.actionState == 19"
>
装备回库
</span>
<span
v-else-if=
"scope.row.actionState == 22"
>
盘赢
</span>
<span
v-else-if=
"scope.row.actionState == 23"
>
盘亏
</span>
{{
scope
.
row
.
outInState
==
0
?
'出库'
:
'入库'
}}
</
template
>
...
...
@@ -125,7 +126,8 @@
<span
v-else-if=
"scope.row.actionState == 15 || scope.row.actionState == 16"
>
跨仓库借用
</span>
<span
v-else-if=
"scope.row.actionState == 17 || scope.row.actionState == 18"
>
跨仓库归还
</span>
<span
v-else-if=
"scope.row.actionState == 19"
>
装备回库
</span>
<span
v-else-if=
"scope.row.actionState == 23"
>
盘亏
</span>
<span
v-else-if=
"scope.row.actionState == 22"
>
盘库(赢)
</span>
<span
v-else-if=
"scope.row.actionState == 23"
>
盘库(亏)
</span>
{{
scope
.
row
.
outInState
==
0
?
'出库'
:
'入库'
}}
</
template
>
</el-table-column>
...
...
src/views/warehouse/receive/apply/addPoliceForm.vue
0 → 100644
View file @
49731180
<
template
>
<el-dialog
:append-to-body=
"true"
:close-on-click-modal=
"false"
:before-close=
"cancel"
:visible
.
sync=
"dialog"
:title=
"isAdd ? '新增警员信息' : '编辑警员信息'"
width=
"600px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"130px"
>
<el-form-item
label=
"组织机构"
prop=
"orgizationCode"
>
<el-cascader
v-model=
"form.orgizationCode"
:options=
"orgs"
filterable
:props=
"
{ value: 'id', label: 'name', checkStrictly: true, emitPath: false }"
clearable :show-all-levels="false" class="filter-item" style="width: 370px;" placeholder="请选择组织机构" @change="orgChange"/>
</el-form-item>
<el-form-item
label=
"姓名"
prop=
"name"
>
<el-input
v-model
.
trim=
"form.name"
style=
"width: 370px;"
placeholder=
"请输入姓名"
/>
</el-form-item>
<el-form-item
label=
"警员编号"
prop=
"policeCode"
>
<el-input
v-model=
"form.policeCode"
style=
"width: 370px;"
placeholder=
"请输入警员编号"
/>
</el-form-item>
<el-form-item
label=
"性别"
>
<el-radio
v-model=
"form.sex"
label=
"男"
border
>
男
</el-radio>
<el-radio
v-model=
"form.sex"
label=
"女"
border
>
女
</el-radio>
</el-form-item>
<el-form-item
label=
"同步生成账号"
>
<el-radio
v-model=
"form.isCreatedAccount"
:label=
"true"
border
>
是
</el-radio>
<el-radio
v-model=
"form.isCreatedAccount"
:label=
"false"
border
>
否
</el-radio>
</el-form-item>
<el-form-item
label=
"账号名"
prop=
"account"
v-show=
"accountShow"
>
<el-input
v-model
.
trim=
"form.account"
style=
"width: 370px;"
placeholder=
"请输入账号名"
/>
</el-form-item>
<el-form-item
label=
"联系电话"
prop=
"phone"
>
<el-input
v-model=
"form.phone"
style=
"width: 370px;"
placeholder=
"请输入联系电话"
/>
</el-form-item>
<el-form-item
label=
"身份证号"
>
<el-input
v-model=
"form.idCardNo"
style=
"width: 370px;"
placeholder=
"请输入身份证号"
/>
</el-form-item>
<el-form-item
label=
"单警柜"
>
<el-select
v-model=
"form.cabinetId"
filterable
clearable
placeholder=
"请选择单警柜"
style=
"width: 370px;"
ref=
"select"
>
<el-option-group
v-for=
"group in cabinets"
:key=
"group.label"
:label=
"group.label"
>
<el-option
v-for=
"item in group.options"
:key=
"item.cabinetId"
:label=
"item.cabinetChildNum"
:value=
"item.cabinetId"
:disabled=
"item.name !== null"
>
<span
style=
"float: left;margin-left: 10px"
>
{{
item
.
cabinetChildNum
}}
</span>
<span
style=
"float: right; color: #8492a6; font-size: 13px"
>
{{
item
.
name
}}
</span>
</el-option>
</el-option-group>
</el-select>
</el-form-item>
<el-form-item
label=
"人脸图片"
>
<el-upload
class=
"avatar-uploader"
:action=
"baseApi2+'/api/Policeman/FileUp'"
:show-file-list=
"false"
:on-success=
"handleSuccess"
:before-upload=
"beforeUpload"
>
<img
v-if=
"form.photo"
:src=
"encodeURI(baseApi2 + form.photo)"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
type=
"info"
plain
>
关闭
</el-button>
<el-button
:loading=
"loading"
type=
"primary"
@
click=
"doSubmit"
>
确认
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
{
addOrUpdatePoliceman
}
from
'@/api/policeman'
import
{
getCabinetListPeople
}
from
'@/api/cabinet'
import
{
getListOrg
}
from
'@/api/org'
export
default
{
props
:
{
isAdd
:
{
type
:
Boolean
,
required
:
true
}
},
computed
:
{
...
mapGetters
([
'baseApi2'
])
},
data
()
{
const
validPhone
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
callback
(
new
Error
(
'请输入电话号码'
))
}
else
if
(
!
this
.
isvalidPhone
(
value
))
{
callback
(
new
Error
(
'请输入正确的11位手机号码'
))
}
else
{
callback
()
}
}
const
validPoliceCode
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
callback
(
new
Error
(
'请输入警员编号'
))
}
else
if
(
value
==
'000000'
)
{
callback
(
new
Error
(
'该警员编号已被占用!'
))
}
else
{
callback
()
}
}
return
{
loading
:
false
,
dialog
:
false
,
cabinets
:[],
orgs
:
[],
accountShow
:
false
,
form
:
{
id
:
''
,
name
:
''
,
orgizationCode
:
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
id
,
policeCode
:
''
,
sex
:
'男'
,
isCreatedAccount
:
false
,
photo
:
''
,
phone
:
''
,
idCardNo
:
''
,
cabinetId
:
''
,
updateUser
:
this
.
$store
.
state
.
user
.
user
.
id
},
rules
:
{
name
:
[
{
required
:
true
,
message
:
'请输入警员名称'
,
trigger
:
'blur'
}
],
policeCode
:
[
{
required
:
true
,
trigger
:
'blur'
,
validator
:
validPoliceCode
}
],
phone
:
[
{
required
:
true
,
trigger
:
'blur'
,
validator
:
validPhone
}
],
orgizationCode
:
[
{
required
:
true
,
message
:
'请选择组织机构'
,
trigger
:
'请选择组织机构'
}
]
}
}
},
methods
:
{
cancel
()
{
this
.
resetForm
()
},
doSubmit
()
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
loading
=
true
if
(
this
.
isAdd
)
{
this
.
doAdd
()
}
else
this
.
doEdit
()
}
})
},
doAdd
()
{
addOrUpdatePoliceman
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
'10000'
)
{
this
.
resetForm
()
this
.
$notify
({
title
:
'添加成功'
,
type
:
'success'
,
duration
:
2500
})
this
.
$emit
(
'ok'
)
}
else
{
this
.
$message
.
error
(
res
.
msg
)
this
.
accountShow
=
true
}
this
.
loading
=
false
}).
catch
(
err
=>
{
this
.
loading
=
false
// console.log(err.response.data.message)
})
},
doEdit
()
{
addOrUpdatePoliceman
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
'10000'
)
{
this
.
resetForm
()
this
.
$notify
({
title
:
'修改成功'
,
type
:
'success'
,
duration
:
2500
})
this
.
$emit
(
'ok'
)
}
else
{
this
.
$message
.
error
(
res
.
msg
)
this
.
accountShow
=
true
}
this
.
loading
=
false
}).
catch
(
err
=>
{
this
.
loading
=
false
console
.
log
(
err
.
response
.
data
.
message
)
})
},
resetForm
()
{
this
.
dialog
=
false
this
.
$refs
[
'form'
].
resetFields
()
this
.
form
=
{
id
:
''
,
name
:
''
,
orgizationCode
:
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
id
,
policeCode
:
''
,
sex
:
'男'
,
isCreatedAccount
:
false
,
photo
:
''
,
phone
:
''
,
isCardNo
:
''
,
cabinetId
:
''
,
updateUser
:
this
.
$store
.
state
.
user
.
user
.
id
}
this
.
accountShow
=
false
},
initCabinets
(
organizationId
)
{
getCabinetListPeople
({
organizationId
:
organizationId
}).
then
(
res
=>
{
if
(
res
.
code
===
"10000"
)
{
this
.
cabinets
=
res
.
data
}
else
{
this
.
$message
.
error
(
res
.
msg
)
}
})
},
initOrg
()
{
const
params
=
{
id
:
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
id
}
getListOrg
(
params
).
then
(
res
=>
{
this
.
orgs
=
res
.
data
})
},
orgChange
()
{
this
.
form
.
cabinetId
=
''
this
.
cabinets
=
[]
this
.
initCabinets
(
this
.
form
.
orgizationCode
)
},
isvalidPhone
(
str
)
{
const
reg
=
/^1
(
3
[
0-9
]
|4
[
01456879
]
|5
[
0-3,5-9
]
|6
[
2567
]
|7
[
0-8
]
|8
[
0-9
]
|9
[
0-3,5-9
])\d{8}
$/
return
reg
.
test
(
str
)
},
isvalidNumber
(
str
)
{
const
reg
=
/^
(
0|
[
0-9
][
0-9
]
*
)
$/
return
reg
.
test
(
str
)
},
handleSuccess
(
res
,
file
,
fileList
)
{
if
(
res
.
code
===
"10000"
)
{
this
.
form
.
photo
=
res
.
data
.
filePath
}
else
{
this
.
$message
.
warning
(
res
.
msg
);
}
},
beforeUpload
(
file
)
{
const
isJPG
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
;
const
isLt2M
=
file
.
size
/
1024
<
200
;
if
(
!
isJPG
)
{
this
.
$message
.
warning
(
'上传头像图片只能是 JPG或者PNG 格式!'
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'上传头像图片大小不能超过 200KB!'
);
}
return
isJPG
&&
isLt2M
;
},
open
()
{
this
.
$refs
.
select
.
blur
()
},
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
/
deep
/
.el-input-number
.el-input__inner
{
text-align
:
left
;
}
/
deep
/
.el-select-group__title
{
padding-left
:
20px
;
font-size
:
15px
;
color
:
#909399
;
line-height
:
30px
;
}
/
deep
/
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
/
deep
/
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409EFF
;
}
/
deep
/
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
width
:
178px
;
height
:
178px
;
line-height
:
178px
;
text-align
:
center
;
}
/
deep
/
.avatar
{
width
:
160px
;
height
:
200px
;
display
:
block
;
}
</
style
>
src/views/warehouse/receive/apply/form.vue
View file @
49731180
...
...
@@ -12,21 +12,31 @@
</el-select>
</el-form-item>
<el-form-item>
<el-select
v-model=
"form.policeId"
style=
"width: 240px;"
filterable
placeholder=
"请选择领用人"
>
<el-select
v-model=
"form.policeId"
style=
"width: 240px;"
filterable
placeholder=
"请选择领用人"
>
<el-option
v-for=
"item in policeList"
:key=
"item.name"
:label=
"item.name"
:value=
"item.id"
>
:value=
"item.id"
>
</el-option>
<!-- <hr style="border-top:1px dashed #e8e8e8;">
<el-button type="info" style="font-size: 14px;width: 220px;" @click="addPoliceForm">+ 添加警员</el-button> -->
</el-select>
<el-popover
placement=
"top-start"
width=
"190"
trigger=
"hover"
content=
"没有警员?点击去添加"
>
<el-button
class=
"el-icon-circle-plus-outline"
slot=
"reference"
@
click=
"addPoliceForm"
></el-button>
</el-popover>
</el-form-item>
<div
style=
"float: right; margin-top: -100px;margin-right: 140px;"
>
<el-form-item>
<!-- `checked` 为 true 或 false -->
<el-checkbox
v-model=
"form.isBindCabinet"
>
放入单警柜
</el-checkbox>
</el-form-item>
<el-form-item
label=
"附件"
label-width=
"8
5
px"
>
<el-form-item
label=
"附件"
label-width=
"8
0
px"
>
<el-upload
style=
"width: 240px; "
class=
"upload-demo"
name=
"borrowFile"
...
...
@@ -39,7 +49,7 @@
:limit=
"1"
:on-exceed=
"handleExceed"
:file-list=
"form.files"
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
<el-button
size=
"small"
type=
"primary"
>
点击上传
<
i
class=
"el-icon-upload el-icon--right"
></i><
/el-button>
</el-upload>
</el-form-item>
</div>
...
...
@@ -168,6 +178,8 @@
<el-button
@
click=
"cancel"
type=
"info"
plain
>
关闭
</el-button>
<el-button
:loading=
"loading"
type=
"primary"
@
click=
"doSubmit"
v-if=
"!form.flowState"
>
确认
</el-button>
</div>
<!-- 表单组件-引用新增警员页面 -->
<pForm
ref=
"addPoliceForm"
:is-add=
"isAdd"
@
ok=
"handeleInit"
/>
</el-dialog>
</template>
...
...
@@ -178,6 +190,8 @@ import { addAndApprovalBorrowOrder } from '@/api/borrow'
import
{
getAllInventoryList
}
from
'@/api/inventory'
import
{
deleteTxt
,
addTxt
,
getListTxt
,
getPagePoliceman
}
from
'@/api/policeman'
import
cnchar
from
"cnchar"
;
import
{
deleteTempFile
}
from
'@/api/tempFile'
import
pForm
from
'./addPoliceForm'
export
default
{
props
:
{
isAdd
:
{
...
...
@@ -185,6 +199,7 @@ export default {
required
:
true
}
},
components
:
{
pForm
},
computed
:
{
...
mapGetters
([
'baseApi2'
...
...
@@ -266,6 +281,7 @@ export default {
}
}
},
//获取警员列表
getPolicemans
()
{
getPagePoliceman
({
page
:
0
,
size
:
999
,
orgizationCode
:
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
id
,
level
:
'本级'
}).
then
(
res
=>
{
if
(
res
.
code
==
'10000'
)
{
...
...
@@ -298,6 +314,7 @@ export default {
}
})
},
//选择警员
doThing
()
{
if
(
!
this
.
form
.
policeId
)
{
this
.
$message
.
warning
(
'请选择领用的警员'
)
...
...
@@ -327,6 +344,18 @@ export default {
console
.
log
(
err
.
response
.
data
.
message
)
})
},
//添加警员
addPoliceForm
()
{
this
.
isAdd
=
true
const
_this
=
this
.
$refs
.
addPoliceForm
_this
.
initOrg
()
_this
.
initCabinets
(
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
id
)
_this
.
dialog
=
true
console
.
log
(
'添加警员'
)
},
handeleInit
()
{
this
.
getPolicemans
()
},
resetForm
()
{
this
.
dialog
=
false
this
.
form
=
{
...
...
@@ -345,7 +374,8 @@ export default {
this
.
form
.
fileUrl
=
res
.
data
}
else
{
this
.
form
.
files
=
[]
this
.
$message
.
warning
(
res
.
msg
);
//this.$message.warning(res.msg);
this
.
$message
.
warning
(
'上传附件失败,不支持上传该类型文件'
);
}
},
handleRemove
(
file
,
fileList
)
{
...
...
src/views/warehouse/usingReport/index.vue
View file @
49731180
...
...
@@ -91,7 +91,7 @@ export default {
return
{
orgId
:
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
id
,
equData
:
[],
// date: ['2020-
01-01', '2022-08-0
8'],
// date: ['2020-
12-21', '2022-12-2
8'],
date
:
[
new
Date
().
getFullYear
()
+
"-01-01"
,
parseTimes
(
new
Date
())],
orgList
:
[],
equipmentCode
:
''
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论