From 5beb11143d51268dc2ee6b4ad5d59f4535e1103e Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期五, 14 十一月 2025 20:37:58 +0800
Subject: [PATCH] 添加字段和前端页面添加按钮
---
项目代码/WIDESEA_WMSClient/src/views/stock/stockInfo.vue | 20 +++---
项目代码/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue | 16 +++++
项目代码/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue | 15 +++--
项目代码/WIDESEA_WMSClient/src/extension/taskinfo/task.js | 28 +++++++++
项目代码/WIDESEA_WMSClient/src/extension/outbound/outboundOrder.js | 43 +++++++-------
项目代码/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue | 8 ++
6 files changed, 92 insertions(+), 38 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue"
index bad04be..2fbaa74 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/extend/Pallet.vue"
@@ -148,8 +148,8 @@
<span><i class="el-icon-tickets"></i> 缁勭洏鏁版嵁</span>
<span class="list-actions">
<el-tag type="primary" size="small">鍏� {{ materials.length }} 鏉�</el-tag>
- <el-tag type="primary" size="small">宸茬粍鐩� {{ totalStockCount }}</el-tag>
- <el-tag type="primary" size="small">搴撳瓨 {{ totalStockSum }}{{ uniqueUnit }}</el-tag>
+ <el-tag type="primary" size="small">鏈粍鐩� {{ totalStockCount }}</el-tag>
+ <el-tag type="primary" size="small">鏈叆搴撴暟閲� {{ totalStockSum }}{{ uniqueUnit }}</el-tag>
<el-tag v-if="trayBarcode" type="success" size="small">鎵樼洏: {{ trayBarcode }}</el-tag>
<el-tag v-if="form.locationType" type="info" size="small">鍖哄煙: {{ currentLocationDesc }}</el-tag>
</span>
@@ -198,6 +198,7 @@
import { ElLoading, ElMessage,ElMessageBox } from 'element-plus';
import { ref, onMounted, onUnmounted } from 'vue'
import InboundOrder from '../../../views/inbound/inboundOrder.vue';
+import { th } from 'element-plus/es/locales.mjs';
export default {
name: 'BarcodeScanner',
@@ -436,7 +437,7 @@
// 鎵嬪姩妫�鏌ocationType锛屾纭鐞嗗�间负0鐨勬儏鍐�
if (this.form.locationType === null || this.form.locationType === undefined || this.form.locationType === '') {
this.error = '璇峰厛閫夋嫨浠撳簱鍖哄煙';
- this.$message.warning('璇峰厛閫夋嫨浠撳簱鍖哄煙');
+ //this.$message.warning('璇峰厛閫夋嫨浠撳簱鍖哄煙');
} else {
// 濡傛灉鍊煎瓨鍦紙鍖呮嫭0锛夛紝浣嗛獙璇佷笉閫氳繃锛屽彲鑳芥槸鍏朵粬楠岃瘉閿欒
this.error = '璇锋鏌ヨ〃鍗曞~鍐欐槸鍚︽纭�';
@@ -616,7 +617,7 @@
// 鍏堢洿鎺ユ鏌ocationType锛岄伩鍏嶈〃鍗曢獙璇佺殑寮傛闂
if (!this.form.locationType) {
this.error = '璇峰厛閫夋嫨浠撳簱鍖哄煙';
- this.$message.warning('璇峰厛閫夋嫨浠撳簱鍖哄煙');
+ //this.$message.warning('璇峰厛閫夋嫨浠撳簱鍖哄煙');
return;
}
@@ -728,7 +729,7 @@
duration: 2000
});
-
+ this.fetchStockStatistics();
// 娓呯┖鐗╂枡杈撳叆妗嗗苟淇濇寔鑱氱劍
this.barcode = '';
this.scanCode = ''; // 娓呯┖鎵爜缂撳瓨
@@ -775,7 +776,7 @@
if(!response.status){
this.error = response.message || '鏌ヨ鏉$爜淇℃伅澶辫触锛岃閲嶈瘯';
}
- // 纭繚杩斿洖鐨勬暟鎹寘鍚墍鏈夊繀闇�鐨勫瓧娈�
+
return materialData;
} catch (error) {
@@ -850,6 +851,8 @@
type: 'success',
message: '鍒犻櫎鎴愬姛!'
});
+ this.fetchStockStatistics();
+
}).catch(() => {
// 鍙栨秷鍒犻櫎
});
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 fb04c10..4267087 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"
@@ -49,7 +49,7 @@
value: '绌烘墭鐩樺嚭搴�',
onClick: function () {
- // 2. 鐢熸垚3-12绔欏彴閫夐」锛堥粯璁ょ涓�涓负绔欏彴3锛�
+
const platformOptions = Array.from({ length: 1 }, (_, i) => {
const num = 1;
return { label: `绔欏彴${num}`, value: `1-2` };
@@ -58,15 +58,15 @@
const mountNode = document.createElement('div');
document.body.appendChild(mountNode);
- // 3. 琛ㄥ崟鏁版嵁锛堥粯璁ら�変腑绔欏彴3锛�
+
const formData = reactive({
palletCode: '',
- selectedPlatform: platformOptions[0].value // 榛樿缁戝畾绔欏彴3鐨剉alue
+ selectedPlatform: platformOptions[0].value
});
const vnode = createVNode(ElDialog, {
title: '绌烘墭鐩樺嚭搴�',
- width: '500px', // 寰皟瀹藉害鏇村崗璋�
+ width: '500px',
modelValue: true,
appendToBody: true,
'onUpdate:modelValue': (isVisible) => {
@@ -76,8 +76,8 @@
}
},
style: {
- padding: '20px 0', // 寮圭獥鍐呬笂涓嬬暀鐧斤紝閬垮厤鍐呭绱ц创杈规
- borderRadius: '8px' // 杞诲井鍦嗚锛屾彁鍗囪川鎰�
+ padding: '20px 0',
+ borderRadius: '8px'
}
}, {
default: () => h(ElForm, {
@@ -91,28 +91,28 @@
]
},
ref: 'batchOutForm',
- labelWidth: '100px', // 鍥哄畾鏍囩瀹藉害锛岀‘淇濆榻�
+ labelWidth: '100px',
style: {
- padding: '0 30px', // 琛ㄥ崟宸﹀彸鐣欑櫧锛屽鍔犲懠鍚告劅
+ padding: '0 30px',
}
}, [
- // 鍑哄簱绔欏彴锛堜笂锛屼紭鍖栨牱寮忥級
+
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 +120,12 @@
h(ElOption, { label: platform.label, value: platform.value })
))
]),
- // 鎵樼洏缂栧彿锛堜笅锛屼紭鍖栨牱寮忥級
+
h(ElFormItem, {
label: '鏂欑鍙�',
prop: 'palletCode',
style: {
- marginBottom: '16px' // 涓庢寜閽尯鎷夊紑鍚堢悊闂磋窛
+ marginBottom: '16px'
}
}, [
h(ElInput, {
@@ -137,21 +137,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 +163,7 @@
},
style: {
marginRight: '8px',
- color: '#606266' // 鍙栨秷鎸夐挳棰滆壊浼樺寲
+ color: '#606266'
}
}, '鍙栨秷'),
h(ElButton, {
@@ -180,7 +180,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 +194,7 @@
},
style: {
borderRadius: '4px',
- padding: '8px 20px' // 鎸夐挳鍐呰竟璺濅紭鍖栵紝鐐瑰嚮鍖哄煙鏇磋垝閫�
+ padding: '8px 20px'
}
}, '纭畾')
])
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/taskinfo/task.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/taskinfo/task.js"
index 4e7fe7d..2564eb6 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/taskinfo/task.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/taskinfo/task.js"
@@ -1,6 +1,8 @@
//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
+import { ElMessage } from 'element-plus';
+
let extension = {
components: {
//鏌ヨ鐣岄潰鎵╁睍缁勪欢
@@ -13,7 +15,31 @@
modelFooter: ''
},
tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
- buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽�
+ buttons: { view: [
+ {
+ name: '閲嶄笅浠诲姟',
+ type: 'primary',
+ value: '閲嶄笅浠诲姟',
+ onClick: async function () {
+ const selectRows = this.$refs.table.getSelected();
+ if (selectRows.length == 0) return ElMessage.warning('璇烽�夋嫨涓�鏉′换鍔�');
+ if (selectRows.length > 1) return ElMessage.warning('鍙兘閫夋嫨涓�鏉′换鍔�');
+ const taskNum = selectRows[0].taskId;
+ try{
+ const response = await http.post('api/Task/RecreateTasks?taskNums='+taskNum, '浠诲姟閲嶄笅涓�...');
+ const { status, message ,data} = response;
+ if (status) {
+ ElMessage.success(`閲嶄笅浠诲姟鎴愬姛`);
+ this.refresh();
+ }else{
+ ElMessage.error(`閲嶄笅浠诲姟澶辫触锛�${message}`);
+ }
+ }catch(err){
+ ElMessage.error(`閲嶄笅浠诲姟寮傚父锛�${err.message}`);
+ }
+ }
+ }
+ ], box: [], detail: [] }, //鎵╁睍鐨勬寜閽�
methods: {
//涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
onInit() {
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 a835138..ea17874 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"
@@ -158,6 +158,14 @@
bind: { key: "inOrderType", data: [] },
},
{
+ field: "businessType",
+ title: "涓氬姟绫诲瀷",
+ type: "string",
+ width: 150,
+ align: "left",
+ bind: { key: "businessType", data: [] },
+ },
+ {
field: "orderStatus",
title: "鍗曟嵁鐘舵��",
type: "decimal",
@@ -267,6 +275,14 @@
required: true,
},
{
+ field: "warehouseCode",
+ title: "浠撳簱鍙�",
+ type: "decimal",
+ width: 90,
+ align: "left",
+ required: true
+ },
+ {
field: "barcode",
title: "鏉$爜",
type: "decimal",
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 d32b939..005b6d7 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"
@@ -178,6 +178,14 @@
bind: { key: "outOrderType", data: [] },
},
{
+ field: "businessType",
+ title: "涓氬姟绫诲瀷",
+ type: "string",
+ width: 150,
+ align: "left",
+ bind: { key: "businessType", data: [] },
+ },
+ {
field: "orderStatus",
title: "鍗曟嵁鐘舵��",
type: "decimal",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfo.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfo.vue"
index 41ba7e7..a84110c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfo.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfo.vue"
@@ -71,20 +71,20 @@
align: "left",
},
{
- field: "locationCode",
- title: "璐т綅缂栧彿",
+ field: "palletType",
+ title: "鎵樼洏绫诲瀷",
type: "string",
width: 150,
align: "left",
+ bind: { key: "palletType", data: [] },
},
- // {
- // field: "isFull",
- // title: "鏄惁婊$洏",
- // type: "string",
- // width: 150,
- // align: "left",
- // bind: { key: "yesno", data: [] },
- // },
+ {
+ field: "locationCode",
+ title: "璐т綅缂栧彿",
+ type: "string",
+ width: 150,
+ align: "left",
+ },
{
field: "warehouseId",
title: "浠撳簱",
--
Gitblit v1.9.3