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
4c8fc934
Commit
4c8fc934
authored
Jan 18, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品颜色验证
parent
8d6538c4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
13 deletions
+49
-13
backFaceColor.vue
src/views/mes/md/product/components/backFaceColor.vue
+5
-0
faceColor.vue
src/views/mes/md/product/components/faceColor.vue
+5
-0
index.vue
src/views/mes/md/product/index.vue
+2
-0
index.vue
src/views/mes/md/workunit/index.vue
+37
-13
No files found.
src/views/mes/md/product/components/backFaceColor.vue
View file @
4c8fc934
...
...
@@ -249,6 +249,11 @@ export default {
this
.
form
.
colorCode
=
element
.
colorCode
;
this
.
form
.
face
=
'back'
;
var
retFlag
=
false
;
const
idx
=
this
.
faceColorList
.
findIndex
(
itm
=>
itm
.
colorId
==
element
.
colorId
)
if
(
idx
>
-
1
)
{
this
.
$modal
.
msgError
(
"新增颜色失败,颜色已存在"
);
return
}
addFaceColor
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
getList
();
...
...
src/views/mes/md/product/components/faceColor.vue
View file @
4c8fc934
...
...
@@ -249,6 +249,11 @@ export default {
this
.
form
.
colorCode
=
element
.
colorCode
;
this
.
form
.
face
=
'front'
;
var
retFlag
=
false
;
const
idx
=
this
.
faceColorList
.
findIndex
(
itm
=>
itm
.
colorId
==
element
.
colorId
)
if
(
idx
>
-
1
)
{
this
.
$modal
.
msgError
(
"新增颜色失败,颜色已存在"
);
return
}
addFaceColor
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
getList
();
...
...
src/views/mes/md/product/index.vue
View file @
4c8fc934
...
...
@@ -351,6 +351,7 @@
<el-col
:span=
"12"
>
<el-form-item
label=
"单位"
prop=
"unitOfMeasure"
>
<el-select
v-model=
"form.unitOfMeasure"
disabled
v-if=
"optType == 'view'"
...
...
@@ -367,6 +368,7 @@
<el-select
v-model=
"form.unitOfMeasure"
placeholder=
"请选择单位"
filterable
v-else
>
<el-option
...
...
src/views/mes/md/workunit/index.vue
View file @
4c8fc934
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"工作单元编码"
prop=
"workunitCode"
>
<el-form-item
label=
"工作单元编码"
label-width=
"100px"
prop=
"workunitCode"
>
<el-input
v-model=
"queryParams.workunitCode"
placeholder=
"请输入工作单元编码"
...
...
@@ -9,7 +9,7 @@
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"工作单元名称"
prop=
"workunitName"
>
<el-form-item
label=
"工作单元名称"
label-width=
"100px"
prop=
"workunitName"
>
<el-input
v-model=
"queryParams.workunitName"
placeholder=
"请输入工作单元名称"
...
...
@@ -82,8 +82,16 @@
<el-table
v-loading=
"loading"
:data=
"workunitList"
@
selection-change=
"handleSelectionChange"
>
<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=
"workstationId"
/>
<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)"
v-hasPermi=
"['mes:md:workunit:query']"
>
{{
scope
.
row
.
workunitCode
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"工作站"
align=
"center"
prop=
"workstationName"
/>
<el-table-column
label=
"工作单元名称"
align=
"center"
prop=
"workunitName"
/>
<el-table-column
label=
"是否启用"
align=
"center"
prop=
"enableFlag"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -120,21 +128,21 @@
/>
<!-- 添加或修改工作单元对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"
5
00px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"
6
00px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"工作站"
prop=
"workstation
"
>
<el-input
v-model=
"form.workstation"
placeholder=
"请输入工作站"
>
<el-form-item
label=
"工作站"
label-width=
"100px"
prop=
"workstationName
"
>
<el-input
v-model=
"form.workstation
Name
"
placeholder=
"请输入工作站"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"handleWorkstationSelect"
></el-button>
</el-input>
</el-form-item>
<WorkstationSelect
ref=
"workstationSelect"
@
onSelected=
"onWorkstationSelected"
>
</WorkstationSelect>
<el-form-item
label=
"工作单元编码"
prop=
"workunitCode"
>
<el-form-item
label=
"工作单元编码"
label-width=
"100px"
prop=
"workunitCode"
>
<el-input
v-model=
"form.workunitCode"
placeholder=
"请输入工作单元编码"
/>
</el-form-item>
<el-form-item
label=
"工作单元名称"
prop=
"workunitName"
>
<el-form-item
label=
"工作单元名称"
label-width=
"100px"
prop=
"workunitName"
>
<el-input
v-model=
"form.workunitName"
placeholder=
"请输入工作单元名称"
/>
</el-form-item>
<el-form-item
label=
"是否启用"
prop=
"enableFlag"
>
<el-form-item
label=
"是否启用"
label-width=
"100px"
prop=
"enableFlag"
>
<el-select
v-model=
"form.enableFlag"
placeholder=
"请选择是或否"
>
<el-option
v-for=
"dict in dict.type.sys_yes_no"
...
...
@@ -144,12 +152,13 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-form-item
label=
"备注"
label-width=
"100px"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"cancel"
v-if=
"optType =='view'"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
v-else
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
...
...
@@ -166,6 +175,7 @@ export default {
dicts
:[
'sys_yes_no'
],
data
()
{
return
{
optType
:
undefined
,
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -189,6 +199,7 @@ export default {
pageNum
:
1
,
pageSize
:
10
,
workstationId
:
null
,
workstationName
:
null
,
workunitCode
:
null
,
workunitName
:
null
,
enableFlag
:
null
,
...
...
@@ -196,6 +207,7 @@ export default {
// 表单参数
form
:
{
workstationId
:
''
,
workstationName
:
''
,
workunitCode
:
''
,
workstation
:
''
,
workunitName
:
''
,
...
...
@@ -228,6 +240,7 @@ export default {
reset
()
{
this
.
form
=
{
workstationId
:
''
,
workstationName
:
''
,
workunitCode
:
''
,
workstation
:
''
,
workunitName
:
''
,
...
...
@@ -267,6 +280,17 @@ export default {
this
.
title
=
"修改工作单元"
;
});
},
// 查询明细按钮操作
handleView
(
row
){
this
.
reset
();
const
workunitId
=
row
.
workunitId
||
this
.
ids
getWorkunit
(
workunitId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"查看工作单元"
;
this
.
optType
=
"view"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
...
...
@@ -311,7 +335,7 @@ export default {
console
.
log
(
row
,
'rowwwwwww'
)
if
(
row
!=
undefined
&&
row
!=
null
){
this
.
form
.
workstationId
=
row
.
workstationId
;
this
.
form
.
workstation
=
row
.
workstationName
;
this
.
form
.
workstation
Name
=
row
.
workstationName
;
}
},
}
...
...
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