Merge branch 'master' into Liudl
| | |
| | | <div class="layui-input-inline"> |
| | | <select name="Type" id="Type" lay-filter="Type" lay-search> |
| | | <option value=""></option> |
| | | <!-- 23 --> |
| | | <!--JC26--> |
| | | <option value="0">成品出库</option> |
| | | <option value="1">领料出库</option> |
| | | <option value="2">抽检出库</option> |
| | | <option value="4">不合格品出库</option> |
| | | <option value="6">代储出库</option> |
| | | <option value="7">其他出库</option> |
| | | <!-- 24 --> |
| | | <!-- <option value="0">成品出库</option> |
| | | <option value="1">领料出库</option> |
| | | <option value="2">抽检出库</option> |
| | | <option value="3">物料取样出库</option> |
| | | <option value="4">不合格品出库</option> |
| | | <option value="5">中间品出库</option> |
| | | <option value="6">代储出库</option> |
| | | <option value="7">其他出库</option> |
| | | <option value="8">寄存出库</option> --> |
| | | <!-- 09 --> |
| | | <!-- <option value="0">标准销售出库</option> |
| | | <option value="1">非标销售出库</option> |
| | | <option value="2">标准调拨出库</option> |
| | | <option value="3">非标调拨出库</option> --> |
| | | <!-- 08 --> |
| | | <!-- <option value="0">成品出库</option> |
| | | <option value="1">原辅料出库</option> |
| | | <option value="2">不合格品出库</option> |
| | | <option value="3">取样出库</option> --> |
| | | <!-- <option value="7">其他出库</option> --> |
| | | <option value="9">采购退货出库</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | return "其他出库"; |
| | | case "8": |
| | | return "寄存出库"; |
| | | case "9": |
| | | return "采购退货出库"; |
| | | default: |
| | | return ""; |
| | | } |
| | |
| | | <div class="layui-input-inline"> |
| | | <select name="Type" id="Type" lay-filter="Type" lay-verify="required" lay-search> |
| | | <!-- <option value=""></option> --> |
| | | <!-- 23 --> |
| | | <!--JC26--> |
| | | <option value="0">成品出库</option> |
| | | <option value="1">领料出库</option> |
| | | <option value="2">抽检出库</option> |
| | | <option value="4">不合格品出库</option> |
| | | <option value="6">代储出库</option> |
| | | <option value="7">其他出库</option> |
| | | <!-- 24 --> |
| | | <!-- <option value="0">成品出库</option> |
| | | <option value="1">领料出库</option> |
| | | <option value="2">抽检出库</option> |
| | | <option value="3">物料取样出库</option> |
| | | <option value="4">不合格品出库</option> |
| | | <option value="5">中间品出库</option> |
| | | <option value="6">代储出库</option> |
| | | <option value="7">其他出库</option> |
| | | <option value="8">寄存出库</option> --> |
| | | <!-- 09 --> |
| | | <!-- <option value="0">标准销售出库</option> |
| | | <option value="1">非标销售出库</option> |
| | | <option value="2">标准调拨出库</option> |
| | | <option value="3">非标调拨出库</option> --> |
| | | <!-- 08 --> |
| | | <!-- <option value="0">成品出库</option> |
| | | <option value="1">原辅料出库</option> |
| | | <option value="2">不合格品出库</option> |
| | | <option value="3">取样出库</option> --> |
| | | <!-- <option value="7">其他出库</option> --> |
| | | <option value="9">采购退货出库</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="layui-input-inline"> |
| | | <select name="Type" id="Type" lay-filter="Type" lay-verify="required" disabled lay-search> |
| | | <option value=""></option> |
| | | <!-- 23 --> |
| | | <!--JC26--> |
| | | <option value="0">成品出库</option> |
| | | <option value="1">领料出库</option> |
| | | <option value="2">抽检出库</option> |
| | | <option value="4">不合格品出库</option> |
| | | <option value="6">代储出库</option> |
| | | <option value="7">其他出库</option> |
| | | <!-- 24 --> |
| | | <!-- <option value="0">成品出库</option> |
| | | <option value="1">领料出库</option> |
| | | <option value="2">抽检出库</option> |
| | | <option value="3">物料取样出库</option> |
| | | <option value="4">不合格品出库</option> |
| | | <option value="5">中间品出库</option> |
| | | <option value="6">代储出库</option> |
| | | <option value="7">其他出库</option> |
| | | <option value="8">寄存出库</option> --> |
| | | <!-- 09 --> |
| | | <!-- <option value="0">成品出库</option> |
| | | <option value="1">原料出库</option> |
| | | <option value="2">成品不合格出库</option> |
| | | <option value="3">原料不合格出库</option> |
| | | <option value="4">质检出库</option> --> |
| | | <!-- 08 --> |
| | | <!-- <option value="0">成品出库</option> |
| | | <option value="1">原辅料出库</option> |
| | | <option value="2">不合格品出库</option> |
| | | <option value="3">取样出库</option> --> |
| | | <!-- <option value="7">其他出库</option> --> |
| | | <option value="9">采购退货出库</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <i class="layui-icon layui-icon-edit layuiadmin-button-btn"> </i>批量编辑 |
| | | </button> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button style="margin-right: 5px;" class="layui-btn layui-btn-sm layuiadmin-btn-list addClass" data-type="addList" lay-event="add" > |
| | | <i class="layui-icon"></i>添加 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div id="center"></div> |
| | |
| | | submit.trigger('click'); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | addList: function () { |
| | | |
| | | layer.open({ |
| | | type: 2, |
| | | title: '添加储位信息', |
| | | content: 'LocateAddFrom.html', |
| | | maxmin: true, |
| | | area: ['560px', '510px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function (index1, layero) { |
| | | var iframeWindow = window['layui-layer-iframe' + index1], |
| | | submitID = 'layuiadmin-app-form-submit', |
| | | submit = layero.find('iframe').contents().find('#' + submitID); |
| | | //监听提交 |
| | | iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) { |
| | | var field = data.field; //获取提交的字段 |
| | | console.log(field); |
| | | // var msg = []; |
| | | // for (var i = 0; i < checkData.length; i++) { |
| | | // // msg.push(checkData[i].Id); |
| | | // msg.push(checkData[i].Id) |
| | | // } |
| | | // console.log(msg); |
| | | |
| | | //提交 Ajax 成功后,静态更新表格中的数据 |
| | | var param = { |
| | | // Id: msg, |
| | | Index:Number(field.IndexRow), |
| | | HouseNo:field.HouseNo, |
| | | RoadwayNo:field.RoadwayNo, |
| | | AreaNo:field.AreaNo, |
| | | Row:Number(field.Row), |
| | | Col:Number(field.Col), |
| | | Layer:Number(field.Layer), |
| | | Depth:field.Depth, |
| | | }; |
| | | console.log(param) |
| | | if (doing) { |
| | | doing = false; |
| | | sendData(IP + "/Sys/AddStorageLocat", param, 'post', function (res) { |
| | | console.log(res); |
| | | if (res.code == 200) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | tableIns.reload({ |
| | | page: { |
| | | curr: 1 |
| | | } |
| | | }); |
| | | layer.close(index1); //关闭弹层 |
| | | doing = true; |
| | | }); |
| | | } else if(res.code == 1){ |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {doing = true;}); |
| | | } else { //不成功 |
| | | layer.msg(res.statusText, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {doing = true;}); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //$.ajax({}); |
| | | }); |
| | | submit.trigger('click'); |
| | | } |
| | | }); |
| | | }, |
| | | }; |
| | | |
| | | $('.layui-btn.layuiadmin-btn-list').on('click', function () { |
| | | var type = $(this).data('type'); |
| | | active[type] ? active[type].call(this) : ''; |
| | |
| | | done: function() { |
| | | $(function() { |
| | | $(".editClass").hide(); |
| | | $(".addClass").hide(); |
| | | }); |
| | | sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) { |
| | | if (res.code == 0) { //成功 |
| | |
| | | $(".editClass").show(); |
| | | }); |
| | | } |
| | | if (res.data[k].MenuName == "添加储位") { |
| | | $(function() { |
| | | $(".addClass").show(); |
| | | }); |
| | | } |
| | | } |
| | | } else { //不成功 |
| | | layer.msg('获取权限信息失败', { |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>储位初始化</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" |
| | | content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> |
| | | </head> |
| | | <body> |
| | | <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" |
| | | style="padding: 20px 30px 0 0;"> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">当前排</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="number" id="IndexRow" name="IndexRow" placeholder="当前排···" autocomplete="off" |
| | | class="layui-input" > |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">所属仓库</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HouseNo" id="HouseNo" lay-verify="" lay-search > |
| | | <option value=""></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">所属巷道</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="RoadwayNo" id="RoadwayNo" lay-filter="getRoadwayNo" lay-search > |
| | | <option value=""></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">所属区域</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="AreaNo" id="AreaNo" lay-filter="getAreaNo" lay-search> |
| | | <option value=""></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">排总数</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="number" id="Row" name="Row" placeholder="排···" autocomplete="off" |
| | | class="layui-input" > |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">列总数</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="number" id="Col" name="Col" placeholder="列···" autocomplete="off" |
| | | class="layui-input" > |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">层总数</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="number" id="Layer" name="Layer" placeholder="层···" autocomplete="off" |
| | | class="layui-input" > |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">深度</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="number" id="Depth" name="Depth" placeholder="深度···" autocomplete="off" |
| | | class="layui-input" > |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- --> |
| | | <div class="layui-form-item layui-hide"> |
| | | <input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" id="layuiadmin-app-form-submit" |
| | | value="确认添加"> |
| | | <input type="button" lay-submit lay-filter="layuiadmin-app-form-edit" id="layuiadmin-app-form-edit" |
| | | value="确认编辑"> |
| | | </div> |
| | | </div> |
| | | <script src="../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../js/public.js"></script> |
| | | <script src="../../js/jquery-3.5.1.min.js"></script> |
| | | <script src="../../js/jquery.cookie.js"></script> |
| | | <script> |
| | | var uid = $.cookie('userId'); |
| | | if(uid==null){ |
| | | alert('请登录后操作'); |
| | | window.parent.location.href='../Login.html' |
| | | } |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'form', 'layer'], function() { |
| | | var $ = layui.$, |
| | | form = layui.form, |
| | | layer = layui.layer; |
| | | |
| | | // if(getQueryString('id') != null) |
| | | // { |
| | | // sendData(IP + "/Sys/GetStorageLocat", param, 'post', function(res) { |
| | | // if (res.code == 0) { |
| | | // // $("input[name=Id]").val(res.data.Id); |
| | | // GetHouse(res.data.HouseNo) |
| | | // GetArea(res.data.AreaNo,res.data.HouseNo) |
| | | // GetRoadway(res.data.RoadwayNo) |
| | | // GetTemp(res.data.Temperature); |
| | | // $("input[name=Row]").val(res.data.Row); |
| | | // $("input[name=Col]").val(res.data.Col); |
| | | // $("input[name=Layer]").val(res.data.Layer); |
| | | // $("input[name=Depth]").val(res.data.Depth); |
| | | |
| | | // $("input[name=LocatNo]").val(res.data.LocatNo); |
| | | // $("input[name=Height]").val(res.data.Height); |
| | | // $("input[name=Weight]").val(res.data.Weight); |
| | | // $("select[name='Status']").val(res.data.Status); |
| | | // $("select[name='Flag']").val(res.data.Flag); |
| | | // form.render(); |
| | | // } else { |
| | | // Layer.msg(res.msg, { |
| | | // icon: 2, |
| | | // time: 2000 |
| | | // }, function() {}); |
| | | // } |
| | | // }); |
| | | // }else{ |
| | | // } |
| | | // GetHouse() |
| | | // GetArea() |
| | | // GetRoadway() |
| | | // GetTemp(); |
| | | |
| | | //获取仓库 |
| | | // function GetHouse(){ |
| | | // sendData(IP + "/Sys/GetWarehouseDic", {}, 'get', function(res) { |
| | | // if (res.code == 0) { //成功 |
| | | // $("#RoadwayNo").empty(); |
| | | // for (var i = 0; i < res.data.length; i++) { |
| | | // $("#HouseNo").append('<option value =' + res.data[i].HouseNo + '>' + res.data[i].HouseNo + '-' + |
| | | // res.data[i].WareHouseName + '</option>'); |
| | | // } |
| | | // // $("select[name='HouseNo']").val(val); |
| | | // form.render('select'); |
| | | // } else { //不成功 |
| | | // Layer.msg(res.msg, { |
| | | // icon: 2, |
| | | // time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | // }, function() {}); |
| | | // } |
| | | // }); |
| | | //获取仓库下拉框信息 |
| | | sendData(IP + "/Sys/GetWarehouseDic", {}, 'get', function(res) { |
| | | console.log(2) |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#HouseNo").append('<option value =' + res.data[i].WareHouseNo + '>' + res.data[i].WareHouseNo + '-' + |
| | | res.data[i].WareHouseName + '</option>'); |
| | | } |
| | | form.render('select'); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {}); |
| | | } |
| | | }); |
| | | |
| | | |
| | | //获取 巷道下拉框 |
| | | synData(IP + "/Sys/GetStorageRoadwayByHouseNo", {}, 'get', function(res) { |
| | | $("#RoadwayNo").empty(); |
| | | $("#RoadwayNo").append('<option value =""></option>'); |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#RoadwayNo").append('<option value =' + res.data[i].RoadwayNo + '>' + res.data[i].RoadwayNo + '-' + |
| | | res.data[i].RoadwayName + '</option>'); |
| | | } |
| | | form.render('select'); |
| | | } else { //不成功 |
| | | layer.msg('获取巷道信息失败', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | //回调 |
| | | form.render('select'); |
| | | }); |
| | | } |
| | | }); |
| | | //获取 区域下拉框 |
| | | synData(IP + "/Sys/GetStorageAreaByHouseNo", {}, 'get', function(res) { |
| | | $("#AreaNo").empty(); |
| | | $("#AreaNo").append('<option value =""></option>'); |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#AreaNo").append('<option value =' + res.data[i].AreaNo + '>' + res.data[i].AreaNo + '-' + |
| | | res.data[i].AreaName + '</option>'); |
| | | } |
| | | form.render('select'); |
| | | } else { //不成功 |
| | | layer.msg('获取区域信息失败', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | //回调 |
| | | form.render('select'); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // } |
| | | //获取区域 |
| | | function GetArea(){ |
| | | var a = $("#HouseNo").val(); |
| | | // if (wareHouse != null) |
| | | // { |
| | | // a = wareHouse; |
| | | // } |
| | | sendData(IP + "/Sys/GetStorageAreaByHouseNo?HouseNo="+a, {}, 'get', function(res) { |
| | | console.log(res) |
| | | if (res.code == 0) { //成功 |
| | | $("#AreaNo").empty(); |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#AreaNo").append('<option value =' + res.data[i].AreaNo + '>' + res.data[i].AreaNo + '-' + |
| | | res.data[i].AreaName + '</option>'); |
| | | } |
| | | // $("select[name='AreaNo']").val(val); |
| | | form.render('select'); |
| | | } else { //不成功 |
| | | Layer.msg('获取区域信息失败', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | //回调 |
| | | form.render('select'); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | //获取巷道 |
| | | function GetRoadway(val){ |
| | | sendData(IP + "/Sys/GetStorageRoadwayByHouseNo", {}, 'get', function(res) { |
| | | |
| | | if (res.code == 0) { //成功 |
| | | $("#RoadwayNo").empty(); |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#RoadwayNo").append('<option value =' + res.data[i].RoadwayNo + '>' + res.data[i].RoadwayNo + '-' + |
| | | res.data[i].RoadwayName + '</option>'); |
| | | } |
| | | $("select[name='RoadwayNo']").val(val); |
| | | form.render('select'); |
| | | } else { //不成功 |
| | | Layer.msg('获取巷道信息失败', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | //回调 |
| | | form.render('select'); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | //获取存储环境 |
| | | function GetTemp(temp){ |
| | | |
| | | sendData(IP + "/Sys/GetDictionaryByParentNo?parentNo="+"Temperature", {}, 'get', function(res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#Temp").append('<option value =' + res.data[i].Id + '>' + |
| | | res.data[i].DictName + '</option>'); |
| | | } |
| | | |
| | | $("select[name='Temp']").val(temp); |
| | | |
| | | form.render('select'); |
| | | } else { //不成功 |
| | | Layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {}); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | |
| | | //获取浏览器参数 |
| | | function getQueryString(name) { |
| | | var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); |
| | | var r = window.location.search.substr(1).match(reg); |
| | | if (r != null) return unescape(r[2]); |
| | | return null; |
| | | } |
| | | |
| | | }) |
| | | </script> |
| | | </body> |
| | | </html> |
| | |
| | | |
| | | |
| | | .btnShow { |
| | | width: 20px; |
| | | width: 17px; |
| | | height: 15px; |
| | | cursor: pointer; |
| | | } |
| | |
| | | }); |
| | | //巷道变更 |
| | | form.on('select(getRoadwayNo)', function (data) { |
| | | if (data.value == "R01") |
| | | { |
| | | xianga = "巷道1排"; |
| | | xiangb = "巷道2排"; |
| | | $("#Row").empty();//清空上一个查询下拉值 |
| | | $("#Row option[value ='1']").attr("selected", "selected") |
| | | $("#Row").append('<option value =1>第1排</option>'); |
| | | $("#Row").append('<option value =2>第2排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R02") |
| | | { |
| | | xianga = "巷道3排"; |
| | | xiangb = "巷道4排"; |
| | | $("#Row").empty();//清空上一个查询下拉值 |
| | | $("#Row option[value ='3']").attr("selected", "selected") |
| | | $("#Row").append('<option value =3>第3排</option>'); |
| | | $("#Row").append('<option value =4>第4排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R03") |
| | | { |
| | | |
| | | xianga = "巷道5排"; |
| | | xiangb = "巷道6排"; |
| | | $("#Row").empty();//清空上一个查询下拉值 |
| | | $("#Row option[value ='5']").attr("selected", "selected") |
| | | $("#Row").append('<option value =5>第5排</option>'); |
| | | $("#Row").append('<option value =6>第6排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R04") |
| | | { |
| | | |
| | | xianga = "巷道7排"; |
| | | xiangb = "巷道8排"; |
| | | $("#Row").empty();//清空上一个查询下拉值 |
| | | $("#Row option[value ='7']").attr("selected", "selected") |
| | | $("#Row").append('<option value =7>第7排</option>'); |
| | | $("#Row").append('<option value =8>第8排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R05") |
| | | { |
| | | |
| | | xianga = "巷道9排"; |
| | | xiangb = "巷道10排"; |
| | | $("#Row").empty();//清空上一个查询下拉值 |
| | | $("#Row option[value ='9']").attr("selected", "selected") |
| | | $("#Row").append('<option value =9>第9排</option>'); |
| | | $("#Row").append('<option value =10>第10排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R06") |
| | | { |
| | | |
| | | xianga = "巷道11排"; |
| | | xiangb = "巷道12排"; |
| | | $("#Row").empty();//清空上一个查询下拉值 |
| | | $("#Row option[value ='11']").attr("selected", "selected") |
| | | $("#Row").append('<option value =11>第11排</option>'); |
| | | $("#Row").append('<option value =12>第12排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R07") |
| | | { |
| | | |
| | | xianga = "巷道13排"; |
| | | xiangb = "巷道14排"; |
| | | $("#Row").empty();//清空上一个查询下拉值 |
| | | $("#Row option[value ='13']").attr("selected", "selected") |
| | | $("#Row").append('<option value =13>第13排</option>'); |
| | | $("#Row").append('<option value =14>第14排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R08") |
| | | { |
| | | |
| | | xianga = "巷道15排"; |
| | | xiangb = "巷道16排"; |
| | | $("#Row").empty();//清空上一个查询下拉值 |
| | | $("#Row option[value ='15']").attr("selected", "selected") |
| | | $("#Row").append('<option value =15>第15排</option>'); |
| | | $("#Row").append('<option value =16>第16排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R09") |
| | | { |
| | | |
| | | xianga = "巷道17排"; |
| | | xiangb = "巷道18排"; |
| | | $("#Row").empty();//清空上一个查询下拉值 |
| | | $("#Row option[value ='17']").attr("selected", "selected") |
| | | $("#Row").append('<option value =17>第17排</option>'); |
| | | $("#Row").append('<option value =18>第18排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R10") |
| | | { |
| | | |
| | | xianga = "巷道19排"; |
| | | xiangb = "巷道20排"; |
| | | $("#Row").empty();//清空上一个查询下拉值 |
| | | $("#Row option[value ='19']").attr("selected", "selected") |
| | | $("#Row").append('<option value =19>第19排</option>'); |
| | | $("#Row").append('<option value =20>第20排</option>'); |
| | | form.render('select'); |
| | | } |
| | | getRow(); //获取巷道中排 |
| | | GetSlotChartz($("#WareHouseNo").val(), $("#RoadwayNo").val()); //获取柱状信息 |
| | | }) |
| | | //排变更 |
| | | form.on('select(SelectRow)', function (data) { |
| | |
| | | $("#RoadwayNo option[value='" + res.data[0].RoadwayNo + "']").attr("selected", "selected") |
| | | $("#Depth option[value ='01']").attr("selected", "selected") |
| | | form.render('select'); |
| | | if ($("#RoadwayNo").val() == "R01") |
| | | { |
| | | xianga = "巷道1排"; |
| | | xiangb = "巷道2排"; |
| | | $("#Row option[value ='1']").attr("selected", "selected") |
| | | $("#Row").append('<option value =1>第1排</option>'); |
| | | $("#Row").append('<option value =2>第2排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R02") |
| | | { |
| | | xianga = "巷道3排"; |
| | | xiangb = "巷道4排"; |
| | | $("#Row option[value ='3']").attr("selected", "selected") |
| | | $("#Row").append('<option value =3>第3排</option>'); |
| | | $("#Row").append('<option value =4>第4排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R03") |
| | | { |
| | | |
| | | xianga = "巷道5排"; |
| | | xiangb = "巷道6排"; |
| | | $("#Row option[value ='5']").attr("selected", "selected") |
| | | $("#Row").append('<option value =5>第5排</option>'); |
| | | $("#Row").append('<option value =6>第6排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R04") |
| | | { |
| | | |
| | | xianga = "巷道7排"; |
| | | xiangb = "巷道8排"; |
| | | $("#Row option[value ='7']").attr("selected", "selected") |
| | | $("#Row").append('<option value =7>第7排</option>'); |
| | | $("#Row").append('<option value =8>第8排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R05") |
| | | { |
| | | |
| | | xianga = "巷道9排"; |
| | | xiangb = "巷道10排"; |
| | | $("#Row option[value ='9']").attr("selected", "selected") |
| | | $("#Row").append('<option value =9>第9排</option>'); |
| | | $("#Row").append('<option value =10>第10排</option>'); |
| | | form.render('select'); |
| | | } |
| | | else if ($("#RoadwayNo").val() == "R06") |
| | | { |
| | | |
| | | xianga = "巷道11排"; |
| | | xiangb = "巷道12排"; |
| | | $("#Row option[value ='11']").attr("selected", "selected") |
| | | $("#Row").append('<option value =11>第11排</option>'); |
| | | $("#Row").append('<option value =12>第12排</option>'); |
| | | form.render('select'); |
| | | } |
| | | getRow(); //获取排 |
| | | GetSlotChartz($("#WareHouseNo").val(), $("#RoadwayNo").val()); //获取柱状信息 |
| | | } else { //不成功 |
| | |
| | | type: 'shadow' |
| | | } |
| | | }, |
| | | // legend: { |
| | | // legend: { //顶部列表 |
| | | // data: ['空储位','有物品','入库中','出库中','移入中','移出中'] |
| | | // }, |
| | | xAxis: [ |
| | |
| | | /// </summary> |
| | | public class AddLocateVm |
| | | { |
| | | public int Index { get; set; } |
| | | public string HouseNo { get; set; } |
| | | public string RoadwayNo { get; set; } |
| | | public string AreaNo { get; set; } |
| | |
| | | using System.Collections.Generic; |
| | | using System.Linq.Expressions; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.BllCheckDto; |
| | | using SqlSugar; |
| | | using WMS.DAL; |
| | |
| | | } |
| | | |
| | | //获取盘点记录 |
| | | public List<StockCheckLogDto> GetStockCheckLogList(string crNo, string status, string palletNo, string boxNo, string skuNo, string skuName, string lotNo, int page, int limit, out int count) |
| | | { |
| | | try |
| | | public async Task<List<StockCheckLogDto>> GetStockCheckLogList(string crNo, string status, string palletNo, string boxNo, string skuNo, string skuName, string lotNo, int page, int limit, RefAsync<int> count) |
| | | { |
| | | Expression<Func<BllStockCheckLog, bool>> item = Expressionable.Create<BllStockCheckLog>() |
| | | .AndIF(!string.IsNullOrWhiteSpace(crNo), m => m.CRNo.Contains(crNo.Trim())) |
| | |
| | | .AndIF(!string.IsNullOrWhiteSpace(lotNo), m => m.LotNo.Contains(lotNo.Trim())) |
| | | .And(m => m.IsDel == "0") |
| | | .ToExpression();//注意 这一句 不能少 |
| | | var total = 0; |
| | | var list = GetAllWhereAsync(item) |
| | | var list = await GetAllWhereAsync(item) |
| | | .LeftJoin<SysUserInfor>((a, b) => a.CheckUserId == b.Id) |
| | | .LeftJoin<SysUserInfor>((a, b,c) => a.CreateUser == c.Id) |
| | | .LeftJoin<SysUserInfor>((a, b, c,d) => a.UpdateUser == d.Id) |
| | |
| | | CreateTime = a.CreateTime, |
| | | UpdateTime = a.UpdateTime, |
| | | |
| | | }).OrderByDescending(a=>a.CreateTime).ToOffsetPage(page, limit, ref total); |
| | | count = total; |
| | | }).OrderByDescending(a => a.CreateTime).ToPageListAsync(page, limit, count); |
| | | |
| | | return list; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new Exception(e.Message); |
| | | } |
| | | } |
| | | |
| | | #region 数据归档 |
| | |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Utility; |
| | | using WMS.DAL; |
| | | using WMS.Entity.BllCheckEntity; |
| | | using WMS.Entity.Context; |
| | |
| | | |
| | | #region 冻结\解冻 |
| | | |
| | | public List<DataStock> ByTypeGetDataStockType(string SkuNo, int type) |
| | | public async Task<List<DataStock>> ByTypeGetDataStockType(string SkuNo, int type) |
| | | { |
| | | try |
| | | { |
| | | var list = Db.Queryable<DataStock>().Where(a => a.IsDel == "0" && a.SkuNo != "100099" && type == 1 ? (a.Qty - a.LockQty - a.FrozenQty) > 0 : type == 2 ? a.FrozenQty > 0 : a.Id < 0).ToList(); |
| | | var list = await Db.Queryable<DataStock>().Where(a => a.IsDel == "0" && a.SkuNo != "100099" && type == 1 ? (a.Qty - a.LockQty - a.FrozenQty) > 0 : type == 2 ? a.FrozenQty > 0 : a.Id < 0).ToListAsync(); |
| | | //var sku = Db.Queryable<SysMaterials>().WhereIF(!string.IsNullOrWhiteSpace(SkuNo), a => a.SkuNo.Contains(SkuNo)).Where(a => list.Contains(a.SkuNo)).ToList(); |
| | | |
| | | return list; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public List<FreezeUnfreezeInfoDto> GetDataFreezeList(FreezeUnfreezeInfoDto model) |
| | | public async Task<List<FreezeUnfreezeInfoDto>> GetDataFreezeList(FreezeUnfreezeInfoDto model) |
| | | { |
| | | try |
| | | return await Db.Queryable<DataFreezeUnfreezeInfo>() |
| | | .LeftJoin<SysUserInfor>((a, b) => a.CreateUser == b.Id) |
| | | .Where(a => a.IsDel == "0" && a.Status == 1) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.SkuNo), a => a.SkuNo.Contains(model.SkuNo)) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.SkuName), a => a.SkuName.Contains(model.SkuName)) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.LotNo), a => a.LotNo.Contains(model.LotNo)) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.Type), a => a.Type == model.Type) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.Demo), a => a.Demo == model.Demo) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.StartTime), a => SqlFunc.GreaterThanOrEqual(a.CreateTime, model.StartTime)) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.EndTime), a => SqlFunc.LessThanOrEqual(a.CreateTime, model.EndTime)) |
| | | .Select<FreezeUnfreezeInfoDto>((a, b) => new FreezeUnfreezeInfoDto() |
| | | { |
| | | string str = "select info.SkuNo,info.SkuName,info.LotNo,info.LotText,info.SupplierLot,info.Qty,info.FrozenQty,info.Demo,info.status,info.Standard,info.Type,info.CreateTime,users.UserName from DataFreezeUnfreezeInfo info left join SysUserInfor users on info.CreateUser = users.Id where info.IsDel = '0' and users.IsDel = '0' and info.Status = 1"; |
| | | #region 验证条件 |
| | | //验证物料号是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.SkuNo)) |
| | | { |
| | | str += $" and info.SkuNo like '%{model.SkuNo}%'"; |
| | | } |
| | | //验证物料名称是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.SkuName)) |
| | | { |
| | | str += $" and info.SkuName like '%{model.SkuName}%'"; |
| | | } |
| | | //验证批次是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.LotNo)) |
| | | { |
| | | str += $" and info.LotNo like '%{model.LotNo}%'"; |
| | | } |
| | | // 验证类型是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.Type)) |
| | | { |
| | | str += $" and info.Type = '{model.Type}'"; |
| | | } |
| | | // 验证原因是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.Demo)) |
| | | { |
| | | str += $" and info.Demo = '{model.Demo}'"; |
| | | } |
| | | //验证结束时间是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.StartTime)) |
| | | { |
| | | str += $" and info.CreateTime < '{model.StartTime}'"; |
| | | } |
| | | //验证结束时间是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.EndTime)) |
| | | { |
| | | model.EndTime = (DateTime.Parse(model.EndTime).AddDays(1)).ToString(); |
| | | str += $" and info.CreateTime < '{model.EndTime}'"; |
| | | } |
| | | #endregion |
| | | |
| | | List<FreezeUnfreezeInfoDto> list = Db.Ado.SqlQuery<FreezeUnfreezeInfoDto>(str); |
| | | return list; |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | throw ex; |
| | | } |
| | | UserName = b.RealName |
| | | }, true) |
| | | .ToListAsync(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public List<FreezeUnfreezeInfoDto> GetDataUnFreezeList(FreezeUnfreezeInfoDto model) |
| | | public async Task<List<FreezeUnfreezeInfoDto>> GetDataUnFreezeList(FreezeUnfreezeInfoDto model) |
| | | { |
| | | try |
| | | return await Db.Queryable<DataFreezeUnfreezeInfo>() |
| | | .LeftJoin<SysUserInfor>((a, b) => a.CreateUser == b.Id) |
| | | .Where(a => a.IsDel == "0" && a.Status == 2) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.SkuNo), a => a.SkuNo.Contains(model.SkuNo)) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.SkuName), a => a.SkuName.Contains(model.SkuName)) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.LotNo), a => a.LotNo.Contains(model.LotNo)) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.Type), a => a.Type == model.Type) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.Demo), a => a.Demo == model.Demo) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.StartTime), a => SqlFunc.GreaterThanOrEqual(a.CreateTime, model.StartTime)) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(model.EndTime), a => SqlFunc.LessThanOrEqual(a.CreateTime, model.EndTime)) |
| | | .Select<FreezeUnfreezeInfoDto>((a, b) => new FreezeUnfreezeInfoDto() |
| | | { |
| | | string str = "select info.SkuNo,info.SkuName,info.LotNo,info.LotText,info.SupplierLot,info.Qty,info.FrozenQty,info.Demo,info.status,info.Standard,info.Type,info.CreateTime,users.UserName from DataFreezeUnfreezeInfo info left join SysUserInfor users on info.CreateUser = users.Id where info.IsDel = '0' and users.IsDel = '0' and info.Status = 2"; |
| | | |
| | | #region 验证条件 |
| | | //验证物料号是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.SkuNo)) |
| | | { |
| | | str += $" and info.SkuNo like '%{model.SkuNo}%'"; |
| | | } |
| | | //验证物料名称是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.SkuName)) |
| | | { |
| | | str += $" and info.SkuName like '%{model.SkuName}%'"; |
| | | } |
| | | //验证批次是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.LotNo)) |
| | | { |
| | | str += $" and info.LotNo like '%{model.LotNo}%'"; |
| | | } |
| | | // 验证类型是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.Type)) |
| | | { |
| | | str += $" and info.Type = '{model.Type}'"; |
| | | } |
| | | // 验证原因是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.Demo)) |
| | | { |
| | | str += $" and info.Demo = '{model.Demo}'"; |
| | | } |
| | | //验证结束时间是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.StartTime)) |
| | | { |
| | | str += $" and info.CreateTime < '{model.StartTime}'"; |
| | | } |
| | | //验证结束时间是否为空 |
| | | if (!string.IsNullOrWhiteSpace(model.EndTime)) |
| | | { |
| | | model.EndTime = (DateTime.Parse(model.EndTime).AddDays(1)).ToString(); |
| | | str += $" and info.CreateTime < '{model.EndTime}'"; |
| | | } |
| | | #endregion |
| | | |
| | | var list = Db.Ado.SqlQuery<FreezeUnfreezeInfoDto>(str); |
| | | return list; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | throw ex; |
| | | } |
| | | UserName = b.RealName |
| | | }, true) |
| | | .ToListAsync(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public string InsertDataFreezeInfo(FreezeUnfreezeInfoDto model) |
| | | public async Task<string> InsertDataFreezeInfo(FreezeUnfreezeInfoDto model) |
| | | { |
| | | try |
| | | { |
| | | string errStr = ""; |
| | | var TimeStr = Db.GetDate(); |
| | | //验证批次与物料是否为异常 |
| | | var stock = Db.Queryable<DataStock>().First(a => a.IsDel == "0" && a.LotNo == model.LotNo && a.SkuNo == model.SkuNo); |
| | | var stock = await Db.Queryable<DataStock>().FirstAsync(a => a.IsDel == "0" && a.LotNo == model.LotNo && a.SkuNo == model.SkuNo); |
| | | //当前物料或批次存在异常 |
| | | if (stock == null) |
| | | { |
| | | errStr = "-1:当前物料或批次存在异常!"; |
| | | return errStr; |
| | | throw Oops.Bah("-1:当前物料或批次存在异常!"); |
| | | } |
| | | //验证物料信息是否存在异常 |
| | | var sku = Db.Queryable<SysMaterials>().First(a => a.IsDel == "0" && a.SkuNo == model.SkuNo); |
| | | if (sku == null) |
| | | { |
| | | errStr = "-1:当前物料信息存在异常!"; |
| | | return errStr; |
| | | throw Oops.Bah("-1:当前物料信息存在异常!"); |
| | | } |
| | | //冻结 |
| | | if (model.Status == 1) |
| | |
| | | //验证冻结数量是否小于当前库存-锁定-冻结数量 |
| | | if (model.FrozenQty <= 0) |
| | | { |
| | | errStr = "-1:当前想要冻结的数量不可为0!"; |
| | | return errStr; |
| | | throw Oops.Bah("-1:当前想要冻结的数量不可为0!"); |
| | | } |
| | | //验证冻结数量是否小于当前库存-锁定-冻结数量 |
| | | if (model.FrozenQty > (stock.Qty - stock.LockQty - stock.FrozenQty)) |
| | | { |
| | | errStr = "-1:当前想要冻结的数量大于库存可冻结数量!"; |
| | | return errStr; |
| | | throw Oops.Bah("-1:当前想要冻结的数量大于库存可冻结数量!"); |
| | | } |
| | | //验证原因是否为空 |
| | | if (string.IsNullOrWhiteSpace(model.Demo)) |
| | | { |
| | | errStr = "-1:冻结原因不可为空!"; |
| | | return errStr; |
| | | throw Oops.Bah("-1:冻结原因不可为空!"); |
| | | } |
| | | |
| | | |
| | |
| | | //验证冻结数量是否小于当前库存-锁定-冻结数量 |
| | | if (model.FrozenQty <= 0) |
| | | { |
| | | errStr = "-1:当前想要冻结的数量不可为0!"; |
| | | return errStr; |
| | | throw Oops.Bah("-1:当前想要冻结的数量不可为0!"); |
| | | } |
| | | //验证冻结数量是否小于当前库存冻结数量 |
| | | if (model.FrozenQty > model.Qty) |
| | | { |
| | | errStr = "-1:当前想要解冻的数量必须小于库存冻结数量!"; |
| | | return errStr; |
| | | throw Oops.Bah("-1:当前想要解冻的数量必须小于库存冻结数量!"); |
| | | } |
| | | |
| | | } |
| | |
| | | stock.FrozenQty -= (decimal)model.FrozenQty; |
| | | } |
| | | |
| | | Db.Insertable(list).ExecuteCommand(); |
| | | Db.Updateable(stock).ExecuteCommand(); |
| | | await Db.Insertable(list).ExecuteCommandAsync(); |
| | | await Db.Updateable(stock).ExecuteCommandAsync(); |
| | | |
| | | |
| | | Db.CommitTran(); //提交 |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Utility; |
| | | using WMS.BLL.LogServer; |
| | | using WMS.DAL; |
| | | using WMS.Entity.BllAsnEntity; |
| | |
| | | public class WarehouseOutsidePalletsServer : DbHelper<DataStockDetail>, IWarehouseOutsidePalletsServer |
| | | { |
| | | private static readonly SqlSugarScope Db = DataContext.Db; |
| | | public WarehouseOutsidePalletsServer() : base(Db) |
| | | private readonly UserManager _userManager; |
| | | public WarehouseOutsidePalletsServer(UserManager userManager) : base(Db) |
| | | { |
| | | _userManager = userManager; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="lotNo">批次</param> |
| | | /// <param name="palletNo">托盘号</param> |
| | | /// <returns></returns> |
| | | public List<MateDataStockDto> GetPalletsOutside(string skuNo, string skuName, string lotNo, string palletNo, int page, int limit, out int count) |
| | | public async Task<List<MateDataStockDto>> GetPalletsOutside(string skuNo, string skuName, string lotNo, string palletNo, int page, int limit, RefAsync<int> count) |
| | | { |
| | | string sqlCount = "SELECT DISTINCT COUNT(DataStockDetail.ID) " + |
| | | "FROM DataStockDetail " + |
| | | "where IsDel = 0 and isnull(LocatNo,'') = '' and isnull(WareHouseNo,'') = '' "; |
| | | |
| | | string str = "select Id,LotNo,LotText,SupplierLot,SkuNo,SkuName,Standard,Qty,LockQty,FrozenQty,PalletNo," + |
| | | "Status,InspectMark,BitPalletMark,InspectStatus " + |
| | | "from DataStockDetail " + |
| | | "where IsDel = 0 and isnull(LocatNo,'') = '' and isnull(WareHouseNo,'') = ''"; |
| | | //判断物料号是否为空 |
| | | if (!string.IsNullOrEmpty(skuNo)) |
| | | { |
| | | str += $" and SkuNo like '%{skuNo}%'"; |
| | | } |
| | | //判断物料名称是否为空 |
| | | if (!string.IsNullOrEmpty(skuName)) |
| | | { |
| | | str += $" and SkuName like '%{skuName}%'"; |
| | | } |
| | | //判断批次是否为空 |
| | | if (!string.IsNullOrEmpty(lotNo)) |
| | | { |
| | | str += $" and LotNo like '%{lotNo}%'"; |
| | | } |
| | | //判断托盘号是否为空 |
| | | if (!string.IsNullOrEmpty(palletNo)) |
| | | { |
| | | str += $" and PalletNo like '%{palletNo}%'"; |
| | | } |
| | | //排序 |
| | | str += " order by LotNo,SkuNo,PalletNo"; |
| | | if (page == 0) |
| | | { |
| | | page = 1; |
| | | } |
| | | str += $" offset {((page - 1) * limit)} rows fetch next {limit} rows only;"; |
| | | List<MateDataStockDto> mateDataStockDtos = Db.Ado.SqlQuery<MateDataStockDto>(str); |
| | | var com = new Common(); |
| | | count = com.GetRowCount(sqlCount); |
| | | return mateDataStockDtos; |
| | | var list = await Db.Queryable<DataStockDetail>() |
| | | .Where(a => a.IsDel == "0" && SqlFunc.IsNullOrEmpty(a.LocatNo) && SqlFunc.IsNullOrEmpty(a.WareHouseNo)) |
| | | .WhereIF(!string.IsNullOrEmpty(skuNo), a => a.SkuNo.Contains(skuNo)) |
| | | .WhereIF(!string.IsNullOrEmpty(skuName), a => a.SkuName.Contains(skuName)) |
| | | .WhereIF(!string.IsNullOrEmpty(lotNo), a => a.LotNo.Contains(lotNo)) |
| | | .WhereIF(!string.IsNullOrEmpty(palletNo), a => a.PalletNo.Contains(palletNo)) |
| | | .OrderBy(a => new { a.LotNo, a.SkuNo, a.PalletNo }) |
| | | .Select<MateDataStockDto>() |
| | | .ToPageListAsync(page, limit, count); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | //保存指定的储位 |
| | | public void SaveAppointSlot(int stockDetailId, int locateId, int userId) |
| | | public async Task SaveAppointSlot(int stockDetailId, int locateId) |
| | | { |
| | | try |
| | | { |
| | | |
| | | //库存明细信息 |
| | | var stockDetail = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.Id == stockDetailId); |
| | | var stockDetail = await Db.Queryable<DataStockDetail>().FirstAsync(m => m.IsDel == "0" && m.Id == stockDetailId); |
| | | if (stockDetail == null) |
| | | { |
| | | throw new Exception("未查询到库存库外托盘的信息"); |
| | | throw Oops.Bah("未查询到库存库外托盘的信息"); |
| | | } |
| | | if (!string.IsNullOrWhiteSpace(stockDetail.LocatNo)) |
| | | { |
| | | throw new Exception("该托盘已在储位上,不能指定储位,请核实!"); |
| | | throw Oops.Bah("该托盘已在储位上,不能指定储位,请核实!"); |
| | | } |
| | | //储位 |
| | | var locate = Db.Queryable<SysStorageLocat>().First(m => m.IsDel == "0" && m.Id == locateId); |
| | | var locate = await Db.Queryable<SysStorageLocat>().FirstAsync(m => m.IsDel == "0" && m.Id == locateId); |
| | | if (locate == null) |
| | | { |
| | | throw new Exception("未查询到储位的信息"); |
| | | throw Oops.Bah("未查询到储位的信息"); |
| | | } |
| | | if (locate.Status != "0" || locate.Flag != "0") |
| | | { |
| | | throw new Exception("该储位状态不是空储位或标志不是正常的"); |
| | | throw Oops.Bah("该储位状态不是空储位或标志不是正常的"); |
| | | } |
| | | |
| | | var logTask = Db.Queryable<LogTask>().First(m => m.IsDel == "0" && m.Type == "0" && m.PalletNo == stockDetail.PalletNo && m.Status == "1"); |
| | | var logTask = await Db.Queryable<LogTask>().FirstAsync(m => m.IsDel == "0" && m.Type == "0" && m.PalletNo == stockDetail.PalletNo && m.Status == "1"); |
| | | if (logTask != null) |
| | | { |
| | | throw new Exception("当前托盘已有正在执行的任务,请核实查看"); |
| | | throw Oops.Bah("当前托盘已有正在执行的任务,请核实查看"); |
| | | } |
| | | |
| | | |
| | | //若是深度1的 则判断深度2是否为空储位 |
| | | if (locate.Depth == "01") |
| | | { |
| | | var locateDepth = Db.Queryable<SysStorageLocat>().First(a => a.IsDel == "0" && a.Row == locate.Row && a.Column == locate.Column && a.Layer == locate.Layer && a.Depth == "02"); |
| | | var locateDepth = await Db.Queryable<SysStorageLocat>().FirstAsync(a => a.IsDel == "0" && a.Row == locate.Row && a.Column == locate.Column && a.Layer == locate.Layer && a.Depth == "02"); |
| | | if (locateDepth != null) |
| | | { |
| | | if (locateDepth.Status != "1") |
| | | { |
| | | throw new Exception("该储位深度2不是有物品,不可绑定"); |
| | | throw Oops.Bah("该储位深度2不是有物品,不可绑定"); |
| | | } |
| | | } |
| | | } |
| | | //判断是否为深度2的 若为深度2 则获取深度1储位 判断是否为空储位 |
| | | if (locate.Depth == "02") |
| | | { |
| | | var locateDepth = Db.Queryable<SysStorageLocat>().First(a => a.IsDel == "0" && a.Row == locate.Row && a.Column == locate.Column && a.Layer == locate.Layer && a.Depth == "01"); |
| | | var locateDepth = await Db.Queryable<SysStorageLocat>().FirstAsync(a => a.IsDel == "0" && a.Row == locate.Row && a.Column == locate.Column && a.Layer == locate.Layer && a.Depth == "01"); |
| | | if (locateDepth.Status != "0" || locateDepth.Flag == "2") |
| | | { |
| | | throw new Exception("该储位深度1不是空储位或标志不是正常的"); |
| | | throw Oops.Bah("该储位深度1不是空储位或标志不是正常的"); |
| | | } |
| | | } |
| | | |
| | | // 获取此托盘的任务号 |
| | | var taskModel = Db.Queryable<LogTask>().First(m=>m.IsDel=="0" && m.PalletNo == stockDetail.PalletNo && m.IsSuccess ==0 && m.Status =="0"); |
| | | var taskModel = await Db.Queryable<LogTask>().FirstAsync(m => m.IsDel == "0" && m.PalletNo == stockDetail.PalletNo && m.IsSuccess == 0 && m.Status == "0"); |
| | | |
| | | Db.BeginTran(); |
| | | try |
| | |
| | | Msg = "入库口到=>>" + locate.LocatNo + "储位的入库任务", //关键信息 |
| | | |
| | | }; |
| | | Db.Insertable(task).ExecuteCommand(); |
| | | await Db.Insertable(task).ExecuteCommandAsync(); |
| | | |
| | | locate.Status = "2"; |
| | | Db.Updateable(locate).ExecuteCommand(); |
| | | await Db.Updateable(locate).ExecuteCommandAsync(); |
| | | } |
| | | else // 已指定过托盘需变更 |
| | | { |
| | | // 获取上次指定的储位地址 |
| | | var locateOld = Db.Queryable<SysStorageLocat>().First(m => m.IsDel == "0" && m.LocatNo == taskModel.EndLocat); |
| | | var locateOld = await Db.Queryable<SysStorageLocat>().FirstAsync(m => m.IsDel == "0" && m.LocatNo == taskModel.EndLocat); |
| | | if (locateOld != null) |
| | | { |
| | | if (locateOld.LocatNo == locate.LocatNo) // 判断当前指定的地址和上次的是否一致,若一致不做更改 |
| | |
| | | else // 若不一致 释放上次指定的储位地址 |
| | | { |
| | | locateOld.Status = "0"; |
| | | Db.Updateable(locateOld).ExecuteCommand(); |
| | | await Db.Updateable(locateOld).ExecuteCommandAsync(); |
| | | } |
| | | } |
| | | locate.Status = "2"; |
| | | Db.Updateable(locate).ExecuteCommand(); |
| | | await Db.Updateable(locate).ExecuteCommandAsync(); |
| | | // 更新任务号指定地址信息 |
| | | taskModel.EndLocat = locate.LocatNo;//目标储位 |
| | | taskModel.EndRoadway = locate.RoadwayNo;//目标巷道 |
| | | Db.Updateable(taskModel).ExecuteCommand(); |
| | | await Db.Updateable(taskModel).ExecuteCommandAsync(); |
| | | |
| | | taskNo = taskModel.TaskNo; |
| | | } |
| | | // 更新组盘表巷道地址和储位地址 |
| | | var bindModel = Db.Queryable<BllPalletBind>().First(m => m.IsDel == "0" |
| | | var bindModel = await Db.Queryable<BllPalletBind>().FirstAsync(m => m.IsDel == "0" |
| | | && m.PalletNo == stockDetail.PalletNo && m.ASNDetailNo == stockDetail.ASNDetailNo && m.ASNNo == stockDetail.ASNNo); |
| | | if (string.IsNullOrWhiteSpace(bindModel.TaskNo) || bindModel.TaskNo == taskNo) |
| | | { |
| | |
| | | bindModel.WareHouseNo = locate.WareHouseNo; |
| | | bindModel.RoadwayNo = locate.RoadwayNo; |
| | | bindModel.LocatNo = locate.LocatNo; |
| | | Db.Updateable(bindModel).ExecuteCommand(); |
| | | await Db.Updateable(bindModel).ExecuteCommandAsync(); |
| | | } |
| | | // 插入操作日志 |
| | | new OperationASNServer().AddLogOperationAsn("库内作业", "库外托盘", stockDetail.PalletNo, "编辑", |
| | | $"指定了储位:{locate.LocatNo}、单据号:{stockDetail.ASNNo}、托盘码:{stockDetail.PalletNo}的信息", userId); |
| | | $"指定了储位:{locate.LocatNo}、单据号:{stockDetail.ASNNo}、托盘码:{stockDetail.PalletNo}的信息", _userManager.UserId); |
| | | //提交事务 |
| | | Db.CommitTran(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | Db.RollbackTran(); |
| | | throw new Exception(e.Message); |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new Exception(e.Message); |
| | | } |
| | | } |
| | |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Dm; |
| | | using Model.ModelDto.BllSoDto; |
| | | using Model.ModelVm.BllSoVm; |
| | | using SqlSugar; |
| | | using WMS.BLL.LogServer; |
| | | using WMS.DAL; |
| | |
| | | public ExportNoticeDetailServer():base(Db) |
| | | { |
| | | } |
| | | public List<ExportNoticeDetailDto> GetExportNoticeDetailList(string soNo, int page, int limit, out int count) |
| | | public async Task<List<ExportNoticeDetailDto>> GetExportNoticeDetailList(GetExportNoticeDetailVm model, RefAsync<int> count) |
| | | { |
| | | try |
| | | { |
| | | if (string.IsNullOrWhiteSpace(soNo)) |
| | | if (string.IsNullOrWhiteSpace(model.SoNo)) |
| | | { |
| | | throw new Exception("出库单号为空"); |
| | | } |
| | | var notice = DataContext.Db.Queryable<BllExportNotice>().Where(m => m.IsDel == "0" && m.SONo == soNo).ToList().FirstOrDefault(); |
| | | var notice = DataContext.Db.Queryable<BllExportNotice>().Where(m => m.IsDel == "0" && m.SONo == model.SoNo).ToList().FirstOrDefault(); |
| | | if (notice == null) |
| | | { |
| | | throw new Exception("出库单号为空"); |
| | | } |
| | | var total = 0; |
| | | var data = GetAllWhereAsync(a=>a.SONo == soNo) |
| | | |
| | | var data = await GetAllWhereAsync(a=>a.SONo == model.SoNo) |
| | | .LeftJoin<SysPackag>((a,b)=> a.PackagNo == b.PackagNo) |
| | | .LeftJoin<SysUserInfor>((a,b,c)=> a.CreateUser == c.Id) |
| | | .LeftJoin<SysUserInfor>((a,b,c,d)=> a.UpdateUser == d.Id) |
| | |
| | | UpdateUserName = d.RealName, |
| | | CreateTime = a.CreateTime, |
| | | UpdateTime = a.UpdateTime |
| | | }).ToOffsetPage(page,limit,ref total); |
| | | count = total; |
| | | }).ToPageListAsync(model.Page, model.Limit, count); |
| | | |
| | | return data; |
| | | } |
| | |
| | | |
| | | #region 基础功能 |
| | | |
| | | public List<ExportNoticeDto> GetExportNoticeList(string no, string type, string status, string lotNo, int? logisticsId, string isWave, string isDespatch, string waveNo, int page, int limit, out int count) |
| | | public async Task<List<ExportNoticeDto>> GetExportNoticeList(GetExportNoticeVm model, RefAsync<int> count) |
| | | { |
| | | try |
| | | { |
| | | var strList = new List<string>(); |
| | | |
| | | if (!string.IsNullOrWhiteSpace(lotNo)) |
| | | if (!string.IsNullOrWhiteSpace(model.LotNo)) |
| | | { |
| | | var detailList = Db.Queryable<BllExportNoticeDetail>().Where(m => m.IsDel == "0" && m.LotNo.Contains(lotNo.Trim())).Select(m => m.SONo).Distinct().ToList(); |
| | | var detailList = Db.Queryable<BllExportNoticeDetail>().Where(m => m.IsDel == "0" && m.LotNo.Contains(model.LotNo.Trim())).Select(m => m.SONo).Distinct().ToList(); |
| | | strList = detailList; |
| | | } |
| | | Expression<Func<BllExportNotice, bool>> item = Expressionable.Create<BllExportNotice>() |
| | | .AndIF(!string.IsNullOrWhiteSpace(no), it => it.SONo.Contains(no.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(type), it => it.Type == type) |
| | | .AndIF(!string.IsNullOrWhiteSpace(status), it => it.Status == status) |
| | | .AndIF(logisticsId != null, it => it.LogisticsId == logisticsId) |
| | | .AndIF(!string.IsNullOrWhiteSpace(isWave), it => it.IsWave == isWave) |
| | | .AndIF(!string.IsNullOrWhiteSpace(isDespatch), it => it.IsDespatch == isDespatch) |
| | | .AndIF(!string.IsNullOrWhiteSpace(waveNo), it => it.WaveNo.Contains(waveNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(lotNo), it => strList.Contains(it.SONo)) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.No), it => it.SONo.Contains(model.No.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.Type), it => it.Type == model.Type) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.Status), it => it.Status == model.Status) |
| | | .AndIF(model.LogisticsId != null, it => it.LogisticsId == model.LogisticsId) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.IsWave), it => it.IsWave == model.IsWave) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.IsDespatch), it => it.IsDespatch == model.IsDespatch) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.WaveNo), it => it.WaveNo.Contains(model.WaveNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(model.LotNo), it => strList.Contains(it.SONo)) |
| | | .ToExpression();//注意 这一句 不能少 |
| | | var total = 0; |
| | | var data = GetAllWhereAsync(item) |
| | | |
| | | var data = await GetAllWhereAsync(item) |
| | | .LeftJoin<SysLogisticsInfo>((a, b) => a.LogisticsId == b.Id) |
| | | .LeftJoin<SysUserInfor>((a, b, c) => a.CreateUser == c.Id) |
| | | .LeftJoin<SysUserInfor>((a, b, c, d) => a.CreateUser == d.Id) |
| | |
| | | CheckTime = a.CheckTime |
| | | }) |
| | | .OrderByDescending(a => a.CreateTime) |
| | | .ToOffsetPage(page, limit, ref total); |
| | | count = total; |
| | | .ToPageListAsync(model.Page, model.Limit, count); |
| | | |
| | | return data; |
| | | } |
| | |
| | | { |
| | | _userManager = userManager; |
| | | } |
| | | public List<OperationDto> GetLogOperationCrList(string menuName, string type, string msg, string startTime, string endTime, int page, int limit, out int count) |
| | | public async Task<List<OperationDto>> GetLogOperationCrList(string menuName, string type, string msg, string startTime, string endTime, int page, int limit, RefAsync<int> count) |
| | | { |
| | | try |
| | | { |
| | |
| | | .AndIF(!string.IsNullOrWhiteSpace(startTime), it => it.CreateTime >= Convert.ToDateTime(startTime)) |
| | | .AndIF(!string.IsNullOrWhiteSpace(endTime), it => it.CreateTime <= Convert.ToDateTime(endTime).AddDays(1)) |
| | | .ToExpression();//注意 这一句 不能少 |
| | | var total = 0; |
| | | var list = GetAllWhereAsync(item) |
| | | var list = await GetAllWhereAsync(item) |
| | | .LeftJoin<SysDictionary>((it, dic) => it.Type == dic.Id.ToString()) |
| | | .LeftJoin<SysUserInfor>((it, dic, users) => it.CreateUser == users.Id) |
| | | .Select((it, dic, users) => new OperationDto() |
| | |
| | | CreateUserName = users.RealName, |
| | | }) |
| | | .OrderByDescending(it => it.CreateTime) |
| | | .ToOffsetPage(page, limit, ref total); |
| | | |
| | | count = total; |
| | | return list.OrderByDescending(m => m.CreateTime).ToList(); |
| | | .ToPageListAsync(page, limit, count); |
| | | return list; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | input.Type = (await Db.Queryable<SysDictionary>().FirstAsync(s => s.DictName == input.TypeName && s.IsDel == "0"))?.Id.ToString(); |
| | | input.CreateUser = _userManager.UserId; |
| | | input.CreateTime = DateTime.Now; |
| | | return await Db.Insertable<LogOperationSys>(input).ExecuteCommandAsync(); |
| | | return await Db.Insertable<LogOperationCR>(input).ExecuteCommandAsync(); |
| | | } |
| | | } |
| | | } |
| | |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.BllSoDto; |
| | | using Model.ModelDto.LogDto; |
| | | using SqlSugar; |
| | |
| | | } |
| | | |
| | | |
| | | public List<TaskDto> GetTaskList(List<string> orderType, string type, string status, string taskNo, int isSuccess, string palletNo, string msg, int page, int limit, out int count) |
| | | public async Task<List<TaskDto>> GetTaskList(List<string> orderType, string type, string status, string taskNo, int isSuccess, string palletNo, string msg, int page, int limit, RefAsync<int> count) |
| | | { |
| | | try |
| | | { |
| | |
| | | .AndIF(!string.IsNullOrWhiteSpace(palletNo), it => it.PalletNo.Contains(palletNo.Trim())) |
| | | .AndIF(!string.IsNullOrWhiteSpace(msg), it => it.Msg.Contains(msg.Trim())) |
| | | .ToExpression();//注意 这一句 不能少 |
| | | var total = 0; |
| | | var data = GetAllWhereAsync(item) |
| | | var data = await GetAllWhereAsync(item) |
| | | .LeftJoin<SysUserInfor>((a,b)=>a.CreateUser == b.Id). |
| | | Select((a,b) => new TaskDto() |
| | | { |
| | |
| | | CreateTime = a.CreateTime |
| | | }) |
| | | .OrderByDescending(a => a.TaskNo) |
| | | .ToOffsetPage(page,limit,ref total); |
| | | count = total; |
| | | .ToPageListAsync(page,limit, count); |
| | | |
| | | return data.OrderByDescending(m=>m.TaskNo).ToList(); |
| | | return data; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | /// <summary> |
| | | /// 添加储位信息(立体库)用于开发人员添加基础信息 |
| | | /// </summary> |
| | | /// <param name="index">当前排数</param> |
| | | /// <param name="houseNo">仓库号</param> |
| | | /// <param name="roadwayNo">巷道号</param> |
| | | /// <param name="areaNo">区域号</param> |
| | |
| | | /// <param name="dept">深度</param> |
| | | /// <param name="userId">操作人</param> |
| | | /// <returns></returns> |
| | | public async Task<int> AddStorageLocat(string houseNo, string roadwayNo, string areaNo, int row, int col, int layer, string dept, int userId) |
| | | public async Task<int> AddStorageLocat(int index, string houseNo, string roadwayNo, string areaNo, int row, int col, int layer, string dept, int userId) |
| | | { |
| | | try |
| | | { |
| | | var q = 0; |
| | | //R01 -01 -01 -02 |
| | | //巷道–排-列-层 |
| | | for (int r = 12; r <= row; r++)//排 |
| | | for (int r = index; r <= row; r++)//排 |
| | | { |
| | | var r1 = "1"; |
| | | if (r < 10) |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.BllCheckDto; |
| | | using SqlSugar; |
| | | |
| | | namespace WMS.IBLL.IBllCheckServer |
| | | { |
| | |
| | | /// <param name="limit"></param> |
| | | /// <param name="count"></param> |
| | | /// <returns></returns> |
| | | List<StockCheckLogDto> GetStockCheckLogList(string crNo, string status, string palletNo, string boxNo, string skuNo, string skuName, |
| | | string lotNo, int page, int limit, out int count); |
| | | Task<List<StockCheckLogDto>> GetStockCheckLogList(string crNo, string status, string palletNo, string boxNo, string skuNo, string skuName, |
| | | string lotNo, int page, int limit, RefAsync<int> count); |
| | | |
| | | /// <summary> |
| | | /// 获取盘点记录-数据归档 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<StockCheckLogDto> GetArchivingStockCheckLogList(string crNo, string status, string palletNo, string boxNo, string skuNo, string skuName, |
| | | List<StockCheckLogDto> GetArchivingStockCheckLogList(string crNo, string status, string palletNo, string boxNo, string skuNo, string skuName, |
| | | string lotNo, int page, int limit, out int count); |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WMS.Entity.DataEntity; |
| | | using WMS.Entity.SysEntity; |
| | | |
| | |
| | | /// <param name="SkuNo">物料编码</param> |
| | | /// <param name="type">0:获取可冻结库存 1:获取可解冻数据</param> |
| | | /// <returns></returns> |
| | | List<DataStock> ByTypeGetDataStockType(string SkuNo,int type); |
| | | Task<List<DataStock>> ByTypeGetDataStockType(string SkuNo,int type); |
| | | |
| | | /// <summary> |
| | | /// 获取库存冻结信息 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | List<FreezeUnfreezeInfoDto> GetDataFreezeList(FreezeUnfreezeInfoDto model); |
| | | Task<List<FreezeUnfreezeInfoDto>> GetDataFreezeList(FreezeUnfreezeInfoDto model); |
| | | |
| | | /// <summary> |
| | | /// 获取库存解冻信息 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | List<FreezeUnfreezeInfoDto> GetDataUnFreezeList(FreezeUnfreezeInfoDto model); |
| | | Task<List<FreezeUnfreezeInfoDto>> GetDataUnFreezeList(FreezeUnfreezeInfoDto model); |
| | | |
| | | /// <summary> |
| | | /// 添加冻结\解冻信息 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | string InsertDataFreezeInfo(FreezeUnfreezeInfoDto model); |
| | | Task<string> InsertDataFreezeInfo(FreezeUnfreezeInfoDto model); |
| | | |
| | | #endregion |
| | | } |
| | |
| | | using Model.ModelDto.DataDto; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WMS.IBLL.IBllCheckServer |
| | | { |
| | |
| | | /// <param name="lotNo">批次</param> |
| | | /// <param name="palletNo">托盘号</param> |
| | | /// <returns></returns> |
| | | List<MateDataStockDto> GetPalletsOutside(string skuNo, string skuName, string lotNo, string palletNo, int page, int limit, out int count); |
| | | Task<List<MateDataStockDto>> GetPalletsOutside(string skuNo, string skuName, string lotNo, string palletNo, int page, int limit, RefAsync<int> count); |
| | | |
| | | /// <summary> |
| | | /// 库外托盘指定储位信息 |
| | |
| | | /// <param name="stockDetailId">库存明细ID</param> |
| | | /// <param name="locateId">储位信息ID</param> |
| | | /// <param name="userId">操作人</param> |
| | | void SaveAppointSlot(int stockDetailId, int locateId, int userId); |
| | | Task SaveAppointSlot(int stockDetailId, int locateId); |
| | | |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.BllSoDto; |
| | | using Model.ModelVm.BllSoVm; |
| | | using SqlSugar; |
| | | |
| | | namespace WMS.IBLL.IBllSoServer |
| | | { |
| | |
| | | /// <param name="limit"></param> |
| | | /// <param name="count"></param> |
| | | /// <returns></returns> |
| | | List<ExportNoticeDetailDto> GetExportNoticeDetailList(string soNo, int page, int limit, out int count); |
| | | Task<List<ExportNoticeDetailDto>> GetExportNoticeDetailList(GetExportNoticeDetailVm model, RefAsync<int> count); |
| | | |
| | | /// <summary> |
| | | /// 删除出库单明细 |
| | |
| | | using WMS.Entity.DataEntity; |
| | | using System.Collections.Generic; |
| | | using System.Xml; |
| | | using System.Threading.Tasks; |
| | | using SqlSugar; |
| | | |
| | | namespace WMS.IBLL.IBllSoServer |
| | | { |
| | |
| | | /// <param name="limit"></param> |
| | | /// <param name="count"></param> |
| | | /// <returns></returns> |
| | | List<ExportNoticeDto> GetExportNoticeList(string no,string type, string status, string LotNo,int? logisticsId,string isWave, string isDespatch,string waveNo, int page, int limit, out int count); |
| | | Task<List<ExportNoticeDto>> GetExportNoticeList(GetExportNoticeVm model, RefAsync<int> count); |
| | | |
| | | /// <summary> |
| | | /// 获取添加或修改出库单明细所显示的库存数据源 |
| | |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.LogDto; |
| | | using Model.ModelVm.LogVm; |
| | | using SqlSugar; |
| | | |
| | | namespace WMS.IBLL.ILogServer |
| | | { |
| | |
| | | /// <param name="limit"></param> |
| | | /// <param name="count"></param> |
| | | /// <returns></returns> |
| | | List<OperationDto> GetLogOperationCrList(string menuName, string type, string msg, string startTime, |
| | | string endTime, int page, int limit, out int count); |
| | | Task<List<OperationDto>> GetLogOperationCrList(string menuName, string type, string msg, string startTime, |
| | | string endTime, int page, int limit, RefAsync<int> count); |
| | | /// <summary> |
| | | /// 添加库内(盘库、移库)操作日志 |
| | | /// </summary> |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.LogDto; |
| | | using SqlSugar; |
| | | using WMS.Entity.LogEntity; |
| | | |
| | | namespace WMS.IBLL.ILogServer |
| | |
| | | /// <param name="limit"></param> |
| | | /// <param name="count"></param> |
| | | /// <returns></returns> |
| | | List<TaskDto> GetTaskList(List<string> orderType, string type, string status, string taskNo, int isSuccess, string palletNo,string msg, int page, int limit, out int count); |
| | | Task<List<TaskDto>> GetTaskList(List<string> orderType, string type, string status, string taskNo, int isSuccess, string palletNo,string msg, int page, int limit, RefAsync<int> count); |
| | | |
| | | /// <summary> |
| | | /// 修改任务下发成功 |
| | |
| | | /// 添加储位信息(立体库)用于开发人员添加基础信息 |
| | | /// </summary> |
| | | /// <param name="locateNo">储位号</param> |
| | | /// <param name="index">当前排</param> |
| | | /// <param name="houseNo">仓库号</param> |
| | | /// <param name="roadwayNo">巷道号</param> |
| | | /// <param name="areaNo">区域号</param> |
| | |
| | | /// <param name="dept">深度</param> |
| | | /// <param name="userId">操作人</param> |
| | | /// <returns></returns> |
| | | Task<int> AddStorageLocat(string houseNo, string roadwayNo, string areaNo, int row, int col, int layer, string dept, int userId); |
| | | Task<int> AddStorageLocat(int index, string houseNo, string roadwayNo, string areaNo, int row, int col, int layer, string dept, int userId); |
| | | |
| | | /// <summary> |
| | | /// 添加储位信息(平库)用于开发人员添加基础信息 |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetArrivalTaskList(GetTaskVm model) |
| | | public async Task<IActionResult> GetArrivalTaskList(GetTaskVm model) |
| | | { |
| | | try |
| | | { |
| | | var type = new List<string>() { "0" }; |
| | | var bolls = _taskSvc.GetTaskList(type, model.Type, model.Status, model.TaskNo, model.IsSuccess, model.PalletNo, model.Msg, model.Page, model.Limit, out int count); |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _taskSvc.GetTaskList(type, model.Type, model.Status, model.TaskNo, model.IsSuccess, model.PalletNo, model.Msg, model.Page, model.Limit, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "入库任务信息", data = bolls }); |
| | | } |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetStockCheckLogList(GetCheckLogVm model) |
| | | public async Task<IActionResult> GetStockCheckLogList(GetCheckLogVm model) |
| | | { |
| | | try |
| | | { |
| | | var list = _stockCheckLogSvc.GetStockCheckLogList(model.CrNo, model.Status, model.PalletNo, model.BoxNo, model.SkuNo, model.SkuName, model.LotNo, model.Page, model.Limit, out int count); |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var list = await _stockCheckLogSvc.GetStockCheckLogList(model.CrNo, model.Status, model.PalletNo, model.BoxNo, model.SkuNo, model.SkuName, model.LotNo, model.Page, model.Limit, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "盘点记录", data = list }); |
| | | } |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetCrTaskList(GetTaskVm model) |
| | | public async Task<IActionResult> GetCrTaskList(GetTaskVm model) |
| | | { |
| | | try |
| | | { |
| | | var type = new List<string>() { "2", "3", "4" }; |
| | | var bolls = _taskSvc.GetTaskList(type, model.Type, model.Status, model.TaskNo, model.IsSuccess, model.PalletNo, model.Msg, model.Page, model.Limit, out int count); |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _taskSvc.GetTaskList(type, model.Type, model.Status, model.TaskNo, model.IsSuccess, model.PalletNo, model.Msg, model.Page, model.Limit, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "库内任务信息", data = bolls }); |
| | | } |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetLogOperationCrList(GetOperationVm model) |
| | | public async Task<IActionResult> GetLogOperationCrList(GetOperationVm model) |
| | | { |
| | | try |
| | | { |
| | | var bolls = _logSvc.GetLogOperationCrList(model.MenuName, model.Type, model.Msg, model.StartTime, model.EndTime, model.Page, model.Limit, out int count); |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _logSvc.GetLogOperationCrList(model.MenuName, model.Type, model.Msg, model.StartTime, model.EndTime, model.Page, model.Limit, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "出库操作日志信息", data = bolls }); |
| | | } |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetPalletsOutside(PalletsOutVm model) |
| | | public async Task<IActionResult> GetPalletsOutside(PalletsOutVm model) |
| | | { |
| | | List<MateDataStockDto> mateDataStockDtos = _stockPallet.GetPalletsOutside(model.SkuNo, model.SkuName, model.LotNo, model.PalletNo, model.Page, model.Limit, out int count); |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | List<MateDataStockDto> mateDataStockDtos = await _stockPallet.GetPalletsOutside(model.SkuNo, model.SkuName, model.LotNo, model.PalletNo, model.Page, model.Limit, count); |
| | | return Ok(new { code = 0, count, msg = "获取库外托盘信息成功", data = mateDataStockDtos }); |
| | | } |
| | | |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult SaveAppointSlot(SaveAppointSlotVm model) |
| | | public async Task<IActionResult> SaveAppointSlot(SaveAppointSlotVm model) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | return Ok(new { code = 1, msg = "未获取到当前操作人信息" }); |
| | | } |
| | | _stockPallet.SaveAppointSlot(model.StockDetailId, model.LocateId, int.Parse(userId)); |
| | | await _stockPallet.SaveAppointSlot(model.StockDetailId, model.LocateId); |
| | | |
| | | return Ok(new { code = 0, count = 0, msg = "指定储位成功", data = "" }); |
| | | } |
| | |
| | | /// <param name="type">0:获取可冻结库存 1:获取可解冻数据</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public IActionResult ByTypeGetDataStockType(string SkuNo, int type) |
| | | public async Task<IActionResult> ByTypeGetDataStockType(string SkuNo, int type) |
| | | { |
| | | try |
| | | { |
| | | var models = _freect.ByTypeGetDataStockType(SkuNo, type); |
| | | var models = await _freect.ByTypeGetDataStockType(SkuNo, type); |
| | | |
| | | return Ok(new |
| | | { |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetDataFreezeList(FreezeUnfreezeInfoDto model) |
| | | public async Task<IActionResult> GetDataFreezeList(FreezeUnfreezeInfoDto model) |
| | | { |
| | | try |
| | | { |
| | | var models = _freect.GetDataFreezeList(model); |
| | | var models = await _freect.GetDataFreezeList(model); |
| | | |
| | | return Ok(new |
| | | { |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetDataUnFreezeList(FreezeUnfreezeInfoDto model) |
| | | public async Task<IActionResult> GetDataUnFreezeList(FreezeUnfreezeInfoDto model) |
| | | { |
| | | try |
| | | { |
| | | var models = _freect.GetDataUnFreezeList(model); |
| | | var models = await _freect.GetDataUnFreezeList(model); |
| | | |
| | | return Ok(new |
| | | { |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult InsertDataFreezeInfo(FreezeUnfreezeInfoDto model) |
| | | public async Task<IActionResult> InsertDataFreezeInfo(FreezeUnfreezeInfoDto model) |
| | | { |
| | | try |
| | | { |
| | |
| | | } |
| | | |
| | | model.CreateUser = int.Parse(UserId); |
| | | string strMesage = _freect.InsertDataFreezeInfo(model); |
| | | string strMesage = await _freect.InsertDataFreezeInfo(model); |
| | | //var arr = strMesage.Split(':'); |
| | | if (!strMesage.Contains("-1")) |
| | | { |
| | |
| | | using Newtonsoft.Json; |
| | | using Utility.Tools; |
| | | using Model.InterFaceModel; |
| | | using SqlSugar; |
| | | using Utility; |
| | | using System.Threading.Tasks; |
| | | using Model.ModelDto.BllSoDto; |
| | | |
| | | namespace Wms.Controllers |
| | | { |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetExportNoticeList(GetExportNoticeVm model) |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<SqlSugarPagedList> GetExportNoticeList(GetExportNoticeVm model) |
| | | { |
| | | try |
| | | { |
| | | var bolls = _exNoticeSvc.GetExportNoticeList(model.No, model.Type, model.Status,model.LotNo,model.LogisticsId,model.IsWave,model.IsDespatch,model.WaveNo, model.Page, model.Limit, out int count); |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _exNoticeSvc.GetExportNoticeList(model, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "出库单信息", data = bolls }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | return new SqlSugarPagedList() { Items = bolls, Total = count }; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetExportNoticeDetailList(GetExportNoticeDetailVm model) |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public async Task<SqlSugarPagedList> GetExportNoticeDetailList(GetExportNoticeDetailVm model) |
| | | { |
| | | try |
| | | { |
| | | var bolls = _exNoticeDetailSvc.GetExportNoticeDetailList(model.SoNo, model.Page, model.Limit, out int count); |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _exNoticeDetailSvc.GetExportNoticeDetailList(model, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "出库单明细信息", data = bolls }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | return new SqlSugarPagedList() { Items = bolls, Total = count }; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetExportTaskList(GetTaskVm model) |
| | | public async Task<IActionResult> GetExportTaskList(GetTaskVm model) |
| | | { |
| | | try |
| | | { |
| | | var type = new List<string>(){"1","4"}; |
| | | var bolls = _taskSvc.GetTaskList( type, model.Type,model.Status,model.TaskNo,model.IsSuccess,model.PalletNo,model.Msg,model.Page, model.Limit, out int count); |
| | | RefAsync<int> count = new RefAsync<int>(); |
| | | var bolls = await _taskSvc.GetTaskList( type, model.Type,model.Status,model.TaskNo,model.IsSuccess,model.PalletNo,model.Msg,model.Page, model.Limit, count); |
| | | |
| | | return Ok(new { code = 0, count, msg = "出库任务信息", data = bolls }); |
| | | } |
| | |
| | | //{ |
| | | // return Ok(new { code = 400, ErrorMsg = "为获取到当前操作人信息" }); |
| | | //} |
| | | var bolls = await _locatSvc.AddStorageLocat(model.HouseNo, model.RoadwayNo, model.AreaNo, model.Row, model.Col, model.Layer, model.Depth, 1); |
| | | var bolls = await _locatSvc.AddStorageLocat(model.Index, model.HouseNo, model.RoadwayNo, model.AreaNo, model.Row, model.Col, model.Layer, model.Depth, 1); |
| | | if (bolls > 0) |
| | | { |
| | | await _operation.InsertOperation("仓库设置", "储位管理", model.RoadwayNo, "添加", "添加储位信息 储位号:" + model.RoadwayNo, 1); |