houseOptions.js 470 B

1234567891011121314151617181920212223242526272829
  1. import { getStorehouse } from "@/api/system.js"
  2. export default {
  3. data() {
  4. return {
  5. houseOptions: []
  6. }
  7. },
  8. methods: {
  9. getHouseOptions(orgId) {
  10. console.log('123123123', orgId);
  11. this.houseOptions = []
  12. return getStorehouse({
  13. orgId
  14. }).then(resp => {
  15. if (resp.data) {
  16. this.houseOptions = resp.data.map(d => {
  17. return {
  18. text: d.storehouseName,
  19. value: d.storehouseId,
  20. raw: d,
  21. }
  22. })
  23. }
  24. })
  25. },
  26. }
  27. }