二维码生成独立页面
This commit is contained in:
@@ -25,16 +25,7 @@
|
||||
|
||||
<script>
|
||||
import { listRawMaterial } from "@/api/wms/rawMaterial";
|
||||
|
||||
function debounce(fn, delay) {
|
||||
let timer = null;
|
||||
return function (...args) {
|
||||
if (timer) clearTimeout(timer);
|
||||
timer = setTimeout(() => {
|
||||
fn.apply(this, args);
|
||||
}, delay);
|
||||
};
|
||||
}
|
||||
import { mapGetters } from "vuex";
|
||||
|
||||
export default {
|
||||
name: "RawMaterialSelect",
|
||||
@@ -62,18 +53,13 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.fetchOptions("");
|
||||
this.options = this.rawMaterialList;
|
||||
console.log(this.options, this.rawMaterialList);
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['rawMaterialList'])
|
||||
},
|
||||
methods: {
|
||||
fetchOptions() {
|
||||
this.loading = true;
|
||||
listRawMaterial({ pageNum: 1, pageSize: 9999 }).then(res => {
|
||||
this.options = res.rows || [];
|
||||
this.loading = false;
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
async onChange(val) {
|
||||
const rawMaterial = this.options.find(p => p.rawMaterialId === val);
|
||||
this.$emit('change', rawMaterial);
|
||||
|
||||
Reference in New Issue
Block a user