| | |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <div class="gd-table-toolbar"> |
| | | <div class="gd-table-toolbar" v-if="permissionList.addBtn"> |
| | | <el-button :icon="Plus" color="#4C34FF" type="primary" @click="openForm('add')">供需填报新增</el-button> |
| | | </div> |
| | | |
| | |
| | | <el-table-column label="操作" class-name="operation-btns" width="150"> |
| | | <template v-slot="{ row }"> |
| | | <el-link type="primary" @click="openForm('view', row)">查看</el-link> |
| | | <!-- 只对非审批状态显示编辑和删除按钮 --> |
| | | <el-link type="primary" @click="openForm('edit', row)" v-if="!['1', '2', '3'].includes(row.demandStatus)">编辑</el-link> |
| | | <el-link type="primary" @click="handleDelete(row)" v-if="!['1', '2', '3'].includes(row.demandStatus)">删除</el-link> |
| | | <el-link type="primary" @click="openForm('edit', row)" v-if="!['1', '2', '3'].includes(row.demandStatus) && permissionList.addBtn">编辑</el-link> |
| | | <el-link type="primary" @click="handleDelete(row)" v-if="!['1', '2', '3'].includes(row.demandStatus) && permissionList.deleteBtn">删除</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | gdSupplyDemandPageApi, |
| | | gdSupplyDemandRemoveApi, |
| | | } from '@/views/orderView/orderDataManage/supplyAdd/supplyAddApi' |
| | | |
| | | import { useStore } from 'vuex' |
| | | const store = useStore() |
| | | const permission = computed(() => store.state.user.permission); |
| | | // 初始化查询参数 |
| | | const initSearchParams = () => ({ |
| | | demandName: '', // 需求名称 |
| | |
| | | provide('detailDemandStatus', detailDemandStatus) |
| | | const reasonForRejection = ref('') //拒绝原因 |
| | | provide('reasonForRejection', reasonForRejection) |
| | | |
| | | function validData(value, defaultValue) { |
| | | return value !== undefined ? value : defaultValue |
| | | } |
| | | const permissionList = computed(() => { |
| | | return { |
| | | addBtn: validData(permission.value.orderData_addDemand, false), |
| | | deleteBtn: validData(permission.value.orderData_delete, false), |
| | | } |
| | | }) |
| | | |
| | | // 根据部门ID获取部门名称 |
| | | function getDeptNameById(deptId, deptList) { |
| | | if (!deptId || !Array.isArray(deptList)) return '' |