-
+
优惠券管理 > 创建优惠券
@@ -134,6 +134,17 @@
+
@@ -149,14 +160,17 @@
} from '@/api/couponmanagement/capitalpool.js'
import router from '@/router';
import coupon from './coupon.vue';
+ import allinfo from './allinfo.vue';
import TitleWithCircle from '@/components/top/index';
export default {
components: {
- coupon,TitleWithCircle
+ coupon,TitleWithCircle,allinfo
},
data() {
return {
+ poolId:'',
+ typeinfo:'1',
couponRules: {
poolName: [{
required: true,
@@ -184,6 +198,7 @@
useCategorylist:'',
usedMerchantslist:'',
couponfrom: {
+ receiveAgain:0,
usedMerchants: 1,
couponName: '',
remark: '',
@@ -195,7 +210,7 @@
pointsRequired: 0,
startTime: '',
endTime: '',
- totalCoupons: null,
+ totalCoupons: 1,
totalFunds: null,
},
coupoobj: {},
@@ -240,42 +255,104 @@
this.getAll()
},
methods: {
+ changetypeinfo(e) {
+ let that = this
+ this.typeinfo = e.type
+ setTimeout(()=>{
+ that.$refs.allinforef.int(e.id)
+ },300)
+ },
+ changetype() {
+ let that = this
+ if(this.typeinfo == '1') {
+ this.type = 1
+ } else {
+ this.typeinfo = '1'
+ console.error(this.poolId)
+ //延迟执行this.$refs.allinforef.int(this.poolId)
+ setTimeout(()=>{
+ that.$refs.allinforef.int(this.poolId)
+ },300)
+ }
+ },
changevalue(e,list) {
console.error(e,list )
this[e] = list
},
xq(e) {
console.log(e )
- // 跳转路由
- router.push({
- path: '/other/capitalpoolinfo',
- query: {
- id: e.poolId
- }
- })
+ this.type = '3'
+ this.typeinfo = '1'
+ this.poolId = e.poolId
+ this.$refs.allinforef.int(this.poolId)
+ // // 跳转路由
+ // router.push({
+ // path: '/other/capitalpoolinfo',
+ // query: {
+ // id: e.poolId
+ // }
+ // })
},
savecoupon() {
let that = this
+ console.error(this.couponfrom )
if(!this.couponfrom.couponName) {
+ that.$message({
+ message: '请填写优惠券名称',
+ error: 'success'
+ });
return
}
- if(!this.couponfrom.startTime) {
- return
- }
- if(!this.couponfrom.totalCoupons) {
- return
- }
- if(!this.couponfrom.maxDiscountAmount) {
- return
- }
+
+
if(!this.couponfrom.discountContent) {
+ that.$message({
+ message: '请填写优惠内容',
+ error: 'success'
+ });
return
}
+
+
if(this.couponfrom.couponType == '1') {
- if(Number(this.couponfrom.discountContent) >= Number(this.couponfrom.maxDiscountAmount)) {
+ if(!this.couponfrom.usageThreshold) {
+ that.$message({
+ message: '请填写优惠内容',
+ error: 'success'
+ });
+ return
+ }
+ if(Number(this.couponfrom.discountContent) >= Number(this.couponfrom.usageThreshold)) {
+ that.$message({
+ message: '请满减金额大于优惠金额',
+ error: 'success'
+ });
return
}
- }
+ } else {
+ if(!this.couponfrom.maxDiscountAmount) {
+ that.$message({
+ message: '请填写优惠内容',
+ error: 'success'
+ });
+ return
+ }
+
+ }
+ if(!this.couponfrom.startTime) {
+ that.$message({
+ message: '请选择时间',
+ error: 'success'
+ });
+ return
+ }
+ if(!this.couponfrom.totalCoupons) {
+ that.$message({
+ message: '请填写数量',
+ error: 'success'
+ });
+ return
+ }
let c1 = this.changecouponfrom()
console.error(c1)
console.error(this.useCategorylist)
@@ -322,6 +399,22 @@
console.error(res2)
})
}
+ this.couponfrom={
+ receiveAgain:0,
+ usedMerchants: 1,
+ couponName: '',
+ remark: '',
+ couponType: '1', // 默认值
+ useCategory: 1,
+ maxDiscountAmount: null,
+ usageThreshold: null, //使用门槛不用
+ discountContent: null,
+ pointsRequired: 0,
+ startTime: '',
+ endTime: '',
+ totalCoupons: 1,
+ totalFunds: null,
+ }
that.$message({
message: '提交成功',
type: 'success'
@@ -332,9 +425,7 @@
error: 'success'
});
}
- setTimeout(() => {
- that.type = '1'
- }, 2000)
+ that.type = '1'
})
},
changecouponfrom() {
diff --git a/admin-web-master/src/views/couponmanagement/capitalpoolinfo.vue b/admin-web-master/src/views/couponmanagement/capitalpoolinfo.vue
index 281c1db..507eead 100644
--- a/admin-web-master/src/views/couponmanagement/capitalpoolinfo.vue
+++ b/admin-web-master/src/views/couponmanagement/capitalpoolinfo.vue
@@ -1,11 +1,6 @@
-
-
-
-
-
+
+
{{item.type}}
{{item.num}}
@@ -47,7 +42,7 @@
- 满{{ scope.row.maxDiscountAmount }}减{{ scope.row.discountContent }}
+ 满{{ scope.row.usageThreshold }}减{{ scope.row.discountContent }}
{{ scope.row.discountContent }}折 最高减{{ scope.row.maxDiscountAmount }}
@@ -69,7 +64,7 @@
-
- 返回
-
-
-
-
-
diff --git a/ceres-uniapp-master/pages_category_page1/coupon/22.vue b/ceres-uniapp-master/pages_category_page1/coupon/22.vue
new file mode 100644
index 0000000..5bb0dd8
--- /dev/null
+++ b/ceres-uniapp-master/pages_category_page1/coupon/22.vue
@@ -0,0 +1,272 @@
+
+
+
+
+
+
+
+
+
+
+ ¥
+
+ {{ item.reduceMoney }}{{ item.discountMode === 1 ? '' : '折' }}
+
+ 满{{ item.fullMoney }}元可用
+
+
+
+
+ {{ item.activityName }}
+ {{ item.endTime }}到期
+
+
+ 已领取
+
+
+ {{ item.ifCredit ? '立即兑换' : '立即领取' }}
+
+
+
+
+
+ {{ item.discountMode === 1 ? '满减券' : '折扣券' }}
+
+
+
+
+
+
+ 这里到底了哦~~
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ceres-uniapp-master/pages_category_page1/coupon/list.vue b/ceres-uniapp-master/pages_category_page1/coupon/list.vue
index c963196..5c2676d 100644
--- a/ceres-uniapp-master/pages_category_page1/coupon/list.vue
+++ b/ceres-uniapp-master/pages_category_page1/coupon/list.vue
@@ -1,300 +1,369 @@
-
-
-
-
-
-
-
-
-
- ¥
-
- {{ item.reduceMoney }}{{ item.discountMode === 1 ? '' : '折' }}
-
- 满{{ item.fullMoney }}元可用
-
-
-
-
- {{ item.activityName }}
- {{ item.endTime }}到期
-
-
- 已领取
-
-
- {{ item.ifCredit ? '立即兑换' : '立即领取' }}
-
-
-
- {{ item.discountMode === 1 ? '满减券' : '折扣券' }}
-
-
-
-
-
-
- 这里到底了哦~~
-
-
-
-
+
+
+
+
+
+ 平台优惠券
+ 商家优惠券
+
+
+
+
+
+
+
+
+
+
+
+ ¥
+
+ {{item.couponType == '1'?item.discountContent:item.discountContent+'折' }}
+
+ {{item.couponType == '1'?'满'+item.maxDiscountAmount+'元可用':'最高'+item.maxDiscountAmount+'元'}}
+
+
+
+
+ {{ item.endTime }}到期
+
+
+
+ {{ item.couponType == '1' ? '满减券' : '折扣券' }}
+
+
+
+
+
+
+
+
+
+ ¥
+
+ {{ item.reduceMoney }}{{ item.discountMode === 1 ? '' : '折' }}
+
+ 满{{ item.fullMoney }}元可用
+
+
+
+
+ {{ item.activityName }}
+ {{ item.endTime }}到期
+
+
+ 已领取
+
+
+ {{ item.ifCredit ? '立即兑换' : '立即领取' }}
+
+
+
+
+
+ {{ item.discountMode === 1 ? '满减券' : '折扣券' }}
+
+
+
+
+
+
+
+
+ 这里到底了哦~~
+
+
+
+
-
+ .reach-text {
+ margin: 20rpx 0;
+ color: #CCCCCC;
+ }
+ }
+
\ No newline at end of file
diff --git a/ceres-uniapp-master/pages_category_page1/orderModule/index.vue b/ceres-uniapp-master/pages_category_page1/orderModule/index.vue
index 0134af0..43c81db 100644
--- a/ceres-uniapp-master/pages_category_page1/orderModule/index.vue
+++ b/ceres-uniapp-master/pages_category_page1/orderModule/index.vue
@@ -4,19 +4,20 @@
-
-
-
+
+ -->
+
diff --git a/ceres-uniapp-master/pages_category_page1/orderModule/orderConfirm.vue b/ceres-uniapp-master/pages_category_page1/orderModule/orderConfirm.vue
index 46d8ab8..a03332b 100644
--- a/ceres-uniapp-master/pages_category_page1/orderModule/orderConfirm.vue
+++ b/ceres-uniapp-master/pages_category_page1/orderModule/orderConfirm.vue
@@ -1,2073 +1,2188 @@
-
-
-
-
-
-
-
-
-
-
-
- {{ userAddressInfo.receiveName }}
- {{ userAddressInfo.receivePhone }}
-
-
- {{ userAddressInfo.receiveAdress }} {{ userAddressInfo.address }}
-
-
-
-
- 你还没有收货地址哦,点击这里添加
-
-
-
-
-
-
-
-
-
- {{ item.shopName }}
-
-
-
-
-
-
-
- {{ cItem.productName }}
-
-
-
-
-
-
-
- ¥
- {{ cItem.price }}
-
- x {{ cItem.number }}
-
-
-
- 当前地址不支持配送,可更换其他地址试试
-
-
-
-
-
- 配送方式
-
-
- 快递 ¥
- {{ item.distribution.distributionPrice }}
-
- 快递 免邮
-
-
-
- {{ hItem[0] }}
-
-
-
-
-
-
- 店铺优惠
-
-
- -¥{{ item.currentCoupon.reduceMoney }}
-
-
- {{ item.currentCoupon.reduceMoney }}折券
-
-
-
-
-
-
- 共{{ item.number }}件
- 总计
-
- ¥{{
+
+
+
+
+
+
+
+
+
+
+
+ {{ userAddressInfo.receiveName }}
+ {{ userAddressInfo.receivePhone }}
+
+
+ {{ userAddressInfo.receiveAdress }} {{ userAddressInfo.address }}
+
+
+
+
+ 你还没有收货地址哦,点击这里添加
+
+
+
+
+
+
+
+
+
+ {{ item.shopName }}
+
+
+
+
+
+
+
+ {{ cItem.productName }}
+
+
+
+
+
+
+
+ ¥
+ {{ cItem.price }}
+
+ x {{ cItem.number }}
+
+
+
+ 当前地址不支持配送,可更换其他地址试试
+
+
+
+
+
+ 配送方式
+
+
+ 快递 ¥
+ {{ item.distribution.distributionPrice }}
+
+ 快递 免邮
+
+
+
+ {{ hItem[0] }}
+
+
+
+
+
+
+ 店铺优惠
+
+
+ -¥{{ item.currentCoupon.reduceMoney }}
+
+
+ {{ item.currentCoupon.reduceMoney }}折券
+
+
+
+
+
+
+
+ 共{{ item.number }}件
+ 总计
+
+ ¥{{
(parseFloat(item.totalAfterDiscount) + parseFloat(item.distribution.distributionPrice || 0)).toFixed(2)
}}
-
- ¥0.00
-
-
-
-
-
-
-
- 平台优惠
-
-
- {{ promotionInfoDTO.reduceMoney }}折
- -¥{{ promotionInfoDTO.reduceMoney | clip2Decimal }}
-
- 无
-
- 不使用
-
-
-
-
-
-
-
- 可用{{ integralNum }}积分抵扣{{ integralPrice.toFixed(2) }}元
-
-
-
-
-
-
-
-
-
-
-
- 交易流程:
-
- 1、填写收货信息并完成支付
- 2、双方根据物品的交易方式进行交易
- 3、拿到物品,交易结束
-
-
- 注:应国家邮政总局的要求,即日起涉及到个人快递包裹必须收件人实名制,否则将影响到收寄配送。请避免使用「先生,男士,小姐,女士,昵称」等模糊称谓。
-
-
-
-
-
- 共{{ totalCount }}件
-
- 合计:
- ¥{{ totalPrice.toFixed(2) }}
-
- ¥0.00
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 可用优惠券列表
-
-
-
- ¥{{ usableItem.reduceMoney }}
-
- {{ usableItem.reduceMoney }}折券
-
-
-
- {{
+
+ ¥0.00
+
+
+
+
+
+
+
+ 优惠券选择
+
+
+ 暂无优惠券
+ {{couponId.couponName}}
+ 暂无选择
+
+
+
+
+
+
+ 可用{{ integralNum }}积分抵扣{{ integralPrice.toFixed(2) }}元
+
+
+
+
+
+
+
+
+
+
+
+ 交易流程:
+
+ 1、填写收货信息并完成支付
+ 2、双方根据物品的交易方式进行交易
+ 3、拿到物品,交易结束
+
+
+
+ 注:应国家邮政总局的要求,即日起涉及到个人快递包裹必须收件人实名制,否则将影响到收寄配送。请避免使用「先生,男士,小姐,女士,昵称」等模糊称谓。
+
+
+
+
+
+ 共{{ totalCount }}件
+
+ (平台优惠:¥{{ptyh}})
+ 合计:
+ ¥{{ (totalPrice - ptyh).toFixed(2) }}
+
+ ¥0.00
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 可用优惠券列表
+
+
+
+ ¥{{ usableItem.reduceMoney }}
+
+ {{ usableItem.reduceMoney }}折券
+
+
+
+ {{
getDate(usableItem.startTime.replace(/-/g, '.'))
}}-{{ getDate(usableItem.endTime.replace(/-/g, '.')) }}
-
- 满{{ usableItem.fullMoney }}元可用
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 可用优惠券列表
-
-
- ¥{{ sItem.reduceMoney }}
-
- {{ sItem.reduceMoney }}折券
-
-
- {{ getDate(sItem.startTime.replace(/-/g, '.')) }}-{{
+
+ 满{{ usableItem.fullMoney }}元可用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 可用优惠券列表
+
+
+
+ ¥{{ sItem.reduceMoney }}
+
+ {{ sItem.reduceMoney }}折券
+
+
+ {{ getDate(sItem.startTime.replace(/-/g, '.')) }}-{{
getDate(sItem.endTime.replace(/-/g, '.'))
}}
-
-
- 满{{ sItem.fullMoney }}元可用
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 满{{ sItem.fullMoney }}元可用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 可用优惠券列表
+
+
+
+ ¥{{ usableItem.discountContent }}
+
+ {{ usableItem.discountContent }}折券
+
+
+
+ {{
+ getDate(usableItem.startTime.replace(/-/g, '.'))
+ }}-{{ getDate(usableItem.endTime.replace(/-/g, '.')) }}
+
+ {{usableItem.couponType == '1'?'满'+usableItem.usageThreshold+'元可用':'最高'+usableItem.maxDiscountAmount+'元'}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .pay-type-item /deep/ .uni-radio-input-checked {
+ background-color: #C5AA7B !important;
+ border-color: #C5AA7B !important;
+ }
+
+ .maxIntegral /deep/ .uni-checkbox-input {
+ width: 30rpx;
+ height: 30rpx;
+ }
+
+ .maxIntegral /deep/ .uni-checkbox-input-checked:before {
+ font-size: 30rpx;
+ }
+
+ .maxIntegral /deep/ .uni-checkbox-input-checked {
+ border: 2rpx solid #C5AA7B !important;
+ }
+
\ No newline at end of file
diff --git a/ceres-uniapp-master/pages_category_page1/orderModule/orderConfirm334.vue b/ceres-uniapp-master/pages_category_page1/orderModule/orderConfirm334.vue
new file mode 100644
index 0000000..daa9473
--- /dev/null
+++ b/ceres-uniapp-master/pages_category_page1/orderModule/orderConfirm334.vue
@@ -0,0 +1,2076 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ userAddressInfo.receiveName }}
+ {{ userAddressInfo.receivePhone }}
+
+
+ {{ userAddressInfo.receiveAdress }} {{ userAddressInfo.address }}
+
+
+
+
+ 你还没有收货地址哦,点击这里添加
+
+
+
+
+
+
+
+
+
+ {{ item.shopName }}
+
+
+
+
+
+
+
+ {{ cItem.productName }}
+
+
+
+
+
+
+
+ ¥
+ {{ cItem.price }}
+
+ x {{ cItem.number }}
+
+
+
+ 当前地址不支持配送,可更换其他地址试试
+
+
+
+
+
+ 配送方式
+
+
+ 快递 ¥
+ {{ item.distribution.distributionPrice }}
+
+ 快递 免邮
+
+
+
+ {{ hItem[0] }}
+
+
+
+
+
+
+ 店铺优惠
+
+
+ -¥{{ item.currentCoupon.reduceMoney }}
+
+
+ {{ item.currentCoupon.reduceMoney }}折券
+
+
+
+
+
+
+ 共{{ item.number }}件
+ 总计
+
+ ¥{{
+ (parseFloat(item.totalAfterDiscount) + parseFloat(item.distribution.distributionPrice || 0)).toFixed(2)
+ }}
+
+ ¥0.00
+
+
+
+
+
+
+
+ 平台优惠
+
+
+ {{ promotionInfoDTO.reduceMoney }}折
+ -¥{{ promotionInfoDTO.reduceMoney | clip2Decimal }}
+
+ 无
+
+ 不使用
+
+
+
+
+
+
+
+ 可用{{ integralNum }}积分抵扣{{ integralPrice.toFixed(2) }}元
+
+
+
+
+
+
+
+
+
+
+
+ 交易流程:
+
+ 1、填写收货信息并完成支付
+ 2、双方根据物品的交易方式进行交易
+ 3、拿到物品,交易结束
+
+
+ 注:应国家邮政总局的要求,即日起涉及到个人快递包裹必须收件人实名制,否则将影响到收寄配送。请避免使用「先生,男士,小姐,女士,昵称」等模糊称谓。
+
+
+
+
+
+ 共{{ totalCount }}件
+
+ 合计:
+ ¥{{ totalPrice.toFixed(2) }}
+
+ ¥0.00
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 可用优惠券列表
+
+
+
+ ¥{{ usableItem.reduceMoney }}
+
+ {{ usableItem.reduceMoney }}折券
+
+
+
+ {{
+ getDate(usableItem.startTime.replace(/-/g, '.'))
+ }}-{{ getDate(usableItem.endTime.replace(/-/g, '.')) }}
+
+ 满{{ usableItem.fullMoney }}元可用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 可用优惠券列表
+
+
+ ¥{{ sItem.reduceMoney }}
+
+ {{ sItem.reduceMoney }}折券
+
+
+ {{ getDate(sItem.startTime.replace(/-/g, '.')) }}-{{
+ getDate(sItem.endTime.replace(/-/g, '.'))
+ }}
+
+
+ 满{{ sItem.fullMoney }}元可用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ceres-uniapp-master/pages_category_page1/orderModule/orderDetails.vue b/ceres-uniapp-master/pages_category_page1/orderModule/orderDetails.vue
index cc0d72a..2161bc2 100644
--- a/ceres-uniapp-master/pages_category_page1/orderModule/orderDetails.vue
+++ b/ceres-uniapp-master/pages_category_page1/orderModule/orderDetails.vue
@@ -454,6 +454,7 @@
this.getDataList(this.orderId)
this.Orderrefund()
this.getHuabeiFeeRateList()
+
},
onUnload() {
if (this.timeOut) {
@@ -614,6 +615,14 @@
if (this.dataList.state == 1 || this.dataList.state == 6) {
this.countDown();
}
+ NET.request(API.cereCouponKeyUse, {
+ orderId: orderId,
+ usedMerchantId: this.dataList.shopId
+ }, 'GET').then(res1 => {
+ console.error(res1)
+ }).catch(res => {
+ // uni.hideLoading()
+ })
}).catch(res => {
// uni.hideLoading()
})
diff --git a/ceres-uniapp-master/pages_category_page1/store/index.vue b/ceres-uniapp-master/pages_category_page1/store/index.vue
index a49dd92..629c669 100644
--- a/ceres-uniapp-master/pages_category_page1/store/index.vue
+++ b/ceres-uniapp-master/pages_category_page1/store/index.vue
@@ -53,11 +53,11 @@
-
-
-
+
@@ -180,22 +180,22 @@
免费领
-
+
- ¥2
- 代金券
+ {{item.couponType=='1'?'¥'+item.discountContent:item.discountContent+'折'}}
+ {{item.couponType=='1'?'满减券':'折扣券'}}
- 有效期2024.12.1
+ 有效期:{{item.endTime}}
- 领取
+ 领取
@@ -244,6 +244,7 @@
topHeight: 10,
hasService: false,
isLoading: false,
+ conlist:[]
}
},
components: {
@@ -278,6 +279,11 @@
// #ifdef MP-WEIXIN
this.getServiceUrl(this.id)
// #endif
+ // this.id
+ // NET.request(API.cereCouponMainTablequeryByPage, {pageNumber:0,pageSize:20,shopId:this.id}, 'POST').then(res => {
+ // console.error(res)
+ // this.conlist = res.data.content
+ // })
},
onReachBottom() {
if (this.loadingType == 1) {
@@ -288,6 +294,12 @@
}
},
methods: {
+ getconlist(e) {
+ console.error(e)
+ NET.request(API.receiveCoupons, {"couponId":e.id,"userId":uni.getStorageSync('storage_key').buyerUserId}, 'GET').then(res => {
+ console.log(res)
+ })
+ },
// 读取画布
canvasGet() {
var _this = this
diff --git a/merchant-web-master/src/layout/components/AppMain.vue b/merchant-web-master/src/layout/components/AppMain.vue
index cc13cc9..41e7d37 100644
--- a/merchant-web-master/src/layout/components/AppMain.vue
+++ b/merchant-web-master/src/layout/components/AppMain.vue
@@ -20,14 +20,15 @@ export default {
diff --git a/merchant-web-master/src/layout/index.vue b/merchant-web-master/src/layout/index.vue
index f713e97..80986d1 100644
--- a/merchant-web-master/src/layout/index.vue
+++ b/merchant-web-master/src/layout/index.vue
@@ -338,7 +338,13 @@ export default {
margin-top: 50px;
}
.main-container{
- margin-top: 50px;
+ // margin-top: 50px;
+ position: fixed;
+ right: 0;
+ top: 50px;
+ height: calc(100vh - 50px);
+ background: #f7f7f7;
+ // height: calc(100vh -50px);
}
.topList{
position: relative;
diff --git a/merchant-web-master/src/views/couponmanagement/allinfo.vue b/merchant-web-master/src/views/couponmanagement/allinfo.vue
new file mode 100644
index 0000000..ca260af
--- /dev/null
+++ b/merchant-web-master/src/views/couponmanagement/allinfo.vue
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/merchant-web-master/src/views/couponmanagement/coupon.vue b/merchant-web-master/src/views/couponmanagement/coupon.vue
index 8f4457d..4da249f 100644
--- a/merchant-web-master/src/views/couponmanagement/coupon.vue
+++ b/merchant-web-master/src/views/couponmanagement/coupon.vue
@@ -19,13 +19,14 @@
订单满 元 减 元
+
+ 打 折
最高优惠金额
元
- 打 折
-
-
+
+
diff --git a/merchant-web-master/src/views/couponmanagement/couponinfo.vue b/merchant-web-master/src/views/couponmanagement/couponinfo.vue
index b6326ed..9ca99a0 100644
--- a/merchant-web-master/src/views/couponmanagement/couponinfo.vue
+++ b/merchant-web-master/src/views/couponmanagement/couponinfo.vue
@@ -1,290 +1,286 @@
-
-
-
-
-
优惠券管理 > 优惠券列表 >详情
+
+
+
+
{{item.type}}
+
{{item.num}}
-
-
-
{{item.type}}
-
{{item.num}}
-
-
-
- 渠道领用
- 用户领取
- 用户使用
- 商家补贴
-
-
-
+
+ 渠道领用
+ 用户领取
+ 用户使用
+ 商家补贴
+
+
+
-
-
-
+
+
+
-
+}
+
-
+.greens {
+ color: #3F9B6A;
+ }
+ ::v-deep .buttonHover:hover{
+ color:#3f9b6a !important;
+ border-color: #c5e1d2 !important;
+ background-color: #ecf5f0 !important;
+ outline: none;
+ }
+ ::v-deep .el-pagination__total {
+ position: absolute;
+ left: 10px;
+ }
+ ::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active{
+ background-color:#3f9b6a;
+ }
+
diff --git a/merchant-web-master/src/views/couponmanagement/couponlist.vue b/merchant-web-master/src/views/couponmanagement/couponlist.vue
index 982a500..80a17d5 100644
--- a/merchant-web-master/src/views/couponmanagement/couponlist.vue
+++ b/merchant-web-master/src/views/couponmanagement/couponlist.vue
@@ -1,6 +1,6 @@
-
+
-
@@ -120,16 +127,21 @@
addcereCouponCategory
} from '@/api/couponmanagement/capitalpool.js'
import { getcereFundsPoolData}from '@/api/couponmanagement/couponlist.js'
+ import allinfo from './allinfo.vue';
import router from '@/router';
import coupon from './coupon.vue';
import TitleWithCircle from '@/components/top/index';
+ import {
+ getShopId
+} from '@/utils/auth' // get token from cookie
export default {
components: {
- coupon,TitleWithCircle
+ coupon,TitleWithCircle,allinfo
},
data() {
return {
+ typeinfo:'2',
couponRules: {
poolName: [{
required: true,
@@ -157,6 +169,7 @@
useCategorylist:'',
usedMerchantslist:'',
couponfrom: {
+ receiveAgain:0,
usedMerchants: 2,
couponName: '',
remark: '',
@@ -168,7 +181,7 @@
pointsRequired: 0,
startTime: '',
endTime: '',
- totalCoupons: null,
+ totalCoupons: 1,
totalFunds: null,
},
coupoobj: {},
@@ -177,7 +190,7 @@
activityName: '', // 活动名称
// 活动状态 0-报名未开始 1-报名进行中 2-活动待开始 3-活动进行中 4-活动已结束
state: '',
- pageNumber: 1,
+ pageNumber: 0,
pageSize: 10
},
total: 0,
@@ -211,21 +224,23 @@
},
created() {
this.getAll()
+ console.error(getShopId())
},
methods: {
+ changetype() {
+ this.type = 1
+ },
+ changetypeinfo(e) {
+ this.typeinfo = e
+ },
changevalue(e,list) {
console.error(e,list )
this[e] = list
},
xq(e) {
console.log(e )
- // 跳转路由
- router.push({
- path: '/other/coupon',
- query: {
- id: e.poolId
- }
- })
+ this.type = '3'
+ this.$refs.allinforef.int(e.id)
},
savecoupon() {
let that = this
@@ -273,9 +288,19 @@
})
console.error(JSON.stringify(from))
// return
+ let clist = []
+ clist.push(getShopId())
cereCouponMainTable(from).then(res => {
console.error(res)
if (res.data) {
+ let info1 = {
+ couponId:res.data.id,
+ usedMerchants:3,
+ categoryIds:clist
+ }
+ addcereCouponCategory(info1).then(res2 => {
+ console.error(res2)
+ })
if(res.data.usedMerchants == '2') {
let info2 = {
couponId:res.data.id,
@@ -290,15 +315,29 @@
message: '提交成功',
type: 'success'
});
+ that.type = '1'
+ that.clear()
+ that.couponfrom={
+ usedMerchants: 2,
+ couponName: '',
+ remark: '',
+ couponType: '1', // 默认值
+ useCategory: 1,
+ maxDiscountAmount: null,
+ usageThreshold: null, //使用门槛不用
+ discountContent: null,
+ pointsRequired: 0,
+ startTime: '',
+ endTime: '',
+ totalCoupons: null,
+ totalFunds: null,
+ }
} else {
that.$message({
message: '提交失败',
error: 'success'
});
}
- setTimeout(() => {
- that.type = '1'
- }, 2000)
})
},
changecouponfrom() {
@@ -413,7 +452,7 @@
}
},
async getAll() {
- const res = await getcereFundsPoolData(this.query)
+ const res = await getcereFundsPoolData({'shopId':getShopId(),...this.query})
this.tableData = res.data.content
this.total = res.data.numberOfElements
},
@@ -422,12 +461,12 @@
this.getAll()
},
handleCurrentChange(val) {
- this.query.pageNumber = val
+ this.query.pageNumber = val-1
this.getAll()
},
search() {
this.total = 1
- this.query.pageNumber = 1
+ this.query.pageNumber = 0
this.getAll()
},
// 重置
@@ -435,7 +474,7 @@
this.query = {
activityName: '',
state: '',
- pageNumber: 1,
+ pageNumber: 0,
pageSize: 10
}
this.getAll()
diff --git a/merchant-web-master/src/views/marketing/coupon/add copy.vue b/merchant-web-master/src/views/marketing/coupon/add copy.vue
new file mode 100644
index 0000000..e3356ef
--- /dev/null
+++ b/merchant-web-master/src/views/marketing/coupon/add copy.vue
@@ -0,0 +1,562 @@
+
+
+
+
+
+
+ 满减券
+ 折扣券
+
+
+
+
+
+
+
+
+ 全部商品
+ 指定商品可用
+
+ 请选择
+
+ {{ idList.length }}
+
+
+ 指定商品不可用
+
+ 请选择
+
+ {{ idList.length }}
+
+
+
+
+
+ 订单满 元
+ 无门槛
+
+
+
+ 减 元
+
+
+
+ 打 折
+
+
+
+ 固定时间
+
+
+
+
+
+
+
+ 领券当日起
+ 天内可用
+
+
+ 张
+
+
+ 无限制
+ 限制
+ 次
+
+
+
+ 不叠加
+ 叠加
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/merchant-web-master/src/views/marketing/coupon/add.vue b/merchant-web-master/src/views/marketing/coupon/add.vue
index e3356ef..06856e2 100644
--- a/merchant-web-master/src/views/marketing/coupon/add.vue
+++ b/merchant-web-master/src/views/marketing/coupon/add.vue
@@ -1,5 +1,6 @@
+
@@ -14,7 +15,7 @@
- 全部商品
+
限制
次
-
+
import { addCoupon, getProducts, couponDetail, updateCoupon } from '@/api/marketing'
-
+import TitleWithCircle from '@/components/top/index';
function InitCouponForm() {
this.type = 1
- this.applyType = '1' // 适用商品 1-全部商品 2-指定商品可用 3-指定商品不可用
+ this.applyType = '2' // 适用商品 1-全部商品 2-指定商品可用 3-指定商品不可用
this.couponContent = null // 优惠内容减多少元
this.couponName = '' // 优惠券名称
this.couponType = '1' // 优惠券类型 1-满减券 2-折扣券
@@ -191,6 +192,9 @@ export default {
default: 0
}
},
+ components: {
+ TitleWithCircle
+ },
data() {
return {
// 新增
@@ -446,7 +450,10 @@ export default {
.addCoupon {
background: #FFFFFF;
.dialog-footer {
- margin-left: 300px;
+ // margin-left: 300px;
+ display: flex;
+ flex-direction: row-reverse;
+ margin-top: 30px;
}
.formBox {
.flexBox {
diff --git a/merchant-web-master/src/views/marketing/coupon/index copy.vue b/merchant-web-master/src/views/marketing/coupon/index copy.vue
new file mode 100644
index 0000000..54e781b
--- /dev/null
+++ b/merchant-web-master/src/views/marketing/coupon/index copy.vue
@@ -0,0 +1,377 @@
+
+
+
+
+
+ 新增
+
+
+
+
+
+ {{ scope.row.couponName }}
+
+
+
+ 满减券
+ 折扣券
+
+
+
+
+ 未开始
+ 进行中
+ 已结束
+
+
+
+
+
+
+
+
编辑
+
数据
+
+ 删除
+
+
+ 停止
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
数据统计至昨日
+
优惠券名称:{{ dataInfo.couponName }}
+
+ 优惠券总数:{{ dataInfo.couponTotal?dataInfo.couponTotal:'0' }} 张,已领取 {{ dataInfo.received?dataInfo.received:'0' }} 张
+
+
+
+
¥{{ dataInfo.total }}
+
用券成交总额
+
+
+
¥{{ dataInfo.useMoney }}
+
使用优惠券总额
+
+
+
{{ dataInfo.count }}件
+
购买商品总数
+
+
+
使用该优惠券购买的商品
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/merchant-web-master/src/views/marketing/coupon/index.vue b/merchant-web-master/src/views/marketing/coupon/index.vue
index 54e781b..4f9b0e5 100644
--- a/merchant-web-master/src/views/marketing/coupon/index.vue
+++ b/merchant-web-master/src/views/marketing/coupon/index.vue
@@ -1,6 +1,13 @@
-
-
+
+
+
@@ -83,49 +90,25 @@
class="tableBtn greens">编辑
数据
-
- 删除
-
-
- 删除
+ 停止
-
-
-
-
+
+
-
-
-
+
{
- if (res.code === '') {
- this.$message.success('停止成功')
- this.formInline.page = 1
- this.getAll(this.formInline)
- } else {
- this.$message.error(res.message)
- }
- })
+ let that = this
+ this.$confirm('是否将该优惠券停止?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ console.error(id)
+ stopCoupon({ shopCouponId: id }).then(res => {
+ if (res.code === '') {
+ that.$message.success('停止成功')
+ that.formInline.page = 1
+ that.getAll(that.formInline)
+ } else {
+ that.$message.error(res.message)
+ }
+ })
+ }).catch(() => {
+
+ });
},
// 初始化查询所有数据
async getAll(formInline) {
@@ -269,15 +263,24 @@ export default {
},
// 删除优惠券
delCouponFn(data) {
- delCoupon({ shopCouponId: data.shopCouponId }).then(res => {
+ let that = this
+ this.$confirm('是否将该优惠券删除?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ delCoupon({ shopCouponId: data.shopCouponId }).then(res => {
if (res.code === '') {
- this.$message.success('删除成功')
- this.formInline.page = 1
- this.getAll(this.formInline)
+ that.$message.success('删除成功')
+ that.formInline.page = 1
+ that.getAll(that.formInline)
} else {
- this.$message.error(res.message)
+ that.$message.error(res.message)
}
})
+ }).catch(() => {
+
+ });
}
}
}
@@ -290,7 +293,7 @@ export default {
.pending {
padding: 0 20px 20px 20px;
background-color:#fff;
- min-height: calc(100vh - 50px - 20px);
+// min-height: calc(100vh - 50px - 20px);
}
.fenye {
margin-top: 20px;
diff --git a/merchant-web-master/src/views/marketing/mixin/index.js b/merchant-web-master/src/views/marketing/mixin/index.js
index 2475955..5a39c3d 100644
--- a/merchant-web-master/src/views/marketing/mixin/index.js
+++ b/merchant-web-master/src/views/marketing/mixin/index.js
@@ -1,14 +1,14 @@
export default {
data() {
return {
- activityVisible: false,
+ activityVisible: '1',
activityId: 0
}
},
methods: {
addActivity() {
this.activityId = 0
- this.activityVisible = true
+ this.activityVisible = '2'
},
editActivity(id) {
this.activityId = id
@@ -18,7 +18,7 @@ export default {
}
},
reset() {
- this.activityVisible = false
+ this.activityVisible = '1'
this.getAll(this.formInline)
}
}
--
libgit2 0.21.4