Files
klp-oa/klp-ui/src/views/crm/components/DeliveryTable.vue
砂糖 b85971d532 feat(crm): 添加销售员详情页数据加载功能
- 新增按销售员查询订单明细卷的API接口
- 为CoilTable和DeliveryTable组件添加高度属性
- 实现销售员详情页各标签页数据懒加载功能
- 优化销售员卡片点击和标签页切换时的数据加载逻辑
2026-04-27 18:14:54 +08:00

64 lines
2.4 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div>
<div class="coil-stats" style="margin-bottom: 10px; padding: 10px; background-color: #f5f7fa; border-radius: 4px;">
<span style="margin-right: 20px;"><strong>已发货{{ deliveryCountFinished }}</strong></span>
<span><strong>总单据数{{ deliveryCountTotal }}</strong></span>
</div>
<el-table border :data="data" highlight-current-row :height="tableHeight">
<el-table-column label="发货单唯一ID" align="center" prop="waybillId" v-if="false" />
<el-table-column label="发货单名称" align="center" prop="waybillName" />
<el-table-column label="车牌" align="center" prop="licensePlate" width="100" />
<el-table-column label="收货单位" align="center" prop="consigneeUnit" />
<el-table-column label="发货单位" align="center" prop="senderUnit" />
<el-table-column label="订单编号" align="center" prop="orderNo">
<template slot-scope="scope">
<span v-if="scope.row.orderId">{{ scope.row.orderCode }}</span>
<span v-else>{{ scope.row.principalPhone }}</span>
</template>
</el-table-column>
<el-table-column label="发货时间" align="center" prop="deliveryTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.deliveryTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="负责人" align="center" prop="principal" width="60" />
<el-table-column label="状态" align="center" prop="status" width="80">
<template slot-scope="scope">
<div v-if="scope.row.status === 1">已发货</div>
<div v-else-if="scope.row.status === 0">未发货</div>
<div v-else-if="scope.row.status === 2">已打印</div>
<div v-else>未打印</div>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" width="100" show-overflow-tooltip />
</el-table>
</div>
</template>
<script>
export default {
name: "DeliveryWaybill",
props: {
data: {
type: Array,
default: () => []
},
tableHeight: {
type: [String, Number],
default: ''
}
},
computed: {
/** 计算已发货数量 */
deliveryCountFinished() {
return this.data.filter(row => row.status === 1 || row.status === 2).length;
},
/** 计算总数量 */
deliveryCountTotal() {
return this.data.length;
}
},
};
</script>