| | |
| | | import { ref, defineProps, watch, onMounted, nextTick, computed } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | import { addOrEditPR } from "@/api/procureMent"; |
| | | import { addOrEditPR,getSupplyList, getCoalInfoList } from "@/api/procureMent"; |
| | | import { getSupply } from "@/api/basicInformation/supplier"; |
| | | import { getCoalInfo } from "@/api/basicInformation/coal"; |
| | | const props = defineProps({ |
| | |
| | | const getDropdownData = async () => { |
| | | try { |
| | | const [supplyRes, coalRes] = await Promise.all([ |
| | | getSupply(), |
| | | getCoalInfo(), |
| | | getSupplyList(), |
| | | getCoalInfoList(), |
| | | ]); |
| | | let supplyData = supplyRes.data.records; |
| | | let coalData = coalRes.data.records; |
| | | console.log(supplyRes, coalRes); |
| | | let supplyData = supplyRes.data; |
| | | let coalData = coalRes.data; |
| | | supplyList.value = supplyData.map((item) => ({ |
| | | value: item.id, |
| | | label: item.supplierName, |
| | |
| | | onMounted(async () => { |
| | | let res = await userStore.getInfo(); |
| | | userInfo.value = res; |
| | | getDropdownData() |
| | | }); |
| | | const rules = { |
| | | supplierName: [ |