Commit a0ca653f by 胡悦
2 parents fbf6a559 550fc00b
...@@ -107,9 +107,6 @@ html { ...@@ -107,9 +107,6 @@ html {
.marketing .wechat-container .wechat-box { .marketing .wechat-container .wechat-box {
width: 290px; width: 290px;
border: 1px solid #cecece;
// width: 100%;
border-radius: 2px;
} }
.marketing .edit-container { .marketing .edit-container {
......
<!-- 选择商品弹窗 --> <!-- 选择商品弹窗 -->
<template> <template>
<glsx-dialog class="muti-pro" title="选择商品" :isVisible.sync="isMutiSelectVisible" :height="height" width="70%" @confirmDialog="handleMutiSelectConfirm" @closeDialog="handleMutiSelectClose" :noClose="false" :noCancel="true"> <glsx-dialog class="muti-pro" title="选择商品" :isVisible.sync="isMutiSelectVisible" width="70%" @confirmDialog="handleMutiSelectConfirm" @closeDialog="handleMutiSelectClose" :noClose="false" :noCancel="true">
<div style="max-height:60vh"> <div style="max-height:60vh">
<div class="noproDiv" v-if="!productList.length && fnCallBack">
<img src="@/assets/noPro.png" />
<p class="noproP">系统暂无已创建的商品</p>
</div>
<div v-if="productList.length">
<el-form :inline="true" :model="searchProForm"> <el-form :inline="true" :model="searchProForm">
<el-form-item label="商品名称:"> <el-form-item label="商品名称:">
<el-input :size="size" v-model="searchProForm.name" placeholder="请输入商品名称" maxlength="20" clearable></el-input> <el-input :size="size" v-model="searchProForm.name" placeholder="请输入商品名称" maxlength="20" clearable></el-input>
...@@ -17,6 +22,7 @@ ...@@ -17,6 +22,7 @@
</span> </span>
</GLTable> </GLTable>
</div> </div>
</div>
</glsx-dialog> </glsx-dialog>
</template> </template>
...@@ -60,7 +66,8 @@ export default { ...@@ -60,7 +66,8 @@ export default {
prop: 'merchantName' prop: 'merchantName'
} }
] ]
} },
fnCallBack: false
} }
}, },
...@@ -98,6 +105,7 @@ export default { ...@@ -98,6 +105,7 @@ export default {
} }
var that = this var that = this
this.$apis.couponManage.getAllGoodsApi(params).then(res => { this.$apis.couponManage.getAllGoodsApi(params).then(res => {
this.fnCallBack = true
// console.log(res) // console.log(res)
// this.productList = res // this.productList = res
this.productList = res.list this.productList = res.list
......
<!-- 选择商品 - 单选 --> <!-- 选择商品 - 单选 -->
<template> <template>
<glsx-dialog class="single-pro" title="选择商品" :isVisible.sync="isSingleSelectVisible" width="900px" @confirmDialog="handleSingleSelectConfirm" @closeDialog="handleSingleSelectClose"> <glsx-dialog class="single-pro" title="选择商品" :isVisible.sync="isSingleSelectVisible" width="900px" @confirmDialog="handleSingleSelectConfirm" @closeDialog="handleSingleSelectClose">
<el-radio-group v-model="infoId"> <div style="max-height:60vh">
<div class="noproDiv" v-if="!productList.length && fnCallBack">
<img src="@/assets/noPro.png" />
<p class="noproP">系统暂无已创建的商品</p>
</div>
<el-radio-group v-model="infoId" v-if="productList.length">
<el-radio class="pro-box" v-for="item in productList" :key="item.id" :label="item.id"> <el-radio class="pro-box" v-for="item in productList" :key="item.id" :label="item.id">
<img :src="item.goodsImage" /> <img :src="item.goodsImage" />
<div class="txt-box"> <div class="txt-box">
...@@ -13,6 +18,7 @@ ...@@ -13,6 +18,7 @@
</div> </div>
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</div>
</glsx-dialog> </glsx-dialog>
</template> </template>
...@@ -25,7 +31,8 @@ export default { ...@@ -25,7 +31,8 @@ export default {
return { return {
infoId: '', infoId: '',
minRatilPrice: '', minRatilPrice: '',
productList: [] productList: [],
fnCallBack: false
} }
}, },
...@@ -62,6 +69,7 @@ export default { ...@@ -62,6 +69,7 @@ export default {
var that = this var that = this
this.$apis.common.getMerchantGoodsListApi(params).then(res => { this.$apis.common.getMerchantGoodsListApi(params).then(res => {
// console.log(res) // console.log(res)
this.fnCallBack = true
this.productList = res.list this.productList = res.list
this.productList.forEach(function(item) { this.productList.forEach(function(item) {
item.saleAmount = item.goodsStatistics.saleAmount item.saleAmount = item.goodsStatistics.saleAmount
...@@ -137,4 +145,20 @@ export default { ...@@ -137,4 +145,20 @@ export default {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.noproP {
width: 100%;
height: 20px;
font-family: PingFangSC-Medium;
font-size: 16px;
color: #666666;
line-height: 20px;
font-weight: 500;
text-align: center;
}
.noproDiv {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}
</style> </style>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="classifyRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="classifyRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> <el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
...@@ -133,6 +133,11 @@ export default { ...@@ -133,6 +133,11 @@ export default {
this.secondConfirm('置顶', '确定置顶此分类?', 'classifyList', 'topClassifyApi', { id: row.id }) this.secondConfirm('置顶', '确定置顶此分类?', 'classifyList', 'topClassifyApi', { id: row.id })
}, },
setTableFinishFun() {
//接收到的数据为空
this.$refs.classifyRef.data.length ? (this.$refs.classifyRef.tableHeightValues = '') : this.$refs.classifyRef.setTableHeightFun()
},
handleSearch() { handleSearch() {
this.$refs.classifyRef.refreshTable() this.$refs.classifyRef.refreshTable()
}, },
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="coupon" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="coupon" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="scope.scope.status == '1'" type="text" @click="start(scope.scope)">生效</el-button> <el-button v-if="scope.scope.status == '1'" type="text" @click="start(scope.scope)">生效</el-button>
<el-button v-if="scope.scope.status == '2'" type="text" @click="end(scope.scope)">失效</el-button> <el-button v-if="scope.scope.status == '2'" type="text" @click="end(scope.scope)">失效</el-button>
...@@ -345,6 +345,11 @@ export default { ...@@ -345,6 +345,11 @@ export default {
status: '' status: ''
} }
this.handleSearch() this.handleSearch()
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.coupon.data.length ? (this.$refs.coupon.tableHeightValues = '') : this.$refs.coupon.setTableHeightFun()
} }
} }
} }
......
...@@ -109,8 +109,22 @@ ...@@ -109,8 +109,22 @@
</div> </div>
<div class="wechat-container m-r-20" style="margin-top: 40px;"> <div class="wechat-container m-r-20" style="margin-top: 40px;">
<div class="wechat-box"> <div class="wechat-box">
<img class="w-100-per" src="./images/home-set-head.png" /> <img class="w-100-per" src="@/assets/phone.png" />
<img class="w-100-per" src="./images/home-set-footer.png" /> <img class="wechant-back" src="@/assets/home-set.png" />
<div class="wechant-banner-img img-w-h">
<img v-if="!editForm.bannerList.length" src="@/assets/home-set-default.png" />
<el-carousel v-else height="90px">
<el-carousel-item v-for="item in editForm.bannerList" :key="item">
<img class="img-w-h" :src="item.bannerImg" />
</el-carousel-item>
</el-carousel>
</div>
<div class="wechant-notice">
<img class="img-14" src="@/assets/icon_notice.png">
<span>
<marquee width="200px" height="14px" scrolldelay="160">{{editForm.noticeContent}}</marquee>
</span>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -555,7 +569,7 @@ export default { ...@@ -555,7 +569,7 @@ export default {
} }
} }
</script> </script>
<style scoped> <style>
/* .home-set .container { /* .home-set .container {
padding: 20px 24px 20px 0; padding: 20px 24px 20px 0;
} */ } */
...@@ -577,6 +591,40 @@ export default { ...@@ -577,6 +591,40 @@ export default {
width: 100%; width: 100%;
border-radius: 2px; border-radius: 2px;
} */ } */
.home-set .wechat-container .wechat-box .wechant-back {
width: 252px;
box-sizing: border-box;
position: absolute;
top: 56px;
left: 19px;
border: 1px solid #D8D8D8;
}
.home-set .wechat-container .wechat-box .wechant-banner-img {
position: absolute;
top: 141px;
left: 35px;
}
.img-14 {
width: 14px;
height: 14px;
margin-right: 4px;
}
.home-set .wechat-container .wechat-box .img-w-h {
width: 220px;
height: 90px;
}
.home-set .wechat-container .wechat-box .wechant-notice {
position: absolute;
top: 237px;
left: 35px;
font-size: 12px;
height: 14px;
line-height: 14px;
color: #333333;
}
.home-set .wechat-container .wechat-box .el-carousel__button {
width: 5px !important;
}
.home-set .banner-upload-box { .home-set .banner-upload-box {
width: 264px; width: 264px;
/* margin: 0 10px 10px 0; */ /* margin: 0 10px 10px 0; */
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
</span> </span>
</GLTable> </GLTable>
</div> </div>
<glsx-dialog title="权益详情" width="712px" :noBtnOk="true" :noCancel="true" :noClose="false" btnCancelLabel="关闭" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose"> <glsx-dialog title="权益详情" width="712px" :noBtnOk="true" :noCancel="true" :noClose="false" typeName="primary" btnCancelLabel="关闭" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<!-- <el-scrollbar> --> <!-- <el-scrollbar> -->
<div class="modal-body"> <div class="modal-body">
<div class="equity-name">汽车权益</div> <div class="equity-name">汽车权益</div>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
{{ item }} {{ item }}
</div> </div>
</div> </div>
<GLTable ref="memberOrderRef" v-if="isReload" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<!-- <span slot="shareImgUrl" slot-scope="scope"> <!-- <span slot="shareImgUrl" slot-scope="scope">
<img class="img-60" :src="scope.scope.shareImgUrl" /> <img class="img-60" :src="scope.scope.shareImgUrl" />
</span> --> </span> -->
...@@ -50,10 +50,12 @@ ...@@ -50,10 +50,12 @@
<script> <script>
import { orderTypesList, orderStatusList } from '@/common/constant' import { orderTypesList, orderStatusList } from '@/common/constant'
import url from "@/assets/empty.png"
import { getOrderListApi } from '@/api/modules/order' import { getOrderListApi } from '@/api/modules/order'
export default { export default {
data() { data() {
return { return {
url:url,
isReload: true, isReload: true,
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<GLTable ref="memberRecordRef" v-if="isReload" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberRecordRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="verificationTime" slot-scope="scope"> <span slot="verificationTime" slot-scope="scope">
<span>{{ dateFormatFun(scope.scope.verificationTime) }}</span> <span>{{ dateFormatFun(scope.scope.verificationTime) }}</span>
</span> </span>
...@@ -48,11 +48,13 @@ ...@@ -48,11 +48,13 @@
<script> <script>
import { getRecordListApi } from '@/api/modules/record' import { getRecordListApi } from '@/api/modules/record'
import url from "@/assets/empty.png"
import { dateFormat } from '@/utils/index.js' import { dateFormat } from '@/utils/index.js'
export default { export default {
name: 'record', name: 'record',
data() { data() {
return { return {
url:url,
isReload:true, isReload:true,
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<GLTable v-if="isReload" ref="memberServiceRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable v-if="isReload" ref="memberServiceRef" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="effectiveType" slot-scope="scope"> <span slot="effectiveType" slot-scope="scope">
<span>{{ toLabelText(scope.scope) }}</span> <span>{{ toLabelText(scope.scope) }}</span>
</span> </span>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<script> <script>
import { getServiceListApi, effectiveService, deleteService,getLoginCount } from '@/api/modules/service' import { getServiceListApi, effectiveService, deleteService,getLoginCount } from '@/api/modules/service'
import url from "@/assets/empty.png"
import { serviceStatusList } from '@/common/constant' import { serviceStatusList } from '@/common/constant'
import tipPanel from '@/components/tipPanel/index.vue' import tipPanel from '@/components/tipPanel/index.vue'
export default { export default {
...@@ -57,6 +57,7 @@ export default { ...@@ -57,6 +57,7 @@ export default {
}, },
data() { data() {
return { return {
url:url,
isReload:true, isReload:true,
isFirstShow: false, isFirstShow: false,
panelContent: '会员服务:是由门店根据自店服务项目创建的线上服务券,如“一年十二次洗车券”、“陶瓷镀膜”等,客户购买后可到店出示服务券享受服务,门店扫码进行次数核销。', panelContent: '会员服务:是由门店根据自店服务项目创建的线上服务券,如“一年十二次洗车券”、“陶瓷镀膜”等,客户购买后可到店出示服务券享受服务,门店扫码进行次数核销。',
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<el-button :size="size" type="primary" @click="handleCreate" icon="el-icon-plus">创建套餐</el-button> <el-button :size="size" type="primary" @click="handleCreate" icon="el-icon-plus">创建套餐</el-button>
<el-button :size="size" @click="isDialogVisible = true">查看示例效果</el-button> <el-button :size="size" @click="isDialogVisible = true">查看示例效果</el-button>
</div> </div>
<GLTable ref="memberSetMealRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberSetMealRef" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="list" slot-scope="scope"> <span slot="list" slot-scope="scope">
<div v-for="(item, index) in scope.scope.list" :key="index">{{ item.couponName }}×{{ item.serviceQuantity }}</div> <div v-for="(item, index) in scope.scope.list" :key="index">{{ item.couponName }}×{{ item.serviceQuantity }}</div>
</span> </span>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</GLTable> </GLTable>
</div> </div>
<!-- btnCancelLabel="关闭" --> <!-- btnCancelLabel="关闭" -->
<glsx-dialog title="示例效果" width="1142px" :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose"> <glsx-dialog title="示例效果" width="1142px" :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" typeName="primary" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="content-body"> <div class="content-body">
<div class="content-item col1"> <div class="content-item col1">
<div class="subTitle">1、管理后台先创建套餐</div> <div class="subTitle">1、管理后台先创建套餐</div>
...@@ -51,11 +51,13 @@ ...@@ -51,11 +51,13 @@
<script> <script>
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
import url from "@/assets/empty.png"
import { getSetMealListApi, deleteSetMeal, upDownPackage } from '@/api/modules/setmeal' import { getSetMealListApi, deleteSetMeal, upDownPackage } from '@/api/modules/setmeal'
import { getLoginCount } from '@/api/modules/service' import { getLoginCount } from '@/api/modules/service'
import { stateList } from '@/common/constant' import { stateList } from '@/common/constant'
import tipPanel from '@/components/tipPanel/index.vue' import tipPanel from '@/components/tipPanel/index.vue'
export default { export default {
components: { components: {
tipPanel, tipPanel,
...@@ -63,6 +65,7 @@ export default { ...@@ -63,6 +65,7 @@ export default {
}, },
data() { data() {
return { return {
url:url,
isFirstShow: false, isFirstShow: false,
panelContent: '会员套餐:将已经创建好的会员服务打包成一个套餐售卖给客户。', panelContent: '会员套餐:将已经创建好的会员服务打包成一个套餐售卖给客户。',
size: 'small', size: 'small',
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="commentRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="commentRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="scope.scope.commentStatus == '0'" type="text" @click="handleRevoke(scope.scope)">发布</el-button> <el-button v-if="scope.scope.commentStatus == '0'" type="text" @click="handleRevoke(scope.scope)">发布</el-button>
<el-button v-if="scope.scope.commentStatus == '1'" type="text" @click="handleRevoke(scope.scope)">撤回</el-button> <el-button v-if="scope.scope.commentStatus == '1'" type="text" @click="handleRevoke(scope.scope)">撤回</el-button>
...@@ -189,6 +189,11 @@ export default { ...@@ -189,6 +189,11 @@ export default {
} }
}, },
setTableFinishFun() {
//接收到的数据为空
this.$refs.commentRef.data.length ? (this.$refs.commentRef.tableHeightValues = '') : this.$refs.commentRef.setTableHeightFun()
},
handleSearch() { handleSearch() {
this.$refs.commentRef.refreshTable() this.$refs.commentRef.refreshTable()
}, },
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</el-tabs> </el-tabs>
<!-- 表格区域 - 全部订单/售后订单 - 开始 --> <!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<GLTable ref="allOrderRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="allOrderRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">查看订单</el-button> <el-button type="text" @click="handleDetail(scope.scope)">查看订单</el-button>
<el-button v-if="scope.scope.deliveryType == 1 && scope.scope.orderStatus == 14" type="text" @click="handleWriteOff(scope.scope)">订单核销</el-button> <el-button v-if="scope.scope.deliveryType == 1 && scope.scope.orderStatus == 14" type="text" @click="handleWriteOff(scope.scope)">订单核销</el-button>
...@@ -615,6 +615,11 @@ export default { ...@@ -615,6 +615,11 @@ export default {
}, },
// 确认收货 - end // 确认收货 - end
setTableFinishFun() {
//接收到的数据为空
this.$refs.allOrderRef.data.length ? (this.$refs.allOrderRef.tableHeightValues = '') : this.$refs.allOrderRef.setTableHeightFun()
},
handleSearch() { handleSearch() {
this.$refs.allOrderRef.refreshTable() this.$refs.allOrderRef.refreshTable()
}, },
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="shareRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="shareRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="scope.scope.shareStatus == 0" type="text" @click="handleEdit(2, scope.scope)">发布</el-button> <el-button v-if="scope.scope.shareStatus == 0" type="text" @click="handleEdit(2, scope.scope)">发布</el-button>
<el-button v-if="scope.scope.shareStatus == 1" type="text" @click="handleRevoke(scope.scope)">撤回</el-button> <el-button v-if="scope.scope.shareStatus == 1" type="text" @click="handleRevoke(scope.scope)">撤回</el-button>
...@@ -206,6 +206,11 @@ export default { ...@@ -206,6 +206,11 @@ export default {
} }
}, },
setTableFinishFun() {
//接收到的数据为空
this.$refs.shareRef.data.length ? (this.$refs.shareRef.tableHeightValues = '') : this.$refs.shareRef.setTableHeightFun()
},
handleSearch() { handleSearch() {
this.$refs.shareRef.refreshTable() this.$refs.shareRef.refreshTable()
}, },
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="goodsImage" class="table-image" slot-scope="scope"> <div slot="goodsImage" class="table-image" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" /> <img class="img-60" :src="scope.scope.goodsImage" />
</div> </div>
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
name: 'retailPrice', name: 'retailPrice',
width: '180', width: '180',
formatter: cellValue => { formatter: cellValue => {
return (cellValue.retailPrice / 100).toFixed(2) return cellValue.retailPrice
} }
}, },
{ {
...@@ -304,6 +304,40 @@ export default { ...@@ -304,6 +304,40 @@ export default {
} }
}, },
setTableFinishFun() {
//接收到的数据为空
if (!this.$refs.proGroupRef.data.length) {
this.$refs.proGroupRef.setTableHeightFun()
} else {
this.$refs.proGroupRef.tableHeightValues = ''
this.$refs.proGroupRef.data.forEach(item => {
item.saleAmount = item.goodsStatistics.saleAmount
if (item.specificationDetailList.length > 1) {
let retailPriceList = item.specificationDetailList.sort(function(a, b) {
return a.retailPrice - b.retailPrice
})
let stockeList = item.specificationDetailList.sort(function(a, b) {
return a.stock - b.stock
})
let minRatilPrice = retailPriceList[0].retailPrice / 100
let maxRatilPrice = retailPriceList[retailPriceList.length - 1].retailPrice / 100
let minStock = stockeList[0].stock
let maxStock = stockeList[stockeList.length - 1].stock
item.retailPrice = minRatilPrice == maxRatilPrice ? minRatilPrice.toFixed(2) : minRatilPrice.toFixed(2) + '-' + maxRatilPrice.toFixed(2)
item.minRatilPrice = minRatilPrice.toFixed(2)
item.goodsStock = minStock == maxStock ? minStock : minStock + '-' + maxStock
} else if (item.specificationDetailList.length == 1) {
item.retailPrice = (item.specificationDetailList[0].retailPrice / 100).toFixed(2)
item.minRatilPrice = item.retailPrice
item.goodsStock = item.specificationDetailList[0].stock
} else {
item.retailPrice = (item.retailPrice / 100).toFixed(2)
item.minRatilPrice = item.retailPrice
}
})
}
},
handleSearch() { handleSearch() {
this.$refs.proGroupRef.refreshTable() this.$refs.proGroupRef.refreshTable()
}, },
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="goodsImage" slot-scope="scope"> <template slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage" /> <img class="img-60" :src="scope.scope.goodsImage" />
</template> </template>
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
name: 'retailPrice', name: 'retailPrice',
width: '180', width: '180',
formatter: cellValue => { formatter: cellValue => {
return (cellValue.retailPrice / 100).toFixed(2) return cellValue.retailPrice
} }
}, },
{ {
...@@ -337,6 +337,40 @@ export default { ...@@ -337,6 +337,40 @@ export default {
} }
}, },
setTableFinishFun() {
//接收到的数据为空
if (!this.$refs.proGroupRef.data.length) {
this.$refs.proGroupRef.setTableHeightFun()
} else {
this.$refs.proGroupRef.tableHeightValues = ''
this.$refs.proGroupRef.data.forEach(item => {
item.saleAmount = item.goodsStatistics.saleAmount
if (item.specificationDetailList.length > 1) {
let retailPriceList = item.specificationDetailList.sort(function(a, b) {
return a.retailPrice - b.retailPrice
})
let stockeList = item.specificationDetailList.sort(function(a, b) {
return a.stock - b.stock
})
let minRatilPrice = retailPriceList[0].retailPrice / 100
let maxRatilPrice = retailPriceList[retailPriceList.length - 1].retailPrice / 100
let minStock = stockeList[0].stock
let maxStock = stockeList[stockeList.length - 1].stock
item.retailPrice = minRatilPrice == maxRatilPrice ? minRatilPrice.toFixed(2) : minRatilPrice.toFixed(2) + '-' + maxRatilPrice.toFixed(2)
item.minRatilPrice = minRatilPrice.toFixed(2)
item.goodsStock = minStock == maxStock ? minStock : minStock + '-' + maxStock
} else if (item.specificationDetailList.length == 1) {
item.retailPrice = (item.specificationDetailList[0].retailPrice / 100).toFixed(2)
item.minRatilPrice = item.retailPrice
item.goodsStock = item.specificationDetailList[0].stock
} else {
item.retailPrice = (item.retailPrice / 100).toFixed(2)
item.minRatilPrice = item.retailPrice
}
})
}
},
handleSearch() { handleSearch() {
this.$refs.proGroupRef.refreshTable() this.$refs.proGroupRef.refreshTable()
}, },
......
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
<el-input v-model="editForm.goodsStock" style="width: 150px" :disabled="isDisabled"><span slot="append">件</span></el-input> <el-input v-model="editForm.goodsStock" style="width: 150px" :disabled="isDisabled"><span slot="append">件</span></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div v-if="specificationDetailList.length" class="flex" style="margin-top: 20px;" id="specificationDetailList"> </div>
<span class="spesc-label" :style="{ width: labelWidth }">规格明细:</span> <div slot="specificationsHtml" v-if="specificationDetailList.length" class="flex" style="min-width: 600px" id="specificationDetailList">
<div style="width: calc(100% - 100px);"> <div style="width: calc(100%);">
<table class="table-spesc"> <table class="table-spesc" style="width: calc(100%);">
<tbody> <tbody>
<tr> <tr>
<td :style="{ width: specsWidth }" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">{{ subItem.specificationName }}</td> <td :style="{ width: specsWidth }" v-for="(subItem, subIndex) in specificationDetailList" :key="subIndex">{{ subItem.specificationName }}</td>
...@@ -51,12 +51,12 @@ ...@@ -51,12 +51,12 @@
</el-input> </el-input>
</td> --> </td> -->
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" placeholder="秒杀价" v-model="item.activityPrice" @input="item.activityPrice = activityPrice_input($event, item.retailPrice)"> <el-input :disabled="isDisabled" placeholder="秒杀价" style="width:90%" v-model="item.activityPrice" @input="item.activityPrice = activityPrice_input($event, item.retailPrice)">
<!-- <span slot="append">元</span> --> <!-- <span slot="append">元</span> -->
</el-input> </el-input>
</td> </td>
<td :style="{ width: specsWidth }"> <td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" placeholder="活动库存" v-model="item.goodsStock" @input="item.goodsStock = goodsStock_input($event, item.stock)"> <el-input :disabled="isDisabled" placeholder="活动库存" style="width:90%" v-model="item.goodsStock" @input="item.goodsStock = goodsStock_input($event, item.stock)">
<!-- <span slot="append">件</span> --> <!-- <span slot="append">件</span> -->
</el-input> </el-input>
</td> </td>
...@@ -65,8 +65,6 @@ ...@@ -65,8 +65,6 @@
</table> </table>
</div> </div>
</div> </div>
<!-- <glsx-combi-form v-if="!specificationDetailList.length" class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsx-combi-form> -->
</div>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
...@@ -201,6 +199,12 @@ export default { ...@@ -201,6 +199,12 @@ export default {
label: '商品', label: '商品',
name: 'goodsId', name: 'goodsId',
addHtml: 'goodsHtml' addHtml: 'goodsHtml'
},
{
label: '规格明细',
name: '',
addHtml: 'specificationsHtml',
isHide: true
} }
] ]
} }
...@@ -314,10 +318,12 @@ export default { ...@@ -314,10 +318,12 @@ export default {
this.selectedProInfo = this.$common.utils.deepClone(res) this.selectedProInfo = this.$common.utils.deepClone(res)
console.log(this.selectedProInfo) console.log(this.selectedProInfo)
if (this.selectedProInfo.specificationDetailList.length) { if (this.selectedProInfo.specificationDetailList.length) {
this.editFormData[5].isHide = false
// this.specificationDetailList = this.$common.utils.deepClone(res.specificationList) // this.specificationDetailList = this.$common.utils.deepClone(res.specificationList)
this.specificationDetailList = this.selectedProInfo.specificationList this.specificationDetailList = this.selectedProInfo.specificationList
this.recoverySpec() this.recoverySpec()
} else { } else {
this.editFormData[5].isHide = true
this.nameToValSpecsList = [] this.nameToValSpecsList = []
this.specificationDetailList = [] this.specificationDetailList = []
} }
......
...@@ -15,15 +15,15 @@ ...@@ -15,15 +15,15 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="coupon" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="activity" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="activityImg" slot-scope="scope"> <template slot="activityImg" slot-scope="scope">
<img class="img-60" :src="scope.scope.activityImg"/> <img class="img-60" :src="scope.scope.activityImg" />
</template> </template>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="scope.scope.activityStatus == '1'" type="text" @click="start(scope.scope)">开始</el-button> <el-button v-if="scope.scope.activityStatus == '1'" type="text" @click="start(scope.scope)">开始</el-button>
<el-button v-if="scope.scope.activityStatus == '2'" type="text" @click="end(scope.scope)">结束</el-button> <el-button v-if="scope.scope.activityStatus == '2'" type="text" @click="end(scope.scope)">结束</el-button>
<el-button v-if="scope.scope.activityStatus == '1'" type="text" @click="handleEdit(2,scope.scope)">编辑</el-button> <el-button v-if="scope.scope.activityStatus == '1'" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button v-if="scope.scope.activityStatus == '2' || scope.scope.activityStatus == '3'" type="text" @click="handleEdit(3,scope.scope)">查看</el-button> <el-button v-if="scope.scope.activityStatus == '2' || scope.scope.activityStatus == '3'" type="text" @click="handleEdit(3, scope.scope)">查看</el-button>
<el-button v-if="scope.scope.activityStatus == '3'" type="text" @click="del(scope.scope)">删除</el-button> <el-button v-if="scope.scope.activityStatus == '3'" type="text" @click="del(scope.scope)">删除</el-button>
<el-button type="text" @click="topping(scope.scope)">置顶</el-button> <el-button type="text" @click="topping(scope.scope)">置顶</el-button>
<el-button v-if="scope.scope.activityStatus == '1' || scope.scope.activityStatus == '2'" type="text" @click="handleShare(scope.scope)">分享</el-button> <el-button v-if="scope.scope.activityStatus == '1' || scope.scope.activityStatus == '2'" type="text" @click="handleShare(scope.scope)">分享</el-button>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
import shareDialog from '../productGroup/components/shareDialog' import shareDialog from '../productGroup/components/shareDialog'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
export default { export default {
name: 'coupon', name: 'activity',
data() { data() {
return { return {
size: 'small', size: 'small',
...@@ -105,10 +105,10 @@ export default { ...@@ -105,10 +105,10 @@ export default {
label: '秒杀价(元)', label: '秒杀价(元)',
name: 'activityPrice', name: 'activityPrice',
formatter: cellValue => { formatter: cellValue => {
if(cellValue.activityPrice){ if (cellValue.activityPrice) {
return (cellValue.activityPrice/100).toFixed(2); return (cellValue.activityPrice / 100).toFixed(2)
} }
return ''; return ''
} }
}, },
{ {
...@@ -131,18 +131,22 @@ export default { ...@@ -131,18 +131,22 @@ export default {
} }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total'}, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
baseData: { baseData: {
statusList: [{ statusList: [
{
confId: '1', confId: '1',
confName: '未开始 ' confName: '未开始 '
}, { },
{
confId: '2', confId: '2',
confName: '进行中' confName: '进行中'
}, { },
{
confId: '3', confId: '3',
confName: '已结束' confName: '已结束'
}], }
]
} }
} }
}, },
...@@ -191,36 +195,36 @@ export default { ...@@ -191,36 +195,36 @@ export default {
}, },
//开始 //开始
start(item){ start(item) {
this.startOrEndConfirm('开始',item) this.startOrEndConfirm('开始', item)
}, },
//结束 //结束
end(item){ end(item) {
this.startOrEndConfirm('结束',item) this.startOrEndConfirm('结束', item)
}, },
startOrEndConfirm(txt,row) { startOrEndConfirm(txt, row) {
var title = txt var title = txt
var params = {} var params = {}
params.id = row.id params.id = row.id
if(txt == '开始'){ if (txt == '开始') {
params.activityStatus = '2' //活动状态(1:未开始,2:开始,3:结束) params.activityStatus = '2' //活动状态(1:未开始,2:开始,3:结束)
}else if(txt == '结束'){ } else if (txt == '结束') {
params.activityStatus = '3' //活动状态(1:未开始,2:开始,3:结束) params.activityStatus = '3' //活动状态(1:未开始,2:开始,3:结束)
} }
this.secondConfirm(title, '确定要' + txt + '此活动?', 'seckillActivity', 'toggleStatusApi', params) this.secondConfirm(title, '确定要' + txt + '此活动?', 'seckillActivity', 'toggleStatusApi', params)
}, },
//置顶 //置顶
topping(row){ topping(row) {
var params = {} var params = {}
params.id = row.id params.id = row.id
this.secondConfirm('删除', '确定置顶此活动?', 'seckillActivity', 'topActivityApi', params) this.secondConfirm('删除', '确定置顶此活动?', 'seckillActivity', 'topActivityApi', params)
}, },
//删除 //删除
del(row){ del(row) {
var params = {} var params = {}
params.id = row.id params.id = row.id
this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params) this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params)
...@@ -274,7 +278,7 @@ export default { ...@@ -274,7 +278,7 @@ export default {
}, },
handleSearch() { handleSearch() {
this.$refs.coupon.refreshTable() this.$refs.activity.refreshTable()
}, },
handleReset() { handleReset() {
...@@ -283,6 +287,11 @@ export default { ...@@ -283,6 +287,11 @@ export default {
activityStatus: '' activityStatus: ''
} }
this.handleSearch() this.handleSearch()
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun()
} }
} }
} }
......
...@@ -129,6 +129,8 @@ export default { ...@@ -129,6 +129,8 @@ export default {
this.tableParams.checkSelectVal.push(item.goodsId) this.tableParams.checkSelectVal.push(item.goodsId)
} }
}) })
//接收到的数据为空
this.$refs.takeGoodRef.data.length ? (this.$refs.takeGoodRef.tableHeightValues = '') : this.$refs.takeGoodRef.setTableHeightFun()
}, },
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="zoneRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="zoneRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> <el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
...@@ -129,6 +129,11 @@ export default { ...@@ -129,6 +129,11 @@ export default {
this.secondConfirm('删除', '是否确认删除该专区?', 'zoneList', 'deleteZoneApi', { id: row.id }) this.secondConfirm('删除', '是否确认删除该专区?', 'zoneList', 'deleteZoneApi', { id: row.id })
}, },
setTableFinishFun() {
//接收到的数据为空
this.$refs.zoneRef.data.length ? (this.$refs.zoneRef.tableHeightValues = '') : this.$refs.zoneRef.setTableHeightFun()
},
handleSearch() { handleSearch() {
this.$refs.zoneRef.refreshTable() this.$refs.zoneRef.refreshTable()
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!