| | |
| | | </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"> |
| | | <input type="text" name="HManagerName" id="HManagerName" 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;"> |
| | |
| | | </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="HWHName" id="HWHName" readonly class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="" style="float:left;width:150px;"> |
| | |
| | | </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="HKeeperName" id="HKeeperName" readonly class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="" style="float:left;width:150px;"> |
| | |
| | | </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="HDeptName" id="HDeptName" readonly class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="" style="float:left;width:150px;"> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">徿¥ç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HSupTypeID" id="HSupTypeID" class="layui-input" value="" style="float:left;width:150px"> |
| | | <select name="HSupTypeID" id="HSupTypeID" class="layui-input" lay-filter="HSupTypeID" value="" style="float:left;width:150px"> |
| | | <option value="1">ä¾åºå</option> |
| | | <option value="2">客æ·</option> |
| | | <option value="3">车é´é¨é¨</option> |
| | |
| | | <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;"> |
| | | <input type="text" name="HSourceBillType" id="HSourceBillType" class="layui-input" value="" style="float:left;width:100%;"> |
| | | </div> |
| | | </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;width:100%;"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | <div class="layui-tab layui-tab-card" lay-filter="TabTest"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">æç»ä¿¡æ¯</li> |
| | | <li>æ±æ»ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | |
| | |
| | | , element = layui.element; |
| | | var option; |
| | | var sBillType = "3832"; |
| | | var TabRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HRemark": "" } |
| | | //var TabRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" } |
| | | |
| | | //#endregion |
| | | |
| | |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | |
| | | set_CountGrid(); |
| | | //夿æä½ç±»å |
| | | if (OperationType == 1) {//æ æºå |
| | | set_AddFNew(); |
| | |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //䏿æ¡äºä»¶éæ©è§¦å |
| | | form.on('select(HSupTypeID)', function (data) { |
| | | $("#HSupID").val(""); |
| | | $("#HSupName").val(""); |
| | | }); |
| | | |
| | | //表头信æ¯å¾æ¥åä½å¼¹çª |
| | | form.on('submit(HSupList)', function () { |
| | | debugger; |
| | |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data;; |
| | | var AddRow = table.cache['mainTable']; |
| | | var NewRow = TabRow; |
| | | var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }; |
| | | switch (obj.event) { |
| | | //æ°å¢ä¸è¡ |
| | | case 'btn-AddLine': btnAddLine(NewRow); |
| | |
| | | layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true); |
| | | var index = parent.layer.getFrameIndex(window.name); //å
å¾å°å½åiframeå±çç´¢å¼ |
| | | parent.layer.close(index); //åæ§è¡å
³é           |
| | | parent.layer.close(index); //åæ§è¡å
³é |
| | | }); |
| | | } |
| | | else { |
| | |
| | | }); |
| | | //æå°Printing |
| | | form.on("submit(view)", function (data) { |
| | | layer.alert("ææ¯æå°æé®ï¼åæ®ä¸»IDæ¯ï¼" + linterid); |
| | | //window.open("../ç产工åºç®¡ç/å·¥åºæ±æ¥å/HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b"); |
| | | window.open("../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/HBarPlanPrint.html?linterid=" + linterid + "&Type=HMouldScrapOutBill&OpenTmp=å¨å
·ç产é¢ç¨æ¡ç "); |
| | | |
| | | if (linterid != "" || linterid != null) { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | | , title: 'æå°æ¨¡çéæ©' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + linterid.toString() + '&MyMsg=' + linterid.toString() + '&Type=HMouldScrapOutBill', 'yes'] |
| | | , resize: false |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('å½ååæ®ID为空ï¼'); |
| | | } |
| | | }); |
| | | //æå°Printing |
| | | form.on("submit(print)", function (data) { |
| | | layer.alert("ææ¯æå°æé®ï¼åæ®ä¸»IDæ¯ï¼" + linterid); |
| | | //window.open("../ç产工åºç®¡ç/å·¥åºæ±æ¥å/HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b"); |
| | | window.open("../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/HBarPlanPrint.html?linterid=" + linterid + "&Type=HMouldScrapOutBill&OpenTmp=å¨å
·ç产é¢ç¨æ¡ç "); |
| | | if (linterid != "" || linterid != null) { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | | , title: 'æå°æ¨¡çéæ©' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + linterid.toString() + '&MyMsg=' + linterid.toString() + '&Type=HMouldScrapOutBill', 'yes'] |
| | | , resize: false |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('å½ååæ®ID为空ï¼'); |
| | | } |
| | | |
| | | }); |
| | | //éåº |
| | |
| | | , { field: 'HSPCode', title: 'ä»ä½ä»£ç ', edit: 'text', event: 'HSPCode', width: 100 } |
| | | , { field: 'HSPName', title: 'ä»ä½åç§°', edit: 'text', width: 100 } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text', width: 100 } |
| | | , { field: 'HStockOrgID', title: 'HStockOrgID', width: 100, hide: true } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo' } |
| | | ]; |
| | | option = { |
| | |
| | | } |
| | | }; |
| | | } |
| | | |
| | | //åå§æ±æ»ä¿¡æ¯ |
| | | function set_CountGrid() { |
| | | //表头 |
| | | columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe", width: 100 } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', edit: 'text', event: 'HMaterCode', width: 100 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', edit: 'text', width: 100 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', edit: 'text', width: 100 } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', edit: 'text', width: 100 } |
| | | , { field: 'æ¹æ¬¡', title: 'æ¹æ¬¡', edit: 'text', width: 100 } |
| | | , { field: 'å®åæ°é', title: 'å®åæ°é', edit: 'text', width: 100 } |
| | | , { field: 'hwhid1', title: 'HWHID', edit: 'text', width: 100, hide: true } |
| | | , { field: 'åè´§ä»åºä»£ç ', title: 'åè´§ä»åºä»£ç ', edit: 'text', event: 'HWHCode', width: 120 } |
| | | , { field: 'åè´§ä»åºåç§°', title: 'åè´§ä»åºåç§°', edit: 'text', width: 120 } |
| | | , { field: 'å夿³¨', title: '夿³¨', edit: 'text', width: 100 } |
| | | ]; |
| | | option1 = { |
| | | id: 'mainTable1' |
| | | , elem: '#mainTable1' |
| | | , height: 500 |
| | | , page: true |
| | | , limit: 500 |
| | | , cellMinWidth: 120 |
| | | , height: 500 |
| | | , cols: [columns] |
| | | , done: function (res, curr, count) { |
| | | } |
| | | }; |
| | | } |
| | | //æ æºåæ°å¢ |
| | | function set_AddFNew() { |
| | | //è·åæå¤§åæ®å· |
| | | get_MAXNum(); |
| | | option.data = [TabRow]; |
| | | option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; |
| | | table.render(option); |
| | | } |
| | | |
| | |
| | | function set_EditFromGrid() { |
| | | set_EditForm(linterid); //ç¼è¾è·å表头 |
| | | set_EditGrid(linterid); //ç¼è¾è·åè¡¨ä½ |
| | | option.data = [TabRow]; |
| | | option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; |
| | | table.render(option); |
| | | } |
| | | |
| | |
| | | data: { "sqlWhere": "and hmainid=" + linterid }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | option.data = result.data; |
| | | option.data = result.list[0]; |
| | | table.render(option); |
| | | option1.data = result.list[1]; |
| | | table.render(option1); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | |
| | | |
| | | //å¢å ä¸è¡ |
| | | function btnAddLine(NewRow) { |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | var tableBak = table.cache["mainTable"]; //è·åä¹åç¼è¾è¿çè¡¨æ ¼æ°æ® |
| | | buttonArr = [];//æ¸
空æ°ç» |
| | | for (var i = 0; i < tableBak.length; i++) { |
| | | buttonArr.push(tableBak[i]); //å°ä¹åçæ°æ®åå¨ |
| | | } |
| | | buttonArr.push(NewRow); //å¨å°¾é¨å ä¸è¡ |
| | | table.reload("mainTable", { |
| | | data: buttonArr //å°æ°æ®éæ°è½½å
¥è¡¨æ ¼ |
| | | }) |
| | | } |
| | | |
| | | //å¤å¶ä¸è¡ |