| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>éè´è®¢åå表</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <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 src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">åå¸ç¶æ</label> |
| | | <div class="layui-input-block"> |
| | | <select name="HStatus" lay-filter="HStatus" style="width:190px;"> |
| | | <option value="-1" selected="selected">å
¨é¨</option> |
| | | <option value="1">æªåé
</option> |
| | | <option value="2">å·²åé
</option> |
| | | <option value="3">å·²åå¸</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HDate"> |
| | | <input type="date" class="layui-input" id="HBeginDate" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ææ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HDate1"> |
| | | <input type="date" class="layui-input" id="HEndDate" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label">订åè·è¸ªå·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO"> |
| | | </div> |
| | | </div>--> |
| | | |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | |
| | | <div class="layui-colla-content"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline"> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">åæ®å·</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="WorkCenter" id="WorkCenter"> |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ä¾åºåä¿¡æ¯</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSupName" id="HSupName" readonly class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="Department" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>é¢è§</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>确认</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>驳å</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>详æ
</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>çæéè´§å</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>éåº</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>å é¤</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-fp"><i class="layui-icon layui-icon-tips"></i>åé
</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-fb"><i class="layui-icon layui-icon-tips"></i>åå¸</button> |
| | | |
| | | <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="btn-print"><i class="layui-icon layui-icon-print"></i>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | |
| | | </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> |
| | | <script type="text/javascript"> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index', //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table', 'element', 'laypage','laydate'], function () { |
| | | }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], 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 |
| | | //var sWhere = " 产å代ç = 'BX0002'"; |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var option = []; |
| | | var Name = "MouldProdInHouseCellWidth"; |
| | | //#endregion |
| | | |
| | | var option = { |
| | | elem: '#mainTable' |
| | | //, toolbar: '#toolbarDemo' |
| | | ,height: 'full-50' |
| | | , page: true |
| | | ,cellMinWidth: 90 |
| | | , cols: [[ |
| | | { field: 'hmainid', title: 'hmainid', sort: true, hide: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ' } |
| | | , { field: 'åæ®å·', title: 'åæ®å·' } |
| | | , { field: 'HBillType', title: 'HBillType', hide: true } |
| | | , { field: 'HSupID', title: 'HSupID', hide: true } |
| | | , { field: 'ä¾åºå代ç ', title: 'ä¾åºå代ç ' } |
| | | , { field: 'ä¾åºå', title: 'ä¾åºå' } |
| | | , { field: '交货å°ç¹', title: '交货å°ç¹' } |
| | | , { field: 'HPSStyleID', title: 'HPSStyleID', hide: true } |
| | | , { field: 'éè´æ¹å¼ä»£ç ', title: 'éè´æ¹å¼ä»£ç ' } |
| | | , { field: 'éè´æ¹å¼', title: 'éè´æ¹å¼' } |
| | | , { field: 'HSSID', title: 'HSSID', hide: true } |
| | | , { field: 'ç»ç®æ¹å¼ä»£ç ', title: 'ç»ç®æ¹å¼ä»£ç ' } |
| | | , { field: 'ç»ç®æ¹å¼', title: 'ç»ç®æ¹å¼' } |
| | | , { field: 'ç»ç®æ¥æ', title: 'ç»ç®æ¥æ' } |
| | | , { field: 'HCurID', title: 'HCurID', hide: true } |
| | | , { field: 'å¸å«ä»£ç ', title: 'å¸å«ä»£ç ' } |
| | | , { field: 'å¸å«', title: 'å¸å«' } |
| | | , { field: 'æ±ç', title: 'æ±ç' } |
| | | , { field: 'HDeptID', title: 'HDeptID', hide: true } |
| | | , { field: 'é¨é¨ä»£ç ', title: 'é¨é¨ä»£ç ' } |
| | | , { field: 'é¨é¨', title: 'é¨é¨' } |
| | | , { field: 'HManagerID', title: 'HManagerID', hide: true } |
| | | , { field: '主管代ç ', title: '主管代ç ' } |
| | | , { field: '主管', title: '主管' } |
| | | , { field: 'HEmpID', title: 'HEmpID', hide: true } |
| | | , { field: 'ä¸å¡å代ç ', title: 'ä¸å¡å代ç ' } |
| | | , { field: 'ä¸å¡å', title: 'ä¸å¡å' } |
| | | , { field: 'æè¦', title: 'æè¦' } |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨' } |
| | | , { field: 'hsubid', title: 'hsubid', hide: true } |
| | | , { field: 'HMaterID', title: 'HMaterID', hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ' } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°' } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·' } |
| | | , { field: 'æ¹å·', title: 'æ¹å·' } |
| | | , { field: 'HUnitID', title: 'HUnitID', hide: true } |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ' } |
| | | , { field: '计éåä½', title: '计éåä½' } |
| | | , { field: 'æ°é', title: 'æ°é' } |
| | | , { field: 'åä»·', title: 'åä»·' } |
| | | , { field: 'éé¢', title: 'éé¢' } |
| | | , { field: 'ç¨ç', title: 'ç¨ç' } |
| | | , { field: 'ç¨é¢', title: 'ç¨é¢' } |
| | | , { field: 'ä»·ç¨å计', title: 'ä»·ç¨å计' } |
| | | , { field: 'äº¤è´§æ¥æ', title: 'äº¤è´§æ¥æ' } |
| | | , { field: 'æºååå·', title: 'æºååå·' } |
| | | , { field: '计åè·è¸ªå·', title: '计åè·è¸ªå·' } |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨' } |
| | | , { field: 'å¶å人', title: 'å¶å人' } |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ' } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº' } |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ' } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº' } |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ' } |
| | | , { field: 'å
³é人', title: 'å
³é人' } |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ' } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº' } |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ' } |
| | | ]] |
| | | }; |
| | | //#region è¿å
¥é¡µé¢æ¢å è½½ |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | //å è½½æ°æ®å°ç½æ ¼ |
| | | get_Display(sWhere); |
| | | //#endregion |
| | | |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | var index0 = layer.load(0, { shade: false }); |
| | | $.ajax({ |
| | | //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum", |
| | | url: GetWEBURL() + '/Cg_POOrderBill/list', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(index0); |
| | | } else { |
| | | layer.close(index0); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index0); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | //#region ç¹å»äºä»¶å
æ¬on formäºä»¶ç |
| | | //头工å
·æ äºä»¶ |
| | | table.on('toolbar(mainTable)', function (obj) { |
| | | switch (obj.event) { |
| | | //æ°å¢æé® |
| | | case 'btn-Add': set_AddNew(); |
| | | break; |
| | | //ç¼è¾æé® |
| | | case 'btn-Edit': set_ShowBill(); |
| | | break; |
| | | //å é¤æé® |
| | | case 'btn-Delete': set_DeleteBill(); |
| | | break; |
| | | //æµè§ |
| | | case 'btn-view': get_ViewReport(); |
| | | break; |
| | | //æå° |
| | | case 'btn-print': get_PrintReport(); |
| | | break; |
| | | //å·æ° |
| | | case 'get_Refresh': set_Refresh(); |
| | | break; |
| | | |
| | | //éåº |
| | | case 'get_Exit': Pub_Close(2); |
| | | break; |
| | | //åé
|
| | | case 'btn-fp': set_Distribut(); |
| | | break; |
| | | //åå¸ |
| | | case 'btn-fb': set_Release(); |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | | |
| | | //éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | $("#HDate").val("");//å¼å§æ¥æ |
| | | $("#HDate1").val("");//ç»ææ¥æ |
| | | $("#WorkCenter").val("");//åæ®å· |
| | | $("#btnSearch").click(); |
| | | set_ClearQuery(); |
| | | }); |
| | | |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) {//éæ©ä»ä½ |
| | | var HDate = $("#HDate").val();//å¼å§æ¥æ |
| | | var HDate1 = $("#HDate1").val();//ç»ææ¥æ |
| | | var HOrderProcNO = $("#HOrderProcNO").val();//订åè·è¸ªå· |
| | | var WorkCenter = $("#WorkCenter").val();//åæ®å· |
| | | if (HDate) { |
| | | sWhere += " and æ¥æ >= '" + HDate + "'"; |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(table, option); |
| | | }); |
| | | |
| | | //表头信æ¯é¨é¨å¼¹çª |
| | | form.on('submit(Department)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'ä¾åºåå表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/SupplierInformation.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HSupName").val(checkStatus.data[0].HName); |
| | | $("#HSupID").val(checkStatus.data[0].HItemID); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | |
| | | |
| | | //#region æ¤é¡µé¢æææ¹æ³ |
| | | //åå§åè¡¨æ ¼ |
| | | function set_InitGrid() { |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | var columns = [ |
| | | { type: 'checkbox', fixed: 'left', totalRowText: 'å计' } |
| | | ,{ field: 'hmainid', title: 'hmainid', sort: true, hide: true } |
| | | , { field: 'æ¥æ', title: 'æ¥æ', width: 120, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'åæ®å·', title: 'åæ®å·', width: 150 } |
| | | , { field: 'HBillType', title: 'HBillType', hide: true } |
| | | , { field: 'HSupID', title: 'HSupID', hide: true } |
| | | , { field: 'ä¸å¡ç¶æ', title: 'ä¸å¡ç¶æ', width: 100 } |
| | | , { field: 'ä¾åºå代ç ', title: 'ä¾åºå代ç ', width: 120} |
| | | , { field: 'ä¾åºå', title: 'ä¾åºå', width: 100 } |
| | | , { field: 'ä¸å¡å代ç ', title: 'ä¸å¡å代ç ', width: 100 } |
| | | , { field: 'ä¸å¡å', title: 'ä¸å¡å', width: 100 } |
| | | , { field: '交货å°ç¹', title: '交货å°ç¹', width: 100} |
| | | , { field: 'HPSStyleID', title: 'HPSStyleID', hide: true } |
| | | , { field: 'éè´æ¹å¼ä»£ç ', title: 'éè´æ¹å¼ä»£ç ', width: 120} |
| | | , { field: 'éè´æ¹å¼', title: 'éè´æ¹å¼', width: 100} |
| | | , { field: 'HSSID', title: 'HSSID', hide: true } |
| | | , { field: 'ç»ç®æ¹å¼ä»£ç ', title: 'ç»ç®æ¹å¼ä»£ç ', width: 120} |
| | | , { field: 'ç»ç®æ¹å¼', title: 'ç»ç®æ¹å¼', width: 100} |
| | | , { field: 'ç»ç®æ¥æ', title: 'ç»ç®æ¥æ', width: 120, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.ç»ç®æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'HCurID', title: 'HCurID', hide: true } |
| | | , { field: 'å¸å«ä»£ç ', title: 'å¸å«ä»£ç ', width: 100} |
| | | , { field: 'å¸å«', title: 'å¸å«', width: 100} |
| | | , { field: 'æ±ç', title: 'æ±ç', width: 100} |
| | | , { field: 'HDeptID', title: 'HDeptID', hide: true } |
| | | , { field: 'é¨é¨ä»£ç ', title: 'é¨é¨ä»£ç ', width: 100} |
| | | , { field: 'é¨é¨', title: 'é¨é¨', width: 100} |
| | | , { field: 'HManagerID', title: 'HManagerID', hide: true } |
| | | , { field: '主管代ç ', title: '主管代ç ', width: 100} |
| | | , { field: '主管', title: '主管', width: 100} |
| | | , { field: 'HEmpID', title: 'HEmpID', hide: true } |
| | | , { field: 'æè¦', title: 'æè¦', width: 100} |
| | | , { field: 'è¡¨å¤´å¤æ³¨', title: 'è¡¨å¤´å¤æ³¨', width: 100} |
| | | , { field: 'hsubid', title: 'hsubid', hide: true } |
| | | , { field: 'HMaterID', title: 'HMaterID', hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 100} |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 100} |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100} |
| | | , { field: 'æ¹å·', title: 'æ¹å·', width: 100} |
| | | , { field: 'HUnitID', title: 'HUnitID', hide: true } |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', width: 120} |
| | | , { field: '计éåä½', title: '计éåä½', width: 100} |
| | | , { field: 'æ°é', title: 'æ°é', width: 100} |
| | | , { field: 'åä»·', title: 'åä»·', width: 100} |
| | | , { field: 'éé¢', title: 'éé¢', width: 100} |
| | | , { field: 'ç¨ç', title: 'ç¨ç', width: 100} |
| | | , { field: 'ç¨é¢', title: 'ç¨é¢', width: 100} |
| | | , { field: 'ä»·ç¨å计', title: 'ä»·ç¨å计', width: 100} |
| | | , { field: 'äº¤è´§æ¥æ', title: 'äº¤è´§æ¥æ', width: 120, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.äº¤è´§æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 100} |
| | | , { field: '计åè·è¸ªå·', title: '计åè·è¸ªå·', width: 100} |
| | | , { field: '表ä½å¤æ³¨', title: '表ä½å¤æ³¨', width: 100} |
| | | , { field: 'å¶å人', title: 'å¶å人', width: 100} |
| | | , { field: 'å¶åæ¥æ', title: 'å¶åæ¥æ', width: 120, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.å¶åæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'å®¡æ ¸äºº', title: 'å®¡æ ¸äºº', width: 100} |
| | | , { field: 'å®¡æ ¸æ¥æ', title: 'å®¡æ ¸æ¥æ', width: 120, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.å®¡æ ¸æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'ä¿®æ¹äºº', title: 'ä¿®æ¹äºº', width: 100} |
| | | , { field: 'ä¿®æ¹æ¥æ', title: 'ä¿®æ¹æ¥æ', width: 120, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.ä¿®æ¹æ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'å
³é人', title: 'å
³é人', width: 100} |
| | | , { field: 'å
³éæ¥æ', title: 'å
³éæ¥æ', width: 120, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.å
³éæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | , { field: 'ä½åºäºº', title: 'ä½åºäºº', width: 100} |
| | | , { field: 'ä½åºæ¥æ', title: 'ä½åºæ¥æ', width: 120, templet: "<div>{{d.æ¥æ ==null ?'':layui.util.toDateString(d.ä½åºæ¥æ, 'yyyy-MM-dd')}}</div>" } |
| | | |
| | | ]; |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: true |
| | | , cellMinWidth: 120 |
| | | , totalRow: true |
| | | , limit: 10 |
| | | , height: 'full-50' |
| | | , cols: [columns] |
| | | , limits: [50, 500, 1000, 5000] |
| | | , done: function (res, curr, count) { |
| | | |
| | | } |
| | | }; |
| | | ////设置å宽 |
| | | //var colWidth = getColumnsWidth(); |
| | | //if (colWidth == "" || colWidth == []) { |
| | | |
| | | //} |
| | | //else { |
| | | // $.each(columns, function (x, m) { |
| | | // m["width"] = colWidth[x]; |
| | | // }); |
| | | //} |
| | | } |
| | | //å è½½ç½æ ¼ |
| | | function get_Display(sWhere) { |
| | | var wait = layer.load();//é®ç½© |
| | | var HBeginDate = $("#HBeginDate").val();//å¼å§æ¥æ |
| | | var HEndDate = $("#HEndDate").val();//ç»ææ¥æ |
| | | if (HBeginDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + HBeginDate + "'"; |
| | | } |
| | | if (HDate1) { |
| | | sWhere += " and æ¥æ <= '" + HDate1 + "'"; |
| | | if (HEndDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) <= '" + HEndDate + "'"; |
| | | } |
| | | if (WorkCenter) { |
| | | sWhere += " and åæ®å· like '%" + WorkCenter + "%'"; |
| | | } |
| | | var index = layer.load(0, { shade: false }); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Cg_POOrderBill/list', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | data: { "sWhere": sWhere}, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | DataList = data1.data; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(index); |
| | | layer.alert("æ¥è¯¢æå", { icon: 1 }); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.close(index); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | }); |
| | | } |
| | | //æ°å¢ |
| | | function set_AddNew() { |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'æ°å¢å¨å
·éè´å
¥åºå', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '../模治å
·ä»åºç®¡ç/Sc_MouldProdInBillEdit.html?OperationType=1&linterid=&HSouceBillType=0&closeType=1', |
| | | end: function () { |
| | | //å·æ°é¡µé¢, |
| | | get_FastQuery(table, option); |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | //ç¼è¾åæ® |
| | | function set_ShowBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , 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: 'ç¼è¾å¨å
·éè´å
¥åºå' |
| | | , closeBtn: 1 |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: '../模治å
·ä»åºç®¡ç/Sc_MouldProdInBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1' |
| | | , resize: false, |
| | | end: function () { |
| | | get_FastQuery(table, option); |
| | | } |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | } |
| | | //å é¤ |
| | | function set_DeleteBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MouldProdInBill/set_DeleteBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "user": 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); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | layer.close(wait); |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | } |
| | | |
| | | //é¢è§ |
| | | function get_ViewReport() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | | , title: 'æå°æ¨¡çéæ©' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HMouldProdInBill', 'yes'] |
| | | , resize: false |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®æå°ï¼'); |
| | | } |
| | | } |
| | | |
| | | //æå° |
| | | function get_PrintReport() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | | , title: 'æå°æ¨¡çéæ©' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: false //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HMouldProdInBill', 'yes'] |
| | | , resize: false |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®æå°ï¼'); |
| | | } |
| | | } |
| | | |
| | | //å®¡æ ¸ |
| | | function set_CheckBill() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MouldProdInBill/set_CheckBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "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); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | get_FastQuery(table, option); |
| | | }); |
| | | } else { |
| | | layer.alert(result.Message, { icon: 5 }); |
| | | } |
| | | layer.close(wait); |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å®¡æ ¸ï¼'); |
| | | } |
| | | } |
| | | //åå®¡æ ¸ |
| | | function set_AbandonCheck() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MouldProdInBill/set_AbandonCheck", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "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); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | get_FastQuery(table, option); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | layer.close(wait); |
| | | }, error: function () { |
| | | layer.close(wait); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®åå®¡æ ¸ï¼'); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | //è·åå宽 |
| | | function getColumnsWidth() { |
| | | var result = []; |
| | | var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | //è·åå宽 |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Cg_POOrderBill/list', |
| | | async: false, |
| | | type: "Get", |
| | | dataType: "json", |
| | | data: { "colNum": colNum, "Name": Name }, |
| | | success: function (data1) { |
| | | if (data1.code == 1) { |
| | | result = data1.data; |
| | | } |
| | | else if (data1.code == -1) { |
| | | |
| | | } |
| | | else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(e.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | return result; |
| | | } |
| | | //ä¿åå宽 |
| | | function set_SaveGridColWidth() { |
| | | var arr = []; |
| | | // åæ° |
| | | var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | for (var i = 0; i <= colNum; i++) { |
| | | var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text(); |
| | | var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width(); |
| | | if (colName != "" && colName != null) { |
| | | arr.push(colWidth == -1 ? 200 : colWidth); |
| | | } |
| | | } |
| | | arr.unshift(40); //é¦ä½è¿½å |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth', |
| | | async: false, |
| | | type: "POST", |
| | | dataType: "json", |
| | | data: { "myMap": JSON.stringify(arr), "Name": Name }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.alert(data1.Message, { icon: 1 }); |
| | | } else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(e.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | //设置èµå¼å宽 |
| | | var colWidth = getColumnsWidth(); |
| | | if (colWidth == "" || colWidth == []) { |
| | | |
| | | } |
| | | else { |
| | | $.each(columns, function (x, m) { |
| | | m["width"] = colWidth[x]; |
| | | }); |
| | | } |
| | | get_FastQuery(table, option); |
| | | } |
| | | //é»è®¤å宽 |
| | | function set_DefaultGridColWidth() { |
| | | var arr = []; |
| | | // åæ° |
| | | var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length; |
| | | for (var i = 0; i <= colNum; i++) { |
| | | var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text(); |
| | | if (colName != "" && colName != null) { |
| | | arr.push(200); //é»è®¤å®½åº¦200 |
| | | } |
| | | } |
| | | arr.unshift(40); //é¦ä½è¿½å |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth', |
| | | async: false, |
| | | type: "POST", |
| | | dataType: "json", |
| | | data: { "myMap": JSON.stringify(arr), "Name": Name }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | layer.alert(data1.Message, { icon: 1 }); |
| | | |
| | | } else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(e.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | //设置èµå¼å宽 |
| | | var colWidth = getColumnsWidth(); |
| | | if (colWidth == "" || colWidth == []) { |
| | | |
| | | } |
| | | else { |
| | | $.each(columns, function (x, m) { |
| | | m["width"] = colWidth[x]; |
| | | }); |
| | | } |
| | | get_FastQuery(table, option); |
| | | } |
| | | |
| | | //å¤å¶åæ® |
| | | function set_CopyBill() { |
| | | |
| | | } |
| | | //å
³éåæ® |
| | | function set_CloseBill() { |
| | | |
| | | } |
| | | //åå
³éåæ® |
| | | function set_CancelCloseBill() { |
| | | |
| | | } |
| | | //ä½åºåæ® |
| | | function set_CancelltionBill() { |
| | | |
| | | } |
| | | //åä½åº |
| | | function set_AbandonCancelltion() { |
| | | |
| | | } |
| | | //åé
|
| | | function set_Distribut() { |
| | | var hmainid=''; |
| | | var checkStatus = table.checkStatus('mainTable'), |
| | | data = checkStatus.data; |
| | | if (checkStatus.data.length == 0) { |
| | | //var InterID = data[0].hmainid.toString(); |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | for (var i = 0; i < data.length; i++) { |
| | | hmainid += data[i]["hmainid"] + ','; |
| | | if (data[i]["ä¸å¡ç¶æ"] == "å·²åå¸") { |
| | | return layer.msg('åæ®å·ï¼' + data[i]["åæ®å·"]+'å·²åå¸'); |
| | | } |
| | | } |
| | | hmainid = hmainid.substring(0, hmainid.length-1) |
| | | var HSupplierId=''; |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //å ä¸è¾¹æ¡ |
| | | title: 'éè´åå表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../../PublicPage/UserInformation.html', 'yes'], |
| | | btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) { |
| | | |
| | | //æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | HSupplierId = checkStatus.data[0].HItemID.toString(); |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Cg_POOrderBill/distribut', |
| | | async: false, |
| | | type: "GET", |
| | | dataType: "json", |
| | | data: { "Hmainid": hmainid, "HSupplierId": HSupplierId }, |
| | | success: function (data1) { |
| | | if (data1.Message.indexOf("æå") > 0) { |
| | | layer.msg("å叿å", { time: 3 * 1000, icon: 1 }, function () { |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | } else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | //åå¸ |
| | | function set_Release() { |
| | | var hmainid = ''; |
| | | var checkStatus = table.checkStatus('mainTable'), |
| | | data = checkStatus.data; |
| | | if (checkStatus.data.length == 0) { |
| | | //var InterID = data[0].hmainid.toString(); |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | for (var i = 0; i < data.length; i++) { |
| | | hmainid += data[i]["hmainid"] + ','; |
| | | if (data[i]["ä¸å¡ç¶æ"] == "æªåé
" || data[i]["ä¸å¡ç¶æ"] == "" ) { |
| | | return layer.msg('åæ®å·ï¼' + data[i]["åæ®å·"] + 'æªåé
'); |
| | | } |
| | | } |
| | | hmainid = hmainid.substring(0, hmainid.length - 1) |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Cg_POOrderBill/release', |
| | | async: false, |
| | | type: "GET", |
| | | dataType: "json", |
| | | data: { "Hmainid": hmainid}, |
| | | success: function (data1) { |
| | | if (data1.Message.indexOf("æå") > 0) { |
| | | layer.msg("å叿å", { time: 1 * 1000, icon: 1 }, function () { |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | } else { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function (e) { |
| | | layer.alert(data1.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery(table, option) { |
| | | var HStatus = $("select[name='HStatus']").val();//ç¶æ |
| | | var HBeginDate = $("#HBeginDate").val();//å¼å§æ¥æ |
| | | var HEndDate = $("#HEndDate").val();//ç»ææ¥æ |
| | | var HBillNo = $("#HBillNo").val(); //åæ®å· |
| | | var HSupID = $("#HSupID").val(); //ä¾åºåä¿¡æ¯ |
| | | if (HStatus) { |
| | | switch (HStatus) { |
| | | case '-1': //å
¨é¨ |
| | | sWhere += ""; |
| | | break; |
| | | case '1': //æªåé
|
| | | sWhere += " and ä¸å¡ç¶æ='æªåé
'"; |
| | | break; |
| | | case '2': //å·²å®¡æ ¸ |
| | | sWhere += " and ä¸å¡ç¶æ='å·²åé
'"; |
| | | break; |
| | | case '3': //å·²å
³é |
| | | sWhere += " and ä¸å¡ç¶æ='å·²åå¸'"; |
| | | default: |
| | | |
| | | } |
| | | } |
| | | if (HBeginDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) >= '" + HBeginDate + "'"; |
| | | } |
| | | if (HEndDate) { |
| | | sWhere += " and CONVERT(varchar(100),æ¥æ, 23) <= '" + HEndDate + "'"; |
| | | } |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | if (HSupID) { |
| | | sWhere += " and HSupID = '" + HSupID + "'"; |
| | | } |
| | | var index = layer.load(0); |
| | | get_Display(sWhere); |
| | | //è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | sWhere = ""; |
| | | } |
| | | //éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $('#HStatus').find("option[value='-1']").attr("selected", true); |
| | | $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HBillNo").val(""); |
| | | $("#HSupName").val(""); |
| | | $("#HSupID").val(""); |
| | | sWhere = ""; |
| | | get_Display(sWhere); |
| | | } |
| | | //#endregion |
| | | //å·æ° |
| | | function set_Refresh() { |
| | | $("#btnSearch").click(); |
| | | } |
| | | |
| | | //以䏿¯layui模å |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |
| | | </html> |