| | |
| | | |
| | | <!-- 操作按钮区 --> |
| | | <el-row :gutter="24" class="table-toolbar"> |
| | | <el-button :icon="Plus" type="primary" @click="handleAdd" |
| | | >新建</el-button |
| | | <el-button :icon="Plus" type="primary" v-show="activeTab === 'management'" @click="handleAdd" |
| | | >设备新增</el-button |
| | | > |
| | | <el-button :icon="Plus" type="primary" v-show="activeTab === 'equipmentRequisition'" @click="handleAdd" |
| | | >领用</el-button |
| | | > |
| | | <el-button :icon="Delete" type="danger" @click="handleDelete" |
| | | >删除</el-button |
| | |
| | | <!-- 表格组件 --> |
| | | <div> |
| | | <data-table |
| | | :showOverflowTooltip="false" |
| | | :border="true" |
| | | :columns="columns" |
| | | :loading="loading" |
| | |
| | | @selection-change="handleSelectionChange" |
| | | :operations="['edit', 'viewRow']" |
| | | :operationsWidth="200" |
| | | |
| | | > |
| | | <!-- 字段名称列的自定义插槽 - 显示为标签 --> |
| | | <template |
| | |
| | | v-model="equipmentRequisitionDialog" |
| | | :formData="form" |
| | | :maxQuantity="getMaxQuantity()" |
| | | :addOrEdit="addOrEdit" |
| | | @submit="onEquipmentRequisitionSubmit" |
| | | /> |
| | | <UsageRecord |
| | | <!-- <UsageRecord |
| | | v-if="activeTab == 'usageRecord'" |
| | | v-model:copyForm="copyForm" |
| | | v-model:usageRecordDialog="usageRecordDialog" |
| | | :addOrEdit="addOrEdit" |
| | | :form="form" |
| | | @submit="getList" |
| | | /> |
| | | /> --> |
| | | </el-card> |
| | | </div> |
| | | </template> |
| | |
| | | columns: [ |
| | | { prop: "equipmentNo", label: "设备编号", minWidth: 100 }, |
| | | { prop: "equipmentName", label: "设备名称", minWidth: 100 }, |
| | | { prop: "quantity", label: "数量", minWidth: 100 }, |
| | | { prop: "quantity", label: "总数量", minWidth: 100 }, |
| | | { prop: "usedNo", label: "已使用数量", minWidth: 100 }, |
| | | { prop: "specification", label: "规格型号", minWidth: 100 }, |
| | | { |
| | | prop: "usageStatus", |
| | | label: "使用状态", |
| | | minWidth: 100, |
| | | formatter: (row) => row.usageStatus == 1 ? "启用" : "禁用" |
| | | }, |
| | | { prop: "purchaseDate", label: "采购日期", minWidth: 100 }, |
| | | { prop: "purchasePrice", label: "采购价格", minWidth: 100 }, |
| | | ] |
| | |
| | | api: getUsageRecordList, |
| | | deleteApi: null, |
| | | columns: [ |
| | | { prop: "userId", label: "领用人", minWidth: 100 }, |
| | | { prop: "equipmentId", label: "设备ID", minWidth: 100 }, |
| | | { prop: "userName", label: "领用人", minWidth: 100 }, |
| | | { prop: "equipmentNo", label: "设备编号", minWidth: 100 }, |
| | | { prop: "equipmentName", label: "设备名称", minWidth: 100 }, |
| | | { prop: "usageQuantity", label: "领用数量", minWidth: 100 }, |
| | | { |
| | | prop: "equipmentStatus", |
| | | label: "使用状态", |
| | | minWidth: 100, |
| | | formatter: (row) => row.usageStatus == 1 ? "启用" : "禁用" |
| | | formatter: (row) => row.usageStatus == 1 ? "使用中" : "已归还" |
| | | }, |
| | | { prop: "usageStartTime", label: "使用开始时间", minWidth: 100 }, |
| | | { prop: "usageEndTime", label: "使用结束时间", minWidth: 100 }, |
| | | { prop: "remarks", label: "备注", minWidth: 100 }, |
| | | ] |
| | | }, |
| | | usageRecord:{ |
| | | label: "领用记录", |
| | | searchPlaceholder: "设备编号/设备名称/规格型号", |
| | | showSearch: true, |
| | | api: getManagementList, |
| | | deleteApi: delEquipment, |
| | | columns: [ |
| | | { prop: "equipmentId", label: "设备编号", minWidth: 100 }, |
| | | { prop: "equipmentName", label: "设备名称", minWidth: 100 }, |
| | | { prop: "quantity", label: "数量", minWidth: 100 }, |
| | | { prop: "specification", label: "规格型号", minWidth: 100 }, |
| | | { |
| | | prop: "usageStatus", |
| | | label: "使用状态", |
| | | minWidth: 100, |
| | | formatter: (row) => row.usageStatus == 1 ? "启用" : "禁用" |
| | | }, |
| | | { prop: "purchaseDate", label: "采购日期", minWidth: 100 }, |
| | | { prop: "purchasePrice", label: "采购价格", minWidth: 100 }, |
| | | ] |
| | | }, |
| | | // usageRecord:{ |
| | | // label: "领用记录", |
| | | // searchPlaceholder: "设备编号/设备名称/规格型号", |
| | | // showSearch: true, |
| | | // api: getManagementList, |
| | | // deleteApi: delEquipment, |
| | | // columns: [ |
| | | // { prop: "equipmentId", label: "设备编号", minWidth: 100 }, |
| | | // { prop: "equipmentName", label: "设备名称", minWidth: 100 }, |
| | | // { prop: "quantity", label: "数量", minWidth: 100 }, |
| | | // { prop: "specification", label: "规格型号", minWidth: 100 }, |
| | | // { |
| | | // prop: "usageStatus", |
| | | // label: "使用状态", |
| | | // minWidth: 100, |
| | | // formatter: (row) => row.usageStatus == 1 ? "启用" : "禁用" |
| | | // }, |
| | | // { prop: "purchaseDate", label: "采购日期", minWidth: 100 }, |
| | | // { prop: "purchasePrice", label: "采购价格", minWidth: 100 }, |
| | | // ] |
| | | // }, |
| | | |
| | | // 后续可以在这里添加新的标签页配置 |
| | | }; |