| | |
| | | return fmt; |
| | | } |
| | | |
| | | //夿ä¸ä¸ªå符串æ¯å¦ä¸ºæ¥æ |
| | | function isValidDate(dateString) { |
| | | // å°æ¥æå符串转æ¢ä¸ºæ¥æå¯¹è±¡ |
| | | var date = new Date(dateString); |
| | | // å¦æè½¬æ¢åçæ¥æä¸åæ¥æä¸ä¸è´ï¼å䏿¯æææ¥æ |
| | | return !isNaN(date.getTime()); |
| | | } |
| | | |
| | | /** |
| | | *å¤æææºè¿æ¯çµèï¼çµèè¿åtrueï¼ææºè¿åfalse |
| | | *by zgq |
| | |
| | | //æ¡å½¢ç åè½¦æ¹æ³ |
| | | function txtHBarCode_KeyDown(HBarCode) { |
| | | var BillNoType2 = HBarCode.substr(0, 2); |
| | | var BillNoType3 = HBarCode.substr(0, 3); |
| | | var BillNoType3 = HBarCode.substr(0, 5); |
| | | var BillNoType4 = HBarCode.substr(0, 4); |
| | | var BillNoType5 = HBarCode.substr(0, 8); |
| | | |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | |
| | | //å¨å
·æ¡£æ¡ |
| | | case "MJD": |
| | | case "PAK": |
| | | case "https": |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HMouldID": data.hmainid, |
| | | "HMouldNumber": data.模å
·ç¼å·, |
| | |
| | | break; |
| | | } |
| | | |
| | | if (BillNoType5.length == 8) { |
| | | BillNoType5 = BillNoType5.substr(0, 4) + "-" + BillNoType5.substr(4, 2) + "-" + BillNoType5.substr(6, 2); |
| | | } |
| | | |
| | | if (isValidDate(BillNoType5)) { |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HProcExchBillNo": data.åæ®å·, |
| | | "HProcExchInterID": data.hmainid, |
| | | "HProcExchEntryID": data.HEntryID, |
| | | "HICMOBillNo": data.ä»»å¡åå·, |
| | | "HICMOInterID": data.hicmointerid, |
| | | "HICMOEntryID": data.HICMOEntryID |
| | | }); |
| | | } |
| | | |
| | | switch (BillNoType5) { |
| | | //æµè½¬å¡ |
| | | case "GXLX": |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HProcExchBillNo": data.åæ®å·, |
| | | "HProcExchInterID": data.hmainid, |
| | | "HProcExchEntryID": data.HEntryID, |
| | | "HICMOBillNo": data.ä»»å¡åå·, |
| | | "HICMOInterID": data.hicmointerid, |
| | | "HICMOEntryID": data.HICMOEntryID |
| | | }); |
| | | break; |
| | | } |
| | | |
| | | $("#HBarCode").val(""); |
| | | layer.close(index); |
| | | } |
| | |
| | | //æ¡å½¢ç åè½¦æ¹æ³ |
| | | function txtHBarCode_KeyDown(HBarCode) { |
| | | var BillNoType2 = HBarCode.substr(0, 2); |
| | | var BillNoType3 = HBarCode.substr(0, 3); |
| | | var BillNoType3 = HBarCode.substr(0, 5); |
| | | var BillNoType4 = HBarCode.substr(0, 4); |
| | | var BillNoType5 = HBarCode.substr(0, 8); |
| | | |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | |
| | | //å¨å
·æ¡£æ¡ |
| | | case "MJD": |
| | | case "PAK": |
| | | case "https": |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HMouldID": data.hmainid, |
| | | "HMouldNumber": data.模å
·ç¼å·, |
| | |
| | | |
| | | |
| | | |
| | | if (BillNoType5.length == 8) { |
| | | BillNoType5 = BillNoType5.substr(0, 4) + "-" + BillNoType5.substr(4, 2) + "-" + BillNoType5.substr(6, 2); |
| | | } |
| | | |
| | | if (isValidDate(BillNoType5)) { |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HProcExchBillNo": data.åæ®å·, |
| | | "HProcExchInterID": data.hmainid, |
| | | "HProcExchEntryID": data.HEntryID, |
| | | "HICMOBillNo": data.ä»»å¡åå·, |
| | | "HICMOInterID": data.hicmointerid, |
| | | "HICMOEntryID": data.HICMOEntryID |
| | | }); |
| | | } |
| | | |
| | | switch (BillNoType5) { |
| | | //æµè½¬å¡ |
| | | case "GXLX": |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HProcExchBillNo": data.åæ®å·, |
| | | "HProcExchInterID": data.hmainid, |
| | | "HProcExchEntryID": data.HEntryID, |
| | | "HICMOBillNo": data.ä»»å¡åå·, |
| | | "HICMOInterID": data.hicmointerid, |
| | | "HICMOEntryID": data.HICMOEntryID |
| | | }); |
| | | break; |
| | | } |
| | | |
| | | |
| | | |
| | | $("#HBarCode").val(""); |
| | | layer.close(index); |