Commit f5fbe36b by 胡悦
2 parents f307dad5 3ff1f6c0
<!-- 编辑代金券 --> <!-- 编辑代金券 -->
<template> <template>
<div class="edit-share marketing"> <div class="edit-share marketing p-t-20">
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">{{ title }}代金券</p> <p class="edit-title">{{ title }}代金券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
...@@ -68,6 +68,47 @@ ...@@ -68,6 +68,47 @@
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="view pull-left">
<img src="@/images/wechat_top.png">
<div class='view-box'>
<div class='coupon-img'>
<img src="@/images/wechatCoupon.png">
<div class="conpon-left">
<div>
<b style="font-weight: normal;font-size:20px">{{editForm.denomination}}</b><span>元</span>
<p>{{editForm.useBarriers==1?'无限制':'满'+ editForm.full + '可用'}}</p>
</div>
</div>
<div class="conpon-right">
<div class="coupon_name text-ellipsis">{{editForm.couponName}}</div>
<div class="text-ellipsis" v-if='editForm.effectiveType == 1'>有效期:领取后{{editForm.effectiveDays||0}}天</div>
<div class="text-ellipsis" v-if='editForm.effectiveType == 2'>有效期:{{couponTime}}</div>
</div>
</div>
<div class="mt3">
<div style="border-bottom: 1px solid #EEEEEE;">
<div style='padding:0 0 12px 0;'>使用说明</div>
<div style="margin-top: 8px;padding: 0;color: #999999;font-size: 12px;word-wrap:break-word;" v-for="(item,index) in remarksView" :key="index">{{item}}</div>
</div>
<div>
<div style='padding:0 0 12px 0;'>适用门店</div>
<div class="user" style='margin-top: -8px;'>
<img src="@/images/test.png" style="margin-left: -20px;" />
</div>
<div style='margin-top: 8px;padding: 0;color: #999999;font-size: 12px;word-wrap:break-word;'></div>
<div style='margin-top: 8px;padding: 0;color: #999999;font-size: 12px;word-wrap:break-word;'>营业时间:</div>
<div style='margin-top: 8px;padding: 0;color: #999999;font-size: 12px;word-wrap:break-word;'>联系电话:</div>
</div>
</div>
</div>
<div class="view-btn">
<div>
<img src="@/images/wechat_home.png">
<div>首页</div>
</div>
<div>立即领取</div>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button> <el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button> <el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button>
...@@ -113,6 +154,8 @@ export default { ...@@ -113,6 +154,8 @@ export default {
}, },
apear: '', apear: '',
minPirce: '', minPirce: '',
couponTime: '',
remarksView: [],
//存在零售价低于代金券的商品 //存在零售价低于代金券的商品
priceFlag: false, priceFlag: false,
// 商品-多选 // 商品-多选
...@@ -267,25 +310,28 @@ export default { ...@@ -267,25 +310,28 @@ export default {
}, },
'editForm.stock'(newValue, oldValue){ 'editForm.stock'(newValue, oldValue){
this.editForm.stock = limitPrice(newValue, oldValue, 6, 0, 1) this.editForm.stock = limitPrice(newValue, oldValue, 6, 0, 1)
},
'editForm.effectiveTime'(newValue, oldValue){
if(newValue && newValue.length > 0){
this.couponTime = this.setDateString(newValue[0], true) + ' - ' + this.setDateString(newValue[1], true)
}else{
this.couponTime = ''
}
},
'editForm.useDescription'(newValue, oldValue){
if(newValue){
this.remarksView = newValue.split('\n')
}
} }
// $scope.couponTime = ''
// $scope.$watch('effectiveTime', function(n, o) {
// if (n) {
// $scope.couponTime = setDateString(n.startDate, true) + '-' + setDateString(n.endDate, true)
// console.log($scope.couponTime)
// }
// })
// $scope.remarksView = []
// $scope.$watch('remarks', function(n, o) {
// console.log(n, o)
// if (n) {
// $scope.remarksView = n.split('\n')
// }
// })
}, },
methods: { methods: {
setDateString(objField, special) {
var value = (typeof objField == 'string') ? objField.split(" ")[0] : special ? objField.format('YYYY年MM月DD日') : objField.format('YYYY年MM月DD日')
return value
},
getAllGoods(goodsName){ getAllGoods(goodsName){
var params = { var params = {
currentPage: 1, currentPage: 1,
...@@ -512,4 +558,183 @@ export default { ...@@ -512,4 +558,183 @@ export default {
} }
} }
</script> </script>
<style scoped></style> <style scoped>
.view {
width: 375px;
height: 600px;
/* margin: 30px 45px 0 60px; */
background: #F6F6F6;
position: relative;
position: absolute;
top: 110px;
left: 50%;
}
.coupon-img {
position: relative;
}
.conpon-left {
position: absolute;
width: 90px;
height: 80px;
top: 0;
left: 0;
z-index: 2;
}
.conpon-left>div {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #fff;
font-size: 30px;
width: 100%;
text-align: center;
}
.conpon-left>div span {
font-size: 12px;
}
.conpon-left>div p {
font-size: 10px;
margin: 0;
}
.conpon-right {
position: absolute;
background: #fff;
z-index: 2;
width: calc(100% - 90px);
height: 80px;
box-sizing: border-box;
padding: 8px 11px 0;
top: 0;
left: 90px;
font-size: 12px;
color: #999999;
}
.coupon_name {
color: #333;
font-size: 14px;
margin-bottom: 10px;
}
.view img {
width: 100%;
vertical-align: top;
}
.view-btn {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 50px;
text-align: center;
background: #fff;
font-size: 10px;
color: #999999;
}
.view-btn>div:first-of-type {
float: left;
width: 100px;
height: 100%;
box-sizing: border-box;
padding-top: 7px;
}
.view-btn>div:last-of-type {
float: left;
width: calc(100% - 100px);
line-height: 50px;
height: 100%;
background: #FF6600;
color: #fff;
font-size: 16px;
}
.view-btn img {
width: 22px;
height: 20px;
}
.view-box {
margin: 14px 20px 0;
}
.view-box .mt3 {
background: #FFFFFF;
border-radius: 4px;
}
.view-box .mt3 div {
padding: 20px;
font-size: 14px;
color: #333;
}
.couponName {
padding: 10px 0 0 125px;
}
.couponName span {
margin-right: 10px;
cursor: pointer;
}
.couponName span:hover {
color: #00a479;
}
.form-item-input {
height: 30px;
width: 180px;
box-sizing: border-box;
border: 1px solid #cccccc;
border-radius: 2px;
box-sizing: border-box;
padding: 0 10px;
outline: none;
}
.couponTypeList {
float: left;
height: 30px;
line-height: 30px;
border-radius: 2px;
padding: 0 14px;
box-sizing: border-box;
border: 1px solid #ccc;
margin-right: 10px;
cursor: pointer;
}
.couponTypeList:hover,
.couponTypeList.active {
color: #fff;
background-color: #00a479;
border-color: #00a479;
}
.user {
font-size: 14px;
color: #666;
height: 18px;
line-height: 18px;
}
.user img {
width: 18px;
height: 18px;
border-radius: 100%;
overflow: hidden;
vertical-align: middle;
margin-right: 6px;
}
</style>
<!-- 编辑代金券 --> <!-- 编辑代金券 -->
<template> <template>
<div class="edit-share marketing"> <div class="edit-share marketing p-t-20">
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">{{ title }}折扣卷</p> <p class="edit-title">{{ title }}折扣劵</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'"> <el-radio v-model="editForm.effectiveType" label="2" :disabled="apear!='couponAdd'">
...@@ -29,6 +29,24 @@ ...@@ -29,6 +29,24 @@
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="left_show">
<div class="card-panel-top">
<div class="card-h-title">折扣券</div>
<!-- <div class="card-extime" v-if="editForm.effectiveType == 3">有效期:无限制</div> -->
<div class="card-extime" v-if="editForm.effectiveType == 1">有效期:{{editForm.effectiveDays}}天</div>
<!-- <div class="card-extime" ng-show="effectiveType == 2 && model.effectiveStartTime">有效期:{{model.effectiveTime}}</div> -->
<!-- <div class="card-extime" ng-show="effective == 2 && effectiveTime">有效期:{{effectiveTime.startDate.format('YYYY-MM-DD')}}-{{effectiveTime.endDate.format('YYYY-MM-DD')}}</div> -->
<div class="card-extime" v-if="editForm.effectiveType == 2">有效期:{{couponTime}}</div>
<div class="card-name">{{editForm.couponName}}</div>
<!-- <div class="card-day" v-if="editForm.useType == 0">使用限制:无限定次数</div>
<div class="card-day" v-if="editForm.useType == 1">使用限制:{{editForm.usageTimes}}次</div>
<div class="card-day" v-if="editForm.useType == 2">使用限制:每{{editForm.useLimitDays}}天可以使用{{editForm.usageTimes2}}次</div> -->
</div>
<div class="card-panel-bottom">
<div class="card-remark">使用说明:</div>
<div class="card-remark">{{editForm.useDescription}}</div>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button> <el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button> <el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button>
...@@ -67,6 +85,7 @@ export default { ...@@ -67,6 +85,7 @@ export default {
}, },
apear: '', apear: '',
isDisabled: true, isDisabled: true,
couponTime: '',
editForm: { editForm: {
couponName: '', couponName: '',
effectiveType: '2', effectiveType: '2',
...@@ -140,10 +159,22 @@ export default { ...@@ -140,10 +159,22 @@ export default {
}, },
'editForm.stock'(newValue, oldValue){ 'editForm.stock'(newValue, oldValue){
this.editForm.stock = limitPrice(newValue, oldValue, 6, 0, 1) this.editForm.stock = limitPrice(newValue, oldValue, 6, 0, 1)
} },
'editForm.effectiveTime'(newValue, oldValue){
if(newValue && newValue.length > 0){
this.couponTime = this.setDateString(newValue[0], true) + ' - ' + this.setDateString(newValue[1], true)
}else{
this.couponTime = ''
}
},
}, },
methods: { methods: {
setDateString(objField, special) {
var value = (typeof objField == 'string') ? objField.split(" ")[0] : special ? objField.format('YYYY年MM月DD日') : objField.format('YYYY年MM月DD日')
return value
},
getInfo() { getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => { this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
console.log(res); console.log(res);
...@@ -242,4 +273,55 @@ export default { ...@@ -242,4 +273,55 @@ export default {
} }
} }
</script> </script>
<style scoped></style> <style scoped>
.left_show {
width: 400px;
/*min-height: 600px;*/
background: #fff;
/*border: 1px solid #eee;*/
position:relative;
display:flex;
flex-direction: column;
position: absolute;
top: 110px;
left: 50%;
}
.left_show .card-panel-top {
/* margin-top: 200px; */
width: 365px;
height: 122px;
background-color: rgba(245, 154, 35, 0.7);
border: none;
text-align: center;
line-height: 24px;
position: relative;
}
.card-h-title {
position: absolute;
font-weight: 500;
font-size: 20px;
top: 20px;
transform: rotate(-45deg);
}
.card-panel-bottom {
width: 353px;
min-height: 90px;
background-color: rgba(250, 205, 145, 1);
padding: 6px;
}
.card-extime {
margin-top: 10px;
}
.card-name {
margin: 16px 0px;
font-size: 16px;
}
.card-day {
margin-top: 10px;
}
.card-remark {
word-break: break-word;
}
</style>
<!-- 编辑代金券 --> <!-- 编辑代金券 -->
<template> <template>
<div class="edit-share marketing"> <div class="edit-share marketing p-t-20">
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">{{ title }}兑换券</p> <p class="edit-title">{{ title }}兑换券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
...@@ -29,6 +29,24 @@ ...@@ -29,6 +29,24 @@
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="left_show">
<div class="card-panel-top">
<div class="card-h-title">兑换券</div>
<!-- <div class="card-extime" v-if="editForm.effectiveType == 3">有效期:无限制</div> -->
<div class="card-extime" v-if="editForm.effectiveType == 1">有效期:{{editForm.effectiveDays}}天</div>
<!-- <div class="card-extime" ng-show="effectiveType == 2 && model.effectiveStartTime">有效期:{{model.effectiveTime}}</div> -->
<!-- <div class="card-extime" ng-show="effective == 2 && effectiveTime">有效期:{{effectiveTime.startDate.format('YYYY-MM-DD')}}-{{effectiveTime.endDate.format('YYYY-MM-DD')}}</div> -->
<div class="card-extime" v-if="editForm.effectiveType == 2">有效期:{{couponTime}}</div>
<div class="card-name">{{editForm.couponName}}</div>
<!-- <div class="card-day" v-if="editForm.useType == 0">使用限制:无限定次数</div>
<div class="card-day" v-if="editForm.useType == 1">使用限制:{{editForm.usageTimes}}次</div>
<div class="card-day" v-if="editForm.useType == 2">使用限制:每{{editForm.useLimitDays}}天可以使用{{editForm.usageTimes2}}次</div> -->
</div>
<div class="card-panel-bottom">
<div class="card-remark">使用说明:</div>
<div class="card-remark">{{editForm.useDescription}}</div>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button> <el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button> <el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button>
...@@ -67,6 +85,7 @@ export default { ...@@ -67,6 +85,7 @@ export default {
}, },
apear: '', apear: '',
isDisabled: true, isDisabled: true,
couponTime: '',
editForm: { editForm: {
couponName: '', couponName: '',
effectiveType: '2', effectiveType: '2',
...@@ -140,10 +159,22 @@ export default { ...@@ -140,10 +159,22 @@ export default {
}, },
'editForm.stock'(newValue, oldValue){ 'editForm.stock'(newValue, oldValue){
this.editForm.stock = limitPrice(newValue, oldValue, 6, 0, 1) this.editForm.stock = limitPrice(newValue, oldValue, 6, 0, 1)
} },
'editForm.effectiveTime'(newValue, oldValue){
if(newValue && newValue.length > 0){
this.couponTime = this.setDateString(newValue[0], true) + ' - ' + this.setDateString(newValue[1], true)
}else{
this.couponTime = ''
}
},
}, },
methods: { methods: {
setDateString(objField, special) {
var value = (typeof objField == 'string') ? objField.split(" ")[0] : special ? objField.format('YYYY年MM月DD日') : objField.format('YYYY年MM月DD日')
return value
},
getInfo() { getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => { this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
console.log(res); console.log(res);
...@@ -242,4 +273,55 @@ export default { ...@@ -242,4 +273,55 @@ export default {
} }
} }
</script> </script>
<style scoped></style> <style scoped>
.left_show {
width: 400px;
/*min-height: 600px;*/
background: #fff;
/*border: 1px solid #eee;*/
position:relative;
display:flex;
flex-direction: column;
position: absolute;
top: 110px;
left: 50%;
}
.left_show .card-panel-top {
/* margin-top: 200px; */
width: 365px;
height: 122px;
background-color: rgba(245, 154, 35, 0.7);
border: none;
text-align: center;
line-height: 24px;
position: relative;
}
.card-h-title {
position: absolute;
font-weight: 500;
font-size: 20px;
top: 20px;
transform: rotate(-45deg);
}
.card-panel-bottom {
width: 353px;
min-height: 90px;
background-color: rgba(250, 205, 145, 1);
padding: 6px;
}
.card-extime {
margin-top: 10px;
}
.card-name {
margin: 16px 0px;
font-size: 16px;
}
.card-day {
margin-top: 10px;
}
.card-remark {
word-break: break-word;
}
</style>
<!-- 编辑代金券 --> <!-- 编辑代金券 -->
<template> <template>
<div class="edit-share marketing"> <div class="edit-share marketing p-t-20">
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">{{ title }}会员服务</p> <p class="edit-title">{{ title }}会员服务</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
...@@ -49,6 +49,24 @@ ...@@ -49,6 +49,24 @@
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<div class="left_show">
<div class="card-panel-top">
<div class="card-h-title">会员券</div>
<div class="card-extime" v-if="editForm.effectiveType == 3">有效期:无限制</div>
<div class="card-extime" v-if="editForm.effectiveType == 1">有效期:{{editForm.effectiveDays}}天</div>
<!-- <div class="card-extime" ng-show="effectiveType == 2 && model.effectiveStartTime">有效期:{{model.effectiveTime}}</div> -->
<!-- <div class="card-extime" ng-show="effective == 2 && effectiveTime">有效期:{{effectiveTime.startDate.format('YYYY-MM-DD')}}-{{effectiveTime.endDate.format('YYYY-MM-DD')}}</div> -->
<div class="card-extime" v-if="editForm.effectiveType == 2">有效期:{{couponTime}}</div>
<div class="card-name">{{editForm.couponName}}</div>
<div class="card-day" v-if="editForm.useType == 0">使用限制:无限定次数</div>
<div class="card-day" v-if="editForm.useType == 1">使用限制:{{editForm.usageTimes}}次</div>
<div class="card-day" v-if="editForm.useType == 2">使用限制:每{{editForm.useLimitDays}}天可以使用{{editForm.usageTimes2}}次</div>
</div>
<div class="card-panel-bottom">
<div class="card-remark">使用说明:</div>
<div class="card-remark">{{editForm.useDescription}}</div>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button> <el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
<el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button> <el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button>
...@@ -87,6 +105,7 @@ export default { ...@@ -87,6 +105,7 @@ export default {
}, },
apear: '', apear: '',
isDisabled: true, isDisabled: true,
couponTime: '',
editForm: { editForm: {
couponName: '', couponName: '',
effectiveType: '3', effectiveType: '3',
...@@ -202,10 +221,22 @@ export default { ...@@ -202,10 +221,22 @@ export default {
}, },
'editForm.stock'(newValue, oldValue){ 'editForm.stock'(newValue, oldValue){
this.editForm.stock = limitPrice(newValue, oldValue, 6, 0, 1) this.editForm.stock = limitPrice(newValue, oldValue, 6, 0, 1)
} },
'editForm.effectiveTime'(newValue, oldValue){
if(newValue && newValue.length > 0){
this.couponTime = this.setDateString(newValue[0], true) + ' - ' + this.setDateString(newValue[1], true)
}else{
this.couponTime = ''
}
},
}, },
methods: { methods: {
setDateString(objField, special) {
var value = (typeof objField == 'string') ? objField.split(" ")[0] : special ? objField.format('YYYY年MM月DD日') : objField.format('YYYY年MM月DD日')
return value
},
getInfo() { getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => { this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
console.log(res); console.log(res);
...@@ -332,4 +363,55 @@ export default { ...@@ -332,4 +363,55 @@ export default {
} }
} }
</script> </script>
<style scoped></style> <style scoped>
.left_show {
width: 400px;
/*min-height: 600px;*/
background: #fff;
/*border: 1px solid #eee;*/
position:relative;
display:flex;
flex-direction: column;
position: absolute;
top: 110px;
left: 50%;
}
.left_show .card-panel-top {
/* margin-top: 200px; */
width: 365px;
height: 122px;
background-color: rgba(245, 154, 35, 0.7);
border: none;
text-align: center;
line-height: 24px;
position: relative;
}
.card-h-title {
position: absolute;
font-weight: 500;
font-size: 20px;
top: 20px;
transform: rotate(-45deg);
}
.card-panel-bottom {
width: 353px;
min-height: 90px;
background-color: rgba(250, 205, 145, 1);
padding: 6px;
}
.card-extime {
margin-top: 10px;
}
.card-name {
margin: 16px 0px;
font-size: 16px;
}
.card-day {
margin-top: 10px;
}
.card-remark {
word-break: break-word;
}
</style>
<!-- 商品管理-门店 --> <!-- 商品管理-门店 -->
<template> <template>
<div class="marketing pro-group"> <div class="marketing pro-group p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="addCashCoupon()">新建代金券</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="addCashCoupon()">新建代金券</el-button>
<el-button :size="size" type="primary" class="el-icon-plus" @click="addService()">新建会员服务</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="addService()">新建会员服务</el-button>
<el-button :size="size" type="primary" class="el-icon-plus" @click="addDiscountCoupon()">新建折扣卷</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="addDiscountCoupon()">新建折扣劵</el-button>
<el-button :size="size" type="primary" class="el-icon-plus" @click="addExchangeCoupon()">新建兑换券</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="addExchangeCoupon()">新建兑换券</el-button>
</div> </div>
<div class="container"> <div class="container">
...@@ -289,7 +289,6 @@ export default { ...@@ -289,7 +289,6 @@ export default {
}else if(row.discountType == '4'){//兑换券 }else if(row.discountType == '4'){//兑换券
goto = '/couponManage/editExchangeCoupon/' goto = '/couponManage/editExchangeCoupon/'
} }
console.log(goto + addOrEdit + '/' + row.id);
this.$router.push(goto + addOrEdit + '/' + row.id) this.$router.push(goto + addOrEdit + '/' + row.id)
}, },
......
<!-- 商品管理-门店 --> <!-- 商品管理-门店 -->
<template> <template>
<div class="marketing pro-group"> <div class="marketing pro-group p-t-20">
<div class="container"> <div class="container">
<div> <div>
<glsx-combi-form ref="showSearch" labelWidth="100px" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" labelWidth="100px" :formObj="searchForm" :formData="searchFormData">
......
<!-- 编辑代金券 --> <!-- 编辑代金券 -->
<template> <template>
<div class="edit-share marketing"> <div class="edit-share marketing p-t-20">
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">{{ title }}秒杀活动</p> <p class="edit-title">{{ title }}秒杀活动</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
...@@ -116,10 +116,12 @@ export default { ...@@ -116,10 +116,12 @@ export default {
addOrEdit: 1, addOrEdit: 1,
id: '' id: ''
}, },
/* eslint-disable */
reg: { reg: {
priceReg: /^\d[\d\.]*$/, priceReg: /^\d[\d\.]*$/,
numReg: /^[1-9]\d*$/ numReg: /^[1-9]\d*$/
}, },
/* eslint-enable */
apear: '', apear: '',
isDisabled: false, isDisabled: false,
// 商品选择 // 商品选择
...@@ -210,32 +212,6 @@ export default { ...@@ -210,32 +212,6 @@ export default {
name: '', name: '',
addHtml: 'goodsHtml' addHtml: 'goodsHtml'
}, },
// {
// label: '面值',
// name: 'denomination',
// addHtml: 'denominationHtml'
// },
// {
// label: '库存',
// name: 'stock',
// width: '150px',
// type: 'input'
// },
// {
// label: '适用商品',
// name: 'goods',
// addHtml: 'goodsHtml'
// },
// {
// // label: '门店',
// name: '',
// addHtml: 'proTable'
// },
// {
// label: '使用说明',
// name: 'useDescription',
// addHtml: 'useDescriptionHtml'
// }
] ]
} }
}, },
...@@ -278,19 +254,19 @@ export default { ...@@ -278,19 +254,19 @@ export default {
methods: { methods: {
limitPriceForInput(val, intergerDigit, pointDigit, minValue, maxValue, regRule) { limitPriceForInput(val, intergerDigit, pointDigit, minValue, maxValue, regRule) {
var regRule = regRule || 'priceReg' var _regRule = regRule || 'priceReg'
// if (val && (minValue && (val < minValue)) || (maxValue && (val > maxValue))) { // if (val && (minValue && (val < minValue)) || (maxValue && (val > maxValue))) {
// console.log('aaa'); // console.log('aaa');
// return maxValue ? maxValue : (minValue?minValue:'') // return maxValue ? maxValue : (minValue?minValue:'')
// } // }
if (val && this.reg[regRule].test(val + '')) { if (val && this.reg[_regRule].test(val + '')) {
maxValue = typeof(maxValue) == 'string'?parseFloat(maxValue):maxValue maxValue = typeof(maxValue) == 'string'?parseFloat(maxValue):maxValue
minValue = typeof(minValue) == 'string'?parseFloat(minValue):minValue minValue = typeof(minValue) == 'string'?parseFloat(minValue):minValue
if (val && (minValue && (val < minValue)) || (maxValue && (val > maxValue))) { if (val && (minValue && (val < minValue)) || (maxValue && (val > maxValue))) {
return maxValue ? maxValue : (minValue?minValue:'') return maxValue ? maxValue : (minValue?minValue:'')
} }
if ((/\./).test(val)) { if ((/\./).test(val)) {
var val = val + '' val = val + ''
var interger = val.split('.')[0] var interger = val.split('.')[0]
var point = val.split('.')[1] var point = val.split('.')[1]
var intergerNum = interger.length > intergerDigit ? val.split('.')[0] : interger var intergerNum = interger.length > intergerDigit ? val.split('.')[0] : interger
...@@ -416,11 +392,11 @@ export default { ...@@ -416,11 +392,11 @@ export default {
} }
if(this.activityInfo && this.activityInfo.specificationDetailWithGoodsList){ if(this.activityInfo && this.activityInfo.specificationDetailWithGoodsList){
for (var i = 0; i < this.activityInfo.specificationDetailWithGoodsList.length; i++) { for (var k = 0; k < this.activityInfo.specificationDetailWithGoodsList.length; k++) {
var temp = this.activityInfo.specificationDetailWithGoodsList[i] var templ = this.activityInfo.specificationDetailWithGoodsList[k]
if (temp.specificationData == item.specificationData) { if (templ.specificationData == item.specificationData) {
item.activityPrice = (temp.retailPrice/100).toFixed(2) item.activityPrice = (templ.retailPrice/100).toFixed(2)
item.goodsStock = temp.stock item.goodsStock = templ.stock
break break
} }
} }
...@@ -492,7 +468,6 @@ export default { ...@@ -492,7 +468,6 @@ export default {
if(this.routeInfo.id){ if(this.routeInfo.id){
param.id = this.routeInfo.id param.id = this.routeInfo.id
} }
console.log(this.routeInfo);
const d = param.activityTime const d = param.activityTime
if (d && d.length > 0) { if (d && d.length > 0) {
param.startTime = d[0]; param.startTime = d[0];
...@@ -518,9 +493,6 @@ export default { ...@@ -518,9 +493,6 @@ export default {
}) })
} }
// console.log('aaaa');
// console.log(this.routeInfo);
return param; return param;
}, },
......
<!-- 商品管理-门店 --> <!-- 商品管理-门店 -->
<template> <template>
<div class="marketing pro-group"> <div class="marketing pro-group p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="addActivity()">新增秒杀活动</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="addActivity()">新增秒杀活动</el-button>
</div> </div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!