新增订单快捷收银
This commit is contained in:
@@ -2,50 +2,63 @@ import request from "@/utils/request.js";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取订单列表
|
* 获取订单列表
|
||||||
* @param {*} params
|
* @param {*} params
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function orderfindOrder(params) {
|
export function orderfindOrder(params) {
|
||||||
return request({
|
return request({
|
||||||
method: "get",
|
method: "get",
|
||||||
url: "order/findOrder",
|
url: "order/findOrder",
|
||||||
params
|
params,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 订单详情
|
* 订单详情
|
||||||
* @param {*} params
|
* @param {*} params
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function orderorderDetail(params) {
|
export function orderorderDetail(params) {
|
||||||
return request({
|
return request({
|
||||||
method: "get",
|
method: "get",
|
||||||
url: "order/orderDetail",
|
url: "order/orderDetail",
|
||||||
params
|
params,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 退单
|
* 退单
|
||||||
* @param {*} params
|
* @param {*} params
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function payreturnOrder(data) {
|
export function payreturnOrder(data) {
|
||||||
return request({
|
return request({
|
||||||
method: "post",
|
method: "post",
|
||||||
url: "pay/returnOrder",
|
url: "pay/returnOrder",
|
||||||
data
|
data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打印
|
* 打印
|
||||||
* @param {*} params
|
* @param {*} params
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function cloudPrinterprint(params) {
|
export function cloudPrinterprint(params) {
|
||||||
return request({
|
return request({
|
||||||
method: "get",
|
method: "get",
|
||||||
url: "cloudPrinter/print",
|
url: "cloudPrinter/print",
|
||||||
params
|
params,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询快捷收银订单
|
||||||
|
* @param {*} params
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function queryQuickPay(params) {
|
||||||
|
return request({
|
||||||
|
method: "get",
|
||||||
|
url: "pay/queryQuickPay",
|
||||||
|
params,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
100
src/views/order/components/cashTable.vue
Normal file
100
src/views/order/components/cashTable.vue
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="tab_container">
|
||||||
|
<el-table :data="tableData.list" height="560px" v-loading="tableData.loading">
|
||||||
|
<el-table-column label="订单号" prop="orderNo"></el-table-column>
|
||||||
|
<el-table-column label="金额" prop="amount">
|
||||||
|
<template v-slot="scope">
|
||||||
|
¥{{ scope.row.amount }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="支付类型" prop="payType">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-tag disable-transitions :type="payTypeFilter(scope.row.payType).type">
|
||||||
|
{{ payTypeFilter(scope.row.payType).label }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" prop="createTime">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ dayjs(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div class="pagination">
|
||||||
|
<el-pagination @current-change="paginationChange" :current-page="tableData.page" :page-size="tableData.size"
|
||||||
|
layout="total, prev, pager, next, jumper" :total="tableData.total" background>
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
import { queryQuickPay } from '@/api/order'
|
||||||
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
|
|
||||||
|
const tableData = reactive({
|
||||||
|
resetLoading: false,
|
||||||
|
proName: '',
|
||||||
|
status: '',
|
||||||
|
loading: false,
|
||||||
|
list: [],
|
||||||
|
page: 1,
|
||||||
|
size: 10,
|
||||||
|
total: 0
|
||||||
|
})
|
||||||
|
|
||||||
|
// 分页变化
|
||||||
|
function paginationChange(e) {
|
||||||
|
tableData.page = e
|
||||||
|
queryQuickPayAjax()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 支付类型
|
||||||
|
function payTypeFilter(t) {
|
||||||
|
const m = {
|
||||||
|
cash: {
|
||||||
|
type: 'primary',
|
||||||
|
label: '现金'
|
||||||
|
},
|
||||||
|
scanCode: {
|
||||||
|
type: 'warning',
|
||||||
|
label: '扫码'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return m[t]
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询快捷收银订单
|
||||||
|
async function queryQuickPayAjax() {
|
||||||
|
try {
|
||||||
|
tableData.loading = true
|
||||||
|
const res = await queryQuickPay({
|
||||||
|
page: tableData.page,
|
||||||
|
pageSize: tableData.size
|
||||||
|
})
|
||||||
|
tableData.loading = false
|
||||||
|
tableData.list = res.list
|
||||||
|
tableData.total = res.total
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
queryQuickPayAjax()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.tab_container {
|
||||||
|
padding: 0 var(--el-font-size-base) var(--el-font-size-base);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
display: flex;
|
||||||
|
padding: 0 14px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -31,6 +31,9 @@
|
|||||||
style="margin-top: 20px;" :total="Number(ordereData.total)"
|
style="margin-top: 20px;" :total="Number(ordereData.total)"
|
||||||
@current-change="handleCurrentChange" />
|
@current-change="handleCurrentChange" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="快捷收银" name="cash">
|
||||||
|
<cashTable />
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
<div class="orderbox_right" v-if="itemboxshow" v-loading="orderDetaildata.loading" :loading="loadingboxshow">
|
<div class="orderbox_right" v-if="itemboxshow" v-loading="orderDetaildata.loading" :loading="loadingboxshow">
|
||||||
@@ -49,7 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="orderbox_right_item">
|
<div class="orderbox_right_item">
|
||||||
<span class="span">创建时间:</span><span class="nunber">{{ dayjs(
|
<span class="span">创建时间:</span><span class="nunber">{{ dayjs(
|
||||||
orderDetaildata.createdAt).format("YYYY-MM-DD HH:mm:ss") }}</span>
|
orderDetaildata.createdAt).format("YYYY-MM-DD HH:mm:ss") }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="orderbox_right_item">
|
<div class="orderbox_right_item">
|
||||||
<span class="span">终端:</span><span class="nunber">{{ orderDetaildata.zdNo }}</span>
|
<span class="span">终端:</span><span class="nunber">{{ orderDetaildata.zdNo }}</span>
|
||||||
@@ -209,7 +212,8 @@
|
|||||||
<div class="recharge_footer_itemright_botton_box">
|
<div class="recharge_footer_itemright_botton_box">
|
||||||
<div class="recharge_footer_itemright_botton_boxone">
|
<div class="recharge_footer_itemright_botton_boxone">
|
||||||
<div class="recharge_footer_itemright_botton_boxoneabsolute">退单金额:</div>
|
<div class="recharge_footer_itemright_botton_boxoneabsolute">退单金额:</div>
|
||||||
<div class="recharge_footer_itemright_botton_boxonetext">¥{{ refundamount > 0 ? refundamount : '0.00' }}</div>
|
<div class="recharge_footer_itemright_botton_boxonetext">¥{{ refundamount > 0 ? refundamount
|
||||||
|
: '0.00' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="recharge_footer_itemright_botton_boxtow">
|
<div class="recharge_footer_itemright_botton_boxtow">
|
||||||
<el-button type="primary" style="width: 100%; height: 100%;" :loading="buttonloading"
|
<el-button type="primary" style="width: 100%; height: 100%;" :loading="buttonloading"
|
||||||
@@ -232,6 +236,7 @@ import { useUser } from "@/store/user.js"
|
|||||||
import lodash from 'lodash'
|
import lodash from 'lodash'
|
||||||
import { orderfindOrder, orderorderDetail, payreturnOrder, cloudPrinterprint } from '@/api/order/index.js'
|
import { orderfindOrder, orderorderDetail, payreturnOrder, cloudPrinterprint } from '@/api/order/index.js'
|
||||||
import add from '@/views/order/components/add.vue'
|
import add from '@/views/order/components/add.vue'
|
||||||
|
import cashTable from '@/views/order/components/cashTable.vue'
|
||||||
import { clearNoNum } from '@/utils'
|
import { clearNoNum } from '@/utils'
|
||||||
const store = useUser()
|
const store = useUser()
|
||||||
const itemboxshow = ref(false)
|
const itemboxshow = ref(false)
|
||||||
@@ -392,7 +397,7 @@ const ordereData = reactive({//表格数据
|
|||||||
list: [],
|
list: [],
|
||||||
size: 10,
|
size: 10,
|
||||||
page: 1,
|
page: 1,
|
||||||
status: '',
|
status: 'cash',
|
||||||
total: '',
|
total: '',
|
||||||
orderNo: '',
|
orderNo: '',
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user