完成Banner,设备管理模块,进行中 水电表

This commit is contained in:
Zy
2026-04-24 17:52:50 +08:00
parent 290db6ba5d
commit ab736fa15f
36 changed files with 2314 additions and 636 deletions

View File

@@ -17,13 +17,11 @@
<el-form-item label="计量单位" prop="unit">
<span>{{ form.unit }}</span>
</el-form-item>
<el-form-item label="成本" prop="unit">
<span>{{ form.unit }}</span>
<el-input v-model.trim="form.remark" placeholder="请输入成本" />
<el-form-item label="成本" prop="totalInNum">
<el-input v-model.trim="form.totalInNum" placeholder="请输入成本" />
</el-form-item>
<el-form-item label="当前库存" prop="unit">
<span>{{ form.unit }}</span>
<el-input v-model.trim="form.remark" placeholder="请输入当前库存" />
<el-form-item label="当前库存" prop="totalStockNum">
<el-input-number v-model="form.totalStockNum" placeholder="请输入当前库存" />
</el-form-item>
<el-form-item style="margin-top: 30px">
@@ -41,18 +39,18 @@ import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import { getMaterial, updateMaterial, addMaterial } from '@/api/system/Tmaterial';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const router = useRouter();
const route = useRoute();
const formRef = ref();
const form = ref({
id: null,
materialId: '', // 物料名称
materialName: '', // 物料名称
brand: '', // 联系电话
model: '', // 邮箱
unit: '', // 地址
avgCostPrice: '', // 地址
remark: '' // 备注
});
const rules = ref({
@@ -67,11 +65,14 @@ if (route.query.id) {
getMaterial(userid.value).then((res) => {
form.value = {
id: res.data.id,
materialName: res.data.materialName,
remark: res.data.remark,
'materialId': res.data.materialId,
'materialName': res.data.materialName,
brand: res.data.brand,
model: res.data.model,
unit: res.data.unit,
remark: res.data.remark
'avgCostPrice': res.data.avgCostPrice,
'totalStockValue': res.data.totalStockValue
};
});
}

View File

@@ -26,7 +26,7 @@
<el-card class="flex-1" shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<el-button type="primary" icon="Plus" @click="handleAdd">添加</el-button>
<!-- <el-button type="primary" icon="Plus" @click="handleAdd">添加</el-button> -->
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
@@ -42,8 +42,8 @@
<el-table-column label="备注" show-overflow-tooltip align="center" prop="remark" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:material:edit']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:material:remove']">删除</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:material:edit']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:material:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -54,7 +54,7 @@
</template>
<script setup name="Material" lang="ts">
import { listMaterial, getMaterial, delMaterial, addMaterial, updateMaterial } from '@/api/system/Tmaterial';
import { delMaterial } from '@/api/system/Tmaterial';
import { MaterialVO, MaterialQuery, MaterialForm } from '@/api/system/Tmaterial/type';
import { listStock } from '@/api/system/Tstock/index';
@@ -128,7 +128,7 @@ const handleUpdate = async (row?: MaterialVO) => {
router.push({
path: '/warehouse/editInventory',
query: {
id: row.id
id: row.materialId
}
});
};