Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a9a98f1c
authored
Apr 26, 2023
by
张晓玮
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'zhangxw_dev_v4.20.0' into 'dev_v4.20.0'
bug修改 See merge request
!150
2 parents
f501cdbd
63078459
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
55 additions
and
39 deletions
src/api/productManage.js
src/views/goods/grounding/components/groundingForm.vue
src/views/goods/grounding/editGrounding.vue
src/views/goods/grounding/index.vue
src/views/goods/productManage/components/multipleSpecificationForm.vue
src/views/goods/productManage/components/singleSpecificationForm.vue
src/views/goods/productManage/components/specifications.vue
src/views/goods/productManage/update.vue
src/api/productManage.js
View file @
a9a98f1
...
@@ -10,11 +10,11 @@ export function getProductManageList(data) {
...
@@ -10,11 +10,11 @@ export function getProductManageList(data) {
// 新增产品
// 新增产品
export
function
addProductManage
(
data
)
{
export
function
addProductManage
(
data
)
{
data
.
method
=
`
${
path
}
productManager.add`
data
.
method
=
`
${
path
}
productManager.add`
return
request
(
data
)
return
request
(
data
,
'post'
)
}
}
// 编辑产品
// 编辑产品
export
function
UpdateProductManage
(
data
)
{
export
function
UpdateProductManage
(
data
)
{
data
.
method
=
`
${
path
}
productManager.update`
data
.
method
=
`
${
path
}
productManager.update`
return
request
(
data
)
return
request
(
data
,
'post'
)
}
}
\ No newline at end of file
\ No newline at end of file
src/views/goods/grounding/components/groundingForm.vue
View file @
a9a98f1
...
@@ -75,12 +75,10 @@
...
@@ -75,12 +75,10 @@
<el-select
v-else-if=
"item.type === 'select'"
<el-select
v-else-if=
"item.type === 'select'"
v-model=
"formData[item.name]"
v-model=
"formData[item.name]"
:clearable=
"item.isClear"
:clearable=
"item.isClear"
:remote=
"item.name == 'merchantId'"
:placeholder=
"'请选择' + item.label"
:placeholder=
"'请选择' + item.label"
@
change=
"selectAddAttr($event, item)"
@
change=
"selectAddAttr($event, item)"
:style=
"
{'width': item.width || formItemWidth}"
:style=
"
{'width': item.width || formItemWidth}"
filterable
filterable>
:remote-method="remoteMethod">
<el-option
v-for=
"subItem in item.optionList"
<el-option
v-for=
"subItem in item.optionList"
:key=
"subItem[item.optionId]"
:key=
"subItem[item.optionId]"
:label=
"subItem[item.optionLabel]"
:label=
"subItem[item.optionLabel]"
...
@@ -313,20 +311,20 @@ export default {
...
@@ -313,20 +311,20 @@ export default {
})
})
},
},
// 搜索上架门店
// 搜索上架门店
remoteMethod
(
queryString
)
{
//
remoteMethod(queryString) {
if
(
queryString
)
{
//
if (queryString) {
this
.
loading
=
true
//
this.loading = true
setTimeout
(()
=>
{
//
setTimeout(() => {
this
.
loading
=
false
//
this.loading = false
var
params
=
{
currentPage
:
1
,
pageSize
:
1000
,
merchantName
:
queryString
}
//
var params = { currentPage: 1, pageSize: 1000, merchantName: queryString }
commodityAddSeviceMerchant
(
params
).
then
(
res
=>
{
//
commodityAddSeviceMerchant(params).then(res => {
this
.
formList
[
0
].
formBlock
[
0
].
optionList
=
res
.
list
||
[]
//
this.formList[0].formBlock[0].optionList = res.list || []
})
//
})
},
600
);
//
}, 600);
}
else
{
//
} else {
this
.
formList
[
0
].
formBlock
[
0
].
optionList
=
[]
//
this.formList[0].formBlock[0].optionList = []
}
//
}
},
//
},
// 修复直接调用可以会因为没有对应方法报错的问题
// 修复直接调用可以会因为没有对应方法报错的问题
input
(
event
,
item
)
{
input
(
event
,
item
)
{
item
.
handleInput
&&
this
.
handleInput
(
event
,
item
)
item
.
handleInput
&&
this
.
handleInput
(
event
,
item
)
...
...
src/views/goods/grounding/editGrounding.vue
View file @
a9a98f1
<!-- 上架编辑 -->
<!-- 上架编辑 -->
<
template
>
<
template
>
<d2-container
class=
"edit-commodity"
v-loading=
"
$store.state.d2admin.loading.value
"
>
<d2-container
class=
"edit-commodity"
v-loading=
"
!show
"
>
<div
class=
""
v-if=
"show"
>
<div
class=
""
v-if=
"show"
>
<grounding-form
<grounding-form
ref=
"d2GroundingForm"
ref=
"d2GroundingForm"
...
@@ -23,6 +23,7 @@ import { BaseData, positionTypeList } from '@/common/constants.js'
...
@@ -23,6 +23,7 @@ import { BaseData, positionTypeList } from '@/common/constants.js'
import
{
mapActions
}
from
'vuex'
import
{
mapActions
}
from
'vuex'
import
{
deepClone
}
from
'@/common/util'
import
{
deepClone
}
from
'@/common/util'
import
{
addOrUpdateAPI
,
getAllGroupByCategory
}
from
'@api/grounding'
import
{
addOrUpdateAPI
,
getAllGroupByCategory
}
from
'@api/grounding'
import
{
getShopMerchantList
}
from
'@api/deviceManage'
export
default
{
export
default
{
name
:
'editGrounding'
,
name
:
'editGrounding'
,
components
:
{
components
:
{
...
@@ -41,7 +42,7 @@ export default {
...
@@ -41,7 +42,7 @@ export default {
isRequired
:
true
,
isRequired
:
true
,
type
:
'select'
,
type
:
'select'
,
isClear
:
false
,
isClear
:
false
,
optionList
:
[]
,
optionList
:
this
.
merchantServiceList
,
optionId
:
'merchantId'
,
optionId
:
'merchantId'
,
optionLabel
:
'merchantName'
,
optionLabel
:
'merchantName'
,
width
:
'432px'
width
:
'432px'
...
@@ -180,14 +181,15 @@ export default {
...
@@ -180,14 +181,15 @@ export default {
recoveryCostPrice
:
''
,
recoveryCostPrice
:
''
,
reconcilyCostPrice
:
''
reconcilyCostPrice
:
''
},
},
secondGoodsList
:
[]
secondGoodsList
:
[],
merchantServiceList
:
[]
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getProductServiceItemList
()
this
.
getProductServiceItemList
()
this
.
getBaseData
()
this
.
getBaseData
()
let
id
=
this
.
$route
.
params
.
id
let
id
=
this
.
$route
.
params
.
id
this
.
get
ProductServiceItem
List
()
this
.
get
AllShopMerchant
List
()
if
(
!
id
)
{
if
(
!
id
)
{
this
.
getGoodsList
()
this
.
getGoodsList
()
}
else
{
}
else
{
...
@@ -199,9 +201,17 @@ export default {
...
@@ -199,9 +201,17 @@ export default {
get
:
'd2admin/base/get'
,
get
:
'd2admin/base/get'
,
close
:
'd2admin/page/close'
close
:
'd2admin/page/close'
}),
}),
// 获取权益升级类目 服务项目
async
getProductServiceItemList
()
{
async
getProductServiceItemList
()
{
this
.
productServiceItemList
=
await
this
.
get
(
BaseData
.
productServiceItemList
)
this
.
productServiceItemList
=
await
this
.
get
(
BaseData
.
productServiceItemList
)
},
},
// 获取全部4s店
getAllShopMerchantList
()
{
getShopMerchantList
({}).
then
(
res
=>
{
let
formList
=
this
.
editForm
[
0
].
formBlock
formList
[
formList
.
findIndex
(
val
=>
val
.
name
==
'merchantId'
)].
optionList
=
res
||
[]
})
},
// 获取上架商品数据
// 获取上架商品数据
getGoodsList
(
flag
)
{
getGoodsList
(
flag
)
{
getAllGroupByCategory
({}).
then
(
res
=>
{
getAllGroupByCategory
({}).
then
(
res
=>
{
...
@@ -211,6 +221,7 @@ export default {
...
@@ -211,6 +221,7 @@ export default {
const
twoChildren
=
[]
const
twoChildren
=
[]
item
.
baseGoods
&&
item
.
baseGoods
.
forEach
(
val
=>
{
item
.
baseGoods
&&
item
.
baseGoods
.
forEach
(
val
=>
{
val
.
upgradeGoodsList
&&
val
.
upgradeGoodsList
.
forEach
(
v
=>
{
val
.
upgradeGoodsList
&&
val
.
upgradeGoodsList
.
forEach
(
v
=>
{
let
positionNamesArr
=
v
.
goodsType
==
1
?
deepClone
(
positionTypeList
).
filter
(
val
=>
res
.
upgradeGoods
.
position
==
val
.
position
)
:
[]
twoChildren
.
push
({
twoChildren
.
push
({
value
:
v
.
id
,
value
:
v
.
id
,
label
:
v
.
upgradeGoodsName
,
label
:
v
.
upgradeGoodsName
,
...
@@ -221,13 +232,14 @@ export default {
...
@@ -221,13 +232,14 @@ export default {
goodsTypeName
:
val
.
goodsInfo
?.
goodsTypeName
,
goodsTypeName
:
val
.
goodsInfo
?.
goodsTypeName
,
upgradePrice
:
v
.
upgradePrice
,
upgradePrice
:
v
.
upgradePrice
,
purchasePrice
:
v
.
purchasePrice
,
purchasePrice
:
v
.
purchasePrice
,
position
:
v
.
position
position
Names
:
positionNamesArr
.
length
?
positionNamesArr
[
0
]?.
confName
:
''
// 部位
}
}
})
})
})
})
})
})
item
.
children
=
twoChildren
item
.
children
=
twoChildren
})
})
console
.
log
(
res
)
this
.
secondGoodsList
=
res
this
.
secondGoodsList
=
res
if
(
flag
)
{
if
(
flag
)
{
this
.
decorate
(
flag
,
res
)
this
.
decorate
(
flag
,
res
)
...
@@ -284,7 +296,6 @@ export default {
...
@@ -284,7 +296,6 @@ export default {
},
},
getDetailInfo
(
id
)
{
getDetailInfo
(
id
)
{
getMerchantGoodsInfo
({
id
}).
then
(
res
=>
{
getMerchantGoodsInfo
({
id
}).
then
(
res
=>
{
this
.
editForm
[
0
].
formBlock
[
0
].
optionList
=
[{
merchantId
:
res
.
merchantId
,
merchantName
:
res
.
merchantName
}]
||
[]
let
productType
=
[]
let
productType
=
[]
let
positionNamesArr
=
res
?.
goodsType
==
1
?
deepClone
(
positionTypeList
).
filter
(
val
=>
res
.
upgradeGoods
.
position
==
val
.
position
)
:
[]
let
positionNamesArr
=
res
?.
goodsType
==
1
?
deepClone
(
positionTypeList
).
filter
(
val
=>
res
.
upgradeGoods
.
position
==
val
.
position
)
:
[]
if
(
res
?.
upgradeProductFlag
==
'Y'
)
productType
.
push
(
2
)
if
(
res
?.
upgradeProductFlag
==
'Y'
)
productType
.
push
(
2
)
...
...
src/views/goods/grounding/index.vue
View file @
a9a98f1
...
@@ -91,7 +91,6 @@
...
@@ -91,7 +91,6 @@
<
/d2-container
>
<
/d2-container
>
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
commodityAddSeviceMerchant
}
from
'@api/commodity'
import
{
getProductTypeBySceneId
,
getList
}
from
'@api/product'
import
{
getProductTypeBySceneId
,
getList
}
from
'@api/product'
import
{
getGroundingManageList
,
updateGoodsStatus
,
batchReviewAPI
,
delGroundingById
}
from
'@api/grounding'
import
{
getGroundingManageList
,
updateGoodsStatus
,
batchReviewAPI
,
delGroundingById
}
from
'@api/grounding'
import
{
deepClone
,
Util
}
from
'@/common/util'
import
{
deepClone
,
Util
}
from
'@/common/util'
...
@@ -99,6 +98,7 @@ import { sceneCodeList, sceneList } from '@/common/constants.js'
...
@@ -99,6 +98,7 @@ import { sceneCodeList, sceneList } from '@/common/constants.js'
import
{
getParkStore
}
from
'@api/editCustomer'
import
{
getParkStore
}
from
'@api/editCustomer'
import
{
mapActions
,
mapState
}
from
'vuex'
import
{
mapActions
,
mapState
}
from
'vuex'
import
{
baseSupplyModeList
,
upgradeSupplyModeList
}
from
'./constants/data'
import
{
baseSupplyModeList
,
upgradeSupplyModeList
}
from
'./constants/data'
import
{
getShopMerchantList
}
from
'@api/deviceManage'
export
default
{
export
default
{
name
:
'groundingIndex'
,
name
:
'groundingIndex'
,
data
()
{
data
()
{
...
@@ -114,7 +114,8 @@ export default {
...
@@ -114,7 +114,8 @@ export default {
goodsType
:
''
,
goodsType
:
''
,
goodsAlias
:
''
,
goodsAlias
:
''
,
status
:
''
,
status
:
''
,
yqMerchantId
:
''
yqMerchantId
:
''
,
goodsSource
:
0
}
,
}
,
getListApi
:
getGroundingManageList
,
getListApi
:
getGroundingManageList
,
drawerDetailVisible
:
false
,
drawerDetailVisible
:
false
,
...
@@ -240,7 +241,7 @@ export default {
...
@@ -240,7 +241,7 @@ export default {
}
,
}
,
width
:
130
width
:
130
}
,
{
}
,
{
label
:
'所属
素材
'
,
label
:
'所属
系列
'
,
parentProp
:
'goodsInfo'
,
parentProp
:
'goodsInfo'
,
prop
:
'goodsName'
,
prop
:
'goodsName'
,
width
:
140
width
:
140
...
@@ -374,11 +375,8 @@ export default {
...
@@ -374,11 +375,8 @@ export default {
this
.
getOptionsList
()
this
.
getOptionsList
()
}
)
}
)
// 获取门店
// 获取门店
commodityAddSeviceMerchant
({
getShopMerchantList
({
}
).
then
(
res
=>
{
currentPage
:
1
,
this
.
baseData
.
merchantServiceList
=
res
pageSize
:
9999
}
).
then
(
res
=>
{
this
.
baseData
.
merchantServiceList
=
res
.
list
this
.
getOptionsList
()
this
.
getOptionsList
()
}
)
}
)
// 获取全部分类
// 获取全部分类
...
@@ -448,7 +446,8 @@ export default {
...
@@ -448,7 +446,8 @@ export default {
goodsType
:
''
,
goodsType
:
''
,
goodsAlias
:
''
,
goodsAlias
:
''
,
status
:
''
,
status
:
''
,
yqMerchantId
:
''
yqMerchantId
:
''
,
goodsSource
:
0
}
}
}
,
}
,
beforeSearchFn
()
{
beforeSearchFn
()
{
...
...
src/views/goods/productManage/components/multipleSpecificationForm.vue
View file @
a9a98f1
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<span>
可选择的服务项目(多选)
</span>
<span>
可选择的服务项目(多选)
</span>
</td>
</td>
<!-- 仅分发至单店时,隐藏采购价/卷,无需填写 -->
<!-- 仅分发至单店时,隐藏采购价/卷,无需填写 -->
<td
:style=
"
{ width: specsWidth }" v-show="goodsInfoData.shoppingMallFlag !== '0'">
<td
:style=
"
{ width: specsWidth }" v-show="
!equitySceneType.includes(goodsInfoData.goodsType)
&&
goodsInfoData.shoppingMallFlag !== '0'">
<span
class=
"color-red"
>
*
</span>
<span
class=
"color-red"
>
*
</span>
<el-input
<el-input
style=
"width: 80px;"
style=
"width: 80px;"
...
@@ -227,7 +227,7 @@
...
@@ -227,7 +227,7 @@
</el-popover>
</el-popover>
</el-select>
</el-select>
</td>
</td>
<td
:style=
"
{ width: specsWidth }" v-show="goodsInfoData.shoppingMallFlag !== '0'">
<td
:style=
"
{ width: specsWidth }" v-show="
!equitySceneType.includes(goodsInfoData.goodsType)
&&
goodsInfoData.shoppingMallFlag !== '0'">
<el-input
placeholder=
"采购价"
<el-input
placeholder=
"采购价"
size=
"small"
size=
"small"
:class=
"
{ 'w-80-per': true, 'w-100-per': true, 'border-red': (filterEmpty(subItem.purchasePrice))
&&
subItem.purchasePriceEmpty }"
:class=
"
{ 'w-80-per': true, 'w-100-per': true, 'border-red': (filterEmpty(subItem.purchasePrice))
&&
subItem.purchasePriceEmpty }"
...
...
src/views/goods/productManage/components/singleSpecificationForm.vue
View file @
a9a98f1
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<span
class=
"color-red"
>
*
</span>
<span
class=
"color-red"
>
*
</span>
<span>
可选择的服务项目(多选)
</span>
<span>
可选择的服务项目(多选)
</span>
</td>
</td>
<td
:style=
"
{ width: specsWidth }" v-show="goodsInfoData.shoppingMallFlag !== '0'">
<td
:style=
"
{ width: specsWidth }" v-show="
!equitySceneType.includes(goodsInfoData.goodsType)
&&
goodsInfoData.shoppingMallFlag !== '0'">
<span
class=
"color-red"
>
*
</span>
<span
class=
"color-red"
>
*
</span>
<span>
采购价/卷
</span>
<span>
采购价/卷
</span>
</td>
</td>
...
...
src/views/goods/productManage/components/specifications.vue
View file @
a9a98f1
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<el-button
icon=
"el-icon-plus"
v-if=
"goodsInfoData.specificationType == '1'"
@
click=
"addShop"
>
新增商品
</el-button>
<el-button
icon=
"el-icon-plus"
v-if=
"goodsInfoData.specificationType == '1'"
@
click=
"addShop"
>
新增商品
</el-button>
<div
class=
"assi_type"
>
<div
class=
"assi_type"
>
<span>
规格:
</span>
<span>
规格:
</span>
<el-radio-group
v-model=
"goodsInfoData.specificationType"
>
<el-radio-group
v-model=
"goodsInfoData.specificationType"
@
change=
"changeRadio"
>
<el-radio
:label=
"'1'"
>
单规格
</el-radio>
<el-radio
:label=
"'1'"
>
单规格
</el-radio>
<el-radio
:label=
"'2'"
>
多规格
</el-radio>
<el-radio
:label=
"'2'"
>
多规格
</el-radio>
</el-radio-group>
</el-radio-group>
...
@@ -73,6 +73,14 @@ export default {
...
@@ -73,6 +73,14 @@ export default {
// 新增商品
// 新增商品
addShop
()
{
addShop
()
{
this
.
$refs
[
'singleSpecificationFormRef'
].
addShop
()
this
.
$refs
[
'singleSpecificationFormRef'
].
addShop
()
},
// 切换规格将数据清空
changeRadio
(
value
)
{
if
(
value
==
1
)
{
// 单规格
this
.
setUpdateGoodsInfo
({
specificationSingleDetailList
:
[],
goodsSpecificationSingleList
:
[]})
}
else
{
// 多规格
this
.
setUpdateGoodsInfo
({
specificationDetailList
:
[]})
}
}
}
}
}
}
}
...
...
src/views/goods/productManage/update.vue
View file @
a9a98f1
<!-- 商品编辑 -->
<!-- 商品编辑 -->
<
template
>
<
template
>
<d2-container
class=
"edit-productManage"
>
<d2-container
class=
"edit-productManage"
v-loading=
"$store.state.d2admin.loading.value"
>
<div
v-if=
"show"
>
<div
v-if=
"show"
>
<!-- SPU -->
<!-- SPU -->
<sourceMaterial
ref=
"source-material-form"
:addOrEdit=
"addOrEdit"
:formData=
"productFormData"
/>
<sourceMaterial
ref=
"source-material-form"
:addOrEdit=
"addOrEdit"
:formData=
"productFormData"
/>
...
...
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