Commit c55d61e4 by 杨北旺

style:表格样式修改

1 parent b47715cc
<template>
<div class="equity-dialog">
<GLDialog mode="mid" :title="type == 1 ? '添加汽车权益' : '添加商品权益'" v-if="show" :visible.sync="show" :show-close="true" :close-on-press-escape="false" :close-on-click-modal="false" :before-close="closeListPoup">
<div class="form">
<el-form class="equityForm" :model="form" :rules="rules" ref="ruleForm" label-position="right" label-width="154px">
<el-form-item v-if="type == 1" label="服务提供方" prop="supplier">
<div class="form gl-form-page gl-form-min">
<el-form class="equityForm" :model="form" :rules="rules" ref="ruleForm" label-width="154px">
<el-form-item v-if="type == 1" label="服务提供方:" prop="supplier">
<el-select v-model="form.supplier" @change="changeSupplier" size="small">
<el-option v-for="item in supplierList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<template v-if="type == 2">
<el-form-item label="产品提供方" prop="supplier">
<el-form-item label="产品提供方:" prop="supplier">
<el-select v-model="form.supplier" size="small">
<el-option label="海威" value="HW"></el-option>
</el-select>
</el-form-item>
<el-form-item label="选择品牌" prop="brandName">
<el-form-item label="选择品牌:" prop="brandName">
<el-select v-model="form.brandName" @change="changeBrandName" filterable size="small">
<el-option v-for="item in brandList" :key="item.brandName" :value="item.brandName" :label="item.brandName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="商品形态" prop="appearance" v-if="form.brandName">
<el-form-item label="商品形态:" prop="appearance" v-if="form.brandName">
<el-select v-model="form.appearance" size="small">
<el-option v-for="item in appearanceList" :key="item.appearance" :value="item.label" :label="item.label"></el-option>
</el-select>
</el-form-item>
</template>
<div class="flex">
<el-form-item label="权益名称" prop="equityName">
<el-form-item label="权益名称:" prop="equityName">
<el-input size="small" v-model="form.equityName" :maxlength="type == 1 ? 8 : 6" placeholder="请输入权益名称"></el-input>
</el-form-item>
</div>
<div class="flex">
<el-form-item label="描述" prop="equityDesc">
<el-form-item label="描述:" prop="equityDesc">
<el-input size="small" v-model="form.equityDesc" :maxlength="type == 1 ? 8 : 6" placeholder="请输入"></el-input>
</el-form-item>
</div>
<div>
<el-form-item label="图标" required prop="equityIcon">
<el-form-item label="图标:" required prop="equityIcon">
<el-upload action="#" class="avatar-uploader" :show-file-list="false" :before-upload="upLoadImg" id="dialogIcon">
<img v-if="form.equityIcon" :src="form.equityIcon" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
......@@ -243,11 +239,7 @@ export default {
.equity-dialog {
padding: 0;
}
.flex {
display: flex;
align-items: center;
justify-content: space-between;
}
.avatar-uploader {
box-sizing: border-box;
border: 1px dashed #d9d9d9;
......@@ -271,26 +263,25 @@ export default {
height: 80px;
display: block;
}
.baseinformation {
/* .baseinformation {
width: 100%;
height: 28px;
border-bottom: 1px solid #d8d8d8;
padding-bottom: 18px;
}
} */
/* .form {
padding: 16px;
} */
.equity-dialog .el-dialog__body {
/* padding: 0px 0px; */
/* .equity-dialog .el-dialog__body {
color: #606266;
font-size: 14px;
word-break: break-all;
}
.equityForm .el-input--small .el-input__inner {
} */
/* .equityForm .el-input--small .el-input__inner {
height: 32px;
line-height: 32px;
width: 432px !important;
}
} */
.suggestion {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
......@@ -307,20 +298,20 @@ export default {
color: #333333;
line-height: 28px;
}
.buttonBtn .el-button + .el-button {
/* .buttonBtn .el-button + .el-button {
margin-left: 40px;
}
.equityDialog .el-dialog__header {
} */
/* .equityDialog .el-dialog__header {
padding: 20px 20px 20px;
border-bottom: 1px solid #d8d8d8;
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
}
.equityDialog .el-dialog__footer {
} */
/* .equityDialog .el-dialog__footer {
padding: 16px 20px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
border-top: 1px solid #e6e6e6;
}
} */
</style>
\ No newline at end of file
......@@ -49,7 +49,7 @@ export default {
}
},
{
label: '排序展示',
label: '首页展示',
prop: 'mainPageFlag',
minWidth: '200',
addHtml: 'mainPageFlag'
......
......@@ -2,6 +2,7 @@
export default {
data() {
return {
currentIndex:0,
goodsCategoryId: '',
inputValue: '',
tagInputValue: '',
......@@ -50,7 +51,7 @@ export default {
},
},
{
label: '排序展示',
label: '首页展示',
prop: 'mainPageFlag',
minWidth: '200',
addHtml: 'mainPageFlag'
......@@ -109,6 +110,7 @@ export default {
this.tags[index].active = true
this.getGoodsList(id)
this.goodsCategoryId = id
this.currentIndex = index
},
showInput(index, val) {
this.inputValue = val
......@@ -139,6 +141,7 @@ export default {
this.$apis.goodsEquityManageApi.categoryDelete({ id }).then(_res => {
if (_res.code == 0) {
this.getCategoryList()
this.changeGoodsCategory({id:this.tags[0].id,index:0})
} else {
this.$message.error(_res.message)
}
......
......@@ -3,8 +3,7 @@
<div class="tapItem">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="批次管理" name="first" class="contain" id="batch">
<GLButton fn="批量生成权益卡" type="primary" size="small" @click="dialogVisible = true">批量生成权益卡</GLButton>
<div style="height: 16px"></div>
<!-- <div style="height: 16px"></div> -->
<GLCombiForm :rowNumber="1" ref="managerRef" :formObj="batchListSearch" :formData="managerForm" @handleOk="selectCollectionTable('select')" @handleRest="selectCollectionTable('reset')">
<div slot="merchant">
<el-select v-model="batchListSearch.merchantName" size="small" clearable filterable remote reserve-keyword placeholder="请输入关联门店" :remote-method="remoteMethod" :loading="loading" class="formItem">
......@@ -12,6 +11,10 @@
</el-select>
</div>
</GLCombiForm>
<div class="btn-grounp">
<span class="title">管理列表</span>
<GLButton fn="批量生成权益卡" type="primary" size="small" @click="dialogVisible = true">批量生成权益卡</GLButton>
</div>
<GLTable ref="batchDetailTable" :searchForm="batchListSearch" :tableParams="batchTableParams" :getListApi="getlistMemberBatch" :beforeSearchFn="changeBatchDataFormat" :pageConf="batchPageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun">
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- 批次管理详情弹窗按钮 -->
......@@ -47,7 +50,7 @@
<div class="dialogtitleText" style="margin-top: 0px; margin-left: 20px">权益明细:</div>
<div class="contain equity-wrap" style="margin: 0px 0px 0px 0px !important">
<el-form :inline="true" label-width="70px">
<el-row style="align-items: center">
<!-- <el-row style="align-items: center"> -->
<el-form-item label=" 卡号:">
<el-input v-model="batchPopupListSearch.cardNo" placeholder="请输入权益卡号" size="small" class="formItem"></el-input>
</el-form-item>
......@@ -59,7 +62,7 @@
<el-button size="small" @click="batchdetailSelect('select')" class="selectBtn">搜索</el-button>
<el-button size="small" @click="exportbatchdetail" class="selectBtn">导出</el-button>
</el-form-item>
</el-row>
<!-- </el-row> -->
</el-form>
<GLTable ref="batchdetailPopupTable" @hook:mounted="setTabelHeight" :tableParams="batchdetailPopupTable" :getListApi="listMemberCard" :searchForm="batchPopupListSearch" :beforeSearchFn="beforebatchPopupListSearch" :pageConf="datailPageConf"></GLTable>
</div>
......@@ -71,29 +74,22 @@
<!-- 批量生成权益卡弹窗 -->
<GLDialog mode="mid" title="批量生成权益卡" :visible.sync="dialogVisible" :before-close="handleClose">
<!-- gl-form-page -->
<div class="">
<el-form :inline="true" :model="generateRightCardsForm" :rules="rules" label-width="154px" ref="ruleForm" class="addCardsForm">
<div class="gl-form-page gl-form-min">
<el-form :inline="true" :model="generateRightCardsForm" :rules="rules" ref="ruleForm" class="addCardsForm">
<div class="form">
<el-row>
<el-form-item label="关联门店:" prop="merchantName">
<el-form-item label="关联门店:" prop="merchantName">
<el-select v-model="generateRightCardsForm.merchantName" clearable filterable remote reserve-keyword placeholder="请输入关联门店" :remote-method="generateRemoteMethod" :loading="loading" size="small">
<el-option v-for="(item, index) in generateOptions" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="新建张数/张:" prop="num">
<el-form-item label="新建张数/张:" prop="num">
<div class="dialogLine">
<el-input-number :min="1" v-model="generateRightCardsForm.num" size="mini"></el-input-number>
<!-- <span style="margin-left: 1px">张</span> -->
</div>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="备注" prop="remarks">
<el-input type="textarea" v-model="generateRightCardsForm.remarks" maxlength="200" style="width: 432px"></el-input>
<el-form-item label="备注:" prop="remarks">
<el-input type="textarea" v-model="generateRightCardsForm.remarks" maxlength="200"></el-input>
</el-form-item>
</el-row>
</div>
</el-form>
</div>
......@@ -112,8 +108,9 @@
</el-select>
</div>
</GLCombiForm>
<div class="pannel tableTopButton">
<el-button type="primary" size="small" @click="exportCollection">导出</el-button>
<div class="btn-grounp">
<span class="title">管理列表</span>
<el-button plain size="small" @click="exportCollection">导出</el-button>
</div>
<GLTable ref="collectionTable" :searchForm="collectionListSearch" :tableParams="collectionTableParams" :getListApi="listRequisitionMemberCard" :beforeSearchFn="changeCollectionDataFormat" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
......@@ -221,7 +218,9 @@ export default {
},
{
label: '门店',
prop: 'merchantName'
prop: 'merchantName',
width:250,
line:1
},
{
label: '生成数量',
......@@ -453,9 +452,9 @@ export default {
methods: {
setTableFinishFun() {
//接收到的数据为空
if (!this.$refs.table.data.length) {
this.$refs.table.setTableHeightFun()
}
// if (!this.$refs.table.data.length) {
// this.$refs.table.setTableHeightFun()
// }
},
setTabelHeight() {
this.$refs.batchdetailPopupTable.tableHeightValues = '328'
......@@ -907,18 +906,24 @@ flex-wrap: nowrap;
display: inline-block;
list-style: none;
font-size: 14px;
font-weight: 500;
color: #303133;
font-weight: 400;
color: #666;
position: relative;
width: 180px;
text-align: center;
border: none !important;
background: #fafafa;
border-radius: 4px 4px 0px 0px
}
.tabCtn #tab-first{
margin-right: 1px;
}
.tabCtn .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #f4f5fa;
background: #fff;
color: #5850ff;
border: none;
font-weight: 500;
}
.tabCtn .el-tabs__nav-wrap::after {
height: 0 !important;
......@@ -1005,11 +1010,26 @@ flex-wrap: nowrap;
border-top: 1px solid #e6e6e6;
text-align: center;
}
.addCardsForm .el-input--small .el-input__inner {
/* .addCardsForm .el-input--small .el-input__inner {
width: 248px;
}
} */
.equity-wrap .tapItem {
margin: 0px;
}
.el-button+.el-button{
margin-left: 8px !important;
}
.btn-grounp{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
}
.btn-grounp .title{
font-size: 16px;
font-weight: 500;
color: #333333;
margin-left: 4px;
}
</style>
<style src="@a/css/tao.css"></style>
\ No newline at end of file
......@@ -92,7 +92,7 @@ export default {
tableColumns: [
{
label: '日期',
width: '200',
width: 200,
formatter: cell => {
return this.date_format(cell.callTime)
}
......@@ -102,10 +102,9 @@ export default {
prop: 'phone'
},
{
label: '订单里程',
label: '订单里程/km',
formatter: cell => {
return `${cell.distance}km`
return `${cell.distance}`
}
},
{
......
<template>
<div class="equity-wrap">
<div class="new-top-content flex_sc">
<div class="imgWrap">
<img src="@/assets/balance.png" alt="" />
</div>
<div class="balanceWrap">
<div class="flex_sc">
<span class="title">账户余额</span>
<i @click="getHwAccount(1)" style="color:#5850FF;cursor: pointer" class="el-icon-refresh-right"></i>
</div>
<span class="price">{{ price }}元</span>
</div>
</div>
<div class="equity-wrap contain">
<div class="topContent">
<!-- <div class="topContent">
<div class="imgWrap">
<img src="@/assets/balance.png" alt="" />
</div>
......@@ -14,7 +26,8 @@
</div>
<el-button class="refreshBtn" v-if="loading" :loading="loading"></el-button>
<el-button class="special-btn" @click="getHwAccount(1)" v-else>刷新余额</el-button>
</div>
</div> -->
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable v-if="flag" ref="table" :noDataImg="url" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
......@@ -189,6 +202,7 @@ export default {
{
label: '商品名称',
width: 200,
line:1,
formatter(cell) {
return cell.appearance == 2 ? `${cell.productName}${cell.denomination}` : cell.productName
}
......@@ -222,7 +236,8 @@ export default {
},
{
label: '下单渠道',
width: '250',
width: 250,
line:1,
formatter(cell) {
return `${cell.merchantName || ''}${cell.merchantName ? '-' : ''}${cell.channelName}`
}
......@@ -358,6 +373,36 @@ export default {
// /deep/ .contain .el-input--small .el-input__inner {
// width: 215px;
// }
.new-top-content{
background: white;
margin-bottom: 16px;
box-sizing: border-box;
padding: 23px 20px;
.imgWrap {
width: 56px;
height: 56px;
}
.balanceWrap {
margin-left: 10px;
> span {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
}
.title{
margin-right: 4px;
}
.price{
font-size: 36px;
font-family: Helvetica-Bold, Helvetica;
font-weight: bold;
color: #333333;
line-height: 43px;
letter-spacing: 1px;
}
}
}
.equity-wrap .contain {
.topContent {
display: flex;
......@@ -419,5 +464,6 @@ export default {
// }
// }
}
}
</style>
\ No newline at end of file
......@@ -177,7 +177,8 @@ export default {
{
label: '加油油站',
prop: 'gasName',
width: '150'
width: 150,
line:1
},
{
label: '油号',
......
<template>
<div class="equity-wrap allWrap">
<div class="equity-wrap contain">
<div class="equity-wrap">
<div class="equity-wrap contain gl-form-page">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="154px" size="medium" :key="resetTime">
<div class="box">
<!-- <back /> -->
<div class="title">商品类型</div>
<el-radio-group size="small" :value="1">
<el-radio-button :label="1">品牌商品</el-radio-button>
......@@ -12,30 +11,30 @@
</div>
<div class="box">
<div class="title baseTitle">基本信息</div>
<el-form-item label="产品提供方" required>
<el-select :style="{'width':defaultwidth+'px'}" v-model="ruleForm.supplier" :disabled="isEdit">
<el-form-item label="产品提供方:" required>
<el-select v-model="ruleForm.supplier" :disabled="isEdit">
<el-option label="海威" value="HW"></el-option>
</el-select>
</el-form-item>
<el-form-item label="商品形态" required>
<el-form-item label="商品形态:" required>
<el-radio-group size="small" v-model="ruleForm.appearance" :disabled="isEdit" @change="changeAppearance">
<el-radio-button label="1">卡券</el-radio-button>
<el-radio-button label="2">直充</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="商品编码" prop="productId">
<el-input :style="{'width':defaultwidth+'px'}" v-model="ruleForm.productId" :disabled="isEdit" placeholder="365淘券所对应的商品编码" maxlength="20" @blur="getEquityOutGoodsBySupplierProductId"></el-input>
<el-form-item label="商品编码:" prop="productId">
<el-input v-model="ruleForm.productId" :disabled="isEdit" placeholder="365淘券所对应的商品编码" maxlength="20" @blur="getEquityOutGoodsBySupplierProductId"></el-input>
</el-form-item>
<el-form-item label="品牌名称" prop="brandName">
<el-select :style="{'width':defaultwidth+'px'}" filterable v-model="ruleForm.brandName" @change="changeBrandName" :disabled="isEdit">
<el-form-item label="品牌名称:" prop="brandName">
<el-select filterable v-model="ruleForm.brandName" @change="changeBrandName" :disabled="isEdit">
<el-option v-for="item in brandNameList" :key="item.brandId" :label="item.brandName" :value="item.brandName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="商品名称" prop="productName">
<el-input :style="{'width':defaultwidth+'px'}" v-model="ruleForm.productName" maxlength="30"></el-input>
<el-form-item label="商品名称:" prop="productName">
<el-input v-model="ruleForm.productName" maxlength="30"></el-input>
</el-form-item>
<el-form-item label="商品图片" :required="ruleForm.appearance == 1" prop="goodsImage">
<el-form-item label="商品图片:" :required="ruleForm.appearance == 1" prop="goodsImage">
<el-upload action="" class="avatar-uploader" :show-file-list="false" :before-upload="upLoadImg" id="goodsIconId">
<template v-if="ruleForm.goodsImage">
<img :src="ruleForm.goodsImage" class="avatar" />
......@@ -48,50 +47,46 @@
<div class="box">
<div class="title priceMsgTitle">价格信息</div>
<el-form-item v-if="ruleForm.appearance != 1" label="直充面额" prop="denomination">
<el-input :style="{'width':defaultwidth+'px'}" v-model="ruleForm.denomination" maxlength="10"></el-input>
<el-input v-model="ruleForm.denomination" maxlength="10"></el-input>
</el-form-item>
<el-form-item label="会员价/元" prop="salesPrice">
<el-input :style="{'width':defaultwidth+'px'}" v-model="ruleForm.salesPrice">
</el-input>
<el-form-item label="会员价/元:" prop="salesPrice">
<el-input v-model="ruleForm.salesPrice"></el-input>
</el-form-item>
<el-form-item label="非会员价/元" prop="noMemberPrice">
<el-input :style="{'width':defaultwidth+'px'}" v-model="ruleForm.noMemberPrice">
</el-input>
<el-form-item label="非会员价/元:" prop="noMemberPrice">
<el-input v-model="ruleForm.noMemberPrice"></el-input>
</el-form-item>
<el-form-item label="成本含税价/元" prop="costPrice">
<el-input :style="{'width':defaultwidth+'px'}" v-model="ruleForm.costPrice">
</el-input>
<el-form-item label="成本含税价/元:" prop="costPrice">
<el-input v-model="ruleForm.costPrice"></el-input>
</el-form-item>
<el-form-item label="官方价/划线价/元" prop="lineationPrice">
<el-input :style="{'width':defaultwidth+'px'}" v-model="ruleForm.lineationPrice">
</el-input>
<el-form-item label="官方价/划线价/元:" prop="lineationPrice">
<el-input v-model="ruleForm.lineationPrice"></el-input>
</el-form-item>
<el-form-item label="商品质保期/小时" prop="warrantyPeriod" :required="ruleForm.appearance == 1">
<el-input :style="{'width':defaultwidth+'px'}" v-model.number="ruleForm.warrantyPeriod">
<el-form-item label="商品质保期/小时:" prop="warrantyPeriod" :required="ruleForm.appearance == 1">
<el-input v-model.number="ruleForm.warrantyPeriod">
<!-- <template slot="append">小时</template> -->
</el-input>
</el-form-item>
<el-form-item label="商品有效期">
<el-input :style="{'width':defaultwidth+'px'}" v-model.number="ruleForm.validityPeriod">
<el-form-item label="商品有效期:">
<el-input v-model.number="ruleForm.validityPeriod">
<template slot="prepend">兑换到账户内</template>
<template slot="append">天有效</template>
</el-input>
</el-form-item>
<el-form-item label="商品库存">
<el-input :style="{'width':defaultwidth+'px'}" v-model="ruleForm.stock" disabled>
<el-form-item label="商品库存:">
<el-input v-model="ruleForm.stock" disabled>
<template slot="append">保存或上架商品后将自动检查库存</template>
</el-input>
</el-form-item>
<el-form-item class="editor" label="购买页使用须知" prop="buysNotes" required>
<el-form-item class="editor" label="购买页使用须知:" prop="buysNotes" required>
<quill-editor v-model="ruleForm.buysNotes" :options="editorOption"></quill-editor>
</el-form-item>
<template v-if="ruleForm.appearance == 1">
<el-form-item class="editor" label="卡券页使用须知" prop="useNotes" required>
<el-form-item class="editor" label="卡券页使用须知:" prop="useNotes" required>
<quill-editor v-model="ruleForm.useNotes" :options="editorOption"></quill-editor>
</el-form-item>
</template>
<template v-else>
<el-form-item class="editor" label="直充使用须知">
<el-form-item class="editor" label="直充使用须知:">
<quill-editor v-model="ruleForm.useNotes" :options="editorOption"></quill-editor>
</el-form-item>
</template>
......@@ -208,7 +203,7 @@ export default {
name: '',
data() {
return {
defaultwidth:432,
defaultwidth: 432,
eventBus: new Vue(),
isEdit: false,
isNewGoods: false,
......@@ -262,31 +257,15 @@ export default {
}
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.getListWithPageOutGoods()
let id = this.$route.query.id
let edit = this.$route.query.edit
// if(!edit){
// edit = true
// }
if (id) {
this.getEquityGoodsById(id)
this.isEdit = !edit
} else {
this.isNewGoods = true
}
// this.eventBus.$on('query', ({ id, edit }) => {
// console.log({ id, edit })
// if (id) {
// this.getEquityGoodsById(id)
// this.isEdit = !edit
// } else {
// this.isNewGoods = true
// }
// })
// let { id, edit } = this.getParams()
},
methods: {
changeBrandName() {
......@@ -463,12 +442,11 @@ export default {
}
}
}
// <style src="@a/css/tao.css"></style>
</script>
<style lang="scss" scoped>
.allWrap {
padding-bottom: 80px;
.equity-wrap .contain{
padding: 16px 0;
}
.footer-panel {
display: flex;
......
<template>
<div class="equity-wrap">
<div class="tableTitle">汽车权益</div>
<div class="equity-wrap contain">
<GLButton fn="添加汽车权益" type="primary" size="small" @click="addEquity(1)">
<i class="el-icon-plus"></i>
<span style="margin-left: 8px">添加汽车权益</span>
</GLButton>
<div class="noneOperation">
<div class="tableTop">
<span>权益列表</span>
<GLButton fn="添加汽车权益" type="primary" size="small" @click="addEquity(1)">添加汽车权益</GLButton>
</div>
<div class="equity-wrap contain botp">
<div class="">
<GLTable ref="carTable" :tableParams="carTableParams" :pageConf="cardsDatail" :getListApi="getCardListApi">
<div slot="mainPageFlag" slot-scope="scope">
<el-button type="text" @click="carsDisplay(scope.scope)">{{ scope.scope.mainPageFlag == 1 ? '取消首页展示' : '首页展示' }}</el-button>
<!-- <el-button type="text" @click="carsDisplay(scope.scope)">{{ scope.scope.mainPageFlag == 1 ? '取消首页展示' : '首页展示' }}</el-button> -->
<el-switch :value="scope.scope.mainPageFlag == 1" active-color="#5850ff" inactive-color="#eee" @change="carsDisplay(scope.scope)"></el-switch>
</div>
<div slot="carImage" slot-scope="scope">
<img class="equity-icon" :src="scope.scope.equityIcon" />
......@@ -24,26 +25,56 @@
</div>
</div>
<div class="tableTitle noneOperation">商品权益</div>
<div class="equity-wrap secondBox">
<div class="equity-wrap contain">
<div class="tagsCtn">
<div class="tags-box">
<template v-for="(item, index) in tags">
<el-tag :key="index" effect="dark" :type="item.active ? '' : 'info'" @click.native="changeGoodsCategory({ id: item.id, index })" :ref="`tag-${index}`" @dblclick.native="showInput(index, item.goodsCategory)" :class="{ tags: true, 'tag-active': tags[index].active }">
<i class="del el-icon-error" @click.stop="categoryDelete(item.id)"></i>
{{ item.goodsCategory }}
<el-input class="input-tag" v-model="inputValue" :ref="`tag-input-${index}`" size="small" @keyup.enter.native="changeTagName({ id: item.id, index })" @blur="changeTagName({ id: item.id, index })"></el-input>
</el-tag>
</template>
<div class="equity-wrap contain fill">
<div class="tagsCtn">
<div class="choseRow flex_sc">
<div class="choseItem" @click="changeGoodsCategory({ id: item.id, index })" :class="{ active: currentIndex == index }" v-for="(item, index) in tags" :key="index">
<span>{{item.goodsCategory}}</span>
<i class="del el-icon-close" @click.stop="categoryDelete(item.id)"></i>
</div>
<div class="wrap">
<el-input class="input-new-tag" v-if="inputVisible" v-model="tagInputValue" ref="saveTagInput" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" maxlength="8"></el-input>
<el-button class="addTag" size="small" @click="showAddInput" v-else>
<i class="el-icon-plus"></i>
<span style="margin-left: 8px; margin-top: 18px">添加分类</span>
</el-button>
<div v-if="inputVisible" class="choseItem">
<input @keydown.enter="handleInputConfirm" @blur="handleInputConfirm" maxlength="8" v-model="tagInputValue" class="input-new-tag" ref="saveTagInput" type="text">
</div>
<div class="choseItem" @click="toAddEquity">+</div>
</div>
<!-- <div class="tags-box">
<template v-for="(item, index) in tags">
<el-tag size="small" :key="index" effect="dark" :type="item.active ? '' : 'info'" @click.native="changeGoodsCategory({ id: item.id, index })" :ref="`tag-${index}`" @dblclick.native="showInput(index, item.goodsCategory)" :class="{ tags: true, 'tag-active': tags[index].active }">
<i class="del el-icon-error" @click.stop="categoryDelete(item.id)"></i>
{{ item.goodsCategory }}
<el-input class="input-tag" v-model="inputValue" :ref="`tag-input-${index}`" size="small" @keyup.enter.native="changeTagName({ id: item.id, index })" @blur="changeTagName({ id: item.id, index })"></el-input>
</el-tag>
</template>
</div> -->
<!-- <div class="wrap">
<el-input class="input-new-tag" v-if="inputVisible" v-model="tagInputValue" ref="saveTagInput" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" maxlength="8"></el-input>
<el-button class="addTag" size="small" @click="showAddInput" v-else>
<i class="el-icon-plus"></i>
<span style="margin-left: 8px; margin-top: 18px">添加分类</span>
</el-button>
</div> -->
</div>
<div class="table_box">
<div class="tableTop topP">
<span>权益列表</span>
<GLButton fn="添加汽车权益" type="primary" size="small" @click="addEquity(1)">添加汽车权益</GLButton>
</div>
<GLTable ref="goodsTable" :tableParams="goodsTableParams" :tableData="goodsTableData" :tableTotal="tableTotal">
<div slot="mainPageFlag" slot-scope="scope">
<!-- <el-button type="text" @click="goodsDisplay(scope.scope)">{{ scope.scope.mainPageFlag == 1 ? '取消首页展示' : '首页展示' }}</el-button> -->
<el-switch :value="scope.scope.mainPageFlag == 1" active-color="#5850ff" inactive-color="#eee" @change="goodsDisplay(scope.scope)"></el-switch>
</div>
<div slot="goodsImage" slot-scope="scope">
<img class="equity-icon" :src="scope.scope.equityIcon" />
</div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span>
</GLTable>
</div>
</div>
<!-- <div class="equity-wrap">
<div class="equity-wrap contain">
<GLButton fn="添加门店权益" type="primary" size="small" @click="addEquity(2)" style="margin-top: 16px">
<i class="el-icon-plus"></i>
<span style="margin-left: 8px">添加门店权益</span>
......@@ -59,15 +90,11 @@
</div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
<!-- <GLButton fn="商品权益编辑" type="text" @click="editEquity(scope.scope, 2)">编辑</GLButton>
<GLButton fn="商品权益上/下架" type="text" @click="updateShelves(scope.scope, 'goods')">{{ scope.scope.status == 0 ? '上架' : '下架' }}</GLButton>
<el-button type="text" @click="setTop(scope.scope.id, 'goods')">置顶</el-button>
<el-button type="text" @click="deletEquity(scope.scope.id)" :disabled="scope.scope.status == 0 ? false : true">删除</el-button> -->
</span>
</GLTable>
</div>
</div>
</div>
</div> -->
<equity-dialog :show.sync="showDialog" :type="dialogType" :isEdit.sync="isEdit"></equity-dialog>
</div>
......@@ -82,7 +109,7 @@ export default {
return {
getCardListApi: this.$apis.carEquityManageApi.getCarList,
getGoodListApi: this.$apis.goodsEquityManageApi.getGoodsList,
tableTotal: '',
tableTotal: 0,
cardsDatail: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'data.total' },
showDialog: false,
isEdit: false,
......@@ -182,7 +209,7 @@ export default {
click: row => this.deletEquity(row.scope.id)
}
}
]
],
}
},
mounted() {
......@@ -191,6 +218,12 @@ export default {
this.init()
},
methods: {
toAddEquity(){
this.inputVisible = true
setTimeout(()=>{
this.$refs.saveTagInput.focus();
},100)
},
/*更改汽车展示状态 */
carsDisplay(row) {
if (row.mainPageFlag == null || row.mainPageFlag == 0) {
......@@ -297,9 +330,7 @@ export default {
background: #f4f6fc;
}
.tags-box {
padding: 2px 42px 2px 2px;
background: #f4f6fc;
border-radius: 4px;
}
.tags.el-tag {
background: #ffffff !important;
......@@ -337,10 +368,9 @@ export default {
z-index: 22;
}
.input-new-tag {
width: 90px !important;
margin-left: 10px;
vertical-align: bottom;
overflow: hidden;
border: none;
outline: none;
background: #fafafa;
}
.input-tag-show {
display: block !important;
......@@ -367,12 +397,27 @@ export default {
.fixedHeight {
height: 45px;
}
.secondBox {
margin-top: 16px;
}
.tableTitle {
/* margin: 20px 40px; */
margin-bottom: 16px;
padding: 15px 20px;
background: white;
border-bottom: 1px solid #e5e5e5;
}
.tableTop{
display: flex;
align-items: center;
justify-content: space-between;
padding: 24px 20px 10px 24px;
background: white;
>span{
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 16px;
}
}
.topP{
padding: 3px 0 10px 4px;
}
.el-table__fixed-right-patch {
position: absolute;
......@@ -381,24 +426,51 @@ export default {
background-color: #fff;
}
.tagsCtn {
display: flex;
flex-direction: row;
}
.tagsCtn .wrap {
width: 112px;
height: 100px;
.addTag {
width: 112px;
height: 100px;
position: relative;
z-index: 100;
margin-bottom: -1px;
.choseRow{
display: flex;
.choseItem {
display: inline-block;
box-sizing: border-box;
padding: 0 20px;
height: 40px;
line-height: 40px;
cursor: pointer;
border: 1px solid #e5e5e5;
margin-right: 1px;
border-radius: 4px 4px 0 0;
background: #fafafa;
}
.active {
color: #5850ff;
background-color: white;
font-weight: 600;
border-bottom: none;
}
.del{
font-size: 8px;
margin-left: 8px;
}
}
}
.list .contain {
background: #f4f5fa;
margin: 0px 20px 20px 40px;
padding: 20px;
.table_box{
border: 1px solid #e5e5e5;
box-sizing: border-box;
padding: 16px 20px;
border-radius: 0 4px 4px 4px;
background: #ffffff;
}
.equity-wrap .contain {
background: #fff;
padding: 0 20px !important;
}
.equity-wrap .botp{
padding-bottom: 16px !important;
}
.list {
box-shadow: initial;
.equity-wrap .fill{
padding: 16px 20px !important;
}
.tags-box .tag-active {
background: #5850ff !important;
......
......@@ -2,14 +2,14 @@
<div class="equity-wrap">
<div class="equity-wrap contain">
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="tableTopButton">
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
</div>
<div class="out_wrap">
<div class="choseRow flex_sc">
<div class="choseItem" :class="{ active: currentIndex == index }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index)">
{{ item }}
<div class="choseRow flex_scb">
<div class="wrap">
<div class="choseItem" :class="{ active: currentIndex == index }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index)">
{{ item }}
</div>
</div>
<el-button :size="size" plain @click="handleExport">导出</el-button>
</div>
</div>
<div class="table_box">
......@@ -136,7 +136,8 @@ export default {
{
label: '订单门店',
prop: 'merchantName',
minWidth: '180'
minWidth: 200,
line:1
// formatter(cell) {
// return cell.merchantName || ''
// }
......@@ -369,6 +370,11 @@ export default {
border-bottom: none;
}
}
.flex_scb{
display: flex;
align-items: center;
justify-content: space-between;
}
.table_box{
border: 1px solid #e5e5e5;
box-sizing: border-box;
......
<template>
<div class="card-manage">
<div class="button">
<!-- <div class="button">
<el-button type="primary" @click="addCard('true')" size="small" style="width: 128px">
<i class="el-icon-plus"></i>
<span style="margin-left: 8px">新建权益卡</span>
</el-button>
</div>
<div class="tableBox" style="margin-top: 16px">
<div class="topline"></div>
</div> -->
<div class="tableBox">
<!-- <div class="topline"></div> -->
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="selectStore('select')" @handleRest="selectStore('reset')"></GLCombiForm>
<div class="btn-grounp">
<span class="title">权益卡列表</span>
<el-button type="primary" @click="addCard('true')" size="small">
<i class="el-icon-plus"></i>
<span style="margin-left: 8px">新建权益卡</span>
</el-button>
</div>
<div class="tableCtn">
<GLTable ref="recordTable" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun">
<div slot="recipientCount" slot-scope="scope">
......@@ -53,7 +60,7 @@
<div class="gl-form-page">
<el-form class="dialogForm" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="154px">
<!-- 基础表单 -->
<div class="form">
<!-- <div class="form"> -->
<el-form-item label="名称:" prop="cardClassName" id="name">
<el-input v-model="ruleForm.cardClassName" maxlength="15" type="text" size="small" placeholder="请输入"></el-input>
</el-form-item>
......@@ -84,14 +91,14 @@
<span class="codeTxt">用于关联流量卡服务测的商品</span>
</el-form-item>
<el-form-item label="使用说明:" prop="usageNotes">
<el-input type="textarea" v-model="ruleForm.usageNotes" style="width: 432px" maxlength="500" size="small"></el-input>
<el-input type="textarea" :rows="3" v-model="ruleForm.usageNotes" maxlength="500" size="small"></el-input>
</el-form-item>
<el-form-item label=" 售价/元:" prop="price">
<el-form-item label="售价/元:" prop="price">
<el-input-number v-model="ruleForm.price" controls-position="right" size="mini" :min="1" :max="9999.99"></el-input-number>
</el-form-item>
</div>
<!-- </div> -->
<div class="baseinformation2"><span class="titleText">其他信息</span></div>
<div class="form">
<!-- <div class="form"> -->
<el-form-item label="试用设置:" prop="">
<el-switch v-model="value" active-color="" inactive-color="#d3d3d3"></el-switch>
</el-form-item>
......@@ -100,7 +107,7 @@
天试用
<span class="codeTxt2">设置后将生成试用链接和二维码可用于推广</span>
</el-form-item>
</div>
<!-- </div> -->
</el-form>
</div>
<span slot="footer" class="dialog-footer">
......@@ -366,9 +373,9 @@ export default {
},
setTableFinishFun() {
//接收到的数据为空
if (!this.$refs.table.data.length) {
this.$refs.table.setTableHeightFun()
}
// if (!this.$refs.table.data.length) {
// this.$refs.table.setTableHeightFun()
// }
},
closeDialog() {
this.value = false
......@@ -754,6 +761,10 @@ export default {
line-height: 32px;
width: 432px !important;
}
.dialogForm .el-textarea__inner{
font-size: 14px;
line-height: 21px;
}
.el-dialog__body {
padding: 0;
color: #606266;
......@@ -785,10 +796,17 @@ export default {
.el-button + .el-button {
margin-left: 8px !important;
}
.gl-form-page .form .el-input-number {
width: 136px;
.el-input {
width: 100%;
}
.btn-grounp{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
padding-right: 20px;
}
.btn-grounp .title{
font-size: 16px;
font-weight: 500;
color: #333333;
margin-left: 4px;
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!