From d1df8e56fd794ec9a71a2fbd6aadbab72d1e0815 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期五, 19 十二月 2025 14:51:46 +0800
Subject: [PATCH] 1
---
项目代码/WIDESEA_WMSClient/src/extension/inbound/inboundOrder.js | 225 +++-----------------------------------------------------
1 files changed, 13 insertions(+), 212 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 335d0cf..6b68ff8 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,13 +1,14 @@
//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
+import gridHeader from './extend/EmptyTrayInbound.vue'
+import gridBody from './extend/Pallet.vue'
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 gridHeader from './extend/EmptyTrayInbound.vue'
+import { ElDialog, ElForm, ElFormItem, ElInput, ElButton, ElMessage, ElSelect, ElOption } from 'element-plus';
let extension = {
components: {
//鏌ヨ鐣岄潰鎵╁睍缁勪欢
gridHeader: gridHeader,
- gridBody: '',
+ gridBody: gridBody,
gridFooter: '',
//鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
modelHeader: '',
@@ -17,32 +18,6 @@
tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
buttons: {
view: [
- {
- name: '缁勭洏',
- type: 'primary',
- value: '缁勭洏',
- onClick: function () { // 淇1锛氱Щ闄ゆ棤鐢╮ow鍙傛暟锛屽姞鏃ュ織璋冭瘯
- console.log('缁勭洏鎸夐挳琚偣鍑伙紝寮�濮嬫牎楠�');
- const selectedRows = this.$refs.table.getSelected();
-
- // 鏍¢獙1锛氭槸鍚﹂�変腑琛�
- if (selectedRows.length === 0) {
- console.log('鏍¢獙涓嶉�氳繃锛氭湭閫変腑浠讳綍鍗曟嵁');
- ElMessage.warning('璇烽�夋嫨涓�鏉″崟鎹�');
- return;
- }
- // 鏍¢獙2锛氭槸鍚﹂�変腑鍗曡
- if (selectedRows.length > 1) {
- console.log('鏍¢獙涓嶉�氳繃锛氶�変腑澶氳鍗曟嵁');
- ElMessage.warning('鍙兘閫夋嫨涓�鏉″崟鎹�');
- return;
- }
-
- const targetRow = selectedRows[0];
-
- this.$emit('openPalletDialog', targetRow.inboundOrderNo);
- }
- },
{
name: '鎾ら攢缁勭洏',
type: 'primary',
@@ -71,20 +46,15 @@
// 鍙戣捣鎾ら攢缁勭洏璇锋眰
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(); // 閫変腑杈撳叆妗嗘柟渚块噸鏂拌緭鍏�
}
@@ -138,7 +108,7 @@
ref: 'cancelPalletForm'
}, [
// 鎵樼洏鍙疯緭鍏ラ」
- h(ElFormItem, { label: '鎵樼洏鍙�', prop: 'palletCode', required: true }, [
+ h(ElFormItem, { label: '鎵樼洏鏉$爜', prop: 'palletCode', required: true }, [
h(ElInput, {
type: 'text',
modelValue: formData.palletCode,
@@ -157,7 +127,7 @@
}
})
]),
- h(ElFormItem, { label: '鏉$爜', prop: 'barcode' }, [
+ h(ElFormItem, { label: ' 鍐呯鏍囩', prop: 'barcode' }, [
h(ElInput, {
type: 'text',
modelValue: formData.barcode,
@@ -245,181 +215,6 @@
}
}
},
- // {
- // 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();
- // }
- // }
- // })
- // ]),
- // // 搴曢儴鎸夐挳鍖�
- // 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: {
@@ -431,7 +226,13 @@
this.$refs.gridHeader.open();
}
}
-
+ var GroupPalletBtn = this.buttons.find(x => x.value == "GroupPallet");
+ if (GroupPalletBtn != null) {
+ GroupPalletBtn.onClick = () => {
+ // console.log(this.$refs)
+ this.$refs.gridBody.open();
+ }
+ }
this.columns.forEach(column => {
if (column.field === 'orderStatistics') {
--
Gitblit v1.9.3