freight-web/src/pagesApp/shipmentCl.vue

312 lines
6.7 KiB
Vue
Raw Normal View History

2024-03-04 07:10:11 +00:00
<template>
<view class="c-card">
<view class="search">
<u-search
placeholder="请输入供应商名称"
v-model="keyword"
:showAction="false"
:bgColor="'#fff'"
:borderColor="'rgba(0, 0, 0, 0.1)'"
:placeholderColor="'#C1C1C1'"
2024-03-28 06:05:00 +00:00
@search="handleSearch()"
2024-03-04 07:10:11 +00:00
></u-search>
</view>
2024-03-28 06:05:00 +00:00
<page-view
@loadList="
(v) => {
getList(v);
}
"
:noMoreData="pageList.noMoreData"
:list="pageList.list"
:height="100"
:isLoading="pageList.isLoading"
>
2024-03-14 03:14:12 +00:00
<view class="box" v-for="(item, index) in pageList.list" :key="index">
2024-03-04 07:10:11 +00:00
<view class="base">
<view>
2024-03-14 03:14:12 +00:00
<view class="no"> 出货单号{{ item.orderNumber }} </view>
<view class="supplier"> {{ item.deviceName }} </view>
2024-03-04 07:10:11 +00:00
</view>
<view>
2024-03-14 03:14:12 +00:00
<text class="btn" @click="handleScenePhoto((item as any).id)">现场照片</text>
2024-03-04 07:10:11 +00:00
</view>
</view>
2024-03-14 03:14:12 +00:00
<view class="name">{{ item.userName }} <text>{{ getScaleStatus((item as any).scaleStatus) }}</text></view>
<view class="type">{{ item.productName }}</view>
2024-03-04 07:10:11 +00:00
<view class="more">
<view
2024-03-14 03:14:12 +00:00
v-for="(cItem, index) in gridList1"
2024-03-04 07:10:11 +00:00
:key="index"
:style="{
2024-03-14 03:14:12 +00:00
width: `${cItem.name === '创建时间' ? 'max-content' : ''}`,
'font-size': `${cItem.isCustomStyle ? '22rpx' : ''}`,
color: `${cItem.isCustomStyle ? '#999' : ''}`,
2024-03-04 07:10:11 +00:00
}"
>
2024-03-14 03:14:12 +00:00
<text v-if="cItem.name">{{ cItem.name }}</text
2024-03-04 07:10:11 +00:00
><text
2024-03-14 03:14:12 +00:00
>{{ cItem.isBefore ? cItem.unit : "" }}
{{ cItem.num }}
{{ cItem.isBefore ? "" : cItem.unit }}
2024-03-04 07:10:11 +00:00
</text>
</view>
</view>
</view>
2024-03-28 06:05:00 +00:00
</page-view>
2024-03-04 07:10:11 +00:00
</view>
</template>
<script setup lang="ts">
2024-03-28 06:05:00 +00:00
import { ReceiveApi, ShipmentApi } from "@/services";
import PageView from "@/components/PageView/index.vue";
import { ScaleStatus } from "@/utils/enum";
2024-03-14 03:14:12 +00:00
2024-03-04 07:10:11 +00:00
const keyword = ref("");
const gridList1 = reactive([
{
name: "卡号",
2024-03-14 03:14:12 +00:00
enName: "cardNumber",
2024-03-04 07:10:11 +00:00
},
{},
{
name: "创建时间",
2024-03-14 03:14:12 +00:00
enName: "createTime",
2024-03-04 07:10:11 +00:00
},
{},
{
name: "车牌号",
2024-03-14 03:14:12 +00:00
enName: "carNumber",
2024-03-04 07:10:11 +00:00
isBefore: false,
},
{
name: "送货方式",
2024-03-14 03:14:12 +00:00
enName: "deliveryMethod",
2024-03-04 07:10:11 +00:00
isBefore: false,
},
{
name: "毛重",
2024-03-14 03:14:12 +00:00
enName: "grossWeight",
num: "0",
2024-03-04 07:10:11 +00:00
unit: "KG",
isBefore: false,
},
{
name: "皮重",
2024-03-14 03:14:12 +00:00
enName: "tare",
2024-03-04 07:10:11 +00:00
unit: "KG",
isBefore: false,
},
{
name: "净重",
2024-03-14 03:14:12 +00:00
enName: "netWeight",
2024-03-04 07:10:11 +00:00
unit: "KG",
isBefore: false,
},
{
name: "数量",
2024-03-14 03:14:12 +00:00
enName: "number",
2024-03-04 07:10:11 +00:00
isBefore: false,
},
{
name: "过毛",
2024-03-14 03:14:12 +00:00
enName: "grossTime",
2024-03-04 07:10:11 +00:00
unit: "",
isBefore: false,
isCustomStyle: true,
},
{
name: "过皮",
2024-03-14 03:14:12 +00:00
enName: "tareTime",
2024-03-04 07:10:11 +00:00
unit: "",
isBefore: false,
isCustomStyle: true,
},
{
name: "结算重量",
2024-03-14 03:14:12 +00:00
enName: "settlementWeight",
2024-03-04 07:10:11 +00:00
unit: "KG",
isBefore: false,
},
{
name: "单价",
2024-03-14 03:14:12 +00:00
enName: "unitPrice",
2024-03-04 07:10:11 +00:00
unit: "元/千克",
isBefore: false,
},
{
name: "结算总价",
2024-03-14 03:14:12 +00:00
enName: "estimatePrice",
2024-03-04 07:10:11 +00:00
unit: "元",
isBefore: false,
},
{
name: "实结金额",
2024-03-14 03:14:12 +00:00
enName: "totalPrice",
2024-03-04 07:10:11 +00:00
unit: "元",
isBefore: false,
},
{
name: "作废人",
2024-03-14 03:14:12 +00:00
enName: "updateUserName",
2024-03-04 07:10:11 +00:00
unit: "",
isBefore: false,
isCustomStyle: true,
},
{
name: "过皮",
2024-03-14 03:14:12 +00:00
enName: "tareTime",
2024-03-04 07:10:11 +00:00
unit: "",
isBefore: false,
isCustomStyle: true,
},
]);
2024-03-14 03:14:12 +00:00
const handleScenePhoto = (id: string) => {
2024-03-04 07:10:11 +00:00
uni.navigateTo({
2024-03-28 06:05:00 +00:00
url: "/pagesScenePhoto/index?orderType=1&imagesType=1&id=" + id, // 要跳转到的页面路径
2024-03-04 07:10:11 +00:00
});
};
2024-03-28 06:05:00 +00:00
const pageList: PageResult<Order> = reactive({
isLoading: false,
noMoreData: false,
2024-03-14 03:14:12 +00:00
total: 0,
list: [],
pageNum: 1,
pageSize: 10,
});
2024-03-28 06:05:00 +00:00
const resetPageList = () => {
pageList.noMoreData = false;
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
};
const handleSearch = () => {
resetPageList();
getList();
};
const getList = (v?: boolean) => {
if (v) {
if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) {
pageList.pageNum++;
} else {
pageList.noMoreData = true;
return;
}
}
2024-03-28 08:55:03 +00:00
pageList.isLoading = true;
2024-03-28 06:05:00 +00:00
ShipmentApi.getOrderPage({
pageSize: pageList.pageSize,
pageNumber: pageList.pageNum,
userName: keyword.value,
isDeleted: true,
2024-03-28 08:55:03 +00:00
}).then((res: any) => {
2024-03-14 03:14:12 +00:00
if (res.code === 200) {
2024-03-28 08:55:03 +00:00
pageList.isLoading = false;
(pageList as any).list = pageList.list.concat(
res.data.list
);
pageList.total = (res.data as any).total;
2024-03-14 03:14:12 +00:00
}
});
};
const getScaleStatus = (type: number) => {
if (type === ScaleStatus.ToBeShipment) {
return "待出货";
} else if (type === ScaleStatus.ToBeGrossWeight) {
return "待过毛";
} else if (type === ScaleStatus.ToBeShipmentReview) {
return "待审核";
} else if (type === ScaleStatus.ToBeShipmentPay) {
return "待支付";
} else if (type === ScaleStatus.ShipmentPaid) {
return "已支付";
}
};
onMounted(() => {
2024-03-28 06:05:00 +00:00
getList();
2024-03-14 03:14:12 +00:00
});
2024-03-04 07:10:11 +00:00
</script>
<style lang="scss" scoped>
.c-card {
margin: 30rpx 25rpx;
2024-03-28 06:05:00 +00:00
2024-03-04 07:10:11 +00:00
.box {
margin-top: 30rpx;
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
padding: 30rpx;
.base {
display: flex;
align-items: center;
justify-content: space-between;
.no {
font-weight: 400;
2024-03-14 03:14:12 +00:00
font-size: 26rpx;
2024-03-04 07:10:11 +00:00
color: #000000;
}
.supplier {
font-weight: 400;
2024-03-14 03:14:12 +00:00
font-size: 26rpx;
2024-03-04 07:10:11 +00:00
color: #000000;
}
.btn {
border-radius: 24rpx;
border: 1px solid #00dcee;
padding: 10rpx 30rpx;
font-weight: 500;
2024-03-14 03:14:12 +00:00
font-size: 26rpx;
2024-03-04 07:10:11 +00:00
color: #00dcee;
line-height: 41rpx;
}
}
.name {
font-weight: 400;
2024-03-14 03:14:12 +00:00
font-size: 28rpx;
2024-03-04 07:10:11 +00:00
color: #000000;
margin: 15rpx 0rpx;
text {
background-color: #ffaf75;
font-weight: 500;
2024-03-14 03:14:12 +00:00
font-size: 24rpx;
2024-03-04 07:10:11 +00:00
color: #ffffff;
padding: 5rpx 20rpx;
margin-left: 20rpx;
}
}
.type {
font-weight: 400;
2024-03-14 03:14:12 +00:00
font-size: 28rpx;
2024-03-04 07:10:11 +00:00
color: #ec0f3e;
margin-bottom: 20rpx;
}
2024-03-28 06:05:00 +00:00
.flex-box {
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 400;
font-size: 26rpx;
color: #999999;
border-bottom: 1rpx solid rgba(233, 233, 233, 0.76);
padding-bottom: 20rpx;
}
2024-03-04 07:10:11 +00:00
}
.more {
display: grid;
grid-template-columns: repeat(2, 1fr);
flex: 1;
font-weight: 400;
2024-03-14 03:14:12 +00:00
font-size: 26rpx;
2024-03-04 07:10:11 +00:00
color: #000000;
2024-03-28 06:05:00 +00:00
padding: 25rpx 0rpx 0rpx 0rpx;
2024-03-04 07:10:11 +00:00
> view {
line-height: 50rpx;
}
}
}
</style>