Browse Source

爆品分佣优化

wzy 5 months ago
parent
commit
d281b384f4

+ 6 - 2
src/views/active/combinationActivityConfiguration/components/EditModal.vue

@@ -365,7 +365,8 @@ export default {
           cardEffectiveTime: res.data.cardEffectiveTime || '',
           cardRange: res.data.cardRange || '',
           cardJson: res.data.cardJson || '',
-          cardBusinessFields: res.data.cardBusinessFields || ''
+          cardBusinessFields: res.data.cardBusinessFields || '',
+          shareRule:res.data.shareRule || ''
         })
         if (this.formData.cardJson) this.regionArrDialog = this.formData.cardJson.split(',').map((i) => [ i ])
         this.$nextTick(() => {
@@ -380,18 +381,21 @@ export default {
         if (valid) {
           const loading = this.$loading({ text: '加载中' })
           try {
-            const { joinRule, joinMoney, ...otps } = this.formData
+            const { joinRule, joinMoney,shareMoney,shareRule, ...otps } = this.formData
             const params = {
               joinMoney: joinRule === 2 ? joinMoney / 100 : joinMoney,
+              shareMoney: shareRule === 2 ? shareMoney / 100 : shareMoney,
               joinRule,
               ...otps
             }
+            console.log(params);
             this.formData.configId ? await updatePlatformComposeConfig(params) : await savePlatformComposeConfig(params)
             loading.close()
             this.$message({ message: `${this.formData.configId ? '编辑' : '添加'}成功!`, type: 'success' })
             this.$emit('success')
             this.visible = false
           } catch (e) {
+            console.log(e);
             loading.close()
           } finally {
             loading.close()