| | |
| | | <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-report" id="btn_report"><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> |
| | |
| | | , { field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true } |
| | | , { field: 'hsubid', title: 'hsubid', sort: true, fixed: true, hide: true } |
| | | , { field: '状态', title: '状态', sort: true, fixed: true } |
| | | , { field: '反馈状态', title: '反馈状态', width: 100, fixed: true } |
| | | , { field: '单据号', title: '单据号', width: 180, sort: true, fixed: 'left' } |
| | | , { field: '日期', title: '日期', width: 180, sort: true, fixed: 'left' } |
| | | , { field: '供应商', title: '供应商', width: 180, sort: true, fixed: 'left' } |
| | |
| | | parent.layui.admin.events.closeThisTabs(); |
| | | //parent.layer.close(index); |
| | | break; |
| | | case 'btn-report': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | _cur_page = $(".layui-laypage-em").next().html(); |
| | | var arr = new Array(); |
| | | var checkStatus = table.checkStatus('mainTable'), |
| | | data = checkStatus.data; |
| | | if (checkStatus.data.length == 0) { |
| | | return layer.msg('请选择数据'); |
| | | } |
| | | for (var i = 0; i < data.length; i++) { |
| | | arr.push(data[i].hmainid + '-' + data[i].hsubid); |
| | | } |
| | | var OrderBackId = ""; |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //加上边框 |
| | | title: '订单反馈状态', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['80%', '80%'], |
| | | maxmin: true, |
| | | content: ['../PublicPage/OrderBackInfomation.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('请选择数据'); |
| | | } |
| | | OrderBackId = checkStatus.data[0].HItemID.toString(); |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + 'POOrderBack', |
| | | //url: 'http://localhost:8082/LuBaoAPI/' + 'POOrderBack', |
| | | async: false, |
| | | type: "GET", |
| | | dataType: "json", |
| | | data: { "HmainidList": arr.toString(), "OrderBackId": OrderBackId }, |
| | | 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 }); |
| | | } |
| | | }); |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //按钮【按钮二】的回调 |
| | | //return false 开启该代码可禁止点击该按钮关闭 |
| | | }, |
| | | end: function () { |
| | | }, |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | |
| | | //layer.confirm('是否确认单据?', { icon: 3, title: '提示' }, function (index) { |
| | | // $.ajax({ |
| | | // type: "get", |
| | | // url: GetWEBURL() + "POOrderAccept", |
| | | // data: { "HInterID": data[0]["hmainid"].toString(), "HBillNo": data[0]["单据号"].toString(), "HUser": sessionStorage["HUserName"] }, |
| | | // success: function (result) { |
| | | // if (result.count == 1) { // 说明验证成功了, |
| | | // layer.msg(result.Message, { icon: 1 }); |
| | | // RoadHBillNo(sql); |
| | | // } |
| | | // else { |
| | | // // $("#verifycode").click(); |
| | | // layer.msg(result.Message, { icon: 5 }); |
| | | // } |
| | | // layer.closeAll("loading"); |
| | | // } |
| | | // }) |
| | | |
| | | // layer.close(index); |
| | | //}); |
| | | |
| | | break; |
| | | }; |
| | | }); |
| | | |
| | |
| | | sqlWhere += " and 日期 <= ^^" + $("#HDate2").val() + "^^"; |
| | | } |
| | | if ($("#HISGenerate").val() != "") { |
| | | if ($("#HISGenerate").val() == "是") |
| | | { |
| | | if ($("#HISGenerate").val() == "是") { |
| | | sqlWhere += " and 未关联数量 <= 0"; |
| | | } |
| | | else if ($("#HISGenerate").val() == "否") { |