Commit cdea020b by zhangquan

车主优选接口联调

1 parent 92619b93
......@@ -10,6 +10,9 @@
<el-form-item label="频道子名称:" prop="channelChildName">
<el-input v-model="channelForm.channelChildName" maxlength="12" show-word-limit></el-input>
</el-form-item>
<el-form-item label="频道顺序:" prop="sort">
<el-input v-model="channelForm.sort" maxlength="12" show-word-limit></el-input>
</el-form-item>
<span v-if="channelForm.channelType == 1">
<el-form-item label="频道主题:" prop="channelStyle">
<el-col :span="11" class="theme"></el-col>
......@@ -71,6 +74,7 @@ export default {
publicityImg: '',
channelImg: '',
channelChildName: '',
sort: '',
channelImgArr: []
},
channelImgbgArr: ['banner1', 'banner2'],
......@@ -101,6 +105,7 @@ export default {
channelImg: [{ required: true, message: '请上传频道banner', trigger: 'change' }],
promotion: [{ required: true, message: '请输入频道分享文案', trigger: 'blur' }],
channelChildName: [{ required: true, message: '请输入频道子名称', trigger: 'change' }],
sort: [{ required: true, message: '请输入频道顺序', trigger: 'change' }],
}
}
},
......@@ -157,6 +162,7 @@ export default {
let params = {
channelName: this.channelForm.channelName,
channelChildName: this.channelForm.channelChildName,
sort: this.channelForm.sort,
channelType: this.channelForm.channelType,
channelStyle: this.channelForm.channelStyle,
channelImg: this.channelForm.channelImg,
......
......@@ -79,6 +79,11 @@ export default {
prop: 'channelChildName'
},
{
label: '频道顺序',
width: 100,
prop: 'sort'
},
{
label: '频道宣传语',
prop: 'promotion',
width: 300,
......
......@@ -165,6 +165,7 @@ export default {
formObj:{
smartcarlifeInfoId: '',
goodsName: '',
goodsType: '1',
goodsImage: '',
minSellPrice: '',
retailPrice: '',
......@@ -466,6 +467,7 @@ export default {
categoryName: res.associationClassifySecondName,
id: res.associationClassifySecondId
}
this.formObj.goodsType = '1'
this.formObj.coverList = [res.goodsImage]
this.merchantRequestList = res.merchantList?.map(item => {
let activityPrice = item.activityPrice ? Number(Number(item.activityPrice/100).toFixed(2)) : 0
......
......@@ -107,8 +107,8 @@ export default {
],
formObj:{
source: '2',
channelType: '6',
method: '2',
goodsType: '2',
expressFee: '',
smartcarlifeInfoId: '',
goodsName: '',
......@@ -319,6 +319,7 @@ export default {
getParams(){
let obj = JSON.parse(JSON.stringify(this.formObj))
obj.goodsImage = obj.coverList[0]
obj.expressFee = obj.expressFee ? Number(Number(obj.expressFee*10*10).toFixed(0)) : 0
delete obj.minSellPrice
delete obj.retailPrice
delete obj.coverList
......@@ -361,7 +362,7 @@ export default {
this.$apis.goods.getGoodsDetail(params).then(res => {
if(res) {
for(const key in this.formObj){
const formatAttr = ['depositPrice', 'minSellPrice', 'retailPrice']
const formatAttr = ['depositPrice', 'minSellPrice', 'retailPrice','expressFee']
if(formatAttr.includes(key)){
this.formObj[key] = res[key] ? Number(Number(res[key]/100).toFixed(2)) : 0
}else{
......@@ -372,6 +373,7 @@ export default {
categoryName: res.associationClassifySecondName,
id: res.associationClassifySecondId
}
this.formObj.goodsType = '2'
this.formObj.coverList = [res.goodsImage]
this.merchantRequestList = res.merchantList?.map(item => {
let activityPrice = item.activityPrice ? Number(Number(item.activityPrice/100).toFixed(2)) : 0
......
......@@ -53,7 +53,8 @@ export default {
url: url,
searchForm: {
goodsName: '',
configurationUpgradeGoodsId: ''
discoverGoodsId: '',
goodsType: ''
},
total: 0,
storeList: [],
......@@ -132,7 +133,8 @@ export default {
// minSellPrice: minSellPrice ? Number(Number(minSellPrice*10*10).toFixed(0)) : 0,
// retailPrice: retailPrice ? Number(Number(retailPrice*10*10).toFixed(0)) : 0,
// }
this.searchForm.configurationUpgradeGoodsId = this.routeInfo.type == 2 ? this.routeInfo.id : ''
this.searchForm.discoverGoodsId = this.routeInfo.type == 2 ? this.routeInfo.id : ''
this.searchForm.goodsType = this.routeInfo.goodsType
},
mounted() {
......
<template>
<div class="goods-list-cntr">
<GLTabs v-model="activeName" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs>
<preferList v-if="activeName == 'carOwner'"></preferList>
<preferList v-if="activeName == '2'"></preferList>
<div v-else class="table-wrap">
<GLCombiForm ref="showSearch" class="search-wrap" :rowNumber="1" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset">
<div slot="categorySlot">
......@@ -24,7 +24,7 @@
<span>{{scope.scope.goodsStatus==1 ? '上架' : '下架' }}</span>
</div>
<div slot="merchantPriceSlot" slot-scope="scope">
<template v-if="scope.scope.merchantList && scope.scope.merchantList.length > 1">
<template v-if="scope.scope.saleMerchantList && scope.scope.saleMerchantList.length > 1">
<span>{{ filterData(scope.scope).slice(0, 1).join('、') }}</span>
<el-popover
placement="top"
......@@ -33,11 +33,11 @@
<div v-for="(item,index) in filterData(scope.scope)" :key="index">
{{item}}
</div>
<span class="more-info" slot="reference">...[{{ scope.scope.merchantList.length }}]</span>
<span class="more-info" slot="reference">...[{{ scope.scope.saleMerchantList.length }}]</span>
</el-popover>
</template>
<template v-else>
<span v-if="!scope.scope.merchantList || !scope.scope.merchantList.length">--</span>
<span v-if="!scope.scope.saleMerchantList || !scope.scope.saleMerchantList.length">--</span>
<span v-else>{{ filterData(scope.scope).join('、') }}</span>
</template>
</div>
......@@ -62,14 +62,14 @@
data() {
return {
tableSearchForm: {
channelName: '',
goodsType: '1',
createDate: [],
associationClassifyFirstId: '',
associationClassifySecondId: '',
merchantName: ''
},
activeName: 'sa',
tabPaneList: [{name: 'sas', label: '配置升级'}, {name: 'carOwner', label: '车主优选'}],
activeName: '1',
tabPaneList: [{name: '1', label: '配置升级'}, {name: '2', label: '车主优选'}],
buttonList: [
{
type: 'el-button',
......@@ -229,7 +229,7 @@
{
label: '操作人',
width: 120,
prop: 'operator',
prop: 'updatedBy',
},
]
},
......@@ -284,7 +284,7 @@
}
})
},
filterData({merchantList: list}){
filterData({saleMerchantList: list}){
return list?.map(item => {
let activityPrice = item.activityPrice ? Number((Number(item.activityPrice)/100).toFixed(2)) : 0
return `${item.merchantName || '--'}:${activityPrice || '0'}`
......@@ -310,7 +310,7 @@
},
handleReset() {
this.tableSearchForm = {
channelName: '',
goodsType: '1',
createDate: [],
associationClassifyFirstId: '',
associationClassifySecondId: '',
......@@ -325,7 +325,9 @@
this.$refs.channelRef.data.length ? (this.$refs.channelRef.tableHeightValues = '') : this.$refs.channelRef.setTableHeightFun()
},
handleAdd(row={},type){
const params = {}
const params = {
goodsType: this.activeName
}
let title = '新增商品'
if(type){
params.id = row.id
......
......@@ -19,7 +19,7 @@
<span>{{scope.scope.goodsStatus==1 ? '上架' : '下架' }}</span>
</div>
<div slot="merchantPriceSlot" slot-scope="scope">
<template v-if="scope.scope.merchantList && scope.scope.merchantList.length > 1">
<template v-if="scope.scope.saleMerchantList && scope.scope.saleMerchantList.length > 1">
<span>{{ filterData(scope.scope).slice(0, 1).join('、') }}</span>
<el-popover
placement="top"
......@@ -28,11 +28,11 @@
<div v-for="(item,index) in filterData(scope.scope)" :key="index">
{{item}}
</div>
<span class="more-info" slot="reference">...[{{ scope.scope.merchantList.length }}]</span>
<span class="more-info" slot="reference">...[{{ scope.scope.saleMerchantList.length }}]</span>
</el-popover>
</template>
<template v-else>
<span v-if="!scope.scope.merchantList || !scope.scope.merchantList.length">--</span>
<span v-if="!scope.scope.saleMerchantList || !scope.scope.saleMerchantList.length">--</span>
<span v-else>{{ filterData(scope.scope).join('、') }}</span>
</template>
</div>
......@@ -56,7 +56,7 @@
associationClassifyFirstId: '',
associationClassifySecondId: '',
merchantName: '',
channelType: 6
goodsType: '2',
},
tabPaneList: [{name: 'sa', label: '配置升级'}, {name: 'sa', label: '车主优选'}],
buttonList: [
......@@ -187,7 +187,11 @@
tableColumns: [
{
label: '来源',
prop: 'sourse'
prop: 'sourse',
width: 150,
formatter: cellValue => {
return '嘀加智享平台'
}
},
{
label: '商品名称',
......@@ -198,18 +202,18 @@
label: '缩略图',
addHtml: 'imageSlot'
},
{
label: '供货价格(元)',
formatter: cellValue => {
return cellValue.paymentType==1 ? '全款' : '定金+尾款'
}
},
{
label: '市场价格(元)',
formatter: cellValue => {
return cellValue.depositPrice ? Number((Number(cellValue.depositPrice)/100).toFixed(2)) : '--'
}
},
// {
// label: '供货价格(元)',
// formatter: cellValue => {
// return cellValue.paymentType==1 ? '全款' : '定金+尾款'
// }
// },
// {
// label: '市场价格(元)',
// formatter: cellValue => {
// return cellValue.depositPrice ? Number((Number(cellValue.depositPrice)/100).toFixed(2)) : '--'
// }
// },
{
label: '销售价格(元)',
width: 200,
......@@ -217,21 +221,13 @@
},
{
label: '赠送积分',
formatter: cellValue => {
return `${cellValue.associationClassifyFirstName||''}-${cellValue.associationClassifySecondName||''}`
}
},
{
label: '使用积分',
formatter: cellValue => {
return `${cellValue.associationClassifyFirstName||''}-${cellValue.associationClassifySecondName||''}`
}
width: 120,
prop: 'giveIntegral'
},
{
label: '商品分类',
formatter: cellValue => {
return `${cellValue.associationClassifyFirstName||''}-${cellValue.associationClassifySecondName||''}`
}
width: 180,
prop: 'associationClassifyFirstName'
},
{
label: '状态',
......@@ -249,7 +245,7 @@
},
{
label: '操作人',
prop: 'operator',
prop: 'updatedBy',
},
]
},
......@@ -304,7 +300,7 @@
}
})
},
filterData({merchantList: list}){
filterData({saleMerchantList: list}){
return list?.map(item => {
let activityPrice = item.activityPrice ? Number((Number(item.activityPrice)/100).toFixed(2)) : 0
return `${item.merchantName || '--'}:${activityPrice || '0'}`
......@@ -330,8 +326,7 @@
},
handleReset() {
this.tableSearchForm = {
channelName: '',
channelType: '6',
goodsType: '2',
createDate: [],
associationClassifyFirstId: '',
associationClassifySecondId: '',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!