From f7bb7e16d29508a3f0642710d9d0ed149f8ee660 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 31 五月 2024 13:13:18 +0800
Subject: [PATCH] 工序:新增/编辑 时,选着检验方案后,保存失败; 检验方案:回显分析方法、缺陷等级 、破坏性检验、重点检查; 工序检验单:选择抽样方案后关闭弹框; 产品器具清单:增加工序字段; 维修记录单维护:初始化日期; 维修验收单维护:列表 显示 验收项目 显示不对,编辑 时,子表 验收项目 回显 数据不对
---
WebTM/views/质量管理/检验方案单/QC_Add_CheckProject.html | 45 ++++++++++++++++++++++++++++++++-------------
1 files changed, 32 insertions(+), 13 deletions(-)
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\243\200\351\252\214\346\226\271\346\241\210\345\215\225/QC_Add_CheckProject.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\243\200\351\252\214\346\226\271\346\241\210\345\215\225/QC_Add_CheckProject.html"
index 03f2025..de74e89 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\243\200\351\252\214\346\226\271\346\241\210\345\215\225/QC_Add_CheckProject.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\346\243\200\351\252\214\346\226\271\346\241\210\345\215\225/QC_Add_CheckProject.html"
@@ -534,7 +534,7 @@
Pub_Close(2);
} else {
Pub_Close(1);
- }
+ }
//var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
//parent.layer.close(index); //鍐嶆墽琛屽叧闂�
});
@@ -943,7 +943,7 @@
, done: function (res, curr, count) {
}
- };
+ };
}
//淇濆瓨
@@ -1235,18 +1235,23 @@
//澧炲姞涓�琛�
function btnAddLine(NewRow) {
- //table.cache["mainTable"].push(NewRow);
- //option.data = table.cache["mainTable"];
- //table.render(option);
- var tableBak = table.cache["mainTable"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁
- buttonArr = [];//娓呯┖鏁扮粍
- for (var i = 0; i < tableBak.length; i++) {
- buttonArr.push(tableBak[i]); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ table.cache["mainTable"].push(NewRow);
+ option.data = table.cache["mainTable"];
+ table.render(option);
+ for (var i = 1; i <= option.data.length; i++) {
+ $('#HAnalysisMethod' + i + '').find("option[value='" + option.data[i - 1].HAnalysisMethod + "']").attr("selected", true);
+ $('#HDefectLevel' + i + '').find("option[value='" + option.data[i - 1].HDefectLevel + "']").attr("selected", true);
+ $('#HStatus' + i + '').find("option[value='" + option.data[i - 1].HStatus + "']").attr("selected", true);
+
+ if (option.data[i - 1].HDestructInspect) {
+ $('#HDestructInspect' + i + '').attr("checked", true);
+ }
+ if (option.data[i - 1].HKeyInspect) {
+ $('#HKeyInspect' + i + '').attr("checked", true);
+ }
}
- buttonArr.push(NewRow); //鍦ㄥ熬閮ㄥ姞涓�琛�
- table.reload("mainTable", {
- data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
- })
+ form.render('select');
+ form.render('checkbox');
}
//澶嶅埗涓�琛�
@@ -1264,6 +1269,20 @@
table.cache["mainTable"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+ for (var i = 1; i <= option.data.length; i++) {
+ $('#HAnalysisMethod' + i + '').find("option[value='" + option.data[i - 1].HAnalysisMethod + "']").attr("selected", true);
+ $('#HDefectLevel' + i + '').find("option[value='" + option.data[i - 1].HDefectLevel + "']").attr("selected", true);
+ $('#HStatus' + i + '').find("option[value='" + option.data[i - 1].HStatus + "']").attr("selected", true);
+
+ if (option.data[i - 1].HDestructInspect) {
+ $('#HDestructInspect' + i + '').attr("checked", true);
+ }
+ if (option.data[i - 1].HKeyInspect) {
+ $('#HKeyInspect' + i + '').attr("checked", true);
+ }
+ }
+ form.render('select');
+ form.render('checkbox');
}
}
--
Gitblit v1.9.1