From a7b15461d3dc6d07c18e065fa3a6acd234c2d7c8 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期二, 09 十二月 2025 19:51:55 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu
---
项目代码/WIDESEA_WMSClient/src/extension/stock/stockView.js | 36
项目代码/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue | 31
项目代码/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js | 1
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue | 718 +++++++++++++------------
项目代码/WIDESEA_WMSClient/src/views/inbound/Dt_AllocateOrder.vue | 1
项目代码/WIDESEA_WMSClient/src/views/stock/stockInfoDetailByMaterielSum.vue | 61 -
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateDetailService.cs | 24
项目代码/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js | 340 ++++++------
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs | 32
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs | 25
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue | 5
项目代码/WIDESEA_WMSClient/src/extension/check/extend/StockSelect.vue | 150 ++++
项目代码/WIDESEA_WMSClient/src/views/stock/stockView.vue | 23
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateService.cs | 4
项目代码/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue | 18
项目代码/WIDESEA_WMSClient/src/views/taskinfo/task.vue | 18
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/OutboundOrderEnum.cs | 5
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 94 +-
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockDetailByMaterielService.cs | 27
项目代码/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue | 27
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/newAllocateOrderDetail.vue | 2
22 files changed, 919 insertions(+), 725 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/extend/StockSelect.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/extend/StockSelect.vue"
index 2c950a6..5afa986 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/extend/StockSelect.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/extend/StockSelect.vue"
@@ -38,6 +38,53 @@
</el-row>
</el-alert>
</div>
+
+ <!-- 鏂板绛涢�夊尯鍩� -->
+ <div class="filter-area" style="margin: 10px 0; padding: 10px; background: #f8f9fa; border-radius: 4px;">
+ <el-form :model="filterForm" inline @submit.prevent>
+ <el-form-item label="鐗╂枡缂栧彿锛�">
+ <el-input
+ v-model="filterForm.materielCode"
+ placeholder="妯$硦绛涢�夌墿鏂欑紪鍙�"
+ clearable
+ style="width: 180px"
+ @input="filterTable"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="鐗╂枡鏉$爜锛�">
+ <el-input
+ v-model="filterForm.barcode"
+ placeholder="妯$硦绛涢�夌墿鏂欐潯鐮�"
+ clearable
+ style="width: 180px"
+ @input="filterTable"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="鎵樼洏缂栧彿锛�">
+ <el-input
+ v-model="filterForm.palletCode"
+ placeholder="妯$硦绛涢�夋墭鐩樼紪鍙�"
+ clearable
+ style="width: 180px"
+ @input="filterTable"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="璐т綅缂栧彿锛�">
+ <el-input
+ v-model="filterForm.locationCode"
+ placeholder="妯$硦绛涢�夎揣浣嶇紪鍙�"
+ clearable
+ style="width: 180px"
+ @input="filterTable"
+ ></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="filterTable">鎼滅储</el-button>
+ <el-button @click="resetFilter">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+
<div class="box-table" style="margin-top: 1%">
<el-table
ref="singleTable"
@@ -134,6 +181,7 @@
row: null,
showDetialBox: false,
tableData: [],
+ originalTableData: [], // 鏂板锛氬瓨鍌ㄥ師濮嬫暟鎹紝鐢ㄤ簬绛涢��
tableColumns: [
{ prop: "materielCode", title: "鐗╂枡缂栧彿", type: "string", width: 150 },
{ prop: "barcode", title: "鐗╂枡鏉$爜", type: "string", width: 150 },
@@ -145,6 +193,14 @@
selectionSum: 0,
selectionClass: "less-style",
originalQuantity: 0,
+
+ // 鏂板锛氱瓫閫夎〃鍗曟暟鎹�
+ filterForm: {
+ materielCode: "",
+ barcode: "",
+ palletCode: "",
+ locationCode: ""
+ },
// 鍑哄簱寮圭獥鐩稿叧鏁版嵁
showOutboundDialog: false,
@@ -201,23 +257,22 @@
this.$refs.outboundFormRef.validate((valid) => {
if (!valid) return;
-
- if (this.selection.length <= 0) {
- return this.$message.error("璇峰嬀閫�");
- }
- let url = this.pkcx
- ? "api/Task/GenerateOutboundTask?orderDetailId="
- : "api/Task/GenerateOutboundTask?orderDetailId=";
- this.http
- .post(url + this.row.id+"&station="+this.outboundForm.selectedPlatform, this.selection, "鏁版嵁澶勭悊涓�")
- .then((x) => {
- if (!x.status) return this.$message.error(x.message);
- this.$message.success("鎿嶄綔鎴愬姛");
- this.showDetialBox = false;
- this.$emit("parentCall", ($vue) => {
- $vue.getData();
+ if (this.selection.length <= 0) {
+ return this.$message.error("璇峰嬀閫�");
+ }
+ let url = this.pkcx
+ ? "api/Task/GenerateOutboundTask?orderDetailId="
+ : "api/Task/GenerateOutboundTask?orderDetailId=";
+ this.http
+ .post(url + this.row.id+"&station="+this.outboundForm.selectedPlatform, this.selection, "鏁版嵁澶勭悊涓�")
+ .then((x) => {
+ if (!x.status) return this.$message.error(x.message);
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.showDetialBox = false;
+ this.$emit("parentCall", ($vue) => {
+ $vue.getData();
+ });
});
- });
});
},
@@ -233,11 +288,14 @@
)
.then((x) => {
this.tableData = x;
+ this.originalTableData = x; // 鏂板锛氫繚瀛樺師濮嬫暟鎹�
// 鍒锋柊鍚庢竻绌轰箣鍓嶇殑閫夋嫨鍜岃鏁�
this.clearSelection();
this.selectionSum = 0;
this.originalQuantity = 0;
this.updateSelectionClass();
+ // 鍒锋柊鍚庨噸缃瓫閫夋潯浠�
+ this.resetFilter();
});
},
@@ -271,9 +329,10 @@
// 鏇存柊宸查�夋暟閲忔牱寮�
updateSelectionClass() {
if (!this.row) return;
- if (this.selectionSum === this.row.orderQuantity) {
+ // 淇锛歳ow.orderQuantity 鏀逛负 row.qty锛堟ā鏉块噷鏄剧ず鐨勬槸row.qty锛�
+ if (this.selectionSum === this.row.qty) {
this.selectionClass = "equle-style";
- } else if (this.selectionSum < this.row.orderQuantity) {
+ } else if (this.selectionSum < this.row.qty) {
this.selectionClass = "less-style";
} else {
this.selectionClass = "more-style";
@@ -298,6 +357,55 @@
tableButtonClick(row, item) {
console.log("鍥炬爣鎸夐挳鐐瑰嚮锛�", item.title, row);
},
+
+ // 鏂板锛氱瓫閫夎〃鏍兼暟鎹�
+ filterTable() {
+ if (!this.originalTableData.length) return;
+
+ // 瑙f瀯绛涢�夋潯浠跺苟杞负灏忓啓锛堝拷鐣ュぇ灏忓啓锛�
+ const { materielCode, barcode, palletCode, locationCode } = this.filterForm;
+ const mc = materielCode.toLowerCase().trim();
+ const bc = barcode.toLowerCase().trim();
+ const pc = palletCode.toLowerCase().trim();
+ const lc = locationCode.toLowerCase().trim();
+
+ // 妯$硦绛涢�夐�昏緫
+ this.tableData = this.originalTableData.filter(item => {
+ // 姣忎釜瀛楁閮藉仛绌哄�煎鐞嗗拰灏忓啓杞崲锛屾敮鎸佹ā绯婂尮閰�
+ const itemMc = (item.materielCode || "").toLowerCase();
+ const itemBc = (item.barcode || "").toLowerCase();
+ const itemPc = (item.palletCode || "").toLowerCase();
+ const itemLc = (item.locationCode || "").toLowerCase();
+
+ return (
+ itemMc.includes(mc) &&
+ itemBc.includes(bc) &&
+ itemPc.includes(pc) &&
+ itemLc.includes(lc)
+ );
+ });
+
+ // 绛涢�夊悗娓呯┖閫夋嫨鐘舵��
+ this.clearSelection();
+ this.selectionSum = 0;
+ this.updateSelectionClass();
+ },
+
+ // 鏂板锛氶噸缃瓫閫夋潯浠�
+ resetFilter() {
+ this.filterForm = {
+ materielCode: "",
+ barcode: "",
+ palletCode: "",
+ locationCode: ""
+ };
+ // 鎭㈠鍘熷鏁版嵁
+ this.tableData = [...this.originalTableData];
+ // 閲嶇疆閫夋嫨鐘舵��
+ this.clearSelection();
+ this.selectionSum = 0;
+ this.updateSelectionClass();
+ }
},
};
</script>
@@ -314,6 +422,12 @@
.more-style {
color: red;
}
+
+/* 绛涢�夊尯鍩熸牱寮忎紭鍖� */
+.filter-area :deep(.el-form-item) {
+ margin-bottom: 0;
+ margin-right: 10px;
+}
</style>
<style>
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 cf21535..3682205 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,4 +1,3 @@
-
//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
import http from '@/api/http.js'
import { h, createVNode, render, reactive, ref } from 'vue';
@@ -44,159 +43,159 @@
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: '', // 鎵樼洏鍙疯緭鍏ユ
- barcode:''
- });
+ // 鍝嶅簲寮忚〃鍗曟暟鎹細鎵樼洏鍙凤紙蹇呭~锛�
+ const formData = reactive({
+ palletCode: '', // 鎵樼洏鍙疯緭鍏ユ
+ barcode: ''
+ });
- // 鎻愪氦琛ㄥ崟鐨勭粺涓�閫昏緫
- 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()+'&barcode='+formData.barcode.trim());
-
+ // 鍙戣捣鎾ら攢缁勭洏璇锋眰
+ try {
+ //console.log('鍙戣捣鎾ら攢缁勭洏璇锋眰锛屾墭鐩樺彿锛�', formData.palletCode.trim());
+ const response = await http.post('/api/InboundOrder/UndoPalletGroup?palletCode=' + formData.palletCode.trim() + '&barcode=' + formData.barcode.trim());
- const { status, message, data } = response;
- if (status) {
- ElMessage.success(response.message);
- console.log(response.message)
- 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(response.message);
+ console.log(response.message)
+ 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(ElFormItem,{label: '鏉$爜', prop: 'barcode'},[
- h(ElInput, {
- type: 'text',
- modelValue: formData.barcode,
- 'onUpdate:modelValue': (val) => {
- formData.barcode = val;
- },
- 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);
},
+ '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(ElFormItem, { label: '鏉$爜', prop: 'barcode' }, [
+ h(ElInput, {
+ type: 'text',
+ modelValue: formData.barcode,
+ 'onUpdate:modelValue': (val) => {
+ formData.barcode = val;
+ },
+ 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',
@@ -427,30 +426,30 @@
//涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
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;
- }, {});
+ 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>';
- }
- };
- }
- });
+ //姣忎釜鐗╂枡椤圭敓鎴愮嫭绔媎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() {
@@ -473,7 +472,6 @@
return true;
},
searchAfter(result) {
- //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊�
return true;
},
addBefore(formData) {
@@ -498,4 +496,4 @@
}
}
};
-export default extension;
+export default extension;
\ 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/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 07109d0..55a652e 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"
@@ -11,10 +11,7 @@
</el-form>
<el-form ref="form" :model="form" label-width="90px">
<el-form-item label="鍑哄簱鏁伴噺:">
- <el-select v-model="num" placeholder="璇烽�夋嫨鍑哄簱鏁伴噺">
- <el-option v-for="item in 6" :key="item" :label="item.toString()" :value="item">
- </el-option>
- </el-select>
+ <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>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/newAllocateOrderDetail.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/newAllocateOrderDetail.vue"
index 2de8386..222779e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/newAllocateOrderDetail.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/newAllocateOrderDetail.vue"
@@ -201,7 +201,7 @@
width: 90,
},
{
- prop: "overOutQuantity",
+ prop: "moveQty",
title: "鎸枡鏁伴噺",
type: "string",
width: 90,
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue"
index da423a5..cc9b8be 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue"
@@ -14,39 +14,34 @@
<span>宸查�変腑 {{ selection.length }} 椤�</span>
</el-col>
<el-col :span="8">
- <!-- <el-link
- type="primary"
- size="small"
- style="float: right; height: 20px"
- @click="lockstocks"
- >閿佸畾搴撳瓨</el-link> -->
-
<el-link
type="primary"
size="small"
- v-if="isBatch === 0"
+ v-if="isBatch === 0"
style="float: right; height: 20px"
@click="handleOpenPicking"
- >鎷i��</el-link>
- <el-link
+ >鎷i��</el-link
+ >
+ <el-link
type="primary"
size="small"
style="float: right; height: 20px; margin-right: 10px"
- v-if="isBatch === 1"
+ v-if="isBatch === 1"
@click="handleOpenBatchPicking"
- >鍒嗘壒鎷i��</el-link>
+ >鍒嗘壒鎷i��</el-link
+ >
<el-link
type="primary"
size="small"
- v-if="isBatch === 0"
+ v-if="isBatch === 0"
style="float: right; height: 20px; margin-right: 10px"
@click="outbound"
>鐩存帴鍑哄簱</el-link
>
- <el-link
+ <el-link
type="primary"
size="small"
- v-if="isBatch === 1"
+ v-if="isBatch === 1"
style="float: right; height: 20px; margin-right: 10px"
@click="outboundbatch"
>鍒嗘壒鍑哄簱</el-link
@@ -57,8 +52,8 @@
style="float: right; height: 20px; margin-right: 10px"
@click="getData"
>鍒锋柊</el-link
- ></el-col
- >
+ >
+ </el-col>
</el-row>
</el-alert>
</div>
@@ -96,18 +91,23 @@
effect="dark"
:content="item.title"
placement="bottom"
- ><el-link
+ >
+ <el-link
type="primary"
:disabled="getButtonEnable(item.prop, scoped.row)"
@click="tableButtonClick(scoped.row, item)"
- ><i :class="item.icon" style="font-size: 22px"></i></el-link
- ></el-tooltip>
+ >
+ <i :class="item.icon" style="font-size: 22px"></i>
+ </el-link>
+ </el-tooltip>
</div>
-
<div v-else-if="item.type == 'tag'">
<el-tag size="small">
{{ getDictionary(scoped.row, item) }}
</el-tag>
+ </div>
+ <div v-else>
+ {{ scoped.row[item.prop] }}
</div>
</template>
</el-table-column>
@@ -122,27 +122,37 @@
<NoStockOut ref="NoStockOut" @parentCall="parentCall"></NoStockOut>
</div>
</template>
+
<script>
import VolBox from "@/components/basic/VolBox.vue";
import VolForm from "@/components/basic/VolForm.vue";
import StockSelect from "./StockSelect.vue";
import SelectedStock from "./SelectedStock.vue";
import NoStockOut from "./NoStockOut.vue";
-import { h,createVNode, render,reactive } from 'vue';
-import { ElDialog , ElForm, ElFormItem, ElSelect,ElOption, ElButton, ElInput, ElMessage } from 'element-plus';
-import { th } from 'element-plus/es/locale';
+import { h, createVNode, render, reactive } from "vue";
+import {
+ ElDialog,
+ ElForm,
+ ElFormItem,
+ ElSelect,
+ ElOption,
+ ElButton,
+ ElInput,
+ ElMessage,
+} from "element-plus";
export default {
- components: { VolBox, VolForm, StockSelect, SelectedStock,NoStockOut},
+ components: { VolBox, VolForm, StockSelect, SelectedStock, NoStockOut },
data() {
return {
row: null,
- isBatch :0,
+ isBatch: 0,
showDetialBox: false,
flag: false,
currentRow: null,
selection: [],
tableData: [],
+ mainBusinessType: null, // 鏂板锛氬瓨鍌ㄤ富鍗曟嵁鐨刡usinessType
tableColumns: [
{
prop: "id",
@@ -162,7 +172,7 @@
prop: "materielCode",
title: "鐗╂枡缂栧彿",
type: "string",
- width: 150,
+ width: 120,
},
{
prop: "materielName",
@@ -180,7 +190,7 @@
prop: "supplyCode",
title: "渚涘簲鍟嗙紪鍙�",
type: "string",
- width: 150,
+ width: 90,
},
{
prop: "orderQuantity",
@@ -201,7 +211,7 @@
width: 90,
},
{
- prop: "overOutQuantity",
+ prop: "moveQty",
title: "鎸枡鏁伴噺",
type: "string",
width: 90,
@@ -210,7 +220,7 @@
prop: "unit",
title: "鍗曚綅",
type: "string",
- width: 90,
+ width: 80,
},
{
prop: "orderDetailStatus",
@@ -224,7 +234,7 @@
title: "鎸囧畾搴撳瓨",
type: "icon",
width: 90,
- hidden:true,
+ hidden: true, // 榛樿闅愯棌
icon: "el-icon-s-grid",
},
{
@@ -269,9 +279,8 @@
order: "desc",
Foots: "",
total: 0,
- // 2020.08.29澧炲姞鑷畾涔夊垎椤垫潯澶у皬
sizes: [30, 60, 100, 120],
- size: 30, // 榛樿鍒嗛〉澶у皬
+ size: 30,
Wheres: [],
page: 1,
rows: 30,
@@ -308,13 +317,24 @@
};
},
methods: {
+ toggleAssignStockColumn() {
+ const assignStockColumn = this.tableColumns.find(
+ (item) => item.prop === "assignStock"
+ );
+ if (assignStockColumn) {
+ // businessType涓�22鏃舵樉绀猴紝鍚﹀垯闅愯棌
+ assignStockColumn.hidden = this.mainBusinessType !=='22';
+ }
+ },
open(row) {
this.row = row;
this.showDetialBox = true;
- console.log(this.row);
+ console.log("涓诲崟鎹暟鎹細", this.row);
this.isBatch = row.isBatch;
+ this.mainBusinessType = row.businessType;
this.getDictionaryData();
this.getData();
+ this.toggleAssignStockColumn();
},
getData() {
var wheres = [{ name: "orderId", value: this.row.id }];
@@ -323,12 +343,13 @@
rows: this.paginations.rows,
sort: this.paginations.sort,
order: this.paginations.order,
- wheres: JSON.stringify(wheres), // 鏌ヨ鏉′欢锛屾牸寮忎负[{ name: "瀛楁", value: "xx" }]
+ wheres: JSON.stringify(wheres),
};
this.http
.post("api/OutboundOrderDetail/GetPageData", param, "鏌ヨ涓�")
.then((x) => {
this.tableData = x.rows;
+ this.toggleAssignStockColumn(); // 鏁版嵁鍔犺浇鍚庨噸鏂扮‘璁ゅ垪鏄鹃殣
});
},
tableButtonClick(row, column) {
@@ -336,8 +357,7 @@
this.$refs.child.open(row);
} else if (column.prop == "NoStockOut") {
this.$refs.NoStockOut.open(row);
- }else{
- //鐐瑰嚮鎵撳紑鍑哄簱璇︽儏
+ } else {
this.$refs.selectedStock.open(row);
}
},
@@ -345,7 +365,7 @@
if (this.selection.length === 0) {
return this.$message.error("璇烽�夋嫨鍗曟嵁鏄庣粏");
}
- var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id
+ var keys = this.selection.map((item) => item.id);
this.http
.post("api/OutboundOrderDetail/LockOutboundStocks", keys, "鏁版嵁澶勭悊涓�")
.then((x) => {
@@ -357,341 +377,346 @@
});
});
},
- // 鎵撳紑鎷i�夐〉闈�
- handleOpenPicking() {
+ handleOpenPicking() {
this.$router.push({
- path: '/outbound/picking',
- query: { orderId: this.row.id ,orderNo:this.row.orderNo}
- })
+ path: "/outbound/picking",
+ query: { orderId: this.row.id, orderNo: this.row.orderNo },
+ });
},
handleOpenBatchPicking() {
- this.$router.push({
- path: '/outbound/batchpicking',
- query: { orderId: this.row.id ,orderNo:this.row.orderNo}})
+ this.$router.push({
+ path: "/outbound/batchpicking",
+ query: { orderId: this.row.id, orderNo: this.row.orderNo },
+ });
},
outbound() {
if (this.selection.length === 0) {
return this.$message.error("璇烽�夋嫨鍗曟嵁鏄庣粏");
}
- const platformOptions = [{label:'绔欏彴2',value:'2-1'},{label:'绔欏彴3',value:'3-1'}];
- const mountNode = document.createElement('div');
+ const platformOptions = [
+ { label: "绔欏彴2", value: "2-1" },
+ { label: "绔欏彴3", value: "3-1" },
+ ];
+ const mountNode = document.createElement("div");
document.body.appendChild(mountNode);
- // 2. 琛ㄥ崟鏁版嵁锛堥粯璁ら�変腑绔欏彴3锛�
const formData = reactive({
- selectedPlatform: platformOptions[0].value // 榛樿缁戝畾銆岀珯鍙�3銆嶇殑value
+ selectedPlatform: platformOptions[0].value,
});
- // 3. 鍔ㄦ�佸垱寤哄脊绐楃粍浠�
- const vnode = createVNode(ElDialog, {
- title: '鍑哄簱鎿嶄綔 - 閫夋嫨鍑哄簱绔欏彴',
- width: '500px',
- modelValue: true,
- appendToBody: true,
- 'onUpdate:modelValue': (isVisible) => {
- if (!isVisible) {
- render(null, mountNode);
- document.body.removeChild(mountNode);
- }
- },
- style: {
- padding: '20px 0',
- borderRadius: '8px'
- }
- }, {
- default: () => h(ElForm, {
- model: formData,
- rules: {
- selectedPlatform: [
- { required: true, message: '璇烽�夋嫨鍑哄簱绔欏彴', trigger: 'change' }
- ]
+ const vnode = createVNode(
+ ElDialog,
+ {
+ title: "鍑哄簱鎿嶄綔 - 閫夋嫨鍑哄簱绔欏彴",
+ width: "500px",
+ modelValue: true,
+ appendToBody: true,
+ "onUpdate:modelValue": (isVisible) => {
+ if (!isVisible) {
+ render(null, mountNode);
+ document.body.removeChild(mountNode);
+ }
},
- ref: 'outboundForm',
- labelWidth: '100px',
style: {
- padding: '0 30px'
- }
- }, [
- // 鍑哄簱绔欏彴閫夋嫨椤癸紙鏍稿績琛ㄥ崟椤癸級
- h(ElFormItem, {
- label: '鍑哄簱绔欏彴',
- prop: 'selectedPlatform',
- style: {
- marginBottom: '24px'
- }
- }, [
- h(ElSelect, {
- placeholder: '璇烽�夋嫨鍑哄簱绔欏彴锛�3-12锛�',
- modelValue: formData.selectedPlatform,
- 'onUpdate:modelValue': (val) => {
- formData.selectedPlatform = val;
+ padding: "20px 0",
+ borderRadius: "8px",
+ },
+ },
+ {
+ default: () =>
+ h(
+ ElForm,
+ {
+ model: formData,
+ rules: {
+ selectedPlatform: [
+ { required: true, message: "璇烽�夋嫨鍑哄簱绔欏彴", trigger: "change" },
+ ],
+ },
+ ref: "outboundForm",
+ labelWidth: "100px",
+ style: {
+ padding: "0 30px",
+ },
},
- style: {
- width: '100%',
- height: '40px',
- borderRadius: '4px',
- borderColor: '#dcdfe6'
- }
- }, platformOptions.map(platform =>
- h(ElOption, { label: platform.label, value: platform.value })
- ))
- ]),
- // 搴曢儴鎸夐挳鍖�
- h('div', {
- style: {
- textAlign: 'right',
- marginTop: '8px',
- paddingRight: '4px'
- }
- }, [
- h(ElButton, {
- type: 'text',
- onClick: () => {
- render(null, mountNode);
- document.body.removeChild(mountNode);
- ElMessage.info('鍙栨秷鍑哄簱鎿嶄綔');
- },
- style: {
- marginRight: '8px',
- color: '#606266'
- }
- }, '鍙栨秷'),
- h(ElButton, {
- type: 'primary',
- onClick: async () => {
- const formRef = vnode.component.refs.outboundForm;
- try {
- // 琛ㄥ崟鏍¢獙
- await formRef.validate();
- } catch (err) {
- return;
- }
+ [
+ h(ElFormItem, {
+ label: "鍑哄簱绔欏彴",
+ prop: "selectedPlatform",
+ style: {
+ marginBottom: "24px",
+ },
+ }, [
+ h(ElSelect, {
+ placeholder: "璇烽�夋嫨鍑哄簱绔欏彴锛�3-12锛�",
+ modelValue: formData.selectedPlatform,
+ "onUpdate:modelValue": (val) => {
+ formData.selectedPlatform = val;
+ },
+ style: {
+ width: "100%",
+ height: "40px",
+ borderRadius: "4px",
+ borderColor: "#dcdfe6",
+ },
+ }, platformOptions.map((platform) =>
+ h(ElOption, { label: platform.label, value: platform.value })
+ )),
+ ]),
+ h("div", {
+ style: {
+ textAlign: "right",
+ marginTop: "8px",
+ paddingRight: "4px",
+ },
+ }, [
+ h(ElButton, {
+ type: "text",
+ onClick: () => {
+ render(null, mountNode);
+ document.body.removeChild(mountNode);
+ ElMessage.info("鍙栨秷鍑哄簱鎿嶄綔");
+ },
+ style: {
+ marginRight: "8px",
+ color: "#606266",
+ },
+ }, "鍙栨秷"),
+ h(ElButton, {
+ type: "primary",
+ onClick: async () => {
+ const formRef = vnode.component.refs.outboundForm;
+ try {
+ await formRef.validate();
+ } catch (err) {
+ return;
+ }
- // 4. 鏋勯�犺姹傚弬鏁帮紙閫変腑鍗曟嵁ID + 閫夋嫨鐨勫嚭搴撶珯鍙帮級
- const keys = this.selection.map((item) => item.id);
- const requestParams = {
- taskIds: keys,
- outboundPlatform: formData.selectedPlatform // 鍑哄簱绔欏彴
- };
+ const keys = this.selection.map((item) => item.id);
+ const requestParams = {
+ taskIds: keys,
+ outboundPlatform: formData.selectedPlatform,
+ };
- // 5. 璋冪敤鍑哄簱鎺ュ彛
- this.http
- .post("api/Task/GenerateOutboundTasks", requestParams, "鏁版嵁澶勭悊涓�")
- .then((x) => {
- if (!x.status) return ElMessage.error(x.message);
-
- ElMessage.success("鎿嶄綔鎴愬姛");
- this.showDetialBox = false; // 鍏抽棴璇︽儏妗�
- this.$emit("parentCall", ($vue) => {
- $vue.getData(); // 閫氱煡鐖剁粍浠跺埛鏂�
- });
- // 鍏抽棴寮圭獥
- render(null, mountNode);
- document.body.removeChild(mountNode);
- })
- .catch(() => {
- ElMessage.error('璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯');
- });
- },
- style: {
- borderRadius: '4px',
- padding: '8px 20px'
- }
- }, '纭畾鍑哄簱')
- ])
- ])
- });
+ this.http
+ .post(
+ "api/Task/GenerateOutboundTasks",
+ requestParams,
+ "鏁版嵁澶勭悊涓�"
+ )
+ .then((x) => {
+ if (!x.status) return ElMessage.error(x.message);
+ ElMessage.success("鎿嶄綔鎴愬姛");
+ this.showDetialBox = false;
+ this.$emit("parentCall", ($vue) => {
+ $vue.getData();
+ });
+ render(null, mountNode);
+ document.body.removeChild(mountNode);
+ })
+ .catch(() => {
+ ElMessage.error("璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯");
+ });
+ },
+ style: {
+ borderRadius: "4px",
+ padding: "8px 20px",
+ },
+ }, "纭畾鍑哄簱"),
+ ]),
+ ]),
+ }
+ );
- // 缁戝畾app涓婁笅鏂囷紝纭繚El缁勪欢姝e父宸ヤ綔
vnode.appContext = this.$.appContext;
render(vnode, mountNode);
},
outboundbatch() {
- if (this.selection.length === 0) {
- return this.$message.error("璇烽�夋嫨鍗曟嵁鏄庣粏");
- }
- if (this.selection.length>1) {
- return this.$message.error("鍙兘閫夋嫨涓�鏉″崟鎹槑缁嗚繘琛屽垎鎵瑰嚭搴�");
- }
- const platformOptions = [{label:'绔欏彴2',value:'2-1'},{label:'绔欏彴3',value:'3-1'}];
- const mountNode = document.createElement('div');
- document.body.appendChild(mountNode);
-
- // 2. 琛ㄥ崟鏁版嵁锛堥粯璁ら�変腑绔欏彴3锛屾柊澧炲皬鏁板瓧娈碉級
- const formData = reactive({
- selectedPlatform: platformOptions[0].value, // 榛樿缁戝畾銆岀珯鍙�3銆嶇殑value
- outboundDecimal: '' // 鏂板锛氬皬鏁拌緭鍏ユ瀛楁
- });
-
- // 3. 鍔ㄦ�佸垱寤哄脊绐楃粍浠�
- const vnode = createVNode(ElDialog, {
- title: '鍑哄簱鎿嶄綔 - 閫夋嫨鍑哄簱绔欏彴',
- width: '500px',
- modelValue: true,
- appendToBody: true,
- 'onUpdate:modelValue': (isVisible) => {
- if (!isVisible) {
- render(null, mountNode);
- document.body.removeChild(mountNode);
+ if (this.selection.length === 0) {
+ return this.$message.error("璇烽�夋嫨鍗曟嵁鏄庣粏");
}
- },
- style: {
- padding: '20px 0',
- borderRadius: '8px'
- }
- }, {
- default: () => h(ElForm, {
- model: formData,
- rules: {
- selectedPlatform: [
- { required: true, message: '璇烽�夋嫨鍑哄簱绔欏彴', trigger: 'change' }
- ],
- // 鏂板锛氬皬鏁板瓧娈甸獙璇佽鍒欙紙蹇呭~ + 鏈夋晥灏忔暟鏍煎紡锛�
- outboundDecimal: [
- { required: true, message: '璇疯緭鍏ュ皬鏁版暟鍊�', trigger: 'blur' },
- {
- validator: (rule, value, callback) => {
- // 楠岃瘉瑙勫垯锛氭鏁般�佹敮鎸佸皬鏁扮偣鍚庢渶澶�2浣嶏紙鍙牴鎹渶姹傝皟鏁村皬鏁颁綅鏁帮級
- const decimalReg = /^(([1-9]\d*)|0)(\.\d{1,2})?$/;
- if (value && !decimalReg.test(value)) {
- callback(new Error('璇疯緭鍏ユ湁鏁堢殑灏忔暟锛堟鏁帮紝鏈�澶�2浣嶅皬鏁帮級'));
- } else {
- callback();
- }
- },
- trigger: 'blur'
- }
- ]
- },
- ref: 'outboundForm',
- labelWidth: '100px',
- style: {
- padding: '0 30px'
+ if (this.selection.length > 1) {
+ return this.$message.error("鍙兘閫夋嫨涓�鏉″崟鎹槑缁嗚繘琛屽垎鎵瑰嚭搴�");
}
- }, [
- // 鍑哄簱绔欏彴閫夋嫨椤癸紙鏍稿績琛ㄥ崟椤癸級
- h(ElFormItem, {
- label: '鍑哄簱绔欏彴',
- prop: 'selectedPlatform',
- style: {
- marginBottom: '24px'
- }
- }, [
- h(ElSelect, {
- placeholder: '璇烽�夋嫨鍑哄簱绔欏彴锛�3-12锛�',
- modelValue: formData.selectedPlatform,
- 'onUpdate:modelValue': (val) => {
- formData.selectedPlatform = val;
- },
- style: {
- width: '100%',
- height: '40px',
- borderRadius: '4px',
- borderColor: '#dcdfe6'
- }
- }, platformOptions.map(platform =>
- h(ElOption, { label: platform.label, value: platform.value })
- ))
- ]),
- // 鏂板锛氬皬鏁拌緭鍏ユ琛ㄥ崟椤�
- h(ElFormItem, {
- label: '鍑哄簱鏁�', // 鍙牴鎹笟鍔¢渶姹備慨鏀规爣绛惧悕锛堝鈥滃嚭搴撴暟閲忊�濃�滈噸閲忊�濈瓑锛�
- prop: 'outboundDecimal',
- style: {
- marginBottom: '24px'
- }
- }, [
- h(ElInput, {
- type: 'number', // 鏁板瓧绫诲瀷锛屽師鐢熸敮鎸佸皬鏁拌緭鍏�
- placeholder: '璇疯緭鍏ュ皬鏁版暟鍊硷紙鏈�澶�2浣嶅皬鏁帮級',
- modelValue: formData.outboundDecimal,
- 'onUpdate:modelValue': (val) => {
- formData.outboundDecimal = val;
- },
- style: {
- width: '100%',
- height: '40px',
- borderRadius: '4px',
- borderColor: '#dcdfe6'
- },
- step: '0.01', // 姝ラ暱0.01锛岀偣鍑讳笂涓嬬澶存椂鎸�0.01澧炲噺
- precision: 2, // 闄愬埗鏈�澶氳緭鍏�2浣嶅皬鏁帮紙Element Plus灞炴�э級
- min: 0.01, // 鍙�夛細闄愬埗鏈�灏忓�间负0.01锛岄伩鍏嶈緭鍏�0鎴栬礋鏁�
- })
- ]),
- // 搴曢儴鎸夐挳鍖�
- h('div', {
- style: {
- textAlign: 'right',
- marginTop: '8px',
- paddingRight: '4px'
- }
- }, [
- h(ElButton, {
- type: 'text',
- onClick: () => {
- render(null, mountNode);
- document.body.removeChild(mountNode);
- ElMessage.info('鍙栨秷鍒嗘壒鍑哄簱鎿嶄綔');
- },
- style: {
- marginRight: '8px',
- color: '#606266'
- }
- }, '鍙栨秷'),
- h(ElButton, {
- type: 'primary',
- onClick: async () => {
- const formRef = vnode.component.refs.outboundForm;
- try {
- // 琛ㄥ崟鏍¢獙锛堜細鍚屾椂鏍¢獙鍑哄簱绔欏彴鍜屽皬鏁板瓧娈碉級
- await formRef.validate();
- } catch (err) {
- return;
+ const platformOptions = [
+ { label: "绔欏彴2", value: "2-1" },
+ { label: "绔欏彴3", value: "3-1" },
+ ];
+ const mountNode = document.createElement("div");
+ document.body.appendChild(mountNode);
+
+ const formData = reactive({
+ selectedPlatform: platformOptions[0].value,
+ outboundDecimal: "",
+ });
+
+ const vnode = createVNode(
+ ElDialog,
+ {
+ title: "鍑哄簱鎿嶄綔 - 閫夋嫨鍑哄簱绔欏彴",
+ width: "500px",
+ modelValue: true,
+ appendToBody: true,
+ "onUpdate:modelValue": (isVisible) => {
+ if (!isVisible) {
+ render(null, mountNode);
+ document.body.removeChild(mountNode);
}
-console.log(this.selection);
- // 4. 鏋勯�犺姹傚弬鏁帮紙鏂板灏忔暟瀛楁锛�
- const keys = this.selection.map((item) => item.id);
- const requestParams = {
- orderDetailId: keys[0], // 鍒嗘壒鍑哄簱浠呮敮鎸佸崟鏉℃槑缁�
- outboundPlatform: formData.selectedPlatform, // 鍑哄簱绔欏彴
- batchQuantity: formData.outboundDecimal // 鏂板锛氬皬鏁板瓧娈典紶缁欏悗绔�
- };
-
- // 5. 璋冪敤鍑哄簱鎺ュ彛
- this.http
- .post("api/Task/GenerateOutboundBatchTasks", requestParams, "鏁版嵁澶勭悊涓�")
- .then((x) => {
- if (!x.status) return ElMessage.error(x.message);
-
- ElMessage.success("鎿嶄綔鎴愬姛");
- this.showDetialBox = false; // 鍏抽棴璇︽儏妗�
- this.$emit("parentCall", ($vue) => {
- $vue.getData(); // 閫氱煡鐖剁粍浠跺埛鏂�
- });
- // 鍏抽棴寮圭獥
- render(null, mountNode);
- document.body.removeChild(mountNode);
- })
- .catch(() => {
- ElMessage.error('璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯');
- });
},
style: {
- borderRadius: '4px',
- padding: '8px 20px'
- }
- }, '纭畾鍒嗘壒鍑哄簱')
- ])
- ])
- });
+ padding: "20px 0",
+ borderRadius: "8px",
+ },
+ },
+ {
+ default: () =>
+ h(
+ ElForm,
+ {
+ model: formData,
+ rules: {
+ selectedPlatform: [
+ { required: true, message: "璇烽�夋嫨鍑哄簱绔欏彴", trigger: "change" },
+ ],
+ outboundDecimal: [
+ { required: true, message: "璇疯緭鍏ュ皬鏁版暟鍊�", trigger: "blur" },
+ {
+ validator: (rule, value, callback) => {
+ const decimalReg = /^(([1-9]\d*)|0)(\.\d{1,2})?$/;
+ if (value && !decimalReg.test(value)) {
+ callback(new Error("璇疯緭鍏ユ湁鏁堢殑灏忔暟锛堟鏁帮紝鏈�澶�2浣嶅皬鏁帮級"));
+ } else {
+ callback();
+ }
+ },
+ trigger: "blur",
+ },
+ ],
+ },
+ ref: "outboundForm",
+ labelWidth: "100px",
+ style: {
+ padding: "0 30px",
+ },
+ },
+ [
+ h(ElFormItem, {
+ label: "鍑哄簱绔欏彴",
+ prop: "selectedPlatform",
+ style: {
+ marginBottom: "24px",
+ },
+ }, [
+ h(ElSelect, {
+ placeholder: "璇烽�夋嫨鍑哄簱绔欏彴锛�3-12锛�",
+ modelValue: formData.selectedPlatform,
+ "onUpdate:modelValue": (val) => {
+ formData.selectedPlatform = val;
+ },
+ style: {
+ width: "100%",
+ height: "40px",
+ borderRadius: "4px",
+ borderColor: "#dcdfe6",
+ },
+ }, platformOptions.map((platform) =>
+ h(ElOption, { label: platform.label, value: platform.value })
+ )),
+ ]),
+ h(ElFormItem, {
+ label: "鍑哄簱鏁�",
+ prop: "outboundDecimal",
+ style: {
+ marginBottom: "24px",
+ },
+ }, [
+ h(ElInput, {
+ type: "number",
+ placeholder: "璇疯緭鍏ュ皬鏁版暟鍊硷紙鏈�澶�2浣嶅皬鏁帮級",
+ modelValue: formData.outboundDecimal,
+ "onUpdate:modelValue": (val) => {
+ formData.outboundDecimal = val;
+ },
+ style: {
+ width: "100%",
+ height: "40px",
+ borderRadius: "4px",
+ borderColor: "#dcdfe6",
+ },
+ step: "0.01",
+ precision: 2,
+ min: 0.01,
+ }),
+ ]),
+ h("div", {
+ style: {
+ textAlign: "right",
+ marginTop: "8px",
+ paddingRight: "4px",
+ },
+ }, [
+ h(ElButton, {
+ type: "text",
+ onClick: () => {
+ render(null, mountNode);
+ document.body.removeChild(mountNode);
+ ElMessage.info("鍙栨秷鍒嗘壒鍑哄簱鎿嶄綔");
+ },
+ style: {
+ marginRight: "8px",
+ color: "#606266",
+ },
+ }, "鍙栨秷"),
+ h(ElButton, {
+ type: "primary",
+ onClick: async () => {
+ const formRef = vnode.component.refs.outboundForm;
+ try {
+ await formRef.validate();
+ } catch (err) {
+ return;
+ }
- // 缁戝畾app涓婁笅鏂囷紝纭繚El缁勪欢姝e父宸ヤ綔
- vnode.appContext = this.$.appContext;
- render(vnode, mountNode);
-},
-
+ const keys = this.selection.map((item) => item.id);
+ const requestParams = {
+ orderDetailId: keys[0],
+ outboundPlatform: formData.selectedPlatform,
+ batchQuantity: formData.outboundDecimal,
+ };
+ this.http
+ .post(
+ "api/Task/GenerateOutboundBatchTasks",
+ requestParams,
+ "鏁版嵁澶勭悊涓�"
+ )
+ .then((x) => {
+ if (!x.status) return ElMessage.error(x.message);
+ ElMessage.success("鎿嶄綔鎴愬姛");
+ this.showDetialBox = false;
+ this.$emit("parentCall", ($vue) => {
+ $vue.getData();
+ });
+ render(null, mountNode);
+ document.body.removeChild(mountNode);
+ })
+ .catch(() => {
+ ElMessage.error("璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯");
+ });
+ },
+ style: {
+ borderRadius: "4px",
+ padding: "8px 20px",
+ },
+ }, "纭畾鍒嗘壒鍑哄簱"),
+ ]),
+ ]),
+ }
+ );
+
+ vnode.appContext = this.$.appContext;
+ render(vnode, mountNode);
+ },
setCurrent(row) {
this.$refs.singleTable.setCurrentRow(row);
},
@@ -748,7 +773,6 @@
var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey);
if (item) {
var dicItem = item.data.find((x) => x.key == row[column.prop]);
- console.log(dicItem);
if (dicItem) {
return dicItem.value;
} else {
@@ -758,10 +782,12 @@
return row[column.prop];
}
}
+ return row[column.prop];
},
},
};
</script>
+
<style scoped>
.text-button {
border: 0px;
@@ -779,12 +805,10 @@
.box-table .el-table tbody tr:hover > td {
background-color: #d8e0d4 !important;
- /* color: #ffffff; */
}
.box-table .el-table tbody tr.current-row > td {
background-color: #f0f9eb !important;
- /* color: #ffffff; */
}
.el-table .success-row {
@@ -794,4 +818,4 @@
.box-table .el-table {
border: 1px solid #ebeef5;
}
-</style>
+</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/outbound/outboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js"
index 65bb4dd..a649213 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"
@@ -381,6 +381,7 @@
//this.detailOptions.columns.forEach(column=>{ });
},
searchBefore(param) {
+
//鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
//杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
return true;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/stock/stockView.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/stock/stockView.js"
index 6e73be0..c58c825 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/stock/stockView.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/stock/stockView.js"
@@ -93,28 +93,42 @@
column.formatter = (row) => {
// 鏍¢獙details鏄惁瀛樺湪涓旀湁鏁版嵁
if (row.details && row.details.length > 0) {
- // 鎸塵aterielCode鍒嗙粍缁熻stockQuantity鎬诲拰锛屽苟璁板綍鍗曚綅锛堝彇绗竴涓潪绌哄崟浣嶏級
- const materielSumMap = row.details.reduce((acc, item) => {
- const materielCode = item.materielCode || '鏈煡鐗╂枡';
+ // 鎸塨arcode + supplyCode + BatchNo 缁勫悎缁村害鍒嗙粍缁熻stockQuantity鎬诲拰锛屽苟璁板綍鍗曚綅锛堝彇绗竴涓潪绌哄崟浣嶏級
+ const groupSumMap = row.details.reduce((acc, item) => {
+ // 鑾峰彇鍒嗙粍鍏抽敭瀛楁锛屼负绌烘椂璧嬩簣榛樿鍊�
+ const supplyCode = item.supplyCode || '鏈煡渚涘簲鍟嗙紪鐮�';
+ const batchNo = item.batchNo || '鏈煡鎵规鍙�';
+ const materielCode = item.materielCode || '鏈煡鐗╂枡'; // 淇濈暀鍘熸湁鐗╂枡缂栫爜
const quantity = Number(item.stockQuantity) || 0;
const unit = item.unit || ''; // 鑾峰彇鍗曚綅锛屾棤鍒欎负绌�
- // 绱姞鏁伴噺
- acc[materielCode] = {
- total: (acc[materielCode]?.total || 0) + quantity,
- unit: acc[materielCode]?.unit || unit // 淇濈暀绗竴涓潪绌哄崟浣�
+ // 缁勫悎鍒嗙粍閿紙鍙牴鎹渶瑕佽皟鏁存樉绀烘牸寮忥級
+ const groupKey = `${supplyCode}|${batchNo}|${materielCode}`;
+
+ // 绱姞鏁伴噺锛屼繚鐣欑涓�涓潪绌哄崟浣�
+ acc[groupKey] = {
+ total: (acc[groupKey]?.total || 0) + quantity,
+ unit: acc[groupKey]?.unit || unit,
+ supplyCode,
+ batchNo,
+ materielCode
};
return acc;
}, {});
- // 姣忎釜鐗╂枡椤圭敓鎴愮嫭绔媎iv锛岃法琛屾樉绀猴紙鍖呭惈鍗曚綅锛�
- const displayItems = Object.entries(materielSumMap).map(([code, data]) => {
+ // 姣忎釜鍒嗙粍椤圭敓鎴愮嫭绔媎iv锛岃法琛屾樉绀猴紙鍖呭惈鎵�鏈夊垎缁勭淮搴﹀拰鍗曚綅锛�
+ const displayItems = Object.entries(groupSumMap).map(([_, data]) => {
// 澶勭悊鍗曚綅鏄剧ず锛氭湁鍗曚綅鍒欏姞绌烘牸鏄剧ず锛屾棤鍒欎笉鏄剧ず
const unitText = data.unit ? ` ${data.unit}` : '';
- return `<div style="line-height: 1.5; white-space: normal;">${code}锛�${data.total}${unitText}</div>`;
+
+ // 缁勮鏄剧ず鏂囨湰锛堝彲鏍规嵁闇�姹傝皟鏁村瓧娈垫樉绀洪『搴忓拰鏍煎紡锛�
+ return `<div style="line-height: 1.5; white-space: normal; margin-bottom: 4px;">
+ 渚涘簲鍟嗙紪鐮侊細${data.supplyCode} | 鎵规鍙凤細${data.batchNo} | 鐗╂枡缂栫爜锛�${data.materielCode}锛�${data.total}${unitText}
+ </div>`;
});
+
const displayContent = displayItems.join('');
- return `<div style="color: #F56C6C; white-space: normal; word-break: break-all;">${displayContent}</div>`;
+ return `<div style="color: #716cf5ff; white-space: normal; word-break: break-all;">${displayContent}</div>`;
} else {
return '<span style="color: #F56C6C">绌虹</span>';
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/Dt_AllocateOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/Dt_AllocateOrder.vue"
index 74bdf7a..ccad4ca 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/Dt_AllocateOrder.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/inbound/Dt_AllocateOrder.vue"
@@ -202,7 +202,6 @@
type: "string",
width: 120,
align: "left",
- link: true,
},
{
field: "upperOrderNo",
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 f4bdcb2..10582cf 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"
@@ -87,15 +87,14 @@
});
const searchFormOptions = ref([
[
- { title: "鍗曟嵁缂栧彿", field: "inboundOrderNo", type: "like" },
+ { title: "鎵弿鍗曟嵁缂栧彿鎴栨潯鐮�", field: "inboundOrderNo", type: "like" },
{ title: "涓婃父鍗曟嵁缂栧彿", field: "upperOrderNo", type: "like" },
{
- title: "鍗曟嵁绫诲瀷",
- field: "orderType",
+ title: "涓氬姟绫诲瀷",
+ field: "businessType",
type: "select",
- dataKey: "inOrderType",
- data: [0],
- hidden:true
+ dataKey: "documentTypeEmun",
+ data: [],
},
{
title: "鍗曟嵁鐘舵��",
@@ -184,6 +183,19 @@
bind: { key: "createType", data: [] },
},
{
+ field: "remark",
+ title: "澶囨敞",
+ type: "string",
+ width: 180,
+ align: "left"
+ },
+ {
+ field: "returnToMESStatus",
+ title: "鍥炰紶MES鐘舵��",
+ width: 120,
+ bind: { key: "createType", data:[{key:0, value:"鏈洖浼�"},{key:1, value:"宸插洖浼犳垚鍔�"},{key:2, value:"鍥炰紶澶辫触"}]},
+ },
+ {
field: "factoryArea",
title: "鍘傚尯",
type: "string",
@@ -216,13 +228,6 @@
title: "淇敼鏃堕棿",
type: "datetime",
width: 160,
- align: "left",
- },
- {
- field: "remark",
- title: "澶囨敞",
- type: "string",
- width: 100,
align: "left",
},
]);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
index 3e16cc5..99010c3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
@@ -124,12 +124,11 @@
{ title: "鍗曟嵁缂栧彿", field: "orderNo", type: "like" },
{ title: "涓婃父鍗曟嵁缂栧彿", field: "upperOrderNo", type: "like" },
{
- title: "鍗曟嵁绫诲瀷",
- field: "orderType",
+ title: "涓氬姟绫诲瀷",
+ field: "businessType",
type: "select",
- dataKey: "outOrderType",
+ dataKey: "documentTypeEmun",
data: [],
- hidden:true
},
{
title: "鍗曟嵁鐘舵��",
@@ -210,6 +209,19 @@
bind: { key: "createType", data: [] },
},
{
+ field: "remark",
+ title: "澶囨敞",
+ type: "string",
+ width: 180,
+ align: "left"
+ },
+ {
+ field: "returnToMESStatus",
+ title: "鍥炰紶MES鐘舵��",
+ width: 120,
+ bind: { key: "createType", data:[{key:0, value:"鏈洖浼�"},{key:1, value:"宸插洖浼犳垚鍔�"},{key:2, value:"鍥炰紶澶辫触"}]},
+ },
+ {
field: "factoryArea",
title: "鍘傚尯",
type: "string",
@@ -264,13 +276,6 @@
title: "淇敼鏃堕棿",
type: "datetime",
width: 160,
- align: "left",
- },
- {
- field: "remark",
- title: "澶囨敞",
- type: "string",
- width: 100,
align: "left",
},
]);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetailByMaterielSum.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetailByMaterielSum.vue"
index 2b97cf8..8db255e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetailByMaterielSum.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetailByMaterielSum.vue"
@@ -59,14 +59,17 @@
const searchFormFields = ref({
materielCode: "",
materielName: "",
- orderNo: "",
+ batchNo: "",
+ supplyCode:"",
+ warehouseCode:""
});
const searchFormOptions = ref([
[
{ title: "鐗╂枡缂栧彿", field: "materielCode" ,type:'like'},
{ title: "鐗╂枡鍚嶇О", field: "materielName" ,type:'like'},
- { title: "鍗曟嵁缂栧彿", field: "orderNo" ,type:'like'},
- { title: "鎵樼洏鍙�", field: "palletCode" ,type:'like'},
+ { title: "鎵规鍙�", field: "batchNo" ,type:'like'},
+ { title: "渚涘簲鍟嗙紪鍙�", field: "supplyCode" ,type:'like'},
+ { title: "浠撳簱鍙�", field: "warehouseCode" ,type:'like'},
],
]);
const columns = ref([
@@ -121,57 +124,7 @@
type: "string",
width: 200,
align: "left",
- },
- {
- field: "outboundQuantity",
- title: "鍑哄簱鏁伴噺",
- type: "string",
- width: 180,
- align: "left",
- },
- {
- field: "status",
- title: "搴撳瓨鏄庣粏鐘舵��",
- type: "string",
- width: 120,
- align: "left",
- bind: { key: "stockStatusEmun", data: [] },
- },
- {
- field: "creater",
- title: "鍒涘缓浜�",
- type: "string",
- width: 90,
- align: "left",
- },
- {
- field: "createDate",
- title: "鍒涘缓鏃堕棿",
- type: "datetime",
- width: 160,
- align: "left",
- },
- {
- field: "modifier",
- title: "淇敼浜�",
- type: "string",
- width: 100,
- align: "left",
- },
- {
- field: "modifyDate",
- title: "淇敼鏃堕棿",
- type: "datetime",
- width: 160,
- align: "left",
- },
- {
- field: "remark",
- title: "澶囨敞",
- type: "string",
- width: 100,
- align: "left",
- },
+ }
]);
const detail = ref({
cnName: "#detailCnName",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockView.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockView.vue"
index 2b25f87..f208fc2 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockView.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockView.vue"
@@ -44,7 +44,14 @@
[
{ title: "鐗╂枡缂栧彿", field: "materielCode",type: "like"},
{ title: "鎵规鍙�", field: "batchNo",type: "like"},
- { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],},
+ { title: "鎵�灞炰粨搴�", field: "locationType",type: "select",dataKey: "locationType",data: [],},
+ { title: "鎵�鍚潯鐮�", field: "barcode",type: "like"},
+ ],
+ [
+ { title: "渚涘簲鍟嗙紪鍙�", field: "supplyCode",type: "like"},
+ { title: "鎵�鍚崟鎹紪鍙�", field: "orderNo",type: "like"},
+ { title: "搴撳瓨鍒涘缓鏃堕棿", field: "createDate",type: "datetime"},
+
],
]);
const columns = ref([
@@ -59,6 +66,14 @@
align: "left",
},
{
+ field: "locationType",
+ title: "鎵�灞炰粨搴�",
+ type: "string",
+ width: 150,
+ align: "left",
+ bind: { key: "locationType", data: [] },
+ },
+ {
field: "palletCode",
title: "鎵樼洏缂栧彿",
type: "string",
@@ -70,14 +85,14 @@
field: "locationCode",
title: "璐т綅缂栧彿",
type: "string",
- width: 200,
+ width: 150,
align: "left",
},
{
field: "locationName",
title: "璐т綅鍚嶇О",
type: "string",
- width: 150,
+ width: 120,
align: "left",
},
@@ -93,7 +108,7 @@
field: "orderStatistics",
title: "鎵�鍚墿鏂欐槑缁�",
type: "string",
- width: 240,
+ width: 630,
align: "left",
},
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/taskinfo/task.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
index f8fed3d..a246cdf 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
@@ -48,7 +48,7 @@
{ title: "鍒涘缓浜�", field: "creater", type: "like" },
],
[
- { title: "浠诲姟绫诲瀷",field: "taskType",type: "selectList",dataKey: "taskType",data: [],},
+ //{ title: "浠诲姟绫诲瀷",field: "taskType",type: "selectList",dataKey: "taskType",data: [],},
{ title: "浠诲姟鐘舵��",field: "taskStatus",type: "selectList",dataKey: "taskStatusEnum",data: [],},
{ title: "宸烽亾鍙�", field: "roadway", type: "like" },
],
@@ -90,14 +90,14 @@
width: 120,
align: "left",
},
- {
- field: "taskType",
- title: "浠诲姟绫诲瀷",
- type: "int",
- width: 120,
- align: "left",
- bind: { key: "taskType", data: [] },
- },
+ // {
+ // field: "taskType",
+ // title: "浠诲姟绫诲瀷",
+ // type: "int",
+ // width: 120,
+ // align: "left",
+ // bind: { key: "taskType", data: [] },
+ // },
{
field: "taskStatus",
title: "浠诲姟鐘舵��",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
index c0ade98..dab85d1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
@@ -48,7 +48,7 @@
{ title: "鍒涘缓浜�", field: "creater", type: "like" },
],
[
- { title: "浠诲姟绫诲瀷",field: "taskType",type: "selectList",dataKey: "taskType",data: [],},
+ //{ title: "浠诲姟绫诲瀷",field: "taskType",type: "selectList",dataKey: "taskType",data: [],},
{ title: "浠诲姟鐘舵��",field: "taskStatus",type: "selectList",dataKey: "taskStatusEnum",data: [],},
{ title: "宸烽亾鍙�", field: "roadway", type: "like" },
],
@@ -90,14 +90,14 @@
width: 120,
align: "left",
},
- {
- field: "taskType",
- title: "浠诲姟绫诲瀷",
- type: "int",
- width: 120,
- align: "left",
- bind: { key: "taskType", data: [] },
- },
+ // {
+ // field: "taskType",
+ // title: "浠诲姟绫诲瀷",
+ // type: "int",
+ // width: 120,
+ // align: "left",
+ // bind: { key: "taskType", data: [] },
+ // },
{
field: "taskStatus",
title: "浠诲姟鐘舵��",
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_AllocateService/AllocateDetailService.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_AllocateService/AllocateDetailService.cs"
index cd2b75e..3130d90 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_AllocateService/AllocateDetailService.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_AllocateService/AllocateDetailService.cs"
@@ -71,16 +71,22 @@
//}
//return new PageGridData<Dt_AllocateOrderDetail>(totalCount, data);
- Dt_AllocateOrder allocateOrder = _allocateOrderRepository.QueryFirst(x => x.Id == options.Filter.FirstOrDefault().Value.ObjToInt());
- Dt_OutboundOrder _InboundOrder = SqlSugarHelper.DbWMS.Queryable<Dt_OutboundOrder>().Where(x => x.UpperOrderNo == allocateOrder.UpperOrderNo).First();
+ try
+ {
+ Dt_AllocateOrder allocateOrder = _allocateOrderRepository.QueryFirst(x => x.Id == options.Filter.FirstOrDefault().Value.ObjToInt());
+ Dt_OutboundOrder _InboundOrder = SqlSugarHelper.DbWMS.Queryable<Dt_OutboundOrder>().Where(x => x.UpperOrderNo == allocateOrder.UpperOrderNo).First();
+ var Id = _InboundOrder == null ? 0 : _InboundOrder.Id;
+ var data = BaseDal.Db.Queryable<Dt_OutboundOrderDetail>()
+ .Where(x => x.OrderId == Id)
+ .OrderBy(orderByModels)
+ .ToPageList(options.Page, options.Rows, ref totalCount);
- var data = BaseDal.Db.Queryable<Dt_OutboundOrderDetail>()
- .WhereIF(!_InboundOrder.IsNullOrEmpty(), x => x.OrderId == _InboundOrder.Id)
- .OrderBy(orderByModels)
- .ToPageList(options.Page, options.Rows, ref totalCount);
-
-
- return new PageGridData<Dt_OutboundOrderDetail>(totalCount, data);
+ return new PageGridData<Dt_OutboundOrderDetail>(totalCount, data);
+ }
+ catch(Exception ex)
+ {
+ throw new Exception("鏃犳槑缁�");
+ }
}
}
}
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_AllocateService/AllocateService.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_AllocateService/AllocateService.cs"
index 8759a0b..c44b258 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_AllocateService/AllocateService.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_AllocateService/AllocateService.cs"
@@ -539,10 +539,10 @@
Dt_AllocateOrder allocateOrder = _allocateOrderRepository.QueryFirst(x => x.Id == (int)options.Value);
Dt_InboundOrder _InboundOrder = SqlSugarHelper.DbWMS.Queryable<Dt_InboundOrder>().Where(x => x.UpperOrderNo == allocateOrder.UpperOrderNo).First();
-
+ var Id = _InboundOrder == null ? 0 : _InboundOrder.Id;
var data = BaseDal.Db.Queryable<Dt_InboundOrderDetail>()
.WhereIF(!wheres.IsNullOrEmpty(), wheres)
- .WhereIF(!_InboundOrder.IsNullOrEmpty(), x => x.OrderId == _InboundOrder.Id)
+ .Where( x => x.OrderId == Id)
.OrderBy(orderByModels)
.ToPageList(options.Page, options.Rows, ref totalCount);
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_Common/OrderEnum/OutboundOrderEnum.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_Common/OrderEnum/OutboundOrderEnum.cs"
index 805fb4f..166fc78 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_Common/OrderEnum/OutboundOrderEnum.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_Common/OrderEnum/OutboundOrderEnum.cs"
@@ -52,6 +52,11 @@
public enum OutOrderTypeEnum
{
/// <summary>
+ /// 璋冩嫧鍑哄簱鍗�
+ /// </summary>
+ [Description("璋冩嫧鍑哄簱鍗�")]
+ InternalAllocat = 117,
+ /// <summary>
/// 鐢熶骇杩斿伐鍗�
/// </summary>
[Description("鐢熶骇杩斿伐鍗�")]
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/OutboundOrderService.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/OutboundOrderService.cs"
index 63fed46..a1ce7f9 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/OutboundOrderService.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/OutboundOrderService.cs"
@@ -3,7 +3,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using SqlSugar;
-using SqlSugar.Extensions;
+using WIDESEA_Common.AllocateEnum;
using WIDESEA_Common.OrderEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
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"
index e7308e9..44be98d 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/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"
@@ -50,24 +50,31 @@
}
}
{
- SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfo.WarehouseId).FirstLetterToLower());
+ SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfoDetail.WarehouseCode).FirstLetterToLower());
if (searchParameters != null)
{
- sugarQueryable = sugarQueryable.Where(x => x.WarehouseId.Equals(searchParameters.Value));
- }
- }
- {
- SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfo.StockStatus).FirstLetterToLower());
- if (searchParameters != null)
- {
- sugarQueryable = sugarQueryable.Where(x => x.StockStatus.Equals(searchParameters.Value));
+ sugarQueryable1 = sugarQueryable1.Where(x => x.WarehouseCode.Contains(searchParameters.Value));
}
}
{
SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfoDetail.MaterielName).FirstLetterToLower());
if (searchParameters != null)
{
- sugarQueryable1 = sugarQueryable1.Where(x => x.MaterielName.Contains(searchParameters.Value));
+ sugarQueryable1 = sugarQueryable1.Where(x => x.MaterielName.Equals(searchParameters.Value));
+ }
+ }
+ {
+ SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfoDetail.BatchNo).FirstLetterToLower());
+ if (searchParameters != null)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.BatchNo.Equals(searchParameters.Value));
+ }
+ }
+ {
+ SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfoDetail.SupplyCode).FirstLetterToLower());
+ if (searchParameters != null)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.SupplyCode.Contains(searchParameters.Value));
}
}
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 98cd527..c2eac42 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"
@@ -31,6 +31,7 @@
try
{
ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>().Includes(x => x.Details);
+ ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>();
if (!string.IsNullOrEmpty(options.Wheres))
{
try
@@ -56,12 +57,33 @@
.Where(x => x.Details.Any(v => v.BatchNo.Contains(param.Value.ToString())));
}
break;
-
- case var name when name == nameof(Dt_StockInfo.LocationCode).FirstLetterToLower():
+ case var name when name == nameof(Dt_StockInfoDetail.SupplyCode).FirstLetterToLower():
if (!string.IsNullOrEmpty(param.Value?.ToString()))
{
sugarQueryable1 = sugarQueryable1
- .Where(x => x.LocationCode == param.Value.ToString());
+ .Where(x => x.Details.Any(v => v.SupplyCode.Contains(param.Value.ToString())));
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfoDetail.Barcode).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.Details.Any(v => v.Barcode.Contains(param.Value.ToString())));
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfoDetail.OrderNo).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.Details.Any(v => v.OrderNo.Contains(param.Value.ToString())));
+ }
+ break;
+
+ case var name when name == nameof(Dt_LocationInfo.LocationStatus).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable = sugarQueryable
+ .Where(x => x.LocationStatus == param.Value.ObjToInt());
}
break;
case var name when name == nameof(Dt_StockInfo.CreateDate).FirstLetterToLower():
@@ -87,7 +109,7 @@
}
}
EntityProperties.ValidatePageOptions(options, ref sugarQueryable1);
- ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>();
+
ISugarQueryable<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).Select((b, a) => new StockViewDTO
{
LocationCode = b.LocationCode,
@@ -100,7 +122,7 @@
Layer = a.Layer,
LocationName = a.LocationName,
LocationStatus = a.LocationStatus,
- LocationType = a.LocationType,
+ LocationType = b.LocationType,
Modifier = b.Modifier,
ModifyDate = b.ModifyDate,
PalletCode = b.PalletCode,
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_SystemService/Sys_DictionaryService.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_SystemService/Sys_DictionaryService.cs"
index 9fde9bf..3e3aea1 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_SystemService/Sys_DictionaryService.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_SystemService/Sys_DictionaryService.cs"
@@ -270,6 +270,31 @@
result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
}
break;
+
+ case "documentTypeEmun":
+ {
+ List<object> data = new List<object>();
+ Type type = typeof(DocumentType);
+ List<int> enums = Enum.GetValues(typeof(DocumentType)).Cast<int>().ToList();
+ int index = 0;
+ foreach (var item in enums)
+ {
+ FieldInfo? fieldInfo = typeof(DocumentType).GetField(((DocumentType)item).ToString());
+ DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
+ if (description != null)
+ {
+ data.Add(new { key = item.ToString(), value = description.Description });
+ }
+ else
+ {
+ data.Add(new { key = item.ToString(), value = item.ToString() });
+ }
+ index++;
+ }
+
+ result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
+ }
+ break;
}
return result;
}
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 464a681..80aec45 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"
@@ -737,60 +737,62 @@
{
try
{
+
+
// 鑾峰彇鍙楀奖鍝嶇殑璁㈠崟鏄庣粏ID锛堝幓閲嶏級
- var affectedDetailIds = returnLocks
- .Select(x => x.OrderDetailId)
- .Distinct()
- .ToList();
+ //var affectedDetailIds = returnLocks
+ // .Select(x => x.OrderDetailId)
+ // .Distinct()
+ // .ToList();
- if (!affectedDetailIds.Any())
- {
- _logger.LogInformation($"娌℃湁鍙楀奖鍝嶇殑璁㈠崟鏄庣粏 - OrderNo: {orderNo}");
- return;
- }
+ //if (!affectedDetailIds.Any())
+ //{
+ // _logger.LogInformation($"娌℃湁鍙楀奖鍝嶇殑璁㈠崟鏄庣粏 - OrderNo: {orderNo}");
+ // return;
+ //}
- _logger.LogInformation($"鏇存柊{affectedDetailIds.Count}涓彈褰卞搷鐨勮鍗曟槑缁� - OrderNo: {orderNo}");
+ //_logger.LogInformation($"鏇存柊{affectedDetailIds.Count}涓彈褰卞搷鐨勮鍗曟槑缁� - OrderNo: {orderNo}");
- foreach (var detailId in affectedDetailIds)
- {
- // 閲嶆柊璁$畻璇ヨ鍗曟槑缁嗙殑閿佸畾鏁伴噺
- decimal currentLockQty = await CalculateOrderDetailLockQuantity(detailId);
+ //foreach (var detailId in affectedDetailIds)
+ //{
+ // // 閲嶆柊璁$畻璇ヨ鍗曟槑缁嗙殑閿佸畾鏁伴噺
+ // decimal currentLockQty = await CalculateOrderDetailLockQuantity(detailId);
- // 妫�鏌ユ暟鎹竴鑷存��
- if (currentLockQty < 0)
- {
- _logger.LogWarning($"閿佸畾鏁伴噺璁$畻涓鸿礋鍊� - OrderDetailId: {detailId}, 褰撳墠鍊�: {currentLockQty}锛岄噸缃负0");
- currentLockQty = 0;
- }
+ // // 妫�鏌ユ暟鎹竴鑷存��
+ // if (currentLockQty < 0)
+ // {
+ // _logger.LogWarning($"閿佸畾鏁伴噺璁$畻涓鸿礋鍊� - OrderDetailId: {detailId}, 褰撳墠鍊�: {currentLockQty}锛岄噸缃负0");
+ // currentLockQty = 0;
+ // }
- // 鑾峰彇璁㈠崟鏄庣粏
- var orderDetail = await _outboundOrderDetailService.Db.Queryable<Dt_OutboundOrderDetail>()
- .FirstAsync(x => x.Id == detailId);
+ // // 鑾峰彇璁㈠崟鏄庣粏
+ // var orderDetail = await _outboundOrderDetailService.Db.Queryable<Dt_OutboundOrderDetail>()
+ // .FirstAsync(x => x.Id == detailId);
- if (orderDetail == null)
- {
- _logger.LogWarning($"鏈壘鍒拌鍗曟槑缁� - OrderDetailId: {detailId}");
- continue;
- }
+ // if (orderDetail == null)
+ // {
+ // _logger.LogWarning($"鏈壘鍒拌鍗曟槑缁� - OrderDetailId: {detailId}");
+ // continue;
+ // }
- // 鏇存柊閿佸畾鏁伴噺
- if (orderDetail.LockQuantity != currentLockQty)
- {
- await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>()
- .SetColumns(it => new Dt_OutboundOrderDetail
- {
- LockQuantity = currentLockQty,
- })
- .Where(it => it.Id == detailId)
- .ExecuteCommandAsync();
+ // // 鏇存柊閿佸畾鏁伴噺
+ // if (orderDetail.LockQuantity != currentLockQty)
+ // {
+ // await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>()
+ // .SetColumns(it => new Dt_OutboundOrderDetail
+ // {
+ // LockQuantity = currentLockQty,
+ // })
+ // .Where(it => it.Id == detailId)
+ // .ExecuteCommandAsync();
- _logger.LogInformation($"鏇存柊璁㈠崟鏄庣粏閿佸畾鏁伴噺 - OrderDetailId: {detailId}, " +
- $"鏃у��: {orderDetail.LockQuantity}, 鏂板��: {currentLockQty}");
- }
+ // _logger.LogInformation($"鏇存柊璁㈠崟鏄庣粏閿佸畾鏁伴噺 - OrderDetailId: {detailId}, " +
+ // $"鏃у��: {orderDetail.LockQuantity}, 鏂板��: {currentLockQty}");
+ // }
- // 鏇存柊璁㈠崟鏄庣粏鐘舵��
- await UpdateOrderDetailStatus(orderDetail);
- }
+ // // 鏇存柊璁㈠崟鏄庣粏鐘舵��
+ // await UpdateOrderDetailStatus(orderDetail);
+ //}
}
catch (Exception ex)
{
@@ -939,6 +941,7 @@
{
hasInProgress = true;
}
+ await UpdateOrderDetailStatus(detail);
}
var outboundOrder = await _outboundOrderService.Db.Queryable<Dt_OutboundOrder>()
@@ -976,6 +979,7 @@
_logger.LogInformation($"鏇存柊璁㈠崟鐘舵�� - OrderNo: {orderNo}, 鏃х姸鎬�: {outboundOrder.OrderStatus}, 鏂扮姸鎬�: {newStatus}");
}
+
}
catch (Exception ex)
{
@@ -1045,7 +1049,7 @@
if (allCompleted && newStatus == (int)OutOrderStatusEnum.鍑哄簱瀹屾垚)
{
- if (outboundOrder.OrderType == OutOrderTypeEnum.Allocate.ObjToInt())
+ if (outboundOrder.OrderType == OutOrderTypeEnum.Allocate.ObjToInt() || outboundOrder.OrderType == OutOrderTypeEnum.InternalAllocat.ObjToInt())
{
var allocate = _allocateService.Repository.QueryData(x => x.UpperOrderNo == outboundOrder.UpperOrderNo).First();
var allocatefeedmodel = new AllocateDto
--
Gitblit v1.9.3