Commit b4cce47b by 杨北旺

style:表格状态更换

1 parent 2534f676
......@@ -147,7 +147,22 @@
padding: 0 15px;
padding-bottom: 10px;
}
.gl-form-page .form .el-input-number {
width: 136px;
.el-input {
width: 100%;
}
}
.flex_sc{
display: flex;
align-items: center;
}
.table_point{
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
// .equity-wrap table {
// width: 98%;
// color: #666666;
......
......@@ -56,8 +56,8 @@
</el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px !important">
<el-button plain size="small" @click="batchdetailSelect('reset')" class="selectBtn">重置</el-button>
<el-button size="small" @click="batchdetailSelect('select')" class="selectBtn">搜索</el-button>
<el-button size="small" @click="exportbatchdetail" class="selectBtn">导出</el-button>
<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-form>
......@@ -70,30 +70,33 @@
</GLDialog>
<!-- 批量生成权益卡弹窗 -->
<GLDialog mode="mid" title="批量生成权益卡" :visible.sync="dialogVisible" :before-close="handleClose">
<el-form :inline="true" :model="generateRightCardsForm" :rules="rules" ref="ruleForm" label-width="154px" class="addCardsForm">
<div class="form">
<el-row>
<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">
<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>
</el-row>
</div>
</el-form>
<!-- gl-form-page -->
<div class="">
<el-form :inline="true" :model="generateRightCardsForm" :rules="rules" label-width="154px" ref="ruleForm" class="addCardsForm">
<div class="form">
<el-row>
<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">
<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>
</el-row>
</div>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="cancelGenerate">取 消</el-button>
<el-button size="small" type="primary" @click="generateCards('ruleForm')">确 定</el-button>
......@@ -112,7 +115,12 @@
<div class="pannel tableTopButton">
<el-button type="primary" size="small" @click="exportCollection">导出</el-button>
</div>
<GLTable ref="collectionTable" :searchForm="collectionListSearch" :tableParams="collectionTableParams" :getListApi="listRequisitionMemberCard" :beforeSearchFn="changeCollectionDataFormat" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun"></GLTable>
<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">
<div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span>{{ ['未激活', '已激活'][scope.scope.status] }}</span>
</div>
</GLTable>
</el-tab-pane>
</el-tabs>
</div>
......@@ -400,7 +408,8 @@ export default {
0: '未激活'
}[cellValue.status]
},
minWidth: '200'
minWidth: '200',
addHtml: 'colorStatus'
}
]
},
......@@ -425,7 +434,8 @@ export default {
batchNo: '',
num: '',
recipientCount: ''
}
},
colors: ['#999999','#2CCA74']
}
},
mounted() {
......@@ -982,12 +992,12 @@ flex-wrap: nowrap;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
}
.batchDialog .el-dialog__body {
/* .batchDialog .el-dialog__body {
padding: 0px 0px;
color: #606266;
font-size: 14px;
word-break: break-all;
}
} */
.batchDialog .el-dialog__footer {
padding: 16px 20px;
-webkit-box-sizing: border-box;
......@@ -996,9 +1006,7 @@ flex-wrap: nowrap;
text-align: center;
}
.addCardsForm .el-input--small .el-input__inner {
height: 32px;
line-height: 32px;
width: 432px;
width: 248px;
}
.equity-wrap .tapItem {
margin: 0px;
......
......@@ -2,7 +2,12 @@
<div class="equity-wrap">
<div class="find_wrap">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable ref="table" :noDataImg="url" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"></GLTable>
<GLTable ref="table" :noDataImg="url" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{'background':colors[scope.scope.orderStatus]}"></div>
<span>{{['已结算', '待结算', '已失效'][scope.scope.orderStatus]}}</span>
</div>
</GLTable>
</div>
</div>
</template>
......@@ -105,11 +110,13 @@ export default {
},
{
label: '实付金额',
prop: 'price'
prop: 'price',
align:'right'
},
{
label: '订单总额',
prop: 'income'
prop: 'income',
align:'right'
},
{
label: '订单号',
......@@ -125,10 +132,12 @@ export default {
prop: 'status',
formatter: cell => {
return ['已结算', '待结算', '已失效'][cell.orderStatus]
}
},
addHtml:'colorStatus'
}
]
}
},
colors:['#2CCA74','#FDB757','#999999'],
}
},
......
......@@ -21,6 +21,11 @@
<template slot="custom">
<div class="table-custom exportBtn"></div>
</template>
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background:scope.scope.appearance==2?colors2[scope.scope.orderStatus]:colors1[scope.scope.orderStatus] }"></div>
<span v-if="scope.scope.appearance==2">{{ qb_statusEnum[scope.scope.orderStatus] }}</span>
<span v-else>{{ statusEnum[scope.scope.orderStatus] }}</span>
</div>
</GLTable>
</div>
</div>
......@@ -216,9 +221,10 @@ export default {
{
label: '订单状态',
width: 120,
formatter: cell => {
return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus]
}
// formatter: cell => {
// return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus]
// },
addHtml: 'colorStatus'
},
{
label: '下单时间',
......@@ -229,6 +235,20 @@ export default {
}
}
]
},
colors1:{
0:'#999999',
1:'#2CCA74',
2:'#FDB757',
3:'#2CCA74',
4:'#5850FF',
5:'#EB4E4E',
6:'#2CCA74',
},
colors2:{
3:'#2CCA74',
6:'#EB4E4E',
2:'#5850FF',
}
}
},
......
......@@ -2,7 +2,12 @@
<div class="equity-wrap">
<div class="equity-wrap contain">
<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"></GLTable>
<GLTable v-if="flag" ref="table" :noDataImg="url" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: colors[scope.scope.orderStatusName]}"></div>
<span>{{scope.scope.orderStatusName}}</span>
</div>
</GLTable>
</div>
</div>
</template>
......@@ -161,7 +166,7 @@ export default {
{
label: '加油时间',
prop: 'orderTime',
width:180,
width: 180
},
{
label: '供应商',
......@@ -204,7 +209,8 @@ export default {
{
label: '订单状态',
prop: 'orderStatusName',
width: '100'
width: '100',
addHtml: 'colorStatus'
},
{
label: '用户信息',
......@@ -217,6 +223,12 @@ export default {
width: '230'
}
]
},
colors: {
'已支付': '#2CCA74',
'退款申请中': '#5850FF',
'已退款': '#2CCA74',
'退款失败': '#EB4E4E'
}
}
},
......
......@@ -5,14 +5,18 @@
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="pannel tableTopButton">
<el-button plain size="small" @click="toggleAll">全选</el-button>
<GLButton fn="上架商品" size="small" @click="batchOperation(1)">上架</GLButton>
<GLButton fn="下架商品" size="small" @click="batchOperation(2)">下架</GLButton>
<GLButton fn="删除商品" size="small" @click="batchOperation(-1)">删除</GLButton>
<GLButton fn="上架商品" size="small" @click="batchOperation(1)">上架</GLButton>
<GLButton fn="下架商品" size="small" @click="batchOperation(2)">下架</GLButton>
<GLButton fn="删除商品" size="small" @click="batchOperation(-1)">删除</GLButton>
</div>
<div class="table_wrap">
<GLTable ref="table" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi">
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: colors[scope.scope.status] }"></div>
<span>{{ ['待上架', '上架', '下架'][scope.scope.status] }}</span>
</div>
<div slot="table-btns" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
<!-- <GLButton fn="编辑商品" type="text" @click="jump(scope.scope)">编辑</GLButton>
<GLButton fn="复制商品" type="text" @click="copy(scope.scope)">复制</GLButton>
<el-button type="text" :disabled="!scope.scope.groupStatus || scope.scope.status != 1" @click="toCreateLine(scope.scope)">生成商品短链</el-button> -->
......@@ -197,7 +201,7 @@ export default {
tableColumns: [
{
label: '提供方',
width:150,
width: 150,
formatter: cell => {
return '海威'
}
......@@ -239,9 +243,10 @@ export default {
{
label: '商品状态',
width: 110,
formatter: cell => {
return ['待上架', '上架', '下架'][cell.status]
}
addHtml: 'colorStatus'
// formatter: cell => {
// return ['待上架', '上架', '下架'][cell.status]
// }
},
{
label: '操作',
......@@ -254,7 +259,8 @@ export default {
goodsBrandList: [],
selectStatus: false,
isVisible: false,
shortLink: null
shortLink: null,
colors: ['#FDB757', '#2CCA74', '#999999']
}
},
mounted() {
......@@ -438,9 +444,9 @@ export default {
.addGood {
margin-bottom: 16px;
}
.find-wrap{
.find-wrap {
background: #ffffff;
padding: 20px 0 ;
padding: 20px 0;
}
.con-wrap {
height: 191px;
......@@ -458,7 +464,7 @@ export default {
align-items: center;
justify-content: center;
}
.el-button+.el-button {
.el-button + .el-button {
margin-left: 8px;
}
</style>
\ No newline at end of file
......@@ -5,33 +5,41 @@
<div class="tableTopButton">
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
</div>
<div class="choseRow">
<div class="choseItem" :class="{ active: currentIndex == index }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index)">
{{ item }}
<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>
</div>
</div>
<GLTable v-if="flag" :noDataImg="url" ref="table" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="goodsMsg" slot-scope="scope">
<div>{{ scope.scope.brandName }}</div>
<div>{{ scope.scope.appearance == 2 ? scope.scope.productName + scope.scope.denomination : scope.scope.productName }}</div>
</span>
<span slot="orderNum" slot-scope="scope">
<div class="table_box">
<GLTable v-if="flag" :noDataImg="url" ref="table" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="goodsMsg" slot-scope="scope">
<div class="mb4">{{ scope.scope.brandName }}</div>
<div class="min-text">{{ scope.scope.appearance == 2 ? scope.scope.productName + scope.scope.denomination : scope.scope.productName }}</div>
</span>
<!-- <span slot="orderNum" slot-scope="scope">
<div>{{ scope.scope.orderCode }}</div>
</span>
<span slot="priceAmount" slot-scope="scope">
</span> -->
<!-- <span slot="priceAmount" slot-scope="scope">
<div>{{ scope.scope.salePrices }}元</div>
<div>{{ scope.scope.goodsQuality }}张</div>
<div></div>
</span>
.
<span slot="userInfo" slot-scope="scope">
<div>{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div>
</span>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="查看订单详情" type="text" @click="jump(scope.scope, 'order')">查看详情</GLButton>
</span>
</GLTable>
</span> -->
<span slot="userInfo" slot-scope="scope">
<div class="mb4">{{ scope.scope.accountName }}</div>
<div class="min-text">{{ scope.scope.mobile }}</div>
</span>
<div class="flex_sc" slot="colorStatus" slot-scope="scope">
<div class="table_point" :style="{ background: scope.scope.appearance == 2 ? colors2[scope.scope.orderStatus] : colors1[scope.scope.orderStatus] }"></div>
<span v-if="scope.scope.appearance == 2">{{ qb_statusEnum[scope.scope.orderStatus] }}</span>
<span v-else>{{ statusEnum[scope.scope.orderStatus] }}</span>
</div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="查看订单详情" type="text" @click="jump(scope.scope, 'order')">查看详情</GLButton>
</span>
</GLTable>
</div>
</div>
</div>
</template>
......@@ -134,26 +142,30 @@ export default {
// }
},
{
label: '价格/数量',
addHtml: 'priceAmount',
width: '150'
// formatter(cell) {
// return `${cell.salePrices}元
// ${cell.goodsQuality}张`
// }
label: '价格/元',
width: 110,
align: 'right',
prop: 'salePrices'
},
{
label: '数量/张',
width: 110,
align: 'right',
prop: 'goodsQuality'
},
{
label: '实收金额',
prop: 'orderPrices',
width: '110',
align:'right'
align: 'right'
},
{
label: '订单状态',
width: '110',
formatter: cell => {
return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus]
}
addHtml: 'colorStatus'
// formatter: cell => {
// return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus]
// }
},
{
label: '下单时间',
......@@ -176,7 +188,7 @@ export default {
{
label: '订单编号',
width: '280',
addHtml: 'orderNum'
prop: 'orderCode'
},
{
label: '海威订单号',
......@@ -190,6 +202,20 @@ export default {
addHtml: 'auth-button'
}
]
},
colors1: {
0: '#999999',
1: '#2CCA74',
2: '#FDB757',
3: '#2CCA74',
4: '#5850FF',
5: '#EB4E4E',
6: '#2CCA74'
},
colors2: {
3: '#2CCA74',
6: '#EB4E4E',
2: '#5850FF'
}
}
},
......@@ -317,24 +343,46 @@ export default {
</script>
<style lang="scss" scoped>
.equity-wrap .contain {
.out_wrap {
position: relative;
z-index: 100;
margin-bottom: -1px;
}
.choseRow {
display: flex;
height: 34px;
.choseItem {
display: inline-block;
box-sizing: border-box;
padding: 0 20px;
height: 40px;
line-height: 40px;
cursor: pointer;
width: 120px;
height: 34px;
line-height: 34px;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #333333;
border: 1px solid #e5e5e5;
margin-right: 1px;
border-radius: 4px 4px 0 0;
background: #fafafa;
}
.active {
color: #5850ff;
background-color: #f4f6fc;
background-color: white;
font-weight: 600;
border-bottom: none;
}
}
.table_box{
border: 1px solid #e5e5e5;
box-sizing: border-box;
padding: 16px 20px;
border-radius: 0 4px 4px 4px;
}
.mb4 {
margin-bottom: 4px;
}
.min-text {
font-size: 10px;
color: #999;
font-weight: 400;
}
}
// .el-form-item {
// margin-bottom: 15px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!