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 2379902e
authored
Feb 27, 2025
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
111
1 parent
081efa6e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
124 deletions
src/views/goods/components/selectGoodsDialog.vue
src/views/goods/shelfManage/components/common/goodTab.vue
src/views/goods/shelfManage/components/editCon/GoodsInfo.vue
src/views/goods/components/selectGoodsDialog.vue
View file @
2379902
<
template
>
<
template
>
<d2-dialog
<d2-dialog
:title=
"title"
:title=
"title"
:is-visible
.
sync=
"selectGoodsVisible"
:is-visible
.
sync=
"selectGoodsVisible"
width=
"70%"
width=
"70%"
btn-ok-label=
"确定"
btn-ok-label=
"确定"
...
@@ -45,9 +44,13 @@
...
@@ -45,9 +44,13 @@
@input="event => searchInput(event, 'baseGoodsCommodityCode')" />
@input="event => searchInput(event, 'baseGoodsCommodityCode')" />
</
template
>
</
template
>
<
template
slot=
"goodsCascader"
>
<
template
slot=
"goodsCascader"
>
<el-cascader
:options=
"baseData.productTypeList"
style=
"width: 100%;"
<el-cascader
:options=
"baseData.productTypeList"
v-model=
"tempGoodsType"
:placeholder=
"'请选择'"
filterable
style=
"width: 100%;"
@
change=
"selectAddAttr($event)"
clearable
v-model=
"tempGoodsType"
:placeholder=
"'请选择'"
filterable
@
change=
"selectAddAttr($event)"
clearable
:props=
"
{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }">
:props=
"
{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }">
</el-cascader>
</el-cascader>
</
template
>
</
template
>
...
@@ -66,8 +69,11 @@
...
@@ -66,8 +69,11 @@
:get-list-api=
"getListApi"
:get-list-api=
"getListApi"
:before-search-fn=
"beforeSearchFn"
:before-search-fn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
@
setTableFinishFun=
"setTableFinishFun"
>
<
template
slot=
"select_btn"
slot-scope=
"scope"
>
<
template
slot=
"select_btn"
<el-radio
v-model=
"selectedRowId"
:label=
"scope.scope.id"
:disabled=
"packageSelectIds && packageSelectIds.includes(scope.scope.id)"
>
{{
''
}}
</el-radio>
slot-scope=
"scope"
>
<el-radio
v-model=
"selectedRowId"
:label=
"scope.scope.id"
:disabled=
"packageSelectIds && packageSelectIds.includes(scope.scope.id)"
>
{{
''
}}
</el-radio>
</
template
>
</
template
>
</d2-table>
</d2-table>
</d2-dialog>
</d2-dialog>
...
@@ -89,7 +95,12 @@ export default {
...
@@ -89,7 +95,12 @@ export default {
default
:
false
default
:
false
},
},
upgradeGoodsId
:
{},
upgradeGoodsId
:
{},
packageSelectIds
:
{}
packageSelectIds
:
{},
// 用于嘀加上架获取商品时过滤只筛选出权益和延保类
filterParams
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -272,11 +283,14 @@ export default {
...
@@ -272,11 +283,14 @@ export default {
},
},
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
if
(
this
.
filterParams
.
length
>
0
)
{
// 嘀加上架获取商品时过滤只筛选出权益和延保类
this
.
searchForm
.
goodsTypeList
=
this
.
filterParams
}
resolve
()
resolve
()
})
})
},
},
handleSelectGoodsConfirm
()
{
handleSelectGoodsConfirm
()
{
le
t
selectData
=
this
.
tableData
?.
find
(
v
=>
v
.
id
==
this
.
selectedRowId
)
cons
t
selectData
=
this
.
tableData
?.
find
(
v
=>
v
.
id
==
this
.
selectedRowId
)
if
(
!
selectData
)
return
this
.
$message
.
warning
(
'请选择商品'
)
if
(
!
selectData
)
return
this
.
$message
.
warning
(
'请选择商品'
)
this
.
$emit
(
'handleSelectGoodsConfirm'
,
selectData
)
this
.
$emit
(
'handleSelectGoodsConfirm'
,
selectData
)
},
},
...
@@ -297,7 +311,7 @@ export default {
...
@@ -297,7 +311,7 @@ export default {
this
.
tempGoodsType
=
[]
this
.
tempGoodsType
=
[]
// 重新查询
// 重新查询
this
.
$refs
.
groundingIndexTable
.
refreshTable
(
true
,
true
)
this
.
$refs
.
groundingIndexTable
.
refreshTable
(
true
,
true
)
}
,
}
}
}
}
}
</
script
>
</
script
>
...
...
src/views/goods/shelfManage/components/common/goodTab.vue
View file @
2379902
...
@@ -8,15 +8,6 @@
...
@@ -8,15 +8,6 @@
label-width=
"130px"
>
label-width=
"130px"
>
<el-form-item
label=
"上架商品:"
<el-form-item
label=
"上架商品:"
prop=
"upgradeGoodsId"
>
prop=
"upgradeGoodsId"
>
<!--
<el-select
v-model=
"form.val1"
placeholder=
"我是已选商品"
clearable
class=
"el_select"
>
<el-option
v-for=
"item in businessNature"
:key=
"item.confId"
:value=
"item.confId"
:label=
"item.confName"
/>
</el-select>
-->
<el-button
icon=
"el-icon-plus"
<el-button
icon=
"el-icon-plus"
@
click=
"handleSelectGoods"
>
选择商品
</el-button>
@
click=
"handleSelectGoods"
>
选择商品
</el-button>
</el-form-item>
</el-form-item>
...
@@ -156,6 +147,7 @@
...
@@ -156,6 +147,7 @@
</el-form>
</el-form>
<select-goods-dialog
v-if=
"selectGoodsVisible"
<select-goods-dialog
v-if=
"selectGoodsVisible"
:select-goods-visible=
"selectGoodsVisible"
:select-goods-visible=
"selectGoodsVisible"
:filter-params=
"filterParams"
@
handleSelectGoodsConfirm=
"handleSelectGoodsConfirm"
@
handleSelectGoodsConfirm=
"handleSelectGoodsConfirm"
@
handleSelectGoodsClose=
"handleSelectGoodsClose"
@
handleSelectGoodsClose=
"handleSelectGoodsClose"
:upgrade-goods-id=
"formData.upgradeGoodsId"
></select-goods-dialog>
:upgrade-goods-id=
"formData.upgradeGoodsId"
></select-goods-dialog>
...
@@ -164,10 +156,10 @@
...
@@ -164,10 +156,10 @@
<
script
>
<
script
>
import
{
deepClone
}
from
"@/common/util"
import
{
deepClone
}
from
"@/common/util"
import
{
businessNature
}
from
"@/common/constants.js"
import
{
mapActions
}
from
"vuex"
import
{
mapActions
}
from
"vuex"
import
{
limitPrice
}
from
"@/common/format"
import
{
limitPrice
}
from
"@/common/format"
import
selectGoodsDialog
from
'../../../components/selectGoodsDialog.vue'
import
selectGoodsDialog
from
'../../../components/selectGoodsDialog.vue'
import
{
baseConfig
}
from
"@/main"
export
default
{
export
default
{
name
:
"GoodTab"
,
name
:
"GoodTab"
,
props
:
{
props
:
{
...
@@ -182,7 +174,7 @@ export default {
...
@@ -182,7 +174,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
businessNature
:
businessNature
,
filterParams
:
baseConfig
.
equitySceneType
.
concat
(
baseConfig
.
extendedPosiType
)
,
loading
:
false
,
loading
:
false
,
formData
:
{
formData
:
{
upgradeGoodsId
:
""
,
upgradeGoodsId
:
""
,
...
@@ -234,8 +226,9 @@ export default {
...
@@ -234,8 +226,9 @@ export default {
computed
:
{},
computed
:
{},
async
mounted
()
{
mounted
()
{
console
.
log
(
'info'
,
this
.
info
)
console
.
log
(
'info'
,
this
.
info
)
console
.
log
(
'filterParams'
,
this
.
filterParams
)
},
},
methods
:
{
methods
:
{
...
...
src/views/goods/shelfManage/components/editCon/GoodsInfo.vue
View file @
2379902
...
@@ -35,8 +35,9 @@
...
@@ -35,8 +35,9 @@
v-if=
"item.valiadError == 'Y'"
/>
{{
item
.
title
?
(
item
.
title
+
(
idx
+
1
)):
item
.
goodsName
}}
v-if=
"item.valiadError == 'Y'"
/>
{{
item
.
title
?
(
item
.
title
+
(
idx
+
1
)):
item
.
goodsName
}}
</span>
</span>
<span>
<span>
<package-tab
@
packageEditInfo=
"getPackageEditInfo_notice"
<package-tab
:info=
"item.info"
:tab-idx=
"item.tabIndex"
/>
:tab-idx=
"item.tabIndex"
@
packageEditInfo=
"getPackageEditInfo_notice"
/>
</span>
</span>
</el-tab-pane>
</el-tab-pane>
<!--
<el-tab-pane
key=
"add"
<!--
<el-tab-pane
key=
"add"
...
@@ -137,7 +138,7 @@ export default {
...
@@ -137,7 +138,7 @@ export default {
goodsName
:
item
.
goodsName
,
goodsName
:
item
.
goodsName
,
name
:
'good_'
+
tabIndex
,
name
:
'good_'
+
tabIndex
,
tabIndex
:
tabIndex
,
tabIndex
:
tabIndex
,
goodId
:
item
.
id
,
//
goodId: item.id,
info
:
item
info
:
item
})
})
this
.
tabsValue
=
'good_'
+
tabIndex
this
.
tabsValue
=
'good_'
+
tabIndex
...
@@ -149,7 +150,7 @@ export default {
...
@@ -149,7 +150,7 @@ export default {
goodsName
:
item
.
packageName
,
goodsName
:
item
.
packageName
,
name
:
'package_'
+
tabIndex
,
name
:
'package_'
+
tabIndex
,
tabIndex
:
tabIndex
,
tabIndex
:
tabIndex
,
goodId
:
item
.
id
,
//
goodId: item.id,
info
:
item
info
:
item
})
})
this
.
tabsValue
=
'package_'
+
tabIndex
this
.
tabsValue
=
'package_'
+
tabIndex
...
@@ -235,7 +236,6 @@ export default {
...
@@ -235,7 +236,6 @@ export default {
closeOnClickModal
:
false
// 是否可以点击空白处关闭弹窗
closeOnClickModal
:
false
// 是否可以点击空白处关闭弹窗
}).
then
(()
=>
{
}).
then
(()
=>
{
// 确认切换标签页
// 确认切换标签页
// this.activeName = tab.name
this
.
removeTab
(
targetName
)
this
.
removeTab
(
targetName
)
}).
catch
(()
=>
{
}).
catch
(()
=>
{
// 取消切换标签页
// 取消切换标签页
...
@@ -248,11 +248,7 @@ export default {
...
@@ -248,11 +248,7 @@ export default {
removeTab
(
targetName
)
{
removeTab
(
targetName
)
{
const
self
=
this
const
self
=
this
let
activeName
=
self
.
tabsValue
let
activeName
=
self
.
tabsValue
// const tabs = self.goodTabs
let
tabs
let
tabs
// if (this.goodTabs.length <= 1) {
// return false
// }
if
(
targetName
.
split
(
"_"
)[
0
]
==
'good'
)
{
if
(
targetName
.
split
(
"_"
)[
0
]
==
'good'
)
{
tabs
=
self
.
goodTabs
tabs
=
self
.
goodTabs
}
else
{
}
else
{
...
@@ -261,10 +257,6 @@ export default {
...
@@ -261,10 +257,6 @@ export default {
if
(
activeName
===
targetName
)
{
if
(
activeName
===
targetName
)
{
tabs
.
forEach
((
tab
,
index
)
=>
{
tabs
.
forEach
((
tab
,
index
)
=>
{
if
(
tab
.
name
===
targetName
)
{
if
(
tab
.
name
===
targetName
)
{
// const nextTab = tabs[index + 1]
// if (!nextTab) {
// activeName = tabs[index - 1].name
// }
const
nextTab
=
tabs
[
index
+
1
]
||
tabs
[
index
-
1
]
const
nextTab
=
tabs
[
index
+
1
]
||
tabs
[
index
-
1
]
console
.
log
(
'tab.name'
,
tab
.
name
)
console
.
log
(
'tab.name'
,
tab
.
name
)
console
.
log
(
'nextTab'
,
nextTab
)
console
.
log
(
'nextTab'
,
nextTab
)
...
@@ -285,90 +277,12 @@ export default {
...
@@ -285,90 +277,12 @@ export default {
})
})
}
}
this
.
tabsValue
=
activeName
this
.
tabsValue
=
activeName
// tabs = tabs.filter(tab => tab.name !== targetName)
if
(
targetName
.
split
(
"_"
)[
0
]
==
'good'
)
{
if
(
targetName
.
split
(
"_"
)[
0
]
==
'good'
)
{
this
.
goodTabs
=
tabs
.
filter
(
tab
=>
tab
.
name
!==
targetName
)
this
.
goodTabs
=
tabs
.
filter
(
tab
=>
tab
.
name
!==
targetName
)
}
else
{
}
else
{
this
.
packageTabs
=
tabs
.
filter
(
tab
=>
tab
.
name
!==
targetName
)
this
.
packageTabs
=
tabs
.
filter
(
tab
=>
tab
.
name
!==
targetName
)
}
}
this
.
packageNotice
()
this
.
packageNotice
()
// const currentTabIndex = this.goodTabs.findIndex(item => item.name == targetName)
// // currentTabIndex <= parseInt(self.goodTabsValue)
// // (currentTabIndex == this.goodTabs.length - 1 && ) ||
// if (currentTabIndex < parseInt(self.goodTabsValue)) {
// // activeName = this.goodTabs[ ].name
// console.log(parseInt(self.goodTabsValue) - 1, 'parseInt(self.goodTabsValue) - 1')
// activeName = (parseInt(self.goodTabsValue) - 1).toString()
// // self.goodTabsValue = activeName
// }
// self.goodTabsValue = activeName
// const tabIndex = this.goodTabs.findIndex(item => item.name == targetName)
// const upgradeArr = []
// const packageArr = []
// this.goodTabs = []
// const childParams = goodsTypeGroupRules.splice(tabIndex, 1)
// // this.$set(this.goodsTypeGroupReconciliationRules, goodsTypeGroupRules)
// this.$nextTick(() => {
// this.goodsTypeGroupReconciliationRules = goodsTypeGroupRules
// this.deleteSelectGoodsList(childParams[0].goodsTypeGroupRelations)
// this.deleteSelectUpgradeGoodsList(childParams[0].upgradeGoods)
// this.deleteSelectPackageGoodsList(childParams[0].packageGoods)
// const typeList = goodsTypeGroupRules
// console.log(goodsTypeGroupRules, 'goodsTypeGroupRules')
// typeList.forEach((item, index) => {
// // index && this.goodTabs.push({
// // title: '特殊品类' + index,
// // name: (index + 1).toString()
// // })
// this.goodTabs[index] = {
// title: index ? '特殊品类' + index : '全部品类',
// name: (index + 1).toString()
// // testFlag: (item.testFlag == 'Y' && autoFlag) ? 'Y' : 'N',
// // groupDivisionRuleId: item.testFlag == 'Y' ? '' : (item.groupDivisionRuleId || '')
// }
// // 按具体商品
// if (item.goodsTypeGroupRelations?.length && item.goodsTypeGroupRelations[0]?.categoryType == 2) {
// this.goodsTypeGroupReconciliationRules[index].upgradeGoods = deepClone(item.goodsTypeGroupRelations)
// this.goodsTypeGroupReconciliationRules[index].categoryType = 2
// item.goodsTypeGroupRelations.forEach(val => {
// upgradeArr.push({
// upgradeGoodsId: val.upgradeGoodsId,
// upgradeGoodsName: val.upgradeGoodsName,
// commodityCode: val.commodityCode
// })
// })
// this.goodsTypeGroupReconciliationRules[index].goodsTypeGroupRelations = []
// }
// // 按套餐商品
// if (item.goodsTypeGroupRelations?.length && item.goodsTypeGroupRelations[0]?.categoryType == 3) {
// this.goodsTypeGroupReconciliationRules[index].packageGoods = deepClone(item.goodsTypeGroupRelations)
// this.goodsTypeGroupReconciliationRules[index].categoryType = 3
// item.goodsTypeGroupRelations.forEach(val => {
// packageArr.push({
// packageCode: val.packageCode,
// packageName: val.packageName
// })
// })
// this.goodsTypeGroupReconciliationRules[index].goodsTypeGroupRelations = []
// }
// // 按具体分类
// if (item.goodsTypeGroupRelations?.length && item.goodsTypeGroupRelations[0]?.categoryType == 1) {
// this.goodsTypeGroupReconciliationRules[index].goodsTypeGroupRelations = deepClone(item.goodsTypeGroupRelations)
// this.goodsTypeGroupReconciliationRules[index].categoryType = 1
// this.goodsTypeGroupReconciliationRules[index].upgradeGoods = []
// }
// })
// this.getSelectingList(upgradeArr)
// this.getSelectingListPackage(packageArr)
// // this.queryFeeCategoryByTypeFlow = deepClone(this.queryFeeCategoryByTypeFlow)
// this.$message({
// type: "success",
// message: "删除成功!"
// })
// })
},
},
// 填写套餐名称时通知
// 填写套餐名称时通知
...
@@ -378,17 +292,6 @@ export default {
...
@@ -378,17 +292,6 @@ export default {
this
.
packageNotice
()
this
.
packageNotice
()
},
},
// 删除套餐时通知
// removePackageTab_notice() {
// this.packageInfoList = []
// this.packageTabs.forEach(item => {
// if (item.info) {
// this.packageInfoList.push(item.info)
// }
// })
// this.$EventBus.$emit('packageInfoList', this.packageInfoList)
// },
// 初始化、填写套餐名称时、删除套餐时通知
// 初始化、填写套餐名称时、删除套餐时通知
packageNotice
()
{
packageNotice
()
{
this
.
packageInfoList
=
[]
this
.
packageInfoList
=
[]
...
...
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