From 6f8fe2fc191fb466e3141a6e915d6aa63802c269 Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期日, 22 六月 2025 11:43:35 +0800
Subject: [PATCH] 更新优化
---
代码管理/淮安PDA/pages/stash/receiveorderoutbound.vue | 156 ++++++++++++++++++++++---------
代码管理/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs | 4
代码管理/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs | 13 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs | 38 +++++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 51 ++++++++--
7 files changed, 205 insertions(+), 63 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
index 310b96c..f9d81d1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
@@ -58,7 +58,8 @@
{ title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
],
[
- { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],}
+ { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],},
+ { title: "鐗╂枡缂栧彿", field: "materielCode",type: "like",}
],
]);
const columns = ref([
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
index 937a242..0cf7e08 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
@@ -58,7 +58,8 @@
{ title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
],
[
- { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],}
+ { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],},
+ { title: "鐗╂枡缂栧彿", field: "materielCode",type: "like",}
],
]);
const columns = ref([
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs"
index 74ab2e9..e77b019 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs"
@@ -412,7 +412,20 @@
List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
foreach (var item in stockInfos)
{
+ foreach (var detail in item.Details)
+ {
+ // 杩涜瀹夊叏杞崲
+ if (detail.OutboundQuantity != null && decimal.TryParse(detail.OutboundQuantity.ToString(), out decimal outboundDecimal))
+ {
+ decimal outboundDecimal1 = Convert.ToDecimal(detail.OutboundQuantity);
+ }
+ else
+ {
+ detail.OutboundQuantity = 0; // 榛樿鍊兼垨璁板綍閿欒
+ }
+ }
stockInfoDetails.AddRange(item.Details);
+
}
_stockService.StockInfoDetailService.Repository.UpdateData(stockInfoDetails);
BaseDal.UpdateData(outboundOrderDetails);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
index a74fb82..1fad87f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -30,6 +30,7 @@
using WIDESEA_DTO.Stock;
using SqlSugar;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
namespace WIDESEA_TaskInfoService
{
@@ -97,6 +98,13 @@
PalletType = stockInfo.PalletType,
WarehouseId = stockInfo.WarehouseId,
};
+ string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
+ float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
+ if (MaterielCode != null && Quantity != null)
+ {
+ taskOut.MaterielCode = MaterielCode;
+ taskOut.Quantity = Quantity;
+ }
stockInfo.StockStatus = (int)StockStatusEmun.鍑哄簱閿佸畾;
LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
locationInfo.LocationStatus = (int)LocationStatusEnum.Lock;
@@ -171,6 +179,13 @@
PalletType = stockInfo.PalletType,
WarehouseId = stockInfo.WarehouseId,
};
+ string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
+ float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
+ if (MaterielCode != null && Quantity != null)
+ {
+ taskOut.MaterielCode = MaterielCode;
+ taskOut.Quantity = Quantity;
+ }
stockInfo.StockStatus = (int)StockStatusEmun.鍑哄簱閿佸畾;
LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
locationInfo.LocationStatus = (int)LocationStatusEnum.Lock;
@@ -247,6 +262,13 @@
PalletType = stockInfo.PalletType,
WarehouseId = stockInfo.WarehouseId,
};
+ string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
+ float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
+ if (MaterielCode != null && Quantity != null)
+ {
+ taskOut.MaterielCode = MaterielCode;
+ taskOut.Quantity = Quantity;
+ }
stockInfo.StockStatus = (int)StockStatusEmun.鍑哄簱閿佸畾;
LocationStatusEnum locationStatus = (LocationStatusEnum)locationInfo.LocationStatus;
locationInfo.LocationStatus = (int)LocationStatusEnum.Lock;
@@ -309,6 +331,13 @@
PalletType = stockInfo.PalletType,
WarehouseId = stockInfo.WarehouseId,
};
+ string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
+ float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
+ if (MaterielCode != null && Quantity != null)
+ {
+ taskIn.MaterielCode = MaterielCode;
+ taskIn.Quantity = Quantity;
+ }
//鏇存敼搴撳瓨鐘舵��
stockInfo.StockStatus = StockStatusEmun.閫�搴�.ObjToInt();
BaseDal.AddData(taskIn);
@@ -1025,9 +1054,14 @@
TaskStatus = TaskStatusEnum.New.ObjToInt(),
WarehouseId = stockInfo.WarehouseId,
PalletType = stockInfo.PalletType,
- MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode,
- Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.StockQuantity,
};
+ string MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
+ float Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
+ if (MaterielCode != null && Quantity != null)
+ {
+ newTask.MaterielCode = MaterielCode;
+ newTask.Quantity = Quantity;
+ }
LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus;
_unitOfWorkManage.BeginTran();
_recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationStatusEnum.Lock, LocationChangeType.InboundAssignLocation);
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 4759255..2a0977a 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"
@@ -97,8 +97,8 @@
TaskStatus = TaskStatusEnum.New.ObjToInt(),
WarehouseId = stockInfo.WarehouseId,
PalletType = stockInfo.PalletType,
- MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode,
- Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.StockQuantity,
+ MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode,
+ Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity),
};
//鑾峰彇鏄惁瀛樺湪鍏ュ簱鍗�
Dt_InboundOrder? inboundOrder = null;
@@ -334,8 +334,16 @@
TaskStatus = TaskStatusEnum.New.ObjToInt(),
WarehouseId = stockInfoPPorGM.WarehouseId,
PalletType = stockInfoPPorGM.PalletType,
- TaskLength= stockInfoPPorGM.StockLength
+ TaskLength= stockInfoPPorGM.StockLength,
+
};
+ string MaterielCodeGMPP = stockInfoPPorGM.Details?.Where(x => x.StockId == stockInfoPPorGM.Id).FirstOrDefault()?.MaterielCode;
+ float QuantityGMPP = (float)stockInfoPPorGM.Details?.Where(x => x.StockId == stockInfoPPorGM.Id).Sum(x => x.StockQuantity);
+ if (MaterielCodeGMPP != null && QuantityGMPP != null)
+ {
+ newTaskPPorGM.MaterielCode = MaterielCodeGMPP;
+ newTaskPPorGM.Quantity = QuantityGMPP;
+ }
//鑾峰彇鏄惁瀛樺湪鍏ュ簱鍗�
Dt_InboundOrder? inboundOrderPPorGM = null;
@@ -403,6 +411,13 @@
WarehouseId = stockInfo.WarehouseId,
PalletType = stockInfo.PalletType,
};
+ string MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
+ float Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
+ if (MaterielCode != null && Quantity != null)
+ {
+ newTask.MaterielCode = MaterielCode;
+ newTask.Quantity = Quantity;
+ }
//鑾峰彇鏄惁瀛樺湪鍏ュ簱鍗�
Dt_InboundOrder? inboundOrder = null;
@@ -433,6 +448,7 @@
}
else if (stockInfo.StockStatus == StockStatusEmun.鎷i�夊畬鎴�.ObjToInt())
{
+ stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
newTask.TaskType = TaskTypeEnum.InPick.ObjToInt();
}
else
@@ -482,8 +498,7 @@
{
return WebResponseContent.Instance.Error($"璇ョ珯鐐瑰凡鏈夋湭鎵ц鐨勪换鍔�");
}
-
- Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == palletCode);
+ Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First();
if (stockInfo == null)
{
return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�");
@@ -511,7 +526,13 @@
WarehouseId = stockInfo.WarehouseId,
PalletType = stockInfo.PalletType,
};
-
+ string MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
+ float Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
+ if (MaterielCode != null && Quantity != null)
+ {
+ newTask.MaterielCode = MaterielCode;
+ newTask.Quantity = (float)Quantity;
+ }
if (stockInfo.StockStatus == StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt())
{
@@ -582,7 +603,7 @@
string roadwayNo = AssignRoadwayNo(staions, palletCode, heightType);
- Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == palletCode);
+ Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First();
if (stockInfo == null)
{
return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�");
@@ -610,7 +631,13 @@
WarehouseId = stockInfo.WarehouseId,
PalletType = stockInfo.PalletType,
};
-
+ string MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
+ float Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
+ if (MaterielCode != null && Quantity != null)
+ {
+ newTask.MaterielCode = MaterielCode;
+ newTask.Quantity = Quantity;
+ }
if (stockInfo.StockStatus == StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt())
{
stockInfo.StockStatus = StockStatusEmun.鎵嬪姩缁勭洏鍏ュ簱纭.ObjToInt();
@@ -824,7 +851,9 @@
TaskType = palletTypeInfo.LocaitonCount==2? (int)TaskTypeEnum.InZHProductLarge : (int)TaskTypeEnum.InZHProductSmall,
TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
PalletType = palletTypeInfo.PalletType,
- WarehouseId = warehouse.WarehouseId
+ WarehouseId = warehouse.WarehouseId,
+ MaterielCode = mesLotInfo.Product,
+ Quantity = (float)mesLotInfo.Qty,
};
_unitOfWorkManage.BeginTran();
Db.InsertNav(stockInfo).Include(x => x.Details).ExecuteCommand();
@@ -936,8 +965,8 @@
TaskStatus = TaskStatusEnum.New.ObjToInt(),
WarehouseId = warePoint.WarehouseId,
PalletType = proStockInfo.PalletType,
- MaterielCode = proStockInfo.proStockInfoDetails.Where(x => x.ProStockId == proStockInfo.Id).FirstOrDefault()?.ProductCode,
- Quantity = (float)proStockInfo.proStockInfoDetails.Where(x => x.ProStockId == proStockInfo.Id).Sum(x => x.StockPcsQty)
+ MaterielCode = proStockInfo.proStockInfoDetails?.Where(x => x.ProStockId == proStockInfo.Id).FirstOrDefault()?.ProductCode,
+ Quantity = (float)proStockInfo.proStockInfoDetails?.Where(x => x.ProStockId == proStockInfo.Id).Sum(x => x.StockPcsQty)
};
_unitOfWorkManage.BeginTran();
int taskId = BaseDal.AddData(newTask);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index 11dc349..f3e953b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -531,8 +531,8 @@
};
if (taskType != TaskTypeEnum.OutEmpty)
{
- task.MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
- task.Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.StockQuantity;
+ task.MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
+ task.Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
}
if (stockInfo.StockLength>0)
{
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 a24cf23..a74b0fd 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"
@@ -177,6 +177,7 @@
import {
config
} from '../../common/config';
+import message from '../../tuniao-ui/libs/function/message';
const innerAudioContext = uni.createInnerAudioContext();
export default {
data() {
@@ -230,7 +231,9 @@
endTypeRange: [],
sns: "",
receiveOrderId: 0,
- warehouseId:""
+ warehouseId:"",
+ toastQueue: [], // 鎻愮ず闃熷垪
+ isShowingToast: false
}
},
@@ -260,6 +263,29 @@
}
},
methods: {
+ showToast(options) {
+ this.toastQueue.push(options);
+ this.processToastQueue();
+ },
+
+ // 澶勭悊鎻愮ず闃熷垪
+ processToastQueue() {
+ // 濡傛灉姝e湪鏄剧ず鎻愮ず鎴栭槦鍒椾负绌猴紝鍒欎笉鎵ц
+ if (this.isShowingToast || this.toastQueue.length === 0) return;
+
+ this.isShowingToast = true;
+ const toastOptions = this.toastQueue.shift();
+
+ // 鏄剧ず鎻愮ず
+ this.$refs.uToast.show({
+ ...toastOptions,
+ complete: () => {
+ // 鎻愮ず鍏抽棴鍚庡鐞嗕笅涓�涓�
+ this.isShowingToast = false;
+ this.processToastQueue();
+ }
+ });
+ },
inputDialogToggle(itemCode) {
this.itemCode = itemCode;
this.$refs.inputDialog.open()
@@ -376,53 +402,91 @@
});
},
submit() {
- if (this.sns == "") {
- this.$refs.uToast.show({
- title: "璇锋壂鎻忓唴绠辨爣绛�",
- type: 'error'
+ // 鎻愬彇鐢熶骇鏃ユ湡锛堟牸寮忎负"鐢熶骇鏃ユ湡锛歒YYY-MM"锛�
+ const productionDateStr = this.ProductionDate.replace('鐢熶骇鏃ユ湡锛�', '');
+ if (!productionDateStr) {
+ this.showToast({
+ title: "鏈幏鍙栧埌鐢熶骇鏃ユ湡",
+ type: 'error'
+ });
+ return;
+ }
+
+ // 瑙f瀽鐢熶骇鏃ユ湡鐨勫勾鏈�
+ const [prodYear, prodMonth] = productionDateStr.split('-').map(Number);
+
+ // 鑾峰彇褰撳墠鏃ユ湡鐨勫勾鏈�
+ const currentDate = new Date();
+ const currentYear = currentDate.getFullYear();
+ const currentMonth = currentDate.getMonth() + 1;
+
+ // 姣旇緝骞存湀鏄惁涓�鑷�
+ const isDateMismatch = prodYear !== currentYear || prodMonth !== currentMonth;
+ if (isDateMismatch) {
+ this.showToast({
+ title: "璇ョ墿鏂欑敓浜ф棩鏈熺殑骞存湀涓庡綋鍓嶅勾鏈堜笉涓�鑷�",
+ type: 'warning',
+ duration: 1500
+ });
+ }
+
+ // 鍘熸湁鐨勭‘璁ゆ敹璐ч�昏緫
+ if (this.sns == "") {
+ this.$refs.uToast.show({
+ title: "璇锋壂鎻忓唴绠辨爣绛�",
+ type: 'error'
+ })
+ return;
+ }
+ if (this.Quantity == "") {
+ this.$refs.uToast.show({
+ title: "璇疯緭鍏ュ疄闄呮暟閲�",
+ type: 'error'
+ })
+ return;
+ }
+ if(this.warehouseId==2){
+ //鏇挎崲鎸囧畾涓や釜瀛楃闂寸殑瀛楃
+ this.sns = this.sns.replace(/(Q:)([^,PO]+)(,PO)/, (match, p1, p2, p3) => {
+ return p1 + this.Quantity + p3;
+ });
+ }
+ const sendRequest = () => {
+ this.$u.post('/api/ReceiveOrderDetail/AddReceiveOrderDetail?serNum=' + this.sns + '&orderNo=' + this
+ .orderNo, {}).then(res => {
+ if (res.status) {
+ this.PurchaseOrderNo="閲囪喘鍗曞彿锛�";
+ this.matCode="鐗╂枡缂栫爜锛�";
+ this.LotNo="鐗╂枡鎵规锛�";
+ this.orderQty="璁㈠崟鏁伴噺锛�";
+ this.ProductionDate="鐢熶骇鏃ユ湡锛�";
+ this.EffectiveDate="鏈夋晥鏃ユ湡锛�";
+ this.Quantity="";
+ setTimeout(() => {
+ this.innerCode="";
+ this.focus=false;
+ }, 100);
+ this.orderInfo=[];
+ this.sns = "";
+ this.$refs.uToast.show({
+ title:"纭鏀惰揣鎴愬姛",
+ type: "success"
+ })
+ } else {
+ this.$refs.uToast.show({
+ title: res.message,
+ type: "error"
+ })
+ }
})
- return;
+
+ };
+ // 濡傛灉鏈夋棩鏈熶笉鍖归厤鎻愮ず锛岀瓑寰呮彁绀哄畬鎴愬悗鍙戦�佽姹�
+ if (isDateMismatch) {
+ setTimeout(sendRequest, 1500); // 绛夊緟1.5绉掞紙涓庢彁绀烘椂闀夸竴鑷达級
+ } else {
+ sendRequest(); // 娌℃湁鏃ユ湡鎻愮ず锛岀珛鍗冲彂閫佽姹�
}
- if (this.Quantity == "") {
- this.$refs.uToast.show({
- title: "璇疯緭鍏ュ疄闄呮暟閲�",
- type: 'error'
- })
- return;
- }
- if(this.warehouseId==2){
- //鏇挎崲鎸囧畾涓や釜瀛楃闂寸殑瀛楃
- this.sns = this.sns.replace(/(Q:)([^,PO]+)(,PO)/, (match, p1, p2, p3) => {
- return p1 + this.Quantity + p3;
- });
- }
- this.$u.post('/api/ReceiveOrderDetail/AddReceiveOrderDetail?serNum=' + this.sns + '&orderNo=' + this
- .orderNo, {}).then(res => {
- if (res.status) {
- this.PurchaseOrderNo="閲囪喘鍗曞彿锛�";
- this.matCode="鐗╂枡缂栫爜锛�";
- this.LotNo="鐗╂枡鎵规锛�";
- this.orderQty="璁㈠崟鏁伴噺锛�";
- this.ProductionDate="鐢熶骇鏃ユ湡锛�";
- this.EffectiveDate="鏈夋晥鏃ユ湡锛�";
- this.Quantity="";
- setTimeout(() => {
- this.innerCode="";
- this.focus=false;
- }, 100);
- this.orderInfo=[];
- this.sns = "";
- this.$refs.uToast.show({
- title: "纭鏀惰揣鎴愬姛",
- type: "success"
- })
- } else {
- this.$refs.uToast.show({
- title: res.message,
- type: "error"
- })
- }
- })
},
submit1() {
this.$u.post('/api/ReceiveOrder/FeedbackReceiveOrder?orderId=' + this
--
Gitblit v1.9.3