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
6c0d33a8
Commit
6c0d33a8
authored
May 08, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料管理分类新增
parent
8ba6f75a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
155 additions
and
8 deletions
+155
-8
add.vue
pages/materiel/classification/add.vue
+115
-4
index.vue
pages/materiel/classification/index.vue
+40
-4
No files found.
pages/materiel/classification/add.vue
View file @
6c0d33a8
<
template
>
<
template
>
<div>
<div>
<Button
type=
"dashed"
>
新增
</Button>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
</div>
<Row>
</
template
>
<Col
:span=
"12"
>
\ No newline at end of file
<FormItem
label=
"编码"
prop=
"userUnit"
>
<Input
v-model=
"entity.userUnit"
placeholder=
"请输入"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"名称"
prop=
"taskBased"
>
<Input
v-model=
"entity.taskBased"
placeholder=
"请输入"
></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"状态"
prop=
"productName"
placeholder=
"请选择"
>
<Select
v-model=
"entity.productName"
style=
"width:200px"
>
<Option
value=
"0"
>
New York
</Option>
<Option
value=
"1"
disabled
>
London
</Option>
<Option
value=
"2"
>
Sydney
</Option>
</Select>
</FormItem>
</Col>
<Col
:span=
"24"
>
<FormItem
label=
"描述"
prop=
"productName"
>
<Input
v-model=
"entity.productName"
type=
"textarea"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
<Col
:span=
"24"
>
<h4>
属性配置
</h4>
</Col>
<Col
:span=
"24"
style=
"padding:20px 0 0px 10px;margin-bottom:10px;"
class=
"table-solt"
>
<Table
border
:columns=
"columns"
:data=
"checkList"
class=
"tableCommon"
>
<template
slot-scope=
"
{ row, index }" slot="name">
<Input
v-model=
"row.name"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"require"
>
<Input
v-model=
"row.require"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"result"
>
<Input
v-model=
"row.result"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"pash"
>
<inputFile
v-model=
"row.file"
:files=
"true"
:parms=
"getParams(row.fileId)"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"remark"
>
<Input
v-model=
"row.remark"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
</
template
>
</Table>
</Col>
<Col
:span=
"24"
style=
"margin-bottom:20px;"
>
<Button
type=
"primary"
long
@
click=
"addNew"
class=
"mt10"
>
添加
</Button>
</Col>
<Col
:span=
"24"
style=
"text-align: right;"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Col>
</Row>
</Form>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
entity
:
{},
disabled
:
false
,
columns
:
[
{
title
:
"序号"
,
type
:
"index"
,
width
:
80
,
align
:
"center"
},
{
title
:
"检验项目"
,
key
:
"name"
,
align
:
"center"
,
slot
:
"name"
},
{
title
:
"要求"
,
key
:
"require"
,
align
:
"center"
,
slot
:
"require"
},
{
title
:
"预测结果"
,
key
:
"result"
,
align
:
"center"
,
slot
:
"result"
}
],
checkList
:
[],
rules
:
{
businessName
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
businessCode
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
}
};
},
methods
:
{
setRow
()
{
this
.
checkList
=
r
.
result
;
},
addNew
()
{},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{});
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
}
}
};
</
script
>
pages/materiel/classification/index.vue
View file @
6c0d33a8
<
template
>
<
template
>
<div>
<div
class=
"classification"
>
<Button
type=
"dashed"
>
新增
</Button>
<Button
type=
"dashed"
@
click=
"add"
>
新增
</Button>
</div>
<Modal
v-model=
"addModal"
title=
"新增"
footer-hide
width=
'1000'
>
</
template
>
<Add
@
on-close=
"cancel"
@
on-ok=
"addOk"
ref=
"add"
/>
\ No newline at end of file
</Modal>
</div>
</
template
>
<
script
>
import
Add
from
"./add"
;
export
default
{
components
:
{
Add
},
data
()
{
return
{
addModal
:
false
};
},
methods
:
{
add
()
{
this
.
addModal
=
true
;
},
remove
(){
},
addOk
()
{
this
.
addModal
=
false
;
},
cancel
()
{
this
.
addModal
=
false
;
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.classification {
width: 100%;
height: 100%;
}
</
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