| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="mainTable"></table> |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script> |
| | |
| | | layui.use(['table', 'form', 'layer'], function () { |
| | | var table = layui.table |
| | | , form = layui.form |
| | | , layer = layui.layer; |
| | | , layer = layui.layer; |
| | | |
| | | //å¿«éæ¥è¯¢ |
| | | form.on('submit(HQuery)', function () { |
| | | //var sMainStr = JSON.stringify(table.cache['mainTable']); |
| | |
| | | var index = parent.layer.getFrameIndex(window.name); |
| | | parent.layer.close(index); |
| | | }); |
| | | RoadQuery($('#Value').val()); |
| | | |
| | | RoadQuery($('#Value').val()); |
| | | |
| | | table.on('row(mainTable)', function (obj) { |
| | | //éä¸è¡æ¹åé¢è² |
| | | var flag = !obj.tr.find(':checkbox:first').prop('checked'); |
| | | obj.tr.find(':checkbox').prop('checked', flag); |
| | | if (flag) { |
| | | obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //设置å¤éæ¡é䏿 ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//æ¹åå½åtrèæ¯é¢è²ååä½é¢è² |
| | | } else { |
| | | obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//åæ¶å¤éæ¡é䏿 ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:" });//åæ¶å½åtré¢è² |
| | | } |
| | | //mainTable ä¸ºè¡¨æ ¼ID æ³¨ææ¤å¤å¦æID䏿£ç¡®å°å¯¼è´ä½ å¨çå¬å¤éæ¡æ¶è·åä¸å°ä½ éæ©çæ°æ®ï¼åé¢çåªæ¯æ·»å æå é¤é䏿ªé䏿 ·å¼ä»¥åè®¾ç½®èæ¯è²ï¼åä½é¢è² |
| | | layui.each(table.cache.mainTable, function (i, l) { |
| | | if (obj.tr.index() == l.LAY_TABLE_INDEX) { |
| | | l.LAY_CHECKED = flag; |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | table.render({ |
| | | elem: '#mainTable' |
| | | // , url: '/demo/table/user/' |
| | | , data: [] |
| | | //, cellMinWidth: 80 //å
¨å±å®ä¹å¸¸è§åå
æ ¼çæå°å®½åº¦ï¼layui 2.2.1 æ°å¢ |
| | | , cols: [[ |
| | | { type: 'radio' } |
| | | { type: 'checkbox' } |
| | | , { field: 'HItemID', title: 'HItemID', hide: true } |
| | | , { field: 'å·¥ä½ä¸å¿ä»£ç ', title: 'å·¥ä½ä¸å¿ä»£ç ' } |
| | | , { field: 'å·¥ä½ä¸å¿', title: 'å·¥ä½ä¸å¿', sort: true } |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>é¢è§</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>åå®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Stop" id="btn-Stop"><i class="layui-icon layui-icon-radio"></i>ç¦ç¨</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeStop" id="btn-DeStop"><i class="layui-icon layui-icon-radio"></i>åç¦ç¨</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>å
³é</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>åå
³é</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | |
| | | break; |
| | | //åå
³é |
| | | case 'set_CancelCloseBill': set_CloseBill(2); |
| | | //ç¦ç¨æé® |
| | | case 'btn-Stop': |
| | | set_De_Stop(0); |
| | | break; |
| | | //åç¦ç¨æé® |
| | | case 'btn-DeStop': |
| | | set_De_Stop(1); |
| | | break; |
| | | break; |
| | | //éåºæé® |
| | | case 'get_Exit': Pub_Close(2); |
| | |
| | | else { |
| | | layer.msg("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // åç¦ç¨/ç¦ç¨æ°æ® |
| | | function set_De_Stop(num) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].HItemID.toString(); |
| | | layer.confirm("确认è¦ç¦ç¨å?", function (index) { |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_EquipTypeBill/StopGy_EquipTypeBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "IsStop": num, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | $("#btnSearch").trigger('click'); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å®¡æ ¸ï¼'); |
| | | } |
| | | } |
| | | |
| | | //ä¿®æ¹æé® |
| | | function set_ShowBill() { |
| | |
| | | |
| | | //#endregion |
| | | |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | | //åå§åçé¢ |
| | | set_ClearBill(); |
| | |
| | | }); |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | get_FastQuery(1); |
| | | }); |
| | | // éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | |
| | | function set_ClearBill() { |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //æ¥è¯¢ |
| | | get_Display(sWhere); |
| | | if (addSWhereByOpenType()) { //addSWhereByOpenType()æ¹æ³å¤ææ¯å¦å
¶å®é¡µé¢æå¼æ¬é¡µé¢ï¼è¥æ¯åå¤çè¿æ»¤æ¡ä»¶ï¼å¹¶è¿åtrue |
| | | get_FastQuery(2); |
| | | } else { |
| | | get_FastQuery(1); |
| | | } |
| | | |
| | | } |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | |
| | | layer.close(index); |
| | | } |
| | | //å¿«éæ¥è¯¢ |
| | | function get_FastQuery() { |
| | | function get_FastQuery(number) { |
| | | var HNumber = $("#HNumber").val(); |
| | | var HName = $("#HName").val(); |
| | | var ColName = $("#ColName").val();//å¤éæ¡ |
| | |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var hID = data[0].HItemID.toString(); |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾é¡¹ç®è´¹ç¨' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../å
¬ç¨åºç¡èµæ/Add_Edit_Gy_ProjectMoney.html?OperationType=3&linterid=' + hID + '&HSouceBillType=' |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | |
| | | if (data[0].å®¡æ ¸äºº == "" && data[0].å®¡æ ¸äºº == null && data[0].ç¦ç¨äºº == "" && data[0].ç¦ç¨äºº == null ) { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾é¡¹ç®è´¹ç¨' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../å
¬ç¨åºç¡èµæ/Add_Edit_Gy_ProjectMoney.html?OperationType=3&linterid=' + hID + '&HSouceBillType=' |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | location.reload(); |
| | | } |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('忮䏿¯åå»ºç¶æï¼æ æ³ç¼è¾ï¼'); |
| | | } |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | |
| | | //#region 夿æ¯ç´æ¥æå¼é¡µé¢è¿æ¯å
¶å®é¡µé¢éè¿éæ©æé®æå¼ï¼å¹¶æ¾ç¤ºç¸åºæ°æ® |
| | | function addSWhereByOpenType() { |
| | | //è·ååæ° |
| | | var params = getUrlVars(); |
| | | var openType = params[params[0]]; //ä»åæ°ä¸è·å æå¼æ¹å¼ 1ç´æ¥æå¼ 2å
¶å®é¡µé¢éè¿éæ©æé®æå¼ |
| | | |
| | | if (openType == 2) { |
| | | sWhere += " and ISNULL(å®¡æ ¸äºº,'') != '' "; |
| | | |
| | | form.render("select"); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | //#endregion |
| | | //#region è·ååæ° |
| | | function getUrlVars() { |
| | | var vars = [], hash; |
| | | var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); |
| | | for (var i = 0; i < hashes.length; i++) { |
| | | hash = hashes[i].split('='); |
| | | vars.push(hash[0]); |
| | | vars[hash[0]] = hash[1]; |
| | | } |
| | | return vars; |
| | | } |
| | | //#endregion |
| | | //#region éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |
| | |
| | | <div class="layui-input-block"> |
| | | <input type="radio" name="FixedItems" value="SProc" title="å·¥åº"> |
| | | <input type="radio" name="FixedItems" value="SMater" title="ç©æ"> |
| | | <input type="radio" name="FixedItems" value="SWorkCenter" title="å·¥ä½ä¸å¿"> |
| | | <input type="radio" name="FixedItems" value="SFree" title="èªç±" checked> |
| | | </div> |
| | | </div> |
| | |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchDept" id="btnSearchDept" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">å·¥ä½ä¸å¿</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HWorkCenterName" id="HWorkCenterName" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly> |
| | | <input type="hidden" name="HWorkCenterID" id="HWorkCenterID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchWorkCenter" id="btnSearchWorkCenter" style="width: 40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä¸å¿ä»£ç </label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HWorkCenterNumber" id="HWorkCenterNumber" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | var option = []; |
| | | var HModName = "Gy_ProcPrice"; |
| | | //ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | var titleData = ["HItemID","HDeptID","HMaterIDCol","HProcIDCol","HSourceIDCol"]; |
| | | var titleData = ["HItemID", "HDeptID", "HMaterIDCol", "HProcIDCol", "HSourceIDCol"]; |
| | | //夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | //if (sessionStorage.login != "login") { |
| | | // layer.confirm("ç»å½å¤±æï¼è¯·éæ°ç»å½ï¼", { |
| | |
| | | //æ°å¢è¡è¡¨æ ¼æ°æ® |
| | | var NewRow = { |
| | | "HMaterIDCol": "", "HMaterNumberCol": "", "HMaterNameCol": "", "HMaterModelCol": "", "HProcIDCol": "", |
| | | "HProcNumberCol": "", "HProcNameCol": "","HSourceIDCol":"", "HSourceNumberCol": "", "HSourceNameCol": "", "HPriceCol": "", |
| | | "HProcNumberCol": "", "HProcNameCol": "", "HSourceIDCol": "", "HSourceNumberCol": "", "HSourceNameCol": "", "HPriceCol": "0", |
| | | "HBeginDateCol": "", "HEndDateCol": "", "HCostFlagCol": "false", "HFlowFlagCol": "false", "HPayFlagCol": "false", |
| | | "HRemarkCol": "" |
| | | "HRemarkCol": "", |
| | | "HWorkCenterID": 0, "HWorkCenterNumber": "", "HWorkCenterName": "", "HWorkQty": 0, "HStdEmp": 0, "HChangeTimes": 0, |
| | | "HChangeMoney": 0, "HProcNo": 0, "HPieceTimes": 0, "HMouldQty": 0, "HChangeMouldMoney": 0, "HRushQty": 0 |
| | | }; |
| | | switch (obj.event) { |
| | | case 'btn-AddLine': |
| | |
| | | NewRow.HProcIDCol = $("#HProcID").val(); |
| | | NewRow.HProcNumberCol = $("#HProcNumber").val(); |
| | | NewRow.HProcNameCol = $("#HProcName").val(); |
| | | } |
| | | else if (FixedItems == "SWorkCenter") { |
| | | NewRow.HWorkCenterID = $("#HWorkCenterID").val(); |
| | | NewRow.HWorkCenterNumber = $("#HWorkCenterNumber").val(); |
| | | NewRow.HWorkCenterName = $("#HWorkCenterName").val(); |
| | | } |
| | | NewRow.HBeginDateCol = Format(new Date(), "yyyy-MM-dd"); |
| | | NewRow.HEndDateCol = "2100-01-01"; |
| | |
| | | var field = $(this).data('field'); |
| | | laydate.render({ |
| | | elem: this.firstChild |
| | | , show: true //ç´æ¥æ¾ç¤º |
| | | , show: true //ç´æ¥æ¾ç¤º |
| | | , closeStop: this |
| | | , done: function (nowDate) { |
| | | //æ¶é´éæ©å®æï¼è¡æ°æ®æ´æ° |
| | |
| | | var field = $(this).data('field'); |
| | | laydate.render({ |
| | | elem: this.firstChild |
| | | , show: true //ç´æ¥æ¾ç¤º |
| | | , show: true //ç´æ¥æ¾ç¤º |
| | | , closeStop: this |
| | | , done: function (nowDate) { |
| | | //æ¶é´éæ©å®æï¼è¡æ°æ®æ´æ° |
| | |
| | | } |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHPrice') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | //åªè½è¾å
¥å°æ°ç¹åæ°åï¼ä¿ç6ä½å°æ° |
| | | $input.val(val.replace(/^\D*([0-9]\d*\.?\d{0,6})?.*$/, '$1', '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHWorkQty') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/^\D*([0-9]\d*\.?\d{0,6})?.*$/, '$1', '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHStdEmp') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/^\D*([0-9]\d*\.?\d{0,6})?.*$/, '$1', '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHChangeTimes') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/^\D*([0-9]\d*\.?\d{0,6})?.*$/, '$1', '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHChangeMoney') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/^\D*([0-9]\d*\.?\d{0,6})?.*$/, '$1', '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHProcNo') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/^\D*([0-9]\d*\.?\d{0,6})?.*$/, '$1', '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHPieceTimes') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/^\D*([0-9]\d*\.?\d{0,6})?.*$/, '$1', '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHMouldQty') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/^\D*([0-9]\d*\.?\d{0,6})?.*$/, '$1', '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHChangeMouldMoney') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/^\D*([0-9]\d*\.?\d{0,6})?.*$/, '$1', '')); |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHRushQty') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/^\D*([0-9]\d*\.?\d{0,6})?.*$/, '$1', '')); |
| | | }); |
| | | } |
| | | |
| | | $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { |
| | | if (event.key == "F7") { |
| | | if (obj.event == 'HMaterCheck') |
| | | { |
| | | if (obj.event == 'HMaterCheck') { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', |
| | | skin: 'layui-layer-rim', |
| | | title: 'ç©æå表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | |
| | | content: ['../../Baseset/åºç¡èµæ/Gy_MaterialList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | var iframeWindow = window['layui-layer-iframe' + index] |
| | | var iframeWindow = window['layui-layer-iframe' + index] |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable'); |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | |
| | | } |
| | | }); |
| | | } |
| | | if (obj.event == 'HProcCheck') |
| | | { |
| | | if (obj.event == 'HProcCheck') { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', |
| | | skin: 'layui-layer-rim', |
| | | title: 'å·¥åºå表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | |
| | | content: ['../../Baseset/åºç¡èµæ/Gy_ProcList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | var iframeWindow = window['layui-layer-iframe' + index] |
| | | var iframeWindow = window['layui-layer-iframe' + index] |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable'); |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | |
| | | , HMaterModelCol: $("#HMaterModel").val() |
| | | }); |
| | | } |
| | | layer.close(layer.index); |
| | | layer.close(layer.index); |
| | | } |
| | | , btn2: function (index, layero) { |
| | | }, |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | if (obj.event == 'HWorkCenterCheck') { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', |
| | | title: 'å·¥ä½ä¸å¿å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../Baseset/åºç¡èµæ/Gy_WorkCenterList.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | var iframeWindow = window['layui-layer-iframe' + index] |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable'); |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | obj.update({ |
| | | HWorkCenterID: checkStatus.data[0].HItemID |
| | | , HWorkCenterNumber: checkStatus.data[0].å·¥ä½ä¸å¿ä»£ç |
| | | , HWorkCenterName: checkStatus.data[0].å·¥ä½ä¸å¿ |
| | | }); |
| | | layer.close(layer.index); |
| | | } |
| | | , btn2: function (index, layero) { |
| | | }, |
| | | end: function () { |
| | | } |
| | | }); |
| | | } |
| | | |
| | | obj.event = ""; |
| | | return false; |
| | | |
| | |
| | | } |
| | | }); |
| | | }); |
| | | //表头信æ¯å·¥ä½ä¸å¿å¼¹çª |
| | | form.on('submit(btnSearchWorkCenter)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'å·¥ä½ä¸å¿å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['90%', '90%'], |
| | | maxmin: true, |
| | | content: ['../../Baseset/åºç¡èµæ/Gy_WorkCenterList.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HWorkCenterID").val(checkStatus.data[0].HItemID); |
| | | $("#HWorkCenterName").val(checkStatus.data[0].å·¥ä½ä¸å¿); |
| | | $("#HWorkCenterNumber").val(checkStatus.data[0].å·¥ä½ä¸å¿ä»£ç ); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | rowdata = [{ |
| | | "HMaterIDCol": "", "HMaterNumberCol": "", "HMaterNameCol": "", "HMaterModelCol": "", "HProcIDCol": "", |
| | | "HProcNumberCol": "", "HProcNameCol": "", "HSourceIDCol": "", "HSourceNumberCol": "", "HSourceNameCol": "", "HPriceCol": "", |
| | | "HProcNumberCol": "", "HProcNameCol": "", "HSourceIDCol": "", "HSourceNumberCol": "", "HSourceNameCol": "", "HPriceCol": "0", |
| | | "HBeginDateCol": "", "HEndDateCol": "", "HCostFlagCol": "false", "HFlowFlagCol": "false", "HPayFlagCol": "false", |
| | | "HRemarkCol": "" |
| | | "HRemarkCol": "", |
| | | "HWorkCenterID": 0, "HWorkCenterNumber": "", "HWorkCenterName": "", "HWorkQty": 0, "HStdEmp": 0, "HChangeTimes": 0, |
| | | "HChangeMoney": 0, "HProcNo": 0, "HPieceTimes": 0, "HMouldQty": 0, "HChangeMouldMoney": 0, "HRushQty": 0 |
| | | }]; |
| | | option = { |
| | | elem: '#mainTable' |
| | |
| | | , limit: 50 |
| | | , height: 'full-250' |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |
| | | , cols: [[ |
| | | { type: 'checkbox' } |
| | | , { field: 'HMaterIDCol', title: 'ç©æID', edit: 'text', hide: true } |
| | | , { field: 'HMaterNumberCol', title: 'ç©æä»£ç ', edit: 'text', event: "HMaterCheck", width: 200 } |
| | | , { field: 'HMaterNameCol', title: 'ç©æåç§°', width:200 } |
| | | , { field: 'HMaterNameCol', title: 'ç©æåç§°', width: 200 } |
| | | , { field: 'HMaterModelCol', title: 'è§æ ¼åå·', width: 200 } |
| | | , { field: 'HProcIDCol', title: 'å·¥åºID', edit: 'text', hide: true } |
| | | , { field: 'HProcNumberCol', title: 'å·¥åºä»£ç ', edit: 'text', event: "HProcCheck" } |
| | |
| | | , { field: 'HSourceIDCol', title: 'èµæºID', edit: 'text', hide: true } |
| | | , { field: 'HSourceNumberCol', title: 'èµæºä»£ç ', edit: 'text', event: "HSourceCheck" } |
| | | , { field: 'HSourceNameCol', title: 'èµæºåç§°' } |
| | | , { field: 'HPriceCol', title: 'åä»·', edit: 'text' } |
| | | , { field: 'HPriceCol', title: 'åä»·', edit: 'text', event: "inputHPrice" } |
| | | , { field: 'HWorkCenterID', title: 'å·¥ä½ä¸å¿ID', edit: 'text', hide: true } |
| | | , { field: 'HWorkCenterNumber', title: 'å·¥ä½ä¸å¿ä»£ç ', edit: 'text', event: "HWorkCenterCheck", width: 120 } |
| | | , { field: 'HWorkCenterName', title: 'å·¥ä½ä¸å¿', edit: 'text', width: 120 } |
| | | , { field: 'HWorkQty', title: 'å°æ¶äº§è½', edit: 'text', event: "inputHWorkQty" } |
| | | , { field: 'HStdEmp', title: 'æ å人å', edit: 'text', event: "inputHStdEmp" } |
| | | , { field: 'HChangeTimes', title: 'æ¢çº¿æ¶é´', edit: 'text', event: "inputHChangeTimes" } |
| | | , { field: 'HChangeMoney', title: 'æ¢çº¿è¡¥è´´', edit: 'text', event: "inputHChangeMoney" } |
| | | , { field: 'HProcNo', title: 'å·¥èºè·¯çº¿æµæ°´å·', edit: 'text', width: 150, event: "inputHProcNo" } |
| | | , { field: 'HPieceTimes', title: 'åä»¶å å·¥æ¶é´', edit: 'text', width: 150, event: "inputHPieceTimes" } |
| | | , { field: 'HMouldQty', title: '模å
·æ°é', edit: 'text', event: "inputHMouldQty" } |
| | | , { field: 'HChangeMouldMoney', title: 'æ¢æ¨¡è¡¥è´´', edit: 'text', event: "inputHChangeMouldMoney" } |
| | | , { field: 'HRushQty', title: 'å件岿¬¡æ¬¡æ°', edit: 'text', width: 150, event: "inputHRushQty" } |
| | | , { field: 'HBeginDateCol', title: 'å¼å§æ¥æ', event: "HBeginDateCol" } |
| | | , { field: 'HEndDateCol', title: 'ç»ææ¥æ', event: "HEndDateCol" } |
| | | , { field: 'HCostFlagCol', title: 'ææ¬å¿
é', templet: '#HCostFlagCol' } |
| | |
| | | if (HItemID == '' || HItemID == null) { |
| | | HItemID = 0; |
| | | } |
| | | var ajaxLoad = layer.load(); |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Gy_ProcPrice/GetProcPriceValue", |
| | | type: "GET", |
| | |
| | | , "HDeptID": d.data[0].Hdeptid |
| | | , "HMakeDate": Format(new Date(d.data[0].å¶åæ¥æ), 'yyyy-MM-dd') |
| | | , "HMaker": d.data[0].å¶å人 |
| | | , "HWorkCenterID": d.data[0].HWorkCenterID |
| | | , "HWorkCenterNumber": d.data[0].å·¥ä½ä¸å¿ä»£ç |
| | | , "HWorkCenterName": d.data[0].å·¥ä½ä¸å¿ |
| | | }); |
| | | |
| | | var rowdata = []; |
| | | for (var i = 0; i < d.data.length; i++) { |
| | | //å表 èµå¼ |
| | | rowdata.push({ |
| | | "HMaterIDCol": d.data[i].HMaterID, "HMaterNumberCol": d.data[i].ç©æä»£ç , "HMaterNameCol": d.data[i].ç©æåç§°, "HMaterModelCol": d.data[i].è§æ ¼åå·, "HProcIDCol": d.data[i].HProcID, |
| | | "HProcNumberCol": d.data[i].å·¥åºä»£ç , "HProcNameCol": d.data[i].å·¥åºåç§°, "HSourceIDCol": d.data[i].HSourceID, "HSourceNumberCol": d.data[i].èµæºä»£ç , "HSourceNameCol": d.data[i].èµæºåç§°, "HPriceCol": d.data[i].åä»·, |
| | | "HBeginDateCol": Format(new Date(d.data[i].å¼å§æ¥æ), 'yyyy-MM-dd'), "HEndDateCol": Format(new Date(d.data[i].ç»ææ¥æ), 'yyyy-MM-dd'), "HCostFlagCol": (d.data[i].HCostFlag == 0 ? false : true), "HFlowFlagCol": (d.data[i].HFlowFlag == 0 ? false : true), "HPayFlagCol": (d.data[i].HPayFlag == 0 ? false : true), |
| | | "HRemarkCol": d.data[i].夿³¨ |
| | | "HMaterIDCol": d.data[i].HMaterID, "HMaterNumberCol": d.data[i].ç©æä»£ç , "HMaterNameCol": d.data[i].ç©æåç§°, |
| | | "HMaterModelCol": d.data[i].è§æ ¼åå·, "HProcIDCol": d.data[i].HProcID, "HProcNumberCol": d.data[i].å·¥åºä»£ç , |
| | | "HProcNameCol": d.data[i].å·¥åºåç§°, "HSourceIDCol": d.data[i].HSourceID, "HSourceNumberCol": d.data[i].èµæºä»£ç , |
| | | "HSourceNameCol": d.data[i].èµæºåç§°, "HPriceCol": d.data[i].åä»·, "HBeginDateCol": Format(new Date(d.data[i].å¼å§æ¥æ), 'yyyy-MM-dd'), |
| | | "HEndDateCol": Format(new Date(d.data[i].ç»ææ¥æ), 'yyyy-MM-dd'), "HCostFlagCol": (d.data[i].HCostFlag == 0 ? false : true), |
| | | "HFlowFlagCol": (d.data[i].HFlowFlag == 0 ? false : true), "HPayFlagCol": (d.data[i].HPayFlag == 0 ? false : true), |
| | | "HRemarkCol": d.data[i].夿³¨, |
| | | "HWorkCenterID": d.data[i].HWorkCenterID, "HWorkCenterNumber": d.data[i].å·¥ä½ä¸å¿ä»£ç , "HWorkCenterName": d.data[i].å·¥ä½ä¸å¿, |
| | | "HWorkQty": d.data[i].å°æ¶äº§è½, "HStdEmp": d.data[i].æ å人å, "HChangeTimes": d.data[i].æ¢çº¿æ¶é´, "HChangeMoney": d.data[i].æ¢çº¿è¡¥è´´, |
| | | "HProcNo": d.data[i].å·¥èºè·¯çº¿æµæ°´å·, "HPieceTimes": d.data[i].åä»¶å å·¥æ¶é´, "HMouldQty": d.data[i].模å
·æ°é, |
| | | "HChangeMouldMoney": d.data[i].æ¢æ¨¡è¡¥è´´, "HRushQty": d.data[i].å件岿¬¡æ¬¡æ° |
| | | }); |
| | | } |
| | | option.data = rowdata; |
| | |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region åå»è¿å
¥ç¼è¾ |
| | | table.on('rowDouble(mainTable)', function (obj) { |
| | | //éä¸é«äº® åå»è¡ |
| | | obj.tr.find(':checkbox').prop('checked', true); |
| | | obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //设置å¤éæ¡é䏿 ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//æ¹åå½åtrèæ¯é¢è²ååä½é¢è² |
| | | //mainTable ä¸ºè¡¨æ ¼ID æ³¨ææ¤å¤å¦æID䏿£ç¡®å°å¯¼è´ä½ å¨çå¬å¤éæ¡æ¶è·åä¸å°ä½ éæ©çæ°æ®ï¼åé¢çåªæ¯æ·»å æå é¤é䏿ªé䏿 ·å¼ä»¥åè®¾ç½®èæ¯è²ï¼åä½é¢è² |
| | | layui.each(table.cache.mainTable, function (i, l) { |
| | | if (obj.tr.index() == l.LAY_TABLE_INDEX) { |
| | | l.LAY_CHECKED = true; |
| | | } |
| | | }); |
| | | var HBillNo = obj.data["åæ®å·"]; |
| | | var sWhere = ""; |
| | | |
| | | if (obj.data.åæ®ç±»å == "éå®åºåºå") { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Kf_SellOutBill/GetSellOutBillList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var linterid = data1.data[0].hmainid |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾éå®è®¢å' |
| | | , closeBtn: 1 |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../../颿åè´§/éå®åºåº/Kf_SellOutBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=10' |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | $("#btnSearch").trigger('click'); |
| | | } |
| | | , cancel: function () { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | } else if (obj.data.åæ®ç±»å == "æ¶æ¬¾å") { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/YS_ReceiveBill/list', |
| | | async: false, |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var linterid = data1.data[0].hmainid |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾éå®è®¢å' |
| | | , closeBtn: 1 |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../../éå®ç®¡ç/æ¶æ¬¾å/YS_ReceiveBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=10' |
| | | , resize: false, |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | $("#btnSearch").trigger('click'); |
| | | } |
| | | , cancel: function () { |
| | | |
| | | } |
| | | }) |
| | | }else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region 导åºExecel |
| | | function get_Export() { |
| | | table.exportFile(ins.config.id, option.data, "xls"); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldinventoryBill/CheckGy_MaterialMouldBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldinventoryBill/CheckGy_MaterialMouldBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $('#set_CheckBill').removeClass("layui-btn-disabled").attr("disabled", false); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldinventoryBill/CheckGy_MaterialMouldBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_MouldinventoryBill/CheckGy_MaterialMouldBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | <input type="text" class="layui-input" name="HNextMainDate" id="HNextMainDate" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="margin-left:10px;"> |
| | | <label class="layui-form-label">å¨å
·åç±»</label> |
| | | <div class="layui-input-block"> |
| | | <select name="HMouldClass" lay-filter="HMouldClass" id="HMouldClass"> |
| | | <option value="模å
·" selected="selected">模å
·</option> |
| | | <option value="å·¥è£
">å·¥è£
</option> |
| | | <option value="夹å
·">夹å
·</option> |
| | | <option value="åå
·">åå
·</option> |
| | | <option value="æ£å
·">æ£å
·</option> |
| | | <option value="å¨è½¬å¨å
·">å¨è½¬å¨å
·</option> |
| | | <option value="å
¶ä»">å
¶ä»</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | $("#HBarCode").val(d.data[0].æ¡ç ç¼å·); |
| | | $("#HMadeSupID").val(d.data[0].HMadeSupID); |
| | | $("#HMadeSupName").val(d.data[0].å¶é åå); |
| | | $("#HMouldClass").val(d.data[0].å¨å
·åç±»); |
| | | //$("#HNowSupID").val(d.data[0].HNowSupID); |
| | | //$("#HNowSupName").val(d.data[0].èæä»); |
| | | var HCycleUnit = d.data[0].卿åä½; |
| | |
| | | if ( !(HCycleUnit == null || HCheckCycle == null ) ) { |
| | | calculateHNextMainDate(d.data[0].hmainid, HCycleUnit, HCheckCycle); |
| | | } |
| | | |
| | | form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <style type="text/css"> |
| | | </style> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/soulTable.slim.js"></script> |
| | | |
| | | <script src="../../../layuiadmin/layui/layui1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/layui/lay/modules/table.js"></script> |
| | | <style> |
| | | /*æ ç¶å¾ç¹å»é«äº®åè²*/ |
| | | .layui-tree-set-active > .layui-tree-entry .layui-tree-main { |
| | | background: #aef0f7; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <div class="layui-row" style="padding:10px 0"> |
| | | <div class="layui-col-xs3 layui-inline" style="border: solid 1.5px #e0d6d64d;"> |
| | | <div id="TreeTable" class="demo-tree demo-tree-box"></div> |
| | | </div> |
| | | <div class="layui-col-xs8 layui-inline" style="padding-left: 10px; width: 73%"> |
| | | <div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btnAdd"><i class="layui-icon layui-icon-add-1"></i>æ°å¢</button> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () { |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate', 'soulTable', 'tree'], function () { |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | , soulTable = layui.soulTable |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | , soulTable = layui.soulTable |
| | | , tree = layui.tree |
| | | var sWhere = ""; |
| | | var option = []; |
| | | //#endregion |
| | |
| | | |
| | | //æ¥è¯¢ |
| | | get_Display(sWhere); |
| | | //æ¥è¯¢å¨å
·åç±» |
| | | get_Display_Tree(); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | |
| | | } |
| | | } |
| | | |
| | | // æ ç¶å¾æ¥è¯¢ |
| | | function get_Display_Tree() { |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_Mould/TreeList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.close(ajaxLoad); |
| | | var data = JSON.parse(data1.data); |
| | | MenuMain(data); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //éåçæä¸»èå |
| | | function MenuMain(data) { |
| | | var liStr = '['; |
| | | //éåçæä¸»èå |
| | | for (var i = 0; i < data.length; i++) { |
| | | // 夿æ¯å¦åå¨åèå |
| | | if (data[i].children != null && data[i].children.length > 0) { |
| | | liStr += '{"title": "' + data[i].id + "-" + data[i].title + '", "id": "' + data[i].id + '","spread":true, "children":[ '; |
| | | // éåè·ååèå |
| | | for (var k = 0; k < data[i].children.length; k++) { |
| | | liStr += getChildMenu(data[i].children[k], 0); |
| | | } |
| | | liStr = liStr.substring(0, liStr.length - 1); |
| | | liStr += ']},'; |
| | | } else { |
| | | liStr += '{"title": "' + data[i].id + "-" + data[i].title + '", "id": "' + data[i].id + '"},'; |
| | | } |
| | | }; |
| | | liStr = liStr.substring(0, liStr.length - 1); |
| | | liStr += "]"; |
| | | var treeTable = JSON.parse(liStr); |
| | | tree.render({ |
| | | elem: '#TreeTable' //é»è®¤æ¯ç¹å»èç¹å¯è¿è¡æ¶ç¼© |
| | | , data: treeTable |
| | | , click: function (obj) { |
| | | //é«äº®åè² |
| | | $(".layui-tree-set").removeClass('layui-tree-set-active'); |
| | | obj.elem.addClass('layui-tree-set-active'); |
| | | |
| | | var data = obj.data; //è·åå½åç¹å»çèç¹æ°æ® |
| | | var sql = ""; |
| | | if (data.id == "0") { |
| | | sql = ""; |
| | | } else { |
| | | sql = " and HMouldTypeID='" + data.id + "' "; |
| | | } |
| | | get_Display(sql); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // éå½çæåèå |
| | | function getChildMenu(subMenu, num) { |
| | | num++; |
| | | var subStr = ''; |
| | | if (subMenu.children != null && subMenu.children.length > 0) { |
| | | subStr += '{"title": "' + subMenu.id + "-" + subMenu.title + '", "id": "' + subMenu.id + '", "children":['; |
| | | for (var j = 0; j < subMenu.children.length; j++) { |
| | | subStr += getChildMenu(subMenu.children[j], num); |
| | | if (j + 1 == subMenu.children.length) { |
| | | subStr = subStr.substring(0, subStr.length - 1); |
| | | } |
| | | } |
| | | subStr += ']},'; |
| | | } else { |
| | | subStr += '{"title": "' + subMenu.id + "-" + subMenu.title + '", "id": "' + subMenu.id + '"},'; |
| | | } |
| | | return subStr; |
| | | } |
| | | |
| | | //å·æ° |
| | | function get_Refresh() { |
| | | $("#HNumber").val(""); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_MaterialTechParamBill/CheckGy_MaterialTechParamBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_MaterialTechParamBill/CheckGy_MaterialTechParamBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $('#set_CheckBill').removeClass("layui-btn-disabled").attr("disabled", false); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_MaterialTechParamBill/CheckGy_MaterialTechParamBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_MaterialTechParamBill/CheckGy_MaterialTechParamBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "Sb_EqpMaintenanceBillList_PDA"; |
| | | |
| | | //ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | var titleData = ["hmainid", "HEquipID", "HEmpID", "HDeptID", "HManagerID", "hsubid", "HRepairCheckID1", "HManagerID1", "HBillType", "æºå主å
ç ", "æºååå
ç "]; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | |
| | | url: GetWEBURL() + "/Web/GetEquipmentBillsList", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "Type": "WX" }, |
| | | data: { "sWhere": sWhere, "Type": "WX", "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | |
| | | if (data1.count == 1) { |
| | |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, "") > -1) { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else { |
| | |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "Sb_EquipConkBookBillList_PDA"; |
| | | |
| | | //ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | var titleData = ["hmainid", "HEquipID", "HEmpID", "HDeptID", "HManagerID", "hsubid", "HConkTypeID", "HManagerID", "HBillType", "æºå主å
ç ", "æºååå
ç ", "HConkReasonID","HManagerID1"]; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | |
| | | url: GetWEBURL() + "/Web/GetEquipmentBillsList", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "Type": "GZ" }, |
| | | data: { "sWhere": sWhere, "Type": "GZ", "user": sessionStorage["HUserName"]}, |
| | | success: function (data1) { |
| | | |
| | | if (data1.count == 1) { |
| | |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, "") > -1) { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else { |
| | |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "Sb_EquipDotCheckBillList_PDA"; |
| | | //ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | var titleData = ["hmainid", "设å¤ID", "ç¹æ£é¡¹ç®ID","è´è´£äººID","hsubid","HBillType"]; |
| | | |
| | | //#endregion |
| | | |
| | |
| | | //åå§åæ¶é´ |
| | | $("#HBeginDate").val(Format(new Date() - 1000 * 60 * 60 * 24 * 30, "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_FastQuery(); |
| | | //åå§åè¡¨æ ¼ |
| | | DisPlay_HideColumn(); |
| | | } |
| | | |
| | |
| | | url: GetWEBURL() + "/Web/GetEquipmentBillsList", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "Type": "DJ" }, |
| | | data: { "sWhere": sWhere, "Type": "DJ", "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | |
| | | if (data1.count == 1) { |
| | |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, "") > -1) { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else { |
| | |
| | | if (data1.data.length != 0) { |
| | | |
| | | var dataCol = [];//æ°æ®åºæ¥è¯¢åºçåæ°æ® |
| | | var titleData = ["hmainid","HMaterID"];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | var titleData = ["hmainid","设å¤ID"];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | |
| | |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "Sb_EquipMaintainBillList_PDA"; |
| | | |
| | | //ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | var titleData = ["hmainid", "设å¤ID", "ç¹æ£é¡¹ç®ID", "è´è´£äººID", "hsubid","é
ä»¶ID","åä½ID","hmaterid","HBillType","HEquipMaintainRuleInterID","æºå主å
ç ","æºååå
ç "]; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | |
| | | url: GetWEBURL() + "/Web/GetEquipmentBillsList", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "Type": "BY" }, |
| | | data: { "sWhere": sWhere, "Type": "BY", "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | |
| | | if (data1.count == 1) { |
| | |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, "") > -1) { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else { |
| | |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var HModName = "Sb_EquipRepairCheckBillList_PDA"; |
| | | |
| | | //ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | var titleData = ["hmainid", "HEquipID", "HEmpID", "HDeptID", "HManagerID", "hsubid", "HConkTypeID", "HManagerID", "HBillType", "æºå主å
ç ", "æºååå
ç ", "HConkReasonID", "HManagerID1","HRepairCheckID1"]; |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | |
| | | url: GetWEBURL() + "/Web/GetEquipmentBillsList", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "Type": "YS" }, |
| | | data: { "sWhere": sWhere, "Type": "YS", "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | |
| | | if (data1.count == 1) { |
| | |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, "") > -1) { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else { |
| | |
| | | </div> |
| | | |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | |
| | | |
| | | <div class="layui-tab layui-tab-card"> |
| | | <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"> |
| | |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <table class="layui-hide" id="mainTable3" lay-filter="mainTable3"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | {{d.LAY_TABLE_INDEX+1}} |
| | | </script> |
| | | <script type="text/html" id="xuhao1"> |
| | | {{d.LAY_TABLE_INDEX+1}} |
| | | </script> |
| | | <script type="text/html" id="xuhao2"> |
| | | {{d.LAY_TABLE_INDEX+1}} |
| | | </script> |
| | | |
| | |
| | | , table = layui.table |
| | | , table1 = layui.table |
| | | , table2 = layui.table |
| | | , table3 = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | |
| | | var option = []; |
| | | var option1 = []; |
| | | var option2 = []; |
| | | var option3 = []; |
| | | //#endregion |
| | | |
| | | |
| | |
| | | table1.render(option1); |
| | | option2.data = data1.list[1]; |
| | | table2.render(option2); |
| | | option3.data = data1.list[2]; |
| | | table3.render(option3); |
| | | } else { |
| | | layer.alert("è·å失败", { icon: 5 }); |
| | | } |
| | |
| | | set_InitGrid1(); |
| | | //åå§åè¡¨æ ¼(å表2) |
| | | set_InitGrid2(); |
| | | //åå§åè¡¨æ ¼(å表3) |
| | | set_InitGrid3(); |
| | | //æ¥è¯¢ |
| | | get_Display(sWhere); |
| | | } |
| | |
| | | table2.render(option2); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | //åå§åè¡¨æ ¼(å表3) |
| | | function set_InitGrid3() { |
| | | var ajaxLoad = layer.load(); |
| | | option3 = { |
| | | elem: '#mainTable3' |
| | | //, toolbar: '#toolbarDemo' |
| | | , height: '350' |
| | | , page: true |
| | | , totalRow: true |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | , cols: [[ |
| | | //{ type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao2', title: 'åºå·', sort: true, fixed: 'left', event: "qwe" } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 200 } |
| | | , { field: 'åæ®ç±»å', title: 'åæ®ç±»å', width: 200 } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 200 } |
| | | , { field: '设å¤åç±»', title: '设å¤åç±»', width: 200 } |
| | | , { field: 'è®¾å¤æ¡ç ', title: 'è®¾å¤æ¡ç ', width: 200 } |
| | | , { field: '设å¤ç¼ç ', title: '设å¤ç¼ç ', width: 200, hide: true } |
| | | , { field: '设å¤åç§°', title: '设å¤åç§°', width: 200 } |
| | | , { field: '设å¤è§æ ¼', title: '设å¤è§æ ¼', width: 200 } |
| | | , { field: '设å¤åå·', title: '设å¤åå·', width: 200 } |
| | | , { field: 'é
件代ç ', title: 'é
件代ç ', width: 200 } |
| | | , { field: 'é
ä»¶åç§°', title: 'é
ä»¶åç§°', width: 200 } |
| | | , { field: 'å¶å人', title: 'å¶å人' } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', templet: "<div>{{d.å¶åæ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº' } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', templet: "<div>{{d.å®¡æ ¸æ¥æ ==null ?'':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | |
| | | ]] |
| | | }; |
| | | option3.data = []; |
| | | table3.render(option3); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <style type="text/css"></style> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/soulTable.slim.js"></script> |
| | | <script src="../../../layuiadmin/layui/layui1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/layui/lay/modules/table.js"></script> |
| | | <style> |
| | | /*æ ç¶å¾ç¹å»é«äº®åè²*/ |
| | | .layui-tree-set-active > .layui-tree-entry .layui-tree-main { |
| | | background: #aef0f7; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <div class="layui-row" style="padding:10px 0"> |
| | | <div class="layui-col-xs3 layui-inline" style="border: solid 1.5px #e0d6d64d;"> |
| | | <div id="TreeTable" class="demo-tree demo-tree-box"></div> |
| | | </div> |
| | | <div class="layui-col-xs8 layui-inline" style="padding-left: 10px; width: 73%"> |
| | | <div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btnAdd"><i class="layui-icon layui-icon-add-1"></i>æ°å¢</button> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () { |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate', 'soulTable', 'tree'], function () { |
| | | //#region å
Œ
±åé |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | , soulTable = layui.soulTable |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | , soulTable = layui.soulTable |
| | | , tree = layui.tree |
| | | var sWhere = ""; |
| | | var option = []; |
| | | //#endregion |
| | |
| | | |
| | | //æ¥è¯¢ |
| | | get_Display(sWhere); |
| | | //æ¥è¯¢è®¾å¤åç±» |
| | | get_Display_Tree(); |
| | | } |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | |
| | | } |
| | | } |
| | | |
| | | // æ ç¶å¾æ¥è¯¢ |
| | | function get_Display_Tree() { |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_EquipFileMain/TreeGetList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.close(ajaxLoad); |
| | | var data = JSON.parse(data1.data); |
| | | MenuMain(data); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //éåçæä¸»èå |
| | | function MenuMain(data) { |
| | | var liStr = '['; |
| | | //éåçæä¸»èå |
| | | for (var i = 0; i < data.length; i++) { |
| | | // 夿æ¯å¦åå¨åèå |
| | | if (data[i].children != null && data[i].children.length > 0) { |
| | | liStr += '{"title": "' + data[i].id + "-" + data[i].title + '", "id": "' + data[i].id + '","spread":true, "children":[ '; |
| | | // éåè·ååèå |
| | | for (var k = 0; k < data[i].children.length; k++) { |
| | | liStr += getChildMenu(data[i].children[k], 0); |
| | | } |
| | | liStr = liStr.substring(0, liStr.length - 1); |
| | | liStr += ']},'; |
| | | } else { |
| | | liStr += '{"title": "' + data[i].id + "-" + data[i].title + '", "id": "' + data[i].id + '"},'; |
| | | } |
| | | }; |
| | | liStr = liStr.substring(0, liStr.length - 1); |
| | | liStr += "]"; |
| | | var treeTable = JSON.parse(liStr); |
| | | tree.render({ |
| | | elem: '#TreeTable' //é»è®¤æ¯ç¹å»èç¹å¯è¿è¡æ¶ç¼© |
| | | , data: treeTable |
| | | , click: function (obj) { |
| | | //é«äº®åè² |
| | | $(".layui-tree-set").removeClass('layui-tree-set-active'); |
| | | obj.elem.addClass('layui-tree-set-active'); |
| | | |
| | | var data = obj.data; //è·åå½åç¹å»çèç¹æ°æ® |
| | | var sql = ""; |
| | | if (data.id == "0") { |
| | | sql = ""; |
| | | } else { |
| | | sql = " and HEquipFileTypeID='" + data.id + "' "; |
| | | } |
| | | get_Display(sql); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // éå½çæåèå |
| | | function getChildMenu(subMenu, num) { |
| | | num++; |
| | | var subStr = ''; |
| | | if (subMenu.children != null && subMenu.children.length > 0) { |
| | | subStr += '{"title": "' + subMenu.id + "-" + subMenu.title + '", "id": "' + subMenu.id + '", "children":['; |
| | | for (var j = 0; j < subMenu.children.length; j++) { |
| | | subStr += getChildMenu(subMenu.children[j], num); |
| | | if (j + 1 == subMenu.children.length) { |
| | | subStr = subStr.substring(0, subStr.length - 1); |
| | | } |
| | | } |
| | | subStr += ']},'; |
| | | } else { |
| | | subStr += '{"title": "' + subMenu.id + "-" + subMenu.title + '", "id": "' + subMenu.id + '"},'; |
| | | } |
| | | return subStr; |
| | | } |
| | | |
| | | //å·æ° |
| | | function get_Refresh() { |
| | | $("#HNumber").val(""); |
| | |
| | | <input type="hidden" name="lngBillSubKey" id="lngBillSubKey" value="0"> |
| | | <input type="hidden" name="eventType" id="eventType" value="Add"> |
| | | <input type="hidden" name="HMainInterID" id="HMainInterID" value="0"> |
| | | <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" value="0"> |
| | | <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" value="0"> |
| | | <input type="hidden" name="HMainSourceBillNo" id="HMainSourceBillNo" value="0"> |
| | | <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" value="0"> |
| | | </form> |
| | | </div> |
| | | </div> |
| | |
| | | "HMaterName": data.产å, |
| | | "HMaterNumber": data.产å代ç , |
| | | "HMaterModel": data.è§æ ¼åå·, |
| | | "HPRDORGID": data.ç»ç», |
| | | "HPRDORGName": data.ç»ç»åç§°, |
| | | "HPRDORGID": 0,//data.ç»ç», |
| | | "HPRDORGName": '',//data.ç»ç»åç§°, |
| | | "HUnitID": data.HUnitID, |
| | | "HUnitName": data.åä½, |
| | | "HProcName": data.å·¥åº, |
| | | "HProcID": data.HProcID, |
| | | "HQCSchemeID": data.æ£éªæ¹æ¡ID, |
| | | "HQCSchemeName": data.æ£éªæ¹æ¡åç§° |
| | | "HQCSchemeName": data.æ£éªæ¹æ¡åç§°, |
| | | "HMainSourceInterID": data.hmainid, |
| | | "HMainSourceEntryID": data.hsubid, |
| | | "HMainSourceBillNo": data.åæ®å·, |
| | | "HMainSourceBillType": data.HBillType, |
| | | }); |
| | | //è·åæ£éªæ¹æ¡/æ£éªé¡¹ç®ä¿¡æ¯ |
| | | get_CheckItem(); |
| | |
| | | "HProcName": data.å½åå·¥åº, |
| | | "HProcID": data.HProcID, |
| | | "HQCSchemeID": data.æ£éªæ¹æ¡ID, |
| | | "HQCSchemeName": data.æ£éªæ¹æ¡åç§° |
| | | "HQCSchemeName": data.æ£éªæ¹æ¡åç§°, |
| | | "HMainSourceInterID": data.hmainid, |
| | | "HMainSourceEntryID": 0, |
| | | "HMainSourceBillNo": data.åæ®å·, |
| | | "HMainSourceBillType": data.åæ®ç±»å, |
| | | }); |
| | | //è·åæ£éªæ¹æ¡/æ£éªé¡¹ç®ä¿¡æ¯ |
| | | get_CheckItem(); |
| | | |
| | | HProcExchBillNoFlag = true; |
| | | break; |
| | | case "MO00": |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | |
| | | "HProcName": data.å½åå·¥åº, |
| | | "HProcID": data.HProcID, |
| | | "HQCSchemeID": data.æ£éªæ¹æ¡ID, |
| | | "HQCSchemeName": data.æ£éªæ¹æ¡åç§° |
| | | "HQCSchemeName": data.æ£éªæ¹æ¡åç§°, |
| | | "HMainSourceInterID": data.hmainid, |
| | | "HMainSourceEntryID": data.hsubid, |
| | | "HMainSourceBillNo": data.åæ®å·, |
| | | "HMainSourceBillType": data.HBillType, |
| | | }); |
| | | //è·åæ£éªæ¹æ¡/æ£éªé¡¹ç®ä¿¡æ¯ |
| | | get_CheckItem(); |
| | | |
| | | HProcExchBillNoFlag = true; |
| | | break; |
| | | } |
| | | layer.close(index); |
| | |
| | | <input type="hidden" name="HMainSourceInterID" id="HMainSourceInterID" value="0"> |
| | | <input type="hidden" name="HMainSourceEntryID" id="HMainSourceEntryID" value="0"> |
| | | <input type="hidden" name="HMainSourceBillNo" id="HMainSourceBillNo" value="0"> |
| | | <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" value="0"> |
| | | </form> |
| | | </div> |
| | | </div> |
| | |
| | | "HMainSourceInterID": data.hmainid, |
| | | "HMainSourceEntryID": data.hsubid, |
| | | "HMainSourceBillNo": data.åæ®å·, |
| | | "HMainSourceBillType": data.HBillType, |
| | | }); |
| | | //è·åæ£éªæ¹æ¡/æ£éªé¡¹ç®ä¿¡æ¯ |
| | | get_CheckItem(); |
| | |
| | | "HMainSourceInterID": data.hmainid, |
| | | "HMainSourceEntryID": 0, |
| | | "HMainSourceBillNo": data.åæ®å·, |
| | | "HMainSourceBillType": data.HBillType, |
| | | }); |
| | | //è·åæ£éªæ¹æ¡/æ£éªé¡¹ç®ä¿¡æ¯ |
| | | get_CheckItem(); |
| | |
| | | "HMainSourceInterID": data.hmainid, |
| | | "HMainSourceEntryID": data.hsubid, |
| | | "HMainSourceBillNo": data.åæ®å·, |
| | | "HMainSourceBillType": data.åæ®ç±»å, |
| | | }); |
| | | //è·åæ£éªæ¹æ¡/æ£éªé¡¹ç®ä¿¡æ¯ |
| | | get_CheckItem(); |
| | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <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="HProjectMoneyName" id="HProjectMoneyName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HProjectMoneyID" id="HProjectMoneyID" class="layui-input" value="0" 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-block" style="margin-left: 120px;"> |
| | | <select name="HType" id="HType" lay-filter="HType" style="width:190px;"> |
| | | </select> |
| | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <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" class="layui-input" name="HMoney" id="HMoney" value="0" autocomplete="off" > |
| | | </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" class="layui-input" name="HTaxRate" id="HTaxRate" value="0" autocomplete="off" > |
| | | </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" class="layui-input" name="HSumMoney" id="HSumMoney" value="0" autocomplete="off"> |
| | | </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="HEmpName" id="HEmpName" class="layui-input" value="" style="float: left; width: 150px; " readonly> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | |
| | | //#region å¤æå¹¶è®¾ç½®æä½ç±»åã页é¢åå§å |
| | | if (OperationType == null || OperationType == 1) { //æ°å¢ |
| | | OperationType = 1; |
| | | |
| | | |
| | | //æ ¹æ®ç»å½ç¨æ· è·å é¨é¨ ç»æäºº |
| | | getCzyglByUser(); |
| | | |
| | | //çæå¹¶è®¾ç½®ä¸»è¡¨çå
ç ååæ®å· |
| | | createBillNo(); |
| | | |
| | |
| | | //#region æä½æé®è§¦åäºä»¶ |
| | | //#region ä¿åæäº¤ |
| | | form.on('submit(btnSave)', function (data) {//æäº¤ |
| | | set_AddNew(data); |
| | | if (AllowLoadData(data)) { |
| | | set_AddNew(data); |
| | | } |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | |
| | | $("#HCusID").val(checkStatus.data[0].客æ·ID); |
| | | $("#HCusName").val(checkStatus.data[0].客æ·åç§° ); |
| | | |
| | | $("#HCusName").val(checkStatus.data[0].HName); |
| | | $("#HCusID").val(checkStatus.data[0].HItemID); |
| | | var HCusID=$("#HCusID").val(); |
| | | getHTaxRateByCusID(HCusID);//æ ¹æ®å®¢æ·è·å客æ·å¯¹åºç¨ç |
| | | getCustomerByCusID(HCusID);//æ ¹æ®å®¢æ·è·åå¸å«ãæ±ç,ç¨ç |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: '项ç®è´¹ç¨å表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ["../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_ProjectMoney.html", "yes"] |
| | | , content: ["../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_ProjectMoney.html?OperationType=2", "yes"] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region é空éªè¯ |
| | | function AllowLoadData(data) { |
| | | //#region è¡¨å¤´æ°æ®æ£éª |
| | | if ($("#HBillNo").val() == "") { |
| | | layer.msg("åæ®å·ä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | if ($("#HDate").val() == "") { |
| | | layer.msg("æ¥æä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | if ($("#HAccDate").val() == "") { |
| | | layer.msg("æ¶æ¬¾æ¥æä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | if ($("#HCusID").val() == "") { |
| | | layer.msg("客æ·ä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | if ($("#HProjectMoneyID").val() == "0") { |
| | | layer.msg("è´¹ç¨é¡¹ç®æªéæ©!"); |
| | | return false; |
| | | } |
| | | if ($("#HType").val() == "") { |
| | | layer.msg("åç¥¨ç±»åæªéæ©!"); |
| | | return false; |
| | | } |
| | | if ($("#HEmpID").val() == "0") { |
| | | layer.msg("ç»æäººæªéæ©!"); |
| | | return false; |
| | | } |
| | | if ($("#HMoney").val() == "0") { |
| | | layer.msg("ä¸å«ç¨éé¢ä¸è½ä¸ºé¶"); |
| | | return false; |
| | | } |
| | | if ($("#HTaxRate").val() == "0") { |
| | | layer.msg("ç¨çä¸è½ä¸ºé¶"); |
| | | return false; |
| | | } |
| | | if ($("#HSumMoney").val() == "0") { |
| | | layer.msg("æ»éé¢ä¸è½ä¸ºé¶"); |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | //#endregion |
| | | //#endregion |
| | | |
| | | //#region ä¿åHMaker |
| | |
| | | //#endregion |
| | | |
| | | |
| | | |
| | | |
| | | //#region æ ¹æ®å®¢æ·è·å客æ·å¯¹åºç¨ç |
| | | function getHTaxRateByCusID(HCusID) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Xs_SeOrderBill/getCustomerByCusID", |
| | | async: false, |
| | | type: "GET", |
| | | data: { |
| | | "HCusID": HCusID |
| | | }, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data[0]; |
| | | $("#HTaxRate").val(data.HTaxRate); |
| | | |
| | | } else { |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ ¹æ®ç»å½ç¨æ· è·åé¨é¨ ç»æäºº |
| | | function getCzyglByUser() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Xs_SeOrderBill/getCzyglByUser", |
| | | async: false, |
| | | type: "GET", |
| | | data: { |
| | | "CurUserName": sessionStorage["HUserName"] |
| | | }, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data[0]; |
| | | |
| | | $("#HEmpID").val(data.HEmpID); //ç»æäººid |
| | | $("#HEmpName").val(data.HEmpName); //ç»æäºº |
| | | $("#HDeptID").val(data.HDeptID); //é¨é¨id |
| | | $("#HDeptName").val(data.HDeptName); //é¨é¨ |
| | | |
| | | |
| | | } else { |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ ¹æ®å®¢æ·è·åå¸å«ãæ±ç ç¨ç |
| | | function getCustomerByCusID(HCusID) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Xs_SeOrderBill/getCustomerByCusID", |
| | | async: false, |
| | | type: "GET", |
| | | data: { |
| | | "HCusID": HCusID |
| | | }, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data[0]; |
| | | |
| | | $("#HCusID").val(data.HCusID); |
| | | $("#HCusName").val(data.HCusName); |
| | | $("#HCurID").val(data.HCurID); |
| | | $("#HCurName").val(data.HCurName); |
| | | $("#HExRate").val(data.HExRate); |
| | | $("#HTaxRate").val(data.HTaxRate); |
| | | } else { |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | |
| | | $("#HEmpID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | function GetHSupValue(obj) //è¿åå®¢æ· |
| | | { |
| | | $("#HCusName").val(obj[0].HName); |
| | | $("#HCusID").val(obj[0].HItemID); |
| | | } |
| | | //function GetHSupValue(obj) //è¿åå®¢æ· |
| | | //{ |
| | | // $("#HCusName").val(obj[0].HName); |
| | | // $("#HCusID").val(obj[0].HItemID); |
| | | //} |
| | | |
| | | </script> |
| | | </body> |
| | |
| | | }); |
| | | |
| | | var linterid = obj.data["hmainid"]; |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'æ¶æ¬¾å-ç¼è¾' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../../éå®ç®¡ç/å
¶ä»åºæ¶å/YS_ReceiveOtherBillMain.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=' |
| | | , btn: ['ç¡®å®'], |
| | | end: function (index, layero, that) { |
| | | //å·æ°é¡µé¢ |
| | | $("#btnSearch").trigger('click'); |
| | | } |
| | | }) |
| | | if (obj.data.åæ®ç¶æ == "å建") { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'æ¶æ¬¾å-ç¼è¾' |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../../éå®ç®¡ç/å
¶ä»åºæ¶å/YS_ReceiveOtherBillMain.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=' |
| | | , btn: ['ç¡®å®'], |
| | | end: function (index, layero, that) { |
| | | //å·æ°é¡µé¢ |
| | | $("#btnSearch").trigger('click'); |
| | | } |
| | | }) |
| | | } |
| | | else { |
| | | layer.alert('忮䏿¯åå»ºç¶æ,ä¸è½è¿è¡ç¼è¾'); |
| | | } |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var linterid = data[0].hmainid.toString(); |
| | | //if (AllowLoadData(sSubStr) != false) {//é空éªè¯ |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾' + HPageTitle |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../../éå®ç®¡ç/å
¶ä»åºæ¶å/YS_ReceiveOtherBillMain.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=' |
| | | , btn: [], |
| | | end: function (index, layero, that) { |
| | | //å·æ°é¡µé¢ |
| | | $("#btnSearch").trigger('click'); |
| | | } |
| | | }) |
| | | if (data[0].åæ®ç¶æ =="å建") { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'ç¼è¾' + HPageTitle |
| | | , shift: 0//å¼¹åºå¨ç» |
| | | , content: '../../éå®ç®¡ç/å
¶ä»åºæ¶å/YS_ReceiveOtherBillMain.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=' |
| | | , btn: [], |
| | | end: function (index, layero, that) { |
| | | //å·æ°é¡µé¢ |
| | | $("#btnSearch").trigger('click'); |
| | | } |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('忮䏿¯åå»ºç¶æï¼æ æ³ç¼è¾ï¼'); |
| | | } |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | |
| | | ]] |
| | | } |
| | | |
| | | option.data = rowdata; |
| | | option.data = []; |
| | | table.render(option); |
| | | } |
| | | |
| | |
| | | , { field: 'æè¦', title: 'æè¦', sort: true } |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨', sort: true } |
| | | , { field: 'hsubid', title: 'hsubid', hide: true, sort: true } |
| | | , { field: 'æºå主å
ç ', title: 'æºå主å
ç ', sort: true, hide: true } |
| | | , { field: 'æºååå
ç ', title: 'æºååå
ç ', sort: true, hide: true } |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', sort: true, hide: true } |
| | | , { field: 'HMaterID', title: 'HMaterID', hide: true, sort: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 125, sort: true } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', sort: true } |
| | |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | var HsupId = data[0].hsubid; |
| | | var HQty = data[0].æ°é; |
| | | var HSourceInterID = data[0].æºå主å
ç ; |
| | | var HSourceEntryID = data[0].æºååå
ç ; |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Xs_SeOutStockBill/DeltetSeOutStockBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "user": sessionStorage["HUserName"]}, |
| | | data: { "HInterID": InterID, "HsupId": HsupId, "HQty": HQty, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "user": sessionStorage["HUserName"]}, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">ä¿®æ¹</button>--> |
| | | |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">ä¿å</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill">å®¡æ ¸</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">å®¡æ ¸</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">éåº</button> |
| | | <!--<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">å®¡æ ¸</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">åå®¡æ ¸</button> |
| | |
| | | var params = getUrlVars(); |
| | | var OperationType = params[params[0]]; //ä»åæ°ä¸è·å æ°æ®ç±»å 1æ·»å ä¿å 2å¤å¶ 3 ç¼è¾ |
| | | var linterid = params[params[1]]; //ä»åæ°ä¸è·å åæ®å
ç |
| | | |
| | | var closeType = params[params[3]];//客æ·åºæ¶è´¦æ¬¾æç» åå»å¼¹çªå¼¹åºåªè½æ¥çä¸è½ç¼è¾ ç¦ç¨æé® |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | |
| | | getCzyglByUser(); |
| | | } |
| | | else if (OperationType == 3) { //ç¼è¾ |
| | | if (closeType == 10) { |
| | | $('#btnSave').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); |
| | | |
| | | } |
| | | //å è½½ç¼è¾é¡µé¢ |
| | | RoadBillMain(linterid); |
| | | } |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PM_WorkTaskWeekBill/CheckPM_WorkReportWeekBillMain', |
| | | type: "GET", |
| | | data: {"HInterID": $("#HInterID").val(), "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PM_WorkTaskWeekBill/CheckPM_WorkReportWeekBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $('#set_CheckBill').removeClass("layui-btn-disabled").attr("disabled", false); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PM_WorkTaskWeekBill/CheckPM_WorkReportWeekBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PM_WorkTaskWeekBill/CheckPM_WorkReportWeekBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PM_ProjectBill/CheckPM_CustomerTaskBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PM_ProjectBill/CheckPM_CustomerTaskBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PM_ProjectBill/CheckPM_ProjectMoneyBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PM_ProjectBill/CheckPM_ProjectMoneyBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PM_ProjectBill/CheckPM_WorkPlanMonthBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PM_ProjectBill/CheckPM_WorkPlanMonthBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | $('#set_CheckBill').removeClass("layui-btn-disabled").attr("disabled", false); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PM_ProjectBill/CheckPM_WorkPlanMonthBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/PM_ProjectBill/CheckPM_WorkPlanMonthBillMain', |
| | | type: "GET", |
| | | data: { "HInterID": InterID, "IsAudit": nums, "user": sessionStorage["HUserName"] }, |
| | | data: { "HInterID": InterID, "IsAudit": nums, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | |
| | | <div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | <button type="button" id="set_SaveBill" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">ä¿å</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_CheckBill">å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn-print">æå°</button> |
| | | <button type="button" id="set_CheckBill" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_CheckBill">å®¡æ ¸</button> |
| | | <button type="button" id="btn-print" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn-print">æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">éåº</button> |
| | | </div> |
| | | </div> |
| | |
| | | var OperationType = params[params[0]];//æä½ç±»å |
| | | var linterid = params[params[1]];//æºåid |
| | | var HSouceBillType = params[params[2]];//æºåç±»å |
| | | var closeType = params[params[3]];//客æ·åºæ¶è´¦æ¬¾æç» åå»å¼¹çªå¼¹åºåªè½æ¥çä¸è½ç¼è¾ ç¦ç¨æé® |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | } |
| | | else if (OperationType == 3) { //ç¼è¾ |
| | | if (closeType == 10) { |
| | | $('#set_SaveBill').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); |
| | | $('#btn-print').addClass("layui-btn-disabled").attr("disabled", true); |
| | | } |
| | | //ä¿®æ¹æ¶ä¸»è¡¨ID |
| | | $("#HInterID").val(linterid); |
| | | |