Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
assets
Project
Project
Details
Activity
Releases
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
黄媛媛
assets
Commits
df74d72d
Commit
df74d72d
authored
Jan 19, 2020
by
黄媛媛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
88da8563
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
671 additions
and
0 deletions
+671
-0
consumablesMan.vue
src/components/Systemman/consumablesMan.vue
+222
-0
consumablesManRule.vue
src/components/Systemman/consumablesManRule.vue
+449
-0
No files found.
src/components/Systemman/consumablesMan.vue
0 → 100644
View file @
df74d72d
<
template
>
<div
class=
"Supplierman"
>
<div
class=
"routerTitle"
>
<span
class=
"pageTitle"
>
耗材时间管理
</span>
<span
@
click=
"morequery=!morequery"
style=
"display:inline-flex;align-items:center;cursor: pointer;"
class=
"f12 cd6"
>
<span
style=
"margin-right:5px"
>
高级查询
</span>
<img
v-show=
"!morequery"
style=
"width:12px;height:12px"
src=
"../../assets/img/more.png"
alt=
""
>
<img
v-show=
"morequery"
class=
"roatImg"
style=
"width:12px;height:12px"
src=
"../../assets/img/more.png"
alt=
""
>
</span>
<span
@
click=
"getList"
style=
"margin-left:20px"
class=
"chaxunSpan"
>
查询
</span>
<!--
<span
@
click=
"chongzhi"
style=
"margin-left:20px"
class=
"addSpan"
>
重置
</span>
-->
<span
@
click=
"addSupplier"
style=
"margin-left:20px"
class=
"addSpan"
>
<img
style=
"width:10px;height:10px;margin-right:6px"
src=
"../../assets/img/add.png"
alt=
""
>
新增
</span>
</div>
<div
class=
"padContent"
>
<ul
v-show=
"morequery"
class=
"queryul"
>
<li>
<el-select
filterable
size=
"small"
v-model=
"msg.BranchId"
placeholder=
"公司"
>
<el-option
label=
"通用"
:value=
"-1"
></el-option>
<el-option
v-for=
"item in BranchList"
:key=
"item.Id"
:label=
"item.BName"
:value=
"item.Id"
>
</el-option>
</el-select>
</li>
<li>
<el-select
filterable
size=
"small"
v-model=
"msg.Enabled"
placeholder=
"状态"
>
<el-option
label=
"是"
:value=
"1"
></el-option>
<el-option
label=
"否"
:value=
"2"
></el-option>
</el-select>
</li>
</ul>
<vxe-table
stripe
style=
"margin-top:15px"
:loading=
"loading"
:data=
"tableData"
>
<vxe-table-column
field=
"BranchName"
title=
"公司"
></vxe-table-column>
<vxe-table-column
field=
"Contact"
title=
"申请时间"
>
<template
v-slot=
"
{ row }">
<span
v-for=
"(item,index) in row.WeekdayList"
:key=
"index"
>
{{
item
.
Weekday
}}
<span
v-if=
"index
<row
.
WeekdayList
.
length-1
"
>
、
</span>
</span>
</
template
>
</vxe-table-column>
<vxe-table-column
field=
"Enabled"
title=
"状态"
>
<
template
v-slot=
"{ row }"
>
<span
v-if=
"row.Enabled==1"
>
是
</span>
<span
v-else
>
否
</span>
</
template
>
</vxe-table-column>
<vxe-table-column
field=
"UpdateBy"
title=
"操作人/时间"
>
<
template
v-slot=
"{ row }"
>
<p>
{{
row
.
UpdateBy
}}
</p>
<p>
{{
row
.
UpdateDate
}}
</p>
</
template
>
</vxe-table-column>
<vxe-table-column
field=
"address"
title=
"操作"
>
<
template
v-slot=
"{ row }"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑"
placement=
"top"
>
<img
@
click=
"Edit(row)"
style=
"width:24px;height:24px"
src=
"../../assets/img/edit.png"
alt=
""
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"启用"
placement=
"top"
>
<img
v-if=
"row.Enabled==2"
@
click=
"qiyong(row)"
style=
"width:24px;height:24px"
src=
"../../assets/img/qiyong.png"
alt=
""
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"禁用"
placement=
"top"
>
<img
v-if=
"row.Enabled==1"
@
click=
"jinyong(row)"
style=
"width:24px;height:24px"
src=
"../../assets/img/jinyong.png"
alt=
""
>
</el-tooltip>
</
template
>
</vxe-table-column>
</vxe-table>
<el-pagination
@
current-change=
"currentChange"
background
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
</div>
</template>
<
script
>
export
default
{
name
:
'Supplierman'
,
data
(){
return
{
morequery
:
false
,
currentPage
:
1
,
tableData
:
[],
loading
:
false
,
total
:
0
,
msg
:{
pageIndex
:
1
,
pageSize
:
15
,
Name
:
''
,
Contact
:
''
,
Mobile
:
''
,
},
BranchList
:[],
}
},
mounted
(){
this
.
getList
();
this
.
getBranch
();
},
methods
:{
addSupplier
(){
this
.
$router
.
push
({
path
:
"/consumablesManRule"
,
query
:
{
}
});
},
currentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
getBranch
(){
this
.
apiJavaPost
(
"/api/User/GetBranchList"
,{},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
BranchList
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
getList
(){
this
.
loading
=
true
;
this
.
apiJavaPost
(
"/api/Supplies/GetApplyForSetPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
tableData
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
Edit
(
item
){
let
obj
=
{
Id
:
item
.
Id
,
BranchId
:
item
.
BranchId
,
SpecialList
:
item
.
SpecialList
,
WeekdayList
:
item
.
WeekdayList
,
}
let
data
=
JSON
.
stringify
(
obj
);
this
.
$router
.
push
({
path
:
"/consumablesManRule"
,
query
:
{
obj
:
encodeURIComponent
(
data
)
}
});
},
qiyong
(
item
){
let
Id
=
item
.
Id
;
this
.
$confirm
(
"确认启用?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apiJavaPost
(
"/api/Supplies/SetApplyForStatus"
,{
ApplyforId
:
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
getList
();
this
.
Success
(
res
.
data
.
message
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}).
catch
(()
=>
{
this
.
$message
.
info
(
'已取消删除!'
)
});
},
jinyong
(
item
){
let
Id
=
item
.
Id
;
this
.
$confirm
(
"确认禁用?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apiJavaPost
(
"/api/Supplies/SetApplyForStatus"
,{
ApplyforId
:
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
getList
();
this
.
Success
(
res
.
data
.
message
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}).
catch
(()
=>
{
this
.
$message
.
info
(
'已取消删除!'
)
});
},
},
}
</
script
>
<
style
scoped
>
.Supplierman
{
box-sizing
:
border-box
;
}
</
style
>
src/components/Systemman/consumablesManRule.vue
0 → 100644
View file @
df74d72d
<
template
>
<div
class=
"consumablesManRule"
>
<div
class=
"routerTitle basefix"
>
<span
class=
"pageTitle "
>
耗材时间规则
</span>
<span
@
click=
"backTo"
style=
"position:relative;top:-5px"
class=
"backTo"
>
返回
</span>
</div>
<div
class=
"padContent"
>
<div>
<el-select
filterable
size=
"small"
v-model=
"addMsg.BranchId"
placeholder=
"公司"
>
<el-option
label=
"通用"
:value=
"-1"
></el-option>
<el-option
v-for=
"item in BranchList"
:key=
"item.Id"
:label=
"item.BName"
:value=
"item.Id"
>
</el-option>
</el-select>
</div>
<table
class=
"att_table"
cellspacing=
"0"
cellpadding=
"0"
>
<tr>
<th>
工作日
</th>
<th>
开始时间
</th>
<th>
结束时间
</th>
<th>
操作
</th>
</tr>
<tr
v-for=
"(item,index) in WeekdayList"
>
<td>
<el-checkbox
@
change=
'activateOrDisabled(index)'
v-model=
'item.IsCheck'
>
{{
item
.
Weekday
}}
</el-checkbox>
</td>
<td>
<el-time-select
size=
"mini"
v-model=
'item.StartTime'
:picker-options=
"
{start: '08:00',step: '00:05',end: '22:00'}"
:disabled='!item.IsCheck'>
</el-time-select>
</td>
<td>
<el-time-select
size=
"mini"
v-model=
'item.EndTime'
:picker-options=
"
{start: '08:00',step: '00:05',end: '22:00'}"
:disabled='!item.IsCheck'>
</el-time-select>
</td>
<td>
<el-tooltip
v-if=
'index>0'
class=
"item"
effect=
"dark"
content=
"同上"
placement=
"right"
>
<el-button
type=
"primary"
style=
"padding:4px"
icon=
"el-icon-circle-plus-outline"
@
click=
'copyPrev(index)'
circle
></el-button>
</el-tooltip>
</td>
</tr>
</table>
<div
class=
"att_title"
>
特殊日期
<input
class=
"att_addBtn"
type=
"button"
value=
"添加"
@
click=
"addSignIn"
></div>
<table
class=
"att_table"
cellspacing=
"0"
cellpadding=
"0"
>
<tr>
<th>
日期
</th>
<th>
开始时间
</th>
<th>
结束时间
</th>
<th
width=
"80"
>
操作
</th>
</tr>
<tr
v-for=
"(item,index) in SpecialList"
>
<td>
<el-date-picker
:picker-options=
"pickerOptions"
v-model=
"item.Date"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择日期"
>
</el-date-picker>
</td>
<td>
<el-time-select
size=
"mini"
v-model=
'item.StartTime'
:picker-options=
"
{start: '08:00',step: '00:05',end: '22:00'}"
>
</el-time-select>
</td>
<td>
<el-time-select
size=
"mini"
v-model=
'item.EndTime'
:picker-options=
"
{start: '08:00',step: '00:05',end: '22:00'}"
>
</el-time-select>
</td>
<td>
<el-row>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"right"
>
<el-button
style=
"padding:4px"
type=
"danger"
icon=
"el-icon-delete"
@
click=
'deleteSignIn(index)'
circle
></el-button>
</el-tooltip>
</el-row>
</td>
</tr>
<tr
v-if=
"SpecialList.length==0"
>
<td
colspan=
"6"
>
暂无数据
</td>
</tr>
</table>
<p>
<span
@
click=
"SaveRule"
style=
"margin-left:20px"
class=
"chaxunSpan"
>
保存
</span>
</p>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'Supplierman'
,
data
(){
return
{
addMsg
:{
BranchId
:
-
1
,
Id
:
0
,
WeekdayList
:[],
SpecialList
:[],
},
BranchList
:[],
WeekdayList
:
[
{
'IsCheck'
:
false
,
"Weekday"
:
"周一"
,
"StartTime"
:
""
,
"EndTime"
:
""
},
{
'IsCheck'
:
false
,
"Weekday"
:
"周二"
,
"StartTime"
:
""
,
"EndTime"
:
""
},
{
'IsCheck'
:
false
,
"Weekday"
:
"周三"
,
"StartTime"
:
""
,
"EndTime"
:
""
},
{
'IsCheck'
:
false
,
"Weekday"
:
"周四"
,
"StartTime"
:
""
,
"EndTime"
:
""
},
{
'IsCheck'
:
false
,
"Weekday"
:
"周五"
,
"StartTime"
:
""
,
"EndTime"
:
""
},
{
'IsCheck'
:
false
,
"Weekday"
:
"周六"
,
"StartTime"
:
""
,
"EndTime"
:
""
},
{
'IsCheck'
:
false
,
"Weekday"
:
"周日"
,
"StartTime"
:
""
,
"EndTime"
:
""
},
],
SpecialList
:
[],
saveBtnType
:
false
,
newSignIn
:{},
SpecialDates
:
[],
signDateType
:
0
,
saveBtnType
:
1
,
outerVisible
:
false
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
<
Date
.
now
()
-
8.64e7
;
}
},
}
},
created
(){
if
(
this
.
$route
.
query
.
obj
){
//
let
obj
=
JSON
.
parse
(
decodeURIComponent
(
this
.
$route
.
query
.
obj
))
this
.
addMsg
.
Id
=
obj
.
Id
;
this
.
addMsg
.
BranchId
=
obj
.
BranchId
;
this
.
SpecialList
=
obj
.
SpecialList
;
obj
.
WeekdayList
.
forEach
(
x
=>
{
this
.
WeekdayList
.
forEach
(
y
=>
{
if
(
x
.
Weekday
==
y
.
Weekday
){
y
.
IsCheck
=
true
;
y
.
Id
=
x
.
Id
;
y
.
StartTime
=
x
.
StartTime
;
y
.
EndTime
=
x
.
EndTime
;
}
});
});
}
},
mounted
(){
this
.
getList
();
this
.
getBranch
();
},
methods
:{
backTo
(){
this
.
$router
.
push
({
path
:
"/consumablesMan"
,
query
:
{
}
});
},
SaveRule
(){
let
WeekdayList
=
this
.
WeekdayList
;
let
SpecialList
=
this
.
SpecialList
;
this
.
addMsg
.
WeekdayList
=
[];
for
(
let
i
=
0
;
i
<
WeekdayList
.
length
;
i
++
){
if
(
WeekdayList
[
i
].
IsCheck
){
if
(
!
WeekdayList
[
i
].
EndTime
||
WeekdayList
[
i
].
EndTime
==
''
||
!
WeekdayList
[
i
].
StartTime
||
WeekdayList
[
i
].
StartTime
==
''
){
this
.
Error
(
`
${
WeekdayList
[
i
].
Weekday
}
的开始时间或结束时间为空`
)
return
;
}
else
{
let
obj
=
{
Id
:
WeekdayList
[
i
].
Id
,
EndTime
:
WeekdayList
[
i
].
EndTime
,
StartTime
:
WeekdayList
[
i
].
StartTime
,
Weekday
:
WeekdayList
[
i
].
Weekday
,
};
this
.
addMsg
.
WeekdayList
.
push
(
obj
);
}
}
}
for
(
let
i
=
0
;
i
<
SpecialList
.
length
;
i
++
){
if
(
!
SpecialList
[
i
].
Date
||
SpecialList
[
i
].
Date
==
''
||
!
SpecialList
[
i
].
EndTime
||
SpecialList
[
i
].
EndTime
==
''
||
!
SpecialList
[
i
].
StartTime
||
SpecialList
[
i
].
StartTime
==
''
){
this
.
Error
(
`特殊日期的第
${
i
+
1
}
项信息未填写完整!`
)
return
;
}
else
{
let
obj
=
{
Id
:
SpecialList
[
i
].
Id
,
EndTime
:
SpecialList
[
i
].
EndTime
,
StartTime
:
SpecialList
[
i
].
StartTime
,
Date
:
SpecialList
[
i
].
Date
,
};
this
.
addMsg
.
SpecialList
.
push
(
obj
);
}
}
this
.
apiJavaPost
(
"/api/Supplies/SetApplyForInfo"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
$router
.
push
({
path
:
"/consumablesMan"
,
query
:
{
}
});
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
copyPrev
(
index
)
{
if
(
this
.
WeekdayList
[
index
].
IsCheck
==
true
)
{
this
.
WeekdayList
[
index
].
StartTime
=
this
.
WeekdayList
[
index
-
1
].
StartTime
;
this
.
WeekdayList
[
index
].
EndTime
=
this
.
WeekdayList
[
index
-
1
].
EndTime
;
}
},
saveSignIn
(){
},
activateOrDisabled
(
index
)
{
if
(
this
.
WeekdayList
[
index
].
IsCheck
==
false
)
{
this
.
WeekdayList
[
index
].
StartTime
=
''
;
this
.
WeekdayList
[
index
].
EndTime
=
''
;
}
},
deleteSignIn
(
index
)
{
this
.
$confirm
(
'是否删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
});
this
.
SpecialList
.
splice
(
index
,
1
)
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
});
});
},
addSignIn
()
{
let
obj
=
{
Id
:
0
,
Date
:
''
,
StartTime
:
''
,
EndTime
:
''
,
};
this
.
SpecialList
.
push
(
obj
)
},
currentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
getBranch
(){
this
.
apiJavaPost
(
"/api/User/GetBranchList"
,{},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
BranchList
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
getList
(){
this
.
loading
=
true
;
this
.
apiJavaPost
(
"/api/Supplies/GetApplyForSetPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
tableData
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
},
Edit
(
item
){
this
.
dialogtitle
=
"编辑"
;
this
.
dialogState
=
true
;
this
.
addMsg
=
{
Id
:
item
.
Id
,
Name
:
item
.
Name
,
Contact
:
item
.
Contact
,
Mobile
:
item
.
Mobile
,
}
},
Delete
(
item
){
let
Id
=
item
.
Id
;
this
.
$confirm
(
"确认删除该供应商?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
'warning'
}).
then
(()
=>
{
this
.
apiJavaPost
(
"/api/property/DelSupplierInfo"
,{
SupplierId
:
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
getList
();
this
.
Success
(
res
.
data
.
message
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
}).
catch
(()
=>
{
this
.
$message
.
info
(
'已取消删除!'
)
});
},
},
}
</
script
>
<
style
>
.consumablesManRule
.el-input.is-disabled
.el-input__inner
{
border-color
:
#E4E7ED
!important
;
}
.consumablesManRule
.ruleTable
tr
td
{
padding-bottom
:
15px
;
}
.consumablesManRule
.ruleTable
span
{
display
:
inline-block
;
width
:
80px
;
}
.consumablesManRule
.att_table
{
width
:
800px
;
border
:
none
;
text-align
:
center
;
font-size
:
12px
;
margin
:
20px
0
;
background
:
#fff
;
}
.consumablesManRule
.att_table
tr
{
height
:
38px
;
text-align
:
center
;
}
.consumablesManRule
.att_table
tr
th
:first-child
{
border-radius
:
4px
0
0
0
;
}
.consumablesManRule
.att_table
tr
th
:last-child
{
border-radius
:
0
4px
0
0
;
}
.consumablesManRule
.att_table
tr
th
{
background
:
#EAEAEA
;
color
:
#333
;
}
.consumablesManRule
.consumablesManRule
.att_table
tr
td
{
background
:
#fff
;
}
.consumablesManRule
.att_table
tr
td
.el-date-editor.el-input
{
width
:
150px
;
height
:
28px
;
}
.consumablesManRule
.att_table
tr
td
.el-input--prefix
.el-input__inner
{
padding-left
:
30px
;
height
:
28px
;
}
.consumablesManRule
.att_table
tr
td
.el-input--prefix
.el-input__icon
{
line-height
:
28px
;
}
.consumablesManRule
.att_special_dates
{
font-size
:
12px
;
color
:
#666
;
text-indent
:
30px
;
height
:
50px
;
}
.consumablesManRule
.att_addBtn
{
width
:
90px
;
height
:
30px
;
border
:
1px
solid
#DCDFE6
;
background
:
#fff
;
margin
:
20px
0
;
border-radius
:
15px
;
margin-left
:
30px
;
cursor
:
pointer
;
}
.consumablesManRule
.att_addBtn
:hover
{
box-shadow
:
2px
2px
1px
rgba
(
0
,
0
,
0
,
.1
)
}
</
style
>
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