diff --git a/src/api/dashboard/dashboard.js b/src/api/dashboard/dashboard.js new file mode 100644 index 0000000..7c76a38 --- /dev/null +++ b/src/api/dashboard/dashboard.js @@ -0,0 +1,14 @@ +import request from '@/utils/request' + +/** + * 获取统计数据 + * @param {Object} query 查询参数 + * @returns {Promise} 返回统计数据 + */ +export function getStat(query) { + return request({ + url: '/dashboard/stat', + method: 'get', + params: query + }) +} diff --git a/src/components/BaseRemoteSelect/index.vue b/src/components/BaseRemoteSelect/index.vue new file mode 100644 index 0000000..88e55af --- /dev/null +++ b/src/components/BaseRemoteSelect/index.vue @@ -0,0 +1,147 @@ + + + + + \ No newline at end of file diff --git a/src/components/BaseRemoteSelect/mixins.js b/src/components/BaseRemoteSelect/mixins.js new file mode 100644 index 0000000..72534e3 --- /dev/null +++ b/src/components/BaseRemoteSelect/mixins.js @@ -0,0 +1,59 @@ +export const $remoteSelect = { + props: { + // 选中值 + value: { + type: [String, Array], + default: null + }, + // 自定义查询参数 + query: { + type: Object, + default: () => ({}) + }, + // 是否多选 + multiple: { + type: Boolean, + default: false + }, + // 初始化选项 + initOptions: { + type: Array, + default: () => [] + }, + // 选中值的属性 + prop: { + type: String, + default: 'id' + }, + // 展示值的属性 + showProp: { + type: String, + default: 'name' + }, + // 搜索关键字属性 + keywordProp: { + type: String, + default: 'keyword' + }, + // 列表接口 + listApi: { + type: Function, + default: () => {} + }, + // 加载接口 + loadApi: { + type: Function, + default: null + }, + // 空数据文本 + emptyText: { + type: String, + default: '暂无数据' + }, + // 获取选项前回调 + beforeGetOptions: { + type: Function, + default: () => {return true;} + } + }, +} \ No newline at end of file diff --git a/src/components/Business/Area/AreaRemoteSelect.vue b/src/components/Business/Area/AreaRemoteSelect.vue index 8b4a3de..30bd8df 100644 --- a/src/components/Business/Area/AreaRemoteSelect.vue +++ b/src/components/Business/Area/AreaRemoteSelect.vue @@ -1,152 +1,29 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/src/components/Business/Suit/SuitRemoteSelect.vue b/src/components/Business/Suit/SuitRemoteSelect.vue new file mode 100644 index 0000000..980228c --- /dev/null +++ b/src/components/Business/Suit/SuitRemoteSelect.vue @@ -0,0 +1,30 @@ + + + \ No newline at end of file diff --git a/src/components/StatisticsCard/index.vue b/src/components/StatisticsCard/index.vue index 0ed0e3c..7579795 100644 --- a/src/components/StatisticsCard/index.vue +++ b/src/components/StatisticsCard/index.vue @@ -1,9 +1,10 @@ @@ -244,6 +252,8 @@ /> + + @@ -252,7 +262,8 @@ import { listOrder, endOrder } from "@/api/bst/order"; import { $showColumns } from '@/utils/mixins'; import FormCol from "@/components/FormCol/index.vue"; import { OrderStatus } from "@/utils/enums"; -import OrderRefundDialog from "./components/OrderRefundDialog.vue"; +import OrderRefundDialog from "@/views/bst/order/components/OrderRefundDialog.vue"; +import OrderVerifyDialog from "@/views/bst/order/components/OrderVerifyDialog.vue"; // 默认排序字段 const defaultSort = { @@ -264,7 +275,7 @@ export default { name: "Order", mixins: [$showColumns], dicts: ['order_status', 'suit_type', 'order_return_type', 'order_return_mode', 'suit_rental_unit', 'suit_riding_rule'], - components: {FormCol, OrderRefundDialog}, + components: {FormCol, OrderRefundDialog, OrderVerifyDialog}, data() { return { span: 24, @@ -274,7 +285,7 @@ export default { {key: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"}, {key: 'no', visible: true, label: '订单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"}, {key: 'suitName', visible: true, label: '套餐', minWidth: "200", sortable: true, overflow: false, align: 'left', width: null}, - {key: 'device', visible: true, label: '设备', minWidth: "150", sortable: false, overflow: false, align: 'left', width: null}, + {key: 'device', visible: true, label: '当前设备', minWidth: "150", sortable: false, overflow: false, align: 'left', width: null}, {key: 'totalFee', visible: true, label: '费用', minWidth: "230", sortable: false, overflow: false, align: 'left', width: null}, {key: 'useInfo', visible: true, label: '使用', minWidth: "130", sortable: false, overflow: false, align: 'left', width: null}, {key: 'time', visible: true, label: '时间', minWidth: "180", sortable: false, overflow: false, align: 'left', width: null}, @@ -330,13 +341,18 @@ export default { }, row: {}, showRefundDialog: false, + showVerifyDialog: false, }; }, created() { this.getList(); }, methods: { + handleVerify(row) { + this.showVerifyDialog = true; + }, handleView(row) { + this.row = row; this.$router.push(`/view/order/${row.id}`) }, handleEnd(row) { diff --git a/src/views/bst/order/view/view.vue b/src/views/bst/order/view/view.vue index bf22c5f..4067862 100644 --- a/src/views/bst/order/view/view.vue +++ b/src/views/bst/order/view/view.vue @@ -3,8 +3,37 @@ + + 结束 + 退款 + 审核 + - + {{ detail.no | dv}} @@ -37,7 +66,7 @@ - + {{ detail.suitName }} @@ -53,7 +82,7 @@ - + @@ -100,31 +129,38 @@ - + - + - + - + + + + + + \ No newline at end of file diff --git a/src/views/system/user/components/UserFormDialog.vue b/src/views/system/user/components/UserFormDialog.vue index 7073e8d..e0af23f 100644 --- a/src/views/system/user/components/UserFormDialog.vue +++ b/src/views/system/user/components/UserFormDialog.vue @@ -1,12 +1,12 @@