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
d7c7ed19
Commit
d7c7ed19
authored
Jun 16, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料加单位字段
parent
0044e078
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
74 deletions
+92
-74
add.vue
pages/materiel/classification/add.vue
+75
-57
index.vue
pages/materiel/classification/index.vue
+1
-0
index.vue
pages/materiel/masterData/index.vue
+16
-17
No files found.
pages/materiel/classification/add.vue
View file @
d7c7ed19
...
...
@@ -29,56 +29,70 @@
</FormItem>
</Col>
<Col
:span=
"24"
>
<h4>
扩展属性
</h4>
<Table
border
:columns=
"columns"
:data=
"checkList"
height=
"300"
>
<template
slot-scope=
"
{ row, index }" slot="title">
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<Input
v-if=
"row.fieldType==3"
v-model=
"row.title"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<div
v-if=
"row.fieldType==1"
>
{{
row
.
note
}}
</div>
<Input
v-model=
"row.note"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
v-else
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<state
v-if=
"row.fieldType==1"
code=
"materail.category.dataType"
:value=
"row.dataType"
type=
"text"
></state>
<Dictionary
v-else
@
on-change=
"setRow(row,index)"
v-model=
"row.dataType"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
</
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=
"required"
>
<Checkbox
v-model=
"row.required"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"isUnique"
>
<Checkbox
v-model=
"row.isUnique"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"action"
v-if=
"row.fieldType==2||row.fieldType==3"
>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
</
template
>
</Table>
<Button
type=
"dashed"
long
@
click=
"addNew"
class=
"mt10"
>
新增属性
</Button>
<h4>
扩展属性
</h4>
<Table
border
:columns=
"columns"
:data=
"checkList"
height=
"300"
>
<template
slot-scope=
"
{ row, index }" slot="title">
<div
v-if=
"row.fieldType==1||row.fieldType==2"
>
{{
row
.
title
}}
</div>
<Input
v-if=
"row.fieldType==3"
v-model=
"row.title"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"note"
>
<div
v-if=
"row.fieldType==1"
>
{{
row
.
note
}}
</div>
<Input
v-model=
"row.note"
placeholder=
"请输入"
@
on-blur=
"setRow(row,index)"
v-else
/>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<state
v-if=
"row.fieldType==1"
code=
"materail.category.dataType"
:value=
"row.dataType"
type=
"text"
></state>
<Dictionary
v-else
@
on-change=
"setRow(row,index)"
v-model=
"row.dataType"
code=
"materail.category.dataType"
type=
"select"
:value=
"row.dataType"
:key=
"row.dataType"
></Dictionary>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"dataType"
>
<!--
<state
v-if=
"row.fieldType==1"
code=
"materail.main.company"
:value=
"row.company"
type=
"text"
></state>
-->
<Dictionary
@
on-change=
"setRow(row,index)"
v-model=
"row.company"
code=
"materail.main.company"
type=
"select"
:value=
"row.company"
:key=
"row.company"
></Dictionary>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"required"
>
<Checkbox
v-model=
"row.required"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"isUnique"
>
<Checkbox
v-model=
"row.isUnique"
@
on-change=
"setRow(row,index)"
></Checkbox>
</
template
>
<
template
slot-scope=
"{ row, index }"
slot=
"action"
v-if=
"row.fieldType==2||row.fieldType==3"
>
<a
@
click=
"remove(index,row)"
style=
"color:#FF7A8B"
>
删除
</a>
</
template
>
</Table>
<Button
type=
"dashed"
long
@
click=
"addNew"
class=
"mt10"
>
新增属性
</Button>
</Col>
<Col
:span=
"24"
class=
"tr mt10"
>
<FormItem>
...
...
@@ -129,12 +143,12 @@ export default {
align
:
"center"
,
slot
:
"dataType"
},
//
{
// title: "是否显示
",
// key: "result
",
//
align: "center",
// slot: "result
"
//
},
{
title
:
"单位
"
,
key
:
"company
"
,
align
:
"center"
,
slot
:
"company
"
},
{
title
:
"是否必填"
,
key
:
"required"
,
...
...
@@ -181,7 +195,11 @@ 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
)
{
var
arr
=
r
.
result
;
this
.
checkList
=
arr
.
filter
(
function
(
item
)
{
...
...
pages/materiel/classification/index.vue
View file @
d7c7ed19
...
...
@@ -122,6 +122,7 @@ export default {
methods
:
{
clickItem
(
val
)
{
this
.
nodeInfo
.
codeRuleId
=
val
;
this
.
model8
=
val
;
this
.
loadTree
(
this
.
nodeInfo
.
codeRuleId
);
this
.
cityList
.
forEach
(
e
=>
{
if
(
val
==
e
.
id
)
{
...
...
pages/materiel/masterData/index.vue
View file @
d7c7ed19
...
...
@@ -7,8 +7,8 @@
<!--
<Select
v-model=
"model8"
clearable
style=
"width:130px;float:left;margin-top:8px"
@
on-change=
'chnangeClick'
placeholder=
"请选择类型"
>
<Option
v-for=
"item in cityList"
:value=
"item.id"
:key=
"item.id"
>
{{
item
.
name
}}
</Option>
</Select>
</Select>
-->
<Dropdown
@
on-click=
"clickItem"
>
</Select>
-->
<Dropdown
@
on-click=
"clickItem"
>
<a
href=
"javascript:void(0)"
>
{{
downName
}}
<Icon
type=
"ios-arrow-down"
></Icon>
...
...
@@ -66,10 +66,10 @@ export default {
name
:
"masterData"
,
data
()
{
return
{
model8
:
''
,
model8
:
""
,
type
:
""
,
keys
:
""
,
cityList
:[],
cityList
:
[],
expand
:
false
,
list
:
[],
nodeInfo
:
{
...
...
@@ -77,14 +77,14 @@ export default {
rootCategoryId
:
0
,
ids
:
[]
},
downName
:
"请选择类型"
,
downName
:
"请选择类型"
,
modal
:
false
,
title
:
"新增"
,
curId
:
0
,
detail
:
null
,
showMenu
:
true
,
dataList
:
[],
codeRuleId
:
''
,
codeRuleId
:
""
};
},
async
fetch
({
store
,
params
})
{
...
...
@@ -92,19 +92,20 @@ export default {
},
created
()
{
// this.loadTree();
this
.
listSlecet
();
this
.
listSlecet
();
},
methods
:
{
clickItem
(
val
)
{
this
.
codeRuleId
=
val
;
this
.
loadTree
(
this
.
codeRuleId
);
clickItem
(
val
)
{
this
.
codeRuleId
=
val
;
this
.
model8
=
val
;
this
.
loadTree
(
this
.
codeRuleId
);
this
.
cityList
.
forEach
(
e
=>
{
if
(
val
==
e
.
id
)
{
this
.
downName
=
e
.
name
;
}
});
},
listSlecet
()
{
listSlecet
()
{
let
data
=
{
conditions
:
[]
};
...
...
@@ -114,14 +115,14 @@ export default {
},
// chnangeClick(val){
// this.codeRuleId = val;
// this.loadTree(this.codeRuleId);
// this.loadTree(this.codeRuleId);
// },
showMenuFn
()
{
//this.$Message.info("展开左侧树")
this
.
showMenu
=
true
;
},
ok
(
row
)
{
this
.
loadTree
(
this
.
codeRuleId
);
this
.
loadTree
(
this
.
codeRuleId
);
// this.modal = false;
// this.curId = 0;
// if (row) {
...
...
@@ -195,12 +196,11 @@ export default {
});
},
toggle
()
{
if
(
this
.
model8
)
{
this
.
expand
=
!
this
.
expand
;
if
(
this
.
model8
)
{
this
.
expand
=
!
this
.
expand
;
}
else
{
this
.
$Message
.
error
(
"请先选择类型"
);
}
},
change
(
v
,
b
)
{
let
ids
=
[];
...
...
@@ -275,7 +275,6 @@ export default {
background: rgba(245, 246, 250, 1);
opacity: 1;
padding-left: 10px;
}
.search {
height: 50px;
...
...
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