소스 검색

Merge branch 'clientDemo' of http://gogs.chelvc.com/Tim_Walker/chelvc-custom into clientDemo

yizhiyang 10 달 전
부모
커밋
06acd7e2d9

+ 14 - 0
src/api/merchant/merchantAuth.js

@@ -80,3 +80,17 @@ export function getRootCategoriesData(data) {
     },
   });
 }
+/**
+ * @description 获取商家钱包
+ * @param {*} merchantId 商家id
+ * @returns
+ */
+export function getMerchantPures(merchantId) {
+  return request({
+    url: `/maintain/asset/merchant/${merchantId}`,
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json',
+    },
+  });
+}

+ 4 - 4
src/pageMerchant/components/orderDetail.vue

@@ -60,24 +60,24 @@
 					<view class="top-right"></view>
 				</view>
 				<view class="item-top">
-					<view class="top-left gray-color">备注 : {{ "--" }}</view>
+					<view class="top-left gray-color">备注 : {{ list.note || '--' }}</view>
 					<view class="top-right"></view>
 				</view>
 			</view>
 			<!-- 核销信息 -->
-			<view class="order-item" v-if="list.status == 1">
+			<view class="order-item" v-if="list.status == 4">
 				<view style="font-size: 48rpx;margin-bottom: 10rpx;">核销信息</view>
 				<view class="item-top">
 					<view class="top-left gray-color">核销人员 :--</view>
 					<!-- <view class="top-right">{{ type_name }}</view> -->
 				</view>
 				<view class="item-top">
-					<view class="top-left gray-color">核销编号 : --</view>
+					<view class="top-left gray-color">核销编号 : {{list.orderSn }}</view>
 					<view class="top-right"></view>
 				</view>
 				<view class="item-top">
 					<view class="top-left gray-color">核销时间:
-						{{ formatTime1(list.receive_time) }}
+						{{ formatTime1(list.receive_time)  || '--' }}
 					</view>
 					<view v-if="list.status == 3" class="top-left gray-color">核销门店:
 						{{ '--' }}

+ 4 - 4
src/pageMerchant/components/orderList.vue

@@ -116,28 +116,28 @@
 				switch (status) {
 					case 1:
 						return 'blue';
-					case 2:
+					case 4:
 						return 'red';
 					case 3:
 						return 'orange';
 					// case 4:
 					// 	return 'green';
 					default:
-						return 'black';
+						return 'green';
 				}
 			},
 			getStatusText(status) {
 				switch (status) {
 					case 1:
 						return '待核销';
-					case 2:
+					case 4:
 						return '已核销';
 					case 3:
 						return '已退款';
 					// case 4:
 					// 	return '已过期';
 					default:
-						return '';
+						return '无效订单';
 				}
 			},
 			// 跳转到订单详情

+ 3 - 3
src/pageMerchant/components/toBeVerified.vue

@@ -2,7 +2,7 @@
 	<view class="container">
 		<view class="order-item" style="padding: 200rpx 0; display: grid; place-items: center;">
 			<!-- 订单 -->
-			<view style="font-size: 48rpx; margin-bottom: 20rpx;">{{'1796545175311040513' }}</view>
+			<view style="font-size: 48rpx; margin-bottom: 20rpx;">{{ list.orderSn }}</view>
 			<view :style="{color: getStatusColor(list.status)}"  style="font-size: 56rpx;">
 				{{ getStatusText(list.status) }}
 			</view>
@@ -59,7 +59,7 @@
 				<view class="top-right"></view>
 			</view>
 			<view class="item-top">
-				<view class="top-left gray-color">备注 : {{ "--" }}</view>
+				<view class="top-left gray-color">备注 : {{ list.note  || '--'  }}</view>
 				<view class="top-right"></view>
 			</view>
 		</view>
@@ -89,7 +89,7 @@
 		mounted() {},
 		onLoad(options) {
 			console.log(options, "options");
-			this.list = options.list[4]
+			this.list = options.list[0]
 			
 		},
 		onShow() {

+ 1 - 1
src/pageMerchant/mineModule/certification/qualificationInformation.vue

@@ -143,7 +143,7 @@
 				},
 				merchantInfo: {},
 				storeInfo: {},
-			};
+			};x
 		},
 		onReady() {
 			//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。

+ 18 - 2
src/pageMerchant/mineModule/myPurse/purse.vue

@@ -6,7 +6,7 @@
 					<text class="username">{{ userName }}的钱包</text>
 					<text>
 						<text>我的资产(</text>
-						<text v-if="isAssetVisible" class="asset">{{ asset }}</text>
+						<text v-if="isAssetVisible" class="asset">{{ purse.asset }}</text>
 						<text v-else class="asset">**</text>
 						<text>元)</text>
 						<text @click="toggleAssetVisibility" class="eye-icon">👁️</text>
@@ -113,6 +113,12 @@
 </template>
 
 <script>
+	
+	import {
+		getMerchantPures
+	} from '@/api/merchant/merchantAuth';
+	
+	
 	export default {
 		data() {
 			return {
@@ -122,9 +128,14 @@
 				totalIncome: '5000',
 				todayIncome: '100',
 				yesterdayIncome: '200',
-				withdrawable: '3000'
+				withdrawable: '3000',
+				purse:{}
 			};
 		},
+		onShow(){
+			console.log(this.$store.state.data.merchantInfo,"this.$store.state.data")
+			this.request()
+		},
 		methods: {
 			toggleAssetVisibility() {
 				this.isAssetVisible = !this.isAssetVisible;
@@ -133,6 +144,11 @@
 				uni.navigateTo({
 					url:'/pageMerchant/mineModule/myPurse/detail'
 				})
+			},
+			async request(){
+			const res =	await getMerchantPures(this.$store.state.data.merchantInfo.merchant.id)
+			this.purse = resd.data
+			console.log(res)
 			}
 		}
 	}

+ 1 - 1
src/pageMerchant/storeModule/appointList.vue

@@ -80,7 +80,7 @@
 					<u-line margin="20rpx 0" dashed="true"></u-line>
 
 					<view class="item-top">
-						<view class="top-left gray-color">订单编号 : {{ item.id }}</view>
+						<view class="top-left gray-color">订单编号 : {{ item.orderId }}</view>
 						<view class="top-right">{{ type_name }}</view>
 					</view>
 					<view class="item-top">

+ 1 - 1
src/pageMerchant/storeModule/components/queryWriteOff.vue

@@ -46,7 +46,7 @@
 				let res = await getOrderListApi({
 					...result
 				});
-				if (res.code === 'OK' && res.data.records.lentgh > 0) {
+				if (res.code === 'OK' && res.data.records.length > 0) {
 					uni.navigateTo({
 						url: `/pageMerchant/components/toBeVerified?list=${JSON.stringify(res.data.records)}`
 					})