From 74d981c5bd28afdc4be1b94769744f1934cf47bf Mon Sep 17 00:00:00 2001
From: weipengfei <2187978347@qq.com>
Date: Wed, 3 Jul 2024 17:58:29 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/userList.vue | 2 +-
src/utils/EscPos.js | 4 +++-
src/views/convert/component/order.vue | 3 +++
src/views/saleHome/component/shop.vue | 2 +-
src/views/user/component/detail.vue | 27 +++++++++++++++++++++++++--
5 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/src/components/userList.vue b/src/components/userList.vue
index fabbfe6..416b790 100644
--- a/src/components/userList.vue
+++ b/src/components/userList.vue
@@ -88,7 +88,7 @@ defineExpose({
手机号: {{ item.mobile || item.account }}
-
{{ item.user_ship_name }}
+
{{ item.user_ship_name }}
{{ item.user_ship_name }}
diff --git a/src/utils/EscPos.js b/src/utils/EscPos.js
index b5b51a3..2c36f01 100644
--- a/src/utils/EscPos.js
+++ b/src/utils/EscPos.js
@@ -117,7 +117,9 @@ export const printTicket = (obj = {}, test = false) => {
str += Esc.Size2(2) + Esc.Center() + Esc.boldFontOn() + obj.system_store_name + Esc.Size1() + "\n";
str += Esc.fillLine(" ") + Esc.boldFontOff() + "\n";
if (obj.shipping_type) {
- str += Esc.Left() + "核销码: " + Esc.boldFontOn() + obj.verify_code + Esc.boldFontOff() + (obj.reservation ? " (次日提)" : " ") + "\n";
+ if(obj.is_writeoff == 1) str += Esc.Left() + "核销码: " + Esc.boldFontOn() + obj.verify_code + Esc.boldFontOff() + " (已核销)" + "\n";
+ else if(obj.reservation == 1) str += Esc.Left() + "核销码: " + Esc.boldFontOn() + obj.verify_code + Esc.boldFontOff() + " (次日提)" + "\n";
+ else str += Esc.Left() + "核销码: " + Esc.boldFontOn() + obj.verify_code + Esc.boldFontOff() + "\n";
}
str += Esc.Left() + "单号: " + obj.order_id + "\n";
str += Esc.Left() + "下单时间: " + obj.create_time + "\n";
diff --git a/src/views/convert/component/order.vue b/src/views/convert/component/order.vue
index ba97efd..82192f6 100644
--- a/src/views/convert/component/order.vue
+++ b/src/views/convert/component/order.vue
@@ -64,6 +64,9 @@ const getOrderList = (reload = false) => {
})
.catch((err) => {
loading.value = false;
+ ElMessage.error(err.msg||'没有找到该订单')
+ orderList.value = [];
+ mitt.emit("set-sale-order-detail", {});
});
} else {
cashierinfoWriteoffListApi(where.value)
diff --git a/src/views/saleHome/component/shop.vue b/src/views/saleHome/component/shop.vue
index d96af2e..5ab15fc 100644
--- a/src/views/saleHome/component/shop.vue
+++ b/src/views/saleHome/component/shop.vue
@@ -300,7 +300,7 @@ onUnmounted(() => {
align-items: center;
div {
- background-color: rgba($color: #E6A23C, $alpha: 0.8);
+ background-color: rgba($color: #1890FF, $alpha: 0.8);
color: #fff;
border-radius: 50%;
width: 5rem;
diff --git a/src/views/user/component/detail.vue b/src/views/user/component/detail.vue
index 2f3a397..f92a314 100644
--- a/src/views/user/component/detail.vue
+++ b/src/views/user/component/detail.vue
@@ -106,10 +106,33 @@ const getAddress = () => {
userAddressDetailApi({
uid: formData.value.id
}).then(res => {
- if (res.data.village) {
+ if (res.data?.village) {
selectedValues.value = [res.data.city, res.data.area, res.data.street, res.data.village, +res.data.brigade];
selectedEd.value = JSON.parse(JSON.stringify(selectedValues.value));
- addressInfo.value = Object.assign(addressInfo.value, res.data);
+ addressInfo.value = res.data;
+ }
+ else {
+ selectedValues.value = [];
+ selectedEd.value = [];
+ addressInfo.value = {
+ id: '',
+ province: '',
+ city: '',
+ area: '',
+ street: '',
+ brigade: ''
+ }
+ }
+ }).catch(err=>{
+ selectedValues.value = [];
+ selectedEd.value = [];
+ addressInfo.value = {
+ id: '',
+ province: '',
+ city: '',
+ area: '',
+ street: '',
+ brigade: ''
}
})
}