| | |
| | | <div style="background-color:#0085E8;"> |
| | | <span style="color: white;"><i class="layui-icon layui-icon-form"></i>å
¶ä»å
¥åºå</span> |
| | | </div> |
| | | <div class="layui-form-item" style="padding:15px;margin:0px"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:40px;padding-left:0px;">æ¡ç </label> |
| | | </div> |
| | | <div class="layui-col-xs5"> |
| | | <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | <div class="layui-col-xs2"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin">ç¡®å®</button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="padding:0px;margin:0px"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:40px;padding-left:0px;">æ°é</label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <input type="text" name="HQty" id="HQty" lay-verify="HQty" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-Kf_OtherInBill"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <!-- <li lay-id="1">æºåä¿¡æ¯</li>--> |
| | |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">æºåç±»å</label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <select name=" HBillType" id="HBillType"> |
| | | <select name="HBillType" id="HBillType"> |
| | | <option value="1241">å
¥åºç³è¯·å</option> |
| | | <option value="-1">æå·¥å½å
¥</option> |
| | | </select> |
| | |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">æºåå·</label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | |
| | | </div> |
| | | <div class="layui-col-xs2"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin2">ç¡®å®</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">åæ®ç±»å</label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <select name=" HBillSubType" id="HBillSubType"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">æ¥æ</label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <input name="HDate" id="HDate" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-form-item" style="padding:0px;margin:0px"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4"> |
| | | <label class="layui-form-label" style="width:40px;padding-left:0px;">æ¡ç </label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | <div class="layui-col-xs2"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin">ç¡®å®</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="padding:0px;margin:0px"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4"> |
| | | <label class="layui-form-label" style="width:40px;padding-left:0px;">æ°é</label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <input type="text" name="HQty" id="HQty" lay-verify="HQty" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="wl-table" lay-filter="wl-table"></table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | |
| | | <div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px"> |
| | | <button type="button" lay-submit="" class="layui-btn" id="Saver" lay-filter="Saver">æäº¤</button> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdModify">ç¼è¾</button> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdRefresh">å·æ°</button> |
| | | <!-- <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdRefresh">å·æ°</button>--> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">å é¤</button> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="Cancel">éåº</button> |
| | | </div> |
| | | |
| | | |
| | | </form> |
| | | </div> |
| | | </div> |
| | |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | |
| | | //表头åå§åèµå¼ï¼æ ¹æ®ç»å½ç¨æ·è·å é»è®¤ä»åºãé¨é¨ãéªæ¶ãä¿ç®¡ãéè¶ç¨æ·ï¼ new |
| | |
| | | $("#HBillerID").hide(); |
| | | $("#HOrgID").val(sessionStorage["OrganizationID"]); |
| | | $("#HOrgID").hide(); |
| | | $("#HBillSubType").val(sessionStorage["HBillSubType"]); |
| | | $("#HDate").val(formatDate(sessionStorage["HDate"])); |
| | | var HSourceFlag = sessionStorage["SourceFlag"]; |
| | | //é»è®¤å¸¦å
¥çä»åºï¼å¦æå¯ç¨ä»ä½åä»ä½ææï¼å¦ææ²¡æå¯ç¨åä»ä½ç°åº¦ new |
| | | |
| | | |
| | | // ç¼è¾è·åè¡¨å¤´æ¶æ¶é´æ ¼å¼ç«æ£æ¹å¼ |
| | | function formatDate(date) { |
| | | var d = new Date(date), |
| | | month = '' + (d.getMonth() + 1), |
| | | day = '' + d.getDate(), |
| | | year = d.getFullYear(); |
| | | |
| | | if (month.length < 2) month = '0' + month; |
| | | if (day.length < 2) day = '0' + day; |
| | | |
| | | return [year, month, day].join('-'); |
| | | } |
| | | |
| | | |
| | | //è·ååæ° |
| | |
| | | var linterid = params[params[0]]; //ä»åæ°ä¸è·å åæ®å
ç |
| | | var lSourceBillType = params[params[2]]; //ä»åæ®è·å æºåç±»å |
| | | |
| | | //åå§å表åæä»¶ |
| | | set_InitFrom(); |
| | | |
| | | //åå§å表åæä»¶ |
| | | function set_InitFrom() { |
| | | //常è§ç¨æ³ |
| | | laydate.render({ |
| | | elem: '#HDate' |
| | | }); |
| | | } |
| | | |
| | | function RoadBillMain(linterid)//å 载表头 |
| | | { |
| | | $.ajax({ |
| | |
| | | // console.log(d.data); |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HBillType").val(d.data[0].HSourceBillType); |
| | | $("#HBillType").val(d.data[0].HSourceBillType == null ? "1241" : d.data[0].HSourceBillType); |
| | | //è·åæºåç±»åãæºååå· |
| | | if (d.data[0].HSourceBillType == "1241") { |
| | | $("#HBillType").empty(); |
| | | $("#HBillType").val("1241"); |
| | | var optionHtml = ''; |
| | | optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + 'å
¥åºç³è¯·å' + "</option>"; |
| | | $("#HBillType").append(optionHtml); |
| | | layui.form.render('select'); |
| | | $("#HBillType").attr("readonly", "readonly"); |
| | | } |
| | | else { |
| | | $("#HBillType").empty(); |
| | | $("#HBillType").val("-1"); |
| | | var optionHtml = ''; |
| | | optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + 'æå·¥å½å
¥' + "</option>"; |
| | | $("#HBillType").append(optionHtml); |
| | | layui.form.render('select'); |
| | | $("#HBillType").attr("readonly", "readonly"); |
| | | } |
| | | $("#HSourceBillNo").val(d.data[0].HSourceBillNo); |
| | | $("#HSourceBillNo").attr("disabled", "true"); |
| | | $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd")); |
| | | //$("#HWHID").val(d.data[0].HWhID); |
| | | //$("#HKeeperID").val(d.data[0].HKeeperID); |
| | | //$("#HSecManagerID").val(d.data[0].HSecManagerID); |
| | | //$("#HDeptID").val(d.data[0].HDeptID); |
| | | //$("#HBarCode").val(d.data[0].HBarCode); |
| | | //$("#HQty").val(d.data[0].HQty); |
| | | HSourceFlag = true; |
| | | } |
| | | }) |
| | | //è·ååæ®åç±»å |
| | | var HBillSubType = ''; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/WEBSController/GetBillSubType_Json", |
| | | type: "GET", |
| | | data: { "HBillType": '1203', "HStockOrgID": sessionStorage["OrganizationID"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data; |
| | | for (var i = 0; i < data.length; i++) { |
| | | HBillSubType += '<option value="' + data[i].HNumber + '">' + data[i].HName + '</option>'; |
| | | } |
| | | $("#HBillSubType").append(HBillSubType); |
| | | form.render('select'); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | } |
| | |
| | | //console.log(d.data); |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd")); |
| | | } |
| | | }); |
| | | //è·ååæ®åç±»å |
| | | var HBillSubType = ''; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/WEBSController/GetBillSubType_Json", |
| | | type: "GET", |
| | | data: { "HBillType": '1203', "HStockOrgID": sessionStorage["OrganizationID"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data; |
| | | for (var i = 0; i < data.length; i++) { |
| | | HBillSubType += '<option value="' + data[i].HNumber + '">' + data[i].HName + '</option>'; |
| | | } |
| | | $("#HBillSubType").append(HBillSubType); |
| | | form.render('select'); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | } |
| | | else {//å¦æä¿®æ¹åèµ°ä¸é¢ new |
| | | RoadBillMain(linterid); |
| | |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../views/Baseset/åºç¡èµæ/Gy_WarehouseList.html?Type=HWHID', 'yes'] |
| | | , content: ['../../../views/Baseset/åºç¡èµæ/Gy_WarehouseListNew.html?Type=HWHID&HOrgID=' + sessionStorage["OrganizationID"] + '', 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | }); |
| | | //form.on('submit(HWHID-BT)', function () {//éæ©ä»åº |
| | | // layer.open({ |
| | | // type: 2 |
| | | // , area: ['100%', '100%'] |
| | | // , title: 'ä»åºå表' |
| | | // , shade: 0.6 //é®ç½©éæåº¦ |
| | | // , maxmin: true //å
许å
¨å±æå°å |
| | | // , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | // , content: ['../../../views/Baseset/åºç¡èµæ/Gy_WarehouseList.html?Type=HWHID', 'yes'] |
| | | // , resize: false |
| | | // , cancel: function () { |
| | | // //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | // } |
| | | // }) |
| | | //}); |
| | | form.on('submit(HSpID-BT)', function () {//éæ©ä»ä½ |
| | | layer.open({ |
| | | type: 2 |
| | |
| | | //parent.location.href = "../../../views/index.html" |
| | | //window.close();//å
³éå½å页 |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | window.close(); |
| | | parent.location.href = "../../../views/index_Mobile.html"; |
| | | }); |
| | | }) |
| | | |
| | |
| | | //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//é空éªè¯ |
| | | $.ajax({ |
| | | //url: "http://localhost:12761/OtherInStockBill/get_InfoByBarCode_Source_Json", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | url: GetWEBURL() + "/OtherInStockBill/get_InfoByBarCode_Source_Json", |
| | | url: GetWEBURL() + "/WEBSController/Get_BarCode_Json", |
| | | type: "GET", |
| | | data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"] }, |
| | | data: { "sBarCode": sBarCode, "HInterID": sInterID, "HBillType": HBillType, "HBillNo": sBillNo, "HMaker": sessionStorage["HUserName"], "HWhID": sHWHID, "HSPID": sHSPID, "HQty": sQty, "HRedBlueFlag": false, "SourceFlag": HSourceFlag, "HSourceBillNo": sSourceBillNo, "HSourceBillType": sHBillType, "HStockOrgID": sessionStorage["OrganizationID"], "HScanStyle": "", "HCustom1": "", "HCustom2": "" }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | if (result.data.HBarType == 'ä»åºæ¡ç ') { |
| | |
| | | $("#HDeptName").val(result.data.HDeptName); |
| | | $("#HDeptID").val(result.data.HDeptID); |
| | | $("#HSourceBillNo").val(result.data.HSourceBillNo); |
| | | sessionStorage["SourceFlag"] = true; |
| | | HSourceFlag = true; |
| | | //è·åæºåç±»åãæºååå· |
| | | if (result.data.HSourceBillType == "1241") { |
| | | $("#HBillType").val("1241"); |
| | |
| | | element.tabChange('tab-Kf_OtherInBill', '3'); |
| | | } |
| | | else { |
| | | if (sessionStorage["SourceFlag"] == "true") { |
| | | if (HSourceFlag == true) { |
| | | element.tabChange('tab-Kf_OtherInBill', '3'); |
| | | } |
| | | else { |
| | |
| | | //$("#HDeptName").val(result.data.HDeptName); |
| | | //$("#HDeptID").val(result.data.HDeptID); |
| | | //$("#HSourceBillNo").val(result.data.HSourceBillNo); |
| | | sessionStorage["SourceFlag"] = true; |
| | | //sessionStorage["SourceFlag"] = true; |
| | | //è·åæºåç±»åãæºååå· |
| | | if (result.data.HSourceBillType == "1241") { |
| | | $("#HBillType").val("1241"); |
| | | //if (result.data.HSourceBillType == "1241") { |
| | | // $("#HBillType").val("1241"); |
| | | |
| | | //} |
| | | //else if (result.data.HSourceBillType == "1601") { |
| | | // $("#HBillType").val("1601"); |
| | | //} |
| | | |
| | | |
| | | HSourceFlag = true; |
| | | $("#HSourceBillNo").val(result.data.hSourceBillNoField); |
| | | $("#HBillType").val(result.data.hSourceBillTypeField == null ? "1241" : result.data.hSourceBillTypeField); |
| | | //è·åæºåç±»åãæºååå· |
| | | if (result.data.hSourceBillTypeField == "1241") { |
| | | $("#HBillType").empty(); |
| | | $("#HBillType").val("1241"); |
| | | var optionHtml = ''; |
| | | optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + 'å
¥åºç³è¯·å' + "</option>"; |
| | | $("#HBillType").append(optionHtml); |
| | | layui.form.render('select'); |
| | | $("#HBillType").attr("readonly", "readonly"); |
| | | } |
| | | else if (result.data.HSourceBillType == "1601") { |
| | | $("#HBillType").val("1601"); |
| | | else { |
| | | //$("#HBillType").empty(); |
| | | $("#HBillType").val("-1"); |
| | | var optionHtml = ''; |
| | | optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + 'æå·¥å½å
¥' + "</option>"; |
| | | $("#HBillType").append(optionHtml); |
| | | layui.form.render('select'); |
| | | $("#HBillType").attr("readonly", "readonly"); |
| | | } |
| | | $("#HSourceBillNo").attr("readonly", "readonly"); |
| | | $("#HNote").val(";ç©ææ¡ç "); |
| | | element.tabChange('tab-Kf_OtherInBill', '3'); |
| | | } |
| | |
| | | element.tabChange('tab-Kf_OtherInBill', '2'); |
| | | playSound1(); |
| | | HSourceFlag = true; |
| | | sessionStorage["SourceFlag"] = true; |
| | | //sessionStorage["SourceFlag"] = true; |
| | | layer.load(3) |
| | | //table.render({ |
| | | // elem: '#wl-table' |
| | |
| | | // , where: { HBillID: sInterID, HBillNo: sBillNo, HBillType: HBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl } |
| | | // , cols: [[ |
| | | // { type: 'radio' } |
| | | // , { field: 'HQty', title: 'æ°é', width: 150 } |
| | | // , { field: 'HQtyMust', title: 'åºæ¶æ°é', width: 150 } |
| | | // , { field: 'HQty', title: 'æ°é', width: 150 , totalRow: true } |
| | | // , { field: 'HQtyMust', title: 'åºæ¶æ°é', width: 150 , totalRow: true } |
| | | // , { field: 'HMaterNumber', title: 'ç©æä»£ç ', width: 150 } |
| | | // , { field: 'HMaterName', title: 'ç©æåç§°', width: 150 } |
| | | // , { field: 'HMaterModel', title: 'è§æ ¼åå·', width: 150 } |
| | |
| | | // , { field: 'HSourceEntryID', title: 'æºååå
ç ', width: 150 } |
| | | // , { field: 'HSourceBillNo', title: 'æºååå·', width: 150 } |
| | | // , { field: 'HBatchNo', title: 'æ¹æ¬¡', width: 150 } |
| | | // , { field: 'HPieceQty', title: 'æ¡ç æ°é', width: 150 } |
| | | // ]] |
| | | // // , data: [linterid] |
| | | // // , page: true |
| | |
| | | function AllowLoadData(sSubStr) { //é空éªè¯ |
| | | //æ°åæ£å(å
å«å°æ°) |
| | | var reg = /^\d+(\.\d+)?$/; |
| | | if (reg.test($("#HQty").val()) == false || $("#HQty").val() == '') { |
| | | layer.msg("æ°éå¿
须为æ°éæå°æ°", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | //if (reg.test($("#HQty").val()) == false || $("#HQty").val() == '') { |
| | | // layer.msg("æ°éå¿
须为æ°éæå°æ°", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return false; |
| | | //} |
| | | //if ($("#HSourceBillNo").val() == '') { |
| | | // layer.msg("请å
æ«æºå!", { icon: 5 }); |
| | | // return false; |