|
@@ -65,14 +65,6 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="资产性质" prop="property">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.property"
|
|
|
- placeholder="请输入资产性质"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="所属公司" prop="corporation">
|
|
|
<div style="display:inline-block; width: 183px;">
|
|
|
<treeselect
|
|
@@ -83,6 +75,26 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item v-if="isExist('管理状态')" label="管理状态" prop="manageStatus">
|
|
|
+ <el-select v-model="queryParams.manageStatus" placeholder="请选择管理状态" clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.sys_manger_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if="isExist('资产性质')" label="资产性质" prop="property">
|
|
|
+ <el-select v-model="queryParams.property" placeholder="请选择资产性质" clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.sys_asset_property"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item v-if="isExist('规格型号')" label="规格型号" prop="specificationsModel">
|
|
|
<el-input
|
|
|
v-model="queryParams.specificationsModel"
|
|
@@ -121,7 +133,7 @@
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="请选择启用日期">
|
|
|
- </el-date-picker>
|
|
|
+ </el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="isExist('原值')" label="原值" prop="originalValue">
|
|
|
<el-input
|
|
@@ -378,6 +390,17 @@
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
+ type="info"
|
|
|
+ plain
|
|
|
+ icon="el-icon-upload2"
|
|
|
+ size="mini"
|
|
|
+ @click="handleImport"
|
|
|
+ v-hasPermi="['asset:information:import']"
|
|
|
+ >导入</el-button>
|
|
|
+ <!-- v-hasPermi="['collegeManage:studentBase:import']" -->
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
type="primary"
|
|
|
plain
|
|
|
icon="el-icon-menu"
|
|
@@ -405,7 +428,6 @@
|
|
|
<span>{{ scope.row.categoryNumber != null ? categoryName(scope.row.categoryNumber) : ""}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="管理状态" align="center" prop="manageStatus" />
|
|
|
<el-table-column label="使用部门" align="center" prop="userDepartment" >
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.userDepartment != null ? companyName(scope.row.userDepartment) : ""}}</span>
|
|
@@ -427,10 +449,19 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="备注" align="center" prop="remark" />
|
|
|
+ <el-table-column v-if="isExist('管理状态')" label="管理状态" align="center" prop="manageStatus" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.sys_manger_status" :value="scope.row.manageStatus"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column v-if="isExist('资产性质')" label="资产性质" align="center" prop="property" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.sys_asset_property" :value="scope.row.property"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column v-if="isExist('规格型号')" label="规格型号" align="center" prop="specificationsModel" />
|
|
|
<el-table-column v-if="isExist('ABC分类')" label="ABC分类" align="center" prop="abcCategory" />
|
|
|
<el-table-column v-if="isExist('责任人')" label="责任人" align="center" prop="responsiblePerson" />
|
|
|
- <el-table-column v-if="isExist('资产性质')" label="资产性质" align="center" prop="property" />
|
|
|
<el-table-column v-if="isExist('购置日期')" label="购置日期" align="center" prop="purchaseDate" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.purchaseDate, '{y}-{m}-{d}') }}</span>
|
|
@@ -502,7 +533,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
-
|
|
|
+
|
|
|
<pagination
|
|
|
v-show="total>0"
|
|
|
:total="total"
|
|
@@ -562,9 +593,6 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="资产性质" prop="property">
|
|
|
- <el-input v-model="form.property" placeholder="请输入资产性质" />
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="所属公司" prop="corporation">
|
|
|
<treeselect
|
|
|
v-model="form.corporation"
|
|
@@ -576,6 +604,16 @@
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item v-if="isExist('资产性质')" label="资产性质" prop="property">
|
|
|
+ <el-select v-model="form.property" placeholder="请选择资产性质" clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.sys_asset_property"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item v-if="isExist('规格型号')" label="规格型号" prop="specificationsModel">
|
|
|
<el-input v-model="form.specificationsModel" placeholder="请输入规格型号" />
|
|
|
</el-form-item>
|
|
@@ -604,7 +642,7 @@
|
|
|
<el-form-item v-if="isExist('原值')" label="原值" prop="originalValue">
|
|
|
<el-input v-model="form.originalValue" placeholder="请输入原值" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="使用年限" prop="durableYears">
|
|
|
+ <el-form-item v-if="isExist('使用年限')" label="使用年限" prop="durableYears">
|
|
|
<el-input v-model="form.durableYears" placeholder="请输入使用年限" />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="isExist('净值')" label="净值" prop="netValue">
|
|
@@ -713,6 +751,8 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<el-checkbox-group v-model="checkList" mini>
|
|
|
+ <el-checkbox label="管理状态" border></el-checkbox>
|
|
|
+ <el-checkbox label="资产性质" border></el-checkbox>
|
|
|
<el-checkbox label="规格型号" border></el-checkbox>
|
|
|
<el-checkbox label="ABC分类" border></el-checkbox>
|
|
|
<el-checkbox label="责任人" border></el-checkbox>
|
|
@@ -742,6 +782,34 @@
|
|
|
<el-button @click="cancelDIY">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
|
|
+ <el-upload
|
|
|
+ ref="upload"
|
|
|
+ :limit="1"
|
|
|
+ accept=".xlsx, .xls"
|
|
|
+ :headers="upload.headers"
|
|
|
+ :action="upload.url + '?updateSupport=' + upload.updateSupport"
|
|
|
+ :disabled="upload.isUploading"
|
|
|
+ :on-progress="handleFileUploadProgress"
|
|
|
+ :on-success="handleFileSuccess"
|
|
|
+ :auto-upload="false"
|
|
|
+ drag
|
|
|
+ >
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
+ <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
+ <div class="el-upload__tip text-center" slot="tip">
|
|
|
+ <div class="el-upload__tip" slot="tip">
|
|
|
+ <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
|
|
|
+ </div>
|
|
|
+ <span>仅允许导入xls、xlsx格式文件。</span>
|
|
|
+ <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
|
+ <el-button @click="upload.open = false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -752,11 +820,13 @@ import { listLocation } from "@/api/asset/location";
|
|
|
import ImageUploadTemp from "@/components/ImageUploadTemp"
|
|
|
import { listDept } from "@/api/system/dept";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
|
+
|
|
|
export default {
|
|
|
name: "Information",
|
|
|
- dicts: ['asset_record_status', 'sys_yes_no'],
|
|
|
+ dicts: ['asset_record_status', 'sys_yes_no', 'sys_manger_status', 'sys_asset_property'],
|
|
|
components:{
|
|
|
ImageUploadTemp,Treeselect
|
|
|
},
|
|
@@ -864,7 +934,21 @@ export default {
|
|
|
recordStatus: [
|
|
|
{ required: true, message: "记录状态不能为空", trigger: "change" }
|
|
|
],
|
|
|
- }
|
|
|
+ },
|
|
|
+ upload: {
|
|
|
+ // 是否显示弹出层(用户导入)
|
|
|
+ open: false,
|
|
|
+ // 弹出层标题(用户导入)
|
|
|
+ title: "",
|
|
|
+ // 是否禁用上传
|
|
|
+ isUploading: false,
|
|
|
+ // 是否更新已经存在的用户数据
|
|
|
+ updateSupport: 1,
|
|
|
+ // 设置上传的请求头部
|
|
|
+ headers: { Authorization: "Bearer " + getToken() },
|
|
|
+ // 上传的地址
|
|
|
+ url: process.env.VUE_APP_BASE_API + "/asset/information/importData" // todo
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -1053,6 +1137,32 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ /** 导入按钮操作 */
|
|
|
+ handleImport() {
|
|
|
+ this.upload.title = "资产信息导入"; // todo
|
|
|
+ this.upload.open = true;
|
|
|
+ },
|
|
|
+ /** 下载模板操作 */
|
|
|
+ importTemplate() {
|
|
|
+ this.download('/asset/information/importTemplate', {
|
|
|
+ }, `stu_base_template_${new Date().getTime()}.xlsx`) // todo
|
|
|
+ },
|
|
|
+ // 文件上传中处理
|
|
|
+ handleFileUploadProgress(event, file, fileList) {
|
|
|
+ this.upload.isUploading = true;
|
|
|
+ },
|
|
|
+ // 文件上传成功处理
|
|
|
+ handleFileSuccess(response, file, fileList) {
|
|
|
+ this.upload.open = false;
|
|
|
+ this.upload.isUploading = false;
|
|
|
+ this.$refs.upload.clearFiles();
|
|
|
+ this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ // 提交上传文件
|
|
|
+ submitFileForm() {
|
|
|
+ this.$refs.upload.submit();
|
|
|
+ },
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|