From a4d60955d882aff2ff7260a7553df268e23aadab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=9F=E5=B7=9D=E4=B8=9C?= Date: Tue, 27 May 2025 16:18:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=80=90=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E3=80=91=E9=87=8D=E5=A4=8D=E5=BC=82=E5=B8=B8=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=98=BE=E7=A4=BA=E5=87=BA=E4=B8=8A=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E6=8F=90=E4=BA=A4=E7=9A=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order/report-order-exception.vue | 34 +++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/pages/order/report-order-exception.vue b/pages/order/report-order-exception.vue index 217b039..8a5ad8d 100644 --- a/pages/order/report-order-exception.vue +++ b/pages/order/report-order-exception.vue @@ -5,7 +5,7 @@ 异常原因 请选择异常原因 - {{typeList[typeListIndex].title}} + {{ abnormalTitle }} @@ -18,7 +18,7 @@ - + @@ -28,7 +28,7 @@ import MeEmptySpace from "../../components/me-empty-space/me-empty-space.vue"; import MeButton from "../../components/me-button/me-button.vue"; import helpers from "../../utils/helpers"; -import {ref, reactive} from 'vue' +import {ref, reactive, computed} from 'vue' import {onLoad} from '@dcloudio/uni-app' import api from "../../api/api"; import {throttle} from "../../utils/throttle"; @@ -40,6 +40,23 @@ const bindPickerChange = (e) => { const typeListIndex = ref(0) +const abnormalTitle = computed(() => { + if (submitData.abnormal_id === 0 || typeList.value === null) { + return '' + } + + const match = typeList.value.find(item => item.id === submitData.abnormal_id) + return match ? match.title : '' +}) + +const submitText = computed(() => { + if (orderInfo.value === null) { + return '立即上报' + } + + return '再次上报' +}) + //提交 const submit = throttle(() => { if (!validate()) { @@ -78,7 +95,18 @@ const submit = throttle(() => { }); }) +const orderInfo = ref(null) const init = () => { + api.orderAbnormalInfo({order_id: orderId.value}).then(res => { + if (res.id !== undefined) { + orderInfo.value = res + submitData.abnormal_id = orderInfo.value.abnormal_id + submitData.detail = orderInfo.value.detail + } + + helpers.delayHideLoading() + }).catch(() => {}) + api.findExceptionTypeList().then(res => { typeList.value = res }).catch(() => {}).finally(() => {