From cf83e0828b286b61b69a15005e6247d8b03f4cd8 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期日, 16 十一月 2025 19:14:03 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu
---
项目代码/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js | 141 +++++++++++++++++++++++++++++++++++++++--------
1 files changed, 117 insertions(+), 24 deletions(-)
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 5eb8232..e868e4d 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"
@@ -1,7 +1,7 @@
//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
import http from '@/api/http.js'
-import { h,createVNode, render,reactive } from 'vue';
+import { h,createVNode, render,reactive ,ref } from 'vue';
import { ElDialog , ElForm, ElFormItem, ElInput, ElButton, ElMessage ,ElSelect, ElOption} from 'element-plus';
import gridBody from './extend/outOrderDetail.vue'
@@ -49,26 +49,63 @@
value: '绌烘墭鐩樺嚭搴�',
onClick: function () {
- // 2. 鐢熸垚3-12绔欏彴閫夐」锛堥粯璁ょ涓�涓负绔欏彴3锛�
+
const platformOptions = Array.from({ length: 1 }, (_, i) => {
const num = 1;
return { label: `绔欏彴${num}`, value: `1-2` };
});
+ const quantityOptions = Array.from({ length: 6 }, (_, i) => ({
+ label: (i + 1).toString(),
+ value: i + 1
+ }));
+
+ const warehouseOptions = 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鏍煎紡
+ warehouseOptions.value = data.map(item => ({
+ label: item.locationTypeDesc,
+ value: item.locationType
+ }));
+ } else {
+ ElMessage.error('鑾峰彇鍖哄煙鍒楄〃澶辫触');
+ warehouseOptions.value = [];
+ }
+ } catch (err) {
+ ElMessage.error('鍖哄煙鏁版嵁璇锋眰寮傚父锛岃绋嶅悗閲嶈瘯');
+ warehouseOptions.value = [];
+ } finally {
+ isLoadingWarehouses.value = false;
+ }
+ };
+
const mountNode = document.createElement('div');
document.body.appendChild(mountNode);
- // 3. 琛ㄥ崟鏁版嵁锛堥粯璁ら�変腑绔欏彴3锛�
+
const formData = reactive({
+ warehouseCode:'',
palletCode: '',
- selectedPlatform: platformOptions[0].value // 榛樿缁戝畾绔欏彴3鐨剉alue
+ selectedPlatform: platformOptions[0].value,
+ quantity:1
});
const vnode = createVNode(ElDialog, {
title: '绌烘墭鐩樺嚭搴�',
- width: '500px', // 寰皟瀹藉害鏇村崗璋�
+ width: '500px',
modelValue: true,
appendToBody: true,
+ onOpened: async () => {
+ await getWarehouseList();
+ const inputRef = vnode.component.refs.boxCodeInput;
+ inputRef?.focus();
+ },
'onUpdate:modelValue': (isVisible) => {
if (!isVisible) {
render(null, mountNode);
@@ -76,43 +113,72 @@
}
},
style: {
- padding: '20px 0', // 寮圭獥鍐呬笂涓嬬暀鐧斤紝閬垮厤鍐呭绱ц创杈规
- borderRadius: '8px' // 杞诲井鍦嗚锛屾彁鍗囪川鎰�
+ padding: '20px 0',
+ borderRadius: '8px'
}
}, {
default: () => h(ElForm, {
model: formData,
rules: {
+ warehouseCode:[
+ { required: true, message: '璇烽�夋嫨鍖哄煙', trigger: ['change', 'blur'] }
+ ],
palletCode: [
{ type: 'string', message: '鏂欑鍙峰繀椤讳负瀛楃涓�', trigger: 'blur' }
],
selectedPlatform: [
{ required: true, message: '璇烽�夋嫨鍑哄簱绔欏彴', trigger: 'change' }
- ]
+ ],
+ quantity:[
+ { required: true, message: '璇烽�夋嫨绌虹鏁伴噺', trigger: 'change'}
+ ]
},
ref: 'batchOutForm',
- labelWidth: '100px', // 鍥哄畾鏍囩瀹藉害锛岀‘淇濆榻�
+ labelWidth: '100px',
style: {
- padding: '0 30px', // 琛ㄥ崟宸﹀彸鐣欑櫧锛屽鍔犲懠鍚告劅
+ padding: '0 30px',
}
- }, [
- // 鍑哄簱绔欏彴锛堜笂锛屼紭鍖栨牱寮忥級
+ },
+ [
+ // h(ElFormItem, {
+ // label: '浠撳簱鍖哄煙',
+ // prop: 'warehouseCode',
+ // style: {
+ // marginBottom: '24px'
+ // }
+ // }, [
+ // h(ElSelect, {
+ // placeholder: '璇烽�夋嫨浠撳簱鍖哄煙',
+ // modelValue: formData.warehouseCode,
+ // 'onUpdate:modelValue': (val) => {
+ // formData.warehouseCode = val;
+ // },
+ // style: {
+ // width: '100%',
+ // height: '40px',
+ // borderRadius: '4px',
+ // borderColor: '#dcdfe6'
+ // }
+ // }, warehouseOptions.value.map(platform =>
+ // h(ElOption, { label: platform.label, value: platform.value })
+ // ))
+ // ]),
h(ElFormItem, {
label: '鍑哄簱绔欏彴',
prop: 'selectedPlatform',
style: {
- marginBottom: '24px' // 琛ㄥ崟椤归棿璺濅紭鍖�
+ marginBottom: '24px'
}
}, [
h(ElSelect, {
- placeholder: '璇烽�夋嫨鍑哄簱绔欏彴锛�3-12锛�',
+ placeholder: '璇烽�夋嫨鍑哄簱绔欏彴',
modelValue: formData.selectedPlatform,
'onUpdate:modelValue': (val) => {
formData.selectedPlatform = val;
},
style: {
width: '100%',
- height: '40px', // 缁熶竴缁勪欢楂樺害
+ height: '40px',
borderRadius: '4px',
borderColor: '#dcdfe6'
}
@@ -120,12 +186,38 @@
h(ElOption, { label: platform.label, value: platform.value })
))
]),
- // 鎵樼洏缂栧彿锛堜笅锛屼紭鍖栨牱寮忥級
+ // h(ElFormItem,{
+ // label:'鍑哄簱鏁伴噺',
+ // prop:'quantity',
+ // style:{
+ // marginBottom:'24px'
+ // }
+ // },[h(ElSelect,{
+ // placeholder:'璇烽�夋嫨绌虹鏁伴噺',
+ // modelValue:formData.quantity,
+ // 'onUpdate:modelValue':(val)=>{
+ // formData.quantity=val;
+ // },
+ // style:{
+ // width:'100%',
+ // height:'40px',
+ // borderRadius:'4px',
+ // borderColor:'#dcdfe6'
+ // },
+ // filterable:false
+ // },
+ // quantityOptions.map(option=>
+ // h(ElOption,{
+ // label:option.label,
+ // value:option.value
+ // })
+ // )
+ // )]),
h(ElFormItem, {
label: '鏂欑鍙�',
prop: 'palletCode',
style: {
- marginBottom: '16px' // 涓庢寜閽尯鎷夊紑鍚堢悊闂磋窛
+ marginBottom: '16px'
}
}, [
h(ElInput, {
@@ -137,21 +229,21 @@
},
style: {
width: '100%',
- height: '40px', // 涓庨�夋嫨鍣ㄩ珮搴︾粺涓�
+ height: '40px',
borderRadius: '4px',
borderColor: '#dcdfe6'
},
attrs: {
- placeholderStyle: 'color: #909399;' // 鍗犱綅鏂囧瓧棰滆壊浼樺寲锛屾洿鏌斿拰
+ placeholderStyle: 'color: #909399;'
}
})
]),
- // 搴曢儴鎸夐挳鍖猴紙鏍峰紡浼樺寲锛�
+
h('div', {
style: {
textAlign: 'right',
marginTop: '8px',
- paddingRight: '4px' // 鎸夐挳涓庡彸渚у榻愬井璋�
+ paddingRight: '4px'
}
}, [
h(ElButton, {
@@ -163,7 +255,7 @@
},
style: {
marginRight: '8px',
- color: '#606266' // 鍙栨秷鎸夐挳棰滆壊浼樺寲
+ color: '#606266'
}
}, '鍙栨秷'),
h(ElButton, {
@@ -180,7 +272,8 @@
}).then(({ data, status, message }) => {
if (status) {
- ElMessage.success(`鍑哄簱鎴愬姛锛屽垎閰嶇殑鎵樼洏缂栧彿锛�${data.palletCode || formData.palletCode}`);
+
+ ElMessage.success(`鍑哄簱鎴愬姛`);
this.refresh();
render(null, mountNode);
document.body.removeChild(mountNode);
@@ -193,7 +286,7 @@
},
style: {
borderRadius: '4px',
- padding: '8px 20px' // 鎸夐挳鍐呰竟璺濅紭鍖栵紝鐐瑰嚮鍖哄煙鏇磋垝閫�
+ padding: '8px 20px'
}
}, '纭畾')
])
--
Gitblit v1.9.3