资产存放位置--完成20%

This commit is contained in:
Vinjor 2024-08-14 10:19:30 +08:00
parent cd535d5c0b
commit f55b8674fa
2 changed files with 32 additions and 27 deletions

View File

@ -3,27 +3,34 @@
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="45%" v-dialogDrag append-to-body>
<el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="100px">
<el-form-item label="企业idbase_company表中的id" prop="corpId">
<el-input v-model="formData.corpId" placeholder="请输入企业idbase_company表中的id" />
</el-form-item>
<el-form-item label="部门idsystem_dept表中的id用来做数据权限控制" prop="deptId">
<el-input v-model="formData.deptId" placeholder="请输入部门idsystem_dept表中的id用来做数据权限控制" />
</el-form-item>
<el-form-item label="存放地名称" prop="posName">
<el-input v-model="formData.posName" placeholder="请输入存放地名称" />
</el-form-item>
<el-row :gutter="2">
<el-col :span="12">
<el-form-item label="存放地名称" prop="posName">
<el-input v-model="formData.posName" placeholder="请输入存放地名称"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="存放类型" prop="depositType">
<el-select v-model="formData.depositType" placeholder="请选择存放类型">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMPANY_DEPOSIT_TYPE)" :key="dict.value"
:label="dict.label" :value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="2">
<el-col :span="12">
<el-form-item label="面积" prop="area">
<el-input type="number" v-model="formData.area" placeholder="请输入面积">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="存放地地址" prop="address">
<el-input v-model="formData.address" placeholder="请输入存放地地址" />
</el-form-item>
<el-form-item label="面积" prop="area">
<el-input v-model="formData.area" placeholder="请输入面积" />
</el-form-item>
<el-form-item label="存放类型" prop="depositType">
<el-select v-model="formData.depositType" placeholder="请选择存放类型">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMPANY_DEPOSIT_TYPE)" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" :disabled="formLoading"> </el-button>
@ -60,6 +67,10 @@ export default {
},
//
formRules: {
posName: [{ required: true, message: '存放地名称不能为空', trigger: 'blur' }],
depositType: [{ required: true, message: '存放类型不能为空', trigger: 'blur' }],
area: [{ required: true, message: '面积不能为空', trigger: 'blur' }],
address: [{ required: true, message: '存放地地址不能为空', trigger: 'blur' }],
},
};
},
@ -74,12 +85,12 @@ export default {
try {
const res = await PropertyPosApi.getPropertyPos(id);
this.formData = res.data;
this.title = "修改企业管理-资产存放位置";
this.dialogTitle = "修改资产存放位置";
} finally {
this.formLoading = false;
}
}
this.title = "新增企业管理-资产存放位置";
this.dialogTitle = "新增资产存放位置";
},
/** 提交按钮 */
async submitForm() {

View File

@ -48,8 +48,7 @@
}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="企业idbase_company表中的id" align="center" prop="corpId" />
<el-table-column label="部门idsystem_dept表中的id用来做数据权限控制" align="center" prop="deptId" /> -->
<el-table-column label="所属企业" align="center" prop="corpName" />
<el-table-column label="存放地名称" align="center" prop="posName" />
<el-table-column label="存放地地址" align="center" prop="address" />
<el-table-column label="面积" align="center" prop="area" />
@ -58,11 +57,6 @@
<dict-tag :type="DICT_TYPE.COMPANY_DEPOSIT_TYPE" :value="scope.row.depositType" />
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="200">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"