Basil hace 2 años
padre
commit
015394d78a

+ 2 - 0
components.d.ts

@@ -59,6 +59,8 @@ declare module '@vue/runtime-core' {
59 59
     NutPopup: typeof import('uniapp-nutui/components/popup/popup.vue')['default']
60 60
     NutRate: typeof import('uniapp-nutui/components/rate/rate.vue')['default']
61 61
     NutSearchbar: typeof import('uniapp-nutui/components/searchbar/searchbar.vue')['default']
62
+    NutStep: typeof import('uniapp-nutui/components/step/step.vue')['default']
63
+    NutSteps: typeof import('uniapp-nutui/components/steps/steps.vue')['default']
62 64
     NutSwitch: typeof import('uniapp-nutui/components/switch/switch.vue')['default']
63 65
     NutTable: typeof import('uniapp-nutui/components/table/table.vue')['default']
64 66
     NutTabPane: typeof import('uniapp-nutui/components/tabpane/tabpane.vue')['default']

+ 101 - 0
src/apis/model/refund.model.ts

@@ -0,0 +1,101 @@
1
+export interface RefundModel {
2
+    refund_order_id: string
3
+    refund_order_sn: string
4
+    order_id: string
5
+    uid: string
6
+    mer_id: string
7
+    extension_one: string
8
+    extension_two: string
9
+    delivery_type: string
10
+    delivery_id: string
11
+    delivery_mark: string
12
+    delivery_pics: string
13
+    delivery_phone: string
14
+    mer_delivery_user: string
15
+    mer_delivery_address: string
16
+    phone: string
17
+    mark: string
18
+    mer_mark: string
19
+    pics: Array<string>
20
+    refund_type: string
21
+    refund_message: string
22
+    refund_price: string
23
+    refund_postage: string
24
+    refund_num: string
25
+    fail_message: string
26
+    status: string
27
+    status_time: string
28
+    create_time: string
29
+    reconciliation_id: string
30
+    is_del: string
31
+    is_system_del: string
32
+    after_sn: string
33
+    refundProduct: Array<RefundProductModel>
34
+    private Merchant merchant: string
35
+    take_status: string
36
+}
37
+
38
+export interface RefundProductModel {
39
+    refund_product_id: string
40
+    refund_order_id: string
41
+    order_product_id: string
42
+    refund_num: string
43
+    create_time: string
44
+    product: {
45
+        order_product_id: string
46
+        order_id: string
47
+        uid: string
48
+        cart_id: string
49
+        product_id: string
50
+        extension_one: string
51
+        extension_two: string
52
+        product_sku: string
53
+        is_refund: string
54
+        product_num: string
55
+        refund_num: string
56
+        is_reply: string
57
+        product_price: string
58
+        private Cart_info cart_info: string
59
+        create_time: string
60
+        type: string
61
+    }
62
+}
63
+
64
+export interface ProductModel {
65
+    order_product_id: string
66
+    order_id: string
67
+    uid: string
68
+    cart_id: string
69
+    product_id: string
70
+    extension_one: string
71
+    extension_two: string
72
+    product_sku: string
73
+    is_refund: string
74
+    product_num: string
75
+    refund_num: string
76
+    is_reply: string
77
+    product_price: string
78
+    private Cart_info cart_info: string
79
+    create_time: string
80
+    type: string
81
+}
82
+
83
+export interface CartInfoModel {
84
+    product: ProductModel
85
+    productAttr: ProductAttrModel
86
+}
87
+
88
+export interface ProductAttrModel {
89
+    product_id: string
90
+    stock: string
91
+    price: string
92
+    unique: string
93
+    sku: string
94
+    volume: string
95
+    weight: string
96
+    ot_price: string
97
+    dacang_price: string
98
+    cost: string
99
+    bc_extension_one: string
100
+    bc_extension_two: string
101
+}

+ 15 - 2
src/apis/order.api.ts

@@ -70,11 +70,24 @@ enum API {
70 70
 }
71 71
 
72 72
 /**
73
+ * 退款订单详情
74
+ * @param id
75
+ */
76
+export function getRefundDetail(id: string) {
77
+    return defHttp.get({
78
+        url: API.REFUND_DETAIL + `/${id}`,
79
+    })
80
+}
81
+
82
+/**
73 83
  * 售后-订单列表
74 84
  */
75
-export function refundList(): Promise<AfterSalesOrderResult> {
85
+export function refundList(params: { page: number, type: number, limit: number }): Promise<AfterSalesOrderResult> {
76 86
     return defHttp.get({
77
-        url: API.REFUND_LIST
87
+        url: API.REFUND_LIST,
88
+        data: {
89
+            ...params
90
+        }
78 91
     })
79 92
 }
80 93
 

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 1
src/pages.json


+ 102 - 98
src/pages/my-integral/user-invation.vue

@@ -2,6 +2,7 @@
2 2
 import {CDN_URL} from "~/config/app";
3 3
 import {getSpreadImage, getSpreadNumber, getUserInviteList} from "~/apis/user";
4 4
 import {encodePhone} from "../../utils";
5
+import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5 6
 const userStore = useUserStore()
6 7
 
7 8
 const invite_friends_bg = CDN_URL + '/static/assets/invite_friends_bg_220826.png'
@@ -118,136 +119,139 @@ function shareImage() {
118 119
 }
119 120
 </script>
120 121
 <template>
121
-  <div class="relative top-0 left-0 min-h-screen h-full w-full bg-[#FFCB75] z-0 ">
122
-    <image :src="invite_friends_bg" mode="widthFix" class="w-full h-full absolute"></image>
123
-    <image
124
-        @click="handleShowAgreement(17)"
125
-        :src="huodongshuomingImg" mode="widthFix" class="w-10 absolute top-0 right-3"></image>
126
-    <div
127
-        @click="showDialog = true"
128
-        class="text-sm text-black absolute top-3 left-3 px-2">
129
-      邀请码
130
-    </div>
122
+  <CXBBasePage>
123
+    <div class="relative top-0 left-0 min-h-screen h-full w-full bg-[#FFCB75] z-0 ">
124
+      <image :src="invite_friends_bg" mode="widthFix" class="w-full h-full absolute"></image>
125
+      <image
126
+          @click="handleShowAgreement(17)"
127
+          :src="huodongshuomingImg" mode="widthFix" class="w-10 absolute top-0 right-3"></image>
128
+      <div
129
+          @click="showDialog = true"
130
+          class="text-sm text-black absolute top-3 left-3 px-2">
131
+        邀请码
132
+      </div>
131 133
 
132
-    <nut-dialog title="邀请码"  v-model:visible="showDialog" @cancel="onCancel" @ok="onOk" >
133
-      <template>
134
-        <input v-model="inviteCode" class="border border-solid border-1px rounded h-10" placeholder="请输入推荐人邀请码"/>
135
-      </template>
136
-    </nut-dialog>
134
+      <nut-dialog title="邀请码"  v-model:visible="showDialog" @cancel="onCancel" @ok="onOk" >
135
+        <template>
136
+          <input v-model="inviteCode" class="border border-solid border-1px rounded h-10" placeholder="请输入推荐人邀请码"/>
137
+        </template>
138
+      </nut-dialog>
137 139
 
138
-    <div class="relative top-120 text-white flex flex-col items-center justify-center pb-30">
139
-      <div class=" w-full h-10 relative flex justify-center items-center">
140
-        <div class="relative w-60 text-center z-1 h-10 absolute top-2">
141
-          立即邀请
140
+      <div class="relative top-120 text-white flex flex-col items-center justify-center pb-30">
141
+        <div class=" w-full h-10 relative flex justify-center items-center">
142
+          <div class="relative w-60 text-center z-1 h-10 absolute top-2">
143
+            立即邀请
144
+          </div>
145
+          <image :src="buttonImg" mode="widthFix" class="w-60 h-10 absolute top-0"></image>
142 146
         </div>
143
-        <image :src="buttonImg" mode="widthFix" class="w-60 h-10 absolute top-0"></image>
144
-      </div>
145
-      <div class="text-primary text-[12px] relative py-3">我的邀请码:{{ userStore && userStore.userInfo && userStore.userInfo.user_number }}</div>
146
-      <div class="relative w-full flex items-center">
147
-        <div class="w-full px-3 flex justify-center items-center  text-gray-600 text-[12px]">
148
-          <div class="integral_bg">
149
-            <div class="pt-20 flex flex-col gap-3 px-5 h-48 ">
150
-              <div class="bg-[#ffedc6] flex justify-around items-center flex-1 ">
151
-                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center gap-2">
152
-                  <div>首次邀请好友</div>
153
-                  <div class="flex gap-1  ">
154
-                    <text>奖励<text class="text-primary text-xl font-bold">99</text>积分</text>
147
+        <div class="text-primary text-[12px] relative py-3">我的邀请码:{{ userStore && userStore.userInfo && userStore.userInfo.user_number }}</div>
148
+        <div class="relative w-full flex items-center">
149
+          <div class="w-full px-3 flex justify-center items-center  text-gray-600 text-[12px]">
150
+            <div class="integral_bg">
151
+              <div class="pt-20 flex flex-col gap-3 px-5 h-48 ">
152
+                <div class="bg-[#ffedc6] flex justify-around items-center flex-1 ">
153
+                  <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center gap-2">
154
+                    <div>首次邀请好友</div>
155
+                    <div class="flex gap-1  ">
156
+                      <text>奖励<text class="text-primary text-xl font-bold">99</text>积分</text>
157
+                    </div>
155 158
                   </div>
156
-                </div>
157
-                <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
158
-                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
159
-                  <div>好友首次获得养老金</div>
160
-                  <div class="flex gap-1  ">
161
-                    <text>奖励<text class="text-primary text-xl font-bold">350</text>积分</text>
159
+                  <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
160
+                  <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
161
+                    <div>好友首次获得养老金</div>
162
+                    <div class="flex gap-1  ">
163
+                      <text>奖励<text class="text-primary text-xl font-bold">350</text>积分</text>
164
+                    </div>
162 165
                   </div>
163 166
                 </div>
164
-              </div>
165 167
 
166
-              <div class="bg-[#ffedc6] flex justify-around items-center flex-1">
167
-                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
168
-                  <div>好友签到3天</div>
169
-                  <div class="flex gap-1  ">
170
-                    <text>奖励<text class="text-primary text-xl font-bold">50</text>积分</text>
168
+                <div class="bg-[#ffedc6] flex justify-around items-center flex-1">
169
+                  <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
170
+                    <div>好友签到3天</div>
171
+                    <div class="flex gap-1  ">
172
+                      <text>奖励<text class="text-primary text-xl font-bold">50</text>积分</text>
173
+                    </div>
171 174
                   </div>
172
-                </div>
173
-                <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
174
-                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
175
-                  <div>好友签到14天</div>
176
-                  <div class="flex gap-1  ">
177
-                    <text>奖励<text class="text-primary text-xl font-bold">100</text>积分</text>
175
+                  <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
176
+                  <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
177
+                    <div>好友签到14天</div>
178
+                    <div class="flex gap-1  ">
179
+                      <text>奖励<text class="text-primary text-xl font-bold">100</text>积分</text>
180
+                    </div>
178 181
                   </div>
179
-                </div>
180
-                <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
181
-                <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
182
-                  <div>好友签到30天</div>
183
-                  <div class="flex gap-1  ">
184
-                    <text>奖励<text class="text-primary text-xl font-bold">300</text>积分</text>
182
+                  <div class="bg-[#FFCB75] h-8 w-0.3 opacity-50"></div>
183
+                  <div class="divide-y-[3px] w-1/2 flex flex-col justify-center items-center py-3 gap-2">
184
+                    <div>好友签到30天</div>
185
+                    <div class="flex gap-1  ">
186
+                      <text>奖励<text class="text-primary text-xl font-bold">300</text>积分</text>
187
+                    </div>
185 188
                   </div>
186 189
                 </div>
190
+
187 191
               </div>
188 192
 
189 193
             </div>
190 194
 
191
-          </div>
192
-
193 195
 
194
-<!--          <image :src="integral_bg" mode="widthFix" class="w-full h-full relative"></image>-->
196
+            <!--          <image :src="integral_bg" mode="widthFix" class="w-full h-full relative"></image>-->
195 197
 
198
+          </div>
196 199
         </div>
197
-      </div>
198
-      <div class="relative w-full">
199
-        <div class="px-4">
200
-          <div class="bg-[#F8F8F8] rounded-lg h-60 text-gray-500">
201
-            <div class="bg-[#FDF5E8] rounded-t-lg flex items-center justify-center py-2">
202
-              <image :src="goodFriendImg" mode="widthFix" class="w-50"></image>
203
-            </div>
204
-            <div v-if="invitePartnerModel && invitePartnerModel.userInviteVoList && invitePartnerModel.userInviteVoList.list.length > 0">
205
-              <swiper autoplay vertical :circular="true" :display-multiple-items="4" class="w-auto h-46">
206
-                <swiper-item  v-for="(item, index) in invitePartnerModel.userInviteVoList.list" :key="index" class="w-auto text-[12px] h-auto">
207
-                  <div class="p-3 h-30 flex justify-between  f-hairline-bottom">
208
-                    <div class="flex gap-2">
209
-                      <image :src="item.avatar" mode="widthFix" class="w-8 h-8"></image>
210
-                      <div class="flex flex-col">
211
-                        <div class="font-bold">{{ item.nickname }}</div>
212
-                        <div>{{ encodePhone( item.phone ) }}</div>
200
+        <div class="relative w-full">
201
+          <div class="px-4">
202
+            <div class="bg-[#F8F8F8] rounded-lg h-60 text-gray-500">
203
+              <div class="bg-[#FDF5E8] rounded-t-lg flex items-center justify-center py-2">
204
+                <image :src="goodFriendImg" mode="widthFix" class="w-50"></image>
205
+              </div>
206
+              <div v-if="invitePartnerModel && invitePartnerModel.userInviteVoList && invitePartnerModel.userInviteVoList.list.length > 0">
207
+                <swiper autoplay vertical :circular="true" :display-multiple-items="4" class="w-auto h-46">
208
+                  <swiper-item  v-for="(item, index) in invitePartnerModel.userInviteVoList.list" :key="index" class="w-auto text-[12px] h-auto">
209
+                    <div class="p-3 h-30 flex justify-between  f-hairline-bottom">
210
+                      <div class="flex gap-2">
211
+                        <image :src="item.avatar" mode="widthFix" class="w-8 h-8"></image>
212
+                        <div class="flex flex-col">
213
+                          <div class="font-bold">{{ item.nickname }}</div>
214
+                          <div>{{ encodePhone( item.phone ) }}</div>
215
+                        </div>
213 216
                       </div>
214
-                    </div>
215 217
 
216
-                    <div class="text-gray">{{ item.promoterTime }}</div>
218
+                      <div class="text-gray">{{ item.promoterTime }}</div>
217 219
 
218 220
 
219
-                  </div>
220
-                </swiper-item>
221
-              </swiper>
222
-            </div>
221
+                    </div>
222
+                  </swiper-item>
223
+                </swiper>
224
+              </div>
223 225
 
224
-            <div v-else class="flex justify-center items-center text-[12px] text-gray h-48">
225
-              竟然没有好友
226
+              <div v-else class="flex justify-center items-center text-[12px] text-gray h-48">
227
+                竟然没有好友
228
+              </div>
226 229
             </div>
230
+
227 231
           </div>
228 232
 
229 233
         </div>
230
-
231
-      </div>
232
-      <div class="relative w-full text-[12px] py-5 text-black flex justify-center items-center">
233
-        <div class="flex gap-4">
234
-          <div
235
-              @click="shareImage"
236
-              class="flex flex-col justify-center items-center gap-3">
237
-            <image :src="wexinLogo" mode="widthFix" class="w-10 h-10"></image>
238
-            <div>微信</div>
239
-          </div>
240
-          <div
241
-              @click="handleShowCode"
242
-              class="flex flex-col justify-center items-center gap-3">
243
-            <image :src="smLogo" mode="widthFix" class="w-10 h-10"></image>
244
-            <div>面对面扫码</div>
234
+        <div class="relative w-full text-[12px] py-5 text-black flex justify-center items-center">
235
+          <div class="flex gap-4">
236
+            <div
237
+                @click="shareImage"
238
+                class="flex flex-col justify-center items-center gap-3">
239
+              <image :src="wexinLogo" mode="widthFix" class="w-10 h-10"></image>
240
+              <div>微信</div>
241
+            </div>
242
+            <div
243
+                @click="handleShowCode"
244
+                class="flex flex-col justify-center items-center gap-3">
245
+              <image :src="smLogo" mode="widthFix" class="w-10 h-10"></image>
246
+              <div>面对面扫码</div>
247
+            </div>
245 248
           </div>
246 249
         </div>
247 250
       </div>
251
+
248 252
     </div>
249 253
 
250
-  </div>
254
+  </CXBBasePage>
251 255
 </template>
252 256
 
253 257
 <style>

+ 21 - 28
src/pages/order/components/RefundOrderItem.vue

@@ -168,10 +168,16 @@ function handleProductItemClick(
168 168
 }
169 169
 
170 170
 
171
+function handleShowDetail(orderItem) {
172
+  console.log(orderItem)
173
+  uni.navigateTo({
174
+    url: '/pages/refund/detail?id=' + orderItem.refund_order_id
175
+  })
176
+}
171 177
 </script>
172 178
 
173 179
 <template>
174
-  <div class="mb-3 bg-white rounded p-3">
180
+  <div class="mb-3 bg-white rounded p-3" v-if="orderItem">
175 181
     <div
176 182
         @click.stop="handleHeaderClick"
177 183
         class="flex items-center justify-between f-hairline-bottom pb-3">
@@ -196,8 +202,7 @@ function handleProductItemClick(
196 202
           <div class="flex py-2 gap-3">
197 203
             <div class="flex-1 flex gap-2">
198 204
               <image :src="orderProduct.product.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
199
-
200
-              <div class="flex flex-col">
205
+              <div class="flex flex-col flex-1">
201 206
                 <div class="line-clamp-2 text-[12px]">
202 207
                   {{ orderProduct.product.cart_info.product.store_name }}
203 208
                 </div>
@@ -205,36 +210,24 @@ function handleProductItemClick(
205 210
                   {{ orderProduct.product.cart_info.productAttr.sku }}
206 211
                 </div>
207 212
               </div>
213
+                <div class="justify-end flex">
214
+                  <div class="flex flex-col ">
215
+                    <div class="text-[12px] font-bold">
216
+                      <FPrice :price="orderProduct.product.product_price" ex-class="font-bold text-black"/>
217
+                    </div>
218
+                    <div class="text-gray-500 text-[11px]">共{{ orderProduct.product.product_num }}件</div>
219
+                  </div>
220
+                </div>
208 221
             </div>
209
-
210
-            <div class="flex flex-col justify-center items-center">
211
-<!--              <FPrice :price="orderProduct.cart_info.product.price" ex-class="font-bold text-[12px] !text-[#000]"></FPrice>-->
212
-              <div class="text-gray-500 text-[11px]">共{{ orderProduct.product.product_num }}件</div>
213
-            </div>
214
-
215
-          </div>
216
-          <div class="flex justify-end gap-2" >
217
-
218
-            <nut-button size="small" type="default" @click="handleCancelOrder"><div class="text-black">撤销售后</div></nut-button>
219
-            <nut-button size="small" plain type="primary" @tap.stop="handlePayment">查看详情</nut-button>
220 222
           </div>
223
+          <div class="flex justify-end gap-2" v-if="orderItem.status == 0 || orderItem.status == 1 || orderItem.status == 2">
221 224
 
222
-          <div class="flex justify-end gap-2" v-if="props.status === 0">
223
-            <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery"><div class="text-black">提醒发货</div></nut-button>
224
-            <nut-button size="small" plain type="default" @tap.stop="handlePayment">申请售后</nut-button>
225
+<!--            <nut-button size="small" type="default" @click="handleCancelOrder">撤销售后</nut-button>-->
226
+            <nut-button size="small" plain type="primary" @tap.stop="handleShowDetail(orderItem)">查看详情</nut-button>
225 227
           </div>
226 228
 
227
-          <div class="flex justify-end gap-2" v-if="props.status === 1">
228
-            <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics(orderItem)">查看物流</nut-button>
229
-            <nut-button size="small" plain type="default" @tap.stop="handlePayment">申请售后</nut-button>
230
-            <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder(orderItem)">确认收货</nut-button>
231
-
232
-          </div>
233
-
234
-          <div class="flex justify-end gap-2" v-if="props.status === 2">
235
-            <nut-button size="small" plain type="default" @tap.stop="handleProductItemClick(orderItem)">再次购买</nut-button>
236
-            <nut-button size="small" plain type="primary" @tap.stop="handleComment(orderItem)">去评价</nut-button>
237
-
229
+          <div class="flex justify-end gap-2" v-else>
230
+            <nut-button size="small" plain type="primary" @tap.stop="handleShowDetail(orderItem)">查看详情</nut-button>
238 231
           </div>
239 232
         </div>
240 233
     </div>

+ 163 - 119
src/pages/order/test.json

@@ -2,157 +2,201 @@
2 2
   "status": 200,
3 3
   "message": "success",
4 4
   "data": {
5
-    "express": [],
6
-    "order": {
7
-      "order_id": "4127",
8
-      "group_order_id": "4545",
9
-      "order_sn": "wx1694771068127556531",
10
-      "uid": "10574",
11
-      "real_name": "潇潇",
12
-      "user_phone": "18513112593",
13
-      "user_address": "北京顺义区光明街道 月亮湾2",
14
-      "user_address_ids": "1,35,493,0",
15
-      "area_manage_address_ids": "",
16
-      "cart_id": "11091",
17
-      "total_num": "1",
18
-      "total_price": "10.00",
19
-      "total_postage": "10.00",
20
-      "pay_price": "20.00",
21
-      "pay_postage": "10.00",
22
-      "extension_one": "0.99",
23
-      "extension_two": "0.00",
24
-      "commission_rate": "2.0000",
25
-      "coupon_id": "",
26
-      "coupon_price": "0.00",
27
-      "order_type": "0",
28
-      "paid": "1",
29
-      "pay_time": "2023-09-15 17:44:28",
30
-      "pay_type": "5",
31
-      "create_time": "2023-09-15 17:44:28",
32
-      "status": "1",
33
-      "delivery_type": "1",
34
-      "delivery_name": "中通快递",
35
-      "delivery_id": "78367406471357",
36
-      "mark": "",
37
-      "remark": null,
38
-      "admin_mark": null,
39
-      "verify_code": null,
40
-      "verify_time": null,
41
-      "verify_service_id": "0",
42
-      "mer_id": "465",
43
-      "reconciliation_id": "0",
44
-      "cost": "180.00",
45
-      "is_del": "0",
46
-      "is_system_del": "0",
47
-      "remind": "0",
48
-      "remind_time": null,
49
-      "gzc": "0",
50
-      "trade_no": "",
51
-      "channel_trade_no": "",
52
-      "alipay_no": "",
53
-      "weixin_no": "",
54
-      "table_id": "0",
55
-      "mer_money": "18.00",
56
-      "last_status": null,
57
-      "share_id": "0",
58
-      "pay_mer_id": null,
59
-      "is_split_to_tomorrow": "0",
60
-      "service_money": "182.00",
61
-      "test_order": "0",
62
-      "dacang_id": "0",
63
-      "distribution_mode": "0",
64
-      "da_cang_profit": "0.00",
65
-      "recommended_merchants": "0.00",
66
-      "mer_fanyong": "2.00",
67
-      "is_dacang": "0",
68
-      "cost_price": null,
69
-      "douhuomall": null,
70
-      "douhuomall_status": null,
71
-      "douhuomall_msg": null,
72
-      "address_id": "273",
73
-      "douhuomall_order_no": null,
74
-      "supply_type": null,
75
-      "seckill": "1",
76
-      "orderProduct": [
77
-        {
78
-          "order_product_id": "4395",
79
-          "order_id": "4127",
5
+    "refund_order_id": "657",
6
+    "refund_order_sn": "rwx169381561906885278",
7
+    "order_id": "3923",
8
+    "uid": "10574",
9
+    "mer_id": "321",
10
+    "extension_one": "0.00",
11
+    "extension_two": "0.00",
12
+    "delivery_type": null,
13
+    "delivery_id": null,
14
+    "delivery_mark": null,
15
+    "delivery_pics": null,
16
+    "delivery_phone": null,
17
+    "mer_delivery_user": null,
18
+    "mer_delivery_address": null,
19
+    "phone": null,
20
+    "mark": "",
21
+    "mer_mark": null,
22
+    "pics": [],
23
+    "refund_type": "1",
24
+    "refund_message": "订单信息拍错了",
25
+    "refund_price": "5200.00",
26
+    "refund_postage": "0.00",
27
+    "refund_num": "1",
28
+    "fail_message": null,
29
+    "status": "0",
30
+    "status_time": "2023-09-04 16:20:19",
31
+    "create_time": "2023-09-04 16:20:19",
32
+    "reconciliation_id": "0",
33
+    "is_del": "0",
34
+    "is_system_del": "0",
35
+    "after_sn": null,
36
+    "take_status": "未收到货",
37
+    "dhm_msg": "",
38
+    "refundProduct": [
39
+      {
40
+        "refund_product_id": "670",
41
+        "refund_order_id": "657",
42
+        "order_product_id": "4084",
43
+        "refund_num": "1",
44
+        "create_time": "2023-08-14 08:25:47",
45
+        "product": {
46
+          "order_product_id": "4084",
47
+          "order_id": "3808",
48
+          "uid": "389",
49
+          "cart_id": "9848",
50
+          "product_id": "5624",
51
+          "extension_one": "0.00",
52
+          "extension_two": "0.00",
53
+          "product_sku": "759a13446d30",
54
+          "is_refund": "1",
55
+          "product_num": "1",
56
+          "refund_num": "0",
57
+          "is_reply": "0",
58
+          "product_price": "9.90",
59
+          "cart_info": {
60
+            "product": {
61
+              "product_id": "5624",
62
+              "image": "https:\/\/img.funengscm.com\/a8dbc8f89850e7a802c3335b4c04863f",
63
+              "store_name": "拍一发二小白洗鞋神器清洗剂白鞋清洁去污去黄增白擦",
64
+              "is_show": "1",
65
+              "status": "1",
66
+              "is_del": "0",
67
+              "unit_name": "个",
68
+              "price": "9.90",
69
+              "mer_status": "1",
70
+              "temp_id": "105",
71
+              "give_coupon_ids": [],
72
+              "is_gift_bag": "0",
73
+              "is_used": "1",
74
+              "product_type": "0",
75
+              "old_product_id": "716",
76
+              "temp": {
77
+                "shipping_template_id": "105",
78
+                "name": "包邮",
79
+                "type": "0",
80
+                "appoint": "0",
81
+                "undelivery": "0",
82
+                "mer_id": "0",
83
+                "is_default": "0",
84
+                "sort": "0",
85
+                "create_time": "2020-07-13 17:30:51",
86
+                "regionAddress": null,
87
+                "undelives": null,
88
+                "freeAddress": null
89
+              }
90
+            },
91
+            "productAttr": {
92
+              "gong_mer_profit": "1.44",
93
+              "gong_pension": "0.72",
94
+              "gong_market_price": "9.90",
95
+              "cost_price": "7.01",
96
+              "product_id": "5624",
97
+              "stock": "100",
98
+              "price": "9.90",
99
+              "unique": "759a13446d30",
100
+              "sku": "拍一发二",
101
+              "volume": "0.00",
102
+              "weight": "0.00",
103
+              "ot_price": "36.00",
104
+              "dacang_price": "0.00",
105
+              "cost": "7.01",
106
+              "bc_extension_one": 0,
107
+              "bc_extension_two": 0,
108
+              "seckill": 0
109
+            },
110
+            "product_type": "0"
111
+          },
112
+          "create_time": "2023-08-04 13:24:55",
113
+          "type": "1"
114
+        }
115
+      },
116
+      {
117
+        "refund_product_id": "675",
118
+        "refund_order_id": "657",
119
+        "order_product_id": "4189",
120
+        "refund_num": "1",
121
+        "create_time": "2023-09-04 16:20:19",
122
+        "product": {
123
+          "order_product_id": "4189",
124
+          "order_id": "3923",
80 125
           "uid": "10574",
81
-          "cart_id": "11091",
82
-          "product_id": "6105",
126
+          "cart_id": "10121",
127
+          "product_id": "5484",
83 128
           "extension_one": "0.00",
84 129
           "extension_two": "0.00",
85
-          "product_sku": "7b5cd1815c80",
86
-          "is_refund": "0",
130
+          "product_sku": "cec1027208c0",
131
+          "is_refund": "1",
87 132
           "product_num": "1",
88
-          "refund_num": "1",
133
+          "refund_num": "0",
89 134
           "is_reply": "0",
90
-          "product_price": "10.00",
135
+          "product_price": "5200.00",
91 136
           "cart_info": {
92 137
             "product": {
93
-              "product_id": "6105",
94
-              "image": "https:\/\/cdn.bjtdba.com\/chuxubao\/images\/2023-09-12\/74d95202309120948354624.jpg",
95
-              "store_name": "蛋白肽测试",
138
+              "product_id": "5484",
139
+              "image": "https:\/\/img.funengscm.com\/d4461dcc6bb88ade137410722935c8a8",
140
+              "store_name": "金六福珠宝 MY103 白钻\/1克拉 女士项链【贵重物品 顺丰到付签收】",
96 141
               "is_show": "1",
97 142
               "status": "1",
98 143
               "is_del": "0",
99
-              "unit_name": "的",
100
-              "price": "300.00",
144
+              "unit_name": "",
145
+              "price": "5200.00",
101 146
               "mer_status": "1",
102
-              "temp_id": "259",
147
+              "temp_id": "105",
103 148
               "give_coupon_ids": [],
104 149
               "is_gift_bag": "0",
105 150
               "is_used": "1",
106 151
               "product_type": "0",
107
-              "old_product_id": "0",
152
+              "old_product_id": "657",
108 153
               "temp": {
109
-                "shipping_template_id": "259",
110
-                "name": "测试001",
111
-                "type": "1",
154
+                "shipping_template_id": "105",
155
+                "name": "包邮",
156
+                "type": "0",
112 157
                 "appoint": "0",
113 158
                 "undelivery": "0",
114
-                "mer_id": "465",
159
+                "mer_id": "0",
115 160
                 "is_default": "0",
116 161
                 "sort": "0",
117
-                "create_time": "2023-09-09 16:13:29",
118
-                "regionAddress": {
119
-                  "shipping_template_region_id": "611",
120
-                  "temp_id": "259",
121
-                  "city_id": "0",
122
-                  "first": "1.00",
123
-                  "first_price": "10.00",
124
-                  "continue": "1.00",
125
-                  "continue_price": "5.00"
126
-                },
162
+                "create_time": "2020-07-13 17:30:51",
163
+                "regionAddress": null,
127 164
                 "undelives": null,
128 165
                 "freeAddress": null
129 166
               }
130 167
             },
131 168
             "productAttr": {
132
-              "gong_mer_profit": null,
133
-              "gong_pension": null,
134
-              "gong_market_price": null,
135
-              "cost_price": null,
136
-              "product_id": "6105",
137
-              "stock": "80",
138
-              "price": "10.00",
139
-              "unique": "7b5cd1815c80",
140
-              "sku": "",
141
-              "volume": "1.00",
142
-              "weight": "1.00",
143
-              "ot_price": "5000.00",
144
-              "dacang_price": "10.00",
145
-              "cost": "180.00",
169
+              "gong_mer_profit": "1874.00",
170
+              "gong_pension": "937.00",
171
+              "gong_market_price": "5200.00",
172
+              "cost_price": "1452.00",
173
+              "product_id": "5484",
174
+              "stock": "100",
175
+              "price": "5200.00",
176
+              "unique": "cec1027208c0",
177
+              "sku": "金六福珠宝 MY103 白钻\/1克拉 女士项链",
178
+              "volume": "0.00",
179
+              "weight": "0.00",
180
+              "ot_price": "10999.00",
181
+              "dacang_price": "0.00",
182
+              "cost": "1452.00",
146 183
               "bc_extension_one": 0,
147 184
               "bc_extension_two": 0,
148
-              "seckill": 1
185
+              "seckill": 0
149 186
             },
150 187
             "product_type": "0"
151 188
           },
152
-          "create_time": "2023-09-15 17:44:28",
189
+          "create_time": "2023-09-04 11:57:00",
153 190
           "type": "5"
154 191
         }
155
-      ]
192
+      }
193
+    ],
194
+    "merchant": {
195
+      "mer_id": "321",
196
+      "mer_name": "大仓创客",
197
+      "mer_avatar": "https:\/\/app.bjtdba.com\/uploads\/def\/20220428\/d616961db8aefbe92f72972a1d7db88a.png",
198
+      "business_id": "0",
199
+      "merchant_type": "3"
156 200
     }
157 201
   }
158 202
 }

+ 197 - 0
src/pages/refund/detail.vue

@@ -0,0 +1,197 @@
1
+<script setup lang="ts">
2
+import {CDN_URL} from "~/config/app";
3
+import {getRefundDetail} from "~/apis/order.api";
4
+import FPrice from "~/components/FPrice/FPrice.vue";
5
+
6
+// const bgImg = CDN_URL + '/static/assets/shouhoudingdanbeijing.png'
7
+const getStatusText = computed(() => {
8
+  // 商家已处理
9
+  // 退款成功, 系统已退款
10
+  const status = state.detail.status
11
+  // const status = -1
12
+  if (status == 0) {
13
+    return ['提交退款申请', '提交退款申请成功,等待处理']
14
+  }
15
+  if (status == -1) {
16
+    return ['退款失败', '请联系商家']
17
+  }
18
+  // 待退货
19
+  if (status == 1) {
20
+    return ['商家处理中', '72小时内商家未处理将自动退款']
21
+  }
22
+  // 待收货
23
+  if (status == 2) {
24
+    return ['商家处理中', '72小时内商家未处理将自动退款']
25
+  }
26
+  // 已退款
27
+  if (status == 3) {
28
+    return ['退款成功', '系统已退款']
29
+
30
+  }
31
+})
32
+const state = reactive({
33
+  currentStep: 1,
34
+  currentStepTitle: '退款申请',
35
+  detail: null
36
+})
37
+// const detail = ref({})
38
+onLoad((options) => {
39
+  // getRefundDetail(options.id).then(res => {
40
+  getRefundDetail(657).then(res => {
41
+    console.log(res)
42
+    state.detail = res
43
+    // res.status = -1
44
+    if (res.status == 0) {
45
+      state.currentStep = 1
46
+    }
47
+    if (res.status == 1 || res.status == 2) {
48
+      state.currentStep = 2
49
+    }
50
+    if (res.status == 3) {
51
+      state.currentStep = 3
52
+    }
53
+    if (res.status == -1) {
54
+      state.currentStep = 2
55
+    }
56
+  })
57
+})
58
+
59
+
60
+</script>
61
+<template>
62
+
63
+  <div class="" v-if="state.detail">
64
+    <div class=" ">
65
+      <div class="top-bg relative">
66
+        <div class="text-white p-3">
67
+          <div class="text-md">{{ getStatusText[0]}}</div>
68
+          <div class="text-[12px] text-gray-50">{{ getStatusText[1]}}</div>
69
+        </div>
70
+
71
+        <div class="p-3">
72
+          <div class="bg-white rounded-lg h-18 flex justify-center items-center ">
73
+            <div class="w-full">
74
+              <nut-steps :current="state.currentStep" progress-dot>
75
+                <nut-step title="退款申请"></nut-step>
76
+                <nut-step title="商家处理"></nut-step>
77
+                <nut-step :title="state.detail.status == -1 ? '退款失败' : '退款成功'"></nut-step>
78
+              </nut-steps>
79
+            </div>
80
+
81
+          </div>
82
+        </div>
83
+      </div>
84
+
85
+      <!-- 退款商品详情 -->
86
+      <div class="p-3 relative h-full">
87
+        <div class="bg-white rounded-lg p-3 flex justify-center items-center ">
88
+          <div class="w-full">
89
+            <div
90
+                @click.stop="handleHeaderClick"
91
+                class="flex items-center f-hairline-bottom pb-3 px-3">
92
+              <div class="flex items-center font-bold gap-2 text-sm w-full">
93
+                <div class="flex-1 flex items-center gap-2 ">
94
+                  <image :src="state.detail.merchant.mer_avatar" mode="widthFix" class="w-4 h-4"></image>
95
+                  <div class="line-clamp-1">
96
+                    {{ state.detail.merchant.mer_name }}
97
+                  </div>
98
+                </div>
99
+
100
+                <div class="f-text-color-2 i-tabler-chevron-right"></div>
101
+
102
+              </div>
103
+            </div>
104
+
105
+            <div @tap.stop="handleShowOrderDetail(orderItem)">
106
+              <div v-for="(orderProduct, orderProductIndex) in state.detail.refundProduct" :key="orderProductIndex">
107
+                <div class="flex py-2 gap-3 f-hairline-bottom pb-3">
108
+                  <div class="flex-1 flex gap-2">
109
+                    <image :src="orderProduct.product.cart_info.product.image" class="w-20 h-20" mode="widthFix"></image>
110
+                    <div class="flex flex-col flex-1">
111
+                      <div class="line-clamp-2 text-[12px]">
112
+                        {{ orderProduct.product.cart_info.product.store_name }}
113
+                      </div>
114
+                      <div class="text-gray-500 text-[10px]">
115
+                        {{ orderProduct.product.cart_info.productAttr.sku }}
116
+                      </div>
117
+                    </div>
118
+                    <div class="justify-end flex">
119
+                      <div class="flex flex-col ">
120
+                        <div class="text-[12px] font-bold">
121
+                          <FPrice :price="orderProduct.product.product_price" ex-class="font-bold text-black"/>
122
+                        </div>
123
+                        <div class="text-gray-500 text-[11px]">共{{ orderProduct.product.product_num }}件</div>
124
+                      </div>
125
+                    </div>
126
+                  </div>
127
+                </div>
128
+              </div>
129
+            </div>
130
+
131
+            <div class="pt-3 flex flex-col justify-end text-[14px]">
132
+
133
+              <div class="f-hairline-bottom py-3 flex flex-col gap-3">
134
+                <div class="flex justify-between">
135
+                  <div>退款总额</div>
136
+                  <div>
137
+                    <FPrice :price="state.detail.refund_price" :ex-class="['text-gray-400']"></FPrice>
138
+                  </div>
139
+                </div>
140
+                <div class="flex justify-between">
141
+                  <div>申请件数</div>
142
+                  <div class="text-gray-400">{{ state.detail.refund_num }}</div>
143
+                </div>
144
+                <div class="flex justify-between">
145
+                  <div>收货状态</div>
146
+                  <div class="text-gray-400">{{ state.detail.take_status }}</div>
147
+                </div>
148
+              </div>
149
+
150
+              <div class="py-3 flex flex-col gap-3">
151
+                <div class="flex justify-between">
152
+                  <div>订单编号</div>
153
+                  <div class="text-gray-400">{{ state.detail.refund_order_sn }}</div>
154
+                </div>
155
+                <div class="flex justify-between">
156
+                  <div>申请时间</div>
157
+                  <div class="text-gray-400">{{ state.detail.create_time }}</div>
158
+                </div>
159
+                <div class="flex justify-between">
160
+                  <div>备注说明</div>
161
+                  <div class="text-gray-400">{{ state.detail.take_status }}</div>
162
+                </div>
163
+
164
+              </div>
165
+
166
+            </div>
167
+
168
+          </div>
169
+
170
+
171
+        </div>
172
+
173
+      </div>
174
+
175
+    </div>
176
+  </div>
177
+</template>
178
+
179
+<route lang="yaml" type="home">
180
+style:
181
+  navigationBarTitleText: 售后订单
182
+</route>
183
+
184
+<style lang="scss">
185
+.top-bg {
186
+  width: 750 rpx;
187
+  height: 212 rpx;
188
+  background-image: url('https://cdn.bjtdba.com/chuxubao/static/assets/shouhoudingdanbeijing.png');
189
+  background-size: 100% 100%;
190
+}
191
+
192
+page {
193
+  --nut-steps-base-icon-font-size: 12px;
194
+  --nut-steps-base-title-font-size: 12px;
195
+  background: #f8f8f8;
196
+}
197
+</style>

+ 107 - 6
src/pages/refund/index.vue

@@ -5,35 +5,136 @@ import RefundOrderItem from "~/pages/order/components/RefundOrderItem.vue";
5 5
 
6 6
 const state = reactive({
7 7
   tabvalue: 0,
8
-  list: []
8
+  list: [],
9
+  type: 0,
10
+
11
+
12
+  currentPage: 1,
13
+  pageSize: 10,
14
+  totalPage: 1,
15
+
16
+  status: 'noMore',
9 17
 })
10 18
 
11 19
 onLoad(() => {
12
-  refundList().then(res => {
13
-    console.log(res)
14
-    state.list = res.list
20
+  loadList('reload')
21
+})
22
+
23
+
24
+function loadList(action: 'page' | 'reload',  callback?: (items) => void) {
25
+  const params = {
26
+    page: state.currentPage,
27
+    limit: state.pageSize,
28
+    type: state.type
29
+  }
30
+
31
+  refundList(params).then(res => {
32
+    if (action === 'page') {
33
+      state.list = state.list.concat(res.list)
34
+    }
35
+    if (action == 'reload') {
36
+      state.list = res.list
37
+    }
38
+    state.status = 'more'
39
+
40
+    if (callback) {
41
+      callback(res.list)
42
+    }
15 43
   })
44
+}
45
+
46
+function handleScrollToLower() {
47
+  state.status = 'loading';
48
+  state.currentPage += 1;
49
+  setTimeout(() => {
50
+    loadList('page', (items) => {
51
+      if (items.length === 0) {
52
+        state.status = 'noMore'
53
+      }
54
+    })
55
+  }, 300)
56
+}
57
+
58
+onReachBottom(() => {
59
+  handleScrollToLower()
60
+
16 61
 })
62
+// watch(() => state.t)
63
+function handleTabChange(	{title,paneKey,disabled}) {
64
+
65
+  console.log(paneKey)
66
+  if (paneKey == 0) {
67
+    state.type = 0
68
+    state.currentPage = 1
69
+    loadList('reload')
70
+  }
71
+  if (paneKey == 1) {
72
+    state.type = 1
73
+    state.currentPage = 1
74
+    loadList('reload')
75
+  }
76
+  if (paneKey == 2) {
77
+    state.type = 2
78
+    state.currentPage = 1
79
+    loadList('reload')
80
+  }
81
+}
17 82
 </script>
18 83
 <template>
19 84
   <div>
20
-    <nut-tabs v-model="state.tabvalue">
85
+    <nut-tabs v-model="state.tabvalue" @change="handleTabChange">
21 86
       <nut-tab-pane title="全部">
22 87
         <div v-if="state.list.length > 0" class="flex flex-col gap-3">
23 88
           <div v-for="(orderItem, index) in state.list" :key="index">
24 89
             <RefundOrderItem :order-item="orderItem"/>
25 90
           </div>
91
+          <div class=" flex justify-center items-center text-[12px] text-gray-500" >
92
+            <div v-if="state.status === 'loading'">
93
+              加载中...
94
+            </div>
95
+            <div v-if="state.status === 'noMore'">
96
+              没有更多了~
97
+            </div>
98
+          </div>
26 99
         </div>
27 100
         <CXBEmpty v-else/>
28 101
       </nut-tab-pane>
29 102
       <nut-tab-pane title="退款中">
103
+        <div v-if="state.list.length > 0" class="flex flex-col gap-3">
104
+          <div v-for="(orderItem, index) in state.list" :key="index">
105
+            <RefundOrderItem :order-item="orderItem"/>
106
+          </div>
107
+          <div class=" flex justify-center items-center text-[12px] text-gray-500" >
108
+            <div v-if="state.status === 'loading'">
109
+              加载中...
110
+            </div>
111
+            <div v-if="state.status === 'noMore'">
112
+              没有更多了~
113
+            </div>
114
+          </div>
115
+        </div>
116
+        <CXBEmpty v-else/>
30 117
       </nut-tab-pane>
31 118
       <nut-tab-pane title="退款完成">
119
+        <div v-if="state.list.length > 0" class="flex flex-col gap-3">
120
+          <div v-for="(orderItem, index) in state.list" :key="index">
121
+            <RefundOrderItem :order-item="orderItem"/>
122
+          </div>
123
+          <div class=" flex justify-center items-center text-[12px] text-gray-500" >
124
+            <div v-if="state.status === 'loading'">
125
+              加载中...
126
+            </div>
127
+            <div v-if="state.status === 'noMore'">
128
+              没有更多了~
129
+            </div>
130
+          </div>
131
+        </div>
132
+        <CXBEmpty v-else/>
32 133
       </nut-tab-pane>
33 134
     </nut-tabs>
34 135
   </div>
35 136
 </template>
36
-<route lang="yaml"   type="home">
137
+<route lang="yaml">
37 138
 style:
38 139
   navigationBarTitleText: 退款/售后
39 140
 </route>

+ 1 - 1
src/pages/vip/index.vue

@@ -136,7 +136,7 @@ onLoad(() => {
136 136
 })
137 137
 
138 138
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
139
-  console.log(state.keyword)
139
+  // console.log(state.keyword)
140 140
   const params = {
141 141
     page: state.currentPage,
142 142
     limit: state.pageSize