| | |
| | | </a>`; |
| | | } |
| | | } |
| | | if(d.Status == '0' && d.Origin == 'WMS'){ |
| | | if(d.Status == '0'){ |
| | | html += `<a class="layui-btn layui-btn-normal layui-btn-xs uptClass" lay-event="edit"> |
| | | <i class="layui-icon layui-icon-edit"></i>编辑 |
| | | </a> |
| | |
| | | {{# function GetBtn2(d){ |
| | | var html = ''; |
| | | |
| | | if((d.Status == "0" ||d.Status == "1") && d.Qty > d.AllotQty && d.IsWave == "0"){ |
| | | if(d.AllotQty<d.Qty){ |
| | | html += `<a class="layui-btn layui-btn-normal layui-btn-xs shoufenClass" lay-event="wan"> |
| | | <i class="layui-icon layui-icon-ok"></i>手动分配 |
| | | </a>`; |
| | | } |
| | | if(d.Status == "0" && d.Origin == "WMS" && d.IsWave == "0"){ |
| | | |
| | | if(d.Status == "0" && d.Origin == "WMS"){ |
| | | html +=`<a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del"> |
| | | <i class="layui-icon layui-icon-delete"></i>删除 |
| | | </a>`; |
| | |
| | | } |
| | | }); |
| | | var isNeedUnpack = '0'//是否需要拆箱,0:否 1:是 |
| | | var xmlFileName=""; |
| | | //监听数据操作 |
| | | table.on('tool(LAY-app-content-list)', function (obj) { |
| | | var data = obj.data; |
| | |
| | | }; |
| | | sendData(IP + "/BllSo/AddExXmlStr", param, 'post', function (res) { |
| | | console.log(res); |
| | | if(data.Type=="0"){ |
| | | xmlFileName="SalesWareHouseOut_"+data.OrderCode+"_linklink"; |
| | | }else if(data.Type=="2"){ |
| | | xmlFileName="CheckWareHouseOut_"+data.OrderCode+"_linklink"; |
| | | }else{ |
| | | xmlFileName=data.OrderCode+"_linklink"; |
| | | } |
| | | |
| | | if (res.code == 0) { //成功 |
| | | createFile(res.data); |
| | | layer.msg("操作成功!", { |
| | |
| | | } else if (obj.event === 'check') {//复核 |
| | | // 代码区域 |
| | | layer.confirm('确定复核此单据吗?', function (index) { |
| | | var param = { |
| | | Id: data.Id, |
| | | }; |
| | | sendData(IP + "/UpApi/FinishExportNotice", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | refreshTable(); |
| | | doing = true |
| | | }); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { doing = true }); |
| | | } |
| | | }); |
| | | if (isChongFu == true) { |
| | | isChongFu = false; |
| | | var param = { |
| | | Id: data.Id, |
| | | }; |
| | | sendData(IP + "/UpApi/FinishExportNotice", param, 'post', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | refreshTable(); |
| | | isChongFu = true; |
| | | }); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { isChongFu = true; }); |
| | | } |
| | | }); |
| | | } else { |
| | | layer.msg("请勿重复点击", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | |
| | | function createFile(val) { |
| | | var content = val; // 文件内容 |
| | | var blob = new Blob([content], { type: "text/plain;charset=utf-8" }); |
| | | var fileName = "ExInfo.xml"; // 文件名 |
| | | var fileName = xmlFileName+".xml"; // 文件名 |
| | | saveAs(blob, fileName); |
| | | } |
| | | //下载文件函数 |