Commit fc44ac6e by zhangmeng

积分商城bug

parent f04ea474
<!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.666b41302a48f2391024def3e10cee17.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.d6b6ad5554f214c2a1f7.js></script></body></html>
\ No newline at end of file
<!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.6554034df9a9582066d44fa1471ffddc.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.a4629049cbe245fbe935.js></script><script type=text/javascript src=/integral-mall/static/js/app.f00cf930270a45e8a2d3.js></script></body></html>
\ 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.
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.
......@@ -2,10 +2,11 @@
<div class="dm-avatar">
<label class="dm-avatar__upload " :class="{'is-disabled':disabled}" :style="`width:${width}px;height:${height}px;`" v-loading="loading">
<input type="file" style="display:none;" :disabled="disabled" accept="image/gif, image/jpeg,image/png" ref="uploader" v-upload='this'>
<img v-show="model.imgUrl && showImg" :src="model.imgUrl || ''" :class="className" class="dm-avatar__img"/>
<img v-show="model.imgUrl && showImg" :src="model.imgUrl || ''" :class="className" class="dm-avatar__img" @mouseleave="imgShowFlag = false" @mouseover="showImage(model.imgUrl)"/>
<i class="el-icon-plus dm-avatar__icon" v-show="!model.imgUrl" :style="'line-height:'+height+'px;'"></i>
</label>
<div class="dm-avatar__tips" :style="tipsStyle"> {{tips}}</div>
<vue-gic-img-preview :imgUrl="model.imgUrl" :imgShowFlag="imgShowFlag" @hideImage="hideImage"></vue-gic-img-preview>
</div>
</template>
......@@ -63,7 +64,9 @@ export default {
data() {
return {
loading:false,
disabled:false
disabled:false,
imgShowFlag: false, // 是否弹框显示,true: 显示;false: 不显示
imgUrl: '', // 传递的图片 src
}
},
watch:{
......@@ -75,6 +78,18 @@ export default {
deep:true
}
},
methods:{
showImage(src) {
if(!src || src == ''){
return false;
}
this.imgShowFlag = true;
this.imgUrl = src;
},
hideImage(val) {
this.imgShowFlag = val
}
}
}
</script>
......
......@@ -5,32 +5,25 @@ import store from './store'
import {axios} from './service/api/index'
import directives from './directives'
import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
import vueGicHeader from '@gic-test/vue-gic-header'
import vueGicFooter from '@gic-test/vue-gic-footer'
import vueGicAsideMenu from '@/components/aside-menu'
import vueGicImgPreview from '@gic-test/vue-gic-img-preview'
import vueGicStoreLinkage from '@gic-test/vue-gic-store-linkage/src/lib'
import install from 'packele'
import preview from 'vue-photo-preview/src/lib/index.js'
import 'vue-photo-preview/dist/skin.css'
import dmConfirm from './components/dm-confirm'
import vueGicAsideMenu from '@/components/aside-menu'
//删除组件 这个组件常用,放到这不用在组件里引入
Vue.component(dmConfirm.name,dmConfirm)
Vue.config.productionTip = false
Vue.use(preview)
Vue.use(install)
Vue.use(ElementUI)
Vue.use(vueGicHeader)
Vue.use(vueGicFooter)
Vue.use(vueGicAsideMenu)
Vue.use(vueGicStoreLinkage)
Vue.use(vueGicImgPreview)
Vue.prototype.axios = axios;
Vue.prototype.axios.withCredentials = true
Object.keys(directives).map(item => Vue.directive(item, directives[item]));
......
......@@ -2,6 +2,10 @@ import { requests } from './index';
import config from '@/config';
const PREFIX = 'api-integral-mall/';
// 卡券列表
export const getCardList = (params) => requests(PREFIX + 'list-card', params);
// 首页优惠券
export const getPageCardsList = (params) => requests(PREFIX + 'page-cards', params);
......
......@@ -3,7 +3,7 @@
<div :class="pbSize">
<span class="pr10">选择卡券(共{{total}}条)</span>
<el-input v-model="listParams.searchParam" class="w200" clearable placeholder="请输入卡券名称" @change="getCardList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<span class="fz12 gray pl20">{{limitTips}} </span>
<span class="fz12 gray pl20">领取限制 < 100的卡券不支持选择,系统已自动过滤</span>
</div>
<el-table tooltipEffect="light" :data="tableList" :height="tableHeight" style="width: 100%" v-loading="loading" @row-click="chooseCard">
<el-table-column :show-overflow-tooltip="false" width="60" align="center" prop="coupCardId">
......@@ -14,22 +14,17 @@
</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="200" align="left" prop="cardName" label="卡券名称"></el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="100" align="left" prop="cardLimit" label="领取限制"></el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="120" align="left" prop="storeMode" label="适用门店">
<template slot-scope="scope">
{{scope.row.storeMode === 0?'所有门店':(scope.row.storeMode === 1?'部分分组':'部分门店')}}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="120" align="left" prop="couponStock" label="库存"></el-table-column>
<el-table-column :show-overflow-tooltip="true" :min-width="200" align="left" prop="subName" label="描述"></el-table-column>
<el-table-column :show-overflow-tooltip="false" align="left" prop="cardName" label="卡券名称"></el-table-column>
<el-table-column :show-overflow-tooltip="true" align="left" prop="subName" label="备注名"></el-table-column>
<el-table-column :show-overflow-tooltip="false" align="left" prop="cardLimit" label="兑换限制"></el-table-column>
<el-table-column :show-overflow-tooltip="false" align="left" prop="couponStock" label="库存"></el-table-column>
</el-table>
<el-pagination v-show="tableList.length && showPagination" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="listParams.pageSize" layout="total, prev, pager, next" :total="total"></el-pagination>
</section>
</template>
<script>
import {getCardList} from '@/service/api/commonApi.js';
import {getCardList} from '@/service/api/mallApi.js';
export default {
props:{
activeId:{
......@@ -52,31 +47,16 @@ export default {
type:Boolean,
default:true
},
cardLimitType:{
type:Number,
default:1
}
},
computed:{
limitTips() {
if (this.cardLimitType === 2) {
return '领取限制领取 1~100的卡券,系统已过滤。';
} else if (this.cardLimitType === 3) {
return '领取限制领取>=100 的卡券,系统已过滤。';
} else {
return '领取限制>1的卡券不支持选择,系统已过滤。';
}
}
},
data(){
return{
listParams:{
searchParam:'',
currentPage:1,
pageSize:10,
pageSize:20,
requestProject:'gic-web',
cardLimitType:this.cardLimitType,
cardType:''
coupCardId:this.activeId,
cardType:2
},
total:0,
tableList:[],
......@@ -125,8 +105,8 @@ export default {
async getCardList() {
this.loading = true;
let res = await getCardList(this.listParams);
this.tableList = res.result.result || [];
this.total = res.result.totalCount;
this.tableList = res.result.rows || [];
this.total = res.result.total;
this.loading = false;
},
reset() {
......
......@@ -206,7 +206,7 @@ export default {
getCardActiveObjFun(val) {
this.form.weChatVirtualStock = val.couponStock || 0;
this.form.proReferId = val.coupCardId || '';
console.log(val)
this.form.costValue = val.costValue;
},
// 新增兑换时段-部分时段
addTimeRange() {
......
......@@ -22,7 +22,7 @@
<el-input-number controls-position="right" :disabled="isInfo" v-model="form.cashCost" class="w300" :precision="2" :step="0.1" :min="0"></el-input-number>
</el-form-item>
<el-form-item prop="costValue" label="礼品成本">
<el-input-number controls-position="right" :disabled="isInfo" v-model="form.costValue" class="w300" :precision="2" :step="0.1" :min="form.cashCost"></el-input-number>
<el-input-number controls-position="right" :disabled="isInfo" v-model="form.costValue" class="w300" :precision="2" :step="0.1" :min="0"></el-input-number>
</el-form-item>
<el-form-item prop="limitTimes" label="次数显示">
<el-checkbox :disabled="isInfo" v-model="isLimitTimes"> 每个会员限制兑换
......
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