页面搭建
This commit is contained in:
parent
d6af3ebf80
commit
db819ad13c
|
|
@ -0,0 +1,107 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
//机具类型管理
|
||||||
|
export function getMaTypeList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/ma_type/getMaTypeTreeSelect',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//机具类型管理列表信息
|
||||||
|
export function getListByMaType(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/ma_type/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查看机具类型管理列表详细信息
|
||||||
|
export function getMaType(id) {
|
||||||
|
return request({
|
||||||
|
url: '/material/ma_type/'+ id,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 仓库信息下拉框-
|
||||||
|
export function queryKeeperDataApi(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/wh_house_info/listNoPage',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 施工类型下拉框-
|
||||||
|
export function queryKeeperProApi(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/ma_type/selectMaTypeListByHouseId',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 物资类型下拉框-
|
||||||
|
export function queryKeeperMatApi(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/ma_type/selectMaTypeListByTypeId',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 物资名称下拉框-
|
||||||
|
export function queryKeeperNameApi(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/ma_type/selectMaTypeListByTypeId',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// // 导出
|
||||||
|
// export function exportMaterial(query) {
|
||||||
|
// return request({
|
||||||
|
// url: '/material/ma_type/export',
|
||||||
|
// method: 'post',
|
||||||
|
// responseType: 'blob',
|
||||||
|
// params: query
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 物资类型管理--删除
|
||||||
|
export function delMaType(typeId) {
|
||||||
|
return request({
|
||||||
|
url: '/material/ma_type/' + typeId,
|
||||||
|
method: 'delete',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 物资类型管理--修改
|
||||||
|
export function updateMaType(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/ma_type',
|
||||||
|
method: 'put',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 物资类型管理--新增
|
||||||
|
export function addMaType(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/ma_type',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 工程项目-列表
|
||||||
|
export function getProjectList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/base/bmProjectInfo/projectInfoAll',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
//机具类型管理列表信息
|
||||||
|
export function getListHouse(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/wh_house_info/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查看机具类型管理列表详细信息
|
||||||
|
export function getHouseDetail(id) {
|
||||||
|
return request({
|
||||||
|
url: '/material/wh_house_info/'+ id,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 物资名称下拉框-
|
||||||
|
export function queryKeeperNameApi(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/ma_type/selectMaTypeListByTypeId',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 仓库管理--删除
|
||||||
|
export function delHouse(id) {
|
||||||
|
return request({
|
||||||
|
url: '/material/wh_house_info/' + id,
|
||||||
|
method: 'delete',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 仓库管理--修改
|
||||||
|
export function editHouse(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/wh_house_info',
|
||||||
|
method: 'put',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 仓库管理--新增
|
||||||
|
export function addHouse(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/wh_house_info',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 工程项目-列表
|
||||||
|
export function getProjectList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/base/bmProjectInfo/projectInfoAll',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
//资源图片上传
|
||||||
|
export function imgUpLoad(param){
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', param.file)
|
||||||
|
formData.append('fileType', param.type)
|
||||||
|
return request({
|
||||||
|
url: '/system/sys/file/upload',
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
header:'multipart/form-data'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//资源文件上传
|
||||||
|
export function fileUpLoad(param){
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', param.file)
|
||||||
|
return request({
|
||||||
|
url: '/system/sys/file/upload',
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// excel文件上传
|
||||||
|
export function excelUpLoad(param){
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', param.file)
|
||||||
|
return request({
|
||||||
|
url: '/material/base/maPartType/readExcel',
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// excel文件下载
|
||||||
|
export function downloadExcel(param){
|
||||||
|
return request({
|
||||||
|
url: '/material/base/maPartType/downLoad',
|
||||||
|
method: 'post',
|
||||||
|
param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -244,8 +244,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { addUnit, delUnit, unitInfoAll, updateUnit } from '@/api/base/base'
|
// import { addUnit, delUnit, unitInfoAll, updateUnit } from '@/api/base/base'
|
||||||
import { unitTypeListAll } from '@/api/base/base'
|
// import { unitTypeListAll } from '@/api/base/base'
|
||||||
import { deptTreeSelect } from '@/api/system/user'
|
import { deptTreeSelect } from '@/api/system/user'
|
||||||
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'
|
||||||
|
|
@ -321,9 +321,9 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getType()
|
// this.getType()
|
||||||
this.getDeptTree()
|
// this.getDeptTree()
|
||||||
this.getList()
|
// this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取单位类型
|
//获取单位类型
|
||||||
|
|
|
||||||
|
|
@ -383,7 +383,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
|
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
|
||||||
import { getUserList, getTypeList, unitPersonAll, delUnitPerson } from "@/api/base/base";
|
// import { getUserList, getTypeList, unitPersonAll, delUnitPerson } from "@/api/base/base";
|
||||||
|
|
||||||
|
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
|
|
@ -502,8 +502,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
// this.getList();
|
||||||
this.getUserList()
|
// this.getUserList()
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,404 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item prop="keyWord">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.keyWord"
|
||||||
|
placeholder="请输入关键词"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
maxlength="20"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['machinery:type:add']"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
>导出
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
<!-- <el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['bracelet:construction:export']"
|
||||||
|
>导出数据</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row> -->
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="houseList" ref="multipleTable" row-key="teamId">
|
||||||
|
<!-- <el-table-column type="selection" width="55" align="center" :reserve-selection="true" /> -->
|
||||||
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="仓库名称" align="center" prop="houseName" sortable/>
|
||||||
|
<el-table-column label="实物库" align="center" prop="physicalName" sortable/>
|
||||||
|
<el-table-column label="地理位置" align="center" prop="geoLocation" sortable/>
|
||||||
|
<el-table-column label="所属组织" align="center" prop="houseName" sortable>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" sortable>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['machinery:type:edit']"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['machinery:type:del']"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 新增或修改弹窗 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="showHouse" width="600px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px" >
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-form-item label="仓库名称" prop="houseName">
|
||||||
|
<el-input v-model="form.houseName" placeholder="请输入仓库名称" maxlength="20"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-form-item label="地理位置" prop="geoLocation">
|
||||||
|
<el-input v-model="form.geoLocation" placeholder="请输入地理位置" maxlength="20">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-form-item label="实物库" prop="physicalName">
|
||||||
|
<el-input v-model="form.physicalName" placeholder="请输入实物库" maxlength="20">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-form-item label="所属组织">
|
||||||
|
<el-select
|
||||||
|
v-model="form.parentId"
|
||||||
|
filterable
|
||||||
|
placeholder="请选择所属组织"
|
||||||
|
style="width: 100%;"
|
||||||
|
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="keeper in keeperDataRange"
|
||||||
|
:key="keeper.value"
|
||||||
|
:label="keeper.label"
|
||||||
|
:value="keeper.value"
|
||||||
|
></el-option>
|
||||||
|
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入备注" maxlength="20">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getListHouse,getHouseDetail,editHouse,addHouse,delHouse } from "@/api/baseGround/house";
|
||||||
|
import { downloadFile } from '@/utils/download'
|
||||||
|
export default {
|
||||||
|
name: "Post",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
|
||||||
|
loadingTwo: false,
|
||||||
|
|
||||||
|
|
||||||
|
// 是否显示项目部Id
|
||||||
|
showName: false,
|
||||||
|
|
||||||
|
// 是否显示施工预警信息
|
||||||
|
showWarn: false,
|
||||||
|
|
||||||
|
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
|
||||||
|
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
showHouse: false,
|
||||||
|
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
totalTwo : 0,
|
||||||
|
// 施工记录表格数据
|
||||||
|
houseList: [],
|
||||||
|
maxLength:100,//已选列表上限,防止数据过多请求报错
|
||||||
|
keeperDataRange:[],
|
||||||
|
// 班组人员表格数据
|
||||||
|
teamList: [],
|
||||||
|
teamTempList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
keyWord:undefined
|
||||||
|
},
|
||||||
|
// 查询参数
|
||||||
|
queryTeam: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: undefined,
|
||||||
|
sex: undefined,
|
||||||
|
teamId: undefined,
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
houseName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '仓库名称不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
geoLocation: [
|
||||||
|
{
|
||||||
|
required: false,
|
||||||
|
message: '地理位置不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
physicalName: [
|
||||||
|
{
|
||||||
|
required: false,
|
||||||
|
message: '实物库不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
leasePrice: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择所属组织',
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{
|
||||||
|
required: false,
|
||||||
|
message: '备注不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询岗位列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getListHouse(this.queryParams).then(response => {
|
||||||
|
this.houseList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset()
|
||||||
|
this.showHouse = true
|
||||||
|
this.title = '新增'
|
||||||
|
},
|
||||||
|
|
||||||
|
handleUpdate(row){
|
||||||
|
this.reset()
|
||||||
|
const houseId = row.houseId
|
||||||
|
getHouseDetail(houseId).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
|
||||||
|
this.showHouse = true
|
||||||
|
this.title = '修改'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.queryParams.keyWord=null;
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
|
||||||
|
//** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.houseId != undefined) {
|
||||||
|
editHouse(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.showHouse = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
|
||||||
|
addHouse(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.showHouse = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.showHouse = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const houseIds = row.houseId
|
||||||
|
this.$modal
|
||||||
|
.confirm('是否确认删除数据项?')
|
||||||
|
.then(function () {
|
||||||
|
return delHouse(houseIds)
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$modal.msgSuccess('删除成功')
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleExport() {
|
||||||
|
this.download('/material/wh_house_info/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `仓库管理_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.uploadImg {
|
||||||
|
padding-top: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.deviceCode {
|
||||||
|
margin-top: 10px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
::v-deep.el-table .fixed-width .el-button--mini {
|
||||||
|
width: 60px !important;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
//隐藏图片上传框的css
|
||||||
|
::v-deep.disabled {
|
||||||
|
.el-upload--picture-card {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue