| | |
| | | var rowIndex = $(obj.tr).attr("data-index"); |
| | | if (obj.event === 'del') { |
| | | layer.confirm('ççå é¤è¡åï¼', function (index) { |
| | | console.log("ç´¢å¼ä¸º:" + rowIndex); |
| | | |
| | | var wait = layer.load(); |
| | | //å é¤ä¸´æ¶è¡¨æ°æ® |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Deltet_Sc_AssemblyBill_BindBarCodeTemp', |
| | | type: "GET", |
| | | data: { "HBillNo": $("#HBillNo").val(), "HBarCode": option.data[rowIndex].HBarCode, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1, time: 500 }, function () { |
| | | //å
³éå½åframe |
| | | layer.close(wait); |
| | | }); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | |
| | | |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | option.data[rowIndex].HBarCode = ""; |
| | | option.data[rowIndex].HBindingQty = 0; |
| | | //option.data[rowIndex].HMaterID = 0; |
| | | option.data[rowIndex].HMaterNumber = ""; |
| | | option.data[rowIndex].HMaterName = ""; |
| | | option.data[rowIndex].HMaterModel = ""; |
| | | option.data[rowIndex].HBarCode = ""; |
| | | |
| | | var oldData = table.cache["mainTable"]; |
| | | oldData.splice(obj.tr.data('index'), 1); |
| | | option.data = oldData; |
| | | table.render(option); |
| | | |
| | | rowarr = []; |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | rowarr.push({ |
| | | "HBarCode_P": option.data[i].HBarCode_P, "HPartsBarCode": "", "HPartsQty": option.data[i].HPartsQty, "HBindingQty": 0 |
| | | , "HMaterID": option.data[i].HMaterID, "HMaterNumber": option.data[i].HMaterNumber, "HMaterName": option.data[i].HMaterName, "HMaterModel": option.data[i].HMaterModel, "HBatchNo": "" |
| | | , "HSourceID": $("#HSourceID").val(), "HEquipID": 0, "HGroupID": $("#HGroupID").val(), "HWorkerID": $("#HEmpID").val() |
| | | , "HScanDate": new Date(), "HSourceInterID": $("#HICMOInterID").val() |
| | | , "HSourceEntryID": $("#HICMOEntryID").val(), "HSourceBillNo": $("#HICMOBillNo").val() |
| | | }); |
| | | } |
| | | |
| | | layer.close(index); |
| | | }); |
| | | } |