|
|
@@ -86,6 +86,13 @@
|
|
|
<el-button link type="primary" v-if="scope.row.orderStatus != '4'" @click="handleDeliver(scope.row)">发货</el-button>
|
|
|
<el-button link type="primary" @click="handleReview(scope.row)">查看发货信息</el-button>
|
|
|
<el-button link type="primary">取消订单</el-button>
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ v-if="scope.row.orderStatus == '3' || scope.row.orderStatus == '4' || scope.row.orderStatus == '5'"
|
|
|
+ @click="handleViewLogistics(scope.row)"
|
|
|
+ >查看物流</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -95,6 +102,8 @@
|
|
|
|
|
|
<!-- 发货对话框 -->
|
|
|
<DeliverDialog v-model="showDeliverDialog" :order-id="currentOrderId" :order-no="currentOrderNo" @success="handleDeliverSuccess" />
|
|
|
+
|
|
|
+ <LogisticsDetail v-model="showLogisticsDialog" :order-id="logisticsOrderId" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -110,7 +119,7 @@ import {
|
|
|
} from '@/api/order/orderMain';
|
|
|
import { OrderMainVO, OrderMainQuery, OrderMainForm } from '@/api/order/orderMain/types';
|
|
|
import DeliverDialog from '../saleOrder/deliverDialog.vue';
|
|
|
-
|
|
|
+import LogisticsDetail from '../saleOrder/logisticsDetail.vue';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const { order_status, fee_type, pay_method, order_source, deliver_method } = toRefs<any>(
|
|
|
proxy?.useDict('order_status', 'fee_type', 'pay_method', 'order_source', 'deliver_method')
|
|
|
@@ -139,6 +148,9 @@ const dialog = reactive<DialogOption>({
|
|
|
title: ''
|
|
|
});
|
|
|
|
|
|
+const showLogisticsDialog = ref(false);
|
|
|
+const logisticsOrderId = ref<string | number>();
|
|
|
+
|
|
|
const orderStatusStats = ref({
|
|
|
pendingPaymentCount: 0, // 待支付
|
|
|
pendingShipmentCount: 0, // 待发货
|
|
|
@@ -272,6 +284,17 @@ const queryOrderStatusStatsMethod = async () => {
|
|
|
orderStatusStats.value = res as any;
|
|
|
};
|
|
|
|
|
|
+/** 查看物流按钮操作 */
|
|
|
+const handleViewLogistics = (row?: OrderMainVO) => {
|
|
|
+ if (!row?.id) {
|
|
|
+ proxy?.$modal.msgWarning('订单ID不能为空');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ logisticsOrderId.value = row.id;
|
|
|
+
|
|
|
+ showLogisticsDialog.value = true;
|
|
|
+};
|
|
|
+
|
|
|
/** 关闭订单操作 */
|
|
|
const handleCloseOrder = async (row?: OrderMainVO) => {
|
|
|
const _ids = row?.id || ids.value;
|