Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-purchase
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 34904a8e
authored
Aug 10, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改
1 parent
13877386
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
11 deletions
src/views/purchaseGrounding/add.vue
src/views/purchaseGrounding/add.vue
View file @
34904a8
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
</div>
</div>
<div
slot=
"goodsInfo"
>
<div
slot=
"goodsInfo"
>
<div
class=
"goodsInfo-box"
>
<div
class=
"goodsInfo-box"
>
<div
class=
"item"
v-for=
"(subItem, subIndex) in
g
oodsDetailForm"
:key=
"subIndex"
>
<div
class=
"item"
v-for=
"(subItem, subIndex) in
copyG
oodsDetailForm"
:key=
"subIndex"
>
<div
v-if=
"subItem.addHtml"
class=
"item_box"
>
<div
v-if=
"subItem.addHtml"
class=
"item_box"
>
<div
class=
"label"
>
{{
(
membraneTypeList
.
includes
(
selectedGoodsInfo
[
'goodsType'
])
?
subItem
.
label
+
`(元)/卷`
:
(
subItem
.
label
+
'(元)/件'
))
}}
:
</div>
<div
class=
"label"
>
{{
(
membraneTypeList
.
includes
(
selectedGoodsInfo
[
'goodsType'
])
?
subItem
.
label
+
`(元)/卷`
:
(
subItem
.
label
+
'(元)/件'
))
}}
:
</div>
<div
class=
"value"
>
{{
priceFilter
(
selectedGoodsInfo
[
subItem
.
value
])
}}
</div>
<div
class=
"value"
>
{{
priceFilter
(
selectedGoodsInfo
[
subItem
.
value
])
}}
</div>
...
@@ -59,8 +59,8 @@
...
@@ -59,8 +59,8 @@
<GLFooter>
<GLFooter>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
取消
</el-button>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
取消
</el-button>
<!-- 新增/草稿显示 -->
<!-- 新增/草稿显示 -->
<el-button
v-if=
"editType == 'add' || editForm.status == 0"
type=
"primary"
@
click=
"handleConfirm(true)"
plain
size=
"medium"
:loading=
"loading"
>
存
草稿
</el-button>
<el-button
v-if=
"editType == 'add' || editForm.status == 0"
type=
"primary"
@
click=
"handleConfirm(true)"
plain
size=
"medium"
:loading=
"loading"
>
草稿
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm(false)"
size=
"medium"
:loading=
"loading"
>
提交
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm(false)"
size=
"medium"
:loading=
"loading"
>
保存上架
</el-button>
</GLFooter>
</GLFooter>
<!-- 门店弹窗 -->
<!-- 门店弹窗 -->
<relate-store-dialog
v-if=
"relateStoreVisible"
ref=
"relateStore"
:relateStoreVisible=
"relateStoreVisible"
:storeApi=
"storeApi"
:storeSearchForm=
"storeSearchForm"
:storeSelected=
"selectedList"
@
handleRelateStoreConfirm=
"handleRelateStoreConfirm"
@
handleRelateStoreClose=
"handleRelateStoreClose"
>
<relate-store-dialog
v-if=
"relateStoreVisible"
ref=
"relateStore"
:relateStoreVisible=
"relateStoreVisible"
:storeApi=
"storeApi"
:storeSearchForm=
"storeSearchForm"
:storeSelected=
"selectedList"
@
handleRelateStoreConfirm=
"handleRelateStoreConfirm"
@
handleRelateStoreClose=
"handleRelateStoreClose"
>
...
@@ -223,14 +223,6 @@ export default {
...
@@ -223,14 +223,6 @@ export default {
addHtml
:
'goodsInfo'
addHtml
:
'goodsInfo'
})
})
}
}
if
(
val
)
{
let
index
=
this
.
editFormData
.
findIndex
(
val
=>
val
.
name
==
'shopPurchasePrice'
)
if
(
this
.
membraneTypeList
.
includes
(
this
.
selectedGoodsInfo
?.
goodsType
))
{
// 所选商品是膜类 门店采购价单位修改
if
(
index
>
-
1
)
this
.
editFormData
[
index
].
label
=
'门店采购价(元)/卷'
}
else
{
if
(
index
>
-
1
)
this
.
editFormData
[
index
].
label
=
'门店采购价(元)/件'
}
}
},
},
deep
:
true
deep
:
true
},
},
...
@@ -243,6 +235,23 @@ export default {
...
@@ -243,6 +235,23 @@ export default {
}
}
},
},
deep
:
true
deep
:
true
},
selectedGoodsInfo
:
{
handler
(
val
)
{
this
.
setUnit
()
// 修改采购价单位
// 嘀加采购价字段
let
copyGoodsDetailForm
=
this
.
$common
.
utils
.
deepClone
(
this
.
goodsDetailForm
)
if
(
this
.
editForm
?.
goodsSource
==
1
)
{
// 自营
let
index
=
copyGoodsDetailForm
.
findIndex
(
val
=>
val
.
value
==
'purchasePrice'
)
if
(
index
>
-
1
)
{
copyGoodsDetailForm
.
splice
(
index
,
1
)
this
.
copyGoodsDetailForm
=
copyGoodsDetailForm
}
}
else
if
(
this
.
editForm
?.
goodsSource
==
0
)
{
// 嘀加
this
.
copyGoodsDetailForm
=
copyGoodsDetailForm
}
},
deep
:
true
}
}
},
},
...
@@ -281,6 +290,14 @@ export default {
...
@@ -281,6 +290,14 @@ export default {
return
true
return
true
}
}
},
},
setUnit
()
{
let
index
=
this
.
editFormData
.
findIndex
(
val
=>
val
.
name
==
'shopPurchasePrice'
)
if
(
this
.
membraneTypeList
.
includes
(
this
.
selectedGoodsInfo
?.
goodsType
))
{
// 所选商品是膜类 门店采购价单位修改
if
(
index
>
-
1
)
this
.
editFormData
[
index
].
label
=
'门店采购价(元)/卷'
}
else
{
if
(
index
>
-
1
)
this
.
editFormData
[
index
].
label
=
'门店采购价(元)/件'
}
},
// 获取上架数据
// 获取上架数据
remoteMethod
(
query
)
{
remoteMethod
(
query
)
{
this
.
goodsNameKeyword
=
query
this
.
goodsNameKeyword
=
query
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment