Browse Source

奖励配置完善

lcl 6 months ago
parent
commit
ad9bf7cf4f

+ 16 - 1
src/views/pri/priList/components/add/index.vue

@@ -43,6 +43,7 @@ let UpdateForm = ref({
   prizeContent: "", //奖励内容
   requestParamField: "", //入参字段
   prizeSourceField: "", //奖励金额来源数据
+  prizeSourceFieldType: "", //奖励金额来源数据类型
 
 
 });
@@ -72,6 +73,11 @@ const kindOptionList = [
   { id: 'order', label: '订单奖励' },
   { id: 'reserve', label: '额度返还' },
 ]
+// 奖励金额来源数据类型
+const prizeSourceFieldTypeOptionList = [
+  { id: 'condi', label: '条件返回字段' },
+  { id: 'loop', label: '循环递归返回字段' },
+]
 
 // 选项卡参数(默认值为列表某项的id)
 const activeId = ref('1')
@@ -108,6 +114,7 @@ const submit = async (formEl) => {
           prizeContent: "", //奖励内容
           requestParamField: "", //入参字段
           prizeSourceField: "", //奖励金额来源数据
+          prizeSourceFieldType: "", //奖励金额来源数据类型
 
         };
         // 关闭新增弹窗;
@@ -170,6 +177,7 @@ const closeVisible = () => {
     prizeContent: "", //奖励内容
     requestParamField: "", //入参字段
     prizeSourceField: "", //奖励金额来源数据
+    prizeSourceFieldType: "", //奖励金额来源数据类型
 
   };
   closeFn();
@@ -204,7 +212,7 @@ const isFullscreen = ref(false)
         el-input-number(v-model='UpdateForm.prizePercent' :min="0" :max="1000"
           placeholder="请输入奖励比例")
       el-form-item(label='奖励固定金额' prop="prizeAmount")
-        el-input-number(v-model='UpdateForm.prizeAmount' :min="0" :max="1000"
+        el-input-number(v-model='UpdateForm.prizeAmount' :min="0" :max="100000"
           placeholder="请输入奖励固定金额")
       el-form-item(label="条件模式", prop="conditionMode")
         el-select(
@@ -228,6 +236,13 @@ const isFullscreen = ref(false)
       el-form-item(label='奖励金额来源数据' prop="prizeSourceField")
         el-input(v-model='UpdateForm.prizeSourceField' autocomplete='off'
           placeholder="请输入奖励金额来源数据")
+      el-form-item(label="奖励金额来源数据类型", prop="prizeSourceFieldType")
+        el-select(
+          v-model="UpdateForm.prizeSourceFieldType",
+          placeholder="请选择奖励金额来源数据类型",
+          clearable,
+        )
+          el-option(:label="item.label", :value="item.id" v-for="(item,index) in prizeSourceFieldTypeOptionList")
 
     .flex.justify-end
       el-button(

+ 16 - 1
src/views/pri/priList/components/updatePriList/index.vue

@@ -40,6 +40,7 @@ const UpdateForm: any = ref({
   prizeContent: "", //奖励内容
   requestParamField: "", //入参字段
   prizeSourceField: "", //奖励金额来源数据
+  prizeSourceFieldType: "", //奖励金额来源数据类型
 
 });
 // 条件模式选项数据
@@ -62,6 +63,11 @@ const kindOptionList = [
   { id: 'order', label: '订单奖励' },
   { id: 'reserve', label: '额度返还' },
 ]
+// 奖励金额来源数据类型
+const prizeSourceFieldTypeOptionList = [
+  { id: 'condi', label: '条件返回字段' },
+  { id: 'loop', label: '循环递归返回字段' },
+]
 
 // 表单实例
 const ruleFormRef = ref()
@@ -100,6 +106,7 @@ const submit = async (formEl) => {
           prizeContent: "", //奖励内容
           requestParamField: "", //入参字段
           prizeSourceField: "", //奖励金额来源数据
+          prizeSourceFieldType: "", //奖励金额来源数据类型
 
         };
         // 关闭修改弹窗;
@@ -163,6 +170,7 @@ const closeUpdatePriListVisible = () => {
     prizeContent: "", //奖励内容
     requestParamField: "", //入参字段
     prizeSourceField: "", //奖励金额来源数据
+    prizeSourceFieldType: "", //奖励金额来源数据类型
 
   };
   closeFn();
@@ -193,7 +201,7 @@ const isFullscreen = ref(false)
         el-input-number(v-model='UpdateForm.prizePercent' :min="0" :max="1000"
           placeholder="请输入奖励比例")
       el-form-item(label='奖励固定金额' prop="prizeAmount")
-        el-input-number(v-model='UpdateForm.prizeAmount' :min="0" :max="1000"
+        el-input-number(v-model='UpdateForm.prizeAmount' :min="0" :max="100000"
           placeholder="请输入奖励固定金额")
       el-form-item(label="条件模式", prop="conditionMode")
         el-select(
@@ -217,6 +225,13 @@ const isFullscreen = ref(false)
       el-form-item(label='奖励金额来源数据' prop="prizeSourceField")
         el-input(v-model='UpdateForm.prizeSourceField' autocomplete='off'
           placeholder="请输入奖励金额来源数据")
+      el-form-item(label="奖励金额来源数据类型", prop="prizeSourceFieldType")
+        el-select(
+          v-model="UpdateForm.prizeSourceFieldType",
+          placeholder="请选择奖励金额来源数据类型",
+          clearable,
+        )
+          el-option(:label="item.label", :value="item.id" v-for="(item,index) in prizeSourceFieldTypeOptionList")
 
     .flex.justify-end
       el-button(

+ 6 - 0
src/views/pri/priRecursionStartCondition/components/add/index.vue

@@ -41,6 +41,7 @@ let UpdateForm = ref({
   fieldQueryValueType: "", //匹配值类型
   prizePercent: "", //奖励比例
   prizeAmount: "", //奖励固定金额
+  startIndex: "", //开始层级
 
 
 });
@@ -101,6 +102,7 @@ const submit = async (formEl) => {
           fieldQueryValueType: "", //匹配值类型
           prizePercent: "", //奖励比例
           prizeAmount: "", //奖励固定金额
+          startIndex: "", //开始层级
 
         };
         // 关闭新增弹窗;
@@ -152,6 +154,7 @@ const closeVisible = () => {
     fieldQueryValueType: "", //匹配值类型
     prizePercent: "", //奖励比例
     prizeAmount: "", //奖励固定金额
+    startIndex: "", //开始层级
 
   };
   closeFn();
@@ -172,6 +175,9 @@ const isFullscreen = ref(false)
           clearable,
         )
           el-option(:label="item.tableEnName", :value="item.id" v-for="(item,index) in loopSetIdOptionList")
+      el-form-item(label='开始层级' prop="startIndex")
+        el-input-number(v-model='UpdateForm.startIndex' :min="0" :max="100000"
+          placeholder="请输入开始层级")
       el-form-item(label='条件返回字段' prop="returnFieldId")
         el-input(v-model='UpdateForm.returnFieldId' autocomplete='off'
           placeholder="请输入条件返回字段")

+ 6 - 0
src/views/pri/priRecursionStartCondition/components/updatePriRecursionStartCondition/index.vue

@@ -38,6 +38,7 @@ const UpdateForm: any = ref({
   fieldQueryValueType: "", //匹配值类型
   prizePercent: "", //奖励比例
   prizeAmount: "", //奖励固定金额
+  startIndex: "", //开始层级
 
 });
 // 匹配条件选项数据
@@ -93,6 +94,7 @@ const submit = async (formEl) => {
           fieldQueryValueType: "", //匹配值类型
           prizePercent: "", //奖励比例
           prizeAmount: "", //奖励固定金额
+          startIndex: "", //开始层级
 
         };
         // 关闭修改弹窗;
@@ -145,6 +147,7 @@ const closeUpdatePriRecursionStartConditionVisible = () => {
     fieldQueryValueType: "", //匹配值类型
     prizePercent: "", //奖励比例
     prizeAmount: "", //奖励固定金额
+    startIndex: "", //开始层级
 
   };
   closeFn();
@@ -161,6 +164,9 @@ const isFullscreen = ref(false)
       el-form-item(label='ID' prop="id")
         el-input-number(v-model='UpdateForm.id' :min="0" :max="100000"
           placeholder="请输入ID")
+      el-form-item(label='开始层级' prop="startIndex")
+        el-input-number(v-model='UpdateForm.startIndex' :min="0" :max="100000"
+          placeholder="请输入开始层级")
       el-form-item(label='条件返回字段' prop="returnFieldId")
         el-input(v-model='UpdateForm.returnFieldId' autocomplete='off'
           placeholder="请输入条件返回字段")

+ 5 - 0
src/views/pri/priRecursionStartCondition/hook.tsx

@@ -54,6 +54,11 @@ export function usePriRecursionStartCondition() {
       prop: "loopSetId",
       minWidth: 200
     },
+    {
+      label: "开始层级",
+      prop: "startIndex",
+      minWidth: 200
+    },
     {
       label: "条件返回字段",
       prop: "returnFieldId",