Commit 86f80425 authored by 智勇's avatar 智勇

调整订单历史接口

parent 62700c80
# vue-admin-template # ka-op-ui
KA联调平台,对应后端服务为cash-loan-flow-boss
> A minimal vue admin template with Element UI & axios & iconfont & permission control & lint \ No newline at end of file
**Live demo:** http://panjiachen.github.io/vue-admin-template
[中文文档](https://github.com/PanJiaChen/vue-admin-template/blob/master/README-zh.md)
## Build Setup
```bash
# Clone project
git clone https://github.com/PanJiaChen/vue-admin-template.git
# Install dependencies
npm install
# Serve with hot reload at localhost:9528
npm run dev
# Build for production with minification
npm run build
# Build for production and view the bundle analyzer report
npm run build --report
```
## Demo
![demo](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/demo.gif)
## Extra
If you want router permission && generate menu by user roles , you can use this branch [permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control)
This project is based on `webpack4` development. If you want to use `webpack3` development, please use this branch [webpack3](https://github.com/PanJiaChen/vue-admin-template/tree/webpack3)
For `typescript` version, you can use [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour))
## Related Project
[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
[electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
[vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template)
### Element-Ui using cdn tutorial
First find `index.html`([root directory](https://github.com/PanJiaChen/vue-admin-template/blob/element-ui-cdn/index.html))
Import css and js of `Element`, and then import vue. Because `Element` is vue-dependent, vue must be import before it.
Then find [webpack.base.conf.js](https://github.com/PanJiaChen/vue-admin-template/blob/element-ui-cdn/build/webpack.base.conf.js)
Add `externals` to make webpack not package vue and element.
```
externals: {
vue: 'Vue',
'element-ui':'ELEMENT'
}
```
Finally there is a small detail to pay attention to that if you import vue in global, you don't need to manually `Vue.use(Vuex)`, it will be automatically mounted, see
[issue](https://github.com/vuejs/vuex/issues/731)
And you can use `npm run build --report` to see the effect
Pictured:
![demo](https://panjiachen.github.io/images/element-cdn.png)
**[Detailed code](https://github.com/PanJiaChen/vue-admin-template/commit/746aff560932704ae821f82f10b8b2a9681d5177)**
**[Branch](https://github.com/PanJiaChen/vue-admin-template/tree/element-ui-cdn)**
## Browsers support
Modern browsers and Internet Explorer 10+.
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
## License
[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license.
Copyright (c) 2017-present PanJiaChen
...@@ -16,9 +16,9 @@ export function approve(data) { ...@@ -16,9 +16,9 @@ export function approve(data) {
}) })
} }
export function getOrderDetail(query) { export function getOrderHistory(query) {
return request({ return request({
url: '/order/status/info', url: '/order/history/status',
method: 'get', method: 'get',
params: query params: query
}) })
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
fit fit
highlight-current-row highlight-current-row
style="margin-bottom:20px" style="margin-bottom:20px"
> @current-change="handleCurrentChange">
<el-table-column label="ID" type="index" align="center" width="65"/> <el-table-column label="ID" type="index" align="center" width="65"/>
...@@ -41,15 +41,13 @@ ...@@ -41,15 +41,13 @@
<el-tab-pane label="订单状态" name="first"> <el-tab-pane label="订单状态" name="first">
<el-table <el-table
ref="orderTable" ref="orderTable"
:data="orderDetail" :data="orderHistory"
fit fit
highlight-current-row highlight-current-row
style="margin-bottom:20px"> style="margin-bottom:20px">
<el-table-column sortable label="订单号" prop="channelOrderNumber" align="center"/>
<el-table-column sortable label="渠道号" prop="channelId" align="center"/>
<el-table-column label="订单状态" prop="status" align="center"/> <el-table-column label="订单状态" prop="status" align="center"/>
<el-table-column label="创建时间" prop="createdAt" align="center"/> <el-table-column label="创建时间" prop="updateTime" align="center"/>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
...@@ -101,7 +99,7 @@ ...@@ -101,7 +99,7 @@
</template> </template>
<script> <script>
import { getOrders, getOrderDetail, approve, cancelLoan, lendLoan } from '@/api/order' import { getOrders, getOrderHistory, approve, cancelLoan, lendLoan } from '@/api/order'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
export default { export default {
...@@ -123,7 +121,7 @@ export default { ...@@ -123,7 +121,7 @@ export default {
opt: '', opt: '',
orders: [], orders: [],
order: {}, order: {},
orderDetail: [], orderHistory: [],
approveData: {}, approveData: {},
typeOptions: [ typeOptions: [
{ key: '0', display_name: '存管' }, { key: '0', display_name: '存管' },
...@@ -155,9 +153,9 @@ export default { ...@@ -155,9 +153,9 @@ export default {
this.orders = res.data.content this.orders = res.data.content
this.count = res.data.totalElements this.count = res.data.totalElements
// if (this.orders.length > 0) { if (this.orders.length > 0) {
// this.$refs.myTable.setCurrentRow(this.orders[0]) this.$refs.myTable.setCurrentRow(this.orders[0])
// } }
// for test // for test
// for (const o in this.orders) { // for (const o in this.orders) {
...@@ -167,8 +165,9 @@ export default { ...@@ -167,8 +165,9 @@ export default {
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
getOrderDetail({ channelOrderNumber: val.channelOrderNumber }).then(res => { this.orderHistory = []
this.orderDetail = res.data getOrderHistory({ channelOrderNumber: val.channelOrderNumber }).then(res => {
this.orderHistory = res.data.historyStatus
}) })
}, },
...@@ -210,6 +209,7 @@ export default { ...@@ -210,6 +209,7 @@ export default {
duration: 1000 duration: 1000
}) })
}) })
this.getOrders()
}, },
cancelLoan() { cancelLoan() {
...@@ -220,6 +220,7 @@ export default { ...@@ -220,6 +220,7 @@ export default {
duration: 1000 duration: 1000
}) })
}) })
this.getOrders()
}, },
handleApprove(data) { handleApprove(data) {
...@@ -231,6 +232,7 @@ export default { ...@@ -231,6 +232,7 @@ export default {
type: 'success', type: 'success',
duration: 1000 duration: 1000
}) })
this.getOrders()
}) })
this.dialogFormVisible = false this.dialogFormVisible = false
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment