|
|
@@ -4,7 +4,9 @@
|
|
|
<!-- 订单信息 -->
|
|
|
<el-descriptions title="订单信息" :column="2" border class="custom-descriptions">
|
|
|
<el-descriptions-item label="订单编号">{{ orderDetail.orderNo }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="发货单编号">{{ shipmentNoList }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="关联单号">{{ orderDetail.parentOrderNo }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="项目/平台订单号" v-if="crrcExtInfo.crrcOrderNo">{{ crrcExtInfo.crrcOrderNo }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="发货单编号">{{ orderDetail.shipmentNo }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="订单总金额">{{ orderDetail.totalAmount }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="支付状态">
|
|
|
<dict-tag :options="payment_status" :value="orderDetail.paymentStatus" />
|
|
|
@@ -75,8 +77,8 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<div class="detail-item">
|
|
|
- <span class="label">所属项目</span>
|
|
|
- <span>{{ '--' }}</span>
|
|
|
+ <span class="label">所属项目:</span>
|
|
|
+ <span>{{ orderDetail.dataSource == 'zhongche' ? '中车' : '--' }}</span>
|
|
|
</div>
|
|
|
<div class="detail-item">
|
|
|
<span class="label">业务部门:</span>
|
|
|
@@ -106,6 +108,27 @@
|
|
|
</el-descriptions>
|
|
|
</el-card>
|
|
|
|
|
|
+ <!-- 项目订单扩展信息 -->
|
|
|
+ <el-card v-if="orderDetail.dataSource" shadow="never" class="mb-2">
|
|
|
+ <template #header>
|
|
|
+ <span>项目订单扩展信息</span>
|
|
|
+ </template>
|
|
|
+ <el-descriptions :column="3" border class="custom-descriptions">
|
|
|
+ <el-descriptions-item label="收货人">{{ crrcExtInfo.receiverName || '--' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="收货人手机号" :span="2">{{ crrcExtInfo.mobile || '--' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="收货人邮箱">{{ crrcExtInfo.email || '--' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="收货地址" :span="2">
|
|
|
+ {{ crrcExtInfo.provinceName || '' }}-{{ crrcExtInfo.cityName || '' }}-{{ crrcExtInfo.countyName || '' }}-{{ crrcExtInfo.townName || '' }}-{{
|
|
|
+ crrcExtInfo.detailAddress || ''
|
|
|
+ }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="下单人姓名">{{ crrcExtInfo.buyerName || '--' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="下单人手机号" :span="2">{{ crrcExtInfo.buyerMobile || '--' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="采购单位名称" :span="3">{{ crrcExtInfo.purchaserName || '--' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="采购部门名称" :span="3">{{ crrcExtInfo.purchaserDeptName || '--' }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
<!-- 商品明细 -->
|
|
|
<el-card shadow="never" class="mb-2">
|
|
|
<template #header>
|
|
|
@@ -264,6 +287,8 @@ import { getInvoiceType } from '@/api/customer/invoiceType';
|
|
|
import { InvoiceTypeVO } from '@/api/customer/invoiceType/types';
|
|
|
import { selectNewOneLog } from '@/api/order/orderStatusLog';
|
|
|
import { getDept } from '@/api/system/dept';
|
|
|
+import { getOrderMainCrrcExt } from '@/api/order/orderMainCrrcExt';
|
|
|
+import { OrderMainCrrcExtVO } from '@/api/order/orderMainCrrcExt/types';
|
|
|
import LogisticsDetail from './logisticsDetail.vue';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const { order_status, payment_status, fee_type, pay_method, deliver_method } = toRefs<any>(
|
|
|
@@ -297,6 +322,9 @@ const deliverProductList = ref<DeliverProductVO[]>([]);
|
|
|
// 收货地址信息
|
|
|
const shippingAddress = ref<ShippingAddressVO>({} as ShippingAddressVO);
|
|
|
|
|
|
+// 中车订单扩展信息
|
|
|
+const crrcExtInfo = ref<OrderMainCrrcExtVO>({} as OrderMainCrrcExtVO);
|
|
|
+
|
|
|
const operateType = ref('add');
|
|
|
|
|
|
// 发货对话框
|
|
|
@@ -409,6 +437,24 @@ const getOrderDetail = async () => {
|
|
|
orderDetail.value.userDeptName = await getDeptDetail(orderDetail.value.userDept);
|
|
|
}
|
|
|
|
|
|
+ // 获取中车订单扩展信息
|
|
|
+ //如果data.parentOrderId存在,则使用data.parentOrderId查询,否则使用data.id查询
|
|
|
+ if (orderDetail.value.parentOrderId) {
|
|
|
+ try {
|
|
|
+ const extRes = await getOrderMainCrrcExt(orderDetail.value.parentOrderId);
|
|
|
+ crrcExtInfo.value = extRes.data || ({} as OrderMainCrrcExtVO);
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取中车订单扩展信息失败:', error);
|
|
|
+ }
|
|
|
+ } else if (orderDetail.value.id) {
|
|
|
+ try {
|
|
|
+ const extRes = await getOrderMainCrrcExt(orderDetail.value.id);
|
|
|
+ crrcExtInfo.value = extRes.data || ({} as OrderMainCrrcExtVO);
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取中车订单扩展信息失败:', error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 获取发票类型信息
|
|
|
// if (orderDetail.value.invoiceType) {
|
|
|
// await getInvoiceTypeDetail(orderDetail.value.invoiceType);
|
|
|
@@ -536,6 +582,16 @@ const getShippingAddressDetail = async (addressId: string | number) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+// 获取中车订单扩展信息
|
|
|
+const getCrrcExtDetail = async (orderId: string | number) => {
|
|
|
+ try {
|
|
|
+ const res = await getOrderMainCrrcExt(orderId);
|
|
|
+ crrcExtInfo.value = res.data || ({} as OrderMainCrrcExtVO);
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取中车订单扩展信息失败:', error);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
// 计算商品总金额(所有商品的小计之和)
|
|
|
const totalAmount = computed(() => {
|
|
|
return productList.value.reduce((sum, item) => {
|