From 82fa9121ff649bb681fc55e482fe405c5ce0d4d0 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期三, 22 三月 2023 13:48:29 +0800
Subject: [PATCH] 称重界面完成(上磅计量页面完成)

---
 pages/driver-page/appointment/appointment.vue |   33 +++++++++++++++++++++++----------
 1 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/pages/driver-page/appointment/appointment.vue b/pages/driver-page/appointment/appointment.vue
index 3981d85..272b15c 100644
--- a/pages/driver-page/appointment/appointment.vue
+++ b/pages/driver-page/appointment/appointment.vue
@@ -1,7 +1,6 @@
 <template>
 	<view class="appointment">
-		<!-- <h1>涓滃簽鐭库�斺��1/3鎻愮叅鍗�</h1> -->
-		<combined-title title="涓滃簽鐭库�斺��1/3鎻愮叅鍗�"></combined-title>
+		<combined-title :title="yuYueData.length != 0 ? yuYueData[0].filedName + '鈥斺��' + yuYueData[0].sendDate : '鏆傛棤棰勭害鍒楄〃'"></combined-title>
 		<view class="appointment-table">
 			<uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁">
 				<uni-tr>
@@ -23,15 +22,21 @@
 
 <script>
 import combinedTitle from '@/components/combined-title/combined-title.vue';
-import { BigNumber } from 'bignumber.js';
 export default {
 	components: {
 		combinedTitle
 	},
 	data() {
 		return {
-			takeCoalId: null,
-			yuYueId: null,
+			yuYueListParams: {
+				filedId: '',
+				deptId: '',
+				sendDate: ''
+			},
+			yuYuePostParams: {
+				takeCoalId: null,
+				yuYueId: null
+			},
 			yuYueData: [],
 			isRCSQ: false, // 鍏ュ満鐢宠鎺ュ彛鎺у埗
 			rcsqData: {
@@ -50,7 +55,10 @@
 			this.isRCSQ = true;
 			this.rcsqData.originalYyId = params.yyId;
 		}
-		this.takeCoalId = params.takeCoalId;
+		this.yuYuePostParams.takeCoalId = params.takeCoalId;
+		this.yuYueListParams.filedId = params.filedId;
+		this.yuYueListParams.deptId = params.deptId;
+		this.yuYueListParams.sendDate = params.sendDate;
 	},
 	onShow() {
 		this.init();
@@ -64,7 +72,7 @@
 			uni.showLoading({
 				title: '鍔犺浇涓�...'
 			});
-			this.$reqGet('yuYueList').then(res => {
+			this.$reqGet('yuYueList', this.yuYueListParams).then(res => {
 				uni.hideLoading();
 				if (res.code == 0) {
 					this.yuYueData = res.data;
@@ -74,7 +82,7 @@
 		// 棰勭害鍜屽叆鍦虹敵璇峰叡鐢ㄤ簨浠�
 		yuYueBtnClick(value) {
 			if (this.isRCSQ) {
-				this.rcsqData.taskId = this.takeCoalId;
+				this.rcsqData.taskId = this.yuYuePostParams.takeCoalId;
 				this.saveRCSQ(value);
 			} else {
 				this.yuYueClick(value.id);
@@ -82,10 +90,15 @@
 		},
 		// 棰勭害
 		yuYueClick(id) {
-			this.yuYueId = id;
-			this.$reqPost('yuYue', { takeCoalId: this.takeCoalId, yuYueId: this.yuYueId }, 'params').then(res => {
+			this.yuYuePostParams.yuYueId = id;
+			this.$reqPost('yuYue', { takeCoalId: this.yuYuePostParams.takeCoalId, yuYueId: this.yuYuePostParams.yuYueId }, 'params').then(res => {
 				if (res.code == 0) {
 					this.$u.toast('棰勭害鎴愬姛锛�');
+					uni.navigateBack({
+						delta: 1
+					})
+				} else {
+					this.$u.toast(res.data ? res.data : '棰勭害澶辫触');
 				}
 				setTimeout(() => {
 					this.yuYueList();

--
Gitblit v1.9.1