| | |
| | | <div class="layui-input-inline"> |
| | | <select name="Type" id="Type" lay-filter="Type" lay-search> |
| | | <option value=""></option> |
| | | <!--JC26--> |
| | | <!--JC34 生产领料、其他领料、销售、不合格报废、抽检、其他--> |
| | | <option value="0">成品出库</option> |
| | | <option value="1">领料出库</option> |
| | | <option value="2">抽检出库</option> |
| | | <option value="4">不合格品出库</option> |
| | | <option value="5">中间品出库</option> |
| | | <!-- <option value="7">其他出库</option> --> |
| | | <option value="9">采购退货出库</option> |
| | | <option value="7">其他出库</option> |
| | | <option value="9">生产领料出库</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <!-- 确认出库口弹窗 --> |
| | | <div class="layui-inline" id="divPickingArea" style="display: none; padding-top: 10px;"> |
| | | <div class="layui-inline"> |
| | | <!-- <div class="layui-inline"> |
| | | <label class="layui-form-label">拆垛方式</label> |
| | | <div class="layui-input-inline" style="width: 220px;"> |
| | | <select name="UnstackWay" id="UnstackWay" lay-filter="UnstackWay" lay-search> |
| | |
| | | <option value="1">PDA拆垛</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <!-- <div class="layui-inline DivLoadingArea" style="margin-top: 10px;"> |
| | | <label class="layui-form-label">装车口</label> |
| | | <div class="layui-input-inline" style="width: 220px;"> |
| | |
| | | <div class="layui-input-inline" style="width: 220px;"> |
| | | <select name="PickingArea" id="PickingArea" lay-search> |
| | | <option value=""></option> |
| | | <option value="1">1</option> |
| | | <option value="2">2</option> |
| | | <option value="3">3</option> |
| | | <option value="4">4</option> |
| | | <option value="17">17工位</option> |
| | | <option value="18">18工位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | case "8": |
| | | return "寄存出库"; |
| | | case "9": |
| | | return "采购退货出库"; |
| | | return "生产领料出库"; |
| | | default: |
| | | return ""; |
| | | } |
| | |
| | | </script> |
| | | <!-- #endregion --> |
| | | </div> |
| | | |
| | | <!-- 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>`; |
| | | } --> |
| | | <script type="text/html" id="table-content-list"> |
| | | {{# function GetBtn1(d){ |
| | | var html = ''; |
| | |
| | | <i class="layui-icon layui-icon-delete"></i>取消分配 |
| | | </a>`; |
| | | } |
| | | 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>`; |
| | | } |
| | | |
| | | if( d.Status == '2' || d.Status == '3'){ |
| | | html += `<a class="layui-btn layui-btn-normal layui-btn-xs outClass" lay-event="outKu"> |
| | | <i class="layui-icon layui-icon-ok"></i>出库 |
| | |
| | | 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' }, |
| | | { field: 'Status', title: '执行状态', align: 'center', templet: '#templetStatus' }, |
| | | { field: 'LogisticsName', title: '承运商', align: 'center' }, |
| | | { field: 'CustomerName', title: '客户名称', align: 'center' }, |
| | | { field: 'Type', title: '单据类型', align: 'center', templet: '#templetType' , width: 120,}, |
| | | { field: 'Status', title: '执行状态', align: 'center', templet: '#templetStatus', width: 90, }, |
| | | { field: 'LogisticsName', title: '承运商', align: 'center', width: 120, }, |
| | | { field: 'CustomerName', 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: '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: 'CheckUserName', title: '复核人', align: 'center', width: 110 }, |
| | | { field: 'CheckTime', title: '复核时间', align: 'center', width: 160, templet: '#templetCheckTime' }, |
| | | |
| | | |
| | | { field: 'LotNo', title: '批次号', align: 'center' }, |
| | | { field: 'LotNoText', title: '批次描述', align: 'center' }, |
| | | { field: 'IsDespatch', title: '是否发运', align: 'center', templet: '#templetIsDespatch' }, |
| | | { field: 'SupplierLot', title: '供货批次', align: 'center' }, |
| | | { field: 'Origin', title: '来源', align: 'center' }, |
| | | { field: 'Demo', title: '备注', align: 'center', width: 180 }, |
| | | { field: 'CreateUserName', title: '创建人', align: 'center' }, |
| | | { field: 'CreateTime', title: '创建时间', align: 'center', templet: '#templetCreateTime' }, |
| | | { field: 'UpdateUserName', title: '修改人', align: 'center' }, |
| | | { field: 'UpdateTime', title: '修改时间', align: 'center', templet: '#templetUpdateTime' }, |
| | | { field: 'CheckUserName', title: '复核人', align: 'center', width: 110 }, |
| | | { field: 'CheckTime', title: '复核时间', align: 'center', templet: '#templetCheckTime' }, |
| | | { field: 'caozuo', title: '操作', fixed: 'right', align: 'center', width: 200, toolbar: '#table-content-list', "disabled": false } |
| | | |
| | | { field: 'caozuo', title: '操作', fixed: 'right', align: 'center', width: 360, toolbar: '#table-content-list', "disabled": false } |
| | | ]]; |
| | | var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | |
| | | area: ['1200px', '90%'], |
| | | }); |
| | | } else if (obj.event === 'outKu') { |
| | | $("#UnstackWay").val(0) |
| | | $("#UnstackWay").attr("disabled", false); |
| | | //$("#LoadingArea").val('') |
| | | $("#PickingArea").val('') |
| | | $('.DivLoadingArea').show() |
| | | form.render('select'); |
| | | var param = { |
| | | soNo: SoNo |
| | | }; |
| | | if (orderType == "0") { |
| | | // 判断是否需要拆箱,需要拆箱就需要选择出库口 |
| | | sendData(IP + "/BllSo/IsNeedUnpack", param, 'get', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | if (res.data == "1") { |
| | | isNeedUnpack = '1' |
| | | $('.DivPickingArea2').show() |
| | | } else { |
| | | isNeedUnpack = '0' |
| | | $('.DivPickingArea2').hide() |
| | | } |
| | | if ($('#UnstackWay').val() == '1') { |
| | | $('.DivPickingArea2').show() |
| | | } |
| | | |
| | | outFunction(data.SONo) |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | return; |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | $("#UnstackWay").val(1) |
| | | $("#UnstackWay").attr("disabled", true); |
| | | form.render('select'); |
| | | |
| | | $('.DivLoadingArea').hide() |
| | | |
| | | outFunction(data.SONo) |
| | | } |
| | | |
| | | |
| | | //if(data.WareHouseName =="成品库"){ |
| | | outFunction(data.SONo); |
| | | // }else{ |
| | | // outFunction2(data.SONo) |
| | | // } |
| | | |
| | | } else if (obj.event === 'beiLiaoOutKu') { |
| | | if (orderType != "1") { |
| | |
| | | |
| | | //选择出库口弹窗方法 |
| | | function outFunction(soNo) { |
| | | |
| | | layer.open({ |
| | | type: 1, |
| | | title: '确认出库口', |
| | |
| | | area: ['350px', '285px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function (index, layero) { |
| | | var pa = $('#PickingArea').val(); |
| | | console.log(pa) |
| | | |
| | | if (isChongFu == true) { |
| | | isChongFu = false; |
| | | if (pa == null) { |
| | | layer.msg("请勿重复点击", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | return; |
| | | } |
| | | // if ($('#UnstackWay').val() == '0') { |
| | | // if ($('#LoadingArea').val() == '') { |
| | | // layer.msg("请选择装车口", { |
| | | // icon: 2, |
| | | // time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | // }); |
| | | // isChongFu = true; |
| | | // return; |
| | | // } |
| | | // } |
| | | console.log($("#PickingArea").val()) |
| | | if ($("#PickingArea").val() == '') { |
| | | |
| | | if ($("#PickingArea").val() == '' || $('#PickingArea').val() == null) { |
| | | layer.msg("请选择出库口", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | |
| | | } |
| | | var param = { |
| | | soNo: soNo, |
| | | unstackingMode: $('#UnstackWay').val(), |
| | | outMode: pa, |
| | | //unstackingMode: $('#UnstackWay').val(), |
| | | outMode: $("#PickingArea").val(), |
| | | //loadingAddre: $('#LoadingArea').val() |
| | | }; |
| | | console.log(param); |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //不选择出库口的弹窗方法 |
| | | function outFunction2(soNo) { |
| | | layer.confirm('确定当前单据出库吗?', function (index) { |
| | | |
| | | if (isChongFu == true) { |
| | | isChongFu = false; |
| | | |
| | | var param = { |
| | | soNo: soNo, |
| | | }; |
| | | console.log(param); |
| | | sendData(IP + "/DownApi/IssueOutHouse", param, 'get', function (res) { |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 3000 //1秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | refreshTable(); |
| | | isChongFu = true; |
| | | }); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 3000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | refreshTable(); |
| | | isChongFu = true; |
| | | }); |
| | | } |
| | | layer.close(index); |
| | | }); |
| | | } else { |
| | | layer.msg("请勿重复点击", { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //选择出库口弹窗方法 |
| | | function beiLiaoOutFunction(soNo) { |