From afd8d458b14384e907943e5d0dc3e769d07a912a Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期二, 09 十二月 2025 13:44:41 +0800
Subject: [PATCH] 提交
---
项目代码/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js | 42 +++++++++++++++++++++++++++++++++++-------
1 files changed, 35 insertions(+), 7 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js"
index 76c131e..ca0f429 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js"
@@ -54,7 +54,8 @@
// 鍝嶅簲寮忚〃鍗曟暟鎹細鎵樼洏鍙凤紙蹇呭~锛�
const formData = reactive({
- palletCode: '' // 鎵樼洏鍙疯緭鍏ユ
+ palletCode: '', // 鎵樼洏鍙疯緭鍏ユ
+ barcode:''
});
// 鎻愪氦琛ㄥ崟鐨勭粺涓�閫昏緫
@@ -71,7 +72,7 @@
// 鍙戣捣鎾ら攢缁勭洏璇锋眰
try {
//console.log('鍙戣捣鎾ら攢缁勭洏璇锋眰锛屾墭鐩樺彿锛�', formData.palletCode.trim());
- const response = await http.post('/api/InboundOrder/UndoPalletGroup?palletCode='+formData.palletCode.trim());
+ const response = await http.post('/api/InboundOrder/UndoPalletGroup?palletCode='+formData.palletCode.trim()+'&barcode='+formData.barcode.trim());
const { status, message, data } = response;
@@ -155,6 +156,23 @@
}
})
]),
+ 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, {
@@ -194,8 +212,8 @@
// 鏀堕泦鎵�鏈夐�変腑鍗曟嵁鐨勭紪鍙凤紙杩囨护鏃犲崟鎹彿鐨勫紓甯歌锛�
const inboundOrderNos = selectedRows
- .filter(row => row.inboundOrderNo)
- .map(row => row.inboundOrderNo);
+ .filter(row => row.orderNo)
+ .map(row => row.orderNo);
// 鏍¢獙2锛氭槸鍚︽湁鏈夋晥鍗曟嵁鍙�
if (inboundOrderNos.length === 0) {
@@ -235,6 +253,7 @@
const mountNode = document.createElement('div');
document.body.appendChild(mountNode);
+ const boxCodeReg = /^[A-Z]\d{9}$/;
// 鍝嶅簲寮忚〃鍗曟暟鎹細鏂欑鐮侊紙蹇呭~锛屾壂鐮佹灙/鎵嬪姩杈撳叆锛�
const formData = reactive({
boxCode: '',
@@ -269,15 +288,23 @@
// 鎻愪氦琛ㄥ崟鐨勭粺涓�閫昏緫锛堜緵鍥炶溅瑙﹀彂鍜屾寜閽偣鍑诲叡鐢級
const submitForm = async () => {
const formRef = vnode.component.refs.batchInForm;
+
+ if (!boxCodeReg.test(formData.boxCode.trim())) {
+ ElMessage.warning('鏂欑鐮佹牸寮忛敊璇�');
+ selectBoxCodeInput();
+ return;
+ }
+
try {
// 鎵ц琛ㄥ崟鏍¢獙锛堟枡绠辩爜蹇呭~锛�
await formRef.validate();
} catch (err) {
- ElMessage.warning('璇疯緭鍏ユ湁鏁堢殑鏂欑鐮�');
+ const errorMsg = err?.[0]?.message || '璇疯緭鍏ユ湁鏁堢殑鏂欑鐮�';
+ ElMessage.warning(errorMsg);
+ selectBoxCodeInput();
return;
}
-
http.post('/api/InboundOrder/EmptyMaterielGroup', {
palletCode: formData.boxCode.trim(),
warehouseCode:formData.warehouseCode
@@ -333,7 +360,8 @@
model: formData,
rules: {
boxCode: [
- { required: true, message: '璇疯緭鍏ユ枡绠辩爜', trigger: ['blur', 'enter'] }
+ { required: true, message: '璇疯緭鍏ユ枡绠辩爜', trigger: ['blur', 'change'] },
+ { pattern: boxCodeReg, message: '鏂欑鐮佹牸寮忛敊璇�', trigger: ['blur', 'change'] }
],
warehouseCode:[
{ required: true, message: '璇烽�夋嫨鍖哄煙', trigger: ['change', 'blur'] }
--
Gitblit v1.9.3