| | |
| | | <el-form :model="state.form" size="default" ref="busRef" :rules="state.rules" > |
| | | <el-row :gutter="24"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="企业名称:" prop="companyId" v-if="state.isAdmin"> |
| | | <el-form-item label="单位名称:" prop="companyId" v-if="state.isAdmin"> |
| | | <el-select v-model="state.form.companyId" placeholder="请选择" filterable clearable style="width: 100%" :disabled="title == '查看' || title == '编辑' || !state.isAdmin" @change="selectValueCom"> |
| | | <el-option |
| | | v-for="item in state.companyList" |
| | |
| | | v-for="item in state.supplierList" |
| | | :key="item.id" |
| | | :label="item.customerName" |
| | | :value="item.id"> |
| | | :value="item.customerName"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ; |
| | | if(type === 'edit' || type === 'review') { |
| | | state.form = JSON.parse(JSON.stringify(value)); |
| | | state.form.unitName = Number(state.form.unitName) |
| | | // state.form.unitName = Number(state.form.unitName) |
| | | if(state.isAdmin){ |
| | | state.form.companyId = value.companyId |
| | | state.form.companyName = value.companyName |
| | |
| | | state.form.address = '' |
| | | state.form.phone = '' |
| | | state.supplierList.forEach(item => { |
| | | if(val == item.id){ |
| | | if(val == item.customerName){ |
| | | state.form.person = item.person |
| | | state.form.address = item.customerAddr |
| | | state.form.phone = item.phone |