From c2cbdb583fe34643c5dfde10bd1d51573887fb8e Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期日, 16 十一月 2025 18:35:34 +0800
Subject: [PATCH] 提交
---
项目代码/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js | 104 +++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 98 insertions(+), 6 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 3c1e490..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'
@@ -55,13 +55,45 @@
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);
const formData = reactive({
+ warehouseCode:'',
palletCode: '',
- selectedPlatform: platformOptions[0].value
+ selectedPlatform: platformOptions[0].value,
+ quantity:1
});
const vnode = createVNode(ElDialog, {
@@ -69,6 +101,11 @@
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);
@@ -83,20 +120,49 @@
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',
style: {
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',
@@ -120,7 +186,33 @@
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',
--
Gitblit v1.9.3