| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HDotCheckItemID: checkStatus.data[0].HItemID, |
| | | HDotCheckItem: checkStatus.data[0].ç¹æ£é¡¹ç®åç§° |
| | | }); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | if (checkStatus.data.length === 1) { |
| | | //åæ¥æ´æ°è¡¨æ ¼åç¼å对åºçå¼ |
| | | obj.update({ |
| | | HDotCheckItemID: checkStatus.data[0].HItemID, |
| | | HDotCheckItem: checkStatus.data[0].ç¹æ£é¡¹ç®åç§° |
| | | }); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } else { |
| | | //(å¤éè¡) |
| | | //å°åæè¡¨ä½æ°æ®åå
¥æ°ç» |
| | | var tableBak = table.cache["mainTable"]; //è·åä¹åç¼è¾è¿çè¡¨æ ¼æ°æ® |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < tableBak.length; i++) { |
| | | if (tableBak[i]["HDotCheckItemID"] != 0 && tableBak[i]["HDotCheckItemID"] != "" && tableBak[i]["HDotCheckItemID"] != undefined && tableBak[i]["HDotCheckItemID"] != null) { |
| | | buttonArr.push(tableBak[i]); //妿å
³é®å段ä¸ä¸ºç©ºï¼åå°ä¹åçæ°æ®åå¨ |
| | | } |
| | | } |
| | | //å°æ¹ééæ©çæ°æ®åå
¥æ°ç»ï¼å¤éè¡ï¼ |
| | | for (var i = 0; i < checkStatus.data.length; i++) { |
| | | buttonArr.push({ "HDotCheckItemID": checkStatus.data[i].HItemID, "HDotCheckItem": checkStatus.data[i].ç¹æ£é¡¹ç®åç§°, "HDotCheckPart": "", "HClaim": "", "HManagerID": sessionStorage["HEmpID"], "HManagerNumber": sessionStorage["HEmpNumber"], "HManagerName": sessionStorage["HEmpName"], "HRemark": "" }); |
| | | } |
| | | |
| | | table.reload("mainTable", { |
| | | data: buttonArr //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | }) |
| | | |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | |
| | | function set_EditFromGrid() { |
| | | set_EditForm(linterid); //ç¼è¾è·å表头 |
| | | set_EditGrid(linterid); //ç¼è¾è·åè¡¨ä½ |
| | | option.data = [{ "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": "0", "HManagerNumber": "", "HManagerName": "", "HRemark": "" }]; |
| | | option.data = [{ "HDotCheckItemID": 0, "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": "0", "HManagerNumber": "", "HManagerName": "", "HRemark": "" }]; |
| | | table.render(option); |
| | | |
| | | } |
| | |
| | | data: { "sqlWhere": "and hmainid=" + linterid }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | option.data = result.data; |
| | | var data = result.data; |
| | | var rowarr = []; |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | rowarr.push({ "HDotCheckItemID": data[i].ç¹æ£é¡¹ç®ID, "HDotCheckItem": data[i].ç¹æ£é¡¹ç®, "HDotCheckPart": data[i].ç¹æ£é¨ä½, "HClaim": data[i].å
·ä½è¦æ±, "HManagerID": data[i].è´è´£äººID, "HManagerNumber": data[i].è´è´£äººä»£ç , "HManagerName": data[i].è´è´£äºº, "HRemark": data[i].å夿³¨ }); |
| | | } |
| | | option.data = rowarr; |
| | | table.render(option); |
| | | |
| | | } else { |