订单列表

master
lzq 2026-02-11 12:06:31 +08:00
parent 045d327230
commit 158b9a8cd7
12 changed files with 62 additions and 107 deletions

View File

@ -17,7 +17,7 @@ export const useAppUserStore = defineStore('AppUser', () => {
const tenantName = ref<string | null>(null)
const isAuthenticated = computed(() => !Strings.isEmpty(token.value))
const isXiaoNa = computed(() => {
return false
return true
})
function $reset() {

View File

@ -411,7 +411,7 @@ const component = defineComponent(
}
const tooltipTxt = tableAction.tooltip == null ? '' : (typeof tableAction.tooltip === 'function' ? tableAction.tooltip(scope) : tableAction.tooltip)
if (!Strings.isBlank(tooltipTxt)) {
return (<ElTooltip content={tooltipTxt} placement="top">
return (<ElTooltip content={tooltipTxt} placement="top" enterable={false}>
<ElButton
icon={elIcon}
loading={tableAction.loading}

View File

@ -5,6 +5,7 @@
// ------
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
import { GlobalComponents } from 'vue'
export {}

View File

@ -45,7 +45,7 @@
</template>
<template #columns>
<ElTableColumn fixed="left" label="订单编号" prop="sn" width="155"/>
<ElTableColumn label="客户姓名" prop="contacts" width="100"/>
<ElTableColumn label="客户姓名" prop="contacts" width="120"/>
<ElTableColumn label="客户电话" prop="phone" width="120"/>
<ElTableColumn label="货品名称" prop="goodsName" width="120"/>
<!-- <ElTableColumn label="项目名称" prop="projectName" show-overflow-tooltip width="100">
@ -67,7 +67,7 @@
{{ Strings.isBlank(row.truckLicensePlate) ? '-' : row.truckLicensePlate }}
</template>
</ElTableColumn>
<ElTableColumn label="司机姓名" prop="driverName" width="100">
<ElTableColumn label="司机姓名" prop="driverName" width="120">
<template #default="{row}">
{{ row.driverName ?? '-' }}
</template>
@ -211,7 +211,7 @@ const tablePageProps = buildTablePageProps<OrderTypes.SearchOrderParam, OrderTyp
},
},
{
tooltip: '派单',
tooltip: '批量派单',
type: 'success',
show({row}) {
return row.transStatus === transStatus.DaiPaiDan

View File

@ -27,7 +27,7 @@
{{ detailData.estimatedTrainNum }}
</ElDescriptionsItem>
<ElDescriptionsItem label="运距">
{{ `${detailData.transDistance == null ? '' : detailData.transDistance + ' 公里'}` }}
{{ `${detailData.transDistance == null ? '' : (detailData.transDistance / 1000) + ' 公里'}` }}
</ElDescriptionsItem>
<ElDescriptionsItem label="客户姓名">
@ -44,7 +44,7 @@
<ElDescriptionsItem :span="1">
<TransRecode :trans-recodes="detailData.transRecodes" v-bind="transRecodeProps">
<ElTableColumn label="车次" prop="trainNum"/>
<ElTableColumn label="司机姓名" prop="driverName">
<ElTableColumn label="司机姓名" prop="driverName" width="120">
<template #default="{row}">
<span> {{ row.driverName ?? '-' }}</span>
</template>
@ -67,7 +67,7 @@
<ElTableColumn fixed="right" label="操作" prop="tableAction" width="60">
<template #default="{row}">
<div class="action-btn">
<ElTooltip content="派单" placement="top">
<ElTooltip :enterable="false" content="派单" placement="top">
<ElButton :disabled="row.transStatus !== transStatus.DaiPaiDan" :icon="elIcons.Position" class="icon-btn" plain type="primary" @click="dispatch(detailData, row.id, row.trainNum)"/>
</ElTooltip>
</div>
@ -78,7 +78,7 @@
</ElDescriptions>
</template>
<template #footer="detailData">
<ElButton :disabled="transRecodeProps.moduleValue.length < 1 " type="primary" @click="dispatch(detailData)"></ElButton>
<ElButton :disabled="transRecodeProps.moduleValue.length < 1 " type="primary" @click="dispatch(detailData)"></ElButton>
<DispatchForm ref="dispatchForm" @succ="succ"/>
</template>
</ADetailPanel>

View File

@ -185,7 +185,7 @@ const tablePageProps = buildTablePageProps<OrderTypes.SearchOrderParam, OrderTyp
cancelDetailIns.value?.open(row)
},
},
{
/* {
tooltip: '删除',
type: 'danger',
icon: 'Delete',
@ -194,7 +194,7 @@ const tablePageProps = buildTablePageProps<OrderTypes.SearchOrderParam, OrderTyp
},
action() {
},
},
}, */
],
},
},

View File

@ -27,7 +27,7 @@
{{ detailData.estimatedTrainNum }}
</ElDescriptionsItem>
<ElDescriptionsItem label="运距">
{{ `${detailData.transDistance == null ? '' : detailData.transDistance + ' 公里'}` }}
{{ `${detailData.transDistance == null ? '' : (detailData.transDistance / 1000) + ' 公里'}` }}
</ElDescriptionsItem>
<ElDescriptionsItem label="客户姓名">
@ -47,19 +47,19 @@
<ElTableColumn label="司机姓名" prop="driverName" width="100"/>
<ElTableColumn label="司机电话" prop="driverPhone" width="120"/>
<ElTableColumn label="车牌号" prop="truckLicensePlate" width="120"/>
<ElTableColumn label="毛重" prop="roughWeight">
<ElTableColumn label="毛重" prop="roughWeight" width="80">
<template #default="{row}">
{{ `${row.roughWeight == null ? '' : row.roughWeight + ' 吨'}` }}
{{ `${row.roughWeight == null ? '' : (row.roughWeight / 1000) + ' 吨'}` }}
</template>
</ElTableColumn>
<ElTableColumn label="皮重" prop="tareWeight">
<ElTableColumn label="皮重" prop="tareWeight" width="80">
<template #default="{row}">
{{ `${row.tareWeight == null ? '' : row.tareWeight + ' 吨'}` }}
{{ `${row.tareWeight == null ? '' : (row.tareWeight / 1000) + ' 吨'}` }}
</template>
</ElTableColumn>
<ElTableColumn label="净重" prop="settleWeight">
<ElTableColumn label="净重" prop="settleWeight" width="80">
<template #default="{row}">
{{ `${row.settleWeight == null ? '' : row.settleWeight + ' 吨'}` }}
{{ `${row.settleWeight == null ? '' : (row.settleWeight / 1000) + ' 吨'}` }}
</template>
</ElTableColumn>
<ElTableColumn label="勘料员" prop="checkerName">
@ -87,27 +87,6 @@
<ElTag :data-cs="transStatusColor.cs(row.transStatus)"> {{ row.transStatusTxt }}</ElTag>
</template>
</ElTableColumn>
<ElTableColumn fixed="right" label="操作" prop="tableAction" width="60">
<template #default="{row}">
<div class="action-btn">
<ElTooltip v-if="row.transStatus === transStatus.YunShuZhong" content="进场" placement="top">
<ElButton class="icon-btn" plain type="success" @click="jinchang(row)">
<AIcon name="approach"/>
</ElButton>
</ElTooltip>
<ElTooltip v-if="row.transStatus === transStatus.YiJinChang && (row.checkStatus === checkStatus.Wu || row.checkStatus === checkStatus.YiKanLiao)" content="出场" placement="top">
<ElButton class="icon-btn" plain type="danger" @click="chuchang(row)">
<AIcon name="carexit"/>
</ElButton>
</ElTooltip>
<ElTooltip v-if="row.transStatus === transStatus.YiJinChang && row.checkStatus === checkStatus.WeiKanLiao" content="勘料" placement="top">
<ElButton plain type="warning" @click="kanliao(row)">
<AIcon name="chakanliaodan"/>
</ElButton>
</ElTooltip>
</div>
</template>
</ElTableColumn>
</TransRecode>
</ElDescriptionsItem>
</ElDescriptions>
@ -122,14 +101,11 @@ import ADetailPanel, {
} from '@/components/a-detail-panel/ADetailPanel.tsx'
import TransRecode, { buildTransRecodeProps } from '@/pages/order/trans-recode/TransRecode.tsx'
import {
checkStatus,
checkStatusColor,
paymentStatusColor,
transStatus,
transStatusColor,
} from '@/pages/order/constants.ts'
import Strings from '@/common/utils/strings.ts'
import AIcon from '@/components/a-icon/AIcon.vue'
import OrderApi from '@/pages/order/order-api.ts'
const detailPanelIns = useTemplateRef<ADetailPanelInstance>('detailPanel')

View File

@ -202,16 +202,16 @@ const tablePageProps = buildTablePageProps<OrderTypes.SearchOrderParam, OrderTyp
tooltip: '三联单',
type: 'info',
icon: 'liandan',
action({row}) {
historyDetailIns.value?.open(row)
action() {
// historyDetailIns.value?.open(row)
},
},
{
tooltip: '历史轨迹',
type: 'success',
icon: 'yundanguiji',
action({row}) {
historyDetailIns.value?.open(row)
action() {
// historyDetailIns.value?.open(row)
},
},
],

View File

@ -27,7 +27,7 @@
{{ detailData.estimatedTrainNum }}
</ElDescriptionsItem>
<ElDescriptionsItem label="运距">
{{ `${detailData.transDistance == null ? '' : detailData.transDistance + ' 公里'}` }}
{{ `${detailData.transDistance == null ? '' : (detailData.transDistance / 1000) + ' 公里'}` }}
</ElDescriptionsItem>
<ElDescriptionsItem label="客户姓名">
@ -44,22 +44,32 @@
<ElDescriptionsItem :span="1">
<TransRecode :trans-recodes="detailData.transRecodes" v-bind="transRecodeProps">
<ElTableColumn label="车次" prop="trainNum" width="60"/>
<ElTableColumn label="司机姓名" prop="driverName" width="100"/>
<ElTableColumn label="司机电话" prop="driverPhone" width="120"/>
<ElTableColumn label="车牌号" prop="truckLicensePlate" width="120"/>
<ElTableColumn label="毛重" prop="roughWeight">
<ElTableColumn label="司机姓名" prop="driverName"/>
<ElTableColumn label="司机电话" prop="driverPhone"/>
<ElTableColumn label="车牌号" prop="truckLicensePlate"/>
<ElTableColumn label="毛重" prop="roughWeight" width="80">
<template #default="{row}">
{{ `${row.roughWeight == null ? '' : row.roughWeight + ' 吨'}` }}
{{ `${row.roughWeight == null ? '' : (row.roughWeight / 1000) + ' 吨'}` }}
</template>
</ElTableColumn>
<ElTableColumn label="皮重" prop="tareWeight">
<ElTableColumn label="皮重" prop="tareWeight" width="80">
<template #default="{row}">
{{ `${row.tareWeight == null ? '' : row.tareWeight + ' 吨'}` }}
{{ `${row.tareWeight == null ? '' : (row.tareWeight / 1000) + ' 吨'}` }}
</template>
</ElTableColumn>
<ElTableColumn label="净重" prop="settleWeight">
<ElTableColumn label="净重" prop="settleWeight" width="80">
<template #default="{row}">
{{ `${row.settleWeight == null ? '' : row.settleWeight + ' 吨'}` }}
{{ `${row.settleWeight == null ? '' : (row.settleWeight / 1000) + ' 吨'}` }}
</template>
</ElTableColumn>
<ElTableColumn label="总金额" width="120">
<template #default="{row}">
{{ `${row.settleMoney == null ? '' : '¥:' + row.settleMoney + '元'}` }}
</template>
</ElTableColumn>
<ElTableColumn label="支付状态" prop="paymentStatusTxt">
<template #default="{row}">
<ElTag :data-cs="paymentStatusColor.cs(row.paymentStatus,'info')"> {{ row.paymentStatusTxt ?? '暂无支付信息' }}</ElTag>
</template>
</ElTableColumn>
<ElTableColumn label="勘料员" prop="checkerName">
@ -67,17 +77,7 @@
{{ `${row.checkerName == null ? '-' : row.checkerName}` }}
</template>
</ElTableColumn>
<ElTableColumn label="总金额" prop="settleMoney">
<template #default="{row}">
{{ `${row.settleMoney == null ? '' : '¥:' + row.settleMoney + '元'}` }}
</template>
</ElTableColumn>
<ElTableColumn fixed="right" label="支付状态" prop="paymentStatusTxt" width="120">
<template #default="{row}">
<ElTag :data-cs="paymentStatusColor.cs(row.paymentStatus,'info')"> {{ row.paymentStatusTxt ?? '暂无支付信息' }}</ElTag>
</template>
</ElTableColumn>
<ElTableColumn fixed="right" label="勘料状态" prop="checkStatusTxt" width="90">
<ElTableColumn label="勘料状态" prop="checkStatusTxt" width="90">
<template #default="{row}">
<ElTag :data-cs="checkStatusColor.cs(row.checkStatus)"> {{ row.checkStatusTxt }}</ElTag>
</template>
@ -87,27 +87,6 @@
<ElTag :data-cs="transStatusColor.cs(row.transStatus)"> {{ row.transStatusTxt }}</ElTag>
</template>
</ElTableColumn>
<ElTableColumn fixed="right" label="操作" prop="tableAction" width="60">
<template #default="{row}">
<div class="action-btn">
<ElTooltip v-if="row.transStatus === transStatus.YunShuZhong" content="进场" placement="top">
<ElButton class="icon-btn" plain type="success" @click="jinchang(row)">
<AIcon name="approach"/>
</ElButton>
</ElTooltip>
<ElTooltip v-if="row.transStatus === transStatus.YiJinChang && (row.checkStatus === checkStatus.Wu || row.checkStatus === checkStatus.YiKanLiao)" content="出场" placement="top">
<ElButton class="icon-btn" plain type="danger" @click="chuchang(row)">
<AIcon name="carexit"/>
</ElButton>
</ElTooltip>
<ElTooltip v-if="row.transStatus === transStatus.YiJinChang && row.checkStatus === checkStatus.WeiKanLiao" content="勘料" placement="top">
<ElButton plain type="warning" @click="kanliao(row)">
<AIcon name="chakanliaodan"/>
</ElButton>
</ElTooltip>
</div>
</template>
</ElTableColumn>
</TransRecode>
</ElDescriptionsItem>
</ElDescriptions>
@ -122,14 +101,11 @@ import ADetailPanel, {
} from '@/components/a-detail-panel/ADetailPanel.tsx'
import TransRecode, { buildTransRecodeProps } from '@/pages/order/trans-recode/TransRecode.tsx'
import {
checkStatus,
checkStatusColor,
paymentStatusColor,
transStatus,
transStatusColor,
} from '@/pages/order/constants.ts'
import Strings from '@/common/utils/strings.ts'
import AIcon from '@/components/a-icon/AIcon.vue'
import OrderApi from '@/pages/order/order-api.ts'
const detailPanelIns = useTemplateRef<ADetailPanelInstance>('detailPanel')

View File

@ -33,6 +33,9 @@ const inOutData = Utils.resetAble(reactive({
}))
const showDialog = ref(false)
const submiting = ref(false)
const rules = {
weight: [ {required: true, message: '请填写磅重', trigger: 'blur'} ],
}
function dialogCloseHandler() {
inOutData.$reset()
@ -87,6 +90,7 @@ defineExpose({
>
<ElForm ref="formRef"
class="in-out-panel-form"
:rules="rules"
@submit.prevent>
<ElFormItem label="磅重" prop="weight">
<ElInputNumber v-model="inOutData.weight" :max="200" :min="1" controls-position="right">

View File

@ -258,16 +258,14 @@ const tablePageProps = buildTablePageProps<OrderTypes.SearchOrderParam, OrderTyp
tooltip: '三联单',
type: 'info',
icon: 'liandan',
action({row}) {
realtimeDetailIns.value?.open(row)
action() {
},
},
{
tooltip: '实时轨迹',
type: 'success',
icon: 'yundanguiji',
action({row}) {
realtimeDetailIns.value?.open(row)
action() {
},
},
],

View File

@ -27,7 +27,7 @@
{{ detailData.estimatedTrainNum }}
</ElDescriptionsItem>
<ElDescriptionsItem label="运距">
{{ `${detailData.transDistance == null ? '' : detailData.transDistance + ' 公里'}` }}
{{ `${detailData.transDistance == null ? '' : (detailData.transDistance / 1000) + ' 公里'}` }}
</ElDescriptionsItem>
<ElDescriptionsItem label="客户姓名">
@ -59,19 +59,19 @@
<span> {{ row.truckLicensePlate ?? '-' }}</span>
</template>
</ElTableColumn>
<ElTableColumn label="毛重" prop="roughWeight">
<ElTableColumn label="毛重" prop="roughWeight" width="80">
<template #default="{row}">
{{ `${row.roughWeight == null ? '' : row.roughWeight + ' 吨'}` }}
{{ `${row.roughWeight == null ? '' : (row.roughWeight / 1000) + ' 吨'}` }}
</template>
</ElTableColumn>
<ElTableColumn label="皮重" prop="tareWeight">
<ElTableColumn label="皮重" prop="tareWeight" width="80">
<template #default="{row}">
{{ `${row.tareWeight == null ? '' : row.tareWeight + ' 吨'}` }}
{{ `${row.tareWeight == null ? '' : (row.tareWeight / 1000) + ' 吨'}` }}
</template>
</ElTableColumn>
<ElTableColumn label="净重" prop="settleWeight">
<ElTableColumn label="净重" prop="settleWeight" width="80">
<template #default="{row}">
{{ `${row.settleWeight == null ? '' : row.settleWeight + ' 吨'}` }}
{{ `${row.settleWeight == null ? '' : (row.settleWeight / 1000) + ' 吨'}` }}
</template>
</ElTableColumn>
<ElTableColumn label="勘料员" prop="checkerName">
@ -102,17 +102,17 @@
<ElTableColumn fixed="right" label="操作" prop="tableAction" width="60">
<template #default="{row}">
<div class="action-btn">
<ElTooltip v-if="row.transStatus === transStatus.YunShuZhong" content="进场" placement="top">
<ElButton class="icon-btn" plain type="success" @click="jinchang(row)">
<ElTooltip v-if="row.transStatus === transStatus.YunShuZhong || row.transStatus === transStatus.YiJieDan" :enterable="false" content="进场" placement="top">
<ElButton :disabled="row.transStatus !== transStatus.YunShuZhong" class="icon-btn" plain type="success" @click="jinchang(row)">
<AIcon name="approach"/>
</ElButton>
</ElTooltip>
<ElTooltip v-if="row.transStatus === transStatus.YiJinChang && (row.checkStatus === checkStatus.Wu || row.checkStatus === checkStatus.YiKanLiao)" content="出场" placement="top">
<ElTooltip v-if="row.transStatus === transStatus.YiJinChang && (row.checkStatus === checkStatus.Wu || row.checkStatus === checkStatus.YiKanLiao)" :enterable="false" content="出场" placement="top">
<ElButton class="icon-btn" plain type="danger" @click="chuchang(row)">
<AIcon name="carexit"/>
</ElButton>
</ElTooltip>
<ElTooltip v-if="row.transStatus === transStatus.YiJinChang && row.checkStatus === checkStatus.WeiKanLiao" content="勘料" placement="top">
<ElTooltip v-if="row.transStatus === transStatus.YiJinChang && row.checkStatus === checkStatus.WeiKanLiao" :enterable="false" content="勘料" placement="top">
<ElButton plain type="warning" @click="kanliao(row)">
<AIcon name="chakanliaodan"/>
</ElButton>