From ae1aad66a165ee7253bed2127a3b53baa40c2361 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期三, 17 五月 2023 08:35:33 +0800
Subject: [PATCH] 修复错误,增加验证
---
pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue | 4 +
pages/public-page/forward/forward.vue | 10 +++
pages/driver-page/drvier-my/drvier-my.vue | 10 +-
pages/public-page/mapRoute/mapRoute.vue | 11 ++-
pages/register/register.vue | 25 ++++++--
pages/customer-page/customer-index/customer-index.vue | 11 +++
pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue | 8 +-
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 55 +++++++++++++-----
pages/customer-page/customer-my/customer-my.vue | 8 ++
9 files changed, 103 insertions(+), 39 deletions(-)
diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue
index 5cb4eb9..fd75770 100644
--- a/pages/customer-page/customer-index/customer-index.vue
+++ b/pages/customer-page/customer-index/customer-index.vue
@@ -209,7 +209,7 @@
return arrays;
},
popupDetermineClick() {
- if (this.receiveNum) {
+ if (this.receiveNum > 0) {
this.getOrderNum.num = this.receiveNum;
uni.showLoading({ title: '鍔犺浇涓�...' });
this.$reqPost('customerGet', this.getOrderNum, 'params').then(res => {
@@ -217,6 +217,7 @@
if (res.code == 0) {
this.getOrderNum.num = '';
this.GetOrderPlan();
+ this.show = false;
uni.showToast({
title: '棰嗗彇鎴愬姛锛�',
icon: 'none',
@@ -226,13 +227,19 @@
this.$u.toast(res.msg ? res.msg : '棰嗗彇澶辫触');
}
});
+ } else if (Number(this.receiveNum) <= 0) {
+ uni.showToast({
+ title: '璇疯緭鍏ュ悎娉曠殑鏁板瓧',
+ icon: 'none'
+ });
+ this.show = true;
} else {
uni.showToast({
title: '璇疯緭鍏ラ鍙栨暟閲�',
icon: 'none'
});
+ this.show = true;
}
- this.show = false;
},
/**
* @瀹㈡埛棰嗗彇
diff --git a/pages/customer-page/customer-my/customer-my.vue b/pages/customer-page/customer-my/customer-my.vue
index ebeef7a..af45c40 100644
--- a/pages/customer-page/customer-my/customer-my.vue
+++ b/pages/customer-page/customer-my/customer-my.vue
@@ -21,7 +21,9 @@
:key="index"
@click="deleteHuoDaiClick"
>
- <u-cell :title="item.name" value="璇︽儏" @click="toFreightForwarderDetails(item.userId)"></u-cell>
+ <u-cell :title="item.name" value="璇︽儏" @click="toFreightForwarderDetails(item.userId)">
+ <u-icon name="arrow-right" color="#999999" size="30" slot="right-icon"></u-icon>
+ </u-cell>
</u-swipe-action-item>
</u-cell-group>
</u-swipe-action>
@@ -48,7 +50,9 @@
:key="index"
@click="deleteFleetClick"
>
- <u-cell :title="item.name" :value="item.userSijisum + '杈�'" @click="tofleetDetails(item.id)"></u-cell>
+ <u-cell :title="item.name" :value="item.userSijisum + '杈�'" @click="tofleetDetails(item.id)">
+ <u-icon name="arrow-right" color="#999999" size="30" slot="right-icon"></u-icon>
+ </u-cell>
</u-swipe-action-item>
</u-cell-group>
</u-swipe-action>
diff --git a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
index 90a2217..81124d6 100644
--- a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
+++ b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
@@ -559,10 +559,10 @@
return uni.getStorageSync('roleType');
},
dateRange() {
- return `${this.firstFilter}-${this.lastFilter}`;
+ return `${this.firstFilter}鑷�${this.lastFilter}`;
},
dateselect() {
- return `${this.first}-${this.last}`;
+ return `${this.first}鑷�${this.last}`;
},
coalTotal() {
return this.coalList.length;
@@ -588,8 +588,8 @@
},
watch: {
dateselect(newV, old) {
- let tempDate = `${this.first}-${this.last}`;
- if (newV != old && old != '-') {
+ let tempDate = `${this.first}鑷�${this.last}`;
+ if (newV != old && old != '鑷�') {
this.first = newV.slice(0, 10);
this.last = newV.slice(11);
this.getTmTaskCoalData();
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
index 6cdfb20..78cd944 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -59,7 +59,7 @@
<u-button text="鍏ュ満鐢宠" type="primary" plain @click="rcsqClick" shape="circle"></u-button>
</view>
<view class="bottom-button">
- <u-button text="鏀剧┖" type="primary" plain @click="evacuation" throttleTime="500" shape="circle" :disabled="!isEvacuation"></u-button>
+ <u-button text="鏀剧┖" type="primary" plain @click="evacuation" throttleTime="500" shape="circle" :disabled="isEvacuation || isapproach"></u-button>
<u-button text="鍛煎彨瀹㈡湇" type="primary" plain @click="callCustomerService" shape="circle"></u-button>
</view>
</view>
@@ -143,11 +143,15 @@
primaryClean: null,
scrollTop: 0,
// 纾呭崟绫诲瀷
- orderType: ''
+ orderType: '',
+ interval: ''
};
},
onShow() {
this.init();
+ },
+ beforeDestroy() {
+ clearInterval(this.interval);
},
computed: {
...mapState(['globalweigh', 'globalinfraredStatus']),
@@ -170,10 +174,27 @@
//
isEvacuation() {
return this.coalDetailsData.hair == 0 || this.coalDetailsData.skin == 0;
+ },
+ isapproach() {
+ return this.currentPageCoalStatus < 3;
}
},
methods: {
init() {
+ this.$reqGet('coalDayPage', { id: this.orderPlanId }).then(res => {
+ if (res.code == 0) {
+ this.dayRZ = res.data;
+ this.dayRZ = this.dayRZ.map(v => {
+ let slicedate = v.taskStatusDes.slice(0, 10);
+ if (slicedate == this.currentDate) {
+ return {
+ ...v,
+ taskStatusDes: v.taskStatusDes.slice(10)
+ };
+ }
+ });
+ }
+ });
this.coalDayPage(); //鑾峰彇鏃ュ織
this.getTakeCoal(); //鑾峰彇鎻愮叅鍗曡鎯�
this.getgetService(); //鑾峰彇瀹㈡湇
@@ -231,20 +252,22 @@
},
// 鏃ュ織鏌ヨ
coalDayPage() {
- this.$reqGet('coalDayPage', { id: this.orderPlanId }).then(res => {
- if (res.code == 0) {
- this.dayRZ = res.data;
- this.dayRZ = this.dayRZ.map(v => {
- let slicedate = v.taskStatusDes.slice(0, 10);
- if (slicedate == this.currentDate) {
- return {
- ...v,
- taskStatusDes: v.taskStatusDes.slice(10)
- };
- }
- });
- }
- });
+ this.interval = setInterval(() => {
+ this.$reqGet('coalDayPage', { id: this.orderPlanId }).then(res => {
+ if (res.code == 0) {
+ this.dayRZ = res.data;
+ this.dayRZ = this.dayRZ.map(v => {
+ let slicedate = v.taskStatusDes.slice(0, 10);
+ if (slicedate == this.currentDate) {
+ return {
+ ...v,
+ taskStatusDes: v.taskStatusDes.slice(10)
+ };
+ }
+ });
+ }
+ });
+ }, 5000);
},
// 灞曠ず鎻愮叅鍗曡鎯�
showCaolPickUpBill() {
diff --git a/pages/driver-page/drvier-my/drvier-my.vue b/pages/driver-page/drvier-my/drvier-my.vue
index e431b8c..213d57c 100644
--- a/pages/driver-page/drvier-my/drvier-my.vue
+++ b/pages/driver-page/drvier-my/drvier-my.vue
@@ -17,7 +17,7 @@
</view>
<view class="information-value">
{{ userInfo.idCard || '' }}
- <u-icon name="arrow-right" color="#999999" size="30" v-if="userInfo.idCard"></u-icon>
+ <!-- <u-icon name="arrow-right" color="#999999" size="30" v-if="userInfo.idCard"></u-icon> -->
</view>
</view>
<view class="information-line">
@@ -27,7 +27,7 @@
</view>
<view class="information-value">
{{ userInfo.phone || '' }}
- <u-icon name="arrow-right" color="#999999" size="30" v-if="userInfo.phone"></u-icon>
+ <!-- <u-icon name="arrow-right" color="#999999" size="30" v-if="userInfo.phone"></u-icon> -->
</view>
</view>
<view class="information-line">
@@ -37,7 +37,7 @@
</view>
<view class="information-value">
{{ userInfo.carNo || '' }}
- <u-icon name="arrow-right" color="#999999" size="30" v-if="userInfo.carNo"></u-icon>
+ <!-- <u-icon name="arrow-right" color="#999999" size="30" v-if="userInfo.carNo"></u-icon> -->
</view>
</view>
<view class="information-line">
@@ -47,7 +47,7 @@
</view>
<view class="information-value">
{{ userInfo.axleNum || '' }}
- <u-icon name="arrow-right" color="#999999" size="30" v-if="userInfo.axleNum"></u-icon>
+ <!-- <u-icon name="arrow-right" color="#999999" size="30" v-if="userInfo.axleNum"></u-icon> -->
</view>
</view>
<view class="information-line last">
@@ -57,7 +57,7 @@
</view>
<view class="information-value">
{{ userInfo.weight || '' }}
- <u-icon name="arrow-right" color="#999999" size="30" v-if="userInfo.weight"></u-icon>
+ <!-- <u-icon name="arrow-right" color="#999999" size="30" v-if="userInfo.weight"></u-icon> -->
</view>
</view>
</view>
diff --git a/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue b/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue
index cf1a7ef..c55e29c 100644
--- a/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue
+++ b/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue
@@ -21,7 +21,9 @@
:key="index"
@click="deleteFleetClick"
>
- <u-cell :title="item.name" :value="item.userSijisum + '杈�'" @click="tofleetDetails(item.id)"></u-cell>
+ <u-cell :title="item.name" :value="item.userSijisum + '杈�'" @click="tofleetDetails(item.id)">
+ <u-icon name="arrow-right" color="#999999" size="30" slot="right-icon"></u-icon>
+ </u-cell>
</u-swipe-action-item>
</u-cell-group>
</u-swipe-action>
diff --git a/pages/public-page/forward/forward.vue b/pages/public-page/forward/forward.vue
index 13e809f..1774faf 100644
--- a/pages/public-page/forward/forward.vue
+++ b/pages/public-page/forward/forward.vue
@@ -376,6 +376,16 @@
let time;
let that = this;
that.$set(that.jhOrderPlanForwardList[index], 'carNum', Number(value));
+ if (that.roleType == 1) {
+ if (that.jhOrderPlanForwardList[index].carNum < that.carNumSurplus1) {
+ that.jhOrderPlanForwardList[index].checkboxValue1 = '';
+ }
+ }
+ if (that.roleType == 2) {
+ if (that.jhOrderPlanForwardList[index].carNum < that.carNumSurplusHuodai) {
+ that.jhOrderPlanForwardList[index].checkboxValue1 = '';
+ }
+ }
return (function() {
if (!time) {
time = setTimeout(() => {
diff --git a/pages/public-page/mapRoute/mapRoute.vue b/pages/public-page/mapRoute/mapRoute.vue
index b534ca6..43ffafb 100644
--- a/pages/public-page/mapRoute/mapRoute.vue
+++ b/pages/public-page/mapRoute/mapRoute.vue
@@ -15,7 +15,7 @@
<text>{{ duration || '' }}</text>
</view>
</view>
- <view class="open-button" @click="awaken"><button type="default">璺宠浆</button></view>
+ <view class="open-button" @click="awaken"><u-button type="primary">浣跨敤鎵嬫満鍦板浘</u-button></view>
</view>
</template>
@@ -253,7 +253,12 @@
}
}
.open-button {
- width: 200rpx;
- margin: 10rpx 0;
+ width: 100%;
+ margin: 40rpx 0;
+ display: flex;
+ justify-content: center;
+ /deep/.u-button {
+ width: 300rpx;
+ }
}
</style>
diff --git a/pages/register/register.vue b/pages/register/register.vue
index 6809847..94eb142 100644
--- a/pages/register/register.vue
+++ b/pages/register/register.vue
@@ -147,12 +147,18 @@
message: '璇峰~鍐欏鍚�',
trigger: ['blur', 'change']
},
- idCard: {
- type: 'string',
- required: true,
- message: '璇疯緭鍏ヨ韩浠借瘉鍙�',
- trigger: ['blur', 'change']
- },
+ idCard: [
+ {
+ type: 'string',
+ required: true,
+ message: '璇疯緭鍏ヨ韩浠借瘉鍙�',
+ trigger: ['blur', 'change']
+ },
+ {
+ pattern: /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
+ message: '韬唤璇佸彿鏍煎紡涓嶆纭�'
+ }
+ ],
phone: [
{
required: true,
@@ -164,6 +170,13 @@
min: 11,
max: 11,
message: '璇疯緭鍏ュ悎娉曟墜鏈哄彿'
+ },
+ {
+ validator: (rule, value, callback) => {
+ return uni.$u.test.mobile(value);
+ },
+ message: '鎵嬫満鍙风爜涓嶆纭�',
+ trigger: ['change', 'blur']
}
],
password: [
--
Gitblit v1.9.1