Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
96bc2e82
Commit
96bc2e82
authored
Apr 23, 2020
by
樊国敬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tanant
parent
daba7204
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
354 additions
and
4 deletions
+354
-4
api.js
pages/system/tanant/api.js
+11
-0
index.vue
pages/system/tanant/index.vue
+105
-4
menuset.vue
pages/system/tanant/menuset.vue
+238
-0
No files found.
pages/system/tanant/api.js
View file @
96bc2e82
...
...
@@ -26,4 +26,15 @@ export default {
return
Api
.
post
(
`
${
authUrl
}
/api/services/app/tanant/tanantinit`
,
params
);
},
setMenu
(
params
)
{
return
Api
.
post
(
`
${
system
}
/setmenucompany/create`
,
params
);
},
setAps
(
params
){
return
Api
.
post
(
`
${
system
}
/setschedulecompany/create`
,
params
);
},
apsList
(
params
){
return
Api
.
post
(
`
${
system
}
/setschedulecompany/list`
,
params
);
}
}
\ No newline at end of file
pages/system/tanant/index.vue
View file @
96bc2e82
...
...
@@ -21,7 +21,7 @@
<Modal
v-model=
"addModal"
title=
"新增"
footer-hide
>
<Add
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
>
<Modal
v-model=
"editModal"
title=
"编辑"
footer-hide
>
<Edit
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"detailModal"
title=
"详情"
>
...
...
@@ -30,6 +30,21 @@
<Modal
v-model=
"datadetailModal"
title=
"数据源详情"
>
<dataDetail
:eid=
"datacurId"
/>
</Modal>
<Modal
v-model=
"setModal"
title=
"套餐配置"
footer-hide
width=
'830'
>
<menuSet
:companyId=
"curId"
@
set-ok=
"setOk"
/>
</Modal>
<Modal
v-model=
"apsModal"
title=
"APS配置"
footer-hide
>
<div
style=
"height:150px"
>
<CheckboxGroup
v-model=
"aps"
@
on-change=
"getSelects"
>
<Checkbox
label=
'1'
>
APS排产
</Checkbox>
<Checkbox
label=
'2'
>
整机排产
</Checkbox>
<Checkbox
label=
'3'
>
流水排产
</Checkbox>
</CheckboxGroup>
<div
style=
"text-align:center;margin-top:44px"
><Button
type=
"primary"
@
click=
"saveAps"
:disabled=
"disabled"
>
保存
</Button></div>
</div>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
</Modal>
...
...
@@ -42,6 +57,7 @@ import Edit from './edit'
import
Detail
from
'./detail'
import
Search
from
'./search'
import
dataDetail
from
'../data_source/detail'
import
menuSet
from
'./menuset'
export
default
{
name
:
'list'
,
components
:
{
...
...
@@ -49,7 +65,8 @@ export default {
Edit
,
Detail
,
Search
,
dataDetail
dataDetail
,
menuSet
},
data
()
{
return
{
...
...
@@ -60,11 +77,14 @@ export default {
addModal
:
false
,
editModal
:
false
,
detailModal
:
false
,
setModal
:
false
,
apsModal
:
false
,
deletelModal
:
false
,
datadetailModal
:
false
,
curId
:
0
,
datacurId
:
0
,
aps
:[],
disabled
:
false
,
columns
:
[
// { key: 'id', title: this.l('id'), hide: true, align: 'left' },
{
...
...
@@ -173,7 +193,42 @@ export default {
hide
:
true
,
align
:
'left'
},
{
title
:
'套餐配置'
,
key
:
'id'
,
width
:
100
,
align
:
'center'
,
render
:(
h
,
params
)
=>
{
return
h
(
'div'
,{
class
:
'action'
},[
h
(
'op'
,
{
//attrs: { oprate: 'detail' },
on
:
{
click
:
()
=>
this
.
set
(
params
.
row
.
id
)
}
},
'配置'
)
])
}
},
{
title
:
'APS配置'
,
key
:
'id'
,
width
:
100
,
align
:
'center'
,
render
:(
h
,
params
)
=>
{
return
h
(
'div'
,{
class
:
'action'
},[
h
(
'op'
,
{
//attrs: { oprate: 'detail' },
on
:
{
click
:
()
=>
this
.
setAps
(
params
.
row
.
id
)
}
},
'配置'
)
])
}
},
{
title
:
'操作'
,
key
:
'id'
,
...
...
@@ -239,6 +294,36 @@ export default {
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:
{
saveAps
(){
if
(
this
.
aps
.
length
==
0
){
return
;
}
var
a
=
{}
a
.
companyId
=
this
.
curId
a
.
apsScheduleIds
=
this
.
aps
this
.
disabled
=
true
Api
.
setAps
(
a
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$refs
.
grid
.
load
()
this
.
apsModal
=
false
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
}
this
.
disabled
=
false
})
},
getAps
(
id
){
Api
.
apsList
({
id
:
id
}).
then
(
r
=>
{
var
d
=
r
.
result
;
console
.
log
(
d
)
this
.
aps
=
d
.
map
(
item
=>
{
return
item
.
apsScheduleId
+
''
})
})
},
getSelects
(
data
){
// console.log(data)
this
.
aps
=
data
},
addOk
()
{
this
.
$refs
.
grid
.
load
()
this
.
addModal
=
false
...
...
@@ -249,6 +334,22 @@ export default {
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
set
(
id
){
this
.
setModal
=
true
this
.
curId
=
id
},
setAps
(
id
){
this
.
aps
=
[]
this
.
disabled
=
false
this
.
apsModal
=
true
this
.
curId
=
id
this
.
getAps
(
id
)
},
setOk
(){
this
.
$refs
.
grid
.
load
()
this
.
setModal
=
false
this
.
curId
=
0
},
detail
(
id
)
{
this
.
detailModal
=
true
this
.
curId
=
id
...
...
pages/system/tanant/menuset.vue
0 → 100644
View file @
96bc2e82
<
template
>
<div
style=
"width:800px;"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:data=
"list"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入关键字套餐名称/备注"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"set()"
:disabled=
"disabled"
>
保存
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"detailModal"
title=
"详情"
>
<Detail
:eid=
"curId"
/>
</Modal>
</div>
</template>
<
script
>
import
Api1
from
"./api"
;
import
Api
from
"../set_menu/api"
;
import
Detail
from
"../set_menu/detail"
;
import
Search
from
"../set_menu/search"
;
import
api
from
"../account/api"
;
export
default
{
name
:
"menuSet"
,
components
:
{
Detail
,
Search
},
data
()
{
return
{
action
:
""
,
easySearch
:
{
keys
:
{
op
:
"title,remark"
,
value
:
null
}
},
disabled
:
false
,
detailModal
:
false
,
list
:
[],
curId
:
0
,
currentChoose
:
0
,
columns
:
[
//{ key:"id",title:this.l("id") ,hide:true ,align:"left" },
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"lastModificationTime"
,
title
:
this
.
l
(
"lastModificationTime"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
l
(
"lastModifierUserId"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"isDeleted"
,
title
:
this
.
l
(
"isDeleted"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"deletionTime"
,
title
:
this
.
l
(
"deletionTime"
),
hide
:
true
,
align
:
"left"
},
// { key: "checked", hide: true, align: "left" },
{
key
:
"deleterUserId"
,
title
:
this
.
l
(
"deleterUserId"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"id"
,
title
:
""
,
width
:
70
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
let
self
=
this
;
let
id
=
params
.
row
.
id
;
// let cid=params.row.checkedId
let
flag
=
false
;
if
(
self
.
currentChoose
===
id
)
{
flag
=
true
;
}
else
{
flag
=
false
;
}
return
h
(
"div"
,
[
h
(
"Radio"
,
{
props
:
{
value
:
flag
},
on
:
{
"on-change"
:
()
=>
{
// var ra=
self
.
currentChoose
=
id
;
}
}
})
]);
}
},
{
key
:
"title"
,
title
:
this
.
l
(
"title"
),
align
:
"center"
,
easy
:
true
,
high
:
true
,
width
:
240
},
// { key:"remark",title:this.l("remark") ,align:"left" ,easy:true ,high:true },
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
high
:
true
,
width
:
140
,
code
:
"crm.customer.status"
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"center"
,
width
:
200
},
{
title
:
"操作"
,
key
:
"id"
,
width
:
140
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
detail
(
params
.
row
.
id
)
}
},
"查看"
)
]);
}
}
]
};
},
props
:
{
v
:
Object
,
companyId
:
Number
},
mounted
()
{
console
.
log
(
this
.
action
);
},
methods
:
{
//保存公司的套餐配置
set
(
id
)
{
if
(
this
.
currentChoose
==
0
)
{
return
;
}
id
=
this
.
companyId
;
var
a
=
{};
(
a
.
companyId
=
id
),
(
a
.
setId
=
this
.
currentChoose
);
this
.
disabled
=
true
;
Api1
.
setMenu
(
a
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
currentChoose
=
0
;
this
.
disabled
=
false
;
this
.
$emit
(
"set-ok"
);
}
});
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
detail
(
id
)
{
this
.
detailModal
=
true
;
this
.
curId
=
id
;
},
getAll
()
{
let
params
=
{
pageIndex
:
1
,
pageSize
:
20
,
conditions
:
[],
type
:
this
.
companyId
};
Api
.
paged
(
params
).
then
(
r
=>
{
this
.
list
=
r
.
result
.
items
;
});
},
l
(
key
)
{
/*
set_menu:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'套餐名称',
remark:'备注',
status:'状态',
}
*/
let
vkey
=
"set_menu"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
}
},
watch
:
{
// v() {
// this.entity = this.$u.clone(this.v)
// },
companyId
()
{
this
.
getAll
();
}
}
};
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
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