| | |
| | | <option value="2">抽检出库</option> |
| | | <option value="4">不合格品出库</option> |
| | | <option value="7">其他出库</option> |
| | | <option value="9">生产领料出库</option> |
| | | <option value="9">生产领料出库</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | </script> |
| | | <!-- #endregion --> |
| | | </div> |
| | | <!-- if(d.Type == "1" && (d.Status == '2' || d.Status == '3')){ |
| | | <!-- if(d.Type == "1" && (d.Status == '2' || d.Status == '3')){ |
| | | html += `<a class="layui-btn layui-btn-normal layui-btn-xs outClass" lay-event="beiLiaoOutKu"> |
| | | <i class="layui-icon layui-icon-ok"></i>备料 |
| | | </a>`; |
| | |
| | | </a>`; |
| | | } |
| | | } |
| | | if( d.Status == '4'){ |
| | | if( d.Status == '3' || d.Status == '4'){ |
| | | html += `<a class="layui-btn layui-btn-normal layui-btn-xs guanClass" lay-event="finish"> |
| | | <i class="layui-icon layui-icon-ok"></i>关单 |
| | | </a>`; |
| | |
| | | var TotalColsArr = [[ |
| | | { field: '', title: '序号', type: 'numbers', width: 50, align: 'center', fixed: 'left', "disabled": true }, |
| | | { field: 'SONo', title: '出库单号', align: 'center', fixed: 'left', width: 165, "disabled": true }, |
| | | { field: 'Type', title: '单据类型', align: 'center', templet: '#templetType' , width: 120,}, |
| | | { field: 'Type', title: '单据类型', align: 'center', templet: '#templetType', width: 120, }, |
| | | { field: 'Status', title: '执行状态', align: 'center', templet: '#templetStatus', width: 90, }, |
| | | { field: 'OrderCode', title: '下发单号', align: 'center', width: 180 }, |
| | | { field: 'LogisticsName', title: '承运商', align: 'center', width: 120, }, |
| | |
| | | { field: 'WareHouseName', title: '仓库', align: 'center', width: 90, }, |
| | | { field: 'Origin', title: '来源', align: 'center', width: 90, }, |
| | | { field: 'Demo', title: '备注', align: 'center', width: 180 }, |
| | | { field: 'CreateUserName', title: '创建人', align: 'center' , width: 110}, |
| | | { field: 'CreateUserName', title: '创建人', align: 'center', width: 110 }, |
| | | { field: 'CreateTime', title: '创建时间', align: 'center', width: 160, templet: '#templetCreateTime' }, |
| | | { field: 'UpdateUserName', title: '修改人', align: 'center', width: 110 }, |
| | | { field: 'UpdateTime', title: '修改时间', align: 'center', width: 160, templet: '#templetUpdateTime' }, |
| | |
| | | { field: 'LotNoText', title: '批次描述', align: 'center' }, |
| | | { field: 'IsDespatch', title: '是否发运', align: 'center', templet: '#templetIsDespatch' }, |
| | | { field: 'SupplierLot', title: '供货批次', align: 'center' }, |
| | | |
| | | |
| | | { field: 'caozuo', title: '操作', fixed: 'right', align: 'center', width: 360, toolbar: '#table-content-list', "disabled": false } |
| | | ]]; |
| | | var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | |
| | | } |
| | | }); |
| | | var isNeedUnpack = '0'//是否需要拆箱,0:否 1:是 |
| | | var xmlFileName=""; |
| | | var xmlFileName = ""; |
| | | //监听数据操作 |
| | | table.on('tool(LAY-app-content-list)', function (obj) { |
| | | var data = obj.data; |
| | |
| | | isChongFu = true; |
| | | }); |
| | | } else { //不成功 |
| | | if(res.code==2){ |
| | | if (res.code == 2) { |
| | | layer.confirm('当前单据批次出库是跨批出库,是否跨批出库?', function () { |
| | | var param1 = { |
| | | soNo: SoNo, |
| | |
| | | } |
| | | }) |
| | | }) |
| | | }else{ |
| | | } else { |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | } |
| | | } |
| | | isChongFu = true; |
| | | } |
| | | }); |
| | |
| | | area: ['1200px', '90%'], |
| | | }); |
| | | } else if (obj.event === 'outKu') { |
| | | |
| | | |
| | | //if(data.WareHouseName =="成品库"){ |
| | | outFunction(data.SONo); |
| | | outFunction(data.SONo); |
| | | // }else{ |
| | | // outFunction2(data.SONo) |
| | | // } |
| | |
| | | }; |
| | | 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 (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("操作成功!", { |
| | |
| | | area: ['350px', '285px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function (index, layero) { |
| | | |
| | | |
| | | if (isChongFu == true) { |
| | | isChongFu = false; |
| | | |
| | | |
| | | if ($("#PickingArea").val() == '' || $('#PickingArea').val() == null) { |
| | | layer.msg("请选择出库口", { |
| | | icon: 2, |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | //不选择出库口的弹窗方法 |
| | | function outFunction2(soNo) { |
| | | layer.confirm('确定当前单据出库吗?', function (index) { |
| | | |
| | | |
| | | if (isChongFu == true) { |
| | | isChongFu = false; |
| | | |
| | | |
| | | var param = { |
| | | soNo: soNo, |
| | | }; |
| | |
| | | function createFile(val) { |
| | | var content = val; // 文件内容 |
| | | var blob = new Blob([content], { type: "text/plain;charset=utf-8" }); |
| | | var fileName = xmlFileName+".xml"; // 文件名 |
| | | var fileName = xmlFileName + ".xml"; // 文件名 |
| | | saveAs(blob, fileName); |
| | | } |
| | | //下载文件函数 |