Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
4d126849
Commit
4d126849
authored
Aug 04, 2021
by
季圣华
Browse files
优化商品的多属性选择器
parent
641d5c5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/material/modules/MaterialModal.vue
View file @
4d126849
...
...
@@ -299,7 +299,7 @@
validateRules
:
[{
required
:
true
,
message
:
'
${title}不能为空
'
}]
},
{
title
:
'
多属性
'
,
key
:
'
sku
'
,
width
:
'
12%
'
,
type
:
FormTypes
.
input
,
defaultValue
:
''
,
readonly
:
true
title
:
'
多属性
'
,
key
:
'
sku
'
,
width
:
'
12%
'
,
type
:
FormTypes
.
input
,
defaultValue
:
''
,
readonly
:
true
,
placeholder
:
'
点击生成条码赋值
'
},
{
title
:
'
采购价
'
,
key
:
'
purchaseDecimal
'
,
width
:
'
12%
'
,
type
:
FormTypes
.
input
,
defaultValue
:
''
,
placeholder
:
'
请输入${title}
'
...
...
@@ -364,6 +364,8 @@
])
},
add
()
{
//隐藏多属性
this
.
meTable
.
columns
[
2
].
type
=
FormTypes
.
hidden
// 默认新增一条数据
this
.
getAllTable
().
then
(
editableTables
=>
{
editableTables
[
0
].
add
()
...
...
@@ -412,6 +414,11 @@
requestMeTableData
(
url
,
params
,
tab
)
{
tab
.
loading
=
true
getAction
(
url
,
params
).
then
(
res
=>
{
for
(
let
i
=
0
;
i
<
res
.
data
.
rows
.
length
;
i
++
)
{
if
(
res
.
data
.
rows
[
i
].
sku
)
{
this
.
meTable
.
columns
[
2
].
type
=
FormTypes
.
input
}
}
tab
.
dataSource
=
res
.
data
.
rows
||
[]
}).
finally
(()
=>
{
tab
.
loading
=
false
...
...
@@ -624,6 +631,11 @@
},
onSkuChange
(
checked
)
{
this
.
skuSwitch
=
checked
if
(
checked
)
{
this
.
meTable
.
columns
[
2
].
type
=
FormTypes
.
input
}
else
{
this
.
meTable
.
columns
[
2
].
type
=
FormTypes
.
hidden
}
},
onBarCodeChange
(
checked
)
{
let
unit
=
this
.
form
.
getFieldValue
(
'
unit
'
)
...
...
Write
Preview
Supports
Markdown
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