From c38154df95a2c2fa1bd32c45f6be9c0d98e37440 Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期二, 29 四月 2025 10:52:14 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderDetailService.cs | 13 ++ 代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetOrderQuantityView.vue | 144 ++++++++++++++++++++++++++++ 代码管理/WMS/WIDESEA_WMSClient/src/views/basic/materielCodeInfo.vue | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs | 7 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderDetailController.cs | 6 + 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs | 5 + 代码管理/WMS/WIDESEA_WMSClient/config/buttons.js | 3 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderDetailService.cs | 2 代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js | 19 +++ 代码管理/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js | 35 ++++-- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 22 ++++ 11 files changed, 240 insertions(+), 18 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" index d7f1fad..7e56cfb 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" @@ -96,5 +96,10 @@ // return WebResponseContent.Instance.Error(ex.Message); // } //} + [HttpPost, HttpGet, Route("RecWMSTaskCompleted"), AllowAnonymous] + public WebResponseContent RecWMSTaskCompleted(int taskNum) + { + return Service.RecWMSTaskCompleted(taskNum); + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" index a569c8a..5877ad4 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" @@ -907,5 +907,27 @@ { return BaseDal.QueryFirst(x => x.PalletCode == PalletCode && x.SourceAddress == locationCode && (x.TaskState == (int)TaskStatusEnum.SC_Execute || x.TaskState == (int)TaskStatusEnum.SC_Executing)); } + /// <summary> + /// 鎺ュ彈WMS鎵嬪姩瀹屾垚浠诲姟 + /// </summary> + /// <param name="taskNum"></param> + /// <returns></returns> + public WebResponseContent RecWMSTaskCompleted(int taskNum) + { + try + { + Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum); + if (task != null) + { + task.TaskState = TaskStatusEnum.Finish.ObjToInt(); + BaseDal.DeleteAndMoveIntoHty(task, OperateTypeEnum.浜哄伐瀹屾垚); + } + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + return WebResponseContent.Instance.Error(ex.Message); + } + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/config/buttons.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/config/buttons.js" index ce74695..5950582 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/config/buttons.js" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/config/buttons.js" @@ -93,9 +93,10 @@ } }, { - name: "鎵� 鍔� 瀹� 鎴�", + name: "浠� 鍔� 鎵� 鍔� 瀹� 鎴�", icon: '', class: '', + type: 'success', value: 'TaskHandCompleted', onClick: function () { } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetOrderQuantityView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetOrderQuantityView.vue" new file mode 100644 index 0000000..351c0ee --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/extend/GetOrderQuantityView.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: "quantity", + 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.quantity.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/GetOrderQuantity?purchaseOrderNo=" + this.wareId, + null, + "鏌ヨ涓�" + ) + .then((x) => { + this.tableData=x.data.map((i) => ({ + "quantity":i + })) + this.filteredData=x.data.map((i) => ({ + "quantity":i + })) + }); + }, + onSelect() { + if (!this.selection) { + return this.$message.error("璇烽�夋嫨鏁版嵁"); + } + this.$emit("parentCall", ($parent) => { + //濡傦細鍥炲啓缂栬緫琛ㄥ崟鏁版嵁 + $parent.editFormFields.quantity = this.selection[0].quantity; + 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 c111053..516fc1d 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" @@ -2,6 +2,7 @@ import gridBody from './extend/materielcodeprintView.vue' import modelHeader from './extend/materielcodeSelectView.vue' import modelBody from './extend/purchaseOrderNoSelectView.vue' +import modelFooter from './extend/GetOrderQuantityView.vue' let extension = { components: { //鏌ヨ鐣岄潰鎵╁睍缁勪欢 @@ -11,7 +12,7 @@ //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 modelHeader: modelHeader, modelBody: modelBody, - modelFooter: '' + modelFooter: modelFooter }, tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓) buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽� @@ -70,6 +71,22 @@ } }); }); + this.editFormOptions.forEach((option) => { + option.forEach((item) => { + if (item.field == 'quantity') { + //鍒濆鍖栧脊鍑烘閫夋嫨鍣ㄩ厤缃� + item.extra = { + icon: 'el-icon-zoom-out', //鏄剧ず鍥炬爣 + text: '閲囪喘鍗曟渶澶ф暟閲�', //鏄剧ず鏂囨湰 + style: 'color: #3a8ee6;font-size: 13px;cursor: pointer;', + //瑙﹀彂浜嬩欢 + click: (item) => { + this.$refs.modelFooter.open(this.editFormFields.purchaseOrderNo); + } + }; + } + }); + }); // warehouseIdOption.onChange = (val, option) => { // this.editFormFields.materielCode = ""; // materielCodeOption.data = []; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js" index 4e7fe7d..50ec494 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js" @@ -39,20 +39,27 @@ let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'TaskHandCompleted'); if (TaskHandCompletedBtn) { TaskHandCompletedBtn.onClick = function () { - let rows = this.$refs.table.getSelected(); - if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!"); - if (rows.length > 1) return this.$error("璇烽�夋嫨涓�鏉℃暟鎹�!"); - var param = rows[0].taskNum; - this.http - .post("api/Task/TaskCompleted?taskNum="+param, "鏁版嵁澶勭悊涓�...") - .then((x) => { - if (x.status) { - this.$Message.success('浠诲姟鎵嬪姩瀹屾垚'); - this.refresh(); - } else { - return this.$error(x.message); - } - }); + this.$confirm("鏄惁纭瀹屾垚浠诲姟","鎵嬪姩浠诲姟瀹屾垚璀﹀憡",{ + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + center: true, + }).then(() => { + let rows = this.$refs.table.getSelected(); + if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!"); + if (rows.length > 1) return this.$error("璇烽�夋嫨涓�鏉℃暟鎹�!"); + var param = rows[0].taskNum; + this.http + .post("api/Task/TaskCompleted?taskNum="+param, "鏁版嵁澶勭悊涓�...") + .then((x) => { + if (x.status) { + this.$Message.success('浠诲姟鎵嬪姩瀹屾垚'); + this.refresh(); + } else { + return this.$error(x.message); + } + }); + }); } } }, 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 38cd25d..528ef98 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" @@ -71,7 +71,7 @@ { title: "鏁伴噺", field: "quantity", - required: true, + type:"int" }, ], [ diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs" index 462a257..fc0fe80 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/APIEnum/APIEnum.cs" @@ -56,6 +56,11 @@ /// 搴撳瓨鏉垮嚭搴� /// </summary> [Description("搴撳瓨鏉垮嚭搴�")] - WMS_MES_ProductOutBound + WMS_MES_ProductOutBound, + /// <summary> + /// 鍥炶皟WCS浠诲姟瀹屾垚 + /// </summary> + [Description("鍥炶皟WCS浠诲姟瀹屾垚")] + FeedBackWCSTaskCompleted } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderDetailService.cs" index d56094b..6595181 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderDetailService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IPurchaseOrderDetailService.cs" @@ -14,5 +14,7 @@ { WebResponseContent GetPurchaseOrderDetailMaterielCode(int warehouseId); WebResponseContent GetPurchaseOrderNos(string materielCode); + + WebResponseContent GetOrderQuantity(string purchaseOrderNo); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderDetailService.cs" index bf6d65c..b0a6a70 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderDetailService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/PurchaseOrderDetailService.cs" @@ -50,5 +50,18 @@ return WebResponseContent.Instance.Error(ex.Message); } } + public WebResponseContent GetOrderQuantity(string purchaseOrderNo) + { + try + { + List<Dt_PurchaseOrder> purchaseOrders = BaseDal.Db.Queryable<Dt_PurchaseOrder>().Where(x => x.PurchaseOrderNo == purchaseOrderNo).ToList(); + List<float> orderQuantity = purchaseOrders.Select(x => x.OrderQuantity).ToList(); + return WebResponseContent.Instance.OK(data: orderQuantity); + } + catch (Exception ex) + { + return WebResponseContent.Instance.Error(ex.Message); + } + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderDetailController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderDetailController.cs" index 2a4cb19..2402aa9 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderDetailController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/PurchaseOrderDetailController.cs" @@ -28,5 +28,11 @@ { return Service.GetPurchaseOrderNos(materielCode); } + + [HttpPost, HttpGet, Route("GetOrderQuantity"), AllowAnonymous] + public WebResponseContent GetOrderQuantity(string purchaseOrderNo) + { + return Service.GetOrderQuantity(purchaseOrderNo); + } } } -- Gitblit v1.9.3