|
@@ -22,46 +22,56 @@
|
|
|
<el-table-column label="商品信息" min-width="360">
|
|
|
<template #default="scope">
|
|
|
<div class="sa-flex">
|
|
|
- <sa-image :url="scope.row.goods_image" size="40"></sa-image>
|
|
|
- <div class="sa-m-l-8">{{ scope.row.goods_title }}</div>
|
|
|
+ <sa-image :url="scope.row.image" size="40"></sa-image>
|
|
|
+ <div class="sa-m-l-8">{{ scope.row.productName }}</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="goods_num" label="数量" min-width="80"></el-table-column>
|
|
|
- <el-table-column prop="dispatch_status_text" label="状态" min-width="140">
|
|
|
+ <el-table-column label="规格" min-width="120">
|
|
|
<template #default="scope">
|
|
|
- {{ scope.row.dispatch_status_text }}/{{ scope.row.aftersale_status_text }}
|
|
|
+ {{ scope.row.sku || '-' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="数量" min-width="80">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ scope.row.payNum }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="状态" min-width="140">
|
|
|
+ <template #default="scope"> 待发货 </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="快递单号" min-width="80">
|
|
|
<template #default>-</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div class="address">
|
|
|
<div class="title sa-m-b-16">配送信息</div>
|
|
|
- <div class="sa-m-l-16" v-if="props.modal?.params?.params?.data?.address">
|
|
|
+ <div class="sa-m-l-16" v-if="props.modal?.params?.data?.orderAddressVO">
|
|
|
<div class="sa-flex sa-m-b-8">
|
|
|
<div class="label">收货信息:</div>
|
|
|
<div class="content">
|
|
|
- {{ props.modal?.params?.params?.data?.address?.consignee }}
|
|
|
- {{ props.modal?.params?.params?.data?.address?.mobile }}
|
|
|
+ {{ props.modal?.params?.data?.orderAddressVO?.realName }}
|
|
|
+ {{ props.modal?.params?.data?.orderAddressVO?.phone }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="sa-flex sa-col-top sa-m-b-16">
|
|
|
<div class="label">收货地址:</div>
|
|
|
<div class="content">
|
|
|
<div>
|
|
|
- {{ props.modal?.params?.params?.data?.address?.province_name }}
|
|
|
- {{ props.modal?.params?.params?.data?.address?.city_name }}
|
|
|
- {{ props.modal?.params?.params?.data?.address?.district_name }}
|
|
|
+ {{ props.modal?.params?.data?.orderAddressVO?.province }}
|
|
|
+ {{ props.modal?.params?.data?.orderAddressVO?.city }}
|
|
|
+ {{ props.modal?.params?.data?.orderAddressVO?.district }}
|
|
|
+ </div>
|
|
|
+ <div>{{ props.modal?.params?.data?.orderAddressVO?.detail }}</div>
|
|
|
+ <div v-if="props.modal?.params?.data?.orderAddressVO?.postCode">
|
|
|
+ 邮编:{{ props.modal?.params?.data?.orderAddressVO?.postCode }}
|
|
|
</div>
|
|
|
- <div>{{ props.modal?.params?.params?.data?.address?.address }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <template v-if="!props.modal?.params?.params?.data?.address">{{
|
|
|
- props.modal?.params?.params?.data?.address_id
|
|
|
- }}</template>
|
|
|
+ <template v-if="!props.modal?.params?.data?.orderAddressVO">
|
|
|
+ 地址ID:{{ props.modal?.params?.data?.addressId }}
|
|
|
+ </template>
|
|
|
</div>
|
|
|
<div class="express">
|
|
|
<div class="title sa-m-b-16">物流信息</div>
|
|
@@ -212,7 +222,7 @@
|
|
|
</el-container>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
- import { computed, getCurrentInstance, onMounted, reactive, ref, nextTick, watch } from 'vue';
|
|
|
+ import { computed, getCurrentInstance, onMounted, reactive, ref, watch, nextTick } from 'vue';
|
|
|
import { api } from '../order.service';
|
|
|
import useExpress from '@/app/shop/admin/data/express/express.js';
|
|
|
import draggable from 'vuedraggable';
|
|
@@ -228,13 +238,12 @@
|
|
|
|
|
|
const state = reactive({
|
|
|
nosendItem: computed(() => {
|
|
|
- if (!props.modal?.params?.params?.data?.items) return [];
|
|
|
- return props.modal.params.params.data.items.filter(
|
|
|
- (i) =>
|
|
|
- (i.dispatch_status == 0 || i.dispatch_status === undefined) &&
|
|
|
- (i.refund_status == 0 || i.refund_status === undefined) &&
|
|
|
- (i.dispatch_type == 'express' || i.dispatch_type === undefined),
|
|
|
- );
|
|
|
+ console.log('发货弹窗接收到的数据:', props.modal);
|
|
|
+ console.log('订单详情数据:', props.modal?.params?.data);
|
|
|
+ console.log('商品信息数据:', props.modal?.params?.data?.orderInfoVO);
|
|
|
+ console.log('地址信息数据:', props.modal?.params?.data?.orderAddressVO);
|
|
|
+ if (!props.modal?.params?.data?.orderInfoVO) return [];
|
|
|
+ return props.modal.params?.data.orderInfoVO;
|
|
|
}),
|
|
|
method: 'input',
|
|
|
expressItem: [],
|
|
@@ -246,13 +255,8 @@
|
|
|
|
|
|
dispatch_type: 'express',
|
|
|
customItem: computed(() => {
|
|
|
- if (!props.modal?.params?.params?.data?.items) return [];
|
|
|
- return props.modal.params.params.data.items.filter(
|
|
|
- (i) =>
|
|
|
- (i.dispatch_status == 0 || i.dispatch_status === undefined) &&
|
|
|
- (i.refund_status == 0 || i.refund_status === undefined) &&
|
|
|
- i.dispatch_type == 'custom',
|
|
|
- );
|
|
|
+ // 手动发货暂不支持,返回空数组
|
|
|
+ return [];
|
|
|
}),
|
|
|
custom_type: 'text',
|
|
|
custom_content: [],
|
|
@@ -275,14 +279,15 @@
|
|
|
proxy.$refs.expressRef &&
|
|
|
proxy.$refs.expressRef.validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
+ const { name, no } = express;
|
|
|
state.sendLoading = true;
|
|
|
- const { code } = await api.order.dispatch({
|
|
|
- order_id: props.modal?.params?.params?.data?.id,
|
|
|
- order_item_ids,
|
|
|
- action: 'confirm',
|
|
|
- method: 'input',
|
|
|
- express: express,
|
|
|
- });
|
|
|
+ const { code } = await api.order.dispatch([
|
|
|
+ {
|
|
|
+ orderId: props.modal.params?.data?.id,
|
|
|
+ deliveryName: name,
|
|
|
+ deliveryNo: no,
|
|
|
+ },
|
|
|
+ ]);
|
|
|
state.sendLoading = false;
|
|
|
if (code == '200') {
|
|
|
emit('modalCallBack', { event: 'confirm' });
|
|
@@ -292,7 +297,7 @@
|
|
|
} else if (state.method == 'api') {
|
|
|
state.sendLoading = true;
|
|
|
const { code } = await api.order.dispatch({
|
|
|
- order_id: props.modal?.params?.params?.data?.id,
|
|
|
+ order_id: props.modal.data.id,
|
|
|
order_item_ids,
|
|
|
action: 'confirm',
|
|
|
method: 'api',
|
|
@@ -304,7 +309,7 @@
|
|
|
}
|
|
|
} else if (state.dispatch_type == 'custom') {
|
|
|
const { code } = await api.order.customDispatch({
|
|
|
- order_id: props.modal?.params?.params?.data?.id,
|
|
|
+ order_id: props.modal.data.id,
|
|
|
order_item_ids,
|
|
|
custom_type: state.custom_type,
|
|
|
custom_content: state.custom_content,
|