From 64d748607d42358038f54538ddc245e38c1ef567 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期二, 05 九月 2023 10:17:54 +0800
Subject: [PATCH] 修改bug
---
pages/public-page/forward/forward.vue | 30 +++-
pages/driver-page/appointment/appointment.vue | 284 ++++++++++++++++++++++++----------------------
pages/driver-page/drvier-my/drvier-my.vue | 4
pages/tabbar-page/myPage-tabbar/myPage-tabbar.vue | 2
4 files changed, 173 insertions(+), 147 deletions(-)
diff --git a/pages/driver-page/appointment/appointment.vue b/pages/driver-page/appointment/appointment.vue
index bb1935a..81aaec2 100644
--- a/pages/driver-page/appointment/appointment.vue
+++ b/pages/driver-page/appointment/appointment.vue
@@ -1,19 +1,26 @@
<template>
<view class="appointment">
- <combined-title :title="yuYueData.length != 0 ? yuYueData[0].filedName + '鈥斺��' + yuYueData[0].sendDate : '鏆傛棤棰勭害鍒楄〃'"></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-table border
+ stripe
+ emptyText="鏆傛棤鏇村鏁版嵁">
<uni-tr>
<uni-th align="center">鏃堕棿娈�</uni-th>
<uni-th align="center">鍙绾�</uni-th>
<uni-th align="center">宸查绾�</uni-th>
<uni-th align="center">鎿嶄綔</uni-th>
</uni-tr>
- <uni-tr v-for="(item, index) in yuYueData" :key="item.id">
+ <uni-tr v-for="(item, index) in yuYueData"
+ :key="item.id">
<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>
@@ -21,155 +28,160 @@
</template>
<script>
-import combinedTitle from '@/components/combined-title/combined-title.vue';
-export default {
- components: {
- combinedTitle
- },
- data() {
- return {
- // 棰勭害鍒楄〃璇锋眰鍙傛暟
- yuYueListParams: {
- filedId: '',
- deptId: '',
- sendDate: ''
- },
- // 棰勭害璇锋眰鍙傛暟
- yuYuePostParams: {
- takeCoalId: null,
- yuYueId: null
- },
- yuYueData: [],
- isRCSQ: false, // 鍏ュ満鐢宠鎺ュ彛鎺у埗
- rcsqData: {
- taskId: '',
- originalYyId: '',
- yyId: '',
- deptId: '',
- filedId: '',
- remark: ''
- }
- };
- },
- onLoad(params) {
- console.log('appointment,params', params);
- if (params.type == '鍏ュ満鐢宠') {
- this.isRCSQ = true;
- this.rcsqData.originalYyId = params.yyId;
- }
- this.yuYuePostParams.takeCoalId = params.takeCoalId;
- this.yuYueListParams.filedId = params.filedId;
- this.yuYueListParams.deptId = params.deptId;
- this.yuYueListParams.sendDate = params.sendDate;
- },
- onShow() {
- this.init();
- },
- methods: {
- init() {
- this.yuYueList();
+ import combinedTitle from '@/components/combined-title/combined-title.vue';
+ export default {
+ components: {
+ combinedTitle
},
- // 棰勭害鍒楄〃
- yuYueList() {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- this.$reqGet('yuYueList', this.yuYueListParams).then(res => {
- uni.hideLoading();
- if (res.code == 0) {
- this.yuYueData = res.data;
- } else {
- this.$u.toast('鍔犺浇澶辫触');
+ data() {
+ return {
+ // 棰勭害鍒楄〃璇锋眰鍙傛暟
+ yuYueListParams: {
+ filedId: '',
+ deptId: '',
+ sendDate: ''
+ },
+ // 棰勭害璇锋眰鍙傛暟
+ yuYuePostParams: {
+ takeCoalId: null,
+ yuYueId: null
+ },
+ yuYueData: [],
+ isRCSQ: false, // 鍏ュ満鐢宠鎺ュ彛鎺у埗
+ rcsqData: {
+ taskId: '',
+ originalYyId: '',
+ yyId: '',
+ deptId: '',
+ filedId: '',
+ remark: ''
}
- });
+ };
},
- // 棰勭害鍜屽叆鍦虹敵璇峰叡鐢ㄤ簨浠�
- yuYueBtnClick(value) {
- if (this.isRCSQ) {
- this.rcsqData.taskId = this.yuYuePostParams.takeCoalId;
- this.saveRCSQ(value);
- } else {
- this.yuYueClick(value.id);
+ onLoad(params) {
+ console.log('appointment,params', params);
+ if (params.type == '鍏ュ満鐢宠') {
+ this.isRCSQ = true;
+ this.rcsqData.originalYyId = params.yyId;
}
+ this.yuYuePostParams.takeCoalId = params.takeCoalId;
+ this.yuYueListParams.filedId = params.filedId;
+ this.yuYueListParams.deptId = params.deptId;
+ this.yuYueListParams.sendDate = params.sendDate;
},
- // 棰勭害
- yuYueClick(id) {
- 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);
+ onShow() {
+ this.init();
+ },
+ methods: {
+ init() {
+ this.yuYueList();
+ },
+ // 棰勭害鍒楄〃
+ yuYueList() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ 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.yuYuePostParams.takeCoalId;
+ this.saveRCSQ(value);
} else {
- this.$u.toast(res.msg ? res.msg : '棰勭害澶辫触');
+ this.yuYueClick(value.id);
}
- setTimeout(() => {
+ },
+ // 棰勭害
+ yuYueClick(id) {
+ 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 : '棰勭害澶辫触');
+ }
+ }).then(() => {
this.yuYueList();
- }, 500);
- });
- },
- // 鍏ュ満鐢宠
- saveRCSQ(value) {
- this.rcsqData.yyId = value.id;
- this.rcsqData.deptId = value.deptId;
- this.rcsqData.filedId = value.filedId;
- this.$reqPost('saveRCSQ', this.rcsqData, 'json').then(res => {
- if (res.code == 0) {
- this.$u.toast('鍏ュ満鐢宠鎴愬姛');
- } else {
- this.$u.toast(res.msg ? res.msg : '鍏ュ満鐢宠澶辫触锛岃绋嶅悗閲嶈瘯');
- }
- });
+ })
+ },
+ // 鍏ュ満鐢宠
+ saveRCSQ(value) {
+ this.rcsqData.yyId = value.id;
+ this.rcsqData.deptId = value.deptId;
+ this.rcsqData.filedId = value.filedId;
+ this.$reqPost('saveRCSQ', this.rcsqData, 'json').then(res => {
+ if (res.code == 0) {
+ this.$u.toast('鍏ュ満鐢宠鎴愬姛');
+ } else {
+ this.$u.toast(res.msg ? res.msg : '鍏ュ満鐢宠澶辫触锛岃绋嶅悗閲嶈瘯');
+ }
+ });
+ }
}
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-::v-deep.appointment {
- width: 94%;
- margin: 0 auto;
- h1 {
- font-size: vww(20);
- text-align: center;
- font-weight: 550;
- margin: vww(30) 0 vww(18) 0;
- }
- // 琛ㄦ牸
- .uni-table-scroll {
- width: 100%;
- overflow-x: hidden;
+<style lang="scss"
+ scoped>
+ ::v-deep.appointment {
+ width: 94%;
+ margin: 0 auto;
- .uni-table {
- min-width: 0 !important;
+ h1 {
+ font-size: vww(20);
+ text-align: center;
+ font-weight: 550;
+ margin: vww(30) 0 vww(18) 0;
+ }
- .uni-table-tr {
- padding: 0;
- font-size: vww(13);
+ // 琛ㄦ牸
+ .uni-table-scroll {
+ width: 100%;
+ overflow-x: hidden;
- .uni-table-th {
- height: vww(32);
- line-height: vww(20);
- padding: vww(5) vww(10);
- color: #111111;
- font-weight: 550;
- background: #f5f5f5;
- }
+ .uni-table {
+ min-width: 0 !important;
- .uni-table-td {
- height: vww(32);
- line-height: vww(20);
- padding: vww(5) vww(10);
- color: #111111;
- .u-button {
- height: vww(23);
+ .uni-table-tr {
+ padding: 0;
+ font-size: vww(13);
+
+ .uni-table-th {
+ height: vww(32);
+ line-height: vww(20);
+ padding: vww(5) vww(10);
+ color: #111111;
+ font-weight: 550;
+ background: #f5f5f5;
+ }
+
+ .uni-table-td {
+ height: vww(32);
+ line-height: vww(20);
+ padding: vww(5) vww(10);
+ color: #111111;
+
+ .u-button {
+ height: vww(23);
+ }
}
}
}
}
}
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/driver-page/drvier-my/drvier-my.vue b/pages/driver-page/drvier-my/drvier-my.vue
index 3ef0684..8420aa9 100644
--- a/pages/driver-page/drvier-my/drvier-my.vue
+++ b/pages/driver-page/drvier-my/drvier-my.vue
@@ -194,14 +194,14 @@
border="none"
inputAlign="left"></u--input>
</u-form-item>
- <u-form-item labelWidth="20%"
+ <!-- <u-form-item labelWidth="20%"
label="杞︾墝鍙�"
prop="carNo"
required>
<u--input v-model="editUserInfo.carNo"
border="none"
inputAlign="left"></u--input>
- </u-form-item>
+ </u-form-item> -->
<u-form-item labelWidth="20%"
label="浣撻噸"
prop="weight"
diff --git a/pages/public-page/forward/forward.vue b/pages/public-page/forward/forward.vue
index 235afb2..040efbe 100644
--- a/pages/public-page/forward/forward.vue
+++ b/pages/public-page/forward/forward.vue
@@ -37,7 +37,7 @@
<u-form-item label="杞彂瀵硅薄"
labelWidth="21%"
ref="item1"
- @click="forwardObjectClick(index)">
+ @click="forwardObjectClick(index,val.name)">
<u--input v-model="val.name"
placeholder="鐐瑰嚮閫夋嫨杞彂瀵硅薄"
:readonly="true"
@@ -86,7 +86,8 @@
:hairline="false"
type="warning"
@click.stop="submitForm"
- :disabled="whetherClick1"></u-button></view>
+ :disabled="whetherClick1"
+ :loading='loading'></u-button></view>
</view>
<!-- 澧炲姞鎸夐挳 -->
@@ -230,7 +231,10 @@
style: {
backgroundColor: '#FB0101'
}
- }]
+ }],
+ loading: false, //鎻愪氦loading
+ originForwardName: '', //鍘熻浆鍙戝璞�
+ laterForwardName: '', //鍚庤浆鍙戝璞�
};
},
onShow() {
@@ -332,9 +336,10 @@
});
},
// 杞彂
- forwardObjectClick(index) {
+ forwardObjectClick(index, name) {
this.selectPopupShow = true;
this.index = index;
+ this.originForwardName = name || ''
},
selectPopupClose() {
this.selectPopupShow = false;
@@ -352,6 +357,9 @@
this.jhOrderPlanForwardList[this.index].xsUserId = item.userId;
this.jhOrderPlanForwardList[this.index].name = item.name;
this.jhOrderPlanForwardList[this.index].fleetId = 0;
+ if (this.originForwardName) {
+ this.addForm(item.name)
+ }
}
});
},
@@ -367,6 +375,9 @@
this.jhOrderPlanForwardList[this.index].fleetId = item.id;
this.jhOrderPlanForwardList[this.index].name = item.name;
this.jhOrderPlanForwardList[this.index].xsUserId = 0;
+ if (this.originForwardName) {
+ this.addForm(item.name)
+ }
}
});
},
@@ -411,7 +422,7 @@
that.calculate(that.jhOrderPlanForwardList);
if (that.roleType == 1) {
if (that.jhOrderPlanForwardList[index].carNum < Number(that
- .carNumSurplus1)) {
+ .carNumSurplus1)) {
that.$set(that.jhOrderPlanForwardList[index], 'checkboxValue1', '');
that.jhOrderPlanForwardList.forEach((v, i) => {
if (index != i) {
@@ -442,13 +453,13 @@
this.calculate(this.jhOrderPlanForwardList);
},
// 娣诲姞涓�缁勮〃鍗�
- addForm() {
+ addForm(name) {
// 鍒ゆ柇鏄惁鏈変竴涓閫夛紝濡傛灉鏈夊垯绂佹鏂板姞鐨勫閫夛紝娌℃湁鍒欎笉绂佹
let ischeck = this.jhOrderPlanForwardList.some(v => v.ischecked == true);
if (!ischeck) {
this.jhOrderPlanForwardList.push({
orderPlanId: this.orderPlanId,
- name: '',
+ name: name || '',
carNum: null,
xsUserId: 0,
fleetId: 0,
@@ -460,7 +471,7 @@
} else {
this.jhOrderPlanForwardList.push({
orderPlanId: this.orderPlanId,
- name: '',
+ name: name || '',
carNum: null,
xsUserId: 0,
fleetId: 0,
@@ -509,14 +520,17 @@
}
});
if (isPass) {
+ this.loading = true;
this.$reqPost('forward', this.jhOrderPlanForwardList, 'json').then(res => {
console.log(res, 'zh');
if (res.code == 0) {
+ this.loading = false
this.$u.toast('鎻愪氦鎴愬姛');
setTimeout(() => {
uni.navigateBack({ delta: 1 });
}, 1000);
} else {
+ this.loading = false
this.$u.toast(res.msg);
}
});
diff --git a/pages/tabbar-page/myPage-tabbar/myPage-tabbar.vue b/pages/tabbar-page/myPage-tabbar/myPage-tabbar.vue
index 3c205a3..895f399 100644
--- a/pages/tabbar-page/myPage-tabbar/myPage-tabbar.vue
+++ b/pages/tabbar-page/myPage-tabbar/myPage-tabbar.vue
@@ -24,7 +24,7 @@
freightForwarderMyPage,
UnloadMypage
},
- onLoad() {
+ onShow() {
this.init();
},
data() {
--
Gitblit v1.9.1