|
@@ -127,6 +127,7 @@
|
|
|
:table-loading="loading"
|
|
|
:data="data"
|
|
|
ref="crud"
|
|
|
+ @refresh-change="refreshChange"
|
|
|
@selection-change="selectionChange"
|
|
|
:page.sync="page"
|
|
|
@on-load="onLoad"></avue-crud>
|
|
@@ -147,18 +148,20 @@ import {customerList, typeSave, detail, deleteDetails,
|
|
|
corpsattn,
|
|
|
corpsbank,
|
|
|
corpsfiles,
|
|
|
- corpsitem} from "@/api/basicData/configuration"
|
|
|
+ corpsitem,
|
|
|
+ getList} from "@/api/basicData/configuration"
|
|
|
import customerContact from "./configuration/customerContact.json"
|
|
|
import advantageProject from "./configuration/advantageProject.json"
|
|
|
import bankOfDeposit from "./configuration/bankOfDeposit.json"
|
|
|
import commodity from "./configuration/commodity.json"
|
|
|
-import {getDeptLazyTree, getList} from "@/api/basicData/commodityType";
|
|
|
+import {getDeptLazyTree} from "@/api/basicData/commodityType";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
form: {},
|
|
|
data:[],
|
|
|
+ treeDeptId:'',
|
|
|
page:{
|
|
|
pageSize: 10,
|
|
|
currentPage: 1,
|
|
@@ -627,13 +630,17 @@ export default {
|
|
|
selectionChange(list){
|
|
|
console.log(list);
|
|
|
this.tableData = list
|
|
|
- if (list.length > 1){
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '警告,只允许导入一条',
|
|
|
- type: 'warning'
|
|
|
- });
|
|
|
- }
|
|
|
+ },
|
|
|
+ nodeClick(data) {
|
|
|
+ this.treeDeptId = data.id;
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoad(this.page);
|
|
|
+ },
|
|
|
+ //刷新触发
|
|
|
+ refreshChange() {
|
|
|
+ this.treeDeptId = '';
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoad(this.page);
|
|
|
},
|
|
|
//新增商品信息保存触发
|
|
|
rowSave(row, done, loading){
|
|
@@ -684,6 +691,7 @@ export default {
|
|
|
onLoad(page, params = {}) {
|
|
|
this.loading = true;
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
|
|
|
+ console.log(res)
|
|
|
const data = res.data.data;
|
|
|
this.page.total = data.total;
|
|
|
this.data = data.records;
|