From 673b5a596f611099eaacc310f6e7def0e022daca Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期三, 29 四月 2026 11:00:55 +0800
Subject: [PATCH] 添加盘点模板和胶箱台账功能
---
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 106 insertions(+), 9 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue"
index 4e388a9..b2c56a0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/EmptyTrayOutbound.vue"
@@ -1,21 +1,71 @@
<template>
- <vol-box v-model="show" title="绌烘墭鍑哄簱" :width="800" :height="600">
+ <vol-box v-model="show" title="绌烘墭鍑哄簱" :width="800" :height="1200">
<template #content>
<el-form ref="form" :model="form" label-width="90px">
- <el-form-item label="鍑哄簱鏁伴噺:">
- <el-select v-model="num" placeholder="璇烽�夋嫨鍑哄簱鏁伴噺">
- <el-option v-for="item in 6" :key="item" :label="item.toString()" :value="item">
+ <el-form-item label="鍑哄簱鍖哄煙:">
+ <el-select v-model="locationType" placeholder="璇烽�夋嫨鍑哄簱鍖哄煙">
+ <el-option
+ v-for="item in locationTypes"
+ :key="item.locationType"
+ :label="item.locationTypeDesc.toString()"
+ :value="item.locationType">
</el-option>
</el-select>
</el-form-item>
</el-form>
+ <el-form ref="form" :model="form" label-width="90px">
+ <el-form-item label="鍑哄簱鏁伴噺:">
+ <el-input-number
+ v-model="num"
+ :min="1"
+ :max="999"
+ :controls="true"
+ placeholder="璇烽�夋嫨鍑哄簱鏁伴噺"
+ style="width: 100%;">
+ </el-input-number>
+ </el-form-item>
+ </el-form>
+
+ <!-- ===================== 鏂板锛氫緵搴斿晢缂栫爜锛堝疄鏃舵悳绱笅鎷夛級 ===================== -->
+ <el-form ref="form" :model="form" label-width="90px">
+ <el-form-item label="渚涘簲鍟嗙紪鐮�:">
+ <el-select
+ v-model="supplierCode"
+ filterable
+ remote
+ reserve-keyword
+ placeholder="璇疯緭鍏�/閫夋嫨渚涘簲鍟嗙紪鐮�"
+ :remote-method="remoteSearchSupplier"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="item in supplierList"
+ :key="item"
+ :label="item"
+ :value="item"
+ />
+ </el-select>
+ </el-form-item>
+ </el-form>
+ <!-- ======================================================================== -->
+
</template>
<template #footer>
<div>
- <el-button type="danger" size="small" plain @click="submit">
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ @click="submit"
+ :loading="isSubmitting"
+ :disabled="isSubmitting">
<i class="el-icon-check">纭</i>
</el-button>
- <el-button size="small" type="primary" plain @click="() => { this.show = false }">
+ <el-button
+ size="small"
+ type="primary"
+ plain
+ @click="() => { this.show = false }">
<i class="el-icon-close">鍏抽棴</i>
</el-button>
</div>
@@ -32,16 +82,35 @@
data() {
return {
num: 1,
- show: false
+ show: false,
+ locationTypes: [],
+ locationType: "",
+ isSubmitting: false,
+ // ================= 鏂板 =================
+ supplierCode: '', // 渚涘簲鍟嗙紪鐮佺粦瀹�
+ supplierList: [] // 涓嬫媺鍒楄〃
+ // =======================================
}
},
methods: {
open() {
this.show = true
+ this.getData();
},
submit() {
+ if (!this.locationType) {
+ this.$message.warning('璇烽�夋嫨鍑哄簱鍖哄煙');
+ return;
+ }
+
+ this.isSubmitting = true;
+
this.$emit('parentCall', ($vue) => {
- this.http.post(`/api/Task/PalletOutboundTask?num=${this.num}`, {}, '鏁版嵁澶勭悊涓�...')
+ // ===================== 鏀归�犳帴鍙o細甯︿笂 supplierCode =====================
+ this.http.post(
+ `/api/Task/PalletOutboundTask?num=${this.num}&locationType=${this.locationType}&SupplierCode=${this.supplierCode || ''}`,
+ {}, '鏁版嵁澶勭悊涓�...')
+ // ====================================================================
.then((x) => {
if (!x.status) {
this.$message.error(x.message)
@@ -51,8 +120,36 @@
$vue.refresh();
}
})
+ .catch((error) => {
+ this.$message.error('璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯');
+ console.error('鎻愪氦澶辫触:', error);
+ })
+ .finally(() => {
+ this.isSubmitting = false;
+ });
})
+ },
+ getData() {
+ this.http.post("api/LocationInfo/GetLocationTypes", null, "鏌ヨ涓�")
+ .then((x) => {
+ this.locationTypes = x.data;
+ })
+ },
+
+ remoteSearchSupplier(keyword) {
+ if (!keyword) {
+ this.supplierList = [];
+ return;
+ }
+ // 璋冪敤鍚庣瀹炴椂鎼滅储鎺ュ彛
+ this.http.get(`/api/Task/SearchSupplierCode?keyword=${keyword}`)
+ .then(res => {
+ if (res.status) {
+ this.supplierList = res.data || [];
+ }
+ })
}
+
}
}
-</script>
+</script>
\ No newline at end of file
--
Gitblit v1.9.3