| | |
| | | window.webConfig = { |
| | | "webApiBaseUrl": "http://127.0.0.1:9293/" |
| | | "webApiBaseUrl": "http://10.30.4.92:9283/" |
| | | } |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | import { el } from "element-plus/es/locales.mjs"; |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | |
| | | for (let index = 0; index < list.length; index++) { |
| | | str+=list[index]+'<br>'; |
| | | } |
| | | return str; |
| | | return str = list[0] == "" ? "空箱" : str; |
| | | } |
| | | } |
| | | if (column.field == 'batchNo') { |
| | |
| | | for (let index = 0; index < list.length; index++) { |
| | | str+=list[index]+'<br>'; |
| | | } |
| | | return str; |
| | | return str = list[0] == "" ? "æ " : str; |
| | | } |
| | | } |
| | | if (column.field == 'materielInfo') { |
| | | const today = new Date() |
| | | column.formatter = (row) => { |
| | | if (row.details.length > 0) { |
| | | const today = new Date(); |
| | | const closestDate = row.details |
| | | .map(x => { |
| | |
| | | |
| | | const daysSinceClosest = Math.ceil(Math.abs((today - closestDate) / (1000 * 60 * 60 * 24))); |
| | | return '<span style="color: #F56C6C">'+ daysSinceClosest+"天"+'</span>'; |
| | | } else { |
| | | return '<span style="color: #F56C6C">' + "æ ä¿è´¨æ" + '</span>'; |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (column.field == 'sumStock') { |
| | | column.formatter = (row) => { |
| | | if (row.details.length > 0) { |
| | | var sum=0; |
| | | const closestDate = row.details |
| | | .map(x => { |
| | | sum+=(x.stockQuantity) |
| | | }) |
| | | return '<span style="color: #F56C6C">'+ sum+row.details[0].unit+'</span>'; |
| | | } else { |
| | | return '<span style="color: #F56C6C">' + "1个" + '</span>'; |
| | | } |
| | | |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | }; |
| | | export default extension; |
| | | |
| | |
| | | ], |
| | | [ |
| | | { title: "ç©æç¼å·", field: "materielCode",type: "like"}, |
| | | { title: "æ¹æ¬¡å·", field: "batchNo",type: "like"} |
| | | { title: "æ¹æ¬¡å·", field: "batchNo",type: "like"}, |
| | | { title: "æå±ä»åº", field: "warehouseId",type: "selectList",dataKey: "warehouse",data: [],}, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "æå±ä»åº", |
| | | type: "string", |
| | | width: 80, |
| | | align: "left", |
| | | bind: { key: "warehouse", data: [] }, |
| | | }, |
| | | { |
| | | field: "roadwayNo", |
| | | title: "å··éç¼å·", |
| | | type: "decimal", |
| | |
| | | Details = new List<Dt_StockInfoDetail>() |
| | | }; |
| | | var ContainerDetailsInfos = TesugarClient.Queryable("ContainerDetailsInfo", "x").Where("CId", "=", id).ToList(); |
| | | if (ContainerDetailsInfos.Count < 1) stockInfo.PalletType = PalletTypeEnum.Empty.ObjToInt(); |
| | | foreach (var ContainerDetailsInfo in ContainerDetailsInfos) |
| | | { |
| | | dynamic ruleConfig1 = ContainerDetailsInfo; |
| | |
| | | public class StockViewDTO |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// è´§ä½ç¼å· |
| | | /// </summary> |
| | | public string LocationCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// è´§ä½åç§° |
| | | /// </summary> |
| | | public string LocationName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// è´§ä½å |
| | | /// </summary> |
| | | public int Column { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// è´§ä½è¡ |
| | | /// </summary> |
| | | public int Row { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// è´§ä½å± |
| | | /// </summary> |
| | | public int Layer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// åºåºä¸»é® |
| | | /// </summary> |
| | | public int WarehouseId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è´§ä½æ·±åº¦ |
| | | /// </summary> |
| | | public int Depth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// è´§ä½ç¶æ |
| | | /// </summary> |
| | | public int LocationStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// è´§ä½ç±»å |
| | | /// </summary> |
| | | public int LocationType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// å··éç¼å· |
| | | /// </summary> |
| | | public string RoadwayNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// ç¦ç¨ç¶æ |
| | | /// </summary> |
| | | public int EnalbeStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// åºåä¸»é® |
| | | /// </summary> |
| | | public int StockId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// æçå· |
| | | /// </summary> |
| | | public string PalletCode { get; set; } |
| | | |
| | |
| | | public bool IsFull { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// ç©æç¼ç |
| | | /// </summary> |
| | | public string MaterielCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// ç©ææ¹å· |
| | | /// </summary> |
| | | public string BatchNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// åºåç¶æ |
| | | /// </summary> |
| | | public int StockStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// åºå夿³¨ |
| | | /// </summary> |
| | | public string StockRemark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// å建人 |
| | | /// </summary> |
| | | public string Creater { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// å建æ¶é´ |
| | | /// </summary> |
| | | public DateTime CreateDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// ä¿®æ¹äºº |
| | | /// </summary> |
| | | public string Modifier { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// ä¿®æ¹æ¶é´ |
| | | /// </summary> |
| | | public DateTime? ModifyDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// åºå详æ
|
| | | /// </summary> |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(StockId))] |
| | | public List<Dt_StockInfoDetail> Details { get; set; } |
| | |
| | | /// <param name="qty">æ°é</param> |
| | | /// <param name="address">å°å</param> |
| | | /// <returns></returns> |
| | | WebResponseContent OutEmpty(int qty, string address, int WarehouseId); |
| | | WebResponseContent OutEmpty(int qty, string address, int WarehouseId, string barcode); |
| | | |
| | | /// <summary> |
| | | /// WCSç³è¯·å
¥åº |
| | |
| | | Depth = a.Depth, |
| | | EnalbeStatus = a.EnableStatus, |
| | | Layer = a.Layer, |
| | | WarehouseId = b.WarehouseId, |
| | | LocationName = a.LocationName, |
| | | LocationStatus = a.LocationStatus, |
| | | LocationType = a.LocationType, |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | public WebResponseContent OutEmpty(int qty, string address, int WarehouseId) |
| | | public WebResponseContent OutEmpty(int qty, string address, int WarehouseId, string barcode) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°åºåº"); |
| | | } |
| | | var stockInfos = _stockRepository.StockInfoRepository.QueryData(x => x.WarehouseId == WarehouseId && x.PalletType == PalletTypeEnum.Empty.ObjToInt() && x.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt(), qty, nameof(Dt_StockInfo.CreateDate)); |
| | | if (stockInfos == null) return WebResponseContent.Instance.Error($"{warehouse.WarehouseName}æªæ¾å°ç©ºç®±åºå"); |
| | | List<Dt_StockInfo> stockInfos = null; |
| | | if (string.IsNullOrEmpty(barcode)) |
| | | { |
| | | stockInfos = _stockRepository.StockInfoRepository.QueryData(x => x.WarehouseId == WarehouseId && x.PalletType == PalletTypeEnum.Empty.ObjToInt() && x.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt(), qty, nameof(Dt_StockInfo.CreateDate)); |
| | | } |
| | | else |
| | | { |
| | | stockInfos = _stockRepository.StockInfoRepository.QueryData(x => x.WarehouseId == WarehouseId && x.PalletType == PalletTypeEnum.Empty.ObjToInt() && x.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt() && x.PalletCode == barcode); |
| | | if (stockInfos.Count == 0) return WebResponseContent.Instance.Error($"{warehouse.WarehouseName}æªæ¾å°ç©ºç®±ã{barcode}ã"); |
| | | } |
| | | |
| | | if (stockInfos.Count < qty) return WebResponseContent.Instance.Error($"{warehouse.WarehouseName}空箱åºåä¸è¶³,åºåæ°ã{stockInfos.Count}ã"); |
| | | List<Dt_Task> tasks = GetTasks(stockInfos, TaskTypeEnum.OutEmpty); |
| | | stockInfos.ForEach(x => |
| | |
| | | /// <param name="address">å°å</param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("OutEmpty"), AllowAnonymous] |
| | | public WebResponseContent OutEmpty(int qty, string address, int WarehouseId) |
| | | public WebResponseContent OutEmpty(int qty, string address, int WarehouseId, string barcode) |
| | | { |
| | | return Service.OutEmpty(qty, address, WarehouseId); |
| | | return Service.OutEmpty(qty, address, WarehouseId,barcode); |
| | | } |
| | | |
| | | [HttpPost, HttpGet, Route("DeviceRequestInboundTask"), AllowAnonymous] |
| | |
| | | <uni-easyinput type="text" placeholder="请è¾å
¥æ°é" ref='midInput' :focus="!focus" v-model="qty" |
| | | @input="barcodeInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="æçæ¡ç :"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«ææçæ¡ç " ref='midInput' :focus="focus" v-model="barcode" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="OutEmpty" type="primary" size="default" style="margin-top: 2%;">空箱åºåº</button> |
| | | </uni-forms-item> |
| | |
| | | focus: false, |
| | | qty: "", |
| | | address: "", |
| | | barcode: "", |
| | | } |
| | | }, |
| | | onShow() {}, |
| | | onLoad(res) { |
| | | this.WarehouseId = res.warehouseId; |
| | | this.focus = false; |
| | | this.qty = 1; |
| | | if (res.warehouseId == 5) { |
| | | this.address = "8001"; |
| | | } |
| | |
| | | }) |
| | | return; |
| | | } |
| | | if (this.qty < 1) { |
| | | this.$refs.uToast.show({ |
| | | title: "æ°éä¸è½å°äº1", |
| | | type: 'error' |
| | | }) |
| | | return; |
| | | } |
| | | this.$u.post('/api/Task/OutEmpty?qty=' + this.qty + '&address=' + this.address + '&WarehouseId=' + |
| | | this.WarehouseId).then( |
| | | this.WarehouseId + '&barcode=' + this.barcode).then( |
| | | res => { |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |