|
@@ -1,74 +1,85 @@
|
|
|
<template>
|
|
|
- <basic-container>
|
|
|
- <avue-crud
|
|
|
- ref="crud"
|
|
|
- :option="option"
|
|
|
- :data="dataList"
|
|
|
- v-model="form"
|
|
|
- :page.sync="page"
|
|
|
- :search.sync="search"
|
|
|
- @search-change="searchChange"
|
|
|
- @current-change="currentChange"
|
|
|
- @size-change="sizeChange"
|
|
|
- @refresh-change="refreshChange"
|
|
|
- @on-load="onLoad"
|
|
|
- >
|
|
|
- <template slot="portOfLoadSearch">
|
|
|
- <port-info v-model="search.portOfLoad" />
|
|
|
- </template>
|
|
|
- <template slot="portOfDestinationSearch">
|
|
|
- <port-info v-model="search.portOfDestination" />
|
|
|
- </template>
|
|
|
- <template slot="menuLeft">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- icon="el-icon-plus"
|
|
|
- size="small"
|
|
|
- @click.stop="newAdd()"
|
|
|
- >新单</el-button
|
|
|
- >
|
|
|
- <el-button type="success" size="small" disabled>复制新单</el-button>
|
|
|
- <el-button type="info" size="small">报表</el-button>
|
|
|
- </template>
|
|
|
- <template slot="corpIdSearch">
|
|
|
- <select-component
|
|
|
- v-model="search.corpId"
|
|
|
- :configuration="configuration"
|
|
|
- ></select-component>
|
|
|
- </template>
|
|
|
- <template slot-scope="scope" slot="corpId">
|
|
|
- {{ scope.row.corpsName }}
|
|
|
- </template>
|
|
|
- <template slot-scope="scope" slot="menu">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-view"
|
|
|
- size="small"
|
|
|
- @click.stop="beforeOpenPage(scope.row, 1)"
|
|
|
- >查看
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- size="small"
|
|
|
- @click.stop="editOpen(scope.row, 2)"
|
|
|
- >编辑
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- size="small"
|
|
|
- @click.stop="rowDel(scope.row, scope.index)"
|
|
|
- >删除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </avue-crud>
|
|
|
- </basic-container>
|
|
|
+ <div>
|
|
|
+ <basic-container v-if="show">
|
|
|
+ <avue-crud
|
|
|
+ ref="crud"
|
|
|
+ :option="option"
|
|
|
+ :data="dataList"
|
|
|
+ v-model="form"
|
|
|
+ :page.sync="page"
|
|
|
+ :search.sync="search"
|
|
|
+ @search-change="searchChange"
|
|
|
+ @current-change="currentChange"
|
|
|
+ @size-change="sizeChange"
|
|
|
+ @refresh-change="refreshChange"
|
|
|
+ @on-load="onLoad"
|
|
|
+ :table-loading="loading"
|
|
|
+ >
|
|
|
+ <template slot="portOfLoadSearch">
|
|
|
+ <port-info v-model="search.portOfLoad" />
|
|
|
+ </template>
|
|
|
+ <template slot="portOfDestinationSearch">
|
|
|
+ <port-info v-model="search.portOfDestination" />
|
|
|
+ </template>
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="small"
|
|
|
+ @click.stop="newAdd()"
|
|
|
+ >新单</el-button
|
|
|
+ >
|
|
|
+ <el-button type="success" size="small" disabled>复制新单</el-button>
|
|
|
+ <el-button type="info" size="small">报表</el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="corpIdSearch">
|
|
|
+ <select-component
|
|
|
+ v-model="search.corpId"
|
|
|
+ :configuration="configuration"
|
|
|
+ ></select-component>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="corpId">
|
|
|
+ {{ scope.row.corpsName }}
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-view"
|
|
|
+ size="small"
|
|
|
+ @click.stop="beforeOpenPage(scope.row, 1)"
|
|
|
+ >查看
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="small"
|
|
|
+ @click.stop="editOpen(scope.row, 2)"
|
|
|
+ >编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ size="small"
|
|
|
+ @click.stop="rowDel(scope.row, scope.index)"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </basic-container>
|
|
|
+ <detail-page
|
|
|
+ ref="detail"
|
|
|
+ @goBack="goBack"
|
|
|
+ @inRefresh="refreshChange"
|
|
|
+ :detailData="detailData"
|
|
|
+ v-else
|
|
|
+ ></detail-page>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import option from "./config/mainList.json";
|
|
|
-import { getList, remove, getPorts } from "@/api/basicData/customerInquiry";
|
|
|
+import { getList, remove } from "@/api/basicData/customerInquiry";
|
|
|
+import detailPage from "./detailsPage.vue";
|
|
|
|
|
|
export default {
|
|
|
name: "customerInformation",
|
|
@@ -90,9 +101,13 @@ export default {
|
|
|
pageSize: 10,
|
|
|
currentPage: 1,
|
|
|
total: 0
|
|
|
- }
|
|
|
+ },
|
|
|
+ show: true,
|
|
|
+ detailData: {},
|
|
|
+ loading: false
|
|
|
};
|
|
|
},
|
|
|
+ components: { detailPage },
|
|
|
created() {
|
|
|
let _this = this;
|
|
|
this.option.column.forEach(e => {
|
|
@@ -113,16 +128,8 @@ export default {
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
- // getPorts().then(res => {
|
|
|
- // this.findObject(this.option.column, "portOfLoad").click =()=>{
|
|
|
- // console.log('11111111')
|
|
|
- // };
|
|
|
- // // this.findObject(this.option.column, "portOfDestination").dicData =
|
|
|
- // // res.data;
|
|
|
- // });
|
|
|
},
|
|
|
methods: {
|
|
|
- // getOpen
|
|
|
//删除列表后面的删除按钮触发触发(row, index, done)
|
|
|
rowDel(row, index, done) {
|
|
|
this.$confirm("确定删除数据?", {
|
|
@@ -141,18 +148,18 @@ export default {
|
|
|
},
|
|
|
//查看跳转页面
|
|
|
beforeOpenPage(row, status) {
|
|
|
- this.$router.$avueRouter.closeTag();
|
|
|
- this.$router.push({
|
|
|
- path: "/exportcustomerInquiry_detailsPage",
|
|
|
- query: { id: JSON.stringify(row.id), status: status }
|
|
|
- });
|
|
|
+ this.detailData = {
|
|
|
+ id: row.id,
|
|
|
+ status: status
|
|
|
+ };
|
|
|
+ this.show = false;
|
|
|
},
|
|
|
editOpen(row, status) {
|
|
|
- this.$router.$avueRouter.closeTag();
|
|
|
- this.$router.push({
|
|
|
- path: "/exportcustomerInquiry_detailsPage",
|
|
|
- query: { id: JSON.stringify(row.id), status: status }
|
|
|
- });
|
|
|
+ this.detailData = {
|
|
|
+ id: row.id,
|
|
|
+ status: status
|
|
|
+ };
|
|
|
+ this.show = false;
|
|
|
},
|
|
|
//点击搜索按钮触发
|
|
|
searchChange(params, done) {
|
|
@@ -168,24 +175,30 @@ export default {
|
|
|
this.page.pageSize = val;
|
|
|
},
|
|
|
onLoad(page, params) {
|
|
|
- getList(page.currentPage, page.pageSize, params).then(res => {
|
|
|
- this.dataList = res.data.data.records ? res.data.data.records : [];
|
|
|
- this.page.total = res.data.data.total;
|
|
|
- if (this.page.total) {
|
|
|
- this.option.height = window.innerHeight - 380;
|
|
|
- } else {
|
|
|
- this.option.height = window.innerHeight - 305;
|
|
|
- }
|
|
|
- });
|
|
|
+ this.loading = true;
|
|
|
+ getList(page.currentPage, page.pageSize, params)
|
|
|
+ .then(res => {
|
|
|
+ this.dataList = res.data.data.records ? res.data.data.records : [];
|
|
|
+ this.page.total = res.data.data.total;
|
|
|
+ if (this.page.total) {
|
|
|
+ this.option.height = window.innerHeight - 380;
|
|
|
+ } else {
|
|
|
+ this.option.height = window.innerHeight - 305;
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
refreshChange() {
|
|
|
this.onLoad(this.page, this.search);
|
|
|
},
|
|
|
newAdd() {
|
|
|
- this.$router.$avueRouter.closeTag();
|
|
|
- this.$router.push({
|
|
|
- path: "/exportcustomerInquiry_detailsPage"
|
|
|
- });
|
|
|
+ this.show = false;
|
|
|
+ },
|
|
|
+ goBack() {
|
|
|
+ this.show = true;
|
|
|
}
|
|
|
}
|
|
|
};
|