refactor(KLPService): 重构组件目录结构并新增多个表单选择组件
重构KLPService组件目录结构,将原有组件迁移至formItems子目录并新增多个表单选择组件。主要变更包括: 1. 移除CategorySelect组件及相关引用 2. 新增CraftSelect、AmountSelect、VendorSelect等表单组件 3. 优化WarehouseSelect组件支持禁用状态 4. 重构ProductSelect和RawMaterialSelect为卡片式选择器 5. 新增统一导出机制支持按需导入 同时更新相关视图文件以适配新的组件结构,改进代码可维护性和复用性。
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<el-select
|
||||
remote
|
||||
clearable
|
||||
filterable
|
||||
v-model="_value"
|
||||
:remote-method="remoteSearchVendor"
|
||||
:loading="vendorLoading"
|
||||
placeholder="请选择供应商"
|
||||
>
|
||||
<el-option v-for="item in vendorList" :key="item.supplierId" :label="item.name" :value="item.supplierId" />
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listSupplier } from "@/api/wms/supplier";
|
||||
|
||||
export default {
|
||||
name: "VendorSelect",
|
||||
data() {
|
||||
return {
|
||||
vendorList: [],
|
||||
vendorLoading: false,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
_value: {
|
||||
get() {
|
||||
return this.value;
|
||||
},
|
||||
set(val) {
|
||||
this.$emit("input", val);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.remoteSearchVendor("");
|
||||
},
|
||||
methods: {
|
||||
remoteSearchVendor(query) {
|
||||
this.vendorLoading = true;
|
||||
listSupplier({
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
name: query
|
||||
}).then(response => {
|
||||
this.vendorList = response.rows;
|
||||
this.vendorLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user