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
aaf595d3
Commit
aaf595d3
authored
Apr 20, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排产资源页面
parent
07ec32b7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
352 additions
and
8 deletions
+352
-8
zh-CN.js
i18n/locale/zh-CN.js
+24
-8
add.vue
pages/resourceManagement/productionResources/add.vue
+76
-0
api.js
pages/resourceManagement/productionResources/api.js
+21
-0
index.vue
pages/resourceManagement/productionResources/index.vue
+231
-0
No files found.
i18n/locale/zh-CN.js
View file @
aaf595d3
...
@@ -924,14 +924,14 @@ export default {
...
@@ -924,14 +924,14 @@ export default {
demandStartDate
:
'投料时间'
,
demandStartDate
:
'投料时间'
,
demandFinishDate
:
'节点时间'
,
demandFinishDate
:
'节点时间'
,
//tempTitle------
//tempTitle------
stage
:
'阶段'
,
stage
:
'阶段'
,
materialId
:
'材料'
,
materialId
:
'材料'
,
routing_Method
:
'工艺方法'
,
routing_Method
:
'工艺方法'
,
outer_Envelope_Size
:
'外包络尺寸'
,
outer_Envelope_Size
:
'外包络尺寸'
,
guestName
:
'甲方客户'
,
guestName
:
'甲方客户'
,
taskCode
:
'甲方任务号'
,
taskCode
:
'甲方任务号'
,
putintDocmentCode
:
'甲方投产输入文件(编号)'
,
putintDocmentCode
:
'甲方投产输入文件(编号)'
,
technologyDocmentCode
:
'甲方技术输入文件(编号)'
,
technologyDocmentCode
:
'甲方技术输入文件(编号)'
,
},
},
mes_part_task_plan_simulate
:
{
mes_part_task_plan_simulate
:
{
id
:
''
,
id
:
''
,
...
@@ -1259,5 +1259,21 @@ export default {
...
@@ -1259,5 +1259,21 @@ export default {
productionRequirement
:
'生产要求'
,
productionRequirement
:
'生产要求'
,
standard
:
'标准指标'
,
standard
:
'标准指标'
,
qualityTemplateName
:
'模板文件名称'
,
qualityTemplateName
:
'模板文件名称'
,
},
plan_resource
:
{
id
:
''
,
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
lastModifierUserId
:
'更新人'
,
isDeleted
:
'删除人'
,
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
title
:
'资源名称'
,
code
:
'资源编号'
,
type
:
'资源类型'
,
property
:
'属性'
,
departId
:
'部门id'
,
departTitle
:
'部门'
,
}
}
}
}
pages/resourceManagement/productionResources/add.vue
0 → 100644
View file @
aaf595d3
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"entity.code"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Input
v-model=
"entity.type"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('property')"
prop=
"property"
>
<InputNumber
v-model=
"entity.property"
></InputNumber>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('departId')"
prop=
"departId"
>
<InputNumber
v-model=
"entity.departId"
></InputNumber>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('departTitle')"
prop=
"departTitle"
>
<Input
v-model=
"entity.departTitle"
>
</Input>
</FormItem></Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
disabled
:
false
,
entity
:
{
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
},
props
:
{
v
:
Object
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
).
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
"plan_resource"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
}
}
}
</
script
>
\ No newline at end of file
pages/resourceManagement/productionResources/api.js
0 → 100644
View file @
aaf595d3
// import Api from '@/api/axios'
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
resourceUrl
}
planresource/paged`
,
paged
(
params
){
return
Api
.
post
(
`
${
resourceUrl
}
planresource/paged`
,
params
);
},
get
(
params
){
return
Api
.
get
(
`
${
resourceUrl
}
planresource/get`
,
params
);
},
create
(
params
){
return
Api
.
post
(
`
${
resourceUrl
}
planresource/create`
,
params
);
},
update
(
params
){
return
Api
.
post
(
`
${
resourceUrl
}
planresource/update`
,
params
);
},
//删除:
delete
(
params
)
{
return
Api
.
delete
(
`
${
resourceUrl
}
planresource/delete`
,{
params
:
params
});
},
}
\ No newline at end of file
pages/resourceManagement/productionResources/index.vue
0 → 100644
View file @
aaf595d3
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
>
<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=
"addModal=true"
>
新增
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"addModal"
title=
"新增"
footer-hide
>
<Add
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
</Modal>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
import
Add
from
"./add"
;
export
default
{
name
:
"list"
,
components
:
{
Add
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"title,code,type,departTitle"
,
value
:
null
}
},
deletelModal
:
false
,
curId
:
0
,
columns
:
[
{
key
:
"id"
,
title
:
this
.
l
(
"id"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
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
:
"deleterUserId"
,
title
:
this
.
l
(
"deleterUserId"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"title"
,
title
:
this
.
l
(
"title"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"code"
,
title
:
this
.
l
(
"code"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"type"
,
title
:
this
.
l
(
"type"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"property"
,
title
:
this
.
l
(
"property"
),
align
:
"left"
,
high
:
true
},
{
key
:
"departId"
,
title
:
this
.
l
(
"departId"
),
align
:
"left"
,
high
:
true
},
{
key
:
"departTitle"
,
title
:
this
.
l
(
"departTitle"
),
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
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
)
}
},
"查看"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
"编辑"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"remove"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
"删除"
)
]);
}
}
]
};
},
mounted
()
{
console
.
log
(
this
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
addOk
()
{
this
.
$refs
.
grid
.
load
();
this
.
addModal
=
false
;
this
.
curId
=
0
;
},
remove
(
id
)
{
this
.
deletelModal
=
true
;
this
.
curId
=
id
;
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
deletelModal
=
false
;
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
removeCancel
()
{
this
.
deletelModal
=
false
;
},
cancel
()
{
this
.
curId
=
0
;
this
.
addModal
=
false
;
this
.
deletedlModal
=
false
;
},
l
(
key
)
{
/*
plan_resource:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'资源名称',
code:'资源编号',
type:'资源类型',
property:'属性',
departId:'部门id',
departTitle:'部门',
}
*/
let
vkey
=
"plan_resource"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
}
}
};
</
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