Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
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
mes-ui
Commits
63f6ed3f
Commit
63f6ed3f
authored
Feb 05, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作站、工作单元、工作车间自动生成编码
parent
79dca622
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
42 deletions
+31
-42
index.vue
src/views/mes/md/workshop/index.vue
+2
-10
index.vue
src/views/mes/md/workstation/index.vue
+2
-13
index.vue
src/views/mes/md/workunit/index.vue
+27
-19
No files found.
src/views/mes/md/workshop/index.vue
View file @
63f6ed3f
...
@@ -113,16 +113,7 @@
...
@@ -113,16 +113,7 @@
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"车间编码"
prop=
"workshopCode"
>
<el-form-item
label=
"车间编码"
prop=
"workshopCode"
>
<el-input
v-model=
"form.workshopCode"
placeholder=
"请输入车间编码"
/>
<el-input
v-model=
"form.workshopCode"
placeholder=
"请输入车间编码"
readonly=
"readonly"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label-width=
"80"
>
<el-switch
v-model=
"autoGenFlag"
active-color=
"#13ce66"
active-text=
"自动生成"
@
change=
"handleAutoGenChange(autoGenFlag)"
v-if=
"optType != 'view'"
>
</el-switch>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -293,6 +284,7 @@ export default {
...
@@ -293,6 +284,7 @@ export default {
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
();
this
.
reset
();
this
.
handleAutoGenChange
(
true
);
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"添加车间"
;
this
.
title
=
"添加车间"
;
this
.
optType
=
"add"
;
this
.
optType
=
"add"
;
...
...
src/views/mes/md/workstation/index.vue
View file @
63f6ed3f
...
@@ -208,7 +208,7 @@
...
@@ -208,7 +208,7 @@
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"960px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"960px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-row>
<el-row>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
12
"
>
<el-form-item
label=
"工作站编号"
prop=
"workstationCode"
>
<el-form-item
label=
"工作站编号"
prop=
"workstationCode"
>
<el-input
<el-input
v-model=
"form.workstationCode"
v-model=
"form.workstationCode"
...
@@ -216,18 +216,6 @@
...
@@ -216,18 +216,6 @@
/>
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label-width=
"80"
>
<el-switch
v-model=
"autoGenFlag"
active-color=
"#13ce66"
active-text=
"自动生成"
@
change=
"handleAutoGenChange(autoGenFlag)"
v-if=
"optType != 'view'"
>
</el-switch>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"工作站名称"
prop=
"workstationName"
>
<el-form-item
label=
"工作站名称"
prop=
"workstationName"
>
<el-input
<el-input
...
@@ -635,6 +623,7 @@ export default {
...
@@ -635,6 +623,7 @@ export default {
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
();
this
.
reset
();
this
.
handleAutoGenChange
(
true
);
this
.
getWorkshops
();
this
.
getWorkshops
();
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"添加工作站"
;
this
.
title
=
"添加工作站"
;
...
...
src/views/mes/md/workunit/index.vue
View file @
63f6ed3f
...
@@ -82,7 +82,14 @@
...
@@ -82,7 +82,14 @@
<el-table
v-loading=
"loading"
:data=
"workunitList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"workunitList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<!--
<el-table-column
label=
"工作单元ID"
align=
"center"
prop=
"workunitId"
/>
-->
<!--
<el-table-column
label=
"工作单元ID"
align=
"center"
prop=
"workunitId"
/>
-->
<el-table-column
label=
"工作单元编码"
align=
"center"
prop=
"workunitCode"
/>
<el-table-column
label=
"工作单元编码"
align=
"center"
prop=
"workunitCode"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleView(scope.row)"
>
{{
scope
.
row
.
workunitCode
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"工作站"
align=
"center"
prop=
"workstationName"
/>
<el-table-column
label=
"工作站"
align=
"center"
prop=
"workstationName"
/>
<el-table-column
label=
"工作单元名称"
align=
"center"
prop=
"workunitName"
/>
<el-table-column
label=
"工作单元名称"
align=
"center"
prop=
"workunitName"
/>
<el-table-column
label=
"是否启用"
align=
"center"
prop=
"enableFlag"
>
<el-table-column
label=
"是否启用"
align=
"center"
prop=
"enableFlag"
>
...
@@ -124,7 +131,7 @@
...
@@ -124,7 +131,7 @@
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-row>
<el-row>
<el-col
:span=
"20"
>
<el-col
:span=
"20"
>
<el-form-item
label=
"工作站"
label-width=
"1
0
0px"
prop=
"workstationName"
>
<el-form-item
label=
"工作站"
label-width=
"1
2
0px"
prop=
"workstationName"
>
<el-input
v-model=
"form.workstationName"
placeholder=
"请输入工作站"
>
<el-input
v-model=
"form.workstationName"
placeholder=
"请输入工作站"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"handleWorkstationSelect"
></el-button>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"handleWorkstationSelect"
></el-button>
</el-input>
</el-input>
...
@@ -133,31 +140,22 @@
...
@@ -133,31 +140,22 @@
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"16"
>
<el-col
:span=
"20"
>
<el-form-item
label=
"工作单元编码"
label-width=
"100px"
prop=
"workunitCode"
>
<el-form-item
label=
"工作单元编码"
label-width=
"120px"
prop=
"workunitCode"
>
<el-input
v-model=
"form.workunitCode"
placeholder=
"请输入工作单元编码"
/>
<el-input
v-model=
"form.workunitCode"
placeholder=
"请输入工作单元编码"
readonly=
"readonly"
/>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label-width=
"80"
>
<el-switch
v-model=
"autoGenFlag"
active-color=
"#13ce66"
active-text=
"自动生成"
@
change=
"handleAutoGenChange(autoGenFlag)"
v-if=
"optType != 'view'"
>
</el-switch>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"20"
>
<el-col
:span=
"20"
>
<el-form-item
label=
"工作单元名称"
label-width=
"1
0
0px"
prop=
"workunitName"
>
<el-form-item
label=
"工作单元名称"
label-width=
"1
2
0px"
prop=
"workunitName"
>
<el-input
v-model=
"form.workunitName"
placeholder=
"请输入工作单元名称"
/>
<el-input
v-model=
"form.workunitName"
placeholder=
"请输入工作单元名称"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"20"
>
<el-col
:span=
"20"
>
<el-form-item
label=
"是否启用"
>
<el-form-item
label=
"是否启用"
label-width=
"120px"
>
<el-radio-group
v-model=
"form.enableFlag"
disabled
v-if=
"optType=='view'"
>
<el-radio-group
v-model=
"form.enableFlag"
disabled
v-if=
"optType=='view'"
>
<el-radio
<el-radio
v-for=
"dict in dict.type.sys_yes_no"
v-for=
"dict in dict.type.sys_yes_no"
...
@@ -177,7 +175,7 @@
...
@@ -177,7 +175,7 @@
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"20"
>
<el-col
:span=
"20"
>
<el-form-item
label=
"备注"
label-width=
"1
0
0px"
prop=
"remark"
>
<el-form-item
label=
"备注"
label-width=
"1
2
0px"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
placeholder=
"请输入备注"
/>
<el-input
v-model=
"form.remark"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -240,10 +238,19 @@ export default {
...
@@ -240,10 +238,19 @@ export default {
workunitCode
:
''
,
workunitCode
:
''
,
workstation
:
''
,
workstation
:
''
,
workunitName
:
''
,
workunitName
:
''
,
enableFlag
:
''
,
enableFlag
:
'
Y
'
,
},
},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
workstationName
:
[
{
required
:
true
,
message
:
"工作站不能为空"
,
trigger
:
"blur"
}
],
workunitName
:
[
{
required
:
true
,
message
:
"工作单元名称不能为空"
,
trigger
:
"blur"
}
],
workunitCode
:
[
{
required
:
true
,
message
:
"工作单元编码不能为空"
,
trigger
:
"blur"
}
],
}
}
};
};
},
},
...
@@ -273,7 +280,7 @@ export default {
...
@@ -273,7 +280,7 @@ export default {
workunitCode
:
''
,
workunitCode
:
''
,
workstation
:
''
,
workstation
:
''
,
workunitName
:
''
,
workunitName
:
''
,
enableFlag
:
''
,
enableFlag
:
'
Y
'
,
}
}
this
.
autoGenFlag
=
false
;
this
.
autoGenFlag
=
false
;
this
.
resetForm
(
"form"
);
this
.
resetForm
(
"form"
);
...
@@ -297,6 +304,7 @@ export default {
...
@@ -297,6 +304,7 @@ export default {
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
();
this
.
reset
();
this
.
handleAutoGenChange
(
true
);
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"添加工作单元"
;
this
.
title
=
"添加工作单元"
;
},
},
...
...
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