瀏覽代碼

bug 修改

17755135699 10 月之前
父節點
當前提交
7396e476dc
共有 5 個文件被更改,包括 96 次插入55 次删除
  1. 1 0
      http/index.js
  2. 66 38
      pagesHouse/Verification/check.vue
  3. 9 3
      pagesHouse/home/bill.vue
  4. 12 7
      pagesHouse/home/orderBillDetail.vue
  5. 8 7
      pagesHouse/home/tj.vue

+ 1 - 0
http/index.js

@@ -116,6 +116,7 @@ const tmList = [{
 // 不做脱敏处理的api集合(页面上需要编辑单独处理的)
 const apiList = [
 	'/api/commonPerson/list',
+	'/scenic/api/order/scanCode'
 ]
 //解密脱敏处理
 function dealJmTmData(data, isTm) {

+ 66 - 38
pagesHouse/Verification/check.vue

@@ -29,9 +29,9 @@
 			<view class="item" v-for="(i,index) in data" :key="index">
 				<text class="type" :class="i.remark=='book'?'t1':'t2'">{{i.remark=='book'?'预订单':'现场单'}}</text>
 				<view class="personInfo">
-					<view class="name">{{i.touristName}}</view>
+					<view class="name">{{i.touristName|handle(1)}}</view>
 					<view class="code">
-						身份证 {{i.touristCode}}
+						身份证 {{i.touristCode|handle(3)}}
 					</view>
 				</view>
 				<u-icon name="minus-circle" size="36" color="#FEA400" @tap="jian(item)"
@@ -42,10 +42,11 @@
 			<view class="tit">选择渔船</view>
 			<view class="typeItem">
 				<view class="txt" v-for="(t,i) in types" :key="i" @click="typeIndex=i" :class="typeIndex==i?'on':''">
-				{{t.boatNo}}
-				<image v-if="typeIndex==i" src="https://i.ringzle.com/file/20240320/b458b03f8f654a51a921656b8aa955de.png"></image>
+					{{t.boatNo}}
+					<image v-if="typeIndex==i"
+						src="https://i.ringzle.com/file/20240320/b458b03f8f654a51a921656b8aa955de.png"></image>
 				</view>
-			
+
 			</view>
 		</view>
 		<view class="btn">
@@ -55,13 +56,17 @@
 </template>
 
 <script>
+	import {
+		encrypt,
+		decrypt,
+		tuomin
+	} from '../../utils/aes.js'
 	var that;
 	export default {
 		data() {
 			return {
-				typeIndex:null,
-				types: [
-				],
+				typeIndex: null,
+				types: [],
 				date: new Date().Format('yyyy-MM-dd'),
 				show: false,
 				data: [],
@@ -79,16 +84,22 @@
 			this.boatNo = opt.boatNo || '';
 			this.getOrderInfo();
 			this.getTypes();
+			console.log(tuomin())
 			//获取上次核销缓存
 
 		},
+		filters: {
+			handle(val, type) {
+				return tuomin(decrypt(val), type)
+			}
+		},
 		methods: {
-			getTypes(){
-				this.$api.get('/scenic/api/boat/page',{
-					page:-1
-				}).then(res=>{
-					if(res.data.code==0){
-						this.types=res.data.data.list;
+			getTypes() {
+				this.$api.get('/scenic/api/boat/page', {
+					page: -1
+				}).then(res => {
+					if (res.data.code == 0) {
+						this.types = res.data.data.list;
 					}
 				})
 			},
@@ -98,20 +109,17 @@
 				//decodeURIComponent
 			},
 			getOrderInfo() {
-				this.$api.post('/scenic/order/queryStartOrderInfo', {
+				this.$api.post('/scenic/api/order/queryStartOrderInfo', {
 					merchantId: this.merchantId,
 					boatNo: this.boatNo
 				}).then(res => {
 					console.log(res.data)
 					if (res.data.code == 0) {
-						console.log(res)
 						this.orderInfo = res.data.data;
 						this.keyName = this.orderInfo.playDate + this.orderInfo.playTime + this.boatNo;
-						console.log(uni.getStorageSync(this.keyName))
-						if(uni.getStorageSync(this.keyName)){
+						if (uni.getStorageSync(this.keyName)) {
 							this.data = JSON.parse(uni.getStorageSync(this.keyName)) || [];
 						}
-						console.log(this.data)
 					}
 				})
 			},
@@ -141,18 +149,30 @@
 				sendData.writeOffCode = result;
 				console.log(sendData)
 
-				this.$api.post('/scenic/order/scanCode', sendData).then(res => {
+				this.$api.post('/scenic/api/order/scanCode', sendData).then(res => {
 					console.log(res.data)
 					if (res.data.code == 0) {
-						console.log(this.data.findIndex(item => {
-							item.touristCode == res.data.data.touristCode
-						}))
 						if (this.data.findIndex((item) => {
 								return item.touristCode == res.data.data.touristCode
 							}) > -1) {
 							this.$showToast('该核验码已扫')
 						} else {
-							this.data.push(res.data.data)
+							// "id": 0,
+							// 		"orderCode": "",
+							// 		"remark": "",
+							// 		"touristCode": "",
+							// 		"touristName": ""
+
+							res.data.data.touristCode = encrypt(res.data.data.touristCode);
+							res.data.data.touristName = encrypt(res.data.data.touristName)
+							let json = {
+								id: res.data.data.id,
+								orderCode:res.data.data.orderCode,
+								remark:res.data.data.remark,
+								touristCode:res.data.data.touristCode,
+								touristName: res.data.data.touristName
+							}
+							this.data.push(json)
 						}
 					} else {
 						this.$showToast(res.data.msg)
@@ -168,14 +188,17 @@
 				if (this.data.length == 0) {
 					return this.$showToast('请选择核销人')
 				}
-				if (this.typeIndex==null) {
+				if (this.typeIndex == null) {
 					return this.$showToast('请选择渔船')
 				}
-				let boatCode=this.types[this.typeIndex];
-				this.$api.post('/scenic/order/sailWriteOff', {
+				let boatCode = this.types[this.typeIndex].boatNo;
+				this.$api.post('/scenic/api/order/sailWriteOff', {
+					playDate:this.orderInfo.playDate,
+					playTime:this.orderInfo.playTime,
+					playLength:this.orderInfo.playLength,
 					orderType: this.orderInfo.orderType,
 					touristList: this.data,
-					boatCode:boatCode
+					boatCode: boatCode
 				}).then(res => {
 					if (res.data.code == 0) {
 						uni.redirectTo({
@@ -232,7 +255,7 @@
 			display: flex;
 			gap: 36rpx;
 			justify-content: space-between;
-			
+
 
 			.n {
 				margin-bottom: 20rpx;
@@ -323,13 +346,15 @@
 			color: #111;
 			padding: 36rpx 0 17rpx;
 		}
-		.typeItem{
+
+		.typeItem {
 			display: flex;
 			justify-content: space-between;
 			flex-wrap: wrap;
-			gap:20rpx 0;
+			gap: 20rpx 0;
 			padding-bottom: 50rpx;
-			.txt{
+
+			.txt {
 				display: inline-block;
 				width: 316rpx;
 				height: 80rpx;
@@ -338,13 +363,15 @@
 				text-align: center;
 				line-height: 80rpx;
 				border: 2rpx solid #EFEFEF;
-				color:#333;
+				color: #333;
 				position: relative;
-				&.on{
-					color:#007A69 ;
-					background: rgba(0,122,105,0.06);
+
+				&.on {
+					color: #007A69;
+					background: rgba(0, 122, 105, 0.06);
 					border: 2rpx solid #007A69;
-					image{
+
+					image {
 						position: absolute;
 						bottom: 0;
 						right: 0;
@@ -353,9 +380,10 @@
 						z-index: 11;
 					}
 				}
-				
+
 			}
 		}
+
 		.item {
 			display: flex;
 			justify-content: space-between;

+ 9 - 3
pagesHouse/home/bill.vue

@@ -14,7 +14,7 @@
 			<view class="money">
 				<view>
 					<text>收入金额</text>
-					<text class="in">+¥{{merchantType==10?info.paymentAmount||0:info.orderAmount||0}}</text>
+					<text class="in">¥{{merchantType==10?info.paymentAmount||0:info.orderAmount||0}}</text>
 					<text>{{merchantType==10?info.paymentCount:info.orders||0}}笔</text>
 				</view>
 				<view>
@@ -30,7 +30,9 @@
 							{{item.playTime}}出发/{{item.orderType==2?'包船':'拼船'}}/{{item.boatNo||'拼团中'}}</text>
 						<text>{{item.payTime}}</text>
 					</view>
-					<view class="right">¥{{item.realPrice}}</text>
+					<view class="right" v-if="item.realPrice<0" style="color: #111">¥{{item.realPrice}}</text>
+					</view>
+					<view class="right" v-else>¥+{{item.realPrice}}</text>
 					</view>
 				</view>
 			</template>
@@ -41,7 +43,10 @@
 						<text>{{item.orderTime}}</text>
 					</view>
 					<view class="right">{{item.realityPay}}</text>
-
+					<view class="right" v-if="item.realityPay<0" style="color: #111">¥{{item.realityPay}}</text>
+					</view>
+					<view class="right" v-else>¥+{{item.realityPay}}</text>
+					</view>
 					</view>
 				</view>
 			</template>
@@ -145,6 +150,7 @@
 				})
 			},
 			detail(item) {
+				item.real
 				let info = encodeURIComponent(JSON.stringify(item));
 				uni.navigateTo({
 					url: "/pagesHouse/home/orderBillDetail?info=" + info

+ 12 - 7
pagesHouse/home/orderBillDetail.vue

@@ -3,9 +3,10 @@
 		<c-nav-bar title="账单详情"></c-nav-bar>
 		<view class="box">
 			<image src="https://i.ringzle.com/file/20240224/d2b9acd9522747ac89239dcde0894c93.png"></image>
-			<text  class="tit" v-if="merchantType==10">{{infoMation.playDate}} {{infoMation.playTime}}出发/{{infoMation.orderType==2?'包船':'拼船'}}/{{infoMation.boatNo}}</text>
+			<text class="tit" v-if="merchantType==10">{{infoMation.playDate}}
+				{{infoMation.playTime}}出发/{{infoMation.orderType==2?'包船':'拼船'}}/{{infoMation.boatNo}}</text>
 			<text class="tit" v-else>{{infoMation.productName}}</text>
-			<text class="money">+<text>{{merchantType==10?infoMation.realPrice:infoMation.realityPay}}</text></text>
+			<text class="money"><text>{{merchantType==10?infoMation.realPrice:infoMation.realityPay}}</text></text>
 		</view>
 		<view class="info">
 			<view class="li">
@@ -40,10 +41,10 @@
 			return {
 				infoMation: {
 					thingName: '',
-					price:0,
-					orderCode:'',
-					orderTime:'',
-					state:''
+					price: 0,
+					orderCode: '',
+					orderTime: '',
+					state: ''
 				},
 				status: {
 					'0': '待支付',
@@ -59,9 +60,13 @@
 			}
 		},
 		onLoad(option) {
-			console.log(option)
 			const info = JSON.parse(decodeURIComponent(option.info ? option
 				.info : infoMation));
+			if (this.merchantType == 4) {
+				info.realityPay = info.realityPay < 0 ? info.realityPay : '+' + info.realityPay;
+			} else {
+				info.realPrice = info.realPrice < 0 ? info.realPrice : '+' + info.realPrice;
+			}
 			this.infoMation = info;
 		},
 		methods: {

+ 8 - 7
pagesHouse/home/tj.vue

@@ -15,7 +15,7 @@
 			<view class="money">
 				<view>
 					<text>收入金额</text>
-					<text class="in">+¥{{info.allOrderAmount||0}}</text>
+					<text class="in">¥{{info.allOrderAmount||0}}</text>
 					<text>{{info.allOrders||0}}笔</text>
 				</view>
 				<view>
@@ -28,8 +28,8 @@
 		<view class="chart">
 			<view class="tit">累计曲线图</view>
 			<view class="total">
-				<view class="t1">总收入<text>{{total}}</text></view>
-				<view class="t2">总退款<text>{{total2}}</text></view>
+				<view class="t1">总收入<text>{{total}}</text></view>
+				<view class="t2">总退款<text>{{total2}}</text></view>
 			</view>
 			<view class="line_charts_two">
 				<qiun-data-charts type="line" canvas2d='true' style="z-index: 1;" :opts="gameOpts"
@@ -197,7 +197,7 @@
 				this.$api.post('/api/merchant/food/getMerchantFoodBill', {
 					dateTime: this.date,
 					dateType: this.type + '',
-					fishermanId: uni.getStorageSync('merchantId')
+					merchantId: uni.getStorageSync('merchantId')
 				}).then(res => {
 					if (res.data.code === 0) {
 						this.info = res.data.data;
@@ -436,10 +436,11 @@
 					}
 				}
 
-				.in {
-					color: #FEA400;
-				}
+				
 			}
 		}
+		.in {
+			color: #FEA400!important;
+		}
 	}
 </style>