| | |
| | | <div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_SaveBill">ä¿å</button> |
| | | <button type="button" id="check-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_CheckBill">å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">éåº</button> |
| | | </div> |
| | | </div> |
| | |
| | | set_SaveBill(data); |
| | | }); |
| | | |
| | | //#region å®¡æ ¸æé® |
| | | form.on('submit(set_CheckBill)', function (data) { |
| | | set_CheckBill(1); |
| | | }); |
| | | //#endregion |
| | | |
| | | //è¡å
äºä»¶ |
| | | table.on('tool(mainTable)', function (obj) { |
| | | set_GridDelete(obj); //è¡å
å é¤ |
| | |
| | | function get_Inventory() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | if (checkStatus.data.length === 1 && data[0].HMaterID != 0) { |
| | | var HMaterID = data[0].HMaterID.toString(); |
| | | //å¼¹çªæ¹æ³ |
| | | layer.open({ |
| | |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®æ¥è¯¢ï¼'); |
| | | layer.msg('è¯·éæ©ä¸è¡æç©ææ°æ®æ¥è¯¢ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | |
| | | function get_InOutSum() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | if (checkStatus.data.length === 1 && data[0].HMaterID != 0) { |
| | | var HMaterID = data[0].HMaterID.toString(); |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®æ¥è¯¢ï¼'); |
| | | layer.msg('è¯·éæ©ä¸è¡æç©ææ°æ®æ¥è¯¢ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | |
| | | } |
| | | }); |
| | | |
| | | |
| | | //å®¡æ ¸ [1 å®¡æ ¸ã2 åå®¡æ ¸] |
| | | function set_CheckBill(num) { |
| | | var HInterID = $("#HInterID").val(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Kf_OtherInBill/CheckKf_OtherInBill', |
| | | type: "GET", |
| | | data: { "HInterID": HInterID, "Type": num, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | }); |
| | | $('#check-btn').addClass("layui-btn-disabled").attr("disabled", true);// ç¦ç¨å®¡æ ¸æé® |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //#region ä¿åæ¹æ³ |
| | | function set_SaveBill(data) { |