diff --git a/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue b/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue index 6ff4e014..2d02f930 100644 --- a/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue +++ b/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue @@ -4,8 +4,6 @@ :placeholder="placeholder" filterable clearable - remote - :remote-method="debouncedRemoteMethod" :loading="loading" @change="onChange" style="width: 100%" @@ -67,25 +65,19 @@ export default { this.fetchOptions(""); }, methods: { - fetchOptions(keyword) { + fetchOptions() { this.loading = true; - listRawMaterial({ pageNum: 1, pageSize: 10, rawMaterialName: keyword }).then(res => { + listRawMaterial({ pageNum: 1, pageSize: 9999 }).then(res => { this.options = res.rows || []; this.loading = false; }).catch(() => { this.loading = false; }); }, - remoteMethod(keyword) { - this.fetchOptions(keyword); + async onChange(val) { + const rawMaterial = this.options.find(p => p.rawMaterialId === val); + this.$emit('change', rawMaterial); }, - debouncedRemoteMethod: debounce(function(keyword) { - this.remoteMethod(keyword); - }, 400), - onChange(val) { - this.$emit("input", val); - this.$emit("change", val); - } } }; diff --git a/klp-ui/src/views/wms/purchasePlan/panels/clac.vue b/klp-ui/src/views/wms/purchasePlan/panels/clac.vue index 44ed7d89..96b27bd0 100644 --- a/klp-ui/src/views/wms/purchasePlan/panels/clac.vue +++ b/klp-ui/src/views/wms/purchasePlan/panels/clac.vue @@ -1,68 +1,102 @@