Commit 560f0a8c by wangzhihui

```

refactor(purchaseOrder): 优化组件代码格式和数据结构

- 修复商品详情组件中的换行和空格问题
- 调整订单详情对话框的数据展示格式
- 优化退货对话框的表单布局
- 重构购物车组件的表格结构
- 统一代码风格,移除多余的空行和注释
```
1 parent 62037ba5
<template>
<div>
<GLDialog destroy-on-close="true" :visible.sync="dialogShow" :hasFooter="false" mode="big" bigTitle="产品详情"
:close-on-click-modal="false" @onOk="handleSubmit" @onCancel="handleDetailClose">
<GLDialog destroy-on-close="true" :visible.sync="dialogShow" :hasFooter="false" mode="big" bigTitle="产品详情" :close-on-click-modal="false" @onOk="handleSubmit" @onCancel="handleDetailClose">
<div class="detail-content">
<!-- 商品详情 -->
<div class="goodsInfoCom">
......@@ -20,22 +19,17 @@
<span class="num">{{ goodsInfo.purchaseOrderCount || 0 }}笔</span>
</span>
</div>
<div class="productCode" v-if="goodsInfo.upgradeGoodsList && goodsInfo.upgradeGoodsList.length > 0">产品编码:{{
goodsInfo.upgradeGoodsList[selectIndex].type }}</div>
<div class="productCode" v-if="goodsInfo.upgradeGoodsList && goodsInfo.upgradeGoodsList.length > 0">产品编码:{{ goodsInfo.upgradeGoodsList[selectIndex].type }}</div>
<!--选择商品规格 v-if="!isSkuArguments"-->
<div class="content fix-header fix-bottom" v-if="goodsInfo.specificationType == 2">
<div class="mask">
<div class="mask-content">
<div class="spec-items">
<div class="spec-menu-item js-spec-menu skuCon" v-for="(item, index) in goodsTypeList"
:key="item.id">
<div class="spec-menu-item js-spec-menu skuCon" v-for="(item, index) in goodsTypeList" :key="item.id">
<div class="spec-note label">{{ item.name }}:</div>
<div class="spec-choices">
<span v-for="(el, i) in item.propertyList" :key="el.id"
class="spec-nor skuItem one-line-ellipsis pointer"
:class="{ active: el.selected, disabled: el.disabled }"
@click="handleClickSpecs1(item.id, el.id, el, index, i)">{{ el.name }}</span>
<span v-for="(el, i) in item.propertyList" :key="el.id" class="spec-nor skuItem one-line-ellipsis pointer" :class="{ active: el.selected, disabled: el.disabled }" @click="handleClickSpecs1(item.id, el.id, el, index, i)">{{ el.name }}</span>
</div>
</div>
</div>
......@@ -45,8 +39,7 @@
<div class="skuCon" v-if="goodsInfo.specificationType == 1">
<div class="label">规格:</div>
<div class="itemCon">
<div class="skuItem one-line-ellipsis pointer" :class="{ active: index === selectIndex }"
v-for="(item, index) in goodsInfo.upgradeGoodsList" :key="index" @click="singleClick(item, index)">
<div class="skuItem one-line-ellipsis pointer" :class="{ active: index === selectIndex }" v-for="(item, index) in goodsInfo.upgradeGoodsList" :key="index" @click="singleClick(item, index)">
{{ item.upgradeGoodsName }}
</div>
</div>
......@@ -64,12 +57,8 @@
<div class="munCom" v-if="upgradeGoodsInfo.suitCarType == 2">
<div class="label">适用车型:</div>
<div class="munItem car-select">
<el-select ref="choose" :clearable="false" width='300' collapse-tags multiple @focus="handleCarDialog"
value-key="carTypeId" v-model="goodsInfo.suitCarTypeList" style="margin-left: 20px;width: 300px;"
placeholder="请选择">
<el-option v-for="(children) in goodsInfo.suitCarTypeList" :key="children.carTypeId"
:label="children.carTypeName" :value="children">
</el-option>
<el-select ref="choose" :clearable="false" width="300" collapse-tags multiple @focus="handleCarDialog" value-key="carTypeId" v-model="goodsInfo.suitCarTypeList" style="margin-left: 20px;width: 300px;" placeholder="请选择">
<el-option v-for="children in goodsInfo.suitCarTypeList" :key="children.carTypeId" :label="children.carTypeName" :value="children"></el-option>
</el-select>
</div>
</div>
......@@ -93,11 +82,8 @@
</div>
</div>
</GLDialog>
<carBandDialog v-if="relateStoreVisible" :upgradeGoodsInfo="goodsInfo" @handleRelateStoreConfirm="handleConfirm"
:relateStoreVisible.sync="relateStoreVisible" :goodsInfo="goodsInfo">
</carBandDialog>
<carBandDialog v-if="relateStoreVisible" :upgradeGoodsInfo="goodsInfo" @handleRelateStoreConfirm="handleConfirm" :relateStoreVisible.sync="relateStoreVisible" :goodsInfo="goodsInfo"></carBandDialog>
</div>
</template>
<script>
......@@ -537,12 +523,12 @@ let goodType = [
]
}
]
import carBandDialog from './carBandDialog';
import carBandDialog from './carBandDialog'
import { membraneTypeList } from '@/utils/constants.js'
export default {
name: 'GoodsDetailCom',
components: {
carBandDialog,
carBandDialog
},
props: {
visible: {
......@@ -551,7 +537,7 @@ export default {
},
selectItemInfo: {
type: Object,
default: () => { }
default: () => {}
},
goodsId: {
type: [String, Number]
......@@ -562,22 +548,28 @@ export default {
data() {
return {
options: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎'
},
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
],
relateStoreVisible: false,
// maskVisible: true,
isSkuArguments: true,
......@@ -591,7 +583,7 @@ export default {
selectItemList: [],
membraneTypeList,
goodsInfo: {
suitCarTypeList: [],
suitCarTypeList: []
},
selectIndex: 0,
handleItemInfo: {
......@@ -929,7 +921,7 @@ export default {
}, '')
if (flag) {
return this.$message({
message:'请选择规格',
message: '请选择规格',
type: 'error',
customClass: 'msgHierarchy'
})
......@@ -942,7 +934,7 @@ export default {
params = {
goodsNumber: this.handleItemInfo.goodsNumber,
upgradeGoodsId: item.upgradeGoodsId,
suitCarTypeList: this.goodsInfo.suitCarTypeList,
suitCarTypeList: this.goodsInfo.suitCarTypeList
}
}
})
......@@ -953,11 +945,11 @@ export default {
params = {
goodsNumber: this.handleItemInfo.goodsNumber,
upgradeGoodsId: this.handleItemInfo.upgradeGoodsId,
suitCarTypeList: this.goodsInfo.suitCarTypeList,
suitCarTypeList: this.goodsInfo.suitCarTypeList
}
if (!params.upgradeGoodsId) {
this.$message({
message:'商品不存在',
message: '商品不存在',
type: 'error',
customClass: 'msgHierarchy'
})
......@@ -967,7 +959,7 @@ export default {
// 如果是专用商品 但没有选适配车型
if (this.upgradeGoodsInfo.suitCarType == 2 && !this.goodsInfo.suitCarTypeList?.length) {
return this.$message({
message:'请完善商品适用车型',
message: '请完善商品适用车型',
type: 'error',
customClass: 'msgHierarchy'
})
......@@ -977,7 +969,7 @@ export default {
this.$apis.purchaseShopping.shoppingCarAdd(params).then(res => {
console.log(res, 'res')
this.$message({
message:'加入购物车成功',
message: '加入购物车成功',
type: 'success',
customClass: 'msgHierarchy'
})
......
<template>
<GLDialog v-if="dialogShow" bigTitle="详细信息" mode="big" :visible.sync="dialogShow" :close-on-click-modal="false"
@onOk="dialogShow = false" @onCancel="dialogShow = false" :hasFooter="false">
<GLDialog v-if="dialogShow" bigTitle="详细信息" mode="big" :visible.sync="dialogShow" :close-on-click-modal="false" @onOk="dialogShow = false" @onCancel="dialogShow = false" :hasFooter="false">
<div class="detail-content" v-if="dialogShow">
<div class="addressTitle">
<img src="@/images/addressIcon.webp" alt="" class="icon" />
......@@ -17,8 +16,7 @@
</span>
<span class="address">
收货地址:
<span class="label">{{ detailInfo.provinceName }}{{ detailInfo.cityName }}{{ detailInfo.areaName }}{{
detailInfo.contactAddress }}</span>
<span class="label">{{ detailInfo.provinceName }}{{ detailInfo.cityName }}{{ detailInfo.areaName }}{{ detailInfo.contactAddress }}</span>
</span>
<span class="address" v-if="detailInfo.purchaseOrderRemark">
备注:
......@@ -30,8 +28,7 @@
</span>
</div>
<div class="table-class">
<GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" @refreshTable="refreshTable"
:tableData="detailInfo.tableData" :pageConf="pageConf" :tableTotal="detailInfo.tableTotal">
<GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" @refreshTable="refreshTable" :tableData="detailInfo.tableData" :pageConf="pageConf" :tableTotal="detailInfo.tableTotal">
<template slot="film" slot-scope="scope">
<el-tooltip v-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1" placement="top">
<div class="film-txt">(...{{ scope.scope.filmRollList.length }})</div>
......@@ -40,21 +37,19 @@
<div v-for="(item, index) in scope.scope.filmRollList" :key="index">{{ item }}</div>
</div>
</el-tooltip>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">{{
scope.scope.filmRollList[0] }}</div>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">{{ scope.scope.filmRollList[0] }}</div>
<div v-else>--</div>
</template>
<template slot="upgradeGoodsName" slot-scope="scope">
<div>
<img v-if="scope.scope.refundStatus == 'Y'" class="return" src="@/assets/retrun.png" alt="">
<img v-if="scope.scope.refundStatus == 'Y'" class="return" src="@/assets/retrun.png" alt="" />
<span>{{ scope.scope.upgradeGoodsName }}</span>
</div>
</template>
<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.brandName}-${item.childName}-${item.seriesName}-${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>
......@@ -77,15 +72,17 @@ export default {
},
paramsObj: {
type: Object,
default: () => { }
default: () => {}
}
},
filters: {
formatCar(list) {
console.log(list, 'list')
let str = list.map(item => {
return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
}).join(',')
let str = list
.map(item => {
return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
})
.join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
},
......@@ -101,7 +98,6 @@ export default {
this.$emit('update:visible', val)
}
}
},
data() {
return {
......@@ -118,10 +114,16 @@ export default {
line: 1
},
{
label: '供应商名称',
prop: 'type',
width: 110
},
{
label: '产品编码',
prop: 'type',
width: 100
},
{
label: '规格',
prop: 'specificationData',
......@@ -131,7 +133,7 @@ export default {
label: '适用车型',
prop: 'carName',
addHtml: 'carName',
width: 200,
width: 200
},
{
label: '系列',
......@@ -140,6 +142,11 @@ export default {
line: 1
},
{
label: '产品别名',
prop: 'type',
width: 100
},
{
label: '所属分类',
prop: 'goodsTypeName',
width: 150
......@@ -306,7 +313,7 @@ export default {
font-size: 14px;
color: #666666;
>span {
> span {
margin-right: 20px;
margin-bottom: 10px;
}
......
<template>
<GLDialog v-if="dialogShow" bigTitle="退货" mode="big" :visible.sync="dialogShow" :close-on-click-modal="false"
@onOk="handleConfirm" @onCancel="dialogShow = false" :hasFooter="true">
<GLDialog v-if="dialogShow" bigTitle="退货" mode="big" :visible.sync="dialogShow" :close-on-click-modal="false" @onOk="handleConfirm" @onCancel="dialogShow = false" :hasFooter="true">
<div class="detail-content" v-if="dialogShow">
<div class="addressTitle">
<img src="@/images/addressIcon.webp" alt="" class="icon" />
......@@ -17,8 +16,7 @@
</span>
<span class="address">
收货地址:
<span class="label">{{ detailInfo.provinceName }}{{ detailInfo.cityName }}{{ detailInfo.areaName }}{{
detailInfo.contactAddress }}</span>
<span class="label">{{ detailInfo.provinceName }}{{ detailInfo.cityName }}{{ detailInfo.areaName }}{{ detailInfo.contactAddress }}</span>
</span>
<span class="address" v-if="detailInfo.purchaseOrderRemark">
备注:
......@@ -31,24 +29,21 @@
</div>
<div class="table-class">
<!-- :pageConf="pageConf" -->
<GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" @refreshTable="refreshTable"
:tableData="detailInfo.tableData" :tableTotal="detailInfo.tableTotal">
<GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" @refreshTable="refreshTable" :tableData="detailInfo.tableData" :tableTotal="detailInfo.tableTotal">
<template slot="film" slot-scope="scope">
<el-tooltip v-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1" placement="top"
effect="light">
<el-tooltip v-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1" placement="top" effect="light">
<div class="film-txt">(...{{ scope.scope.filmRollList.length }})</div>
<div slot="content">
<div class="tool-title">膜卷号</div>
<div v-for="(item, index) in scope.scope.filmRollList" :key="index">{{ item }}</div>
</div>
</el-tooltip>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">{{
scope.scope.filmRollList[0] }}</div>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">{{ scope.scope.filmRollList[0] }}</div>
<div v-else>--</div>
</template>
<template slot="upgradeGoodsName" slot-scope="scope">
<div>
<img v-if="scope.scope.refundStatus == 'Y'" class="return" src="@/assets/retrun.png" alt="">
<img v-if="scope.scope.refundStatus == 'Y'" class="return" src="@/assets/retrun.png" alt="" />
<span>{{ scope.scope.upgradeGoodsName }}</span>
</div>
</template>
......@@ -71,7 +66,7 @@ export default {
},
paramsObj: {
type: Object,
default: () => { }
default: () => {}
}
},
computed: {
......@@ -106,6 +101,11 @@ export default {
line: 1
},
{
label: '供应商名称',
prop: 'type',
width: 110
},
{
label: '产品编码',
prop: 'type',
width: 100
......@@ -122,6 +122,11 @@ export default {
line: 1
},
{
label: '产品别名',
prop: 'type',
width: 100
},
{
label: '所属分类',
prop: 'goodsTypeName',
width: 150
......@@ -179,28 +184,31 @@ export default {
let selectedData = this.$refs.purchaseOrderDetailTable.mutiSelectArr[this.tableParams.mutiSelectName] || []
// selectedData = selectedData.filter(item => item.refundStatus == 'N')
if (selectedData.some(item => item.refundStatus == 'Y')) {
return this.$message.error('商品已退货,请确认后重新操作');
return this.$message.error('商品已退货,请确认后重新操作')
}
if (!selectedData.length) {
return this.$message.error('请勾选需退货的商品');
return this.$message.error('请勾选需退货的商品')
}
let params = {
orderCode: this.paramsObj.orderCode,
purchaseOrderGoodsIdList: selectedData.map(item => item.id)
}
console.log(selectedData, 'selectedData')
this.$apis.purchaseShopping.purchaseOrderGoodsRefund(params).then(res => {
console.log(res)
if (res.code == 0) {
this.$message.success('操作成功')
this.dialogShow = false
this.$emit('handleConfirm')
} else {
this.$message.error(res.message)
}
}).catch((err) => {
console.log(err)
})
this.$apis.purchaseShopping
.purchaseOrderGoodsRefund(params)
.then(res => {
console.log(res)
if (res.code == 0) {
this.$message.success('操作成功')
this.dialogShow = false
this.$emit('handleConfirm')
} else {
this.$message.error(res.message)
}
})
.catch(err => {
console.log(err)
})
// this.dialogShow = false
},
dynamicParams() {
......@@ -216,7 +224,7 @@ export default {
formatter: cellValue => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件`
}
},
}
// {
// label: '已入库数量',
// prop: 'inputNumber',
......@@ -303,7 +311,7 @@ export default {
font-size: 14px;
color: #666666;
>span {
> span {
margin-right: 20px;
margin-bottom: 10px;
}
......
......@@ -7,8 +7,7 @@
<el-drawer class="shoppingCartDrawerCon" title="购物车" :visible.sync="drawer" size="500px" :direction="direction">
<div class="headerCon" v-if="goodsList.length">
<div class="left">
<el-checkbox :indeterminate="isIndeterminate" @change="handleAllCheckChange(isAllCheck)"
v-model="isAllCheck">全选</el-checkbox>
<el-checkbox :indeterminate="isIndeterminate" @change="handleAllCheckChange(isAllCheck)" v-model="isAllCheck">全选</el-checkbox>
<!-- <input type="checkbox"
class="pointer"
/>全选 -->
......@@ -24,17 +23,14 @@
</div>
<div class="goodsTypeCon" v-for="(item, index) in goodsList" :key="index">
<div class="itemHeader">
<el-checkbox :indeterminate="item.isIndeterminate" class="checkoutBox pointer"
@change="handleGoodsTypeCheckChange(item.goodsTypeCheckout, item)" v-model="item.goodsTypeCheckout">{{
item.goodsTypeName }}</el-checkbox>
<el-checkbox :indeterminate="item.isIndeterminate" class="checkoutBox pointer" @change="handleGoodsTypeCheckChange(item.goodsTypeCheckout, item)" v-model="item.goodsTypeCheckout">{{ item.goodsTypeName }}</el-checkbox>
<!-- <input type="checkbox"
class="checkoutBox pointer"
@change="handleGoodsTypeCheckChange(item.goodsTypeCheckout, item)"
v-model="item.goodsTypeCheckout" /> -->
</div>
<div class="shopgGoodsCon" v-for="(goodsItem, goodsIndex) in item.upgradeGoodsList" :key="goodsIndex">
<el-checkbox class="pointer typeCheckoutBox"
@change="handleGoodsCheckChange(goodsItem.selectedFlag, goodsItem)" v-model="goodsItem.selectedFlag" />
<el-checkbox class="pointer typeCheckoutBox" @change="handleGoodsCheckChange(goodsItem.selectedFlag, goodsItem)" v-model="goodsItem.selectedFlag" />
<!-- <input type="checkbox"
class="pointer typeCheckoutBox"
@change="handleGoodsCheckChange(goodsItem.selectedFlag,goodsItem)"
......@@ -47,24 +43,17 @@
<div class="name one-line-ellipsis">{{ goodsItem.upgradeGoodsName }}</div>
<div class="price">
<!-- v-if="goodsItem.specificationType == 2" .replace(';~;', '/')-->
<span class="label" v-if="goodsItem.specificationType == 2">{{ goodsItem.formatSpecificationData
}}</span>
<span class="label" v-if="goodsItem.specificationType == 2">{{ goodsItem.formatSpecificationData }}</span>
¥{{ goodsItem.purchasePrice }}
</div>
<div class="num">
<el-input-number v-model="goodsItem.goodsNumber"
@change="handleGoodsNumChange($event, goodsItem.id, goodsItem.upgradeGoodsId, goodsItem.suitCarTypeList || [])"
:min="1" class="numInput" size="mini" :max="9999"></el-input-number>
<el-input-number v-model="goodsItem.goodsNumber" @change="handleGoodsNumChange($event, goodsItem.id, goodsItem.upgradeGoodsId, goodsItem.suitCarTypeList || [])" :min="1" class="numInput" size="mini" :max="9999"></el-input-number>
{{ membraneTypeList.includes(goodsItem.goodsType) ? `卷(1卷=${goodsItem.convertedValue || 30}米)` : '件' }}
</div>
<div class="munCom" v-if="goodsItem.suitCarTypeList && goodsItem.suitCarTypeList.length">
<div class="munItem">
<el-select @remove-tag="handleTagDelete(goodsItem)" :ref="'choose' + goodsItem.id" collapse-tags
name="munComInput" size="mini" multiple @focus="handleCarDialog(goodsItem)" value-key="carTypeId"
v-model="goodsItem.suitCarTypeList" style="margin-top: 10px;width: 240px;" placeholder="请选择">
<el-option v-for="(children) in goodsItem.suitCarTypeList" :key="children.carTypeId"
:label="children.carTypeName" :value="children">
</el-option>
<el-select @remove-tag="handleTagDelete(goodsItem)" :ref="'choose' + goodsItem.id" collapse-tags name="munComInput" size="mini" multiple @focus="handleCarDialog(goodsItem)" value-key="carTypeId" v-model="goodsItem.suitCarTypeList" style="margin-top: 10px;width: 240px;" placeholder="请选择">
<el-option v-for="children in goodsItem.suitCarTypeList" :key="children.carTypeId" :label="children.carTypeName" :value="children"></el-option>
</el-select>
</div>
</div>
......@@ -80,9 +69,7 @@
<el-button class="submitBtn" @click="validateGoodsNumber" type="primary">结算</el-button>
</div>
</el-drawer>
<GLDialog class="addressDialog" mode="big" bigTitle="结算确认" okText="确认结算" cancelText="取消结算"
:visible.sync="dialogShow" :close-on-click-modal="false" @onOk="handleSubmit" @onCancel="dialogShow = false">
<GLDialog class="addressDialog" mode="big" bigTitle="结算确认" okText="确认结算" cancelText="取消结算" :visible.sync="dialogShow" :close-on-click-modal="false" @onOk="handleSubmit" @onCancel="dialogShow = false">
<div class="addressTitle">
<img src="@/images/addressIcon.webp" alt="" class="icon" />
<span class="title">{{ addressInfo.yqMerchantName }}</span>
......@@ -125,8 +112,7 @@
</div> -->
<div class="tableTips">采购明细</div>
<div class="table-class">
<GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" @refreshTable="refreshTable"
:tableData="selectList" :hasPage="false">
<GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" @refreshTable="refreshTable" :tableData="selectList" :hasPage="false">
<template slot="upgradeGoodsName" slot-scope="scope">
<div>
<!-- <img v-if="scope.scope.refundStatus == 'Y'" class="retrun" src="@/assets/retrun.png" alt=""> -->
......@@ -136,8 +122,7 @@
<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.brandName}-${item.childName}-${item.seriesName}-${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>
......@@ -156,39 +141,38 @@
<div class="item-remark orderInfoCom">
<div class="label">备注:</div>
<div class="item-content">
<el-input show-word-limit type="textarea" maxlength="200" :rows="3" placeholder="备注说明"
v-model="remarks"></el-input>
<el-input show-word-limit type="textarea" maxlength="200" :rows="3" placeholder="备注说明" v-model="remarks"></el-input>
</div>
</div>
<!-- </div> -->
</GLDialog>
<carBandDialog v-if="relateStoreVisible" @handleRelateStoreConfirm="handleConfirm"
:relateStoreVisible.sync="relateStoreVisible" :upgradeGoodsInfo="goodsInfo">
</carBandDialog>
<carBandDialog v-if="relateStoreVisible" @handleRelateStoreConfirm="handleConfirm" :relateStoreVisible.sync="relateStoreVisible" :upgradeGoodsInfo="goodsInfo"></carBandDialog>
</div>
</template>
<script>
import carBandDialog from './carBandDialog';
import carBandDialog from './carBandDialog'
import { limitPrice } from '@/common/format'
import { membraneTypeList } from '@/utils/constants.js'
export default {
name: 'ShoppingCartCom',
components: {
carBandDialog,
carBandDialog
},
props: {
addressInfo: {
type: Object,
default: () => { }
default: () => {}
}
},
filters: {
formatCar(list) {
console.log(list, 'list')
let str = list.map(item => {
return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
}).join(',')
let str = list
.map(item => {
return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
})
.join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
},
......@@ -211,8 +195,13 @@ export default {
width: 100
},
{
label: '供应商名称',
prop: 'type',
width: 100
},
{
label: '规格',
prop: 'formatSpecificationData',
prop: 'formatSpecificationData'
// width: 100
},
{
......@@ -226,12 +215,12 @@ export default {
width: 150,
line: 1
},
// {
// label: '系列',
// prop: 'goodsName',
// width: 100,
// line: 1
// },
{
label: '产品别名',
prop: 'goodsName',
width: 100,
line: 1
},
{
label: '所属分类',
prop: 'goodsTypeName',
......@@ -265,8 +254,8 @@ export default {
label: '备注',
addHtml: 'remark',
width: 120
// width:
},
// width:
}
]
},
goodsInfo: {},
......@@ -310,7 +299,6 @@ export default {
}
},
computed: {
goodsSelectStatus() {
return this.goodsList.reduce((list, item) => {
item.upgradeGoodsList.forEach(goodsItem => {
......@@ -867,8 +855,6 @@ li {
span {
margin-bottom: 20px;
}
}
.info {
......@@ -919,7 +905,6 @@ li {
}
.editIcon {
width: 16px;
height: 16px;
vertical-align: -3px;
......@@ -956,7 +941,7 @@ li {
font-size: 14px;
color: #666666;
>span {
> span {
margin-right: 20px;
margin-bottom: 10px;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!