|
|
|
@ -1,224 +1,381 @@
|
|
|
|
|
<template> |
|
|
|
|
<basic-container> |
|
|
|
|
<avue-crud :option="option" |
|
|
|
|
v-model:search="search" |
|
|
|
|
v-model:page="page" |
|
|
|
|
v-model="form" |
|
|
|
|
:table-loading="loading" |
|
|
|
|
:data="data" |
|
|
|
|
:permission="permissionList" |
|
|
|
|
:before-open="beforeOpen" |
|
|
|
|
ref="crud" |
|
|
|
|
@row-update="rowUpdate" |
|
|
|
|
@row-save="rowSave" |
|
|
|
|
@row-del="rowDel" |
|
|
|
|
@search-change="searchChange" |
|
|
|
|
@search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" |
|
|
|
|
@current-change="currentChange" |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" |
|
|
|
|
@on-load="onLoad"> |
|
|
|
|
<avue-crud |
|
|
|
|
:option="option" |
|
|
|
|
v-model:search="search" |
|
|
|
|
v-model:page="page" |
|
|
|
|
v-model="form" |
|
|
|
|
:table-loading="loading" |
|
|
|
|
:data="data" |
|
|
|
|
:permission="permissionList" |
|
|
|
|
:before-open="beforeOpen" |
|
|
|
|
ref="crud" |
|
|
|
|
@row-update="rowUpdate" |
|
|
|
|
@row-save="rowSave" |
|
|
|
|
@row-del="rowDel" |
|
|
|
|
@search-change="searchChange" |
|
|
|
|
@search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" |
|
|
|
|
@current-change="currentChange" |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" |
|
|
|
|
@on-load="onLoad" |
|
|
|
|
> |
|
|
|
|
<template #menu-left> |
|
|
|
|
<el-button type="danger" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
plain |
|
|
|
|
v-if="permission.mtpackageInfo_delete" |
|
|
|
|
@click="handleDelete">删 除 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="warning" |
|
|
|
|
plain |
|
|
|
|
icon="el-icon-download" |
|
|
|
|
@click="handleExport">导 出 |
|
|
|
|
<!-- <el-button |
|
|
|
|
type="danger" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
plain |
|
|
|
|
v-if="permission.mtpackageInfo_delete" |
|
|
|
|
@click="handleDelete" |
|
|
|
|
>删 除 |
|
|
|
|
</el-button> --> |
|
|
|
|
<el-button type="warning" plain icon="el-icon-download" @click="handleExport" |
|
|
|
|
>导 出 |
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
|
|
<el-button type="warning" @click="handlePush">推送 </el-button> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template #menu="{ row, index, size }"> |
|
|
|
|
<el-button type="success" :size="size" @click="showRowView(row, index)" |
|
|
|
|
>查看</el-button |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
|
|
|
|
|
<el-dialog title="推送数据" append-to-body v-model="showPushDialog" width="555px"> |
|
|
|
|
<el-form label-width="80px"> |
|
|
|
|
<!-- 表单字段 --> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="showPushData" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择推送时间" |
|
|
|
|
:disabled-date="disabledDate" |
|
|
|
|
:shortcuts="shortcuts" |
|
|
|
|
:size="size" |
|
|
|
|
/> |
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
<template #footer> |
|
|
|
|
<span class="dialog-footer"> |
|
|
|
|
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit" |
|
|
|
|
>确 定</el-button |
|
|
|
|
> |
|
|
|
|
<el-button icon="el-icon-circle-close" @click="showPushDialog = false">取 消</el-button> |
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<el-dialog title="查看数据" append-to-body v-model="showRowViewDialog" width="1000px"> |
|
|
|
|
<el-form :model="showRowViewData" label-width="80px"> |
|
|
|
|
<!-- 表单字段 --> |
|
|
|
|
|
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="12" |
|
|
|
|
><div class="grid-content ep-bg-purple"> |
|
|
|
|
<el-form-item label="车次号"> |
|
|
|
|
<el-input v-model="showRowViewData.invoiceOrderCode" disabled /> |
|
|
|
|
</el-form-item></div |
|
|
|
|
></el-col> |
|
|
|
|
<el-col :span="12" |
|
|
|
|
><div class="grid-content ep-bg-purple-light"> |
|
|
|
|
<el-form-item label="订单号"> |
|
|
|
|
<el-input v-model="showRowViewData.orderCode" disabled /> |
|
|
|
|
</el-form-item></div |
|
|
|
|
></el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="12" |
|
|
|
|
><div class="grid-content ep-bg-purple"> |
|
|
|
|
<el-form-item label="包件码"> |
|
|
|
|
<el-input v-model="showRowViewData.packageCode" disabled /> |
|
|
|
|
</el-form-item></div |
|
|
|
|
></el-col> |
|
|
|
|
<el-col :span="12" |
|
|
|
|
><div class="grid-content ep-bg-purple-light"> |
|
|
|
|
<el-form-item label="推送状态"> |
|
|
|
|
<el-input v-model="showRowViewData.pushStatusName" disabled /> |
|
|
|
|
</el-form-item></div |
|
|
|
|
></el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<span>请求日志</span> |
|
|
|
|
|
|
|
|
|
<el-row v-for="(item) in showRowViewData.mtOrderLogVOS" :key="item.id"> |
|
|
|
|
<el-col :span="12" |
|
|
|
|
><div class="grid-content ep-bg-purple"> |
|
|
|
|
<el-form-item label="请求体"> |
|
|
|
|
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="item.reqArgs" disabled /> |
|
|
|
|
</el-form-item></div |
|
|
|
|
></el-col> |
|
|
|
|
<el-col :span="12" |
|
|
|
|
><div class="grid-content ep-bg-purple-light"> |
|
|
|
|
<el-form-item label="响应体"> |
|
|
|
|
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="item.resBody" disabled /> |
|
|
|
|
</el-form-item></div |
|
|
|
|
></el-col> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
</el-dialog> |
|
|
|
|
</basic-container> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import {getList, getDetail, add, update, remove} from "@/api/factory/mt/packageInfo"; |
|
|
|
|
import option from "@/option/factory/mt/packageInfo"; |
|
|
|
|
import {mapGetters} from "vuex"; |
|
|
|
|
import {exportBlob} from "@/api/common"; |
|
|
|
|
import {getToken} from '@/utils/auth'; |
|
|
|
|
import {downloadXls} from "@/utils/util"; |
|
|
|
|
import {dateNow} from "@/utils/date"; |
|
|
|
|
import NProgress from 'nprogress'; |
|
|
|
|
import 'nprogress/nprogress.css'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
import { getList, getDetail, add, update, remove, beachPush } from '@/api/factory/mt/packageInfo'; |
|
|
|
|
import option from '@/option/factory/mt/packageInfo'; |
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
|
import { exportBlob } from '@/api/common'; |
|
|
|
|
import { getToken } from '@/utils/auth'; |
|
|
|
|
import { downloadXls } from '@/utils/util'; |
|
|
|
|
import { dateNow } from '@/utils/date'; |
|
|
|
|
import NProgress from 'nprogress'; |
|
|
|
|
import 'nprogress/nprogress.css'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
form: {}, |
|
|
|
|
query: {}, |
|
|
|
|
search: {}, |
|
|
|
|
loading: true, |
|
|
|
|
page: { |
|
|
|
|
pageSize: 10, |
|
|
|
|
currentPage: 1, |
|
|
|
|
total: 0, |
|
|
|
|
}, |
|
|
|
|
selectionList: [], |
|
|
|
|
option: option, |
|
|
|
|
data: [], |
|
|
|
|
showPushDialog: false, |
|
|
|
|
showPushData: null, |
|
|
|
|
showRowViewDialog: false, |
|
|
|
|
showRowViewData: null, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters(['permission']), |
|
|
|
|
permissionList() { |
|
|
|
|
return { |
|
|
|
|
form: {}, |
|
|
|
|
query: {}, |
|
|
|
|
search: {}, |
|
|
|
|
loading: true, |
|
|
|
|
page: { |
|
|
|
|
pageSize: 10, |
|
|
|
|
currentPage: 1, |
|
|
|
|
total: 0 |
|
|
|
|
}, |
|
|
|
|
selectionList: [], |
|
|
|
|
option: option, |
|
|
|
|
data: [] |
|
|
|
|
addBtn: this.validData(this.permission.mtpackageInfo_add, false), |
|
|
|
|
viewBtn: this.validData(this.permission.mtpackageInfo_view, false), |
|
|
|
|
delBtn: this.validData(this.permission.mtpackageInfo_delete, false), |
|
|
|
|
editBtn: this.validData(this.permission.mtpackageInfo_edit, false), |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters(["permission"]), |
|
|
|
|
permissionList() { |
|
|
|
|
return { |
|
|
|
|
addBtn: this.validData(this.permission.mtpackageInfo_add, false), |
|
|
|
|
viewBtn: this.validData(this.permission.mtpackageInfo_view, false), |
|
|
|
|
delBtn: this.validData(this.permission.mtpackageInfo_delete, false), |
|
|
|
|
editBtn: this.validData(this.permission.mtpackageInfo_edit, false) |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
ids() { |
|
|
|
|
let ids = []; |
|
|
|
|
this.selectionList.forEach(ele => { |
|
|
|
|
ids.push(ele.id); |
|
|
|
|
}); |
|
|
|
|
return ids.join(","); |
|
|
|
|
} |
|
|
|
|
ids() { |
|
|
|
|
let ids = []; |
|
|
|
|
this.selectionList.forEach(ele => { |
|
|
|
|
ids.push(ele.id); |
|
|
|
|
}); |
|
|
|
|
return ids.join(','); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
rowSave(row, done, loading) { |
|
|
|
|
add(row).then(() => { |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
rowSave(row, done, loading) { |
|
|
|
|
add(row).then( |
|
|
|
|
() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
done(); |
|
|
|
|
}, error => { |
|
|
|
|
}, |
|
|
|
|
error => { |
|
|
|
|
loading(); |
|
|
|
|
window.console.log(error); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
|
update(row).then(() => { |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
|
update(row).then( |
|
|
|
|
() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
done(); |
|
|
|
|
}, error => { |
|
|
|
|
}, |
|
|
|
|
error => { |
|
|
|
|
loading(); |
|
|
|
|
console.log(error); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
rowDel(row) { |
|
|
|
|
this.$confirm("确定将选择数据删除?", { |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning" |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
return remove(row.id); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleDelete() { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
this.$message.warning("请选择至少一条数据"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.$confirm("确定将选择数据删除?", { |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning" |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
rowDel(row) { |
|
|
|
|
this.$confirm('确定将选择数据删除?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
return remove(row.id); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
return remove(this.ids); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
|
.then(() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleExport() { |
|
|
|
|
let downloadUrl = `/logpm_factory/mtpackageInfo/export-mtpackageInfo?${this.website.tokenHeader}=${getToken()}`; |
|
|
|
|
const { |
|
|
|
|
} = this.query; |
|
|
|
|
let values = { |
|
|
|
|
}; |
|
|
|
|
this.$confirm("是否导出数据?", "提示", { |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
NProgress.start(); |
|
|
|
|
exportBlob(downloadUrl, values).then(res => { |
|
|
|
|
downloadXls(res.data, `梦天订单包件${dateNow()}.xlsx`); |
|
|
|
|
NProgress.done(); |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
beforeOpen(done, type) { |
|
|
|
|
if (["edit", "view"].includes(type)) { |
|
|
|
|
getDetail(this.form.id).then(res => { |
|
|
|
|
this.form = res.data.data; |
|
|
|
|
}, |
|
|
|
|
handleDelete() { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
this.$message.warning('请选择至少一条数据'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.$confirm('确定将选择数据删除?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
return remove(this.ids); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleExport() { |
|
|
|
|
let downloadUrl = `/logpm_factory/mtpackageInfo/export-mtpackageInfo?${ |
|
|
|
|
this.website.tokenHeader |
|
|
|
|
}=${getToken()}`; |
|
|
|
|
const {} = this.query; |
|
|
|
|
let values = {}; |
|
|
|
|
this.$confirm('是否导出数据?', '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}).then(() => { |
|
|
|
|
NProgress.start(); |
|
|
|
|
exportBlob(downloadUrl, values).then(res => { |
|
|
|
|
downloadXls(res.data, `梦天订单包件${dateNow()}.xlsx`); |
|
|
|
|
NProgress.done(); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 推送数据 |
|
|
|
|
handlePush() { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
this.$message.warning('请选择至少一条数据'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 获取选中的数据 |
|
|
|
|
let pushStatuses = this.selectionList.map(item => item.pushStatus); |
|
|
|
|
console.log(pushStatuses); |
|
|
|
|
if (pushStatuses.includes(1)) { |
|
|
|
|
this.$message.warning('选择的数据中存在已推送的数据'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 获取选中的数据 |
|
|
|
|
let pushIds = this.selectionList.map(item => item.id); |
|
|
|
|
console.log(pushIds); |
|
|
|
|
|
|
|
|
|
// 打开对话框 |
|
|
|
|
this.showPushDialog = true; |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 提交弹出框的数据 |
|
|
|
|
*/ |
|
|
|
|
handleSubmit() { |
|
|
|
|
// 构建请求对象 |
|
|
|
|
|
|
|
|
|
let pushStatuses = this.selectionList.map(item => item.pushStatus); |
|
|
|
|
console.log(pushStatuses); |
|
|
|
|
if (pushStatuses.includes(1)) { |
|
|
|
|
this.$message.warning('选择的数据中存在已推送的数据'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
beachPush(this.ids, this.showPushData).then(res => { |
|
|
|
|
console.log(' 推送结果 =', res.data); |
|
|
|
|
if (res.data.code === 200) { |
|
|
|
|
this.$message.success('推送成功'); |
|
|
|
|
this.onLoad(this.page, this.query) |
|
|
|
|
} |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
searchReset() { |
|
|
|
|
this.query = {}; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
searchChange(params, done) { |
|
|
|
|
this.query = params; |
|
|
|
|
this.page.currentPage = 1; |
|
|
|
|
this.onLoad(this.page, params); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
selectionChange(list) { |
|
|
|
|
this.selectionList = list; |
|
|
|
|
}, |
|
|
|
|
selectionClear() { |
|
|
|
|
this.selectionList = []; |
|
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
|
}, |
|
|
|
|
currentChange(currentPage){ |
|
|
|
|
this.page.currentPage = currentPage; |
|
|
|
|
}, |
|
|
|
|
sizeChange(pageSize){ |
|
|
|
|
this.page.pageSize = pageSize; |
|
|
|
|
}, |
|
|
|
|
refreshChange() { |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 关闭对话框 |
|
|
|
|
this.showPushDialog = false; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
const { |
|
|
|
|
} = this.query; |
|
|
|
|
showRowView(row, index) { |
|
|
|
|
this.showRowViewData = row; |
|
|
|
|
|
|
|
|
|
let values = { |
|
|
|
|
}; |
|
|
|
|
getDetail(row.id).then(res => { |
|
|
|
|
this.showRowViewData = res.data.data; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
getList(page.currentPage, page.pageSize, values).then(res => { |
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
this.data = data.records; |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
this.showRowViewDialog = true; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
beforeOpen(done, type) { |
|
|
|
|
if (['edit', 'view'].includes(type)) { |
|
|
|
|
getDetail(this.form.id).then(res => { |
|
|
|
|
this.form = res.data.data; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
searchReset() { |
|
|
|
|
this.query = {}; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
searchChange(params, done) { |
|
|
|
|
this.query = params; |
|
|
|
|
this.page.currentPage = 1; |
|
|
|
|
this.onLoad(this.page, params); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
selectionChange(list) { |
|
|
|
|
this.selectionList = list; |
|
|
|
|
}, |
|
|
|
|
selectionClear() { |
|
|
|
|
this.selectionList = []; |
|
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
|
}, |
|
|
|
|
currentChange(currentPage) { |
|
|
|
|
this.page.currentPage = currentPage; |
|
|
|
|
}, |
|
|
|
|
sizeChange(pageSize) { |
|
|
|
|
this.page.pageSize = pageSize; |
|
|
|
|
}, |
|
|
|
|
refreshChange() { |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
|
|
const { invoiceOrderCode } = this.query; |
|
|
|
|
|
|
|
|
|
let values = { |
|
|
|
|
invoiceOrderCode: invoiceOrderCode, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
getList(page.currentPage, page.pageSize, values).then(res => { |
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
this.data = data.records; |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style> |
|
|
|
|