Commit 3cfcef6f by 前端

Merge branch 'SAAS+V5.6.0' into 'master'

上线合并

See merge request !30
2 parents 144643bb 629f4927
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
<!-- <div>{{ JSON.stringify(scope.scope.suitCarTypeList) }}</div> --> <!-- <div>{{ JSON.stringify(scope.scope.suitCarTypeList) }}</div> -->
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top"> <el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top">
<div slot="content" style="max-height: 200px; overflow-y: scroll;"> <div slot="content" style="max-height: 200px; overflow-y: scroll;">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{ item.carTypeName }}</div> <div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` }}</div>
</div> </div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div> <div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip> </el-tooltip>
...@@ -59,7 +60,7 @@ export default { ...@@ -59,7 +60,7 @@ export default {
formatCar(list) { formatCar(list) {
// console.log(list, 'list') // console.log(list, 'list')
let str = list.map(item => { let str = list.map(item => {
return item.carTypeName return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
}).join(',') }).join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str return str.length > 15 ? str.substring(0, 15) + '...' : str
} }
......
...@@ -833,7 +833,9 @@ export default { ...@@ -833,7 +833,9 @@ export default {
console.log(res, 'res') console.log(res, 'res')
if (res?.specificationType == 2) { if (res?.specificationType == 2) {
this.handleItemInfo.purchasePrice = res.upgradeGoodsSpecificationValueDTOS[0].purchasePrice // 2026-1月份大版本 取消默认选中
// this.handleItemInfo.purchasePrice = res.upgradeGoodsSpecificationValueDTOS[0].purchasePrice
this.handleItemInfo.purchasePrice = ''
// console.log(this.handleItemInfo) // console.log(this.handleItemInfo)
// console.log(res, 'res') // console.log(res, 'res')
goodType = res.goodsSpecificationNameList.map((item, index) => { goodType = res.goodsSpecificationNameList.map((item, index) => {
...@@ -879,11 +881,12 @@ export default { ...@@ -879,11 +881,12 @@ export default {
// 默认选中 第一个选项 // 默认选中 第一个选项
// console.log(orgdata.skus[0], this.goodsTypeList, '2222') // console.log(orgdata.skus[0], this.goodsTypeList, '2222')
let norSelectSkus = orgdata.skus[0] // 2026-1月份大版本 取消默认选中
this.goodsTypeList.forEach((item, index) => { // let norSelectSkus = orgdata.skus[0]
let sku = norSelectSkus.skusTypes[index] // this.goodsTypeList.forEach((item, index) => {
this.handleClickSpecs1(item.id, sku.propertyId, sku, index, sku.index) // let sku = norSelectSkus.skusTypes[index]
}) // this.handleClickSpecs1(item.id, sku.propertyId, sku, index, sku.index)
// })
this.goodsInfo = res this.goodsInfo = res
this.tableInfo = res?.upgradeGoodsList[0]?.merchantGoodsInfo this.tableInfo = res?.upgradeGoodsList[0]?.merchantGoodsInfo
} else { } else {
...@@ -925,7 +928,11 @@ export default { ...@@ -925,7 +928,11 @@ export default {
return pre return pre
}, '') }, '')
if (flag) { if (flag) {
return this.$message.error('请选择规格') return this.$message({
message:'请选择规格',
type: 'error',
customClass: 'msgHierarchy'
})
} }
orgdata.skus.find(item => { orgdata.skus.find(item => {
console.log(item, item.skuId, selectId) console.log(item, item.skuId, selectId)
...@@ -949,19 +956,31 @@ export default { ...@@ -949,19 +956,31 @@ export default {
suitCarTypeList: this.goodsInfo.suitCarTypeList, suitCarTypeList: this.goodsInfo.suitCarTypeList,
} }
if (!params.upgradeGoodsId) { if (!params.upgradeGoodsId) {
this.$message.error('商品不存在') this.$message({
message:'商品不存在',
type: 'error',
customClass: 'msgHierarchy'
})
return return
} }
} }
// 如果是专用商品 但没有选适配车型 // 如果是专用商品 但没有选适配车型
if (this.upgradeGoodsInfo.suitCarType == 2 && !this.goodsInfo.suitCarTypeList?.length) { if (this.upgradeGoodsInfo.suitCarType == 2 && !this.goodsInfo.suitCarTypeList?.length) {
return this.$message.error('请完善商品适用车型') return this.$message({
message:'请完善商品适用车型',
type: 'error',
customClass: 'msgHierarchy'
})
} }
// 判断是否有值 // 判断是否有值
params.upgradeGoodsId && params.upgradeGoodsId &&
this.$apis.purchaseShopping.shoppingCarAdd(params).then(res => { this.$apis.purchaseShopping.shoppingCarAdd(params).then(res => {
console.log(res, 'res') console.log(res, 'res')
this.$message.success('加入购物车成功') this.$message({
message:'加入购物车成功',
type: 'success',
customClass: 'msgHierarchy'
})
this.$EventBus.$emit('updateCarShopping') this.$EventBus.$emit('updateCarShopping')
this.dialogShow = false this.dialogShow = false
}) })
......
...@@ -53,7 +53,8 @@ ...@@ -53,7 +53,8 @@
<template slot="carName" slot-scope="scope"> <template slot="carName" slot-scope="scope">
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top"> <el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top">
<div slot="content" class="car-type-list"> <div slot="content" class="car-type-list">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{ item.carTypeName }}</div> <div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` }}</div>
</div> </div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div> <div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip> </el-tooltip>
...@@ -83,7 +84,7 @@ export default { ...@@ -83,7 +84,7 @@ export default {
formatCar(list) { formatCar(list) {
console.log(list, 'list') console.log(list, 'list')
let str = list.map(item => { let str = list.map(item => {
return item.carTypeName return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
}).join(',') }).join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str return str.length > 15 ? str.substring(0, 15) + '...' : str
} }
......
...@@ -136,7 +136,8 @@ ...@@ -136,7 +136,8 @@
<template slot="film" slot-scope="scope"> <template slot="film" slot-scope="scope">
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top"> <el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top">
<div slot="content" class="car-type-list"> <div slot="content" class="car-type-list">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{ item.carTypeName }}</div> <div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` }}</div>
</div> </div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div> <div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip> </el-tooltip>
...@@ -144,7 +145,7 @@ ...@@ -144,7 +145,7 @@
</template> </template>
<template slot="remark" slot-scope="scope"> <template slot="remark" slot-scope="scope">
<!-- <div>{{ JSON.stringify(scope.scope.remark) }}</div> --> <!-- <div>{{ JSON.stringify(scope.scope.remark) }}</div> -->
<el-input v-model="scope.scope.remark" placeholder="请输入" maxlength="50"></el-input> <el-input v-model="scope.scope.remark" placeholder="请输入" maxlength="100"></el-input>
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -186,7 +187,7 @@ export default { ...@@ -186,7 +187,7 @@ export default {
formatCar(list) { formatCar(list) {
console.log(list, 'list') console.log(list, 'list')
let str = list.map(item => { let str = list.map(item => {
return item.carTypeName return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
}).join(',') }).join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str return str.length > 15 ? str.substring(0, 15) + '...' : str
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!