Commit 3cfcef6f by 前端

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

上线合并

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