Commit cdea020b by zhangquan

车主优选接口联调

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