From 296b4aec849d45a075b6068cb121dd0c117d3818 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期六, 04 一月 2025 17:59:18 +0800 Subject: [PATCH] WMS添加物料码信息打印 --- 代码管理/WMS/WIDESEA_WMSClient/src/router/viewGird.js | 4 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/MaterielCodeInfoRepository.cs | 18 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs | 14 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielCodeInfoService.cs | 14 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielCodeInfoController.cs | 17 + 代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js | 71 ++++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs | 24 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs | 61 +++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs | 1 代码管理/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue | 183 ++++++++++++++++ 代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/extend/materielcodeprintView.vue | 154 ++++++++++++++ 代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/extend/printView.vue | 4 代码管理/WMS/WIDESEA_WMSClient/src/views/basic/palletCodeInfo.vue | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MaterielCodeInfoService.cs | 23 ++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IMaterielCodeInfoRepository.cs | 14 + 15 files changed, 596 insertions(+), 8 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/materielcodeprintView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/materielcodeprintView.vue" new file mode 100644 index 0000000..9725d15 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/materielcodeprintView.vue" @@ -0,0 +1,154 @@ +<template> + <div> + <vol-box + v-model="showDetialBox" + :lazy="true" + width="300px" + :padding="15" + title="鎵撳嵃" + > + <div + id="printContent" + style="display: flex; justify-content: center; align-items: center" + > + <div + style="display: flex; justify-content: center; align-items: center" + > + <VueQrcode id="qrcode" :value="Code" :size="200"></VueQrcode> + </div> + </div> + <div id="palletcode"> + <span + style="display: flex; justify-content: center; align-items: center" + >鐗╂枡缂栫爜:{{ materielCode }}</span + > + </div> + + <template #footer> + <el-button type="primary" size="small" @click="print()">鎵撳嵃</el-button> + <el-button type="danger" size="small" @click="showDetialBox = false" + >鍏抽棴</el-button + > + </template> + </vol-box> + </div> +</template> + + <script> +import VolBox from "@/components/basic/VolBox.vue"; +import VueQrcode from "vue-qrcode"; +import QRCode from "qrcode"; +import { da } from "element-plus/es/locales.mjs"; +export default { + components: { VolBox, VueQrcode }, + data() { + return { + showDetialBox: false, + row: null, + qrcodeDataURL: "", + Code: "", + materielCode: "", + lotNo: "", + purchaseOrderNo: "", + quantity: "", + productionDate: "", + effectiveDate: "", + }; + }, + methods: { + open(row) { + this.row = row; + this.showDetialBox = true; + if (row && row.materielCode) { + this.materielCode = row.materielCode; + this.lotNo = row.lotNo; + this.purchaseOrderNo = row.purchaseOrderNo; + this.quantity = row.quantity; + this.productionDate = formatDate(row.productionDate); + this.effectiveDate = formatDate(row.effectiveDate); + } + this.Code = + "M:" + + this.materielCode + + ",BS:" + + this.lotNo + + ",DM:" + + this.productionDate + + ",DE:" + + this.effectiveDate + + ",Q:" + + this.quantity + + ",PO:" + + this.purchaseOrderNo; + }, + print() { + let printContent = document.getElementById("printContent"); + let palletcode = document.getElementById("palletcode"); + var printWindow = window.open("", ""); + printWindow.document.write(printContent.innerHTML); + printWindow.document.write(palletcode.innerHTML); + printWindow.document.close(); + printWindow.focus(); + printWindow.print(); + printWindow.close(); + }, + formatDate(dateStr) { + let date = new Date(dateStr); + let year = date.getFullYear(); + let month = String(date.getMonth() + 1).padStart(2, "0"); + let day = String(date.getDate()).padStart(2, "0"); + return year + "-" + month + "-" + day; + }, + }, + + created() {}, +}; +function formatDate(dateStr) { + const date = new Date(dateStr); + return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart( + 2, + "0" + )}-${String(date.getDate()).padStart(2, "0")}`; +} +</script> + + <style scoped> +.el-col { + border-radius: 4px; +} + +.grid-content { + border-radius: 4px; + min-height: 36px; +} + +.content-text { + display: flex; + align-items: center; + justify-content: center; +} + +.right-text { + display: flex; + align-items: center; + justify-content: flex-end; +} +</style> + <style> +.el-table .warning-row { + background: #e6a23c; +} + +.el-table .success-row { + background: #f0f9eb; +} + +.el-table .error-row { + background: #f56c6c; +} + +canvas { + display: block; + margin: auto; +} +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/printView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/printView.vue" index dc05237..e123323 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/printView.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/printView.vue" @@ -16,6 +16,8 @@ > <VueQrcode id="qrcode" :value="palletCode" :size="200"></VueQrcode> </div> + </div> + <div id="palletcode"> <span style="display: flex; justify-content: center; align-items: center" >{{ palletCode }}</span @@ -56,8 +58,10 @@ }, print() { let printContent = document.getElementById("printContent"); + let palletcode=document.getElementById("palletcode"); var printWindow = window.open("", ""); printWindow.document.write(printContent.innerHTML); + printWindow.document.write(palletcode.innerHTML); printWindow.document.close(); printWindow.focus(); printWindow.print(); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js" new file mode 100644 index 0000000..25f0128 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js" @@ -0,0 +1,71 @@ +//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜 +import gridBody from './extend/materielcodeprintView.vue' +let extension = { + components: { + //鏌ヨ鐣岄潰鎵╁睍缁勪欢 + gridHeader: '', + gridBody: gridBody, + gridFooter: '', + //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 + modelHeader: '', + modelBody: '', + modelFooter: '' + }, + tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓) + buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽� + methods: { + //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄� + onInit() { //妗嗘灦鍒濆鍖栭厤缃墠锛� + this.columns.push({ + field: '鎿嶄綔', + title: '鎿嶄綔', + width: 90, + fixed: 'right', + align: 'center', + formatter: (row) => { + return ( + '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-printer">鎵撳嵃</i>' + ); + }, + click: (row) => { + this.$refs.gridBody.open(row); + } + }); + }, + onInited() { + //妗嗘灦鍒濆鍖栭厤缃悗 + //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔 + //this.detailOptions.columns.forEach(column=>{ }); + }, + searchBefore(param) { + //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟 + //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ + return true; + }, + searchAfter(result) { + //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊� + return true; + }, + addBefore(formData) { + //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫�� + return true; + }, + updateBefore(formData) { + //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d + return true; + }, + rowClick({ row, column, event }) { + //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠� + // this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�; + }, + modelOpenAfter(row) { + //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁 + //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add'; + //(2)缁欏脊鍑烘璁剧疆榛樿鍊� + //(3)this.editFormFields.瀛楁='xxx'; + //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊� + //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions) + } + } +}; +export default extension; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" index bbf567f..9278d4c 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" @@ -53,6 +53,10 @@ path: '/palletCodeInfo', name: 'palletCodeInfo', component: () => import('@/views/basic/palletCodeInfo.vue') + },{ + path: '/MaterielCodeInfo', + name: 'MaterielCodeInfo', + component: () => import('@/views/basic/materielCodeInfo.vue') }, { path: '/inboundOrder', name: 'inboundOrder', diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue" new file mode 100644 index 0000000..868d5c8 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue" @@ -0,0 +1,183 @@ + +<template> + <view-grid + ref="grid" + :columns="columns" + :detail="detail" + :editFormFields="editFormFields" + :editFormOptions="editFormOptions" + :searchFormFields="searchFormFields" + :searchFormOptions="searchFormOptions" + :table="table" + :extend="extend" + > + </view-grid> +</template> + <script> +import extend from "@/extension/basic/materielCodeInfo.js"; +import { ref, defineComponent } from "vue"; +export default defineComponent({ + setup() { + const table = ref({ + key: "id", + footer: "Foots", + cnName: "鐗╂枡鐮佷俊鎭�", + name: "MaterielCodeInfo", + url: "/MaterielCodeInfo/", + sortName: "id", + }); + const editFormFields = ref({}); + const editFormOptions = ref([ + [ + { + title: "鐗╂枡缂栫爜", + field: "materielCode", + required: true, + }, + { + title: "鎵规鍙�", + field: "lotNo", + required: true, + }, + ], + [ + { + title: "閲囪喘鍗曞彿", + field: "purchaseOrderNo", + required: true, + }, + { + title: "鏁伴噺", + field: "quantity", + required: true, + }, + ], + [ + { + title: "鐢熶骇鏃ユ湡", + field: "productionDate", + type:"date", + required: true, + }, + { + title: "鏈夋晥鏈�", + field: "effectiveDate", + type:"date", + required: true, + }, + ], + ]); + const searchFormFields = ref({ + palletCode: "", + }); + const searchFormOptions = ref([ + [{ title: "鎵规鍙�", field: "lotNo", type: "like" }], + ]); + const columns = ref([ + { + field: "id", + title: "Id", + type: "int", + width: 90, + hidden: true, + readonly: true, + require: true, + align: "left", + }, + { + field: "materielCode", + title: "鐗╂枡缂栧彿", + type: "string", + width: 100, + align: "left", + }, + { + field: "purchaseOrderNo", + title: "閲囪喘鍗曞彿", + type: "string", + width: 160, + align: "left", + }, + { + field: "lotNo", + title: "鎵规鍙�", + type: "string", + width: 200, + align: "left", + }, + { + field: "quantity", + title: "鏁伴噺", + type: "int", + width: 80, + align: "left", + }, + { + field: "productionDate", + title: "鐢熶骇鏃ユ湡", + type: "date", + width: 100, + align: "left", + sort: true, + }, + { + field: "effectiveDate", + title: "鏈夋晥鏈�", + type: "date", + width: 100, + align: "left", + sort: true, + }, + { + field: "creater", + title: "鍒涘缓浜�", + type: "string", + width: 90, + align: "left", + }, + { + field: "createDate", + title: "鍒涘缓鏃堕棿", + type: "datetime", + width: 160, + align: "left", + sort: true, + }, + { + field: "modifier", + title: "淇敼浜�", + type: "string", + width: 100, + hidden:true, + align: "left", + }, + { + field: "modifyDate", + title: "淇敼鏃堕棿", + type: "datetime", + width: 160, + align: "left", + hidden:true, + sort: true, + }, + ]); + const detail = ref({ + cnName: "#detailCnName", + table: "", + columns: [], + sortName: "", + }); + return { + table, + extend, + editFormFields, + editFormOptions, + searchFormFields, + searchFormOptions, + columns, + detail, + }; + }, +}); +</script> + \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/palletCodeInfo.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/palletCodeInfo.vue" index 07adcbf..6a93589 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/palletCodeInfo.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/palletCodeInfo.vue" @@ -33,7 +33,7 @@ title: "浠撳簱", field: "warehouseId", type: "select", - dataKey: "warehouses", + dataKey: "warehouse", data: [], required: true, }, diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/MaterielCodeInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/MaterielCodeInfoRepository.cs" new file mode 100644 index 0000000..33c8a88 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/MaterielCodeInfoRepository.cs" @@ -0,0 +1,18 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseRepository; +using WIDESEA_IBasicRepository; +using WIDESEA_Model.Models; + +namespace WIDESEA_BasicRepository +{ + public class MaterielCodeInfoRepository : RepositoryBase<Dt_MaterielCodeInfo>, IMaterielCodeInfoRepository + { + public MaterielCodeInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) + { + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MaterielCodeInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MaterielCodeInfoService.cs" new file mode 100644 index 0000000..83a06ba --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MaterielCodeInfoService.cs" @@ -0,0 +1,23 @@ +锘縰sing SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Common.WareHouseEnum; +using WIDESEA_Core; +using WIDESEA_Core.BaseServices; +using WIDESEA_Core.Helper; +using WIDESEA_IBasicRepository; +using WIDESEA_IBasicService; +using WIDESEA_Model.Models; + +namespace WIDESEA_BasicService +{ + public class MaterielCodeInfoService : ServiceBase<Dt_MaterielCodeInfo, IMaterielCodeInfoRepository>, IMaterielCodeInfoService + { + public MaterielCodeInfoService(IMaterielCodeInfoRepository BaseDal) : base(BaseDal) + { + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs" index 4bb9f4c..e360f6f 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs" @@ -59,6 +59,18 @@ return BaseDal.QueryData(x => materielCodes.Contains(x.MaterielCode)); } + public WebResponseContent GetWarehouseMaterielInfos(int warehouseId) + { + try + { + List<Dt_MaterielInfo> materielInfos = BaseDal.QueryData(x => x.WarehouseId == warehouseId); + return WebResponseContent.Instance.OK(data: materielInfos); + } + catch (Exception ex) + { + return WebResponseContent.Instance.Error(ex.Message); + } + } /// <summary> /// 鎺ユ敹ERP鐗╂枡淇℃伅 /// </summary> @@ -68,11 +80,11 @@ { try { - Dt_Warehouse? warehouse =null; + Dt_Warehouse? warehouse = null; if (model.ItemType == MaterielTypeEnum.RawMateriel.ObjToInt()) { warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == model.WaId); - if (warehouse==null) + if (warehouse == null) { return WebResponseContent.Instance.Error("鏈壘鍒颁粨搴撲俊鎭�"); } @@ -81,7 +93,7 @@ { Dt_MaterielInfo materielInfo = new Dt_MaterielInfo() { - IsCheck = warehouse == null ? 0:(WhetherEnum)model.IsCheck, + IsCheck = warehouse == null ? 0 : (WhetherEnum)model.IsCheck, MaterielCode = model.Code, MaterielInvOrgId = model.InvOrgId, MaterielLength = model.Length, @@ -89,14 +101,14 @@ MaterielName = model.Name, MaterielSize = model.Size, MaterielSourceType = (MaterielSourceTypeEnum)model.ItemSourceType, - MaterielSpec = warehouse == null ?"绌�":model.StandType, + MaterielSpec = warehouse == null ? "绌�" : model.StandType, MaterielState = (EnableEnum)model.State, MaterielThickness = model.Thickness, MaterielType = (MaterielTypeEnum)model.ItemType, MaterielUnit = model.Unit == null ? "" : model.Unit, MaterielVersion = model.MaterialVersion, MaterielWide = model.Wide, - WarehouseId = warehouse==null?0:warehouse.WarehouseId, + WarehouseId = warehouse == null ? 0 : warehouse.WarehouseId, }; BaseDal.AddData(materielInfo); } @@ -120,7 +132,7 @@ materielInfo.MaterielState = (EnableEnum)model.State; materielInfo.MaterielThickness = model.Thickness; materielInfo.MaterielType = (MaterielTypeEnum)model.ItemType; - materielInfo.MaterielUnit = model.Unit==null?"": model.Unit; + materielInfo.MaterielUnit = model.Unit == null ? "" : model.Unit; materielInfo.MaterielVersion = model.MaterialVersion; materielInfo.MaterielWide = model.Wide; materielInfo.WarehouseId = warehouse == null ? 0 : warehouse.WarehouseId; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IMaterielCodeInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IMaterielCodeInfoRepository.cs" new file mode 100644 index 0000000..3b32f57 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IMaterielCodeInfoRepository.cs" @@ -0,0 +1,14 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseRepository; +using WIDESEA_Model.Models; + +namespace WIDESEA_IBasicRepository +{ + public interface IMaterielCodeInfoRepository : IRepository<Dt_MaterielCodeInfo> + { + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielCodeInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielCodeInfoService.cs" new file mode 100644 index 0000000..507be03 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielCodeInfoService.cs" @@ -0,0 +1,14 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.BaseServices; +using WIDESEA_Model.Models; + +namespace WIDESEA_IBasicService +{ + public interface IMaterielCodeInfoService : IService<Dt_MaterielCodeInfo> + { + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs" index 8ac58bb..3a0f7b4 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs" @@ -43,6 +43,7 @@ /// <param name="materielCodes"></param> /// <returns></returns> List<Dt_MaterielInfo> GetMaterielInfos(List<string> materielCodes); + WebResponseContent GetWarehouseMaterielInfos(int warehouseId); /// <summary> /// 鎺ユ敹ERP鐗╂枡淇℃伅 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs" new file mode 100644 index 0000000..4431357 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs" @@ -0,0 +1,61 @@ +锘縰sing Magicodes.ExporterAndImporter.Core; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.DB.Models; + +namespace WIDESEA_Model.Models +{ + [SugarTable(nameof(Dt_MaterielCodeInfo), "鐗╂枡鐮佷俊鎭�")] + public class Dt_MaterielCodeInfo : BaseEntity + { + /// <summary> + /// 涓婚敭 + /// </summary> + [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")] + public int Id { get; set; } + + /// <summary> + /// 鐗╂枡缂栧彿 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")] + public string MaterielCode { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "鎵规鍙�")] + public string LotNo { get; set; } + + /// <summary> + /// 鐢熶骇鏃ユ湡 + /// </summary> + [ImporterHeader(Name = "鐢熶骇鏃ユ湡")] + [ExporterHeader(DisplayName = "鐢熶骇鏃ユ湡")] + [SugarColumn(IsNullable = false, IsOnlyIgnoreUpdate = true, ColumnDescription = "鐢熶骇鏃ユ湡")] + public DateTime ProductionDate { get; set; } + + /// <summary> + /// 鏈夋晥鏈� + /// </summary> + [ImporterHeader(Name = "鏈夋晥鏈�")] + [ExporterHeader(DisplayName = "鏈夋晥鏈�")] + [SugarColumn(IsNullable = false, IsOnlyIgnoreUpdate = true, ColumnDescription = "鏈夋晥鏈�")] + public DateTime EffectiveDate { get; set; } + + /// <summary> + /// 閲囪喘鍗曞彿 + /// </summary> + [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "閲囪喘鍗曞彿")] + public string PurchaseOrderNo { get; set; } + + /// <summary> + /// 鏁伴噺 + /// </summary> + [SugarColumn(IsNullable = false, ColumnDescription = "鏁伴噺")] + public float Quantity { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielCodeInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielCodeInfoController.cs" new file mode 100644 index 0000000..d5c7792 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielCodeInfoController.cs" @@ -0,0 +1,17 @@ +锘縰sing Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using WIDESEA_Core.BaseController; +using WIDESEA_IBasicService; +using WIDESEA_Model.Models; + +namespace WIDESEA_WMSServer.Controllers.Basic +{ + [Route("api/[controller]")] + [ApiController] + public class MaterielCodeInfoController : ApiBaseController<IMaterielCodeInfoService, Dt_MaterielCodeInfo> + { + public MaterielCodeInfoController(IMaterielCodeInfoService service) : base(service) + { + } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs" index ab0925f..5df2a98 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs" @@ -1,7 +1,9 @@ -锘縰sing Microsoft.AspNetCore.Http; +锘縰sing Autofac.Core; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using WIDESEA_Core; using WIDESEA_Core.BaseController; +using WIDESEA_Core.BaseRepository; using WIDESEA_Core.CodeConfigEnum; using WIDESEA_Core.Helper; using WIDESEA_DTO.Basic; @@ -39,5 +41,15 @@ return WebResponseContent.Instance.Error(ex.Message); } } + /// <summary> + /// 鑾峰彇搴撳尯鐗╂枡淇℃伅 + /// </summary> + /// <param name="warehouseId"></param> + /// <returns></returns> + [HttpPost, HttpGet, Route("GetWarehouseMaterielInfos")] + public WebResponseContent GetWarehouseMaterielInfos(int warehouseId) + { + return Service.GetWarehouseMaterielInfos(warehouseId); + } } } -- Gitblit v1.9.3