| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="代理人" |
| | | prop="agent"> |
| | | <el-select v-model="form.agent" |
| | | placeholder="请选择代理人" |
| | | clearable |
| | | filterable |
| | | :disabled="agentOptions.length === 0" |
| | | :no-data-text="agentNoDataText"> |
| | | <el-option v-for="(contact, index) in agentOptions" |
| | | :key="getAgentOptionKey(contact, index)" |
| | | :label="getAgentLabel(contact)" |
| | | :value="contact.contactPhone" |
| | | :disabled="!contact.contactPhone"> |
| | | <span>{{ contact.contactPerson || "-" }}</span> |
| | | <span style="float: right; color: var(--el-text-color-secondary); font-size: 12px;"> |
| | | {{ contact.contactPhone || "" }} |
| | | </span> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="传真" |
| | | prop="fax"> |
| | | <el-input v-model="form.fax" |
| | | placeholder="请输入" |
| | | clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30" |
| | | v-for="(contact, index) in formYYs.contactList" |
| | | :key="index"> |
| | |
| | | </el-row> |
| | | <el-button @click="addNewContact" |
| | | style="margin-bottom: 10px;">+ 新增联系人</el-button> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="代理人" |
| | | prop="agent"> |
| | | <el-select v-model="form.agent" |
| | | placeholder="请选择代理人" |
| | | clearable |
| | | filterable |
| | | :disabled="agentOptions.length === 0" |
| | | :no-data-text="agentNoDataText"> |
| | | <el-option v-for="(contact, index) in agentOptions" |
| | | :key="getAgentOptionKey(contact, index)" |
| | | :label="getAgentLabel(contact)" |
| | | :value="contact.contactPhone" |
| | | :disabled="!contact.contactPhone"> |
| | | <span>{{ contact.contactPerson || "-" }}</span> |
| | | <span style="float: right; color: var(--el-text-color-secondary); font-size: 12px;"> |
| | | {{ contact.contactPhone || "" }} |
| | | </span> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="传真" |
| | | prop="fax"> |
| | | <el-input v-model="form.fax" |
| | | placeholder="请输入" |
| | | clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="维护人:" |
| | |
| | | import { getToken } from "@/utils/auth.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const userStore = useUserStore(); |
| | | const isAdminUser = computed(() => |
| | | ["admin", "普通2", "最高1"].some(r => (userStore.roles || []).includes(r)) |
| | | ); |
| | | const assignDialogVisible = ref(false); |
| | | const assignFormRef = ref(); |
| | | const assignForm = reactive({ |
| | |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | | // 检查是否有他人维护的数据 |
| | | // 检查是否有他人维护的数据(管理员不受限) |
| | | const unauthorizedData = selectedRows.value.filter( |
| | | item => item.maintainer !== userStore.nickName |
| | | item => item.maintainer !== userStore.nickName && !isAdminUser.value |
| | | ); |
| | | if (unauthorizedData.length > 0) { |
| | | proxy.$modal.msgWarning("不可删除他人维护的数据"); |