更新关联客户功能

Signed-off-by: 吴文峰 <kevin@lmve.net>
This commit is contained in:
2026-04-29 21:53:48 +08:00
parent da9a303cb6
commit 67c9f16301
8 changed files with 1159 additions and 46 deletions
+44
View File
@@ -58,6 +58,21 @@
</view>
</view>
<!-- 关联客户 -->
<view v-if="linkedCustomers.length > 0" class="info-item">
<text class="info-label">关联客户</text>
<view class="linked-customers">
<view
v-for="customer in linkedCustomers"
:key="customer.id"
class="linked-customer"
>
<text class="linked-customer-name">{{ (customer.last_name || '') + (customer.first_name ? ' ' + customer.first_name : '') }}</text>
<text v-if="customer.primary_phone" class="linked-customer-phone">{{ customer.primary_phone }}</text>
</view>
</view>
</view>
<!-- 关联采购订单汇总去重 -->
<view v-if="allPurchaseOrders.length > 0" class="info-item">
<text class="info-label">关联采购订单</text>
@@ -283,6 +298,7 @@ const order = ref({})
const photos = ref([])
const commits = ref([])
const linkedItems = ref([])
const linkedCustomers = ref([])
const canCommit = ref(false)
const canModify = ref(false)
@@ -341,6 +357,7 @@ async function fetchOrderDetail() {
photos.value = res.data.photos || []
commits.value = res.data.commits || []
linkedItems.value = res.data.linkedItems || []
linkedCustomers.value = res.data.linkedCustomers || []
canCommit.value = res.data.canCommit || false
canModify.value = res.data.canModify || false
} else {
@@ -800,6 +817,33 @@ async function onRefresh() {
color: #8c8c8c;
}
.linked-customers {
display: flex;
flex-wrap: wrap;
gap: 16rpx;
}
.linked-customer {
display: inline-flex;
align-items: center;
gap: 8rpx;
padding: 10rpx 20rpx;
background-color: #e6f7ff;
border: 1rpx solid #91d5ff;
border-radius: 30rpx;
}
.linked-customer-name {
font-size: 24rpx;
color: #1890ff;
}
.linked-customer-phone {
font-size: 22rpx;
color: #8c8c8c;
margin-left: 8rpx;
}
/* 关联采购订单 */
.linked-pos {
display: flex;