浏览代码

2024.05.08
- 交易金活动页增加提醒跳转等级分佣页面确认框;
- 等级分佣页编辑框的规则相关字段传参判断转换百分数;

zweiqin 11 月之前
父节点
当前提交
0cfde70e75

+ 13 - 3
src/views/active/beeCoin/index.vue

@@ -73,11 +73,11 @@
       />
     </el-dialog>
     <el-dialog
-      :title="'秒杀活动详情'" :visible.sync="activityDetailVisible" width="74%" center
+      title="秒杀活动详情" :visible.sync="activityDetailVisible" width="74%" center
       :close-on-click-modal="false"
       @close="cleanForm('activityDetailVisible')"
     >
-      <ActivityDetail :beeData="activityForm" :activclean="activityDetailVisible" />
+      <ActivityDetail :bee-data="activityForm" :activclean="activityDetailVisible" />
     </el-dialog>
   </div>
 </template>
@@ -90,7 +90,7 @@ import ActivityDetail from '@/views/active/beeCoin/component/ActivityDetail.vue'
 //   endSeckillData,
 //   delSeckillData
 // } from '@/api/active/active_seckill.js'
-import { getBeeList,stopBee,beeDelete} from '@/api/active/active_bee.js'
+import { getBeeList, stopBee, beeDelete } from '@/api/active/active_bee.js'
 export default {
   components: {
     AddActive,
@@ -215,6 +215,16 @@ export default {
     refersh(attr) {
       this[attr] = false
       this.getAll()
+      this.$confirm('需到【分佣配置】—【等级分佣】进行配置活动分佣规则', '配置分佣', {
+        confirmButtonText: '去配置',
+        cancelButtonText: '取消'
+      })
+        .then(() => {
+          this.$router.push({
+            path: '/commissionAllocation/gradeCommission'
+          })
+        })
+        .catch(() => {})
     }
   }
 }

+ 17 - 9
src/views/commissionAllocation/gradeCommission/components/EditModal.vue

@@ -33,14 +33,16 @@
       <el-form-item label="直接团长规则" prop="leadersMoney">
         <el-input v-model="formData.leadersMoney" placeholder="请输入直接团长规则" style="width: 150px;">
           <template #append>
-            <div v-if="formData.leadersRule === 1">:1</div>
+            <div v-if="formData.leadersRule === 1">%</div>
+            <div v-else-if="formData.leadersRule === 2">元</div>
           </template>
         </el-input>
       </el-form-item>
       <el-form-item label="间接团长规则" prop="leadersInMoney">
         <el-input v-model="formData.leadersInMoney" placeholder="请输入间接团长规则" style="width: 150px;">
           <template #append>
-            <div v-if="formData.leadersRule === 1">:1</div>
+            <div v-if="formData.leadersRule === 1">%</div>
+            <div v-else-if="formData.leadersRule === 2">元</div>
           </template>
         </el-input>
       </el-form-item>
@@ -53,14 +55,16 @@
       <el-form-item label="直接合伙人规则" prop="partnerMoney">
         <el-input v-model="formData.partnerMoney" placeholder="请输入直接合伙人规则" style="width: 150px;">
           <template #append>
-            <div v-if="formData.partnerRule === 1">:1</div>
+            <div v-if="formData.partnerRule === 1">%</div>
+            <div v-else-if="formData.leadersRule === 2">元</div>
           </template>
         </el-input>
       </el-form-item>
       <el-form-item label="间接合伙人规则" prop="partnerInMoney">
         <el-input v-model="formData.partnerInMoney" placeholder="请输入间接合伙人规则" style="width: 150px;">
           <template #append>
-            <div v-if="formData.partnerRule === 1">:1</div>
+            <div v-if="formData.partnerRule === 1">%</div>
+            <div v-else-if="formData.leadersRule === 2">元</div>
           </template>
         </el-input>
       </el-form-item>
@@ -171,11 +175,11 @@ export default {
           activityId: res.data.activityId || '',
           activityType: res.data.activityType || '',
           leadersRule: res.data.leadersRule || '',
-          leadersMoney: res.data.leadersMoney,
-          leadersInMoney: res.data.leadersInMoney,
+          leadersMoney: (res.data.leadersRule === 1) && (typeof res.data.leadersMoney === 'number') ? res.data.leadersMoney * 100 : res.data.leadersMoney,
+          leadersInMoney: (res.data.leadersRule === 1) && (typeof res.data.leadersInMoney === 'number') ? res.data.leadersInMoney * 100 : res.data.leadersInMoney,
           partnerRule: res.data.partnerRule || '',
-          partnerMoney: res.data.partnerMoney,
-          partnerInMoney: res.data.partnerInMoney,
+          partnerMoney: (res.data.partnerRule === 1) && (typeof res.data.partnerMoney === 'number') ? res.data.partnerMoney * 100 : res.data.partnerMoney,
+          partnerInMoney: (res.data.partnerRule === 1) && (typeof res.data.partnerInMoney === 'number') ? res.data.partnerInMoney * 100 : res.data.partnerInMoney,
           sourceType: res.data.sourceType || ''
         })
         this.$nextTick(() => {
@@ -190,8 +194,12 @@ export default {
         if (valid) {
           const loading = this.$loading({ text: '提交中,请稍候……' })
           try {
-            const { ...otps } = this.formData
+            const { leadersRule, partnerRule, leadersMoney, leadersInMoney, partnerMoney, partnerInMoney, ...otps } = this.formData
             const params = {
+              leadersMoney: leadersRule === 1 ? leadersMoney / 100 : leadersMoney,
+              leadersInMoney: leadersRule === 1 ? leadersInMoney / 100 : leadersInMoney,
+              partnerMoney: partnerRule === 1 ? partnerMoney / 100 : partnerMoney,
+              partnerInMoney: partnerRule === 1 ? partnerInMoney / 100 : partnerInMoney,
               ...otps
             }
             this.formData.ruleId ? await priceControlUpdatePlan(params) : await savePlatformBeeRule(params)