瀏覽代碼

专业版本 购买授权

姜永辉 1 年之前
父節點
當前提交
b05b0466ec

+ 16 - 0
package-basic-data/pages/activity/activity.js

@@ -156,6 +156,7 @@ Page({
      * @date : 2024/4/1
      * @date : 2024/4/1
      */
      */
     countSummaryAmount() {
     countSummaryAmount() {
+        let _this = this
         let item = this.data.curentAdItem;
         let item = this.data.curentAdItem;
         if (!item) return;
         if (!item) return;
         let staffCount = this.data.staffCount;
         let staffCount = this.data.staffCount;
@@ -188,6 +189,21 @@ Page({
             summaryInfo.amountInfo += ' = ' + amount + '(元)'
             summaryInfo.amountInfo += ' = ' + amount + '(元)'
             summaryInfo.amount = amount;
             summaryInfo.amount = amount;
         }
         }
+        // 积分转成现金                
+        let integralRateVal = Number((_this.data.integral / _this.data.integralTacticItem.exchangeRate).toFixed(2))
+        // 折扣--数据库的值不能超过10
+        let discount = _this.data.couponUse.discount ? _this.data.couponUse.discount / 10 : 1
+
+        if (_this.data.integral > Math.ceil(_this.data.integralTacticItem.exchangeRate * summaryInfo.amount)) {
+
+            _this.setData({
+                integral: Math.ceil(_this.data.integralTacticItem.exchangeRate * summaryInfo.amount)
+            })
+            summaryInfo.amount = 0.00
+
+        } else {
+            summaryInfo.amount = Number((summaryInfo.amount - integralRateVal) * discount.toFixed(2))
+        }
         this.setData({
         this.setData({
             summaryInfo: summaryInfo
             summaryInfo: summaryInfo
         })
         })

+ 13 - 4
package-basic-data/pages/activity/activity.wxml

@@ -60,7 +60,7 @@
 				</view>
 				</view>
 				<!-- 积分和优惠券 -->
 				<!-- 积分和优惠券 -->
 				<view wx:if="{{integral > 0 }}" class="view-margin" style="text-align: right;margin-top: 30rpx;">
 				<view wx:if="{{integral > 0 }}" class="view-margin" style="text-align: right;margin-top: 30rpx;">
-					减{{integral}}云币
+					减{{integral}}云币
 					<dk-tip slot="label-icon" style="display: inline-block;" id="tipIntegral" Up="{{true}}" Left="{{true}}" tipContent='每{{integralTacticItem.exchangeRate}}云币等于1人民币' bind:clickTip="closeAllTips" />
 					<dk-tip slot="label-icon" style="display: inline-block;" id="tipIntegral" Up="{{true}}" Left="{{true}}" tipContent='每{{integralTacticItem.exchangeRate}}云币等于1人民币' bind:clickTip="closeAllTips" />
 				</view>
 				</view>
 				<view wx:if="{{couponList.length > 0 && summaryInfo.amount > 0 }}" class="view-margin" style="text-align: right;margin-top: 3rpx;">
 				<view wx:if="{{couponList.length > 0 && summaryInfo.amount > 0 }}" class="view-margin" style="text-align: right;margin-top: 3rpx;">
@@ -123,13 +123,22 @@
 	</view>
 	</view>
 
 
 	<!--合计(专业版)-->
 	<!--合计(专业版)-->
-	<view class="summary-class" wx:if="{{gradeCode != 'STD' && curentAdItem!=null && !funcMenuFlg}}">
+	<view class="summary-class" wx:if="{{gradeCode != 'STD' && curentAdItem!=null && !funcMenuFlg}}" bind:tap="closeAllTips">
 		<view class="summary-item-class">订单详情:</view>
 		<view class="summary-item-class">订单详情:</view>
 		<view class="summary-item-class">{{summaryInfo.amountInfo}}</view>
 		<view class="summary-item-class">{{summaryInfo.amountInfo}}</view>
+		<!-- 积分和优惠券 -->
+		<view wx:if="{{integral > 0 }}" class="summary-item-class" style=" margin-top: 10rpx;">
+			减{{integral}}云币
+			<dk-tip slot="label-icon" style="display: inline-block;" id="tipIntegral" Up="{{true}}" Right="{{true}}" tipContent='每{{integralTacticItem.exchangeRate}}云币等于1人民币' bind:clickTip="closeAllTips" />
+		</view>
+		<view wx:if="{{couponList.length > 0 && summaryInfo.amount > 0 }}" class="summary-item-class" style=" margin-top: 3rpx;">
+			使用{{couponUse.discount}}折优惠券
+		</view>
 		<view class="summary-item-class">截止日期:{{summaryInfo.endDate}}</view>
 		<view class="summary-item-class">截止日期:{{summaryInfo.endDate}}</view>
 		<view class="summary-item-class" wx:if="{{staffCount.maxNum || staffCount.webMaxNum || staffCount.wxMaxNum}}">{{summaryInfo.staffInfo}}</view>
 		<view class="summary-item-class" wx:if="{{staffCount.maxNum || staffCount.webMaxNum || staffCount.wxMaxNum}}">{{summaryInfo.staffInfo}}</view>
-		<view class="summary-item-class" style="display: flex;justify-content: flex-end;" wx:if="{{staffCount.maxNum || staffCount.webMaxNum || staffCount.wxMaxNum}}">
-			折合<dk-cell fontSize="14" left="5rpx" fontWeight="bold" height="45rpx" contentColor="#FF7B1A" content="{{summaryInfo.priceInfo}}"></dk-cell>/天/授权</view>
+		<view class="summary-item-class" style="display: flex;justify-content: flex-end;align-items: center;">
+			合计:<dk-cell fontSize="16" center="center" contentFontWeight="700" contentColor="#FF7B1A" content="{{summaryInfo.amount}}"></dk-cell>
+		</view>
 	</view>
 	</view>
 
 
 	<!--注册须知 240704 去除 用功能模块代替-->
 	<!--注册须知 240704 去除 用功能模块代替-->

+ 16 - 0
package-basic-data/pages/activity/renew/renew.js

@@ -156,6 +156,7 @@ Page({
      * @date : 2024/4/1
      * @date : 2024/4/1
      */
      */
     countSummaryAmount() {
     countSummaryAmount() {
+        let _this = this
         let item = this.data.curentAdItem;
         let item = this.data.curentAdItem;
         if (!item) return;
         if (!item) return;
         let staffCount = this.data.staffCount;
         let staffCount = this.data.staffCount;
@@ -188,6 +189,21 @@ Page({
             summaryInfo.amountInfo += ' = ' + amount + '(元)'
             summaryInfo.amountInfo += ' = ' + amount + '(元)'
             summaryInfo.amount = amount;
             summaryInfo.amount = amount;
         }
         }
+        // 积分转成现金                
+        let integralRateVal = Number((_this.data.integral / _this.data.integralTacticItem.exchangeRate).toFixed(2))
+        // 折扣--数据库的值不能超过10
+        let discount = _this.data.couponUse.discount ? _this.data.couponUse.discount / 10 : 1
+
+        if (_this.data.integral > Math.ceil(_this.data.integralTacticItem.exchangeRate * summaryInfo.amount)) {
+
+            _this.setData({
+                integral: Math.ceil(_this.data.integralTacticItem.exchangeRate * summaryInfo.amount)
+            })
+            summaryInfo.amount = 0.00
+
+        } else {
+            summaryInfo.amount = Number((summaryInfo.amount - integralRateVal) * discount.toFixed(2))
+        }
         this.setData({
         this.setData({
             summaryInfo: summaryInfo
             summaryInfo: summaryInfo
         })
         })

+ 12 - 3
package-basic-data/pages/activity/renew/renew.wxml

@@ -80,7 +80,7 @@
 
 
 		<!-- 积分和优惠券 -->
 		<!-- 积分和优惠券 -->
 		<view wx:if="{{integral > 0 }}" class="view-margin" style="margin-left: 20rpx;  color: #000000;margin-top: 10rpx;">
 		<view wx:if="{{integral > 0 }}" class="view-margin" style="margin-left: 20rpx;  color: #000000;margin-top: 10rpx;">
-			减{{integral}}云币
+			减{{integral}}云币
 			<dk-tip slot="label-icon" style="display: inline-block;" id="tipIntegral" Up="{{true}}" Left="{{true}}" tipContent='每{{integralTacticItem.exchangeRate}}云币等于1人民币' bind:clickTip="closeAllTips" />
 			<dk-tip slot="label-icon" style="display: inline-block;" id="tipIntegral" Up="{{true}}" Left="{{true}}" tipContent='每{{integralTacticItem.exchangeRate}}云币等于1人民币' bind:clickTip="closeAllTips" />
 		</view>
 		</view>
 		<view wx:if="{{couponList.length > 0 && summaryInfo.amount > 0 }}" class="view-margin" style=" margin-top: 30rpx;color: #000000;margin-left: 20rpx;">
 		<view wx:if="{{couponList.length > 0 && summaryInfo.amount > 0 }}" class="view-margin" style=" margin-top: 30rpx;color: #000000;margin-left: 20rpx;">
@@ -132,10 +132,19 @@
 	<view class="summary-class" wx:if="{{gradeCode != 'STD' && curentAdItem!=null && !funcMenuFlg}}">
 	<view class="summary-class" wx:if="{{gradeCode != 'STD' && curentAdItem!=null && !funcMenuFlg}}">
 		<view class="summary-item-class">订单详情:</view>
 		<view class="summary-item-class">订单详情:</view>
 		<view class="summary-item-class">{{summaryInfo.amountInfo}}</view>
 		<view class="summary-item-class">{{summaryInfo.amountInfo}}</view>
+		<!-- 积分和优惠券 -->
+		<view wx:if="{{integral > 0 }}" class="summary-item-class" style=" margin-top: 10rpx;">
+			减{{integral}}云币
+			<dk-tip slot="label-icon" style="display: inline-block;" id="tipIntegral" Up="{{true}}" Right="{{true}}" tipContent='每{{integralTacticItem.exchangeRate}}云币等于1人民币' bind:clickTip="closeAllTips" />
+		</view>
+		<view wx:if="{{couponList.length > 0 && summaryInfo.amount > 0 }}" class="summary-item-class" style=" margin-top: 3rpx;">
+			使用{{couponUse.discount}}折优惠券
+		</view>
 		<view class="summary-item-class">截止日期:{{summaryInfo.endDate}}</view>
 		<view class="summary-item-class">截止日期:{{summaryInfo.endDate}}</view>
 		<view class="summary-item-class" wx:if="{{staffCount.maxNum || staffCount.webMaxNum || staffCount.wxMaxNum}}">{{summaryInfo.staffInfo}}</view>
 		<view class="summary-item-class" wx:if="{{staffCount.maxNum || staffCount.webMaxNum || staffCount.wxMaxNum}}">{{summaryInfo.staffInfo}}</view>
-		<view class="summary-item-class" style="display: flex;justify-content: flex-end;" wx:if="{{staffCount.maxNum || staffCount.webMaxNum || staffCount.wxMaxNum}}">
-			折合<dk-cell fontSize="14" left="5rpx" fontWeight="bold" height="45rpx" contentColor="#FF7B1A" content="{{summaryInfo.priceInfo}}"></dk-cell>/天/授权</view>
+		<view class="summary-item-class" style="display: flex;justify-content: flex-end;align-items: center;">
+			合计:<dk-cell fontSize="16" center="center" contentFontWeight="700" contentColor="#FF7B1A" content="{{summaryInfo.amount}}"></dk-cell>
+		</view>
 	</view>
 	</view>
 
 
 	<!--注册须知 240704 去除 用功能模块代替-->
 	<!--注册须知 240704 去除 用功能模块代替-->

+ 1 - 1
package-basic-data/pages/func-buy/add-confirm/add-confirm.wxml

@@ -28,7 +28,7 @@
 		</view>
 		</view>
 	</view>
 	</view>
 	<view wx:if="{{integral > 0 }}" class="view-margin" style="text-align: right;margin-top: 35rpx;">
 	<view wx:if="{{integral > 0 }}" class="view-margin" style="text-align: right;margin-top: 35rpx;">
-		减{{integral}}云币
+		减{{integral}}云币
 		<dk-tip slot="label-icon" style="display: inline-block;" id="tipIntegral" Up="{{true}}" Left="{{true}}" tipContent='每{{integralTacticItem.exchangeRate}}云币等于1人民币' bind:clickTip="closeAllTips" />
 		<dk-tip slot="label-icon" style="display: inline-block;" id="tipIntegral" Up="{{true}}" Left="{{true}}" tipContent='每{{integralTacticItem.exchangeRate}}云币等于1人民币' bind:clickTip="closeAllTips" />
 	</view>
 	</view>
 	<view wx:if="{{couponList.length > 0 && factAmt > 0 }}" class="view-margin" style="text-align: right;margin-top: 35rpx;">
 	<view wx:if="{{couponList.length > 0 && factAmt > 0 }}" class="view-margin" style="text-align: right;margin-top: 35rpx;">

+ 1 - 1
package-business-analysis/pages/business-overview-experience/business-overview-experience.wxml

@@ -80,7 +80,7 @@
 		</view>
 		</view>
 	</view>
 	</view>
 	<view wx:if="{{integral > 0}}" class="view-margin" style="text-align: right;margin-top: 35rpx;">
 	<view wx:if="{{integral > 0}}" class="view-margin" style="text-align: right;margin-top: 35rpx;">
-		减{{integral}}云币
+		减{{integral}}云币
 		<dk-tip slot="label-icon" style="display: inline-block;" id="tipIntegral" Up="{{true}}" Left="{{true}}" tipContent='每{{integralTacticItem.exchangeRate}}云币等于1人民币' bind:clickTip="closeAllTips" />
 		<dk-tip slot="label-icon" style="display: inline-block;" id="tipIntegral" Up="{{true}}" Left="{{true}}" tipContent='每{{integralTacticItem.exchangeRate}}云币等于1人民币' bind:clickTip="closeAllTips" />
 	</view>
 	</view>
 	<view wx:if="{{couponList.length > 0 && factAmt > 0 }}" class="view-margin" style="text-align: right;margin-top: 35rpx;">
 	<view wx:if="{{couponList.length > 0 && factAmt > 0 }}" class="view-margin" style="text-align: right;margin-top: 35rpx;">