feat: 基础增删改查

This commit is contained in:
砂糖
2025-08-13 13:19:37 +08:00
parent 8e3497b971
commit 936f85d401
17 changed files with 2352 additions and 26 deletions

View File

@@ -0,0 +1,51 @@
<template>
<el-select remote 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: 10,
name: query
}).then(response => {
this.vendorList = response.rows;
this.vendorLoading = false;
});
}
}
}
</script>