From 1824228ee4f0f25383d1c9e9fea684dfc8a460bc Mon Sep 17 00:00:00 2001 From: wankeda <Administrator@DESKTOP-HAU3ST3> Date: 星期六, 01 三月 2025 17:36:43 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesProInOrderService.cs | 46 ++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesRworkOutboundOrder.cs | 3 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/16bda44f-cb60-43e3-8deb-16983a6c8720.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs | 2 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bcaff427-9b5a-40c5-b7b6-df06507540f9.vsidx | 0 代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c3952f00-6f03-46e1-a8c4-0c2746ff48ae.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs | 4 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/ProSerNumAnalysisModel.cs | 52 +++++ 代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js | 133 +++++++------ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielCodeInfo.cs | 2 代码管理/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue | 17 - 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs | 19 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrderDetail.cs | 2 代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/extend/purchaseOrderNoSelectView.vue | 144 ++++++++++++++ 代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/extend/materielcodeSelectView.vue | 144 ++++++++++++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisCodeEnum.cs | 3 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3a86d184-9f6a-4b52-8eb2-6a125517673d.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/fed89d2c-c26e-4f31-9fa3-8a0b7f92a8fd.vsidx | 0 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MaterielCodeInfoService.cs | 15 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/MesProInOrderController.cs | 1 21 files changed, 498 insertions(+), 91 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0754b144-0516-459d-8285-79bf019ec95b.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c3952f00-6f03-46e1-a8c4-0c2746ff48ae.vsidx" similarity index 100% rename from "\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0754b144-0516-459d-8285-79bf019ec95b.vsidx" rename to "\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c3952f00-6f03-46e1-a8c4-0c2746ff48ae.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/materielcodeSelectView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/materielcodeSelectView.vue" new file mode 100644 index 0000000..05aff51 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/materielcodeSelectView.vue" @@ -0,0 +1,144 @@ +<template> + <vol-box + :lazy="true" + v-model="model" + title="閫夋嫨鐗╂枡缂栧彿" + :width="200" + :padding="0" + > + <div> + <div> + <!-- 鎼滅储閰嶇疆 --> + <div class="search-form"> + <label>鐗╂枡缂栧彿锛�</label> + <el-input style="width: 100px" v-model="MaterialCode"></el-input> + </div> + <el-table + ref="singleTable" + :data="filteredData" + style="width: 100%; height: 100%" + highlight-current-row + height="500px" + @selection-change="handleSelectionChange" + > + > + <el-table-column type="selection" width="55"> </el-table-column> + <el-table-column + v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" + :key="index" + :prop="item.prop" + :label="item.title" + align="center" + > + </el-table-column> + </el-table> + </div> + </div> + <template #footer> + <div><el-button type="primary" @click="onSelect">纭</el-button></div> + </template> + </vol-box> +</template> +<script> +import VolBox from "@/components/basic/VolBox.vue"; + +/******娉ㄦ剰锛氬鏋滃嚭鐜版彁绀烘病鏈夋潈闄愮殑闂锛岃鍚庡彴寮�鍙戞枃妗d笂鐨勩�愰噸鍐欏悗鍙版潈闄愩��*****/ + +//杩欓噷浣跨敤鐨剉ue2璇硶锛屼篃鍙互鍐欐垚vue3璇硶 +export default { + components: { + "vol-box": VolBox, + }, + methods: {}, + data() { + return { + model: false, //寮瑰嚭妗� + wareId: null, + showDetialBox: false, + MaterialCode:null, + selection:null, + tableData: [], + filteredData: [], + tableColumns: [ + { + prop: "materielCode", + title: "鐗╂枡缂栧彿", + type: "string", + }, + ], + }; + }, + watch: { + MaterialCode(newVal) { + this.filterLocalData(newVal); + } + }, + methods: { + open(val) { + //鎵撳紑涓昏〃閫夋嫨鏁版嵁 + this.model = true; + this.wareId=val; + this.getData(); + }, + filterLocalData(code) { + if (code) { + this.filteredData = this.tableData.filter((item) => { + return item.materielCode.includes(code); + }); + console.log(this.filteredData.length); + console.log(this.tableData.length); + } else { + this.filteredData = [...this.tableData]; // 閲嶇疆涓哄畬鏁存暟鎹� + } + }, + handleSelectionChange(val) { + this.selection = val; + if (this.selection.length > 1) { + this.$message.error("浠呴�夋嫨涓�鏉℃暟鎹�"); + // 娓呯┖閫変腑鐨勭涓�鏉℃暟鎹� + this.$refs.singleTable.clearSelection(); + } + console.log(this.selection); + }, + getData() { + this.http + .post( + "/api/PurchaseOrderDetail/GetPurchaseOrderDetailMaterielCode?warehouseId=" + this.wareId, + null, + "鏌ヨ涓�" + ) + .then((x) => { + this.tableData=x.data.map((i) => ({ + "materielCode":i + })) + this.filteredData=x.data.map((i) => ({ + "materielCode":i + })) + }); + }, + onSelect() { + if (!this.selection) { + return this.$message.error("璇烽�夋嫨鏁版嵁"); + } + this.$emit("parentCall", ($parent) => { + //濡傦細鍥炲啓缂栬緫琛ㄥ崟鏁版嵁 + $parent.editFormFields.materielCode = this.selection[0].materielCode; + this.model = false; + }); + this.MaterialCode = null; + this.tableData = []; + this.filteredData = []; + }, + }, +}; +</script> +<style lang="less" scoped> +.search-form { + display: flex; + padding: 10px; + line-height: 34px; + button { + margin-left: 10px; + } +} +</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/purchaseOrderNoSelectView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/purchaseOrderNoSelectView.vue" new file mode 100644 index 0000000..04cd68c --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/purchaseOrderNoSelectView.vue" @@ -0,0 +1,144 @@ +<template> + <vol-box + :lazy="true" + v-model="model" + title="閫夋嫨閲囪喘鍗曞彿" + :width="280" + :padding="0" + > + <div> + <div> + <!-- 鎼滅储閰嶇疆 --> + <div class="search-form"> + <label>閲囪喘鍗曞彿锛�</label> + <el-input style="width: 160px" v-model="MaterialCode"></el-input> + </div> + <el-table + ref="singleTable" + :data="filteredData" + style="width: 100%; height: 100%" + highlight-current-row + height="500px" + @selection-change="handleSelectionChange" + > + > + <el-table-column type="selection" width="55"> </el-table-column> + <el-table-column + v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" + :key="index" + :prop="item.prop" + :label="item.title" + align="center" + > + </el-table-column> + </el-table> + </div> + </div> + <template #footer> + <div><el-button type="primary" @click="onSelect">纭</el-button></div> + </template> + </vol-box> + </template> + <script> + import VolBox from "@/components/basic/VolBox.vue"; + + /******娉ㄦ剰锛氬鏋滃嚭鐜版彁绀烘病鏈夋潈闄愮殑闂锛岃鍚庡彴寮�鍙戞枃妗d笂鐨勩�愰噸鍐欏悗鍙版潈闄愩��*****/ + + //杩欓噷浣跨敤鐨剉ue2璇硶锛屼篃鍙互鍐欐垚vue3璇硶 + export default { + components: { + "vol-box": VolBox, + }, + methods: {}, + data() { + return { + model: false, //寮瑰嚭妗� + wareId: null, + showDetialBox: false, + MaterialCode:null, + selection:null, + tableData: [], + filteredData: [], + tableColumns: [ + { + prop: "purchaseOrderNo", + title: "閲囪喘鍗曞彿", + type: "string", + }, + ], + }; + }, + watch: { + MaterialCode(newVal) { + this.filterLocalData(newVal); + } + }, + methods: { + open(val) { + //鎵撳紑涓昏〃閫夋嫨鏁版嵁 + this.model = true; + this.wareId=val; + this.getData(); + }, + filterLocalData(code) { + if (code) { + this.filteredData = this.tableData.filter((item) => { + return item.purchaseOrderNo.includes(code); + }); + console.log(this.filteredData.length); + console.log(this.tableData.length); + } else { + this.filteredData = [...this.tableData]; // 閲嶇疆涓哄畬鏁存暟鎹� + } + }, + handleSelectionChange(val) { + this.selection = val; + if (this.selection.length > 1) { + this.$message.error("浠呴�夋嫨涓�鏉℃暟鎹�"); + // 娓呯┖閫変腑鐨勭涓�鏉℃暟鎹� + this.$refs.singleTable.clearSelection(); + } + console.log(this.selection); + }, + getData() { + this.http + .post( + "/api/PurchaseOrderDetail/GetPurchaseOrderNos?materielCode=" + this.wareId, + null, + "鏌ヨ涓�" + ) + .then((x) => { + this.tableData=x.data.map((i) => ({ + "purchaseOrderNo":i + })) + this.filteredData=x.data.map((i) => ({ + "purchaseOrderNo":i + })) + }); + }, + onSelect() { + if (!this.selection) { + return this.$message.error("璇烽�夋嫨鏁版嵁"); + } + this.$emit("parentCall", ($parent) => { + //濡傦細鍥炲啓缂栬緫琛ㄥ崟鏁版嵁 + $parent.editFormFields.purchaseOrderNo = this.selection[0].purchaseOrderNo; + this.model = false; + }); + this.MaterialCode = null; + this.tableData = []; + this.filteredData = []; + }, + }, + }; + </script> + <style lang="less" scoped> + .search-form { + display: flex; + padding: 10px; + line-height: 34px; + button { + margin-left: 10px; + } + } + </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/materielCodeInfo.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js" index 87fa048..116fd46 100644 --- "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" @@ -1,5 +1,7 @@ //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜 import gridBody from './extend/materielcodeprintView.vue' +import modelHeader from './extend/materielcodeSelectView.vue' +import modelBody from './extend/purchaseOrderNoSelectView.vue' let extension = { components: { //鏌ヨ鐣岄潰鎵╁睍缁勪欢 @@ -7,8 +9,8 @@ gridBody: gridBody, gridFooter: '', //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 - modelHeader: '', - modelBody: '', + modelHeader: modelHeader, + modelBody: modelBody, modelFooter: '' }, tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓) @@ -33,71 +35,76 @@ let day = String(date.getDate()).padStart(2, "0"); return year + "-" + month + "-" + day; }, - // 鏂板鏂规硶锛氬姞杞界墿鏂欑紪鍙锋暟鎹� - async loadMaterielCodes(option) { - try { - option.loading = true; - const { page, pageSize, keyword } = option.pagination; - const res = await this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderDetailMaterielCode", { - warehouseId: this.editFormFields.warehouseId, - keyword, - page, - pageSize - }, true); - - if (res.status) { - option.pagination.total = res.total || res.data.length; - const newData = res.data.map(item => ({ key: item, value: item })); - option.data = page === 1 ? newData : [...option.data, ...newData]; - } - } catch (error) { - this.$error("鏁版嵁鍔犺浇澶辫触"); - } finally { - option.loading = false; - } - }, //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄� onInit() { //妗嗘灦鍒濆鍖栭厤缃墠锛� this.$nextTick(() => { - let warehouseIdOption = this.getOption("warehouseId"); - let materielCodeOption = this.getOption("materielCode"); - let purchaseOrderNoOption = this.getOption("purchaseOrderNo"); - let materielQueryOption = this.getOption("materielQuery"); - warehouseIdOption.onChange = (val, option) => { - this.editFormFields.materielCode = ""; - materielCodeOption.data = []; - this.editFormFields.purchaseOrderNo = ""; - purchaseOrderNoOption.data = []; - if (val == null || val == 0) { - return this.$error("璇烽�夋嫨浠撳簱锛�") - } - this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderDetailMaterielCode?warehouseId=" + val, {}, true).then( - source => { - if (!source.status) return this.$error(source.message); - this.$nextTick(() => { + this.editFormOptions.forEach((option) => { + option.forEach((item) => { + if (item.field == 'materielCode') { + //鍒濆鍖栧脊鍑烘閫夋嫨鍣ㄩ厤缃� + item.extra = { + icon: 'el-icon-zoom-out', //鏄剧ず鍥炬爣 + text: '閫夋嫨鏁版嵁', //鏄剧ず鏂囨湰 + style: 'color: #3a8ee6;font-size: 13px;cursor: pointer;', + //瑙﹀彂浜嬩欢 + click: (item) => { + this.$refs.modelHeader.open(this.editFormFields.warehouseId); + } + }; + } + }); + }); + this.editFormOptions.forEach((option) => { + option.forEach((item) => { + if (item.field == 'purchaseOrderNo') { + //鍒濆鍖栧脊鍑烘閫夋嫨鍣ㄩ厤缃� + item.extra = { + icon: 'el-icon-zoom-out', //鏄剧ず鍥炬爣 + text: '閫夋嫨鏁版嵁', //鏄剧ず鏂囨湰 + style: 'color: #3a8ee6;font-size: 13px;cursor: pointer;', + //瑙﹀彂浜嬩欢 + click: (item) => { + this.$refs.modelBody.open(this.editFormFields.materielCode); + } + }; + } + }); + }); + // warehouseIdOption.onChange = (val, option) => { + // this.editFormFields.materielCode = ""; + // materielCodeOption.data = []; + // this.editFormFields.purchaseOrderNo = ""; + // purchaseOrderNoOption.data = []; + // if (val == null || val == 0) { + // return this.$error("璇烽�夋嫨浠撳簱锛�") + // } + // this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderDetailMaterielCode?warehouseId=" + val, {}, true).then( + // source => { + // if (!source.status) return this.$error(source.message); + // this.$nextTick(() => { - for (let i = 0; i < source.data.length; i++) { - materielCodeOption.data.push({ key: source.data[i], value: source.data[i] }) - } - }) - }) - } - materielCodeOption.onChange = (val, option) => { - this.editFormFields.purchaseOrderNo = ""; - purchaseOrderNoOption.data = []; - if (val == null || val == 0) { - return this.$error("璇烽�夋嫨鐗╂枡缂栧彿锛�") - } - this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderNos?materielCode=" + val, {}, true).then( - source => { - if (!source.status) return this.$error(source.message); - this.$nextTick(() => { - for (let i = 0; i < source.data.length; i++) { - purchaseOrderNoOption.data.push({ key: source.data[i], value: source.data[i] }) - } - }); - }) - } + // for (let i = 0; i < source.data.length; i++) { + // materielCodeOption.data.push({ key: source.data[i], value: source.data[i] }) + // } + // }) + // }) + // } + // materielCodeOption.onChange = (val, option) => { + // this.editFormFields.purchaseOrderNo = ""; + // purchaseOrderNoOption.data = []; + // if (val == null || val == 0) { + // return this.$error("璇烽�夋嫨鐗╂枡缂栧彿锛�") + // } + // this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderNos?materielCode=" + val, {}, true).then( + // source => { + // if (!source.status) return this.$error(source.message); + // this.$nextTick(() => { + // for (let i = 0; i < source.data.length; i++) { + // purchaseOrderNoOption.data.push({ key: source.data[i], value: source.data[i] }) + // } + // }); + // }) + // } }); this.columns.push({ 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" index c6d641c..0f4e316 100644 --- "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" @@ -31,7 +31,6 @@ warehouseId: "", purchaseOrderNo: "", materielCode: "", - materielQuery:"", productionDate: "", effectiveDate: "", }); @@ -47,30 +46,18 @@ }, ], [ - { - title: "鎼滅储鐗╂枡", - field: "materielQuery", - type: "string", - required: true, - }, - ], - [ { title: "鐗╂枡缂栫爜", field: "materielCode", - type: "select", - data: [], - required: true, + type: "string", }, ], [ { title: "閲囪喘鍗曞彿", field: "purchaseOrderNo", - type: "select", - data: [], - required: true, + type: "string", }, ], [ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/16bda44f-cb60-43e3-8deb-16983a6c8720.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/16bda44f-cb60-43e3-8deb-16983a6c8720.vsidx" new file mode 100644 index 0000000..fea932b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/16bda44f-cb60-43e3-8deb-16983a6c8720.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3a86d184-9f6a-4b52-8eb2-6a125517673d.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3a86d184-9f6a-4b52-8eb2-6a125517673d.vsidx" new file mode 100644 index 0000000..30a74c3 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3a86d184-9f6a-4b52-8eb2-6a125517673d.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bcaff427-9b5a-40c5-b7b6-df06507540f9.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bcaff427-9b5a-40c5-b7b6-df06507540f9.vsidx" new file mode 100644 index 0000000..1abdbed --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bcaff427-9b5a-40c5-b7b6-df06507540f9.vsidx" Binary files differ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/fed89d2c-c26e-4f31-9fa3-8a0b7f92a8fd.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/fed89d2c-c26e-4f31-9fa3-8a0b7f92a8fd.vsidx" new file mode 100644 index 0000000..8f9e9fa --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/fed89d2c-c26e-4f31-9fa3-8a0b7f92a8fd.vsidx" Binary files differ 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" index 83a06ba..e9bfa3c 100644 --- "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" @@ -16,8 +16,21 @@ { public class MaterielCodeInfoService : ServiceBase<Dt_MaterielCodeInfo, IMaterielCodeInfoRepository>, IMaterielCodeInfoService { - public MaterielCodeInfoService(IMaterielCodeInfoRepository BaseDal) : base(BaseDal) + private readonly IBasicRepository _basicRepository; + public MaterielCodeInfoService(IMaterielCodeInfoRepository BaseDal, IBasicRepository basicRepository) : base(BaseDal) { + _basicRepository = basicRepository; + } + public override WebResponseContent AddData(SaveModel saveModel) + { + string? MaterialCode = saveModel.MainData["materielCode"].ToString(); + Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x=>x.MaterielCode== MaterialCode); + if (materielInfo == null) + { + return WebResponseContent.Instance.Error("鐗╂枡涓嶅瓨鍦�"); + } + saveModel.MainData.Add(nameof(Dt_MaterielCodeInfo.MaterielName).FirstLetterToLower(), materielInfo.MaterielName); + return base.AddData(saveModel); } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisCodeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisCodeEnum.cs" index 8067ce6..5a722d3 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisCodeEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisCodeEnum.cs" @@ -24,6 +24,7 @@ [Description("澶栫鐮�")] OutterCode, - MatSerNumAnalysis + MatSerNumAnalysis, + ProSerNumAnalysis } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs" index a994796..146eccc 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs" @@ -37,10 +37,27 @@ /// </summary> [Description("璁㈠崟鍙�")] ODN, - + /// <summary> + /// 鏈夋晥鏈� + /// </summary> [Description("鏈夋晥鏈�")] ED, /// <summary> + /// 鍛ㄦ湡 + /// </summary> + [Description("鍛ㄦ湡")] + DC, + /// <summary> + /// 鍙夋澘鏁� + /// </summary> + [Description("鍙夋澘鏁�")] + XQ, + /// <summary> + /// PCS鏁伴噺 + /// </summary> + [Description("PCS鏁伴噺")] + PCSQ, + /// <summary> /// 鍘熷鏁版嵁 /// </summary> [Description("鍘熷鏁版嵁")] diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/ProSerNumAnalysisModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/ProSerNumAnalysisModel.cs" new file mode 100644 index 0000000..26a3fd9 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/ProSerNumAnalysisModel.cs" @@ -0,0 +1,52 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using WIDESEA_Core.Attributes; +using WIDESEA_Core.CodeConfigEnum; + +namespace WIDESEA_DTO.Basic +{ + /// <summary> + /// 鎴愬搧鍐呭鍖呯爜瑙f瀽 + /// </summary> + [AnalysisRule, ModelValidate] + public class ProSerNumAnalysisModel + { + /// <summary> + /// 鍐呭寘鍙� + /// </summary> + [AnalysisItemRule(AnalysisFormatTypeEnum.MTC), PropertyValidate("鍐呭寘鍙�", NotNullAndEmpty = true)] + public string BagNO { get; set; } + + /// <summary> + /// 浜у搧鍙� + /// </summary> + [AnalysisItemRule(AnalysisFormatTypeEnum.BHN), PropertyValidate("浜у搧鍙�", NotNullAndEmpty = true)] + public string ProductCode { get; set; } + + /// <summary> + /// 鍛ㄦ湡 + /// </summary> + [AnalysisItemRule(AnalysisFormatTypeEnum.DC), PropertyValidate("鍛ㄦ湡", NotNullAndEmpty = true)] + public string DateCode { get; set; } + + /// <summary> + /// X鏉挎暟 + /// </summary> + [AnalysisItemRule(AnalysisFormatTypeEnum.ED), PropertyValidate("X鏉挎暟", NotNullAndEmpty = true)] + public string XQty { get; set; } + + /// <summary> + /// PCS鏁伴噺 + /// </summary> + [AnalysisItemRule(AnalysisFormatTypeEnum.PCSQ), PropertyValidate("PCS鏁伴噺", NotNullAndEmpty = true)] + public string OKPCSQTY { get; set; } + /// <summary> + /// 鍘熷鏁版嵁 + /// </summary> + [AnalysisItemRule(AnalysisFormatTypeEnum.BD), PropertyValidate("鍘熷鏁版嵁", NotNullAndEmpty = true)] + public string SerialNumber { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesProInOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesProInOrderService.cs" index 118aa27..9928363 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesProInOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesProInOrderService.cs" @@ -3,9 +3,13 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using WIDESEA_Common.OrderEnum; using WIDESEA_Core; using WIDESEA_Core.BaseRepository; using WIDESEA_Core.BaseServices; +using WIDESEA_Core.CodeConfigEnum; +using WIDESEA_Core.Helper; +using WIDESEA_DTO.Basic; using WIDESEA_DTO.MES; using WIDESEA_IBasicRepository; using WIDESEA_IInboundRepository; @@ -19,10 +23,48 @@ { public IMesProInOrderRepository Repository => BaseDal; private readonly IUnitOfWorkManage _unitOfWorkManage; - public MesProInOrderService(IMesProInOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManag) : base(BaseDal) + private readonly IInboundRepository _inboundRepository; + public MesProInOrderService(IMesProInOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManag, IInboundRepository inboundRepository) : base(BaseDal) { _unitOfWorkManage = unitOfWorkManag; + _inboundRepository = inboundRepository; } - + /// <summary> + /// 鎴愬搧鍏ュ簱鎵爜 + /// </summary> + /// <param name="Id"></param> + /// <param name="saveModel"></param> + /// <returns></returns> + public WebResponseContent ProInboundScan(int Id,string serNum) + { + WebResponseContent content = new WebResponseContent(); + try + { + //鑾峰彇瀵瑰簲MES鎴愬搧鍏ュ簱鍗曟嵁 + Dt_MesProInOrder mesProInOrder = BaseDal.Db.Queryable<Dt_MesProInOrder>().Includes(x => x.Details).First(); + if (mesProInOrder==null) + { + return content.Error("褰撳墠MES鍏ュ簱鍗曟嵁涓嶅瓨鍦�"); + } + if (mesProInOrder.MesProStatus>= InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt()) + { + return content.Error("褰撳墠鍗曟嵁宸插叆搴撴垨鍏抽棴鐘舵��"); + } + ProSerNumAnalysisModel model = CodeAnalysisHelper.CodeAnalysis<ProSerNumAnalysisModel>(AnalysisCodeEnum.ProSerNumAnalysis, serNum); + float SumPCSQty = mesProInOrder.Details.Sum(x => x.OKPCSQTY); + float OverPCSQty = mesProInOrder.Details.Sum(x=>x.OverInQuantity); + if ((OverPCSQty+model.OKPCSQTY.ObjToInt())>SumPCSQty) + { + return content.Error($"褰撳墠鍏ュ簱璁㈠崟鏁伴噺婧㈠嚭{(OverPCSQty + model.OKPCSQTY.ObjToInt())- SumPCSQty}"); + } + //鑾峰彇瀵瑰簲鍐呭寘鏄庣粏 + Dt_MesProInOrderDetail? proInOrderDetail = mesProInOrder.Details.FirstOrDefault(x=>x.BagNo==model.BagNO) ?? throw new Exception($"鏈壘鍒�"); + } + catch (Exception ex) + { + content.Error(ex.Message); + } + return content; + } } } 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" index a6f85b2..385df29 100644 --- "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" @@ -31,7 +31,7 @@ /// <summary> /// 鐗╂枡鍚嶇О /// </summary> - [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")] + [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")] public string MaterielName { get; set; } /// <summary> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrderDetail.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrderDetail.cs" index d6ca211..a2ae630 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrderDetail.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_MesProInOrderDetail.cs" @@ -69,7 +69,7 @@ /// <summary> /// X浣� /// </summary> - [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "X浣�")] + [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "X浣�")] public string XSite { get; set; } /// <summary> /// ERP宸ュ崟 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesRworkOutboundOrder.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesRworkOutboundOrder.cs" index 7e96279..708b7d3 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesRworkOutboundOrder.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_MesRworkOutboundOrder.cs" @@ -8,11 +8,12 @@ using WIDESEA_Core.CodeConfigEnum; using WIDESEA_Core.DB.Models; -namespace WIDESEA_Model.Models.Outbound +namespace WIDESEA_Model.Models { /// <summary> /// 鎴愬搧杩斿伐鎻愬簱鍑哄簱鍗� /// </summary> + [SugarTable(nameof(Dt_MesRworkOutboundOrder), "鎴愬搧杩斿伐鎻愬簱鍑哄簱鍗�")] public class Dt_MesRworkOutboundOrder : BaseEntity { /// <summary> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs" index af23f91..b73f260 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs" @@ -84,7 +84,7 @@ /// <summary> /// 瑁佸垏鍚庡搴� /// </summary> - [SugarColumn(IsNullable = false, ColumnDescription = "瑁佸垏鍚庡搴�")] + [SugarColumn(IsNullable = true, ColumnDescription = "瑁佸垏鍚庡搴�")] public float CutedWidth { get; set; } /// <summary> 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 7852115..6ca6a41 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" @@ -931,10 +931,6 @@ { mesProInOrderDetails.Add(_mapper.Map<Dt_MesProInOrderDetail>(item)); } - mesProInOrderDetails.ForEach(x => - { - x.OverInQuantity = 0; - }); Dt_MesProInOrder mesProInOrder = new Dt_MesProInOrder() { WarehouseId = warehouse.WarehouseId, diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/MesProInOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/MesProInOrderController.cs" index 94b3cba..56fb36c 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/MesProInOrderController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/MesProInOrderController.cs" @@ -15,5 +15,6 @@ public MesProInOrderController(IMesProInOrderService service) : base(service) { } + } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs" index 8636c46..f930f5e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Filter/CustomProfile.cs" @@ -9,6 +9,7 @@ using WIDESEA_Core.Helper; using WIDESEA_DTO; using WIDESEA_DTO.Inbound; +using WIDESEA_DTO.MES; using WIDESEA_DTO.Outbound; using WIDESEA_DTO.System; using WIDESEA_DTO.Task; @@ -33,6 +34,7 @@ CreateMap<Dt_ReceiveOrderDetail, Dt_CheckOrder>().ForMember(a => a.ReceivedQuantity, b => b.MapFrom(x => x.ReceivedQuantity)).ForMember(a => a.MaterielCode, b => b.MapFrom(x => x.MaterielCode)).ForMember(a => a.CheckOrderStatus, b => b.MapFrom(x => CheckOrderStatusEnum.NotCheck.ObjToInt())); CreateMap<Dt_Task, WMSTaskDTO>(); + CreateMap<MESBagDetail, Dt_MesProInOrderDetail>().ForMember(x => x.OverInQuantity, b => b.MapFrom(b => 0)); } } } -- Gitblit v1.9.3