| | |
| | | cols:colsJson |
| | | }; |
| | | |
| | | sendData(IP + "/Statistical/GetInventoryList?SkuNo=" + $("#SkuNo").val() + "&&SkuName=" + $("#SkuName").val() + "&&OwnerNo=" + $("#OwnerNo").val()+ "&&OwnerName=" + $("#OwnerName").val(), {}, 'get', function (res) { |
| | | sendData(IP + "/Statistical/GetInventoryList?SkuNo=" + $("#SkuNo").val() + "&&SkuName=" + $("#SkuName").val() + "&&OwnerNo=" + $("#OwnerNo").val()+ "&&OwnerName=" + $("#OwnerName").val()+"&&LotNo=" + $("#LotNo").val(), {}, 'get', function (res) { |
| | | console.log(res) |
| | | if (res.code == 0) { //成功 |
| | | var list = res.data; |
| | |
| | | /// <param name="skuNo">物料编码</param> |
| | | /// <param name="skuName">物料名称</param> |
| | | /// <returns></returns> |
| | | public List<MateDataStockDto> GetDataStockList(string skuNo, string skuName, string ownerNo, string ownerName) |
| | | public List<MateDataStockDto> GetDataStockList(string skuNo, string skuName, string ownerNo, string ownerName, string lotNo) |
| | | { |
| | | string str = "select stock.SkuNo,stock.SkuName,stock.LotNo,stock.LotText,stock.Standard,stock.Qty," + |
| | | "stock.LockQty,stock.FrozenQty,stock.OwnerNo,stock.OwnerName,(mate.Weight * stock.Qty) WeightSum " + |
| | |
| | | { |
| | | str += " and stock.OwnerName like @ownerName"; |
| | | } |
| | | //判断货主名称是否为空 |
| | | if (!string.IsNullOrEmpty(lotNo)) |
| | | { |
| | | str += " and stock.LotNo like @lotNo"; |
| | | } |
| | | //排序 |
| | | str += " order by stock.SkuNo"; |
| | | List<MateDataStockDto> StockList = Db.Ado.SqlQuery<MateDataStockDto>(str, new |
| | |
| | | skuno = "%" + skuNo + "%", //物料编码 |
| | | skuname = "%" + skuName + "%", //物料名称 |
| | | ownerNo= "%" + ownerNo + "%", //货主编码 |
| | | ownerName= "%" + ownerName + "%" //货主名称 |
| | | ownerName= "%" + ownerName + "%", //货主名称 |
| | | lotNo= "%" + lotNo + "%", //批次号 |
| | | }); |
| | | |
| | | //库存总量 |
| | |
| | | /// <param name="skuNo">物料编码</param> |
| | | /// <param name="skuName">物料名称</param> |
| | | /// <returns></returns> |
| | | List<MateDataStockDto> GetDataStockList(string skuNo, string skuName, string ownerNo, string ownerName); |
| | | List<MateDataStockDto> GetDataStockList(string skuNo, string skuName, string ownerNo, string ownerName, string lotNo); |
| | | |
| | | /// <summary> |
| | | /// 获取库存明细 |
| | |
| | | /// <param name="skuName"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public IActionResult GetInventoryList(string skuNo, string skuName,string ownerNo,string ownerName) |
| | | public IActionResult GetInventoryList(string skuNo, string skuName,string ownerNo,string ownerName,string lotNo) |
| | | { |
| | | List<MateDataStockDto> StockList = _stock.GetDataStockList(skuNo, skuName,ownerNo,ownerName); |
| | | List<MateDataStockDto> StockList = _stock.GetDataStockList(skuNo, skuName,ownerNo,ownerName,lotNo); |
| | | return Ok(new |
| | | { |
| | | data = StockList, |