fix:协议管理页面无法预览附件图片
This commit is contained in:
parent
b9dd07af15
commit
5d7df9f110
|
|
@ -104,7 +104,11 @@
|
||||||
prop="contractCode"
|
prop="contractCode"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="附件图片" align="center" prop="fileName" :show-overflow-tooltip="true" />
|
<el-table-column label="附件图片" align="center" prop="fileName" :show-overflow-tooltip="true">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span @click="openImg(scope.row.fileUrl)" style="color: #02A7F0;">{{ scope.row.fileName }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="签订日期" align="center" prop="signTime" :show-overflow-tooltip="true" />
|
<el-table-column label="签订日期" align="center" prop="signTime" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="往来单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
<el-table-column label="往来单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -563,7 +567,7 @@ export default {
|
||||||
getAgreementInfoId(param).then(response => {
|
getAgreementInfoId(param).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
if (response.data.leaseDay == null) {
|
if (response.data.leaseDay == null) {
|
||||||
this.form.leaseDay = undefined
|
this.form.leaseDay = undefined;
|
||||||
}
|
}
|
||||||
this.fileList = [];
|
this.fileList = [];
|
||||||
this.checkUrlList = [];
|
this.checkUrlList = [];
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,14 @@
|
||||||
<el-input
|
<el-input
|
||||||
v-model="typeName"
|
v-model="typeName"
|
||||||
placeholder="请输入类型名称"
|
placeholder="请输入类型名称"
|
||||||
clearable maxlength="50"
|
clearable
|
||||||
|
maxlength="50"
|
||||||
size="small"
|
size="small"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
style="margin-bottom: 20px"
|
style="margin-bottom: 20px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="head-container" style="">
|
<div class="head-container" style>
|
||||||
<el-tree
|
<el-tree
|
||||||
style="height: 700px;overflow: scroll;"
|
style="height: 700px;overflow: scroll;"
|
||||||
:data="treeOptions"
|
:data="treeOptions"
|
||||||
|
|
@ -30,8 +31,14 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<!--用户数据-->
|
<!--用户数据-->
|
||||||
<el-col :span="20" :xs="24">
|
<el-col :span="20" :xs="24">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
<el-form
|
||||||
label-width="68px">
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
<el-form-item label="关键字" prop="typeName">
|
<el-form-item label="关键字" prop="typeName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.typeName"
|
v-model="queryParams.typeName"
|
||||||
|
|
@ -50,14 +57,7 @@
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
>新增
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -68,38 +68,118 @@
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
>导出
|
>导出
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col> -->
|
</el-col>-->
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" ></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="typeList" height="600" @selection-change="handleSelectionChange">
|
<el-table
|
||||||
<el-table-column type="selection" width="50" align="center"/>
|
v-loading="loading"
|
||||||
|
:data="typeList"
|
||||||
|
height="600"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
<el-table-column label="名称" align="center" key="typeName" prop="typeName" />
|
<el-table-column label="名称" align="center" key="typeName" prop="typeName" />
|
||||||
<el-table-column label="计量单位" align="center" key="unitName" prop="unitName" :show-overflow-tooltip="true"/>
|
<el-table-column
|
||||||
<el-table-column label="内部租赁价" align="center" key="leasePrice" prop="leasePrice" :show-overflow-tooltip="true" width="100"/>
|
label="计量单位"
|
||||||
<el-table-column label="原值" align="center" key="buyPrice" prop="buyPrice" :show-overflow-tooltip="true"/>
|
align="center"
|
||||||
<el-table-column label="丢失赔偿" align="center" key="payPrice" prop="payPrice" :show-overflow-tooltip="true"/>
|
key="unitName"
|
||||||
<el-table-column label="库管员" align="center" key="keeperUserName" prop="keeperUserName" :show-overflow-tooltip="true"/>
|
prop="unitName"
|
||||||
<el-table-column label="管理模式" align="center" key="manageType" prop="manageType" :show-overflow-tooltip="true">
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="内部租赁价"
|
||||||
|
align="center"
|
||||||
|
key="leasePrice"
|
||||||
|
prop="leasePrice"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
width="100"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="原值"
|
||||||
|
align="center"
|
||||||
|
key="buyPrice"
|
||||||
|
prop="buyPrice"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="丢失赔偿"
|
||||||
|
align="center"
|
||||||
|
key="payPrice"
|
||||||
|
prop="payPrice"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="库管员"
|
||||||
|
align="center"
|
||||||
|
key="keeperUserName"
|
||||||
|
prop="keeperUserName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="管理模式"
|
||||||
|
align="center"
|
||||||
|
key="manageType"
|
||||||
|
prop="manageType"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.manageType=='0'">编码管理</span>
|
<span v-if="scope.row.manageType=='0'">编码管理</span>
|
||||||
<span v-if="scope.row.manageType=='1'">数量管理</span>
|
<span v-if="scope.row.manageType=='1'">数量管理</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="图片" align="center" key="photoName" prop="photoName" :show-overflow-tooltip="true">
|
<el-table-column
|
||||||
|
label="图片"
|
||||||
|
align="center"
|
||||||
|
key="photoName"
|
||||||
|
prop="photoName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span @click="openImg(scope.row.photoUrl)" style="color: #02A7F0;"> {{ scope.row.photoName }} </span>
|
<span
|
||||||
|
@click="openImg(scope.row.photoUrl)"
|
||||||
|
style="color: #02A7F0;"
|
||||||
|
>{{ scope.row.photoName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="文档资料" align="center" key="documentName" prop="documentName" :show-overflow-tooltip="true">
|
<el-table-column
|
||||||
|
label="文档资料"
|
||||||
|
align="center"
|
||||||
|
key="documentName"
|
||||||
|
prop="documentName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<a :href="uploadUrl+scope.row.documentUrl" style="color: #02A7F0;" :download="scope.row.documentName">{{ scope.row.documentName }}</a>
|
<a
|
||||||
|
:href="uploadUrl+scope.row.documentUrl"
|
||||||
|
style="color: #02A7F0;"
|
||||||
|
:download="scope.row.documentName"
|
||||||
|
>{{ scope.row.documentName }}</a>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="资产属性" align="center" key="propName" prop="propName" :show-overflow-tooltip="true"/>
|
<el-table-column
|
||||||
<el-table-column label="厂家规格型号" align="center" key="facModel" prop="facModel" :show-overflow-tooltip="true" width="120"/>
|
label="资产属性"
|
||||||
<el-table-column label="备注信息" align="center" key="remark" prop="remark" :show-overflow-tooltip="true"/>
|
align="center"
|
||||||
|
key="propName"
|
||||||
|
prop="propName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="厂家规格型号"
|
||||||
|
align="center"
|
||||||
|
key="facModel"
|
||||||
|
prop="facModel"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
width="120"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="备注信息"
|
||||||
|
align="center"
|
||||||
|
key="remark"
|
||||||
|
prop="remark"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
@ -112,24 +192,19 @@
|
||||||
type="success"
|
type="success"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleConfig(scope.row)"
|
@click="handleConfig(scope.row)"
|
||||||
>配置
|
>配置</el-button>
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
>修改
|
>修改</el-button>
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除
|
>删除</el-button>
|
||||||
</el-button>
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -140,17 +215,28 @@
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/> -->
|
/>-->
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 添加或修改用户配置对话框 -->
|
<!-- 添加或修改用户配置对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="850px" append-to-body :close-on-click-modal="false">
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="open"
|
||||||
|
width="850px"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="所属上级" prop="parentId">
|
<el-form-item label="所属上级" prop="parentId">
|
||||||
<treeselect v-model="form.parentId" :options="treeOptions" :show-count="true" placeholder="请选择所属上级分类"/>
|
<treeselect
|
||||||
|
v-model="form.parentId"
|
||||||
|
:options="treeOptions"
|
||||||
|
:show-count="true"
|
||||||
|
placeholder="请选择所属上级分类"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
@ -169,7 +255,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="名称" prop="typeName">
|
<el-form-item label="名称" prop="typeName">
|
||||||
<el-input v-model="form.typeName" placeholder="请输入名称" maxlength="30"/>
|
<el-input v-model="form.typeName" placeholder="请输入名称" maxlength="30" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
@ -185,30 +271,38 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="内部租赁价" prop="leasePrice">
|
<el-form-item label="内部租赁价" prop="leasePrice">
|
||||||
<el-input v-model="form.leasePrice" type="number" placeholder="请输入租赁价格" maxlength="10"/>
|
<el-input
|
||||||
|
v-model="form.leasePrice"
|
||||||
|
type="number"
|
||||||
|
placeholder="请输入租赁价格"
|
||||||
|
maxlength="10"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="外部租赁价" prop="rentPrice">
|
<el-form-item label="外部租赁价" prop="rentPrice">
|
||||||
<el-input v-model="form.rentPrice" type="number" placeholder="请输入外部租赁价" maxlength="30"/>
|
<el-input
|
||||||
|
v-model="form.rentPrice"
|
||||||
|
type="number"
|
||||||
|
placeholder="请输入外部租赁价"
|
||||||
|
maxlength="30"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="原值" prop="buyPrice">
|
<el-form-item label="原值" prop="buyPrice">
|
||||||
<el-input v-model="form.buyPrice" type="number" placeholder="请输入原值" maxlength="30"/>
|
<el-input v-model="form.buyPrice" type="number" placeholder="请输入原值" maxlength="30" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="计量单位" prop="unitName">
|
<el-form-item label="计量单位" prop="unitName">
|
||||||
<el-input v-model="form.unitName" placeholder="请输入计量单位" maxlength="20"/>
|
<el-input v-model="form.unitName" placeholder="请输入计量单位" maxlength="20" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
@ -223,10 +317,10 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="库管员" prop="keeperUserId">
|
<el-form-item label="库管员" prop="keeperUserId">
|
||||||
<el-select v-model="form.keeperUserId" filterable placeholder="请选择库管员" >
|
<el-select v-model="form.keeperUserId" filterable placeholder="请选择库管员">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="keeper in keeperList"
|
v-for="keeper in keeperList"
|
||||||
:key="keeper.userId"
|
:key="keeper.userId"
|
||||||
|
|
@ -252,39 +346,44 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="文档资料" prop="field101">
|
<el-form-item label="文档资料" prop="field101">
|
||||||
<el-upload ref="field101"
|
<el-upload
|
||||||
|
ref="field101"
|
||||||
:file-list="field101fileList"
|
:file-list="field101fileList"
|
||||||
action="#" :limit='1' accept=".docx,.pdf"
|
action="#"
|
||||||
|
:limit="1"
|
||||||
|
accept=".docx, .pdf"
|
||||||
:http-request="(obj) => fileUpLoad(obj,'fileUrl')"
|
:http-request="(obj) => fileUpLoad(obj,'fileUrl')"
|
||||||
:on-exceed="exceedFile"
|
:on-exceed="exceedFile"
|
||||||
|
>
|
||||||
>
|
|
||||||
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
|
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="图片" prop="photoName">
|
<el-form-item label="图片" prop="photoName">
|
||||||
<el-upload
|
<el-upload
|
||||||
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
|
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
|
||||||
action="#"
|
action="#"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
accept=".png,.jpg,.jpeg"
|
accept=".png, .jpg, .jpeg"
|
||||||
:on-success="handleAvatarSuccess"
|
:on-success="handleAvatarSuccess"
|
||||||
:on-preview="handlePictureCardPreview"
|
:on-preview="handlePictureCardPreview"
|
||||||
:on-remove="handleRemove">
|
:on-remove="handleRemove"
|
||||||
|
>
|
||||||
<!-- <el-button size="small" type="primary" icon="el-icon-upload">上传</el-button> -->
|
<!-- <el-button size="small" type="primary" icon="el-icon-upload">上传</el-button> -->
|
||||||
<img v-if="imageUrl" :src="uploadUrl+imageUrl" style="width: 140px;height: 140px;" class="avatar">
|
<img
|
||||||
|
v-if="imageUrl"
|
||||||
|
:src="uploadUrl+imageUrl"
|
||||||
|
style="width: 140px;height: 140px;"
|
||||||
|
class="avatar"
|
||||||
|
/>
|
||||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
|
@ -293,24 +392,35 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :visible.sync="dialogVisible">
|
<el-dialog :visible.sync="dialogVisible">
|
||||||
<img width="100%" height="650px" :src="dialogImageUrl" alt="">
|
<img width="100%" height="650px" :src="dialogImageUrl" alt />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
<!-- 配置弹窗 -->
|
<!-- 配置弹窗 -->
|
||||||
<el-dialog :title="title" :visible.sync="configOpen" width="650px" append-to-body :close-on-click-modal="false">
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="configOpen"
|
||||||
|
width="650px"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-form ref="cform" :model="cform" :rules="crules" label-width="110px">
|
<el-form ref="cform" :model="cform" :rules="crules" label-width="110px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="调整前价格">
|
<el-form-item label="调整前价格">
|
||||||
<el-input v-model="leasePrice" placeholder="调整前价格" disabled></el-input>
|
<el-input v-model="leasePrice" placeholder="调整前价格" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="调整后价格" prop="leasePrice">
|
<el-form-item label="调整后价格" prop="leasePrice">
|
||||||
<el-input-number v-model="cform.leasePrice" style="width: 100%;" controls-position="right" :min="0" maxlength="10"></el-input-number>
|
<el-input-number
|
||||||
|
v-model="cform.leasePrice"
|
||||||
|
style="width: 100%;"
|
||||||
|
controls-position="right"
|
||||||
|
:min="0"
|
||||||
|
maxlength="10"
|
||||||
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -333,7 +443,6 @@
|
||||||
<el-button @click="cancelConfig">取 消</el-button>
|
<el-button @click="cancelConfig">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -349,20 +458,25 @@ import {
|
||||||
deptTreeSelect
|
deptTreeSelect
|
||||||
} from "@/api/system/user";
|
} from "@/api/system/user";
|
||||||
|
|
||||||
import {getToken} from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import {getListByMaType, getMaTypeList,getMaType, addMaType, updateMaType, delMaType} from "@/api/store/tools";
|
import {
|
||||||
|
getListByMaType,
|
||||||
|
getMaTypeList,
|
||||||
|
getMaType,
|
||||||
|
addMaType,
|
||||||
|
updateMaType,
|
||||||
|
delMaType
|
||||||
|
} from "@/api/store/tools";
|
||||||
import { getUserByRoleList } from "@/api/system/user";
|
import { getUserByRoleList } from "@/api/system/user";
|
||||||
import { getProLists } from "@/api/base/base";
|
import { getProLists } from "@/api/base/base";
|
||||||
import { imgUpLoad,fileUpLoad } from "@/api/system/upload";
|
import { imgUpLoad, fileUpLoad } from "@/api/system/upload";
|
||||||
import {
|
import { getInfo } from "@/api/login";
|
||||||
getInfo
|
|
||||||
} from "@/api/login";
|
|
||||||
export default {
|
export default {
|
||||||
name: "ToolsType",
|
name: "ToolsType",
|
||||||
// dicts: ['sys_normal_disable', 'sys_user_sex'],
|
// dicts: ['sys_normal_disable', 'sys_user_sex'],
|
||||||
components: {Treeselect},
|
components: { Treeselect },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
|
@ -403,13 +517,13 @@ export default {
|
||||||
roleOptions: [],
|
roleOptions: [],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
chosenTypeId:'',
|
chosenTypeId: "",
|
||||||
leasePrice:'',
|
leasePrice: "",
|
||||||
uploadHeader: process.env.VUE_APP_BASE_API,
|
uploadHeader: process.env.VUE_APP_BASE_API,
|
||||||
imageUrl:'',
|
imageUrl: "",
|
||||||
imageName:'',
|
imageName: "",
|
||||||
fileList:[],
|
fileList: [],
|
||||||
field101fileList:[],
|
field101fileList: [],
|
||||||
//上传地址
|
//上传地址
|
||||||
// uploadUrl:'http://192.168.0.14:21624/system',//线上服务器地址+system
|
// uploadUrl:'http://192.168.0.14:21624/system',//线上服务器地址+system
|
||||||
// uploadUrl:'http://112.29.103.165:21624/system',//线上服务器地址+system
|
// uploadUrl:'http://112.29.103.165:21624/system',//线上服务器地址+system
|
||||||
|
|
@ -419,26 +533,31 @@ export default {
|
||||||
children: "children",
|
children: "children",
|
||||||
label: "label"
|
label: "label"
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
// pageNum: 1,
|
// pageNum: 1,
|
||||||
// pageSize: 10,
|
// pageSize: 10,
|
||||||
typeName: undefined,
|
typeName: undefined
|
||||||
// phonenumber: undefined,
|
// phonenumber: undefined,
|
||||||
// status: undefined,
|
// status: undefined,
|
||||||
// typeId: undefined
|
// typeId: undefined
|
||||||
},
|
},
|
||||||
|
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
typeName: [
|
typeName: [
|
||||||
{required: true, message: "设备名称不能为空", trigger: "blur"},
|
{ required: true, message: "设备名称不能为空", trigger: "blur" },
|
||||||
{min: 2, max: 20, message: '设备名称长度必须介于 2 和 20 之间', trigger: 'blur'}
|
{
|
||||||
|
min: 2,
|
||||||
|
max: 20,
|
||||||
|
message: "设备名称长度必须介于 2 和 20 之间",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
parentId: [
|
parentId: [
|
||||||
{required: true, message: "所属上级不能为空", trigger: "blur"}
|
{ required: true, message: "所属上级不能为空", trigger: "blur" }
|
||||||
],
|
]
|
||||||
// password: [
|
// password: [
|
||||||
// {required: true, message: "用户密码不能为空", trigger: "blur"},
|
// {required: true, message: "用户密码不能为空", trigger: "blur"},
|
||||||
// {min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur'}
|
// {min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur'}
|
||||||
|
|
@ -456,22 +575,22 @@ export default {
|
||||||
// message: "请输入正确的手机号码",
|
// message: "请输入正确的手机号码",
|
||||||
// trigger: "blur"
|
// trigger: "blur"
|
||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
},
|
},
|
||||||
companyId:undefined,
|
companyId: undefined,
|
||||||
dialogImageUrl: '',
|
dialogImageUrl: "",
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
configOpen: false,
|
configOpen: false,
|
||||||
cform: {
|
cform: {
|
||||||
price: "",
|
price: "",
|
||||||
afterPrice: "",
|
afterPrice: "",
|
||||||
useDate: "",
|
useDate: ""
|
||||||
},
|
},
|
||||||
crules: {
|
crules: {
|
||||||
leasePrice: [
|
leasePrice: [
|
||||||
{required: true, message: "调整后价格不能为空", trigger: "blur"},
|
{ required: true, message: "调整后价格不能为空", trigger: "blur" }
|
||||||
// { min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
|
// { min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
|
||||||
],
|
]
|
||||||
// effTime: [
|
// effTime: [
|
||||||
// {required: true, message: "开始日期不能为空", trigger: "blur"}
|
// {required: true, message: "开始日期不能为空", trigger: "blur"}
|
||||||
// ],
|
// ],
|
||||||
|
|
@ -485,29 +604,26 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getInfo()
|
this.getInfo();
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getTreeData();
|
this.getTreeData();
|
||||||
this.getUserList()
|
this.getUserList();
|
||||||
this.getPropData()
|
this.getPropData();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getInfo(){
|
getInfo() {
|
||||||
getInfo().then(res => {
|
getInfo().then(res => {
|
||||||
this.companyId = res.user.companyId
|
this.companyId = res.user.companyId;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
/** 查询用户列表--库管员,维修员 */
|
/** 查询用户列表--库管员,维修员 */
|
||||||
getUserList() {
|
getUserList() {
|
||||||
getUserByRoleList({roleId:'101'}).then(response => {
|
getUserByRoleList({ roleId: "101" }).then(response => {
|
||||||
this.keeperList = response.data;
|
this.keeperList = response.data;
|
||||||
}
|
});
|
||||||
);
|
getUserByRoleList({ roleId: "102" }).then(response => {
|
||||||
getUserByRoleList({roleId:'102'}).then(response => {
|
|
||||||
this.repairUserList = response.data;
|
this.repairUserList = response.data;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
},
|
},
|
||||||
/** 查询新增页面-上级类型下拉树结构 */
|
/** 查询新增页面-上级类型下拉树结构 */
|
||||||
getTreeData() {
|
getTreeData() {
|
||||||
|
|
@ -515,21 +631,20 @@ export default {
|
||||||
this.treeOptions = response.data;
|
this.treeOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 查询资产属性下拉 */
|
/** 查询资产属性下拉 */
|
||||||
getPropData() {
|
getPropData() {
|
||||||
getProLists().then(response => {
|
getProLists().then(response => {
|
||||||
this.propList = response.rows;
|
this.propList = response.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getListByMaType(this.queryParams).then(response => {
|
getListByMaType(this.queryParams).then(response => {
|
||||||
this.typeList = response.data;
|
this.typeList = response.data;
|
||||||
// this.total = response.total;
|
// this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
},
|
},
|
||||||
// 筛选节点 - 左侧树
|
// 筛选节点 - 左侧树
|
||||||
filterNode(value, data) {
|
filterNode(value, data) {
|
||||||
|
|
@ -549,14 +664,14 @@ export default {
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
photoUrl:"",
|
photoUrl: "",
|
||||||
photoName:"",
|
photoName: "",
|
||||||
documentUrl:"",
|
documentUrl: "",
|
||||||
documentName:""
|
documentName: ""
|
||||||
};
|
};
|
||||||
this.imageUrl = ''
|
this.imageUrl = "";
|
||||||
this.fileList = []
|
this.fileList = [];
|
||||||
this.field101fileList = []
|
this.field101fileList = [];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
|
|
@ -581,8 +696,8 @@ export default {
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "新增";
|
this.title = "新增";
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
|
|
@ -590,25 +705,24 @@ export default {
|
||||||
const typeId = row.typeId || this.ids;
|
const typeId = row.typeId || this.ids;
|
||||||
getMaType(typeId).then(response => {
|
getMaType(typeId).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
if(this.form.documentUrl){
|
if (this.form.documentUrl) {
|
||||||
let file = {
|
let file = {
|
||||||
name:this.form.documentName,
|
name: this.form.documentName,
|
||||||
type:this.form.documentUrl,
|
type: this.form.documentUrl
|
||||||
}
|
};
|
||||||
this.field101fileList.push(file)
|
this.field101fileList.push(file);
|
||||||
}else{
|
} else {
|
||||||
this.field101fileList=[]
|
this.field101fileList = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.imageUrl = this.form.photoUrl
|
this.imageUrl = this.form.photoUrl;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改";
|
this.title = "修改";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function () {
|
submitForm: function() {
|
||||||
console.log(this.form)
|
console.log(this.form);
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.typeId != undefined) {
|
if (this.form.typeId != undefined) {
|
||||||
|
|
@ -617,7 +731,6 @@ export default {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getTreeData();
|
this.getTreeData();
|
||||||
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.form.companyId = this.companyId;
|
this.form.companyId = this.companyId;
|
||||||
|
|
@ -634,13 +747,16 @@ export default {
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const typeIds = row.typeId;
|
const typeIds = row.typeId;
|
||||||
this.$modal.confirm('是否确认删除数据项?').then(function () {
|
this.$modal
|
||||||
return delMaType(typeIds);
|
.confirm("是否确认删除数据项?")
|
||||||
}).then(() => {
|
.then(function() {
|
||||||
this.getList();
|
return delMaType(typeIds);
|
||||||
this.$modal.msgSuccess("删除成功");
|
})
|
||||||
}).catch(() => {
|
.then(() => {
|
||||||
});
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
//配置操作
|
//配置操作
|
||||||
handleConfig(row) {
|
handleConfig(row) {
|
||||||
|
|
@ -648,54 +764,56 @@ export default {
|
||||||
this.chosenTypeId = row.typeId;
|
this.chosenTypeId = row.typeId;
|
||||||
this.leasePrice = row.leasePrice;
|
this.leasePrice = row.leasePrice;
|
||||||
// this.cform.leasePrice = row.leasePrice;
|
// this.cform.leasePrice = row.leasePrice;
|
||||||
this.$set(this.cform,'leasePrice',row.leasePrice)
|
this.$set(this.cform, "leasePrice", row.leasePrice);
|
||||||
this.configOpen = true;
|
this.configOpen = true;
|
||||||
this.title = "租赁价格调整"
|
this.title = "租赁价格调整";
|
||||||
},
|
},
|
||||||
submitConfig(){
|
submitConfig() {
|
||||||
let param = {
|
let param = {
|
||||||
typeId:this.chosenTypeId,
|
typeId: this.chosenTypeId,
|
||||||
effTime:this.cform.effTime,
|
effTime: this.cform.effTime,
|
||||||
leasePrice:this.cform.leasePrice,
|
leasePrice: this.cform.leasePrice
|
||||||
}
|
};
|
||||||
console.log(param)
|
console.log(param);
|
||||||
this.$refs["cform"].validate(valid => {
|
this.$refs["cform"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
updateMaType(param).then(response => {
|
updateMaType(param).then(response => {
|
||||||
this.$modal.msgSuccess("调整成功");
|
this.$modal.msgSuccess("调整成功");
|
||||||
this.configOpen = false;
|
this.configOpen = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getTreeData();
|
this.getTreeData();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// this.configOpen = false;
|
// this.configOpen = false;
|
||||||
},
|
},
|
||||||
cancelConfig(){
|
cancelConfig() {
|
||||||
this.configOpen = false;
|
this.configOpen = false;
|
||||||
},
|
},
|
||||||
// 图片上传
|
// 图片上传
|
||||||
imgUpLoad(param,name,index) {
|
imgUpLoad(param, name, index) {
|
||||||
console.log(param,'image')
|
console.log(param, "image");
|
||||||
param.type = 'ma'
|
param.type = "ma";
|
||||||
imgUpLoad(param).then(res => {
|
imgUpLoad(param)
|
||||||
if(res.code == 200) {
|
.then(res => {
|
||||||
this.form.photoUrl = res.data.fileUrl;
|
if (res.code == 200) {
|
||||||
this.form.photoName = res.data.fileName;
|
this.form.photoUrl = res.data.fileUrl;
|
||||||
this.imageUrl = res.data.fileUrl;
|
this.form.photoName = res.data.fileName;
|
||||||
this.imageName = res.data.fileName;
|
this.imageUrl = res.data.fileUrl;
|
||||||
}else{
|
this.imageName = res.data.fileName;
|
||||||
// this.$msgError(res.msg)
|
} else {
|
||||||
this.$modal.msgError(res.msg);
|
// this.$msgError(res.msg)
|
||||||
}
|
this.$modal.msgError(res.msg);
|
||||||
}).catch((error) => {
|
}
|
||||||
// this.$msgError(error)
|
})
|
||||||
this.$modal.msgError(error);
|
.catch(error => {
|
||||||
})
|
// this.$msgError(error)
|
||||||
|
this.$modal.msgError(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleAvatarSuccess(res, file) {
|
||||||
|
console.log("success");
|
||||||
},
|
},
|
||||||
handleAvatarSuccess(res,file) {
|
|
||||||
console.log("success")
|
|
||||||
},
|
|
||||||
handleRemove(file, fileList) {
|
handleRemove(file, fileList) {
|
||||||
console.log(file, fileList);
|
console.log(file, fileList);
|
||||||
this.imageUrl = "";
|
this.imageUrl = "";
|
||||||
|
|
@ -704,37 +822,40 @@ export default {
|
||||||
},
|
},
|
||||||
//图片点击查看
|
//图片点击查看
|
||||||
handlePictureCardPreview(file) {
|
handlePictureCardPreview(file) {
|
||||||
console.log(file)
|
console.log(file);
|
||||||
this.dialogImageUrl = file.url;
|
this.dialogImageUrl = file.url;
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
//图片查看
|
//图片查看
|
||||||
openImg(url){
|
openImg(url) {
|
||||||
this.dialogImageUrl = this.uploadUrl + url;
|
this.dialogImageUrl = this.uploadUrl + url;
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
//文件上传
|
//文件上传
|
||||||
fileUpLoad(param,name,index) {
|
fileUpLoad(param, name, index) {
|
||||||
console.log(param,'fileUpLoad')
|
console.log(param, "fileUpLoad");
|
||||||
param.type = 'ma'
|
param.type = "ma";
|
||||||
imgUpLoad(param).then(res => {
|
imgUpLoad(param)
|
||||||
if(res.code == 200) {
|
.then(res => {
|
||||||
this.form.documentUrl = res.data.fileUrl;
|
if (res.code == 200) {
|
||||||
this.form.documentName = res.data.fileName;
|
this.form.documentUrl = res.data.fileUrl;
|
||||||
this.field101fileList[0] = param.file
|
this.form.documentName = res.data.fileName;
|
||||||
console.log(this.field101fileList)
|
this.field101fileList[0] = param.file;
|
||||||
}else{
|
console.log(this.field101fileList);
|
||||||
// this.$msgError(res.msg)
|
} else {
|
||||||
this.$modal.msgError(res.msg);
|
// this.$msgError(res.msg)
|
||||||
}
|
this.$modal.msgError(res.msg);
|
||||||
}).catch((error) => {
|
}
|
||||||
// this.$msgError(error)
|
})
|
||||||
this.$modal.msgError(error);
|
.catch(error => {
|
||||||
})
|
// this.$msgError(error)
|
||||||
|
this.$modal.msgError(error);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
exceedFile(files, fileList) {
|
exceedFile(files, fileList) {
|
||||||
this.$message.warning(
|
this.$message.warning(
|
||||||
`只能选择 1 个文件导入,共选择了 ${files.length + fileList.length} 个文件`
|
`只能选择 1 个文件导入,共选择了 ${files.length +
|
||||||
|
fileList.length} 个文件`
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -743,7 +864,7 @@ export default {
|
||||||
// this.download('system/user/export', {
|
// this.download('system/user/export', {
|
||||||
// ...this.queryParams
|
// ...this.queryParams
|
||||||
// }, `user_${new Date().getTime()}.xlsx`)
|
// }, `user_${new Date().getTime()}.xlsx`)
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,8 @@ module.exports = {
|
||||||
// target: `http://10.40.92.8:8080`, //超
|
// target: `http://10.40.92.8:8080`, //超
|
||||||
// target: `http://10.40.92.253:8080`,//韩
|
// target: `http://10.40.92.253:8080`,//韩
|
||||||
// target: `http://10.40.92.209:8080`,//川/
|
// target: `http://10.40.92.209:8080`,//川/
|
||||||
target: `http://10.40.92.153:8080`, //帅
|
// target: `http://10.40.92.153:8080`, //帅
|
||||||
|
target: `http://10.40.92.14:8080`, //福
|
||||||
|
|
||||||
//******** 注意事项 ********* */
|
//******** 注意事项 ********* */
|
||||||
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址;
|
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue