| | |
| | | <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-inline"> |
| | | <label class="layui-form-label">å
é¨åæ®å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HInnerBillNo" id="HInnerBillNo" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ä»åº<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">éªæ¶å<label style="color:red"> * </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" readonly class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSecManagerID" id="HSecManagerID" class="layui-input" value="" style="float:left;width:150px;"> |
| | |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æºåç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSourceBillType" id="HSourceBillType" class="layui-input" value="" style="float:left;width:150px;"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <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"> |
| | | <select name="HSupTypeID" id="HSupTypeID" lay-filter="HSupTypeID" class="layui-input" value="" style="float:left;width:150px"> |
| | | <option value="1">ä¾åºå</option> |
| | | <option value="2">客æ·</option> |
| | | <option value="3">车é´é¨é¨</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">徿¥åä½<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSupName" id="HSupName" readonly class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;"> |
| | | <input type="text" name="HMangerName" id="HMangerName" readonly class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HManger" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æºåç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSourceBillType" id="HSourceBillType" class="layui-input" value="" style="float:left;"> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">éåå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="XDH" id="XDH" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="text" name="XDH" id="XDH" class="layui-input" value="" style="float:left;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æè¦</label> |
| | | <div class="layui-input-inline"> |
| | | <textarea placeholder="请è¾å
¥æè¦" class="layui-textarea" name="HExplanation" id="HExplanation"></textarea> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">夿³¨</label> |
| | | <div class="layui-input-inline"> |
| | |
| | | <div class="layui-tab layui-tab-card" lay-filter="TabTest"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">æç»ä¿¡æ¯</li> |
| | | <li>æ±æ»ä¿¡æ¯</li> |
| | | <!--<li>æ±æ»ä¿¡æ¯</li>--> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | |
| | | var OperationType = 1;//æä½ç±»å |
| | | var closeType = 2; //å
³éç±»å |
| | | } else { |
| | | debugger; |
| | | var OperationType = params[params[0]];//æä½ç±»å |
| | | var linterid = params[params[1]];//æºåid |
| | | var HSouceBillType = params[params[2]];//æºåç±»å |
| | |
| | | var option = []; |
| | | var option1 = []; |
| | | var sWhere = ""; |
| | | var sBillType = "3801"; |
| | | var sBillType = "1204"; |
| | | //#endregion |
| | | |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | | //åå§å表åæä»¶ |
| | | set_InitFrom(); |
| | |
| | | } |
| | | }); |
| | | }); |
| | | //主管 |
| | | form.on('submit(HManger)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'éªæ¶åå表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/UserInformation.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HMangerName").val(checkStatus.data[0].HName); |
| | | $("#HManagerID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //表头信æ¯ä¿ç®¡åå¼¹çª |
| | | form.on('submit(HKeeperList)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | |
| | | } |
| | | //表头信æ¯å¾æ¥åä½å¼¹çª |
| | | form.on('submit(HSupList)', function () { |
| | | debugger; |
| | | if ($("#HSupTypeID").val() == 0 || $("#HSupTypeID").val() == null) { |
| | | return layer.msg('è¯·éæ©å¾æ¥ç±»å'); |
| | | } |
| | |
| | | if (linterid != "" && linterid != null) { |
| | | refSav = "Update"; |
| | | } |
| | | //debugger; |
| | | data.field.HMaker = sessionStorage["HUserName"];//å¶å人 |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sSubStr = JSON.stringify(table.cache['mainTable']); |
| | |
| | | $.ajax( |
| | | { |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_MouldProdInHouseBill/SaveGetMouldProdInHouseBillList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | url: GetWEBURL() + "/Kf_MateOutBill/SaveGetMateOutBillList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { "msg": sMainSub }, |
| | | dataType: "json", |
| | |
| | | elem: '#HDate' |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | //åå§åæç»è¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe", width: 100 } |
| | | , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HMaterCode', title: 'å¨å
·ä»£ç ', edit: 'text', event: 'HMaterCode', width: 100 } |
| | | , { field: 'HMaterName', title: 'å¨å
·åç§°', edit: 'text', width: 100 } |
| | | , { field: 'HMaterCode', title: 'ç©æä»£ç ', edit: 'text', event: 'HMaterCode', width: 100 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', edit: 'text', width: 100 } |
| | | , { field: 'HMaterSpec', title: 'è§æ ¼åå·', edit: 'text', width: 100 } |
| | | , { field: 'HBatchNo', title: 'æ¹æ¬¡', edit: 'text', width: 100 } |
| | | , { field: 'HUnitID', title: 'HUnitID', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HUnitCode', title: '计éåä½ä»£ç ', edit: 'text', event: 'HUnitCode', width: 100 } |
| | | , { field: 'HUnitName', title: '计éåä½', edit: 'text', width: 100 } |
| | | , { field: 'HDesignLife', title: '设计寿å½', edit: 'text', width: 100 } |
| | | , { field: 'HLeaveLife', title: 'å©ä½å¯¿å½', edit: 'text', width: 100 } |
| | | , { field: 'HUseLife', title: '使ç¨å¯¿å½', edit: 'text', width: 100 } |
| | | , { field: 'HQtyMust', title: 'åºæ¶æ°é', edit: 'text', width: 100 } |
| | | , { field: 'HQty', title: '宿¶æ°é', edit: 'text', width: 100 } |
| | | , { field: 'HQtyMust', title: 'åºåæ°é', edit: 'text', width: 100 } |
| | | , { field: 'HQty', title: 'å®åæ°é', edit: 'text', width: 100 } |
| | | , { field: 'HPrice', title: 'åä»·', edit: 'text', width: 100 } |
| | | , { field: 'HMoney', title: 'éé¢', edit: 'text', width: 100 } |
| | | , { field: 'HWHID', title: 'HWHID', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HWHCode', title: 'æ¶æä»åºä»£ç ', edit: 'text', event: 'HWHCode', width: 120 } |
| | | , { field: 'HWHName', title: 'æ¶æä»åºåç§°', edit: 'text', width: 120 } |
| | | , { field: 'HSPID', title: 'HSPID', edit: 'text', width: 100, hide: true } |
| | | , { field: 'HSPCode', title: 'æ¶æä»ä½ä»£ç ', edit: 'text', event: 'HSPCode', width: 120 } |
| | | , { field: 'HSPName', title: 'æ¶æä»ä½åç§°', edit: 'text', width: 120 } |
| | | , { field: 'HStockOrgID', title: 'HStockOrgID', width: 100, hide: true } |
| | | , { field: 'HWHCode', title: 'åæä»åºä»£ç ', edit: 'text', event: 'HWHCode', width: 120 } |
| | | , { field: 'HWHName', title: 'åæä»åºåç§°', edit: 'text', width: 120 } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text', width: 100 } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo' } |
| | | ]; |
| | |
| | | function set_AddFNew() { |
| | | //è·åæå¤§åæ®å· |
| | | get_MAXNum(); |
| | | option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "","HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; |
| | | option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HRemark": "" }]; |
| | | table.render(option); |
| | | } |
| | | //è·åæå¤§åæ®å· |
| | |
| | | function set_EditFromGrid(linterid) { |
| | | set_EditForm(linterid); //ç¼è¾è·å表头 |
| | | set_EditGrid(linterid); //ç¼è¾è·åè¡¨ä½ |
| | | option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "","HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; |
| | | option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HRemark": "" }]; |
| | | table.render(option); |
| | | } |
| | | //ç¼è¾è·å表头 |
| | | function set_EditForm(linterid) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "Sc_MouldProdInBill/Sc_MouldProdInHouseBillListCheckDetai", |
| | | url: GetWEBURL() + "Kf_MateOutBill/Kf_MateOutBillListCheckDetai", |
| | | type: "GET", |
| | | data: { |
| | | "HID": linterid |
| | |
| | | form.val("component-form-group", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HBillNo": data.åæ®å· |
| | | , "HDate": formatDate(data.æ¥æ) |
| | | , "HInnerBillNo": data.å
é¨åæ®å· |
| | | , "HWHID": data.HWHID //ä»åºID |
| | | //, "HInnerBillNo": data.å
é¨åæ®å· |
| | | , "HWHID": data.HWHIDMain //ä»åºID |
| | | , "HWHName": data.ä»åº //ä»åºåç§° |
| | | , "HSecManagerID": data.hsecmanagerid //éªæ¶åID |
| | | , "HSecManagerName": data.éªæ¶å //éªæ¶ååç§° |
| | | , "HSecManagerName": data.颿å //éªæ¶ååç§° |
| | | , "HKeeperID": data.hkeeperid //ä¿ç®¡åID |
| | | , "HKeeperName": data.ä¿ç®¡å //ä¿ç®¡ååç§° |
| | | , "HManagerID": data.hmanagerid //ä¿ç®¡ååç§° |
| | | , "HMangerName": data.主管 //ä¿ç®¡ååç§° |
| | | , "HDeptID": data.HDeptID //é¨é¨ID |
| | | , "HDeptName": data.é¨é¨ //é¨é¨åç§° |
| | | , "HSourceBillType": data.æºåç±»å //æºåç±»å |
| | | , "XDH": "" //éåå· |
| | | , "HExplanation": data.æè¦ //æè¦ |
| | | , "HRemark": data.è¡¨å¤´å¤æ³¨ //夿³¨ |
| | | , "HSupTypeID": data.徿¥ç±»å //éåå· |
| | | , "HSupName": data.徿¥åä½ //æè¦ |
| | | , "HSupID": data.HSupID //夿³¨ |
| | | }); |
| | | |
| | | } else { |
| | |
| | | $("#HInterID").val(linterid);//ä¿®æ¹æ¶ä¸»è¡¨ID |
| | | //ç¼è¾å è½½æ°æ® |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Sc_MouldProdInBill/Sc_MouldScrapInProdBillListProjectDetai', |
| | | url: GetWEBURL() + 'Kf_MateOutBill/Kf_MateOutBillListProjectDetai', |
| | | type: "GET", |
| | | data: { "sqlWhere": "and hmainid=" + linterid }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | option.data = result.list[0]; |
| | | table.render(option); |
| | | option1.data = result.list[1]; |
| | | table.render(option1); |
| | | //option1.data = result.list[1]; |
| | | //table.render(option1); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index0); |
| | | layer.close(); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'å¨å
·å表', |
| | | title: 'ç©æå表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/MouldInformation.html', 'yes'], |
| | | content: ['../../PublicPage/PartInformation.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | |
| | | return Result = false; |
| | | } |
| | | if ($("#HSecManagerID").val() == '' || $("#HSecManagerID").val() == null) { |
| | | layer.msg("éªæ¶åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | layer.msg("颿åä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if ($("#HKeeperID").val() == '' || $("#HKeeperID").val() == null) { |
| | |
| | | layer.msg("é¨é¨ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | |
| | | if ($("#HManagerID").val() == '' || $("#HManagerID").val() == null) { |
| | | layer.msg("主管ä¸è½ä¸ºç©ºï¼", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (typeof (sSubStr) == "undefined" || sSubStr == "") { |
| | | layer.msg("没æç©ææç»è®°å½", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | |
| | | if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") { |
| | | sSubStr = JSON.parse(sSubStr); |
| | | for (var i = 0; i < sSubStr.length; i++) { |
| | | if (sSubStr[i].HMaterID == "") { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,å¨å
·ä¿¡æ¯ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | //if (sSubStr[i].HMaterID == "") { |
| | | // layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,ç©æä¿¡æ¯ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return Result = false; |
| | | //} |
| | | if (sSubStr[i].HUnitID == "") { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,计éåä½ä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | if (sSubStr[i].HWHID == "") { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,æ¶æä»åºä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,åæä»åºä¸ºç©º!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return Result = false; |
| | | } |
| | | } |