| | |
| | | > |
| | | <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="150px" > |
| | | <el-form-item v-if="state.isAdmin" label="单位:" prop="companyId"> |
| | | <el-select v-model="state.form.companyId" placeholder="请选择" :disabled="state.title =='查看'" clearable style="width: 100%"> |
| | | <el-select v-model="state.form.companyId" placeholder="请选择" :disabled="state.title =='查看'" clearable style="width: 100%" @change="getSupplier()"> |
| | | <el-option |
| | | v-for="item in state.companyList" |
| | | :key="item.id" |
| | |
| | | if(isAdmin){ |
| | | state.companyList = companyList |
| | | } |
| | | await getSupplierList() |
| | | await getSupplierList(companyId) |
| | | state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' |
| | | state.form.companyId = companyId |
| | | if(state.title == '编辑'||state.title == '查看'){ |
| | |
| | | dialogVisible.value = true |
| | | } |
| | | |
| | | const getSupplierList = async ()=>{ |
| | | const getSupplier = async ()=>{ |
| | | await getSupplierList(state.form.companyId) |
| | | } |
| | | |
| | | const getSupplierList = async (companyId)=>{ |
| | | const queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 999 |
| | | pageSize: 999, |
| | | companyId: companyId |
| | | } |
| | | const res = await getSupplierPage(queryParams) |
| | | if (res.code == 200) { |