From 9fbf092756d2eba17c2054c13434af6e4c72a809 Mon Sep 17 00:00:00 2001
From: sx <2427911852@qq.com>
Date: Thu, 23 Jan 2025 22:26:04 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jiuyi2/components/shop/order/express.vue | 51 ++++++++++++++++----
jiuyi2/pages/shop/order/index.vue | 60 +++++++++++++++---------
2 files changed, 80 insertions(+), 31 deletions(-)
diff --git a/jiuyi2/components/shop/order/express.vue b/jiuyi2/components/shop/order/express.vue
index eebbdc10..0f2a6259 100644
--- a/jiuyi2/components/shop/order/express.vue
+++ b/jiuyi2/components/shop/order/express.vue
@@ -5,6 +5,7 @@
reactive,
getCurrentInstance,
defineExpose,
+ onMounted
} from 'vue'
// 工具库
import util from '@/common/js/util';
@@ -20,6 +21,15 @@
// 运单号
trackingNumber: '',
})
+ // 物流公司列表
+ const expressList = reactive([])
+ // 物流公司列表
+ const expressIndex = ref('')
+
+ onMounted(() => {
+ // 获取物流公司列表
+ getExpressList()
+ })
// 获取物流公司列表
function getExpressList() {
@@ -27,6 +37,7 @@
path: ['express_company'],
}).then(rs => {
if (rs.code == 200) {
+ Object.assign(expressList, rs.data)
return
}
util.alert({
@@ -36,6 +47,18 @@
})
}
+ /**
+ * 选择物流公司
+ * @param {Object} ev
+ */
+ function handleExpressIndex(ev) {
+ console.log('ev', ev)
+ const index = ev.detail.value
+ if(expressIndex.value === index) return
+ expressIndex.index = index
+ form.expressName = expressList[index].dictLabel
+ }
+
// 开启弹窗
function open() {
proxy.$refs.express.open()
@@ -44,6 +67,12 @@
// 关闭弹窗
function close() {
proxy.$refs.express.close()
+
+ //
+ setTimeout(() => {
+ form.expressName = ''
+ form.trackingNumber = ''
+ })
}
defineExpose({
@@ -54,23 +83,29 @@
-
-
diff --git a/jiuyi2/pages/shop/order/index.vue b/jiuyi2/pages/shop/order/index.vue
index 0f02f51d..d65edec8 100644
--- a/jiuyi2/pages/shop/order/index.vue
+++ b/jiuyi2/pages/shop/order/index.vue
@@ -71,6 +71,8 @@
})
// 顶部导航背景颜色
const apexBgColor = ref('#ffffff00')
+ // 当前操作的订单
+ const orderDetail = reactive({})
onLoad((options) => {
// this.params.currentTab = options.currentTab / 1
@@ -216,9 +218,16 @@
refreshList()
})
}
+
+ // 填写退货物流信息
+ function handleExpress(item) {
+ Object.assign(orderDetail, {}, item)
+ proxy.$refs.expressRef.open()
+ }
+
@@ -228,30 +237,33 @@
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+