Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | }) |
| | | } |
| | | |
| | | // /supply/supplyList |
| | | // 查询供应商列表 |
| | | export function getSupplyList(query) { |
| | | return request({ |
| | | url: '/supply/supplyList', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // /coalInfo/coalInfoList |
| | | // 查询煤种列表 |
| | | export function getCoalInfoList(query) { |
| | | return request({ |
| | | url: '/coalInfo/coalInfoList', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | |
| | | <el-dialog v-model="dialogVisible" :title="title" width="600" :close-on-click-modal="false" |
| | | :before-close="handleClose"> |
| | | <el-form ref="formRef" style="max-width: 400px; margin: 0 auto" :model="formData" :rules="rules" label-width="auto"> |
| | | <el-form-item label="客户名称" prop="supplierName"> |
| | | <el-form-item label="供应商名称" prop="supplierName"> |
| | | <el-input v-model="formData.supplierName" placeholder="请输入供货商名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="纳税人识别号" prop="taxpayerId"> |
| | |
| | | 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: [ |