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
a3c44ec6
Commit
a3c44ec6
authored
Jun 17, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料新增修改
parent
2f698d8d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
32 deletions
+44
-32
add.vue
pages/materiel/masterData/add.vue
+44
-32
No files found.
pages/materiel/masterData/add.vue
View file @
a3c44ec6
...
...
@@ -6,7 +6,7 @@
<FormItem
label=
"编码"
prop=
"code"
>
<Input
v-model=
"entity.code"
placeholder=
"请输入"
disabled
></Input>
</FormItem>
</Col>
-->
</Col>
-->
<Col
:span=
"12"
>
<FormItem
label=
"名称"
prop=
"name"
>
<Input
v-model=
"entity.name"
placeholder=
"请输入"
></Input>
...
...
@@ -22,7 +22,7 @@
:key=
"entity.status"
></Dictionary>
</FormItem>
</Col>
-->
</Col>
-->
<Col
:span=
"12"
>
<FormItem
label=
"版本"
prop=
"version"
>
<Input
v-model=
"entity.version"
placeholder=
"请输入"
></Input>
...
...
@@ -33,28 +33,36 @@
<Input
v-model=
"entity.description"
type=
"textarea"
placeholder=
"请输入..."
></Input>
</FormItem>
</Col>
</Row>
<div>
<
h4>
扩展属性
</h4
>
<
Divider
orientation=
"left"
>
扩展属性
</Divider
>
</div>
<Row>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title"
:prop=
"li.name"
>
<Input
v-if=
"li.dataType==0"
v-model=
"entity[li.field]"
></Input>
<InputNumber
v-if=
"li.dataType==1||li.dataType==2"
v-model=
"entity[li.field]"
class=
"w100"
></InputNumber>
<Input
v-if=
"li.dataType==0"
v-model=
"entity[li.field]"
></Input>
<InputNumber
v-if=
"li.dataType==1||li.dataType==2"
v-model=
"entity[li.field]"
class=
"w100"
></InputNumber>
<Dictionary
v-if=
"li.dataType==3"
v-model=
"entity[li.field]"
:code=
"li.note"
></Dictionary>
<Input
v-if=
"li.dataType==4"
v-model=
"entity[li.filed]"
></Input>
<DatePicker
v-if=
"li.dataType==5"
v-model=
"entity[li.field]"
type=
"date"
:placeholder=
"'选择'+li.title"
></DatePicker>
<InputFile
v-if=
"li.dataType==6"
v-model=
"entity[li.field]"
></InputFile>
<Input
v-if=
"li.dataType==4"
v-model=
"entity[li.filed]"
></Input>
<DatePicker
v-if=
"li.dataType==5"
v-model=
"entity[li.field]"
type=
"date"
:placeholder=
"'选择'+li.title"
></DatePicker>
<InputFile
v-if=
"li.dataType==6"
v-model=
"entity[li.field]"
></InputFile>
<!--
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:Photos=
"true"
@
clickItem=
"clickData"
/>
-->
<InputFile
v-if=
"li.dataType==7"
v-model=
"entity[li.field]"
></InputFile>
<Input
v-if=
"li.dataType==8"
type=
"textarea"
v-model=
"entity[li.field]"
></Input>
<InputFile
v-if=
"li.dataType==7"
v-model=
"entity[li.field]"
></InputFile>
<Input
v-if=
"li.dataType==8"
type=
"textarea"
v-model=
"entity[li.field]"
></Input>
</FormItem>
</Col>
<!--
<Col
:span=
"24"
>
<div
v-html=
"entity"
></div>
</Col>
-->
</Col>
-->
<Col
:span=
"24"
style=
"text-align: right;"
>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
...
...
@@ -75,7 +83,7 @@ export default {
entity
:
{
code
:
0
,
status
:
0
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
customProperties
:
{},
rootCategoryId
:
this
.
nodeInfo
.
rootCategoryId
//左侧树点击的数据的最顶层id
...
...
@@ -85,7 +93,7 @@ export default {
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}]
},
fileds
:
[]
//扩展属性
fileds
:
[]
//扩展属性
};
},
async
fetch
({
store
,
params
})
{
...
...
@@ -104,24 +112,28 @@ export default {
}
];
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
'id'
,
isDesc
:
false
}).
then
(
r
=>
{
Api
.
listTable
({
conditions
:
conditions
,
sortBy
:
"id"
,
isDesc
:
false
}).
then
(
r
=>
{
if
(
r
.
result
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
12
;
if
(
item
.
dataType
>
4
)
{
item
.
span
=
24
item
.
span
=
12
;
if
(
item
.
dataType
>
4
)
{
item
.
span
=
24
;
}
delete
item
[
"id"
];
return
item
.
fieldType
!=
1
;
return
item
.
fieldType
!=
1
;
});
this
.
fileds
.
map
(
u
=>
{
let
v
=
''
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
this
.
fileds
.
map
(
u
=>
{
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
}
// this.$set(this.entity.customProperties,u.filed,v)
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
)
})
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
);
})
;
}
});
},
...
...
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