|
@@ -52,18 +52,23 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
- this.fetchList(this.params, this.page);
|
|
|
+ // this.fetchList(this.params, this.page);
|
|
|
+ this.handleRefreshList();
|
|
|
},
|
|
|
methods: {
|
|
|
async fetchList(data, params) {
|
|
|
+
|
|
|
try {
|
|
|
this.loading = true;
|
|
|
params['isAsc'] = 'desc';
|
|
|
params['orderByColumn'] = 'updateTime';
|
|
|
|
|
|
const { code, msg, rows, total } = await orderApi.list(data, params);
|
|
|
+
|
|
|
if (code === 200) {
|
|
|
+
|
|
|
this.page.total = total;
|
|
|
+
|
|
|
this.tableData = rows;
|
|
|
}
|
|
|
} catch (err) {
|
|
@@ -86,13 +91,18 @@ export default {
|
|
|
// 刷新操作
|
|
|
handleRefreshList() {
|
|
|
this.page = initPage();
|
|
|
+ this.checkedList = [];
|
|
|
+
|
|
|
+ this.checkedTabList = [];
|
|
|
+
|
|
|
+ this.primaryResource = {};
|
|
|
this.fetchList(this.params, this.page);
|
|
|
},
|
|
|
// 查询操作
|
|
|
handleQueryList() {
|
|
|
let {date} = this.params;
|
|
|
- this.params.startDate = date ? date[0] :'';
|
|
|
- this.params.endDate = date ? date[1] : '';
|
|
|
+ this.params.startDate = date ? date[0] :'';
|
|
|
+ this.params.endDate = date ? date[1] : '';
|
|
|
this.fetchList(this.params, this.page);
|
|
|
},
|
|
|
// 重置操作
|
|
@@ -187,7 +197,7 @@ export default {
|
|
|
|
|
|
if (code === 200) {
|
|
|
|
|
|
- this.fetchList(this.params, this.page);
|
|
|
+ this.handleRefreshList();
|
|
|
|
|
|
}
|
|
|
})
|
|
@@ -209,7 +219,7 @@ export default {
|
|
|
|
|
|
if (code == 200) {
|
|
|
|
|
|
- this.fetchList(this.params, this.page);
|
|
|
+ this.handleRefreshList();
|
|
|
|
|
|
}
|
|
|
|
|
@@ -234,34 +244,6 @@ export default {
|
|
|
handleAllReturn() {
|
|
|
|
|
|
this.handleReturn(this.checkedList[0].id,[]);
|
|
|
- // this.$prompt('请输入退回原因', '提示', {
|
|
|
- // confirmButtonText: '确定',
|
|
|
- // cancelButtonText: '取消',
|
|
|
- // inputPattern: /\s*\S+?/,
|
|
|
- // inputErrorMessage: '退回原因不能为空'
|
|
|
- // }).then(async ({ value }) => {
|
|
|
-
|
|
|
- // let data = {
|
|
|
- // id: this.checkedList[0].id,
|
|
|
- // documentIds: [],
|
|
|
- // baskCause: value,
|
|
|
- // };
|
|
|
-
|
|
|
- // console.log(data);
|
|
|
-
|
|
|
- // try {
|
|
|
-
|
|
|
- // let { code, msg } = await orderApi.documentsReturn(data);
|
|
|
-
|
|
|
- // if (code === 200) {
|
|
|
-
|
|
|
- // this.fetchList(this.params, this.page);
|
|
|
-
|
|
|
- // }
|
|
|
- // } catch (error) {
|
|
|
- // console.log(error,'error------------');
|
|
|
- // }
|
|
|
- // }).catch(() => { });
|
|
|
|
|
|
},
|
|
|
// 判断“行退回”按钮
|
|
@@ -308,13 +290,7 @@ export default {
|
|
|
|
|
|
if (code === 200) {
|
|
|
|
|
|
- this.fetchList(this.params, this.page);
|
|
|
-
|
|
|
- this.checkedList = [];
|
|
|
-
|
|
|
- this.checkedTabList = [];
|
|
|
-
|
|
|
- this.primaryResource = {};
|
|
|
+ this.handleRefreshList();
|
|
|
|
|
|
}
|
|
|
} catch (error) {
|
|
@@ -353,7 +329,7 @@ export default {
|
|
|
|
|
|
if (code === 200) {
|
|
|
|
|
|
- this.fetchList(this.params, this.page);
|
|
|
+ this.handleRefreshList();
|
|
|
|
|
|
}
|
|
|
})
|