Commit cecc4643 by 张权

feat:同步最新代码,添加365天

1 parent 5448a405
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<el-button size="small" type="primary" @click="handleSearch">查询</el-button> <el-button size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button type="primary" size="small" @click="handleExport" class="selectBtn">导出</el-button> <el-button type="primary" size="small" @click="handleExport" class="selectBtn">导出</el-button>
</div> </div>
<GLTable ref="userDetailTable" :hasNum="false" @hook:mounted="setTabelHeight" :searchForm="batchListSearch" :tableParams="batchTableParams" :getListApi="getListApi" :pageConf="batchPageConf" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :beforeSearchFn="beforeSearchFn"> <GLTable ref="userDetailTable" :hasNum="false" @hook:mounted="setTabelHeight" :searchForm="searchForm" :tableParams="batchTableParams" :getListApi="getListApi" :pageConf="batchPageConf" :noDataImg="url" :beforeSearchFn="beforeSearchFn">
<div slot="status" slot-scope="scope"> <div slot="status" slot-scope="scope">
<p :style="{color:scope.scope.status==1 ? '#2CCA74': '#CCC'}">{{ setStatusVal(scope.scope.status) }}</p> <p :style="{color:scope.scope.status==1 ? '#2CCA74': '#CCC'}">{{ setStatusVal(scope.scope.status) }}</p>
</div> </div>
...@@ -26,20 +26,6 @@ ...@@ -26,20 +26,6 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
function date_format(date, e) {
date = new Date(date)
var YY = date.getFullYear() + '/'
var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '/'
var DD = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':'
var ss = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
if (e == 'detail') {
return YY + MM + DD
} else {
return YY + MM + DD + ' ' + hh + mm + ss
}
}
const activeTypeList = [ const activeTypeList = [
{ {
confId: '', confId: '',
...@@ -95,7 +81,16 @@ export default { ...@@ -95,7 +81,16 @@ export default {
tableData:[], tableData:[],
isVisible:false, isVisible:false,
getListApi:this.$apis.equityApi.getcardRecordList, getListApi:this.$apis.equityApi.getcardRecordList,
// getListApi: this.$apis.equityApi.getEquityCardList, // editRuleUser:{
// mobile:[
// {
// validator: (rule, value, callback) => {
// let phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/;
// return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的手机号'))
// }, trigger: 'change'
// }
// ]
// },
batchListSearch:{ batchListSearch:{
mobile:'', //手机号 mobile:'', //手机号
merchantName:'', //开通门店 merchantName:'', //开通门店
...@@ -104,6 +99,7 @@ export default { ...@@ -104,6 +99,7 @@ export default {
activeTime: [], // 开通日期 activeTime: [], // 开通日期
memberType:'' memberType:''
}, },
searchForm:{},
baseData:{ baseData:{
activeTypeList: [ activeTypeList: [
{ {
...@@ -262,7 +258,15 @@ export default { ...@@ -262,7 +258,15 @@ export default {
{ {
label: '开通日期', label: '开通日期',
prop: 'activeTime', prop: 'activeTime',
width: 200 width: 200,
formatter: cellValue => {
if(cellValue.activeTime){
const dateArr = cellValue.activeTime.split(' ')
return cellValue.activeTime.split(' ')[0]
}else{
return '-'
}
}
} }
] ]
}, },
...@@ -274,54 +278,40 @@ export default { ...@@ -274,54 +278,40 @@ export default {
methods: { methods: {
show(row){ show(row){
this.isVisible = !this.isVisible this.isVisible = !this.isVisible
this.$nextTick(()=>{
this.cardClassId = row.id this.cardClassId = row.id
this.$refs.userDetailTable.refreshTable() this.$nextTick(()=>{
this.$refs.userDetailTable.refreshTable()
}) })
}, },
setStatusVal(status){ setStatusVal(status){
return {1: '生效中', 2: '已失效'}[status] return {1: '生效中', 2: '已失效'}[status]
}, },
setTableFinishFun() {
//接收到的数据为空
this.afterSearchresetDate()
},
afterSearchresetDate(){
if(this.batchListSearch.startTime && this.batchListSearch.endTime){
const {startTime, endTime } = this.batchListSearch
let activeTime = [startTime.split(" ")[0], endTime.split(" ")[0]]
this.$set(this.batchListSearch, 'activeTime', activeTime)
}
this.$set(this.batchListSearch, 'mobile', this.batchListSearch.userInfo)
delete this.batchListSearch.endTime
delete this.batchListSearch.startTime
delete this.batchListSearch.userInfo
console.log( this.batchListSearch)
},
setTabelHeight() { setTabelHeight() {
this.$refs.userDetailTable.tableHeightValues = '328' this.$refs.userDetailTable.tableHeightValues = '328'
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.setParams() this.searchForm = {...this.setParams()}
console.log(this.searchForm,this.batchListSearch,'参数')
resolve() resolve()
}) })
}, },
setParams(){ setParams(){
if(Array.isArray(this.batchListSearch.activeTime) && this.batchListSearch.activeTime.length>0){ let params = JSON.parse(JSON.stringify(this.batchListSearch))
this.batchListSearch.startTime = this.batchListSearch.activeTime[0] + ' 00:00:00' if(Array.isArray(params.activeTime) && params.activeTime.length>0){
this.batchListSearch.endTime = this.batchListSearch.activeTime[1] + ' 23:59:59' params.startTime = params.activeTime[0] + ' 00:00:00'
params.endTime = params.activeTime[1] + ' 23:59:59'
} }
this.batchListSearch.cardClassId = this.cardClassId params.cardClassId = this.cardClassId
this.batchListSearch.userInfo = this.batchListSearch.mobile params.userInfo = params.mobile
delete this.batchListSearch.activeTime delete params.activeTime
delete this.batchListSearch.mobile delete params.mobile
console.log(params)
return params;
}, },
handleExport(){ handleExport(){
this.setParams() const parmas = {...this.setParams()}
this.$apis.orderApi.exportBalanceList(this.batchListSearch).then(({ code, data, message }) => { this.$apis.orderApi.exportBalanceList(parmas).then(({ code, data, message }) => {
this.afterSearchresetDate()
if (code == 0) { if (code == 0) {
var a = document.createElement('a') var a = document.createElement('a')
a.setAttribute('id', 'exportToExport') a.setAttribute('id', 'exportToExport')
...@@ -337,9 +327,6 @@ export default { ...@@ -337,9 +327,6 @@ export default {
handleSearch(){ handleSearch(){
this.$refs.userDetailTable.refreshTable() this.$refs.userDetailTable.refreshTable()
}, },
CLOSE(){
console.log(11111)
},
handleReset(){ handleReset(){
this.batchListSearch = { this.batchListSearch = {
mobile:'', mobile:'',
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
<el-switch v-model="value" active-color="" inactive-color="#d3d3d3"></el-switch> <el-switch v-model="value" active-color="" inactive-color="#d3d3d3"></el-switch>
</el-form-item> </el-form-item>
<el-form-item label="试用时长:" :prop="value == false ? '' : 'tryNum'" v-show="value"> <el-form-item label="试用时长:" :prop="value == false ? '' : 'tryNum'" v-show="value">
<el-input-number v-model="tryNum" controls-position="right" size="mini" :disabled="!hasTryNum" :min="1" :max="100"></el-input-number> <el-input-number v-model="tryNum" controls-position="right" size="mini" :disabled="!hasTryNum" :min="1" :max="365"></el-input-number>
天试用 天试用
<span class="codeTxt2">设置后将生成试用链接和二维码可用于推广</span> <span class="codeTxt2">设置后将生成试用链接和二维码可用于推广</span>
</el-form-item> </el-form-item>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!