| | |
| | | <NameOfLastUsedPublishProfile>D:\æºäºLMes\MESWMS-LayUI\WebTM\Properties\PublishProfiles\SWETM.pubxml</NameOfLastUsedPublishProfile> |
| | | <NameOfLastUsedPublishProfile>D:\å·¥ä½ä»£ç \æºäºè¿æ\MES\MES-WEB-LayUI\WebTM\Properties\PublishProfiles\LAYUI.pubxml</NameOfLastUsedPublishProfile> |
| | | <ProjectView>ProjectFiles</ProjectView> |
| | | <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> |
| | | <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> |
| | | <UseIISExpress>true</UseIISExpress> |
| | | <Use64BitIISExpress /> |
| | | <IISExpressSSLPort /> |
| | |
| | | function set_PushICMOChangeBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | console.log(checkStatus) |
| | | if (checkStatus.data.length === 1) { |
| | | var hID = data[0].hmainid.toString(); |
| | | var HEntryID = data[0].hsubid.toString(); |
| | |
| | | var HSourceBillData = "none"; |
| | | var sWhere = " and hmainid = " + ParamsInterID; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/LEMS/MES_IF_ICMOBillList_Json', |
| | | url: GetWEBURL() + 'LEMS/MES_IF_ICMOBillList_Json', |
| | | async: false, |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | |
| | | $("#HBarCode_SN").focus(); |
| | | return |
| | | } |
| | | if ($("#HBarCode_SN").val().substring(0, 5) == "51510") { |
| | | if ($("#HBarCode_SN").val().substring(0, 5) == "51510" || $("#HBarCode_SN").val().substring(0, 5) == "77217") { |
| | | var sql = "exec h_p_Cj_BlueToothBarCodeSave '" + $("#HBarCode_Key").val() + "'," + option.data[0].HMaterID + "," + "100004" + ",'" + sessionStorage["HUserName"] + "'"; |
| | | $.ajax({ |
| | | type: "GET", |
| | |
| | | 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); |
| | | }); |
| | | } |
| | |
| | | |
| | | var sWhere = "select top 1 a.HItemID,HBarCode æ¡ç ç¼å·,isnull(ms.HCusRelationNumber,'') SKU from Gy_BarCodeBill a with(nolock) left join Gy_Material m with(nolock) on a.HMaterID = m.HItemID left join Gy_MateNumRelation_Sec ms with(nolock) on m.HMASTERID = ms.HMaterID where a.HBarCode = '" + HBarCode + "'"; |
| | | |
| | | if ($("#HPrintTemplate").val().indexOf("é»ç®") !== -1) { |
| | | sWhere = "exec h_p_IF_BarCodeBillList_XWPrint '" + HBarCode + "'" |
| | | } |
| | | |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_PatrolCheck" id="set_PatrolCheck"><i class="layui-icon layui-icon-form"></i>å·¡æ£</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_WorkCheck" id="set_WorkCheck"><i class="layui-icon layui-icon-form"></i>èªæ£</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn_print_small" lay-event="btn_print_small"><i class="layui-icon layui-icon-print"></i>å·¥èºå°æ ç¾æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_pushKf_OtherOut" id="set_pushKf_OtherOut"><i class="layui-icon layui-icon-form"></i>䏿¨(å
¶ä»åºåºå)</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_pushKf_MateOutBack" id="set_pushKf_MateOutBack"><i class="layui-icon layui-icon-form"></i>䏿¨(ç产éæå)</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_pushKf_MateOut" id="set_pushKf_MateOut"><i class="layui-icon layui-icon-form"></i>䏿¨(çäº§é¢æå)</button> |
| | | </div> |
| | | </script> |
| | | <script type="text/html" id="toolbarDemo2"> |
| | | <div class="layui-btn-container"> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_view"><i class="layui-icon layui-icon-tips"></i>é¢è§</button> |
| | |
| | | break; |
| | | //case 'fy': initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | // break; |
| | | |
| | | |
| | | //䏿¨(å
¶ä»åºåºå) |
| | | case 'set_pushKf_OtherOut': set_pushKf_OtherOut(); |
| | | break; |
| | | //䏿¨(ç产éæå) |
| | | case 'set_pushKf_MateOutBack': set_pushKf_MateOutBack(); |
| | | break; |
| | | //䏿¨(çäº§é¢æå) |
| | | case 'set_pushKf_MateOut': set_pushKf_MateOut(); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region 䏿¨(å
¶ä»åºåºå) |
| | | function set_pushKf_OtherOut() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hID = data[0].hmainid.toString(); |
| | | var HEntryID = data[0].HEntryID.toString(); |
| | | |
| | | //#region 夿æºåç¶æ |
| | | var HSourceBillData = ""; |
| | | var HSourceBillData = getSourceBillStatus_ProcessExchangeBill(hID); //è·åæºåæ°æ® |
| | | if (HSourceBillData != "none") { |
| | | if (HSourceBillData.length == 0) { |
| | | layer.alert("ä¿å失败!æªæ¥è¯¢å°ç产订ååæ®!", { icon: 5 }); |
| | | return; |
| | | } else if (HSourceBillData[0]["å®¡æ ¸äºº"] == "") { |
| | | var err = "ä¿å失败!åå ï¼è®¢ååæ®ç¶æä¸ºâ" + HSourceBillData[0]["åæ®ç¶æ"] + "âï¼ä¸å
è®¸ä¸æ¨å
¶ä»åºåºåï¼"; |
| | | layer.alert(err, { icon: 5 }); |
| | | return; |
| | | } |
| | | } else { |
| | | return; |
| | | } |
| | | |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: '䏿¨-å
¶ä»åºåºå' |
| | | , closeBtn: 1 |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../../颿åè´§/å
¶ä»åºåº/Add_Edit_Kf_OtherOutBill.html?OperationType=4&linterid=' + hID + '&HSouceBillType=3772&closeType=1&HEntryID=' + HEntryID |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | $("#btnSearch").trigger('click'); |
| | | } |
| | | , cancel: function () { |
| | | |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region 䏿¨(ç产éæå) |
| | | function set_pushKf_MateOutBack() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hID = data[0].hmainid.toString(); |
| | | var HEntryID = data[0].HEntryID.toString(); |
| | | |
| | | //#region 夿æºåç¶æ |
| | | var HSourceBillData = ""; |
| | | var HSourceBillData = getSourceBillStatus_ProcessExchangeBill(hID); //è·åæºåæ°æ® |
| | | if (HSourceBillData != "none") { |
| | | if (HSourceBillData.length == 0) { |
| | | layer.alert("ä¿å失败!æªæ¥è¯¢å°ç产订ååæ®!", { icon: 5 }); |
| | | return; |
| | | } else if (HSourceBillData[0]["å®¡æ ¸äºº"] == "") { |
| | | var err = "ä¿å失败!åå ï¼è®¢ååæ®ç¶æä¸ºâ" + HSourceBillData[0]["åæ®ç¶æ"] + "âï¼ä¸å
è®¸ä¸æ¨å
¶ä»åºåºåï¼"; |
| | | layer.alert(err, { icon: 5 }); |
| | | return; |
| | | } |
| | | } else { |
| | | return; |
| | | } |
| | | |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: '䏿¨-ç产éæå' |
| | | , closeBtn: 1 |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../../颿åè´§/颿åºåº/Kf_MateOutBackBillEdit.html?OperationType=4&linterid=' + hID + '&HSouceBillType=3772&closeType=1&HEntryID=' + HEntryID |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | $("#btnSearch").trigger('click'); |
| | | } |
| | | , cancel: function () { |
| | | |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region 䏿¨(çäº§é¢æå) |
| | | function set_pushKf_MateOut() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hID = data[0].hmainid.toString(); |
| | | var HEntryID = data[0].HEntryID.toString(); |
| | | |
| | | //#region 夿æºåç¶æ |
| | | var HSourceBillData = ""; |
| | | var HSourceBillData = getSourceBillStatus_ProcessExchangeBill(hID); //è·åæºåæ°æ® |
| | | if (HSourceBillData != "none") { |
| | | if (HSourceBillData.length == 0) { |
| | | layer.alert("ä¿å失败!æªæ¥è¯¢å°ç产订ååæ®!", { icon: 5 }); |
| | | return; |
| | | } else if (HSourceBillData[0]["å®¡æ ¸äºº"] == "") { |
| | | var err = "ä¿å失败!åå ï¼è®¢ååæ®ç¶æä¸ºâ" + HSourceBillData[0]["åæ®ç¶æ"] + "âï¼ä¸å
è®¸ä¸æ¨å
¶ä»åºåºåï¼"; |
| | | layer.alert(err, { icon: 5 }); |
| | | return; |
| | | } |
| | | } else { |
| | | return; |
| | | } |
| | | |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: '䏿¨-çäº§é¢æå' |
| | | , closeBtn: 1 |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../../颿åè´§/çäº§é¢æ/Kf_ProductReceiveMaterialBillEdit.html?OperationType=4&linterid=' + hID + '&HSouceBillType=3772&closeType=1&HEntryID=' + HEntryID |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | $("#btnSearch").trigger('click'); |
| | | } |
| | | , cancel: function () { |
| | | |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region è·åæºå-订ååæ®ç¶æ |
| | | function getSourceBillStatus_ProcessExchangeBill(ParamsInterID) { |
| | | var HSourceBillData = "none"; |
| | | var sWhere = " and hmainid = " +ParamsInterID; |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'LEMS/MES_Sc_ProcessExchangeBillList_Json', |
| | | async: false, |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | HSourceBillData = data1.data; |
| | | } else { |
| | | layer.alert(data1.code + "åæ®ç¶æå¤æå¤±è´¥ï¼", { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | return HSourceBillData; |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ ¹æ®ç¨æ·è·åç¨æ·å
³è客æ·çè¿æ»¤æ¡ä»¶ |
| | | function getSWhereByHUser() { |
| | | var res = ""; |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ååæ®ç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HBillSubType" lay-filter="HBillSubType" id="HBillSubType"> |
| | | <option value="ç½å¯é¢æ" selected="selected">ç½å¯é¢æ</option> |
| | | <option value="ç½å¯é¢æè°æ´">ç½å¯é¢æè°æ´</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä¸å¡å</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | |
| | | var params = get_UrlVars(); |
| | | var OperationType = params[params[0]]; //ä»åæ°ä¸è·å æ°æ®ç±»å 1æ·»å ä¿å 2å¤å¶ 3 ç¼è¾ |
| | | var linterid = params[params[1]]; //ä»åæ°ä¸è·å åæ®å
ç |
| | | var HEntryID = params[params[4]]; //è·ååæ®åid |
| | | if (typeof (params[params[0]]) == "undefined") { |
| | | OperationType = 1;//æä½ç±»å |
| | | } else { |
| | |
| | | //#region æç»è¡åå§å |
| | | var rowdata = [{ |
| | | "HMaterID": 0, "ç©æä»£ç ": "", "ç©æåç§°": "", "è§æ ¼åå·": "", "HPropertyID": "0", "è¾
å©å±æ§": "", "HSecUnitRate": "0", "HUnitID": 0, "计éåä½": "", "HRemark": "", |
| | | "HQtyMust": "0", "HQty": "0","HPieceQty": "0", "HPrice": "0", "HMoney": "0", "HWHID": 0, "æ¶æä»åº": "", |
| | | "HQtyMust": "0", "HQty": "0","HPieceQty": "0", "HPrice": "0", "HMoney": "0", "HWHID": 0, "åæä»åº": "", |
| | | "HSPID": 0, "HSPGroupID": 0, "ä»ä½åç§°": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0, |
| | | "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", |
| | | "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0, |
| | | "æºåå·": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0, |
| | | }]; |
| | | // åå§åç |
| | | set_InitGrid(); |
| | |
| | | else if (OperationType == 3) {//ç¼è¾ |
| | | $("#HItemID").val(linterid);//ä¿®æ¹æ¶ä¸»è¡¨ID |
| | | //ç¼è¾ç¶ææ¶ï¼æ ¹æ®å
ç ï¼è·åä¿¡æ¯å¹¶åå
¥çé¢ |
| | | console.log('æ§è¡ç¼è¾'); |
| | | RoadBillMain(linterid); |
| | | } |
| | | else if (OperationType == 4) { //䏿¨ |
| | | console.log('æ§è¡ä¸æ¨'); |
| | | setInit_PushBill(linterid); |
| | | } |
| | | else { |
| | | layer.alert("æªç¥æä½ç±»åï¼", { icon: 5 }); |
| | |
| | | } |
| | | }); |
| | | } |
| | | else {//å¦æä¿®æ¹åèµ°ä¸é¢ new |
| | | $("#HInterID").val(linterid); |
| | | RoadBillMain(linterid); |
| | | } |
| | | //else {//å¦æä¿®æ¹åèµ°ä¸é¢ new |
| | | // $("#HInterID").val(linterid); |
| | | // console.log(1) |
| | | // RoadBillMain(linterid); |
| | | //} |
| | | //#endregion |
| | | //#endregion |
| | | |
| | |
| | | // return; |
| | | //} |
| | | |
| | | //if ($("#HWHName").val() == 0) { |
| | | // layer.msg("è¯·éæ©ä»åºï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return; |
| | | //} |
| | | if ($("#HWHName").val() == 0) { |
| | | layer.msg("è¯·éæ©ä»åºï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | //if ($("#HKeeperID").val() == 0) { |
| | | // layer.msg("è¯·éæ©ä¿ç®¡åï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return; |
| | |
| | | // return; |
| | | //} |
| | | |
| | | if ($("#HSupID").val() == 0) { |
| | | layer.msg("è¯·éæ©å¾æ¥åä½ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | //if ($("#HSupID").val() == 0) { |
| | | // layer.msg("è¯·éæ©å¾æ¥åä½ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return; |
| | | //} |
| | | |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | if (option.data[i]["HMaterID"] == "0") { |
| | |
| | | "HQtyMust": "0", "HQty": "0","HPieceQty": "0", "HPrice": "0", "HMoney": "0", "HWHID": 0, "æ¶æä»åº": "", |
| | | "HSPID": 0, "HSPGroupID": 0, "ä»ä½åç§°": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0, |
| | | "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", |
| | | "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0, |
| | | "æºåå·": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0, |
| | | }; |
| | | switch (obj.event) { |
| | | //æ°å¢ |
| | |
| | | obj.update({ |
| | | |
| | | "HWHID": checkStatus.data[0].HItemID, |
| | | "æ¶æä»åº": checkStatus.data[0].ä»åºåç§° |
| | | "åæä»åº": checkStatus.data[0].ä»åºåç§° |
| | | }) |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //éè´è®¢åå· |
| | | if (obj.event == "HPOOrderBillNo") { |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region çæåæ®å· |
| | | function createBillNo() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '1206' }, |
| | | success: function (d) { |
| | | |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ¥ææ ¼å¼å |
| | | function formatDate(date) { |
| | | var d = new Date(date), |
| | |
| | | , cols: [[ //å表 |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', title: 'åºå·', width: 100 } |
| | | , { type: 'HSourceBillNo', title: 'æºåå·', width: 100, hide: true }//æºåå· |
| | | , { field: 'HSourceBillNo', title: 'æºåå·', width: 100, hide: true }//æºåå· |
| | | , { field: 'HSourceBillType', title: 'æºåç±»å', width: 100, hide: true }//æºåç±»å |
| | | , { type: 'HSourceInterID', title: 'æºå主å
ç ', width: 100, hide: true }//æºå主å
ç |
| | | , { field: 'HSourceInterID', title: 'æºå主å
ç ', width: 100, hide: true }//æºå主å
ç |
| | | , { field: 'HSourceEntryID', title: 'æºååå
ç ', width: 100, hide: true }//æºååå
ç |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 150, edit: 'text', event: "HMaterID" }//f7 |
| | |
| | | , { field: 'HMoney', title: 'éé¢', width: 100, edit: 'text', totalRow: true } |
| | | |
| | | , { field: 'HWHID ', title: 'HWHID ', width: 100, hide: true } |
| | | , { field: 'æ¶æä»åº', title: 'åæä»åº', width: 100, edit: 'text', event: "HWHID" }//f7 |
| | | , { field: 'åæä»åº', title: 'åæä»åº', width: 100, edit: 'text', event: "HWHID" }//f7 |
| | | , { field: 'HSPID', title: 'HSPID', width: 100, hide: true } |
| | | , { field: 'HSPGroupID', title: 'HSPGroupID', width: 100, hide: true } |
| | | , { field: 'ä»ä½åç§°', title: 'ä»ä½åç§°', width: 100, edit: 'text', event: "HSPID" }//f7 |
| | | , { field: 'ä»ä½åç§°', title: 'ä»ä½åç§°', width: 100, edit: 'text', event: "HSPID"}//f7 |
| | | , { field: 'HBatchNo', title: 'æ¹æ¬¡', width: 150, edit: 'text', hide: true } |
| | | , { field: 'HPOOrderInterID', title: 'éè´è®¢å主å
ç ', width: 100, hide: true }//éè´è®¢å主å
ç |
| | | , { field: 'HPOOrderEntryID', title: 'éè´è®¢ååå
ç ', width: 100, hide: true }//éè´è®¢ååå
ç |
| | |
| | | , "HSupName": data[0]["徿¥åä½"] |
| | | , "HWHID": data[0]["HWHID"] |
| | | , "HWHName": data[0]["ä»åº"] |
| | | , "HBillSubType": data[0]["HBillSubType"] |
| | | , "HSecManagerID": data[0]["HSecManagerID"] |
| | | , "HSecManagerName": data[0]["éªæ¶å"] |
| | | , "HKeeperID": data[0]["HKeeperID"] |
| | |
| | | , "HEmpID": data[0]["HEmpID"] |
| | | , "HEmpName": data[0]["ä¸å¡å"] |
| | | , "HExplanation": data[0]["HExplanation"] |
| | | |
| | | , "HRemark": data[0]["è¡¨å¤´å¤æ³¨"] |
| | | , "HMaker": data[0]["å¶å人"] |
| | | , "HMakeDate": data[0]["å¶åæ¥æ"] == null ? "" : Format(new Date(data[0]["å¶åæ¥æ"]), "yyyy-MM-dd") |
| | |
| | | option.data = data1; |
| | | table.render(option); |
| | | form.render('select'); |
| | | |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | |
| | | return duplicates; |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //#region 䏿¨é¡µé¢åå§å |
| | | function setInit_PushBill(linterid) { |
| | | //çæå¹¶è®¾ç½®ä¸»è¡¨çå
ç ååæ®å· |
| | | console.log("setInit_PushBill å¼å§æ§è¡ï¼"); |
| | | createBillNo(); |
| | | |
| | | //ç¸å
³ææ¬æ¡ä¿¡æ¯åå§å |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åå¹¶å设置ï¼å表1 |
| | | //set_InitGrid(); |
| | | //DisPlay_HideColumn(); |
| | | |
| | | |
| | | //æ¥è¯¢çäº§è®¢åæ¯å¦åå¨ |
| | | var ajaxLoad = layer.load(); |
| | | var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + " and hmainid='" + linterid + "' and HEntryID=" + HEntryID; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/LEMS/MES_Sc_ProcessExchangeBillList_Json", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (d) { |
| | | var result = d; |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data[0]; |
| | | |
| | | console.log('æé夿æå') |
| | | form.val("component-form-group", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HEmpID": data.HEmpID |
| | | , "HEmpName": data.ä¸å¡å |
| | | , "HDeptID": data.HDeptID |
| | | , "HDeptName": data.çäº§è½¦é´ |
| | | , "HCusID": data.HEntryCusID |
| | | , "HCusName": data.å®¢æ· |
| | | , "HBillSubType" :data.HBillSubType |
| | | |
| | | //, "HDeptID": data.HDeptID |
| | | //, "HDeptName": data.çäº§è½¦é´ |
| | | //, "HCusID": data.HCusID |
| | | //, "HCusName": data.å®¢æ· |
| | | |
| | | //, "HMainSourceInterID": linterid |
| | | //, "HMainSourceEntryID": HEntryID |
| | | //, "HMainSourceBillNo": data.åæ®å· |
| | | /* , "HMainSourceBillType": params[params[2]]*/ |
| | | |
| | | |
| | | //, "HMaterID": data.HMaterID |
| | | //, "ç©æä»£ç ": data.产å代ç |
| | | //, "ç©æåç§°": data.产ååç§° |
| | | //, "æºåå·": data.åæ®å· |
| | | //, "æºå主å
ç ": data.hmainid |
| | | //, "æºååå
ç ": data.HEntryID |
| | | }); |
| | | |
| | | //ç»ç»çå¼HOrgIDååï¼éæ°æ¸²æ |
| | | HOrgIDBar = data.HOrgID; |
| | | |
| | | //å表 èµå¼ |
| | | var rowdata = []; |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | rowdata.push( |
| | | { |
| | | //"HMaterID": result.data[i]["HMaterID"], |
| | | //"ç©æä»£ç ": result.data[i]["产å代ç "], |
| | | //"ç©æåç§°": result.data[i]["产ååç§°"], |
| | | //"è§æ ¼åå·": result.data[i]["è§æ ¼åå·"], |
| | | //"HUnitID": result.data[i]["HUnitID"], |
| | | //"计éåä½": result.data[i]["计éåä½"], |
| | | //"HQty_Old": result.data[i]["ç产任å¡åæ°é"], |
| | | //"HQty_New": result.data[i]["ç产任å¡åæ°é"], |
| | | ////"HDate_Old": formatDate(result.data[i]["åäº¤è´§æ¥æ"]), |
| | | ////"HDate_New": formatDate(result.data[i]["æ°äº¤è´§æ¥æ"]), |
| | | //"HRemark": "", |
| | | //"HSourceInterID": result.data[i]["hmainid"], |
| | | //"HSourceEntryID": result.data[i]["HEntryID"], |
| | | //"HSourceBillNo": result.data[i]["åæ®å·"], |
| | | //"HSourceBillType": result.data[i]["åæ®ç±»å"] |
| | | "HMaterID": data.HMaterID |
| | | , "ç©æä»£ç ": data.产å代ç |
| | | , "ç©æåç§°": data.产ååç§° |
| | | , "HSourceBillNo": data.åæ®å· |
| | | , "HSourceInterID": data.hmainid |
| | | , "HSourceEntryID": data.HEntryID |
| | | , "HSourceBillType": params[params[2]] |
| | | , "HWHID": "" |
| | | , "åæä»åº": "" |
| | | , "HSPID": "" |
| | | , "ä»ä½åç§°": "" |
| | | , "HPropertyID": "" |
| | | , "è¾
å©å±æ§": "" |
| | | , "HSecUnitRate": "" |
| | | , "HUnitID": "" |
| | | , "计éåä½": "" |
| | | , "HQtyMust": "" |
| | | , "HQty": "" |
| | | , "HPieceQty": "" |
| | | , "HPrice": "" |
| | | , "HMoney": "" |
| | | } |
| | | ); |
| | | } |
| | | option.data = rowdata; |
| | | |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region è·åæºåç±»å |
| | | function HSourceBillType() { |
| | | var HName = 'å
¶ä»å
¥åºå'; |
| | |
| | | $("#HWHName").val(obj[0].ä»åºåç§°); |
| | | $("#HWHID").val(obj[0].HItemID); |
| | | } |
| | | function GetHSPValue(obj) //è¿åä»ä½ |
| | | { |
| | | $("#HSPName").val(obj[0].ä»ä½åç§°); |
| | | $("#HSPID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | function GetHDeptNameValue(obj) //è¿åé¨é¨ |
| | | { |
| | |
| | | |
| | | //åå»è¿åç©æ |
| | | function GetGyMaterial(data) { |
| | | OptionData = data |
| | | OptionData = data |
| | | } |
| | | //åå»è¿å计éåä½ |
| | | function GetGyUnit(data) { |
| | |
| | | var OperationType = params[params[0]];//æä½ç±»å |
| | | var linterid = params[params[1]];//æºåid |
| | | var HSouceBillType = params[params[2]];//æºåç±»å |
| | | var closeType = params[params[3]]; //å
³éç±»å |
| | | var HEntryID = params[params[4]] |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | RoadBillMain(linterid); |
| | | } |
| | | else if (OperationType == 4) { //䏿¨ |
| | | setInit_PushBill(); |
| | | setInit_PushBill(linterid); |
| | | } |
| | | else { |
| | | layer.alert("æªç¥æä½ç±»åï¼", { icon: 5 }); |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //#region 䏿¨é¡µé¢åå§å |
| | | function setInit_PushBill(linterid) { |
| | | //çæå¹¶è®¾ç½®ä¸»è¡¨çå
ç ååæ®å· |
| | | console.log("setInit_PushBill å¼å§æ§è¡ï¼"); |
| | | get_MAXNum(); |
| | | |
| | | //ç¸å
³ææ¬æ¡ä¿¡æ¯åå§å |
| | | $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åå¹¶å设置ï¼å表1 |
| | | //set_InitGrid(); |
| | | //DisPlay_HideColumn(); |
| | | |
| | | |
| | | //æ¥è¯¢çäº§è®¢åæ¯å¦åå¨ |
| | | var ajaxLoad = layer.load(); |
| | | console.log(linterid,HEntryID) |
| | | var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + " and hmainid='" + linterid + "' and HEntryID=" + HEntryID; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/LEMS/MES_Sc_ProcessExchangeBillList_Json", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (d) { |
| | | var result = d; |
| | | console.log(result); |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data[0]; |
| | | |
| | | console.log('æé夿æå') |
| | | form.val("component-form-group", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HEmpID": data.HEmpID |
| | | , "HEmpName": data.ä¸å¡å |
| | | , "HDeptID": data.HDeptID |
| | | , "HDeptName": data.çäº§è½¦é´ |
| | | , "HCusID": data.HEntryCusID |
| | | , "HCusName": data.å®¢æ· |
| | | , "HBillSubType": "ç½å¯é¢æ" |
| | | |
| | | //, "HDeptID": data.HDeptID |
| | | //, "HDeptName": data.çäº§è½¦é´ |
| | | //, "HCusID": data.HCusID |
| | | //, "HCusName": data.å®¢æ· |
| | | |
| | | //, "HMainSourceInterID": linterid |
| | | //, "HMainSourceEntryID": HEntryID |
| | | //, "HMainSourceBillNo": data.åæ®å· |
| | | /* , "HMainSourceBillType": params[params[2]]*/ |
| | | |
| | | |
| | | //, "HMaterID": data.HMaterID |
| | | //, "ç©æä»£ç ": data.产å代ç |
| | | //, "ç©æåç§°": data.产ååç§° |
| | | //, "æºåå·": data.åæ®å· |
| | | //, "æºå主å
ç ": data.hmainid |
| | | //, "æºååå
ç ": data.HEntryID |
| | | }); |
| | | |
| | | //ç»ç»çå¼HOrgIDååï¼éæ°æ¸²æ |
| | | HOrgIDBar = data.HOrgID; |
| | | |
| | | //å表 èµå¼ |
| | | var rowdata = []; |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | rowdata.push( |
| | | { |
| | | //"HMaterID": result.data[i]["HMaterID"], |
| | | //"ç©æä»£ç ": result.data[i]["产å代ç "], |
| | | //"ç©æåç§°": result.data[i]["产ååç§°"], |
| | | //"è§æ ¼åå·": result.data[i]["è§æ ¼åå·"], |
| | | //"HUnitID": result.data[i]["HUnitID"], |
| | | //"计éåä½": result.data[i]["计éåä½"], |
| | | //"HQty_Old": result.data[i]["ç产任å¡åæ°é"], |
| | | //"HQty_New": result.data[i]["ç产任å¡åæ°é"], |
| | | ////"HDate_Old": formatDate(result.data[i]["åäº¤è´§æ¥æ"]), |
| | | ////"HDate_New": formatDate(result.data[i]["æ°äº¤è´§æ¥æ"]), |
| | | "HRemark": "", |
| | | //"HSourceInterID": result.data[i]["hmainid"], |
| | | //"HSourceEntryID": result.data[i]["HEntryID"], |
| | | //"HSourceBillNo": result.data[i]["åæ®å·"], |
| | | //"HSourceBillType": result.data[i]["åæ®ç±»å"] |
| | | "HMaterID": data.HMaterID |
| | | , "ç©æä»£ç ": data.产å代ç |
| | | , "ç©æåç§°": data.产ååç§° |
| | | , "HSourceBillNo": data.åæ®å· |
| | | , "HSourceInterID": data.hmainid |
| | | , "HSourceEntryID": data.HEntryID |
| | | , "HSourceBillType": params[params[2]] |
| | | , "计éåä½": "" |
| | | , "HUnitCode": "" |
| | | , "HUnitName": "" |
| | | , "HQtyMust": "0" |
| | | , "HQty": "0" |
| | | , "HWHCode": "" |
| | | , "åè´§ä»åº": "" |
| | | , "HWHID": "" |
| | | , "HMaterSpec": data.产åè§æ ¼ |
| | | } |
| | | ); |
| | | } |
| | | option.data = rowdata; |
| | | |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ ¹æ®ç©æIDè·å精度 |
| | | function getDecByMaterID(HMaterID) { |
| | | var resultData = {}; |
| | |
| | | <select name="HBillSubType" lay-filter="HBillSubType" id="HBillSubType"> |
| | | <option value="æ å颿" selected="selected">æ å颿</option> |
| | | <option value="ç½å¯é¢æ">ç½å¯é¢æ</option> |
| | | <option value="ç½å¯éæ">ç½å¯éæ</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">éåå·</label> |
| | | <label class="layui-form-label">éåå·<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSourceBillNo" id="HSourceBillNo" readonly class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSourceInterID" id="HSourceInterID" class="layui-input" value="" style="float:left;width:150px;"> |
| | |
| | | var linterid = params[params[1]];//æºåid |
| | | var HSouceBillType = params[params[2]];//æºåç±»å |
| | | var closeType = params[params[3]]; //å
³éç±»å |
| | | var HEntryID = params[params[4]] |
| | | } |
| | | |
| | | layui.config({ |
| | |
| | | } |
| | | else if (OperationType == 3) {//ç¼è¾ |
| | | set_EditFromGrid(linterid); |
| | | } |
| | | else if (OperationType == 4) {//䏿¨ |
| | | setInit_PushBill(linterid); |
| | | } |
| | | else { |
| | | layer.alert("æªç¥æä½ç±»åï¼", { icon: 5 }); |
| | |
| | | //ä¿å |
| | | form.on('submit(Saver)', function (data) { |
| | | var refSav = ""; |
| | | if (linterid == "" || linterid == null) { |
| | | if (OperationType == 1 || OperationType == 2 || OperationType == 4) { |
| | | refSav = "Add"; |
| | | } |
| | | if (linterid != "" && linterid != null) { |
| | | if (OperationType == 3) { |
| | | refSav = "Update"; |
| | | } |
| | | data.field.HMaker = sessionStorage["HUserName"];//å¶å人 |
| | |
| | | }); |
| | | } |
| | | |
| | | //#region çæåæ®å· |
| | | function createBillNo() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '1244' }, |
| | | success: function (d) { |
| | | |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HInterID").val(0); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //åå§åæç»è¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | columns = [ |
| | |
| | | }); |
| | | } |
| | | |
| | | //#region 䏿¨é¡µé¢åå§å |
| | | function setInit_PushBill(linterid) { |
| | | //çæå¹¶è®¾ç½®ä¸»è¡¨çå
ç ååæ®å· |
| | | console.log("setInit_PushBill å¼å§æ§è¡ï¼"); |
| | | createBillNo(); |
| | | |
| | | //ç¸å
³ææ¬æ¡ä¿¡æ¯åå§å |
| | | $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åå¹¶å设置ï¼å表1 |
| | | //set_InitGrid(); |
| | | //DisPlay_HideColumn(); |
| | | |
| | | |
| | | //æ¥è¯¢çäº§è®¢åæ¯å¦åå¨ |
| | | var ajaxLoad = layer.load(); |
| | | var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + " and hmainid='" + linterid + "' and HEntryID=" + HEntryID; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/LEMS/MES_Sc_ProcessExchangeBillList_Json", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (d) { |
| | | var result = d; |
| | | console.log(result); |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data[0]; |
| | | |
| | | console.log('æé夿æå') |
| | | form.val("component-form-group", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HEmpID": data.HEmpID |
| | | , "HEmpName": data.ä¸å¡å |
| | | , "HDeptID": data.HDeptID |
| | | , "HDeptName": data.çäº§è½¦é´ |
| | | , "HCusID": data.HEntryCusID |
| | | , "HCusName": data.å®¢æ· |
| | | , "HBillSubType": "ç½å¯éæ" |
| | | |
| | | //, "HDeptID": data.HDeptID |
| | | //, "HDeptName": data.çäº§è½¦é´ |
| | | //, "HCusID": data.HCusID |
| | | //, "HCusName": data.å®¢æ· |
| | | |
| | | //, "HMainSourceInterID": linterid |
| | | //, "HMainSourceEntryID": HEntryID |
| | | //, "HMainSourceBillNo": data.åæ®å· |
| | | /* , "HMainSourceBillType": params[params[2]]*/ |
| | | |
| | | |
| | | //, "HMaterID": data.HMaterID |
| | | //, "ç©æä»£ç ": data.产å代ç |
| | | //, "ç©æåç§°": data.产ååç§° |
| | | //, "æºåå·": data.åæ®å· |
| | | //, "æºå主å
ç ": data.hmainid |
| | | //, "æºååå
ç ": data.HEntryID |
| | | }); |
| | | |
| | | //ç»ç»çå¼HOrgIDååï¼éæ°æ¸²æ |
| | | HOrgIDBar = data.HOrgID; |
| | | |
| | | //å表 èµå¼ |
| | | var rowdata = []; |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | rowdata.push( |
| | | { |
| | | //"HMaterID": result.data[i]["HMaterID"], |
| | | //"ç©æä»£ç ": result.data[i]["产å代ç "], |
| | | //"ç©æåç§°": result.data[i]["产ååç§°"], |
| | | //"è§æ ¼åå·": result.data[i]["è§æ ¼åå·"], |
| | | //"HUnitID": result.data[i]["HUnitID"], |
| | | //"计éåä½": result.data[i]["计éåä½"], |
| | | //"HQty_Old": result.data[i]["ç产任å¡åæ°é"], |
| | | //"HQty_New": result.data[i]["ç产任å¡åæ°é"], |
| | | ////"HDate_Old": formatDate(result.data[i]["åäº¤è´§æ¥æ"]), |
| | | ////"HDate_New": formatDate(result.data[i]["æ°äº¤è´§æ¥æ"]), |
| | | "HRemark": "", |
| | | //"HSourceInterID": result.data[i]["hmainid"], |
| | | //"HSourceEntryID": result.data[i]["HEntryID"], |
| | | //"HSourceBillNo": result.data[i]["åæ®å·"], |
| | | //"HSourceBillType": result.data[i]["åæ®ç±»å"] |
| | | "HMaterID": data.HMaterID |
| | | , "HMaterCode": data.产å代ç |
| | | , "HMaterName": data.产ååç§° |
| | | , "HSourceBillNo": data.åæ®å· |
| | | , "HSourceInterID": data.hmainid |
| | | , "HSourceEntryID": data.HEntryID |
| | | , "HSourceBillType": params[params[2]] |
| | | , "HUnitID": "" |
| | | , "HUnitCode": "" |
| | | , "HUnitName": "" |
| | | , "HQtyMust": "" |
| | | , "HQty": "" |
| | | , "HPrice": "" |
| | | , "HMoney": "" |
| | | , "HWHCode": "" |
| | | , "HWHName": "" |
| | | , "HWHID": "" |
| | | , "HMaterSpec": data.产åè§æ ¼ |
| | | } |
| | | ); |
| | | } |
| | | option.data = rowdata; |
| | | |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //ç¼è¾ |
| | | function set_EditFromGrid(linterid) { |
| | | set_EditForm(linterid); //ç¼è¾è·å表头 |
| | |
| | | var linterid = params[params[1]];//æºåid |
| | | var HSouceBillType = params[params[2]];//æºåç±»å |
| | | var closeType = params[params[3]]; //å
³éç±»å |
| | | var HEntryID = params[params[4]] |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | } |
| | | else if (OperationType == 3) {//ç¼è¾ |
| | | set_EditFromGrid(linterid); |
| | | } |
| | | else if (OperationType == 4) { |
| | | setInit_PushBill(linterid) |
| | | } |
| | | else { |
| | | layer.alert("æªç¥æä½ç±»åï¼", { icon: 5 }); |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //#region 䏿¨é¡µé¢åå§å |
| | | function setInit_PushBill(linterid) { |
| | | //çæå¹¶è®¾ç½®ä¸»è¡¨çå
ç ååæ®å· |
| | | console.log("setInit_PushBill å¼å§æ§è¡ï¼"); |
| | | get_MAXNum(); |
| | | |
| | | //ç¸å
³ææ¬æ¡ä¿¡æ¯åå§å |
| | | $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åå¹¶å设置ï¼å表1 |
| | | //set_InitGrid(); |
| | | //DisPlay_HideColumn(); |
| | | |
| | | |
| | | //æ¥è¯¢çäº§è®¢åæ¯å¦åå¨ |
| | | var ajaxLoad = layer.load(); |
| | | var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + " and hmainid='" + linterid + "' and HEntryID=" + HEntryID; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/LEMS/MES_Sc_ProcessExchangeBillList_Json", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (d) { |
| | | var result = d; |
| | | console.log(result); |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data[0]; |
| | | |
| | | console.log('æé夿æå') |
| | | form.val("component-form-group", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HEmpID": data.HEmpID |
| | | , "HEmpName": data.ä¸å¡å |
| | | , "HDeptID": data.HDeptID |
| | | , "HDeptName": data.çäº§è½¦é´ |
| | | , "HCusID": data.HEntryCusID |
| | | , "HCusName": data.å®¢æ· |
| | | , "HBillSubType": "ç½å¯éæ" |
| | | |
| | | |
| | | |
| | | //, "HDeptID": data.HDeptID |
| | | //, "HDeptName": data.çäº§è½¦é´ |
| | | //, "HCusID": data.HCusID |
| | | //, "HCusName": data.å®¢æ· |
| | | |
| | | //, "HMainSourceInterID": linterid |
| | | //, "HMainSourceEntryID": HEntryID |
| | | //, "HMainSourceBillNo": data.åæ®å· |
| | | /* , "HMainSourceBillType": params[params[2]]*/ |
| | | |
| | | |
| | | //, "HMaterID": data.HMaterID |
| | | //, "ç©æä»£ç ": data.产å代ç |
| | | //, "ç©æåç§°": data.产ååç§° |
| | | //, "æºåå·": data.åæ®å· |
| | | //, "æºå主å
ç ": data.hmainid |
| | | //, "æºååå
ç ": data.HEntryID |
| | | }); |
| | | |
| | | //ç»ç»çå¼HOrgIDååï¼éæ°æ¸²æ |
| | | HOrgIDBar = data.HOrgID; |
| | | |
| | | //å表 èµå¼ |
| | | var rowdata = []; |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | rowdata.push( |
| | | { |
| | | //"HMaterID": result.data[i]["HMaterID"], |
| | | //"ç©æä»£ç ": result.data[i]["产å代ç "], |
| | | //"ç©æåç§°": result.data[i]["产ååç§°"], |
| | | //"è§æ ¼åå·": result.data[i]["è§æ ¼åå·"], |
| | | //"HUnitID": result.data[i]["HUnitID"], |
| | | //"计éåä½": result.data[i]["计éåä½"], |
| | | //"HQty_Old": result.data[i]["ç产任å¡åæ°é"], |
| | | //"HQty_New": result.data[i]["ç产任å¡åæ°é"], |
| | | ////"HDate_Old": formatDate(result.data[i]["åäº¤è´§æ¥æ"]), |
| | | ////"HDate_New": formatDate(result.data[i]["æ°äº¤è´§æ¥æ"]), |
| | | "HRemark": "", |
| | | //"HSourceInterID": result.data[i]["hmainid"], |
| | | //"HSourceEntryID": result.data[i]["HEntryID"], |
| | | //"HSourceBillNo": result.data[i]["åæ®å·"], |
| | | //"HSourceBillType": result.data[i]["åæ®ç±»å"] |
| | | "HMaterID": data.HMaterID |
| | | , "HMaterCode": data.产å代ç |
| | | , "HMaterName": data.产ååç§° |
| | | , "HSourceBillNo": data.åæ®å· |
| | | , "HSourceInterID": data.hmainid |
| | | , "HSourceEntryID": data.HEntryID |
| | | , "HSourceBillType": params[params[2]] |
| | | , "HUnitID": "" |
| | | , "HUnitCode": "" |
| | | , "HUnitName": "" |
| | | , "HQtyMust": "" |
| | | , "HQty": "" |
| | | , "HPrice": "" |
| | | , "HMoney": "" |
| | | , "HWHCode": "" |
| | | , "HWHName": "" |
| | | , "HWHID": "" |
| | | , "HMaterSpec": data.产åè§æ ¼ |
| | | } |
| | | ); |
| | | } |
| | | option.data = rowdata; |
| | | |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ ¹æ®å·¥èºåå·è·åè¡¨å¤´ä¿¡æ¯ |
| | | function getMainInfoByHProcExchBillNo() { |
| | | var HProcExchBillNo = $("#HProcExchBillNo").val(); |
| | |
| | | |
| | | //#region æ°å¢ |
| | | function set_AddNew() { |
| | | debugger |
| | | var content = '../颿åºåº/Kf_MateOutBillLEdit.html?OperationType=1&linterid=&HSouceBillType=0&closeType=1' |
| | | if (subType) { |
| | | if (subType == 'ç¾æ¯æè²') { |