Browse Source

feat(sqljc): 升旗礼分数默认满分、5分步进,小程序录入页去总分与旧班级版差异

harper 9 hours ago
parent
commit
8f57c0bf3c
2 changed files with 5 additions and 14 deletions
  1. 2 6
      src/biz/bjpj/SqljcServ.java
  2. 3 8
      web/page/mp/mp_sqljc_inp.html

+ 2 - 6
src/biz/bjpj/SqljcServ.java

@@ -570,15 +570,13 @@ public class SqljcServ extends Serv {
             int code = rdIntValue(item.get("sqljcxmm"), 0);
             boolean countItem = SqljcC.isCountItem(code);
             Integer mfz = rdIntObj(item.get("mfz"));
-            Integer ckz = rdIntObj(item.get("ckz"));
             item.put("valueType", countItem ? "count" : "score");
             item.put("minValue", 0);
             if (countItem) {
                 item.put("mfz", null);
                 item.put("defaultValue", countDefaults.getOrDefault(code, 0));
             } else {
-                item.put("defaultValue", ckz != null ? ckz
-                        : (mfz == null ? 0 : mfz));
+                item.put("defaultValue", mfz == null ? 0 : mfz);
             }
         }
     }
@@ -611,9 +609,7 @@ public class SqljcServ extends Serv {
 
             Integer maxObj = rdIntObj(config.get("mfz"));
             int max = maxObj == null ? 0 : maxObj;
-            Integer ckz = rdIntObj(config.get("ckz"));
-            int value = raw == null ? (ckz == null ? max : ckz)
-                    : Integer.parseInt(raw);
+            int value = raw == null ? max : Integer.parseInt(raw);
             if (value < 0 || value > max)
                 throw new IllegalArgumentException(
                         config.get("mc") + "必须在0到" + max + "之间");

+ 3 - 8
web/page/mp/mp_sqljc_inp.html

@@ -441,11 +441,6 @@
         </div>
       </div>
 
-      <div class="score-total">
-        <span>升旗礼总分</span>
-        <strong>{{ totalFs }}</strong>
-      </div>
-      <div class="formula-note">{{ formulaNote }}</div>
       <div class="bottom-spacer"></div>
     </div>
 
@@ -668,7 +663,8 @@
 
         // 所有数字项左右都可加减:打分项限 0..MFZ,人数项只限 >= 0。Lin
         changeStep(item, step) {
-          let value = Number(item.value || 0) + step;
+          const unit = this.isScoreItem(item) ? 5 : 1;
+          let value = Number(item.value || 0) + step * unit;
           if (value < 0)
             value = 0;
           if (this.isScoreItem(item) && value > Number(item.mfz || 0))
@@ -741,7 +737,6 @@
                 "/service?ssServ=sqljc_mpSubm&ssDest=data", payload);
             this.markListRefresh();
             const savedCount = Number(result && result.classCount || this.classCount);
-            const savedScore = this.round2(result && result.zfs);
             if (this.fromList) {
               this.warnMsg = "";
               this.showToast("已同步" + savedCount + "个班级", "success");
@@ -751,7 +746,7 @@
             this.form.ms = "";
             await this.loadInit();
             this.warnMsg = "保存成功:已同步" + savedCount
-                + "个班级,升旗礼总分" + savedScore;
+                + "个班级";
             this.showToast("已同步" + savedCount + "个班级", "success");
           } catch (error) {
             console.error("[mp_sqljc_inp] 提交失败", error);