feat: 资产入库初步完成

This commit is contained in:
caoqianming 2025-12-25 13:54:41 +08:00
parent 824931b48c
commit 81557cdd78
2 changed files with 23 additions and 12 deletions

View File

@ -28,7 +28,7 @@
:query="query"
@row-click="(row)=>{t_id=row.id;mode='show';drawerVisible=true;}"
>
<el-table-column label="卡片编号" prop="card_number" width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="资产ID" prop="id" width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="固定资产名称" prop="name" width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="specification" width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="资产类别" prop="cate_name" width="100" show-overflow-tooltip></el-table-column>

View File

@ -1,12 +1,13 @@
<template>
<el-container>
<el-header>
<div class="left-panel"></div>
<div class="left-panel">
<el-button type="primary" @click="handleAdd('入库')" v-auth="'assetlog.create'">资产入库</el-button>
</div>
<div class="right-panel">
<!-- <el-button type="primary" @click="handleAdd">新增</el-button> -->
<el-input
v-model="query.search"
placeholder="设备信息等"
placeholder="关键词"
clearable
@keyup.enter="$refs.table.refresh()"
></el-input>
@ -21,13 +22,13 @@
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="API.em.repair.list"
:apiObj="API.asm.assetlog.list"
row-key="id"
stripe
:query="query"
@row-click="(row)=>{t_id=row.id;mode='show';drawerVisible=true;}"
@row-click="(row)=>{t_id=row.id;mode='show';drawerVisible=true;drawerTitle=row.type}"
>
<el-table-column label="设备" prop="equipment_fullname" width="300" show-overflow-tooltip></el-table-column>
<el-table-column label="操作类型" prop="type" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" width="300" show-overflow-tooltip>
<template #default="scope">
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
@ -35,21 +36,31 @@
</el-tag>
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
</template>
</el-table-column>`
<el-table-column label="故障类别" prop="fault_cate" width="100" show-overflow-tooltip></el-table-column>`
<el-table-column label="故障描述" prop="fault_description" show-overflow-tooltip></el-table-column>
<el-table-column label="维修人" prop="repair_user_name" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="维修开始时间" prop="repair_start_time" width="200" show-overflow-tooltip></el-table-column>
</el-table-column>
<el-table-column label="启用日期" prop="start_date" width="160" show-overflow-tooltip></el-table-column>
<el-table-column label="保管部门" prop="keep_dept_name" width="160" show-overflow-tooltip></el-table-column>`
<el-table-column label="保管人" prop="keeper_name" width="80" show-overflow-tooltip></el-table-column>
<el-table-column label="资产条数" width="80" show-overflow-tooltip>
<template #default="scope">
{{ scope.row.items?.length }}
</template>
</el-table-column>
<el-table-column label="创建时间" prop="create_time" show-overflow-tooltip></el-table-column>
</scTable>
</el-main>
</el-container>
<el-drawer :title="drawerTitle" v-model="drawerVisible" :size="'80%'" destroy-on-close>
<assetlogin_form :mode="mode" :t_id="t_id"></assetlogin_form>
</el-drawer>
</template>
<script setup>
import { ref } from 'vue'
import API from '@/api'
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
import assetlogin_form from './assetlogin_form.vue'
const query = ref({});
const drawerVisible = ref(false);
const drawerTitle = ref('资产入库');
const mode = ref('add');
const t_id = ref(null);
const handleAdd = () => {