Commit 6a449ea7 by 前端

Merge branch 'v3.16.1' into 'master'

V3.16.1

See merge request !25
2 parents 3fa702c6 68dac2d5
......@@ -42,6 +42,16 @@ const getCarlifeGoodsApi = params => {
})
}
const getSelfSupportGoodsApi = params => {
params.method = 'scrm.api.shopmall.goods.discover.page'
return http({
url,
method: 'post',
data: params,
sign: true
})
}
const addGoodsApi = params => {
params.method = 'scrm.api.shopmall.goods.configuration.upgrade.add.or.update'
......@@ -130,12 +140,23 @@ const exportGoodsApi = params => {
sign: true
})
}
const getSelfGoodsDetailApi = params => {
params.method = 'scrm.api.shopmall.goods.getById'
return http({
url,
method: 'post',
data: params,
sign: true
})
}
export default {
getGoodsListApi,
updateGoodsStatusApi,
delGoodsApi,
getCarlifeGoodsApi,
getSelfSupportGoodsApi,
addGoodsApi,
getGoodsDetail,
getMerchantListApi,
......@@ -143,5 +164,6 @@ export default {
getVisitorListApi,
getSharedListApi,
exportBrowseApi,
exportGoodsApi
exportGoodsApi,
getSelfGoodsDetailApi
}
\ No newline at end of file
<template>
<div class="category-list-ctnr">
<div>
<ownerPreference></ownerPreference>
</div>
<!-- <div class="category-list-ctnr">
<GLTabs ref='GLTabs' class="tabs" v-model="activeName" :tabPaneList="tabPaneList"
@tab-click="handleClick" removeTab="removeTab"></GLTabs>
......@@ -38,19 +41,19 @@
<template v-if="activeName=='2'">
<ownerPreference></ownerPreference>
</template>
</div>
</div> -->
</template>
<script>
import url from '@/assets/empty.png'
import * as dayjs from 'dayjs'
import pullDownNav from './components/pullDownNav'
// import pullDownNav from './components/pullDownNav'
import ownerPreference from "views/category/ownerPreference";
export default {
name: 'App',
components: {
pullDownNav,
// pullDownNav,
ownerPreference
},
data() {
......@@ -139,7 +142,7 @@ export default {
}
},
created() {
this.getChannelList()
// this.getChannelList()
},
beforeRouteEnter(to, from, next) {
......
......@@ -9,39 +9,19 @@
@change="changeChannelImg"></glsx-preview>
<div class="text-tip" style="margin: 0;">建议尺寸:120*120</div>
</div>
<div slot="selectBrandSlot">
<el-radio-group v-model="formObj.categoryStyle">
<el-radio :label="0">标准商品-竖向排列
</el-radio>
<el-radio :label="1">标准商品-横向排列
</el-radio>
<el-radio :label="2">种草样式</el-radio>
</el-radio-group>
<div class="category-style">
<el-popover
<div slot="selectBrandSlot" class="mode-slot">
<div class="mode-item" v-for="item in modeList" :key="item.id">
<el-radio v-model="formObj.categoryStyle" :label="item.id">{{item.name}}</el-radio>
<div>
<el-popover
popper-class="tool-gltip"
placement="top-start"
width="200"
trigger="hover">
<img src="@/assets/category/vertical.png" style="width:300px;height:300px;"/>
<img slot="reference" src="@/assets/category/vertical.png">
</el-popover>
<el-popover
popper-class="tool-gltip"
placement="top-start"
width="200"
trigger="hover">
<img src="@/assets/category/transverse.png" style="width:300px;height:300px;"/>
<img slot="reference" src="@/assets/category/transverse.png">
</el-popover>
<el-popover
popper-class="tool-gltip"
placement="top-start"
width="200"
trigger="hover">
<img src="@/assets/category/recommend.png" style="width:300px;height:300px;"/>
<img slot="reference" src="@/assets/category/recommend.png">
</el-popover>
<img :src="require(`@/assets/category/${item.url}.png`)" style="width:300px;height:300px;"/>
<img slot="reference" :src="require(`@/assets/category/${item.url}.png`)">
</el-popover>
</div>
</div>
</div>
</glsx-combi-form>
......@@ -54,7 +34,28 @@
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
const MODE_LIST = [
{
id: 0,
url: 'vertical',
name: '商品-竖向排列'
},
{
id: 1,
url: 'transverse',
name: '商品-横向排列'
},
{
id: 2,
url: 'recommend',
name: '种草样式A'
},
{
id: 3,
url: 'recommend2',
name: '种草样式B'
}
]
export default {
name: 'add',
components: {
......@@ -63,8 +64,10 @@ export default {
data() {
return {
dialogVisible: false,
modeList: MODE_LIST,
formObj: {
id: '',
categoryType: 1,
categoryName: '',
categoryStyle: 0,
videoCoverArr: []
......@@ -107,6 +110,23 @@ export default {
isDisabled: false
},
{
label: '分类归属',
name: 'categoryType',
type: 'radio',
optionList: [
{
label: '配置升级',
id: 1
},
{
label: '车主优选',
id: 2
},
],
optionId: 'id',
optionLabel: 'label'
},
{
label: '分类图标',
name: 'categoryImage',
addHtml: 'videoCoverSlot'
......@@ -126,7 +146,6 @@ export default {
}
},
methods: {
changeChannelImg(val) {
this.$refs.baseInfoRef.$refs.formRef.validateField('coverUrl')
},
......@@ -134,7 +153,6 @@ export default {
this.$refs.baseInfoRef.$refs.formRef.validate(valid => {
if (valid) {
let params = JSON.parse(JSON.stringify(this.formObj))
params.categoryType = 2 //类型 1 配置升级 2 车主优选
params.categoryLevel = 1 //分类等级(1:一级分类,2:二级分类)
params.categoryImage = this.formObj.videoCoverArr[0]
delete params.videoCoverArr
......@@ -156,7 +174,7 @@ export default {
getCaseDetailApi() {
this.$apis.category.batchDetailApi({id: this.$route.query.id}).then(res => {
if (res) {
const attrList = ['id', 'categoryName', 'categoryStyle']
const attrList = ['id', 'categoryName', 'categoryStyle', 'categoryType']
attrList.forEach(key => {
this.formObj[key] = res[key]
})
......@@ -198,9 +216,17 @@ export default {
}
}
}
.mode-slot{
display: flex;
.mode-item{
width: 145px;
img{
width: 103.97px;
height: 86.5px;
}
}
}
.category-style {
img {
width: 104px;
height: 102.6px;
......
......@@ -28,7 +28,11 @@
</div>
<div class="category-style" v-if="scope.scope.categoryStyle == 2">
<img src="@/assets/category/recommend.png">
<span>种草模式</span>
<span>种草模式A</span>
</div>
<div class="category-style" v-if="scope.scope.categoryStyle == 3">
<img src="@/assets/category/recommend2.png">
<span>种草模式B</span>
</div>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
......@@ -113,12 +117,19 @@ export default {
prop: 'categoryName'
},
{
label: '分类归属',
prop: 'categoryType',
formatter: cellValue => {
return cellValue.categoryType==1 ? '配置升级' : '车主优选'
}
},
{
label: '分类图标',
addHtml: 'categoryImage',
width: 150
},
{
label: '分类布局',
label: '布局样式',
addHtml: 'categoryStyle',
width: 220
},
......@@ -147,7 +158,6 @@ export default {
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.tableSearchForm))
params.categoryType = 2
params.categoryLevel = 1
if (this.tableSearchForm.createDate?.length) {
params.beginCreateTime = new Date(this.tableSearchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
......
......@@ -13,12 +13,18 @@
<glsx-combi-form :isInline="false" ref="goodsInfoRef" labelWidth="154px" defaultWidth="432px"
:formObj.sync="formObj" :formData="goodsFormData" :formRules="goodsRule">
<div slot="uploadSlot" class="upload-calss">
<glsx-preview :picOptions="posterOptions" :imageUrlArr="formObj.coverList"
@change="changeChannelImg"></glsx-preview>
<glsx-preview :picOptions="posterOptions" :imageUrlArr="formObj.coverList"></glsx-preview>
<span class="tip">建议尺寸750*750,图片格式为jpg,jpeg,png,大小2M以内</span>
</div>
</glsx-combi-form>
</div>
<div slot="propagateCoverSlot" class="propagate-cover-class">
<div class="upload-wrap">
<glsx-preview :picOptions="posterOptions" :imageUrlArr="formObj.styleBImgList"></glsx-preview>
<span class="preview" @click="showPreviewDialog=true">预览</span>
</div>
<span class="tip">分类布局选择种草样式B时商品宣传大图,建议720*540,大小2M以内</span>
</div>
<div slot="paymentSlot">
<el-radio-group :disabled="disabled" v-model="formObj.paymentType">
<el-radio :label="1">全款</el-radio>
......@@ -95,10 +101,6 @@
</div>
</div>
</div>
<div slot="categorySlot">
<brandCascader :curInfo="curCategoryInfo" :disabled="disabled" @clickItem="selectCategory"
class="category-class"></brandCascader>
</div>
</glsx-combi-form>
</div>
<GLFooter style="margin-top: 16px;">
......@@ -107,7 +109,7 @@
</GLFooter>
<selectCarDialog v-if="carDialogVisible" :echoData="vehicleSeriesRequestList" @handleClose="handleCarSeriesClose"
@handleConfirm="handleConfirm" :dialogVisible="carDialogVisible"></selectCarDialog>
<selectGoods v-if="goodsVisible" :routeInfo="routeInfo" :dialogVisible="goodsVisible"
<selectGoods v-if="goodsVisible" :routeInfo="routeInfo" :dialogVisible="goodsVisible" :goodsInfo="{}"
@handleGoodsConfirm="handleGoodsConfirm" @handleGoodsClose="handleGoodsClose"></selectGoods>
<selectMerchantDialog @confirmDialog="confirmDialog" @closeDialog="closeDialog"
:goodsId="formObj.smartcarlifeInfoId" :selectedList="saleMerchantList"
......@@ -116,6 +118,9 @@
<img :src="dialogSrc" width="100%" v-if="dialogType == 'img'" />
<video width="100%" autoplay controls :src="dialogSrc" v-else></video>
</el-dialog>
<div v-if="showPreviewDialog" class="preview-dialog" @click="showPreviewDialog = false">
<img class="preview-img" src="@/assets/preview.png" alt=""/>
</div>
</div>
</template>
<script>
......@@ -156,7 +161,6 @@ const notPriceColumns = [
}
]
import glsxCombiForm from '@/components/glsx-combi-form'
import brandCascader from './components/brandCascader'
import selectGoods from './components/selectGoods'
import selectCarDialog from '@/views/store/components/selectCarDialog'
import selectMerchantDialog from './components/selectMerchantDialog'
......@@ -165,7 +169,6 @@ export default {
name: 'add',
components: {
glsxCombiForm,
brandCascader,
selectGoods,
selectCarDialog,
selectMerchantDialog
......@@ -184,19 +187,18 @@ export default {
},
data() {
return {
showPreviewDialog: false,
dialogVisibleImg:false,
goodsVisible: false,
carDialogVisible: false,
merchantDialogVisible: false,
disabled: false,
dialogSrc:'',
goodsInfo: {},
dialogSrc:'',
routeInfo: {},
defaultProps: {
children: 'categoryName',
label: 'childs'
},
curCategoryInfo: {},
posterOptions: {
width: '104px',
height: '104px',
......@@ -236,12 +238,13 @@ export default {
minSellPrice: '',
retailPrice: '',
coverList: [],
styleBImgList: [],
styleBImg: '',
paymentType: 1,
depositPrice: '',
vehicleSeriesType: 1,
goodsVideo: '',
associationClassifyFirstId: '',
associationClassifySecondId: ''
associationClassifyFirstId: ''
},
saleMerchantList: [],
vehicleSeriesRequestList: [],
......@@ -324,17 +327,7 @@ export default {
},
trigger: 'change'
}],
categoryName: [{
required: true,
validator: (rule, value, callback) => {
if (!this.formObj.associationClassifyFirstId || !this.formObj.associationClassifySecondId) {
callback(new Error('请选择关联商品分类'))
} else {
callback()
}
},
trigger: 'change'
}],
associationClassifyFirstId: [{required: true, message: '请选择关联商品分类', trigger: 'change'}],
},
formData: [
{
......@@ -352,6 +345,11 @@ export default {
isDisabled: false
},
{
label: '种草样式B宣传图',
name: 'propagateCover',
addHtml: 'propagateCoverSlot'
},
{
label: '收款方式',
name: 'paymentType',
addHtml: 'paymentSlot'
......@@ -402,11 +400,20 @@ export default {
name: 'carSeriesName',
addHtml: 'carSeriesSlot',
},
// {
// label: '关联商品分类',
// name: 'categoryName',
// addHtml: 'categorySlot'
// },
{
label: '关联商品分类',
name: 'categoryName',
addHtml: 'categorySlot'
}
name: 'associationClassifyFirstId',
type: 'select',
optionList: [],
optionId: 'id',
optionLabel: 'categoryName',
isDisabled: false
},
],
selectedtableParams: {
listName: 'list',
......@@ -418,7 +425,7 @@ export default {
}
},
created() {
// this.getCategory()
this.getCategory()
const urlParam = this.$route.params
this.routeInfo = JSON.parse(decodeURIComponent(urlParam.id))
const {id, type} = this.routeInfo
......@@ -427,6 +434,8 @@ export default {
this.posterOptions.isClose = false
const _target = this.goodsFormData.find(item => item.name == 'goodsName')
_target.isDisabled = true
const _classifyTarget = this.formData.find(item => item.name == 'associationClassifyFirstId')
_classifyTarget.isDisabled = true
this.selectedtableParams.tableOption = null
}
if (id) {
......@@ -434,6 +443,19 @@ export default {
}
},
methods: {
getCategory() {
const params = {
pageSize: 10000,
pageNum: 1,
categoryType: 1
}
this.$apis.category.getCategoryListApi(params).then(res => {
if (res?.list?.length) {
const _target = this.formData.find(item => item.name == 'associationClassifyFirstId')
_target.optionList = res.list
}
})
},
// 上传视频
handleVideoChange(e) {
let file = e.srcElement.files[0]
......@@ -590,11 +612,13 @@ export default {
getParams() {
let obj = JSON.parse(JSON.stringify(this.formObj))
obj.goodsImage = obj.coverList[0]
obj.styleBImg = obj.styleBImgList[0]
obj.depositPrice = obj.depositPrice ? Number(Number(obj.depositPrice * 10 * 10).toFixed(0)) : 0
if (obj.paymentType == 1) delete obj.depositPrice
delete obj.minSellPrice
delete obj.retailPrice
delete obj.coverList
delete obj.styleBImgList
let saleMerchantList = this.saleMerchantList.map(item => {
let {merchantId, merchantName, activityPrice, originalPrice} = item
......@@ -616,8 +640,7 @@ export default {
}
if (this.routeInfo.id) params.id = this.routeInfo.id
return params
}
,
},
handleSave() {
this.$refs.baseInfoRef.$refs.formRef.validate(valid => {
if (valid) {
......@@ -651,12 +674,9 @@ export default {
this.formObj[key] = res[key]
}
}
this.curCategoryInfo = {
categoryName: res.associationClassifySecondName,
id: res.associationClassifySecondId
}
this.formObj.goodsType = '1'
this.formObj.coverList = [res.goodsImage]
this.formObj.styleBImgList = res.styleBImg ? [res.styleBImg] : []
this.saleMerchantList = res.saleMerchantList?.map(item => {
let activityPrice = item.activityPrice ? Number(Number(item.activityPrice / 100).toFixed(2)) : 0
let originalPrice = item.originalPrice ? Number(Number(item.originalPrice / 100).toFixed(2)) : 0
......@@ -689,6 +709,30 @@ export default {
color: #666666;
}
.propagate-cover-class{
.preview{
color: #5850ff;
font-weight: 400;
font-size: 14px;
line-height: 20px;
align-self: self-end;
margin-left: 10px;
cursor: pointer;
}
.upload-wrap{
display: flex;
}
.tip{
height: 20px;
line-height: 20px;
align-self: flex-end;
font-weight: 400;
font-size: 14px;
color: #999999;
}
}
.goods-wrap {
padding: 20px 20px 1px;
width: 1000px;
......@@ -849,4 +893,22 @@ export default {
color: #999999;
margin-bottom: -35px;
}
.preview-dialog{
position: fixed;
left: 0;
right: 0;
top: 0;
z-index: 99;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
.preview-img{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 390px;
height: 720px;
}
}
</style>
......@@ -15,15 +15,19 @@
<el-button :size="size"
type="primary"
@click="resetTable">查询</el-button>
<el-button :size="size" v-if="goodsInfo.goodsSource==2"
@click="resetSearch">重置</el-button>
</span>
</glsx-combi-form>
<GLTable ref="goodsRef"
:noDataImg="url"
:searchForm="searchForm"
:tableParams="tableParams"
:beforeSearchFn="beforeSearchFn"
:pageConf="pageConf"
@refreshTable="getList"
:getListApi="getListApi"
:pageSizes="pageSizes"
:hasNum="false"
:setTableFinishFun="setTableFinishFun">
<div slot="radioHtml"
......@@ -33,12 +37,22 @@
:label="scope.scope.id"
@click.native="handleClick(scope.scope)"></el-radio>
</div>
<div slot="selfRadioHtml"
class="store-table"
slot-scope="scope">
<el-radio v-model="curInfo.goodsId"
:label="scope.scope.goodsId"
@click.native="handleClick(scope.scope)"></el-radio>
</div>
<div slot="imageSlot" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.goodsImage" />
<img class="img-36 pointer" slot="reference" :src="scope.scope.goodsImage" />
</el-popover>
</div>
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
<img :src="scope.scope.goodsImage" alt="">{{ scope.scope.goodsName }}
</div>
</GLTable>
</GLDialog>
</div>
......@@ -46,6 +60,65 @@
<script>
import url from '@/assets/empty.png'
const MERCHANT_SEARCH_ITEM = {
label: '门店名称',
name: 'merchantName',
type: 'input',
width: '200px',
labelWidth: '10px',
isClear: true
}
const defaultTableCol = [
{
label: '',
prop: '',
width: 80,
addHtml: 'radioHtml'
},
{
label: '商品名称',
prop: 'goodsName'
},
{
label: '缩略图',
addHtml: 'imageSlot'
},
{
label: '价格(元)',
formatter: cellValue => {
return cellValue.retailPrice ? Number(Number(cellValue.retailPrice/100).toFixed(2)) : '--'
}
}
]
const merchantGoodsTableCol = [
{
label: '',
prop: '',
width: 80,
addHtml: 'selfRadioHtml'
},
{
label: '商品信息',
addHtml: 'goodsNameSlot'
},
{
label: '门店名称',
prop: 'merchantName'
},
{
label: '零售价(元)',
formatter: cellValue => {
return cellValue.retailPrice ? Number(Number(cellValue.retailPrice/100).toFixed(2)) : '--'
}
},
{
label: '划线价(元)',
formatter: cellValue => {
return cellValue.originalPrice ? Number(Number(cellValue.originalPrice/100).toFixed(2)) : '--'
}
}
]
export default {
name: 'selectStore',
data() {
......@@ -67,7 +140,7 @@ export default {
name: 'goodsName',
type: 'input',
placeholder: '请输入商品名称',
width: '300px',
width: '200px',
labelWidth: '10px',
isClear: true
}
......@@ -79,30 +152,10 @@ export default {
getListApi: this.$apis.goods.getCarlifeGoodsApi,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '',
prop: '',
width: 80,
addHtml: 'radioHtml'
},
{
label: '商品名称',
prop: 'goodsName'
},
{
label: '缩略图',
addHtml: 'imageSlot'
},
{
label: '价格(元)',
formatter: cellValue => {
return cellValue.retailPrice ? Number(Number(cellValue.retailPrice/100).toFixed(2)) : '--'
}
}
]
tableColumns:defaultTableCol
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
pageSizes: [5, 10, 20, 30, 40],
baseData: {}
}
},
......@@ -133,8 +186,13 @@ export default {
// minSellPrice: minSellPrice ? Number(Number(minSellPrice*10*10).toFixed(0)) : 0,
// retailPrice: retailPrice ? Number(Number(retailPrice*10*10).toFixed(0)) : 0,
// }
this.searchForm.discoverGoodsId = this.routeInfo.type == 2 ? this.routeInfo.id : ''
this.searchForm.goodsType = this.routeInfo.goodsType
this.searchForm.discoverGoodsId = this.routeInfo.type == 2 ? this.routeInfo.id : '' //1查看,2编辑,空是新增,编辑进来要传id
this.searchForm.goodsType = this.routeInfo.goodsType // 1是配置 2是车主
if(this.goodsInfo.goodsSource==2){ //来源是门店自营的搜素和列表字段都要改
this.searchFormData.push(MERCHANT_SEARCH_ITEM)
this.tableParams.tableColumns = merchantGoodsTableCol
this.getListApi = this.$apis.goods.getSelfSupportGoodsApi
}
},
mounted() {
......@@ -146,6 +204,22 @@ export default {
resetTable() {
this.$refs.goodsRef.refreshTable()
},
resetSearch(){
this.searchForm = {
goodsName: '',
discoverGoodsId: '',
goodsType: ''
}
this.resetTable()
},
beforeSearchFn() {
return new Promise(resolve => {
if(this.goodsInfo.goodsSource==2){
delete this.searchForm.goodsType
}
resolve()
})
},
setTableFinishFun() {
this.$refs.goodsRef.tableHeightValues = '460px'
},
......@@ -174,6 +248,14 @@ export default {
margin-top: 1px;
}
}
.goodsNameSlot{
img{
width: 36px;
height: 36px;
vertical-align: middle;
margin-right: 8px;
}
}
.select-store {
.storeDailog {
width: 500px;
......
......@@ -4,9 +4,7 @@
<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">
<brandCascader ref="cascaderRef" @clickItem="selectCategory" class="category-slot-class"></brandCascader>
</div>
</GLCombiForm>
<div class="operate-wrap">
<span class="table-title">发现商品列表</span>
......@@ -69,13 +67,11 @@
<script>
import url from '@/assets/empty.png'
import brandCascader from './components/brandCascader'
import preferList from './preferList'
import { exportFn } from '@/common/constant'
export default {
name: 'App',
components: {
brandCascader,
preferList
},
beforeRouteEnter(to, from, next) {
......@@ -84,6 +80,9 @@
if(from.path.indexOf('/goods/addPrefer')==0 || (from.path.indexOf('/goods/browseList')==0 && from.query.activeName== 2)) {vm.activeName='2'}
})
},
created() {
this.getCategory()
},
data() {
return {
tableSearchForm: {
......@@ -190,9 +189,12 @@
type: 'input'
},
{
label: '商品分类',
name: 'goodsCategory',
addHtml: 'categorySlot'
label: '分类名称',
name: 'associationClassifyFirstId',
type: 'select',
optionList: [],
optionId: 'id',
optionLabel: 'categoryName',
},
],
getListApi: this.$apis.goods.getGoodsListApi,
......@@ -254,7 +256,7 @@
label: '分类',
width: 150,
formatter: cellValue => {
return `${cellValue.associationClassifyFirstName||''}-${cellValue.associationClassifySecondName||''}`
return `${cellValue.associationClassifyFirstName||''}`
}
},
{
......@@ -281,7 +283,6 @@
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
created() {},
mounted() {},
methods: {
// 明细
......@@ -312,6 +313,20 @@
}
})
},
getCategory() {
const params = {
pageSize: 10000,
pageNum: 1,
categoryType: 1
}
this.$apis.category.getCategoryListApi(params).then(res => {
if (res?.list?.length) {
const _target = this.searchFormData.find(item => item.name == 'associationClassifyFirstId')
_target && (_target.optionList = res.list)
console.log(this.searchFormData)
}
})
},
handleExport () {
var params = this.$common.utils.deepClone(this.searchForm)
params.goodsType = 1
......
......@@ -24,14 +24,32 @@
<span :class="['status', scope.scope.goodsStatus==1 ? 'success-status': 'error-status']"></span>
<span>{{ scope.scope.goodsStatus == 1 ? '上架' : '下架' }}</span>
</div>
<div slot="merchantNameSlot" slot-scope="scope">
<template v-if="scope.scope.saleMerchantList && scope.scope.saleMerchantList.length > 1">
<span>{{ filterData(scope.scope,'merchantName').slice(0, 1).join('、') }}</span>
<el-popover
placement="top"
width="fit-content"
trigger="hover">
<div v-for="(item,index) in filterData(scope.scope, 'merchantName')" :key="index">
{{ item }}
</div>
<span class="more-info" slot="reference">...[{{ scope.scope.saleMerchantList.length }}]</span>
</el-popover>
</template>
<template v-else>
<span v-if="!scope.scope.saleMerchantList || !scope.scope.saleMerchantList.length">--</span>
<span v-else>{{ filterData(scope.scope, 'merchantName').join('、') }}</span>
</template>
</div>
<div slot="merchantPriceSlot" slot-scope="scope">
<template v-if="scope.scope.saleMerchantList && scope.scope.saleMerchantList.length > 1">
<span>{{ filterData(scope.scope).slice(0, 1).join('、') }}</span>
<span>{{ filterData(scope.scope, 'price').slice(0, 1).join('、') }}</span>
<el-popover
placement="top"
width="fit-content"
trigger="hover">
<div v-for="(item,index) in filterData(scope.scope)" :key="index">
<div v-for="(item,index) in filterData(scope.scope, 'price')" :key="index">
{{ item }}
</div>
<span class="more-info" slot="reference">...[{{ scope.scope.saleMerchantList.length }}]</span>
......@@ -39,7 +57,7 @@
</template>
<template v-else>
<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, 'price').join('、') }}</span>
</template>
</div>
<div
......@@ -58,12 +76,12 @@
</div>
<div slot="giveIntegralSlot" slot-scope="scope">
<template v-if="scope.scope.saleMerchantList && scope.scope.saleMerchantList.length > 1">
<span>{{ filterData(scope.scope, 1).slice(0, 1).join('、') }}</span>
<span>{{ filterData(scope.scope, 'score').slice(0, 1).join('、') }}</span>
<el-popover
placement="top"
width="400"
trigger="hover">
<div v-for="(item,index) in filterData(scope.scope,1)" :key="index">
<div v-for="(item,index) in filterData(scope.scope,'score')" :key="index">
{{ item }}
</div>
<span class="more-info" slot="reference">...({{ scope.scope.saleMerchantList.length }})</span>
......@@ -71,7 +89,7 @@
</template>
<template v-else>
<span v-if="!scope.scope.saleMerchantList || !scope.scope.saleMerchantList.length">--</span>
<span v-else>{{ filterData(scope.scope, 1).join('、') }}</span>
<span v-else>{{ filterData(scope.scope, 'score').join('、') }}</span>
</template>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
......@@ -197,25 +215,30 @@ export default {
},
{
label: '来源',
name: 'source',
name: 'goodsSource',
type: 'select',
optionList: [
{
id: '',
name: '全部'
},
// {
// id: '1',
// name: '云中鹤'
// },
{
id: '2',
id: 1,
name: '嘀加智享'
},
{
id: 2,
name: '门店自营'
},
],
optionId: 'id',
optionLabel: 'name'
},
{
label: '门店名称',
name: 'merchantName',
type: 'input'
},
],
getListApi: this.$apis.goods.getGoodsListApi,
tableParams: {
......@@ -226,10 +249,10 @@ export default {
tableColumns: [
{
label: '来源',
prop: 'sourse',
prop: 'goodsSource',
width: 150,
formatter: cellValue => {
return '嘀加智享平台'
return cellValue.goodsSource==1 ? '嘀加智享平台' : '门店自营'
}
},
{
......@@ -241,6 +264,12 @@ export default {
label: '缩略图',
addHtml: 'imageSlot'
},
{
label: '门店名称',
prop: 'merchantName',
width: 200,
addHtml: 'merchantNameSlot'
},
// {
// label: '供货价格(元)',
// formatter: cellValue => {
......@@ -411,16 +440,18 @@ export default {
}
})
},
filterData({saleMerchantList: list}, notFormat) {
if (notFormat) {
filterData({saleMerchantList: list}, type) {
if (type=='score') {
return list?.map(item => {
return `${item.merchantName || '--'}:${item.giveIntegral || '0'}`
}) || []
} else {
} else if(type=='price') {
return list?.map(item => {
let activityPrice = item.activityPrice ? Number((Number(item.activityPrice) / 100).toFixed(2)) : 0
return `${item.merchantName || '--'}:${activityPrice || '0'}`
return `${activityPrice || '0'}`
}) || []
}else{
return list?.map(item => item.merchantName) || []
}
},
getParams() {
......
......@@ -83,13 +83,24 @@
<img :src="shareData.posterUrl" />
</div>
</div>
<div class="share-content">
<div>
<div class="share-title">小程序码</div>
<el-button type="primary" @click="handleSaveImg(shareData.qrCodeUrl, '小程序码')">保存图片</el-button>
<div class="share-qrcode">
<div class="share-content qrcode-item">
<div>
<div class="share-title">小程序码</div>
<el-button type="primary" @click="handleSaveImg(shareData.qrCodeUrl, '小程序码')">保存图片</el-button>
</div>
<div class="qr-code">
<img :src="shareData.qrCodeUrl" />
</div>
</div>
<div class="qr-code">
<img :src="shareData.qrCodeUrl" />
<div class="share-content qrcode-item" v-if="activeName==6">
<div>
<div class="share-title">员工注册码</div>
<el-button type="primary" @click="handleSaveImg(shareData.registerQrCodeUrl, '员工注册码')">保存图片</el-button>
</div>
<div class="qr-code">
<img :src="shareData.registerQrCodeUrl" />
</div>
</div>
</div>
</div>
......@@ -483,6 +494,14 @@ export default {
}
}
}
.share-qrcode{
display: flex;
flex-direction: column;
gap: 10px;
.qrcode-item{
height: 159px;
}
}
.share-footer {
width: 680px;
height: 90px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!