From 8348893d84ad8b5fbfca95fbb2ca8312ad689d64 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 09 一月 2025 12:57:15 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs | 23
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 163 ++++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/OutLockStockStatusEnum.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs | 4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs | 6
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PalletTypeEnum.cs | 5
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs | 1
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 19
代码管理/淮安PDA/pages/stash/InEmpty.vue | 99 +++
代码管理/淮安PDA/pages/stash/raworderboxing.vue | 195 +++---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService_Pick.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs | 27
代码管理/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 94 +++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs | 20
代码管理/淮安PDA/pages/stash/receiveorderoutbound.vue | 1
/dev/null | 522 --------------------
代码管理/淮安PDA/pages/stash/AGVFinish.vue | 92 +++
代码管理/淮安PDA/pages.json | 21
代码管理/淮安PDA/pages/stash/OutEmpty.vue | 98 +++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs | 12
代码管理/WMS/WIDESEA_WMSClient/src/views/inbound/purchaseOrder.vue | 4
代码管理/淮安PDA/pages/stash/pickingMat.vue | 21
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 7
24 files changed, 803 insertions(+), 638 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs"
index f7a2020..eacf3b7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs"
@@ -29,6 +29,29 @@
_taskService = taskService;
_taskRepository = taskRepository;
}
+ [HttpPost, HttpGet, Route("AGVFinish"), AllowAnonymous]
+ public WebResponseContent AGVFinish(string barcode)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ var task = _taskRepository.QueryFirst(x => x.PalletCode == barcode);
+ if (task == null) throw new Exception($"鏈壘鍒颁换鍔�,鎵樼洏鍙枫�恵barcode}銆�");
+ AgvUpdateDTO updateDTO = new AgvUpdateDTO()
+ {
+ TaskCode = task.AgvTaskNum,
+ Method = "end"
+ };
+ var agvResponseContent = CtuCallback(updateDTO);
+ if (agvResponseContent.Code == "1") throw new Exception(agvResponseContent.Message);
+ content.OK();
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
#region 瀹夊叏淇″彿鐢宠
/// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/purchaseOrder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/purchaseOrder.vue"
index ac92e4e..b4a0e42 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/purchaseOrder.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/purchaseOrder.vue"
@@ -21,7 +21,7 @@
const table = ref({
key: "id",
footer: "Foots",
- cnName: "鍏ュ簱鍗�",
+ cnName: "閲囪喘鍗�",
name: "purchaseOrder",
url: "/PurchaseOrder/",
sortName: "id",
@@ -176,7 +176,7 @@
},
]);
const detail = ref({
- cnName: "鍏ュ簱鍗曟槑缁�",
+ cnName: "閲囪喘鍗曟槑缁�",
table: "InboundOrderDetail",
columns: [
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue"
index fdb2428..0b94c04 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue"
@@ -141,7 +141,7 @@
type: "string",
width: 120,
align: "left",
- bind: { key: "outStockStatus", data: [] },
+ bind: { key: "stockStatusEmun", data: [] },
},
{
field: "creater",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PalletTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PalletTypeEnum.cs"
index acd2a2b..f9a2413 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PalletTypeEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/CommonEnum/PalletTypeEnum.cs"
@@ -8,6 +8,11 @@
{
public enum PalletTypeEnum
{
+ /// <summary>
+ /// 绌虹
+ /// </summary>
+ Empty = -1,
+
None = 0,
/// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/OutLockStockStatusEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/OutLockStockStatusEnum.cs"
index a7f410a..01dbf7c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/OutLockStockStatusEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/OutLockStockStatusEnum.cs"
@@ -18,6 +18,9 @@
[Description("鍑哄簱瀹屾垚")]
鍑哄簱瀹屾垚 = 2,
+ [Description("鎷i�夊畬鎴�")]
+ 鎷i�夊畬鎴� = 3,
+
[Description("鎾ら攢")]
鎾ら攢 = 99
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
index 177a929..edec038 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
@@ -20,6 +20,7 @@
WebResponseContent GetInboundOrders(SaveModel saveModel);
WebResponseContent MaterielGroup(int inboundOrderId, string palletCode, string serNum);
+ WebResponseContent InPinKu(string inboundOrderId,int warehouseId, List<string> serNums);
WebResponseContent MaterielGroup(string palletCode, int Initiallife, int warehouseId, List<string> serNums);
//WebResponseContent FeedbackInboundOrder(int id);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
index f00fcc5..c17ee33 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
@@ -63,6 +63,13 @@
/// <returns></returns>
//WebResponseContent RequestInboundTask(string palletCode, string stationCode);
WebResponseContent RequestInboundTask(SaveModel saveModel);
+ /// <summary>
+ /// 绌虹鍏ュ簱
+ /// </summary>
+ /// <param name="barcode"></param>
+ /// <param name="address"></param>
+ /// <returns></returns>
+ WebResponseContent InEmpty(string barcode, string address, int WarehouseId);
/// <summary>
/// WCS鐢宠鍏ュ簱
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index 1c93c43..3c7c036 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -255,6 +255,168 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
+
+
+ /// <summary>
+ /// 鍏ュ钩搴擄紝鐩存帴娣诲姞搴撳瓨
+ /// </summary>
+ /// <param name="warehouseId"></param>
+ /// <param name="serNums"></param>
+ /// <returns></returns>
+ public WebResponseContent InPinKu(string inboundOrderId, int warehouseId, List<string> serNums)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ Dt_Warehouse warehouse = _warehouseService.Repository.QueryFirst(x => x.WarehouseId == warehouseId);
+ if (warehouse == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒拌浠撳簱淇℃伅");
+ }
+ Dt_InboundOrder inboundOrder = BaseDal.Db.Queryable<Dt_InboundOrder>().Where(x => x.InboundOrderNo == inboundOrderId && x.WarehouseId == warehouse.WarehouseId).Includes(x => x.Details).First();
+ if (inboundOrder == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒板叆搴撳崟淇℃伅");
+ }
+ if (inboundOrder.Details == null || inboundOrder.Details.Count <= 0)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒板叆搴撳崟鏄庣粏淇℃伅");
+ }
+
+ //鍏ュ簱鏄庣粏鍘熷畬鎴愭暟閲�
+ int oldCount = inboundOrder.Details.Where(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()).ToList().Count;
+
+ Dt_ReceiveOrder receiveOrder = _inboundRepository.ReceiveOrderRepository.Db.Queryable<Dt_ReceiveOrder>().Where(x => x.ReceiveOrderNo == inboundOrder.UpperOrderNo).Includes(x => x.Details).First();
+ if (receiveOrder == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒板搴旂殑鏀惰揣鍗�");
+ }
+ if (receiveOrder.Details == null || receiveOrder.Details.Count <= 0)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒板搴旂殑鏀惰揣鍗曟槑缁�");
+ }
+
+ List<string> purchaseOrderNos = receiveOrder.Details.Select(x => x.PurchaseOrderNo).ToList();
+
+ List<MatSerNumAnalysisModel> models = CodeAnalysisHelper.CodeAnalysis<MatSerNumAnalysisModel>(AnalysisCodeEnum.MatSerNumAnalysis, serNums);
+
+ if (models.Select(x => x.MaterielCode).Distinct().Count() > 1)
+ {
+ return WebResponseContent.Instance.Error($"鐗╂枡涓嶅彲娣锋斁");
+ }
+
+ string materielCode = models.FirstOrDefault()?.MaterielCode ?? "";
+ Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == materielCode);
+ if (materielInfo == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒拌鐗╂枡鐨勪俊鎭�");
+ }
+
+ List<Dt_InboundOrderDetail> inboundOrderDetails = inboundOrder.Details.Where(x => x.MaterielCode == materielCode).ToList();
+
+ if (inboundOrderDetails == null || inboundOrderDetails.Count <= 0)
+ {
+ return WebResponseContent.Instance.Error($"鏈湪鍏ュ簱鍗曟槑缁嗕腑鎵惧埌璇ョ墿鏂欎俊鎭�");
+ }
+ foreach (var model in models)
+ {
+ if (!inboundOrderDetails.Any(x => x.BatchNo == model.LotNo))
+ return WebResponseContent.Instance.Error($"鏈湪鍏ュ簱鍗曟槑缁嗕腑鎵惧埌璇ョ墿鏂欐壒娆°�恵model.LotNo}銆�");
+ }
+ if (receiveOrder.Details.FirstOrDefault(x => x.MaterielCode == materielCode) == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈湪鏀惰揣鍗曟槑缁嗕腑鎵惧埌璇ョ墿鏂欎俊鎭�");
+ }
+ float beforeQuantity = 0;
+ Dt_StockInfo stockInfo = new Dt_StockInfo()
+ {
+ PalletCode = DateTime.Now.ToString("yyyyMMddHHmmss"),
+ StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt(),
+ WarehouseId = inboundOrder.WarehouseId,
+ PalletType = PalletTypeEnum.SmallPallet.ObjToInt(),
+ LocationCode = "骞冲簱浣�",
+ Details = new List<Dt_StockInfoDetail>()
+ };
+
+ List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
+ List<int> detailKeys = new List<int>();
+ foreach (var model in models)
+ {
+ if (purchaseOrderNos.FirstOrDefault(x => x == model.PurchaseOrderNo) == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈湪鏀惰揣鍗曟槑缁嗕腑鎵惧埌璇ラ噰璐崟");
+ }
+
+ Dt_InboundOrderDetail? notGroupDetail = inboundOrderDetails.Where(x => x.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt() && x.OrderQuantity == model.Quantity && !detailKeys.Contains(x.Id) && x.OrderQuantity > x.ReceiptQuantity).FirstOrDefault();
+
+ if (notGroupDetail == null)
+ {
+ return WebResponseContent.Instance.Error($"璇ョ墿鏂欏湪璇ュ叆搴撳崟涓凡鍏ㄩ儴缁勭洏瀹屾垚");
+ }
+ detailKeys.Add(notGroupDetail.Id);
+
+ Dt_StockInfoDetail stockInfoDetail = new Dt_StockInfoDetail()
+ {
+ BatchNo = model.LotNo,
+ MaterielCode = materielInfo.MaterielCode,
+ MaterielName = materielInfo.MaterielName,
+ OrderNo = inboundOrder.InboundOrderNo,
+ SerialNumber = model.SerialNumber,
+ StockQuantity = model.Quantity,
+ OutboundQuantity = 0,
+ Unit = materielInfo.MaterielUnit,
+ Status = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt(),
+ ProductionDate = model.ProductionDate,
+ EffectiveDate = model.EffectiveDate,
+ InboundOrderRowNo = notGroupDetail.RowNo,
+ };
+
+ if (stockInfo.Id > 0)
+ {
+ stockInfoDetail.StockId = stockInfo.Id;
+ }
+ stockInfo.Details.Add(stockInfoDetail);
+
+ stockInfoDetails.Add(stockInfoDetail);
+
+ notGroupDetail.ReceiptQuantity = model.Quantity;
+ notGroupDetail.OverInQuantity = model.Quantity;
+ notGroupDetail.OrderDetailStatus = OrderDetailStatusEnum.Over.ObjToInt();
+ }
+
+ //鍏ュ簱鏄庣粏鏂板瀹屾垚鏁伴噺
+ int newCount = inboundOrderDetails.Where(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()).ToList().Count;
+ if (inboundOrder.Details.Count == (newCount + oldCount))
+ {
+ inboundOrder.OrderStatus = InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt();
+ }
+ else
+ inboundOrder.OrderStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
+ float totalQuantity = stockInfo.Details.Sum(x => x.StockQuantity);
+
+ _unitOfWorkManage.BeginTran();
+ if (stockInfo.Id == 0)
+ {
+ _stockRepository.StockInfoRepository.Db.InsertNav(stockInfo).Include(x => x.Details).ExecuteCommand();
+ }
+ else
+ {
+ _stockRepository.StockInfoRepository.Db.UpdateNav(stockInfo).Include(x => x.Details, new UpdateNavOptions() { OneToManyInsertOrUpdate = true }).ExecuteCommand();
+ }
+ _inboundRepository.InboundOrderDetailRepository.UpdateData(inboundOrderDetails);
+ _inboundRepository.InboundOrderRepository.UpdateData(inboundOrder);
+ _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfoDetails, beforeQuantity, totalQuantity, StockChangeTypeEnum.Inbound);
+ _unitOfWorkManage.CommitTran();
+ content.OK();
+ }
+ catch (Exception ex)
+ {
+ _unitOfWorkManage.RollbackTran();
+ content.Error(ex.Message);
+ }
+ return content;
+ }
+
/// <summary>
/// 缁勭洏
/// </summary>
@@ -440,6 +602,7 @@
return content;
}
+
public WebResponseContent MaterielGroup(string palletCode, int Initiallife, int warehouseId, List<string> serNums)
{
WebResponseContent content = new WebResponseContent();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs"
index ab94fc4..9f97d1b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs"
@@ -92,13 +92,13 @@
Dt_PurchaseOrderDetail? purchaseOrderDetail = purchaseOrder.Details.FirstOrDefault(x => x.MaterielCode == model.MaterielCode && (x.PurchaseDetailStatus == PurchaseOrderDetailStatusEnum.NotReceived.ObjToInt() || x.PurchaseDetailStatus == PurchaseOrderDetailStatusEnum.Receiving.ObjToInt()));
if (purchaseOrderDetail == null)
{
- return WebResponseContent.Instance.Error($"璇ユ槑缁嗘敹璐у凡瀹屾垚");
+ return WebResponseContent.Instance.Error($"璇ラ噰璐崟鏄庣粏鏀惰揣宸插畬鎴�");
}
//鍒ゆ柇鏄惁瀛樺湪瀵瑰簲閲囪喘鏄庣粏鐨勬敹璐ф槑缁�
Dt_ReceiveOrderDetail? detail = receiveOrder.Details.FirstOrDefault(x => x.PurchaseOrderNo == model.PurchaseOrderNo && x.PurchaseOrderDetailRowNo == purchaseOrderDetail.RowNo);
if (detail != null && detail.ReceivedQuantity == purchaseOrderDetail.PurchaseDetailQuantity)
{
- return WebResponseContent.Instance.Error($"璇ユ槑缁嗗凡鏀惰揣");
+ return WebResponseContent.Instance.Error($"璇ユ敹璐у崟鏄庣粏宸叉敹璐�");
}
lock (_rowNoLocker)
@@ -116,13 +116,21 @@
{
purchaseOrderDetail.PurchaseDetailStatus = PurchaseOrderDetailStatusEnum.Received.ObjToInt();
}
- float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty) + model.Quantity;
- _unitOfWorkManage.BeginTran();
+ else
+ {
+ purchaseOrderDetail.PurchaseDetailStatus = PurchaseOrderDetailStatusEnum.Receiving.ObjToInt();
+ }
+ float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty); //+ model.Quantity;
if (purchaseOrder.OrderQuantity == sumQty)
{
purchaseOrder.PurchaseOrderStatus = PurchaseOrderStatusEnum.Received.ObjToInt();
- _inboundRepository.PurchaseOrderRepository.UpdateData(purchaseOrder);
}
+ else
+ {
+ purchaseOrder.PurchaseOrderStatus = PurchaseOrderStatusEnum.Receiving.ObjToInt();
+ }
+ _unitOfWorkManage.BeginTran();
+ _inboundRepository.PurchaseOrderRepository.UpdateData(purchaseOrder);
BaseDal.UpdateData(detail);
_inboundRepository.PurchaseOrderDetailRepository.UpdateData(purchaseOrderDetail);
_unitOfWorkManage.CommitTran();
@@ -174,7 +182,7 @@
{
purchaseOrderDetail.PurchaseDetailStatus = PurchaseOrderDetailStatusEnum.Received.ObjToInt();
}
- float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty) + model.Quantity;
+ float sumQty = purchaseOrder.Details.Sum(x => x.PurchaseDetailReceiveQty);// + model.Quantity;
_unitOfWorkManage.BeginTran();
BaseDal.AddData(receiveOrderDetail);
if (purchaseOrder.OrderQuantity == sumQty)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs"
index 42e77bf..88a2d16 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderService.cs"
@@ -151,8 +151,10 @@
receiveOrder.ReceiveOrderStatus = ReceiveOrderStatusEnum.Completed.ObjToInt();
receiveOrder.UploadStatus = WhetherEnum.True.ObjToInt();
BaseDal.UpdateData(receiveOrder);
+ //鍒涘缓鍏ュ簱鍗�
+ CreateInboundOrder(orderId);
//鏀惰揣鎺ㄩ�佽嚦ERP 娴嬭瘯娉ㄩ噴
- _invokeERPService.InvokeMatReceiveApi(receiveModel);
+ //_invokeERPService.InvokeMatReceiveApi(receiveModel);
return WebResponseContent.Instance.OK();
}
catch (Exception ex)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
index 3a1f80b..d4e21aa 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
@@ -119,6 +119,10 @@
var palletCode = saveModel.MainData["barcode"].ToString();
var warehouseId = saveModel.MainData["warehouseId"].ObjToInt();
Dt_StockInfo stockInfo = BaseDal.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode && x.WarehouseId == warehouseId).Includes(x => x.Details).First();
+ if (stockInfo.StockStatus != StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt())
+ {
+ throw new Exception($"璇ユ墭鐩樿繕鏈嚭搴撳畬鎴�");
+ }
if (stockInfo == null)
{
throw new Exception($"鏈壘鍒板簱瀛樹俊鎭�");
@@ -128,7 +132,7 @@
{
throw new Exception($"鏈壘鍒板簱瀛樿鎯�");
}
- List<Dt_OutStockLockInfo> stockLockInfos = BaseDal.QueryData(x => x.StockId == stockInfo.Id && x.Status < OutLockStockStatusEnum.鍑哄簱瀹屾垚.ObjToInt());
+ List<Dt_OutStockLockInfo> stockLockInfos = BaseDal.QueryData(x => x.StockId == stockInfo.Id && x.Status == OutLockStockStatusEnum.鍑哄簱瀹屾垚.ObjToInt());
return stockLockInfos;
}
catch (Exception ex)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService_Pick.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService_Pick.cs"
index e5e22ed..59ae7a4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService_Pick.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService_Pick.cs"
@@ -39,7 +39,7 @@
List<Dt_OutStockLockInfo> outStockLockInfos = Repository.QueryData(x => x.PalletCode == palletCode);
for (int i = 0; i < outStockLockInfos.Count; i++)
{
- outStockLockInfos[i].Status = OutLockStockStatusEnum.鍑哄簱瀹屾垚.ObjToInt();
+ outStockLockInfos[i].Status = OutLockStockStatusEnum.鎷i�夊畬鎴�.ObjToInt();
}
List<Dt_StockInfoDetail> beforeDetaile = stockInfo.Details.GroupBy(x => x.MaterielCode).Select(x => new Dt_StockInfoDetail { MaterielCode = x.Key, StockQuantity = x.Sum(v => v.StockQuantity) }).ToList();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index 3342065..11f64c7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -16,6 +16,7 @@
#endregion << 鐗� 鏈� 娉� 閲� >>
using AutoMapper;
+using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Newtonsoft.Json;
using SqlSugar;
using System.Reflection.Emit;
@@ -120,6 +121,24 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
+ /// <summary>
+ /// 鏀捐揣瀹屾垚
+ /// </summary>
+ /// <param name="code"></param>
+ /// <returns></returns>
+ public WebResponseContent PutFinish(string code)
+ {
+ try
+ {
+ string response = HttpHelper.Post("http://127.0.0.1:9281/api/CTU_AGV/PutFinish", code);
+
+ return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("杩斿洖閿欒");
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
/// <summary>
/// 鍏ュ簱浠诲姟瀹屾垚
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index a129365..7e410ca 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -1,4 +1,6 @@
-锘縰sing System;
+锘縰sing OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
+using System;
+using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -109,7 +111,96 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
+ /// <summary>
+ /// 鍏ョ┖绠�
+ /// </summary>
+ /// <returns></returns>
+ public WebResponseContent InEmpty(string barcode, string address, int WarehouseId)
+ {
+ try
+ {
+ Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == WarehouseId);
+ if (warehouse == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒板簱鍖�");
+ }
+ Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == barcode && x.StockStatus != StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt());
+ if (stockInfo != null) throw new Exception($"鎵樼洏鍙峰凡瀛樺湪");
+ stockInfo = new Dt_StockInfo()
+ {
+ PalletCode = barcode,
+ StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt(),
+ WarehouseId = WarehouseId,
+ PalletType = PalletTypeEnum.Empty.ObjToInt(),
+ Details = new List<Dt_StockInfoDetail>()
+ };
+ Dt_LocationInfo locationInfo = _basicRepository.LocationInfoRepository.QueryFirst(x => x.WarehouseId == WarehouseId);
+ if (locationInfo == null) return WebResponseContent.Instance.Error($"鏈壘鍒板綋鍓嶅簱鍖鸿揣浣嶄俊鎭�");
+ locationInfo = _basicService.LocationInfoService.AssignLocation(locationInfo.RoadwayNo, (PalletTypeEnum)stockInfo.PalletType, stockInfo.WarehouseId);
+ if (locationInfo == null)
+ {
+ return WebResponseContent.Instance.Error($"璐т綅鍒嗛厤澶辫触,鏈壘鍒板彲鍒嗛厤璐т綅");
+ }
+ Dt_Task newTask = new Dt_Task()
+ {
+ CurrentAddress = address,
+ Grade = 0,
+ NextAddress = locationInfo.LocationCode,
+ PalletCode = barcode,
+ Roadway = locationInfo.RoadwayNo,
+ SourceAddress = address,
+ TargetAddress = locationInfo.LocationCode,
+ TaskType = TaskTypeEnum.Inbound.ObjToInt(),
+ TaskStatus = TaskStatusEnum.New.ObjToInt(),
+ WarehouseId = stockInfo.WarehouseId,
+ PalletType = stockInfo.PalletType
+ };
+
+ _unitOfWorkManage.BeginTran();
+ int taskId = BaseDal.AddData(newTask);
+ newTask.TaskId = taskId;
+ _stockRepository.StockInfoRepository.AddData(stockInfo);
+ _unitOfWorkManage.CommitTran();
+ PushTasksToWCS(new List<Dt_Task> { newTask });
+ PutFinish(address);
+ return WebResponseContent.Instance.OK();
+ }
+ catch (Exception ex)
+ {
+ _unitOfWorkManage.RollbackTran();
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
+ public WebResponseContent OutEmpty(int qty, string address, int WarehouseId)
+ {
+ try
+ {
+ Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == WarehouseId);
+ if (warehouse == null)
+ {
+ 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}鏈壘鍒扮┖绠卞簱瀛�");
+ if (stockInfos.Count < qty) return WebResponseContent.Instance.Error($"{warehouse.WarehouseName}绌虹搴撳瓨涓嶈冻,搴撳瓨鏁般�恵stockInfos.Count}銆�");
+ List<Dt_Task> tasks = GetTasks(stockInfos);
+ stockInfos.ForEach(x =>
+ {
+ x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
+ });
+ _unitOfWorkManage.BeginTran();
+ BaseDal.AddData(tasks);
+ _stockRepository.StockInfoRepository.UpdateData(stockInfos);
+ _unitOfWorkManage.CommitTran();
+ PushTasksToWCS(tasks);
+ return WebResponseContent.Instance.OK();
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
public WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode)
{
try
@@ -179,6 +270,7 @@
WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask);
PushTasksToWCS(new List<Dt_Task> { newTask });
+ if (newTask.WarehouseId == 5) PutFinish(stationCode);
return WebResponseContent.Instance.OK(data: wMSTaskDTO);
}
catch (Exception ex)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
index 5109a00..6b6894e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
@@ -30,6 +30,18 @@
}
/// <summary>
+ /// 鍏ュ钩搴�
+ /// </summary>
+ /// <param name="orderNo"></param>
+ /// <param name="warehouseId"></param>
+ /// <param name="serNums"></param>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("InPinKu")]
+ public WebResponseContent InPinKu(string orderNo, int warehouseId, [FromBody] List<string> serNums)
+ {
+ return Service.InPinKu(orderNo, warehouseId, serNums);
+ }
+ /// <summary>
/// 鍗曚釜鐗╂枡鐮佺粍鐩�
/// </summary>
/// <param name="inboundOrderId"></param>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
index 343e79e..e63682a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -44,12 +44,29 @@
}
/// <summary>
- ///
+ /// 绌虹鍏ュ簱
/// </summary>
- /// <param name="stationCode"></param>
- /// <param name="roadwayNo"></param>
- /// <param name="palletCode"></param>
+ /// <param name="barcode">鎵樼洏鍙�</param>
+ /// <param name="address">鍦板潃</param>
/// <returns></returns>
+ [HttpPost, HttpGet, Route("InEmpty"), AllowAnonymous]
+ public WebResponseContent InEmpty(string barcode, string address, int WarehouseId)
+ {
+ return Service.InEmpty(barcode, address, WarehouseId);
+ }
+
+ /// <summary>
+ /// 绌虹鍑哄簱
+ /// </summary>
+ /// <param name="qty">鏁伴噺</param>
+ /// <param name="address">鍦板潃</param>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("OutEmpty"), AllowAnonymous]
+ public WebResponseContent OutEmpty(int qty, string address, int WarehouseId)
+ {
+ return Service.OutEmpty(qty, address, WarehouseId);
+ }
+
[HttpPost, HttpGet, Route("DeviceRequestInboundTask"), AllowAnonymous]
public WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode)
{
@@ -86,7 +103,7 @@
/// <param name="stockSelectViews"></param>
/// <returns></returns>
[HttpPost, HttpGet, Route("GenerateOutboundTask"), AllowAnonymous]
- public WebResponseContent GenerateOutboundTask(int orderDetailId, [FromBody]List<StockSelectViewDTO> stockSelectViews)
+ public WebResponseContent GenerateOutboundTask(int orderDetailId, [FromBody] List<StockSelectViewDTO> stockSelectViews)
{
return Service.GenerateOutboundTask(orderDetailId, stockSelectViews);
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages.json"
index cfd92e1..2db61c0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages.json"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages.json"
@@ -52,6 +52,27 @@
}
},
{
+ "path": "pages/stash/AGVFinish",
+ "style": {
+ "navigationBarTitleText": "AGV瀹屾垚",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
+ "path": "pages/stash/InEmpty",
+ "style": {
+ "navigationBarTitleText": "绌虹鍏ュ簱",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
+ "path": "pages/stash/OutEmpty",
+ "style": {
+ "navigationBarTitleText": "绌虹鍑哄簱",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
"path": "pages/stash/pickingMat",
"style": {
"navigationBarTitleText": "鎷i��",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/AGVFinish.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/AGVFinish.vue"
new file mode 100644
index 0000000..ba5b96f
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/AGVFinish.vue"
@@ -0,0 +1,92 @@
+<template>
+ <view>
+ <view class="itemstyle">
+ <uni-forms label-width="180">
+ <uni-forms-item label="鎵樼洏鏉$爜:">
+ <uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="!focus" v-model="barcode"
+ @input="barcodeInput" />
+ </uni-forms-item>
+ <uni-forms-item>
+ <button @click="AGVFinish" type="primary" size="default" style="margin-top: 2%;">纭瀹屾垚</button>
+ </uni-forms-item>
+ </uni-forms>
+ </view>
+ <u-toast ref="uToast" />
+ </view>
+</template>
+
+<script>
+ const innerAudioContext = uni.createInnerAudioContext();
+ export default {
+ data() {
+ return {
+ focus: false,
+ barcode: "",
+ }
+ },
+ onShow() {},
+ onLoad(res) {
+ this.focus = false;
+ },
+ methods: {
+ voiceSpeech(src) {
+ innerAudioContext.src = src; // '../../static/success.mp3';
+ innerAudioContext.play();
+ },
+ barcodeInput() {
+ this.$nextTick(function(x) {
+ if (this.barcode.length > 0) {
+ this.focus = true;
+ }
+ })
+ },
+ AGVFinish() {
+ if (this.barcode == "") {
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻忔墭鐩樼爜",
+ type: 'error'
+ })
+ return;
+ }
+ this.$u.post('http://127.0.0.1:9291/api/CTU_AGV/AGVFinish?&barcode=' + this.barcode).then(
+ res => {
+ if (res.status) {
+ this.$refs.uToast.show({
+ title: "瀹屾垚鎴愬姛",
+ type: "success"
+ })
+ this.barcode = "";
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: "error"
+ })
+ }
+ })
+ },
+ }
+ }
+</script>
+
+<style lang="scss">
+ @import '@/common/uni-ui.scss';
+
+ .content {
+ display: flex;
+ height: 150px;
+ }
+
+ .content-text {
+ font-size: 14px;
+ color: #666;
+ }
+
+ .itemstyle {
+ margin-top: 30px;
+ margin-left: 5%;
+ }
+
+ .headerstyle {
+ width: 90%;
+ }
+</style>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/InEmpty.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/InEmpty.vue"
new file mode 100644
index 0000000..eaf7329
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/InEmpty.vue"
@@ -0,0 +1,99 @@
+<template>
+ <view>
+ <view class="itemstyle">
+ <uni-forms label-width="180">
+ <uni-forms-item label="鎵樼洏鏉$爜:">
+ <uni-easyinput type="text" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' :focus="!focus" v-model="barcode"
+ @input="barcodeInput" />
+ </uni-forms-item>
+ <uni-forms-item>
+ <button @click="InEmpty" type="primary" size="default" style="margin-top: 2%;">绌虹鍏ュ簱</button>
+ </uni-forms-item>
+ </uni-forms>
+ </view>
+ <u-toast ref="uToast" />
+ </view>
+</template>
+
+<script>
+ const innerAudioContext = uni.createInnerAudioContext();
+ export default {
+ data() {
+ return {
+ focus: false,
+ barcode: "",
+ address: "",
+ WarehouseId: ""
+ }
+ },
+ onShow() {},
+ onLoad(res) {
+ this.WarehouseId = res.warehouseId;
+ this.focus = false;
+ if (res.warehouseId == 5) {
+ this.address = "8005";
+ }
+ },
+ methods: {
+ voiceSpeech(src) {
+ innerAudioContext.src = src; // '../../static/success.mp3';
+ innerAudioContext.play();
+ },
+ barcodeInput() {
+ this.$nextTick(function(x) {
+ if (this.barcode.length > 0) {
+ this.focus = true;
+ }
+ })
+ },
+ InEmpty() {
+ if (this.barcode == "") {
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻忔墭鐩樼爜",
+ type: 'error'
+ })
+ return;
+ }
+ this.$u.post('/api/Task/InEmpty?barcode=' + this.barcode + '&address=' + this.address + '&WarehouseId=' +
+ this.WarehouseId).then(
+ res => {
+ if (res.status) {
+ this.$refs.uToast.show({
+ title: "鎴愬姛",
+ type: "success"
+ })
+ this.barcode = "";
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: "error"
+ })
+ }
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ @import '@/common/uni-ui.scss';
+
+ .content {
+ display: flex;
+ height: 150px;
+ }
+
+ .content-text {
+ font-size: 14px;
+ color: #666;
+ }
+
+ .itemstyle {
+ margin-top: 30px;
+ margin-left: 5%;
+ }
+
+ .headerstyle {
+ width: 90%;
+ }
+</style>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/InPinku.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/InPinku.vue"
deleted file mode 100644
index 34a0abe..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/InPinku.vue"
+++ /dev/null
@@ -1,522 +0,0 @@
-<template>
- <view>
- <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem">
- </uni-segmented-control>
- <view class="content">
- <view v-if="current === 0" class="headerstyle">
- <view class="itemstyle">
- <uni-forms label-width="180">
- <uni-forms-item label="鍐呯鏍囩:">
- <uni-easyinput type="text" placeholder="璇锋壂鎻忓唴绠辨爣绛�" ref='midInput' :focus="focus"
- v-model="materSn" @input="snInput" />
- </uni-forms-item>
- <uni-forms-item>
- <button @click="submit" type="primary" size="default" style="margin-top: 2%;">鍏ュ钩搴�</button>
- </uni-forms-item>
- </uni-forms>
- <uni-list>
- <uni-list-item direction="column" v-for="(item,index) in matInfos" :key="index">
- <template v-slot:body>
- <view class="uni-list-box">
- <uni-icons type="trash" size="22" style="position: absolute;right: 5%;"
- @click="deleteList(index)">
- </uni-icons>
- <view class="uni-content">
- <view class="uni-title-sub uni-ellipsis-2">閲囪喘鍗曞彿锛歿{item.purchaseOrderNo}}</view>
- <view class="uni-note">鐗╂枡缂栫爜锛歿{item.materielCode}}</view>
- <view class="uni-note">鎵规鍙凤細{{item.lotNo}}</view>
- <view class="uni-note">鏁伴噺锛歿{item.quantity}}</view>
- <view class="uni-note">鐢熶骇鏃ユ湡锛歿{item.productionDate}}</view>
- <view class="uni-note">鏈夋晥鏈燂細{{item.effectiveDate}}</view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
- </view>
- <view v-if="current === 1" class="headerstyle">
- <view class="itemstyle">
- <uni-forms label-width="120">
- <uni-forms-item label="鎵樼洏鏉$爜">
- <uni-easyinput type="text" :focus="!addressFocus" v-model="inboundBarcode"
- placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' @input="inputChangebarcode" />
- </uni-forms-item>
- <uni-forms-item label="鍦板潃鏉$爜">
- <uni-easyinput type="text" v-model="address" placeholder="璇锋壂鎻忓湴鍧�鏉$爜" ref='midInput'
- :focus="addressFocus" />
- </uni-forms-item>
- <uni-forms-item>
- <button @click="inbound" type="primary" size="default" style="margin-top: 2%;">鍏ュ簱纭</button>
- </uni-forms-item>
- </uni-forms>
- </view>
- </view>
- <view v-if="current === 2" class="headerstyle">
- <view class="itemstyle">
- <uni-list :border="true">
- <uni-list-item direction="column" v-for="(item,index) in orderInfo" :key="index">
- <template v-slot:body>
- <view class="uni-list-box">
- <view class="uni-content">
- <view style="font-size: 18px;">鍗曟嵁鍙凤細{{orderNo}}</view>
- <view style="font-size: 18px;">鐗╂枡缂栫爜锛歿{item.materielCode}}</view>
- <!-- <view style="font-size: 18px;">鐗╂枡鍚嶇О锛歿{item.matName}}</view> -->
- <view style="font-size: 18px;">鏁伴噺锛歿{item.orderQuantity}}</view>
- <view style="font-size: 18px;">鍗曚綅锛歿{item.unit}}</view>
- <view style="font-size: 18px;">缁勭洏鏁伴噺锛歿{item.receiptQuantity}}</view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
- </view>
- <view v-if="current === 3" class="headerstyle">
- <view class="itemstyle">
- <uni-forms label-width="120">
- <uni-forms-item>
- <uni-easyinput type="text" @input="releaseboxInput" v-model="value" placeholder="璇锋壂鐮�"
- ref='midInput' :focus="true" />
- </uni-forms-item>
- <uni-forms-item>
- <button @click="releasebox" type="primary" size="default">瑙g洏</button>
- </uni-forms-item>
- </uni-forms>
- <uni-list>
- <uni-list-item direction="column" v-if="value2">
- <template v-slot:body>
- <view class="uni-list-box">
- <view class="uni-content">
- <view class="uni-title-sub uni-ellipsis-2">鎵樼洏鍙凤細{{value2}}</view>
- </view>
- </view>
- </template>
- </uni-list-item>
- <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode">
- <template v-slot:body>
- <view class="uni-list-box">
- <view class="uni-content">
- <view class="uni-title-sub uni-ellipsis-2">鐗╂枡缂栫爜锛歿{item.matCode}}</view>
- <view class="uni-title-sub uni-ellipsis-2">鏁伴噺锛歿{item.matQuantity}}</view>
- </view>
- </view>
- </template>
- </uni-list-item>
-
- <uni-list-item direction="column" v-for="(item,index) in matInfo" :key="index">
- <template v-slot:body>
- <view class="uni-list-box">
- <view class="uni-content">
- <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">
- 鐗╂枡缂栫爜锛歿{item.matCode}}
- </view>
- <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">
- 鐗╂枡鍚嶇О锛歿{item.matName}}
- </view>
- <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">
- 鏁伴噺锛歿{item.matQty}}
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
- </view>
- </view>
- <u-toast ref="uToast" />
- </view>
-</template>
-
-<script>
- const innerAudioContext = uni.createInnerAudioContext();
- export default {
- data() {
- return {
- items: ['鍏ュ钩搴�'], //, '鍏ュ簱', '鍗曟嵁淇℃伅', '瑙g洏'
- current: 0,
- matTotal: [],
- matInfos: [],
- orderNo: "",
- label: "",
- orderInfo: [],
- focus: false,
- barcode: "",
- materSn: "",
- Initiallife: 1000,
- sns: [],
- sn: "",
- addressFocus: false,
- inboundBarcode: "",
- address: "",
- check: true,
- value: "",
- matInfo: [],
- value2: "",
- matTotals: [],
- warehouseId: "",
- Test: false,
- Testlabel: "",
- Testplaceholder: "",
- Testcheck: false,
- }
- },
- onShow() {},
- onLoad(res) {
- this.focus = false;
- this.addressFocus = false;
- this.orderNo = res.orderNo;
- this.warehouseId = res.warehouseId;
- if (this.warehouseId == 6) { //娴嬭瘯鏋朵粨搴撳尯ID
- this.Test = true;
- this.Testlabel = "鍒濆瀵垮懡:";
- this.Testplaceholder = "璇疯緭鍏ュ垵濮嬪鍛�";
- } else if (this.warehouseId == 2) { //娌瑰ⅷ浠撳簱鍖篒D
- this.Test = true;
- this.Testlabel = "鏁伴噺:";
- this.Testplaceholder = "璇疯緭鍏ユ暟閲�";
- this.Initiallife = 16;
- } else if (this.warehouseId == 5) { //杈呮枡浠撳簱鍖篒D
- this.address = "8005";
- }
- this.label = "鍗曟嵁缂栧彿锛�" + this.orderNo;
- this.getData();
- },
- methods: {
- voiceSpeech(src) {
- innerAudioContext.src = src; // '../../static/success.mp3';
- innerAudioContext.play();
- },
- //瑙g洏
- releasebox() {
- if (this.value.length == 0) {
- this.$refs.uToast.show({
- title: "璇锋壂鐮�",
- type: "error"
- })
- return;
- }
- var param;
- var matInfo = this.value.split('|');
- if (matInfo.length == 7) {
- param = {
- MainData: {
- "innerCode": this.value
- }
- }
- } else {
- param = {
- MainData: {
- "barcode": this.value
- }
- }
- }
- this.$u.post('/api/StockOperate/ReleaseAllBox', param).then(resdt => {
- if (resdt.status) {
- uni.$showMsg('瑙g洏鎴愬姛!')
- this.value = "";
- this.matInfo = [];
- this.matTotals = [];
- this.value2 = "";
- } else {
- this.$refs.uToast.show({
- title: resdt.message,
- type: "error"
- })
- }
- })
- },
- releaseboxInput() {
- this.$nextTick(() => {
- if (this.value.length == 0) {
- return;
- }
- var matInfo = this.value.split('|');
- this.matInfo = [];
- if (matInfo.length == 7) {
- this.$u.post('/api/StockOperate/GetStockInfoByInnerCode', {
- MainData: {
- "innerCode": this.value
- }
- }).then(res => {
- if (res.status) {
- this.matInfo = res.data.stockInfo;
- this.matTotals = res.data.stockTotal;
- this.value2 = res.data.barcode;
- } else {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- }
- })
- } else {
- this.$u.post('/api/StockOperate/GetStockInfoByBarcode', {
- MainData: {
- "barcode": this.value
- }
- }).then(res => {
- if (res.status) {
- this.matInfo = res.data.stockInfo;
- this.matTotals = res.data.stockTotal;
- this.value2 = res.data.barcode;
- } else {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- }
- })
- }
- })
- },
-
- updateFocus() {
- debugger
- this.$nextTick(() => {
- this.materSn = '';
- if (!this.focus) {
- this.focus = true;
- }
- });
- },
- barcodeFocus() {
- debugger
- this.barcode = '';
- if (this.focus) {
- this.focus = false;
- }
- },
- getData() {
- var postData = {
- MainData: {
- orderNo: this.orderNo
- },
- }
- this.$u.post('/api/InboundOrderDetail/GetInboundOrderDetails', postData).then((res) => {
- if (res.status) {
- this.orderInfo = res.data;
- if (this.orderInfo.length > 3) {
- this.loadVisible = true;
- }
- }
- })
- },
- onClickItem(e) {
- this.focus = false;
- this.addressFocus = false;
- if (this.current !== e.currentIndex) {
- this.current = e.currentIndex;
- if (this.current == 2) {
- this.getData();
- }
- }
- },
- barcodeInput() {
- this.$nextTick(function(x) {
- if (this.barcode.length > 0) {
- // if (this.barcode.substring(0, 1) == 'A' || this.barcode.substring(0, 2) == 'TP') {
- this.focus = true;
- // } else {
- // this.$refs.uToast.show({
- // title: "鎵爜閿欒,璇锋壂鎻忔墭鐩樼爜",
- // type: "error"
- // })
- // }
- }
- })
- },
- snInput() {
- this.$nextTick(() => {
- if (this.warehouseId == 6 || this.warehouseId == 2) {
- if (this.sns.length > 0) {
- this.sns = [];
- }
- }
- if (this.materSn != "") {
- this.focus = false;
- var matSn = this.materSn;
- setTimeout(() => {
- this.materSn = "";
- }, 10);
- this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => {
- this.Testcheck = false;
- if (res.status) {
- this.sns.push(res.data.serialNumber);
- if (this.warehouseId == 6 || this.warehouseId == 2) {
- if (this.matInfos.length > 0) {
- this.matInfos = [];
- }
- }
- this.matInfos.push(res.data);
- if (res.message) {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- setTimeout(() => {
- this.voiceSpeech('../../static/fail.mp3');
- }, 100);
- return;
- }
- setTimeout(() => {
- this.voiceSpeech('../../static/success.mp3');
- }, 100);
- } else {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- setTimeout(() => {
- this.voiceSpeech('../../static/fail.mp3');
- }, 100);
- }
- })
- }
- })
- },
- inbound() {
- if (this.inboundBarcode == "") {
- this.$refs.uToast.show({
- title: "璇锋壂鎻忔墭鐩樻潯鐮�",
- type: "error"
- })
- return;
- }
- if (this.address == "") {
- this.$refs.uToast.show({
- title: "璇锋壂鎻忓湴鍧�鏉$爜",
- type: "error"
- })
- return;
- }
- var postData = {
- MainData: {
- "barcode": this.inboundBarcode,
- "startPoint": this.address,
- "warehouseId": this.warehouseId
- }
- }
- this.$u.post('/api/Task/RequestInboundTask', postData).then(res => {
- if (res.status) {
- uni.$showMsg(res.message);
- this.inboundBarcode = "";
- this.address = "";
- setTimeout(() => {
- this.addressFocus = false;
- }, 200);
- } else {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- }
- }).catch(err => {
- this.$refs.uToast.show({
- title: err.message,
- type: "error"
- })
- })
- },
- inputChangebarcode() {
- this.addressFocus = false;
- this.$nextTick(function(x) {
- if (this.inboundBarcode != '') {
- this.addressFocus = true;
- }
- })
- },
- deleteList(res) {
- this.matInfos.splice(res, 1);
- this.sns.splice(res, 1);
- },
- submit() {
- if (this.barcode == "") {
- this.$refs.uToast.show({
- title: "璇锋壂鎻忔墭鐩樻潯鐮�",
- type: 'error'
- })
- return;
- }
- if (this.matInfos.length == 0) {
- this.$refs.uToast.show({
- title: "璇锋壂鎻忓唴绠辨爣绛�",
- type: 'error'
- })
- return;
- }
- if (this.Test) {
- if (!this.Testcheck) {
- this.Testcheck = true;
- if (this.warehouseId == 2) {
- this.$refs.uToast.show({
- title: "璇风‘璁ゆ暟閲�",
- type: 'error'
- })
- } else if (this.warehouseId == 6) {
- this.$refs.uToast.show({
- title: "璇风‘璁ゅ垵濮嬪鍛�",
- type: 'error'
- })
- }
- return;
- }
- }
- if (this.warehouseId == 2) { //娌瑰ⅷ浠撳簱鍖篒D
- this.sn = this.sns[0];
- debugger
- for (var i = 0; i < this.Initiallife - 1; i++) {
- this.sns.push(this.sn);
- }
- }
- debugger
- let url = 'palletCode=' + this.barcode + '&initiallife=' + this.Initiallife + '&warehouseId=' + this
- .warehouseId;
-
- this.$u.post('/api/InboundOrder/ManualMaterielGroup?' + url, this.sns).then(res => {
- this.Testcheck = false;
- if (res.status) {
- this.$refs.uToast.show({
- title: "缁勭洏鎴愬姛",
- type: "success"
- })
- this.focus = false;
- this.barcode = "";
- this.matInfos = [];
- this.sns = [];
- this.matTotal = [];
- } else {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- }
- })
- }
- }
- }
-</script>
-
-<style lang="scss">
- @import '@/common/uni-ui.scss';
-
- .content {
- display: flex;
- height: 150px;
- }
-
- .content-text {
- font-size: 14px;
- color: #666;
- }
-
- .itemstyle {
- margin-top: 30px;
- margin-left: 5%;
- }
-
- .headerstyle {
- width: 90%;
- }
-</style>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/OutEmpty.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/OutEmpty.vue"
new file mode 100644
index 0000000..29b279b
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/OutEmpty.vue"
@@ -0,0 +1,98 @@
+<template>
+ <view>
+ <view class="itemstyle">
+ <uni-forms label-width="180">
+ <uni-forms-item label="鏁伴噺:">
+ <uni-easyinput type="text" placeholder="璇疯緭鍏ユ暟閲�" ref='midInput' :focus="!focus" v-model="qty"
+ @input="barcodeInput" />
+ </uni-forms-item>
+ <uni-forms-item>
+ <button @click="OutEmpty" type="primary" size="default" style="margin-top: 2%;">绌虹鍑哄簱</button>
+ </uni-forms-item>
+ </uni-forms>
+ </view>
+ <u-toast ref="uToast" />
+ </view>
+</template>
+
+<script>
+ const innerAudioContext = uni.createInnerAudioContext();
+ export default {
+ data() {
+ return {
+ focus: false,
+ qty: "",
+ address: "",
+ }
+ },
+ onShow() {},
+ onLoad(res) {
+ this.WarehouseId = res.warehouseId;
+ this.focus = false;
+ if (res.warehouseId == 5) {
+ this.address = "8001";
+ }
+ },
+ methods: {
+ voiceSpeech(src) {
+ innerAudioContext.src = src; // '../../static/success.mp3';
+ innerAudioContext.play();
+ },
+ barcodeInput() {
+ // this.$nextTick(function(x) {
+ // if (this.barcode.length > 0) {
+ // this.focus = true;
+ // }
+ // })
+ },
+ OutEmpty() {
+ if (this.qty == "") {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ユ暟閲�",
+ type: 'error'
+ })
+ return;
+ }
+ this.$u.post('/api/Task/OutEmpty?qty=' + this.qty + '&address=' + this.address + '&WarehouseId=' +
+ this.WarehouseId).then(
+ res => {
+ if (res.status) {
+ this.$refs.uToast.show({
+ title: "鎴愬姛",
+ type: "success"
+ })
+ this.qty = "";
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: "error"
+ })
+ }
+ })
+ },
+ }
+ }
+</script>
+
+<style lang="scss">
+ @import '@/common/uni-ui.scss';
+
+ .content {
+ display: flex;
+ height: 150px;
+ }
+
+ .content-text {
+ font-size: 14px;
+ color: #666;
+ }
+
+ .itemstyle {
+ margin-top: 30px;
+ margin-left: 5%;
+ }
+
+ .headerstyle {
+ width: 90%;
+ }
+</style>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/pickingMat.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/pickingMat.vue"
index bcc6231..22087ea 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/pickingMat.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/pickingMat.vue"
@@ -185,6 +185,10 @@
}
this.$u.post('/api/OutStockLockInfo/MaterialPick?palletCode=' + this.barcode, {}).then(res => {
if (res.status) {
+ if(this.warehouseId==5){
+ this.Finish("8005");
+ }
+
uni.$showMsg('鎷i�夋垚鍔�!')
this.barcode = "";
this.matInfos = [];
@@ -196,6 +200,23 @@
}
})
},
+ Finish(code){
+ this.$u.post('http://127.0.0.1:9291/api/CTU_AGV/PutFinish?&code=' + code).then(
+ res => {
+ if (res.status) {
+ // this.$refs.uToast.show({
+ // title: "瀹屾垚鎴愬姛",
+ // type: "success"
+ // })
+ // this.barcode = "";
+ } else {
+ // this.$refs.uToast.show({
+ // title: res.message,
+ // type: "error"
+ // })
+ }
+ })
+ },
inputChange(e) {
this.$nextTick(() => {
this.istrue = false;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/raworderboxing.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/raworderboxing.vue"
index 94cbf35..4aa1134 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/raworderboxing.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/raworderboxing.vue"
@@ -16,12 +16,12 @@
<uni-easyinput type="text" placeholder="璇锋壂鎻忓唴绠辨爣绛�" ref='midInput' :focus="focus"
v-model="materSn" @input="snInput" />
</uni-forms-item>
-
+
<uni-forms-item :label="Testlabel" v-if="Test">
<uni-easyinput type="text" :placeholder="Testplaceholder" ref='midInput'
v-model="Initiallife" />
</uni-forms-item>
-
+
<!-- <uni-forms-item>
<checkbox checked="check">鏄惁婊$洏</checkbox>
</uni-forms-item> -->
@@ -99,49 +99,29 @@
</view>
<view v-if="current === 3" class="headerstyle">
<view class="itemstyle">
- <uni-forms label-width="120">
- <uni-forms-item>
- <uni-easyinput type="text" @input="releaseboxInput" v-model="value" placeholder="璇锋壂鐮�"
- ref='midInput' :focus="true" />
+ <uni-forms label-width="180">
+ <uni-forms-item label="鍐呯鏍囩:">
+ <uni-easyinput type="text" placeholder="璇锋壂鎻忓唴绠辨爣绛�" ref='midInput' :focus="pkfocus"
+ v-model="pkmaterSn" @input="pksnInput" />
</uni-forms-item>
<uni-forms-item>
- <button @click="releasebox" type="primary" size="default">瑙g洏</button>
+ <button @click="pksubmit" type="primary" size="default" style="margin-top: 2%;">鍏ュ钩搴�</button>
</uni-forms-item>
</uni-forms>
<uni-list>
- <uni-list-item direction="column" v-if="value2">
+ <uni-list-item direction="column" v-for="(item,index) in pkmatInfos" :key="index">
<template v-slot:body>
<view class="uni-list-box">
+ <uni-icons type="trash" size="22" style="position: absolute;right: 5%;"
+ @click="pkdeleteList(index)">
+ </uni-icons>
<view class="uni-content">
- <view class="uni-title-sub uni-ellipsis-2">鎵樼洏鍙凤細{{value2}}</view>
- </view>
- </view>
- </template>
- </uni-list-item>
- <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode">
- <template v-slot:body>
- <view class="uni-list-box">
- <view class="uni-content">
- <view class="uni-title-sub uni-ellipsis-2">鐗╂枡缂栫爜锛歿{item.matCode}}</view>
- <view class="uni-title-sub uni-ellipsis-2">鏁伴噺锛歿{item.matQuantity}}</view>
- </view>
- </view>
- </template>
- </uni-list-item>
-
- <uni-list-item direction="column" v-for="(item,index) in matInfo" :key="index">
- <template v-slot:body>
- <view class="uni-list-box">
- <view class="uni-content">
- <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">
- 鐗╂枡缂栫爜锛歿{item.matCode}}
- </view>
- <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">
- 鐗╂枡鍚嶇О锛歿{item.matName}}
- </view>
- <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">
- 鏁伴噺锛歿{item.matQty}}
- </view>
+ <view class="uni-title-sub uni-ellipsis-2">閲囪喘鍗曞彿锛歿{item.purchaseOrderNo}}</view>
+ <view class="uni-note">鐗╂枡缂栫爜锛歿{item.materielCode}}</view>
+ <view class="uni-note">鎵规鍙凤細{{item.lotNo}}</view>
+ <view class="uni-note">鏁伴噺锛歿{item.quantity}}</view>
+ <view class="uni-note">鐢熶骇鏃ユ湡锛歿{item.productionDate}}</view>
+ <view class="uni-note">鏈夋晥鏈燂細{{item.effectiveDate}}</view>
</view>
</view>
</template>
@@ -167,10 +147,12 @@
label: "",
orderInfo: [],
focus: false,
+ pkfocus:false,
barcode: "",
materSn: "",
Initiallife: 1000,
sns: [],
+ pksns:[],
addressFocus: false,
inboundBarcode: "",
address: "",
@@ -184,6 +166,8 @@
Testlabel: "",
Testplaceholder: "",
Testcheck: false,
+ pkmaterSn: "",
+ pkmatInfos: []
}
},
onShow() {},
@@ -201,6 +185,10 @@
this.Testlabel = "鏁伴噺:";
this.Testplaceholder = "璇疯緭鍏ユ暟閲�";
this.Initiallife = 16;
+ } else if (this.warehouseId == 5) { //杈呮枡
+ this.items.push("鍏ュ钩搴�");
+ this.items[1] = "鍏ョ珛搴�";
+ this.address = "8005";
}
this.label = "鍗曟嵁缂栧彿锛�" + this.orderNo;
this.getData();
@@ -360,91 +348,70 @@
this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => {
this.Testcheck = false;
if (res.status) {
- // debugger
- // this.matTotal.push({
- // matCode: res.data.materielCode,
- // matQuantity: parseInt(res.data.quantity)
- // });
this.sns.push(res.data.serialNumber);
- // this.matInfos.splice(0, this.matInfos.length);
this.matInfos.push(res.data);
if (res.message) {
this.$refs.uToast.show({
title: res.message,
type: "error"
})
- // setTimeout(this.updateFocus,200);
setTimeout(() => {
this.voiceSpeech('../../static/fail.mp3');
}, 100);
return;
}
- // setTimeout(this.updateFocus,200);
setTimeout(() => {
this.voiceSpeech('../../static/success.mp3');
}, 100);
} else {
- // this.innerCode = "";
this.$refs.uToast.show({
title: res.message,
type: "error"
})
- // setTimeout(this.updateFocus,200);
setTimeout(() => {
this.voiceSpeech('../../static/fail.mp3');
}, 100);
}
})
-
-
- // var matInfo = matSn.split('|');
-
- // if (matInfo.length == 7) {
- // var matObj = {
- // matCode: matInfo[1],
- // matProductionDate: matInfo[3],
- // matQty: matInfo[5],
- // orderNo: matInfo[6],
- // sn: matSn
- // }
- // var temp = this.matInfos.find(x => x.orderNo == matObj.orderNo);
- // if (!temp) {
- // var tmp = this.matTotal.find(x => x.matCode == matObj.matCode);
- // if (!tmp) {
- // this.matTotal.push({
- // matCode: matObj.matCode,
- // matQuantity: parseInt(matObj.matQty)
- // })
- // } else {
- // tmp.matQuantity += parseInt(matObj.matQty);
- // }
- // this.sns.push(matSn);
- // this.matInfos.push(matObj);
- // setTimeout(this.updateFocus, 200);
- // setTimeout(() => {
- // this.voiceSpeech('../../static/success.mp3');
- // }, 100);
- // } else {
- // this.$refs.uToast.show({
- // title: "鎵爜閲嶅",
- // type: "error"
- // })
- // setTimeout(this.updateFocus, 200);
- // setTimeout(() => {
- // this.voiceSpeech('../../static/fail.mp3');
- // }, 100);
- // }
- // } else {
- // this.$refs.uToast.show({
- // title: "鎵爜閿欒,璇锋壂鎻忔纭唴绠辩爜",
- // type: "error"
- // })
- // setTimeout(this.updateFocus, 200);
- // setTimeout(() => {
- // this.voiceSpeech('../../static/fail.mp3');
- // }, 100);
- // }
+ }
+ })
+ },
+ pksnInput() {
+ this.$nextTick(() => {
+ if (this.pkmaterSn != "") {
+ this.focus = false;
+ var matSn = this.pkmaterSn;
+ setTimeout(() => {
+ this.pkmaterSn = "";
+ }, 10);
+ this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => {
+ if (res.status) {
+ this.pksns.push(res.data.serialNumber);
+ this.pkmatInfos.push(res.data);
+ if (res.message) {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: "error"
+ })
+ setTimeout(() => {
+ this.voiceSpeech('../../static/fail.mp3');
+ }, 100);
+ return;
+ }
+ setTimeout(() => {
+ this.voiceSpeech('../../static/success.mp3');
+ }, 100);
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: "error"
+ })
+ setTimeout(() => {
+ this.voiceSpeech('../../static/fail.mp3');
+ }, 100);
+ }
+ })
}
})
},
@@ -472,11 +439,14 @@
}
this.$u.post('/api/Task/RequestInboundTask', postData).then(res => {
if (res.status) {
- uni.$showMsg(res.message);
this.inboundBarcode = "";
- this.address = "";
+ if (this.warehouseId != 5) this.address = "";
setTimeout(() => {
this.addressFocus = false;
+ this.$refs.uToast.show({
+ title: "鎴愬姛",
+ type: "success"
+ })
}, 200);
} else {
this.$refs.uToast.show({
@@ -503,6 +473,35 @@
this.matInfos.splice(res, 1);
this.sns.splice(res, 1);
},
+ pkdeleteList(res) {
+ this.pkmatInfos.splice(res, 1);
+ this.pksns.splice(res, 1);
+ },
+ pksubmit(){
+ if (this.pkmatInfos.length == 0) {
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻忓唴绠辨爣绛�",
+ type: 'error'
+ })
+ return;
+ }
+ this.$u.post('/api/InboundOrder/InPinKu?warehouseId=' + this.warehouseId+"&orderNo="+ this.orderNo, this.pksns).then(res => {
+ if (res.status) {
+ this.$refs.uToast.show({
+ title: "鍏ュ簱鎴愬姛",
+ type: "success"
+ })
+ this.focus = false;
+ this.pkmatInfos = [];
+ this.pksns = [];
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: "error"
+ })
+ }
+ })
+ },
submit() {
if (this.barcode == "") {
this.$refs.uToast.show({
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/receiveorderoutbound.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/receiveorderoutbound.vue"
index 525720a..ada9295 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/receiveorderoutbound.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/receiveorderoutbound.vue"
@@ -377,6 +377,7 @@
title: "纭鏀惰揣鎴愬姛",
type: "success"
})
+ this.orderInfo=[];
this.sns = "";
} else {
this.$refs.uToast.show({
--
Gitblit v1.9.3