From b6a40a2d8fdcffb3accfc7e424c0726a87a59ddf Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期五, 05 十二月 2025 21:20:59 +0800
Subject: [PATCH] 提交
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs | 4
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 36 ++
项目代码/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue | 9
项目代码/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js | 11
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs | 32 +
项目代码/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js | 847 ++++++++++++++++++++++++----------------------
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoDetailController.cs | 10
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockDetailByMaterielService.cs | 12
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockDetailDtO.cs | 76 ++++
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs | 36 ++
12 files changed, 646 insertions(+), 431 deletions(-)
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 b3b0c40..328cdbf 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"
@@ -1,23 +1,24 @@
//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
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 { h, createVNode, render, reactive, ref } from 'vue';
+import { ElDialog, ElForm, ElFormItem, ElInput, ElButton, ElMessage, ElSelect, ElOption } from 'element-plus'; // 寮曞叆ElMessage锛岃В鍐虫彁绀烘棤鍙嶅簲
let extension = {
- components: {
- //鏌ヨ鐣岄潰鎵╁睍缁勪欢
- gridHeader: '',
- gridBody: '',
- gridFooter: '',
- //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
- modelHeader: '',
- modelBody: '',
- modelFooter: ''
- },
- tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
- buttons: { view: [
- {
+ components: {
+ //鏌ヨ鐣岄潰鎵╁睍缁勪欢
+ gridHeader: '',
+ gridBody: '',
+ gridFooter: '',
+ //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
+ modelHeader: '',
+ modelBody: '',
+ modelFooter: ''
+ },
+ tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
+ buttons: {
+ view: [
+ {
name: '缁勭洏',
type: 'primary',
value: '缁勭洏',
@@ -39,417 +40,443 @@
}
const targetRow = selectedRows[0];
-
+
this.$emit('openPalletDialog', targetRow.inboundOrderNo);
}
},
{
- name: '鎾ら攢缁勭洏',
- type: 'primary',
- value: '鎾ら攢缁勭洏',
- onClick: function () {
- console.log('鎾ら攢缁勭洏鎸夐挳琚偣鍑�');
- const mountNode = document.createElement('div');
- document.body.appendChild(mountNode);
+ name: '鎾ら攢缁勭洏',
+ type: 'primary',
+ value: '鎾ら攢缁勭洏',
+ onClick: function () {
+ console.log('鎾ら攢缁勭洏鎸夐挳琚偣鍑�');
+ const mountNode = document.createElement('div');
+ document.body.appendChild(mountNode);
- // 鍝嶅簲寮忚〃鍗曟暟鎹細鎵樼洏鍙凤紙蹇呭~锛�
- const formData = reactive({
- palletCode: '' // 鎵樼洏鍙疯緭鍏ユ
- });
+ // 鍝嶅簲寮忚〃鍗曟暟鎹細鎵樼洏鍙凤紙蹇呭~锛�
+ const formData = reactive({
+ palletCode: '' // 鎵樼洏鍙疯緭鍏ユ
+ });
- // 鎻愪氦琛ㄥ崟鐨勭粺涓�閫昏緫
- const submitForm = async () => {
- const formRef = vnode.component.refs.cancelPalletForm;
- try {
- // 鎵ц琛ㄥ崟鏍¢獙锛堟墭鐩樺彿蹇呭~锛�
- await formRef.validate();
- } catch (err) {
- ElMessage.warning('璇疯緭鍏ユ湁鏁堢殑鎵樼洏鍙�');
- return;
- }
+ // 鎻愪氦琛ㄥ崟鐨勭粺涓�閫昏緫
+ const submitForm = async () => {
+ const formRef = vnode.component.refs.cancelPalletForm;
+ try {
+ // 鎵ц琛ㄥ崟鏍¢獙锛堟墭鐩樺彿蹇呭~锛�
+ await formRef.validate();
+ } catch (err) {
+ ElMessage.warning('璇疯緭鍏ユ湁鏁堢殑鎵樼洏鍙�');
+ return;
+ }
- // 鍙戣捣鎾ら攢缁勭洏璇锋眰
- try {
- //console.log('鍙戣捣鎾ら攢缁勭洏璇锋眰锛屾墭鐩樺彿锛�', formData.palletCode.trim());
- const response = await http.post('/api/InboundOrder/UndoPalletGroup?palletCode='+formData.palletCode.trim());
-
+ // 鍙戣捣鎾ら攢缁勭洏璇锋眰
+ try {
+ //console.log('鍙戣捣鎾ら攢缁勭洏璇锋眰锛屾墭鐩樺彿锛�', formData.palletCode.trim());
+ const response = await http.post('/api/InboundOrder/UndoPalletGroup?palletCode=' + formData.palletCode.trim());
- const { status, message, data } = response;
- if (status) {
- ElMessage.success(`鎾ら攢缁勭洏鎴愬姛锛屾墭鐩樺彿锛�${formData.palletCode.trim()}`);
- this.refresh(); // 鎴愬姛鍚庡埛鏂板垪琛�
- // 鍏抽棴瀵硅瘽妗�
- render(null, mountNode);
- document.body.removeChild(mountNode);
- } else {
- console.log('鎾ら攢缁勭洏澶辫触锛屽悗绔彁绀猴細', message);
- ElMessage.error(message || data?.message || '鎾ら攢缁勭洏澶辫触');
- selectPalletCodeInput(); // 閫変腑杈撳叆妗嗘柟渚块噸鏂拌緭鍏�
- }
- } catch (error) {
- console.error('鎾ら攢缁勭洏璇锋眰寮傚父锛�', error);
- ElMessage.error('缃戠粶寮傚父鎴栨帴鍙i敊璇紝璇风◢鍚庨噸璇�');
- selectPalletCodeInput();
- }
- };
- // 閫変腑杈撳叆妗嗘枃鏈紙鏂逛究閲嶆柊杈撳叆锛�
- const selectPalletCodeInput = () => {
- setTimeout(() => {
- const inputRef = vnode.component.refs.palletCodeInput;
- if (inputRef) {
- const targetInput = inputRef.$el?.querySelector('input') || inputRef;
- targetInput?.focus();
- targetInput?.select();
- }
- }, 100);
- };
+ const { status, message, data } = response;
+ if (status) {
+ ElMessage.success(`鎾ら攢缁勭洏鎴愬姛锛屾墭鐩樺彿锛�${formData.palletCode.trim()}`);
+ this.refresh(); // 鎴愬姛鍚庡埛鏂板垪琛�
+ // 鍏抽棴瀵硅瘽妗�
+ render(null, mountNode);
+ document.body.removeChild(mountNode);
+ } else {
+ console.log('鎾ら攢缁勭洏澶辫触锛屽悗绔彁绀猴細', message);
+ ElMessage.error(message || data?.message || '鎾ら攢缁勭洏澶辫触');
+ selectPalletCodeInput(); // 閫変腑杈撳叆妗嗘柟渚块噸鏂拌緭鍏�
+ }
+ } catch (error) {
+ console.error('鎾ら攢缁勭洏璇锋眰寮傚父锛�', error);
+ ElMessage.error('缃戠粶寮傚父鎴栨帴鍙i敊璇紝璇风◢鍚庨噸璇�');
+ selectPalletCodeInput();
+ }
+ };
- // 鍒涘缓瀵硅瘽妗哣Node
- const vnode = createVNode(ElDialog, {
- title: '鎾ら攢缁勭洏',
- width: '400px',
- modelValue: true,
- appendToBody: true,
- onOpened: () => {
- // 瀵硅瘽妗嗘墦寮�鍚庤嚜鍔ㄨ仛鐒﹁緭鍏ユ
- setTimeout(() => {
- const inputRef = vnode.component.refs.palletCodeInput;
- inputRef?.focus();
- }, 100);
- },
- 'onUpdate:modelValue': (isVisible) => {
- if (!isVisible) {
- render(null, mountNode);
- document.body.removeChild(mountNode);
- }
- }
- }, {
- default: () => h(ElForm, {
- model: formData,
- rules: {
- palletCode: [
- { required: true, message: '璇疯緭鍏ユ墭鐩樺彿', trigger: ['blur', 'enter'] },
- { min: 1, max: 50, message: '鎵樼洏鍙烽暱搴︿笉鑳借秴杩�50涓瓧绗�', trigger: ['blur', 'input'] }
- ]
- },
- ref: 'cancelPalletForm'
- }, [
- // 鎵樼洏鍙疯緭鍏ラ」
- h(ElFormItem, { label: '鎵樼洏鍙�', prop: 'palletCode', required: true }, [
- h(ElInput, {
- type: 'text',
- modelValue: formData.palletCode,
- 'onUpdate:modelValue': (val) => {
- formData.palletCode = val;
- },
- ref: 'palletCodeInput',
- placeholder: '鎵爜杈撳叆鎴栨墜鍔ㄨ緭鍏ユ墭鐩樺彿',
- maxLength: 50,
- // 鐩戝惉鍥炶溅浜嬩欢锛堟壂鐮佹灙榛樿浼氬彂閫佸洖杞︼級
- 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.bind(this) // 缁戝畾this涓婁笅鏂�
- }, '纭鎾ら攢')
- ])
- ])
- });
+ // 閫変腑杈撳叆妗嗘枃鏈紙鏂逛究閲嶆柊杈撳叆锛�
+ const selectPalletCodeInput = () => {
+ setTimeout(() => {
+ const inputRef = vnode.component.refs.palletCodeInput;
+ if (inputRef) {
+ const targetInput = inputRef.$el?.querySelector('input') || inputRef;
+ targetInput?.focus();
+ targetInput?.select();
+ }
+ }, 100);
+ };
- vnode.appContext = this.$.appContext;
- render(vnode, mountNode);
- }
+ // 鍒涘缓瀵硅瘽妗哣Node
+ const vnode = createVNode(ElDialog, {
+ title: '鎾ら攢缁勭洏',
+ width: '400px',
+ modelValue: true,
+ appendToBody: true,
+ onOpened: () => {
+ // 瀵硅瘽妗嗘墦寮�鍚庤嚜鍔ㄨ仛鐒﹁緭鍏ユ
+ setTimeout(() => {
+ const inputRef = vnode.component.refs.palletCodeInput;
+ inputRef?.focus();
+ }, 100);
},
- {
- name: '鍒嗘壒鍏ュ簱',
- type: 'primary',
- value: '鍒嗘壒鍏ュ簱',
- onClick: async function () {
- console.log('鍒嗘壒鍏ュ簱鎸夐挳琚偣鍑伙紝寮�濮嬫牎楠�');
- const selectedRows = this.$refs.table.getSelected();
-
- // 鏍¢獙1锛氭槸鍚﹂�変腑琛岋紙鑷冲皯閫夋嫨涓�鏉★級
- if (selectedRows.length === 0) {
- console.log('鏍¢獙涓嶉�氳繃锛氭湭閫変腑浠讳綍鍗曟嵁');
- ElMessage.warning('璇烽�夋嫨鑷冲皯涓�鏉″崟鎹�');
- return;
- }
-
- // 鏀堕泦鎵�鏈夐�変腑鍗曟嵁鐨勭紪鍙凤紙杩囨护鏃犲崟鎹彿鐨勫紓甯歌锛�
- const inboundOrderNos = selectedRows
- .filter(row => row.inboundOrderNo)
- .map(row => row.inboundOrderNo);
-
- // 鏍¢獙2锛氭槸鍚︽湁鏈夋晥鍗曟嵁鍙�
- if (inboundOrderNos.length === 0) {
- console.log('鏍¢獙涓嶉�氳繃锛氶�変腑鍗曟嵁鏃犳湁鏁堢紪鍙�');
- ElMessage.warning('閫変腑鐨勫崟鎹腑鏃犳湁鏁堢紪鍙凤紝璇烽噸鏂伴�夋嫨');
- return;
- }
-
- try {
- console.log('鍙戣捣鍒嗘壒鍏ュ簱璇锋眰锛屽弬鏁帮細', { inboundOrderNos});
- const response = await http.post('/api/InboundOrder/BatchOrderFeedbackToMes', {
- orderNos: inboundOrderNos,
- inout:1
- });
-
- const { status, message, data } = response;
- if (status) {
- console.log('鍒嗘壒鍏ュ簱鎴愬姛锛屽悗绔繑鍥烇細', data);
- ElMessage.success(`鍒嗘壒鍏ュ簱鎴愬姛锛佸叡澶勭悊${inboundOrderNos.length}鏉″崟鎹甡);
- this.refresh(); // 鍏ュ簱鎴愬姛鍚庡埛鏂板垪琛紙澶嶇敤鍘熸湁閫昏緫锛�
- } else {
- console.log('鍒嗘壒鍏ュ簱澶辫触锛屽悗绔彁绀猴細', message);
- ElMessage.error(message || data?.message || '鍒嗘壒鍏ュ簱澶辫触');
- }
- } catch (error) {
- console.error('鍒嗘壒鍏ュ簱璇锋眰寮傚父锛�', error);
- ElMessage.error('缃戠粶寮傚父鎴栨帴鍙i敊璇紝璇风◢鍚庨噸璇�');
- }
- }
-},
- {
- name: '绌烘墭鐩樺叆搴�',
- type: 'primary',
- value: '绌烘墭鐩樺叆搴�',
-
- onClick: function () {
- const mountNode = document.createElement('div');
- document.body.appendChild(mountNode);
-
- // 鍝嶅簲寮忚〃鍗曟暟鎹細鏂欑鐮侊紙蹇呭~锛屾壂鐮佹灙/鎵嬪姩杈撳叆锛�
- const formData = reactive({
- boxCode: '',
- warehouseCode:''
- });
-
- 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 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 = '';
-
- 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,
-
- 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();
+ 'onUpdate:modelValue': (isVisible) => {
+ if (!isVisible) {
+ render(null, mountNode);
+ document.body.removeChild(mountNode);
}
}
- })
- ]),
- // 搴曢儴鎸夐挳鍖�
- h('div', { style: { textAlign: 'right', marginTop: '16px' } }, [
- h(ElButton, {
- type: 'text',
- onClick: () => {
- render(null, mountNode);
- document.body.removeChild(mountNode);
- ElMessage.info('鍙栨秷鍏ュ簱浠诲姟');
+ }, {
+ default: () => h(ElForm, {
+ model: formData,
+ rules: {
+ palletCode: [
+ { required: true, message: '璇疯緭鍏ユ墭鐩樺彿', trigger: ['blur', 'enter'] },
+ { min: 1, max: 50, message: '鎵樼洏鍙烽暱搴︿笉鑳借秴杩�50涓瓧绗�', trigger: ['blur', 'input'] }
+ ]
+ },
+ ref: 'cancelPalletForm'
+ }, [
+ // 鎵樼洏鍙疯緭鍏ラ」
+ h(ElFormItem, { label: '鎵樼洏鍙�', prop: 'palletCode', required: true }, [
+ h(ElInput, {
+ type: 'text',
+ modelValue: formData.palletCode,
+ 'onUpdate:modelValue': (val) => {
+ formData.palletCode = val;
+ },
+ ref: 'palletCodeInput',
+ placeholder: '鎵爜杈撳叆鎴栨墜鍔ㄨ緭鍏ユ墭鐩樺彿',
+ maxLength: 50,
+ // 鐩戝惉鍥炶溅浜嬩欢锛堟壂鐮佹灙榛樿浼氬彂閫佸洖杞︼級
+ 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.bind(this) // 缁戝畾this涓婁笅鏂�
+ }, '纭鎾ら攢')
+ ])
+ ])
+ });
+
+ vnode.appContext = this.$.appContext;
+ render(vnode, mountNode);
+ }
+ },
+ {
+ name: '鍒嗘壒鍏ュ簱',
+ type: 'primary',
+ value: '鍒嗘壒鍏ュ簱',
+ onClick: async function () {
+ console.log('鍒嗘壒鍏ュ簱鎸夐挳琚偣鍑伙紝寮�濮嬫牎楠�');
+ const selectedRows = this.$refs.table.getSelected();
+
+ // 鏍¢獙1锛氭槸鍚﹂�変腑琛岋紙鑷冲皯閫夋嫨涓�鏉★級
+ if (selectedRows.length === 0) {
+ console.log('鏍¢獙涓嶉�氳繃锛氭湭閫変腑浠讳綍鍗曟嵁');
+ ElMessage.warning('璇烽�夋嫨鑷冲皯涓�鏉″崟鎹�');
+ return;
+ }
+
+ // 鏀堕泦鎵�鏈夐�変腑鍗曟嵁鐨勭紪鍙凤紙杩囨护鏃犲崟鎹彿鐨勫紓甯歌锛�
+ const inboundOrderNos = selectedRows
+ .filter(row => row.inboundOrderNo)
+ .map(row => row.inboundOrderNo);
+
+ // 鏍¢獙2锛氭槸鍚︽湁鏈夋晥鍗曟嵁鍙�
+ if (inboundOrderNos.length === 0) {
+ console.log('鏍¢獙涓嶉�氳繃锛氶�変腑鍗曟嵁鏃犳湁鏁堢紪鍙�');
+ ElMessage.warning('閫変腑鐨勫崟鎹腑鏃犳湁鏁堢紪鍙凤紝璇烽噸鏂伴�夋嫨');
+ return;
+ }
+
+ try {
+ console.log('鍙戣捣鍒嗘壒鍏ュ簱璇锋眰锛屽弬鏁帮細', { inboundOrderNos });
+ const response = await http.post('/api/InboundOrder/BatchOrderFeedbackToMes', {
+ orderNos: inboundOrderNos,
+ inout: 1
+ });
+
+ const { status, message, data } = response;
+ if (status) {
+ console.log('鍒嗘壒鍏ュ簱鎴愬姛锛屽悗绔繑鍥烇細', data);
+ ElMessage.success(`鍒嗘壒鍏ュ簱鎴愬姛锛佸叡澶勭悊${inboundOrderNos.length}鏉″崟鎹甡);
+ this.refresh(); // 鍏ュ簱鎴愬姛鍚庡埛鏂板垪琛紙澶嶇敤鍘熸湁閫昏緫锛�
+ } else {
+ console.log('鍒嗘壒鍏ュ簱澶辫触锛屽悗绔彁绀猴細', message);
+ ElMessage.error(message || data?.message || '鍒嗘壒鍏ュ簱澶辫触');
}
- }, '鍙栨秷'),
- h(ElButton, {
- type: 'primary',
- onClick: submitForm
- }, '纭畾')
- ])
- ])
- });
+ } catch (error) {
+ console.error('鍒嗘壒鍏ュ簱璇锋眰寮傚父锛�', error);
+ ElMessage.error('缃戠粶寮傚父鎴栨帴鍙i敊璇紝璇风◢鍚庨噸璇�');
+ }
+ }
+ },
+ {
+ name: '绌烘墭鐩樺叆搴�',
+ type: 'primary',
+ value: '绌烘墭鐩樺叆搴�',
- vnode.appContext = this.$.appContext;
- render(vnode, mountNode);
- }
-}
- ], box: [], detail: [] },
- methods: {
- //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
- onInit() {
- },
- onInited() {
-
- //妗嗘灦鍒濆鍖栭厤缃悗
- //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
- //this.detailOptions.columns.forEach(column=>{ });
- },
- searchBefore(param) {
- //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
- //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
- // this.searchFormFields.orderType=[0]
- let wheres = [{
- 'name': 'orderType',
- 'value': '0',
- 'displayType': 'text'}];
-
+ onClick: function () {
+ const mountNode = document.createElement('div');
+ document.body.appendChild(mountNode);
- param.wheres.push(...wheres);
- 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)
+ // 鍝嶅簲寮忚〃鍗曟暟鎹細鏂欑鐮侊紙蹇呭~锛屾壂鐮佹灙/鎵嬪姩杈撳叆锛�
+ const formData = reactive({
+ boxCode: '',
+ warehouseCode: ''
+ });
+
+ 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 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 = '';
+
+ 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,
+
+ 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);
+ }
}
+ ], box: [], detail: []
+ },
+ methods: {
+ //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
+ onInit() {
+ this.columns.forEach(column => {
+ if (column.field === 'orderStatistics') {
+ column.formatter = (row) => {
+ // 鏍¢獙details鏄惁瀛樺湪涓旀湁鏁版嵁
+ if (row.details && row.details.length > 0) {
+ //鎸塵aterielCode鍒嗙粍缁熻orderQuantity鎬诲拰
+ const materielSumMap = row.details.reduce((acc, item) => {
+ const materielCode = item.materielCode || '鏈煡鐗╂枡';
+ const quantity = Number(item.orderQuantity) || 0;
+ acc[materielCode] = (acc[materielCode] || 0) + quantity;
+ return acc;
+ }, {});
+
+ //姣忎釜鐗╂枡椤圭敓鎴愮嫭绔媎iv锛岃法琛屾樉绀�
+ const displayItems = Object.entries(materielSumMap).map(([code, total]) => {
+ return `<div style="line-height: 1.5; white-space: normal;">${code}锛�${total}涓�</div>`;
+ });
+ const displayContent = displayItems.join('');
+ return `<div style="color: #F56C6C; white-space: normal; word-break: break-all;">${displayContent}</div>`;
+ } else {
+ return '<span style="color: #F56C6C">鏃犲叆搴撴槑缁�</span>';
+ }
+ };
+ }
+ });
+ },
+ onInited() {
+
+ //妗嗘灦鍒濆鍖栭厤缃悗
+ //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
+ //this.detailOptions.columns.forEach(column=>{ });
+ },
+ searchBefore(param) {
+ //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
+ //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
+ // this.searchFormFields.orderType=[0]
+ let wheres = [{
+ 'name': 'orderType',
+ 'value': '0',
+ 'displayType': 'text'
+ }];
+
+
+ param.wheres.push(...wheres);
+ 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;
-
\ No newline at end of file
+ }
+};
+export default extension;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
index 02fafb3..97ad4e9 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
@@ -383,17 +383,6 @@
searchBefore(param) {
//鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
//杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
-
- let wheres = [{
- 'name': 'orderType',
- 'value': '0',
- 'displayType': 'text'
- }];
-
-
- param.wheres.push(...wheres);
- return true;
-
return true;
},
searchAfter(result) {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
index 0fafa8b..f4bdcb2 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
@@ -79,7 +79,7 @@
const searchFormFields = ref({
inboundOrderNo: "",
upperOrderNo: "",
- orderType: "0",
+ orderType: "",
orderStatus: "",
createType: "",
creater: "",
@@ -169,6 +169,13 @@
bind: { key: "inboundState", data: [] },
},
{
+ field: "orderStatistics",
+ title: "鍗曟嵁鐗╂枡缁熻",
+ type: "string",
+ width: 230,
+ align: "left",
+ },
+ {
field: "createType",
title: "鍒涘缓鏂瑰紡",
type: "string",
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_Core/BaseServices/ServiceBase.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_Core/BaseServices/ServiceBase.cs"
index 2b0a3fe..31e32eb 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_Core/BaseServices/ServiceBase.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_Core/BaseServices/ServiceBase.cs"
@@ -223,7 +223,7 @@
if (string.IsNullOrEmpty(where))
where += $"{searchParametersList[i].Name} >= '{searchParametersList[i].Value}'";
else
- where += $" and {searchParametersList[i].Name} {searchParametersList[i].DisplayType.GetLinqCondition()} '{searchParametersList[i].Value}'";
+ where += $" and {searchParametersList[i].Name} >= '{searchParametersList[i].Value}'";
}
else if (searchParametersList[i].DisplayType.GetLinqCondition() == LinqExpressionType.LessThanOrEqual)
{
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_Core/Helper/UtilConvert.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_Core/Helper/UtilConvert.cs"
index d9c8538..6acca7c 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_Core/Helper/UtilConvert.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_Core/Helper/UtilConvert.cs"
@@ -958,10 +958,10 @@
case HtmlElementType.Contains:
linqExpression = LinqExpressionType.In;
break;
- case HtmlElementType.ThanOrEqual:
+ case HtmlElementType.thanorequal:
linqExpression = LinqExpressionType.ThanOrEqual;
break;
- case HtmlElementType.LessOrequal:
+ case HtmlElementType.lessorequal:
linqExpression = LinqExpressionType.LessThanOrEqual;
break;
case HtmlElementType.GT:
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockDetailDtO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockDetailDtO.cs"
new file mode 100644
index 0000000..c82c12f
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockDetailDtO.cs"
@@ -0,0 +1,76 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_DTO.Stock
+{
+ public class StockDetailDtO
+ {
+
+ public int Id { get; set; }
+
+
+ public int StockId { get; set; }
+
+
+ public string MaterielCode { get; set; }
+
+
+ public string MaterielName { get; set; }
+
+
+ public string OrderNo { get; set; }
+
+
+ public string BatchNo { get; set; }
+
+
+ public string ProductionDate { get; set; }
+
+
+ public string EffectiveDate { get; set; }
+
+
+ public string SerialNumber { get; set; }
+
+
+ public decimal StockQuantity { get; set; }
+
+
+ public decimal OutboundQuantity { get; set; }
+
+
+ public int Status { get; set; }
+
+
+ public string Unit { get; set; }
+
+ public string InboundOrderRowNo { get; set; }
+
+
+ public string? SupplyCode { get; set; }
+
+ public string FactoryArea { get; set; }
+
+ public string? WarehouseCode { get; set; }
+
+
+ public string? Barcode { get; set; }
+
+
+
+ public string? BusinessType { get; set; }
+
+
+ public decimal BarcodeQty { get; set; }
+
+ public string BarcodeUnit { get; set; }
+
+ public DateTime? ValidDate { get; set; }
+
+ public string Remark { get; set; }
+
+ }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_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 7d1508b..2dd5af5 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"
@@ -689,5 +689,41 @@
return WebResponseContent.Instance.OK("鎵樼洏鎾ら攢鎴愬姛");
}
+
+ public override PageGridData<Dt_InboundOrder> GetPageData(PageDataOptions options)
+ {
+ string wheres = ValidatePageOptions(options);
+ //鑾峰彇鎺掑簭瀛楁
+ Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
+ List<OrderByModel> orderByModels = new List<OrderByModel>();
+ foreach (var item in orderbyDic)
+ {
+ OrderByModel orderByModel = new()
+ {
+ FieldName = item.Key,
+ OrderByType = item.Value
+ };
+ orderByModels.Add(orderByModel);
+ }
+
+
+ int totalCount = 0;
+ List<SearchParameters> searchParametersList = new List<SearchParameters>();
+ if (!string.IsNullOrEmpty(options.Wheres))
+ {
+ try
+ {
+ searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
+ options.Filter = searchParametersList;
+ }
+ catch { }
+ }
+ var data = BaseDal.Db.Queryable<Dt_InboundOrder>()
+ .WhereIF(!wheres.IsNullOrEmpty(), wheres)
+ .OrderBy(orderByModels).Includes(x=>x.Details)
+ .ToPageList(options.Page, options.Rows, ref totalCount);
+
+ return new PageGridData<Dt_InboundOrder>(totalCount, 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_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 63012ed..4d20ff1 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"
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection.Metadata;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
@@ -36,6 +37,7 @@
using WIDESEA_Model.Models;
using WIDESEA_Model.Models.Basic;
using WIDESEA_Model.Models.Check;
+using WIDESEA_Model.Models.Outbound;
namespace WIDESEA_OutboundService
{
@@ -66,6 +68,7 @@
private readonly IReCheckOrderService _reCheckOrderService;
private readonly ITask_HtyService _task_HtyService;
private readonly ILogger<OutboundPickingService> _logger;
+ private readonly IRepository<Dt_InterfaceLog> _interfaceLog;
private Dictionary<string, string> stations = new Dictionary<string, string>
{
@@ -84,7 +87,7 @@
public OutboundPickingService(IRepository<Dt_PickingRecord> BaseDal, IUnitOfWorkManage unitOfWorkManage, IStockInfoService stockInfoService, IStockService stockService,
IOutStockLockInfoService outStockLockInfoService, IStockInfoDetailService stockInfoDetailService, ILocationInfoService locationInfoService,
IOutboundOrderDetailService outboundOrderDetailService, ISplitPackageService splitPackageService, IOutboundOrderService outboundOrderService,
- IRepository<Dt_Task> taskRepository, IESSApiService eSSApiService, ILogger<OutboundPickingService> logger, IInvokeMESService invokeMESService, IDailySequenceService dailySequenceService, IAllocateService allocateService, IRepository<Dt_InboundOrder> inboundOrderRepository, IInboundOrderDetailService inboundOrderDetailService, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IReCheckOrderService reCheckOrderService, ITask_HtyService task_HtyService) : base(BaseDal)
+ IRepository<Dt_Task> taskRepository, IESSApiService eSSApiService, ILogger<OutboundPickingService> logger, IInvokeMESService invokeMESService, IDailySequenceService dailySequenceService, IAllocateService allocateService, IRepository<Dt_InboundOrder> inboundOrderRepository, IInboundOrderDetailService inboundOrderDetailService, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IReCheckOrderService reCheckOrderService, ITask_HtyService task_HtyService,IRepository<Dt_InterfaceLog> interfaceLog) : base(BaseDal)
{
_unitOfWorkManage = unitOfWorkManage;
_stockInfoService = stockInfoService;
@@ -106,6 +109,7 @@
_warehouseAreaRepository = warehouseAreaRepository;
_reCheckOrderService = reCheckOrderService;
_task_HtyService = task_HtyService;
+ _interfaceLog = interfaceLog;
}
@@ -2851,10 +2855,11 @@
var result1 = await _invokeMESService.FeedbackInbound(infeedmodel);
if (result1 != null && result1.code == 200)
{
+ var orderIds = inboundOrderDetails.Select(x => x.Id).Distinct().ToList();
_inboundOrderRepository.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 })
.Where(it => it.Id == inboundOrder.Id).ExecuteCommand();
_inboundOrderDetailService.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 })
- .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand();
+ .Where(it => orderIds.Contains(it.Id)).ExecuteCommand();
}
//鍑哄簱鍥炰紶MES
@@ -2873,7 +2878,7 @@
status = outboundOrder.OrderStatus,
details = new List<FeedbackOutboundDetailsModel>()
};
- foreach (var detail in outboundOrder.Details)
+ foreach (var detail in outboundOrderDetails)
{
// 鑾峰彇璇ユ槑缁嗗搴旂殑鏉$爜淇℃伅锛堜粠閿佸畾璁板綍锛�
var detailLocks = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>()
@@ -2903,18 +2908,37 @@
}).ToList();
outfeedmodel.details.AddRange(groupdata);
}
+ //瀛樺偍鍥炰紶鍙傛暟锛屼繚璇佸紓甯告墜鍔ㄥ洖浼�
+ Dt_InterfaceLog interfaceLog = new Dt_InterfaceLog
+ {
+ OrderNo = outboundOrder.UpperOrderNo,
+ DocumentNo = documentNo,
+ OrderType = "铏氭嫙鍑哄叆搴�",
+ Content = outfeedmodel.ToJson(),
+ ReturnToMESStatus = 0,
+ IsDeleted = false
+ };
+ _interfaceLog.AddData(interfaceLog);
+
var result = await _invokeMESService.FeedbackOutbound(outfeedmodel);
if (result != null && result.code == 200)
{
+ var orderIds = outboundOrderDetails.Select(x => x.Id).Distinct().ToList();
await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>()
.SetColumns(x => x.ReturnToMESStatus == 1)
- .Where(x => x.OrderId == outboundOrder.Id)
+ .Where(x => orderIds.Contains(x.Id))
.ExecuteCommandAsync();
+
await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>()
.SetColumns(x => x.ReturnToMESStatus == 1)
.Where(x => x.Id == outboundOrder.Id)
.ExecuteCommandAsync();
+
+ await _interfaceLog.Db.Updateable<Dt_InterfaceLog>()
+ .SetColumns(x => x.ReturnToMESStatus == 1)
+ .Where(x=>x.DocumentNo == documentNo)
+ .ExecuteCommandAsync();
}
return WebResponseContent.Instance.OK();
}
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_StockService/StockDetailByMaterielService.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_StockService/StockDetailByMaterielService.cs"
new file mode 100644
index 0000000..15e4b18
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockDetailByMaterielService.cs"
@@ -0,0 +1,12 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_StockService
+{
+ internal class StockDetailByMaterielService
+ {
+ }
+}
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_StockService/StockInfoDetailService.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_StockService/StockInfoDetailService.cs"
index 450f6a7..4371f76 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_StockService/StockInfoDetailService.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_StockService/StockInfoDetailService.cs"
@@ -72,6 +72,42 @@
return new PageGridData<StockInfoDetailWithPalletDto> { Rows = dtoList, Total = lists.Total, Summary = lists.Summary };
}
+
+ public PageGridData<StockDetailDtO> GetPageDataByMateriel(PageDataOptions options)
+ {
+ PageGridData<Dt_StockInfoDetail> lists = base.GetPageData(options);
+
+ List<StockDetailDtO> dtoList = lists.Rows.GroupBy(detail => new { detail.MaterielCode, detail.BatchNo, detail.SupplyCode }).Select(group =>
+ {
+ var firstItem = group.First();
+ return new StockDetailDtO
+ {
+ Id = firstItem.Id,
+ StockId = firstItem.StockId,
+ MaterielCode = group.Key.MaterielCode,
+ MaterielName = firstItem.MaterielName,
+ OrderNo = firstItem.OrderNo,
+ BatchNo = group.Key.BatchNo,
+ ProductionDate = firstItem.ProductionDate,
+ EffectiveDate = firstItem.EffectiveDate,
+ SerialNumber = firstItem.SerialNumber,
+ // 鏍稿績锛氬褰撳墠鍒嗙粍鐨凷tockQuantity姹傚拰
+ StockQuantity = group.Sum(item => item.StockQuantity),
+ OutboundQuantity = firstItem.OutboundQuantity,
+ Status = firstItem.Status,
+ Unit = firstItem.Unit,
+ InboundOrderRowNo = firstItem.InboundOrderRowNo,
+ SupplyCode = group.Key.SupplyCode,
+ WarehouseCode = firstItem.WarehouseCode,
+ Barcode = firstItem.Barcode,
+ BusinessType = firstItem.BusinessType,
+ Remark = firstItem.Remark
+ };
+ }).ToList();
+
+
+ return new PageGridData<StockDetailDtO> { Rows = dtoList, Total = lists.Total, Summary = lists.Summary };
+ }
}
}
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_StockService/StockViewService.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_StockService/StockViewService.cs"
index 7f7fcea..e6aadcc 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_StockService/StockViewService.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_StockService/StockViewService.cs"
@@ -42,7 +42,7 @@
//}
int totalCount = 0;
- ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>();
+ ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>().Includes(x=>x.Details);
ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>();
ISugarQueryable<Dt_StockInfoDetail> sugarQueryable2 = _dbBase.Queryable<Dt_StockInfoDetail>();
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/Stock/StockInfoDetailController.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/Stock/StockInfoDetailController.cs"
index e5de3a4..607f07b 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/Stock/StockInfoDetailController.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/Stock/StockInfoDetailController.cs"
@@ -1,10 +1,12 @@
-锘縰sing Microsoft.AspNetCore.Http;
+锘縰sing Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Stock;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
+using WIDESEA_StockService;
namespace WIDESEA_WMSServer.Controllers.Stock
{
@@ -28,5 +30,11 @@
return Json(result);
}
+
+ [HttpPost, Route("GetPageDataByMateriel"),AllowAnonymous]
+ public PageGridData<StockDetailDtO> GetPageDataByMateriel([FromBody] PageDataOptions options)
+ {
+ return Service.GetPageDataByMateriel(options);
+ }
}
}
--
Gitblit v1.9.3