领料申请
This commit is contained in:
parent
b9603f1ccc
commit
d1fd246499
|
|
@ -9,7 +9,7 @@
|
||||||
:inline="true"
|
:inline="true"
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
>
|
>
|
||||||
<el-form-item label="租赁单位" prop="leaseUnitId">
|
<!-- <el-form-item label="租赁单位" prop="leaseUnitId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="maForm.leaseUnitId"
|
v-model="maForm.leaseUnitId"
|
||||||
placeholder="请选择租赁单位"
|
placeholder="请选择租赁单位"
|
||||||
|
|
@ -25,23 +25,32 @@
|
||||||
:value="item.unitId"
|
:value="item.unitId"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="租赁单位" prop="leaseUnitId">
|
||||||
|
<el-cascader
|
||||||
|
v-model="unitId"
|
||||||
|
:show-all-levels="false"
|
||||||
|
:options="uniteList"
|
||||||
|
:props="selectTreeProps"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
collapse-tags
|
||||||
|
@change="uniteChange"
|
||||||
|
placeholder="请选择退料单位"
|
||||||
|
></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="租赁工程" prop="leaseProjectId">
|
<el-form-item label="租赁工程" prop="leaseProjectId">
|
||||||
<el-select
|
<el-cascader
|
||||||
v-model="maForm.leaseProjectId"
|
v-model="projectId"
|
||||||
placeholder="请选择租赁工程"
|
:show-all-levels="false"
|
||||||
clearable
|
:options="projectList"
|
||||||
|
:props="selectTreeProps"
|
||||||
filterable
|
filterable
|
||||||
style="width: 240px"
|
clearable
|
||||||
|
collapse-tags
|
||||||
@change="projectChange"
|
@change="projectChange"
|
||||||
>
|
placeholder="请选择租赁工程"
|
||||||
<el-option
|
></el-cascader>
|
||||||
v-for="item in projectList"
|
|
||||||
:key="item.proId"
|
|
||||||
:label="item.proName"
|
|
||||||
:value="item.proId"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="领料人" prop="leasePerson">
|
<el-form-item label="领料人" prop="leasePerson">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -226,6 +235,13 @@ export default {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
|
selectTreeProps: {
|
||||||
|
children: "children",
|
||||||
|
label: "name",
|
||||||
|
// multiple: false,
|
||||||
|
value: "id",
|
||||||
|
// multiple: true,
|
||||||
|
},
|
||||||
//租赁单位
|
//租赁单位
|
||||||
uniteList: [],
|
uniteList: [],
|
||||||
//租赁工程
|
//租赁工程
|
||||||
|
|
@ -239,6 +255,8 @@ export default {
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
rowData: {},
|
rowData: {},
|
||||||
|
unitId: null,
|
||||||
|
projectId: null,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
equipmentId: undefined,
|
equipmentId: undefined,
|
||||||
|
|
@ -334,26 +352,41 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
uniteChange(val) {
|
uniteChange(val) {
|
||||||
this.projectList = [];
|
// this.projectList = [];
|
||||||
this.$set(this.maForm, "leaseProjectId", null);
|
if (val && val.length > 0) {
|
||||||
getListProject({ unitId: val }).then((response) => {
|
this.maForm.unitId = this.unitId[this.unitId.length - 1];
|
||||||
|
} else if (val && val.length == 0) {
|
||||||
|
this.maForm.unitId = "";
|
||||||
|
}
|
||||||
|
// this.$set(this.maForm, "leaseProjectId", null);
|
||||||
|
getListProject({ unitId: this.maForm.unitId }).then((response) => {
|
||||||
this.projectList = response.data;
|
this.projectList = response.data;
|
||||||
});
|
});
|
||||||
this.unitTemp = val;
|
this.unitTemp = this.unitid;
|
||||||
},
|
},
|
||||||
projectChange(val) {
|
projectChange(val) {
|
||||||
this.maForm.leaseProjectId = val;
|
if (val && val.length > 0) {
|
||||||
this.projectTemp = val;
|
this.maForm.projectId = this.projectId[this.projectId.length - 1];
|
||||||
console.log("projectTemp", this.projectTemp);
|
} else if (val && val.length == 0) {
|
||||||
|
this.maForm.projectId = "";
|
||||||
|
}
|
||||||
|
getListUnite({ projectId: this.maForm.projectId }).then((response) => {
|
||||||
|
this.uniteList = response.data;
|
||||||
|
});
|
||||||
|
// this.maForm.leaseProjectId = val;
|
||||||
|
this.projectTemp = this.projectId;
|
||||||
},
|
},
|
||||||
/** 租赁单位和工程-下拉选 */
|
/** 租赁单位和工程-下拉选 */
|
||||||
projectInfoList() {
|
projectInfoList() {
|
||||||
if (!this.isEdit) {
|
if (!this.isEdit) {
|
||||||
getListUnite({ id: null }).then((response) => {
|
getListUnite({ projectId: null }).then((response) => {
|
||||||
this.uniteList = response.data;
|
this.uniteList = response.data;
|
||||||
});
|
});
|
||||||
|
getListProject({ unitId: null }).then((response) => {
|
||||||
|
this.projectList = response.data;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
getListUnite({ id: null }).then((response) => {
|
getListUnite({ projectId: null }).then((response) => {
|
||||||
this.uniteList = response.data;
|
this.uniteList = response.data;
|
||||||
});
|
});
|
||||||
console.log("maForm", this.maForm.leaseUnitId);
|
console.log("maForm", this.maForm.leaseUnitId);
|
||||||
|
|
@ -365,6 +398,14 @@ export default {
|
||||||
// this.projectList = response.data;
|
// this.projectList = response.data;
|
||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
|
// filterTree(nodes) {
|
||||||
|
// return nodes.map((node) => {
|
||||||
|
// if (node.children) {
|
||||||
|
// node.children = this.filterTree(node.children);
|
||||||
|
// }
|
||||||
|
// return node;
|
||||||
|
// });
|
||||||
|
// },
|
||||||
//选择物资厂家
|
//选择物资厂家
|
||||||
// changeSupplier(supplierId) {
|
// changeSupplier(supplierId) {
|
||||||
// this.equipmentList.forEach((item) => {
|
// this.equipmentList.forEach((item) => {
|
||||||
|
|
@ -469,8 +510,8 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log("projectId", this.projectTemp);
|
console.log("projectId", this.projectTemp);
|
||||||
await getAgreement({
|
await getAgreement({
|
||||||
unitId: this.unitTemp,
|
unitId: this.maForm.unitId,
|
||||||
projectId: this.projectTemp,
|
projectId: this.maForm.projectId,
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
this.agreementId = response.data.agreementId;
|
this.agreementId = response.data.agreementId;
|
||||||
this.maForm.agreementId = this.agreementId;
|
this.maForm.agreementId = this.agreementId;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
<el-form-item prop="keyWord">
|
<el-form-item prop="keyWord">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.keyWord"
|
v-model="queryParams.keyWord"
|
||||||
|
|
@ -12,8 +19,16 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
|
|
@ -57,16 +72,38 @@
|
||||||
<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="houseList" ref="multipleTable" row-key="teamId">
|
<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 type="selection" width="55" align="center" :reserve-selection="true" /> -->
|
||||||
<el-table-column label="序号" align="center" width="80" type="index">
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
<span>{{
|
||||||
|
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="仓库名称" align="center" prop="houseName" sortable/>
|
<el-table-column
|
||||||
<el-table-column label="实物库" align="center" prop="physicalName" sortable/>
|
label="仓库名称"
|
||||||
<el-table-column label="地理位置" align="center" prop="geoLocation" sortable/>
|
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="deptName" sortable>
|
<el-table-column label="所属组织" align="center" prop="deptName" sortable>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" sortable>
|
<el-table-column label="备注" align="center" prop="remark" sortable>
|
||||||
|
|
@ -104,12 +141,21 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 新增或修改弹窗 -->
|
<!-- 新增或修改弹窗 -->
|
||||||
<el-dialog :title="title" :visible.sync="showHouse" width="600px" append-to-body>
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="showHouse"
|
||||||
|
width="600px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
<el-form-item label="仓库名称" prop="houseName">
|
<el-form-item label="仓库名称" prop="houseName">
|
||||||
<el-input v-model="form.houseName" placeholder="请输入仓库名称" maxlength="20"/>
|
<el-input
|
||||||
|
v-model="form.houseName"
|
||||||
|
placeholder="请输入仓库名称"
|
||||||
|
maxlength="20"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -117,7 +163,11 @@
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
<el-form-item label="地理位置" prop="geoLocation">
|
<el-form-item label="地理位置" prop="geoLocation">
|
||||||
<el-input v-model="form.geoLocation" placeholder="请输入地理位置" maxlength="20">
|
<el-input
|
||||||
|
v-model="form.geoLocation"
|
||||||
|
placeholder="请输入地理位置"
|
||||||
|
maxlength="20"
|
||||||
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -125,7 +175,11 @@
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
<el-form-item label="实物库" prop="physicalName">
|
<el-form-item label="实物库" prop="physicalName">
|
||||||
<el-input v-model="form.physicalName" placeholder="请输入实物库" maxlength="20">
|
<el-input
|
||||||
|
v-model="form.physicalName"
|
||||||
|
placeholder="请输入实物库"
|
||||||
|
maxlength="20"
|
||||||
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -133,14 +187,16 @@
|
||||||
|
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
|
|
||||||
<el-form-item label="所属组织" prop="deptId">
|
<el-form-item label="所属组织" prop="deptId">
|
||||||
<treeselect v-model="form.deptId" :searchable="false" :disable-branch-nodes="true" :options="deptOptions"
|
<treeselect
|
||||||
:show-count="true" placeholder="请选择所属组织"
|
v-model="form.deptId"
|
||||||
|
:searchable="false"
|
||||||
|
:disable-branch-nodes="true"
|
||||||
|
:options="deptOptions"
|
||||||
|
:show-count="true"
|
||||||
|
placeholder="请选择所属组织"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
|
|
@ -158,24 +214,27 @@
|
||||||
</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>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getListHouse,getHouseDetail,editHouse,addHouse,delHouse } from "@/api/ma/whHouse";
|
import {
|
||||||
import { downloadFile } from '@/utils/download'
|
getListHouse,
|
||||||
import {deptTreeSelect,} from '@/api/system/user'
|
getHouseDetail,
|
||||||
import Treeselect from '@riophae/vue-treeselect'
|
editHouse,
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
addHouse,
|
||||||
|
delHouse,
|
||||||
|
} from "@/api/ma/whHouse";
|
||||||
|
import { downloadFile } from "@/utils/download";
|
||||||
|
import { deptTreeSelect } from "@/api/system/user";
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
export default {
|
export default {
|
||||||
name: "whHouse",
|
name: "whHouse",
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -185,27 +244,23 @@
|
||||||
|
|
||||||
loadingTwo: false,
|
loadingTwo: false,
|
||||||
|
|
||||||
|
|
||||||
// 是否显示项目部Id
|
// 是否显示项目部Id
|
||||||
showName: false,
|
showName: false,
|
||||||
|
|
||||||
// 是否显示施工预警信息
|
// 是否显示施工预警信息
|
||||||
showWarn: false,
|
showWarn: false,
|
||||||
|
|
||||||
|
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
multiple: true,
|
multiple: true,
|
||||||
|
|
||||||
|
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
showHouse: false,
|
showHouse: false,
|
||||||
// 部门树选项
|
// 部门树选项
|
||||||
deptOptions: undefined,
|
deptOptions: undefined,
|
||||||
|
|
||||||
|
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
totalTwo: 0,
|
totalTwo: 0,
|
||||||
|
|
@ -224,7 +279,7 @@
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
keyWord:undefined
|
keyWord: undefined,
|
||||||
},
|
},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryTeam: {
|
queryTeam: {
|
||||||
|
|
@ -235,7 +290,6 @@
|
||||||
teamId: undefined,
|
teamId: undefined,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
|
|
@ -243,70 +297,66 @@
|
||||||
houseName: [
|
houseName: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '仓库名称不能为空',
|
message: "仓库名称不能为空",
|
||||||
trigger: 'blur',
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
geoLocation: [
|
geoLocation: [
|
||||||
{
|
{
|
||||||
required: false,
|
required: false,
|
||||||
message: '地理位置不能为空',
|
message: "地理位置不能为空",
|
||||||
trigger: 'blur',
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
physicalName: [
|
physicalName: [
|
||||||
{
|
{
|
||||||
required: false,
|
required: false,
|
||||||
message: '实物库不能为空',
|
message: "实物库不能为空",
|
||||||
trigger: 'blur',
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
leasePrice: [
|
leasePrice: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择所属组织',
|
message: "请选择所属组织",
|
||||||
trigger: 'change',
|
trigger: "change",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
remark: [
|
remark: [
|
||||||
{
|
{
|
||||||
required: false,
|
required: false,
|
||||||
message: '备注不能为空',
|
message: "备注不能为空",
|
||||||
trigger: 'blur',
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDeptTree()
|
this.getDeptTree();
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
components: { Treeselect },
|
components: { Treeselect },
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询部门下拉树结构 */
|
/** 查询部门下拉树结构 */
|
||||||
getDeptTree() {
|
getDeptTree() {
|
||||||
deptTreeSelect().then(response => {
|
deptTreeSelect().then((response) => {
|
||||||
this.deptOptions = this.filterTree(response.data)
|
this.deptOptions = this.filterTree(response.data);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
filterTree(nodes) {
|
filterTree(nodes) {
|
||||||
return nodes
|
return nodes.map((node) => {
|
||||||
.map(node => {
|
|
||||||
if (node.children) {
|
if (node.children) {
|
||||||
node.children = this.filterTree(node.children)
|
node.children = this.filterTree(node.children);
|
||||||
}
|
}
|
||||||
return node
|
return node;
|
||||||
})
|
});
|
||||||
.filter(node => node.status !== '1')
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 查询岗位列表 */
|
/** 查询岗位列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getListHouse(this.queryParams).then(response => {
|
getListHouse(this.queryParams).then((response) => {
|
||||||
this.houseList = response.rows;
|
this.houseList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
@ -315,20 +365,20 @@
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset()
|
this.reset();
|
||||||
this.showHouse = true
|
this.showHouse = true;
|
||||||
this.title = '新增'
|
this.title = "新增";
|
||||||
},
|
},
|
||||||
|
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset()
|
this.reset();
|
||||||
const houseId = row.houseId
|
const houseId = row.houseId;
|
||||||
getHouseDetail(houseId).then((response) => {
|
getHouseDetail(houseId).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
|
||||||
this.showHouse = true
|
this.showHouse = true;
|
||||||
this.title = '修改'
|
this.title = "修改";
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
|
|
@ -345,17 +395,16 @@
|
||||||
|
|
||||||
//** 提交按钮 */
|
//** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.houseId != undefined) {
|
if (this.form.houseId != undefined) {
|
||||||
editHouse(this.form).then(response => {
|
editHouse(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.showHouse = false;
|
this.showHouse = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
addHouse(this.form).then((response) => {
|
||||||
addHouse(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.showHouse = false;
|
this.showHouse = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
@ -373,23 +422,27 @@
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const houseIds = row.houseId
|
const houseIds = row.houseId;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认删除数据项?')
|
.confirm("是否确认删除数据项?")
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return delHouse(houseIds)
|
return delHouse(houseIds);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$modal.msgSuccess('删除成功')
|
this.$modal.msgSuccess("删除成功");
|
||||||
this.getList()
|
this.getList();
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
|
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('/material/wh_house_info/export', {
|
this.download(
|
||||||
...this.queryParams
|
"/material/wh_house_info/export",
|
||||||
}, `仓库管理_${new Date().getTime()}.xlsx`)
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`仓库管理_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
|
|
@ -397,8 +450,7 @@
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue