Commit 3a82a1e8 by wangql

修改样式

1 parent c6a368d3
<!-- 选择商品弹窗 --> <!-- 选择商品弹窗 -->
<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>
...@@ -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()
} }
} }
} }
......
...@@ -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,11 @@ export default { ...@@ -201,6 +199,11 @@ export default {
label: '商品', label: '商品',
name: 'goodsId', name: 'goodsId',
addHtml: 'goodsHtml' addHtml: 'goodsHtml'
},
{
label: '规格明细',
name: '',
addHtml: 'specificationsHtml'
} }
] ]
} }
......
...@@ -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()
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!