From 1dcd8399c853ef724133d4d1ad0d700db0f293e7 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 12 二月 2026 18:19:50 +0800
Subject: [PATCH] 经销商管理pay

---
 mini-program/pagesA/pages/write-off-a/write-off-a.vue |  154 +++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 136 insertions(+), 18 deletions(-)

diff --git a/mini-program/pagesA/pages/write-off-a/write-off-a.vue b/mini-program/pagesA/pages/write-off-a/write-off-a.vue
index 6612df0..a5fa76f 100644
--- a/mini-program/pagesA/pages/write-off-a/write-off-a.vue
+++ b/mini-program/pagesA/pages/write-off-a/write-off-a.vue
@@ -1,44 +1,144 @@
 <template>
 	<view class="box">
-		<view class="title">鏍搁攢璁㈠崟</view>
+		<view class="title">鏍搁攢璁㈠崟
+		<text v-if="info.orderStatus ==0" class="status status-b">寰呮敮浠�</text>
+		<text  v-if="info.orderStatus ==1"class="status  status-a" >{{info.receiveType==1?'寰呰嚜鎻�':'寰呭彂璐�'}}</text>
+		<text  v-if="info.orderStatus ==2" class="status  status-b">寰呮敹璐�</text>
+		<text  v-if="info.orderStatus ==3" class="status  status-b" >浜ゆ槗瀹屾垚</text>
+		<text  v-if="info.orderStatus ==4" class="status  status-b">宸插彇娑�</text>
+		<text  v-if="info.orderStatus ==6"class="status  status-b" >宸查��娆�</text>
+		</view>
 		<view class="item">
 			<view class="item-user">
 				<view class="item-user-image">
-					<image src="/static/logo.png" mode="widthFix"></image>
+					<image :src="info.member && info.member.imgFullUrl? info.member.imgFullUrl:'/static/icon/default.png'" mode="widthFix"></image>
 				</view>
 				<view class="item-user-info">
-					<text>寮犳捣娑�</text>
-					<text>18155665556</text>
+					<text>{{info.linkName || ''}}</text>
+					<text>{{info.linkPhone || ''}}</text>
 				</view>
 			</view>
-			<view class="item-info">璁㈠崟澶囨敞锛�11鏈�22鏃ユ潵鎷�</view>
+			<view class="item-info">璁㈠崟澶囨敞锛歿{info.memberInfo || ''}}</view>
 		</view>
 		<view class="item">
 			<view class="item-title">鍟嗗搧鍒楄〃</view>
-			<view class="row">
-				<view class="row-image">
-					<image src="/static/logo.png" mode="widthFix"></image>
+			<template v-if="info.goodsorderDetailList && info.goodsorderDetailList.length">
+				<view class="row" v-for="(item, index) in info.goodsorderDetailList" :key="index"  >
+					<view class="row-image">
+						<image :src="item.imgurl?item.imgurl:'/static/icon/default2.png'"  mode="widthFix"></image>
+					</view>
+					<view class="row-info">
+						{{info.name || ''}}
+					</view>
+					<view class="row-price">
+						<text楼{{(info.price || 0).toFixed(2)}}</text>
+						<text>x{{info.goodsNum || 1}}</text>
+					</view>
 				</view>
-				<view class="row-info">
-					涓仈鑹剧瀹介娇 閫傜敤闆锋矁/涓仈/涔呬繚鐢�
-				</view>
-				<view class="row-price">
-					<text>楼499.00</text>
-					<text>x1</text>
-				</view>
-			</view>
+			</template>
 		</view>
 		<view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 108rpx);"></view>
-		<view class="button">纭鏍搁攢</view>
+		<view class="button" @click="confirm" v-if="info.orderStatus==1 && info.receiveType ==1">纭鏍搁攢</view>
+		
+		<u-popup :show="show" round="15" :safeAreaInsetBottom="false" mode="center">
+			<view class="tc">
+				<view class="tc-contemt">
+					<view class="tc-contemt-title">鎿嶄綔鎻愰啋</view>
+					<view class="tc-contemt-nr">
+						鎮ㄧ‘璁ゆ牳閿�璇ヨ鍗曞悧锛�
+					</view>
+				</view>
+				<view class="tc-btn">
+					<view class="tc-btn-item" @click="show = false; ">鎴戝啀鎯虫兂</view>
+					<view class="tc-btn-item" style="color: #004096;" @click="confirmDo">纭鏍搁攢</view>
+				</view>
+			</view>
+		</u-popup>
+		<u-popup :show="show1" round="15" :safeAreaInsetBottom="false" mode="center">
+			<view class="tc">
+				<view class="tc-contemt">
+					<view class="tc-contemt-title">鎿嶄綔缁撴灉</view>
+					<view class="tc-contemt-nr">
+						鏍搁攢鎴愬姛锛屾槸鍚︾户缁牳閿�鍏朵粬璁㈠崟锛�
+					</view>
+				</view>
+				<view class="tc-btn">
+					<view class="tc-btn-item" @click="jumpBack ">杩斿洖</view>
+					<view class="tc-btn-item" style="color: #004096;" @click="jumpWriteoff()">缁х画鏍搁攢</view>
+				</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
 <script>
+	import QRCode from 'qrcode';
+	import { mapState } from 'vuex'
 	export default {
+		computed: {
+			...mapState(['navHeight', 'statusbarHeight','shopInfo', 'shopToken'])
+		},
 		data() {
 			return {
-				
+				show:false,
+				show1:false,
+				shop:{},
+				id:null,
+				info:{}
 			};
+		},
+		onShow() {
+			this.show1 =false
+			this.show =false
+			this.info={}
+			this.shop  ={}
+			this.checkShopLogin()
+			this.shop = this.shopInfo || {} 
+			this.getShopDetail()
+		},
+		onLoad(options) {
+			this.id = options.id
+		},
+		methods:{
+			async confirmDo(){
+				this.show = !this.show
+				var that =this
+				var that =this
+				let res = await that.$u.api.writeOffOrder({ orderId: this.info.orderId  });
+				if (res.code === 200 ) { 
+					this.info.orderStatus = 3
+					this.show = false
+					this.show1 = true
+					uni.$emit('updateOrder',{info:this.info,delete:0})
+				}else{
+				}  
+			},
+			jumpWriteoff(){
+				uni.navigateTo({
+					url: '/pagesA/pages/write-off/write-off'
+				})
+			},
+			jumpBack(){
+				uni.navigateBack({delta:1})
+			},
+			confirm(){
+				this.show = !this.show
+			},
+			async  getShopDetail(){
+				var that =this 
+				let res = await that.$u.api.shopOrderDetail({orderId:this.id,tokenType:1  })
+				if (res.code === 200) { 
+					this.info = res.data 
+				} 
+			},
+			checkShopLogin(){
+				var that =this
+				if( this.shopInfo ==null || this.shopInfo.id==null ||  this.shopToken==null || this.shopToken==''){
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				} 
+			},
 		}
 	}
 </script>
@@ -71,6 +171,24 @@
 			font-weight: 600;
 			font-size: 32rpx;
 			color: #111111;
+			.status{
+				padding: 0 6rpx;
+				height: 40rpx;
+				line-height: 40rpx;
+				border-radius: 8rpx;
+				font-weight: 400;
+				font-size: 22rpx;
+				color: #FFFFFF;
+				margin-right: 16rpx;
+			}
+			.status-a {
+				background: #00B775; 
+				border: 1rpx solid #00B775;
+			}
+			.status-b {
+				background: #666666;
+				border: 1rpx solid #004096;
+			}
 		}
 		.item {
 			width: 100%;

--
Gitblit v1.9.3