| | |
| | | <div style="padding:20px;margin:0px 700px"> |
| | | <h1>çç¹åæè¡¨</h1> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">çç¹æ¹æ¡</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HSourceInterID" id="HSourceInterID"> |
| | | <input type="text" class="layui-input" id="HItemID"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HSourceInterList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch" style="margin-left:10px"> |
| | | æ¥è¯¢ |
| | | </button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch"> |
| | | éç½® |
| | | </button> |
| | | |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch1" id="btnSearch1"> |
| | | æ¥è¯¢ |
| | | </button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch1" id="btnReSearch1"> |
| | | éç½® |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-tab layui-tab-card" style="margin-top:10px"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">æ£å¸¸</li> |
| | | <li>è°æ¨</li> |
| | | <li>åºåº</li> |
| | | <li>å
¥åº</li> |
| | | <li>çç</li> |
| | | <li>çäº</li> |
| | | <li>éåº</li> |
| | | <li class="layui-this" id="zc">æ£å¸¸</li> |
| | | <li id="db">è°æ¨</li> |
| | | <li id="ck">åºåº</li> |
| | | <li id="rk">å
¥åº</li> |
| | | <li id="py">çç</li> |
| | | <li id="pk">çäº</li> |
| | | <li id="tk">éåº</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | |
| | | , table6 = layui.table |
| | | , table7 = layui.table |
| | | , form = layui.form |
| | | , ul = layui.ul |
| | | , element = layui.element |
| | | , laypage = layui.laypage |
| | | , laydate = layui.laydate |
| | | , util = layui.util |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | var sWhere = ""; |
| | | var sWhere = "k.HCorrespondentTypeID!=3 and m.HNowSupTypeID!=3 and k.HCorrespondentTypeID=m.HNowSupTypeID and k.HCorrespondentID=m.HNowSupID"; |
| | | var option1 = []; |
| | | var option2 = []; |
| | | var option3 = []; |
| | |
| | | var option6 = []; |
| | | var option7 = []; |
| | | var col = [ |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe" } |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { field: 'æ¡ç ', title: 'å¨å
·æ¡ç ', width: 200 } |
| | | , { field: 'å¨å
·ç¼å·', title: 'å¨å
·ç¼å·', width: 200 } |
| | | , { field: 'çç¹æ¹æ¡', title: 'çç¹æ¹æ¡', width: 200 } |
| | |
| | | }); |
| | | //#endregion |
| | | |
| | | // æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(); |
| | | //æ¥è¯¢æé® |
| | | form.on('submit(btnSearch1)', function (data) { |
| | | var HItemID = $("#HItemID").val();//çç¹ |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Gy_StockCheckItemBill/Get_InventoryAnalysisList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "sID": HItemID }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option1.data = data1.list[0]; |
| | | table1.render(option1); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | form.on('submit(btnReSearch1)', function (data) { |
| | | $("#HItemID").val(""); |
| | | var HItemID = $("#HItemID").val();//çç¹ |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Gy_StockCheckItemBill/Get_InventoryAnalysisList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "sID": HItemID }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option1.data = data1.list[0]; |
| | | table1.render(option1); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //çç¹æ¹æ¡å¼¹çª |
| | | form.on('submit(HSourceInterList)', function () { |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', |
| | | title: 'çç¹æ¹æ¡å表', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../åºç¡èµæ/Gy_StockCheckItemList.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('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HItemID").val(checkStatus.data[0].hitemid); |
| | | layer.close(layer.index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //æé®ãæé®äºãçåè° |
| | | //return false å¼å¯è¯¥ä»£ç å¯ç¦æ¢ç¹å»è¯¥æé®å
³é |
| | | }, |
| | | end: function () { |
| | | |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //#region 页ç¾å è½½ |
| | | |
| | | //æ£å¸¸é¡µç¾ |
| | | $("#zc").click(function () { |
| | | zc_Display(); |
| | | }); |
| | | |
| | | //è°æ¨é¡µç¾ |
| | | $("#db").click(function () { |
| | | db_Display(); |
| | | }); |
| | | |
| | | //åºåºé¡µç¾ |
| | | $("#ck").click(function () { |
| | | ck_Display(); |
| | | }); |
| | | |
| | | //å
¥åºé¡µç¾ |
| | | $("#rk").click(function () { |
| | | rk_Display(); |
| | | }); |
| | | |
| | | //ççé¡µç¾ |
| | | $("#py").click(function () { |
| | | py_Display(); |
| | | }); |
| | | |
| | | //çäºé¡µç¾ |
| | | $("#pk").click(function () { |
| | | pk_Display(); |
| | | }); |
| | | |
| | | //éåºé¡µç¾ |
| | | $("#tk").click(function () { |
| | | tk_Display(); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | | //#region å½å页é¢å è½½æææ¹æ³ |
| | | // åå§åçé¢ |
| | | // #region åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åè¡¨æ ¼(æ£å¸¸) |
| | | set_InitGrid1(); |
| | |
| | | //åå§åè¡¨æ ¼(éåº) |
| | | set_InitGrid7(); |
| | | //æ¥è¯¢ |
| | | //get_Display(sWhere); |
| | | zc_Display(); |
| | | |
| | | } |
| | | |
| | |
| | | table7.render(option7); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | //#endregion |
| | | |
| | | //æ¥è¯¢ |
| | | function get_Display(sWhere) { |
| | | // #region æ¥è¯¢ |
| | | //åå§æ¥è¯¢ æ£å¸¸ |
| | | function zc_Display() { |
| | | var HItemID = $("#HItemID").val();//çç¹ |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Gy_StockCheckItemBill/Get_InventoryAnalysisList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | data: { "sWhere": sWhere, "sID": HItemID }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option1.data = data1.list[0]; |
| | | table1.render(option1); |
| | | option2.data = data1.list[1]; |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //è°æ¨æ¥è¯¢ |
| | | function db_Display() { |
| | | sWhere = "k.HCorrespondentTypeID!=3 and m.HNowSupTypeID!=3 and k.HCorrespondentTypeID=m.HNowSupTypeID and k.HCorrespondentTypeID=4 and k.HCorrespondentID!=m.HNowSupID"; |
| | | var HItemID = $("#HItemID").val();//çç¹ |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Gy_StockCheckItemBill/Get_InventoryAnalysisList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "sID": HItemID }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option2.data = data1.list[0]; |
| | | table2.render(option2); |
| | | option3.data = data1.list[2]; |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //åºåºæ¥è¯¢ |
| | | function ck_Display() { |
| | | sWhere = "k.HCorrespondentTypeID!=3 and m.HNowSupTypeID!=3 and m.HNowSupTypeID=4 and isnull(m.HNowSupID,'')!='' and (k.HCorrespondentTypeID=1 or k.HCorrespondentTypeID=2) and isnull(k.HCorrespondentID,'')!=''"; |
| | | var HItemID = $("#HItemID").val();//åæ®ç±»å |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Gy_StockCheckItemBill/Get_InventoryAnalysisList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "sID": HItemID }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option3.data = data1.list[0]; |
| | | table3.render(option3); |
| | | option4.data = data1.list[3]; |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //å
¥åºæ¥è¯¢ |
| | | function rk_Display() { |
| | | sWhere = "k.HCorrespondentTypeID!=3 and m.HNowSupTypeID!=3 and (k.HCorrespondentTypeID=1 or k.HCorrespondentTypeID=2) and (m.HNowSupTypeID=1 or m.HNowSupTypeID=2) and k.HCorrespondentID!=m.HNowSupID"; |
| | | var HItemID = $("#HItemID").val();//åæ®ç±»å |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Gy_StockCheckItemBill/Get_InventoryAnalysisList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "sID": HItemID }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option4.data = data1.list[0]; |
| | | table4.render(option4); |
| | | option5.data = data1.list[4]; |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //ççæ¥è¯¢ |
| | | function py_Display() { |
| | | sWhere = "isnull(m.HNowSupID,'')='' and isnull(k.HCorrespondentID,'')!='' and k.HCorrespondentTypeID!=3 and m.HNowSupTypeID!=3"; |
| | | var HItemID = $("#HItemID").val();//åæ®ç±»å |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Gy_StockCheckItemBill/Get_InventoryAnalysisList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "sID": HItemID }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option5.data = data1.list[0]; |
| | | table5.render(option5); |
| | | option6.data = data1.list[5]; |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //çäºæ¥è¯¢ |
| | | function pk_Display() { |
| | | sWhere = "isnull(m.HNowSupID,'')!='' and isnull(k.HCorrespondentID,'')='' and k.HCorrespondentTypeID!=3 and m.HNowSupTypeID!=3"; |
| | | var HItemID = $("#HItemID").val();//åæ®ç±»å |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Gy_StockCheckItemBill/Get_InventoryAnalysisList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "sID": HItemID }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option6.data = data1.list[0]; |
| | | table6.render(option6); |
| | | option7.data = data1.list[6]; |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£å¤±æ!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //éåºæ¥è¯¢ |
| | | function tk_Display() { |
| | | sWhere = "k.HCorrespondentTypeID!=3 and m.HNowSupTypeID!=3 and k.HCorrespondentTypeID=4 and isnull(k.HCorrespondentID,'')!='' and (m.HNowSupTypeID=1 or m.HNowSupTypeID=2)"; |
| | | var HItemID = $("#HItemID").val();//åæ®ç±»å |
| | | //è¿å
¥é¡µé¢æ¾ç¤ºçç¼åå表 |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'Gy_StockCheckItemBill/Get_InventoryAnalysisList', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "sID": HItemID }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option7.data = data1.list[0]; |
| | | table7.render(option7); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //å¿«éè¿æ»¤ |
| | | function get_FastQuery() { |
| | | var HSourceInterID = $("#HSourceInterID").val();//åæ®ç±»å |
| | | if (HSourceInterID) { |
| | | sWhere += " and HSourceInterID like '%" + HSourceInterID + "%'"; |
| | | } |
| | | get_Display(sWhere); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | } |
| | | |
| | | //éç½®è¿æ»¤æ¡ä»¶æ¹æ³ |
| | | function set_ClearQuery() { |
| | | $("#HSourceInterID").val("");//åæ®ç±»å |
| | | $("#btnSearch").click(); |
| | | sWhere = ""; |
| | | } |
| | | |
| | | //#region å®¡æ ¸ |
| | | //å®¡æ ¸ è°æ¨ |