|
|
@@ -14,7 +14,7 @@
|
|
|
ref="searchBox"
|
|
|
:formData="formData"
|
|
|
:formList="formList"
|
|
|
- @search="search"
|
|
|
+ @search="search(3)"
|
|
|
@init="init"
|
|
|
/>
|
|
|
<picture-list
|
|
|
@@ -162,12 +162,12 @@
|
|
|
:total="total"
|
|
|
:pageSize.sync="formData.pageSize"
|
|
|
:currentPage.sync="formData.pageNum"
|
|
|
- @search="search"
|
|
|
+ @search="search(3)"
|
|
|
/>
|
|
|
<dislog-tip
|
|
|
:dialogVisible.sync="tipDialogVisible"
|
|
|
:orderInfo="activeOrderInfo"
|
|
|
- @search="search"
|
|
|
+ @search="search(3)"
|
|
|
/>
|
|
|
<!-- 订单详情 -->
|
|
|
<dislog-order-details
|
|
|
@@ -177,14 +177,13 @@
|
|
|
/>
|
|
|
<arap-remarks
|
|
|
:info="activeOrderInfo"
|
|
|
- @search="search"
|
|
|
+ @search="search(4)"
|
|
|
:dialogVisible.sync="remarkDialogVisible"
|
|
|
/>
|
|
|
<dislog-set
|
|
|
:dialogVisible.sync="examineDialogVisible"
|
|
|
- @search="search"
|
|
|
+ @search="search(4)"
|
|
|
:info="activeOrderInfoArray"
|
|
|
- @update="update"
|
|
|
></dislog-set>
|
|
|
<!-- 坏账设置 -->
|
|
|
<dislog-bad-bill
|
|
|
@@ -860,7 +859,7 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
- load(tree, treeNode, resolve) {
|
|
|
+ load(tree, treeNode, resolve, type) {
|
|
|
monthOrderList({
|
|
|
divideLogId: tree.id,
|
|
|
roleId: this.formData.roleId,
|
|
|
@@ -886,6 +885,15 @@ export default {
|
|
|
this.setChildren(res.data, true);
|
|
|
});
|
|
|
}
|
|
|
+ if (type === 2) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.tableList.$refs.pagerset.toggleRowSelection(
|
|
|
+ tree,
|
|
|
+ false
|
|
|
+ );
|
|
|
+ this.setChildren(res.data, false);
|
|
|
+ });
|
|
|
+ }
|
|
|
tree.active = true;
|
|
|
})
|
|
|
.catch(() => {
|
|
|
@@ -893,7 +901,7 @@ export default {
|
|
|
});
|
|
|
this.maps.set(tree.id, { tree, treeNode, resolve });
|
|
|
},
|
|
|
- update(parentId) {
|
|
|
+ update(parentId, type) {
|
|
|
const { tree, treeNode, resolve } = this.maps.get(parentId);
|
|
|
this.$set(
|
|
|
this.$refs.tableList.$refs.pagerset.store.states.lazyTreeNodeMap,
|
|
|
@@ -901,10 +909,9 @@ export default {
|
|
|
[]
|
|
|
);
|
|
|
if (tree) {
|
|
|
- this.load(tree, treeNode, resolve);
|
|
|
+ this.load(tree, treeNode, resolve, type);
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
setChildren(children, type) {
|
|
|
// 编辑多个子层级
|
|
|
children.map((j) => {
|
|
|
@@ -916,8 +923,10 @@ export default {
|
|
|
},
|
|
|
// 选中父节点时,子节点一起选中取消
|
|
|
async selectRow(selection, row) {
|
|
|
+ if (this.type === 0) return;
|
|
|
if (!row.oId && row.active !== true) {
|
|
|
row.active = true;
|
|
|
+ if (this.maps.get(row.id) !== undefined) return;
|
|
|
const index = this.tableData.findIndex((e) => e.id == row.id);
|
|
|
const box = document.querySelectorAll(".el-table__row--level-0")[index];
|
|
|
const btn = box.querySelector(".el-table__expand-icon");
|
|
|
@@ -931,7 +940,6 @@ export default {
|
|
|
});
|
|
|
btn.dispatchEvent(event);
|
|
|
}
|
|
|
-
|
|
|
const hasSelect = selection.some((el) => {
|
|
|
return row.id === el.id;
|
|
|
});
|
|
|
@@ -1002,19 +1010,29 @@ export default {
|
|
|
search(v) {
|
|
|
this.loading = true;
|
|
|
if (v === 2) {
|
|
|
+ this.tableData = [];
|
|
|
+ this.maps.clear();
|
|
|
this.formData = {
|
|
|
pageSize: 10,
|
|
|
pageNum: 1,
|
|
|
month: [],
|
|
|
};
|
|
|
}
|
|
|
+ if (v === 3) {
|
|
|
+ this.tableData = [];
|
|
|
+ this.maps.clear();
|
|
|
+ }
|
|
|
this.$nextTick(() => {
|
|
|
this.activeList = [];
|
|
|
this.$refs.tableList.clearMoreActive();
|
|
|
});
|
|
|
- this.maps.forEach((value, id) => {
|
|
|
- this.update(id);
|
|
|
- });
|
|
|
+ if (v === 4 && this.type !== 0) {
|
|
|
+ this.maps.forEach((value, id) => {
|
|
|
+ this.update(id, 2);
|
|
|
+ });
|
|
|
+ this.loading = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.getDataList();
|
|
|
},
|
|
|
init() {
|