| | |
| | | <!--<a class="layui-btn layui-btn-xs" lay-event="edit">ç¼è¾</a>--> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | <!--项ç®ç»ç--> |
| | | <script type="text/html" id="HIsPM"> |
| | | <div class="layui-input-block" style="margin-left: 20px;"> |
| | | <input type="checkbox" name="HIsPM" lay-filter="HIsPM" id="HIsPM{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary"> |
| | | </div> |
| | | </script> |
| | | <script> |
| | | |
| | | layui.config({ |
| | |
| | | |
| | | //#region å¤æå¹¶è®¾ç½®æä½ç±»åã页é¢åå§å |
| | | if (OperationType == null || OperationType == 1) { //æ°å¢ |
| | | //ç¦ç¨ç»ç»é项 |
| | | $("#HOrgID").attr("disabled", true); |
| | | OperationType = 1; |
| | | //çæå¹¶è®¾ç½®ä¸»è¡¨çå
ç ååæ®å· |
| | | createBillNo(); |
| | |
| | | //#region æ¯å¦éç¨ç¢ |
| | | form.on('checkbox(checkboxHIsKey)', function (data) { |
| | | $("#HIsKey").val(data.elem.checked); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region 项ç®ç»ç |
| | | form.on('checkbox(HIsPM)', function (data) { |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TABLE_INDEX == dataindex) { |
| | | value.HIsPM = data.elem.checked;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | //#endregion |
| | |
| | | }) |
| | | //#endregion |
| | | |
| | | |
| | | |
| | | // |
| | | form.on('submit(Cancel)', function () { |
| | | //sessionStorage["SourceFlag"] = false; |
| | |
| | | , { field: 'RowID', title: 'è¡å·', hide: true } //è¡æ è¯ï¼ç¨äºä¸ä¸è¡ãä¸ä¸è¡è¯å«æå¨è¡ |
| | | , { field: 'HEmpID', title: 'æåID', hide: true } |
| | | , { field: 'HEmpName', title: 'æå', edit: 'text', event: "HEmpName" } //f7 |
| | | , { field: 'HIsPM', title: '项ç®ç»ç', edit: 'text' } |
| | | , { field: 'HIsPM', title: '项ç®ç»ç', templet: "#HIsPM" } |
| | | , { field: 'HRate', title: '项ç®å æ¯', hide: true } |
| | | , { field: 'HAvgMoney', title: 'åé
ä¸ç»©', edit: 'text' } |
| | | , { field: 'HCountMoney', title: 'ææ', edit: 'text' } |
| | |
| | | num.push(table.cache["mainTable"][i]) |
| | | } |
| | | } |
| | | |
| | | //è·åç»ç»æ°æ® |
| | | data.field.HPRDORGID = sessionStorage["OrganizationID"];//ç»ç» |
| | | //转æ¢éç¨ç¢æ°æ® |
| | |
| | | } |
| | | //ç»ç»çå¼HOrgIDååï¼éæ°æ¸²æ |
| | | HOrgIDBar = tableMain[0]["HOrgID"]; |
| | | |
| | | var HIsKey = tableMain[0].HIsKey; |
| | | if (HIsKey) { |
| | | $("input[name='checkboxHIsKey'][value='" + HIsKey + "']").attr("checked", true); |
| | | } |
| | | |
| | | //å表 èµå¼ |
| | | for (var i = 0; i < tableSub.length; i++) { |
| | | tableSub[i].HIsPM = (tableSub[i].HIsPM) ? 1 : 0; |
| | | } |
| | | |
| | | //å表 |
| | | option.data = tableSub; |
| | | table.render(option); |
| | | //对å表ä¸ç项ç®ç»çå¤éæ¡è¿è¡éä¸ |
| | | for (var i = 0; i < tableSub.length; i++) { |
| | | if (tableSub[i].HIsPM) { |
| | | $('#HIsPM' + (i + 1)).attr("checked", true); |
| | | } |
| | | } |
| | | form.render('checkbox'); |
| | | |
| | | } |
| | | }) |
| | | } |
| | |
| | | layer.msg("æ±æ¥äººæ²¡æéæ©!"); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | //æ¬é¶æ®µä¸ç»©å æ¯æ ¼å¼æ£éª |
| | | var HRate1 = $("#HRate").val() + ""; |
| | | if (HRate1.substring(HRate1.length - 1, HRate1.length) == ".") { |
| | |
| | | } |
| | | |
| | | //æ¯å¦é¡¹ç®ç»çæ ¼å¼æ£éª |
| | | if (option.data[i]["HIsPM"] != "1" && option.data[i]["HIsPM"]!= '0') { |
| | | if (option.data[i]["HIsPM"] != "1" && option.data[i]["HIsPM"] != '0') { |
| | | layer.msg("第" + (i + 1) + "è¡:æ¯å¦é¡¹ç®ç»ç请è¾å
¥0æ1!"); |
| | | return false; |
| | | } |