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
a7e8f8e0
Commit
a7e8f8e0
authored
Jan 20, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品SAP特性页签
parent
2dc90f99
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
127 deletions
+55
-127
sapProperty.vue
src/views/mes/md/product/components/sapProperty.vue
+0
-90
index.vue
src/views/mes/md/product/index.vue
+55
-37
No files found.
src/views/mes/md/product/components/sapProperty.vue
deleted
100644 → 0
View file @
2dc90f99
<
template
>
<div
class=
"base-info"
>
<el-form
:model=
"form"
ref=
"form"
label-width=
"120px"
size=
"mini"
>
<el-row
class=
"form-wrap"
:gutter=
"10"
>
<template
v-for=
"item in sapProperties"
>
<el-col
:span=
"8"
:key=
"item.id"
>
<el-form-item
:label=
"item.name"
:prop=
"item.sapField"
:rules=
"
{required: true, validator: (rule, value, callback) => onValidate(rule, value, callback, item), trigger: ['blur', 'change']}">
<el-input-all
v-model=
"form[item.sapField]"
:item=
"item"
/>
</el-form-item>
</el-col>
</
template
>
</el-row>
</el-form>
<div>
<el-button
@
click=
"onConfirm"
>
确认
</el-button>
</div>
</div>
</template>
<
script
>
import
{
listByType
}
from
'@/api/mes/md/sapproperty'
export
default
{
props
:
{
},
data
()
{
return
{
sapProperties
:
[],
customer
:
{},
form
:
{},
sapProperty
:
{
id
:
''
,
type
:
''
,
viewType
:
''
,
name
:
''
,
typeId
:
''
,
sapField
:
''
,
relationField
:
''
,
typeName
:
''
,
dataType
:
''
,
length
:
''
,
min
:
''
,
max
:
''
,
regEx
:
''
,
dictId
:
''
,
errMsg
:
''
,
dictDataList
:
[]
},
}
},
methods
:
{
onConfirm
()
{
console
.
log
(
this
.
form
)
},
onValidate
(
rule
,
value
,
callback
,
item
)
{
if
(
value
===
''
||
value
==
null
)
{
callback
(
new
Error
(
item
.
errMsg
))
}
else
{
if
(
item
.
dataType
===
1
)
{
if
(
value
.
length
>
item
.
length
||
!
new
RegExp
(
item
.
regEx
).
test
(
value
))
callback
(
new
Error
(
item
.
errMsg
))
}
else
if
([
2
,
3
].
includes
(
item
.
dataType
))
{
if
(
value
<
item
.
min
||
value
>
max
)
callback
(
new
Error
(
item
.
errMsg
))
}
callback
()
}
},
init
()
{
this
.
$refs
.
form
&&
this
.
$refs
.
form
.
resetFields
()
this
.
form
=
{}
listByType
({
type
:
5
}).
then
(
res
=>
{
this
.
sapProperties
=
res
.
data
})
}
},
created
()
{
}
}
</
script
>
<
style
scoped
>
.form-wrap
{
max-height
:
400px
;
overflow-y
:
auto
;
}
</
style
>
src/views/mes/md/product/index.vue
View file @
a7e8f8e0
...
...
@@ -510,52 +510,60 @@
</el-row>
</el-form>
<el-tabs
type=
"border-card"
v-model=
"activeName"
@
tab-click=
"onTabClick"
v-if=
"form.itemId != null && form.itemOrProduct == 'PRODUCT'"
>
<el-tab-pane
label=
"基本信息"
>
<BaseInfo
ref=
"baseInfo"
:optType=
"optType"
:itemId=
"form.itemId"
></BaseInfo>
<el-tab-pane
label=
"基本信息"
name=
"BaseInfo"
>
<BaseInfo
ref=
"BaseInfo"
:optType=
"optType"
:itemId=
"form.itemId"
></BaseInfo>
</el-tab-pane>
<el-tab-pane
label=
"产品特性"
>
<SpecProperty
:optType=
"optType"
:itemId=
"form.itemId"
></SpecProperty>
<el-tab-pane
label=
"产品特性"
name=
"SpecProperty"
>
<SpecProperty
ref=
"SpecProperty"
:optType=
"optType"
:itemId=
"form.itemId"
></SpecProperty>
</el-tab-pane>
<el-tab-pane
label=
"销售单位转换"
>
<SaleUnit
ref=
"
s
aleUnit"
:optType=
"optType"
:itemId=
"form.itemId"
></SaleUnit>
<el-tab-pane
label=
"销售单位转换"
name=
"SaleUnit"
>
<SaleUnit
ref=
"
S
aleUnit"
:optType=
"optType"
:itemId=
"form.itemId"
></SaleUnit>
</el-tab-pane>
<el-tab-pane
label=
"工厂信息"
>
<Factory
:optType=
"optType"
:itemId=
"form.itemId"
></Factory>
<el-tab-pane
label=
"工厂信息"
name=
"Factory"
>
<Factory
ref=
"Factory"
:optType=
"optType"
:itemId=
"form.itemId"
></Factory>
</el-tab-pane>
<!-- <el-tab-pane label="客户信息">
<Customer :optType="optType" :itemId="form.itemId"></Customer>
</el-tab-pane>-->
<el-tab-pane
label=
"产品外观"
>
<Look
ref=
"
l
ook"
:optType=
"optType"
:itemId=
"form.itemId"
></Look>
<el-tab-pane
label=
"产品外观"
name=
"Look"
>
<Look
ref=
"
L
ook"
:optType=
"optType"
:itemId=
"form.itemId"
></Look>
</el-tab-pane>
<el-tab-pane
label=
"排版参数"
>
<el-tab-pane
label=
"排版参数"
name=
"PublishedConf"
>
<PublishedConf
ref=
"
p
ublishedConf"
ref=
"
P
ublishedConf"
:optType=
"optType"
:itemId=
"form.itemId"
></PublishedConf>
</el-tab-pane>
<el-tab-pane
label=
"正面颜色"
>
<FaceColor
:optType=
"optType"
:itemId=
"form.itemId"
></FaceColor>
<el-tab-pane
label=
"正面颜色"
name=
"FaceColor"
>
<FaceColor
ref=
"FaceColor"
:optType=
"optType"
:itemId=
"form.itemId"
></FaceColor>
</el-tab-pane>
<el-tab-pane
label=
"反面颜色"
>
<BackFaceColor
:optType=
"optType"
:itemId=
"form.itemId"
></BackFaceColor>
<el-tab-pane
label=
"反面颜色"
name=
"BackFaceColor"
>
<BackFaceColor
ref=
"BackFaceColor"
:optType=
"optType"
:itemId=
"form.itemId"
></BackFaceColor>
</el-tab-pane>
<el-tab-pane
label=
"客户loss"
name=
"CustomerLoss"
>
<CustomerLoss
ref=
"CustomerLoss"
:optType=
"optType"
:itemId=
"form.itemId"
></CustomerLoss>
</el-tab-pane>
<el-tab-pane
label=
"SAP销售特性"
name=
"SapSaleProperty"
>
<SapPropertyData
ref=
"SapSaleProperty"
/>
</el-tab-pane>
<el-tab-pane
label=
"SAP采购特性"
name=
"SapPurchaseProperty"
>
<SapPropertyData
ref=
"SapPurchaseProperty"
/>
</el-tab-pane>
<el-tab-pane
label=
"SAP物控特性"
name=
"SapPMCProperty"
>
<SapPropertyData
ref=
"SapPMCProperty"
/>
</el-tab-pane>
<el-tab-pane
label=
"SAP仓储特性"
name=
"SapStorageProperty"
>
<SapPropertyData
ref=
"SapStorageProperty"
/>
</el-tab-pane>
<el-tab-pane
label=
"
客户loss
"
>
<
CustomerLoss
:optType=
"optType"
:itemId=
"form.itemId"
></CustomerLoss
>
<el-tab-pane
label=
"
SAP品控特性"
name=
"SapQAProperty
"
>
<
SapPropertyData
ref=
"SapQAProperty"
/
>
</el-tab-pane>
<el-tab-pane
label=
"SAP
特性"
name=
"Sap
Property"
>
<SapProperty
ref=
"Sap
Property"
/>
<el-tab-pane
label=
"SAP
财务特性"
name=
"SapFinance
Property"
>
<SapProperty
Data
ref=
"SapFinance
Property"
/>
</el-tab-pane>
<el-tab-pane
label=
"SOP"
>
<SOPTab
:itemId=
"form.itemId"
:optType=
"optType"
></SOPTab>
<el-tab-pane
label=
"SOP"
name=
"SOP"
>
<SOPTab
ref=
"SOP"
:itemId=
"form.itemId"
:optType=
"optType"
></SOPTab>
</el-tab-pane>
</el-tabs>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -632,7 +640,6 @@ import FaceColor from "./components/faceColor.vue";
import
BackFaceColor
from
"./components/backFaceColor.vue"
;
import
CustomerLoss
from
"./components/customerLoss.vue"
;
import
ItemBom
from
"./components/itembom.vue"
;
import
SapProperty
from
'./components/sapProperty.vue'
import
SOPTab
from
"./components/sop.vue"
;
import
{
listAllUnitmeasure
}
from
"@/api/mes/md/unitmeasure"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
...
...
@@ -645,7 +652,6 @@ export default {
name
:
"MdItem"
,
dicts
:
[
"sys_yes_no"
,
"mes_item_product"
],
components
:
{
SapProperty
,
Treeselect
,
BaseInfo
,
SpecProperty
,
...
...
@@ -658,7 +664,7 @@ export default {
BackFaceColor
,
CustomerLoss
,
ItemBom
,
SOPTab
,
SOPTab
},
data
()
{
return
{
...
...
@@ -882,18 +888,18 @@ export default {
if
(
valid
)
{
if
(
this
.
form
.
itemId
!=
undefined
)
{
//基本信息保存
const
baseInfoData
=
await
this
.
$refs
[
"
b
aseInfo"
].
getBaseInfoData
();
const
baseInfoData
=
await
this
.
$refs
[
"
B
aseInfo"
].
getBaseInfoData
();
baseInfoData
.
itemId
=
this
.
form
.
itemId
;
//产品外观保存
const
lookData
=
await
this
.
$refs
[
"
l
ook"
].
getLookFormData
();
const
lookData
=
await
this
.
$refs
[
"
L
ook"
].
getLookFormData
();
lookData
.
itemId
=
this
.
form
.
itemId
;
//产品参数配置保存 publishedConf
const
publishedConfData
=
await
this
.
$refs
[
"
p
ublishedConf"
].
getPublishedConfData
();
const
publishedConfData
=
await
this
.
$refs
[
"
P
ublishedConf"
].
getPublishedConfData
();
publishedConfData
.
itemId
=
this
.
form
.
itemId
;
//销售单位转换保存
const
saleUnit
=
await
this
.
$refs
[
"
s
aleUnit"
].
getSaleUnitFormData
();
const
saleUnit
=
await
this
.
$refs
[
"
S
aleUnit"
].
getSaleUnitFormData
();
saleUnit
.
itemId
=
this
.
form
.
itemId
;
const
params
=
{
...
...
@@ -990,7 +996,19 @@ export default {
}
},
onTabClick
()
{
this
.
$refs
[
this
.
activeName
].
init
&&
this
.
$refs
[
this
.
activeName
].
init
(
this
.
form
.
itemId
)
if
(
this
.
activeName
===
'SapSaleProperty'
)
{
this
.
$refs
.
SapSaleProperty
.
init
(
5
,
this
.
form
.
itemId
,
this
.
form
)
}
else
if
(
this
.
activeName
===
'SapPurchaseProperty'
)
{
this
.
$refs
.
SapPurchaseProperty
.
init
(
6
,
this
.
form
.
itemId
,
this
.
form
)
}
else
if
(
this
.
activeName
===
'SapPMCProperty'
){
this
.
$refs
.
SapPMCProperty
.
init
(
7
,
this
.
form
.
itemId
,
this
.
form
)
}
else
if
(
this
.
activeName
===
'SapStorageProperty'
)
{
this
.
$refs
.
SapStorageProperty
.
init
(
8
,
this
.
form
.
itemId
,
this
.
form
)
}
else
if
(
this
.
activeName
===
'SapQAProperty'
)
{
this
.
$refs
.
SapQAProperty
.
init
(
9
,
this
.
form
.
itemId
,
this
.
form
)
}
else
if
(
this
.
activeName
===
'SapFinanceProperty'
)
{
this
.
$refs
.
SapFinanceProperty
.
init
(
10
,
this
.
form
.
itemId
,
this
.
form
)
}
//else this.$refs[this.activeName].init && this.$refs[this.activeName].init(this.form)
}
},
};
...
...
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