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
18fc74c9
Commit
18fc74c9
authored
Jan 18, 2024
by
全洪江
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.local.topsunit.com/mes/mes-ui
into dev
parents
58b02ad5
edc8bf37
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
639 additions
and
144 deletions
+639
-144
index.vue
src/components/SizeGroupSelect/index.vue
+196
-0
baseInfo.vue
src/views/mes/md/product/components/baseInfo.vue
+55
-22
index.vue
src/views/mes/md/product/index.vue
+388
-122
No files found.
src/components/SizeGroupSelect/index.vue
0 → 100644
View file @
18fc74c9
<
template
>
<el-dialog
title=
"尺码组选择"
v-if=
"showFlag"
:visible
.
sync=
"showFlag"
:modal=
"false"
width=
"80%"
center
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"90px"
>
<el-form-item
label=
"尺码组编码"
prop=
"sizeGroupCode"
>
<el-input
v-model=
"queryParams.sizeGroupCode"
placeholder=
"请输入尺码组编码"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"尺码组名称"
prop=
"sizeGroupName"
>
<el-input
v-model=
"queryParams.sizeGroupName"
placeholder=
"请输入尺码组名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"尺码组类型"
prop=
"sizeType"
>
<el-select
v-model=
"queryParams.sizeType"
placeholder=
"请选择尺码组类型"
clearable
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"是否启用"
prop=
"enableFlag"
>
<el-input
v-model=
"queryParams.enableFlag"
placeholder=
"请输入是否启用"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"brandList"
@
current-change=
"handleCurrent"
@
row-dblclick=
"handleRowDbClick"
>
<el-table-column
width=
"50"
align=
"center"
>
<template
v-slot=
"scope"
>
<el-radio
v-model=
"selectedGroupId"
:label=
"scope.row.sizeGroupId"
@
change=
"handleRowChange(scope.row)"
>
{{
""
}}
</el-radio
>
</
template
>
</el-table-column>
<el-table-column
label=
"尺码组id"
align=
"center"
prop=
"sizeGroupId"
/>
<el-table-column
label=
"尺码组编码"
align=
"center"
prop=
"sizeGroupCode"
/>
<el-table-column
label=
"尺码组名称"
align=
"center"
prop=
"sizeGroupName"
/>
<el-table-column
label=
"尺码组类型"
align=
"center"
prop=
"sizeType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.size_type"
:value=
"scope.row.sizeType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"是否启用"
align=
"center"
prop=
"enableFlag"
/>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"confirmSelect"
>
确 定
</el-button>
<el-button
@
click=
"showFlag = false"
>
取 消
</el-button>
</div>
</el-dialog>
</template>
<
script
>
import
{
listGroup
}
from
"@/api/mes/md/sizeGroup"
;
export
default
{
name
:
"MdBrandSelectSingle"
,
components
:
{},
dicts
:
[
'size_type'
],
data
()
{
return
{
showFlag
:
false
,
// 选中数组
selectedGroupId
:
undefined
,
selectedRows
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 尺码组表格数据
brandList
:
[],
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
sizeGroupCode
:
null
,
sizeGroupName
:
null
,
sizeType
:
null
,
enableFlag
:
null
,
},
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询尺码组列表 */
getList
()
{
this
.
loading
=
true
;
listGroup
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
brandList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
handleCurrent
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
}
},
// 单选选中数据
handleRowChange
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
}
},
//双击选中
handleRowDbClick
(
row
)
{
if
(
row
)
{
this
.
selectedRows
=
row
;
this
.
$emit
(
"onSelected"
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
}
},
//确定选中
confirmSelect
()
{
if
(
this
.
selectedGroupId
==
null
||
this
.
selectedGroupId
==
0
)
{
this
.
$notify
({
title
:
"提示"
,
type
:
"warning"
,
message
:
"请至少选择一条数据!"
,
});
return
;
}
this
.
$emit
(
"onSelected"
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
},
},
};
</
script
>
src/views/mes/md/product/components/baseInfo.vue
View file @
18fc74c9
...
...
@@ -27,17 +27,38 @@
<el-col
:span=
"8"
>
<el-form-item
label=
"品牌"
prop=
"brandId"
>
<el-input
v-model=
"form.brandName"
disabled
placeholder=
"请选择品牌"
>
<el-button
icon=
"el-icon-search"
slot=
"append"
@
click=
"openBrandSelected"
/>
<el-input
v-model=
"form.brandName"
disabled
placeholder=
"请选择品牌"
>
<el-button
icon=
"el-icon-search"
slot=
"append"
@
click=
"openBrandSelected"
/>
</el-input>
<BrandSelect
ref=
"BrandSelectRef"
@
onSelected=
"onBrandSelected"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"尺码组id"
prop=
"sizeGroupId"
>
<el-input
v-model=
"form.sizeGroupId"
placeholder=
"请输入尺码组id"
/>
<el-input
v-model=
"form.sizeGroupName"
disabled
placeholder=
"请输入尺码组"
>
<el-button
icon=
"el-icon-search"
slot=
"append"
@
click=
"openSizeGroupSelect"
/>
</el-input>
<SizeGroupSelect
ref=
"SizeGroupSelectRef"
@
onSelected=
"onSizeGroupSelect"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"版面"
prop=
"layout"
>
...
...
@@ -83,12 +104,12 @@
<
script
>
import
{
getInfo
}
from
"@/api/mes/md/baseInfo"
;
import
BrandSelect
from
'@/components/brandSelect/single.vue'
import
BrandSelect
from
"@/components/brandSelect/single.vue"
;
import
SizeGroupSelect
from
"@/components/SizeGroupSelect/index.vue"
;
export
default
{
name
:
"BaseInfo"
,
dicts
:
[
"product_layout"
],
components
:
{
BrandSelect
},
components
:
{
BrandSelect
,
SizeGroupSelect
},
data
()
{
return
{
// 遮罩层
...
...
@@ -120,8 +141,9 @@ export default {
expirationDateStart
:
""
,
expirationDateEnd
:
""
,
brandId
:
""
,
brandName
:
''
,
brandName
:
""
,
sizeGroupId
:
""
,
sizeGroupName
:
""
,
layout
:
""
,
},
// 表单校验
...
...
@@ -136,7 +158,7 @@ export default {
optType
:
undefined
,
itemId
:
{
type
:
Number
|
undefined
,
default
:
undefined
default
:
undefined
,
},
},
created
()
{
...
...
@@ -164,14 +186,16 @@ export default {
reset
()
{
this
.
form
=
{
itemId
:
this
.
itemId
,
productNo
:
null
,
productEnglishName
:
null
,
unitOfMeasure
:
null
,
expirationDateStart
:
null
,
expirationDateEnd
:
null
,
brandId
:
null
,
sizeGroupId
:
null
,
layout
:
null
,
productNo
:
""
,
productEnglishName
:
""
,
unitOfMeasure
:
""
,
expirationDateStart
:
""
,
expirationDateEnd
:
""
,
brandId
:
""
,
brandName
:
""
,
sizeGroupId
:
""
,
sizeGroupName
:
""
,
layout
:
""
,
};
this
.
resetForm
(
"form"
);
},
...
...
@@ -179,15 +203,24 @@ export default {
async
submitForm
()
{
return
await
this
.
$refs
[
"form"
].
validate
();
},
openSizeGroupSelect
()
{
this
.
$refs
[
"SizeGroupSelectRef"
].
showFlag
=
true
;
},
onSizeGroupSelect
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
sizeGroupId
=
row
.
sizeGroupId
;
this
.
form
.
sizeGroupName
=
row
.
sizeGroupName
;
}
},
openBrandSelected
()
{
this
.
$refs
[
'BrandSelectRef'
].
showFlag
=
true
this
.
$refs
[
"BrandSelectRef"
].
showFlag
=
true
;
},
onBrandSelected
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
brandId
=
row
.
brandId
this
.
form
.
brandName
=
row
.
brandName
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
brandId
=
row
.
brandId
;
this
.
form
.
brandName
=
row
.
brandName
;
}
}
}
,
},
};
</
script
>
src/views/mes/md/product/index.vue
View file @
18fc74c9
This diff is collapsed.
Click to expand it.
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