Commit 2797b811 by zhangmeng

修改bug

parent a4ad4f7c
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/integral-mall/static/css/app.c2e813e6ae86c7080f885907588f7340.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/integral-mall/static/js/manifest.003beacb9c9ae622c7f2.js></script><script type=text/javascript src=/integral-mall/static/js/vendor.567b5be279b1403c5cc7.js></script><script type=text/javascript src=/integral-mall/static/js/app.82a5a41a76952ec58a87.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/css/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link href=/integral-mall/static/css/app.c2e813e6ae86c7080f885907588f7340.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/integral-mall/static/js/manifest.003beacb9c9ae622c7f2.js></script><script type=text/javascript src=/integral-mall/static/js/vendor.567b5be279b1403c5cc7.js></script><script type=text/javascript src=/integral-mall/static/js/app.a20331e9a41a0dff9f5d.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<span>{{model[theType]}}{{typeName}}</span> <i class="el-icon-edit cursor-hover"></i> <span>{{model[theType]}}{{typeName}}</span> <i class="el-icon-edit cursor-hover"></i>
</div> </div>
<div v-else > <div v-else >
<el-input-number class="w150" controls-position="right" :precision="0" v-model="model.inputValue" :min="0"></el-input-number> <el-input-number class="w150" controls-position="right" :precision="precision" v-model="model.inputValue" :min="0" ></el-input-number>
<div class="pt10"> <div class="pt10">
<el-button size="mini" type="primary" @click="submit">确 定</el-button> <el-button size="mini" type="primary" @click="submit">确 定</el-button>
<el-button size="mini" @click="model[theType+'Flag'] = false">取 消</el-button> <el-button size="mini" @click="model[theType+'Flag'] = false">取 消</el-button>
...@@ -26,7 +26,11 @@ export default { ...@@ -26,7 +26,11 @@ export default {
} }
}, },
theType: String, theType: String,
typeName: String typeName: String,
precision:{
type:Number,
default:0
}
}, },
watch: { watch: {
}, },
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</el-table-column> </el-table-column>
<el-table-column label="现金费用" align="left" prop="cashCost" width="180"> <el-table-column label="现金费用" align="left" prop="cashCost" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<updateCount :model="scope.row" theType="cashCost" typeName="元" @refresh="getPageCardsList"></updateCount> <updateCount :model="scope.row" theType="cashCost" :precision="2" typeName="元" @refresh="getPageCardsList"></updateCount>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库存" align="left" prop="virtualStock" width="180"> <el-table-column label="库存" align="left" prop="virtualStock" width="180">
...@@ -35,17 +35,14 @@ ...@@ -35,17 +35,14 @@
<span @click="$router.push('/coupon/exchange/'+scope.row.integralMallProId)" class="blue">{{scope.row.allExchangeNumber}}</span> <span @click="$router.push('/coupon/exchange/'+scope.row.integralMallProId)" class="blue">{{scope.row.allExchangeNumber}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="left" prop="status" width="80px"> <el-table-column label="状态" align="left" prop="status" width="120px">
<template slot-scope="scope" > <template slot-scope="scope" >
<span v-if="scope.row.status == 0" class="dm-status--error">删除</span> <span v-html="renderStatus(scope.row)"></span>
<span v-if="scope.row.status == 1" class="dm-status--primary">正常</span>
<span v-if="scope.row.status == 2" class="dm-status--warning">上架</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="显示状态" align="left" prop="proShowStatus" width="120"> <el-table-column label="显示状态" align="center" prop="proShowStatus" width="120">
<template slot-scope="scope" > <template slot-scope="scope" >
<span v-if="scope.row.proShowStatus == 1">上架状态就显示</span> <i class="iconfont icon-erjicaidan-jiesuanguanli" :class="scope.row.proShowStatus == 1 ?'warning-color':'gray'"></i>
<span v-if="scope.row.proShowStatus == 2">兑换状态下显示</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="left" width="140px"> <el-table-column label="操作" align="left" width="140px">
...@@ -74,7 +71,7 @@ export default { ...@@ -74,7 +71,7 @@ export default {
defaultAvatar:require('../../../assets/img/head_default.png'), defaultAvatar:require('../../../assets/img/head_default.png'),
daijinAvatar:require('../../../assets/img/credit_daijin_icon.png'), daijinAvatar:require('../../../assets/img/credit_daijin_icon.png'),
zhekouAvatar:require('../../../assets/img/credit_zhekou_icon.png'), zhekouAvatar:require('../../../assets/img/credit_zhekou_icon.png'),
duihuanAvatar:require('../../../assets/img/head_default.png'), duihuanAvatar:require('../../../assets/img/credit_duihuan_icon.png'),
loading:false, loading:false,
tableList:[], tableList:[],
listParams:{ listParams:{
...@@ -92,6 +89,73 @@ export default { ...@@ -92,6 +89,73 @@ export default {
filterAvatar(val){ filterAvatar(val){
return (val === 0 ? this.daijinAvatar : (val === 1 ? this.zhekouAvatar: this.duihuanAvatar)); return (val === 0 ? this.daijinAvatar : (val === 1 ? this.zhekouAvatar: this.duihuanAvatar));
}, },
renderStatus(item) {
var _releaseType = item.releaseType ;
//上架日期
var _limit_time_begin = item.limitTimeBegin ;
//库存
var _virtual_stock = item.virtualStock ;
//兑换日期类型1:全部 2:固定日期 3:每月 4:每周
// 显示状态的优先级:已过期>无库存>定时发布>未在兑换时间
var _exchange_date_type = item.exchangeDateType ;
var dhzt_show = '正常' ;
//判断是否在兑换日期内 - 未在兑换时间
if(_exchange_date_type==2) {
if(!(new Date().getTime() >= item.exchangeFixDateBegin && new Date().getTime() <= (item.exchangeFixDateEnd + (1000*60*60*24) ))) {
dhzt_show = "未在兑换时间" ;
}
}
if(_exchange_date_type==3) {
dhzt_show = "未在兑换时间" ;
var _exchange_date_day = item.exchangeDateDay ;
var day = new Date().getDate() ;
var _arr = _exchange_date_day.split(",") ;
_arr.map(v => {
if(day == parseInt(v)) {
dhzt_show = "正常" ;
}
})
}
if(_exchange_date_type==4) {
var _exchange_date_week = item.exchangeDateWeek ;
var week = new Date().getDay() ;
if(week == 0) {
week =7 ;
}
if(_exchange_date_week.indexOf(week) == -1) {
dhzt_show = "未在兑换时间" ;
}
}
if(item.exchangeTimeType == 2 && item.exchangeTimeList && dhzt_show == '正常') {
dhzt_show = "未在兑换时间" ;
for(var k=0;k<item.exchangeTimeList.length;k++) {
var _o = item.exchangeTimeList[k] ;
var start = _o.exchangeTimeBeginNumber ;
var end = _o.exchangeTimeEndNumber ;
var _now = Date.now() ;
if(_now >= start && _now <= end) {
dhzt_show = "正常" ;
break ;
}
}
}
//定时发布
if(_releaseType == 2 && item.status==2 && new Date().getTime() < _limit_time_begin) {
dhzt_show = "定时发布<br/>" + formateDateTimeByType(new Date(_limit_time_begin),"yyyy-MM-dd hh:mm") ;
}
if(_virtual_stock<=0) {
dhzt_show = "无库存" ;
}
if(item.status==1) {
dhzt_show = "已下架" ;
}
return dhzt_show;
},
search() { search() {
this.listParams.currentPage = 1; this.listParams.currentPage = 1;
this.getPageCardsList(); this.getPageCardsList();
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</el-table-column> </el-table-column>
<el-table-column label="现金费用" align="left" prop="cashCost" width="180"> <el-table-column label="现金费用" align="left" prop="cashCost" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<updateCount :model="scope.row" theType="cashCost" typeName="元" @refresh="getPageGiftList"></updateCount> <updateCount :model="scope.row" :precision="2" theType="cashCost" typeName="元" @refresh="getPageGiftList"></updateCount>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库存" align="left" prop="sortCost" width="180" sortable="custom"> <el-table-column label="库存" align="left" prop="sortCost" width="180" sortable="custom">
...@@ -73,10 +73,9 @@ ...@@ -73,10 +73,9 @@
<span>{{statusFilter(scope.row.status)}}</span> <span>{{statusFilter(scope.row.status)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="显示状态" align="left" prop="proShowStatus" width="120"> <el-table-column label="显示状态" align="center" prop="proShowStatus" width="120">
<template slot-scope="scope" > <template slot-scope="scope" >
<span v-if="scope.row.proShowStatus == 1">上架状态就显示</span> <i class="iconfont icon-erjicaidan-jiesuanguanli" :class="scope.row.proShowStatus == 1 ?'warning-color':'gray'"></i>
<span v-if="scope.row.proShowStatus == 2">兑换状态下显示</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="left" width="140px" fixed="right"> <el-table-column label="操作" align="left" width="140px" fixed="right">
...@@ -122,7 +121,7 @@ export default { ...@@ -122,7 +121,7 @@ export default {
}, },
total:0, total:0,
categoryOptions:[], categoryOptions:[],
releaseTypeOptions:[{label:'所有兑换状态',value:-1},{label:'不可兑换',value:0},{label:'兑换',value:1},{label:'已发货',value:3},{label:'待付款',value:11}], releaseTypeOptions:[{label:'所有兑换状态',value:-1},{label:'兑换',value:1},{label:'不可兑换',value:0}],
changeTypeOptions:[{label:'所有兑换方式',value:-1},{label:'微信兑换',value:1},{label:'快递发货',value:2},{label:'在线发货',value:3}], changeTypeOptions:[{label:'所有兑换方式',value:-1},{label:'微信兑换',value:1},{label:'快递发货',value:2},{label:'在线发货',value:3}],
showStatusOptions:[{label:'所有显示状态',value:-1},{label:'显示',value:1},{label:'不显示',value:2}], showStatusOptions:[{label:'所有显示状态',value:-1},{label:'显示',value:1},{label:'不显示',value:2}],
} }
...@@ -187,11 +186,15 @@ export default { ...@@ -187,11 +186,15 @@ export default {
setHotStatusService({status:Number(row.proHot),integralMallProId:row.integralMallProId}).then(res => { setHotStatusService({status:Number(row.proHot),integralMallProId:row.integralMallProId}).then(res => {
if (res.errorCode === 0) { if (res.errorCode === 0) {
this.$tips({type: 'success',message: '设置成功!'}); this.$tips({type: 'success',message: '设置成功!'});
this.getPageGiftList(); } else if (res.errorCode === 1){
this.$tips({type: 'warning',message: '热门推荐礼品上限为20个,当前已超限制,请先取消其他礼品的推荐再来试试'});
} else { } else {
this.$tips({type: 'error',message: '设置失败!'}); this.$tips({type: 'error',message: '删除失败!'});
} }
this.getPageGiftList();
}).catch(err => { }).catch(err => {
this.getPageGiftList();
console.log(err)
this.$tips({type: 'error',message: '删除失败!'}); this.$tips({type: 'error',message: '删除失败!'});
}) })
}, },
......
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
</p> </p>
<p> <p>
<el-button type="text" v-if="scope.row.status === 1" @click="cancelOrder(scope.row)">取消订单</el-button> <el-button type="text" v-if="scope.row.status === 1" @click="cancelOrder(scope.row)">取消订单</el-button>
<el-button type="text" v-if="scope.row.status === 3" @click="queryExpress(scope.row)">查看物流</el-button> <el-button type="text" v-if="scope.row.status === 3" @click="queryExpress(scope.row,true)">查看物流</el-button>
<el-button type="text" v-if="scope.row.status === 0">查看详情</el-button> <el-button type="text" v-if="scope.row.status === 0" @click="queryExpress(scope.row,false)">查看详情</el-button>
</p> </p>
</template> </template>
</el-table-column> </el-table-column>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment