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
edaf0497
Commit
edaf0497
authored
Jun 22, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料优化
parent
ab47335a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
17 deletions
+58
-17
add.vue
pages/materiel/classification/add.vue
+1
-1
edit.vue
pages/materiel/classification/edit.vue
+1
-1
add.vue
pages/materiel/masterData/add.vue
+17
-3
edit.vue
pages/materiel/masterData/edit.vue
+16
-3
masterData.vue
pages/materiel/masterData/masterData.vue
+21
-8
submit.vue
pages/materiel/masterData/submit.vue
+2
-1
No files found.
pages/materiel/classification/add.vue
View file @
edaf0497
...
@@ -257,7 +257,7 @@ export default {
...
@@ -257,7 +257,7 @@ export default {
action
:
1
,
action
:
1
,
add
:
0
//新增标识
add
:
0
//新增标识
};
};
this
.
checkList
.
unshift
(
obj
);
this
.
checkList
.
push
(
obj
);
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
v
=>
{
...
...
pages/materiel/classification/edit.vue
View file @
edaf0497
...
@@ -254,7 +254,7 @@ export default {
...
@@ -254,7 +254,7 @@ export default {
action
:
1
,
action
:
1
,
add
:
0
//新增标识
add
:
0
//新增标识
};
};
this
.
checkList
.
unshift
(
obj
);
this
.
checkList
.
push
(
obj
);
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
v
=>
{
...
...
pages/materiel/masterData/add.vue
View file @
edaf0497
...
@@ -25,7 +25,15 @@
...
@@ -25,7 +25,15 @@
</Col>
-->
</Col>
-->
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
label=
"版本"
prop=
"version"
>
<FormItem
label=
"版本"
prop=
"version"
>
<Input
v-model=
"entity.version"
placeholder=
"请输入"
></Input>
<!--
<Input
v-model=
"entity.version"
placeholder=
"请输入"
></Input>
-->
<Dictionary
code=
"material.main.version"
disabled
v-model=
"entity.version"
type=
"select"
:value=
"entity.version"
:key=
"entity.version"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
...
@@ -47,7 +55,7 @@
...
@@ -47,7 +55,7 @@
class=
"w100"
class=
"w100"
></InputNumber>
></InputNumber>
<Dictionary
v-if=
"li.dataType==3"
v-model=
"entity[li.field]"
:code=
"li.note"
></Dictionary>
<Dictionary
v-if=
"li.dataType==3"
v-model=
"entity[li.field]"
:code=
"li.note"
></Dictionary>
<Input
v-if=
"li.dataType==5"
type=
"textarea"
v-model=
"entity[li.filed]"
></Input>
<Input
v-if=
"li.dataType==5"
type=
"textarea"
v-model=
"entity[li.filed]"
></Input>
<DatePicker
<DatePicker
v-if=
"li.dataType==4"
v-if=
"li.dataType==4"
v-model=
"entity[li.field]"
v-model=
"entity[li.field]"
...
@@ -58,7 +66,12 @@
...
@@ -58,7 +66,12 @@
<!--
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:Photos=
"true"
@
clickItem=
"clickData"
/>
-->
<!--
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:Photos=
"true"
@
clickItem=
"clickData"
/>
-->
<InputFile
v-if=
"li.dataType==7"
v-model=
"entity[li.field]"
></InputFile>
<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>
<Input
v-if=
"li.dataType==8"
type=
"textarea"
v-model=
"entity[li.field]"
></Input>
<state
v-if=
"li.unitName&&(li.dataType==1||li.dataType==2)"
:value=
"li.unitName"
code=
"material.main.unitName"
type=
"tag"
></state>
<state
v-if=
"li.unitName&&(li.dataType==1||li.dataType==2)"
:value=
"li.unitName"
code=
"material.main.unitName"
type=
"tag"
></state>
</FormItem>
</FormItem>
</Col>
</Col>
<!--
<Col
:span=
"24"
>
<!--
<Col
:span=
"24"
>
...
@@ -84,6 +97,7 @@ export default {
...
@@ -84,6 +97,7 @@ export default {
entity
:
{
entity
:
{
code
:
0
,
code
:
0
,
status
:
0
,
status
:
0
,
version
:
0
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
codeRuleId
:
this
.
nodeInfo
.
codeRuleId
,
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
customProperties
:
{},
customProperties
:
{},
...
...
pages/materiel/masterData/edit.vue
View file @
edaf0497
...
@@ -25,7 +25,15 @@
...
@@ -25,7 +25,15 @@
</Col>
-->
</Col>
-->
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
label=
"版本"
prop=
"version"
>
<FormItem
label=
"版本"
prop=
"version"
>
<Input
v-model=
"entity.version"
placeholder=
"请输入"
></Input>
<!--
<Input
v-model=
"entity.version"
placeholder=
"请输入"
></Input>
-->
<Dictionary
code=
"material.main.version"
disabled
v-model=
"entity.version"
type=
"select"
:value=
"entity.version"
:key=
"entity.version"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
...
@@ -47,7 +55,7 @@
...
@@ -47,7 +55,7 @@
class=
"w100"
class=
"w100"
></InputNumber>
></InputNumber>
<Dictionary
v-if=
"li.dataType==3"
v-model=
"entity[li.field]"
:code=
"li.note"
></Dictionary>
<Dictionary
v-if=
"li.dataType==3"
v-model=
"entity[li.field]"
:code=
"li.note"
></Dictionary>
<Input
v-if=
"li.dataType==5"
type=
"textarea"
v-model=
"entity[li.filed]"
></Input>
<Input
v-if=
"li.dataType==5"
type=
"textarea"
v-model=
"entity[li.filed]"
></Input>
<DatePicker
<DatePicker
v-if=
"li.dataType==4"
v-if=
"li.dataType==4"
v-model=
"entity[li.field]"
v-model=
"entity[li.field]"
...
@@ -58,7 +66,12 @@
...
@@ -58,7 +66,12 @@
<!--
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:Photos=
"true"
@
clickItem=
"clickData"
/>
-->
<!--
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:Photos=
"true"
@
clickItem=
"clickData"
/>
-->
<InputFile
v-if=
"li.dataType==7"
v-model=
"entity[li.field]"
></InputFile>
<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>
<Input
v-if=
"li.dataType==8"
type=
"textarea"
v-model=
"entity[li.field]"
></Input>
<state
v-if=
"li.unitName&&(li.dataType==1||li.dataType==2)"
:value=
"li.unitName"
code=
"material.main.unitName"
type=
"tag"
></state>
<state
v-if=
"li.unitName&&(li.dataType==1||li.dataType==2)"
:value=
"li.unitName"
code=
"material.main.unitName"
type=
"tag"
></state>
</FormItem>
</FormItem>
</Col>
</Col>
<!--
<Col
:span=
"24"
>
<!--
<Col
:span=
"24"
>
...
...
pages/materiel/masterData/masterData.vue
View file @
edaf0497
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
:action=
"action"
:action=
"action"
:initsearch=
"sets"
:initsearch=
"sets"
:high=
"false"
:high=
"false"
:format=
"formatFun"
:height=
"tableHeight"
:height=
"tableHeight"
@
on-selection-change=
"onSelect"
@
on-selection-change=
"onSelect"
>
>
...
@@ -132,7 +133,8 @@ export default {
...
@@ -132,7 +133,8 @@ export default {
{
{
key
:
"version"
,
key
:
"version"
,
title
:
"版本"
,
title
:
"版本"
,
align
:
"left"
align
:
"left"
,
code
:
"material.main.version"
},
},
{
{
key
:
"description"
,
key
:
"description"
,
...
@@ -212,6 +214,17 @@ export default {
...
@@ -212,6 +214,17 @@ export default {
};
};
},
},
methods
:
{
methods
:
{
//格式化原始数据
formatFun
(
data
)
{
data
.
map
(
e
=>
{
if
(
e
.
status
==
0
)
{
e
.
_disabled
=
false
;
}
else
{
e
.
_disabled
=
true
;
}
});
return
data
;
},
onSelect
(
a
,
b
)
{
onSelect
(
a
,
b
)
{
//批量选择
//批量选择
this
.
rootCategoryId
=
a
[
0
].
rootCategoryId
;
this
.
rootCategoryId
=
a
[
0
].
rootCategoryId
;
...
@@ -261,9 +274,9 @@ export default {
...
@@ -261,9 +274,9 @@ export default {
col
.
code
=
u
.
note
;
col
.
code
=
u
.
note
;
}
}
if
(
u
.
dataType
==
4
)
{
if
(
u
.
dataType
==
4
)
{
col
.
type
=
'date'
;
col
.
type
=
"date"
;
}
}
if
(
u
.
unitName
&&
(
u
.
dataType
==
1
||
u
.
dataType
==
2
))
{
if
(
u
.
unitName
&&
(
u
.
dataType
==
1
||
u
.
dataType
==
2
))
{
var
units
=
this
.
$store
.
getters
.
dictionaryByKey
(
var
units
=
this
.
$store
.
getters
.
dictionaryByKey
(
"material.main.unitName"
"material.main.unitName"
);
);
...
@@ -279,7 +292,7 @@ export default {
...
@@ -279,7 +292,7 @@ export default {
this
.
cols
=
this
.
cols
.
concat
(
extra
);
this
.
cols
=
this
.
cols
.
concat
(
extra
);
var
action
=
this
.
cols
.
splice
(
this
.
columns
.
length
-
1
,
1
);
var
action
=
this
.
cols
.
splice
(
this
.
columns
.
length
-
1
,
1
);
this
.
cols
.
push
(
this
.
columns
[
this
.
columns
.
length
-
1
]);
this
.
cols
.
push
(
this
.
columns
[
this
.
columns
.
length
-
1
]);
if
(
delay
)
{
if
(
delay
)
{
delay
();
delay
();
}
}
// console.log(this.cols)
// console.log(this.cols)
...
@@ -349,14 +362,14 @@ export default {
...
@@ -349,14 +362,14 @@ export default {
handler
(
newName
,
oldName
)
{
handler
(
newName
,
oldName
)
{
console
.
log
(
"ovo"
,
newName
,
oldName
);
console
.
log
(
"ovo"
,
newName
,
oldName
);
if
(
newName
.
rootCategoryId
)
{
if
(
newName
.
rootCategoryId
)
{
this
.
initCols
(()
=>
{
this
.
initCols
(()
=>
{
if
(
newName
.
categoryId
)
{
if
(
newName
.
categoryId
)
{
this
.
easySearch
.
categoryId
.
value
=
newName
.
ids
;
this
.
easySearch
.
categoryId
.
value
=
newName
.
ids
;
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
}
}
});
});
}
}
if
(
!
newName
.
categoryId
)
{
if
(
!
newName
.
categoryId
)
{
this
.
easySearch
.
categoryId
.
value
=
"-1"
;
this
.
easySearch
.
categoryId
.
value
=
"-1"
;
}
}
},
},
...
...
pages/materiel/masterData/submit.vue
View file @
edaf0497
...
@@ -111,7 +111,8 @@ export default {
...
@@ -111,7 +111,8 @@ export default {
click
:
()
=>
this
.
details
(
params
.
row
.
id
)
click
:
()
=>
this
.
details
(
params
.
row
.
id
)
}
}
},
},
params
.
row
.
code
// params.row.code
!
params
.
row
.
code
?
"未分配"
:
params
.
row
.
code
);
);
}
}
},
},
...
...
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