|
@@ -90,6 +90,14 @@
|
|
|
<el-select
|
|
|
v-model="formData.data.sellCorporationId"
|
|
|
style="width: 100%"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ reserve-keyword
|
|
|
+ placeholder="请输入关键字"
|
|
|
+ remote-show-suffix
|
|
|
+ :remote-method="remoteMethod"
|
|
|
+ :loading="loadingSearch"
|
|
|
+ @input="remoteMethod"
|
|
|
@change="changeSupplier"
|
|
|
>
|
|
|
<el-option
|
|
@@ -955,17 +963,15 @@ const getDict = () => {
|
|
|
};
|
|
|
});
|
|
|
});
|
|
|
- proxy
|
|
|
- .post("/supplierInfo/page", { pageNum: 1, pageSize: 999 })
|
|
|
- .then((res) => {
|
|
|
- supplierList.value = res.rows.map((item) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- label: item.name,
|
|
|
- value: item.id,
|
|
|
- };
|
|
|
- });
|
|
|
+ proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 50 }).then((res) => {
|
|
|
+ supplierList.value = res.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
});
|
|
|
+ });
|
|
|
};
|
|
|
getDict();
|
|
|
const getCityData = (id, type, isChange) => {
|
|
@@ -1875,6 +1881,24 @@ const getHtmlVal = (val) => {
|
|
|
}
|
|
|
return "";
|
|
|
};
|
|
|
+
|
|
|
+const loadingSearch = ref(false);
|
|
|
+const remoteMethod = (keyword) => {
|
|
|
+ if (keyword && typeof keyword === "string") {
|
|
|
+ loadingSearch.value = true;
|
|
|
+ proxy.post("/supplierInfo/page", { keyword }).then((res) => {
|
|
|
+ supplierList.value = res.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ loadingSearch.value = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return;
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|