freight-web/src/PagesStatistics/customer/detail.vue

264 lines
5.6 KiB
Vue
Raw Normal View History

2024-03-04 07:10:11 +00:00
<template>
<view class="c-card">
<view class="top">
<view class="left">
2024-04-08 01:52:52 +00:00
<view>{{ state.order.deviceName || "-" }}</view>
<view>{{ state.order.productName || "" }}</view>
2024-03-04 07:10:11 +00:00
</view>
<view>
2024-04-08 01:52:52 +00:00
<text class="btn" @click="handleScenePhoto(state.order.id)"
>现场照片</text
>
2024-03-04 07:10:11 +00:00
</view>
</view>
<view class="content">
<view class="baseinfo">
<view class="person">
2024-04-08 01:52:52 +00:00
<view>审核人{{ state.order.pricingUserName || "-" }}</view>
<view class="time"> 过磅时间{{ state.order.tareTime }} </view>
2024-03-04 07:10:11 +00:00
</view>
</view>
<view style="padding: 30rpx 0rpx">
2024-04-08 01:52:52 +00:00
<view>
<text>出货单号</text
><text>{{ state.order.orderNumber }} </text></view
>
2024-03-04 07:10:11 +00:00
<view class="box">
<view v-for="(item, index) in gridList1" :key="index">
<text v-if="item.name">{{ item.name }}</text
><text
>{{ item.isBefore ? item.unit : "" }}
{{ item.num }}
{{ item.isBefore ? "" : item.unit }}
</text>
</view>
</view>
<view class="moreInfo">
<view class="baseinfo">
<view>客户收货</view>
2024-04-08 01:52:52 +00:00
<view class="time"> 收货时间{{ state.order.updateTime }} </view>
2024-03-04 07:10:11 +00:00
</view>
<view class="box">
<view v-for="(item, index) in gridList2" :key="index">
<text v-if="item.name">{{ item.name }}</text
><text
>{{ item.isBefore ? item.unit : "" }}
{{ item.num }}
{{ item.isBefore ? "" : item.unit }}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
2024-04-08 01:52:52 +00:00
import { onLoad } from "@dcloudio/uni-app";
2024-03-04 07:10:11 +00:00
import { reactive } from "vue";
const gridList1 = reactive([
{
name: "毛重",
2024-04-08 01:52:52 +00:00
enName: "grossWeight",
num: "",
2024-03-04 07:10:11 +00:00
unit: "KG",
isBefore: false,
},
{
name: "皮重",
2024-04-08 01:52:52 +00:00
enName: "tare",
num: "",
2024-03-04 07:10:11 +00:00
unit: "KG",
isBefore: false,
},
{
name: "净重",
2024-04-08 01:52:52 +00:00
enName: "netWeight",
num: "",
2024-03-04 07:10:11 +00:00
unit: "KG",
isBefore: false,
},
]);
const gridList2 = reactive([
{
name: "结算重量",
2024-04-08 01:52:52 +00:00
enName: "settlementWeight",
num: "",
2024-03-04 07:10:11 +00:00
unit: "KG",
isBefore: false,
},
{
name: "结算单价",
2024-04-08 01:52:52 +00:00
enName: "unitPrice",
num: "",
2024-03-04 07:10:11 +00:00
unit: "元/KG",
isBefore: false,
},
{
name: "预估总价",
2024-04-08 01:52:52 +00:00
enName: "estimatePrice",
num: "",
2024-03-04 07:10:11 +00:00
unit: "元",
isBefore: false,
},
{
name: "货款金额",
2024-04-08 01:52:52 +00:00
enName: "totalPrice",
num: "",
2024-03-04 07:10:11 +00:00
unit: "元",
isBefore: false,
},
{
2024-04-08 01:52:52 +00:00
name: "运费",
enName: "freight",
num: "",
2024-03-04 07:10:11 +00:00
unit: "元",
isBefore: false,
},
{
2024-04-08 01:52:52 +00:00
name: "杂费",
enName: "incidentals",
num: "",
2024-03-04 07:10:11 +00:00
unit: "元",
isBefore: false,
},
{
name: "实际收入",
2024-04-08 01:52:52 +00:00
enName: "realIncome",
num: "",
2024-03-04 07:10:11 +00:00
unit: "元",
isBefore: false,
},
{},
{
name: "净重误差",
2024-04-08 01:52:52 +00:00
enName: "netWeightError",
num: "",
2024-03-04 07:10:11 +00:00
unit: "KG",
isBefore: false,
},
{},
{
name: "结算状态",
2024-04-08 01:52:52 +00:00
enName: "scaleStatus",
num: "",
2024-03-04 07:10:11 +00:00
unit: "",
isBefore: false,
},
{
name: "应收金额",
2024-04-08 01:52:52 +00:00
enName: "totalPrice",
num: "",
2024-03-04 07:10:11 +00:00
unit: "元",
isBefore: false,
},
]);
2024-04-08 01:52:52 +00:00
const handleScenePhoto = (id: string) => {
2024-03-04 07:10:11 +00:00
uni.navigateTo({
2024-06-05 05:44:33 +00:00
url: "/pagesScenePhoto/index?orderType=2&imagesType=1&id=" + id, // 要跳转到的页面路径
2024-03-04 07:10:11 +00:00
});
};
2024-04-08 01:52:52 +00:00
const state = reactive<any>({
order: {},
});
onLoad((option: any) => {
// 设置页面标题
uni.setNavigationBarTitle({
title: option.name,
});
const order = JSON.parse(option.obj);
state.order = order;
gridList1.map((item: any) => {
item.num = order[item.enName as string];
});
gridList2.map((item: any) => {
if (item.name === "结算状态") {
item.num =
["待出货", "待过毛", "待审核", "已审未付", "已审已付"][
order[item.enName as string]
] || "-";
} else {
item.num = order[item.enName as string];
}
});
});
2024-03-04 07:10:11 +00:00
</script>
<style lang="scss" scoped>
.c-card {
margin: 30rpx 25rpx;
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
font-family: Source Han Sans CN;
font-weight: 400;
2024-04-08 01:52:52 +00:00
font-size: 26rpx;
2024-03-04 07:10:11 +00:00
color: #000000;
.top {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
border-bottom: 18rpx solid #f8f8f8;
.left {
view {
line-height: 40rpx;
&:nth-child(2) {
color: rgba(236, 15, 62, 1);
font-weight: 400;
2024-04-08 01:52:52 +00:00
font-size: 28rpx;
2024-03-04 07:10:11 +00:00
}
}
}
.btn {
border-radius: 24rpx;
border: 1px solid #00dcee;
padding: 10rpx 30rpx;
font-weight: 500;
font-size: 24rpx;
color: #00dcee;
line-height: 41rpx;
}
}
.content {
margin: 30rpx;
.baseinfo {
.time {
font-family: Source Han Sans CN;
font-weight: 400;
2024-04-08 01:52:52 +00:00
font-size: 24rpx;
2024-03-04 07:10:11 +00:00
color: #999999;
line-height: 40rpx;
}
.person {
display: flex;
justify-content: space-between;
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 40rpx;
}
}
.box {
display: grid;
grid-template-columns: repeat(2, 1fr);
flex: 1;
> view {
line-height: 50rpx;
}
}
.moreInfo {
margin-top: 20rpx;
padding: 20rpx 0rpx;
border-top: 18rpx solid rgba(248, 248, 248, 1);
.box {
margin-top: 20rpx;
}
}
}
}
</style>