Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pda-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
pda
pda-ui
Commits
eba370d3
Commit
eba370d3
authored
Jan 17, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品管理页面-产品外观
parent
12b29acd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
288 additions
and
6 deletions
+288
-6
look.js
src/api/mes/md/look.js
+44
-0
baseInfo.vue
src/views/mes/md/product/components/baseInfo.vue
+9
-2
look.vue
src/views/mes/md/product/components/look.vue
+226
-0
index.vue
src/views/mes/md/product/index.vue
+9
-4
No files found.
src/api/mes/md/look.js
0 → 100644
View file @
eba370d3
import
request
from
'@/utils/request'
// 查询产品外观列表
export
function
listLook
(
query
)
{
return
request
({
url
:
'/md/look/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询产品外观详细
export
function
getLook
(
itemId
)
{
return
request
({
url
:
'/md/look/'
+
itemId
,
method
:
'get'
})
}
// 新增产品外观
export
function
addLook
(
data
)
{
return
request
({
url
:
'/md/look'
,
method
:
'post'
,
data
:
data
})
}
// 修改产品外观
export
function
updateLook
(
data
)
{
return
request
({
url
:
'/md/look'
,
method
:
'put'
,
data
:
data
})
}
// 删除产品外观
export
function
delLook
(
productLookId
)
{
return
request
({
url
:
'/md/look/'
+
productLookId
,
method
:
'delete'
})
}
src/views/mes/md/product/components/baseInfo.vue
View file @
eba370d3
...
...
@@ -51,8 +51,14 @@
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"版面"
prop=
"productLayout"
>
<el-input
v-model=
"form.productLayout"
maxlength=
"64"
v-if=
"optType == 'view'"
/>
<el-input
v-model=
"form.productLayout"
placeholder=
"请输入版面"
maxlength=
"64"
v-else
/>
<el-select
v-model=
"form.productLayout"
placeholder=
"请选择任务分组"
>
<el-option
v-for=
"dict in dict.type.product_layout"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
...
...
@@ -85,6 +91,7 @@ import {getInfo} from "@/api/mes/md/baseInfo";
export
default
{
name
:
"BaseInfo"
,
dicts
:
[
'product_layout'
],
components
:
{
},
data
()
{
return
{
...
...
src/views/mes/md/product/components/look.vue
View file @
eba370d3
<!--产品外观-->
<
template
>
<div
class=
"app-container"
>
<!-- 添加或修改产品外观对话框 -->
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"长度cm"
prop=
"productLength"
>
<el-input
v-model=
"form.productLength"
placeholder=
"请输入长度"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"宽度cm"
prop=
"productWidth"
>
<el-input
v-model=
"form.productWidth"
placeholder=
"请输入宽度"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"高度cm"
prop=
"productHeight"
>
<el-input
v-model=
"form.productHeight"
placeholder=
"请输入高度"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"厚度mm"
prop=
"productThick"
>
<el-input
v-model=
"form.productThick"
placeholder=
"请输入厚度"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"成品克重g"
prop=
"productWeight"
>
<el-input
v-model=
"form.productWeight"
placeholder=
"请输入成品克重"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"角型"
prop=
"productAngleType"
>
<el-select
v-model=
"form.productAngleType"
placeholder=
"请选择角型"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"角度(mm)"
prop=
"productAngle"
>
<el-input
v-model=
"form.productAngle"
placeholder=
"请输入角度"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"孔径(mm)"
prop=
"productAperture"
>
<el-input
v-model=
"form.productAperture"
placeholder=
"请输入孔径"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"单层厚(丝)"
prop=
"productSingleLayer"
>
<el-input
v-model=
"form.productSingleLayer"
placeholder=
"请输入单层厚(单位丝)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"单重(KG)"
prop=
"productSingleWeight"
>
<el-input
v-model=
"form.productSingleWeight"
placeholder=
"请输入单重"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"层数"
prop=
"productLayerNum"
>
<el-input
v-model=
"form.productLayerNum"
placeholder=
"请输入层数"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"是否防霉"
prop=
"productMould"
>
<el-input
v-model=
"form.productMould"
placeholder=
"请输入是否防霉"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"是否写码"
prop=
"productCoding"
>
<el-input
v-model=
"form.productCoding"
placeholder=
"请输入是否写码"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"体系认证"
prop=
"productSysCertification"
>
<el-input
v-model=
"form.productSysCertification"
placeholder=
"请输入体系认证"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"采购单位"
prop=
"productBuyUnit"
>
<el-input
v-model=
"form.productBuyUnit"
placeholder=
"请输入采购单位"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"样品形状"
prop=
"productShape"
>
<el-input
v-model=
"form.productShape"
placeholder=
"请输入样品形状"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"样品形状"
prop=
"productShapeSize"
>
<el-input
v-model=
"form.productShapeSize"
placeholder=
"请输入样品形状"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"换算值"
prop=
"purchaseConversionValue"
>
<el-input
v-model=
"form.purchaseConversionValue"
placeholder=
"请输入采购换算值"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</
template
>
<
script
>
import
{
getLook
}
from
"@/api/mes/md/look"
;
export
default
{
name
:
"Look"
,
dicts
:
[],
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
itemId
:
this
.
itemId
},
// 表单参数
form
:
{
productLength
:
''
,
productWidth
:
''
,
productHeight
:
''
,
productThick
:
''
,
productWeight
:
''
,
productAngleType
:
''
,
productAngle
:
''
,
productAperture
:
''
,
productSingleLayer
:
''
,
productSingleWeight
:
''
,
productLayerNum
:
''
,
productMould
:
''
,
productCoding
:
''
,
productSysCertification
:
''
,
productBuyUnit
:
''
,
productShape
:
''
,
productShapeSize
:
''
,
purchaseConversionValue
:
''
},
// 表单校验
rules
:
{
}
};
},
props
:
{
optType
:
undefined
,
itemId
:
undefined
},
created
()
{
this
.
getProductLook
();
},
methods
:
{
//获取基本信息表单数据
async
getLookFormData
(){
await
this
.
submitForm
()
return
this
.
form
},
//回显外观数据
getProductLook
(){
getLook
(
this
.
itemId
).
then
(
res
=>
{
Object
.
assign
(
this
.
form
,
res
.
data
)
})
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
itemId
:
this
.
itemId
,
productLength
:
null
,
productWidth
:
null
,
productHeight
:
null
,
productThick
:
null
,
productWeight
:
null
,
productAngleType
:
null
,
productAngle
:
null
,
productAperture
:
null
,
productSingleLayer
:
null
,
productSingleWeight
:
null
,
productLayerNum
:
null
,
productMould
:
null
,
productCoding
:
null
,
productSysCertification
:
null
,
productBuyUnit
:
null
,
productShape
:
null
,
productShapeSize
:
null
,
purchaseConversionValue
:
null
};
this
.
resetForm
(
"form"
);
},
/** 提交按钮 */
async
submitForm
()
{
return
await
this
.
$refs
[
"form"
].
validate
();
},
}
};
</
script
>
src/views/mes/md/product/index.vue
View file @
eba370d3
...
...
@@ -325,7 +325,7 @@
<Customer
:optType=
"optType"
:itemId=
"form.itemId"
></Customer>
</el-tab-pane>
<el-tab-pane
label=
"产品外观"
>
<Look
:optType=
"optType"
:itemId=
"form.itemId"
></Look>
<Look
ref=
"look"
:optType=
"optType"
:itemId=
"form.itemId"
></Look>
</el-tab-pane>
<el-tab-pane
label=
"排版参数"
>
<PublishedConf
:optType=
"optType"
:itemId=
"form.itemId"
></PublishedConf>
...
...
@@ -626,11 +626,16 @@ export default {
this
.
$refs
[
"form"
].
validate
(
async
(
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
form
.
itemId
!=
undefined
)
{
const
data
=
await
this
.
$refs
[
'baseInfo'
].
getBaseInfoData
()
data
.
itemId
=
this
.
form
.
itemId
;
//基本信息保存
const
baseInfoData
=
await
this
.
$refs
[
'baseInfo'
].
getBaseInfoData
()
baseInfoData
.
itemId
=
this
.
form
.
itemId
;
//产品外观保存
const
lookData
=
await
this
.
$refs
[
'look'
].
getLookFormData
()
lookData
.
itemId
=
this
.
form
.
itemId
;
const
params
=
{
...
this
.
form
,
baseInfo
:
data
baseInfo
:
baseInfoData
,
look
:
lookData
,
}
updateMdItem
(
params
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
...
...
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