From 38de059c83720527d3813448153390da3e6453dc Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期日, 02 七月 2023 13:52:25 +0800
Subject: [PATCH] 验质替换页面,称重判断修改
---
pages/driver-page/appointment/appointment.vue | 46 +++++++++++++++++++++++++++++++++-------------
1 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/pages/driver-page/appointment/appointment.vue b/pages/driver-page/appointment/appointment.vue
index 15f6515..bb1935a 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>
@@ -14,7 +13,7 @@
<uni-td align="center">{{ (item.startTime || '') + '-' + (item.endTime || '') }}</uni-td>
<uni-td align="center">{{ item.carNum || '' }}</uni-td>
<uni-td align="center">{{ item.carNum1 || '' }}</uni-td>
- <uni-td><u-button text="棰勭害" type="primary" :disabled="item.carNum == item.carNum1" @click="yuYueBtnClick(item)"></u-button></uni-td>
+ <uni-td><u-button text="閫夋嫨" type="primary" :disabled="item.carNum == item.carNum1" @click="yuYueBtnClick(item)"></u-button></uni-td>
</uni-tr>
</uni-table>
</view>
@@ -23,15 +22,23 @@
<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 +57,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,17 +74,19 @@
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;
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
}
});
},
// 棰勭害鍜屽叆鍦虹敵璇峰叡鐢ㄤ簨浠�
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 +94,17 @@
},
// 棰勭害
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('棰勭害鎴愬姛锛�');
+ let timer = setTimeout(() => {
+ uni.navigateBack({
+ delta: 1
+ });
+ }, 500);
+ } else {
+ this.$u.toast(res.msg ? res.msg : '棰勭害澶辫触');
}
setTimeout(() => {
this.yuYueList();
@@ -97,10 +116,11 @@
this.rcsqData.yyId = value.id;
this.rcsqData.deptId = value.deptId;
this.rcsqData.filedId = value.filedId;
- console.log(this.rcsqData, '鍏ュ満鐢宠璇锋眰');
this.$reqPost('saveRCSQ', this.rcsqData, 'json').then(res => {
if (res.code == 0) {
- this.$u.toast('鏂板缓鍏ュ満鐢宠鎴愬姛銆�');
+ this.$u.toast('鍏ュ満鐢宠鎴愬姛');
+ } else {
+ this.$u.toast(res.msg ? res.msg : '鍏ュ満鐢宠澶辫触锛岃绋嶅悗閲嶈瘯');
}
});
}
--
Gitblit v1.9.1