| | |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HBarCode" id="HBarCode"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top: 5px; margin-left: 70px;" > |
| | | <div class="layui-row" style="margin-top: 5px; margin-left: 70px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" id="BT_HSourceBillNo">æºååå·</label> |
| | | <label class="layui-form-label" id="BT_HSourceBillNo">æºååå·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HSourceBillNo" id="HSourceBillNo"> |
| | | </div> |
| | |
| | | <label class="layui-form-label" id="BT_HMaterNumber">ç©æä»£ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HMaterNumber" id="HMaterNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ç»åç§°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> |
| | | <select name="HUSEORGID" id="HUSEORGID" class="ForFilteringSchemes" lay-verify="HUSEORGID"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-print" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_Drop" id="set_Drop"><i class="layui-icon layui-icon-radio"></i>ä½åº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_DeDrop" id="set_DeDrop"><i class="layui-icon layui-icon-radio"></i>åä½åº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_DropBatch" id="set_DropBatch"><i class="layui-icon layui-icon-radio"></i>æ¹éä½åº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_DeDropBatch" id="set_DeDropBatch"><i class="layui-icon layui-icon-radio"></i>æ¹éåä½åº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-Delete" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="" id="set_HideColumn" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>æé®è®¾ç½®</button> |
| | |
| | | //åä½åºæé® |
| | | case 'set_DeDrop': set_DropBill(1); |
| | | break; |
| | | //æ¹éä½åºæé® |
| | | case 'set_DropBatch': set_DropBatchBill(0); |
| | | break; |
| | | //æ¹éåä½åºæé® |
| | | case 'set_DeDropBatch': set_DropBatchBill(1); |
| | | break; |
| | | //éåºæé® |
| | | case 'btn-exit': Pub_Close(2); |
| | | break; |
| | |
| | | |
| | | //#region æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | //initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //åå§åæ¥æé´éãå¼å§æ¥æãç»ææ¥æ |
| | | setSelect_HInitTimeCycle(); |
| | | //è¥æ¥æé´éä¸ä¸º ä»»æé´éï¼åç¦ç¨å¼å§æ¥æä¸ç»ææ¥æçéæ© |
| | | var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; |
| | | if (HInitTimeCycle != -1) { |
| | | $('#HBeginDate').prop('disabled', true); |
| | | $('#HEndDate').prop('disabled', true); |
| | | } else { |
| | | $('#HBeginDate').prop('disabled', false); |
| | | $('#HEndDate').prop('disabled', false); |
| | | } |
| | | |
| | | //æ ¹æ®æ¥æé´é设置å¼å§æ¶é´ä¸ç»ææ¶é´ |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§åç»ç» |
| | | Organ1(); |
| | | //æ¥è¯¢ |
| | | get_FastQuery(); |
| | | |
| | | //æ¥è¯¢å½åç»å½ç¨æ·ææ²¡æå¨å½å模å设置é»è®¤è¿æ»¤æ¹æ¡ |
| | | get_DefaultModule(); |
| | | |
| | | initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | |
| | | |
| | | } |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-150' |
| | | , page: false |
| | | , limit: 50 |
| | | , done: function (res, curr, count) { |
| | | soulTable.render(this); |
| | | } |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'hmainid', title: '忮ID', hide: true, sort: true } |
| | | , { field: 'æ¡ç ç±»å', title: 'æ¡ç ç±»å', width: 160, sort: true } |
| | | , { field: 'æ¡ç ç¼å·', title: 'æ¡ç ç¼å·', width: 160, sort: true } |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true, sort: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 200, sort: true } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 250, sort: true } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 250, sort: true } |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', width: 200, sort: true } |
| | | , { field: '计éåä½', title: '计éåä½', width: 200, sort: true } |
| | | , { field: 'çå·', title: 'çå·', width: 200, sort: true } |
| | | , { field: 'é¢å·å·', title: 'é¢å·å·', width: 200, sort: true } |
| | | , { field: 'æ¡ç ç¶æ', title: 'æ¡ç ç¶æ', width: 200, sort: true } |
| | | , { field: 'åå', title: 'åå', width: 200, sort: true } |
| | | , { field: 'æå
å·', title: 'æå
å·', width: 200, sort: true } |
| | | , { field: 'çäº§æ¥æ', title: 'çäº§æ¥æ', width: 200, templet: "<div>{{d.çäº§æ¥æ ==null ?'':layui.util.toDateString(d.çäº§æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'ä¿è´¨æè³', title: 'ä¿è´¨æè³', width: 200, templet: "<div>{{d.ä¿è´¨æè³ ==null ?'':layui.util.toDateString(d.ä¿è´¨æè³, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'HAuxPropID', title: 'HAuxPropID', width: 200, sort: true } |
| | | , { field: 'è¾
å©å±æ§ä»£ç ', title: 'è¾
å©å±æ§ä»£ç ', width: 160, sort: true } |
| | | , { field: 'è¾
å©å±æ§', title: 'è¾
å©å±æ§', width: 160, sort: true } |
| | | , { field: 'æ¹å·', title: 'æ¹å·', width: 160, sort: true } |
| | | , { field: 'æ°é', title: 'æ°é', width: 200, sort: true, totalRow: true } |
| | | , { field: '计åè·è¸ªå·', title: '计åè·è¸ªå·', width: 200, sort: true } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 200, sort: true } |
| | | , { field: 'HSupID', title: 'HSupID', width: 200, hide: true, sort: true } |
| | | , { field: 'ä¾åºå代ç ', title: 'ä¾åºå代ç ', width: 200, sort: true } |
| | | , { field: 'ä¾åºå', title: 'ä¾åºå', width: 200, sort: true } |
| | | , { field: 'è¿ææ¥æ', title: 'è¿ææ¥æ', width: 200, sort: true } |
| | | , { field: 'è¿ææ¥æå¨', title: 'è¿ææ¥æå¨', width: 115, sort: true } |
| | | , { field: '客æ·åå·', title: '客æ·åå·', width: 115, sort: true } |
| | | , { field: '徿¥åä½', title: '徿¥åä½', width: 200, sort: true } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true, sort: true } |
| | | , { field: '车é´', title: '车é´', width: 115, sort: true } |
| | | , { field: '计åå®å·¥æ¥æ', title: '计åå®å·¥æ¥æ', width: 200, sort: true } |
| | | , { field: 'æå·', title: 'æå·', width: 200, sort: true } |
| | | , { field: 'æ»ææ°', title: 'æ»ææ°', width: 200, sort: true, totalRow: true } |
| | | , { field: '夿³¨', title: '夿³¨', width: 200, sort: true } |
| | | , { field: 'å¶ä½äºº', title: 'å¶ä½äºº', width: 115, sort: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 200, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'æå°æ¬¡æ°', title: 'æå°æ¬¡æ°', width: 200, sort: true } |
| | | , { field: 'ä½åºæ è®°', title: 'ä½åºæ è®°', width: 200, sort: true } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 115, sort: true } |
| | | , { field: 'ç产å
¥åºæ¥æ', title: 'ç产å
¥åºæ¥æ', width: 200, templet: "<div>{{d.ç产å
¥åºæ¥æ ==null ?'':layui.util.toDateString(d.ç产å
¥åºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'éå®åºåºæ¥æ', title: 'éå®åºåºæ¥æ', width: 200, templet: "<div>{{d.éå®åºåºæ¥æ ==null ?'':layui.util.toDateString(d.éå®åºåºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | ]] |
| | | }; |
| | | optionPage = { |
| | | elem: 'page', //注æï¼è¿éç page æ¯ IDï¼ä¸ç¨å # å· |
| | | count: 10000, //æ°æ®æ»æ°ï¼ä»æå¡ç«¯å¾å° |
| | | limit: 50, |
| | | limits: [50, 500, 5000, 50000], |
| | | layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'], |
| | | jump: function (obj, first) { |
| | | //馿¬¡ä¸æ§è¡ |
| | | if (!first) { |
| | | //do something |
| | | page = obj.curr; |
| | | size = obj.limit; |
| | | // å设æé®æä¸ä¸ªID为"myButton" |
| | | $("#btnSearch").trigger("click"); |
| | | } |
| | | } |
| | | } |
| | | laypage.render(optionPage); |
| | | } |
| | | |
| | | |
| | | function get_FastQuery() { |
| | | var HBeginDate = $("#HBeginDate").val();//å¼å§æ¥æ |
| | | var HEndDate = $("#HEndDate").val();//ç»ææ¥æ |
| | | var HBarCode = $("#HBarCode").val(); |
| | | var HSourceBillNo = $("#HSourceBillNo").val(); |
| | | var HMaterName = $("#HMaterName").val(); |
| | | var HMaterNumber = $("#HMaterNumber").val(); |
| | | var HMaterNumber = $("#HMaterNumber").val(); |
| | | var ColName = $("#ColName").val();//å¤éæ¡ |
| | | var Comparator = $("#Comparator").val() |
| | | var ColContent = $("#ColContent").val(); |
| | |
| | | } |
| | | if (HMaterNumber) { |
| | | sWhere += " and ç©æä»£ç like''%" + HMaterNumber + "%''"; |
| | | } |
| | | } |
| | | if (HSourceBillNo) { |
| | | sWhere += " and æºååå· like ''%" + HSourceBillNo + "%''"; |
| | | } |
| | | |
| | | sWhere += getOrgIDByUser();//ç¨æ·å
³èç»ç»æ¥è¯¢è¿æ»¤ |
| | | |
| | | get_DisplayPage(sWhere); |
| | | |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | //initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //åå§åæ¥æé´éãå¼å§æ¥æãç»ææ¥æ |
| | | setSelect_HInitTimeCycle(); |
| | | //è¥æ¥æé´éä¸ä¸º ä»»æé´éï¼åç¦ç¨å¼å§æ¥æä¸ç»ææ¥æçéæ© |
| | | var HInitTimeCycle = $("#HInitTimeCycle").val() * 1; |
| | | if (HInitTimeCycle != -1) { |
| | | $('#HBeginDate').prop('disabled', true); |
| | | $('#HEndDate').prop('disabled', true); |
| | | } else { |
| | | $('#HBeginDate').prop('disabled', false); |
| | | $('#HEndDate').prop('disabled', false); |
| | | } |
| | | |
| | | //æ ¹æ®æ¥æé´é设置å¼å§æ¶é´ä¸ç»ææ¶é´ |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | |
| | | //æ¥è¯¢ |
| | | get_DisplayPage(sWhere); |
| | | //ä»»æåæ®µè¿æ»¤ä¸ææ¡åå§å |
| | | ColFilter(); |
| | | |
| | | //æ¥è¯¢å½åç»å½ç¨æ·ææ²¡æå¨å½å模å设置é»è®¤è¿æ»¤æ¹æ¡ |
| | | get_DefaultModule(); |
| | | |
| | | initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | |
| | | |
| | | } |
| | | function set_InitGrid() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-150' |
| | | , page: false |
| | | , limit: 50 |
| | | , done: function (res, curr, count) { |
| | | soulTable.render(this); |
| | | } |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'hmainid', title: '忮ID', hide: true, sort: true } |
| | | , { field: 'æ¡ç ç±»å', title: 'æ¡ç ç±»å', width: 160, sort: true } |
| | | , { field: 'æ¡ç ç¼å·', title: 'æ¡ç ç¼å·', width: 160, sort: true } |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true, sort: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 200, sort: true } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 250, sort: true } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 250, sort: true } |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', width: 200, sort: true } |
| | | , { field: '计éåä½', title: '计éåä½', width: 200, sort: true } |
| | | , { field: 'çå·', title: 'çå·', width: 200, sort: true } |
| | | , { field: 'é¢å·å·', title: 'é¢å·å·', width: 200, sort: true } |
| | | , { field: 'æ¡ç ç¶æ', title: 'æ¡ç ç¶æ', width: 200, sort: true } |
| | | , { field: 'åå', title: 'åå', width: 200, sort: true } |
| | | , { field: 'æå
å·', title: 'æå
å·', width: 200, sort: true } |
| | | , { field: 'çäº§æ¥æ', title: 'çäº§æ¥æ', width: 200, templet: "<div>{{d.çäº§æ¥æ ==null ?'':layui.util.toDateString(d.çäº§æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'ä¿è´¨æè³', title: 'ä¿è´¨æè³', width: 200, templet: "<div>{{d.ä¿è´¨æè³ ==null ?'':layui.util.toDateString(d.ä¿è´¨æè³, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'HAuxPropID', title: 'HAuxPropID', width: 200, sort: true } |
| | | , { field: 'è¾
å©å±æ§ä»£ç ', title: 'è¾
å©å±æ§ä»£ç ', width: 160, sort: true } |
| | | , { field: 'è¾
å©å±æ§', title: 'è¾
å©å±æ§', width: 160, sort: true } |
| | | , { field: 'æ¹å·', title: 'æ¹å·', width: 160, sort: true } |
| | | , { field: 'æ°é', title: 'æ°é', width: 200, sort: true, totalRow: true } |
| | | , { field: '计åè·è¸ªå·', title: '计åè·è¸ªå·', width: 200, sort: true } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 200, sort: true } |
| | | , { field: 'HSupID', title: 'HSupID', width: 200, hide: true, sort: true } |
| | | , { field: 'ä¾åºå代ç ', title: 'ä¾åºå代ç ', width: 200, sort: true } |
| | | , { field: 'ä¾åºå', title: 'ä¾åºå', width: 200, sort: true } |
| | | , { field: 'è¿ææ¥æ', title: 'è¿ææ¥æ', width: 200, sort: true } |
| | | , { field: 'è¿ææ¥æå¨', title: 'è¿ææ¥æå¨', width: 115, sort: true } |
| | | , { field: '客æ·åå·', title: '客æ·åå·', width: 115, sort: true } |
| | | , { field: '徿¥åä½', title: '徿¥åä½', width: 200, sort: true } |
| | | , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true, sort: true } |
| | | , { field: '车é´', title: '车é´', width: 115, sort: true } |
| | | , { field: '计åå®å·¥æ¥æ', title: '计åå®å·¥æ¥æ', width: 200, sort: true } |
| | | , { field: 'æå·', title: 'æå·', width: 200, sort: true } |
| | | , { field: 'æ»ææ°', title: 'æ»ææ°', width: 200, sort: true, totalRow: true } |
| | | , { field: '夿³¨', title: '夿³¨', width: 200, sort: true } |
| | | , { field: 'å¶ä½äºº', title: 'å¶ä½äºº', width: 115, sort: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 200, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'æå°æ¬¡æ°', title: 'æå°æ¬¡æ°', width: 200, sort: true } |
| | | , { field: 'ä½åºæ è®°', title: 'ä½åºæ è®°', width: 200, sort: true } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 115, sort: true } |
| | | , { field: 'ç产å
¥åºæ¥æ', title: 'ç产å
¥åºæ¥æ', width: 200, templet: "<div>{{d.ç产å
¥åºæ¥æ ==null ?'':layui.util.toDateString(d.ç产å
¥åºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | , { field: 'éå®åºåºæ¥æ', title: 'éå®åºåºæ¥æ', width: 200, templet: "<div>{{d.éå®åºåºæ¥æ ==null ?'':layui.util.toDateString(d.éå®åºåºæ¥æ, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true } |
| | | ]] |
| | | }; |
| | | optionPage = { |
| | | elem: 'page', //注æï¼è¿éç page æ¯ IDï¼ä¸ç¨å # å· |
| | | count: 10000, //æ°æ®æ»æ°ï¼ä»æå¡ç«¯å¾å° |
| | | limit: 50, |
| | | limits: [50, 500, 5000, 50000], |
| | | layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'], |
| | | jump: function (obj, first) { |
| | | //console.log(obj) |
| | | //objå
å«äºå½ååé¡µçææåæ°ï¼æ¯å¦ï¼ |
| | | //console.log(obj.curr); //å¾å°å½å页ï¼ä»¥ä¾¿åæå¡ç«¯è¯·æ±å¯¹åºé¡µçæ°æ®ã |
| | | //console.log(obj.limit); //å¾å°æ¯é¡µæ¾ç¤ºçæ¡æ° |
| | | |
| | | //馿¬¡ä¸æ§è¡ |
| | | if (!first) { |
| | | //do something |
| | | page = obj.curr; |
| | | size = obj.limit; |
| | | // å设æé®æä¸ä¸ªID为"myButton" |
| | | $("#btnSearch").trigger("click"); |
| | | } |
| | | } |
| | | } |
| | | laypage.render(optionPage); |
| | | } |
| | | |
| | | //#region å页æ¥è¯¢ |
| | | function get_DisplayPage(sWhere) { |
| | | if (sessionStorage["HAutoLogin"] == "1") { |
| | | sWhere += " and HSupID = ''" + sessionStorage["HUserName"] + "''"; |
| | | } |
| | | |
| | | var wait = layer.load();//é®ç½© |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | |
| | | option.data = [[]] |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | /*layer.alert(data1.code + data1.Message, { icon: 5 });*/ |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ¹éåä½åº/æ¹éä½åºæ°æ® |
| | | function set_DropBatchBill(num) { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length > 0) { |
| | | var HInterIDListStr = ""; |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (i == data.length - 1) { |
| | | HInterIDListStr += data[i].hmainid.toString(); |
| | | } else { |
| | | HInterIDListStr += data[i].hmainid.toString() + ","; |
| | | } |
| | | } |
| | | |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_BarCodeBillList/DeleteBatchGy_BarCodeBillList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": HInterIDListStr, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] }, |
| | | async: false, |
| | | 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); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | if (get_needClose_Bar == 0) { |
| | | $("#btnSearch").trigger('click'); |
| | | } else if (get_needClose_Bar == 1) { |
| | | $("#get_needClose").trigger('click'); |
| | | } |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(get_MessageError(result.code + result.Message, sessionStorage["HTranSlate"]), { icon: 5 }); |
| | | } |
| | | }, error: function (err) { |
| | | layer.alert(get_MessageError("[0000-1-002]æ¥å£è¯·æ±å¤±è´¥!", sessionStorage["HTranSlate"]) + err.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg(get_MessageError('[0000-1-021]è¯·éæ©æ°æ®ä½åºï¼', sessionStorage["HTranSlate"])); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region å页æ¥è¯¢ |
| | | function get_DisplayPage(sWhere) { |
| | | var wait = layer.load();//é®ç½© |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_BarCodeBillList/page', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size }, |
| | | success: function (data1) { |
| | | option.limit = size;//æ¹åè¡¨æ ¼é¡µå¤§å° |
| | | if (data1.code == 1) { |
| | | optionPage.count = data1.count;//æ¹ååè¡¨æ°æ®æ»æ° |
| | | var data = []; |
| | | var col = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | //int |
| | | case 'DateTime': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | ins = table.render(option); |
| | | laypage.render(optionPage); |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | |
| | | layer.close(ajaxLoad); |
| | | if ($("#ColName option").length < 1) { |
| | | ColFilter(); |
| | | } |
| | | |
| | | //å·æ°æé®æ¾ç¤º |
| | | var btns = document.getElementsByTagName("button"); //è·åæ¬é¡µæææé®å¯¹è±¡ |
| | | var HBillType = "æ¡ç 主档"; |
| | | Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]); |
| | | //layer.alert("æ¥è¯¢æå", { icon: 1 }); |
| | | } else { |
| | | option.data = [[]] |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | /*layer.alert(data1.code + data1.Message, { icon: 5 });*/ |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(get_MessageError("[0000-1-002]æ¥å£è¯·æ±å¤±è´¥!", sessionStorage["HTranSlate"]), { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //éèå设置 |
| | | function get_HideColumn() { |
| | |
| | | $("#HInitTimeCycle").val("29"); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region ç¹å»è¡éä¸é«äº® |
| | | table.on('row(mainTable)', function (obj) { |
| | | //éä¸è¡æ¹åé¢è² |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //#region æ ¹æ®ç¨æ·è·åç¨æ·å
³èç»ç»çè¿æ»¤æ¡ä»¶ |
| | | function getOrgIDByUser() { |
| | | var res = ""; |
| | | $.ajax({ |
| | | type: "GET", |
| | | async: false, |
| | | url: GetWEBURL() + "/Xt_User/getOrgIDListByUser", //æ¹æ³æå¨é¡µé¢åæ¹æ³å ä¼ å ç»ç»å¿
é¡»æ¯åè¡¨å¤´é¨æ¥è¯¢çç»ç» ä¸è½ä½¿ç¨ç¨æ·é»è®¤ |
| | | data: { "UserID": sessionStorage["Czybm"], "UserName": sessionStorage["HUserName"], HOrgID: $("#HUSEORGID").val() }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | if (result.data[0].sWhere == "1") { |
| | | res = " and çæç»ç» = '" + $("#HUSEORGID").val() + "'"; |
| | | } else { |
| | | res = result.data[0].sWhere; |
| | | } |
| | | } |
| | | }, error: function (err) { |
| | | res = " and 1 = 0"; |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | return res; |
| | | } |
| | | //#endregion |
| | | |
| | | //#region è·åç»ç» |
| | | function Organ1() { |
| | | //è·åç»å½é¡µç»ç»å |
| | | $.ajax({ |
| | | type: "get", |
| | | async: false, |
| | | url: GetWEBURL() + "/Web/GetOrganizations", |
| | | success: function (result) { |
| | | var Organization = ""; |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data; |
| | | for (var i = 0; i < data.length; i++) { |
| | | Organization += '<option style="color:blue;" value="' + data[i].Name + '">' + data[i].Name + '</option>'; |
| | | } |
| | | $("#HUSEORGID").append(Organization); |
| | | $("#HUSEORGID").val(sessionStorage["Organization"]) |
| | | form.render('select'); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region ãè¿æ»¤æ¹æ¡ã |
| | | |
| | | //è·åå½åç¨æ·çé»è®¤è¿æ»¤æ¹æ¡ |