From 036db6cdb6bd7818fc14d3970255d31938fe92a7 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期二, 27 一月 2026 19:06:34 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs | 6 +
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/Outbound/PrintFromDataDTO.cs | 21 +++++
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs | 47 ++++++++++-
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs | 34 ++++++++
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs | 6 +
项目代码/WIDESEA_WMSClient/src/views/outbound/printForm.vue | 83 ++++++++++++++------
项目代码/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue | 10 +-
8 files changed, 173 insertions(+), 36 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
index 6666ae3..46ad6fa 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
@@ -117,13 +117,13 @@
],
[
{
- title: "鍒涘缓鏂瑰紡",
- field: "createType",
+ title: "鍥炰紶MES鐘舵��",
+ field: "returnToMESStatus",
type: "select",
- dataKey: "createType",
+ dataKey: "outboundReturnToMESStatus",
data: [],
},
- { title: "鍒涘缓鑰�", field: "creater", type: "like" },
+ { title: "鐗╂枡缂栧彿", field: "materielCode", type: "like" },
{ title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
],
]);
@@ -196,7 +196,7 @@
field: "returnToMESStatus",
title: "鍥炰紶MES鐘舵��",
width: 120,
- bind: { key: "createType", data: [{ key: 0, value: "鏈洖浼�" }, { key: 1, value: "宸插洖浼犳垚鍔�" }, { key: 2, value: "鍥炰紶澶辫触" },{ key: 3, value: "閮ㄥ垎鍥炰紶鎴愬姛" },{ key: 4, value: "閮ㄥ垎鍥炰紶澶辫触" },{ key: 5, value: "鏃犻渶鍥炰紶" }] },
+ bind: { key: "outboundReturnToMESStatus", data: [{ key: 0, value: "鏈洖浼�" }, { key: 1, value: "宸插洖浼犳垚鍔�" }, { key: 2, value: "鍥炰紶澶辫触" },{ key: 3, value: "閮ㄥ垎鍥炰紶鎴愬姛" },{ key: 4, value: "閮ㄥ垎鍥炰紶澶辫触" },{ key: 5, value: "鏃犻渶鍥炰紶" }] },
},
{
field: "factoryArea",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/printForm.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/printForm.vue"
index 9490e6a..14f0b8f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/printForm.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/printForm.vue"
@@ -45,6 +45,8 @@
v-model="printForm.barcode"
placeholder="璇疯緭鍏ユ壒鍙凤紙鐢熸垚浜岀淮鐮佺敤锛�"
clearable
+ @keyup.enter="fetchBarcodeData"
+ :loading="fetchingData"
/>
</el-form-item>
@@ -57,7 +59,7 @@
</el-form-item>
</el-col>
- <!-- 绗簩鍒� -->
+
<el-col :span="12">
<el-form-item label="渚涘簲鍟嗙紪鐮�" prop="suplierCode">
<el-input
@@ -104,7 +106,7 @@
</el-col>
</el-row>
- <!-- 鎵归噺娣诲姞锛堝彲閫夛級 -->
+
<el-form-item label="鎵撳嵃浠芥暟">
<el-input-number
v-model="printCopyCount"
@@ -115,7 +117,7 @@
/>
</el-form-item>
- <!-- 鎿嶄綔鎸夐挳 -->
+
<el-form-item class="form-actions">
<el-button type="primary" @click="submitForm">纭骞舵墦寮�鎵撳嵃寮圭獥</el-button>
<el-button @click="resetForm">閲嶇疆琛ㄥ崟</el-button>
@@ -123,52 +125,87 @@
</el-form>
</el-card>
- <!-- 寮曞叆鎵撳嵃寮圭獥缁勪欢 -->
+
<print-view ref="printViewRef" />
</div>
</template>
<script>
-// 寮曞叆鎵撳嵃寮圭獥缁勪欢
+
import printView from "@/extension/outbound/extend/printView.vue";
import { ElMessage } from "element-plus";
+import http from '@/api/http.js'
export default {
name: "PrintInputPage",
components: { printView },
data() {
return {
- // 琛ㄥ崟鏁版嵁锛堝搴攑rintView鎵�闇�鐨勫弬鏁帮級
printForm: {
- materialCode: "", // 鏂欏彿
- suplierCode: "", // 渚涘簲鍟嗙紪鐮�
- materialName: "", // 鍝佸悕
- pruchaseOrderNo: "", // 閲囪喘鍗曞彿
- materialSpec: "", // 瑙勬牸
- quantity: "", // 鏁伴噺/鎬绘暟
- barcode: "", // 鎵瑰彿锛堜簩缁寸爜鍐呭锛�
- batchNo: "", // 鎵规
- factoryArea: "", // 鍘傚尯
- date: "", // 鏃ユ湡锛堥粯璁ゅ綋鍓嶆棩鏈燂級
+ materialCode: "",
+ suplierCode: "",
+ materialName: "",
+ pruchaseOrderNo: "",
+ materialSpec: "",
+ quantity: "",
+ barcode: "",
+ batchNo: "",
+ factoryArea: "",
+ date: "",
},
- // 鎵撳嵃浠芥暟锛堟敮鎸佹壒閲忕敓鎴愬鏉$浉鍚屾暟鎹級
+
printCopyCount: 1,
- // 琛ㄥ崟楠岃瘉瑙勫垯
+
formRules: {
materialCode: [{ required: true, message: "璇疯緭鍏ユ枡鍙�", trigger: "blur" }],
materialName: [{ required: true, message: "璇疯緭鍏ュ搧鍚�", trigger: "blur" }],
barcode: [{ required: true, message: "璇疯緭鍏ユ壒鍙�", trigger: "blur" }],
date: [{ required: true, message: "璇烽�夋嫨鏃ユ湡", trigger: "change" }],
},
+
+ fetchingData: false
};
},
mounted() {
- // 鍒濆鍖栭粯璁ゆ棩鏈熶负褰撳ぉ
const today = new Date();
this.printForm.date = `${today.getFullYear()}-${(today.getMonth() + 1).toString().padStart(2, "0")}-${today.getDate().toString().padStart(2, "0")}`;
},
methods: {
- // 鎻愪氦琛ㄥ崟锛屾墦寮�鎵撳嵃寮圭獥
+ async fetchBarcodeData() {
+ if (!this.printForm.barcode.trim()) {
+ return;
+ }
+
+ try {
+
+ this.fetchingData = true;
+
+ const response = await http.post(
+ `/api/Outbound/PrintFromData?barcode=` + this.printForm.barcode.trim()
+ );
+ const data = response.data;
+ if (data) {
+ this.printForm.materialCode = data.materialCode || "";
+ this.printForm.suplierCode = data.suplierCode || "";
+ this.printForm.materialName = data.materialName || "";
+ this.printForm.pruchaseOrderNo = data.pruchaseOrderNo || "";
+ this.printForm.materialSpec = data.materialSpec || "";
+ this.printForm.quantity = data.quantity || "";
+ this.printForm.batchNo = data.batchNo || "";
+ this.printForm.factoryArea = data.factoryArea || "";
+
+
+ ElMessage.success("宸叉牴鎹壒鍙疯嚜鍔ㄥ~鍏呮暟鎹�");
+ } else {
+ ElMessage.info("鏈煡璇㈠埌璇ユ壒鍙峰搴旂殑鐗╂枡鏁版嵁");
+ }
+ } catch (error) {
+ console.error("鑾峰彇鎵瑰彿鏁版嵁澶辫触锛�", error);
+ ElMessage.error("鑾峰彇鏁版嵁澶辫触锛岃妫�鏌ョ綉缁滄垨鎵瑰彿鏄惁姝g‘");
+ } finally {
+ this.fetchingData = false;
+ }
+ },
submitForm() {
this.$refs.printFormRef.validate((valid) => {
if (!valid) {
@@ -177,13 +214,10 @@
}
try {
- // 鏋勯�犳墦鍗版暟鎹紙鏀寔澶氫唤锛�
const printData = [];
for (let i = 0; i < this.printCopyCount; i++) {
printData.push({ ...this.printForm });
}
-
- // 璋冪敤printView鐨刼pen鏂规硶锛屼紶閫掑弬鏁板苟鎵撳紑寮圭獥
this.$refs.printViewRef.open(printData);
ElMessage.success(`宸茬敓鎴� ${this.printCopyCount} 浠芥墦鍗版暟鎹紝鍗冲皢鎵撳紑鎵撳嵃寮圭獥`);
} catch (error) {
@@ -193,10 +227,9 @@
});
},
- // 閲嶇疆琛ㄥ崟
+
resetForm() {
this.$refs.printFormRef.resetFields();
- // 閲嶇疆鍚庢仮澶嶉粯璁ゆ棩鏈�
const today = new Date();
this.printForm.date = `${today.getFullYear()}-${(today.getMonth() + 1).toString().padStart(2, "0")}-${today.getDate().toString().padStart(2, "0")}`;
this.printCopyCount = 1;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Outbound/PrintFromDataDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Outbound/PrintFromDataDTO.cs"
new file mode 100644
index 0000000..cca3c3d
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Outbound/PrintFromDataDTO.cs"
@@ -0,0 +1,21 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_DTO.Outbound
+{
+ public class PrintFromDataDTO
+ {
+ public string materialCode { get; set; }
+ public string materialName { get; set; }
+ public string materialSpec { get; set; }
+ public string factoryArea { get; set; }
+ public string suplierCode { get;set; }
+ public string pruchaseOrderNo { get; set; }
+ public decimal quantity { get; set; }
+ public string batchNo { get; set; }
+ public DateTime date { get; set; }
+ }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs"
index 25a8875..410afa4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs"
@@ -68,5 +68,7 @@
/// <param name="orderNo"></param>
/// <returns></returns>
WebResponseContent RecheckPicking(RecheckPickingDTO pickingDTO);
+
+ WebResponseContent PrintFromData(string barcode);
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
index 0f239c0..d678648 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
@@ -177,6 +177,12 @@
return content.Error($"璇ュ簱鍖簕palletDto.locationType}涓嶅瓨鍦ㄧ┖闂插簱浣�");
}
+ var nullpallet =_stockInfoRepository.QueryFirst(x => x.PalletType == -1 && x.PalletCode == palletDto.PalletCode);
+ if (nullpallet != null)
+ {
+ return content.Error($"璇ユ墭鐩榹palletDto.PalletCode}宸茬粡杩涜绌烘墭缁勭洏,涓嶈兘鍦ㄨ繘琛岀粍鐩�");
+ }
+
foreach (var item in details)
{
var datevaliDate = _inboundOrderRepository.Db.Queryable<Dt_MaterialExpirationDate>().Where(x => x.MaterialCode.Contains(item.MaterielCode.Substring(0, 6))).First();
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
index 91a8c46..eea7122 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
@@ -331,8 +331,6 @@
public override PageGridData<Dt_OutboundOrder> GetPageData(PageDataOptions options)
{
- string wheres = ValidatePageOptions(options);
- //鑾峰彇鎺掑簭瀛楁
Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
List<OrderByModel> orderByModels = new List<OrderByModel>();
foreach (var item in orderbyDic)
@@ -345,7 +343,7 @@
orderByModels.Add(orderByModel);
}
-
+ ISugarQueryable<Dt_OutboundOrder> sugarQueryable1 = BaseDal.Db.Queryable<Dt_OutboundOrder>().Includes(x => x.Details);
int totalCount = 0;
List<SearchParameters> searchParametersList = new List<SearchParameters>();
if (!string.IsNullOrEmpty(options.Wheres))
@@ -354,11 +352,50 @@
{
searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
options.Filter = searchParametersList;
+
+ if (searchParametersList.Count > 0)
+ {
+ var materielCodeParam = searchParametersList.FirstOrDefault(x =>
+ x.Name.Equals("materielCode", StringComparison.OrdinalIgnoreCase));
+ if (materielCodeParam != null && !string.IsNullOrEmpty(materielCodeParam.Value?.ToString()))
+ {
+ string materielCode = materielCodeParam.Value.ToString().Trim();
+ sugarQueryable1 = sugarQueryable1.Where(x =>
+ x.Details.Any(d => d.MaterielCode.Contains(materielCode)));
+ }
+ var upperOrderNoParam = searchParametersList.FirstOrDefault(x =>
+ x.Name.Equals(nameof(Dt_OutboundOrder.UpperOrderNo).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase));
+ if (upperOrderNoParam != null && !string.IsNullOrEmpty(upperOrderNoParam.Value?.ToString()))
+ {
+ string upperOrderNo = upperOrderNoParam.Value.ToString().Trim();
+ sugarQueryable1 = sugarQueryable1.Where(x => x.UpperOrderNo.Contains(upperOrderNo));
+ }
+ var orderNoParam = searchParametersList.FirstOrDefault(x =>
+ x.Name.Equals(nameof(Dt_OutboundOrder.OrderNo).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase));
+ if (orderNoParam != null && !string.IsNullOrEmpty(orderNoParam.Value?.ToString()))
+ {
+ string orderNo = orderNoParam.Value.ToString().Trim();
+ sugarQueryable1 = sugarQueryable1.Where(x => x.OrderNo.Contains(orderNo));
+ }
+ var orderStatusParam = searchParametersList.FirstOrDefault(x =>
+ x.Name.Equals(nameof(Dt_OutboundOrder.OrderStatus).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase));
+ if (orderStatusParam != null && !string.IsNullOrEmpty(orderStatusParam.Value?.ToString()))
+ {
+ string orderStatus = orderStatusParam.Value.ToString().Trim();
+ sugarQueryable1 = sugarQueryable1.Where(x => x.OrderStatus.Equals(orderStatus));
+ }
+ var returnToMESStatusParam = searchParametersList.FirstOrDefault(x =>
+ x.Name.Equals(nameof(Dt_OutboundOrder.ReturnToMESStatus).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase));
+ if (returnToMESStatusParam != null && !string.IsNullOrEmpty(returnToMESStatusParam.Value?.ToString()))
+ {
+ string returnToMESStatus = returnToMESStatusParam.Value.ToString().Trim();
+ sugarQueryable1 = sugarQueryable1.Where(x => x.ReturnToMESStatus.Equals(returnToMESStatus));
+ }
+ }
}
catch { }
}
- var data = BaseDal.Db.Queryable<Dt_OutboundOrder>()
- .WhereIF(!wheres.IsNullOrEmpty(), wheres)
+ var data = sugarQueryable1
.Where(x => x.OrderType == 0 || x.OrderType == 116)
.OrderBy(orderByModels)
.ToPageList(options.Page, options.Rows, ref totalCount);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
index 0e2a158..67e71f3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
@@ -22,6 +22,7 @@
using WIDESEA_DTO.Base;
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.CalcOut;
+using WIDESEA_DTO.Outbound;
using WIDESEA_DTO.ReturnMES;
using WIDESEA_IBasicService;
using WIDESEA_IOutboundService;
@@ -62,6 +63,8 @@
private readonly IESSApiService _eSSApiService;
private readonly IRepository<Dt_AllocateOrder> _allocateOrderRepository;
private readonly IRepository<Dt_AllocateMaterialInfo> _allocateMaterialInfoRepository;
+ public readonly IRepository<Dt_InboundOrderDetail> _inboundOrderDetailRepository;
+ public readonly IRepository<Dt_InboundOrder> _inboundOrderRepository;
private Dictionary<string, string> stations = new Dictionary<string, string>
{
@@ -75,7 +78,7 @@
{"3-1","3-5" },
};
- public OutboundService(IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_OutboundOrderDetail> detailRepository, IRepository<Dt_OutboundOrder> outboundRepository, IRepository<Dt_OutStockLockInfo> outboundLockInfoRepository, IRepository<Dt_StockInfo> stockInfoRepository, IRepository<Dt_StockInfoDetail> stockDetailRepository, IRepository<Dt_StockQuantityChangeRecord> stockChangeRepository, IRepository<Dt_StockInfoDetail_Hty> stockDetailHistoryRepository, IBasicService basicService, IOutboundOrderDetailService outboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService, IFeedbackMesService feedbackMesService, IRepository<Dt_Task> taskRepository, ILocationInfoService locationInfoService, IESSApiService eSSApiService, IRepository<Dt_AllocateOrder> allocateOrderRepository, IRepository<Dt_AllocateMaterialInfo> allocateMaterialInfoRepository)
+ public OutboundService(IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_OutboundOrderDetail> detailRepository, IRepository<Dt_OutboundOrder> outboundRepository, IRepository<Dt_OutStockLockInfo> outboundLockInfoRepository, IRepository<Dt_StockInfo> stockInfoRepository, IRepository<Dt_StockInfoDetail> stockDetailRepository, IRepository<Dt_StockQuantityChangeRecord> stockChangeRepository, IRepository<Dt_StockInfoDetail_Hty> stockDetailHistoryRepository, IBasicService basicService, IOutboundOrderDetailService outboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService, IFeedbackMesService feedbackMesService, IRepository<Dt_Task> taskRepository, ILocationInfoService locationInfoService, IESSApiService eSSApiService, IRepository<Dt_AllocateOrder> allocateOrderRepository, IRepository<Dt_AllocateMaterialInfo> allocateMaterialInfoRepository, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IRepository<Dt_InboundOrder> inboundOrderRepository)
{
_mapper = mapper;
_unitOfWorkManage = unitOfWorkManage;
@@ -98,6 +101,35 @@
_eSSApiService = eSSApiService;
_allocateOrderRepository = allocateOrderRepository;
_allocateMaterialInfoRepository = allocateMaterialInfoRepository;
+ _inboundOrderDetailRepository = inboundOrderDetailRepository;
+ _inboundOrderRepository = inboundOrderRepository;
+ }
+
+ public WebResponseContent PrintFromData (string barcode)
+ {
+ var detail = _inboundOrderDetailRepository.QueryFirst(x => x.Barcode == barcode);
+ if(detail == null)
+ {
+ return WebResponseContent.Instance.Error();
+ }
+
+ var inbound = _inboundOrderRepository.QueryFirst(x=>x.Id == detail.OrderId);
+ if(inbound == null)
+ {
+ return WebResponseContent.Instance.Error();
+ }
+ var printFormData = new PrintFromDataDTO {
+ materialCode = detail.Barcode,
+ materialName = detail.MaterielName,
+ materialSpec = detail.Unit,
+ batchNo = detail.BatchNo,
+ pruchaseOrderNo = inbound.UpperOrderNo,
+ factoryArea = inbound.FactoryArea,
+ suplierCode = inbound.SupplierId,
+ quantity = detail.BarcodeQty
+ };
+
+ return WebResponseContent.Instance.OK(data:printFormData);
}
#region 鍑哄簱鍒嗛厤
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs"
index 9bc1b43..3b155bd 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundController.cs"
@@ -120,5 +120,11 @@
{
return _outboundService.RecheckPicking(pickingDTO);
}
+
+ [HttpPost, Route("PrintFromData"), AllowAnonymous]
+ public WebResponseContent PrintFromData(string barcode)
+ {
+ return _outboundService.PrintFromData(barcode);
+ }
}
}
--
Gitblit v1.9.3