| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 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 class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | </div> |
| | |
| | | </div> |
| | | |
| | | <div class="layui-col-xs4 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="HMangerName" id="HMangerName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | |
| | | </div> |
| | | |
| | | <div class="layui-col-xs4 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="HWHName" id="HWHName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 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="HSCWHName" id="HSCWHName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSCWHID" id="HSCWHID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 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="HSecManagerName" id="HSecManagerName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSecManagerID" id="HSecManagerID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 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="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 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="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | |
| | | <label class="layui-form-label">æºåç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HSourceBillType" lay-filter="HSourceBillType" id="HSourceBillType"> |
| | | <option value="è°æ¨ç³è¯·å" selected="selected">è°æ¨ç³è¯·å</option> |
| | | <option value="1243" selected="selected">è°æ¨ç³è¯·å</option> |
| | | <option value="æå·¥å½å
¥">æå·¥å½å
¥</option> |
| | | </select> |
| | | |
| | |
| | | |
| | | , "HEmpID": data[0]["HEmpID"] |
| | | , "HEmpName": data[0]["ä¸å¡å"] |
| | | , "HWHID": data[0]["HWHID"] |
| | | , "HWHName": data[0]["è°å
¥ä»åº"] |
| | | , "HSCWHID": data[0]["HWHID"] |
| | | , "HSCWHName": data[0]["è°åºä»åº"] |
| | | , "HSecManagerID": data[0]["HSecManagerID"] |
| | | , "HSecManagerName": data[0]["éªæ¶å"] |
| | | , "HKeeperID": data[0]["HKeeperID"] |
| | | , "HKeeperName": data[0]["ä¿ç®¡å"] |
| | | |
| | | , "HDeptID": data[0]["HDeptID"] |
| | | , "HManagerID": data[0]["HManagerID"] |
| | | , "HMangerName": data[0]["主管"] |
| | | |
| | | , "HWHID": data[0]["HWHID"] |
| | | , "HWHName": data[0]["è°å
¥ä»åº"] |
| | | , "HSCWHID": data[0]["HSCWHID"] |
| | | , "HSCWHName": data[0]["è°åºä»åº"] |
| | | |
| | | |
| | | , "HExplanation": data[0]["HExplanation"] |
| | | , "HInvoiceBillNo": data[0]["å票ç¼å·"] |
| | | , "HProjectID": data[0]["HProjectID"] |
| | |
| | | //#region ä¿åæ¹æ³ |
| | | function set_SaveBill(data) { |
| | | |
| | | if ($("#HDeptName").val() == 0) { |
| | | layer.msg("è¯·éæ©é¨é¨ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | if ($("#HWHID").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: "温馨æç¤º" }); |
| | | if ($("#HSCWHID").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: "温馨æç¤º" }); |
| | | if ($("#HManagerID").val() == 0) { |
| | | layer.msg("è¯·éæ©è´è´£äººï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | if ($("#HSecManagerID").val() == 0) { |
| | | layer.msg("è¯·éæ©éªæ¶åï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | layer.msg("è¯·éæ©éªæ¶äººï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | if ($("#HEmpID").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; |
| | | } |
| | | |
| | | |
| | | |
| | | var num = []; |
| | |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | | //è¡å
å¿«æ·é®çé |
| | |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | , end: function () { |
| | | if (OptionData.length>0) { |
| | | obj.update({ |
| | | "HMaterID": OptionData.HMaterID |
| | | , "ç©æä»£ç ": OptionData.ç©æä»£ç |
| | | , "ç©æåç§°": OptionData.ç©æåç§° |
| | | , "è§æ ¼åå·": OptionData.è§æ ¼åå· |
| | | , "HUnitID": OptionData.HUnitID |
| | | , "计éåä½": OptionData.计éåä½åç§° |
| | | }) |
| | | OptionData = []; |
| | | } |
| | | //if (OptionData.length>0) { |
| | | // OptionData = []; |
| | | //} |
| | | obj.update({ |
| | | "HMaterID": OptionData.HItemID |
| | | , "ç©æä»£ç ": OptionData.ç©æä»£ç |
| | | , "ç©æåç§°": OptionData.ç©æåç§° |
| | | , "è§æ ¼åå·": OptionData.è§æ ¼åå· |
| | | , "HUnitID": OptionData.HUnitID |
| | | , "计éåä½": OptionData.计éåä½åç§° |
| | | }) |
| | | |
| | | } |
| | | }); |
| | |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | , end: function () { |
| | | if (OptionData.length > 0) { |
| | | obj.update({ |
| | | "HPropertyID": OptionData.HItemID |
| | | , "è¾
å©å±æ§": OptionData.è¾
å©å±æ§åç§° |
| | | }) |
| | | OptionData = []; |
| | | } |
| | | |
| | | //if (OptionData.length > 0) { |
| | | // OptionData = []; |
| | | //} |
| | | obj.update({ |
| | | "HPropertyID": OptionData.HItemID |
| | | , "è¾
å©å±æ§": OptionData.è¾
å©å±æ§åç§° |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | |
| | | , end: function () { |
| | | if (OptionData.length > 0) { |
| | | obj.update({ |
| | | "HUnitID": OptionData.HItemID |
| | | , "计éåä½": OptionData.计éåä½åç§° |
| | | "HUnitID": OptionData[0].HItemID |
| | | , "计éåä½": OptionData[0].计éåä½åç§° |
| | | }) |
| | | OptionData = []; |
| | | } |
| | |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | , end: function () { |
| | | if (OptionData.length > 0) { |
| | | obj.update({ |
| | | "HWHID": OptionData.HItemID |
| | | , "è°å
¥ä»åº": OptionData.ä»åºåç§° |
| | | }) |
| | | OptionData = []; |
| | | } |
| | | //if (OptionData.length > 0) { |
| | | // OptionData = []; |
| | | //} |
| | | obj.update({ |
| | | "HWHID": OptionData.HItemID |
| | | , "è°å
¥ä»åº": OptionData.ä»åºåç§° |
| | | }) |
| | | |
| | | } |
| | | }) |
| | |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | , end: function () { |
| | | if (OptionData.length > 0) { |
| | | obj.update({ |
| | | "HSCWHID": OptionData.HItemID |
| | | , "è°åºä»åº": OptionData.ä»åºåç§° |
| | | }) |
| | | OptionData = []; |
| | | } |
| | | //if (OptionData.length > 0) { |
| | | // OptionData = []; |
| | | //} |
| | | obj.update({ |
| | | "HSCWHID": OptionData.HItemID |
| | | , "è°åºä»åº": OptionData.ä»åºåç§° |
| | | }) |
| | | |
| | | } |
| | | }) |
| | |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | obj.update({ |
| | | |
| | | "HSPID": checkStatus.data[0].HItemID, |
| | | "HSPID": checkStatus.data[0].HMainID, |
| | | "ä»ä½åç§°": checkStatus.data[0].ä»ä½åç§° |
| | | }) |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | , end: function () { |
| | | if (OptionData.length > 0) { |
| | | obj.update({ |
| | | "HSPID": OptionData.HItemID |
| | | , "ä»ä½åç§°": OptionData.ä»ä½åç§° |
| | | }) |
| | | OptionData = []; |
| | | } |
| | | //if (OptionData.length > 0) { |
| | | // OptionData = []; |
| | | //} |
| | | obj.update({ |
| | | "HSPID": OptionData.HMainID |
| | | , "ä»ä½åç§°": OptionData.ä»ä½åç§° |
| | | }) |
| | | |
| | | } |
| | | }) |
| | |
| | | function getSupType() { |
| | | var type = $("#HSourceBillType").val(); |
| | | switch (type) { |
| | | case '1102': |
| | | return { url: "../../éè´ç®¡ç/éè´è®¢å/Cg_POOrderBillList.html", name: "éè´è®¢å" }; |
| | | break; |
| | | case '1103': |
| | | return { url: "../../éè´ç®¡ç/æ¶æéç¥å/Cg_POInStockBillList.html", name: "æ¶æéç¥å" }; |
| | | break; |
| | | case 'è°æ¨ç³è¯·å': |
| | | case '1243': |
| | | return { url: "../../ä»å管ç/ä»åºè°æ¨/Kf_MoveStockRequestBillList.html", name: "è°æ¨ç³è¯·å" }; |
| | | break; |
| | | } |
| | |
| | | |
| | | //表头信æ¯éæ©åæ®å¼¹çª |
| | | form.on('submit(XDHList)', function () { |
| | | if ($("#HSourceBillType").val() == "è°æ¨ç³è¯·å") { |
| | | if ($("#HSourceBillType").val() == "1243") { |
| | | var url = getSupType().url; |
| | | url = encodeURI(url); |
| | | |
| | |
| | | for (var i = 0; i < checkStatus.data.length; i++) { |
| | | ProcessNumber.push(checkStatus.data[i]); |
| | | } |
| | | $("#HEmpID").val(checkStatus.data[0]["HEmpID"]); |
| | | $("#HEmpName").val(checkStatus.data[0]["ä¸å¡å"]); |
| | | $("#HSecManagerID").val(checkStatus.data[0]["HSecManagerID"]); |
| | | $("#HSecManagerName").val(checkStatus.data[0]["éªæ¶å"]); |
| | | $("#HKeeperID").val(checkStatus.data[0]["HKeeperID"]); |
| | | $("#HKeeperName").val(checkStatus.data[0]["ä¿ç®¡å"]); |
| | | $("#HManagerID").val(checkStatus.data[0]["HMangerID"]); |
| | | $("#HMangerName").val(checkStatus.data[0]["主管"]); |
| | | |
| | | $("#HWHID").val(checkStatus.data[0]["HWHID"]); |
| | | $("#HWHName").val(checkStatus.data[0]["è°å
¥ä»åº"]); |
| | | $("#HSCWHID").val(checkStatus.data[0]["HSCWHID"]); |
| | | $("#HSCWHName").val(checkStatus.data[0]["è°åºä»åº"]); |
| | | //è·åå½åä½ç½®æå¨è¡æ° |
| | | var NowNum = 0; |
| | | NowNum = option.data.length; |
| | | |
| | | if (getSupType().name == "éè´è®¢å") { |
| | | var j = 0; |
| | | for (var i = 0; i < checkStatus.data.length; i++) { |
| | | option.data.push({ |
| | | "HMaterID": checkStatus.data[j].HMaterID, "ç©æä»£ç ": checkStatus.data[j].ç©æä»£ç , "ç©æåç§°": checkStatus.data[j].ç©æåç§°, "è§æ ¼åå·": checkStatus.data[j].è§æ ¼åå·, |
| | | "HUnitID": checkStatus.data[j].HUnitID, "计éåä½": checkStatus.data[j].计éåä½, |
| | | "HQty": checkStatus.data[j].æ°é, "HPrice": checkStatus.data[j].åä»·, |
| | | "HMoney": checkStatus.data[j].éé¢, |
| | | "HSourceBillNo": checkStatus.data[j].åæ®å·, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid, |
| | | }) |
| | | j++; |
| | | } |
| | | table.render(option); |
| | | layer.close(index); |
| | | } |
| | | else if (getSupType().name == "æ¶æéç¥å") { |
| | | var j = 0; |
| | | for (var i = 0; i < ProcessNumber.length; i++) { |
| | | option.data.push({ |
| | | "HMaterID": checkStatus.data[j].HMaterID, "ç©æä»£ç ": checkStatus.data[j].ç©æä»£ç , "ç©æåç§°": checkStatus.data[j].ç©æåç§°, "è§æ ¼åå·": checkStatus.data[j].è§æ ¼åå·, |
| | | " ": 0, "ç©æè¾
å©å±æ§": "", "HUnitID": checkStatus.data[j].HUnitID, "计éåä½": checkStatus.data[j].计éåä½, "HQtyMust": "", "HQty": checkStatus.data[j].æ°é, "HRemark": "", |
| | | "HPrice": checkStatus.data[j].åä»·, "HMoney": checkStatus.data[j].éé¢, "HWHID": checkStatus.data[j].HWHID, "æ¶æä»åº": checkStatus.data[j].æ¶æä»åº, |
| | | "HSPID": checkStatus.data[j].HSPID, "ä»ä½åç§°": checkStatus.data[j].ä»ä½åç§°, "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0, |
| | | "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", |
| | | "HSourceBillNo": checkStatus.data[j].åæ®å·, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid, |
| | | }) |
| | | j++; |
| | | } |
| | | table.render(option); |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | else if (getSupType().name == "è°æ¨ç³è¯·å") { |
| | | if ($("#HSourceBillType").val() == "1243") { |
| | | var j = 0; |
| | | for (var i = 0; i < ProcessNumber.length; i++) { |
| | | option.data.push({ |
| | | "HMaterID": checkStatus.data[j].HMaterID, "ç©æä»£ç ": checkStatus.data[j].ç©æä»£ç , "ç©æåç§°": checkStatus.data[j].ç©æåç§°, "è§æ ¼åå·": checkStatus.data[j].è§æ ¼åå·, |
| | | "HPropertyID": checkStatus.data[j].HPropertyID, "è¾
å©å±æ§": checkStatus.data[j].è¾
å©å±æ§, "HUnitID": checkStatus.data[j].HUnitID, "计éåä½": checkStatus.data[j].计éåä½, "HQtyMust": checkStatus.data[j].åºæ¶æ°é, "HQty": checkStatus.data[j].宿¶æ°é, "HRemark": checkStatus.data[j].表ä½å¤æ³¨, |
| | | "HPrice": checkStatus.data[j].åä»·, "HMoney": checkStatus.data[j].éé¢, "HWHID": checkStatus.data[j].HWHID, "è°å
¥ä»åº": checkStatus.data[j].è°å
¥ä»åº, "HSCWHID": checkStatus.data[j].HSCWHID, "è°åºä»åº": checkStatus.data[j].è°åºä»åº, |
| | | "HSPID":"0", "ä»ä½åç§°":"", |
| | | "HPOOrderInterID": checkStatus.data[j].HPOOrderInterID, "HPOOrderEntryID": checkStatus.data[j].HPOOrderEntryID, "HPOOrderBillNo": checkStatus.data[j].éè´è®¢åå·, |
| | | "HSeOrderInterID": checkStatus.data[j].HSeOrderInterID, "HSeOrderEntryID": checkStatus.data[j].HSeOrderEntryID, "HSeOrderBillNo": checkStatus.data[j].éå®è®¢åå·, |
| | | "HSourceBillNo": checkStatus.data[j].åæ®å·, "HSourceBillType": checkStatus.data[j].HBillSubType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid, |
| | |
| | | |
| | | }); |
| | | }); |
| | | |
| | | //夿æéçä¸è¡¨æ ¼æ¯å¦æé夿°æ® |
| | | function checkDuplicateData(data) { |
| | | const duplicates = []; |
| | |
| | | OptionData = data |
| | | } |
| | | //åå»è¿å计éåä½ |
| | | function GetGyUnit(data) { |
| | | function GetAuxiliaryUnitValue(data) { |
| | | OptionData = data |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | //åå»è¿åä»ä½ |
| | | function GetGyStockPlace(data) { |
| | | function GetGyStockPlace(data) { |
| | | OptionData = data |
| | | } |
| | | //åå»è¿åè°å
¥ä»åº |