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 4aff8c77
authored
Jul 26, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
月底版本需求开发联调
1 parent
5039460a
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
629 additions
and
171 deletions
src/api/grounding.js
src/api/merchant.js
src/api/sys.base.js
src/common/constants.js
src/router/modules/903_productManagement.js
src/store/modules/d2admin/modules/base.js
src/views/financeManage/financeDetailNew.vue
src/views/financeManage/financeList.vue
src/views/goods/grounding/components/batchCopyDialog.vue
src/views/goods/grounding/components/detail.vue
src/views/goods/grounding/components/groundingForm.vue
src/views/goods/grounding/components/relateStoreDialog.vue
src/views/goods/grounding/editGrounding.vue
src/views/goods/grounding/groundingDetail.vue
src/views/goods/grounding/index.vue
src/views/goods/productManage/components/drawerDetail.vue
src/views/goods/productManage/components/multipleSpecificationForm.vue
src/views/goods/productManage/components/productForm.vue
src/views/goods/productManage/components/singleSpecificationForm.vue
src/views/goods/productManage/components/sourceMaterial.vue
src/views/goods/productManage/components/specifications.vue
src/views/goods/productManage/list.vue
src/views/goods/productManage/update.vue
src/views/orderManage/carDamage.vue
src/views/orderManage/crowdfundDetail.vue
src/views/orderManage/order.vue
src/views/orderManage/orderDetail.vue
src/api/grounding.js
View file @
4aff8c7
...
...
@@ -59,4 +59,17 @@ export function getAllGoodsList(data) {
export
function
batchUpdateStatus
(
data
)
{
data
.
method
=
`
${
path
}
merchantGoodsInfo.updateBatchOffShelf`
return
request
(
data
,
'post'
)
}
// 批量复制
export
function
batchUpdateBatchCopy
(
data
)
{
data
.
method
=
`
${
path
}
merchantGoodsInfo.updateBatchCopy`
return
request
(
data
,
'post'
)
}
// 校验上架记录中是否已存在
export
function
checkGroundingLog
(
data
)
{
data
.
method
=
`
${
path
}
merchantGoodsInfo.existsCount`
return
request
(
data
,
'post'
)
}
\ No newline at end of file
src/api/merchant.js
View file @
4aff8c7
...
...
@@ -315,3 +315,9 @@ export function insertOrUpdateDiversionMerchantRef(data) {
data
.
method
=
`
${
path2
}
diversionMerchant.insertOrUpdateDiversionMerchantRef`
return
request
(
data
,
"post"
)
}
// 获取服务中心所有门店 支持园区店关键字搜索
export
function
getAccountMerchantList
(
data
)
{
data
.
method
=
`
${
path
}
merchant.page.withYq`
return
request
(
data
,
"post"
)
}
src/api/sys.base.js
View file @
4aff8c7
...
...
@@ -96,3 +96,9 @@ export function uploadPDF(data) {
data
.
method
=
`
${
path
}
smartcarlife.common.uploadPdf`
return
request
(
data
,
RequestMethods
.
POST
,
[
"file"
])
}
// 获取太阳膜类商品部位属性
export
function
getPositionList
(
data
)
{
data
.
method
=
`
${
path
}
smartcarlife.goodsPosition.list`
return
request
(
data
)
}
\ No newline at end of file
src/common/constants.js
View file @
4aff8c7
...
...
@@ -12,7 +12,8 @@ export const TYPE_NAME = "confType"
export
const
BaseData
=
{
channelType
:
"channelType"
,
productType
:
"productType"
,
productServiceItemList
:
"productServiceItemList"
productServiceItemList
:
"productServiceItemList"
,
positionTypeList
:
"positionTypeList"
// 太阳膜商品部位
}
/**
...
...
@@ -509,43 +510,43 @@ export const targetType = {
}
// 太阳膜部位
export
const
positionTypeList
=
[
{
position
:
1
,
confName
:
"前档玻璃"
,
deductionStandard
:
1
},
{
position
:
2
,
confName
:
"侧后档玻璃"
,
deductionStandard
:
2
},
{
position
:
3
,
confName
:
"单帖侧窗一个"
,
deductionStandard
:
0.4
},
{
position
:
4
,
confName
:
"单帖后档一个"
,
deductionStandard
:
0.8
},
{
position
:
5
,
confName
:
"单帖小天窗"
,
deductionStandard
:
0.4
},
{
position
:
6
,
confName
:
"单帖中天窗"
,
deductionStandard
:
0.8
},
{
position
:
7
,
confName
:
"单帖全景天窗"
,
deductionStandard
:
1
}
]
//
export const positionTypeList = [
//
{
//
position: 1,
//
confName: "前档玻璃",
//
deductionStandard: 1
//
},
//
{
//
position: 2,
//
confName: "侧后档玻璃",
//
deductionStandard: 2
//
},
//
{
//
position: 3,
//
confName: "单帖侧窗一个",
//
deductionStandard: 0.4
//
},
//
{
//
position: 4,
//
confName: "单帖后档一个",
//
deductionStandard: 0.8
//
},
//
{
//
position: 5,
//
confName: "单帖小天窗",
//
deductionStandard: 0.4
//
},
//
{
//
position: 6,
//
confName: "单帖中天窗",
//
deductionStandard: 0.8
//
},
//
{
//
position: 7,
//
confName: "单帖全景天窗",
//
deductionStandard: 1
//
}
//
]
// 太阳膜适用车型
export
const
applicableModelTypeList
=
[
{
...
...
src/router/modules/903_productManagement.js
View file @
4aff8c7
...
...
@@ -353,6 +353,14 @@ export const routerName = {
category
:
"Button"
,
type
:
"primary"
,
handle
:
"handleBatchOffShelf"
},
{
authId
:
"9030909"
,
parentId
:
"90309"
,
label
:
"批量复制"
,
category
:
"Button"
,
type
:
"primary"
,
handle
:
"handleBatchCopy"
}
],
component
:
_import
(
"goods/grounding/index"
)
...
...
src/store/modules/d2admin/modules/base.js
View file @
4aff8c7
...
...
@@ -5,7 +5,7 @@
* @Last Modified time: 2020-11-15 10:22:06
*/
import
{
getChannelType
,
getProductType
}
from
"@/api/sys.base"
import
{
getChannelType
,
getProductType
,
getPositionList
}
from
"@/api/sys.base"
// import {
// BaseData
// } from '@/common/constants'
...
...
@@ -19,7 +19,9 @@ export default {
// 渠道类型
channelType
:
[],
// 产品分类
productType
:
[]
productType
:
[],
// 太阳膜类商品部位
positionTypeList
:
[]
},
actions
:
{
/**
...
...
@@ -29,10 +31,15 @@ export default {
*/
init
({
state
,
dispatch
,
commit
})
{
return
new
Promise
(
async
(
resolve
)
=>
{
Promise
.
all
([
getChannelType
({}),
getProductType
({})]).
then
(
async
([
channelType
,
productType
])
=>
{
Promise
.
all
([
getChannelType
({}),
getProductType
({}),
getPositionList
({})]).
then
(
async
([
channelType
,
productType
,
positionTypeList
])
=>
{
positionTypeList
?.
forEach
(
val
=>
{
// 之前前端写死的数据 数据整理 不用改动很多
val
.
position
=
val
.
positionValue
val
.
confName
=
val
.
positionName
})
state
.
channelType
=
channelType
state
.
productType
=
productType
state
.
positionTypeList
=
positionTypeList
// console.log(productType, "productType")
await
dispatch
(
"save2db"
,
{
name
:
""
,
...
...
@@ -49,6 +56,7 @@ export default {
return
new
Promise
(
async
(
resolve
)
=>
{
state
.
channelType
=
[]
state
.
productType
=
[]
state
.
positionTypeList
=
[]
await
dispatch
(
"save2db"
,
{
name
:
""
,
value
:
state
...
...
@@ -101,8 +109,8 @@ export default {
state
=
(
await
dispatch
(
"getFromdb"
,
"base"
))
||
(
await
dispatch
(
"init"
))
}
const
{
channelType
,
productType
}
=
state
resolve
({
channelType
,
productType
})
const
{
channelType
,
productType
,
positionTypeList
}
=
state
resolve
({
channelType
,
productType
,
positionTypeList
})
})
},
/**
...
...
src/views/financeManage/financeDetailNew.vue
View file @
4aff8c7
...
...
@@ -20,6 +20,12 @@
{{
$$
(
detail
.
subOrder
,
'upgradeGoodsName'
)
}}
</td>
<td
class=
"lb"
>
部位
</td>
<td
class=
"lb"
>
{{
$$
(
detail
.
subOrder
,
'positionStr'
)
}}
</td>
<td
class=
"lb"
>
商品别名
</td>
<td
class=
"lb"
>
...
...
@@ -39,11 +45,11 @@
数量
</td>
<td>
{{
$$
(
detail
.
subOrder
,
'number'
)
}}
件
</td>
<td
rowspan=
"2"
<td
rowspan=
"2"
colspan=
"2"
class=
"lb"
>
支付金额
</td>
<td
rowspan=
"2"
>
<td
rowspan=
"2"
colspan=
"2"
>
{{
detail
.
totalPrice
?
'¥ '
+
detail
.
totalPrice
:
''
}}
</td>
</tr>
...
...
@@ -344,7 +350,7 @@
<
script
>
import
{
mapActions
}
from
'vuex'
import
{
Util
,
deepClone
}
from
'@/common/util'
import
{
shop4sDeductChargeFlagObj
,
partnerDeductChargeFlagObj
,
payType
,
sceneType
,
proportionType
,
targetType
}
from
'@/common/constants'
import
{
shop4sDeductChargeFlagObj
,
partnerDeductChargeFlagObj
,
payType
,
sceneType
,
proportionType
,
targetType
,
BaseData
}
from
'@/common/constants'
import
{
mainOrderDetail
,
subOrderDetail
}
from
'@api/finance'
export
default
{
name
:
'FinanceDetail'
,
...
...
@@ -382,21 +388,24 @@ export default {
// shop4sDeductChargeFlagObj: shop4sDeductChargeFlagObj,
// partnerDeductChargeFlagObj: partnerDeductChargeFlagObj,
ledgerData
:
[],
// 分账信息
reconciliationData
:
[]
// 对账信息
reconciliationData
:
[],
// 对账信息
positionTypeList
:
[]
// 商品部位字典
}
},
mounted
()
{
const
row
=
this
.
$route
.
params
.
rowInfo
console
.
log
(
row
)
this
.
getBaseData
()
this
.
isSubOrder
=
!
row
.
hasOwnProperty
(
'subOrderProfitAllocations'
)
this
.
getDetail
(
row
)
},
methods
:
{
...
mapActions
({
close
:
'd2admin/page/close'
}),
...
mapActions
(
"d2admin/base"
,
[
"get"
]),
async
getBaseData
()
{
this
.
positionTypeList
=
await
this
.
get
(
BaseData
.
positionTypeList
)
},
getDetail
(
row
)
{
if
(
this
.
$route
.
params
.
from
&&
this
.
$route
.
params
.
from
==
'orderSupplement'
)
{
// 从待补录订单列表跳转过来
mainOrderDetail
({
orderCode
:
row
.
inputtedOrderCode
}).
then
(
res
=>
{
...
...
@@ -422,6 +431,7 @@ export default {
if
(
res
.
goodsOrder
?.
payOrder
?.
successDate
)
{
res
.
goodsOrder
.
payOrder
.
successDate
=
Util
.
dateFormate
(
res
.
goodsOrder
.
payOrder
.
successDate
,
'YYYY-MM-DD HH:mm:ss'
)
}
res
.
subOrder
.
positionStr
=
this
.
positionTypeList
?.
filter
(
val
=>
val
.
position
==
res
.
subOrder
?.
upgradeGoodsPosition
)[
0
]?.
confName
||
'-'
this
.
detail
=
res
const
calculateds
=
res
.
expenseCategoryCalculateds
if
(
calculateds
&&
calculateds
.
length
>
0
)
{
...
...
@@ -502,7 +512,7 @@ export default {
background-color
:
#fafafa
;
}
&
.lb
{
width
:
6em
;
width
:
6
.5
em
;
text-align
:
center
;
background-color
:
#fafafa
;
}
...
...
src/views/financeManage/financeList.vue
View file @
4aff8c7
...
...
@@ -249,6 +249,13 @@
<span>
{{
scope
.
row
.
goodsName
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"goodsName"
label=
"部位"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
positionStr
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"upgradeGoodsAlias"
label=
"商品别名"
align=
"center"
>
...
...
@@ -792,7 +799,8 @@ export default {
shopProfitType_visible
:
true
,
// 列表字段:流量方比例
yq_visible
:
true
,
// 列表字段:园区店
/** 根据场景控制页面显示隐藏end */
sceneList
:
sceneList
sceneList
:
sceneList
,
positionTypeList
:
[]
// 商品部位数据
}
},
...
...
@@ -929,6 +937,7 @@ export default {
...
mapActions
(
"d2admin/base"
,
[
"get"
]),
async
getBaseData
()
{
this
.
baseData
.
channelTypeList
=
await
this
.
get
(
BaseData
.
channelType
)
this
.
positionTypeList
=
await
this
.
get
(
BaseData
.
positionTypeList
)
this
.
getOptionsList
()
},
handleAddClose
(
isRefresh
=
false
)
{
},
...
...
@@ -1017,7 +1026,7 @@ export default {
this
.
showFormData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
)
{
if
(
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
.
showFormData
[
index
].
optionLabel
]
!==
'全部'
this
.
baseData
[
item
.
optionsName
]
?
.
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
.
showFormData
[
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
.
showFormData
[
index
].
optionId
]
=
''
...
...
@@ -1077,6 +1086,7 @@ export default {
item
.
subOrderProfitAllocations
.
forEach
(
subItem
=>
{
subItem
.
uniqueKey
=
temp
++
subItem
=
this
.
numAddPrefix
(
subItem
)
subItem
.
positionStr
=
this
.
positionTypeList
?.
filter
(
val
=>
val
.
position
==
subItem
.
goodsPosition
)[
0
]?.
confName
||
'-'
})
}
item
=
this
.
numAddPrefix
(
item
)
...
...
src/views/goods/grounding/components/batchCopyDialog.vue
0 → 100644
View file @
4aff8c7
<
template
>
<d2-dialog
title=
"批量复制"
:is-visible
.
sync=
"batchCopyVisible"
width=
"600px"
btn-ok-label=
"确定"
@
confirmDialog=
"handleBatchCopyConfirm"
@
closeDialog=
"handleBatchCopyClose"
class=
"relateStore"
>
<el-form
label-width=
"120px"
:rules=
"rules"
:model=
"selectData"
ref=
"batchCopyForm"
>
<el-form-item
label=
"业务场景:"
>
<el-input
style=
"width: 370px;"
v-model=
"sceneList[selectedScene]"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"复制门店:"
prop=
"selectMerchantObj"
>
<el-select
v-model=
"selectData.selectMerchantObj"
remote
reserve-keyword
placeholder=
"请选择复制门店"
@
visible-change=
"visibleChange"
:remote-method=
"remoteMethod"
v-el-select-loadmore=
"interestsLoadmore"
style=
"width: 370px;"
value-key=
"merchantId"
filterable
>
<el-option
v-for=
"subItem in storeData"
:key=
"subItem.merchantId"
:label=
"subItem.merchantName"
:value=
"subItem"
/>
</el-select>
</el-form-item>
</el-form>
<div
class=
"tips"
>
说明:批量复制至新门店后,系统自动按操作商品,自动更新补充商品对应的上架门店
</div>
</d2-dialog>
</
template
>
<
script
>
import
{
getList
,
getAccountMerchantList
}
from
'@/api/merchant'
import
{
sceneList
}
from
'@/common/constants.js'
export
default
{
name
:
'RelateStoreDialog'
,
data
()
{
return
{
storeData
:
[],
// 分页
total
:
0
,
currentPage
:
1
,
pageSize
:
20
,
searchMerchantName
:
''
,
sceneList
,
selectData
:
{},
rules
:
{
selectMerchantObj
:
[{
required
:
true
,
message
:
'请选择复制门店'
,
trigger
:
'blur'
}]}
}
},
directives
:
{
'el-select-loadmore'
:
{
bind
(
el
,
binding
)
{
setTimeout
(()
=>
{
const
SELECTWRAP_DOM
=
el
.
querySelector
(
'.el-select-dropdown .el-select-dropdown__wrap'
)
SELECTWRAP_DOM
.
addEventListener
(
'scroll'
,
function
()
{
const
condition
=
this
.
scrollHeight
-
this
.
scrollTop
<=
this
.
clientHeight
if
(
condition
)
{
binding
.
value
()
}
})
},
100
)
}
}
},
props
:
{
batchCopyVisible
:
{
type
:
Boolean
,
default
:
false
},
selectedScene
:
{
type
:
Number
}
},
mounted
()
{
this
.
getList
()
},
methods
:
{
getList
()
{
let
storeApi
=
this
.
selectedScene
==
2
?
getAccountMerchantList
:
getList
// 会员权益场景 上架门店是账户中心所有门店
storeApi
({
merchantName
:
this
.
searchMerchantName
,
currentPage
:
this
.
currentPage
,
pageSize
:
this
.
pageSize
,
scene
:
this
.
selectedScene
?
this
.
selectedScene
:
''
}).
then
(
res
=>
{
res
?.
list
?.
forEach
(
val
=>
{
// 账户中心门店返回商户号字段是merchantNo
if
(
val
.
merchantNo
)
val
.
merchantId
=
val
.
merchantNo
})
this
.
storeData
=
this
.
storeData
.
concat
(
res
.
list
)
})
},
// 获取上架门店
remoteMethod
(
query
)
{
this
.
searchMerchantName
=
query
this
.
currentPage
=
1
this
.
storeData
=
[]
this
.
getList
()
// 请求接口
},
visibleChange
(
data
)
{
// 获取焦点重新渲染下拉框数据
if
(
data
)
{
if
(
this
.
searchMerchantName
)
{
this
.
searchMerchantName
=
''
this
.
currentPage
=
1
this
.
storeData
=
[]
this
.
getList
()
}
}
},
// 获取更多上架门店
interestsLoadmore
()
{
setTimeout
(()
=>
{
this
.
currentPage
=
this
.
currentPage
+
1
if
(
this
.
allPages
<
this
.
currentPage
)
{
this
.
currentPage
=
this
.
allPages
return
}
this
.
getList
()
},
10
)
},
handleBatchCopyConfirm
()
{
this
.
$refs
[
'batchCopyForm'
].
validate
((
valid
)
=>
{
console
.
log
(
valid
)
if
(
valid
)
{
this
.
$emit
(
'handleBatchCopyConfirm'
,
this
.
selectData
?.
selectMerchantObj
)
}
})
},
handleBatchCopyClose
()
{
this
.
$emit
(
'handleBatchCopyClose'
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
.tips
{
font-size
:
14px
;
color
:
#999
;
}
</
style
>
\ No newline at end of file
src/views/goods/grounding/components/detail.vue
View file @
4aff8c7
...
...
@@ -237,7 +237,7 @@ export default {
// 1 太阳膜 2 (1.3场景商品)
let
shopType
=
formData
?.
goodsType
==
1
?
'1'
:
formData
?.
sceneType
==
3
?
'2'
:
''
let
shopForm
=
deepClone
(
copyFormList
[
0
].
formBlock
)
let
spliceForm
=
shopType
==
'1'
?
[
'giftCost'
,
'recoveryCost'
,
'virtualAccountCost'
]
:
shopType
==
'2'
?
[
'p
roductTypeStr'
,
'warrantyTypeStr'
,
'baseSupplyModeStr'
,
'giftCost'
,
'recoveryCost'
,
'virtualAccountCost'
]
:
[
'productTypeStr'
,
'warrantyTypeStr'
,
'baseSupplyModeStr'
,
'upgradeSupplyModeStr'
,
'giftCost'
,
'recoveryCost'
,
'virtualAccountCost'
]
let
spliceForm
=
shopType
==
'1'
?
[
'giftCost'
,
'recoveryCost'
,
'virtualAccountCost'
]
:
shopType
==
'2'
?
[
'p
ositionStr'
,
'productTypeStr'
,
'warrantyTypeStr'
,
'baseSupplyModeStr'
,
'giftCost'
,
'recoveryCost'
,
'virtualAccountCost'
]
:
[
'positionStr'
,
'productTypeStr'
,
'warrantyTypeStr'
,
'baseSupplyModeStr'
,
'upgradeSupplyModeStr'
,
'giftCost'
,
'recoveryCost'
,
'virtualAccountCost'
]
// 未勾选基础商品类型
if
(
!
this
.
formData
.
productType
?.
includes
(
1
))
spliceForm
.
push
(
'baseSupplyModeStr'
)
// 赠送成本:仅产品类型选择“基础产品”时展示
...
...
src/views/goods/grounding/components/groundingForm.vue
View file @
4aff8c7
...
...
@@ -14,8 +14,21 @@
<div
style=
"padding: 20px;"
>
<div
v-for=
"(item, index) in i.formBlock"
:key=
"index"
>
<!-- 单选 -->
<!-- 太阳膜类商品 上架部位 -->
<div
v-if=
"item.type === 'radio' && formData['goodsType'] == 1 && !item.index"
>
<el-form-item
:prop=
"item.name"
:label=
"item.label ? item.label + ':' : ''"
:id=
"item.name"
:label-width=
"item.label ? '180px' : '0px'"
class=
"dis-in-block"
:style=
"
{'margin-bottom': !item.type ? '0px' : '22px'}">
<el-radio-group
v-model=
"formData[item.name]"
>
<el-radio
v-for=
"(subItem, subIndex) in item.radioGroupList"
:key=
"subIndex"
:label=
"subItem.confId"
>
{{
subItem
.
confName
}}
</el-radio>
</el-radio-group>
</el-form-item>
</div>
<!-- 1.3场景显示升级/产品供货模式 -->
<div
v-if=
"item.type === 'radio' && ((formData['productType'] && formData['productType'].includes(item.index)) || ((formData['goodsType'] && formData['goodsType'] != 1) && (formData['sceneType'] && formData['sceneType'] == 3)))"
>
<div
v-if=
"item.type === 'radio' &&
item.index &&
((formData['productType'] && formData['productType'].includes(item.index)) || ((formData['goodsType'] && formData['goodsType'] != 1) && (formData['sceneType'] && formData['sceneType'] == 3)))"
>
<el-form-item
:prop=
"item.name"
:label=
"item.label ? item.label + ':' : ''"
:id=
"item.name"
...
...
@@ -213,17 +226,23 @@
v
-
if
=
"filterEmpty(formData.status) || formData.status == 3"
>
存草稿
<
/el-button
>
<
el
-
button
type
=
"primary"
v
-
if
=
"addOrEdit == 'add'"
@
click
=
"handleUp(3)"
:
disabled
=
"$store.state.d2admin.loading.value"
>
保存并继续新增
<
/el-button
>
<
el
-
button
class
=
"width_100 cancel-btn"
@
click
=
"handleClose"
>
取消
<
/el-button
>
<
/el-form-item
>
<
/el-form
>
<!--
store
-
api
(
1
精品升级
2
次新车转化
3
售后众筹
查询嘀加的门店数据
getList
)(
0
会员
/
权益升级
查询账户中心所有
4
s
店
serviceGe
tMerchantList
)
-->
<!--
store
-
api
(
1
精品升级
2
次新车转化
3
售后众筹
查询嘀加的门店数据
getList
)(
0
会员
/
权益升级
查询账户中心所有
4
s
店
getAccoun
tMerchantList
)
-->
<
relate
-
store
-
dialog
v
-
if
=
"relateStoreVisible"
ref
=
"formRelateStore"
:
relate
-
store
-
visible
=
"relateStoreVisible"
:
store
-
api
=
"formData.sceneType ? getList :
serviceGe
tMerchantList"
:
store
-
api
=
"formData.sceneType ? getList :
getAccoun
tMerchantList"
:
store
-
search
-
form
=
"storeSearchForm"
:
store
-
selected
=
"storeSelected"
:
selected
-
scene
=
"formData.sceneType"
...
...
@@ -248,6 +267,20 @@
@
keydown
.
native
=
"handleStoreInput"
clearable
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"服务对接:"
>
<
el
-
input
v
-
model
.
trim
=
"storeSearchForm.yqMerchantName"
placeholder
=
"服务对接"
@
keydown
.
native
=
"handleStoreInput"
clearable
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"服务对接商户号:"
>
<
el
-
input
v
-
model
.
trim
=
"storeSearchForm.yqMerchantId"
placeholder
=
"服务对接商户号"
@
keydown
.
native
=
"handleStoreInput"
clearable
/>
<
/el-form-item
>
<
el
-
button
type
=
"primary"
@
click
=
"handleSearchStore"
>
搜索
<
/el-button
>
<
/el-form
>
<
/el-row
>
...
...
@@ -266,12 +299,13 @@ import { limitPrice } from '@/common/format'
import
{
mapActions
}
from
'vuex'
import
{
uploadImg
,
uploadPDF
}
from
'@/api/sys.base'
// import
{
getSceneTypeListByMerchantId
}
from
'@api/grounding'
import
{
positionTypeList
,
membraneTypeList
}
from
'@/common/constants.js'
import
{
membraneTypeList
}
from
'@/common/constants.js'
import
{
upgradeSupplyModeList
,
crowdUpgradeSupplyModeList
}
from
"../constants/data"
import
{
baseConfig
}
from
"@/main"
import
relateStoreDialog
from
"./relateStoreDialog.vue"
import
relateStoreTable
from
'./relateStoreTable.vue'
import
{
getList
,
serviceGetMerchantList
}
from
'@/api/merchant'
import
{
getList
,
getAccountMerchantList
}
from
'@/api/merchant'
import
{
BaseData
}
from
'../../../../common/constants'
export
default
{
name
:
'groundingForm'
,
components
:
{
...
...
@@ -282,7 +316,7 @@ export default {
data
()
{
return
{
getList
,
serviceGe
tMerchantList
,
getAccoun
tMerchantList
,
equitySceneType
:
baseConfig
.
equitySceneType
||
[],
membraneTypeList
,
formData
:
{
}
,
...
...
@@ -295,6 +329,7 @@ export default {
merchantGoodsRefList
:
[{
required
:
true
,
message
:
'请选择上架门店'
,
trigger
:
'change'
}
],
sceneType
:
[{
required
:
true
,
message
:
'请选择业务场景'
,
trigger
:
'change'
}
],
upgradeGoodsId
:
[{
required
:
true
,
message
:
'请选择上架商品'
,
trigger
:
'change'
}
],
position
:
[{
required
:
true
,
message
:
'请选择上架部位'
,
trigger
:
'change'
}
],
productType
:
[{
required
:
true
,
message
:
'请选择产品类型'
,
trigger
:
'change'
}
],
baseSupplyMode
:
[{
required
:
true
,
message
:
'请选择基础产品供货模式'
,
trigger
:
'change'
}
],
upgradeSupplyMode
:
[{
required
:
true
,
message
:
'请选择升级/产品供货模式'
,
trigger
:
'change'
}
],
...
...
@@ -329,14 +364,17 @@ export default {
relateStoreVisible
:
false
,
storeSearchForm
:
{
merchantName
:
''
,
merchantId
:
''
merchantId
:
''
,
yqMerchantName
:
''
,
yqMerchantId
:
''
}
,
selectDisabled
:
false
,
dialogObj
:
{
}
,
uploadFileList
:
[],
imageFileArr
:
[],
imgViewerVisible
:
false
,
initialIndex
:
0
initialIndex
:
0
,
positionTypeList
:
[]
}
}
,
...
...
@@ -428,6 +466,7 @@ export default {
}
,
mounted
()
{
this
.
getBaseData
()
this
.
formData
=
deepClone
(
this
.
originData
)
this
.
copyFormList
=
deepClone
(
this
.
formList
)
this
.
filterEditForm
()
...
...
@@ -437,6 +476,9 @@ export default {
...
mapActions
({
get
:
'd2admin/base/get'
}
),
async
getBaseData
()
{
this
.
positionTypeList
=
await
this
.
get
(
BaseData
.
positionTypeList
)
}
,
handleFileChange
(
e
,
targetItem
)
{
setTimeout
(()
=>
{
var
reader
=
new
FileReader
()
...
...
@@ -545,14 +587,20 @@ export default {
this
.
$set
(
this
.
formList
[
0
],
'formBlock'
,
newForm
)
this
.
$nextTick
(()
=>
{
// 1.3场景 升级产品供货模式
const
formIndex
=
this
.
formList
[
0
].
formBlock
.
findIndex
(
subItem
=>
subItem
.
name
==
'upgradeSupplyMode'
)
if
(
formData
.
sceneType
==
3
)
{
this
.
$set
(
this
.
formList
[
0
].
formBlock
[
3
],
'radioGroupList'
,
crowdUpgradeSupplyModeList
)
if
(
formIndex
>=
0
)
this
.
$set
(
this
.
formList
[
0
].
formBlock
[
formIndex
],
'radioGroupList'
,
crowdUpgradeSupplyModeList
)
}
// 太阳膜类 升级产品供货模式(优先级高)
if
(
shopType
==
1
)
{
// 由1.3场景 切换到太阳膜 已选升级供货模式为2 的清除掉 太阳膜供货模式没有2
if
(
formData
.
upgradeSupplyMode
==
2
)
this
.
formData
.
upgradeSupplyMode
=
''
this
.
$set
(
this
.
formList
[
0
].
formBlock
[
6
],
'radioGroupList'
,
upgradeSupplyModeList
)
if
(
formIndex
>
-
1
)
this
.
$set
(
this
.
formList
[
0
].
formBlock
[
formIndex
],
'radioGroupList'
,
upgradeSupplyModeList
)
// 上架部位
this
.
formData
?.
positionNamesArr
?.
forEach
(
val
=>
{
val
.
confId
=
val
.
position
}
)
this
.
$set
(
this
.
formList
[
0
].
formBlock
[
this
.
formList
[
0
].
formBlock
.
findIndex
(
subItem
=>
subItem
.
name
==
'position'
)],
'radioGroupList'
,
this
.
formData
?.
positionNamesArr
||
[])
}
this
.
show
=
true
this
.
$refs
[
this
.
formRef
+
'd2FormRuleForm'
]
&&
this
.
$refs
[
this
.
formRef
+
'd2FormRuleForm'
].
clearValidate
()
...
...
@@ -629,13 +677,14 @@ export default {
// 带出上架商品的附带信息
if
(
targetItem
.
name
===
'upgradeGoodsId'
)
{
let
_valueObj
=
targetItem
.
optionList
.
filter
(
v
=>
v
.
confId
==
value
)[
0
]?.
valueObj
||
{
}
let
_positionNamesArr
=
_valueObj
?.
goodsType
==
1
?
deepClone
(
positionTypeList
).
filter
(
it
=>
_valueObj
?.
position
==
it
.
position
)
:
[]
let
_positionNamesArr
=
_valueObj
?.
goodsType
==
1
?
deepClone
(
this
.
positionTypeList
).
filter
(
val
=>
(
_valueObj
.
position
+
''
)?.
includes
(
val
.
position
)
)
:
[]
_formData
.
upgradeGoodsId
=
value
_formData
.
upgradeGoodsName
=
_valueObj
?.
upgradeGoodsName
_formData
.
type
=
_valueObj
?.
type
_formData
.
upgradePrice
=
_valueObj
?.
upgradePrice
_formData
.
purchasePrice
=
_valueObj
?.
purchasePrice
_formData
.
positionNames
=
_positionNamesArr
.
length
?
_positionNamesArr
[
0
]?.
confName
:
''
// 部位
_formData
.
positionNames
=
_positionNamesArr
.
length
?
_positionNamesArr
.
map
(
subItem
=>
{
return
subItem
?.
confName
}
).
join
(
'/'
)
:
''
// 部位
_formData
.
positionNamesArr
=
_positionNamesArr
_formData
.
goodsName
=
_valueObj
?.
goodsName
_formData
.
goodsTypeName
=
_valueObj
?.
goodsTypeName
_formData
.
goodsType
=
_valueObj
?.
goodsType
...
...
src/views/goods/grounding/components/relateStoreDialog.vue
View file @
4aff8c7
...
...
@@ -29,6 +29,14 @@
label=
"门店商户号"
align=
"center"
>
</el-table-column>
<el-table-column
prop=
"yqMerchantName"
label=
"服务对接"
align=
"center"
>
</el-table-column>
<el-table-column
prop=
"yqMerchantId"
label=
"服务对接商户号"
align=
"center"
>
</el-table-column>
</el-table>
<el-pagination
small
background
...
...
@@ -120,18 +128,20 @@ export default {
})
},
getSelectingList
()
{
let
_storeSearchForm
=
this
.
storeSearchForm
if
(
!
this
.
selectedScene
)
{
_storeSearchForm
.
merchantIdName
=
_storeSearchForm
.
merchantName
// 账户中心所有门店接口查询条件
}
this
.
storeApi
({
...
this
.
storeSearchForm
,
currentPage
:
this
.
currentPage
,
pageSize
:
this
.
pageSize
,
scene
:
this
.
selectedScene
?
this
.
selectedScene
:
''
scene
:
this
.
selectedScene
}).
then
(
res
=>
{
res
?.
list
?.
forEach
(
val
=>
{
// 账户中心门店返回商户号字段是merchantNo
if
(
val
.
merchantNo
)
val
.
merchantId
=
val
.
merchantNo
val
?.
sceneList
?.
forEach
(
subVal
=>
{
if
(
subVal
.
scene
==
this
.
selectedScene
)
{
val
.
yqMerchantId
=
subVal
?.
yqMerchant
?.
merchantId
||
'-'
val
.
yqMerchantName
=
subVal
?.
yqMerchant
?.
merchantName
||
'-'
}
})
})
this
.
selectingData
=
res
.
list
this
.
total
=
res
.
total
...
...
src/views/goods/grounding/editGrounding.vue
View file @
4aff8c7
...
...
@@ -11,9 +11,9 @@
</
template
>
<
script
>
import
{
productList
,
baseSupplyModeList
,
upgradeSupplyModeList
}
from
"./constants/data"
import
{
getMerchantGoodsInfo
,
addOrUpdateAPI
,
getAllGoodsList
}
from
'@api/grounding'
import
{
getMerchantGoodsInfo
,
addOrUpdateAPI
,
getAllGoodsList
,
checkGroundingLog
}
from
'@api/grounding'
import
groundingForm
from
"./components/groundingForm.vue"
import
{
positionTypeList
,
sceneCodeList
}
from
'@/common/constants.js'
import
{
BaseData
,
sceneCodeList
}
from
'@/common/constants.js'
import
{
mapActions
}
from
'vuex'
import
{
deepClone
}
from
'@/common/util'
import
{
baseConfig
}
from
'@/main'
...
...
@@ -71,6 +71,11 @@ export default {
value
:
'upgradeCommodityCode'
}]
},
{
name
:
'position'
,
label
:
'上架部位'
,
type
:
'radio'
,
radioGroupList
:
[]
},
{
name
:
'goodsAlias'
,
label
:
'商品别名'
,
type
:
'input'
,
...
...
@@ -208,6 +213,7 @@ export default {
// 获取全部上架商品
this
.
getSelectingList
()
}
else
{
this
.
addOrEdit
=
'edit'
// 获取商品详情
this
.
getDetailInfo
(
id
)
}
...
...
@@ -297,16 +303,18 @@ export default {
const
res
=
new
Map
()
return
arr
.
filter
((
a
)
=>
!
res
.
has
(
a
.
confId
)
&&
res
.
set
(
a
.
confId
,
1
))
},
getBaseData
()
{
async
getBaseData
()
{
this
.
editForm
.
forEach
(
item
=>
{
item
.
formBlock
&&
item
.
formBlock
.
forEach
(
v
=>
{
if
(
v
.
type
==
'check'
)
{
v
.
checkGroupList
=
productList
// 产品类型
}
else
if
(
v
.
type
==
'radio'
)
{
if
(
v
.
index
==
'1'
)
{
if
(
v
.
index
==
1
)
{
v
.
radioGroupList
=
baseSupplyModeList
// 基础供货模式
}
else
{
}
else
if
(
v
.
index
==
2
)
{
v
.
radioGroupList
=
upgradeSupplyModeList
// 升级供货模式
}
else
{
v
.
radioGroupList
=
[]
}
}
if
(
v
.
name
==
'sceneType'
)
{
// 业务场景
...
...
@@ -314,16 +322,18 @@ export default {
}
})
})
this
.
positionTypeList
=
await
this
.
get
(
BaseData
.
positionTypeList
)
},
getDetailInfo
(
id
)
{
getMerchantGoodsInfo
({
id
}).
then
(
res
=>
{
const
productType
=
[]
const
positionNamesArr
=
res
?.
goods
Type
==
1
?
deepClone
(
positionTypeList
).
filter
(
val
=>
res
.
upgradeGoods
.
position
==
val
.
position
)
:
[]
const
positionNamesArr
=
res
?.
goods
Info
?.
goodsType
==
1
?
(
deepClone
(
this
.
positionTypeList
)?.
filter
(
val
=>
(
res
?.
upgradeGoods
.
position
+
''
).
includes
(
val
.
position
))
||
[]
)
:
[]
if
(
res
?.
upgradeProductFlag
==
'Y'
)
productType
.
push
(
2
)
if
(
res
?.
baseProductFlag
==
'Y'
)
productType
.
push
(
1
)
res
.
productType
=
productType
// 产品类型
res
.
upgradePrice
=
res
.
upgradeGoods
?.
upgradePrice
// 参考售价
res
.
positionNames
=
positionNamesArr
.
length
?
positionNamesArr
[
0
]?.
confName
:
''
// 部位
res
.
positionNames
=
positionNamesArr
.
length
?
positionNamesArr
.
map
(
subItem
=>
{
return
subItem
?.
confName
}).
join
(
'/'
)
:
''
// 部位
res
.
positionNamesArr
=
positionNamesArr
res
.
purchasePrice
=
res
.
upgradeGoods
?.
purchasePrice
// 采购价价
res
.
upgradeCommodityCode
=
res
?.
upgradeCommodityCode
// 商品ID
res
.
warrantyPeriod
=
res
?.
upgradeGoods
?.
warrantyPeriod
// 质保年限
...
...
@@ -358,7 +368,7 @@ export default {
const
{
num
}
=
data
this
.
confirm
(
num
,
data
)
},
confirm
(
num
,
data
)
{
confirm
(
num
,
data
,
existCheck
=
true
)
{
// 1保存并上架 2存草稿
const
formObj
=
{}
this
.
editForm
.
forEach
(
val
=>
{
...
...
@@ -390,31 +400,79 @@ export default {
// 整理上传凭证数据
delete
formObj
?.
productType
const
params
=
{
saveDraft
:
num
!==
1
,
saveDraft
:
num
===
2
,
// 是否存草稿
id
:
data
.
id
,
...
formObj
,
merchantGoodsRefList
:
arr
,
voucherList
:
fileArr
voucherList
:
fileArr
,
existCheck
}
if
(
data
?.
goodsType
==
1
&&
data
?.
sceneType
!=
1
)
return
this
.
$message
.
error
(
'太阳膜类商品仅支持上架至精品升级场景'
)
this
.
editData
=
data
let
checkParams
=
{
id
:
data
.
id
||
''
,
upgradeGoodsId
:
formObj
.
upgradeGoodsId
,
position
:
formObj
.
position
||
''
,
sceneType
:
formObj
.
sceneType
,
merchantIdList
:
arr
?.
map
(
val
=>
{
return
val
.
merchantId
})
}
if
(
num
==
1
&&
!
baseConfig
.
supplierCode
.
includes
(
data
.
supplierCode
))
{
// 第三方商品无需走审核流程不用提示
if
(
(
num
==
1
||
num
==
3
)
&&
!
baseConfig
.
supplierCode
.
includes
(
data
.
supplierCode
))
{
// 第三方商品无需走审核流程不用提示
this
.
$confirm
(
'<p>上架信息保存后,自动进入上架审核流程</p>是否确定保存?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
dangerouslyUseHTMLString
:
true
,
type
:
'warning'
}).
then
(()
=>
{
addOrUpdateAPI
(
this
.
dealObjectValue
(
params
)).
then
(
res
=>
{
this
.
notice
.
okTips
()
this
.
handleClose
(
true
)
})
// 校验上架记录中是否已存在
this
.
checkEvent
(
checkParams
,
params
,
num
)
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
}
else
{
addOrUpdateAPI
(
this
.
dealObjectValue
(
params
)).
then
(
res
=>
{
this
.
notice
.
okTips
()
this
.
handleClose
(
true
)
})
// 校验上架记录中是否已存在
this
.
checkEvent
(
checkParams
,
params
,
num
)
}
},
checkEvent
(
checkParams
,
params
,
num
)
{
checkGroundingLog
(
this
.
dealObjectValue
(
checkParams
)).
then
(
res
=>
{
if
(
res
>=
1
)
{
this
.
$confirm
(
'当前商品在对应门店已存在上架记录,是否确定保存?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
confirmEvent
(
params
,
num
)
})
}
else
{
this
.
confirmEvent
(
params
,
num
)
}
})
},
confirmEvent
(
params
,
num
)
{
let
obj
=
{
// 商品信息
position
:
''
,
goodsAlias
:
''
,
warrantyType
:
''
,
productType
:
[],
baseSupplyMode
:
''
,
upgradeSupplyMode
:
''
,
sellPrice
:
''
,
minSellPrice
:
''
,
upgradeProductCost
:
''
,
giftCost
:
''
,
recoveryCost
:
''
,
virtualAccountCost
:
''
}
addOrUpdateAPI
(
this
.
dealObjectValue
(
params
)).
then
(
res
=>
{
this
.
notice
.
okTips
()
if
(
num
==
3
)
{
// 保留 上架商品和上架门店上架凭证数据
this
.
editData
=
{
...
this
.
editData
,
...
obj
}
}
else
{
// 保存后跳转列表页
this
.
handleClose
(
true
)
}
})
},
dealObjectValue
(
obj
)
{
var
param
=
{}
...
...
src/views/goods/grounding/groundingDetail.vue
View file @
4aff8c7
...
...
@@ -11,7 +11,7 @@
<
script
>
import
{
getMerchantGoodsInfo
,
batchReviewAPI
}
from
'@api/grounding'
import
detail
from
'./components/detail.vue'
import
{
sceneList
,
positionTypeList
}
from
'@/common/constants.js'
import
{
sceneList
,
BaseData
}
from
'@/common/constants.js'
import
{
mapActions
}
from
'vuex'
import
{
deepClone
,
Util
}
from
'@/common/util'
import
{
productList
,
baseSupplyModeList
,
upgradeSupplyModeList
,
crowdUpgradeSupplyModeList
}
from
'./constants/data'
...
...
@@ -72,6 +72,9 @@ export default {
value
:
'upgradeCommodityCode'
}]
},
{
name
:
'positionStr'
,
label
:
'上架部位'
},
{
name
:
'goodsAlias'
,
label
:
'商品别名'
},
{
...
...
@@ -144,6 +147,7 @@ export default {
}
},
mounted
()
{
this
.
getBaseData
()
// 获取商品详情
const
id
=
this
.
$route
.
params
.
id
this
.
detailId
=
id
...
...
@@ -155,6 +159,9 @@ export default {
get
:
'd2admin/base/get'
,
close
:
'd2admin/page/close'
}),
async
getBaseData
()
{
this
.
positionTypeList
=
await
this
.
get
(
BaseData
.
positionTypeList
)
},
getDetailInfo
(
id
)
{
getMerchantGoodsInfo
({
id
}).
then
(
res
=>
{
const
productType
=
[]
...
...
@@ -162,7 +169,7 @@ export default {
if
(
res
?.
baseProductFlag
==
'Y'
)
productType
.
push
(
1
)
const
productTypeTextArr
=
[]
// 太阳膜回显 部位
const
positionNamesArr
=
res
?.
goods
Type
==
1
?
deepClone
(
positionTypeList
).
filter
(
val
=>
res
.
upgradeGoods
.
position
==
val
.
position
)
:
[]
const
positionNamesArr
=
res
?.
goods
Info
?.
goodsType
==
1
?
(
deepClone
(
this
.
positionTypeList
)?.
filter
(
val
=>
(
res
?.
upgradeGoods
.
position
+
''
).
includes
(
val
.
position
))
||
[]
)
:
[]
// 产品类型
productList
.
forEach
(
v
=>
{
if
(
productType
.
includes
(
v
.
confId
))
productTypeTextArr
.
push
(
v
.
confName
)
...
...
@@ -184,7 +191,7 @@ export default {
res
.
sceneName
=
sceneList
[
res
.
sceneType
]
||
'-'
res
.
upgradePrice
=
res
.
upgradeGoods
?.
upgradePrice
res
.
purchasePrice
=
res
.
upgradeGoods
?.
purchasePrice
res
.
positionNames
=
positionNamesArr
.
length
?
positionNamesArr
[
0
]?.
confName
:
''
res
.
positionNames
=
positionNamesArr
.
length
?
positionNamesArr
.
map
(
subItem
=>
{
return
subItem
?.
confName
}).
join
(
'/'
)
:
''
// 部位
res
.
productType
=
productType
res
.
serviceItemNames
=
res
.
upgradeGoods
?.
upgradeGoodsServiceItemsList
?.
map
(
v
=>
{
return
`
${
v
.
serviceName
}
-
${
v
.
serviceGrade
}
/
${
v
.
servicePeriod
}
`
})?.
join
(
','
)
res
.
warrantyPeriod
=
res
.
upgradeGoods
?.
warrantyPeriod
...
...
@@ -193,6 +200,7 @@ export default {
res
.
thirdPartyCode
=
res
?.
upgradeGoods
?.
thirdPartyCode
||
''
res
.
entityCardFlag
=
res
?.
upgradeGoods
?.
entityCardFlag
res
.
voucherList
=
res
?.
voucherList
||
[]
res
.
positionStr
=
deepClone
(
this
.
positionTypeList
)?.
filter
(
val
=>
res
?.
position
==
val
.
position
)[
0
]?.
confName
||
''
this
.
editData
=
res
||
{}
this
.
$nextTick
(()
=>
{
this
.
show
=
true
...
...
src/views/goods/grounding/index.vue
View file @
4aff8c7
...
...
@@ -38,6 +38,10 @@
<span
style=
"
{display: inline-block};margin-left: 10px">
<auth-button
category=
"Button"
:show-btn-ids=
"['9030908']"
/>
</span>
<!-- 批量复制 -->
<span
style=
"
{display: inline-block};margin-left: 10px">
<auth-button
category=
"Button"
:show-btn-ids=
"['9030909']"
/>
</span>
<!-- 导出 -->
<span
style=
"
{display: inline-block};margin-left: 10px">
<auth-button
category=
"Button"
:show-btn-ids=
"['9030902']"
/>
...
...
@@ -120,19 +124,29 @@
</div>
</d2-table>
</div>
<batch-copy-dialog
v-if=
"batchCopyVisible"
ref=
"formBatchCopy"
:batch-copy-visible=
"batchCopyVisible"
:selected-scene=
"batchCopySelectScene"
@
handleBatchCopyConfirm=
"handleBatchCopyConfirm"
@
handleBatchCopyClose=
"handleBatchCopyClose"
>
</batch-copy-dialog>
</d2-container>
</template>
<
script
>
import
{
getProductTypeBySceneId
,
getList
}
from
'@api/product'
import
{
getGroundingManageList
,
updateGoodsStatus
,
batchReviewAPI
,
delGroundingById
,
batchUpdateStatus
}
from
'@api/grounding'
import
{
getGroundingManageList
,
updateGoodsStatus
,
batchReviewAPI
,
delGroundingById
,
batchUpdateStatus
,
batchUpdateBatchCopy
}
from
'@api/grounding'
import
{
deepClone
,
Util
}
from
'@/common/util'
import
{
sceneCodeList
,
sceneList
}
from
'@/common/constants.js'
import
{
sceneCodeList
,
sceneList
,
BaseData
}
from
'@/common/constants.js'
import
{
getParkStore
}
from
'@api/editCustomer'
import
{
mapActions
,
mapState
}
from
'vuex'
import
{
baseSupplyModeList
,
upgradeSupplyModeList
}
from
'./constants/data'
import
{
getShopMerchantList
}
from
'@api/deviceManage'
import
{
baseConfig
}
from
'@/main'
import
batchCopyDialog
from
'./components/batchCopyDialog.vue'
export
default
{
components
:
{
batchCopyDialog
},
name
:
'groundingIndex'
,
data
()
{
return
{
...
...
@@ -335,6 +349,14 @@ export default {
prop
:
'goodsTypeName'
,
width
:
140
},
{
label
:
'上架部位'
,
parentProp
:
'goodsInfo'
,
prop
:
'position'
,
width
:
140
,
formatter
:
(
cellValue
)
=>
{
return
deepClone
(
this
.
positionTypeList
)?.
filter
(
val
=>
cellValue
?.
position
==
val
.
position
)[
0
]?.
confName
||
'-'
}
},
{
label
:
'商品别名'
,
prop
:
'goodsAlias'
,
formatter
:
(
cellValue
)
=>
{
...
...
@@ -444,10 +466,14 @@ export default {
confValue
:
'已下架'
}]
},
selfBuildGoodsType
:
baseConfig
.
selfBuildGoodsType
||
''
selfBuildGoodsType
:
baseConfig
.
selfBuildGoodsType
||
''
,
batchCopySelectScene
:
''
,
// 批量复制选中的场景值
batchCopyVisible
:
false
,
batchCopySelectData
:
[]
// 批量辅助选中的上架数据
}
},
mounted
()
{
this
.
getBaseData
()
var
allOpt
=
{
confId
:
''
,
confValue
:
'全部'
}
this
.
baseData
.
statusList
.
unshift
(
allOpt
)
this
.
baseData
.
sceneCodeList
=
deepClone
(
sceneCodeList
)
...
...
@@ -488,6 +514,9 @@ export default {
close
:
'd2admin/page/close'
}),
...
mapActions
(
'd2admin/user'
,
[
'actionSetDownloadList'
]),
async
getBaseData
()
{
this
.
positionTypeList
=
await
this
.
get
(
BaseData
.
positionTypeList
)
},
getOptionsList
()
{
this
.
showFormData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
)
{
...
...
@@ -687,6 +716,39 @@ export default {
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
// 批量复制
handleBatchCopy
()
{
let
selectedData
=
[]
if
(
this
.
$refs
.
groundingIndexTable
.
mutiSelectArr
.
groundingIndex
)
{
selectedData
=
this
.
$refs
.
groundingIndexTable
.
mutiSelectArr
.
groundingIndex
}
let
sceneType
=
selectedData
.
map
(
v
=>
{
return
v
.
sceneType
})
||
[]
if
(
!
selectedData
.
length
)
return
this
.
$message
.
warning
(
'请选择上架记录'
)
if
(
Array
.
from
(
new
Set
(
sceneType
))?.
length
>
1
)
{
return
this
.
$message
.
warning
(
'请选择同一业务场景的上架记录'
)
}
this
.
batchCopySelectData
=
selectedData
||
[]
this
.
batchCopySelectScene
=
Array
.
from
(
new
Set
(
sceneType
))[
0
]
this
.
batchCopyVisible
=
true
},
// 批量复制弹窗确定
handleBatchCopyConfirm
(
data
)
{
let
params
=
{
ids
:
this
.
batchCopySelectData
.
map
(
v
=>
{
return
v
.
id
})
||
[],
// 商品id
sceneType
:
this
.
batchCopySelectScene
,
// 业务场景
merchantId
:
data
?.
merchantId
,
merchantName
:
data
?.
merchantName
}
batchUpdateBatchCopy
(
params
).
then
(()
=>
{
this
.
notice
.
okTips
()
this
.
$refs
.
groundingIndexTable
.
refreshTable
()
this
.
batchCopyVisible
=
false
})
},
// 批量复制弹窗取消
handleBatchCopyClose
()
{
this
.
batchCopyVisible
=
false
}
}
}
...
...
src/views/goods/productManage/components/drawerDetail.vue
View file @
4aff8c7
...
...
@@ -97,7 +97,7 @@
<
script
>
import
{
getGoodsInfoById
}
from
'@/api/commodity'
import
{
membraneTypeList
,
positionTypeList
}
from
'@/common/constants'
import
{
membraneTypeList
}
from
'@/common/constants'
import
{
deepClone
}
from
'@/common/util'
import
{
baseConfig
}
from
'@/main'
export
default
{
...
...
@@ -119,6 +119,10 @@ export default {
commodityInfoId
:
{
type
:
[
String
,
Number
],
default
:
()
=>
{
}
},
positionTypeList
:
{
type
:
Array
,
default
:
()
=>
{
}
}
},
...
...
@@ -141,8 +145,8 @@ export default {
getInfo
(
id
)
{
getGoodsInfoById
({
id
:
id
}).
then
(
res
=>
{
res
?.
upgradeGoodsList
?.
forEach
(
item
=>
{
let
positionNamesArr
=
item
?.
goodsInfo
?.
goodsType
==
1
?
deepClone
(
positionTypeList
).
filter
(
val
=>
item
.
position
==
val
.
position
)
:
[]
item
.
positionNames
=
positionNamesArr
.
length
?
positionNamesArr
[
0
]?.
confName
:
''
let
positionNamesArr
=
item
?.
goodsInfo
?.
goodsType
==
1
?
deepClone
(
this
.
positionTypeList
).
filter
(
val
=>
item
.
position
.
includes
(
val
.
position
)
)
:
[]
item
.
positionNames
=
positionNamesArr
.
length
?
positionNamesArr
.
map
(
subItem
=>
{
return
subItem
?.
confName
}).
join
(
'/'
)
:
''
item
.
serviceItemNames
=
item
?.
upgradeGoodsServiceItemsList
?.
map
(
v
=>
{
return
`
${
v
.
serviceName
}
-
${
v
.
serviceGrade
}
/
${
v
.
servicePeriod
}
`
})?.
join
(
','
)
})
this
.
commodityInfo
=
res
...
...
src/views/goods/productManage/components/multipleSpecificationForm.vue
View file @
4aff8c7
...
...
@@ -211,7 +211,10 @@
<td
v-if=
"goodsInfoData.goodsType == 1"
>
<el-select
placeholder=
"部位"
size=
"small"
multiple
collapse-tags
:class=
"
{ 'w-150-per': true, 'border-red': filterEmpty(subItem.position)
&&
subItem.positionEmpty }"
style="width: 180px;"
v-model="subItem.position"
@change="changePosition($event, subIndex)">
<el-option
v-for=
"childItem in productPositionTypeList"
...
...
@@ -465,7 +468,7 @@
import
{
limitPrice
}
from
'@/common/format'
import
{
deepClone
}
from
'@/common/util'
import
{
mapGetters
,
mapMutations
}
from
'vuex'
import
{
positionTypeList
,
membraneTypeList
}
from
'@/common/constants'
import
{
membraneTypeList
}
from
'@/common/constants'
import
{
baseConfig
}
from
'@/main'
import
serviceItemsDialog
from
"./serviceItemsDialog.vue"
import
{
getProductServiceItems
}
from
'@api/productManage'
...
...
@@ -532,6 +535,10 @@ export default {
productServiceItemList
:
{
type
:
Array
,
default
:
()
=>
[]
},
positionTypeList
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
mounted
()
{
...
...
@@ -577,7 +584,7 @@ export default {
},
'goodsInfoData.goodsPositionList'
:
{
handler
(
newValue
)
{
this
.
productPositionTypeList
=
positionTypeList
.
filter
(
v
=>
newValue
?.
indexOf
(
v
.
position
)
>
-
1
)
this
.
productPositionTypeList
=
this
.
positionTypeList
.
filter
(
v
=>
newValue
?.
indexOf
(
v
.
position
)
>
-
1
)
},
deep
:
true
},
...
...
@@ -826,7 +833,7 @@ export default {
if (i == 0) {
this.goodsInfoData.goodsSpecificationList.push({
id: '',
position:
''
,
position:
[]
,
purchasePrice: '',
specificationData: '',
specsValueList: [this.goodsInfoData.specificationDetailList[i]?.specificationValueList[j]?.specificationValue],
...
...
src/views/goods/productManage/components/productForm.vue
View file @
4aff8c7
...
...
@@ -148,7 +148,7 @@
@
change=
"selectAddAttr($event, item)"
:style=
"
{'width': item.width || formItemWidth}"
filterable>
<el-option
label=
"全选"
value=
"全选"
@
click
.
native=
'selectAll($event, item)'
v-if=
"
item.optionList.length
"
></el-option>
<el-option
label=
"全选"
value=
"全选"
@
click
.
native=
'selectAll($event, item)'
v-if=
"
$$(item.optionList, 'length')
"
></el-option>
<el-option
v-for=
"subItem in item.optionList"
:key=
"subItem[item.optionId]"
:label=
"subItem[item.optionLabel]"
...
...
@@ -440,10 +440,9 @@
<
script
>
import
{
deepClone
}
from
'@/common/util'
import
{
uploadImg
,
uploadVideo
}
from
'@/api/sys.base'
import
{
positionTypeList
,
applicableModelTypeList
}
from
'@/common/constants'
import
{
limitPrice
}
from
'@/common/format'
const
SESSION_NAME
=
`
${
process
.
env
.
VUE_APP_STORAGE_PREFIX
}
-
${
process
.
env
.
VUE_APP_VERSION
}
-info`
import
{
membraneTypeList
,
BaseData
}
from
'@/common/constants.js'
import
{
membraneTypeList
,
applicableModelTypeList
,
BaseData
}
from
'@/common/constants.js'
import
{
mapActions
,
mapMutations
}
from
'vuex'
import
{
baseConfig
}
from
'@/main'
export
default
{
...
...
@@ -451,6 +450,7 @@ export default {
data
()
{
return
{
equitySceneType
:
baseConfig
.
equitySceneType
||
[],
solarFilmArr
:
baseConfig
.
solarFilmArr
||
[
1
,
111
,
112
],
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
lookImgVisible
:
false
,
formData
:
{},
...
...
@@ -463,12 +463,39 @@ export default {
url
:
''
,
uploadType
:
''
},
rules
:
{
goodsName
:
[{
required
:
true
,
message
:
'请输入产品名称'
,
trigger
:
'change'
},
{
validator
:
(
rule
,
value
,
cb
)
=>
{
if
(
value
&&
!
value
.
includes
(
'太阳膜'
)
&&
this
.
solarFilmArr
?.
includes
(
this
.
formData
?.
goodsType
))
{
return
cb
(
new
Error
(
'产品名称必须包含“太阳膜”字样才可将产品挂在太阳膜类目下'
))
}
else
{
cb
()
}
},
trigger
:
'blur'
}],
goodsType
:
[{
required
:
true
,
message
:
'请选择类目'
,
trigger
:
'change'
}],
supplierCode
:
[{
required
:
true
,
message
:
'请选择供应方'
,
trigger
:
'change'
}],
sapCode
:
[{
validator
:
(
rule
,
value
,
cb
)
=>
{
if
(
value
&&
(
!
/^
[
0-9A-Za-z
]
+$/
.
test
(
value
)))
{
return
cb
(
new
Error
(
'只能输入数字或字母'
))
}
else
{
cb
()
}
},
trigger
:
'change'
}],
thumbUrl
:
[{
required
:
true
,
message
:
'请选择缩略图'
,
trigger
:
'blur'
}],
positionIds
:
[{
required
:
true
,
message
:
'请选择部位'
,
trigger
:
'change'
}],
convertedValue
:
[{
required
:
true
,
message
:
'请输入比例换算'
,
trigger
:
'change'
}]
},
copyMembranesFormBlock
:
[
{
name
:
'positionIds'
,
label
:
'部位'
,
type
:
'multiple-select'
,
optionList
:
deepClone
(
positionTypeList
)
,
optionList
:
[]
,
optionId
:
'position'
,
optionLabel
:
'confName'
,
width
:
'432px'
...
...
@@ -522,10 +549,6 @@ export default {
type
:
String
,
default
:
'100%'
},
rules
:
{
type
:
Object
,
default
:
()
=>
{
}
},
formRef
:
{
type
:
String
,
default
:
''
...
...
@@ -560,8 +583,9 @@ export default {
deep
:
true
},
'formData.positionIds'
:
{
handler
(
newVal
)
{
let
arr
=
deepClone
(
positionTypeList
).
filter
(
val
=>
newVal
.
indexOf
(
val
.
position
)
>
-
1
)
async
handler
(
newVal
)
{
let
copyPositionTypeList
=
await
this
.
get
(
BaseData
.
positionTypeList
)
let
arr
=
deepClone
(
copyPositionTypeList
)?.
filter
(
val
=>
newVal
.
indexOf
(
val
.
position
)
>
-
1
)
this
.
formData
.
goodsPositionList
?.
forEach
(
val
=>
{
arr
.
forEach
(
item
=>
{
if
(
val
.
position
===
item
.
position
)
{
...
...
@@ -575,19 +599,21 @@ export default {
}
},
mounted
()
{
async
mounted
()
{
this
.
positionTypeList
=
await
this
.
get
(
BaseData
.
positionTypeList
)
this
.
formData
=
deepClone
(
this
.
originData
)
this
.
formData
.
merchantId
=
this
.
userInfo
.
detail
.
merchantId
this
.
$nextTick
(()
=>
{
this
.
$refs
[
this
.
formRef
+
'd2FormRuleForm'
].
clearValidate
()
})
let
copyMembranesFormBlock
=
deepClone
(
this
.
copyMembranesFormBlock
)
// 太阳膜类 部位下拉框数据
copyMembranesFormBlock
[
copyMembranesFormBlock
.
findIndex
(
val
=>
val
.
name
==
'positionIds'
)].
optionList
=
this
.
positionTypeList
if
(
this
.
formData
.
goodsType
==
1
)
{
this
.
membranesFormBlock
=
copyMembranesFormBlock
}
else
if
(
this
.
formData
.
goodsType
==
12
||
this
.
formData
.
goodsType
==
14
||
this
.
formData
.
goodsType
==
4
||
this
.
formData
.
goodsType
==
6
)
{
this
.
membranesFormBlock
=
[
copyMembranesFormBlock
[
1
]]
}
// this.getProductServiceItemList()
},
methods
:
{
...
...
@@ -595,9 +621,6 @@ export default {
get
:
'd2admin/base/get'
}),
...
mapMutations
(
'goodsInfoData'
,
[
'setUpdateGoodsInfo'
]),
// async getProductServiceItemList() {
// this.productServiceItemList = await this.get(BaseData.productServiceItemList)
// },
selectBlur
()
{
this
.
editOptionIndex
=
-
1
this
.
showOptionInput
=
false
...
...
@@ -687,6 +710,8 @@ export default {
var
tempVal
=
targetItem
.
optionList
.
find
(
item
=>
item
.
categoryType
===
value
)
this
.
formData
.
goodsTypeName
=
tempVal
.
categoryName
let
copyMembranesFormBlock
=
deepClone
(
this
.
copyMembranesFormBlock
)
// 太阳膜类 部位下拉框数据
copyMembranesFormBlock
[
copyMembranesFormBlock
.
findIndex
(
val
=>
val
.
name
==
'positionIds'
)].
optionList
=
this
.
positionTypeList
this
.
formData
.
convertedValue
=
30
this
.
membranesFormBlock
=
[]
if
(
this
.
formData
.
goodsType
==
1
)
{
...
...
@@ -701,8 +726,8 @@ export default {
selectAll
(
value
,
targetItem
)
{
let
_formData
=
this
.
formData
if
(
targetItem
.
name
==
'positionIds'
)
{
if
(
_formData
.
positionIds
.
length
<
(
deepClone
(
positionTypeList
).
length
+
1
))
{
_formData
.
positionIds
=
deepClone
(
positionTypeList
).
map
(
item
=>
{
if
(
_formData
.
positionIds
.
length
<
(
deepClone
(
this
.
positionTypeList
).
length
+
1
))
{
_formData
.
positionIds
=
deepClone
(
this
.
positionTypeList
).
map
(
item
=>
{
return
item
.
position
})
}
else
{
...
...
@@ -822,6 +847,9 @@ export default {
this
.
$emit
(
'handleAddConfirm'
,
this
.
formData
)
}
else
{
var
needRuleList
=
Object
.
keys
(
options
)
if
(
this
.
formData
?.
goodsName
&&
!
this
.
formData
?.
goodsName
?.
includes
(
'太阳膜'
)
&&
this
.
solarFilmArr
?.
includes
(
this
.
formData
?.
goodsType
))
{
// 太阳膜类目 产品名称关键字与类目不匹配
this
.
$message
.
error
(
'产品名称必须包含“太阳膜”字样才可将产品挂在太阳膜类目下'
)
}
this
.
jumpScroll
(
needRuleList
[
0
])
return
true
}
...
...
src/views/goods/productManage/components/singleSpecificationForm.vue
View file @
4aff8c7
...
...
@@ -10,6 +10,7 @@
<span>
序号
</span>
</td>
<td>
<span
class=
"color-red"
>
*
</span>
<span>
商品
</span>
</td>
<td>
...
...
@@ -114,7 +115,10 @@
<td
v-if=
"goodsInfoData.goodsType == 1"
>
<el-select
placeholder=
"部位"
size=
"small"
multiple
collapse-tags
:class=
"
{ 'w-150-per': true, 'border-red': filterEmpty(subItem.position)
&&
subItem.positionEmpty }"
style="width: 180px;"
v-model="subItem.position"
@change="changePosition($event, subIndex)">
<el-option
v-for=
"childItem in productPositionTypeList"
...
...
@@ -318,7 +322,7 @@
<
script
>
import
{
limitPrice
}
from
'@/common/format'
import
{
mapGetters
,
mapMutations
}
from
'vuex'
import
{
positionTypeList
,
membraneTypeList
}
from
'@/common/constants'
import
{
membraneTypeList
}
from
'@/common/constants'
import
{
deepClone
}
from
"@/common/util"
import
{
baseConfig
}
from
'@/main'
import
serviceItemsDialog
from
"./serviceItemsDialog.vue"
...
...
@@ -355,6 +359,10 @@ export default {
productServiceItemList
:
{
type
:
Array
,
default
:
()
=>
[]
},
positionTypeList
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
watch
:
{
...
...
@@ -372,7 +380,7 @@ export default {
},
'goodsInfoData.goodsPositionList'
:
{
handler
(
newValue
)
{
this
.
productPositionTypeList
=
positionTypeList
.
filter
(
v
=>
newValue
?.
indexOf
(
v
.
position
)
>
-
1
)
this
.
productPositionTypeList
=
this
.
positionTypeList
.
filter
(
v
=>
newValue
?.
indexOf
(
v
.
position
)
>
-
1
)
},
deep
:
true
},
...
...
@@ -492,7 +500,7 @@ export default {
}
this.goodsInfoData.goodsSpecificationSingleList.push({
id: '',
position:
''
,
position:
[]
,
purchasePrice: '',
specificationData: '',
specsValueList: [],
...
...
src/views/goods/productManage/components/sourceMaterial.vue
View file @
4aff8c7
...
...
@@ -3,7 +3,6 @@
<div
class=
"title"
>
产品系列-SPU
</div>
<productForm
v-if=
"show"
ref=
"d2GoodsProductForm"
:rules=
"rules"
:add-or-edit=
"addOrEdit"
form-name=
"product"
:origin-data=
"editData"
...
...
@@ -27,24 +26,6 @@ export default {
return
{
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
show
:
false
,
rules
:
{
goodsName
:
[{
required
:
true
,
message
:
'请输入产品名称'
,
trigger
:
'change'
}],
goodsType
:
[{
required
:
true
,
message
:
'请选择类目'
,
trigger
:
'change'
}],
supplierCode
:
[{
required
:
true
,
message
:
'请选择供应方'
,
trigger
:
'change'
}],
sapCode
:
[{
validator
:
(
rule
,
value
,
cb
)
=>
{
if
(
value
&&
(
!
/^
[
0-9A-Za-z
]
+$/
.
test
(
value
)))
{
return
cb
(
new
Error
(
'只能输入数字或字母'
))
}
else
{
cb
()
}
},
trigger
:
'change'
}],
thumbUrl
:
[{
required
:
true
,
message
:
'请选择缩略图'
,
trigger
:
'blur'
}],
positionIds
:
[{
required
:
true
,
message
:
'请选择部位'
,
trigger
:
'change'
}],
convertedValue
:
[{
required
:
true
,
message
:
'请输入比例换算'
,
trigger
:
'change'
}]
},
editData
:
{
goodsName
:
''
,
goodsType
:
''
,
...
...
src/views/goods/productManage/components/specifications.vue
View file @
4aff8c7
...
...
@@ -22,8 +22,8 @@
</div>
</div>
<div
class=
"speci-box"
id=
"specificationDetailList"
>
<singleSpecificationForm
ref=
"singleSpecificationFormRef"
v-show=
"goodsInfoData.specificationType == '1'"
:productServiceItemList=
"productServiceItemList"
></singleSpecificationForm>
<multipleSpecificationForm
ref=
"multipleSpecificationFormRef"
v-show=
"goodsInfoData.specificationType == '2'"
:productServiceItemList=
"productServiceItemList"
></multipleSpecificationForm>
<singleSpecificationForm
ref=
"singleSpecificationFormRef"
v-show=
"goodsInfoData.specificationType == '1'"
:productServiceItemList=
"productServiceItemList"
:positionTypeList=
"positionTypeList"
></singleSpecificationForm>
<multipleSpecificationForm
ref=
"multipleSpecificationFormRef"
v-show=
"goodsInfoData.specificationType == '2'"
:productServiceItemList=
"productServiceItemList"
:positionTypeList=
"positionTypeList"
></multipleSpecificationForm>
</div>
</div>
</div>
...
...
@@ -45,7 +45,8 @@ export default {
return
{
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
productPositionTypeList
:
[],
productServiceItemList
:
[]
productServiceItemList
:
[],
positionTypeList
:
[]
}
},
computed
:
{
...
...
@@ -56,14 +57,15 @@ export default {
// 多规格
this
.
goodsInfoData
.
specificationType
=
'2'
}
this
.
get
ProductServiceItemList
()
this
.
get
BaseData
()
},
methods
:
{
...
mapActions
({
get
:
'd2admin/base/get'
}),
async
get
ProductServiceItemList
()
{
async
get
BaseData
()
{
this
.
productServiceItemList
=
await
this
.
get
(
BaseData
.
productServiceItemList
)
this
.
positionTypeList
=
await
this
.
get
(
BaseData
.
positionTypeList
)
},
...
mapMutations
(
'goodsInfoData'
,
[
'setUpdateGoodsInfo'
]),
// 新增规格
...
...
src/views/goods/productManage/list.vue
View file @
4aff8c7
...
...
@@ -58,7 +58,8 @@
<drawer-detail
v-if=
"drawerDetailVisible"
:drawer-detail-visible=
"drawerDetailVisible"
:commodity-info-id=
"commodityDetailInfoId"
@
handleDrawerClose=
"handleDrawerClose"
/>
@
handleDrawerClose=
"handleDrawerClose"
:positionTypeList=
"positionTypeList"
/>
</d2-container>
</
template
>
...
...
@@ -70,6 +71,7 @@ import { mapActions, mapState } from 'vuex'
import
{
baseGoodsDelete
}
from
'@api/commodity'
import
drawerDetail
from
'./components/drawerDetail.vue'
import
{
baseConfig
}
from
'@/main'
import
{
BaseData
}
from
'@/common/constants'
export
default
{
name
:
'Commodity'
,
data
()
{
...
...
@@ -219,7 +221,8 @@ export default {
confValue
:
'草稿'
}]
},
selfBuildGoodsType
:
baseConfig
.
selfBuildGoodsType
||
''
// 服务商自建类目值
selfBuildGoodsType
:
baseConfig
.
selfBuildGoodsType
||
''
,
// 服务商自建类目值
positionTypeList
:
[]
}
},
...
...
@@ -250,6 +253,7 @@ export default {
}),
...
mapActions
(
'd2admin/user'
,
[
'actionSetDownloadList'
]),
async
getBaseData
()
{
this
.
positionTypeList
=
await
this
.
get
(
BaseData
.
positionTypeList
)
this
.
baseData
.
productTypeList
.
unshift
({
categoryType
:
''
,
categoryName
:
'全部'
...
...
src/views/goods/productManage/update.vue
View file @
4aff8c7
...
...
@@ -30,9 +30,8 @@ import { deepClone } from '@/common/util'
import
{
mapActions
,
mapGetters
,
mapMutations
}
from
'vuex'
import
sourceMaterial
from
'./components/sourceMaterial.vue'
import
specifications
from
'./components/specifications.vue'
import
{
positionTypeList
,
applicableModelTypeList
}
from
'@/common/constants'
import
{
addProductManage
,
UpdateProductManage
}
from
'@api/productManage'
import
{
BaseData
,
membraneTypeList
}
from
'@/common/constants.js'
import
{
BaseData
,
membraneTypeList
,
applicableModelTypeList
}
from
'@/common/constants.js'
import
{
getGoodsInfoById
}
from
'@api/commodity'
import
{
baseConfig
}
from
'@/main'
export
default
{
...
...
@@ -82,12 +81,14 @@ export default {
editGoodsData
:
false
,
productFormData
:
{
carTypeList
:
[
1
,
2
,
3
,
4
]
}
},
positionTypeList
:
[]
}
},
created
()
{
this
.
addOrEdit
=
this
.
$route
.
params
.
addOrEdit
this
.
getBaseData
()
},
mounted
()
{
this
.
show
=
false
...
...
@@ -110,6 +111,9 @@ export default {
}),
...
mapMutations
(
'goodsInfoData'
,
[
'setUpdateGoodsInfo'
]),
...
mapActions
({
close
:
'd2admin/page/close'
}),
async
getBaseData
()
{
this
.
positionTypeList
=
await
this
.
get
(
BaseData
.
positionTypeList
)
},
getGoodsInfo
(
id
)
{
getGoodsInfoById
({
id
:
id
}).
then
(
res
=>
{
let
specificationDetailList
=
[]
...
...
@@ -118,9 +122,10 @@ export default {
val
?.
upgradeGoodsServiceItemsList
?.
forEach
(
v
=>
{
v
.
uniqueValue
=
`
${
v
.
serviceName
}
-
${
v
.
serviceGrade
}
/
${
v
.
servicePeriod
}
`
})
console
.
log
(
val
)
return
{
id
:
val
.
id
,
position
:
val
.
position
,
position
:
(
val
.
position
+
''
)?.
split
(
','
)?.
map
(
Number
)
,
purchasePrice
:
val
.
purchasePrice
,
specificationData
:
val
.
specificationData
,
specsValueList
:
val
.
specificationData
?.
split
(
';~;'
),
...
...
@@ -160,7 +165,7 @@ export default {
goodsPositionList
:
selectedPositions
,
goodsName
:
res
.
goodsInfo
.
goodsName
,
applicableModelNames
:
res
.
goodsInfo
?.
goodsType
==
1
?
deepClone
(
applicableModelTypeList
).
filter
(
val
=>
res
.
goodsInfo
?.
carTypeList
?.
indexOf
(
val
.
confId
)
>
-
1
).
map
(
item
=>
item
.
confName
).
join
(
'/'
)
:
''
,
positionNames
:
res
.
goodsInfo
?.
goodsType
==
1
?
deepClone
(
positionTypeList
).
filter
(
val
=>
selectedPositions
.
indexOf
(
val
.
position
)
>
-
1
).
map
(
item
=>
item
.
confName
).
join
(
'/'
)
:
''
,
positionNames
:
res
.
goodsInfo
?.
goodsType
==
1
?
deepClone
(
this
.
positionTypeList
).
filter
(
val
=>
selectedPositions
.
indexOf
(
val
.
position
)
>
-
1
).
map
(
item
=>
item
.
confName
).
join
(
'/'
)
:
''
,
supplierCode
:
res
.
goodsInfo
.
supplierCode
}
this
.
productFormData
=
deepClone
(
res
.
goodsInfo
)
||
{}
...
...
@@ -233,7 +238,7 @@ export default {
specsValueList
:
[
item
.
specificationData
],
upgradePrice
:
item
.
upgradePrice
,
warrantyPeriod
:
this
.
membraneTypeList
.
includes
(
productFormData
?.
goodsType
)
?
item
.
warrantyPeriod
:
''
,
// 质保年限 仅膜类
position
:
productFormData
?.
goodsType
===
1
?
item
.
position
:
''
,
// 部位 仅太阳膜
position
:
productFormData
?.
goodsType
===
1
?
item
.
position
.
join
(
','
)
:
[]
,
// 部位 仅太阳膜
type
:
item
.
type
,
thirdPartyCode
:
item
.
thirdPartyCode
,
purchasePrice
:
data
?.
shoppingMallFlag
==
1
?
item
.
purchasePrice
:
''
,
// 采购价 仅上架至采购商城
...
...
@@ -286,7 +291,7 @@ export default {
specificationData
:
specificationData
,
upgradePrice
:
item
.
upgradePrice
,
warrantyPeriod
:
this
.
membraneTypeList
.
includes
(
productFormData
?.
goodsType
)
?
item
.
warrantyPeriod
:
''
,
// 质保年限 仅膜类
position
:
productFormData
?.
goodsType
===
1
?
item
.
position
:
''
,
// 部位 仅太阳膜
position
:
productFormData
?.
goodsType
===
1
?
item
.
position
?.
join
(
','
)
:
[]
,
// 部位 仅太阳膜
type
:
item
.
type
,
thirdPartyCode
:
item
.
thirdPartyCode
,
purchasePrice
:
data
?.
shoppingMallFlag
==
1
?
item
.
purchasePrice
:
''
,
// 采购价 仅上架至采购商城
...
...
src/views/orderManage/carDamage.vue
View file @
4aff8c7
...
...
@@ -862,7 +862,7 @@ export default {
this
.
showFormData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
"select"
)
{
if
(
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
]
?
.
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
.
showFormData
[
index
].
optionLabel
]
!==
"全部"
...
...
src/views/orderManage/crowdfundDetail.vue
View file @
4aff8c7
...
...
@@ -14,9 +14,11 @@
:label=
"subItem.label"
class=
"row-item"
>
<div
class=
""
v-if=
"subItem.isImage"
>
<img
v-if=
"detailForm[subItem.name]"
class=
"order-img"
:src=
"detailForm[subItem.name]"
@
click=
"handleEnlargeImg(detailForm[subItem.name])"
>
<div
v-if=
"$$(detailForm[subItem.name], 'length')"
>
<img
v-for=
"(subVal, subKey) in detailForm[subItem.name]"
:key=
"subKey"
class=
"order-img"
:src=
"subVal"
@
click=
"handleEnlargeImg(subVal)"
>
</div>
<span
v-else
>
-
</span>
</div>
<span
v-else
class=
"detail-txt ellipsis-1"
...
...
@@ -114,7 +116,7 @@
<el-dialog
:visible=
"imgVisible"
:before-close=
"handleEnlargeImg"
>
<img
width=
"100%"
:src=
"
detailForm.payVoucher
"
:src=
"
previewImgUrl
"
alt=
"图片"
>
</el-dialog>
</d2-container>
...
...
@@ -193,7 +195,8 @@ export default {
]
},
hideStatus
:
false
,
imgVisible
:
false
// 收款凭证图片弹窗
imgVisible
:
false
,
// 收款凭证图片弹窗
previewImgUrl
:
''
}
},
...
...
@@ -212,7 +215,7 @@ export default {
},
{
label
:
"商户订单号"
,
name
:
"
outTradeNo
"
name
:
"
transactionReferenceId
"
},
{
label
:
"订单时间"
,
...
...
@@ -293,7 +296,7 @@ export default {
},
{
label
:
'收款凭证'
,
name
:
'payVoucher
'
,
name
:
'payVoucher
List'
,
// 后端返回对应字段是payVoucher用','隔开
isImage
:
true
}
]
...
...
@@ -323,6 +326,7 @@ export default {
orderManage
.
getOrderDetailApi
({
orderCode
:
this
.
routeInfo
.
orderCode
})
.
then
((
res
)
=>
{
res
.
payVoucherList
=
res
?.
payVoucher
?.
split
(
','
)
||
[]
this
.
detailForm
=
res
this
.
orderRefund
=
res
.
orderRefund
||
null
this
.
detailForm
.
createdDateStr
=
Util
.
dateFormate
(
...
...
@@ -416,8 +420,9 @@ export default {
this
.
formToRow
(
"detailFormData"
)
})
},
handleEnlargeImg
()
{
handleEnlargeImg
(
url
)
{
this
.
imgVisible
=
!
this
.
imgVisible
this
.
previewImgUrl
=
url
},
handleCancel
()
{
this
.
$router
.
push
({
...
...
@@ -471,6 +476,7 @@ export default {
.order-detail
.row-item
.order-img
{
width
:
80px
;
height
:
80px
;
margin-right
:
8px
;
cursor
:
pointer
;
}
.detail-txt
{
...
...
src/views/orderManage/order.vue
View file @
4aff8c7
...
...
@@ -98,6 +98,13 @@
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"部位"
align
=
"center"
width
=
"150"
prop
=
"subOrderList"
>
<
template
slot
-
scope
=
"scope"
>
<
span
v
-
for
=
"(item, index) in scope.row.subOrderList"
:
key
=
"index"
>
<
p
>
{{
item
.
positionStr
}}
<
/p
>
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"商品别名"
align
=
"center"
width
=
"150"
prop
=
"subOrderList"
>
<
template
slot
-
scope
=
"scope"
>
<
span
v
-
for
=
"(item, index) in scope.row.subOrderList"
:
key
=
"index"
>
...
...
@@ -522,7 +529,8 @@ export default {
subShopMerchanShowHide
:
true
,
ruleVisible
:
false
,
recordInfo
:
null
,
ruleInfoVisible
:
false
ruleInfoVisible
:
false
,
positionTypeList
:
[]
}
}
,
computed
:
{
...
...
@@ -601,6 +609,7 @@ export default {
...
mapMutations
(
'd2admin/user'
,
[
'setUpdateRefesh'
]),
...
mapActions
(
"d2admin/base"
,
[
"get"
]),
async
getBaseData
()
{
this
.
positionTypeList
=
await
this
.
get
(
BaseData
.
positionTypeList
)
this
.
baseData
.
channelTypeList
=
await
this
.
get
(
BaseData
.
channelType
)
this
.
getOptionsList
()
}
,
...
...
@@ -715,7 +724,7 @@ export default {
getOptionsList
()
{
this
.
showFormData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
)
{
if
(
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
.
showFormData
[
index
].
optionLabel
]
!==
'全部'
)
{
if
(
this
.
baseData
[
item
.
optionsName
]
?
.
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
.
showFormData
[
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{
}
temp
[
this
.
showFormData
[
index
].
optionId
]
=
''
temp
[
this
.
showFormData
[
index
].
optionLabel
]
=
'全部'
...
...
@@ -753,6 +762,9 @@ export default {
getList
(
params
).
then
(
res
=>
{
this
.
tableData
=
res
.
list
.
map
((
item
)
=>
{
item
.
paySuccessDate
=
item
.
paySuccessDate
?
Util
.
dateFormate
(
item
.
paySuccessDate
,
'YYYY-MM-DD HH:mm:ss'
)
:
''
item
.
subOrderList
?.
forEach
(
val
=>
{
val
.
positionStr
=
this
.
positionTypeList
?.
filter
(
subItem
=>
val
?.
upgradeGoodsPosition
==
subItem
.
position
)[
0
]?.
confName
||
'-'
}
)
return
item
}
)
this
.
page
.
pageNum
=
res
.
pageNum
...
...
src/views/orderManage/orderDetail.vue
View file @
4aff8c7
...
...
@@ -165,6 +165,9 @@
<el-table-column
:prop=
"'upgradeGoodsName'"
align=
"center"
label=
"商品名称"
/>
<el-table-column
:prop=
"'positionStr'"
align=
"center"
label=
"部位"
/>
<el-table-column
:prop=
"'upgradeGoodsAlias'"
align=
"center"
label=
"商品别名"
/>
...
...
@@ -265,7 +268,7 @@
import
{
mapActions
}
from
'vuex'
import
signRefundDialog
from
'./signRefundDialog'
import
{
deepClone
}
from
'@/common/util'
import
{
payType
}
from
'@/common/constants.js'
import
{
payType
,
BaseData
}
from
'@/common/constants.js'
import
dayjs
from
'dayjs'
import
{
goodsOrderDetail
}
from
'@api/order'
export
default
{
...
...
@@ -326,7 +329,8 @@ export default {
page
:
{
pageNum
:
1
,
pageSize
:
20
}
},
positionTypeList
:
[]
}
},
computed
:
{
...
...
@@ -336,13 +340,14 @@ export default {
},
mounted
()
{
this
.
signRefundFlag
=
this
.
$route
.
params
.
signRefundFlag
this
.
getBaseData
()
this
.
getGoodsOrderDetail
()
console
.
log
(
this
.
detail
)
},
methods
:
{
...
mapActions
({
close
:
'd2admin/page/close'
}),
...
mapActions
(
"d2admin/base"
,
[
"get"
]),
// arraySpanMethod({ row, column, rowIndex, columnIndex }) {
// if (rowIndex === 1) {
// if (columnIndex === 0) {
...
...
@@ -355,6 +360,9 @@ export default {
// getTotalNums() {
// return this.detail.subOrderList.reduce((prev, item) => prev + item.nums, 0)
// },
async
getBaseData
()
{
this
.
positionTypeList
=
await
this
.
get
(
BaseData
.
positionTypeList
)
},
handleEnlargeImg
(
url
)
{
this
.
imgVisible
=
!
this
.
imgVisible
this
.
previewImgUrl
=
url
...
...
@@ -409,7 +417,9 @@ export default {
const
routerParams
=
this
.
$route
.
params
.
detail
goodsOrderDetail
({
orderCode
:
routerParams
?.
orderCode
}).
then
(
res
=>
{
console
.
log
(
res
)
res
?.
subOrderList
?.
forEach
(
item
=>
{
item
.
positionStr
=
this
.
positionTypeList
?.
filter
(
val
=>
item
?.
upgradeGoodsPosition
==
val
.
position
)[
0
]?.
confName
||
'-'
})
const
clientSignatureDTOList
=
res
?.
clientSignatureDTOList
[
0
]
||
[]
this
.
detail
=
Object
.
assign
(
clientSignatureDTOList
,
res
)
if
(
this
.
detail
.
source
==
7
)
{
...
...
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