diff --git a/apps/hand-factory/api/wms/actualWarehouse.js b/apps/hand-factory/api/wms/actualWarehouse.js
index b9edb67..fa2e625 100644
--- a/apps/hand-factory/api/wms/actualWarehouse.js
+++ b/apps/hand-factory/api/wms/actualWarehouse.js
@@ -42,3 +42,13 @@ export function delActualWarehouse(actualWarehouseId) {
method: 'delete'
})
}
+
+// 获取两级的树结构
+export function treeActualWarehouseTwoLevel(query) {
+ return request({
+ url: '/wms/actualWarehouse/levelTwo',
+ method: 'get',
+ params: query
+ })
+}
+
diff --git a/apps/hand-factory/components/klp-actual-warehouse-picker/klp-actual-warehouse-picker.vue b/apps/hand-factory/components/klp-actual-warehouse-picker/klp-actual-warehouse-picker.vue
new file mode 100644
index 0000000..35e2c60
--- /dev/null
+++ b/apps/hand-factory/components/klp-actual-warehouse-picker/klp-actual-warehouse-picker.vue
@@ -0,0 +1,402 @@
+
+
+
+
+
+
+ {{ selectedNode.actualWarehouseCode || '请选择真实库区' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/hand-factory/components/klp-material-picker/klp-material-picker.vue b/apps/hand-factory/components/klp-material-picker/klp-material-picker.vue
index f9601f6..f48bde1 100644
--- a/apps/hand-factory/components/klp-material-picker/klp-material-picker.vue
+++ b/apps/hand-factory/components/klp-material-picker/klp-material-picker.vue
@@ -7,7 +7,9 @@
{{ itemType === 'product' ? '成品' : itemType === 'raw_material' ? '原料' : '请选择物品类型' }}
- ▼
+
+
+ ▼
@@ -18,7 +20,9 @@
{{ loadingProducts ? '加载中...' : selectedName || '请选择产品' }}
- ▼
+
+ ✕
+ ▼
@@ -29,7 +33,9 @@
{{ loadingRawMaterials ? '加载中...' : selectedName || '请选择原材料' }}
- ▼
+
+ ✕
+ ▼
@@ -259,7 +265,6 @@
const keyword = this.rawMaterialSearchKeyword.trim().toLowerCase();
this.filteredRawMaterials = keyword
? this.rawMaterials.filter(m => {
- console.log(m.specification)
// 只基于原材料名称过滤,且确保是原材料数据
return (m.rawMaterialName && m.rawMaterialName.toLowerCase().includes(keyword))
|| m?.specification?.toLowerCase()?.includes(keyword)
@@ -324,13 +329,36 @@
},
closeRawMaterialPicker() {
this.$refs.rawMaterialPopup.close();
+ },
+
+ // ✅ 新增核心清除方法1:清空物品类型 + 所有关联数据(完全重置)
+ handleClearItemType() {
+ this.$emit('update:itemType', '');
+ this.$emit('update:itemId', undefined);
+ this.$emit('update:materialType', undefined);
+ this.selectedName = '';
+ uni.showToast({ title: '已清空物品类型', icon: 'none' });
+ },
+
+ // ✅ 新增核心清除方法2:仅清空选中的产品,保留物品类型为成品
+ handleClearProduct() {
+ this.$emit('update:itemId', undefined);
+ this.selectedName = '';
+ uni.showToast({ title: '已清空产品选择', icon: 'none' });
+ },
+
+ // ✅ 新增核心清除方法3:仅清空选中的原材料,保留物品类型为原料
+ handleClearRawMaterial() {
+ this.$emit('update:itemId', undefined);
+ this.selectedName = '';
+ uni.showToast({ title: '已清空原材料选择', icon: 'none' });
}
}
};