1
This commit is contained in:
1 parent
dc774cca99
commit
5dd0342a3f
4 files changed
+132
-92
No files matched your search
@@ -23,6 +23,18 @@ export function pageJoin(query: any) {
|
||||
})
|
||||
}
|
||||
|
||||
export function noRecogPageJoin(query: any) {
|
||||
return request({
|
||||
url: "/hard/hard-order/no-recog/page-join",
|
||||
method: "post",
|
||||
params: {
|
||||
current: query.current,
|
||||
size: query.size,
|
||||
},
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: "/hard/hard-order/page",
|
||||
|
||||
@@ -5,56 +5,76 @@
|
||||
<el-timeline>
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">用户授权</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.createTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">用户授权</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.createTime }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<div class="flow_coll">
|
||||
<span>授权用户:</span>
|
||||
<span>{{ detail.username }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<el-timeline v-if="detail.requestOpenTime">
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">智能柜申请开门</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.requestOpenTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">智能柜申请开门</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.requestOpenTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<el-timeline v-if="detail.openCallbackTime">
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">智能柜开门响应</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.openCallbackTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">智能柜开门响应</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.openCallbackTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<el-timeline v-if="detail.videoCallbackTime">
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">智能柜视频回调</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.videoCallbackTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">智能柜视频回调</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.videoCallbackTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<el-timeline v-if="detail.skuSubmitTime">
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">商品提交识别</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.skuSubmitTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">商品提交识别</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.skuSubmitTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<el-timeline v-if="detail.skuCallbackTime">
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">商品识别响应</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.skuCallbackTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">商品识别响应</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.skuCallbackTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<el-timeline v-if="detail.payTime">
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">订单结算</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.payTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">订单结算</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.payTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
@@ -63,7 +83,8 @@
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="danger" style="width: 120px">错误</el-tag>
|
||||
<span class="color-danger ml-2">{{ detail.errorDesc }}</span>
|
||||
<el-button v-if="!detail?.hardAuth?.manualChangeUserId" class="ml-2" link @click="visibleErrorChangeDiaog = true">
|
||||
<el-button v-if="!detail?.hardAuth?.manualChangeUserId" class="ml-2" link
|
||||
@click="visibleErrorChangeDiaog = true">
|
||||
处理
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -84,15 +105,10 @@
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-dialog
|
||||
title="手动处理智能柜订单"
|
||||
width="30%"
|
||||
@close="dialogClose"
|
||||
v-model="visibleErrorChangeDiaog"
|
||||
:close-on-click-modal="false"
|
||||
draggable
|
||||
>
|
||||
<el-form ref="formRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="formLoading">
|
||||
<el-dialog title="手动处理智能柜订单" width="30%" @close="dialogClose" v-model="visibleErrorChangeDiaog"
|
||||
:close-on-click-modal="false" draggable>
|
||||
<el-form ref="formRef" :model="form" :rules="dataRules" formDialogRef label-width="90px"
|
||||
v-loading="formLoading">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="设备名" prop="image">
|
||||
@@ -101,7 +117,8 @@
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="处理原因" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入处理原因" type="textarea" :autosize="{ minRows: 6 }" />
|
||||
<el-input v-model="form.remark" placeholder="请输入处理原因" type="textarea"
|
||||
:autosize="{ minRows: 6 }" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -171,7 +188,7 @@ const dialogClose = async () => {
|
||||
}
|
||||
|
||||
const onSubmit = async () => {
|
||||
const valid = await formRef.value.validate().catch(() => {})
|
||||
const valid = await formRef.value.validate().catch(() => { })
|
||||
if (!valid) return false
|
||||
try {
|
||||
formLoading.value = true
|
||||
@@ -189,7 +206,32 @@ onMounted(() => {
|
||||
getFlow()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.flow_coll {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
span:nth-child(1) {
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
display: inline-block;
|
||||
flex: 1;
|
||||
min-width: 50px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
// 时间线样式调整
|
||||
:deep(.el-timeline) {
|
||||
margin: 10px 0 0 160px;
|
||||
@@ -207,16 +249,17 @@ onMounted(() => {
|
||||
|
||||
.el-timeline-right-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
min-height: 30px;
|
||||
padding: 10px;
|
||||
background-color: #409eff;
|
||||
background-color: #b0d8ff;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 13px;
|
||||
border-color: transparent #409eff transparent transparent;
|
||||
border-color: transparent #b0d8ff transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 8px;
|
||||
content: "";
|
||||
@@ -232,7 +275,7 @@ onMounted(() => {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 10px;
|
||||
background: #409eff;
|
||||
background: #b0d8ff;
|
||||
border-radius: 50%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
@@ -48,7 +48,7 @@ const openDialog = async (id: string) => {
|
||||
|
||||
// 提交
|
||||
const onSubmit = async () => {
|
||||
const valid = await dataFormRef.value.validate().catch(() => {})
|
||||
const valid = await dataFormRef.value.validate().catch(() => { })
|
||||
if (!valid) return false
|
||||
try {
|
||||
loading.value = true
|
||||
|
||||
@@ -19,10 +19,13 @@
|
||||
<dict-select v-model="state.queryForm.hourType" dict-code="daily_menu" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 450px" label="创建时间" prop="payTimeList">
|
||||
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" />
|
||||
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetimerange" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t("common.queryBtn") }}</el-button>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">
|
||||
{{ $t("common.queryBtn") }}
|
||||
</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
@@ -31,34 +34,22 @@
|
||||
<el-row>
|
||||
<!-- :export="'sys_audit_export'" -->
|
||||
<div class="mb8" style="width: 100%">
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@exportExcel="exportExcel"
|
||||
@queryTable="getDataList"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
/>
|
||||
<right-toolbar v-model:showSearch="showSearch" @exportExcel="exportExcel" @queryTable="getDataList"
|
||||
class="ml10 mr20" style="float: right" />
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
:show-summary="false"
|
||||
:summary-method="getSummaries"
|
||||
>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle" :show-summary="false" :summary-method="getSummaries">
|
||||
<el-table-column type="selection" width="60" align="center" />
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column width="200" label="用户">
|
||||
<template #default="{ row }">
|
||||
<div class="flex flex-row items-center justify-center">
|
||||
<preview-image width="50px" height="50px" :src="row.userAvatar" />
|
||||
<div class="flex flex-col ml-2 items-start cursor-pointer hover:underline hover:text-blue-500">
|
||||
<div
|
||||
class="flex flex-col ml-2 items-start cursor-pointer hover:underline hover:text-blue-500">
|
||||
<span> {{ row.username }}</span>
|
||||
<span> {{ row.userMobile }}</span>
|
||||
</div>
|
||||
@@ -185,20 +176,15 @@
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.orderStatus == 2"
|
||||
icon="VideoPlay"
|
||||
v-auth="'hard_hardwareOrder_offlinePay'"
|
||||
text
|
||||
@click="submitPay(row)"
|
||||
type="primary"
|
||||
>
|
||||
<el-button v-if="row.orderStatus == 2" icon="VideoPlay" v-auth="'hard_hardwareOrder_offlinePay'"
|
||||
text @click="submitPay(row)" type="primary">
|
||||
确认支付
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
|
||||
v-bind="state.pagination" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -206,12 +192,11 @@
|
||||
<script setup lang="ts" name="systemHardwareOrder">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import * as hardOrder from "/@/api/hard/hard-order"
|
||||
import * as hardInvoice from "/@/api/hard/hard-invoice"
|
||||
import { getDicts } from "/@/api/admin/dict"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { displayPrice } from "/@/utils/formatMoney"
|
||||
import { ElLoading, TableColumnCtx } from "element-plus"
|
||||
import { TableColumnCtx } from "element-plus"
|
||||
import { VNode } from "vue"
|
||||
|
||||
const { push } = useRouter()
|
||||
@@ -334,36 +319,36 @@ const getSummaries = (param: SummaryMethodProps) => {
|
||||
}
|
||||
if (column.property === "paymentInformation") {
|
||||
const priceVNode: VNode[] & string[] = []
|
||||
;[
|
||||
{ column: "totalPrice", columnName: "商品总价", color: "#67C260" },
|
||||
{ column: "extraPrice", columnName: "额外支付", color: "#F56E9B" },
|
||||
{ column: "payPrice", columnName: "实际支付", color: "#355CF6" },
|
||||
].forEach(({ column, columnName, color }: any, index: number) => {
|
||||
const values = data.map((item) => Number(item[column]))
|
||||
if (!values.every((value) => Number.isNaN(value))) {
|
||||
priceVNode.push(
|
||||
h("div", {}, [
|
||||
h("span", { style: { marginRight: "40px", minWidth: "60px", fontWeight: "bold" } }, [columnName]),
|
||||
h("span", { style: { color, minWidth: "50px", flex: 1 } }, [
|
||||
displayPrice(
|
||||
values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0),
|
||||
"元",
|
||||
2,
|
||||
),
|
||||
;[
|
||||
{ column: "totalPrice", columnName: "商品总价", color: "#67C260" },
|
||||
{ column: "extraPrice", columnName: "额外支付", color: "#F56E9B" },
|
||||
{ column: "payPrice", columnName: "实际支付", color: "#355CF6" },
|
||||
].forEach(({ column, columnName, color }: any, index: number) => {
|
||||
const values = data.map((item) => Number(item[column]))
|
||||
if (!values.every((value) => Number.isNaN(value))) {
|
||||
priceVNode.push(
|
||||
h("div", {}, [
|
||||
h("span", { style: { marginRight: "40px", minWidth: "60px", fontWeight: "bold" } }, [columnName]),
|
||||
h("span", { style: { color, minWidth: "50px", flex: 1 } }, [
|
||||
displayPrice(
|
||||
values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0),
|
||||
"元",
|
||||
2,
|
||||
),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
)
|
||||
} else {
|
||||
priceVNode.push("NaN")
|
||||
}
|
||||
})
|
||||
)
|
||||
} else {
|
||||
priceVNode.push("NaN")
|
||||
}
|
||||
})
|
||||
sums[index] = h("div", { style: {} }, [...priceVNode])
|
||||
} else {
|
||||
sums[index] = ""
|
||||
|
||||
Reference in new issue
Block a user