瀏覽代碼

提交测试

1
mo 3 年之前
父節點
當前提交
677253775a

+ 3 - 1
src/views/categroyManager/modals/addSenior.vue

@@ -68,11 +68,13 @@
             style="width: 650px"
             type="textarea"
             v-model="topForm.memo"
+             maxlength="50"
+              show-word-limit
             :rows="3"
           ></el-input>
         </el-form-item>
       </el-row>
-      <p style="color: red">资格调整不影响该活动学员购买次数</p>
+      <!-- <p style="color: red">资格调整不影响该活动学员购买次数</p> -->
     </el-form>
   </div>
 </template>

+ 4 - 2
src/views/categroyManager/modals/addStudentSenior.vue

@@ -54,12 +54,14 @@
             :rows="3"
             v-model="topForm.memo"
             style="width: 370px"
+             maxlength="50"
+              show-word-limit
           ></el-input>
         </el-form-item>
       </el-row>
-      <p style="color: red; margin-bottom: 20px">
+      <!-- <p style="color: red; margin-bottom: 20px">
         资格调整不影响该活动学员购买次数
-      </p>
+      </p> -->
     </el-form>
     <el-alert title="添加学员" :closable="false" class="alert" type="info" />
     <el-form

+ 2 - 0
src/views/categroyManager/modals/reduceSenior.vue

@@ -157,6 +157,8 @@
               style="width: 320px"
               :rows="3"
               v-model="form.memo"
+               maxlength="50"
+                show-word-limit
             ></el-input>
           </el-form-item>
         </el-row>

+ 1 - 0
src/views/categroyManager/modals/seniorInfo.vue

@@ -53,6 +53,7 @@ export default {
         rows: 9999,
         page: 1,
         userId: this.activeRow.userId,
+        activityId:this.$route.query.id
       });
       this.tableList = res.data.rows;
     } catch (e) {

+ 32 - 13
src/views/luckyDraw/trophyCreate.vue

@@ -23,7 +23,7 @@
       </el-form-item>
       <div v-for="(reword, index) in form.rewordList" :key="index">
         <el-row :gutter="10">
-          <el-col :span="10">
+          <el-col :span="9">
             <el-form-item
               :label="`奖品${index + 1}`"
               label-width="100PX"
@@ -98,6 +98,13 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="1">
+            <i
+              class="el-icon-delete delete"
+              v-if="!(form.rewordList.length <= 1)"
+              @click="deteleRow(reword, index)"
+            ></i>
+          </el-col>
         </el-row>
         <el-row>
           <el-form-item
@@ -177,11 +184,11 @@ export default {
         groupId: Number(this.$route.query.groupId),
         rewordList: [
           {
-            name: "",
-            chances: "",
-            stock: "",
-            isDefault: "",
-            memo: "",
+            name: null,
+            chances: null,
+            stock: null,
+            isDefault: null,
+            memo: null,
           },
         ],
       },
@@ -209,7 +216,7 @@ export default {
           isDefault: item.isDefault,
           memo: item.memo,
           chances: item.chances * 100,
-          id:item.id
+          id: item.id,
         };
       });
       console.log(arr);
@@ -226,14 +233,21 @@ export default {
       }
       this.form.rewordList.pop();
     },
+    deteleRow(row, index) {
+      let form = this.form;
+      if (form.rewordList.length <= 1) {
+        return;
+      }
+       this.form.rewordList.splice(index,1);
+    },
     onAddReword() {
       // 添加奖品
       let form = this.form;
       form.rewordList.push({
-        name: "",
-        chances: "",
-        stock: "",
-        isDefault: "",
+        name: null,
+        chances: null,
+        stock: null,
+        isDefault: null,
       });
     },
     onSubmit(formName) {
@@ -249,13 +263,13 @@ export default {
               name: item.name,
               groupId: form.groupId,
               chances: numeral(item.chances ? item.chances / 100 : 0).format(
-                "0.00"
+                "0.0000"
               ),
               stock: item.stock,
               isDefault: item.isDefault,
               memo: form.memo,
               enabled: 1,
-              id:item.id || null
+              id: item.id || null,
             });
           });
           if (chanceCount != 100) {
@@ -302,4 +316,9 @@ export default {
   width: 180px;
   border-style: dashed;
 }
+.delete {
+  font-size: 16px;
+  line-height: 40px;
+  cursor: pointer;
+}
 </style>