Commit 022ccfd6 by 杨北旺

style:UI规范

2 parents 0be0d418 8d2bf198
.equity-wrap .contain { .equity-wrap .contain {
background: #FFFFFF; background: #FFFFFF;
// margin: 0 0 20px 0; // margin: 0 0 20px 0;
padding: 20px; padding: 20px 15px;
// box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.10); // box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.10);
} }
.equity-wrap .contain .el-table__empty-text{ .equity-wrap .contain .el-table__empty-text{
......
<template> <template>
<div class="equity-dialog"> <div class="equity-dialog">
<el-dialog :title="type == 1 ? '添加汽车权益' : '添加商品权益'" v-if="show" :visible.sync="show" :show-close="true" :close-on-press-escape="false" :close-on-click-modal="false" width="712px" class="equityDialog" :before-close="closeListPoup"> <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"> <div class="form">
<el-form class="equityForm" :model="form" :rules="rules" ref="ruleForm" label-position="right" label-width="auto"> <el-form class="equityForm" :model="form" :rules="rules" ref="ruleForm" label-position="right" label-width="auto">
<el-form-item v-if="type == 1" label="服务提供方" prop="supplier"> <el-form-item v-if="type == 1" label="服务提供方" prop="supplier">
...@@ -46,11 +46,11 @@ ...@@ -46,11 +46,11 @@
</div> </div>
</el-form> </el-form>
</div> </div>
<div slot="footer" class="dialog-footer buttonBtn"> <div slot="footer" class="dialog-footer">
<el-button size="small" @click="close">取 消</el-button> <el-button @click="close">取 消</el-button>
<el-button size="small" type="primary" @click="submit(type)">确 定</el-button> <el-button type="primary" @click="submit(type)">确 定</el-button>
</div> </div>
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
......
import Vue from 'vue' import Vue from 'vue'
import '@/components'
import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree, Card, Table, TableColumn, Pagination, Loading, Dialog, MessageBox, Upload, Tooltip, Tabs, TabPane, Container, Progress, Timeline, TimelineItem, Dropdown, DropdownMenu, Rate, Image, Drawer, Popover, Row } from 'element-ui' import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree, Card, Table, TableColumn, Pagination, Loading, Dialog, MessageBox, Upload, Tooltip, Tabs, TabPane, Container, Progress, Timeline, TimelineItem, Dropdown, DropdownMenu, Rate, Image, Drawer, Popover, Row } from 'element-ui'
Vue.use(Button) Vue.use(Button)
Vue.use(ButtonGroup) Vue.use(ButtonGroup)
......
...@@ -6,6 +6,7 @@ import { GLButton,GLTable, GLCombiForm, GLTableButton,GLDialog } from 'glsx-comp ...@@ -6,6 +6,7 @@ import { GLButton,GLTable, GLCombiForm, GLTableButton,GLDialog } from 'glsx-comp
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import render from './render' import render from './render'
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
...@@ -64,6 +65,7 @@ function juedeDomain(url){ ...@@ -64,6 +65,7 @@ function juedeDomain(url){
const GL_PRODUCT = url.indexOf('scrm.glsx.com')>-1 const GL_PRODUCT = url.indexOf('scrm.glsx.com')>-1
const GH_PRODUCT = url.indexOf('scrm.cgacar')>-1 const GH_PRODUCT = url.indexOf('scrm.cgacar')>-1
const DEV = url.indexOf('scrm.dev.glsx')>-1 const DEV = url.indexOf('scrm.dev.glsx')>-1
const BETA = url.indexOf('scrm.beta.glsx')>-1
if(TEST){ if(TEST){
val.environment = 'test' val.environment = 'test'
}else if(GL_PRODUCT){ }else if(GL_PRODUCT){
...@@ -77,6 +79,9 @@ function juedeDomain(url){ ...@@ -77,6 +79,9 @@ function juedeDomain(url){
}else if(DEV){ }else if(DEV){
val.environment = 'dev' val.environment = 'dev'
val.envVersion = 'develop' val.envVersion = 'develop'
}else if(BETA){
val.environment = 'beta'
val.channel = 1
} }
Vue.prototype.$custom_env = val Vue.prototype.$custom_env = val
let baseURL = url.match(/(\S*)\/rop/)[1]; let baseURL = url.match(/(\S*)\/rop/)[1];
......
<!--领用管理-->
<!--批次管理-->
<template> <template>
<div class="equity-wrap tap tabCtn" style="margin: 20px 0 20px 0"> <div class="equity-wrap tabCtn">
<div class="tapItem"> <div class="tapItem">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="批次管理" name="first" class="contain" style="margin: 0" id="batch"> <el-tab-pane label="批次管理" name="first" class="contain" id="batch">
<GLButton fn="批量生成权益卡" type="primary" size="small" @click="dialogVisible = true">批量生成权益卡</GLButton> <GLButton fn="批量生成权益卡" type="primary" size="small" @click="dialogVisible = true">批量生成权益卡</GLButton>
<el-form :inline="true" label-width="auto" label-position="right" style="margin-top: 20px" class="collectonForm"> <div style="height:16px"></div>
<el-row style="align-items: center" class="select"> <GLCombiForm :rowNumber="1" ref="managerRef" :formObj="batchListSearch" :formData="managerForm" @handleOk="selectCollectionTable('select')" @handleRest="selectCollectionTable('reset')">
<el-form-item label="添加时间"> <div slot="merchant">
<el-date-picker v-model="batchDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" size="small" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="批次">
<el-input v-model="selectBatchId" placeholder="请输入批次号" size="small" maxlength="19" class="formItem"></el-input>
</el-form-item>
<el-form-item label="门店">
<el-select v-model="batchListSearch.merchantName" size="small" clearable filterable remote reserve-keyword placeholder="请输入关联门店" :remote-method="remoteMethod" :loading="loading" class="formItem"> <el-select v-model="batchListSearch.merchantName" size="small" clearable filterable remote reserve-keyword placeholder="请输入关联门店" :remote-method="remoteMethod" :loading="loading" class="formItem">
<el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option> <el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option>
</el-select> </el-select>
</el-form-item> </div>
<el-form-item size="small" style="float: right; margin-right: 0px !important"> </GLCombiForm>
<el-button plain size="small" @click="selectCollectionTable('reset')" class="selectBtn">重置</el-button>
<el-button type="primary" size="small" @click="selectCollectionTable('select')" class="selectBtn">搜索</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable ref="batchDetailTable" :searchForm="batchListSearch" :tableParams="batchTableParams" :getListApi="getlistMemberBatch" :beforeSearchFn="changeBatchDataFormat" :pageConf="batchPageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun"> <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"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- 批次管理详情弹窗按钮 --> <!-- 批次管理详情弹窗按钮 -->
<el-button type="text" @click="batchdetails(scope.scope)">详情</el-button> <el-button type="text" @click="batchdetails(scope.scope)">详情</el-button>
</span> </span>
</GLTable> </GLTable>
<!-- 批次界面弹窗 --> <!-- 批次界面弹窗 -->
<el-dialog title="权益卡信息" :visible.sync="batchdetailsVisible" width="1200px" :before-close="detailClose" class="batchDetailBox"> <GLDialog mode='big' bigTitle="权益卡信息" :visible.sync="batchdetailsVisible" :before-close="detailClose">
<!-- <div class="baseinformation"><span class="dialogtitleText">权益卡信息</span></div> --> <el-form :inline="true" :model="cardsInformationForm" class="demo-form-inline detailFont" label-width="90px">
<el-form :inline="true" :model="cardsInformationForm" class="demo-form-inline detailFont" label-width="90px" style="margin-left: 52px"> <el-row>
<el-row style="margin-top: 32px">
<el-form-item label="门店:" class="detailItem"> <el-form-item label="门店:" class="detailItem">
{{ cardsInformationForm.merchantName }} {{ cardsInformationForm.merchantName }}
</el-form-item> </el-form-item>
...@@ -48,7 +33,6 @@ ...@@ -48,7 +33,6 @@
<el-form-item label="生成日期:" class="detailItem"> <el-form-item label="生成日期:" class="detailItem">
{{ date_format(cardsInformationForm.createdDate, 'detail') }} {{ date_format(cardsInformationForm.createdDate, 'detail') }}
</el-form-item> </el-form-item>
<el-form-item label="批次:" style="margin-left: 120px"> <el-form-item label="批次:" style="margin-left: 120px">
{{ cardsInformationForm.batchNo }} {{ cardsInformationForm.batchNo }}
</el-form-item> </el-form-item>
...@@ -80,13 +64,12 @@ ...@@ -80,13 +64,12 @@
<GLTable ref="batchdetailPopupTable" @hook:mounted="setTabelHeight" :tableParams="batchdetailPopupTable" :getListApi="listMemberCard" :searchForm="batchPopupListSearch" :beforeSearchFn="beforebatchPopupListSearch" :pageConf="datailPageConf"></GLTable> <GLTable ref="batchdetailPopupTable" @hook:mounted="setTabelHeight" :tableParams="batchdetailPopupTable" :getListApi="listMemberCard" :searchForm="batchPopupListSearch" :beforeSearchFn="beforebatchPopupListSearch" :pageConf="datailPageConf"></GLTable>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="closebatchdetailPopupTable">取 消</el-button> <el-button @click="closebatchdetailPopupTable">取 消</el-button>
<!-- <el-button @click="batchdetailsVisible = false">取 消</el-button> --> <el-button type="primary" @click="closebatchdetailPopupTable">确 定</el-button>
<el-button type="primary" size="small" @click="closebatchdetailPopupTable">确 定</el-button>
</span> </span>
</el-dialog> </GLDialog>
<!-- 批量生成权益卡弹窗 --> <!-- 批量生成权益卡弹窗 -->
<el-dialog title="批量生成权益卡" :visible.sync="dialogVisible" width="712px" :before-close="handleClose" class="batchDialog"> <GLDialog mode='mid' title="批量生成权益卡" :visible.sync="dialogVisible" :before-close="handleClose">
<el-form :inline="true" :model="generateRightCardsForm" :rules="rules" ref="ruleForm" label-width="90px" class="addCardsForm"> <el-form :inline="true" :model="generateRightCardsForm" :rules="rules" ref="ruleForm" label-width="90px" class="addCardsForm">
<div class="form"> <div class="form">
<el-row> <el-row>
...@@ -112,45 +95,29 @@ ...@@ -112,45 +95,29 @@
</div> </div>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="cancelGenerate">取 消</el-button> <el-button @click="cancelGenerate">取 消</el-button>
<el-button size="small" type="primary" @click="generateCards('ruleForm')">确 定</el-button> <el-button type="primary" @click="generateCards('ruleForm')">确 定</el-button>
</span> </span>
</el-dialog> </GLDialog>
</el-tab-pane> </el-tab-pane>
<!--领用记录 --> <!--领用记录 -->
<el-tab-pane label="领用记录" name="second" class="contain" style="margin: 0" id="collection"> <el-tab-pane label="领用记录" name="second" class="contain" id="collection">
<el-form :inline="true" label-width="70px" label-position="right" class="collectonForm"> <GLCombiForm ref="collectonRef" :formObj="collectionListSearch" :formData="collectForm" @handleOk="collectionSelect('select')" @handleRest="collectionSelect('reset')">
<el-row style="align-items: center"> <div slot="collectMerchant">
<el-form-item label="生成日期">
<el-date-picker v-model="colletionDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" size="small" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="门店">
<el-select size="small" v-model="collectionListSearch.merchantName" clearable filterable remote reserve-keyword placeholder="请输入关联门店" :remote-method="remoteMethod" :loading="loading" class="formItem"> <el-select size="small" v-model="collectionListSearch.merchantName" clearable filterable remote reserve-keyword placeholder="请输入关联门店" :remote-method="remoteMethod" :loading="loading" class="formItem">
<el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option> <el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option>
</el-select> </el-select>
</el-form-item> </div>
<el-form-item label="设备SN" style="margin-left: 30px"> </GLCombiForm>
<el-input v-model="collectionListSearch.sn" placeholder="请输入设备SN" size="small" class="formItem"></el-input> <div class="pannel tableTopButton">
</el-form-item> <el-button type="primary" size="small" @click="exportCollection">导出</el-button>
</el-row> </div>
<el-row>
<el-form-item size="small" label="账号">
<el-input v-model="collectionListSearch.mobile" placeholder="请输入账号" size="small" class="formItem"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px !important">
<el-button class="selectBtn" size="small" @click="collectionSelect('reset')">重置</el-button>
<el-button class="selectBtn" size="small" type="primary" @click="collectionSelect('select')" style="">搜索</el-button>
<el-button class="selectBtn" type="primary" size="small" @click="exportCollection">导出</el-button>
</el-form-item>
</el-row>
</el-form>
<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"></GLTable>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
function date_format(date, e) { function date_format(date, e) {
date = new Date(date) date = new Date(date)
...@@ -194,7 +161,6 @@ export default { ...@@ -194,7 +161,6 @@ export default {
baseDate: { baseDate: {
equityList: [] equityList: []
}, },
// 批次弹窗列表搜索项 // 批次弹窗列表搜索项
batchPopupListSearch: { batchPopupListSearch: {
batchId: '', batchId: '',
...@@ -205,11 +171,33 @@ export default { ...@@ -205,11 +171,33 @@ export default {
// 批次列表搜索项 // 批次列表搜索项
selectBatchId: '' || null, selectBatchId: '' || null,
batchListSearch: { batchListSearch: {
selectBatchId: '',
batchDate: '',
batchNo: '', batchNo: '',
merchantName: '', merchantName: '',
startTime: '', startTime: '',
endTime: '' endTime: ''
}, },
managerForm: [
{
label: '添加时间',
name: 'batchDate',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd'
},
{
label: '批次',
name: 'selectBatchId',
type: 'input',
maxlength: 19
},
{
label: '门店',
name: 'merchantName',
type: 'select',
addHtml: 'merchant'
}
],
dialogVisible: false, dialogVisible: false,
activeName: 'first', activeName: 'first',
//批次管理table //批次管理table
...@@ -220,22 +208,23 @@ export default { ...@@ -220,22 +208,23 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '批次', label: '批次',
prop: 'batchNo' prop: 'batchNo',
width: '150'
}, },
{ {
label: '门店', label: '门店',
prop: 'merchantName' prop: 'merchantName'
}, },
{ {
label: '生成数量', label: '生成数量',
prop: 'num' prop: 'num',
// width: 110, width: '120'
// tagLabel: true // tagLabel: true
}, },
{ {
label: '激活数量', label: '激活数量',
prop: 'recipientCount', prop: 'recipientCount',
width: '150',
// minWidth: '200' // minWidth: '200'
formatter: cellValue => { formatter: cellValue => {
if (cellValue.recipientCount) { if (cellValue.recipientCount) {
...@@ -246,13 +235,12 @@ export default { ...@@ -246,13 +235,12 @@ export default {
} }
}, },
{ {
width: '95', width: '180',
label: '生成时间', label: '生成时间',
prop: 'createdDate', prop: 'createdDate',
formatter: cellValue => { formatter: cellValue => {
return this.date_format(cellValue.createdDate) return this.date_format(cellValue.createdDate)
} }
// formatter: (cellValue) => { // formatter: (cellValue) => {
// return { // return {
// 0: '进行中', // 0: '进行中',
...@@ -280,7 +268,6 @@ export default { ...@@ -280,7 +268,6 @@ export default {
{ {
label: '卡号', label: '卡号',
prop: 'cardNo' prop: 'cardNo'
// minWidth: '200'
}, },
{ {
label: '激活码', label: '激活码',
...@@ -320,8 +307,33 @@ export default { ...@@ -320,8 +307,33 @@ export default {
sn: '', sn: '',
startTime: '', startTime: '',
endTime: '', endTime: '',
mobile: '' mobile: '',
colletionDate: ''
},
collectForm: [
{
label: '生成日期',
name: 'colletionDate',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd'
},
{
label: '门店',
name: 'merchantName',
type: 'select',
addHtml: 'collectMerchant'
},
{
label: '设备SN',
name: 'sn',
type: 'input'
}, },
{
label: '账号',
name: 'mobile',
type: 'input'
}
],
// 领用记录表格 // 领用记录表格
collectionTableParams: { collectionTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
...@@ -330,11 +342,12 @@ export default { ...@@ -330,11 +342,12 @@ export default {
{ {
label: '卡号', label: '卡号',
prop: 'cardNo', prop: 'cardNo',
minWidth: '200' width: '160'
}, },
{ {
label: '激活码', label: '激活码',
prop: 'activationCode' prop: 'activationCode',
width: '160'
}, },
{ {
label: '设备SN', label: '设备SN',
...@@ -343,7 +356,7 @@ export default { ...@@ -343,7 +356,7 @@ export default {
{ {
label: '账号', label: '账号',
prop: 'mobile', prop: 'mobile',
minWidth: '200', minWidth: '160',
formatter: cellValue => { formatter: cellValue => {
if (cellValue.mobile == 0) { if (cellValue.mobile == 0) {
return '' return ''
...@@ -367,19 +380,17 @@ export default { ...@@ -367,19 +380,17 @@ export default {
} }
}, },
{ {
width: '95',
label: '生成时间', label: '生成时间',
prop: 'createdDate', prop: 'createdDate',
minWidth: '200', width: '180',
formatter: cellValue => { formatter: cellValue => {
return this.date_format(cellValue.createdDate) return this.date_format(cellValue.createdDate)
} }
}, },
{ {
width: '95', width: '180',
label: '有效时间', label: '有效时间',
prop: 'validitDate', prop: 'validitDate',
minWidth: '200',
formatter: cellValue => { formatter: cellValue => {
return this.date_format(cellValue.validitDate) return this.date_format(cellValue.validitDate)
} }
...@@ -458,8 +469,8 @@ export default { ...@@ -458,8 +469,8 @@ export default {
// 批次界面搜索 // 批次界面搜索
selectCollectionTable(e) { selectCollectionTable(e) {
if (e == 'reset') { if (e == 'reset') {
this.batchDate = '' this.batchListSearch.batchDate = ''
this.selectBatchId = '' this.batchListSearch.selectBatchId = ''
this.batchListSearch.merchantName = '' this.batchListSearch.merchantName = ''
this.$apis.equityApi.getEquityCardBatchList(this.batchListSearch).then(res => { this.$apis.equityApi.getEquityCardBatchList(this.batchListSearch).then(res => {
this.$refs.batchDetailTable.refreshTable() this.$refs.batchDetailTable.refreshTable()
...@@ -597,7 +608,6 @@ export default { ...@@ -597,7 +608,6 @@ export default {
// mobile: this.collectionListSearch.mobile, // mobile: this.collectionListSearch.mobile,
// defineId: this.collectionListSearch.merchantId // defineId: this.collectionListSearch.merchantId
// } // }
// const url = // const url =
// this.$get_session_common_config().axios.baseURL + '/memberInfo/exportMemberCard' // this.$get_session_common_config().axios.baseURL + '/memberInfo/exportMemberCard'
// exportExcel({ url, data }) // exportExcel({ url, data })
...@@ -636,10 +646,10 @@ export default { ...@@ -636,10 +646,10 @@ export default {
// 改变批次日期数据格式 // 改变批次日期数据格式
changeBatchDataFormat() { changeBatchDataFormat() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.batchListSearch.endTime = this.batchDate ? this.batchDate[1] + ' 23:59:59' : '' this.batchListSearch.endTime = this.batchListSearch.batchDate ? this.batchListSearch.batchDate[1] + ' 23:59:59' : ''
this.batchListSearch.startTime = this.batchDate ? this.batchDate[0] + ' 00:00:01' : '' this.batchListSearch.startTime = this.batchListSearch.batchDate ? this.batchListSearch.batchDate[0] + ' 00:00:01' : ''
if (this.selectBatchId) { if (this.batchListSearch.selectBatchId) {
this.batchListSearch.batchNo = +this.selectBatchId this.batchListSearch.batchNo = +this.batchListSearch.selectBatchId
} else { } else {
this.batchListSearch.batchNo = null this.batchListSearch.batchNo = null
} }
...@@ -651,8 +661,8 @@ export default { ...@@ -651,8 +661,8 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (this.collectionListSearch.sn.length > 2 || this.collectionListSearch.sn.length < 1) { if (this.collectionListSearch.sn.length > 2 || this.collectionListSearch.sn.length < 1) {
if (this.collectionListSearch.mobile.length > 2 || this.collectionListSearch.mobile.length < 1) { if (this.collectionListSearch.mobile.length > 2 || this.collectionListSearch.mobile.length < 1) {
this.collectionListSearch.endTime = this.colletionDate ? this.colletionDate[1] + ' 23:59:59' : '' || undefined this.collectionListSearch.endTime = this.collectionListSearch.colletionDate ? this.collectionListSearch.colletionDate[1] + ' 23:59:59' : '' || undefined
this.collectionListSearch.startTime = this.colletionDate ? this.colletionDate[0] + ' 00:00:01' : '' || undefined this.collectionListSearch.startTime = this.collectionListSearch.colletionDate ? this.collectionListSearch.colletionDate[0] + ' 00:00:01' : '' || undefined
resolve() resolve()
} else { } else {
Message({ Message({
...@@ -859,7 +869,6 @@ display: flex; ...@@ -859,7 +869,6 @@ display: flex;
align-items: center; align-items: center;
flex-wrap: nowrap; flex-wrap: nowrap;
} */ } */
.collectonForm .el-form-item__label, .collectonForm .el-form-item__label,
.el-form-item__content { .el-form-item__content {
/* line-height: 32px; */ /* line-height: 32px; */
......
<template> <template>
<div class="equity-wrap"> <div class="equity-wrap">
<div class="equity-wrap contain"> <div class="find_wrap">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right"> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<el-row style="display: flex; align-items: center"> <GLTable ref="table" :noDataImg="url" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"></GLTable>
<el-form-item size="small" label="加油日期">
<el-date-picker size="small" v-model="searchForm.daterange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item>
<el-form-item label="订单号">
<el-input v-model="searchForm.orderId" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
<el-form-item label="用户信息">
<el-input v-model="searchForm.phone" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item size="small" label="订单状态">
<el-select size="small" v-model="searchForm.orderStatus" placeholder="请选择">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable v-if="flag" ref="table" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"></GLTable>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
// type='text/ecmascript-6'
function date_format(date) { function date_format(date) {
var date2 = new Date(date) var date2 = new Date(date)
var YY = date2.getFullYear() + '-' var YY = date2.getFullYear() + '-'
...@@ -42,41 +18,69 @@ function date_format(date) { ...@@ -42,41 +18,69 @@ function date_format(date) {
var ss = date2.getSeconds() < 10 ? '0' + date2.getSeconds() : date2.getSeconds() var ss = date2.getSeconds() < 10 ? '0' + date2.getSeconds() : date2.getSeconds()
return YY + MM + DD + ' ' + hh + mm + ss return YY + MM + DD + ' ' + hh + mm + ss
} }
import url from "@/assets/empty.png" import url from '@/assets/empty.png'
// import { searchMixin } from '@/mixins'
export default { export default {
name: '', name: '',
// mixins: [searchMixin],
data() { data() {
return { return {
url:url, url: url,
size: 'small',
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
} }
}, },
searchForm: { searchForm: {
orderId: '' orderId: '',
orderStatus: '',
daterange: '',
phone: ''
},
searchFormData: [
{
label: '下单时间',
name: 'daterange',
type: 'datePicker',
isClear: true
},
{
label: '订单号',
name: 'orderId',
type: 'input',
isClear: true
}, },
searchFormTable: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
date_format,
flag: true,
statusList: [
{ {
label: '已结算', label: '用户信息',
value: '0' name: 'phone',
type: 'input',
isClear: true
},
{
label: '订单状态',
name: 'orderStatus',
type: 'select',
optionId: 'confId',
optionLabel: 'confName',
isClear: true,
noFilter: true,
optionList: [
{
confId: 0,
confName: '已结算'
}, },
{ {
label: '待结算', confId: 1,
value: '1' confName: '待结算'
}, },
{ {
label: '已失效', confId: 2,
value: '2' confName: '已失效'
}
]
} }
], ],
searchFormTable: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
date_format,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
getListApi: this.$apis.orderApi.getEDJOrderList, getListApi: this.$apis.orderApi.getEDJOrderList,
...@@ -127,13 +131,7 @@ export default { ...@@ -127,13 +131,7 @@ export default {
} }
} }
}, },
// watch: {
// date(n) {
// let [callDateStart, callDateEnd] = n
// this.searchObj.callDateStart = callDateStart || ''
// this.searchObj.callDateEnd = callDateEnd || ''
// }
// },
mounted() {}, mounted() {},
methods: { methods: {
beforeSearchFn() { beforeSearchFn() {
...@@ -149,18 +147,21 @@ export default { ...@@ -149,18 +147,21 @@ export default {
resolve() resolve()
}) })
}, },
setTableFinishFun() { // setTableFinishFun() {
//接收到的数据为空 // //接收到的数据为空
if (!this.$refs.table.data.length) { // if (!this.$refs.table.data.length) {
this.$refs.table.setTableHeightFun() // this.$refs.table.setTableHeightFun()
} // }
}, // },
handleReset() { handleReset() {
this.flag = false this.flag = false
this.searchForm = {} this.searchForm = {
this.$nextTick(() => { orderId: '',
this.flag = true orderStatus: '',
}) daterange: '',
phone: ''
}
this.handleSearch()
}, },
handleSearch() { handleSearch() {
this.$refs.table.refreshTable() this.$refs.table.refreshTable()
...@@ -169,21 +170,4 @@ export default { ...@@ -169,21 +170,4 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-form-item {
margin-bottom: 15px;
}
.el-range-editor.is-active,
.el-range-editor.is-active:hover {
border-color: #5850ff;
width: 215px;
}
.el-range-editor--small.el-input__inner {
width: 215px;
}
/deep/ .contain .el-input--small .el-input__inner {
width: 215px;
}
.equity-wrap .contain {
margin-top: 20px;
}
</style> </style>
...@@ -9,55 +9,15 @@ ...@@ -9,55 +9,15 @@
<span>账户余额</span> <span>账户余额</span>
<div> <div>
<span>{{ price }}</span> <span>{{ price }}</span>
<span class="yuan">元</span> <span class="yuan">元</span>
</div> </div>
</div> </div>
<el-button class="refreshBtn" v-if="loading" :loading="loading"></el-button> <el-button class="refreshBtn" v-if="loading" :loading="loading"></el-button>
<el-button class="special-btn" @click="getHwAccount(1)" v-else>刷新余额</el-button> <el-button class="special-btn" @click="getHwAccount(1)" v-else>刷新余额</el-button>
<!-- <div class="statusBtnWrap">
<div>刷新状态</div>
<el-button icon="el-icon-refresh" class="refreshBtn"></el-button>
</div> -->
</div> </div>
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row style="display: flex; align-items: center">
<el-form-item size="small" label="品牌名称">
<el-select size="small" v-model="searchForm.brandName" placeholder="请选择">
<el-option v-for="item in brandList" :key="item.brandId" :label="item.brandName" :value="item.brandName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="商品名称">
<el-input v-model="searchForm.productName" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
<el-form-item label="门店名称">
<el-input v-model="searchForm.merchantName" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item size="small" label="商品形态">
<el-select size="small" v-model="searchForm.appereance" placeholder="请选择">
<el-option v-for="item in appereanceList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="订单状态">
<el-select size="small" v-model="searchForm.orderStatus" placeholder="请选择">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="下单时间">
<el-date-picker size="small" v-model="searchForm.daterange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item>
<el-form-item size="small" class="fr-mr0"> <GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<el-button :size="size" @click="handleReset">重置</el-button> <GLTable v-if="flag" ref="table" :noDataImg="url" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<GLButton fn="财务管理导出" :size="size" type="primary" @click="exportExcel">导出</GLButton>
</el-form-item>
</el-row>
</el-form>
<GLTable v-if="flag" ref="table" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<template slot="custom"> <template slot="custom">
<div class="table-custom exportBtn"></div> <div class="table-custom exportBtn"></div>
</template> </template>
...@@ -65,16 +25,15 @@ ...@@ -65,16 +25,15 @@
</div> </div>
</div> </div>
</template> </template>
<script type="text/ecmascript-6">
<script type='text/ecmascript-6'> import url from '@/assets/empty.png'
import url from "@/assets/empty.png"
import { orderMixin, searchMixin } from '@/mixins' import { orderMixin, searchMixin } from '@/mixins'
export default { export default {
name: '', name: '',
mixins: [orderMixin, searchMixin], mixins: [orderMixin, searchMixin],
data() { data() {
return { return {
url:url, url: url,
loading: false, loading: false,
size: 'small', size: 'small',
pickerOptions: { pickerOptions: {
...@@ -85,7 +44,93 @@ export default { ...@@ -85,7 +44,93 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
flag: true, flag: true,
price: 0, price: 0,
searchForm: {}, searchForm: {
brandName: '',
productName: '',
merchantName: '',
appereance: '',
orderStatus: '',
daterange: ''
},
searchFormData: [
{
label: '品牌名称',
name: 'brandName',
type: 'select',
optionList: [],
optionId: 'brandName',
optionLabel: 'brandName',
isClear: true
},
{
label: '商品名称',
name: 'productName',
type: 'input',
isClear: true
},
{
label: '门店名称',
name: 'merchantName',
type: 'input',
isClear: true
},
{
label: '商品形态',
name: 'appereance',
type: 'select',
optionList: [
{
label: '卡券',
value: 1
},
{
label: '直充',
value: 2
}
],
optionId: 'value',
optionLabel: 'label',
isClear: true
},
{
label: '订单状态',
name: 'orderStatus',
type: 'select',
optionList: [
{
label: '待收货',
value: [1, 2]
},
{
label: '已完成',
value: [3]
},
{
label: '已退款',
value: [6]
},
{
label: '售后中',
value: [4]
}
],
optionId: 'value',
optionLabel: 'label',
isClear: true
},
{
label: '下单时间',
name: 'daterange',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
}
],
searchFormTable: {}, searchFormTable: {},
tableParams: { tableParams: {
listName: 'list', listName: 'list',
...@@ -98,7 +143,6 @@ export default { ...@@ -98,7 +143,6 @@ export default {
sums[index] = '合计' sums[index] = '合计'
return return
} }
const values = data.map(item => { const values = data.map(item => {
if (column.property == 'costPrices' || column.property == 'orderPrices' || column.property == 'discount') { if (column.property == 'costPrices' || column.property == 'orderPrices' || column.property == 'discount') {
return Number(item[column.property]) return Number(item[column.property])
...@@ -124,44 +168,54 @@ export default { ...@@ -124,44 +168,54 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '订单编号', label: '订单编号',
prop: 'orderCode' prop: 'orderCode',
width: '220'
}, },
{ {
label: '品牌名称', label: '品牌名称',
width: 150,
prop: 'brandName' prop: 'brandName'
}, },
{ {
label: '商品形态', label: '商品形态',
width: '100',
prop: 'appearanceDesc' prop: 'appearanceDesc'
}, },
{ {
label: '商品名称', label: '商品名称',
width: 200,
formatter(cell) { formatter(cell) {
return cell.appearance == 2 ? `${cell.productName}${cell.denomination}` : cell.productName return cell.appearance == 2 ? `${cell.productName}${cell.denomination}` : cell.productName
} }
}, },
{ {
label: '订单成本金额', label: '订单成本金额',
prop: 'costPrices' prop: 'costPrices',
width: 150,
align: 'right'
}, },
{ {
label: '订单支付金额', label: '订单支付金额',
prop: 'orderPrices' prop: 'orderPrices',
width: 150,
align: 'right'
}, },
{ {
label: '销售差额', label: '销售差额',
prop: 'discount' prop: 'discount',
width: 150,
align: 'right'
}, },
{ {
label: '下单渠道', label: '下单渠道',
width: '250',
formatter(cell) { formatter(cell) {
return `${cell.merchantName || ''}${cell.merchantName ? '-' : ''}${cell.channelName}` return `${cell.merchantName || ''}${cell.merchantName ? '-' : ''}${cell.channelName}`
} }
}, },
{ {
label: '订单状态', label: '订单状态',
width: 120,
formatter: cell => { formatter: cell => {
return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus] return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus]
} }
...@@ -169,7 +223,7 @@ export default { ...@@ -169,7 +223,7 @@ export default {
{ {
label: '下单时间', label: '下单时间',
prop: 'orderDate', prop: 'orderDate',
width: 95, width: 180,
formatter(cell) { formatter(cell) {
return cell.orderDate ? new Date(cell.orderDate).format('yyyy-MM-dd hh:mm:ss') : '- -' return cell.orderDate ? new Date(cell.orderDate).format('yyyy-MM-dd hh:mm:ss') : '- -'
} }
...@@ -178,6 +232,12 @@ export default { ...@@ -178,6 +232,12 @@ export default {
} }
} }
}, },
created() {
this.$apis.orderApi.getAllBrandList({}).then(({ data }) => {
const item = this.searchFormData.find(item => item.name === 'brandName')
item.optionList = data
})
},
mounted() { mounted() {
this.getHwAccount() this.getHwAccount()
}, },
...@@ -254,23 +314,21 @@ export default { ...@@ -254,23 +314,21 @@ export default {
// </style> // </style>
// <style src="@a/css/tao.css"></style> // <style src="@a/css/tao.css"></style>
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-form-item { // .el-form-item {
margin-bottom: 15px; // margin-bottom: 15px;
} // }
.el-range-editor.is-active, // .el-range-editor.is-active,
.el-range-editor.is-active:hover { // .el-range-editor.is-active:hover {
border-color: #5850ff; // border-color: #5850ff;
width: 215px; // width: 215px;
} // }
.el-range-editor--small.el-input__inner { // .el-range-editor--small.el-input__inner {
width: 215px; // width: 215px;
} // }
/deep/ .contain .el-input--small .el-input__inner { // /deep/ .contain .el-input--small .el-input__inner {
width: 215px; // width: 215px;
} // }
.equity-wrap .contain { .equity-wrap .contain {
.topContent { .topContent {
display: flex; display: flex;
...@@ -282,7 +340,6 @@ export default { ...@@ -282,7 +340,6 @@ export default {
width: 52px; width: 52px;
height: 52px; height: 52px;
} }
.balanceWrap { .balanceWrap {
margin-left: 10px; margin-left: 10px;
> span { > span {
...@@ -295,14 +352,12 @@ export default { ...@@ -295,14 +352,12 @@ export default {
> div { > div {
height: 30px; height: 30px;
font-size: 22px; font-size: 22px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 30px; line-height: 30px;
.yuan { .yuan {
height: 20px; height: 20px;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
...@@ -329,7 +384,6 @@ export default { ...@@ -329,7 +384,6 @@ export default {
// > div { // > div {
// height: 20px; // height: 20px;
// font-size: 14px; // font-size: 14px;
// font-weight: 400; // font-weight: 400;
// color: #000000; // color: #000000;
// line-height: 20px; // line-height: 20px;
......
<template> <template>
<div class="equity-wrap"> <div class="equity-wrap">
<div class="equity-wrap contain"> <div class="equity-wrap contain">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="90px" label-position="right"> <GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<el-row style="display: flex; align-items: center"> <GLTable v-if="flag" ref="table" :noDataImg="url" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"></GLTable>
<el-form-item size="small" label="加油日期">
<el-date-picker size="small" v-model="searchForm.daterange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item>
<el-form-item size="small" label="加油供应商">
<el-select size="small" :value="'团油'" placeholder="请选择">
<!-- <el-option v-for="item in appereanceList" :key="item.value" :label="item.label" :value="item.value"></el-option> -->
<el-option label="团油" value="团油"></el-option>
</el-select>
</el-form-item>
<el-form-item label="加油订单号">
<el-input v-model="searchForm.orderId" placeholder="请输入" size="small"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="加油用户">
<el-input v-model="searchForm.phone" placeholder="请输入" size="small"></el-input>
</el-form-item>
<el-form-item label="订单状态">
<el-select v-model="searchForm.orderStatus" placeholder="请选择" size="small">
<el-option v-for="item in statusList" :key="item.id" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button size="small" @click="handleReset">重置</el-button>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable v-if="flag" ref="table" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"></GLTable>
</div> </div>
</div> </div>
</template> </template>
<script type="text/ecmascript-6">
<script type='text/ecmascript-6'>
function getExplorer() { function getExplorer() {
var ua = navigator.userAgent.toLocaleLowerCase() var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null var browserType = null
...@@ -62,7 +31,6 @@ function getExplorer() { ...@@ -62,7 +31,6 @@ function getExplorer() {
} }
return browserType return browserType
} }
function exportFn(url) { function exportFn(url) {
let browserType = getExplorer() let browserType = getExplorer()
if (browserType == 'QQ') { if (browserType == 'QQ') {
...@@ -92,7 +60,77 @@ export default { ...@@ -92,7 +60,77 @@ export default {
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
flag: true, flag: true,
searchForm: {}, searchForm: {
orderId: '',
phone: '',
daterange: '',
orderStatus: ''
},
searchFormData: [
{
label: '加油日期',
name: 'daterange',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
},
{
label: '加油供应商',
name: 'massOil',
type: 'select',
optionList: [
{
label: '团油'
}
],
optionId: 'label',
optionLabel: 'label',
isClear: true
},
{
label: '订单号',
name: 'orderId',
type: 'input',
isClear: true
},
{
label: '用户信息',
name: 'phone',
type: 'input',
isClear: true
},
{
label: '订单状态',
name: 'orderStatus',
type: 'select',
optionList: [
{
label: '已支付',
value: 1
},
{
label: '退款申请中',
value: 4
},
{
label: '已退款',
value: 5
},
{
label: '退款失败',
value: 6
}
],
optionId: 'value',
optionLabel: 'label',
isClear: true
}
],
searchFormTable: {}, searchFormTable: {},
statusList: [ statusList: [
{ {
...@@ -123,11 +161,10 @@ export default { ...@@ -123,11 +161,10 @@ export default {
{ {
label: '加油时间', label: '加油时间',
prop: 'orderTime', prop: 'orderTime',
width: '95' width:180,
}, },
{ {
label: '供应商', label: '供应商',
formatter: cell => { formatter: cell => {
return '团油' return '团油'
} }
...@@ -139,28 +176,30 @@ export default { ...@@ -139,28 +176,30 @@ export default {
}, },
{ {
label: '油号', label: '油号',
prop: 'oilName' prop: 'oilName'
}, },
{ {
label: '加油升数(L)', label: '加油升数(L)',
prop: 'litre', prop: 'litre',
width: '100' width: '150'
}, },
{ {
label: '实付金额', label: '实付金额',
prop: 'amountPay', prop: 'amountPay',
width: '100' width: '100',
align: 'right'
}, },
{ {
label: '订单总额', label: '订单总额',
prop: 'amountGun', prop: 'amountGun',
width: '100' width: '100',
align: 'right'
}, },
{ {
label: '优惠金额', label: '优惠金额',
prop: 'amountDiscounts', prop: 'amountDiscounts',
width: '100' width: '100',
align: 'right'
}, },
{ {
label: '订单状态', label: '订单状态',
...@@ -175,7 +214,7 @@ export default { ...@@ -175,7 +214,7 @@ export default {
{ {
label: '供应商订单号', label: '供应商订单号',
prop: 'orderId', prop: 'orderId',
width: '220' width: '230'
} }
] ]
} }
...@@ -232,22 +271,21 @@ export default { ...@@ -232,22 +271,21 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-form-item { // .el-form-item {
margin-bottom: 15px; // margin-bottom: 15px;
} // }
.el-range-editor.is-active, // .el-range-editor.is-active,
.el-range-editor.is-active:hover { // .el-range-editor.is-active:hover {
border-color: #5850ff; // border-color: #5850ff;
width: 215px; // width: 215px;
} // }
.el-range-editor--small.el-input__inner { // .el-range-editor--small.el-input__inner {
width: 215px; // width: 215px;
} // }
/deep/ .contain .el-input--small .el-input__inner { // /deep/ .contain .el-input--small .el-input__inner {
width: 215px; // width: 215px;
} // }
.equity-wrap .contain { .equity-wrap .contain {
margin-top: 20px; margin-top: 20px;
} }
......
...@@ -102,19 +102,12 @@ ...@@ -102,19 +102,12 @@
</div> </div>
</el-form> </el-form>
</div> </div>
<div <div class="footer-panel">
class="footer-panel" <el-button plain class="btn-three" @click="$router.go(-1)">取消</el-button>
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<!-- <el-button type="primary" @click="onSubmit('save')" size="small">创建</el-button> -->
<el-button class="custtom" @click="onSubmit('save')" type="primary" size="small">保存</el-button>
<div class="wrap_driver"> <div class="wrap_driver">
<el-button type="primary" @click="onSubmit" size="small">提交</el-button> <el-button plain type="primary" @click="onSubmit">提交</el-button>
</div> </div>
<el-button @click="$router.go(-1)" size="small">取消</el-button> <el-button @click="onSubmit('save')" type="primary">保存</el-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -240,18 +233,18 @@ export default { ...@@ -240,18 +233,18 @@ export default {
ruleForm: { ruleForm: {
supplier: 'HW', supplier: 'HW',
appearance: 1, appearance: 1,
costPrice:'', costPrice: '',
lineationPrice:'', lineationPrice: '',
noMemberPrice:'', noMemberPrice: '',
salesPrice:'', salesPrice: '',
brandName:'', brandName: '',
productName:'', productName: '',
productId:'', productId: '',
goodsImage:'', goodsImage: '',
denomination:0, denomination: 0,
warrantyPeriod:0, warrantyPeriod: 0,
buysNotes:'', buysNotes: '',
useNotes:'' useNotes: ''
}, },
stock: '', stock: '',
brandNameList: [], brandNameList: [],
...@@ -432,8 +425,7 @@ export default { ...@@ -432,8 +425,7 @@ export default {
this.$confirm(_res.message, '提示', { this.$confirm(_res.message, '提示', {
confirmButtonText: '保存', confirmButtonText: '保存',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
center: true
}).then(() => { }).then(() => {
this.createGoods() this.createGoods()
}) })
...@@ -441,8 +433,7 @@ export default { ...@@ -441,8 +433,7 @@ export default {
this.$confirm(_res.message, '提示', { this.$confirm(_res.message, '提示', {
confirmButtonText: '提交', confirmButtonText: '提交',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
center: true
}).then(() => { }).then(() => {
this.createGoods() this.createGoods()
}) })
...@@ -486,22 +477,10 @@ export default { ...@@ -486,22 +477,10 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: fixed;
width: 100%; width: 100%;
bottom: 0px; margin: 16px 0;
height: 64px;
background: #ffffff;
z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
.custtom {
background: #ffffff;
color: #5850ff;
}
.wrap_driver { .wrap_driver {
margin: 0 20px; margin: 0 20px;
.el-button + .el-button {
margin-right: 40px;
}
} }
} }
.uploader-del-icon { .uploader-del-icon {
......
...@@ -3,40 +3,6 @@ ...@@ -3,40 +3,6 @@
<GLButton fn="新增商品" size="small" class="addGood" type="primary" icon="el-icon-plus" @click="jump">新增商品</GLButton> <GLButton fn="新增商品" size="small" class="addGood" type="primary" icon="el-icon-plus" @click="jump">新增商品</GLButton>
<div class="find_wrap"> <div class="find_wrap">
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- <el-form :inline="true" style="width: 100%" :model="searchForm" label-width="85px" label-position="right">
<el-row style="display: flex; align-items: center; margin-bottom: 2px">
<el-form-item size="small" label="品牌名称">
<el-select clearable size="small" v-model="searchForm.brandName" filterable placeholder="请选择">
<el-option v-for="item in goodsBrandList" :key="item.id" :label="item.brandName" :value="item.brandName"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="商品名称">
<el-input v-model="searchForm.productName" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
<el-form-item size="small" label="提供方" style="margin-left: -10px">
<el-select clearable size="small" v-model="searchForm.supplier">
<el-option v-for="item in supplierList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item size="small" label="商品编码">
<el-input v-model="searchForm.productId" placeholder="请输入" size="small" clearable></el-input>
</el-form-item>
<el-form-item size="small" label="商品状态">
<el-select clearable size="small" v-model="searchForm.status">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="商品ID" style="margin-left: -10px">
<el-input v-model="searchForm.id" placeholder="请输入" size="small"></el-input>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form> -->
<div class="pannel tableTopButton"> <div class="pannel tableTopButton">
<el-button size="small" @click="toggleAll">全选</el-button> <el-button size="small" @click="toggleAll">全选</el-button>
<GLButton fn="上架商品" size="small" type="primary" @click="batchOperation(1)">上架</GLButton> <GLButton fn="上架商品" size="small" type="primary" @click="batchOperation(1)">上架</GLButton>
...@@ -44,7 +10,7 @@ ...@@ -44,7 +10,7 @@
<GLButton fn="删除商品" size="small" type="primary" @click="batchOperation(-1)">删除</GLButton> <GLButton fn="删除商品" size="small" type="primary" @click="batchOperation(-1)">删除</GLButton>
</div> </div>
<div class="table_wrap"> <div class="table_wrap">
<GLTable ref="table" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi"> <GLTable ref="table" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi">
<div slot="table-btns" slot-scope="scope"> <div slot="table-btns" slot-scope="scope">
<GLButton fn="编辑商品" type="text" @click="jump(scope.scope)">编辑</GLButton> <GLButton fn="编辑商品" type="text" @click="jump(scope.scope)">编辑</GLButton>
<GLButton fn="复制商品" type="text" @click="copy(scope.scope)">复制</GLButton> <GLButton fn="复制商品" type="text" @click="copy(scope.scope)">复制</GLButton>
...@@ -52,24 +18,16 @@ ...@@ -52,24 +18,16 @@
</div> </div>
</GLTable> </GLTable>
</div> </div>
<!-- <GLTable v-if="flag" ref="table" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchForm" :tableParams="tableParams" :getListApi="tableParams.getListApi" :pageConf="pageConf">
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<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>
</span>
</GLTable> -->
</div> </div>
<!-- 推广弹窗 --> <GLDialog mode="mid" title="商品短链" :visible.sync="isVisible" :before-close="handleClose" :close-on-click-modal="false">
<el-dialog title="商品短链" :visible.sync="isVisible" :before-close="handleClose" :close-on-click-modal="false" width="576px" class="addCardsDialog">
<div class="con-wrap flex_cc"> <div class="con-wrap flex_cc">
<div class="link flex_cc">{{ shortLink }}</div> <div class="link flex_cc">{{ shortLink }}</div>
</div> </div>
<div slot="footer" class="flex_cc"> <div slot="footer">
<el-button size="mini" @click="handleClose">取消</el-button> <el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="copyLink" size="mini">复制</el-button> <el-button type="primary" @click="copyLink">复制</el-button>
</div> </div>
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
...@@ -190,8 +148,8 @@ export default { ...@@ -190,8 +148,8 @@ export default {
getListApi: this.$apis.orderApi.getGoodsList, getListApi: this.$apis.orderApi.getGoodsList,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
// mutiSelectName: 'goodsIndex', mutiSelectName: 'goodsIndex',
// mutiSelectUniqueKey: 'id', mutiSelectUniqueKey: 'id',
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
...@@ -210,7 +168,6 @@ export default { ...@@ -210,7 +168,6 @@ export default {
{ {
label: '会员价(元)', label: '会员价(元)',
width: 150, width: 150,
align:'right',
prop: 'salesPrice' prop: 'salesPrice'
}, },
{ {
...@@ -218,7 +175,7 @@ export default { ...@@ -218,7 +175,7 @@ export default {
sortable: true, sortable: true,
label: '销量', label: '销量',
width: 150 width: 110
// renderHeader: h => { // renderHeader: h => {
// return h('div', { class: 'table-header' }, [ // return h('div', { class: 'table-header' }, [
// h('span', '销量'), // h('span', '销量'),
...@@ -230,7 +187,7 @@ export default { ...@@ -230,7 +187,7 @@ export default {
}, },
{ {
label: '库存', label: '库存',
width: 200, width: 150,
sortable: true, sortable: true,
formatter: cell => { formatter: cell => {
return cell.stock == -1 ? '无限制' : cell.stock return cell.stock == -1 ? '无限制' : cell.stock
...@@ -296,7 +253,7 @@ export default { ...@@ -296,7 +253,7 @@ export default {
let para = { let para = {
path: row.appearance == 2 ? CHARGE_PATH : MINI_PATH, path: row.appearance == 2 ? CHARGE_PATH : MINI_PATH,
query, query,
appId: ENV.channel == 2 ? 'wxfe82b8d65d07808f' : 'wxe10067a63c1856ac', appId: ENV.environment == 'beta' ? 'wx9f91c1ec493eb425' : ENV.channel == 2 ? 'wxfe82b8d65d07808f' : 'wxe10067a63c1856ac',
envVersion: ENV.envVersion envVersion: ENV.envVersion
} }
this.$apis.orderApi.createShortLink(para).then(res => { this.$apis.orderApi.createShortLink(para).then(res => {
...@@ -319,7 +276,6 @@ export default { ...@@ -319,7 +276,6 @@ export default {
// if (window.$config.axios.environment) { // if (window.$config.axios.environment) {
// target = ['权益卡管理平台', '运营平台', 'SCRM权益平台', '商品管理', '*商品详情'] // target = ['权益卡管理平台', '运营平台', 'SCRM权益平台', '商品管理', '*商品详情']
// } // }
console.log(copy, 'copy')
let query = {} let query = {}
if (id) query.id = id if (id) query.id = id
if (status == 0) { if (status == 0) {
...@@ -330,7 +286,6 @@ export default { ...@@ -330,7 +286,6 @@ export default {
query.edit = true query.edit = true
query.$title = encodeURI('编辑商品') query.$title = encodeURI('编辑商品')
} }
console.log(query.edit, 'edit')
this.$router.push({ path: '/goods/addGoods', query }) this.$router.push({ path: '/goods/addGoods', query })
}, },
copy({ id }) { copy({ id }) {
...@@ -377,6 +332,9 @@ export default { ...@@ -377,6 +332,9 @@ export default {
handleSearch() { handleSearch() {
this.flag = false this.flag = false
this.$refs.table.refreshTable() this.$refs.table.refreshTable()
this.$nextTick(() => {
this.flag = true
})
}, },
// ['待上架', '上架', '下架'] // // ['待上架', '上架', '下架'] //
batchOperation(status) { batchOperation(status) {
...@@ -407,7 +365,7 @@ export default { ...@@ -407,7 +365,7 @@ export default {
this.$confirm(content[status], '提示', { this.$confirm(content[status], '提示', {
confirmButtonText: '是', confirmButtonText: '是',
cancelButtonText: '否', cancelButtonText: '否',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
let target = 'deleteGoods' let target = 'deleteGoods'
...@@ -454,11 +412,4 @@ export default { ...@@ -454,11 +412,4 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
/deep/ .contain .el-input--small .el-input__inner {
width: 215px;
}
.row-btns {
margin-top: 5px;
margin-bottom: 10px;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</GLTable> </GLTable>
</div> </div>
</div> </div>
<div class="tableTitle">商品权益</div> <div class="tableTitle noneOperation">商品权益</div>
<div class="equity-wrap secondBox"> <div class="equity-wrap secondBox">
<div class="equity-wrap contain"> <div class="equity-wrap contain">
<div class="tagsCtn"> <div class="tagsCtn">
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<span style="margin-left: 8px; margin-top: 18px">添加分类</span> <span style="margin-left: 8px; margin-top: 18px">添加分类</span>
</el-button> </el-button>
</div> </div>
<GLButton fn = '添加门店权益' type="primary" size="small" @click="addEquity(2)" style="margin-top: 20px"> <GLButton fn="添加门店权益" type="primary" size="small" @click="addEquity(2)" style="margin-top: 16px">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<span style="margin-left: 8px">添加门店权益</span> <span style="margin-left: 8px">添加门店权益</span>
</GLButton> </GLButton>
...@@ -55,10 +55,11 @@ ...@@ -55,10 +55,11 @@
<img class="equity-icon" :src="scope.scope.equityIcon" /> <img class="equity-icon" :src="scope.scope.equityIcon" />
</div> </div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="商品权益编辑" type="text" @click="editEquity(scope.scope, 2)">编辑</GLButton> <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> <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="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> <el-button type="text" @click="deletEquity(scope.scope.id)" :disabled="scope.scope.status == 0 ? false : true">删除</el-button> -->
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -83,7 +84,62 @@ export default { ...@@ -83,7 +84,62 @@ export default {
showDialog: false, showDialog: false,
isEdit: false, isEdit: false,
dialogType: 1, dialogType: 1,
editData: {} editData: {},
buttonList: [
{
type: 'GLButton',
name: row => {
return '编辑'
},
attrs: {
type: 'text',
fn: '商品权益编辑'
},
listeners: {
click: row => this.editEquity(row.scope, 2)
}
},
{
type: 'GLButton',
name: row => {
return row.scope.status == 0 ? '上架' : '下架'
},
attrs: {
type: 'text',
fn: '商品权益上/下架'
},
listeners: {
click: row => this.updateShelves(row.scope, 'goods')
}
},
{
type: 'el-button',
name: row => {
return '置顶'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.setTop(row.scope.id, 'goods')
}
},
{
type: 'el-button',
name: row => {
return '删除'
},
attrs: {
type: 'text',
disabled:row => {
return row.scope.status == 0 ? false : true
},
},
listeners: {
click: row => this.deletEquity(row.scope.id)
}
}
]
} }
}, },
mounted() { mounted() {
...@@ -165,10 +221,7 @@ export default { ...@@ -165,10 +221,7 @@ export default {
} }
if (status == 0) { if (status == 0) {
this.$confirm('是否下架权益', '提示', { this.$confirm('是否下架权益', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning', type: 'warning',
center: true
}).then(() => { }).then(() => {
callBack() callBack()
}) })
...@@ -256,16 +309,17 @@ export default { ...@@ -256,16 +309,17 @@ export default {
width: 40px; width: 40px;
} }
.noneOperation { .noneOperation {
margin-top: 20px; margin-top: 16px;
} }
.fixedHeight { .fixedHeight {
height: 45px; height: 45px;
} }
.secondBox { .secondBox {
margin-top: 20px; margin-top: 16px;
} }
.tableTitle { .tableTitle {
margin: 20px 40px; /* margin: 20px 40px; */
margin-bottom: 16px;
} }
.el-table__fixed-right-patch { .el-table__fixed-right-patch {
position: absolute; position: absolute;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="layout"> <div class="layout">
<div class="box topBox"> <div class="box topBox">
<!-- <back /> --> <!-- <back /> -->
<el-button type="primary" class="backBtn" size="small" @click="$router.push('/order/index')">返回</el-button> <!-- <el-button type="primary" class="backBtn" size="small" @click="$router.push('/order/index')">返回</el-button> -->
<div class="grid"> <div class="grid">
<div class="grid-item">订单编号:{{ detailInfo.orderCode }}</div> <div class="grid-item">订单编号:{{ detailInfo.orderCode }}</div>
<div class="grid-item">下单时间: {{ detailInfo.time }}</div> <div class="grid-item">下单时间: {{ detailInfo.time }}</div>
...@@ -266,8 +266,6 @@ export default { ...@@ -266,8 +266,6 @@ export default {
} }
.layout { .layout {
background-color: #fff; background-color: #fff;
margin: 0 20px 0 40px;
width: auto;
.topBox { .topBox {
padding-top: 32px !important; padding-top: 32px !important;
} }
......
<template> <template>
<div class="equity-wrap"> <div class="equity-wrap">
<div class="equity-wrap contain"> <div class="equity-wrap contain">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right"> <GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<el-row style="display: flex; align-items: center"> <div class="tableTopButton">
<el-form-item size="small" label="订单编号">
<el-input size="small" v-model="searchForm.orderCode" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item size="small" label="品牌名称">
<el-select size="small" v-model="searchForm.brandName" filterable placeholder="请选择">
<el-option v-for="item in brandList" :key="item.brandId" :label="item.brandName" :value="item.brandName"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="商品名称">
<el-input v-model="searchForm.productName" placeholder="请输入" size="small"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item size="small" label="门店名称">
<el-input v-model="searchForm.merchantName" placeholder="请输入" size="small"></el-input>
</el-form-item>
<el-form-item size="small" label="用户信息">
<el-input v-model="searchForm.userInfo" placeholder="请输入" size="small"></el-input>
</el-form-item>
<el-form-item size="small" label="下单时间">
<el-date-picker size="small" v-model="searchForm.daterange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOptions || {}"></el-date-picker>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button size="small" @click="handleReset">重置</el-button>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button> <el-button :size="size" type="primary" @click="handleExport">导出</el-button>
</el-form-item> </div>
</el-row>
</el-form>
<div class="choseRow"> <div class="choseRow">
<div class="choseItem" :class="{ active: currentIndex == index }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index)"> <div class="choseItem" :class="{ active: currentIndex == index }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index)">
{{ item }} {{ item }}
</div> </div>
</div> </div>
<!-- :noDataImg="url" -->
<GLTable v-if="flag" :noDataImg="url" ref="table" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="tableParams.getListApi" :hasNum="false" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <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"> <span slot="goodsMsg" slot-scope="scope">
<div>{{ scope.scope.brandName }}</div> <div>{{ scope.scope.brandName }}</div>
...@@ -63,8 +35,7 @@ ...@@ -63,8 +35,7 @@
</div> </div>
</div> </div>
</template> </template>
<script type="text/ecmascript-6">
<script type='text/ecmascript-6'>
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { orderMixin, searchMixin } from '@/mixins' import { orderMixin, searchMixin } from '@/mixins'
export default { export default {
...@@ -84,7 +55,61 @@ export default { ...@@ -84,7 +55,61 @@ export default {
tabIndex: '', tabIndex: '',
flag: true, flag: true,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
searchForm: {}, searchForm: {
orderCode: '',
brandName: '',
productName: '',
merchantName: '',
userInfo: '',
daterange: ''
},
searchFormData: [
{
label: '订单编号',
name: 'orderCode',
type: 'input',
isClear: true
},
{
label: '品牌名称',
name: 'brandName',
type: 'select',
optionList: [],
optionId: 'brandName',
optionLabel: 'brandName',
isClear: true
},
{
label: '商品名称',
name: 'productName',
type: 'input',
isClear: true
},
{
label: '门店名称',
name: 'merchantName',
type: 'input',
isClear: true
},
{
label: '用户信息',
name: 'userInfo',
type: 'input',
isClear: true
},
{
label: '下单时间',
name: 'daterange',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
}
],
searchFormTable: {}, searchFormTable: {},
tableParams: { tableParams: {
listName: 'list', listName: 'list',
...@@ -93,14 +118,13 @@ export default { ...@@ -93,14 +118,13 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '商品信息', label: '商品信息',
width: '100', width: '200',
align: 'left',
addHtml: 'goodsMsg' addHtml: 'goodsMsg'
}, },
{ {
label: '充值账号', label: '充值账号',
prop: 'rechargeNumber', prop: 'rechargeNumber',
width: '200', width: '200'
}, },
{ {
label: '订单门店', label: '订单门店',
...@@ -113,7 +137,7 @@ export default { ...@@ -113,7 +137,7 @@ export default {
{ {
label: '价格/数量', label: '价格/数量',
addHtml: 'priceAmount', addHtml: 'priceAmount',
width: '100' width: '150'
// formatter(cell) { // formatter(cell) {
// return `${cell.salePrices}元 // return `${cell.salePrices}元
// ${cell.goodsQuality}张` // ${cell.goodsQuality}张`
...@@ -121,12 +145,13 @@ export default { ...@@ -121,12 +145,13 @@ export default {
}, },
{ {
label: '实收金额', label: '实收金额',
prop: 'orderPrices' prop: 'orderPrices',
// width: '100' width: '110',
align:'right'
}, },
{ {
label: '订单状态', label: '订单状态',
// width: '100', width: '110',
formatter: cell => { formatter: cell => {
return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus] return cell.appearance == 1 ? this.statusEnum[cell.orderStatus] : this.qb_statusEnum[cell.orderStatus]
} }
...@@ -134,7 +159,7 @@ export default { ...@@ -134,7 +159,7 @@ export default {
{ {
label: '下单时间', label: '下单时间',
prop: 'validitDate', prop: 'validitDate',
width: '100', width: '180',
// sortable: true, // sortable: true,
formatter(cell) { formatter(cell) {
return cell.orderDate ? new Date(cell.orderDate).format('yyyy-MM-dd hh:mm:ss') : '- -' return cell.orderDate ? new Date(cell.orderDate).format('yyyy-MM-dd hh:mm:ss') : '- -'
...@@ -156,13 +181,19 @@ export default { ...@@ -156,13 +181,19 @@ export default {
}, },
{ {
label: '海威订单号', label: '海威订单号',
minWidth: '100', minWidth: '220',
prop: 'thirdOrderCode' prop: 'thirdOrderCode'
} }
] ]
} }
} }
}, },
created() {
this.$apis.orderApi.getAllBrandList({}).then(({ data }) => {
const item = this.searchFormData.find(item => item.name === 'brandName')
item.optionList = data
})
},
mounted() {}, mounted() {},
methods: { methods: {
handleExport() { handleExport() {
...@@ -279,11 +310,8 @@ export default { ...@@ -279,11 +310,8 @@ export default {
} }
// <style src="@a/css/tao.css"></style> // <style src="@a/css/tao.css"></style>
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.equity-wrap .contain { .equity-wrap .contain {
margin-top: 20px;
.choseRow { .choseRow {
display: flex; display: flex;
height: 34px; height: 34px;
...@@ -294,7 +322,6 @@ export default { ...@@ -294,7 +322,6 @@ export default {
line-height: 34px; line-height: 34px;
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
} }
...@@ -304,23 +331,22 @@ export default { ...@@ -304,23 +331,22 @@ export default {
} }
} }
} }
.el-form-item { // .el-form-item {
margin-bottom: 15px; // margin-bottom: 15px;
} // }
.el-range-editor.is-active, // .el-range-editor.is-active,
.el-range-editor.is-active:hover { // .el-range-editor.is-active:hover {
border-color: #5850ff; // border-color: #5850ff;
width: 215px; // width: 215px;
} // }
.el-range-editor--small.el-input__inner { // .el-range-editor--small.el-input__inner {
width: 215px; // width: 215px;
} // }
/deep/ .contain .el-input--small .el-input__inner { // /deep/ .contain .el-input--small .el-input__inner {
width: 215px; // width: 215px;
} // }
// .el-tabs__nav-wrap:after { // .el-tabs__nav-wrap:after {
// display: none; // display: none;
// } // }
// .container { // .container {
// width: 1160px; // width: 1160px;
......
<template> <template>
<div> <div>
<!-- 领卡用户明细 --> <!-- 领卡用户明细 -->
<el-dialog :close-on-click-modal="false" title="领卡用户明细" :visible.sync="isVisible" width="1080px" class="user-detail-dialog" @close="handleReset()"> <GLDialog mode='big' :close-on-click-modal="false" bigTitle="领卡用户明细" :visible.sync="isVisible" @close="handleReset()">
<div class="contain equity-wrap" style="margin: 20px 0px 20px 0px !important"> <div class="contain equity-wrap" style="margin: 20px 0px 20px 0px !important">
<glsx-combi-form ref="showSearch" labelWidth="120px" defaultWidth="215px" :formObj="batchListSearch" :formData="userDetailForm"> <glsx-combi-form ref="showSearch" labelWidth="120px" defaultWidth="215px" :formObj="batchListSearch" :formData="userDetailForm">
<span slot="footer" class="footer-btns"> <span slot="footer" class="footer-btns">
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</GLTable> </GLTable>
</div> </div>
</div> </div>
</el-dialog> </GLDialog>
</div> </div>
</template> </template>
......
<!-- -->
<template> <template>
<div style="margin-top: 30px" class="card-manage"> <div class="card-manage">
<div class="button"> <div class="button">
<el-button type="primary" @click="addCard('true')" size="small" style="width: 128px"> <el-button type="primary" @click="addCard('true')" size="small" style="width: 128px">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<span style="margin-left: 8px">新建权益卡</span> <span style="margin-left: 8px">新建权益卡</span>
</el-button> </el-button>
</div> </div>
<div class="tableBox" style="margin-top: 20px;"> <div class="tableBox" style="margin-top: 16px">
<div class="topline"> <div class="topline"></div>
<!-- <div class="selectStore">搜索门店</div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="selectStore('select')" @handleRest="selectStore('reset')"></GLCombiForm>
<el-select size="small" v-model="searchForm.merchantName" filterable remote reserve-keyword placeholder="请输入门店名称" :remote-method="remoteMethod" :loading="loading" clearable style="margin-left: 10px">
<el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option>
</el-select> -->
<el-form :inline="true" style="width: 100%; margin-left: 10px;" :model="searchForm" label-width="108px" label-position="right">
<el-row style="display: flex; align-items: center">
<el-form-item size="small" label="搜索门店">
<el-select size="small" v-model="searchForm.merchantName" remote reserve-keyword filterable placeholder="请输入门店名称" :remote-method="remoteMethod" :loading="loading" clearable >
<el-option v-for="(item, index) in options" :key="index" :label="item.merchantName" :value="item.merchantName"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="权益卡名称">
<el-input size="small" v-model="searchForm.cardClassName" placeholder="请输入权益卡名称"></el-input>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button plain size="small" class="selectBtn" @click="selectStore('reset')">重置</el-button>
<el-button type="primary" size="small" style="margin-left: 20px" class="selectBtn" @click="selectStore('select')">搜索</el-button>
</el-form-item>
</el-row>
</el-form>
<!-- <div class="operationBtn">
<el-button plain size="small" class="selectBtn" @click="selectStore('reset')">重置</el-button>
<el-button type="primary" size="small" style="margin-left: 20px" class="selectBtn" @click="selectStore('select')">搜索</el-button>
</div> -->
</div>
<div class="tableCtn"> <div class="tableCtn">
<GLTable ref="recordTable" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun"> <GLTable ref="recordTable" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun">
<div slot="recipientCount" slot-scope="scope"> <div slot="recipientCount" slot-scope="scope">
<p class="cursor-pointer" style="color:#5850ff" @click="handleDetail(scope.scope)">{{ scope.scope.recipientCount }}</p> <p class="cursor-pointer" style="color: #5850ff" @click="handleDetail(scope.scope)">{{ scope.scope.recipientCount }}</p>
</div> </div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn ='权益卡管理编辑' type="text" @click="edit(scope.scope)" class="tableBtn" size="small">编辑</GLButton> <!-- <GLButton fn="权益卡管理编辑" type="text" @click="edit(scope.scope)" class="tableBtn" size="small">编辑</GLButton>
<el-button type="text" :disabled="scope.scope.tryAble == 0 ? true : false" @click="extension(scope.scope)" class="tableBtn" size="small">推广</el-button> <el-button type="text" :disabled="scope.scope.tryAble == 0 ? true : false" @click="extension(scope.scope)" class="tableBtn" size="small">推广</el-button>
<el-button type="text" @click="copy(scope.scope)" class="tableBtn" size="small">复制</el-button> <el-button type="text" @click="copy(scope.scope)" class="tableBtn" size="small">复制</el-button> -->
<GLTableButton :buttonList="recordButtonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span> </span>
</GLTable> </GLTable>
</div> </div>
</div> </div>
<!-- 推广弹窗 --> <!-- 推广弹窗 -->
<el-dialog title="试用推广" :visible.sync="isVisible" :before-close="handleClose" :close-on-click-modal="false" width="547px" class="addCardsDialog"> <GLDialog mode="mid" title="试用推广" :visible.sync="isVisible" :before-close="handleClose" :close-on-click-modal="false">
<!-- <div class="baseinformation"><span class="titleText">试用推广</span></div> -->
<el-form :model="editForm" :rules="rules" ref="ruleForm" label-width="68px"> <el-form :model="editForm" :rules="rules" ref="ruleForm" label-width="68px">
<div class="form"> <div class="form">
<div class="main-qrcode"> <div class="main-qrcode">
...@@ -65,13 +40,12 @@ ...@@ -65,13 +40,12 @@
</div> </div>
</el-form> </el-form>
<div slot="footer"> <div slot="footer">
<el-button size="small" @click="handleClose">取消</el-button> <el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleConfirm" size="small">确定</el-button> <el-button type="primary" @click="handleConfirm">确定</el-button>
</div> </div>
</el-dialog> </GLDialog>
<!-- 新建权益卡弹窗 --> <!-- 新建权益卡弹窗 -->
<el-dialog title="基本信息" v-if="dialogVisible" :visible.sync="dialogVisible" width="958px" :before-close="closeDialog" class="addCardsDialog"> <GLDialog mode="big" bigTitle="基本信息" v-if="dialogVisible" :visible.sync="dialogVisible" :before-close="closeDialog">
<!-- <div class="baseinformation"><span class="titleText">基本信息</span></div> -->
<el-form class="dialogForm" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="auto" label-position="left"> <el-form class="dialogForm" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="auto" label-position="left">
<!-- 基础表单 --> <!-- 基础表单 -->
<div class="form"> <div class="form">
...@@ -94,9 +68,9 @@ ...@@ -94,9 +68,9 @@
<el-radio-group v-model="ruleForm.effectiveType"> <el-radio-group v-model="ruleForm.effectiveType">
<el-radio label="1" @change="e => controlSwitch(e, 'disable')">永久有效</el-radio> <el-radio label="1" @change="e => controlSwitch(e, 'disable')">永久有效</el-radio>
<el-radio label="2" @change="e => controlSwitch(e, 'input')"> <el-radio label="2" @change="e => controlSwitch(e, 'input')">
<span style="margin-right:10px">领取时起</span> <span style="margin-right: 10px">领取时起</span>
<el-input-number v-model="effectiveNum" controls-position="right" :min="1" :max="999" id="month" :disabled="ruleForm.effectiveType !== '2'" size="mini" change=""></el-input-number> <el-input-number v-model="effectiveNum" controls-position="right" :min="1" :max="999" id="month" :disabled="ruleForm.effectiveType !== '2'" size="mini" change=""></el-input-number>
<span style="margin-left:10px">天内有效</span> <span style="margin-left: 10px">天内有效</span>
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
...@@ -123,22 +97,15 @@ ...@@ -123,22 +97,15 @@
<span class="codeTxt2">设置后将生成试用链接和二维码可用于推广</span> <span class="codeTxt2">设置后将生成试用链接和二维码可用于推广</span>
</el-form-item> </el-form-item>
</div> </div>
<!-- <div class="buttonCtn">
<el-form-item>
<el-button :disabled="submitBtn" type="primary" @click="submitForm('ruleForm')" size="small">提交</el-button>
<el-button size="small" @click="resetForm('ruleForm')">取消</el-button>
</el-form-item>
</div> -->
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="resetForm('ruleForm')">取消</el-button> <el-button @click="resetForm('ruleForm')">取消</el-button>
<el-button :disabled="submitBtn" type="primary" @click="submitForm('ruleForm')" size="small">提交</el-button> <el-button :disabled="submitBtn" type="primary" @click="submitForm('ruleForm')" >提交</el-button>
</span> </span>
</el-dialog> </GLDialog>
<detail-dialog ref="detailDetailRef"></detail-dialog> <detail-dialog ref="detailDetailRef"></detail-dialog>
</div> </div>
</template> </template>
<script> <script>
const cloneText = message => { const cloneText = message => {
let input = document.createElement('input') let input = document.createElement('input')
...@@ -209,12 +176,54 @@ export default { ...@@ -209,12 +176,54 @@ export default {
url: '', url: '',
qrCode: '' qrCode: ''
}, },
recordButtonList: [
{
type: 'GLButton',
name: row => {
return '编辑'
},
attrs: {
type: 'text',
fn: '权益卡管理编辑'
},
listeners: {
click: row => this.edit(row.scope)
}
},
{
type: 'el-button',
name: row => {
return '推广'
},
attrs: {
type: 'text',
disabled: (row, condition) => {
return false
}
},
listeners: {
click: row => this.extension(row.scope)
}
},
{
type: 'el-button',
name: row => {
return '复制'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.copy(row.scope)
}
}
],
product: [ product: [
{ {
id: 'firstImg', id: 'firstImg',
imgSrc: require('./images/card0.png'), imgSrc: require('./images/card0.png'),
src: './images/card0.png' src: './images/card0.png'
}, }
], ],
rules: { rules: {
cardClassName: [ cardClassName: [
...@@ -234,8 +243,22 @@ export default { ...@@ -234,8 +243,22 @@ export default {
// getListApi: none, // getListApi: none,
searchForm: { searchForm: {
merchantName: '', merchantName: '',
cardClassName:'' cardClassName: ''
},
searchFormData: [
{
label: '搜索门店',
name: 'merchantName',
type: 'input',
isClear: true
}, },
{
label: '权益卡名称',
name: 'cardClassName',
type: 'input',
isClear: true
}
],
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
...@@ -272,6 +295,7 @@ export default { ...@@ -272,6 +295,7 @@ export default {
{ {
label: '售价', label: '售价',
prop: 'price', prop: 'price',
align:'right',
formatter: cellValue => { formatter: cellValue => {
if (cellValue.price == null) { if (cellValue.price == null) {
return '39.9' + '元' return '39.9' + '元'
...@@ -297,7 +321,7 @@ export default { ...@@ -297,7 +321,7 @@ export default {
{ {
label: '创建时间', label: '创建时间',
prop: 'createDate', prop: 'createDate',
// minWidth: '200' width: '180',
formatter: cellValue => { formatter: cellValue => {
return this.date_format(cellValue.createDate) return this.date_format(cellValue.createDate)
} }
...@@ -330,8 +354,8 @@ export default { ...@@ -330,8 +354,8 @@ export default {
} }
}, },
methods: { methods: {
handleDetail(row){ handleDetail(row) {
this.$refs.detailDetailRef.show(row); this.$refs.detailDetailRef.show(row)
// this.getcardRecordList() // this.getcardRecordList()
}, },
setTableFinishFun() { setTableFinishFun() {
...@@ -382,7 +406,6 @@ export default { ...@@ -382,7 +406,6 @@ export default {
// a.href = url; // a.href = url;
// // window.open(url) // 将图片的src赋值给a节点的href // // window.open(url) // 将图片的src赋值给a节点的href
// a.dispatchEvent(event) // a.dispatchEvent(event)
// }, // },
// downloadImg(){ // downloadImg(){
// html2canvas(document.getElementById("qrCode")).then(canvas => { // html2canvas(document.getElementById("qrCode")).then(canvas => {
...@@ -454,7 +477,6 @@ export default { ...@@ -454,7 +477,6 @@ export default {
} else { } else {
;(this.value = false), (this.tryNum = 30) ;(this.value = false), (this.tryNum = 30)
} }
// 禁用门店框 // 禁用门店框
this.disableSelect = true this.disableSelect = true
}, },
...@@ -471,7 +493,7 @@ export default { ...@@ -471,7 +493,7 @@ export default {
if (row.tryAble == 1) { if (row.tryAble == 1) {
;(this.value = true), (this.tryNum = row.tryNum) ;(this.value = true), (this.tryNum = row.tryNum)
} else { } else {
;(this.value = false), (this.tryNum =30) ;(this.value = false), (this.tryNum = 30)
} }
}, },
addCard(cd) { addCard(cd) {
...@@ -604,18 +626,13 @@ export default { ...@@ -604,18 +626,13 @@ export default {
</script> </script>
<style src="@a/css/tao.css/"></style> <style src="@a/css/tao.css/"></style>
<style lang="scss"> <style lang="scss">
* { .card-manage .el-table__empty-text {
padding: 0;
margin: 0;
border: 0;
}
.card-manage .el-table__empty-text{
display: inline-block; display: inline-block;
width: 64px; width: 64px;
height: 41px; height: 41px;
} }
.tableCtn { .tableCtn {
margin-top: 20px; margin-top: 16px;
margin-right: 20px; margin-right: 20px;
} }
.baseinformation { .baseinformation {
...@@ -632,7 +649,6 @@ export default { ...@@ -632,7 +649,6 @@ export default {
margin-left: 20px; margin-left: 20px;
line-height: 28px; line-height: 28px;
} }
.explain { .explain {
color: #d3d3d3; color: #d3d3d3;
} }
...@@ -724,7 +740,6 @@ export default { ...@@ -724,7 +740,6 @@ export default {
color: #4c4c4c; color: #4c4c4c;
line-height: 20px; line-height: 20px;
} }
.form { .form {
padding: 32px 20px 32px 48px; padding: 32px 20px 32px 48px;
} }
...@@ -762,4 +777,3 @@ export default { ...@@ -762,4 +777,3 @@ export default {
margin-right: 20px; margin-right: 20px;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
\ No newline at end of file \ No newline at end of file
...@@ -11,7 +11,7 @@ const cdn = { ...@@ -11,7 +11,7 @@ const cdn = {
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`] js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`]
} }
module.exports = { module.exports = {
outputDir: `dist`, outputDir: `../dist/${packageName}`,
publicPath, publicPath,
assetsDir: 'static', assetsDir: 'static',
// np:'/newsso-equity/', // np:'/newsso-equity/',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!