Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
f0bb03ee
Commit
f0bb03ee
authored
Aug 15, 2023
by
duxingshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、借出归还台账接口对接
2、设备台账接口对接 3、部分细节调整
parent
f96f58a8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
454 additions
and
113 deletions
+454
-113
ruoyi-ui/.env.production
+1
-1
ruoyi-ui/src/api/smartSchool/schoolProperty/equipmenTledger.js
+14
-2
ruoyi-ui/src/api/smartSchool/schoolProperty/lendingReturn.js
+47
-0
ruoyi-ui/src/assets/images/login.png
+0
-0
ruoyi-ui/src/views/login.vue
+5
-1
ruoyi-ui/src/views/smartSchool/schoolProperty/classiFication/index.vue
+0
-6
ruoyi-ui/src/views/smartSchool/schoolProperty/equipmenTledger/index.vue
+133
-50
ruoyi-ui/src/views/smartSchool/schoolProperty/lendingReturn/index.vue
+254
-53
No files found.
ruoyi-ui/.env.production
View file @
f0bb03ee
...
@@ -5,4 +5,4 @@ VUE_APP_TITLE = 智慧校园管理系统
...
@@ -5,4 +5,4 @@ VUE_APP_TITLE = 智慧校园管理系统
ENV = 'production'
ENV = 'production'
# 智慧校园/生产环境
# 智慧校园/生产环境
VUE_APP_BASE_API = '/
prod-
api'
VUE_APP_BASE_API = '/
gld_
api'
ruoyi-ui/src/api/smartSchool/schoolProperty/equipmenTledger.js
View file @
f0bb03ee
...
@@ -38,7 +38,7 @@ export function editEquipmentLedger(data) {
...
@@ -38,7 +38,7 @@ export function editEquipmentLedger(data) {
//根据分类编码ID获取设备型号
//根据分类编码ID获取设备型号
export
function
getModelByID
(
id
)
{
export
function
getModelByID
(
id
)
{
return
request
({
return
request
({
url
:
`productCategory/getEquipmentByCode/
${
id
}
`
,
url
:
`
/
productCategory/getEquipmentByCode/
${
id
}
`
,
method
:
"GET"
,
method
:
"GET"
,
});
});
}
}
...
@@ -46,7 +46,19 @@ export function getModelByID(id) {
...
@@ -46,7 +46,19 @@ export function getModelByID(id) {
//设备台账出库 删除
//设备台账出库 删除
export
function
deleteEquipmentLedger
(
id
)
{
export
function
deleteEquipmentLedger
(
id
)
{
return
request
({
return
request
({
url
:
`equipmentLedger/outStock/
${
id
}
`
,
url
:
`
/
equipmentLedger/outStock/
${
id
}
`
,
method
:
"POST"
,
method
:
"POST"
,
});
});
}
}
/**
* 公共接口
* 获取用户列表
**/
export
function
getUserList
(
params
)
{
return
request
({
url
:
'/equipmentLedger/getUser'
,
method
:
"GET"
,
params
});
}
ruoyi-ui/src/api/smartSchool/schoolProperty/lendingReturn.js
0 → 100644
View file @
f0bb03ee
import
request
from
"@/utils/request"
;
//查询借出归还台账列表
export
function
getLendingReturn
(
params
)
{
return
request
({
url
:
"/circulation/list"
,
method
:
"GET"
,
params
,
});
}
//借出归还台账 根据ID获取详情
export
function
getLRDetailByID
(
id
)
{
return
request
({
url
:
`/circulation/
${
id
}
`
,
method
:
"GET"
,
});
}
//借出归还台账新增
export
function
addLendingReturn
(
data
)
{
return
request
({
url
:
"/circulation/add"
,
method
:
"POST"
,
data
,
});
}
//借出归还台账编辑
export
function
editLendingReturn
(
data
)
{
return
request
({
url
:
"/circulation/edit"
,
method
:
"PUT"
,
data
,
});
}
//借出归还台账删除
export
function
deleteLendingReturn
(
id
)
{
return
request
({
url
:
`/circulation/delete/
${
id
}
`
,
method
:
"POST"
,
});
}
ruoyi-ui/src/assets/images/login.png
0 → 100644
View file @
f0bb03ee
167 KB
ruoyi-ui/src/views/login.vue
View file @
f0bb03ee
...
@@ -22,9 +22,10 @@
...
@@ -22,9 +22,10 @@
<div
class=
"login-card-left"
>
<div
class=
"login-card-left"
>
<el-image
<el-image
style=
"width: 600px;"
style=
"width: 600px;"
:src=
"require('@/assets/images/log
o-login.gif
')"
:src=
"require('@/assets/images/log
in.png
')"
lazy
lazy
></el-image>
></el-image>
<!-- :src="require('@/assets/images/logo-login.gif')"-->
</div>
</div>
<div
class=
"login-card-right"
>
<div
class=
"login-card-right"
>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
...
@@ -200,6 +201,9 @@ export default {
...
@@ -200,6 +201,9 @@ export default {
</
script
>
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
.login
{
background-color
:
rgba
(
0
,
191
,
255
,
0.15
);
}
.login-container
{
.login-container
{
//
transition
:
transform
.5s
ease-in
;
//
transition
:
transform
.5s
ease-in
;
...
...
ruoyi-ui/src/views/smartSchool/schoolProperty/classiFication/index.vue
View file @
f0bb03ee
...
@@ -247,12 +247,6 @@ export default {
...
@@ -247,12 +247,6 @@ export default {
})
})
},
},
// 查询管理员列表
handleQueryVehicle
()
{
this
.
throttle
(()
=>
{
this
.
getVehicleList
();
})
},
rowClick
(
row
)
{
rowClick
(
row
)
{
this
.
$refs
.
vehicleSelectTable
.
clearSelection
();
this
.
$refs
.
vehicleSelectTable
.
clearSelection
();
this
.
$refs
.
vehicleSelectTable
.
toggleRowSelection
(
row
,
true
);
this
.
$refs
.
vehicleSelectTable
.
toggleRowSelection
(
row
,
true
);
...
...
ruoyi-ui/src/views/smartSchool/schoolProperty/equipmenTledger/index.vue
View file @
f0bb03ee
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
@
click=
"handleDelete(0)"
:disabled=
"isDisabledBtn"
>
批量出库
</el-button>
@
click=
"handleDelete(0)"
:disabled=
"isDisabledBtn"
>
批量出库
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
icon=
"el-icon-download"
size=
"mini"
@
click=
"
handleImport
"
>
导入
</el-button>
<el-button
type=
"success"
icon=
"el-icon-download"
size=
"mini"
@
click=
"
upload.open = true
"
>
导入
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleExportClass"
>
导出
</el-button>
<el-button
type=
"warning"
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleExportClass"
>
导出
</el-button>
...
@@ -217,8 +217,12 @@
...
@@ -217,8 +217,12 @@
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"使用人:"
prop=
"useName"
>
<el-form-item
label=
"使用人:"
prop=
"useName"
>
<el-input
v-model=
"form.useName"
placeholder=
"请输入使用人"
<el-select
v-model=
"form.useId"
filterable
placeholder=
"请选择使用人"
:disabled=
"nowOptionType==2?true:false"
clearable
></el-input>
:disabled=
"nowOptionType==2?true:false"
clearable
>
<el-option
v-for=
"(item,index) in userList"
:key=
"index"
:label=
"item.userName"
:value=
"item.userId"
>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -239,37 +243,39 @@
...
@@ -239,37 +243,39 @@
</el-dialog>
</el-dialog>
<!-- 导入对话框-->
<!-- 导入对话框-->
<!-- <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>--
>
<el-dialog
:title=
"upload.title"
:visible
.
sync=
"upload.open"
width=
"400px"
append-to-body
>
<!-- <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url"-->
<el-upload
ref=
"upload"
:limit=
"1"
accept=
".xlsx, .xls"
:headers=
"upload.headers"
:action=
"upload.url"
<!-- :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess"-->
:disabled=
"upload.isUploading"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
<!-- :auto-upload="false" drag>--
>
:auto-upload=
"false"
drag
>
<!-- <i class="el-icon-upload"></i>--
>
<i
class=
"el-icon-upload"
></i
>
<!-- <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>--
>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div
>
<!-- <div class="el-upload__tip text-center" slot="tip">--
>
<div
class=
"el-upload__tip text-center"
slot=
"tip"
>
<!-- <span>仅允许导入xls、xlsx格式文件。</span>--
>
<span>
仅允许导入xls、xlsx格式文件。
</span
>
<!-- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"-->
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
<!-- @click="importTemplate">下载模板-->
@
click=
"importTemplate"
>
下载模板
<!-- </el-link>--
>
</el-link
>
<!-- </div>--
>
</div
>
<!-- </el-upload>--
>
</el-upload
>
<!-- <div slot="footer" class="dialog-footer">--
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<!-- <el-button type="primary" @click="submitFileForm">确 定</el-button>--
>
<el-button
type=
"primary"
@
click=
"submitFileForm"
>
确 定
</el-button
>
<!-- <el-button @click="upload.open = false">取 消</el-button>--
>
<el-button
@
click=
"upload.open = false"
>
取 消
</el-button
>
<!-- </div>--
>
</div
>
<!-- </el-dialog>--
>
</el-dialog
>
<!-- 打印二维码 弹框部分 -->
<!-- 打印二维码 弹框部分 -->
<el-dialog
title=
"打印条码预览"
:visible
.
sync=
"printDialog"
width=
"30%"
>
<el-dialog
title=
"打印条码预览"
:visible
.
sync=
"printDialog"
width=
"30%"
>
<div
class=
"qrCodeList"
>
<div
class=
"qrCodeList"
>
<div
v-for=
"(item,index) in chooseList"
:key=
"index"
class=
"flexBlock qrCode"
>
<div
v-for=
"(item,index) in chooseList"
:key=
"index"
>
<div
class=
"titlShow"
>
东营市二中
</div>
<div
class=
"flexBlock qrCode"
>
<div
class=
"qrCodeLeft"
>
<div
class=
"qrCodeLeft"
>
<div
:id=
"'qrcode' + index"
></div>
<div
:id=
"'qrcode' + index"
></div>
<div>
{{item.encode}}
</div>
<div>
{{item.encode}}
</div>
</div>
</div>
<div
class=
"qrCodeRight"
>
<div
class=
"qrCodeRight"
>
<div>
东营市二中
</div>
<div>
{{ item.equipmentName }}:{{ item.model }}
</div>
<div>
型号:{{ item.model
}}
</div>
<div>
地点:{{ item.place
}}
</div>
<
div>
设备名称:{{ item.equipmentName }}
<
/div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -281,15 +287,17 @@
...
@@ -281,15 +287,17 @@
<!-- 隐藏二维码页面样式 -->
<!-- 隐藏二维码页面样式 -->
<div
id=
"printBlock"
>
<div
id=
"printBlock"
>
<div
v-for=
"(item,index) in printList"
:key=
"index"
class=
"flexBlock printQrCode"
>
<div
v-for=
"(item,index) in printList"
:key=
"index"
class=
"printBody"
>
<div
class=
"qrCodeLeft"
>
<div
class=
"titlePrint"
>
东营市二中
</div>
<div
class=
"flexBlock printQrCode"
>
<div
class=
"printLeft"
>
<div
:id=
"'print' + index"
class=
"printImg"
></div>
<div
:id=
"'print' + index"
class=
"printImg"
></div>
<div>
{{item.encode}}
</div>
<div>
{{item.encode}}
</div>
</div>
</div>
<div
class=
"printRight"
>
<div
class=
"printRight"
>
<div>
东营市二中
</div>
<div>
{{ item.equipmentName }}:{{ item.model }}
</div>
<div>
型号:{{ item.model
}}
</div>
<div>
地点:{{item.place
}}
</div>
<
div>
设备名称:{{ item.equipmentName }}
<
/div>
</div>
</div>
</div>
<div
style=
"page-break-after:always"
></div>
<div
style=
"page-break-after:always"
></div>
</div>
</div>
...
@@ -306,7 +314,7 @@ import { getToken } from "@/utils/auth";
...
@@ -306,7 +314,7 @@ import { getToken } from "@/utils/auth";
import
{
import
{
addEquipmentLedger
,
deleteEquipmentLedger
,
editEquipmentLedger
,
addEquipmentLedger
,
deleteEquipmentLedger
,
editEquipmentLedger
,
getEquipmentLedger
,
getEquipmentLedger
,
getEquipmentLedgerDetailByID
,
getModelByID
getEquipmentLedgerDetailByID
,
getModelByID
,
getUserList
}
from
"../../../../api/smartSchool/schoolProperty/equipmenTledger"
;
}
from
"../../../../api/smartSchool/schoolProperty/equipmenTledger"
;
import
{
getProduct
}
from
"../../../../api/smartSchool/schoolProperty/classiFication"
;
import
{
getProduct
}
from
"../../../../api/smartSchool/schoolProperty/classiFication"
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
...
@@ -345,7 +353,7 @@ export default {
...
@@ -345,7 +353,7 @@ export default {
// 设置上传的请求头部
// 设置上传的请求头部
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
},
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
},
// 上传的地址
// 上传的地址
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/
schoolClass
/importData"
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/
equipmentLedger
/importData"
},
},
form
:
{
form
:
{
id
:
''
,
id
:
''
,
...
@@ -363,6 +371,7 @@ export default {
...
@@ -363,6 +371,7 @@ export default {
price
:
''
,
price
:
''
,
lifeOfUtility
:
''
,
lifeOfUtility
:
''
,
place
:
''
,
place
:
''
,
useId
:
''
,
useName
:
''
,
useName
:
''
,
remark
:
''
,
remark
:
''
,
},
},
...
@@ -382,7 +391,8 @@ export default {
...
@@ -382,7 +391,8 @@ export default {
isDisabledBtn
:
true
,
isDisabledBtn
:
true
,
chooseList
:[],
//用户选择的table数据
chooseList
:[],
//用户选择的table数据
printDialog
:
false
,
// 打印二维码预览
printDialog
:
false
,
// 打印二维码预览
printList
:[]
printList
:[],
userList
:[]
//使用人列表
};
};
},
},
created
()
{
created
()
{
...
@@ -465,9 +475,11 @@ export default {
...
@@ -465,9 +475,11 @@ export default {
lifeOfUtility
:
''
,
lifeOfUtility
:
''
,
place
:
''
,
place
:
''
,
useName
:
''
,
useName
:
''
,
useId
:
''
,
remark
:
''
,
remark
:
''
,
}
}
this
.
nowOptionType
=
type
this
.
nowOptionType
=
type
this
.
getSelectUser
()
if
(
type
!=
0
){
if
(
type
!=
0
){
getEquipmentLedgerDetailByID
(
id
).
then
(
res
=>
{
getEquipmentLedgerDetailByID
(
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
...
@@ -481,8 +493,19 @@ export default {
...
@@ -481,8 +493,19 @@ export default {
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
},
},
//使用人列表数据
getSelectUser
(){
getUserList
().
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
userList
=
res
.
rows
}
})
},
//表单提交
//表单提交
submitForm
(){
submitForm
(){
const
useId
=
this
.
form
.
useId
this
.
form
.
useName
=
this
.
userList
.
find
(
item
=>
item
.
userId
==
useId
).
userName
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
nowOptionType
==
0
){
if
(
this
.
nowOptionType
==
0
){
...
@@ -502,6 +525,7 @@ export default {
...
@@ -502,6 +525,7 @@ export default {
lifeOfUtility
:
this
.
form
.
lifeOfUtility
,
lifeOfUtility
:
this
.
form
.
lifeOfUtility
,
place
:
this
.
form
.
place
,
place
:
this
.
form
.
place
,
useName
:
this
.
form
.
useName
,
useName
:
this
.
form
.
useName
,
useId
,
remark
:
this
.
form
.
remark
,
remark
:
this
.
form
.
remark
,
}
}
addEquipmentLedger
(
data
).
then
(
res
=>
{
addEquipmentLedger
(
data
).
then
(
res
=>
{
...
@@ -523,7 +547,6 @@ export default {
...
@@ -523,7 +547,6 @@ export default {
}
}
}
}
})
})
},
},
//出库
//出库
...
@@ -552,8 +575,37 @@ export default {
...
@@ -552,8 +575,37 @@ export default {
},
},
//导入
//模版下载
handleImport
(){},
importTemplate
(){
this
.
download
(
"/equipmentLedger/importTemplate"
,
{},
`设备台账_template_
${
new
Date
().
getTime
()}
.xlsx`
);
},
// 文件上传中处理
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
this
.
upload
.
isUploading
=
true
;
},
// 文件上传成功处理
handleFileSuccess
(
response
,
file
,
fileList
)
{
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
this
.
$alert
(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"
+
response
.
msg
+
"</div>"
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
}
);
this
.
getList
();
},
// 提交上传文件
submitFileForm
()
{
this
.
$refs
.
upload
.
submit
();
},
//导出
//导出
handleExportClass
(){
handleExportClass
(){
...
@@ -574,19 +626,25 @@ export default {
...
@@ -574,19 +626,25 @@ export default {
this
.
printList
=
this
.
chooseList
this
.
printList
=
this
.
chooseList
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
chooseList
.
map
((
item
,
index
)
=>
{
this
.
chooseList
.
map
((
item
,
index
)
=>
{
const
dom
=
document
.
getElementById
(
`qrcode
${
index
}
`
).
lastElementChild
if
(
dom
==
null
){
new
QRCode
(
`qrcode
${
index
}
`
,
{
new
QRCode
(
`qrcode
${
index
}
`
,
{
width
:
150
,
width
:
150
,
height
:
150
,
height
:
150
,
text
:
item
.
encode
,
text
:
item
.
encode
,
});
});
}
})
})
this
.
printList
.
map
((
item
,
index
)
=>
{
this
.
printList
.
map
((
item
,
index
)
=>
{
const
domPrint
=
document
.
getElementById
(
`print
${
index
}
`
).
lastElementChild
if
(
domPrint
==
null
)
{
new
QRCode
(
`print
${
index
}
`
,
{
new
QRCode
(
`print
${
index
}
`
,
{
width
:
8
0
,
width
:
6
0
,
height
:
8
0
,
height
:
6
0
,
text
:
item
.
encode
,
text
:
item
.
encode
,
});
});
}
})
})
})
})
...
@@ -598,14 +656,26 @@ export default {
...
@@ -598,14 +656,26 @@ export default {
printable
:
'printBlock'
,
// 标签元素id
printable
:
'printBlock'
,
// 标签元素id
type
:
'html'
,
type
:
'html'
,
targetStyles
:
[
'*'
],
targetStyles
:
[
'*'
],
style
:
'#printBlock{display:block!important}'
font_size
:
'10px'
,
style
:
`
@media print{
@page{
size:auto;
margin:4mm 0mm 0mm 0mm
}
@page :first {
margin-top:2mm
}
#printBlock{
display:block!important
}
}`
})
})
},
},
// 多选框选中数据
// 多选框选中数据
handleSelectionChange
(
selection
)
{
handleSelectionChange
(
selection
)
{
this
.
chooseList
=
selection
this
.
chooseList
=
selection
console
.
log
(
"selection"
,
selection
)
this
.
electItem
=
selection
.
map
(
item
=>
{
this
.
electItem
=
selection
.
map
(
item
=>
{
return
item
.
id
return
item
.
id
})
})
...
@@ -641,30 +711,43 @@ export default {
...
@@ -641,30 +711,43 @@ export default {
.qrCodeRight
{
.qrCodeRight
{
padding
:
20px
0
20px
15px
;
padding
:
20px
0
20px
15px
;
}
}
.qrCodeRight
div
:first-child
{
.titlShow
{
font-size
:
18px
;
font-weight
:
bold
;
font-weight
:
bold
;
text-align
:
center
;
text-align
:
center
;
padding-bottom
:
10px
;
font-size
:
16px
;
}
}
#printBlock
{
#printBlock
{
display
:
none
;
display
:
none
;
margin
:
0px
!important
;
}
.printLeft
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
text-align
:
center
;
}
.printBody
{
width
:
250px
;
}
}
.printQrCode
{
.printQrCode
{
font-size
:
10
px
;
font-size
:
6
px
;
line-height
:
3
0px
;
line-height
:
2
0px
;
align-items
:
flex-start
;
align-items
:
center
;
padding
:
10
px
;
padding
:
8
px
;
}
}
.printRight
{
.printRight
{
padding
:
10px
0
10px
5px
;
width
:
60%
;
padding
:
0
5px
;
}
}
.
printRight
div
:first-child
{
.
titlePrint
{
font-size
:
12
px
;
font-size
:
8
px
;
font-weight
:
bold
;
font-weight
:
bold
;
text-align
:
center
;
text-align
:
center
;
}
}
.printImg
{
.printImg
{
display
:
block
;
display
:
block
;
margin-left
:
30px
;
}
}
</
style
>
</
style
>
ruoyi-ui/src/views/smartSchool/schoolProperty/lendingReturn/index.vue
View file @
f0bb03ee
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"80px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"80px"
>
<el-form-item
label=
"设备名称"
prop=
"studentName"
>
<el-form-item
label=
"设备名称"
prop=
"studentName"
>
<el-input
v-model=
"queryParams.
xc
"
placeholder=
"请输入设备名称"
clearable
/>
<el-input
v-model=
"queryParams.
equipmentName
"
placeholder=
"请输入设备名称"
clearable
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"借用日期"
prop=
"studentName"
>
<el-form-item
label=
"借用日期"
prop=
"studentName"
>
<el-date-picker
v-model=
"queryParams.
xc
"
type=
"date"
clearable
<el-date-picker
v-model=
"queryParams.
borrowTime
"
type=
"date"
clearable
placeholder=
"请选择借用日期"
format=
"yyyy-MM-dd"
>
placeholder=
"请选择借用日期"
format=
"yyyy-MM-dd"
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
...
@@ -20,22 +20,21 @@
...
@@ -20,22 +20,21 @@
</el-col>
</el-col>
</el-row>
</el-row>
<el-table
v-loading=
"loading"
:data=
"lendReturnData"
stripe
>
<el-table
v-loading=
"loading"
:data=
"lendReturnData"
stripe
>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
label=
"序号"
type=
"index"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"序号"
type=
"index"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"自编码"
align=
"center"
prop=
"
studentNam
e"
/>
<el-table-column
label=
"自编码"
align=
"center"
prop=
"
encod
e"
/>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"
studentNumber
"
/>
<el-table-column
label=
"设备名称"
align=
"center"
prop=
"
equipmentName
"
/>
<el-table-column
label=
"型号"
align=
"center"
prop=
"
studentNumber
"
/>
<el-table-column
label=
"型号"
align=
"center"
prop=
"
model
"
/>
<el-table-column
label=
"借用日期"
align=
"center"
prop=
"
studentNumber
"
/>
<el-table-column
label=
"借用日期"
align=
"center"
prop=
"
borrowTime
"
/>
<el-table-column
label=
"借用人"
align=
"center"
prop=
"
studentNumber
"
/>
<el-table-column
label=
"借用人"
align=
"center"
prop=
"
borrowBy
"
/>
<el-table-column
label=
"用途"
align=
"center"
prop=
"
studentNumber
"
/>
<el-table-column
label=
"用途"
align=
"center"
prop=
"
purpose
"
/>
<el-table-column
label=
"借用期限(天)"
align=
"center"
prop=
"
studentNumber
"
/>
<el-table-column
label=
"借用期限(天)"
align=
"center"
prop=
"
deadline
"
/>
<el-table-column
label=
"归还日期"
align=
"center"
prop=
"
studentNumber
"
/>
<el-table-column
label=
"归还日期"
align=
"center"
prop=
"
returnTime
"
/>
<el-table-column
label=
"归还时设备情况"
align=
"center"
prop=
"
studentNumber
"
/>
<el-table-column
label=
"归还时设备情况"
align=
"center"
prop=
"
returnEquipmentCondition
"
/>
<el-table-column
label=
"接收人"
align=
"center"
prop=
"
studentNumber
"
/>
<el-table-column
label=
"接收人"
align=
"center"
prop=
"
receivedBy
"
/>
<el-table-column
label=
"预计使用时间"
align=
"center"
prop=
"
studentNumber
"
/>
<el-table-column
label=
"预计使用时间"
align=
"center"
prop=
"
yjuseTime
"
/>
<el-table-column
label=
"实际使用时间"
align=
"center"
prop=
"s
tudentNumber
"
/>
<el-table-column
label=
"实际使用时间"
align=
"center"
prop=
"s
juseTime
"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"
studentNumber
"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"
remark
"
/>
<el-table-column
label=
"操作"
align=
"center"
prop=
"orgname"
width=
"150"
>
<el-table-column
label=
"操作"
align=
"center"
prop=
"orgname"
width=
"150"
fixed=
"right"
>
<template
slot-scope=
"
{ row }">
<template
slot-scope=
"
{ row }">
<el-button
type=
"text"
size=
"small"
@
click=
"handleOption(1,row)"
>
编辑
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"handleOption(1,row)"
>
编辑
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"handleOption(2,row)"
>
查看
</el-button>
<el-button
type=
"text"
size=
"small"
@
click=
"handleOption(2,row)"
>
查看
</el-button>
...
@@ -48,83 +47,112 @@
...
@@ -48,83 +47,112 @@
<!-- 新增、编辑、查看页面 -->
<!-- 新增、编辑、查看页面 -->
<el-dialog
title=
"详细信息"
:visible
.
sync=
"dialogVisible"
width=
"50%"
>
<el-dialog
title=
"详细信息"
:visible
.
sync=
"dialogVisible"
width=
"50%"
>
<el-form
:model=
"lendReturnForm"
:rules=
"lendReturnRules"
ref=
"
achievement
Form"
<el-form
:model=
"lendReturnForm"
:rules=
"lendReturnRules"
ref=
"
lendReturn
Form"
label-width=
"1
1
0px"
label-position=
"right"
>
label-width=
"1
2
0px"
label-position=
"right"
>
<el-row
:gutter=
"30"
>
<el-row
:gutter=
"30"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"自编码"
prop=
"idCard"
>
<el-form-item
label=
"自编码"
prop=
"encode"
>
<el-input
v-model=
"lendReturnForm"
placeholder=
"请输入自编码"
></el-input>
<el-input
v-model=
"lendReturnForm.encode"
placeholder=
"请输入自编码"
:disabled=
"nowType != 0?true:false"
@
change=
"getOtherInfoByCode"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"借用人"
prop=
"idCard"
>
<el-form-item
label=
"借用人"
prop=
"borrowById"
>
<el-input
v-model=
"lendReturnForm"
placeholder=
"请输入借用人"
></el-input>
<el-select
v-model=
"lendReturnForm.borrowById"
filterable
placeholder=
"请选择借用人"
:disabled=
"nowType == 2?true:false"
clearable
>
<el-option
v-for=
"(item,index) in userList"
:key=
"index"
:label=
"item.userName"
:value=
"item.userId"
>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
:gutter=
"30"
>
<el-row
:gutter=
"30"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"设备名称"
prop=
"
idCard
"
>
<el-form-item
label=
"设备名称"
prop=
"
equipmentName
"
>
<el-input
v-model=
"lendReturnForm
"
placeholder=
"请输入设备名称
"
></el-input>
<el-input
v-model=
"lendReturnForm
.equipmentName"
placeholder=
"请输入设备名称"
:disabled=
"nowType == 2?true:false
"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"型号"
prop=
"
idCard
"
>
<el-form-item
label=
"型号"
prop=
"
model
"
>
<el-input
v-model=
"lendReturnForm
"
placeholder=
"请输入型号
"
></el-input>
<el-input
v-model=
"lendReturnForm
.model"
placeholder=
"请输入型号"
:disabled=
"nowType == 2?true:false
"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
:gutter=
"30"
>
<el-row
:gutter=
"30"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"借用日期"
prop=
"
idCard
"
>
<el-form-item
label=
"借用日期"
prop=
"
borrowTime
"
>
<el-date-picker
v-model=
"lendReturnForm"
type=
"date"
clearable
class=
"selectWidth"
<el-date-picker
v-model=
"lendReturnForm
.borrowTime
"
type=
"date"
clearable
class=
"selectWidth"
placeholder=
"请选择借用日期"
format=
"yyyy-MM-dd"
>
placeholder=
"请选择借用日期"
format=
"yyyy-MM-dd"
:disabled=
"nowType == 2?true:false"
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"归还日期"
prop=
"
idCard
"
>
<el-form-item
label=
"归还日期"
prop=
"
returnTime
"
>
<el-date-picker
v-model=
"lendReturnForm"
type=
"date"
clearable
class=
"selectWidth"
<el-date-picker
v-model=
"lendReturnForm
.returnTime
"
type=
"date"
clearable
class=
"selectWidth"
placeholder=
"请选择归还日期"
format=
"yyyy-MM-dd"
>
placeholder=
"请选择归还日期"
format=
"yyyy-MM-dd"
:disabled=
"nowType == 2?true:false"
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
:gutter=
"30"
>
<el-row
:gutter=
"30"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"借用期限(天)"
prop=
"
idCard
"
>
<el-form-item
label=
"借用期限(天)"
prop=
"
deadline
"
>
<el-input
v-model=
"lendReturnForm
"
placeholder=
"请输入借用期限
"
></el-input>
<el-input
v-model=
"lendReturnForm
.deadline"
placeholder=
"请输入借用期限"
:disabled=
"nowType == 2?true:false
"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"归还时设备情况"
prop=
"idCard"
>
<el-form-item
label=
"归还时设备情况"
prop=
"returnEquipmentCondition"
>
<el-input
v-model=
"lendReturnForm"
placeholder=
"请输入归还时设备情况"
></el-input>
<el-input
v-model=
"lendReturnForm.returnEquipmentCondition"
placeholder=
"请输入归还时设备情况"
:disabled=
"nowType == 2?true:false"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
:gutter=
"30"
>
<el-row
:gutter=
"30"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"用途"
prop=
"idCard"
>
<el-form-item
label=
"用途"
prop=
"purpose"
>
<el-input
v-model=
"lendReturnForm"
placeholder=
"请输入用途"
></el-input>
<el-input
v-model=
"lendReturnForm.purpose"
placeholder=
"请输入用途"
:disabled=
"nowType == 2?true:false"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"接收人"
prop=
"receivedById"
>
<el-select
v-model=
"lendReturnForm.receivedById"
filterable
placeholder=
"请选择接收人"
:disabled=
"nowType == 2?true:false"
clearable
>
<el-option
v-for=
"(item,index) in adminUserList"
:key=
"index"
:label=
"item.admin"
:value=
"item.adminId"
>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row
:gutter=
"30"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"接收人"
prop=
"idCard"
>
<el-form-item
label=
"预计使用时间"
prop=
"yjuseTime"
>
<el-input
v-model=
"lendReturnForm"
placeholder=
"请输入接收人"
></el-input>
<el-date-picker
v-model=
"lendReturnForm.yjuseTime"
type=
"date"
clearable
class=
"selectWidth"
placeholder=
"请选择预计使用时间"
format=
"yyyy-MM-dd"
:disabled=
"nowType == 2?true:false"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"实际使用时间"
prop=
"sjuseTime"
>
<el-date-picker
v-model=
"lendReturnForm.sjuseTime"
type=
"date"
clearable
class=
"selectWidth"
placeholder=
"请选择实际使用时间"
format=
"yyyy-MM-dd"
:disabled=
"nowType == 2?true:false"
>
</el-date-picker>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
:gutter=
"30"
>
<el-row
:gutter=
"30"
>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"chemistry"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
type=
"textarea"
v-model=
"lendReturnForm"
placeholder=
"请输入备注"
></el-input>
<el-input
type=
"textarea"
v-model=
"lendReturnForm.remark"
placeholder=
"请输入备注"
:disabled=
"nowType == 2?true:false"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
v-if=
"nowType != 2"
@
click=
"submitForm"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<!-- 新增、编辑、查看页面 -->
<!-- 新增、编辑、查看页面 -->
...
@@ -132,45 +160,218 @@
...
@@ -132,45 +160,218 @@
</template>
</template>
<
script
>
<
script
>
import
{
addLendingReturn
,
deleteLendingReturn
,
editLendingReturn
,
getLendingReturn
,
getLRDetailByID
}
from
"../../../../api/smartSchool/schoolProperty/lendingReturn"
;
import
{
getRepairencode
}
from
"../../../../api/smartSchool/schoolProperty/repairApplicant"
;
import
{
getUserList
}
from
"../../../../api/smartSchool/schoolProperty/equipmenTledger"
;
import
{
getAdmin
}
from
'@/api/smartSchool/schoolProperty/classiFication.js'
export
default
{
export
default
{
// dicts: [''],
data
()
{
data
()
{
return
{
return
{
queryParams
:
{
queryParams
:
{
xc
:
''
,
equipmentName
:
''
,
borrowTime
:
''
,
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
},
},
loading
:
false
,
loading
:
false
,
total
:
0
,
total
:
0
,
lendReturnData
:[],
lendReturnData
:[],
lendReturnForm
:{},
lendReturnForm
:{
lendReturnRules
:[],
id
:
''
,
encode
:
''
,
equipmentId
:
''
,
equipmentName
:
''
,
model
:
''
,
borrowTime
:
''
,
borrowById
:
''
,
borrowBy
:
''
,
purpose
:
''
,
deadline
:
''
,
returnTime
:
''
,
returnEquipmentCondition
:
''
,
receivedById
:
''
,
yjuseTime
:
''
,
sjuseTime
:
''
,
remark
:
''
,
},
lendReturnRules
:{
encode
:[
{
required
:
true
,
message
:
'请输入自编码'
,
trigger
:
'blur'
},
],
equipmentName
:[
{
required
:
true
,
message
:
'请输入设备名称'
,
trigger
:
'blur'
},
],
model
:[
{
required
:
true
,
message
:
'请输入型号'
,
trigger
:
'blur'
},
],
borrowById
:[
{
required
:
true
,
message
:
'请输入借用人'
,
trigger
:
'blur'
},
],
borrowTime
:[
{
required
:
true
,
message
:
'请输入借用日期'
,
trigger
:
'change'
},
],
deadline
:[
{
required
:
true
,
message
:
'请输入借用期限'
,
trigger
:
'change'
},
],
purpose
:[
{
required
:
true
,
message
:
'请输入用途'
,
trigger
:
'change'
},
],
},
dialogVisible
:
false
,
dialogVisible
:
false
,
nowType
:
0
,
// 0新增、1编辑、2查看
nowType
:
0
,
// 0新增、1编辑、2查看
userList
:[],
//用户列表
adminUserList
:[]
//管理员用户列表
}
}
},
},
mounted
()
{
this
.
getList
()
},
methods
:{
methods
:{
// 获取列表数据
// 获取列表数据
getList
(){},
getList
(){
this
.
loading
=
true
getLendingReturn
({...
this
.
queryParams
}).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
total
=
res
.
total
this
.
lendReturnData
=
res
.
rows
this
.
loading
=
false
}
})
},
// 重置搜索
// 重置搜索
resetQuery
(){},
resetQuery
(){
this
.
queryParams
=
{
equipmentName
:
''
,
borrowTime
:
''
,
pageNum
:
1
,
pageSize
:
10
,
}
this
.
getList
()
},
//根据自编码获取信息
getOtherInfoByCode
(){
const
code
=
this
.
lendReturnForm
.
encode
getRepairencode
(
code
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
lendReturnForm
.
equipmentId
=
res
.
data
.
equipmentId
this
.
lendReturnForm
.
model
=
res
.
data
.
model
this
.
lendReturnForm
.
equipmentName
=
res
.
data
.
equipmentName
}
})
},
// 0新增、1编辑、2查看
// 0新增、1编辑、2查看
handleOption
(
type
,
item
){
handleOption
(
type
,
item
){
this
.
lendReturnForm
=
{
id
:
''
,
encode
:
''
,
equipmentId
:
''
,
equipmentName
:
''
,
model
:
''
,
borrowTime
:
''
,
borrowById
:
''
,
borrowBy
:
''
,
purpose
:
''
,
deadline
:
''
,
returnTime
:
''
,
returnEquipmentCondition
:
''
,
receivedById
:
''
,
yjuseTime
:
''
,
sjuseTime
:
''
,
remark
:
''
,
}
this
.
nowType
=
type
this
.
nowType
=
type
this
.
getSelectUser
()
this
.
getAdminUserList
()
if
(
type
!=
0
){
if
(
type
!=
0
){
const
id
=
item
.
id
getLRDetailByID
(
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
Object
.
keys
(
this
.
lendReturnForm
).
forEach
(
key
=>
{
if
(
res
.
data
[
key
])
{
this
.
$set
(
this
.
lendReturnForm
,
key
,
res
.
data
[
key
]);
}
})
}
})
}
}
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
},
},
//获取用户列表数据
getSelectUser
(){
getUserList
().
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
userList
=
res
.
rows
}
})
},
//获取管理员用户列表
getAdminUserList
(){
getAdmin
().
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
adminUserList
=
res
.
data
}
})
},
//删除
//删除
handleDelete
(){},
handleDelete
(
id
){
this
.
$confirm
(
"此操作将永久删除该数据,是否继续?"
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
deleteLendingReturn
(
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
$message
.
success
(
"删除成功!"
)
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除!'
});
});
},
//表单提交
//表单提交
submitForm
(){},
submitForm
(){
const
borrowById
=
this
.
lendReturnForm
.
borrowById
this
.
lendReturnForm
.
borrowBy
=
borrowById
==
''
?
''
:
this
.
userList
.
find
(
item
=>
item
.
userId
==
borrowById
).
userName
this
.
$refs
[
'lendReturnForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
nowType
==
1
){
//1编辑
editLendingReturn
({...
this
.
lendReturnForm
}).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
$message
.
success
(
"编辑成功!"
)
this
.
dialogVisible
=
false
this
.
getList
()
}
})
}
else
if
(
this
.
nowType
==
0
){
//0新增
addLendingReturn
({...
this
.
lendReturnForm
}).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
$message
.
success
(
"新增成功!"
)
this
.
dialogVisible
=
false
this
.
getList
()
}
})
}
}
})
},
}
}
}
}
</
script
>
</
script
>
...
...
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