浏览代码

2024.07.08
- 组合活动配置页修改活动配置类型字段判断展示;
- 等级分佣页增加加盟商和社区店规则相关字段;

zweiqin 9 月之前
父节点
当前提交
d43bdf50de

+ 10 - 5
src/views/active/combinationActivityConfiguration/components/DetailModal.vue

@@ -29,11 +29,16 @@
         </div>
       </el-form-item>
       <el-form-item label="活动配置类型" prop="configType">
-        <span v-if="formData.configType === 1">升级角色</span>
-        <span v-else-if="formData.configType === 2">分佣</span>
-        <span v-else-if="formData.configType === 3">社区服务</span>
-        <span v-else-if="formData.configType === 4">赠送代金券</span>
-        <span v-else-if="formData.configType === 5">赠送消费金</span>
+        <span v-if="formData.configType === 1">升级活动</span>
+        <span v-else-if="formData.configType === 2">分佣活动</span>
+        <span v-else-if="formData.configType === 3">社区活动</span>
+        <span v-else-if="formData.configType === 4">赠券活动</span>
+        <span v-else-if="formData.configType === 5">赠金活动</span>
+        <span v-else-if="formData.configType === 6">商圈订单</span>
+        <span v-else-if="formData.configType === 7">爆品家具</span>
+        <span v-else-if="formData.configType === 8">社区订单</span>
+        <span v-else-if="formData.configType === 9">用户代金券转增</span>
+        <span v-else-if="formData.configType === 10">商家代金券转赠</span>
         <span v-else>--</span>
       </el-form-item>
       <el-form-item label="是否参与" prop="joinRole">

+ 10 - 5
src/views/active/combinationActivityConfiguration/components/EditModal.vue

@@ -14,11 +14,16 @@
           v-model="formData.configType" clearable size="mini" placeholder="请选择活动类型"
           @change="formData.roleType = formData.ruleId = formData.joinRule = formData.joinMoney = ''"
         >
-          <el-option label="升级角色" :value="1" />
-          <el-option label="分佣" :value="2" />
-          <el-option label="社区服务" :value="3" />
-          <el-option label="赠送代金券" :value="4" />
-          <el-option label="赠送消费金" :value="5" />
+          <el-option label="升级活动" :value="1" />
+          <el-option label="分佣活动" :value="2" />
+          <el-option label="社区活动" :value="3" />
+          <el-option label="赠券活动" :value="4" />
+          <el-option label="赠金活动" :value="5" />
+          <el-option label="商圈订单" :value="6" />
+          <el-option label="爆品家具" :value="7" />
+          <el-option label="社区订单" :value="8" />
+          <el-option label="用户代金券转增" :value="9" />
+          <el-option label="商家代金券转赠" :value="10" />
         </el-select>
       </el-form-item>
       <el-form-item label="是否参与" prop="joinRole">

+ 20 - 10
src/views/active/combinationActivityConfiguration/index.vue

@@ -6,11 +6,16 @@
         v-model="listQuery.configType" clearable size="mini" class="filter-item"
         style="width: 200px;" placeholder="请选择活动配置类型"
       >
-        <el-option label="升级角色" :value="1" />
-        <el-option label="分佣" :value="2" />
-        <el-option label="社区服务" :value="3" />
-        <el-option label="赠送代金券" :value="4" />
-        <el-option label="赠送消费金" :value="5" />
+        <el-option label="升级活动" :value="1" />
+        <el-option label="分佣活动" :value="2" />
+        <el-option label="社区活动" :value="3" />
+        <el-option label="赠券活动" :value="4" />
+        <el-option label="赠金活动" :value="5" />
+        <el-option label="商圈订单" :value="6" />
+        <el-option label="爆品家具" :value="7" />
+        <el-option label="社区订单" :value="8" />
+        <el-option label="用户代金券转增" :value="9" />
+        <el-option label="商家代金券转赠" :value="10" />
       </el-select>
       <el-button
         size="mini" class="filter-item" type="primary" icon="el-icon-search"
@@ -51,11 +56,16 @@
         </el-table-column>
         <el-table-column align="center" width="110" label="活动配置类型" prop="configType">
           <template slot-scope="{ row }">
-            <el-tag v-if="row.configType === 1" effect="plain">升级角色</el-tag>
-            <el-tag v-else-if="row.configType === 2" effect="plain">分佣</el-tag>
-            <el-tag v-else-if="row.configType === 3" effect="plain">社区服务</el-tag>
-            <el-tag v-else-if="row.configType === 4" effect="plain">赠送代金券</el-tag>
-            <el-tag v-else-if="row.configType === 5" effect="plain">赠送消费金</el-tag>
+            <el-tag v-if="row.configType === 1" effect="plain">升级活动</el-tag>
+            <el-tag v-else-if="row.configType === 2" effect="plain">分佣活动</el-tag>
+            <el-tag v-else-if="row.configType === 3" effect="plain">社区活动</el-tag>
+            <el-tag v-else-if="row.configType === 4" effect="plain">赠券活动</el-tag>
+            <el-tag v-else-if="row.configType === 5" effect="plain">赠金活动</el-tag>
+            <el-tag v-else-if="row.configType === 6" effect="plain">商圈订单</el-tag>
+            <el-tag v-else-if="row.configType === 7" effect="plain">爆品家具</el-tag>
+            <el-tag v-else-if="row.configType === 8" effect="plain">社区订单</el-tag>
+            <el-tag v-else-if="row.configType === 9" effect="plain">用户代金券转增</el-tag>
+            <el-tag v-else-if="row.configType === 10" effect="plain">商家代金券转赠</el-tag>
             <span v-else>--</span>
           </template>
         </el-table-column>

+ 24 - 0
src/views/commissionAllocation/gradeCommission/components/DetailModal.vue

@@ -49,6 +49,22 @@
       <el-form-item label="间接合伙人规则" prop="partnerInMoney">
         {{ formData.partnerInMoney }}
       </el-form-item>
+      <el-form-item label="加盟商规则" prop="franchiseeRule">
+        <span v-if="formData.franchiseeRule === 1">比例</span>
+        <span v-else-if="formData.franchiseeRule === 2">金额</span>
+        <span v-else>--</span>
+      </el-form-item>
+      <el-form-item label="加盟商佣金规则" prop="franchiseeMoney">
+        {{ formData.franchiseeMoney }}
+      </el-form-item>
+      <el-form-item label="社区店规则" prop="communityRule">
+        <span v-if="formData.communityRule === 1">比例</span>
+        <span v-else-if="formData.communityRule === 2">金额</span>
+        <span v-else>--</span>
+      </el-form-item>
+      <el-form-item label="社区店佣金规则" prop="communityMoney">
+        {{ formData.communityMoney }}
+      </el-form-item>
       <el-form-item label="分佣来源" prop="sourceType">
         <span v-if="formData.sourceType === 1">订单金额</span>
         <span v-else-if="formData.sourceType === 2">赠送代金券</span>
@@ -89,6 +105,10 @@ export default {
         partnerRule: '',
         partnerMoney: '',
         partnerInMoney: '',
+        franchiseeRule: '',
+        franchiseeMoney: '',
+        communityRule: '',
+        communityMoney: '',
         sourceType: '',
         createTime: '',
         updateTime: ''
@@ -121,6 +141,10 @@ export default {
           partnerRule: res.data.partnerRule || '',
           partnerMoney: res.data.partnerMoney,
           partnerInMoney: res.data.partnerInMoney,
+          franchiseeRule: res.data.franchiseeRule || '',
+          franchiseeMoney: res.data.franchiseeMoney,
+          communityRule: res.data.communityRule || '',
+          communityMoney: res.data.communityMoney,
           sourceType: res.data.sourceType || '',
           createTime: res.data.createTime || '',
           updateTime: res.data.updateTime || ''

+ 62 - 10
src/views/commissionAllocation/gradeCommission/components/EditModal.vue

@@ -24,16 +24,16 @@
           <el-option label="金额" :value="2" />
         </el-select>
       </el-form-item>
-      <el-form-item label="直接团长规则" prop="leadersMoney">
-        <el-input v-model="formData.leadersMoney" placeholder="请输入直接团长规则" style="width: 150px;">
+      <el-form-item v-if="formData.leadersRule" label="直接团长规则" prop="leadersMoney">
+        <el-input v-model="formData.leadersMoney" placeholder="请输入直接团长规则" style="width: 250px;">
           <template #append>
             <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;">
+      <el-form-item v-if="formData.leadersRule" label="间接团长规则" prop="leadersInMoney">
+        <el-input v-model="formData.leadersInMoney" placeholder="请输入间接团长规则" style="width: 250px;">
           <template #append>
             <div v-if="formData.leadersRule === 1">%</div>
             <div v-else-if="formData.leadersRule === 2">元</div>
@@ -46,22 +46,50 @@
           <el-option label="金额" :value="2" />
         </el-select>
       </el-form-item>
-      <el-form-item label="直接合伙人规则" prop="partnerMoney">
-        <el-input v-model="formData.partnerMoney" placeholder="请输入直接合伙人规则" style="width: 150px;">
+      <el-form-item v-if="formData.partnerRule" label="直接合伙人规则" prop="partnerMoney">
+        <el-input v-model="formData.partnerMoney" placeholder="请输入直接合伙人规则" style="width: 250px;">
           <template #append>
             <div v-if="formData.partnerRule === 1">%</div>
             <div v-else-if="formData.partnerRule === 2">元</div>
           </template>
         </el-input>
       </el-form-item>
-      <el-form-item label="间接合伙人规则" prop="partnerInMoney">
-        <el-input v-model="formData.partnerInMoney" placeholder="请输入间接合伙人规则" style="width: 150px;">
+      <el-form-item v-if="formData.partnerRule" label="间接合伙人规则" prop="partnerInMoney">
+        <el-input v-model="formData.partnerInMoney" placeholder="请输入间接合伙人规则" style="width: 250px;">
           <template #append>
             <div v-if="formData.partnerRule === 1">%</div>
             <div v-else-if="formData.partnerRule === 2">元</div>
           </template>
         </el-input>
       </el-form-item>
+      <el-form-item label="加盟商规则" prop="franchiseeRule">
+        <el-select v-model="formData.franchiseeRule" size="mini" placeholder="请选择加盟商规则">
+          <el-option label="比例" :value="1" />
+          <el-option label="金额" :value="2" />
+        </el-select>
+      </el-form-item>
+      <el-form-item v-if="formData.franchiseeRule" label="加盟商佣金规则" prop="franchiseeMoney">
+        <el-input v-model="formData.franchiseeMoney" placeholder="请输入加盟商佣金规则" style="width: 250px;">
+          <template #append>
+            <div v-if="formData.franchiseeRule === 1">%</div>
+            <div v-else-if="formData.franchiseeRule === 2">元</div>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="社区店规则" prop="communityRule">
+        <el-select v-model="formData.communityRule" size="mini" placeholder="请选择社区店规则">
+          <el-option label="比例" :value="1" />
+          <el-option label="金额" :value="2" />
+        </el-select>
+      </el-form-item>
+      <el-form-item v-if="formData.communityRule" label="社区店佣金规则" prop="communityMoney">
+        <el-input v-model="formData.communityMoney" placeholder="请输入社区店佣金规则" style="width: 250px;">
+          <template #append>
+            <div v-if="formData.communityRule === 1">%</div>
+            <div v-else-if="formData.communityRule === 2">元</div>
+          </template>
+        </el-input>
+      </el-form-item>
       <el-form-item label="分佣来源" prop="sourceType">
         <el-select v-model="formData.sourceType" size="mini" placeholder="请选择分佣来源">
           <el-option label="订单金额" :value="1" />
@@ -105,6 +133,10 @@ export default {
         partnerRule: '',
         partnerMoney: '',
         partnerInMoney: '',
+        franchiseeRule: '',
+        franchiseeMoney: '',
+        communityRule: '',
+        communityMoney: '',
         sourceType: ''
       },
       formRules: {
@@ -136,6 +168,14 @@ export default {
           { required: false, message: '请输入间接合伙人规则' },
           { pattern: /^0\.\d{0,2}$|^[1-9]\d*\.\d{0,2}$|^[1-9]\d*$/, message: '数值有误' }
         ],
+        franchiseeMoney: [
+          { required: false, message: '请输入间接合伙人规则' },
+          { pattern: /^0\.\d{0,2}$|^[1-9]\d*\.\d{0,2}$|^[1-9]\d*$/, message: '数值有误' }
+        ],
+        communityMoney: [
+          { required: false, message: '请输入间接合伙人规则' },
+          { pattern: /^0\.\d{0,2}$|^[1-9]\d*\.\d{0,2}$|^[1-9]\d*$/, message: '数值有误' }
+        ],
         sourceType: [
           { required: true, message: '请选择分佣来源' }
         ]
@@ -163,6 +203,10 @@ export default {
         partnerRule: params.partnerRule || '',
         partnerMoney: (params.partnerRule === 1) && (typeof params.partnerMoney === 'number') ? params.partnerMoney * 100 : params.partnerMoney,
         partnerInMoney: (params.partnerRule === 1) && (typeof params.partnerInMoney === 'number') ? params.partnerInMoney * 100 : params.partnerInMoney,
+        franchiseeRule: params.franchiseeRule || '',
+        franchiseeMoney: (params.franchiseeRule === 1) && (typeof params.franchiseeMoney === 'number') ? params.franchiseeMoney * 100 : params.franchiseeMoney,
+        communityRule: params.communityRule || '',
+        communityMoney: (params.communityRule === 1) && (typeof params.communityMoney === 'number') ? params.communityMoney * 100 : params.communityMoney,
         sourceType: params.sourceType || ''
       })
       this.visible = true
@@ -188,6 +232,10 @@ export default {
           partnerRule: res.data.partnerRule || '',
           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,
+          franchiseeRule: res.data.franchiseeRule || '',
+          franchiseeMoney: (res.data.franchiseeRule === 1) && (typeof res.data.franchiseeMoney === 'number') ? res.data.franchiseeMoney * 100 : res.data.franchiseeMoney,
+          communityRule: res.data.communityRule || '',
+          communityMoney: (res.data.communityRule === 1) && (typeof res.data.communityMoney === 'number') ? res.data.communityMoney * 100 : res.data.communityMoney,
           sourceType: res.data.sourceType || ''
         })
         this.$nextTick(() => {
@@ -202,15 +250,19 @@ export default {
         if (valid) {
           const loading = this.$loading({ text: '提交中,请稍候……' })
           try {
-            const { leadersRule, partnerRule, leadersMoney, leadersInMoney, partnerMoney, partnerInMoney, ...otps } = this.formData
+            const { leadersRule, partnerRule, leadersMoney, leadersInMoney, partnerMoney, partnerInMoney, franchiseeRule, communityRule, franchiseeMoney, communityMoney, ...otps } = this.formData
             const params = {
               ...otps,
               leadersMoney: leadersRule === 1 ? leadersMoney / 100 : leadersMoney,
               leadersInMoney: leadersRule === 1 ? leadersInMoney / 100 : leadersInMoney,
               partnerMoney: partnerRule === 1 ? partnerMoney / 100 : partnerMoney,
               partnerInMoney: partnerRule === 1 ? partnerInMoney / 100 : partnerInMoney,
+              franchiseeMoney: franchiseeRule === 1 ? franchiseeMoney / 100 : franchiseeMoney,
+              communityMoney: communityRule === 1 ? communityMoney / 100 : communityMoney,
               leadersRule,
-              partnerRule
+              partnerRule,
+              franchiseeRule,
+              communityRule
             }
             this.formData.ruleId ? await priceControlUpdatePlan(params) : await savePlatformBeeRule(params)
             loading.close()

+ 16 - 0
src/views/commissionAllocation/gradeCommission/index.vue

@@ -61,6 +61,22 @@
         </el-table-column>
         <el-table-column align="center" width="120" label="直接合伙人规则" prop="partnerMoney" show-overflow-tooltip />
         <el-table-column align="center" width="120" label="间接合伙人规则" prop="partnerInMoney" show-overflow-tooltip />
+        <el-table-column align="center" label="加盟商规则" prop="franchiseeRule">
+          <template slot-scope="{ row }">
+            <el-tag v-if="row.franchiseeRule === 1" type="success">比例</el-tag>
+            <el-tag v-else-if="row.franchiseeRule === 2" type="warning">金额</el-tag>
+            <span v-else>--</span>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" width="120" label="加盟商佣金规则" prop="franchiseeMoney" show-overflow-tooltip />
+        <el-table-column align="center" label="社区店规则" prop="communityRule">
+          <template slot-scope="{ row }">
+            <el-tag v-if="row.communityRule === 1" type="success">比例</el-tag>
+            <el-tag v-else-if="row.communityRule === 2" type="warning">金额</el-tag>
+            <span v-else>--</span>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" width="120" label="社区店佣金规则" prop="communityMoney" show-overflow-tooltip />
         <el-table-column align="center" label="分佣来源" prop="sourceType">
           <template slot-scope="{ row }">
             <el-tag v-if="row.sourceType === 1">订单金额</el-tag>