From 91ead18d0e92b6e1ed916c5159f3431bf2071a56 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期五, 12 十二月 2025 13:59:40 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundBatchPickingService.cs | 39 +-
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/SplitPackageService.cs | 1
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 35 +
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs | 11
项目代码/WIDESEA_WMSClient/src/extension/inbound/extend/EmptyTrayInbound.vue | 169 ++++++++++++
项目代码/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue | 112 +++++++
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs | 3
项目代码/WIDESEA_WMSClient/config/buttons.js | 8
项目代码/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js | 340 ++++++++++++-----------
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 68 ++++
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue | 12
12 files changed, 588 insertions(+), 212 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
index 646ec5c..355dec9 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
@@ -235,6 +235,14 @@
onClick: function () {
}
},
+{
+ name: "绌烘墭鍏ュ簱",
+ class: '',
+ value: 'EmptyTrayInbound',
+ type: 'primary',
+ onClick: function () {
+ }
+},
]
export default buttons
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/EmptyTrayInbound.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/EmptyTrayInbound.vue"
new file mode 100644
index 0000000..7105202
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/EmptyTrayInbound.vue"
@@ -0,0 +1,169 @@
+<template>
+ <vol-box v-model="show" title="绌烘墭鍏ュ簱" :width="800" :height="1200">
+ <template #content>
+ <el-form ref="form" :model="form" label-width="90px">
+ <el-form-item label="鍏ュ簱鍖哄煙:">
+ <el-select v-model="form.locationType" placeholder="璇烽�夋嫨鍏ュ簱鍖哄煙">
+ <el-option v-for="item in locationTypes" :key="item.locationType" :label="item.locationTypeDesc"
+ :value="item.locationType" />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="鎵樼洏鏉$爜:">
+ <el-input v-model="form.palletCode" placeholder="璇锋壂鎻�/杈撳叆鎵樼洏鏉$爜" @keyup.enter="submit" @keyup.13="submit"
+ clearable maxlength="50" @paste="handlePaste" @input="handleInput" ref="boxCodeInput" />
+ </el-form-item>
+ </el-form>
+ </template>
+
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button type="primary" @click="submit">纭</el-button>
+ <el-button @click="show = false">鍏抽棴</el-button>
+ </div>
+ </template>
+ </vol-box>
+</template>
+
+<script>
+import VolBox from '@/components/basic/VolBox.vue'
+
+export default {
+ components: { VolBox },
+ props: {
+ value: { type: Boolean, default: false }
+ },
+ data() {
+ return {
+ show: false,
+ form: {
+ palletCode: '',
+ locationType: ''
+ },
+ locationTypes: []
+ }
+ },
+ methods: {
+ open() {
+ this.show = true
+ this.getData();
+ this.$nextTick(() => {
+ this.focusInput()
+ })
+ },
+
+ async getData() {
+ try {
+ const { data } = await this.http.post("api/LocationInfo/GetLocationTypes")
+ this.locationTypes = data
+ } catch (e) {
+ this.$message.error('鑾峰彇鍖哄煙绫诲瀷澶辫触')
+ }
+ },
+
+ async submit() {
+ if (!this.form.palletCode) {
+ this.$message.warning('璇疯緭鍏ユ墭鐩樻潯鐮�')
+ this.focusInput()
+ return
+ }
+
+ if (!this.form.locationType) {
+ this.$message.warning('璇烽�夋嫨鍏ュ簱鍖哄煙')
+ return
+ }
+
+ try {
+ let param = {
+ WarehouseCode: this.form.locationType,
+ PalletCode: this.form.palletCode
+ }
+
+ const { status, message } = await this.http.post(
+ `/api/InboundOrder/EmptyMaterielGroup`,
+ param
+ )
+
+ if (status) {
+ this.$message.success("缁勭洏鎴愬姛");
+ // 娓呯┖杈撳叆妗嗘暟鎹�
+ this.form.palletCode = '';
+ // 鑱氱劍骞堕�変腑杈撳叆妗�
+ this.focusAndSelectInput();
+ } else {
+ this.$message.error(message || '鎿嶄綔澶辫触');
+ // 澶辫触鏃朵笉娓呯悊鏁版嵁锛屼絾鑱氱劍骞堕�変腑杈撳叆妗嗭紝鏂逛究淇敼
+ this.focusAndSelectInput();
+ }
+ } catch (error) {
+ this.$message.error('璇锋眰寮傚父');
+ // 寮傚父鏃朵篃涓嶆竻鐞嗘暟鎹�
+ this.focusAndSelectInput();
+ }
+ },
+
+ // 鎵弿鏋紭鍖栧鐞�
+ handleInput(value) {
+ // 杩囨护闈炴暟瀛楀拰鏉$爜甯哥敤瀛楃
+ this.form.palletCode = value.replace(/[^a-zA-Z0-9\-]/g, '')
+ },
+
+ handlePaste(e) {
+ // 绮樿创鏃惰嚜鍔ㄦ彁浜�
+ setTimeout(this.submit, 100)
+ },
+
+ // 鑱氱劍骞堕�変腑杈撳叆妗�
+ focusAndSelectInput() {
+ this.$nextTick(() => {
+ setTimeout(() => {
+ const inputRef = this.$refs.boxCodeInput;
+ if (inputRef) {
+ // Element Plus/Element UI 鐨勫鐞嗘柟寮�
+ const inputEl = inputRef.$el ? inputRef.$el.querySelector('input') : inputRef;
+ if (inputEl) {
+ inputEl.focus();
+ inputEl.select();
+ }
+ }
+ }, 100);
+ });
+ },
+
+ // 鍙仛鐒﹁緭鍏ユ锛堜笉娓呯┖鏁版嵁锛�
+ focusInput() {
+ this.$nextTick(() => {
+ const inputRef = this.$refs.boxCodeInput;
+ if (inputRef) {
+ const inputEl = inputRef.$el ? inputRef.$el.querySelector('input') : inputRef;
+ inputEl?.focus();
+ }
+ });
+ },
+
+ // 娓呯┖琛ㄥ崟鏁版嵁
+ clearForm() {
+ this.form.palletCode = '';
+ // 涓嶆竻绌� locationType锛屼繚鎸佸尯鍩熼�夋嫨
+ }
+ },
+ watch: {
+ show(val) {
+ if (val) {
+ this.$nextTick(() => {
+ this.focusInput()
+ })
+ } else {
+ // 鍏抽棴寮圭獥鏃舵竻绌鸿〃鍗�
+ this.clearForm();
+ }
+ }
+ }
+}
+</script>
+
+<style scoped>
+.dialog-footer {
+ text-align: right;
+}
+</style>
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue"
index 290038c..61170fd 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue"
@@ -103,6 +103,32 @@
<el-alert :title="error" type="error" show-icon closable @close="error = ''" />
</div>
+ <!-- 鏈粍鐩樺垪琛� -->
+ <div class="unpallet-section compact">
+ <el-card shadow="hover" class="compact-card unpallet-card">
+ <div slot="header" class="compact-header">
+ <span><i class="el-icon-tickets"></i> 鏈粍鐩樻潯鐮�</span>
+ <span class="list-actions">
+ <el-tag type="primary" size="small">鏈粍鐩� {{ totalStockCount }}</el-tag>
+ </span>
+ </div>
+
+
+ <div class="table-container">
+ <el-table :data="unpalletMaterials" stripe style="width: 100%" height="100%" size="small" v-loading="unpalletBarcodesLoading">
+ <el-table-column type="index" label="搴忓彿" width="60" align="center"></el-table-column>
+ <el-table-column prop="barcode" label="鏉$爜" min-width="140" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="materielCode" label="鐗╂枡缂栫爜" min-width="150" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="batchNo" label="鎵规" min-width="150" show-overflow-tooltip></el-table-column>
+ <el-table-column prop="orderQuantity" label="鏁伴噺" min-width="130" align="right"></el-table-column>
+ <el-table-column prop="unit" label="鍗曚綅" width="80" align="center"></el-table-column>
+ <el-table-column prop="supplyCode" label="渚涘簲鍟�" min-width="130" show-overflow-tooltip></el-table-column>
+ </el-table>
+ </div>
+ </el-card>
+
+ </div>
+
<!-- 鐗╂枡鍒楄〃 - 鍥哄畾楂樺害甯︽粴鍔ㄦ潯 -->
<div class="material-list compact">
<el-card shadow="hover" class="compact-card">
@@ -110,7 +136,6 @@
<span><i class="el-icon-tickets"></i> 缁勭洏鏁版嵁</span>
<span class="list-actions">
<el-tag type="primary" size="small">鍏� {{ materials.length }} 鏉�</el-tag>
- <el-tag type="primary" size="small">鏈粍鐩� {{ totalStockCount }}</el-tag>
<el-tag type="primary" size="small">鏈叆搴撴暟閲� {{ totalStockSum }}{{ uniqueUnit }}</el-tag>
<el-tag v-if="trayBarcode" type="success" size="small">鎵樼洏: {{ trayBarcode }}</el-tag>
<el-tag v-if="form.warehouseType" type="info" size="small">浠撳簱: {{ currentWarehouseName }}</el-tag>
@@ -177,6 +202,10 @@
error: '',
debugMode: false,
currentFocus: 'warehouse',
+
+ unpalletBarcodes:[],
+ unpalletBarcodesLoading: false,
+ unpalletMaterials: [], // 鏈粍鐩樿缁嗘暟鎹垪琛�
// 鎵爜鏋浉鍏冲彉閲�
scanCode: '',
@@ -257,6 +286,7 @@
this.initwarehouseTypes(); // 鍒濆鍖栦粨搴�
this.initLocationTypes(); // 鍒濆鍖栦粨搴撳尯鍩�
this.fetchStockStatistics(); // 鍔犺浇缁熻鏁版嵁
+ this.fetchUnpalletMaterialDetails();
}, 300);
});
}
@@ -276,6 +306,7 @@
this.backData = [];
this.$refs.palletForm?.reset();
this.fetchStockStatistics(); // 鍗曟嵁鍙峰彉浜嗭紝鍒锋柊缁熻
+ this.fetchUnpalletMaterialDetails();
}
}
},
@@ -316,6 +347,43 @@
callback(new Error('璇烽�夋嫨浠撳簱鍖哄煙'));
} else {
callback();
+ }
+ },
+
+ // 鏍规嵁鏉$爜鍒楄〃鑾峰彇璇︾粏鏁版嵁
+ async fetchUnpalletMaterialDetails() {
+ try {
+ // 灏濊瘯璋冪敤鎺ュ彛鑾峰彇璇︾粏鏁版嵁
+ // 娉ㄦ剰锛氬鏋滆繖涓帴鍙d笉瀛樺湪锛屽彲浠ユ敞閲婃帀鎴栨牴鎹疄闄匒PI璋冩暣
+ const response = await http.post('/api/InboundOrder/UnPalletGroupBarcode?orderNo='+this.docNo, {
+
+ });
+
+ console.log('鏈粍鐩樻暟鎹�:', response.data);
+
+
+ if (response.status && Array.isArray(response.data)) {
+ this.unpalletMaterials = response.data;
+ this.unpalletBarcodes = response.data.map(item => item.barcode || '');
+ this.totalStockCount = response.data.length;
+ } else {
+ // 濡傛灉鎺ュ彛杩斿洖鏍煎紡涓嶅悓锛屽皾璇曞叾浠栨柟寮�
+ // 濡傛灉鎺ュ彛涓嶅瓨鍦紝杩欓噷浼氳繘鍏atch锛岃缃负绌烘暟缁�
+ this.unpalletMaterials = [];
+ }
+ } catch (err) {
+ console.warn('鑾峰彇鏈粍鐩樿缁嗘暟鎹帴鍙e彲鑳戒笉瀛樺湪锛屼娇鐢ㄦ潯鐮佸垪琛ㄦ樉绀猴細', err);
+ // 濡傛灉鎺ュ彛涓嶅瓨鍦紝灏嗘潯鐮佸垪琛ㄨ浆鎹负绠�鍗曠殑鏄剧ず鏍煎紡
+ // 鎴栬�呬繚鎸佷负绌猴紝璁╃敤鎴风煡閬撻渶瑕侀�夋嫨浠撳簱鍜屽尯鍩熸潵鏌ョ湅璇︾粏鏁版嵁
+ this.unpalletMaterials = this.unpalletBarcodes.map(barcode => ({
+ barcode: barcode,
+ materielCode: '-',
+ batchNo: '-',
+ stockQuantity: '-',
+ unit: '-',
+ supplyCode: '-',
+ warehouseType: '-'
+ }));
}
},
/**
@@ -399,6 +467,7 @@
console.log('浠撳簱鍖哄煙楠岃瘉閫氳繃:', value);
// 鍖哄煙閫夋嫨鍚庯紝鑷姩鑱氱劍鍒版墭鐩樿緭鍏ユ
this.focusLocationSelect();
+ // 鍒锋柊鏈粍鐩樻暟鎹紙鏍规嵁閫夋嫨鐨勪粨搴撳拰鍖哄煙杩囨护锛�
}
});
}, 100);
@@ -555,6 +624,8 @@
this.trayBarcode = '';
this.barcode = '';
this.materials = [];
+ this.unpalletBarcodes = [];
+ this.unpalletMaterials = [];
this.loading = false;
this.error = '';
this.scanCode = '';
@@ -814,6 +885,13 @@
});
});
+ const removeIndex = this.unpalletMaterials.findIndex(item => item.barcode === currentBarcode);
+ if (removeIndex > -1) {
+ this.unpalletMaterials.splice(removeIndex, 1); // 鍒犻櫎鏈粍鐩樺搴旀暟鎹�
+ this.unpalletBarcodes = this.unpalletMaterials.map(item => item.barcode || ''); // 鏇存柊鏉$爜鏁扮粍
+ this.totalStockCount = Math.max(0, this.totalStockCount - 1);
+ }
+
this.$message({
message: `鎴愬姛娣诲姞鏉$爜: ${currentBarcode}`,
type: 'success',
@@ -1297,5 +1375,37 @@
border: 1px solid #DCDFE6;
border-radius: 4px;
}
+
+ .unpallet-section.compact {
+ margin-bottom: 8px;
+ flex-shrink: 0;
+}
+
+.unpallet-card {
+ flex-shrink: 0;
+}
+
+.unpallet-barcode-list {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 6px;
+ padding: 8px 0;
+ max-height: 180px;
+ overflow-y: auto;
+}
+
+.unpallet-barcode-list>>>.el-tag {
+ cursor: pointer;
+ max-width: calc(33.333% - 4px);
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+@media (max-width: 768px) {
+ .unpallet-barcode-list>>>.el-tag {
+ max-width: calc(50% - 4px);
+ }
+}
}
</style>
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
index 4abb975..335d0cf 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js"
@@ -2,11 +2,11 @@
import http from '@/api/http.js'
import { h, createVNode, render, reactive, ref } from 'vue';
import { ElDialog, ElForm, ElFormItem, ElInput, ElButton, ElMessage, ElSelect, ElOption } from 'element-plus'; // 寮曞叆ElMessage锛岃В鍐虫彁绀烘棤鍙嶅簲
-
+import gridHeader from './extend/EmptyTrayInbound.vue'
let extension = {
components: {
//鏌ヨ鐣岄潰鎵╁睍缁勪欢
- gridHeader: '',
+ gridHeader: gridHeader,
gridBody: '',
gridFooter: '',
//鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
@@ -245,186 +245,194 @@
}
}
},
- {
- name: '绌烘墭鐩樺叆搴�',
- type: 'primary',
- value: '绌烘墭鐩樺叆搴�',
+ // {
+ // name: '绌烘墭鐩樺叆搴�',
+ // type: 'primary',
+ // value: '绌烘墭鐩樺叆搴�',
- onClick: function () {
- const mountNode = document.createElement('div');
- document.body.appendChild(mountNode);
+ // onClick: function () {
+ // const mountNode = document.createElement('div');
+ // document.body.appendChild(mountNode);
- // 鍝嶅簲寮忚〃鍗曟暟鎹細鏂欑鐮侊紙蹇呭~锛屾壂鐮佹灙/鎵嬪姩杈撳叆锛�
- const formData = reactive({
- boxCode: '',
- warehouseCode: ''
- });
+ // // 鍝嶅簲寮忚〃鍗曟暟鎹細鏂欑鐮侊紙蹇呭~锛屾壂鐮佹灙/鎵嬪姩杈撳叆锛�
+ // const formData = reactive({
+ // boxCode: '',
+ // warehouseCode: ''
+ // });
- const warehouses = ref([]);
- const isLoadingWarehouses = ref(false);
+ // const warehouses = ref([]);
+ // const isLoadingWarehouses = ref(false);
- const getWarehouseList = async () => {
- isLoadingWarehouses.value = true;
- try {
- const { data, status } = await http.post('/api/LocationInfo/GetLocationTypes');
- if (status && Array.isArray(data)) {
- // 鏍煎紡鍖栦粨搴撻�夐」锛氶�傞厤ElSelect鐨刲abel-value鏍煎紡
- warehouses.value = data.map(item => ({
- label: item.locationTypeDesc,
- value: item.locationType
- }));
- } else {
- ElMessage.error('鑾峰彇鍖哄煙鍒楄〃澶辫触');
- warehouses.value = [];
- }
- } catch (err) {
- ElMessage.error('鍖哄煙鏁版嵁璇锋眰寮傚父锛岃绋嶅悗閲嶈瘯');
- warehouses.value = [];
- } finally {
- isLoadingWarehouses.value = false;
- }
- };
+ // const getWarehouseList = async () => {
+ // isLoadingWarehouses.value = true;
+ // try {
+ // const { data, status } = await http.post('/api/LocationInfo/GetLocationTypes');
+ // if (status && Array.isArray(data)) {
+ // // 鏍煎紡鍖栦粨搴撻�夐」锛氶�傞厤ElSelect鐨刲abel-value鏍煎紡
+ // warehouses.value = data.map(item => ({
+ // label: item.locationTypeDesc,
+ // value: item.locationType
+ // }));
+ // } else {
+ // ElMessage.error('鑾峰彇鍖哄煙鍒楄〃澶辫触');
+ // warehouses.value = [];
+ // }
+ // } catch (err) {
+ // ElMessage.error('鍖哄煙鏁版嵁璇锋眰寮傚父锛岃绋嶅悗閲嶈瘯');
+ // warehouses.value = [];
+ // } finally {
+ // isLoadingWarehouses.value = false;
+ // }
+ // };
- // 鎻愪氦琛ㄥ崟鐨勭粺涓�閫昏緫锛堜緵鍥炶溅瑙﹀彂鍜屾寜閽偣鍑诲叡鐢級
- const submitForm = async () => {
- const formRef = vnode.component.refs.batchInForm;
- try {
- // 鎵ц琛ㄥ崟鏍¢獙锛堟枡绠辩爜蹇呭~锛�
- await formRef.validate();
- } catch (err) {
- ElMessage.warning('璇疯緭鍏ユ湁鏁堢殑鏂欑鐮�');
- return;
- }
+ // // 鎻愪氦琛ㄥ崟鐨勭粺涓�閫昏緫锛堜緵鍥炶溅瑙﹀彂鍜屾寜閽偣鍑诲叡鐢級
+ // const submitForm = async () => {
+ // const formRef = vnode.component.refs.batchInForm;
+ // try {
+ // // 鎵ц琛ㄥ崟鏍¢獙锛堟枡绠辩爜蹇呭~锛�
+ // await formRef.validate();
+ // } catch (err) {
+ // ElMessage.warning('璇疯緭鍏ユ湁鏁堢殑鏂欑鐮�');
+ // return;
+ // }
- http.post('/api/InboundOrder/EmptyMaterielGroup', {
- palletCode: formData.boxCode.trim(),
- warehouseCode: formData.warehouseCode
- }).then(({ data, status, message }) => {
- if (status) {
- ElMessage.success(`鍏ュ簱鎴愬姛锛屾枡绠辩爜锛�${formData.boxCode.trim()}`);
- this.refresh();
- formData.boxCode = '';
+ // http.post('/api/InboundOrder/EmptyMaterielGroup', {
+ // palletCode: formData.boxCode.trim(),
+ // warehouseCode: formData.warehouseCode
+ // }).then(({ data, status, message }) => {
+ // if (status) {
+ // ElMessage.success(`鍏ュ簱鎴愬姛锛屾枡绠辩爜锛�${formData.boxCode.trim()}`);
+ // this.refresh();
+ // formData.boxCode = '';
- setTimeout(() => {
- const inputRef = vnode.component.refs.boxCodeInput;
- inputRef?.focus();
- }, 100);
- } else {
- ElMessage.error(message || data?.message || '鍏ュ簱澶辫触');
- selectBoxCodeInput();
- }
- }).catch(() => {
- ElMessage.error('璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯');
- selectBoxCodeInput();
- });
- };
+ // setTimeout(() => {
+ // const inputRef = vnode.component.refs.boxCodeInput;
+ // inputRef?.focus();
+ // }, 100);
+ // } else {
+ // ElMessage.error(message || data?.message || '鍏ュ簱澶辫触');
+ // selectBoxCodeInput();
+ // }
+ // }).catch(() => {
+ // ElMessage.error('璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯');
+ // selectBoxCodeInput();
+ // });
+ // };
- const selectBoxCodeInput = () => {
- setTimeout(() => {
- const inputRef = vnode.component.refs.boxCodeInput;
- if (inputRef) {
- const targetInput = inputRef.$el?.querySelector('input') || inputRef;
- targetInput?.focus();
- targetInput?.select();
- }
- }, 100);
- }
- const vnode = createVNode(ElDialog, {
- title: '绌烘墭鐩樺叆搴�',
- width: '400px',
- modelValue: true,
- appendToBody: true,
+ // const selectBoxCodeInput = () => {
+ // setTimeout(() => {
+ // const inputRef = vnode.component.refs.boxCodeInput;
+ // if (inputRef) {
+ // const targetInput = inputRef.$el?.querySelector('input') || inputRef;
+ // targetInput?.focus();
+ // targetInput?.select();
+ // }
+ // }, 100);
+ // }
+ // const vnode = createVNode(ElDialog, {
+ // title: '绌烘墭鐩樺叆搴�',
+ // width: '400px',
+ // modelValue: true,
+ // appendToBody: true,
- onOpened: async () => {
- await getWarehouseList();
- const inputRef = vnode.component.refs.boxCodeInput;
- inputRef?.focus();
- },
- 'onUpdate:modelValue': (isVisible) => {
- if (!isVisible) {
- render(null, mountNode);
- document.body.removeChild(mountNode);
- }
- }
- }, {
- default: () => h(ElForm, {
- model: formData,
- rules: {
- boxCode: [
- { required: true, message: '璇疯緭鍏ユ枡绠辩爜', trigger: ['blur', 'enter'] }
- ],
- warehouseCode: [
- { required: true, message: '璇烽�夋嫨鍖哄煙', trigger: ['change', 'blur'] }
- ]
- },
- ref: 'batchInForm'
- }, [
- //浠撳簱鏁版嵁
- h(ElFormItem, { label: '鍖哄煙', prop: 'warehouseCode', required: true }, [
- h(ElSelect, {
- modelValue: formData.warehouseCode,
- 'onUpdate:modelValue': (val) => {
- formData.warehouseCode = val;
- },
- placeholder: '璇烽�夋嫨鍏ュ簱鍖哄煙',
- filterable: true, // 鏀寔鎼滅储浠撳簱
- loading: isLoadingWarehouses.value, // 鍔犺浇鐘舵��
- style: { width: '100%' }
- }, [
- // 娓叉煋浠撳簱涓嬫媺閫夐」
- warehouses.value.map(item => h(ElOption, {
- label: item.label,
- value: item.value
- }))
- ])
- ]),
- // 鏂欑鐮佽緭鍏ラ」锛堟敮鎸佽仛鐒︺�佸洖杞︽彁浜わ級
- h(ElFormItem, { label: '鏂欑鐮�', prop: 'boxCode', required: true }, [
- h(ElInput, {
- type: 'text',
- modelValue: formData.boxCode,
- 'onUpdate:modelValue': (val) => {
- formData.boxCode = val;
- },
- ref: 'boxCodeInput',
- placeholder: '鎵爜杈撳叆鎴栨墜鍔ㄨ緭鍏ユ枡绠辩爜',
- // 鐩戝惉鍥炶溅浜嬩欢锛堟壂鐮佹灙榛樿浼氬彂閫佸洖杞︼級
- onKeydown: (e) => {
- if (e.key === 'Enter') {
- e.preventDefault();
- submitForm();
- }
- }
- })
- ]),
- // 搴曢儴鎸夐挳鍖�
- h('div', { style: { textAlign: 'right', marginTop: '16px' } }, [
- h(ElButton, {
- type: 'text',
- onClick: () => {
- render(null, mountNode);
- document.body.removeChild(mountNode);
- ElMessage.info('鍙栨秷鍏ュ簱浠诲姟');
- }
- }, '鍙栨秷'),
- h(ElButton, {
- type: 'primary',
- onClick: submitForm
- }, '纭畾')
- ])
- ])
- });
+ // onOpened: async () => {
+ // await getWarehouseList();
+ // const inputRef = vnode.component.refs.boxCodeInput;
+ // inputRef?.focus();
+ // },
+ // 'onUpdate:modelValue': (isVisible) => {
+ // if (!isVisible) {
+ // render(null, mountNode);
+ // document.body.removeChild(mountNode);
+ // }
+ // }
+ // }, {
+ // default: () => h(ElForm, {
+ // model: formData,
+ // rules: {
+ // boxCode: [
+ // { required: true, message: '璇疯緭鍏ユ枡绠辩爜', trigger: ['blur', 'enter'] }
+ // ],
+ // warehouseCode: [
+ // { required: true, message: '璇烽�夋嫨鍖哄煙', trigger: ['change', 'blur'] }
+ // ]
+ // },
+ // ref: 'batchInForm'
+ // }, [
+ // //浠撳簱鏁版嵁
+ // h(ElFormItem, { label: '鍖哄煙', prop: 'warehouseCode', required: true }, [
+ // h(ElSelect, {
+ // modelValue: formData.warehouseCode,
+ // 'onUpdate:modelValue': (val) => {
+ // formData.warehouseCode = val;
+ // },
+ // placeholder: '璇烽�夋嫨鍏ュ簱鍖哄煙',
+ // filterable: true, // 鏀寔鎼滅储浠撳簱
+ // loading: isLoadingWarehouses.value, // 鍔犺浇鐘舵��
+ // style: { width: '100%' }
+ // }, [
+ // // 娓叉煋浠撳簱涓嬫媺閫夐」
+ // warehouses.value.map(item => h(ElOption, {
+ // label: item.label,
+ // value: item.value
+ // }))
+ // ])
+ // ]),
+ // // 鏂欑鐮佽緭鍏ラ」锛堟敮鎸佽仛鐒︺�佸洖杞︽彁浜わ級
+ // h(ElFormItem, { label: '鏂欑鐮�', prop: 'boxCode', required: true }, [
+ // h(ElInput, {
+ // type: 'text',
+ // modelValue: formData.boxCode,
+ // 'onUpdate:modelValue': (val) => {
+ // formData.boxCode = val;
+ // },
+ // ref: 'boxCodeInput',
+ // placeholder: '鎵爜杈撳叆鎴栨墜鍔ㄨ緭鍏ユ枡绠辩爜',
+ // // 鐩戝惉鍥炶溅浜嬩欢锛堟壂鐮佹灙榛樿浼氬彂閫佸洖杞︼級
+ // onKeydown: (e) => {
+ // if (e.key === 'Enter') {
+ // e.preventDefault();
+ // submitForm();
+ // }
+ // }
+ // })
+ // ]),
+ // // 搴曢儴鎸夐挳鍖�
+ // h('div', { style: { textAlign: 'right', marginTop: '16px' } }, [
+ // h(ElButton, {
+ // type: 'text',
+ // onClick: () => {
+ // render(null, mountNode);
+ // document.body.removeChild(mountNode);
+ // ElMessage.info('鍙栨秷鍏ュ簱浠诲姟');
+ // }
+ // }, '鍙栨秷'),
+ // h(ElButton, {
+ // type: 'primary',
+ // onClick: submitForm
+ // }, '纭畾')
+ // ])
+ // ])
+ // });
- vnode.appContext = this.$.appContext;
- render(vnode, mountNode);
- }
- }
+ // vnode.appContext = this.$.appContext;
+ // render(vnode, mountNode);
+ // }
+ // }
], box: [], detail: []
},
methods: {
//涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
onInit() {
+ var EmptyTrayInboundBtn = this.buttons.find(x => x.value == "EmptyTrayInbound");
+ if (EmptyTrayInboundBtn != null) {
+ EmptyTrayInboundBtn.onClick = () => {
+ this.$refs.gridHeader.open();
+ }
+ }
+
+
this.columns.forEach(column => {
if (column.field === 'orderStatistics') {
column.formatter = (row) => {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue"
index 55a652e..3460293 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue"
@@ -1,17 +1,19 @@
<template>
- <vol-box v-model="show" title="绌烘墭鍑哄簱" :width="400" :height="600">
+ <vol-box v-model="show" title="绌烘墭鍑哄簱" :width="800" :height="1200">
<template #content>
<el-form ref="form" :model="form" label-width="90px">
<el-form-item label="鍑哄簱鍖哄煙:">
<el-select v-model="locationType" placeholder="璇烽�夋嫨鍑哄簱鍖哄煙">
- <el-option v-for="item in locationTypes" :key="item.locationType" :label="item.locationTypeDesc.toString()" :value="item.locationType">
+ <el-option v-for="item in locationTypes" :key="item.locationType" :label="item.locationTypeDesc.toString()"
+ :value="item.locationType">
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-form ref="form" :model="form" label-width="90px">
<el-form-item label="鍑哄簱鏁伴噺:">
- <el-input-number v-model="num" :min="1" :max="999" :controls="true" placeholder="璇烽�夋嫨鍑哄簱鏁伴噺" style="width: 100%;"></el-input-number>
+ <el-input-number v-model="num" :min="1" :max="999" :controls="true" placeholder="璇烽�夋嫨鍑哄簱鏁伴噺"
+ style="width: 100%;"></el-input-number>
</el-form-item>
</el-form>
</template>
@@ -39,7 +41,7 @@
num: 1,
show: false,
locationTypes: [],
- locationType:"",
+ locationType: "",
}
},
methods: {
@@ -63,7 +65,7 @@
},
getData() {
- this.http.post("api/LocationInfo/GetLocationTypes",null, "鏌ヨ涓�")
+ this.http.post("api/LocationInfo/GetLocationTypes", null, "鏌ヨ涓�")
.then((x) => {
this.locationTypes = x.data;
})
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_IInboundService/IInboundOrderService.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_IInboundService/IInboundOrderService.cs"
index 355df9b..fc84e96 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_IInboundService/IInboundOrderService.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_IInboundService/IInboundOrderService.cs"
@@ -25,5 +25,7 @@
WebResponseContent UnPalletQuantity(string orderNo);
WebResponseContent UndoPalletGroup(string palletCode , string barcode = "");
+
+ WebResponseContent UnPalletGroupBarcode(string orderNo);
}
}
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/InboundOrderService.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/InboundOrderService.cs"
index cb1c301..9d1cce9 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/InboundOrderService.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/InboundOrderService.cs"
@@ -645,15 +645,19 @@
{
resultDTO.UniqueUnit = "";
}
- var validDetails = _stockDetailRepository.Db.Queryable<Dt_StockInfoDetail>().Where(s => s.OrderNo == orderNo).ToList();
- resultDTO.StockSumQuantity = orderDetail.Details.Sum(d => d.OrderQuantity);
- resultDTO.StockCount = orderDetail.Details.Count;
- if (validDetails.Any())
- {
- resultDTO.StockSumQuantity -= validDetails.Sum(d => d.StockQuantity);
- // 鏄庣粏璁板綍鏁帮細绗﹀悎鏉′欢鐨勬湁鏁堣褰曟潯鏁�
- resultDTO.StockCount -= validDetails.Count;
- }
+ var inbound =_inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Where(x => x.InboundOrderNo == orderNo);
+ var inboundDetails = _inboundOrderDetailRepository.Db.Queryable<Dt_InboundOrderDetail>().Where(x => x.OrderId == inbound.First().Id).ToList();
+ resultDTO.StockSumQuantity = inboundDetails.Where(x=>x.ReceiptQuantity==0).Sum(x=>x.OrderQuantity);
+ resultDTO.StockCount = inboundDetails.Where(x => x.ReceiptQuantity == 0).Count();
+ //var validDetails = _stockDetailRepository.Db.Queryable<Dt_StockInfoDetail>().Where(s => s.OrderNo == orderNo).ToList();
+ //resultDTO.StockSumQuantity = orderDetail.Details.Sum(d => d.OrderQuantity);
+ //resultDTO.StockCount = orderDetail.Details.Count;
+ //if (validDetails.Any())
+ //{
+ // resultDTO.StockSumQuantity -= validDetails.Sum(d => d.StockQuantity);
+ // // 鏄庣粏璁板綍鏁帮細绗﹀悎鏉′欢鐨勬湁鏁堣褰曟潯鏁�
+ // resultDTO.StockCount -= validDetails.Count;
+ //}
return content.OK("", resultDTO);
}
catch (Exception ex)
@@ -881,5 +885,18 @@
// return new PageGridData<Dt_InboundOrder>();
//}
+ public WebResponseContent UnPalletGroupBarcode(string orderNo)
+ {
+ WebResponseContent content = new WebResponseContent();
+ var inbound = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Where(x => x.InboundOrderNo == orderNo).First();
+ if(inbound == null)
+ {
+ return content.Error();
+ }
+
+ var details = _inboundOrderDetailRepository.Db.Queryable<Dt_InboundOrderDetail>().Where(x => x.OrderId == inbound.Id && x.ReceiptQuantity == 0).ToList();
+
+ return content.OK(data:details);
+ }
}
}
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/OutboundBatchPickingService.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/OutboundBatchPickingService.cs"
index ba05939..a1e6320 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/OutboundBatchPickingService.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/OutboundBatchPickingService.cs"
@@ -943,7 +943,7 @@
/// <summary>
- /// 鎵ц鎵嬪姩鎷嗗寘閫昏緫 - 淇鐗堟湰
+ /// 鎵ц鎵嬪姩鎷嗗寘閫昏緫
/// </summary>
private async Task<List<SplitResult>> ExecuteManualSplitLogic(Dt_OutStockLockInfo lockInfo, Dt_StockInfoDetail stockDetail,
decimal splitQuantity, string palletCode)
@@ -1001,8 +1001,8 @@
MaterielCode = stockDetail.MaterielCode,
OrderNo = stockDetail.OrderNo,
BatchNo = stockDetail.BatchNo,
- StockQuantity = newStockQuantity, // 淇锛氫娇鐢ㄦ纭殑鎷嗗寘鏁伴噺
- OutboundQuantity = 0, // 鏂版潯鐮佸垵濮嬪嚭搴撴暟閲忎负0
+ StockQuantity = newStockQuantity,
+ OutboundQuantity = 0,
Barcode = newBarcode,
Status = (int)StockStatusEmun.鍑哄簱閿佸畾,
SupplyCode = stockDetail.SupplyCode,
@@ -1011,6 +1011,8 @@
BarcodeUnit = stockDetail.BarcodeUnit,
BusinessType = stockDetail.BusinessType,
InboundOrderRowNo = stockDetail.InboundOrderRowNo,
+ FactoryArea = stockDetail.FactoryArea,
+ WarehouseCode = stockDetail.WarehouseCode,
};
await _stockInfoDetailService.Db.Insertable(newStockDetail).ExecuteCommandAsync();
@@ -3156,17 +3158,7 @@
_logger.LogInformation($"闇�瑕佽嚜鍔ㄦ媶鍖� - 搴撳瓨: {stockDetail.StockQuantity}, 鍒嗛厤: {lockInfo.AssignQuantity}, 鎷嗗寘鏁伴噺: {splitQuantity}");
// 鎵ц鑷姩鎷嗗寘
- var splitResult = await ExecuteAutoSplitLogic(lockInfo, stockDetail, splitQuantity, palletCode);
-
- // 灏嗘媶鍖呮暟閲忎紶閫掔粰璋冪敤鏂癸紝鐢ㄤ簬楠岃瘉
- if (splitResult != null && splitResult.Any())
- {
- // 鍦ㄨ繑鍥炵粨鏋滀腑鎼哄甫鎷嗗寘鏁伴噺淇℃伅
- foreach (var result in splitResult)
- {
- result.quantityTotal = splitQuantity.ToString("F2");
- }
- }
+ var splitResult = await ExecuteAutoSplitLogic(lockInfo, stockDetail, splitQuantity, palletCode);
return splitResult;
}
@@ -3176,7 +3168,7 @@
/// 鍘熷垯锛氬彧鍒嗙鐗╃悊搴撳瓨锛屼笉鏀瑰彉鍘熻鍗曠殑浠讳綍鍒嗛厤鍜屽嚭搴撴暟閲�
/// </summary>
private async Task<List<SplitResult>> ExecuteAutoSplitLogic(Dt_OutStockLockInfo lockInfo, Dt_StockInfoDetail stockDetail,
- decimal splitQuantity, string palletCode)
+ decimal splitQuantity,string palletCode)
{
_logger.LogInformation($"寮�濮嬫墽琛岃嚜鍔ㄦ媶鍖呴�昏緫 - 鍘熸潯鐮�: {stockDetail.Barcode}, 鎷嗗寘鏁伴噺: {splitQuantity}");
@@ -3218,6 +3210,8 @@
BarcodeUnit = stockDetail.BarcodeUnit,
BusinessType = stockDetail.BusinessType,
InboundOrderRowNo = stockDetail.InboundOrderRowNo,
+ FactoryArea=stockDetail.FactoryArea,
+ WarehouseCode = stockDetail.WarehouseCode,
};
await _stockInfoDetailService.Db.Insertable(newStockDetail).ExecuteCommandAsync();
@@ -3265,7 +3259,7 @@
await RecordSplitHistory(lockInfo, stockDetail, splitQuantity, newBarcode, true, originalStockQty);
// 鍒涘缓鎷嗗寘缁撴灉鍒楄〃
- var splitResults = CreateSplitResults(lockInfo, splitQuantity, lockInfo.AssignQuantity, newBarcode, stockDetail.Barcode);
+ var splitResults = CreateSplitResults(lockInfo, splitQuantity, stockDetail.StockQuantity, newBarcode, stockDetail.Barcode);
_logger.LogInformation($"鑷姩鎷嗗寘閫昏緫鎵ц瀹屾垚 - 鍒涘缓浜嗘湭鍒嗛厤鐨勫簱瀛樺拰閿佸畾璁板綍");
@@ -3715,20 +3709,29 @@
{
var splitHistory = new Dt_SplitPackageRecord
{
- OrderNo = lockInfo.OrderNo,
+ FactoryArea = lockInfo.FactoryArea,
+ TaskNum = lockInfo.TaskNum,
OutStockLockInfoId = lockInfo.Id,
StockId = stockDetail.StockId,
Operator = App.User.UserName,
+ IsReverted = false,
OriginalBarcode = stockDetail.Barcode,
NewBarcode = newBarcode,
SplitQty = splitQty,
+ // RemainQuantity = remainQty,
+ MaterielCode = lockInfo.MaterielCode,
SplitTime = DateTime.Now,
+ OrderNo = lockInfo.OrderNo,
+ PalletCode = lockInfo.PalletCode,
+
+
+
Status = (int)SplitPackageStatusEnum.宸叉媶鍖�,
IsAutoSplit = isAutoSplit,
// SplitType = isAutoSplit ? "鑷姩鎷嗗寘" : "鎵嬪姩鎷嗗寘"
OriginalStockQuantity = originalStockQuantity ?? stockDetail.StockQuantity,
//RemainingStockQuantity = stockDetail.StockQuantity - splitQty
- TaskNum = lockInfo.TaskNum
+
};
await _splitPackageService.Db.Insertable(splitHistory).ExecuteCommandAsync();
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/OutboundPickingService.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/OutboundPickingService.cs"
index 099b0dc..145c076 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/OutboundPickingService.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/OutboundPickingService.cs"
@@ -2844,7 +2844,8 @@
FactoryArea = item.FactoryArea,
Status = 0,
OrderNo = item.OrderNo,
- BusinessType = materielGroupDTO.orderTypes.ToString()
+ BusinessType = materielGroupDTO.orderTypes.ToString(),
+
});
item.WarehouseCode = item.WarehouseCode;
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/SplitPackageService.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/SplitPackageService.cs"
index 3c4b50b..33d0e13 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/SplitPackageService.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/SplitPackageService.cs"
@@ -108,6 +108,7 @@
OutboundQuantity = request.SplitQuantity,
Barcode = newBarcode,
InboundOrderRowNo = baseStockDetail.InboundOrderRowNo,
+ FactoryArea = baseStockDetail.FactoryArea,
};
await _stockInfoDetailService.Db.Insertable(newStockDetail).ExecuteCommandAsync();
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_TaskInfoService/TaskService.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_TaskInfoService/TaskService.cs"
index 03574dc..b65d4c3 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_TaskInfoService/TaskService.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_TaskInfoService/TaskService.cs"
@@ -303,11 +303,11 @@
_recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) + beforeQuantity, WIDESEA_Common.StockEnum.StockChangeType.MaterielGroup);
}
- catch(Exception ex)
+ catch (Exception ex)
{
- _logger.LogInformation($"InboundTaskCompleted AddLocationStatusChangeRecord : {ex.Message} " );
+ _logger.LogInformation($"InboundTaskCompleted AddLocationStatusChangeRecord : {ex.Message} ");
}
- try
+ try
{
foreach (var inboundOrder in inboundOrders)
{
@@ -579,7 +579,7 @@
{
_locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfo, beforelocationStatus, StockChangeType.Inbound.ObjToInt(), "", task.TaskNum);
}
- catch(Exception ex)
+ catch (Exception ex)
{
_logger.LogInformation($"InEmptyTaskCompleted AddLocationStatusChangeRecord : {ex.Message} ");
}
@@ -696,7 +696,7 @@
{
await Db.Deleteable(task).ExecuteCommandAsync();
}
-
+
await RecalculateOrderStatus(task.OrderNo);
try
{
@@ -757,8 +757,8 @@
{
try
{
-
-
+
+
// 鑾峰彇鍙楀奖鍝嶇殑璁㈠崟鏄庣粏ID锛堝幓閲嶏級
//var affectedDetailIds = returnLocks
// .Select(x => x.OrderDetailId)
@@ -999,7 +999,7 @@
_logger.LogInformation($"鏇存柊璁㈠崟鐘舵�� - OrderNo: {orderNo}, 鏃х姸鎬�: {outboundOrder.OrderStatus}, 鏂扮姸鎬�: {newStatus}");
}
-
+
}
catch (Exception ex)
{
@@ -1136,8 +1136,33 @@
allocatefeedmodel.Details.Add(detailModel);
}
+ var groupedResult = allocatefeedmodel.Details.GroupBy(item => new
+ {
+ item.WarehouseCode,
+ item.MaterialCode,
+ item.Unit,
+ item.LineNo
+ }).Select(group => new AllocateDtoDetail
+ {
+ WarehouseCode = group.Key.WarehouseCode,
+ MaterialCode = group.Key.MaterialCode,
+ LineNo = group.Key.LineNo,
+ Qty = group.Sum(x => x.Qty),
+ Unit = group.Key.Unit,
+ Barcodes = group.SelectMany(x => x.Barcodes)
+ .GroupBy(b => b.Barcode)
+ .Select(b => new BarcodeInfo
+ {
+ Barcode = b.Key,
+ BatchNo = b.First().BatchNo,
+ SupplyCode = b.First().SupplyCode,
+ Qty = b.Max(x => x.Qty),
+ Unit = b.First().Unit
+ }) .ToList()
+ }) .ToList();
+ allocatefeedmodel.Details = groupedResult;
- var result = await _invokeMESService.FeedbackAllocate(allocatefeedmodel);
+ var result = await _invokeMESService.FeedbackAllocate(allocatefeedmodel);
if (result != null && result.code == 200)
{
await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>()
@@ -1222,6 +1247,31 @@
}
feedmodel.details.Add(detailModel);
}
+ var groupedResult = feedmodel.details.GroupBy(item => new
+ {
+ item.warehouseCode,
+ item.materialCode,
+ item.unit,
+ item.lineNo
+ }).Select(group => new FeedbackOutboundDetailsModel
+ {
+ warehouseCode = group.Key.warehouseCode,
+ materialCode = group.Key.materialCode,
+ lineNo = group.Key.lineNo,
+ qty = group.Sum(x => x.qty),
+ unit = group.Key.unit,
+ barcodes = group.SelectMany(x => x.barcodes)
+ .GroupBy(b => b.barcode)
+ .Select(b => new WIDESEA_DTO.Outbound.BarcodesModel
+ {
+ barcode = b.Key,
+ batchNo = b.First().batchNo,
+ supplyCode = b.First().supplyCode,
+ qty = b.Max(x => x.qty),
+ unit = b.First().unit
+ }).ToList()
+ }).ToList();
+ feedmodel.details = groupedResult;
var result = await _invokeMESService.FeedbackOutbound(feedmodel);
if (result != null && result.code == 200)
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/Inbound/InboundOrderController.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/Inbound/InboundOrderController.cs"
index c91eb7f..55eac51 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/Inbound/InboundOrderController.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/Inbound/InboundOrderController.cs"
@@ -66,8 +66,7 @@
[HttpPost, Route("Test"), AllowAnonymous, MethodParamsValidate]
public async Task<WebResponseContent> Test()
- {
-
+ {
//var originalTask = _taskRepository.Db.Queryable<Dt_Task>().First();
//var result = _task_HtyService.DeleteAndMoveIntoHty(originalTask, OperateTypeEnum.浜哄伐鍒犻櫎);
@@ -91,7 +90,7 @@
//var ddddssss = "WSLOT" + DateTime.Now.ToString("yyyyMMddHHmmss") + ssss.ToString().PadLeft(5, '0');
//erpApiService.GetSuppliersAsync();
- erpApiService.GetMaterialUnitAsync();
+ // erpApiService.GetMaterialUnitAsync();
//var sss = await _invokeMESService.NewMaterielToMes(new WIDESEA_DTO.Basic.MaterielToMesDTO
//{
@@ -214,6 +213,12 @@
}
+ [HttpPost, Route("UnPalletGroupBarcode"), AllowAnonymous, MethodParamsValidate]
+ public WebResponseContent UnPalletGroupBarcode(string orderNo)
+ {
+ return Service.UnPalletGroupBarcode(orderNo);
+ }
+
[HttpPost, Route("UndoPalletGroup"), AllowAnonymous, MethodParamsValidate]
public WebResponseContent UndoPalletGroup(string palletCode,string barcode="")
{
--
Gitblit v1.9.3