Procházet zdrojové kódy

成本管理,计算模板,导出

MaiXinRong před 2 měsíci
rodič
revize
c488514bea
1 změnil soubory, kde provedl 6 přidání a 3 odebrání
  1. 6 3
      app/public/js/cost_tmpl.js

+ 6 - 3
app/public/js/cost_tmpl.js

@@ -190,8 +190,11 @@ $(document).ready(() => {
                     if (exist) {
                         toastr.warning('请勿输入重复的计算代号');
                     } else {
-                        select.calc_code = validText;
-                        select.field = 'num_' + select.calc_code.toLowerCase();
+                        const typeInfo = validColInfo.find(x => { return x.key === select.type; });
+                        if (typeInfo.type === 'num') {
+                            select.calc_code = validText;
+                            select.field = 'num_' + select.calc_code.toLowerCase();
+                        }
                     }
                 } else if (col.field === 'width') {
                     select.width = parseInt(validText);
@@ -471,7 +474,7 @@ $(document).ready(() => {
             return this.colSetData;
         }
         export() {
-            window.open(`template/ctd?tid=${this.template.id}`);
+            window.open(`/template/ctd?tid=${this.template.id}`);
         }
         import() {
             const self = this;