From 4b74ae71c84d7c3a2fcc83d1ef75f11f8f8c05e0 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期二, 30 五月 2023 10:28:28 +0800
Subject: [PATCH] 增加新功能,修复bug
---
pages/public-page/forward/forward.vue | 120
pages/driver-page/drvier-my/drvier-my.vue | 1077 +++--
pages/login/login.vue | 456 +-
pages.json | 11
pages/customer-page/customer-index/customer-index.vue | 975 +++--
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue | 748 ++--
pages/tabbar-page/index-tabbar/index-tabbar.vue | 615 +-
App.vue | 75
pages/customer-page/customer-my/customer-my.vue | 743 ++--
pages/driver-page/driver-index/driver-index.vue | 1280 ++++---
store/index.js | 60
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue | 1111 +++---
api/globalApi.js | 16
pages/public-page/mapRoute/mapRoute.vue | 471 +-
manifest.json | 3
pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue | 8
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 1181 +++---
pages/driver-page/driver-index/bill-of-lading-details/completeOutSale/completeOutSale.vue | 206 +
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue | 861 ++--
pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue | 204
20 files changed, 5,670 insertions(+), 4,551 deletions(-)
diff --git a/App.vue b/App.vue
index 727d723..72d23d5 100644
--- a/App.vue
+++ b/App.vue
@@ -1,39 +1,44 @@
<script>
-import { mapState, mapMutations } from 'vuex';
-export default {
- onShow() {},
- onLaunch() {},
- onHide() {
- console.log('appvue闅愯棌鍚庡彴');
- this.changeisconnect(false);
- console.log(this.globalisUploadimg);
- if (!this.globalisconnect && !this.globalisUploadimg) {
- uni.switchTab({
- url: '/pages/tabbar-page/index-tabbar/index-tabbar'
- });
+ import { mapState, mapMutations } from 'vuex';
+ export default {
+ onLaunch() {},
+ onHide() {
+ console.log('appvue闅愯棌鍚庡彴');
+ this.changeisconnect(false);
+ console.log(this.globalisconnect, this.globalisUploadimg, this.globalisLogin);
+
+ },
+ onShow() {
+ console.log('appvueZI鏄剧ず');
+ if (!this.globalisconnect && !this.globalisUploadimg) {
+ this.$store.dispatch('websocketInit')
+ }
+ },
+ methods: {
+ ...mapMutations(['changeisconnect'])
+ },
+ computed: {
+ ...mapState(['globalisconnect', 'globalisUploadimg', 'globalisLogin'])
}
- },
- methods: {
- ...mapMutations(['changeisconnect'])
- },
- computed: {
- ...mapState(['globalisconnect', 'globalisUploadimg'])
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-/*姣忎釜椤甸潰鍏叡css */
-@import '@/uni_modules/uview-ui/index.scss';
-@font-face {
- font-family: siYuanLight;
- src: url('https://mx.jzeg.cn:9095/appimg/fonts/siyuannormal.OTF');
-}
-@font-face {
- font-family: weighting;
- src: url('https://mx.jzeg.cn:9095/appimg/fonts/weighting.TTF');
-}
-body {
- font-family: siYuanLight, sans-serif;
-}
-</style>
+<style lang="scss"
+ scoped>
+ /*姣忎釜椤甸潰鍏叡css */
+ @import '@/uni_modules/uview-ui/index.scss';
+
+ @font-face {
+ font-family: siYuanLight;
+ src: url('https://mx.jzeg.cn:9095/appimg/fonts/siyuannormal.OTF');
+ }
+
+ @font-face {
+ font-family: weighting;
+ src: url('https://mx.jzeg.cn:9095/appimg/fonts/weighting.TTF');
+ }
+
+ body {
+ font-family: siYuanLight, sans-serif;
+ }
+</style>
\ No newline at end of file
diff --git a/api/globalApi.js b/api/globalApi.js
index 5ec62f6..a1f913f 100644
--- a/api/globalApi.js
+++ b/api/globalApi.js
@@ -354,5 +354,19 @@
getAppLocation: {
url: '/wrzs/userOperation/getAppLocation',
method: 'GET'
+ },
+ /**
+ @description 鍒ゆ柇鏄惁瑕佸畬鎴愬閿�鎻愮叅鍗�
+ */
+ getTmTaskCoalOrderType: {
+ url: '/wrzs/tmtaskcoal/getTmTaskCoalOrderType',
+ method: 'GET'
+ },
+ /**
+ @description 鏇存柊鎻愮叅鍗曠姸鎬�
+ */
+ updateTmTaskCoalState: {
+ url: '/wrzs/tmtaskcoal/updateTmTaskCoalState',
+ method: 'POST'
}
-}
+}
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index 47ae497..ddeea72 100644
--- a/manifest.json
+++ b/manifest.json
@@ -54,6 +54,9 @@
"permission": {
"scope.userFuzzyLocation": {
"desc": "浣犵殑浣嶇疆淇℃伅灏嗙敤浜庡皬绋嬪簭瀹氫綅"
+ },
+ "scope.userLocation": {
+ "desc": "浣犵殑浣嶇疆淇℃伅灏嗙敤浜庡皬绋嬪簭瀹氫綅"
}
},
"optimization": {
diff --git a/pages.json b/pages.json
index a92a011..03831ef 100644
--- a/pages.json
+++ b/pages.json
@@ -197,7 +197,16 @@
}
}
- ],
+ ,{
+ "path" : "pages/driver-page/driver-index/bill-of-lading-details/completeOutSale/completeOutSale",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ],
"subPackages": [{
"root": "pages/register",
"pages": [{
diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue
index fd75770..499b969 100644
--- a/pages/customer-page/customer-index/customer-index.vue
+++ b/pages/customer-page/customer-index/customer-index.vue
@@ -3,12 +3,21 @@
<view class="customer-index">
<view class="customer-index-body">
<!-- 寰呴鍙栧拰杞彂鎻愮叅鍗� -->
- <view class="wait-collection" style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/customerbanner.png') no-repeat;background-size:contain"></view>
+ <view class="wait-collection"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/customerbanner.png') no-repeat;background-size:contain">
+ </view>
<view style="position: relative;top: -120px;">
- <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" textSize="30" iconSize="1000" v-if="orderPlanData.length == 0"></u-empty>
+ <u-empty mode="data"
+ icon="http://cdn.uviewui.com/uview/empty/data.png"
+ textSize="30"
+ iconSize="1000"
+ v-if="orderPlanData.length == 0"></u-empty>
</view>
<view class="collection-form">
- <view class="collection-form-item" v-for="(item, index) in orderPlanData" :key="index" @click="cardBodyClick(item)">
+ <view class="collection-form-item"
+ v-for="(item, index) in orderPlanData"
+ :key="index"
+ @click="cardBodyClick(item)">
<view class="first-line">
<view class="dispatch-receive">
<view class="dispatch">{{ item.filedName }}</view>
@@ -22,20 +31,27 @@
<view class="coal-name">
<view class="">{{ item.coalName }}</view>
<view class="black-bar"></view>
- <view class="coal-type" v-if="item.orderType">{{ item.orderType }}</view>
+ <view class="coal-type"
+ v-if="item.orderType">{{ item.orderType }}</view>
</view>
</view>
<view class="third-line">
<view class="time-icon">
<view
- style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover"
- ></view>
+ style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover">
+ </view>
</view>
<view class="send-date">{{ item.sendDate }}</view>
</view>
<view class="fourth-line">
- <view class="receive" @click.stop="receiveClick(item)"><view class="button-image">棰嗗彇</view></view>
- <view class="forward" @click.stop="forwardClick(item)"><view class="button-image">杞彂</view></view>
+ <view class="receive"
+ @click.stop="receiveClick(item)">
+ <view class="button-image">棰嗗彇</view>
+ </view>
+ <view class="forward"
+ @click.stop="forwardClick(item)">
+ <view class="button-image">杞彂</view>
+ </view>
</view>
</view>
</view>
@@ -43,12 +59,24 @@
<!-- 鍘嗗彶鎻愮叅鍗� -->
<view class="history-numbers">
<combined-title title="鍘嗗彶鎻愮叅鍗�"></combined-title>
- <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltolower="historyScrolltolower">
- <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" textSize="30" iconSize="1000" v-if="historyCoalData.length == 0"></u-empty>
- <view class="history-information" v-for="(item, index) in historyCoalData" :key="index" @click="faYundetail(item)">
+ <scroll-view :scroll-top="scrollTop"
+ scroll-y="true"
+ class="scroll-Y"
+ @scrolltolower="historyScrolltolower">
+ <u-empty mode="data"
+ icon="http://cdn.uviewui.com/uview/empty/data.png"
+ textSize="30"
+ iconSize="1000"
+ v-if="historyCoalData.length == 0"></u-empty>
+ <view class="history-information"
+ v-for="(item, index) in historyCoalData"
+ :key="index"
+ @click="faYundetail(item)">
<view class="first">
<view class="">{{ item.deptName || '' }}</view>
- <view class=""><u-icon name="arrow-right" color="#999999" size="40"></u-icon></view>
+ <view class=""><u-icon name="arrow-right"
+ color="#999999"
+ size="40"></u-icon></view>
</view>
<view class="second">
<view class="coal-name">{{ item.coalName || '' }}</view>
@@ -61,8 +89,10 @@
</view>
<view class="third-line">
<view class="third-line_text">鍓╀綑鏁�:</view>
- <view class="third-line_num" v-if="roleType == 1">{{ item.carNumSurplus1 }}</view>
- <view class="third-line_num" v-else-if="roleType == 2">{{ item.carNumSurplus }}</view>
+ <view class="third-line_num"
+ v-if="roleType == 1">{{ item.carNumSurplus1 }}</view>
+ <view class="third-line_num"
+ v-else-if="roleType == 2">{{ item.carNumSurplus }}</view>
</view>
<view class="third-line">
<view class="third-line_text">鎻愮叅鍗曚釜鏁�:</view>
@@ -72,31 +102,43 @@
<view class="fourth">
<view class="fourth-icon">
<view
- style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover"
- ></view>
+ style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover">
+ </view>
</view>
<view class="senddate">{{ item.sendDate }}</view>
</view>
<view class="fourth">
<view class="fourth-icon">
<view
- style="width: 26rpx;height: 26rpx;line-height: 26rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/carnNUm.png') no-repeat;background-size: cover;"
- ></view>
+ style="width: 26rpx;height: 26rpx;line-height: 26rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/carnNUm.png') no-repeat;background-size: cover;">
+ </view>
</view>
<view class="senddate">{{ item.orderCode }}</view>
</view>
</view>
- <view class="more_text" v-if="showMoreData && historyCoalData.length !== 0">娌℃湁鏁版嵁浜�...</view>
+ <view class="more_text"
+ v-if="showMoreData && historyCoalData.length !== 0">娌℃湁鏁版嵁浜�...</view>
<view class="white-block"></view>
</scroll-view>
</view>
</view>
<!-- 棰嗗彇寮瑰嚭妗� -->
- <u-popup :show="show" @close="close" @open="open" mode="center" round="10">
+ <u-popup :show="show"
+ @close="close"
+ @open="open"
+ mode="center"
+ round="10">
<view class="receiverPopup">
<view class="receiverPopup__title"><text>纭棰嗗彇鏁伴噺</text></view>
- <view class="receiverPopup__input"><u--input v-model="receiveNum" @change="change" placeholder="璇疯緭鍏ュ唴瀹�" type="number" border="surround"></u--input></view>
- <view class="receiverPopup__btn"><u-button text="纭畾" type="primary" @click="popupDetermineClick"></u-button></view>
+ <view class="receiverPopup__input"><u--input v-model="receiveNum"
+ @change="change"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ type="number"
+ border="surround"></u--input></view>
+ <view class="receiverPopup__btn"><u-button text="纭畾"
+ type="primary"
+ @click="popupDetermineClick"
+ :disabled="canClick"></u-button></view>
</view>
</u-popup>
</view>
@@ -104,463 +146,514 @@
</template>
<script>
-import card from '@/components/card/card.vue';
-import combinedTitle from '@/components/combined-title/combined-title.vue';
-import { customerId } from '@/utils/status';
-export default {
- props: {
- orderPlanDataStore: {
- type: Array,
- default: []
- }
- },
- components: {
- card,
- combinedTitle
- },
- watch: {
- orderPlanDataStore: {
- handler(v) {
- this.orderPlanData = v;
- },
- deep: true,
- immediate: true
- }
- },
- computed: {
- roleType() {
- return uni.getStorageSync('roleType');
- }
- },
- data() {
- return {
- orderPlanData: [],
- show: false, // 棰嗗彇鎻愮叅鍗曞脊鍑烘
- receiveNum: null,
- getOrderNum: {
- num: '',
- id: null
- },
- historyCoalData: [],
- // 琛ㄦ牸鍔犺浇鐘舵��
- loading: false,
- scrollTop: 0,
- // 姣忛〉鏁版嵁閲�
- pageSize: 10,
- // 褰撳墠椤�
- pageCurrent: 1,
- // 鏁版嵁鎬婚噺
- total: 0,
- // 鏄惁鏄剧ず鏇村鏁版嵁
- showMoreData: false
- };
- },
- onLoad() {},
- onShow() {
- this.init();
- },
- methods: {
- init() {
- this.GetOrderPlan();
- this.getJhOrderPlanDataPage();
- },
- // 鑾峰彇鍙戣繍璁″垝鍒楄〃
- GetOrderPlan() {
- uni.showLoading({ title: '鍔犺浇涓�...' });
- this.$reqGet('GetOrderPlan').then(res => {
- if (res.data) {
- this.orderPlanData = res.data;
- uni.hideLoading();
- }
- });
- },
- // 鑾峰彇鍘嗗彶鎻愮叅鍗�
- getJhOrderPlanDataPage() {
- uni.showLoading({
- title: '鍔犺浇涓�'
- });
- this.$reqGet('getJhOrderPlanDataPage', { current: this.pageCurrent, size: this.pageSize }).then(res => {
- if (res.data.records) {
- this.total = res.data.total;
- if (this.pageCurrent > 1) {
- this.historyCoalData = this.historyCoalData.concat(res.data.records);
- this.historyCoalData = this.ArrSet(this.historyCoalData, 'id');
- uni.hideLoading();
- } else {
- this.historyCoalData = res.data.records;
- uni.hideLoading();
- }
- }
- });
- },
- // 涓婃媺鍔犺浇
- historyScrolltolower() {
- if (this.pageCurrent * this.pageSize >= this.total) return (this.showMoreData = true);
- this.pageCurrent++;
- this.getJhOrderPlanDataPage();
- },
- //fix 鐐瑰嚮鎻愮叅鍗曡繑鍥炰細澧炲姞閲嶅鏁版嵁
- ArrSet(Arr, id) {
- var obj = {};
- const arrays = Arr.reduce((setArr, item) => {
- obj[item[id]] ? '' : (obj[item[id]] = true && setArr.push(item));
- return setArr;
- }, []);
- return arrays;
- },
- popupDetermineClick() {
- if (this.receiveNum > 0) {
- this.getOrderNum.num = this.receiveNum;
- uni.showLoading({ title: '鍔犺浇涓�...' });
- this.$reqPost('customerGet', this.getOrderNum, 'params').then(res => {
- uni.hideLoading();
- if (res.code == 0) {
- this.getOrderNum.num = '';
- this.GetOrderPlan();
- this.show = false;
- uni.showToast({
- title: '棰嗗彇鎴愬姛锛�',
- icon: 'none',
- duration: 1000
- });
- } else {
- 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;
+ import card from '@/components/card/card.vue';
+ import combinedTitle from '@/components/combined-title/combined-title.vue';
+ import { customerId } from '@/utils/status';
+ export default {
+ props: {
+ orderPlanDataStore: {
+ type: Array,
+ default: []
}
},
- /**
- * @瀹㈡埛棰嗗彇
- * 棰嗗彇寮规
- */
- receiveClick(item) {
- this.show = true;
- this.getOrderNum.id = item.id; // 鑾峰彇棰嗗彇鎻愮叅鍗曠殑id
+ components: {
+ card,
+ combinedTitle
},
- open() {},
- close() {
- this.show = false;
- this.receiveNum = null;
+ watch: {
+ orderPlanDataStore: {
+ handler(v) {
+ this.orderPlanData = v;
+ },
+ deep: true,
+ immediate: true
+ }
},
- change(e) {
- console.log('杈撳叆妗�', e);
+ computed: {
+ roleType() {
+ return uni.getStorageSync('roleType');
+ }
},
- // 鎻愮叅鍗曡鎯�
- cardBodyClick(v) {
- uni.navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2}` });
+ data() {
+ return {
+ orderPlanData: [],
+ show: false, // 棰嗗彇鎻愮叅鍗曞脊鍑烘
+ receiveNum: null,
+ getOrderNum: {
+ num: '',
+ id: null
+ },
+ historyCoalData: [],
+ // 琛ㄦ牸鍔犺浇鐘舵��
+ loading: false,
+ scrollTop: 0,
+ // 姣忛〉鏁版嵁閲�
+ pageSize: 10,
+ // 褰撳墠椤�
+ pageCurrent: 1,
+ // 鏁版嵁鎬婚噺
+ total: 0,
+ // 鏄惁鏄剧ず鏇村鏁版嵁
+ showMoreData: false,
+ cars2: "",
+ carNum: "",
+ // 鍓╀綑鐨勬彁鐓ゅ崟鏁伴噺
+ carNumSurplus: '',
+ canClick: false
+ };
},
- // 鐐瑰嚮鍘嗗彶鎻愮叅鍗曡幏鍙栬鎯�
- faYundetail(v) {
- uni.navigateTo({
- url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}&coalName=${v.coalName}&deptName=${v.deptName}`
- });
+ onLoad() {},
+ onShow() {
+ this.init();
},
- // 杞彂
- forwardClick(obj) {
- if (obj.cars2 == 0) return this.$u.toast('璇峰厛棰嗗彇鍚庡啀杞彂');
- uni.navigateTo({ url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNumSurplus1=${obj.carNumSurplus1}&carNum=${obj.carNum}&cars2=${obj.cars2}` });
+ methods: {
+ init() {
+ this.GetOrderPlan();
+ this.getJhOrderPlanDataPage();
+ },
+ // 鑾峰彇鍙戣繍璁″垝鍒楄〃
+ GetOrderPlan() {
+ uni.showLoading({ title: '鍔犺浇涓�...' });
+ this.$reqGet('GetOrderPlan').then(res => {
+ if (res.data) {
+ this.orderPlanData = res.data;
+ uni.hideLoading();
+ }
+ });
+ },
+ // 鑾峰彇鍘嗗彶鎻愮叅鍗�
+ getJhOrderPlanDataPage() {
+ uni.showLoading({
+ title: '鍔犺浇涓�'
+ });
+ this.$reqGet('getJhOrderPlanDataPage', { current: this.pageCurrent, size: this.pageSize }).then(res => {
+ if (res.data.records) {
+ this.total = res.data.total;
+ if (this.pageCurrent > 1) {
+ this.historyCoalData = this.historyCoalData.concat(res.data.records);
+ this.historyCoalData = this.ArrSet(this.historyCoalData, 'id');
+ uni.hideLoading();
+ } else {
+ this.historyCoalData = res.data.records;
+ uni.hideLoading();
+ }
+ }
+ });
+ },
+ // 涓婃媺鍔犺浇
+ historyScrolltolower() {
+ if (this.pageCurrent * this.pageSize >= this.total) return (this.showMoreData = true);
+ this.pageCurrent++;
+ this.getJhOrderPlanDataPage();
+ },
+ //fix 鐐瑰嚮鎻愮叅鍗曡繑鍥炰細澧炲姞閲嶅鏁版嵁
+ ArrSet(Arr, id) {
+ var obj = {};
+ const arrays = Arr.reduce((setArr, item) => {
+ obj[item[id]] ? '' : (obj[item[id]] = true && setArr.push(item));
+ return setArr;
+ }, []);
+ return arrays;
+ },
+ popupDetermineClick() {
+ if (this.receiveNum > 0) {
+ this.getOrderNum.num = this.receiveNum;
+ uni.showLoading({ title: '鍔犺浇涓�...' });
+ this.$reqPost('customerGet', this.getOrderNum, 'params').then(res => {
+ uni.hideLoading();
+ if (res.code == 0) {
+ this.getOrderNum.num = '';
+ this.GetOrderPlan();
+ this.show = false;
+ uni.showToast({
+ title: '棰嗗彇鎴愬姛锛�',
+ icon: 'none',
+ duration: 1000
+ });
+ } else {
+ 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;
+ }
+ },
+ /**
+ * @瀹㈡埛棰嗗彇
+ * 棰嗗彇寮规
+ */
+ receiveClick(item) {
+ this.show = true;
+ this.getOrderNum.id = item.id; // 鑾峰彇棰嗗彇鎻愮叅鍗曠殑id
+ this.cars2 = item.cars2
+ this.carNum = item.carNum
+ },
+ open() {},
+ close() {
+ this.show = false;
+ this.receiveNum = null;
+ },
+ change(e) {
+ console.log('杈撳叆妗�', e);
+ this.canClick = e > (this.carNum - this.cars2)
+ if (this.canClick) {
+ this.$u.toast('宸茶秴杩囧綋鍓嶆棩璁″垝鎻愮叅鍗曟暟閲�,璇烽噸鏂拌緭鍏�')
+ }
+ },
+ // 鎻愮叅鍗曡鎯�
+ cardBodyClick(v) {
+ uni
+ .navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2}` });
+ },
+ // 鐐瑰嚮鍘嗗彶鎻愮叅鍗曡幏鍙栬鎯�
+ faYundetail(v) {
+ uni.navigateTo({
+ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}&coalName=${v.coalName}&deptName=${v.deptName}`
+ });
+ },
+ // 杞彂
+ forwardClick(obj) {
+ if (obj.cars2 == 0) return this.$u.toast('璇峰厛棰嗗彇鍚庡啀杞彂');
+ uni
+ .navigateTo({ url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNumSurplus1=${obj.carNumSurplus1}&carNum=${obj.carNum}&cars2=${obj.cars2}` });
+ }
}
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-@mixin flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-.wait-collection {
- width: 100%;
- height: 600rpx;
- position: relative;
- top: vww(-10);
- z-index: 0;
-}
-.white-block {
- width: 100%;
- height: vww(50);
- margin-top: vww(10);
-}
-.scroll-Y {
- height: 900rpx;
- .more_text {
- color: #333;
- font-size: 24rpx;
- text-align: center;
+<style lang="scss"
+ scoped>
+ @mixin flex {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
}
-}
-.history-numbers {
- width: 100%;
- position: relative;
- top: vww(-110);
- .history-information {
- width: 690rpx;
- height: 398rpx;
- margin: vww(10) vww(15);
- background: #ffffff;
- box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
- border-radius: 20rpx;
- @include flex flex-direction: column;
- align-items: flex-start;
- justify-content: space-evenly;
- overflow: hidden;
- .first {
- width: 96%;
- height: 34rpx;
- font-size: 32rpx;
- font-weight: 300;
- color: #303030;
- @include flex;
- margin: vww(10) vww(10) 0;
- }
- .second {
- width: 100%;
- height: 31rpx;
- font-size: 30rpx;
- font-weight: 300;
- color: #515151;
- margin: vww(10) vww(10) 0;
- @include flex;
- justify-content: flex-start;
- .coal-name {
- min-width: vww(30);
- height: vww(20);
- margin-right: vww(21);
- }
- .order-type {
- color: #035cfb;
- border: 2px solid #035cfb;
- border-radius: 4rpx;
- padding: vww(2) vww(4);
- text-align: center;
- }
- }
- .third {
- width: 96%;
- height: 31rpx;
- font-size: 30rpx;
- font-weight: 300;
- color: #515151;
- margin: vww(10) vww(10) 0;
- @include flex;
- .third-line {
- @include flex;
- &_text {
- color: #919090;
- }
- &_num {
- color: #035cfb;
- }
- }
- }
- .fourth {
- width: 100%;
- height: 31rpx;
- font-size: 30rpx;
- font-weight: 300;
- color: #515151;
- margin: vww(10) vww(10) 0;
- @include flex;
- .fourth-icon {
- width: vww(13);
- height: vww(13);
- margin-right: vww(14);
- }
- .senddate {
- flex: 1;
- }
- }
- }
-}
-::v-deep.customer-index {
- width: 100%;
- margin: 0 auto;
- // 涓讳綋
- .customer-index-body {
- .collection-form {
- width: vww(345);
- margin: 0 vww(15);
- position: relative;
- top: vww(-144);
- .collection-form-item {
- width: 690rpx;
- height: 300rpx;
- background: #ffffff;
- box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
- border-radius: 20rpx;
- overflow: hidden;
- @include flex flex-direction: column;
+ .wait-collection {
+ width: 100%;
+ height: 600rpx;
+ position: relative;
+ top: vww(-10);
+ z-index: 0;
+ }
+
+ .white-block {
+ width: 100%;
+ height: vww(50);
+ margin-top: vww(10);
+ }
+
+ .scroll-Y {
+ height: 900rpx;
+
+ .more_text {
+ color: #333;
+ font-size: 24rpx;
+ text-align: center;
+ }
+ }
+
+ .history-numbers {
+ width: 100%;
+ position: relative;
+ top: vww(-110);
+
+ .history-information {
+ width: 690rpx;
+ height: 398rpx;
+ margin: vww(10) vww(15);
+ background: #ffffff;
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
+ border-radius: 20rpx;
+ @include flex flex-direction: column;
+ align-items: flex-start;
+ justify-content: space-evenly;
+ overflow: hidden;
+
+ .first {
+ width: 96%;
+ height: 34rpx;
+ font-size: 32rpx;
+ font-weight: 300;
+ color: #303030;
+ @include flex;
+ margin: vww(10) vww(10) 0;
+ }
+
+ .second {
+ width: 100%;
+ height: 31rpx;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #515151;
+ margin: vww(10) vww(10) 0;
+ @include flex;
+ justify-content: flex-start;
+
+ .coal-name {
+ min-width: vww(30);
+ height: vww(20);
+ margin-right: vww(21);
+ }
+
+ .order-type {
+ color: #035cfb;
+ border: 2px solid #035cfb;
+ border-radius: 4rpx;
+ padding: vww(2) vww(4);
+ text-align: center;
+ }
+ }
+
+ .third {
+ width: 96%;
+ height: 31rpx;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #515151;
+ margin: vww(10) vww(10) 0;
+ @include flex;
+
+ .third-line {
+ @include flex;
+
+ &_text {
+ color: #919090;
+ }
+
+ &_num {
+ color: #035cfb;
+ }
+ }
+ }
+
+ .fourth {
+ width: 100%;
+ height: 31rpx;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #515151;
+ margin: vww(10) vww(10) 0;
+ @include flex;
+
+ .fourth-icon {
+ width: vww(13);
+ height: vww(13);
+ margin-right: vww(14);
+ }
+
+ .senddate {
+ flex: 1;
+ }
+ }
+ }
+ }
+
+ ::v-deep.customer-index {
+ width: 100%;
+ margin: 0 auto;
+
+ // 涓讳綋
+ .customer-index-body {
+ .collection-form {
+ width: vww(345);
+ margin: 0 vww(15);
position: relative;
- align-items: flex-start;
- margin-top: vww(10);
- .first-line {
- width: 94%;
- height: vww(30);
- margin: vww(10) vww(16) 0 vww(16);
- display: flex;
- justify-content: space-between;
- .dispatch-receive {
- width: 70%;
+ top: vww(-144);
+
+ .collection-form-item {
+ width: 690rpx;
+ height: 300rpx;
+ background: #ffffff;
+ box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
+ border-radius: 20rpx;
+ overflow: hidden;
+ @include flex flex-direction: column;
+ position: relative;
+ align-items: flex-start;
+ margin-top: vww(10);
+
+ .first-line {
+ width: 94%;
+ height: vww(30);
+ margin: vww(10) vww(16) 0 vww(16);
display: flex;
justify-content: space-between;
- align-items: center;
- }
- .point-number {
- width: 15%;
- text {
- font-size: 24rpx;
- font-weight: 400;
- color: #c78a64;
+
+ .dispatch-receive {
+ width: 70%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
}
- .residue {
- font-size: 40rpx;
- font-weight: 400;
- color: #f81414;
+
+ .point-number {
+ width: 15%;
+
+ text {
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #c78a64;
+ }
+
+ .residue {
+ font-size: 40rpx;
+ font-weight: 400;
+ color: #f81414;
+ }
}
}
- }
- .second-line {
- width: 100%;
- height: vww(30);
- margin-left: vww(16);
- display: flex;
- align-items: center;
- justify-content: flex-start;
- .coal-name {
- flex-grow: 1;
- height: 30rpx;
- font-size: 30rpx;
- font-weight: 300;
- color: #515151;
- position: relative;
+
+ .second-line {
+ width: 100%;
+ height: vww(30);
+ margin-left: vww(16);
display: flex;
align-items: center;
- .black-bar {
- width: 2rpx;
+ justify-content: flex-start;
+
+ .coal-name {
+ flex-grow: 1;
height: 30rpx;
- background: #515151;
- margin-left: vww(12);
- }
- .coal-type {
- margin-left: vww(12);
- min-width: vww(50);
- height: 30rpx;
- line-height: 30rpx;
font-size: 30rpx;
+ font-weight: 300;
+ color: #515151;
+ position: relative;
+ display: flex;
+ align-items: center;
+
+ .black-bar {
+ width: 2rpx;
+ height: 30rpx;
+ background: #515151;
+ margin-left: vww(12);
+ }
+
+ .coal-type {
+ margin-left: vww(12);
+ min-width: vww(50);
+ height: 30rpx;
+ line-height: 30rpx;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #515151;
+ }
+ }
+ }
+
+ .third-line {
+ width: 40%;
+ height: vww(30);
+ margin-left: vww(15);
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+
+ .send-date {
+ margin-left: vww(14);
+ width: 148rpx;
+ height: 24rpx;
+ line-height: 24rpx;
+ font-size: 28rpx;
font-weight: 300;
color: #515151;
}
}
- }
- .third-line {
- width: 40%;
- height: vww(30);
- margin-left: vww(15);
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .send-date {
- margin-left: vww(14);
- width: 148rpx;
- height: 24rpx;
- line-height: 24rpx;
- font-size: 28rpx;
- font-weight: 300;
- color: #515151;
- }
- }
- .fourth-line {
- width: 100%;
- height: vww(30);
- @include flex;
- justify-content: flex-start;
- position: relative;
- bottom: vww(10);
- left: 25%;
- .receive,
- .forward {
- width: vww(123);
- height: vww(48);
+
+ .fourth-line {
+ width: 100%;
+ height: vww(30);
@include flex;
- justify-content: center;
- color: #ffffff;
- font-size: 28rpx;
- position: absolute;
- .button-image {
- width: 100%;
- height: 100%;
- background: url('../../../static/image/banner/button.png') no-repeat;
- background-size: cover;
- font-size: 28rpx;
- font-weight: 300;
+ justify-content: flex-start;
+ position: relative;
+ bottom: vww(10);
+ left: 25%;
+
+ .receive,
+ .forward {
+ width: vww(123);
+ height: vww(48);
+ @include flex;
+ justify-content: center;
color: #ffffff;
- text-align: center;
- line-height: vww(45);
- }
- }
- .receive {
- left: vww(20);
- }
- .forward {
- width: vww(106);
- left: vww(140);
- .button-image {
- width: 100%;
- height: 100%;
- background: url('../../../static/image/banner/transpartent.png') no-repeat;
- background-size: cover;
font-size: 28rpx;
- font-weight: 300;
- color: #3b56eb;
- text-align: center;
- line-height: vww(45);
+ position: absolute;
+
+ .button-image {
+ width: 100%;
+ height: 100%;
+ background: url('../../../static/image/banner/button.png') no-repeat;
+ background-size: cover;
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #ffffff;
+ text-align: center;
+ line-height: vww(45);
+ }
+ }
+
+ .receive {
+ left: vww(20);
+ }
+
+ .forward {
+ width: vww(106);
+ left: vww(140);
+
+ .button-image {
+ width: 100%;
+ height: 100%;
+ background: url('../../../static/image/banner/transpartent.png') no-repeat;
+ background-size: cover;
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #3b56eb;
+ text-align: center;
+ line-height: vww(45);
+ }
}
}
}
}
}
- }
- // 棰嗗彇寮瑰嚭妗�
- .receiverPopup {
- height: vww(110);
+ // 棰嗗彇寮瑰嚭妗�
+ .receiverPopup {
+ height: vww(110);
- .receiverPopup__title {
- margin: vww(10) auto 0;
- width: 80%;
- text-align: center;
- }
-
- .receiverPopup__input {
- width: 80%;
- margin: vww(10) auto 0;
-
- .u-input {
- border: 1px solid #dddddd;
+ .receiverPopup__title {
+ margin: vww(10) auto 0;
+ width: 80%;
+ text-align: center;
}
- }
- &__btn {
- margin: vww(10) auto;
- width: 50%;
- .u-button {
- height: vww(20);
+ .receiverPopup__input {
+ width: 80%;
+ margin: vww(10) auto 0;
+
+ .u-input {
+ border: 1px solid #dddddd;
+ }
+ }
+
+ &__btn {
+ margin: vww(10) auto;
+ width: 50%;
+
+ .u-button {
+ height: vww(20);
+ }
}
}
}
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue
index 8ace7d0..e88638e 100644
--- a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue
+++ b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue
@@ -3,7 +3,10 @@
<view class="fayunPlan">
<view class="plan-banner">
<view class="top-container">
- <view class="back-icon" @click="backPage"><u-icon name="arrow-left" size="50" color="#fff"></u-icon></view>
+ <view class="back-icon"
+ @click="backPage"><u-icon name="arrow-left"
+ size="50"
+ color="#fff"></u-icon></view>
<view class="top-title">鍙戣繍璁″垝璇︽儏</view>
</view>
<view class="middle-container">
@@ -12,34 +15,34 @@
<text v-show="deptName">({{ coalName }})</text>
</view>
<view class="dept-num">
- <text
- style="font-size: 46rpx;
+ <text style="font-size: 46rpx;
font-weight: 400;
color: #FFFFFF;
- text-shadow: 0rpx 4rpx 0rpx #1A66FE;"
- >
+ text-shadow: 0rpx 4rpx 0rpx #1A66FE;">
{{ orderPlanDetail.fowardSum || 0 }}
</text>
- <text
- style="font-size: 24rpx;
+ <text style="font-size: 24rpx;
font-weight: 400;
color: #F81414;
- text-shadow: 0rpx 4rpx 0rpx #1A66FE;"
- >
- /{{ cars2 || 0 }}
+ text-shadow: 0rpx 4rpx 0rpx #1A66FE;">
+ /{{ cars2 ||carNum||'' }}
</text>
</view>
</view>
<view class="bottom-container">
<view class="bottom-block">
- <view class="bottom-content" v-for="(item, index) in orderPlanDetail.huodaiList" :key="index">
+ <view class="bottom-content"
+ v-for="(item, index) in orderPlanDetail.huodaiList"
+ :key="index">
<view class="forward-name">{{ item.huoDaiName }}</view>
<view class="forward-num">
{{ item.fleetOrHuodaiNub }}
<text>寮�</text>
</view>
</view>
- <view class="bottom-content" v-for="(item, index) in orderPlanDetail.cheduiList" :key="index">
+ <view class="bottom-content"
+ v-for="(item, index) in orderPlanDetail.cheduiList"
+ :key="index">
<view class="fleet-name">{{ item.cheduiName }}</view>
<view class="fleet-num">
{{ item.fleetOrHuodaiNub }}
@@ -60,15 +63,21 @@
<combined-title title="鎻愮叅鍗曞巻鍙�"></combined-title>
<view class="total">
鎬诲噣閲�
- <text>{{ total || 0 }}</text>
+ <text>{{ total.toFixed(2) || 0 }}</text>
</view>
</view>
<view class="main-banner">
- <view class="empty-pointer" v-if="!yyDailyList">鏆傛棤鏇村鏁版嵁</view>
+ <view class="empty-pointer"
+ v-if="!yyDailyList">鏆傛棤鏇村鏁版嵁</view>
<view class="main-block">
<view class="main-container">
- <view class="main-container_content" v-for="(item, index) in yyDailyList" :key="index" @click="showMore(item)">
- <view class="arrow-icon"><u-icon name="arrow-right" size="30" color="#999999"></u-icon></view>
+ <view class="main-container_content"
+ v-for="(item, index) in yyDailyList"
+ :key="index"
+ @click="showMore(item)">
+ <view class="arrow-icon"><u-icon name="arrow-right"
+ size="30"
+ color="#999999"></u-icon></view>
<view class="divider"><u-divider></u-divider></view>
<view class="first-line">
<view class="car-num">{{ item.carNo || '' }}</view>
@@ -77,11 +86,11 @@
<view class="second-line">
<view class="line-content">
<view class="line-content_text">鍑�閲�</view>
- <view class="line-content_num">{{ item.clean || 0 }}</view>
+ <view class="line-content_num">{{ item.clean.toFixed(2) || 0 }}</view>
</view>
<view class="line-content">
<view class="line-content_text">浣欓噺</view>
- <view class="line-content_num">{{ item.allowance || 0 }}</view>
+ <view class="line-content_num">{{ item.allowance.toFixed(2) || 0 }}</view>
</view>
</view>
</view>
@@ -94,361 +103,406 @@
</template>
<script>
-import combinedTitle from '@/components/combined-title/combined-title.vue';
-export default {
- components: {
- combinedTitle
- },
- onLoad(value) {
- this.orderPlanId = value.orderPlanId;
- this.orderCode = value.code;
- this.cars2 = value.cars2;
- this.deptName = value.deptName;
- this.coalName = value.coalName;
- console.log(value, '鍙戣繍璁″垝鍙傛暟');
- },
- data() {
- return {
- orderPlanId: null,
- orderCode: null,
- orderPlanDetail: {},
- coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠', '杩涘叆鍦洪櫌'],
- yyDailyList: [],
- // 棰嗗彇鏁伴噺
- cars2: '',
- coalName: '',
- deptName: '',
- total: 0
- };
- },
- onShow() {
- this.init();
- },
- methods: {
- backPage() {
- uni.navigateBack({
- delta: 1
- });
+ import combinedTitle from '@/components/combined-title/combined-title.vue';
+ export default {
+ components: {
+ combinedTitle
},
- showMore(item) {
- uni.navigateTo({
- url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore?orderPlanId=${this.orderPlanId}&id=${item.id}`
- });
+ onLoad(value) {
+ this.orderPlanId = value.orderPlanId;
+ this.orderCode = value.code;
+ this.cars2 = value.cars2 ? value.cars2 : null;
+ this.deptName = value.deptName;
+ this.coalName = value.coalName;
+ this.carNum = value.carNum ? value.carNum : null
+ console.log(value, '鍙戣繍璁″垝鍙傛暟');
},
- init() {
- this.GetOrderPlanDetail();
+ data() {
+ return {
+ orderPlanId: null,
+ orderCode: null,
+ orderPlanDetail: {},
+ coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
+ '杩涘叆鍦洪櫌'
+ ],
+ yyDailyList: [],
+ // 棰嗗彇鏁伴噺
+ cars2: '',
+ coalName: '',
+ deptName: '',
+ total: 0,
+ carNum: ''
+ };
},
- // 鑾峰彇鍙戣繍璁″垝璇︽儏
- GetOrderPlanDetail() {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- this.$reqGet('xiangqingList', { orderPlanId: this.orderPlanId }).then(res => {
- if (res.code == 0) {
- this.orderPlanDetail = res.data;
- this.yyDailyList = res.data.yyDailyList;
- if (res.data.yyDailyList) {
- this.total = this.yyDailyList.reduce((prev, cur) => {
- return prev + cur.clean;
- }, 0);
+ onShow() {
+ this.init();
+ },
+ methods: {
+ backPage() {
+ uni.navigateBack({
+ delta: 1
+ });
+ },
+ showMore(item) {
+ uni.navigateTo({
+ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore?orderPlanId=${this.orderPlanId}&id=${item.id}`
+ });
+ },
+ init() {
+ this.GetOrderPlanDetail();
+ },
+ // 鑾峰彇鍙戣繍璁″垝璇︽儏
+ GetOrderPlanDetail() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ this.$reqGet('xiangqingList', { orderPlanId: this.orderPlanId }).then(res => {
+ if (res.code == 0) {
+ this.orderPlanDetail = res.data;
+ this.yyDailyList = res.data.yyDailyList;
+ if (res.data.yyDailyList) {
+ this.total = this.yyDailyList.reduce((prev, cur) => {
+ return prev + cur.clean;
+ }, 0);
+ } else {
+ this.total = 0;
+ }
+ uni.hideLoading();
} else {
- this.total = 0;
+ this.$u.toast('鍔犺浇澶辫触锛岃绋嶅悗閲嶈瘯');
+ uni.hideLoading();
}
- uni.hideLoading();
- } else {
- this.$u.toast('鍔犺浇澶辫触锛岃绋嶅悗閲嶈瘯');
- uni.hideLoading();
- }
- });
+ });
+ }
}
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-@mixin flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-.empty-pointer {
- position: absolute;
- top: 50%;
- left: 38%;
- color: #909399;
-}
-.white-block {
- width: 100%;
- height: vww(50);
- margin-top: vww(10);
-}
-::v-deep.fayunPlan {
- width: 100%;
- margin: 0 auto;
- background-color: #f4f4f4;
- display: flex;
- flex-direction: column;
- .plan-banner {
+<style lang="scss"
+ scoped>
+ @mixin flex {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ .empty-pointer {
+ position: absolute;
+ top: 50%;
+ left: 38%;
+ color: #909399;
+ }
+
+ .white-block {
width: 100%;
- background: linear-gradient(0deg, #ffffff 0%, #0055fe 100%);
- background-size: contain;
- position: relative;
- top: 0;
- .top-container {
- width: 468rpx;
- height: 38rpx;
- position: relative;
- top: vww(48);
- @include flex margin-left: vww(10);
- .top-title {
- width: 226rpx;
- height: 36rpx;
- font-size: 38rpx;
- font-weight: normal;
- color: #fff;
- line-height: 69rpx;
- }
- }
- .middle-container {
- width: 626rpx;
- height: 34rpx;
- margin: vww(27) vww(31) 0 vww(31);
- @include flex;
- position: relative;
- top: vww(54);
- .dept-name {
- min-width: 100rpx;
- font-size: 32rpx;
- font-weight: normal;
- color: #ffffff;
- line-height: 69rpx;
- text-shadow: 0rpx 4rpx 0rpx #1a66fe;
- }
- }
- .bottom-container {
+ height: vww(50);
+ margin-top: vww(10);
+ }
+
+ ::v-deep.fayunPlan {
+ width: 100%;
+ margin: 0 auto;
+ background-color: #f4f4f4;
+ display: flex;
+ flex-direction: column;
+
+ .plan-banner {
width: 100%;
- @include flex;
- justify-content: center;
- margin-top: vww(80);
- .bottom-block {
- width: 690rpx;
- min-height: 185rpx;
- background: #ffffff;
- box-shadow: 4rpx 6rpx 51rpx 0rpx rgba(73, 120, 240, 0.11);
- border-radius: 20rpx;
- @include flex;
- justify-content: space-around;
- flex-wrap: wrap;
- padding: 0 vww(8);
- .bottom-content {
- @include flex;
- flex-direction: column;
- height: vww(56);
- margin-right: vww(5);
- .forward-name,
- .fleet-name {
- font-size: 28rpx;
- font-weight: normal;
- color: #757575;
- line-height: 69rpx;
- }
- .forward-num,
- .fleet-num {
- font-size: 40rpx;
- font-weight: 400;
- color: #303030;
- line-height: 69rpx;
- text {
- font-size: 30rpx;
- }
- }
+ background: linear-gradient(0deg, #ffffff 0%, #0055fe 100%);
+ background-size: contain;
+ position: relative;
+ top: 0;
+
+ .top-container {
+ width: 468rpx;
+ height: 38rpx;
+ position: relative;
+ top: vww(48);
+ @include flex margin-left: vww(10);
+
+ .top-title {
+ width: 226rpx;
+ height: 36rpx;
+ font-size: 38rpx;
+ font-weight: normal;
+ color: #fff;
+ line-height: 69rpx;
}
}
- }
- }
- .block-top {
- width: 94%;
- margin: vww(15);
- @include flex;
- .total {
- height: 30rpx;
- line-height: vww(15);
- font-size: 28rpx;
- font-weight: normal;
- color: #757575;
- text {
- width: 118rpx;
- height: 30rpx;
- line-height: vww(15);
- font-size: 40rpx;
- font-weight: 400;
- color: #f81414;
+
+ .middle-container {
+ width: 626rpx;
+ height: 34rpx;
+ margin: vww(27) vww(31) 0 vww(31);
+ @include flex;
+ position: relative;
+ top: vww(54);
+
+ .dept-name {
+ min-width: 100rpx;
+ font-size: 32rpx;
+ font-weight: normal;
+ color: #ffffff;
+ line-height: 69rpx;
+ text-shadow: 0rpx 4rpx 0rpx #1a66fe;
+ }
}
- }
- }
- .main-banner {
- width: 100%;
- @include flex;
- justify-content: center;
- .main-block {
- width: 690rpx;
- background: #ffffff;
- box-shadow: 4rpx 6rpx 51rpx 0rpx rgba(73, 120, 240, 0.11);
- border-radius: 20rpx;
- .main-container {
+
+ .bottom-container {
width: 100%;
@include flex;
justify-content: center;
- flex-direction: column;
- background-color: #fff;
- &_content {
- width: 96%;
- height: 194rpx;
- @include flex;
- flex-direction: column;
- justify-content: space-around;
- align-items: flex-start;
- margin-top: vww(8);
- position: relative;
- .arrow-icon {
- position: absolute;
- right: vww(10);
- top: vww(17);
- }
- .divider {
- position: absolute;
- width: 94%;
- height: vww(1);
- margin: 0 auto;
- border-bottom: 1px soild #d6d6d6;
- left: vww(15);
- bottom: vww(18);
- }
- .first-line {
- width: 50%;
- @include flex;
- margin: 0 vww(15);
- .car-num {
- height: 31rpx;
- font-size: 30rpx;
- font-weight: 300;
- color: #303030;
- }
- .order-type {
- border: 2px solid #035cfb;
- border-radius: 4rpx;
- color: #035cfb;
- padding: vww(2) vww(4);
- text-align: center;
- }
- }
- .second-line {
- width: 94%;
- height: vww(14);
- margin: 0 vww(15);
- @include flex;
- justify-content: space-between;
- .line-content {
- width: 40%;
- @include flex &_text {
- width: 69rpx;
- height: 29rpx;
- line-height: 29rpx;
- font-size: 28rpx;
- font-weight: 400;
- color: #919090;
- }
- &_num {
- height: 29rpx;
- line-height: 29rpx;
- font-size: 38rpx;
- font-weight: 400;
- color: #035cfb;
- }
- }
- }
- }
- }
- }
- }
- .fayunPlanBody {
- width: 94%;
- margin: 0 auto;
+ margin-top: vww(80);
- .compDetails {
- width: 94%;
- margin: vww(24) auto 0 auto;
- .comp {
- font-size: vww(16);
- font-weight: 400;
- padding: 0 vww(10);
- height: vww(40);
- line-height: vww(40);
- border: 1px solid #ebeef5;
- border-bottom: none;
- background-color: #f5f5f5;
+ .bottom-block {
+ width: 690rpx;
+ min-height: 185rpx;
+ background: #ffffff;
+ box-shadow: 4rpx 6rpx 51rpx 0rpx rgba(73, 120, 240, 0.11);
+ border-radius: 20rpx;
+ @include flex;
+ justify-content: space-around;
+ flex-wrap: wrap;
+ padding: 0 vww(8);
+
+ .bottom-content {
+ @include flex;
+ flex-direction: column;
+ height: vww(56);
+ margin-right: vww(5);
+
+ .forward-name,
+ .fleet-name {
+ font-size: 28rpx;
+ font-weight: normal;
+ color: #757575;
+ line-height: 69rpx;
+ }
+
+ .forward-num,
+ .fleet-num {
+ font-size: 40rpx;
+ font-weight: 400;
+ color: #303030;
+ line-height: 69rpx;
+
+ text {
+ font-size: 30rpx;
+ }
+ }
+ }
+ }
}
}
- .card {
+
+ .block-top {
width: 94%;
- height: vww(150);
- margin: vww(24) auto 0 auto;
- background-color: #fff;
- border-radius: 4px;
- box-shadow: 0 2px 12px 0 #ebeef5;
- position: relative;
- display: flex;
- justify-content: center;
- align-items: flex-start;
- .coal-status,
- .coal-clean,
- .coal-allowance,
- .coal-carNo {
- width: 50%;
- margin-top: vww(30);
- height: vww(50);
- text-align: center;
- .label-title {
- color: #909399;
- }
- .label-value {
- min-width: vww(85);
- margin-top: vww(10);
- color: #606266;
+ margin: vww(15);
+ @include flex;
+
+ .total {
+ height: 30rpx;
+ line-height: vww(15);
+ font-size: 28rpx;
+ font-weight: normal;
+ color: #757575;
+
+ text {
+ width: 118rpx;
+ height: 30rpx;
+ line-height: vww(15);
+ font-size: 40rpx;
+ font-weight: 400;
+ color: #f81414;
}
}
- .more-button {
- width: vww(60);
- position: absolute;
- top: vww(100);
+ }
+
+ .main-banner {
+ width: 100%;
+ @include flex;
+ justify-content: center;
+
+ .main-block {
+ width: 690rpx;
+ background: #ffffff;
+ box-shadow: 4rpx 6rpx 51rpx 0rpx rgba(73, 120, 240, 0.11);
+ border-radius: 20rpx;
+
+ .main-container {
+ width: 100%;
+ @include flex;
+ justify-content: center;
+ flex-direction: column;
+ background-color: #fff;
+
+ &_content {
+ width: 96%;
+ height: 194rpx;
+ @include flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: flex-start;
+ margin-top: vww(8);
+ position: relative;
+
+ .arrow-icon {
+ position: absolute;
+ right: vww(10);
+ top: vww(17);
+ }
+
+ .divider {
+ position: absolute;
+ width: 94%;
+ height: vww(1);
+ margin: 0 auto;
+ border-bottom: 1px soild #d6d6d6;
+ left: vww(15);
+ bottom: vww(18);
+ }
+
+ .first-line {
+ width: 50%;
+ @include flex;
+ margin: 0 vww(15);
+
+ .car-num {
+ height: 31rpx;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #303030;
+ }
+
+ .order-type {
+ border: 2px solid #035cfb;
+ border-radius: 4rpx;
+ color: #035cfb;
+ padding: vww(2) vww(4);
+ text-align: center;
+ }
+ }
+
+ .second-line {
+ width: 94%;
+ height: vww(14);
+ margin: 0 vww(15);
+ @include flex;
+ justify-content: space-between;
+
+ .line-content {
+ width: 40%;
+
+ @include flex &_text {
+ width: 69rpx;
+ height: 29rpx;
+ line-height: 29rpx;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #919090;
+ }
+
+ &_num {
+ height: 29rpx;
+ line-height: 29rpx;
+ font-size: 38rpx;
+ font-weight: 400;
+ color: #035cfb;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ .fayunPlanBody {
+ width: 94%;
+ margin: 0 auto;
+
+ .compDetails {
+ width: 94%;
+ margin: vww(24) auto 0 auto;
+
+ .comp {
+ font-size: vww(16);
+ font-weight: 400;
+ padding: 0 vww(10);
+ height: vww(40);
+ line-height: vww(40);
+ border: 1px solid #ebeef5;
+ border-bottom: none;
+ background-color: #f5f5f5;
+ }
+ }
+
+ .card {
+ width: 94%;
+ height: vww(150);
+ margin: vww(24) auto 0 auto;
+ background-color: #fff;
+ border-radius: 4px;
+ box-shadow: 0 2px 12px 0 #ebeef5;
+ position: relative;
display: flex;
justify-content: center;
- }
- }
- // 琛ㄦ牸鏍峰紡
- .uni-table {
- .uni-table-tr {
- padding: 0;
- border: vww(1) solid #c6c6c6;
- .uni-table-th {
- font-size: vww(14);
- height: vww(30);
- line-height: vww(30);
- padding: vww(5) vww(10);
- color: #111111;
- font-weight: 500;
- background: #e2e2e2;
+ align-items: flex-start;
+
+ .coal-status,
+ .coal-clean,
+ .coal-allowance,
+ .coal-carNo {
+ width: 50%;
+ margin-top: vww(30);
+ height: vww(50);
+ text-align: center;
+
+ .label-title {
+ color: #909399;
+ }
+
+ .label-value {
+ min-width: vww(85);
+ margin-top: vww(10);
+ color: #606266;
+ }
}
- .uni-table-td {
- font-size: vww(14);
- font-weight: 400;
- height: vww(30);
- line-height: vww(30);
- padding: vww(5) vww(10);
- color: #111111;
+
+ .more-button {
+ width: vww(60);
+ position: absolute;
+ top: vww(100);
+ display: flex;
+ justify-content: center;
+ }
+ }
+
+ // 琛ㄦ牸鏍峰紡
+ .uni-table {
+ .uni-table-tr {
+ padding: 0;
+ border: vww(1) solid #c6c6c6;
+
+ .uni-table-th {
+ font-size: vww(14);
+ height: vww(30);
+ line-height: vww(30);
+ padding: vww(5) vww(10);
+ color: #111111;
+ font-weight: 500;
+ background: #e2e2e2;
+ }
+
+ .uni-table-td {
+ font-size: vww(14);
+ font-weight: 400;
+ height: vww(30);
+ line-height: vww(30);
+ padding: vww(5) vww(10);
+ color: #111111;
+ }
}
}
}
}
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue
index bd64aac..837d437 100644
--- a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue
+++ b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue
@@ -57,7 +57,8 @@
</view>
</view>
</view>
- <view class="origin-info" v-if="yyDailyList.orderType == '澶栬喘' || yyDailyList.orderType == '鍐呰喘' || yyDailyList.orderType == '杞嚭'">
+ <view class="origin-info"
+ v-if="yyDailyList.orderType == '澶栬喘' || yyDailyList.orderType == '鍐呰喘' || yyDailyList.orderType == '杞叆'">
<combined-title title="鍘熷彂淇℃伅"></combined-title>
<view class="body-container">
<view class="container-block">
@@ -71,7 +72,7 @@
<view class="">{{ yyDailyList.hairTwo || 0 }}</view>
</view>
</view>
- <view class="body-container">
+ <view class="body-container last">
<view class="container-block">
<view class="">鍑�閲�</view>
<view class="">{{ yyDailyList.cleanTwo || 0 }}</view>
@@ -83,106 +84,121 @@
</template>
<script>
-import combinedTitle from '@/components/combined-title/combined-title.vue';
+ import combinedTitle from '@/components/combined-title/combined-title.vue';
-export default {
- components: {
- combinedTitle
- },
- onLoad(params) {
- this.id = params.id;
- },
- onShow() {
- this.GetOrderPlanDetail();
- },
- data() {
- return {
- id: '',
- yyDailyList: {},
- orderPlanDetail: {},
- coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠', '杩涘叆鍦洪櫌'],
- index: ''
- };
- },
- methods: {
- GetOrderPlanDetail() {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- this.$reqGet('getTakeCoal', { takeCoalId: this.id }).then(res => {
- if (res.code == 0) {
- this.orderPlanDetail = res.data;
- this.yyDailyList = res.data;
- console.log(this.yyDailyList);
- uni.hideLoading();
- } else {
- this.$u.toast('鍔犺浇澶辫触');
- }
- });
+ export default {
+ components: {
+ combinedTitle
+ },
+ onLoad(params) {
+ this.id = params.id;
+ },
+ onShow() {
+ this.GetOrderPlanDetail();
+ },
+ data() {
+ return {
+ id: '',
+ yyDailyList: {},
+ orderPlanDetail: {},
+ coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
+ '杩涘叆鍦洪櫌'
+ ],
+ index: ''
+ };
+ },
+ methods: {
+ GetOrderPlanDetail() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ this.$reqGet('getTakeCoal', { takeCoalId: this.id }).then(res => {
+ if (res.code == 0) {
+ this.orderPlanDetail = res.data;
+ this.yyDailyList = res.data;
+ console.log(this.yyDailyList);
+ uni.hideLoading();
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
+ }
+ });
+ }
}
- }
-};
+ };
</script>
-<style scoped lang="scss">
-@mixin flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-.main {
- width: 100%;
- margin-top: vww(10);
- color: #303030;
- @include flex;
- flex-direction: column;
- .main-body {
- width: 690rpx;
- height: 1062rpx;
- background: #ffffff;
- box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
- border-radius: 20rpx;
- @include flex flex-direction: column;
- align-items: flex-start;
- .body-container {
- color: #303030;
- width: 100%;
- height: vww(56);
- border-bottom: vww(1) solid #d6d6d6;
- @include flex;
- justify-content: center;
- .container-block {
- width: 96%;
- height: vww(56);
- @include flex;
- }
- }
- .last {
- border-bottom: none;
- }
+<style scoped
+ lang="scss">
+ @mixin flex {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
}
- .origin-info {
- width: 690rpx;
- min-height: 300rpx;
- margin-top: 20rpx;
- margin-bottom: 20rpx;
- background: #ffffff;
- box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
- border-radius: 20rpx;
+
+ .main {
+ width: 100%;
+ margin-top: vww(10);
+ color: #303030;
@include flex;
flex-direction: column;
- align-items: flex-start;
- .body-container {
- width: 100%;
- height: vww(56);
- border-bottom: vww(1) solid #d6d6d6;
- @include flex;
- justify-content: center;
- .container-block {
- width: 94%;
+
+ .main-body {
+ width: 690rpx;
+ height: 1062rpx;
+ background: #ffffff;
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
+ border-radius: 20rpx;
+ @include flex flex-direction: column;
+ align-items: flex-start;
+
+ .body-container {
+ color: #303030;
+ width: 100%;
+ height: vww(56);
+ border-bottom: vww(1) solid #d6d6d6;
@include flex;
+ justify-content: center;
+
+ .container-block {
+ width: 96%;
+ height: vww(56);
+ @include flex;
+ }
+ }
+
+ .last {
+ border-bottom: none;
+ }
+ }
+
+ .origin-info {
+ width: 690rpx;
+ min-height: 300rpx;
+ margin-top: 20rpx;
+ margin-bottom: 20rpx;
+ background: #ffffff;
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
+ border-radius: 20rpx;
+ @include flex;
+ flex-direction: column;
+ align-items: flex-start;
+
+ .body-container {
+ width: 100%;
+ height: vww(56);
+ border-bottom: vww(1) solid #d6d6d6;
+ @include flex;
+ justify-content: center;
+
+ .container-block {
+ width: 94%;
+ @include flex;
+ }
+ }
+
+ .last {
+ border-bottom: none;
}
}
}
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/customer-page/customer-my/customer-my.vue b/pages/customer-page/customer-my/customer-my.vue
index 5867f1f..7d3cf26 100644
--- a/pages/customer-page/customer-my/customer-my.vue
+++ b/pages/customer-page/customer-my/customer-my.vue
@@ -1,11 +1,14 @@
<template>
<view class="customer-my">
- <view class="driver-banner"><view class="navgation">鎴戠殑</view></view>
+ <view class="driver-banner">
+ <view class="navgation">鎴戠殑</view>
+ </view>
<view class="personal-information">
<view class="personal-information-block">
<view class="block-main">
<view class="huodai">
- <combined-title title="鎴戠殑璐т唬" @rightText="addHuoDai">
+ <combined-title title="鎴戠殑璐т唬"
+ @rightText="addHuoDai">
<template v-slot:rightText>
<text>娣诲姞</text>
</template>
@@ -13,9 +16,18 @@
<view class="huodai-list">
<u-swipe-action>
<u-cell-group :border="false">
- <u-swipe-action-item :options="options1" v-for="(item, index) in huoDaiData" :key="item.userId" :name="item.userId" @click="deleteHuoDaiClick">
- <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-swipe-action-item :options="options1"
+ v-for="(item, index) in huoDaiData"
+ :key="item.userId"
+ :name="item.userId"
+ @click="deleteHuoDaiClick">
+ <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>
@@ -27,7 +39,8 @@
<view class="personal-information-block">
<view class="block-main">
<view class="fleet-container">
- <combined-title title="鎴戠殑杞﹂槦" @rightText="addFleet">
+ <combined-title title="鎴戠殑杞﹂槦"
+ @rightText="addFleet">
<template v-slot:rightText>
<text>娣诲姞</text>
</template>
@@ -35,9 +48,18 @@
<view class="fleet-list">
<u-swipe-action>
<u-cell-group :border="false">
- <u-swipe-action-item :options="options1" v-for="(item, index) in fleetData" :key="item.id" :name="item.id" @click="deleteFleetClick">
- <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-swipe-action-item :options="options1"
+ v-for="(item, index) in fleetData"
+ :key="item.id"
+ :name="item.id"
+ @click="deleteFleetClick">
+ <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>
@@ -49,412 +71,447 @@
</view>
<view class="utils-button">
- <view class="statistics"><u-button text="鐢ㄦ埛绠$悊" type="primary" @click="userManage" v-if="roleType == 1 && userEntity.isHostUser === '0'"></u-button></view>
- <view class="logout"><u-button text="閫�鍑虹櫥褰�" type="primary" @click="logout()"></u-button></view>
+ <view class="statistics"><u-button text="鐢ㄦ埛绠$悊"
+ type="primary"
+ @click="userManage"
+ v-if="roleType == 1 && userEntity.isHostUser === '0'"></u-button></view>
+ <view class="logout"><u-button text="閫�鍑虹櫥褰�"
+ type="primary"
+ @click="logout()"></u-button></view>
</view>
-
+ <u-toast ref="uToast"></u-toast>
<!-- 鏂板缓杞﹂槦寮瑰嚭妗� -->
<view class="addNewGroup">
- <u-popup :show="updateGroupShow" @close="addNewFleetPopupClose" @open="addNewFleetPopupOpen" mode="center">
- <view class="title"><u--text text="鏂板缓杞﹂槦" size="30" lineHeight="80" align="center"></u--text></view>
+ <u-popup :show="updateGroupShow"
+ @close="addNewFleetPopupClose"
+ @open="addNewFleetPopupOpen"
+ mode="center">
+ <view class="title"><u--text text="鏂板缓杞﹂槦"
+ size="30"
+ lineHeight="80"
+ align="center"></u--text></view>
<view class="addCarForm">
- <u--form labelPosition="left" :model="addGroupForm" ref="form1" labelAlign="center">
- <u-form-item label="缁勫悕" borderBottom ref="groupName" labelWidth="100">
- <u--input v-model="addGroupForm.name" border="none" placeholder="璇疯緭鍏ヨ溅闃熷悕绉�"></u--input>
+ <u--form labelPosition="left"
+ :model="addGroupForm"
+ ref="form1"
+ labelAlign="center">
+ <u-form-item label="缁勫悕"
+ borderBottom
+ ref="groupName"
+ labelWidth="100">
+ <u--input v-model="addGroupForm.name"
+ border="none"
+ placeholder="璇疯緭鍏ヨ溅闃熷悕绉�"></u--input>
</u-form-item>
<!-- <u-form-item label="杞︾墝" borderBottom ref="cars" labelWidth="80">
<u--textarea maxlength="2000" v-model="addGroupForm.carNums" placeholder="璇疯緭鍏ヨ溅鐗�" height="150"></u--textarea>
</u-form-item> -->
</u--form>
</view>
- <view class="addCarButton"><u-button text="娣诲姞" type="primary" @click="addNewGroupClick"></u-button></view>
+ <view class="addCarButton"><u-button text="娣诲姞"
+ type="primary"
+ @click="addNewGroupClick"></u-button></view>
</u-popup>
</view>
<!-- 鍒犻櫎璐т唬妯℃�佹 -->
<view class="deleteHuoDaiModal">
- <u-modal
- :show="deleteHuoDaiShow"
+ <u-modal :show="deleteHuoDaiShow"
:title="deleteHuoDaiTitle"
@close="deleteHuoDaiClose"
@cancel="deleteHuoDaiCancel"
@confirm="deleteHuoDaiConfirm"
:closeOnClickOverlay="true"
- :showCancelButton="true"
- >
+ :showCancelButton="true">
<view class="slot-content"><rich-text :nodes="deleteHuoDaiContent"></rich-text></view>
</u-modal>
</view>
<!-- 鍒犻櫎杞﹂槦妯℃�佹 -->
<view class="deleteFleetModal">
- <u-modal
- :show="deleteFleetShow"
+ <u-modal :show="deleteFleetShow"
:title="deleteFleetTitle"
@close="deleteFleetClose"
@cancel="deleteFleetCancel"
@confirm="deleteFleetConfirm"
:closeOnClickOverlay="true"
- :showCancelButton="true"
- >
+ :showCancelButton="true">
<view class="slot-content"><rich-text :nodes="deleteFleetContent"></rich-text></view>
</u-modal>
</view>
<view class="logoutModel">
- <u-modal :show="logoutShow" :title="logoutTitle" showCancelButton :content="logoutContent" @confirm="logoutConfirm" @cancel="logoutCancel"></u-modal>
+ <u-modal :show="logoutShow"
+ :title="logoutTitle"
+ showCancelButton
+ :content="logoutContent"
+ @confirm="logoutConfirm"
+ @cancel="logoutCancel"></u-modal>
</view>
</view>
</template>
<script>
-import combinedTitle from '@/components/combined-title/combined-title.vue';
-import { customerId, redirectLogin } from '@/utils/status';
-export default {
- components: {
- combinedTitle
- },
- data() {
- return {
- huoDaiData: [],
- fleetData: [],
- // 鏂板缓杞﹂槦
- addGroupForm: {
- customerId,
- name: ''
- },
- updateGroupShow: false,
- options1: [
- {
+ import combinedTitle from '@/components/combined-title/combined-title.vue';
+ import { customerId, redirectLogin } from '@/utils/status';
+ export default {
+ components: {
+ combinedTitle
+ },
+ data() {
+ return {
+ huoDaiData: [],
+ fleetData: [],
+ // 鏂板缓杞﹂槦
+ addGroupForm: {
+ customerId,
+ name: ''
+ },
+ updateGroupShow: false,
+ options1: [{
text: '鍒犻櫎'
- }
- ],
- // 鍒犻櫎璐т唬妯℃�佹
- deleteHuoDaiId: null, // 鍒犻櫎璐т唬id
- deleteHuoDaiShow: false,
- deleteHuoDaiTitle: '',
- deleteHuoDaiContent: '',
- // 鍒犻櫎杞﹂槦妯℃�佹
- deleteFleetId: null, // 鍒犻櫎杞﹂槦id
- deleteFleetShow: false,
- deleteFleetTitle: '',
- deleteFleetContent: '',
- // 閫�鍑烘ā鎬佹
- logoutShow: false,
- logoutTitle: '鎻愮ず',
- logoutContent: '鏄惁纭閫�鍑�',
- // 鐢ㄦ埛淇℃伅瀵硅薄
- userEntity: {}
- };
- },
- computed: {
- roleType() {
- return uni.getStorageSync('roleType');
+ }],
+ // 鍒犻櫎璐т唬妯℃�佹
+ deleteHuoDaiId: null, // 鍒犻櫎璐т唬id
+ deleteHuoDaiShow: false,
+ deleteHuoDaiTitle: '',
+ deleteHuoDaiContent: '',
+ // 鍒犻櫎杞﹂槦妯℃�佹
+ deleteFleetId: null, // 鍒犻櫎杞﹂槦id
+ deleteFleetShow: false,
+ deleteFleetTitle: '',
+ deleteFleetContent: '',
+ // 閫�鍑烘ā鎬佹
+ logoutShow: false,
+ logoutTitle: '鎻愮ず',
+ logoutContent: '鏄惁纭閫�鍑�',
+ // 鐢ㄦ埛淇℃伅瀵硅薄
+ userEntity: {}
+ };
+ },
+ computed: {
+ roleType() {
+ return uni.getStorageSync('roleType');
+ }
+ },
+ onShow() {
+ this.init();
+ },
+ methods: {
+ init() {
+ this.getAllHuoDaiByCustomerId();
+ this.getFleet();
+ this.getUserEntity();
+ },
+ // 鑾峰彇鐢ㄦ埛淇℃伅
+ getUserEntity() {
+ this.$reqGet('getUserEntity').then(res => {
+ this.userEntity = res.data;
+ });
+ },
+ // 鑾峰彇璐т唬鍒楄〃
+ getAllHuoDaiByCustomerId() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ this.$reqGet('getAllHuoDaiByCustomerId').then(res => {
+ uni.hideLoading();
+ this.huoDaiData = res.data;
+ });
+ },
+ // 鑾峰彇杞﹂槦鍒楄〃
+ getFleet() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ this.$reqGet('getFleet').then(res => {
+ uni.hideLoading();
+ this.fleetData = res.data;
+ });
+ },
+ // 娣诲姞璐т唬
+ addHuoDai() {
+ uni.navigateTo({
+ url: '/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver?role=1' // 1浠h〃鐨勬槸璐т唬
+ });
+ },
+ // 娣诲姞杞﹂槦
+ addFleet() {
+ this.updateGroupShow = true;
+ },
+ addNewFleetPopupClose() {
+ this.updateGroupShow = false;
+ },
+ addNewFleetPopupOpen() {
+ console.log('娣诲姞杞﹂槦鎵撳紑');
+ },
+ // 纭鏂板缓杞﹂槦鎸夐挳
+ addNewGroupClick() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ // 鏂板缓杞﹂槦
+ this.$reqPost('saveFleet', this.addGroupForm, 'params')
+ .then(res => {
+ uni.hideLoading();
+ let v = res.code == 0
+ if (v) {
+ this.$refs.uToast.show({
+ type: 'default',
+ message: "娣诲姞鎴愬姛",
+ })
+ } else {
+ this.$refs.uToast.show({
+ type: 'error',
+ message: res.msg ? res.msg : '娣诲姞澶辫触',
+ })
+ }
+ console.log(res.msg, '鏂板缓杞﹂槦');
+ })
+ .then(r => {
+ this.getFleet();
+ });
+ this.updateGroupShow = false;
+ },
+ // 鍒犻櫎璐т唬
+ deleteHuoDaiClick(args) {
+ console.log(args, '璐т唬id');
+ this.deleteHuoDaiId = args.name;
+ this.deleteHuoDaiShow = true;
+ this.huoDaiData.forEach(item => {
+ if (item.userId == this.deleteHuoDaiId) {
+ this.deleteHuoDaiContent = '纭鍒犻櫎璐т唬' + item.name + '鍚楋紵';
+ }
+ });
+ },
+ deleteHuoDaiClose() {
+ this.deleteHuoDaiShow = false;
+ },
+ deleteHuoDaiCancel() {
+ this.deleteHuoDaiShow = false;
+ },
+ deleteHuoDaiConfirm() {
+ this.deleteHuoDaiShow = false;
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ this.$reqPost('deleteHuoDai', { id: this.deleteHuoDaiId }, 'params')
+ .then(res => {
+ uni.hideLoading();
+ if (res.code == 0) {
+ this.$u.toast('鍒犻櫎鎴愬姛');
+ } else {
+ this.$u.toast(res.msg ? res.msg : '鍒犻櫎澶辫触');
+ }
+ })
+ .then(r => {
+ this.getAllHuoDaiByCustomerId();
+ });
+ },
+ // 鍒犻櫎杞﹂槦
+ deleteFleetClick(args) {
+ console.log(args.name, '杞﹂槦id');
+ this.deleteFleetId = args.name;
+ this.deleteFleetShow = true;
+ this.fleetData.forEach(item => {
+ if (item.id == this.deleteFleetId) {
+ this.deleteFleetContent = '纭鍒犻櫎杞﹂槦' + item.name;
+ }
+ });
+ },
+ deleteFleetClose() {
+ this.deleteFleetShow = false;
+ },
+ deleteFleetCancel() {
+ this.deleteFleetShow = false;
+ },
+ deleteFleetConfirm() {
+ this.deleteFleetShow = false;
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ this.$reqPost('deleteFleet', { id: this.deleteFleetId }, 'params')
+ .then(res => {
+ console.log('鍒犻櫎杞﹂槦', res);
+ if (res.code == 0) {
+ this.$u.toast('鍒犻櫎鎴愬姛');
+ } else {
+ this.$u.toast(res.msg ? res.msg : '鍒犻櫎澶辫触');
+ }
+ uni.hideLoading();
+ })
+ .then(() => {
+ this.getFleet();
+ });
+ },
+ // 璐т唬璇︽儏
+ toFreightForwarderDetails(userId) {
+ uni.navigateTo({
+ url: `/pages/customer-page/freight-forwarder-details/freight-forwarder-details?userId=${userId}`
+ });
+ },
+ // 杞﹂槦璇︽儏
+ tofleetDetails(id) {
+ uni.navigateTo({
+ url: `/pages/customer-page/fleet-management/fleet-management?id=${id}`
+ });
+ },
+ logout() {
+ this.logoutShow = true;
+ },
+ logoutConfirm() {
+ redirectLogin();
+ },
+ logoutCancel() {
+ this.logoutShow = false;
+ },
+ // 璺宠浆鐢ㄦ埛绠$悊椤甸潰
+ userManage() {
+ uni.navigateTo({
+ url: '/pages/customer-page/customer-my/userMange/userMange'
+ });
+ }
}
- },
- onShow() {
- this.init();
- },
- methods: {
- init() {
- this.getAllHuoDaiByCustomerId();
- this.getFleet();
- this.getUserEntity();
- },
- // 鑾峰彇鐢ㄦ埛淇℃伅
- getUserEntity() {
- this.$reqGet('getUserEntity').then(res => {
- this.userEntity = res.data;
- });
- },
- // 鑾峰彇璐т唬鍒楄〃
- getAllHuoDaiByCustomerId() {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- this.$reqGet('getAllHuoDaiByCustomerId').then(res => {
- uni.hideLoading();
- this.huoDaiData = res.data;
- });
- },
- // 鑾峰彇杞﹂槦鍒楄〃
- getFleet() {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- this.$reqGet('getFleet').then(res => {
- uni.hideLoading();
- this.fleetData = res.data;
- });
- },
- // 娣诲姞璐т唬
- addHuoDai() {
- uni.navigateTo({
- url: '/pages/customer-page/addTo-freightForwarder-driver/addTo-freightForwarder-driver?role=1' // 1浠h〃鐨勬槸璐т唬
- });
- },
- // 娣诲姞杞﹂槦
- addFleet() {
- this.updateGroupShow = true;
- },
- addNewFleetPopupClose() {
- this.updateGroupShow = false;
- },
- addNewFleetPopupOpen() {
- console.log('娣诲姞杞﹂槦鎵撳紑');
- },
- // 纭鏂板缓杞﹂槦鎸夐挳
- addNewGroupClick() {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- // 鏂板缓杞﹂槦
- this.$reqPost('saveFleet', this.addGroupForm, 'params')
- .then(res => {
- uni.hideLoading();
- console.log(res, '鏂板缓杞﹂槦');
- if (res.code == 0) {
- this.$u.toast('娣诲姞鎴愬姛');
- } else {
- this.$u.toast(res.msg ? res.msg : '娣诲姞澶辫触');
- }
- })
- .then(r => {
- this.getFleet();
- });
- this.updateGroupShow = false;
- },
- // 鍒犻櫎璐т唬
- deleteHuoDaiClick(args) {
- console.log(args, '璐т唬id');
- this.deleteHuoDaiId = args.name;
- this.deleteHuoDaiShow = true;
- this.huoDaiData.forEach(item => {
- if (item.userId == this.deleteHuoDaiId) {
- this.deleteHuoDaiContent = '纭鍒犻櫎璐т唬' + item.name + '鍚楋紵';
- }
- });
- },
- deleteHuoDaiClose() {
- this.deleteHuoDaiShow = false;
- },
- deleteHuoDaiCancel() {
- this.deleteHuoDaiShow = false;
- },
- deleteHuoDaiConfirm() {
- this.deleteHuoDaiShow = false;
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- this.$reqPost('deleteHuoDai', { id: this.deleteHuoDaiId }, 'params')
- .then(res => {
- uni.hideLoading();
- if (res.code == 0) {
- this.$u.toast('鍒犻櫎鎴愬姛');
- } else {
- this.$u.toast(res.msg ? res.msg : '鍒犻櫎澶辫触');
- }
- })
- .then(r => {
- this.getAllHuoDaiByCustomerId();
- });
- },
- // 鍒犻櫎杞﹂槦
- deleteFleetClick(args) {
- console.log(args.name, '杞﹂槦id');
- this.deleteFleetId = args.name;
- this.deleteFleetShow = true;
- this.fleetData.forEach(item => {
- if (item.id == this.deleteFleetId) {
- this.deleteFleetContent = '纭鍒犻櫎杞﹂槦' + item.name;
- }
- });
- },
- deleteFleetClose() {
- this.deleteFleetShow = false;
- },
- deleteFleetCancel() {
- this.deleteFleetShow = false;
- },
- deleteFleetConfirm() {
- this.deleteFleetShow = false;
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- this.$reqPost('deleteFleet', { id: this.deleteFleetId }, 'params')
- .then(res => {
- console.log('鍒犻櫎杞﹂槦', res);
- if (res.code == 0) {
- this.$u.toast('鍒犻櫎鎴愬姛');
- } else {
- this.$u.toast(res.msg ? res.msg : '鍒犻櫎澶辫触');
- }
- uni.hideLoading();
- })
- .then(() => {
- this.getFleet();
- });
- },
- // 璐т唬璇︽儏
- toFreightForwarderDetails(userId) {
- uni.navigateTo({
- url: `/pages/customer-page/freight-forwarder-details/freight-forwarder-details?userId=${userId}`
- });
- },
- // 杞﹂槦璇︽儏
- tofleetDetails(id) {
- uni.navigateTo({
- url: `/pages/customer-page/fleet-management/fleet-management?id=${id}`
- });
- },
- logout() {
- this.logoutShow = true;
- },
- logoutConfirm() {
- redirectLogin();
- },
- logoutCancel() {
- this.logoutShow = false;
- },
- // 璺宠浆鐢ㄦ埛绠$悊椤甸潰
- userManage() {
- uni.navigateTo({
- url: '/pages/customer-page/customer-my/userMange/userMange'
- });
- }
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-@mixin flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-.utils-button {
- margin-top: vww(35);
- .statistics,
- .logout {
- margin-top: vww(10);
- margin-bottom: vww(10);
- /deep/ .u-button {
- width: 631rpx;
- height: 74rpx;
- border: 2px solid #3b56eb;
- background-color: #fff;
- color: #3b56eb;
- border-radius: 37rpx 37rpx 37rpx 37rpx;
- }
- }
-}
-
-::v-deep.customer-my {
- width: 100%;
- margin: vww(90) auto;
- .driver-banner {
- width: 100%;
- height: 430rpx;
- background: linear-gradient(0deg, #ffffff 0%, #0055fe 100%);
- background-size: contain;
- position: fixed;
- top: 0;
- .navgation {
- width: 80rpx;
- height: 37rpx;
- font-size: 40rpx;
- font-weight: normal;
- color: #ffffff;
- line-height: 69rpx;
- margin: vww(60) auto;
- }
- }
- .personal-information {
- width: 100%;
+<style lang="scss"
+ scoped>
+ @mixin flex {
display: flex;
+ justify-content: space-between;
align-items: center;
- justify-content: space-around;
- flex-direction: column;
- position: relative;
- top: vww(20);
- &-block {
- width: 690rpx;
- min-height: 478rpx;
- background: #ffffff;
- box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
- border-radius: 20rpx;
+ }
+
+ .utils-button {
+ margin-top: vww(35);
+
+ .statistics,
+ .logout {
+ margin-top: vww(10);
+ margin-bottom: vww(10);
+
+ /deep/ .u-button {
+ width: 631rpx;
+ height: 74rpx;
+ border: 2px solid #3b56eb;
+ background-color: #fff;
+ color: #3b56eb;
+ border-radius: 37rpx 37rpx 37rpx 37rpx;
+ }
+ }
+ }
+
+ ::v-deep.customer-my {
+ width: 100%;
+ margin: vww(90) auto;
+
+ .driver-banner {
+ width: 100%;
+ height: 430rpx;
+ background: linear-gradient(0deg, #ffffff 0%, #0055fe 100%);
+ background-size: contain;
+ position: fixed;
+ top: 0;
+
+ .navgation {
+ width: 80rpx;
+ height: 37rpx;
+ font-size: 40rpx;
+ font-weight: normal;
+ color: #ffffff;
+ line-height: 69rpx;
+ margin: vww(60) auto;
+ }
+ }
+
+ .personal-information {
+ width: 100%;
display: flex;
+ align-items: center;
+ justify-content: space-around;
flex-direction: column;
- justify-content: space-between;
- margin-top: vww(8);
- .block-main {
- width: 636rpx;
- margin: vww(10) vww(14);
+ position: relative;
+ top: vww(20);
+
+ &-block {
+ width: 690rpx;
+ min-height: 478rpx;
+ background: #ffffff;
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
+ border-radius: 20rpx;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ margin-top: vww(8);
+
+ .block-main {
+ width: 636rpx;
+ margin: vww(10) vww(14);
+ }
}
}
- }
- .huodai {
- .huodai-list {
- .u-swipe-action {
- .u-swipe-action-item {
- .u-swipe-action-item__right {
- .u-swipe-action-item__right__button {
- .u-swipe-action-item__right__button__wrapper {
- background-color: #f56c6c !important;
+ .huodai {
+ .huodai-list {
+ .u-swipe-action {
+ .u-swipe-action-item {
+ .u-swipe-action-item__right {
+ .u-swipe-action-item__right__button {
+ .u-swipe-action-item__right__button__wrapper {
+ background-color: #f56c6c !important;
+ }
}
}
}
}
}
}
- }
- .fleet-container {
- .fleet-list {
- .u-swipe-action {
- .u-swipe-action-item {
- .u-swipe-action-item__right {
- .u-swipe-action-item__right__button {
- .u-swipe-action-item__right__button__wrapper {
- background-color: #f56c6c !important;
+ .fleet-container {
+ .fleet-list {
+ .u-swipe-action {
+ .u-swipe-action-item {
+ .u-swipe-action-item__right {
+ .u-swipe-action-item__right__button {
+ .u-swipe-action-item__right__button__wrapper {
+ background-color: #f56c6c !important;
+ }
}
}
}
}
}
}
- }
- // 鏂板缓杞﹂槦
- .addNewGroup {
- .u-popup {
- .u-popup__content {
- width: 94%;
- height: vww(160);
- border-radius: 1%;
+ // 鏂板缓杞﹂槦
+ .addNewGroup {
+ .u-popup {
+ .u-popup__content {
+ width: 94%;
+ height: vww(160);
+ border-radius: 1%;
- .title {
- width: 100%;
- text-align: center;
- font-size: 20px;
+ .title {
+ width: 100%;
+ text-align: center;
+ font-size: 20px;
- .u-text {
- .u-text__value {
+ .u-text {
+ .u-text__value {}
}
}
- }
- .addCarForm {
- width: 80%;
- margin: 0 auto vww(30);
- }
+ .addCarForm {
+ width: 80%;
+ margin: 0 auto vww(30);
+ }
- .addCarButton {
- width: 40%;
- margin: 0 auto;
+ .addCarButton {
+ width: 40%;
+ margin: 0 auto;
+ }
}
}
}
}
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
index e2c418d..0285a75 100644
--- a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
+++ b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
@@ -32,9 +32,11 @@
<view class="left"><combined-title :title="item.condition"></combined-title></view>
<view class="card-top_num">
{{ item.taskCoalList.length }}杞{
- item.taskCoalList.reduce((prev, cur) => {
- return prev + cur.clean;
- }, 0)
+ item.taskCoalList
+ .reduce((prev, cur) => {
+ return prev + cur.clean;
+ }, 0)
+ .toFixed(2)
}}鍚�
</view>
</view>
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 3b23e08..7042ecc 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
@@ -1,46 +1,56 @@
<template>
<view class="bill-of-lading-details">
- <view class="top-banner" style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/loadingbanner.png') no-repeat;background-size: cover;">
+ <view class="top-banner"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/loadingbanner.png') no-repeat;background-size: cover;">
<view class="top-information">
- <view class="cutomer-name" v-if="orderType == '杞叆' || orderType == '杞嚭'">鐓ゅ満:{{ coalDetailsData.filedName || '' }}</view>
- <view class="cutomer-name" v-else>瀹㈡埛:{{ coalDetailsData.customerName || '' }}</view>
+ <view class="cutomer-name"
+ v-if="orderType == '杞叆' || orderType == '杞嚭'">鐓ゅ満:{{ coalDetailsData.toFiledName || '' }}</view>
+ <view class="cutomer-name"
+ v-else>瀹㈡埛:{{ coalDetailsData.customerName || '' }}</view>
<view class="fild-name">
<view class="">鐭垮満:{{ coalDetailsData.deptName || '鏆傛棤' }}</view>
- <view class="" v-if="orderType == '杞叆' || orderType == '杞嚭'">鐓ゅ満:{{ coalDetailsData.toFiledName || '' }}</view>
- <view class="" v-else>鐓ゅ満:{{ coalDetailsData.filedName || '鏆傛棤' }}</view>
+ <view class=""
+ v-if="orderType == '杞叆' || orderType == '杞嚭'">鐓ゅ満:{{ coalDetailsData.filedName || '' }}</view>
+ <view class=""
+ v-else>鐓ゅ満:{{ coalDetailsData.filedName || '鏆傛棤' }}</view>
</view>
</view>
<view class="block-information">
<view class="block-main">
<view class="basic">
<view class="coalName">{{ coalDetailsData.coalName }}</view>
- <!-- <view class="black-block"></view>
- <view class="order-type">{{ coalDetailsData.orderType }}</view> -->
- <view
- class="status-button"
+ <view class="status-button"
style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/statusbutton.png') no-repeat;
- background-size: cover;"
- >
+ background-size: cover;">
{{ coalStatus[coalDetailsData.status] || '' }}
</view>
</view>
<view class="time">
- <view class="time-icon"><u-icon name="clock" color="#515151" size="40"></u-icon></view>
+ <view class="time-icon"><u-icon name="clock"
+ color="#515151"
+ size="40"></u-icon></view>
<view class="send-date">{{ coalDetailsData.sendDate }}</view>
</view>
<view class="coal-code">鎻愮叅鍗曠紪鍙�: {{ coalDetailsData.code || '' }}</view>
- <view class="order-code">璁㈠崟缂栧彿: {{ coalDetailsData.orderCode || '' }}</view>
+ <view class="order-code">
+ 璁㈠崟缂栧彿: {{ coalDetailsData.orderCode || '' }}</view>
<view class="weigh-item">
<view class="item">
- <view class="concrete" style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/skin.png') no-repeat;background-size: cover;">鐨�</view>
+ <view class="concrete"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/skin.png') no-repeat;background-size: cover;">
+ 鐨�</view>
<view class="num">{{ coalDetailsData.skin }}</view>
</view>
<view class="item">
- <view class="concrete" style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/hair.png') no-repeat;background-size: cover;">姣�</view>
+ <view class="concrete"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/hair.png') no-repeat;background-size: cover;">
+ 姣�</view>
<view class="num">{{ coalDetailsData.hair }}</view>
</view>
<view class="item">
- <view class="concrete" style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clean.png') no-repeat;background-size: cover;">鍑�</view>
+ <view class="concrete"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clean.png') no-repeat;background-size: cover;">
+ 鍑�</view>
<view class="num">{{ coalDetailsData.clean }}</view>
</view>
</view>
@@ -49,494 +59,454 @@
</view>
<view class="timeLine">
- <u-steps :current="dayRZ.length - 1" direction="column" dot>
- <u-steps-item :title="item.taskStatusDes" v-for="(item, index) in dayRZ" :key="index"></u-steps-item>
+ <u-steps :current="dayRZ.length - 1"
+ direction="column"
+ dot>
+ <u-steps-item :title="item.taskStatusDes"
+ v-for="(item, index) in dayRZ"
+ :key="index"></u-steps-item>
</u-steps>
+ </view>
+ <view class="white-block">
+
</view>
<view class="utilsBox">
<view class="utils_chil utils_chilTop">
<view class="top-button">
- <u-button text="绛惧埌" type="primary" plain @click="arriveClick" shape="circle" :disabled="coalDetailsData.status >= 2"></u-button>
- <u-button text="鍏ュ満鐢宠" type="primary" plain @click="rcsqClick" shape="circle" :disabled="coalDetailsData.status >= 3"></u-button>
+ <u-button text="绛惧埌"
+ type="primary"
+ plain
+ @click="arriveClick"
+ shape="circle"
+ :disabled="coalDetailsData.status >= 2"></u-button>
+ <u-button text="鍏ュ満鐢宠"
+ type="primary"
+ plain
+ @click="rcsqClick"
+ shape="circle"
+ :disabled="coalDetailsData.status >= 3"></u-button>
</view>
<view class="bottom-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>
+ <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>
</view>
<view class="weigh-ability">
- <view class="weigh-button"><u-button text="灞曠ず鎻愮叅鍗�" @click="showCaolPickUpBill" type="primary" shape="circle"></u-button></view>
- <view class="weigh-button"><u-button text="涓婄璁¢噺" @click="cengZhongClick" type="primary" shape="circle"></u-button></view>
+ <view class="weigh-button"><u-button text="灞曠ず鎻愮叅鍗�"
+ @click="showCaolPickUpBill"
+ type="primary"
+ shape="circle"></u-button></view>
+ <view class="weigh-button"><u-button text="涓婄璁¢噺"
+ @click="cengZhongClick"
+ type="primary"
+ shape="circle"></u-button></view>
</view>
<view class="evacuationModal">
- <u-modal
- :show="evacuationModalShow"
+ <u-modal :show="evacuationModalShow"
:title="evacuationTitle"
:content="evacuationContent"
:showCancelButton="true"
@confirm="evacuationConfirm"
- @cancel="evacuationCancel"
- ></u-modal>
+ @cancel="evacuationCancel"></u-modal>
+ </view>
+ <view class="completeOutSale">
+ <u-modal :show="completeOutSaleShow"
+ title="纭"
+ content="鏄惁瀹屾垚澶栭攢鎻愮叅鍗�"
+ :showCancelButton="true"
+ @confirm="completeOutSaleConfirm"
+ @cancel="completeOutSaleCancel"></u-modal>
</view>
</view>
</template>
<script>
-import { webSocketUrl } from '@/api/request.js';
-import { mapState, mapMutations } from 'vuex';
-export default {
- onLoad(value) {
- if (value.orderPlanId && value.yyId) {
+ import { webSocketUrl } from '@/api/request.js';
+ import { mapState, mapMutations } from 'vuex';
+ export default {
+ onLoad(value) {
this.orderPlanId = value.orderPlanId;
this.yyId = value.yyId;
- }
- // wx.startRecord();
- },
- data() {
- return {
- orderPlanId: null,
- yyId: null,
- dayRZ: [],
- coalDetailsData: {}, // 鎻愮叅鍗曡鎯�
- currentPageCoalStatus: 0, // 褰撳墠椤甸潰鎻愮叅鍗曠姸鎬�
- // 鑾峰彇鎵�鍦ㄧ鎴垮弬鏁�
- getWeightHouseObj: {
- deptId: '',
- filedId: '',
- tmId: '',
- tmCode: '',
- carNo: ''
+ if (value.overTmWaixiao) {
+ this.overTmWaixiao = value.overTmWaixiao
+ this.getWeightHouseObj.overTmWaixiao = value.overTmWaixiao
+ }
+ },
+ data() {
+ return {
+ orderPlanId: null,
+ yyId: null,
+ dayRZ: [],
+ coalDetailsData: {}, // 鎻愮叅鍗曡鎯�
+ currentPageCoalStatus: 0, // 褰撳墠椤甸潰鎻愮叅鍗曠姸鎬�
+ // 鑾峰彇鎵�鍦ㄧ鎴垮弬鏁�
+ getWeightHouseObj: {
+ deptId: '',
+ filedId: '',
+ tmId: '',
+ tmCode: '',
+ carNo: ''
+ },
+ // 鑾峰彇鍏ュ満鐢宠鐨勫垪琛ㄩ〉闈㈠弬鏁�
+ getYuYueDataParams: {
+ deptId: '',
+ filedId: '',
+ sendDate: ''
+ },
+ // 鑾峰彇瀹㈡湇openid鍙傛暟
+ getServiceOpenid: {
+ deptId: '',
+ filedId: ''
+ },
+ // 瀹㈡湇淇℃伅
+ serviceInfoObj: {
+ openId: null,
+ openName: ''
+ },
+ coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠',
+ '杩涘叆鍦洪櫌'
+ ], // 鐘舵��
+ weighHouseCode: '',
+ // 鏀剧┖寮圭獥鎺у埗鍙橀噺
+ evacuationModalShow: false,
+ evacuationTitle: '鏀剧┖纭',
+ evacuationContent: '鏄惁纭鏀剧┖',
+ // 绗竴娆℃斁绌哄弬鏁�
+ weighData: {
+ sceneId: '',
+ gateCameraId: '',
+ equipmentCode: '',
+ weigh: 0,
+ sceneInOut: ''
+ },
+ // 鍘熷彂淇℃伅
+ primarySkin: null,
+ primaryHair: null,
+ primaryClean: null,
+ scrollTop: 0,
+ // 纾呭崟绫诲瀷
+ orderType: '',
+ interval: '',
+ // 瀹屾垚澶栭攢璁㈠崟
+ completeOutSale: {
+ deptId: "",
+ filedId: "",
+ orderType: "",
+ clean: ""
+ },
+ completeOutSaleShow: false,
+ overTmWaixiao: null
+
+ };
+ },
+ onShow() {
+ this.init();
+ },
+ onHide() {
+ clearInterval(this.interval);
+ },
+ beforeDestroy() {
+ clearInterval(this.interval);
+ },
+ computed: {
+ ...mapState(['globalweigh', 'globalinfraredStatus']),
+ name() {
+ return uni.getStorageSync('name');
},
- // 鑾峰彇鍏ュ満鐢宠鐨勫垪琛ㄩ〉闈㈠弬鏁�
- getYuYueDataParams: {
- deptId: '',
- filedId: '',
- sendDate: ''
+ openid() {
+ return uni.getStorageSync('openid');
},
- // 鑾峰彇瀹㈡湇openid鍙傛暟
- getServiceOpenid: {
- deptId: '',
- filedId: ''
+ // 鑾峰彇浠婂ぉ鏃ユ湡
+ currentDate() {
+ let time = new Date();
+ let year = time.getFullYear();
+ let month = time.getMonth() + 1;
+ month = month < 10 ? '0' + month : month;
+ let date = time.getDate();
+ date = date < 10 ? '0' + date : date;
+ return `${year}-${month}-${date}`;
},
- // 瀹㈡湇淇℃伅
- serviceInfoObj: {
- openId: null,
- openName: ''
+ //
+ isEvacuation() {
+ return this.coalDetailsData.hair !== 0 || this.coalDetailsData.skin !== 0;
},
- coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠', '杩涘叆鍦洪櫌'], // 鐘舵��
- weighHouseCode: '',
- // 鏀剧┖寮圭獥鎺у埗鍙橀噺
- evacuationModalShow: false,
- evacuationTitle: '鏀剧┖纭',
- evacuationContent: '鏄惁纭鏀剧┖',
- // 绗竴娆℃斁绌哄弬鏁�
- weighData: {
- sceneId: '',
- gateCameraId: '',
- equipmentCode: '',
- weigh: 0,
- sceneInOut: ''
- },
- // 鍘熷彂淇℃伅
- primarySkin: null,
- primaryHair: null,
- primaryClean: null,
- scrollTop: 0,
- // 纾呭崟绫诲瀷
- orderType: '',
- interval: ''
- };
- },
- onShow() {
- this.init();
- },
- onHide() {
- clearInterval(this.interval);
- },
- beforeDestroy() {
- clearInterval(this.interval);
- },
- computed: {
- ...mapState(['globalweigh', 'globalinfraredStatus']),
- name() {
- return uni.getStorageSync('name');
+ isapproach() {
+ return this.currentPageCoalStatus <= 3;
+ }
},
- openid() {
- return uni.getStorageSync('openid');
- },
- // 鑾峰彇浠婂ぉ鏃ユ湡
- currentDate() {
- let time = new Date();
- let year = time.getFullYear();
- let month = time.getMonth() + 1;
- month = month < 10 ? '0' + month : month;
- let date = time.getDate();
- date = date < 10 ? '0' + date : date;
- return `${year}-${month}-${date}`;
- },
- //
- 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(); //鑾峰彇瀹㈡湇
- },
- // 鑾峰彇瀹㈡湇openid
- getgetService() {
- this.$reqGet('getCallOutList', this.getServiceOpenid).then(res => {
- console.log(res, '瀹㈡湇openid');
- if (res.code != 0) {
- this.$u.toast('鑾峰彇瀹㈡湇淇℃伅澶辫触');
- } else {
- if (res.data.length > 0) {
- this.serviceInfoObj.openId = res.data[0].openId;
- this.serviceInfoObj.openName = res.data[0].openName;
- uni.setStorageSync('customeropenId', this.serviceInfoObj.openId);
- uni.setStorageSync('customerName', this.serviceInfoObj.openName);
- }
- }
- });
- },
- // 鑾峰彇鎻愮叅鍗曡鎯�
- getTakeCoal() {
- uni.showLoading({
- title: '鍔犺浇涓�'
- });
- this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => {
- if (res.code == 0) {
- uni.hideLoading();
- console.log(res, '鎻愮叅鍗曡鎯�');
- this.coalDetailsData = res.data;
- this.orderType = this.coalDetailsData.orderType;
- // 鑾峰彇鎵�鍦ㄧ鎴垮弬鏁拌祴鍊�
- this.getWeightHouseObj.deptId = this.coalDetailsData.deptId;
- this.getWeightHouseObj.filedId = this.coalDetailsData.filedId;
- this.getWeightHouseObj.tmId = this.coalDetailsData.id;
- this.getWeightHouseObj.tmCode = this.coalDetailsData.code;
- this.getWeightHouseObj.carNo = this.coalDetailsData.carNo;
- // 鑾峰彇鍏ュ満鐢宠鎿嶄綔鍚庣殑棰勭害鍒楄〃鐨勫弬鏁�
- this.getYuYueDataParams.deptId = this.coalDetailsData.deptId;
- this.getYuYueDataParams.filedId = this.coalDetailsData.filedId;
- this.getYuYueDataParams.sendDate = this.coalDetailsData.sendDate;
- // 鑾峰彇瀹㈡湇openId鍙傛暟璧嬪��
- this.getServiceOpenid.deptId = this.coalDetailsData.deptId;
- this.getServiceOpenid.filedId = this.coalDetailsData.filedId;
- // 鑾峰彇鎻愮叅鍗曠姸鎬�
- this.currentPageCoalStatus = this.coalDetailsData.status;
- // 鑾峰彇鍘熷彂淇℃伅
- this.primarySkin = this.coalDetailsData.skinTwo;
- this.primaryHair = this.coalDetailsData.hairTwo;
- this.primaryClean = this.coalDetailsData.cleanTwo;
- } else {
- this.$u.toast('鍔犺浇澶辫触');
- }
- });
- },
- // 鏃ュ織鏌ヨ
- coalDayPage() {
- this.interval = setInterval(() => {
+ methods: {
+ init() {
this.$reqGet('coalDayPage', { id: this.orderPlanId }).then(res => {
if (res.code == 0) {
- this.dayRZ = res.data;
- this.dayRZ = this.dayRZ.map(v => {
+ // this.dayRZ = res.data;
+ this.dayRZ = res.data.map(v => {
let slicedate = v.taskStatusDes.slice(0, 10);
if (slicedate == this.currentDate) {
return {
...v,
taskStatusDes: v.taskStatusDes.slice(10)
};
+ } else {
+ return { ...v }
}
});
}
});
- }, 5000);
- },
- // 灞曠ず鎻愮叅鍗曡鎯�
- showCaolPickUpBill() {
- uni.navigateTo({
- url: `/pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill?orderPlanId=${this.orderPlanId}`
- });
- },
- // 绛惧埌
- arriveClick() {
- uni.navigateTo({
- url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}&coalStatus=${
- this.currentPageCoalStatus
- }&tmId=${this.getWeightHouseObj.tmId}`
- });
- },
- // 鍏ュ満鐢宠
- rcsqClick() {
- uni.navigateTo({
- url: `/pages/driver-page/appointment/appointment?type=鍏ュ満鐢宠&takeCoalId=${this.orderPlanId}&yyId=${this.yyId}&filedId=${this.getYuYueDataParams.filedId}&deptId=${
- this.getYuYueDataParams.deptId
- }&sendDate=${this.getYuYueDataParams.sendDate}`
- });
- },
- // 鍛煎彨瀹㈡湇
- callCustomerService() {
- // if (!this.serviceInfoObj.openId) {
- // this.$u.toast('鏃犲鏈嶄俊鎭�');
- // }
- wx.getSetting({
- success(res) {
- console.log('鎺堟潈success', res);
- if (!res.authSetting['scope.camera'] || !res.authSetting['scope.record']) {
- if (!res.authSetting['scope.camera']) {
- uni.showToast({
- title: '鏃犵浉鏈烘潈闄�'
- });
- } else if (!res.authSetting['scope.record']) {
- uni.showToast({
- title: '鏃犻害鍏嬮鏉冮檺'
+ this.coalDayPage(); //鑾峰彇鏃ュ織
+ this.getTakeCoal(); //鑾峰彇鎻愮叅鍗曡鎯�
+ this.getgetService(); //鑾峰彇瀹㈡湇
+ },
+ // 鑾峰彇瀹㈡湇openid
+ getgetService() {
+ this.$reqGet('getCallOutList', this.getServiceOpenid).then(res => {
+ console.log(res, '瀹㈡湇openid');
+ if (res.code != 0) {
+ this.$u.toast('鑾峰彇瀹㈡湇淇℃伅澶辫触');
+ } else {
+ if (res.data.length > 0) {
+ this.serviceInfoObj.openId = res.data[0].openId;
+ this.serviceInfoObj.openName = res.data[0].openName;
+ uni.setStorageSync('customeropenId', this.serviceInfoObj.openId);
+ uni.setStorageSync('customerName', this.serviceInfoObj.openName);
+ }
+ }
+ });
+ },
+ // 鑾峰彇鎻愮叅鍗曡鎯�
+ getTakeCoal() {
+ uni.showLoading({
+ title: '鍔犺浇涓�'
+ });
+ this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => {
+ if (res.code == 0) {
+ uni.hideLoading();
+ console.log(res, '鎻愮叅鍗曡鎯�');
+ this.coalDetailsData = res.data;
+ this.orderType = this.coalDetailsData.orderType;
+ // 鍒ゆ柇鏄惁瀹屾垚澶栭攢璁㈠崟
+ this.completeOutSale.orderType = this.coalDetailsData.orderType;
+ this.completeOutSale.deptId = this.coalDetailsData.deptId;
+ this.completeOutSale.filedId = this.coalDetailsData.filedId;
+ this.completeOutSale.clean = this.coalDetailsData.clean;
+ // 鑾峰彇鎵�鍦ㄧ鎴垮弬鏁拌祴鍊�
+ this.getWeightHouseObj.deptId = this.coalDetailsData.deptId;
+ this.getWeightHouseObj.filedId = this.coalDetailsData.filedId;
+ this.getWeightHouseObj.tmId = this.coalDetailsData.id;
+ this.getWeightHouseObj.tmCode = this.coalDetailsData.code;
+ this.getWeightHouseObj.carNo = this.coalDetailsData.carNo;
+ // 鑾峰彇鍏ュ満鐢宠鎿嶄綔鍚庣殑棰勭害鍒楄〃鐨勫弬鏁�
+ this.getYuYueDataParams.deptId = this.coalDetailsData.deptId;
+ this.getYuYueDataParams.filedId = this.coalDetailsData.filedId;
+ this.getYuYueDataParams.sendDate = this.coalDetailsData.sendDate;
+ // 鑾峰彇瀹㈡湇openId鍙傛暟璧嬪��
+ this.getServiceOpenid.deptId = this.coalDetailsData.deptId;
+ this.getServiceOpenid.filedId = this.coalDetailsData.filedId;
+ // 鑾峰彇鎻愮叅鍗曠姸鎬�
+ this.currentPageCoalStatus = this.coalDetailsData.status;
+ // 鑾峰彇鍘熷彂淇℃伅
+ this.primarySkin = this.coalDetailsData.skinTwo;
+ this.primaryHair = this.coalDetailsData.hairTwo;
+ this.primaryClean = this.coalDetailsData.cleanTwo;
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
+ }
+ }).then(() => {
+ if (this.completeOutSale.orderType == "鍐呰喘" || this.completeOutSale.orderType == "杞叆") {
+ if (this.completeOutSale.clean !== 0 && this.currentPageCoalStatus !== 6 && this
+ .currentPageCoalStatus !== 11 && this.currentPageCoalStatus !== 12) {
+ this.$reqGet('getTmTaskCoalOrderType', {
+ deptId: this.completeOutSale.deptId,
+ filedId: this.completeOutSale.filedId,
+ orderType: '澶栭攢'
+ }).then(res => {
+ if (res.data && res.data?.length !== 0) {
+ this.completeOutSaleShow = true
+ console.log(res, '瀹屾垚澶栭攢璁㈠崟');
+ }
+ })
+ }
+ }
+ })
+ },
+ // 鏃ュ織鏌ヨ
+ coalDayPage() {
+ this.interval = setInterval(() => {
+ this.$reqGet('coalDayPage', { id: this.orderPlanId }).then(res => {
+ if (res.code == 0) {
+ // this.dayRZ = res.data;
+ this.dayRZ = res.data.map(v => {
+ let slicedate = v.taskStatusDes.slice(0, 10);
+ if (slicedate == this.currentDate) {
+ return {
+ ...v,
+ taskStatusDes: v.taskStatusDes.slice(10)
+ };
+ } else {
+ return { ...v }
+ }
});
}
- } else {
- wx.join1v1Chat({
- caller: { nickname: uni.getStorageSync('name'), openid: uni.getStorageSync('openid') },
- listener: { nickname: uni.getStorageSync('customerName'), openid: uni.getStorageSync('customeropenId') }, // 杩欓噷鐨刼penid鏄痜yy鐨勶紝鍏呭綋鍥哄畾鐨勫鏈峯penid
- backgroundType: 2,
- roomType: 'voice',
- success() {
- console.log('涓�瀵逛竴鎴愬姛');
- },
- fail(err) {
- console.log('涓�瀵逛竴澶辫触', err);
+ });
+ }, 5000);
+ },
+ // 灞曠ず鎻愮叅鍗曡鎯�
+ showCaolPickUpBill() {
+ uni.navigateTo({
+ url: `/pages/driver-page/driver-index/bill-of-lading-details/coal-pick-up-bill/coal-pick-up-bill?orderPlanId=${this.orderPlanId}`
+ });
+ },
+ // 绛惧埌
+ arriveClick() {
+ uni.navigateTo({
+ url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}&coalStatus=${
+ this.currentPageCoalStatus
+ }&tmId=${this.getWeightHouseObj.tmId}`
+ });
+ },
+ // 鍏ュ満鐢宠
+ rcsqClick() {
+ uni.navigateTo({
+ url: `/pages/driver-page/appointment/appointment?type=鍏ュ満鐢宠&takeCoalId=${this.orderPlanId}&yyId=${this.yyId}&filedId=${this.getYuYueDataParams.filedId}&deptId=${
+ this.getYuYueDataParams.deptId
+ }&sendDate=${this.getYuYueDataParams.sendDate}`
+ });
+ },
+ // 鍛煎彨瀹㈡湇
+ callCustomerService() {
+ // if (!this.serviceInfoObj.openId) {
+ // this.$u.toast('鏃犲鏈嶄俊鎭�');
+ // }
+ wx.getSetting({
+ success(res) {
+ console.log('鎺堟潈success', res);
+ if (!res.authSetting['scope.camera'] || !res.authSetting['scope.record']) {
+ if (!res.authSetting['scope.camera']) {
+ uni.showToast({
+ title: '鏃犵浉鏈烘潈闄�'
+ });
+ } else if (!res.authSetting['scope.record']) {
+ uni.showToast({
+ title: '鏃犻害鍏嬮鏉冮檺'
+ });
}
- });
+ } else {
+ wx.join1v1Chat({
+ caller: {
+ nickname: uni.getStorageSync('name'),
+ openid: uni.getStorageSync(
+ 'openid')
+ },
+ listener: {
+ nickname: uni.getStorageSync('customerName'),
+ openid: uni.getStorageSync(
+ 'customeropenId')
+ }, // 杩欓噷鐨刼penid鏄痜yy鐨勶紝鍏呭綋鍥哄畾鐨勫鏈峯penid
+ backgroundType: 2,
+ roomType: 'voice',
+ success() {
+ console.log('涓�瀵逛竴鎴愬姛');
+ },
+ fail(err) {
+ console.log('涓�瀵逛竴澶辫触', err);
+ }
+ });
+ }
+ },
+ fail() {
+ console.log('鑾峰彇澶辫触');
}
- },
- fail() {
- console.log('鑾峰彇澶辫触');
- }
- });
- },
- calling() {
- // wx.join1v1Chat({
- // caller: { nickname: this.name, openid: this.openid }, //oZjXk5RRmbroAfl1m5aZ6hRNvqh4
- // listener: { nickname: this.serviceInfoObj.openName, openid: 'orutI5YT0yEvARVngdsTmBpisWmw' }, // 杩欓噷鐨刼penid鏄痜yy鐨勶紝鍏呭綋鍥哄畾鐨勫鏈峯penid
- // backgroundType: 2,
- // roomType: 'voice'
- // });
- },
- // 绉伴噸
- cengZhongClick() {
- this.$reqGet('getWeighHouse', this.getWeightHouseObj).then(res => {
- console.log(res, '鑾峰彇纾呮埧');
- if (res.code == 0) {
- this.weighData.sceneId = res.data.id;
- this.weighData.gateCameraId = res.data.lastEquipmentId;
- this.weighData.equipmentCode = res.data.lastEquipmentCode;
- this.weighData.sceneInOut = res.data.sceneInOut;
- this.weighHouseCode = res.data.code;
- uni.navigateTo({
- url: `/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}&sceneId=${
+ });
+ },
+ calling() {
+ // wx.join1v1Chat({
+ // caller: { nickname: this.name, openid: this.openid }, //oZjXk5RRmbroAfl1m5aZ6hRNvqh4
+ // listener: { nickname: this.serviceInfoObj.openName, openid: 'orutI5YT0yEvARVngdsTmBpisWmw' }, // 杩欓噷鐨刼penid鏄痜yy鐨勶紝鍏呭綋鍥哄畾鐨勫鏈峯penid
+ // backgroundType: 2,
+ // roomType: 'voice'
+ // });
+ },
+ // 绉伴噸
+ cengZhongClick() {
+ this.$reqGet('getWeighHouse', this.getWeightHouseObj).then(res => {
+ console.log(res, '鑾峰彇纾呮埧');
+ if (res.code == 0) {
+ this.weighData.sceneId = res.data.id;
+ this.weighData.gateCameraId = res.data.lastEquipmentId;
+ this.weighData.equipmentCode = res.data.lastEquipmentCode;
+ this.weighData.sceneInOut = res.data.sceneInOut;
+ this.weighHouseCode = res.data.code;
+ uni.navigateTo({
+ url: `/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}&sceneId=${
res.data.id
}&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}&primarySkin=${
this.primarySkin
- }&primaryHair=${this.primaryHair}&psrimaryClean=${this.primaryClean}&sceneInOut=${res.data.sceneInOut}`
- });
- } else {
- this.$u.toast('鏈湪纾呮埧锛岃鍓嶅線纾呮埧鍚庡啀璇曪紒锛�');
- }
- });
- },
- // 鏀剧┖
- evacuation() {
- this.evacuationModalShow = true;
- },
- // 鏀剧┖寮圭獥纭
- evacuationConfirm() {
- this.weighData = {
- ...this.weighData,
- weigh: this.globalweigh
- };
- let mix = Object.assign(this.weighData, this.getWeightHouseObj);
- this.$reqPost('getOneEvacuation', mix, 'json').then(res => {
- console.log(res, '绗竴娆℃斁绌�');
- if (res.code == 0) {
- this.$u.toast('鎿嶄綔鎴愬姛');
- this.evacuationModalShow = false;
- } else {
- this.$u.toast('鎿嶄綔澶辫触锛岃绋嶅悗閲嶈瘯');
- this.evacuationModalShow = false;
- }
- });
- },
- // 鏀剧┖寮圭獥鍙栨秷
- evacuationCancel() {
- this.evacuationModalShow = false;
+ }&primaryHair=${this.primaryHair}&psrimaryClean=${this.primaryClean}&sceneInOut=${res.data.sceneInOut}&overTmWaixiao=${this.overTmWaixiao}`
+ });
+ } else {
+ this.$u.toast('鏈湪纾呮埧锛岃鍓嶅線纾呮埧鍚庡啀璇曪紒锛�');
+ }
+ });
+ },
+ // 鏀剧┖
+ evacuation() {
+ this.evacuationModalShow = true;
+ },
+ // 鏀剧┖寮圭獥纭
+ evacuationConfirm() {
+ this.weighData = {
+ ...this.weighData,
+ weigh: this.globalweigh
+ };
+ let mix = Object.assign(this.weighData, this.getWeightHouseObj);
+ this.$reqPost('getOneEvacuation', mix, 'json').then(res => {
+ console.log(res, '绗竴娆℃斁绌�');
+ if (res.code == 0) {
+ this.$u.toast('鎿嶄綔鎴愬姛');
+ this.evacuationModalShow = false;
+ } else {
+ this.$u.toast('鎿嶄綔澶辫触锛岃绋嶅悗閲嶈瘯');
+ this.evacuationModalShow = false;
+ }
+ });
+ },
+ // 鏀剧┖寮圭獥鍙栨秷
+ evacuationCancel() {
+ this.evacuationModalShow = false;
+ },
+ // 瀹屾垚澶栭攢纭畾
+ completeOutSaleConfirm() {
+ this.completeOutSaleShow = false
+ uni.navigateTo({
+ url: `/pages/driver-page/driver-index/bill-of-lading-details/completeOutSale/completeOutSale?deptId=${this.completeOutSale.deptId}&filedId=${this.completeOutSale.filedId}`
+ })
+ },
+ // 瀹屾垚澶栭攢鍙栨秷
+ completeOutSaleCancel() {
+ this.completeOutSaleShow = false
+ },
}
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-/deep/.u-steps {
- .u-steps-item {
- .u-steps-item__content {
- .u-text {
- .u-text__value {
- font-size: 31rpx !important;
- font-weight: 300;
- color: #303030;
- }
- }
- }
- }
-}
-@mixin flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-::v-deep.bill-of-lading-details {
- width: 100%;
- height: 100vh;
- margin: 0 auto;
- display: flex;
- flex-direction: column;
- .top-banner {
- width: 100%;
- height: 346rpx;
- .top-information {
- width: 94%;
- margin: 0 auto;
- height: vww(52);
- @include flex position: relative;
- flex-direction: column;
- justify-content: space-between;
- align-items: flex-start;
- top: vww(25);
- color: #ffffff;
- font-size: 31rpx;
- font-weight: 300;
- .fild-name {
- @include flex;
- justify-content: space-between;
- width: 100%;
- view {
- min-width: 296rpx;
- }
- }
- }
- .block-information {
- width: 690rpx;
- height: 396rpx;
- margin: vww(40) auto;
- background: #ffffff;
- box-shadow: 4rpx 6rpx 51rpx 0rpx rgba(73, 120, 240, 0.11);
- border-radius: 20rpx;
- position: relative;
- font-size: 30rpx;
- font-weight: 300;
- color: #303030;
- overflow: hidden;
- .block-main {
- @include flex width: 94%;
- height: 336rpx;
- margin: vww(18) vww(7) vww(11) vww(17);
- flex-direction: column;
- justify-content: space-between;
- align-items: flex-start;
- }
- .status-button {
- width: vww(71);
- height: vww(36);
- text-align: center;
- line-height: vww(33);
- font-size: 28rpx;
- font-weight: 300;
- position: absolute;
- right: vww(10);
- color: #fff;
- }
- .basic {
- width: 100%;
- height: vww(15);
- @include flex;
- justify-content: flex-start;
- .coalName,
- .order-type {
- width: 45%;
- height: 30rpx;
- font-size: 30rpx;
- font-weight: 300;
- color: #515151;
- position: relative;
- }
- .black-block {
- width: 2rpx;
- height: 30rpx;
- background: #515151;
- position: relative;
- top: vww(2);
- }
- }
- .time {
- width: 35%;
- height: vww(12);
- display: flex;
- justify-content: flex-start;
- .send-date {
- width: 148rpx;
- height: 24rpx;
- margin-left: vww(14);
- font-size: 28rpx;
- font-weight: 300;
- color: #515151;
- }
- }
- .coal-code,
- .order-code {
- width: 100%;
- height: 24rpx;
- font-size: 28rpx;
- font-weight: 300;
- color: #7d7d7d;
- }
- .weigh-item {
- width: 100%;
- height: vww(36);
- @include flex;
- justify-content: space-around;
- .item {
- min-width: vww(50);
- height: vww(45);
- font-size: 21rpx;
- font-weight: 400;
- color: #ffffff;
- text-align: center;
- line-height: vww(30);
- @include flex;
- .concrete {
- width: vww(36);
- height: vww(36);
- }
- .num {
- font-size: 40rpx;
+<style lang="scss"
+ scoped>
+ /deep/.u-steps {
+ .u-steps-item {
+ .u-steps-item__content {
+ .u-text {
+ .u-text__value {
+ font-size: 31rpx !important;
font-weight: 300;
color: #303030;
}
@@ -544,73 +514,256 @@
}
}
}
- .timeLine {
- height: 40%;
- margin: vww(20);
- position: relative;
- top: vww(120);
- overflow-y: overlay;
- padding: vww(20);
- .u-steps {
- .u-steps-item {
- padding-bottom: vww(35);
- .u-steps-item__wrapper {
- .u-steps-item__wrapper__dot {
- background: linear-gradient(-29deg, #426cff 0%, #7991ff 100%);
- box-shadow: 2rpx 7rpx 10rpx 0rpx rgba(172, 172, 172, 0.64);
+
+ @mixin flex {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ ::v-deep.bill-of-lading-details {
+ width: 100%;
+ height: 100vh;
+ margin: 0 auto;
+ display: flex;
+ flex-direction: column;
+
+ .top-banner {
+ width: 100%;
+ height: 346rpx;
+
+ .top-information {
+ width: 94%;
+ margin: 0 auto;
+ height: vww(52);
+ @include flex position: relative;
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: flex-start;
+ top: vww(25);
+ color: #ffffff;
+ font-size: 31rpx;
+ font-weight: 300;
+
+ .cutomer-name {
+ width: 100%;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
+ .fild-name {
+ @include flex;
+ justify-content: space-between;
+ width: 100%;
+
+ view {
+ min-width: 296rpx;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
}
- .u-steps-item__line {
- height: vww(52) !important;
- background: #e9e6ea !important;
- }
}
- }
- }
- .utilsBox {
- width: 94%;
- margin: 0 auto;
- position: relative;
- top: vww(80);
- .utils_chil {
- width: 100%;
- margin: 0 auto;
- .top-button,
- .bottom-button {
- width: 100%;
- height: vww(47);
- @include flex;
- .u-button {
- width: 40%;
- height: 60rpx;
+
+ .block-information {
+ width: 690rpx;
+ height: 396rpx;
+ margin: vww(40) auto;
+ background: #ffffff;
+ box-shadow: 4rpx 6rpx 51rpx 0rpx rgba(73, 120, 240, 0.11);
+ border-radius: 20rpx;
+ position: relative;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #303030;
+ overflow: hidden;
+
+ .block-main {
+ @include flex width: 94%;
+ height: 336rpx;
+ margin: vww(18) vww(7) vww(11) vww(17);
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: flex-start;
+ }
+
+ .status-button {
+ width: vww(71);
+ height: vww(36);
+ text-align: center;
+ line-height: vww(33);
font-size: 28rpx;
font-weight: 300;
- color: #497bfb;
- border: 2px solid #3b56eb;
+ position: absolute;
+ right: vww(10);
+ color: #fff;
+ }
+
+ .basic {
+ width: 100%;
+ height: vww(15);
+ @include flex;
+ justify-content: flex-start;
+
+ .coalName,
+ .order-type {
+ width: 45%;
+ height: 30rpx;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #515151;
+ position: relative;
+ }
+
+ .black-block {
+ width: 2rpx;
+ height: 30rpx;
+ background: #515151;
+ position: relative;
+ top: vww(2);
+ }
+ }
+
+ .time {
+ width: 35%;
+ height: vww(12);
+ display: flex;
+ justify-content: flex-start;
+
+ .send-date {
+ width: 148rpx;
+ height: 24rpx;
+ margin-left: vww(14);
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #515151;
+ }
+ }
+
+ .coal-code,
+ .order-code {
+ width: 100%;
+ height: 24rpx;
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #7d7d7d;
+ }
+
+ .weigh-item {
+ width: 100%;
+ height: vww(36);
+ @include flex;
+ justify-content: space-around;
+
+ .item {
+ min-width: vww(50);
+ height: vww(45);
+ font-size: 21rpx;
+ font-weight: 400;
+ color: #ffffff;
+ text-align: center;
+ line-height: vww(30);
+ @include flex;
+
+ .concrete {
+ width: vww(36);
+ height: vww(36);
+ }
+
+ .num {
+ font-size: 40rpx;
+ font-weight: 300;
+ color: #303030;
+ }
+ }
+ }
+ }
+ }
+
+ .timeLine {
+ height: 40%;
+ margin: vww(20);
+ position: relative;
+ top: vww(120);
+ overflow-y: overlay;
+ padding: vww(20);
+
+ .u-steps {
+ .u-steps-item {
+ padding-bottom: vww(35);
+
+ .u-steps-item__wrapper {
+ .u-steps-item__wrapper__dot {
+ background: linear-gradient(-29deg, #426cff 0%, #7991ff 100%);
+ box-shadow: 2rpx 7rpx 10rpx 0rpx rgba(172, 172, 172, 0.64);
+ }
+ }
+
+ .u-steps-item__line {
+ height: vww(52) !important;
+ background: #e9e6ea !important;
+ }
+ }
+ }
+ }
+
+ .white-block {
+ width: 100%;
+ height: vww(20);
+ background-color: #fff;
+ }
+
+ .utilsBox {
+ width: 94%;
+ margin: 0 auto;
+ position: relative;
+ top: vww(80);
+
+ .utils_chil {
+ width: 100%;
+ margin: 0 auto;
+
+ .top-button,
+ .bottom-button {
+ width: 100%;
+ height: vww(47);
+ @include flex;
+
+ .u-button {
+ width: 40%;
+ height: 60rpx;
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #497bfb;
+ border: 2px solid #3b56eb;
+ }
+ }
+ }
+ }
+
+ .weigh-ability {
+ width: 631rpx;
+ height: vww(100);
+ margin: vww(80) auto;
+ margin-bottom: vww(10);
+ @include flex;
+ flex-direction: column;
+
+ .weigh-button {
+ width: 631rpx;
+ height: vww(89);
+
+ .u-button {
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #ffffff;
+ background: #497bfb;
+ letter-spacing: 4rpx;
+ border-radius: 37rpx 37rpx 37rpx 37rpx;
+ box-shadow: 2rpx 3rpx 13rpx 0rpx rgba(43, 98, 239, 0.5), 0rpx 0rpx 9rpx 0rpx rgba(247, 250, 253, 0.29);
}
}
}
}
- .weigh-ability {
- width: 631rpx;
- height: vww(100);
- margin: vww(80) auto;
- margin-bottom: vww(10);
- @include flex;
- flex-direction: column;
- .weigh-button {
- width: 631rpx;
- height: vww(89);
- .u-button {
- font-size: 28rpx;
- font-weight: 300;
- color: #ffffff;
- background: #497bfb;
- letter-spacing: 4rpx;
- border-radius: 37rpx 37rpx 37rpx 37rpx;
- box-shadow: 2rpx 3rpx 13rpx 0rpx rgba(43, 98, 239, 0.5), 0rpx 0rpx 9rpx 0rpx rgba(247, 250, 253, 0.29);
- }
- }
- }
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/completeOutSale/completeOutSale.vue b/pages/driver-page/driver-index/bill-of-lading-details/completeOutSale/completeOutSale.vue
new file mode 100644
index 0000000..15fd020
--- /dev/null
+++ b/pages/driver-page/driver-index/bill-of-lading-details/completeOutSale/completeOutSale.vue
@@ -0,0 +1,206 @@
+<template>
+ <view class="main">
+ <view class="main-body">
+ <u-empty mode="data"
+ icon="http://cdn.uviewui.com/uview/empty/data.png"
+ textSize="30"
+ iconSize="1000"
+ v-if="recordList.length == 0"></u-empty>
+ <view class="main-block"
+ v-for="item in recordList"
+ :key="item.id">
+ <view class="coal-name">
+ 鐓ょ鍚嶇О:{{item.coalName}}
+ </view>
+ <view class="code">
+ 鎻愮叅鍗曠紪鍙�:{{item.code}}
+ </view>
+ <view class="reservationTime">
+ 棰勭害鏃堕棿:{{item.yuYueTime||''}}
+ </view>
+ <view class="weigh-item">
+ <view class="item">
+ <view class="concrete"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/skin.png') no-repeat;background-size: cover;">
+ 鐨�</view>
+ <view class="num">{{ item.skin }}</view>
+ </view>
+ <view class="item">
+ <view class="concrete"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/hair.png') no-repeat;background-size: cover;">
+ 姣�</view>
+ <view class="num">{{ item.hair }}</view>
+ </view>
+ <view class="item">
+ <view class="concrete"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clean.png') no-repeat;background-size: cover;">
+ 鍑�</view>
+ <view class="num">{{ item.clean }}</view>
+ </view>
+ </view>
+ <view class="utils-button">
+ <u-button @click="select(item)"
+ type="primary"
+ text="閫夋嫨"
+ :disabled="item.canClick">
+ </u-button>
+ </view>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ recordList: [],
+ deptId: "",
+ filedId: "",
+ canClick: false
+ }
+ },
+ computed: {},
+ onLoad(params) {
+ this.filedId = params.filedId
+ this.deptId = params.deptId
+ },
+ onShow() {
+ this.getTmTaskCoalOrderType()
+ },
+ methods: {
+ getTmTaskCoalOrderType() {
+ uni.showLoading({
+ title: '鍔犺浇涓�'
+ })
+ this.$reqGet('getTmTaskCoalOrderType', {
+ deptId: this.deptId,
+ filedId: this.filedId,
+ orderType: '澶栭攢'
+ }).then(res => {
+ if (res.data && res.data?.length !== 0) {
+ console.log(res, '澶栭攢璁㈠崟鏁版嵁');
+ uni.hideLoading()
+ this.recordList = res.data
+ this.recordList = this.recordList.map(v => {
+ let canClick = v.clean !== 0
+ return {
+ ...v,
+ canClick
+ }
+ })
+ }
+ })
+ },
+ select(item) {
+ this.$reqPost('updateTmTaskCoalState', { neiGouOrzhuanRuTmId: item.id }, 'params').then(res => {
+ console.log(res);
+ if (res.code == 0) {
+ uni.navigateTo({
+ url: `/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details?orderPlanId=${item.id}&overTmWaixiao=1`
+ })
+ } else {
+ this.$u.toast('鍑虹幇閿欒锛岃绋嶅悗閲嶈瘯')
+ }
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss"
+ scoped>
+ @mixin flex {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
+
+ .main {
+ width: 100%;
+ @include flex;
+
+ .main-body {
+ width: 96%;
+ margin-top: 20rpx;
+ overflow: hidden;
+ @include flex;
+ flex-direction: column;
+ justify-content: space-between;
+
+ .main-block {
+ width: 690rpx;
+ height: 396rpx;
+ margin-top: 10rpx;
+ padding: 15rpx;
+ background: #ffffff;
+ box-shadow: 4rpx 6rpx 51rpx 0rpx rgba(73, 120, 240, 0.11);
+ border-radius: 20rpx;
+ position: relative;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #303030;
+ overflow: hidden;
+ @include flex;
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: flex-start;
+
+ .code,
+ .coal-name,
+ .reservationTime {
+ color: #7D7D7D;
+ }
+
+ .weigh-item {
+ width: 100%;
+ height: vww(36);
+ @include flex;
+ justify-content: space-around;
+
+ .item {
+ min-width: vww(50);
+ height: vww(45);
+ font-size: 21rpx;
+ font-weight: 400;
+ color: #ffffff;
+ text-align: center;
+ line-height: vww(30);
+ @include flex;
+
+ .concrete {
+ width: vww(36);
+ height: vww(36);
+ }
+
+ .num {
+ font-size: 40rpx;
+ font-weight: 300;
+ color: #303030;
+ }
+ }
+ }
+
+ .utils-button {
+ width: 100%;
+ @include flex;
+ justify-content: flex-end;
+
+ /deep/.u-button {
+ width: 208rpx;
+ height: 60rpx;
+ font-size: 28rpx;
+ letter-spacing: 4rpx;
+ font-weight: 300;
+ background-color: #497BFB;
+ color: #ffffff;
+ box-shadow: 2rpx 3rpx 13rpx 0rpx rgba(43, 98, 239, 0.5), 0rpx 0rpx 9rpx 0rpx rgba(247, 250, 253, 0.29);
+ border-radius: 37rpx 37rpx 37rpx 37rpx;
+ margin: 0;
+ margin-right: 38rpx;
+ }
+ }
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
index 88689f6..064437c 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -1,95 +1,106 @@
<template>
<view class="weighingDevice">
- <view
- class="one"
+ <view class="one"
style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/weighbanner.png') no-repeat;
- background-size: cover;"
- >
+ background-size: cover;">
<view class="top">
<view class="top_left">
<text>{{ realTimeWeigh }}</text>
+ <!-- <text>{{ globalweigh }}</text> -->
</view>
<view class="top_right">
<view class="">
绉伴噸:
- <u--text :type="realTimeWeigh == 0 ? 'error' : 'success'" :text="realTimeWeigh == 0 ? '寮傚父' : '姝e父'" size="34"></u--text>
+ <u--text :type="realTimeWeigh == 0 ? 'error' : 'success'"
+ :text="realTimeWeigh == 0 ? '寮傚父' : '姝e父'"
+ size="34"></u--text>
</view>
<view class="">
绾㈠:
- <u--text :type="globalinfraredStatus ? 'error' : 'success'" :text="globalinfraredStatus ? '寮傚父' : '姝e父'" size="34"></u--text>
+ <u--text :type="globalinfraredStatus ? 'error' : 'success'"
+ :text="globalinfraredStatus ? '寮傚父' : '姝e父'"
+ size="34"></u--text>
</view>
</view>
</view>
- <view class="bottom" v-if="weighList.orderType == '鍐呰喘' || weighList.orderType == '杞叆'">
- <view>
- <view style="font-weight: 600;">鍘熷彂淇℃伅</view>
-
- <text>姣涢噸:{{ primaryHair || '' }}鐨噸:{{ primarySkin || '' }}鍑�閲�:{{ primaryClean || '' }}</text>
- </view>
- </view>
- <!-- <view class="bottom" v-else-if="weighList.orderType == '澶栬喘' && weighList.hair == 0">
- <text>
- 姣涢噸:{{ coalContactHair || '' }}鐨噸:{{ coalContactSkin || '' }}鍑�閲�:{{ (Number(this.coalContactHair) - Number(this.coalContactSkin)).toFixed(2) || '' }}
- </text>
- </view> -->
<view class="bottom"><text>TIP:褰撳墠鐘舵�佷负姝e父鏃跺彲浠ョО閲�</text></view>
</view>
- <view class="middle-block" v-if="firstHairCustomernameShow || sideline">
- <view class="block-main" v-if="firstHairCustomernameShow">
+ <view class="middle-block"
+ v-if="firstHairCustomernameShow || sideline">
+ <view class="block-main"
+ v-if="firstHairCustomernameShow">
<view class="first-line"><combined-title title="鍘熷彂淇℃伅"></combined-title></view>
<view class="second-line">
- <view class="label-text" :class="{ focusClass: isfocus1 }">鐨噸</view>
- <view class="input-container" :class="{ inputClass: isfocus1, disabledClass: isInputOrigin }">
- <u--input
- placeholder="璇疯緭鍏ョ毊閲�"
+ <view class="label-text"
+ :class="{ focusClass: isfocus1 }">鐨噸</view>
+ <view class="input-container"
+ :class="{ inputClass: isfocus1, disabledClass: haveInputOrigin }">
+ <u--input placeholder="璇疯緭鍏ョ毊閲�"
border="surround"
v-model="weighData.coalContactSkin"
@focus="inputFocus(1)"
@blur="inputBlur"
- :disabled="isInputOrigin"
- ></u--input>
+ @change="inputChange"
+ :disabled="haveInputOrigin"></u--input>
</view>
- <view class="unit" :class="{ focusClass: isfocus1 }">鍚�</view>
+ <view class="unit"
+ :class="{ focusClass: isfocus1 }">鍚�</view>
</view>
<view class="second-line">
- <view class="label-text" :class="{ focusClass: isfocus2 }">姣涢噸</view>
- <view class="input-container" :class="{ inputClass: isfocus2, disabledClass: isInputOrigin }">
- <u--input
- placeholder="璇疯緭鍏ユ瘺閲�"
+ <view class="label-text"
+ :class="{ focusClass: isfocus2 }">姣涢噸</view>
+ <view class="input-container"
+ :class="{ inputClass: isfocus2, disabledClass: haveInputOrigin }">
+ <u--input placeholder="璇疯緭鍏ユ瘺閲�"
border="surround"
v-model="weighData.coalContactHair"
@focus="inputFocus(2)"
@blur="inputBlur"
- :disabled="isInputOrigin"
- ></u--input>
+ @change="inputChange"
+ :disabled="haveInputOrigin"></u--input>
</view>
- <view class="unit" :class="{ focusClass: isfocus2 }">鍚�</view>
+ <view class="unit"
+ :class="{ focusClass: isfocus2 }">鍚�</view>
</view>
<view class="second-line">
<view class="label-text">鍑�閲�</view>
- <view class="input-container"><u--input placeholder="鍑�閲�" border="surround" v-model="coalContactClean" :disabled="isInputOrigin"></u--input></view>
+ <view class="input-container"
+ :class="{ disabledClass: haveInputOrigin }">
+ <u--input placeholder="鍑�閲�"
+ border="surround"
+ v-model="coalContactClean"
+ :disabled="haveInputOrigin"></u--input>
+ </view>
<view class="unit">鍚�</view>
</view>
</view>
- <view class="block-sideline" v-if="sideline">
+ <view class="block-sideline"
+ v-if="sideline">
<view class="first-line"><combined-title title="鍘熷彂淇℃伅"></combined-title></view>
<view class="weigh-item">
<view class="item">
- <view class="concrete" style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/skin.png') no-repeat;background-size: cover;">鐨�</view>
- <view class="num">{{ weighList.skin }}</view>
+ <view class="concrete"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/skin.png') no-repeat;background-size: cover;">
+ 鐨�</view>
+ <view class="num">{{ weighList.skinTwo }}</view>
</view>
<view class="item">
- <view class="concrete" style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/hair.png') no-repeat;background-size: cover;">姣�</view>
- <view class="num">{{ weighList.hair }}</view>
+ <view class="concrete"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/hair.png') no-repeat;background-size: cover;">
+ 姣�</view>
+ <view class="num">{{ weighList.hairTwo }}</view>
</view>
<view class="item">
- <view class="concrete" style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clean.png') no-repeat;background-size: cover;">鍑�</view>
- <view class="num">{{ weighList.clean }}</view>
+ <view class="concrete"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clean.png') no-repeat;background-size: cover;">
+ 鍑�</view>
+ <view class="num">{{ weighList.cleanTwo }}</view>
</view>
</view>
</view>
</view>
- <view v-else style="width: 100%;height: 40rpx;"></view>
+ <view v-else
+ style="width: 100%;height: 40rpx;"></view>
<view class="bottom-block">
<view class="block-main">
<view class="main-information">
@@ -110,15 +121,18 @@
</view>
<view class="main-information">
<view class="prefix">鐨噸:</view>
- <view class="suffix">{{ temporaryWeighObj.skin == 0 ? weighList.skin : temporaryWeighObj.skin }}</view>
+ <view class="suffix">{{ temporaryWeighObj.skin == 0 ? weighList.skin : temporaryWeighObj.skin }}
+ </view>
</view>
<view class="main-information">
<view class="prefix">姣涢噸:</view>
- <view class="suffix">{{ temporaryWeighObj.hair == 0 ? weighList.hair : temporaryWeighObj.hair }}</view>
+ <view class="suffix">{{ temporaryWeighObj.hair == 0 ? weighList.hair : temporaryWeighObj.hair }}
+ </view>
</view>
<view class="main-information">
<view class="prefix">鍑�閲�:</view>
- <view class="suffix">{{ temporaryWeighObj.clean == 0 ? weighList.clean : temporaryWeighObj.clean }}</view>
+ <view class="suffix">{{ temporaryWeighObj.clean == 0 ? weighList.clean : temporaryWeighObj.clean }}
+ </view>
</view>
<view class="main-information">
<view class="prefix">璁㈠崟浣欓噺:</view>
@@ -128,517 +142,586 @@
</view>
<view class="three">
<!-- 鏀剧┖ -->
- <u-button type="primary" text="鏀剧┖" plain @click="evacuation" throttleTime="500" :disabled="!isEvacuation"></u-button>
+ <u-button type="primary"
+ text="鏀剧┖"
+ plain
+ @click="evacuation"
+ throttleTime="500"
+ :disabled="!isEvacuation"></u-button>
<!-- 澶栭攢璁㈠崟绉扮毊鏃讹紝杩斿洖鍔犲噺鍚ㄦ寜閽疆鐏般�傜О姣涙椂鍙敤.澶栬喘璁㈠崟锛屼笉鍑虹幇杩斿洖鍔犲噺鍚ㄧ殑鎸夐挳 -->
- <u-button
- type="primary"
+ <u-button type="primary"
text="纭畾绉伴噸"
- :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh || isInputOrigin"
+ :disabled="realTimeWeigh == 0 || globalinfraredStatus || isweigh || !isInputOrigin"
:loading="isConfirmWeighLoading"
loadingText="纭"
- @click="confirmWeigh"
- ></u-button>
- <u-button type="primary" text="杩斿洖鍔犲噺鍚�" :disabled="addAndSubtractCoalDisabled" @click="addAndSubtractCoal" class="jiajian" v-if="outBuy"></u-button>
+ @click="confirmWeigh"></u-button>
+ <u-button type="primary"
+ text="杩斿洖鍔犲噺鍚�"
+ :disabled="addAndSubtractCoalDisabled"
+ @click="addAndSubtractCoal"
+ class="jiajian"
+ v-if="outBuy"></u-button>
</view>
<!-- <view class="four" v-if="weighList.orderType !== '澶栬喘'">濡傛偍闇�瑕佽皟鏁磋杞借揣鍝佸惃鏁帮紝璇风偣鍑昏繑鍥炲姞鍑忓惃</view> -->
<!-- 鏀剧┖寮圭獥 -->
<view class="evacuationModal">
- <u-modal
- :show="evacuationModalShow"
+ <u-modal :show="evacuationModalShow"
:title="evacuationTitle"
:content="evacuationContent"
:showCancelButton="true"
@confirm="evacuationConfirm"
- @cancel="evacuationCancel"
- ></u-modal>
+ @cancel="evacuationCancel"></u-modal>
</view>
</view>
</template>
<script>
-let socket = null;
-import { webSocketUrl } from '@/api/request.js';
-import { mapState, mapMutations } from 'vuex';
-import combinedTitle from '@/components/combined-title/combined-title.vue';
-export default {
- onLoad(params) {
- this.takeCoalId = params.takeCoalId;
- this.weighData.sceneId = params.sceneId;
- this.weighData.gateCameraId = params.gateCameraId;
- this.weighData.equipmentCode = params.gateCameraCode;
- this.weighData.sceneInOut = params.sceneInOut;
- this.weighHouseCode = params.weighHouseCode;
- this.primarySkin = params.primarySkin;
- this.primaryHair = params.primaryHair;
- this.primaryClean = params.primaryClean;
- this.changeweighHouseCode(params.weighHouseCode);
- },
- components: {
- combinedTitle
- },
- data() {
- return {
- weighData: {
- //纭绉伴噸鎺ュ彛鍙傛暟
- deptId: '',
- tmId: '',
- sceneId: '',
- carNo: '',
- gateCameraId: '',
- equipmentCode: '',
- weigh: 0,
- tmCode: '',
- sceneInOut: '',
- coalContactClean: 0,
- coalContactHair: 0,
- coalContactSkin: 0
- },
- // 鏄惁濉啓鍘熷彂淇℃伅
- isInputOrigin: false,
- takeCoalId: null,
- weighHouseCode: '',
- isConfirmWeighLoading: false, //纭畾绉伴噸鎸夐挳
- realTimeWeigh: 0,
- weighList: {},
- // 涓存椂绉伴噸瀵硅薄
- temporaryWeighObj: {
- skin: 0,
- hair: 0,
- clean: 0
- },
- infraredStatus: false, // 绾㈠鐘舵�侊紝
- // 鏀剧┖鎺у埗
- evacuationModalShow: false,
- evacuationTitle: '鏀剧┖纭',
- evacuationContent: '鏄惁纭鏀剧┖',
- // 鑾峰彇鍘熷彂淇℃伅
- primarySkin: null,
- primaryHair: null,
- primaryClean: null,
- // 鍒ゆ柇绉伴噸鎸夐挳鏄惁鍙敤
- isweigh: false,
- // 澶栬喘绫诲瀷绉伴噸濉啓姣涳紝鐨紝
- firstHairCustomernameShow: false,
- coalContactHair: '',
- coalContactSkin: '',
- // 鑱氱劍鏃舵敼鍙樻牱寮�
- isfocus1: false,
- isfocus2: false,
- // 澶栬喘绗竴娆$О姣涢噸涓嶉渶瑕佸姞鍑忓惃
- outBuy: true
- };
- },
- watch: {
- realTimeWeigh(newV, oldV) {
- if (this.weighList.orderType == '澶栭攢' || this.weighList.orderType == '鍐呴攢' || this.weighList.orderType == '杞嚭') {
- if (this.weighList.skin == 0) {
- // this.temporaryWeighObj.skin = this.realTimeWeigh;
- this.temporaryWeighObj.skin = newV;
- this.isweigh = this.temporaryWeighObj.skin > this.weighList.orderSurplus;
- } else {
- // this.temporaryWeighObj.hair = this.realTimeWeigh;
- this.temporaryWeighObj.hair = newV;
- this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed(2);
- this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus;
- }
- } else if (this.weighList.orderType == '澶栬喘' || this.weighList.orderType == '鍐呰喘' || this.weighList.orderType == '杞叆') {
- if (this.weighList.hair == 0) {
- // this.temporaryWeighObj.hair = this.realTimeWeigh;
- this.temporaryWeighObj.hair = newV;
- this.isweigh = this.temporaryWeighObj.hair > this.weighList.orderSurplus;
- } else {
- // this.temporaryWeighObj.skin = this.realTimeWeigh;
- this.temporaryWeighObj.skin = newV;
- this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed(2);
- this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus;
- }
+ let socket = null;
+ import { webSocketUrl } from '@/api/request.js';
+ import { mapState, mapMutations } from 'vuex';
+ import combinedTitle from '@/components/combined-title/combined-title.vue';
+ export default {
+ onLoad(params) {
+ this.takeCoalId = params.takeCoalId;
+ this.weighData.sceneId = params.sceneId;
+ this.weighData.gateCameraId = params.gateCameraId;
+ this.weighData.equipmentCode = params.gateCameraCode;
+ this.weighData.sceneInOut = params.sceneInOut;
+ this.weighHouseCode = params.weighHouseCode;
+ this.primarySkin = params.primarySkin;
+ this.primaryHair = params.primaryHair;
+ this.primaryClean = params.primaryClean;
+ if (params.overTmWaixiao) {
+ this.weighData.overTmWaixiao = 1
}
+ this.changeweighHouseCode(params.weighHouseCode);
},
- // 鐩戝惉閲嶉噺鍙樺寲
- globalweigh: {
- handler(v) {
- this.weighData.weigh = this.realTimeWeigh = v;
+ components: {
+ combinedTitle
+ },
+ data() {
+ return {
+ weighData: {
+ //纭绉伴噸鎺ュ彛鍙傛暟
+ deptId: '',
+ tmId: '',
+ sceneId: '',
+ carNo: '',
+ gateCameraId: '',
+ equipmentCode: '',
+ weigh: 0,
+ tmCode: '',
+ sceneInOut: '',
+ coalContactClean: 0,
+ coalContactHair: 0,
+ coalContactSkin: 0
+ },
+ // 鏄惁濉啓鍘熷彂淇℃伅
+ isInputOrigin: false,
+ haveInputOrigin: false,
+
+ takeCoalId: null,
+ weighHouseCode: '',
+ isConfirmWeighLoading: false, //纭畾绉伴噸鎸夐挳
+ realTimeWeigh: 0,
+ weighList: {},
+ // 涓存椂绉伴噸瀵硅薄
+ temporaryWeighObj: {
+ skin: 0,
+ hair: 0,
+ clean: 0
+ },
+ infraredStatus: false, // 绾㈠鐘舵�侊紝
+ // 鏀剧┖鎺у埗
+ evacuationModalShow: false,
+ evacuationTitle: '鏀剧┖纭',
+ evacuationContent: '鏄惁纭鏀剧┖',
+ // 鑾峰彇鍘熷彂淇℃伅
+ primarySkin: null,
+ primaryHair: null,
+ primaryClean: null,
+ // 鍒ゆ柇绉伴噸鎸夐挳鏄惁鍙敤
+ isweigh: false,
+ // 澶栬喘绫诲瀷绉伴噸濉啓姣涳紝鐨紝
+ firstHairCustomernameShow: false,
+ coalContactHair: '',
+ coalContactSkin: '',
+ // 鑱氱劍鏃舵敼鍙樻牱寮�
+ isfocus1: false,
+ isfocus2: false,
+ // 澶栬喘绗竴娆$О姣涢噸涓嶉渶瑕佸姞鍑忓惃
+ outBuy: true
+ };
+ },
+ watch: {
+ realTimeWeigh(newV, oldV) {
+ if (this.weighList.orderType == '澶栭攢' || this.weighList.orderType == '鍐呴攢' || this.weighList.orderType ==
+ '杞嚭') {
+ if (this.weighList.skin == 0) {
+ // this.temporaryWeighObj.skin = this.realTimeWeigh;
+ this.temporaryWeighObj.skin = newV;
+ this.isweigh = this.temporaryWeighObj.skin > this.weighList.orderSurplus;
+ } else {
+ // this.temporaryWeighObj.hair = this.realTimeWeigh;
+ this.temporaryWeighObj.hair = newV;
+ this.temporaryWeighObj.clean = (this.temporaryWeighObj.hair - this.weighList.skin).toFixed(2);
+ this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this.temporaryWeighObj
+ .clean < 0;
+ }
+ } else if (this.weighList.orderType == '澶栬喘' || this.weighList.orderType == '鍐呰喘' || this.weighList
+ .orderType == '杞叆') {
+ if (this.weighList.hair == 0) {
+ // this.temporaryWeighObj.hair = this.realTimeWeigh;
+ this.temporaryWeighObj.hair = newV;
+ this.isweigh = this.temporaryWeighObj.hair > this.weighList.orderSurplus;
+ } else {
+ // this.temporaryWeighObj.skin = this.realTimeWeigh;
+ this.temporaryWeighObj.skin = newV;
+ this.temporaryWeighObj.clean = (this.weighList.hair - this.temporaryWeighObj.skin).toFixed(2);
+ this.isweigh = this.temporaryWeighObj.clean > this.weighList.orderSurplus || this.temporaryWeighObj
+ .clean < 0;
+ }
+ }
+ },
+ // 鐩戝惉閲嶉噺鍙樺寲
+ // globalweigh: {
+ // handler(v) {
+ // this.weighData.weigh = this.realTimeWeigh = v;
+ // console.log(this.realTimeWeigh, '鐪熷疄閲嶉噺鏀瑰彉浜�');
+ // },
+ // deep: true
+ // },
+ globalweigh(newV) {
+ this.weighData.weigh = this.realTimeWeigh = newV;
console.log(this.realTimeWeigh, '鐪熷疄閲嶉噺鏀瑰彉浜�');
+ }
+ },
+ onShow() {
+ this.init();
+ this.changeisLogin(true)
+ this.realTimeWeigh = 0
+ },
+ onHide() {
+
+ },
+ computed: {
+ ...mapState(['globalweigh', 'globalinfraredStatus']),
+ coalContactClean() {
+ return (Number(this.weighData.coalContactHair) - Number(this.weighData.coalContactSkin)).toFixed(2);
},
- deep: true,
- immediate: true
- }
- },
- onShow() {
- this.init();
- this.realTimeWeigh = 0;
- // this.initWebSocket();
- },
- computed: {
- ...mapState(['globalweigh', 'globalinfraredStatus']),
- coalContactClean() {
- return (Number(this.weighData.coalContactHair) - Number(this.weighData.coalContactSkin)).toFixed(2);
- },
- token() {
- return uni.getStorageSync('token');
- },
- // 鍔犲噺鐓ゆ寜閽鐢ㄤ笌鍚�
- addAndSubtractCoalDisabled() {
- return this.realTimeWeigh == 0;
- // if (this.weighList.orderType == '澶栭攢' || this.weighList.orderType == '鍐呴攢' || this.weighList.orderType == '杞嚭') {
- // if (this.weighList.hair == 0) {
- // return true;
- // } else if (this.weighList.hair != 0) {
- // return false;
- // }
- // }
- },
- // 鏄惁鏀剧┖鎸夐挳绂佺敤
- isEvacuation() {
- if (this.weighList.orderType == '澶栭攢' || this.weighList.orderType == '鍐呴攢' || this.weighList.orderType == '杞嚭') {
- return this.weighList.skin == this.temporaryWeighObj.hair || this.temporaryWeighObj.skin == this.temporaryWeighObj.hair;
- }
- if (this.weighList.orderType == '澶栬喘' || this.weighList.orderType == '鍐呰喘' || this.weighList.orderType == '杞叆') {
- return this.weighList.hair == this.temporaryWeighObj.skin || this.temporaryWeighObj.skin == this.temporaryWeighObj.hair;
- }
- },
- sideline() {
- return this.weighList.orderType == '鍐呰喘' || this.weighList.orderType == '杞叆';
- }
- },
- methods: {
- ...mapMutations(['changeweighHouseCode']),
- init() {
- // 鑾峰彇绉伴噸淇℃伅
- this.$reqGet('weighList', { id: this.takeCoalId }).then(res => {
- console.log(res, '鑾峰彇绉伴噸淇℃伅');
- if (res.code == 0) {
- this.weighList = res.data;
- this.weighData.deptId = res.data.deptId;
- this.weighData.tmId = res.data.id;
- this.weighData.carNo = res.data.carNo;
- this.weighData.tmCode = res.data.code;
- this.weighData.filedId = res.data.filedId;
- this.weighData.coalContactHair = res.data.hairTwo ? res.data.hairTwo : 0;
- this.weighData.coalContactSkin = res.data.skinTwo ? res.data.skinTwo : 0;
- if (this.weighList.orderType == '澶栬喘') {
- this.firstHairCustomernameShow = true;
- if (this.weighList.hair == 0) {
- this.outBuy = false;
- }
- }
- if (this.weighData.coalContactHair > 0 && this.weighData.coalContactSkin > 0) {
- this.isInputOrigin = true;
- if (this.isInputOrigin) {
- this.$u.toast('淇℃伅宸插~鍐�');
- }
- }
+ token() {
+ return uni.getStorageSync('token');
+ },
+ // 鍔犲噺鐓ゆ寜閽鐢ㄤ笌鍚�
+ addAndSubtractCoalDisabled() {
+ return this.realTimeWeigh == 0;
+ // if (this.weighList.orderType == '澶栭攢' || this.weighList.orderType == '鍐呴攢' || this.weighList.orderType == '杞嚭') {
+ // if (this.weighList.hair == 0) {
+ // return true;
+ // } else if (this.weighList.hair != 0) {
+ // return false;
+ // }
+ // }
+ },
+ // 鏄惁鏀剧┖鎸夐挳绂佺敤
+ isEvacuation() {
+ if (this.weighList.orderType == '澶栭攢' || this.weighList.orderType == '鍐呴攢' || this.weighList.orderType ==
+ '杞嚭') {
+ return this.weighList.skin == this.temporaryWeighObj.hair || this.temporaryWeighObj.skin == this
+ .temporaryWeighObj.hair;
}
- });
+ if (this.weighList.orderType == '澶栬喘' || this.weighList.orderType == '鍐呰喘' || this.weighList.orderType ==
+ '杞叆') {
+ return this.weighList.hair == this.temporaryWeighObj.skin || this.temporaryWeighObj.skin == this
+ .temporaryWeighObj.hair;
+ }
+ },
+ sideline() {
+ return this.weighList.orderType == '鍐呰喘' || this.weighList.orderType == '杞叆';
+ }
},
- /**
- * @纭绉伴噸绛夊緟鍚庣鎻愪緵瀹炴椂绉伴噸鎺ュ彛锛岃幏鍙栫毊閲嶏紝姣涢噸
- */
- confirmWeigh() {
- if (this.isConfirmWeighLoading == false) {
- this.isConfirmWeighLoading = true;
- if (this.weighData.weigh != 0) {
- if (this.weighList.orderType == '澶栭攢') {
- if (this.weighList.skin ? (this.weighList.skin < this.realTimeWeigh ? true : false) : true) {
- this.saveWeigh();
+ methods: {
+ ...mapMutations(['changeweighHouseCode', 'changeisLogin']),
+ init() {
+ // 鑾峰彇绉伴噸淇℃伅
+ this.$reqGet('weighList', { id: this.takeCoalId }).then(res => {
+ console.log(res, '鑾峰彇绉伴噸淇℃伅');
+ if (res.code == 0) {
+ this.weighList = res.data;
+ this.weighData.deptId = res.data.deptId;
+ this.weighData.tmId = res.data.id;
+ this.weighData.carNo = res.data.carNo;
+ this.weighData.tmCode = res.data.code;
+ this.weighData.filedId = res.data.filedId;
+ this.weighData.coalContactHair = res.data.hairTwo ? res.data.hairTwo : 0;
+ this.weighData.coalContactSkin = res.data.skinTwo ? res.data.skinTwo : 0;
+ if (this.weighList.orderType == '澶栬喘') {
+ this.firstHairCustomernameShow = true;
+ if (this.weighList.hair > 0) {
+ this.haveInputOrigin = true;
+ this.isInputOrigin = true;
+ }
+ if (this.weighList.hair == 0) {
+ this.outBuy = false;
+ }
} else {
- this.$u.toast('姣涢噸涓嶈兘灏忎簬鐨噸');
- this.isConfirmWeighLoading = false;
+ this.isInputOrigin = true;
+ }
+ }
+ });
+ },
+ /**
+ * @纭绉伴噸绛夊緟鍚庣鎻愪緵瀹炴椂绉伴噸鎺ュ彛锛岃幏鍙栫毊閲嶏紝姣涢噸
+ */
+ confirmWeigh() {
+ if (this.isConfirmWeighLoading == false) {
+ this.isConfirmWeighLoading = true;
+ if (this.weighData.weigh != 0) {
+ if (this.weighList.orderType == '澶栭攢') {
+ if (this.weighList.skin ? (this.weighList.skin < this.realTimeWeigh ? true : false) : true) {
+ this.saveWeigh();
+ } else {
+ this.$u.toast('姣涢噸涓嶈兘灏忎簬鐨噸');
+ this.isConfirmWeighLoading = false;
+ }
+ } else {
+ this.saveWeigh();
}
} else {
- this.saveWeigh();
+ this.$u.toast('鏈兘鑾峰彇鍦扮閲嶉噺');
+ this.isConfirmWeighLoading = false;
}
- } else {
- this.$u.toast('鏈兘鑾峰彇鍦扮閲嶉噺');
- this.isConfirmWeighLoading = false;
}
- }
- },
- // 纭绉伴噸鎺ュ彛
- saveWeigh() {
- this.weighData.coalContactClean = this.coalContactClean;
- this.$reqPost('saveWeigh', this.weighData, 'json')
- .then(res => {
- console.log(res, '绉伴噸鎺ュ彛');
+ },
+ // 纭绉伴噸鎺ュ彛
+ saveWeigh() {
+ this.weighData.coalContactClean = this.coalContactClean;
+ this.$reqPost('saveWeigh', this.weighData, 'json')
+ .then(res => {
+ console.log(res, '绉伴噸鎺ュ彛');
+ if (res.code == 0) {
+ this.$u.toast('绉伴噸鎴愬姛');
+ setTimeout(() => {
+ uni.navigateBack({
+ delta: 1
+ });
+ this.isConfirmWeighLoading = false;
+ }, 1000);
+ } else {
+ this.$u.toast('绉伴噸澶辫触锛岃绋嶅悗閲嶈瘯');
+ }
+ })
+ .catch(err => {
+ this.isConfirmWeighLoading = false;
+ console.log(err);
+ });
+ },
+ // 鍔犲噺鐓�
+ addAndSubtractCoal() {
+ this.$reqPost('addAndSubtractCoal', {
+ deptId: this.weighData.deptId,
+ sceneId: this.weighData.sceneId,
+ carNo: this.weighData.carNo
+ }, 'json').then(res => {
if (res.code == 0) {
- this.$u.toast('绉伴噸鎴愬姛');
+ this.$u.toast('鎿嶄綔鎴愬姛锛屽嵆灏嗚繑鍥炰笂涓�椤�');
setTimeout(() => {
uni.navigateBack({
delta: 1
});
this.isConfirmWeighLoading = false;
}, 1000);
- } else {
- this.$u.toast('绉伴噸澶辫触锛岃绋嶅悗閲嶈瘯');
+ console.log(res, '鍔犲噺鐓�');
}
- })
- .catch(err => {
- this.isConfirmWeighLoading = false;
- console.log(err);
});
- },
- // 鍔犲噺鐓�
- addAndSubtractCoal() {
- this.$reqPost('addAndSubtractCoal', { deptId: this.weighData.deptId, sceneId: this.weighData.sceneId, carNo: this.weighData.carNo }, 'json').then(res => {
- if (res.code == 0) {
- this.$u.toast('鎿嶄綔鎴愬姛锛屽嵆灏嗚繑鍥炰笂涓�椤�');
- setTimeout(() => {
- uni.navigateBack({
- delta: 1
- });
- this.isConfirmWeighLoading = false;
- }, 1000);
- console.log(res, '鍔犲噺鐓�');
- }
- });
- },
- // 鏀剧┖
- evacuation() {
- this.evacuationModalShow = true;
- },
- // 鏀剧┖寮圭獥纭
- evacuationConfirm() {
- this.$reqPost('getTwoEvacuation', this.weighData, 'json').then(res => {
- console.log(res, '绗簩娆℃斁绌�');
- if (res.code == 0) {
- this.$u.toast('鎿嶄綔鎴愬姛');
- this.evacuationModalShow = false;
+ },
+ // 鏀剧┖
+ evacuation() {
+ this.evacuationModalShow = true;
+ },
+ // 鏀剧┖寮圭獥纭
+ evacuationConfirm() {
+ this.$reqPost('getTwoEvacuation', this.weighData, 'json').then(res => {
+ console.log(res, '绗簩娆℃斁绌�');
+ if (res.code == 0) {
+ this.$u.toast('鎿嶄綔鎴愬姛');
+ this.evacuationModalShow = false;
+ } else {
+ this.$u.toast(res.msg ? res.msg : '鎿嶄綔澶辫触');
+ this.evacuationModalShow = true;
+ }
+ });
+ },
+ // 鏀剧┖寮圭獥鍙栨秷
+ evacuationCancel() {
+ this.evacuationModalShow = false;
+ },
+ // input鑱氱劍
+ inputFocus(v) {
+ if (v == 1) {
+ this.isfocus1 = true;
} else {
- this.$u.toast(res.msg ? res.msg : '鎿嶄綔澶辫触');
- this.evacuationModalShow = true;
+ this.isfocus2 = true;
}
- });
- },
- // 鏀剧┖寮圭獥鍙栨秷
- evacuationCancel() {
- this.evacuationModalShow = false;
- },
- // input鑱氱劍
- inputFocus(v) {
- if (v == 1) {
- this.isfocus1 = true;
- } else {
- this.isfocus2 = true;
+ },
+ // input澶辩劍
+ inputBlur() {
+ this.isfocus1 = false;
+ this.isfocus2 = false;
+ },
+ inputChange() {
+ if (this.weighData.coalContactHair > 0 && this.weighData.coalContactSkin > 0) {
+ this.isInputOrigin = true;
+ }
}
- },
- // input澶辩劍
- inputBlur() {
- this.isfocus1 = false;
- this.isfocus2 = false;
}
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-@mixin flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-::v-deep.weighingDevice {
- width: 100%;
- height: 100vh;
- display: flex;
- flex-direction: column;
- .one {
- // flex: 3;
- height: 290rpx;
- margin: vww(20) vww(20) 0 vww(20);
- border-radius: vww(15);
- .top {
- height: 75%;
- display: flex;
- .top_left {
- flex: 3;
- font-size: vww(50);
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 74rpx;
- font-weight: 400;
- color: #ffffff;
- line-height: 69rpx;
- text-shadow: 0rpx 3rpx 14rpx rgba(0, 0, 0, 0.33);
- text {
- font-family: weighting;
- }
- }
- .top_right {
- display: flex;
- flex-direction: column;
- justify-content: center;
- flex: 2;
- font-size: 31rpx;
- font-weight: 300;
- color: #ffffff;
- view {
- display: flex;
- align-items: center;
- }
- }
- }
- .bottom {
- text-align: center;
- height: 25%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- flex-direction: column;
- font-size: 28rpx;
- font-weight: 300;
- color: #d9e1fe;
- }
- }
- .middle-block {
- width: 690rpx;
- height: 386rpx;
- margin: vww(20) vww(15) vww(13);
- background: #ffffff;
- box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
- border-radius: 20rpx;
- @include flex;
- justify-content: center;
- overflow: hidden;
- .block-main {
- width: 650rpx;
- height: 350rpx;
- @include flex;
- flex-direction: column;
- margin-bottom: vww(20);
- position: relative;
- .first-line,
- .second-line {
- width: 90%;
- height: vww(44);
- .focusClass {
- color: #5b95fd;
- }
- .inputClass {
- border: 1px solid rgba(73, 95, 252, 0.6) !important;
- box-shadow: 0rpx 5rpx 13rpx 0rpx rgba(73, 95, 252, 0.6) !important;
- border-radius: 12rpx !important;
- }
- .isInputOrigin {
- background-color: #f4f4fc;
- }
- .input-container {
- border: 2px solid #c5c5c5;
- box-shadow: 0rpx 5rpx 13rpx 0rpx #c5c5c5;
- border-radius: 12rpx;
- }
- }
- .first-line {
- @include flex;
- position: relative;
- top: vww(8);
- }
- .second-line {
- @include flex;
- }
- }
- .block-sideline {
- width: 94%;
- height: vww(100);
- @include flex flex-direction: column;
- align-items: flex-start;
- .first-line {
- width: 100%;
- }
- .weigh-item {
- width: 100%;
- height: vww(36);
- @include flex justify-content: space-around;
- .item {
- min-width: vww(50);
- height: vww(45);
- font-size: 21rpx;
- font-weight: 400;
- color: #ffffff;
- text-align: center;
- line-height: vww(30);
- @include flex;
- .concrete {
- width: vww(36);
- height: vww(36);
- }
- .num {
- font-size: 40rpx;
- font-weight: 300;
- color: #303030;
- }
- }
- }
- }
- }
- .bottom-block {
- width: calc(100% - 60rpx);
- box-sizing: border-box;
- height: 630rpx;
- margin: 0 vww(15) vww(45) vww(15);
- background: #ffffff;
- box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
- border-radius: 20rpx;
- @include flex;
- justify-content: center;
- overflow: hidden;
- .block-main {
- width: 94%;
- height: 565rpx;
- margin-top: vww(10);
- @include flex;
- justify-content: space-around;
- align-items: flex-start;
- flex-direction: column;
- overflow: hidden;
- .main-information {
- width: 100%;
- height: 28rpx;
- font-size: 28rpx;
- font-weight: 300;
- color: #303030;
- @include flex;
- justify-content: flex-start;
- overflow: hidden;
- .prefix {
- min-width: vww(60);
- }
- .suffix {
- flex: 1;
- margin-left: vww(12);
- text-align: left;
- }
- }
- }
- }
- .three {
- margin: 0 auto vww(20);
- flex: 0.7;
- display: flex;
- color: #939393;
- .u-button {
- &:nth-of-type(2) {
- margin-left: vww(10);
- }
- &:nth-of-type(3) {
- margin-left: vww(10);
- }
- }
- }
- .four {
- width: 100%;
- margin-top: vww(5);
- text-align: center;
- }
-}
-.secondary-confirmation__main {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
- .secondary-child {
+<style lang="scss"
+ scoped>
+ @mixin flex {
display: flex;
justify-content: space-between;
+ align-items: center;
}
-}
-</style>
+
+ ::v-deep.weighingDevice {
+ width: 100%;
+ height: 100vh;
+ display: flex;
+ flex-direction: column;
+
+ .one {
+ // flex: 3;
+ height: 290rpx;
+ margin: vww(20) vww(20) 0 vww(20);
+ border-radius: vww(15);
+
+ .top {
+ height: 75%;
+ display: flex;
+
+ .top_left {
+ flex: 3;
+ font-size: vww(50);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 74rpx;
+ font-weight: 400;
+ color: #ffffff;
+ line-height: 69rpx;
+ text-shadow: 0rpx 3rpx 14rpx rgba(0, 0, 0, 0.33);
+
+ text {
+ font-family: weighting;
+ }
+ }
+
+ .top_right {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ flex: 2;
+ font-size: 31rpx;
+ font-weight: 300;
+ color: #ffffff;
+
+ view {
+ display: flex;
+ align-items: center;
+ }
+ }
+ }
+
+ .bottom {
+ text-align: center;
+ height: 25%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ flex-direction: column;
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #d9e1fe;
+ }
+ }
+
+ .middle-block {
+ width: 690rpx;
+ height: 386rpx;
+ margin: vww(20) vww(15) vww(13);
+ background: #ffffff;
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
+ border-radius: 20rpx;
+ @include flex;
+ justify-content: center;
+ overflow: hidden;
+
+ .block-main {
+ width: 650rpx;
+ height: 350rpx;
+ @include flex;
+ flex-direction: column;
+ margin-bottom: vww(20);
+ position: relative;
+
+ .first-line,
+ .second-line {
+ width: 90%;
+ height: vww(44);
+
+ .focusClass {
+ color: #5b95fd;
+ }
+
+ .inputClass {
+ border: 1px solid rgba(73, 95, 252, 0.6) !important;
+ box-shadow: 0rpx 5rpx 13rpx 0rpx rgba(73, 95, 252, 0.6) !important;
+ border-radius: 12rpx !important;
+ }
+
+ .isInputOrigin {
+ background-color: #f4f4fc;
+ }
+
+ .input-container {
+ border: 2px solid #c5c5c5;
+ box-shadow: 0rpx 5rpx 13rpx 0rpx #c5c5c5;
+ border-radius: 12rpx;
+ }
+ }
+
+ .first-line {
+ @include flex;
+ position: relative;
+ top: vww(8);
+ }
+
+ .second-line {
+ @include flex;
+ }
+ }
+
+ .block-sideline {
+ width: 94%;
+ height: vww(100);
+ @include flex flex-direction: column;
+ align-items: flex-start;
+
+ .first-line {
+ width: 100%;
+ }
+
+ .weigh-item {
+ width: 100%;
+ height: vww(36);
+ @include flex justify-content: space-around;
+
+ .item {
+ min-width: vww(50);
+ height: vww(45);
+ font-size: 21rpx;
+ font-weight: 400;
+ color: #ffffff;
+ text-align: center;
+ line-height: vww(30);
+ @include flex;
+
+ .concrete {
+ width: vww(36);
+ height: vww(36);
+ }
+
+ .num {
+ font-size: 40rpx;
+ font-weight: 300;
+ color: #303030;
+ }
+ }
+ }
+ }
+ }
+
+ .bottom-block {
+ width: calc(100% - 60rpx);
+ box-sizing: border-box;
+ height: 630rpx;
+ margin: 0 vww(15) vww(45) vww(15);
+ background: #ffffff;
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
+ border-radius: 20rpx;
+ @include flex;
+ justify-content: center;
+ overflow: hidden;
+
+ .block-main {
+ width: 94%;
+ height: 565rpx;
+ margin-top: vww(10);
+ @include flex;
+ justify-content: space-around;
+ align-items: flex-start;
+ flex-direction: column;
+ overflow: hidden;
+
+ .main-information {
+ width: 100%;
+ height: 28rpx;
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #303030;
+ @include flex;
+ justify-content: flex-start;
+ overflow: hidden;
+
+ .prefix {
+ min-width: vww(60);
+ }
+
+ .suffix {
+ flex: 1;
+ margin-left: vww(12);
+ text-align: left;
+ }
+ }
+ }
+ }
+
+ .three {
+ margin: 0 auto vww(20);
+ flex: 0.7;
+ display: flex;
+ color: #939393;
+
+ .u-button {
+ &:nth-of-type(2) {
+ margin-left: vww(10);
+ }
+
+ &:nth-of-type(3) {
+ margin-left: vww(10);
+ }
+ }
+ }
+
+ .four {
+ width: 100%;
+ margin-top: vww(5);
+ text-align: center;
+ }
+ }
+
+ .secondary-confirmation__main {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: center;
+
+ .secondary-child {
+ display: flex;
+ justify-content: space-between;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/driver-page/driver-index/driver-index.vue b/pages/driver-page/driver-index/driver-index.vue
index e20bc70..b00d209 100644
--- a/pages/driver-page/driver-index/driver-index.vue
+++ b/pages/driver-page/driver-index/driver-index.vue
@@ -3,16 +3,25 @@
<view class="driver-index">
<view class="driver-index-body">
<!-- 寰呴鍙栨彁鐓ゅ崟 -->
- <view class="wait-collection" style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/diverbanner.png') no-repeat;background-size:contain"></view>
+ <view class="wait-collection"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/diverbanner.png') no-repeat;background-size:contain">
+ </view>
<view class="collection-form">
- <view class="collection-form-item" v-for="(item, index) in driverBillOfLoadingData.list1" :key="index">
+ <view class="collection-form-item"
+ v-for="(item, index) in driverBillOfLoadingData.list1"
+ :key="index">
<view class="main-divider"></view>
<view class="first-line">
<view class="main-information">
<view class="sign">瑁�</view>
<view class="filedname exceedHide">
- <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName }}</text>
- <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.customerNameCopy }}</text>
+ <text
+ v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' ">{{ item.deptName|| '' }}</text>
+ <text
+ v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' ">{{ item.customerId?item.customerName:item.customerNameCopy|| '' }}</text>
+ <text v-else-if="item.orderType == '杞嚭'|| item.orderType == '杞叆'">{{item.filedName}}
+
+ </text>
</view>
</view>
<view class="point-number">
@@ -24,10 +33,15 @@
<view class="main-information">
<view class="sign">鍗�</view>
<view class="filedname exceedHide">
- <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">
- {{ item.customerNameCopy ? item.customerNameCopy : item.customerName }}
+ <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' ">
+ {{ item.customerNameCopy ? item.customerNameCopy : item.customerName|| '' }}
</text>
- <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName }}</text>
+ <text
+ v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' ">{{ item.deptName|| '' }}</text>
+ <text
+ v-else-if="item.orderType == '杞嚭'|| item.orderType == '杞叆'">{{item.toFiledName}}
+
+ </text>
</view>
</view>
</view>
@@ -35,61 +49,89 @@
<view class="coal-name">{{ item.coalName }}</view>
</view> -->
<view class="third-line">
- <view class="time-icon"><u-icon name="clock" color="#515151" size="40"></u-icon></view>
+ <view class="time-icon"><u-icon name="clock"
+ color="#515151"
+ size="40"></u-icon></view>
<view class="send-date">{{ item.sendDate }}</view>
<view class="type">
<view class="coal-name">{{ item.coalName }}</view>
</view>
</view>
- <view class="fourth-line" @click="qiangDanBtn(item)" v-if="item.carNum - item.taskNum !== 0"><view class="button-img">绔嬪嵆鎶㈠崟</view></view>
+ <view class="fourth-line"
+ @click="qiangDanBtn(item)"
+ v-if="item.carNum - item.taskNum !== 0">
+ <view class="button-img">绔嬪嵆鎶㈠崟</view>
+ </view>
</view>
</view>
<!-- 鎶㈠崟鎻愮ず妯℃�佹 -->
<view class="qianDanModel">
- <u-modal :show="qiangDanShow" :title="qiangDanTitle" showCancelButton :content="qiangDanContent" @confirm="qiangDanConfirm" @cancel="qiangDanCancel"></u-modal>
+ <u-modal :show="qiangDanShow"
+ :title="qiangDanTitle"
+ showCancelButton
+ :content="qiangDanContent"
+ @confirm="qiangDanConfirm"
+ @cancel="qiangDanCancel"></u-modal>
</view>
<!-- 寰呴绾︽彁鐓ゅ崟 -->
<view class="wait-appointment">
<combined-title title="寰呴绾︽彁鐓ゅ崟"></combined-title>
- <u-empty
- mode="data"
+ <u-empty mode="data"
icon="http://cdn.uviewui.com/uview/empty/data.png"
textSize="30"
iconSize="1000"
- v-if="driverBillOfLoadingData.list3 ? (driverBillOfLoadingData.list3.length == 0 ? true : false) : true"
- ></u-empty>
+ v-if="driverBillOfLoadingData.list3 ? (driverBillOfLoadingData.list3.length == 0 ? true : false) : true"></u-empty>
<view class="appointment-form">
- <view class="appointment-form-item" v-for="(item, index) in driverBillOfLoadingData.list3" :key="index">
+ <view class="appointment-form-item"
+ v-for="(item, index) in driverBillOfLoadingData.list3"
+ :key="index">
<view class="main-divider"></view>
<view class="first-line">
<view class="main-information">
<view class="sign">瑁�</view>
<view class="filedname exceedHide">
- <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName }}</text>
- <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.customerName }}</text>
+ <text
+ v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' ">{{ item.deptName }}</text>
+ <text
+ v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' ">{{ item.customerName }}</text>
+ <text
+ v-else-if="item.orderType == '杞嚭'|| item.orderType == '杞叆'">{{item.filedName}}
+ </text>
</view>
</view>
- <view class="map-icon" @click.stop="skipMap(item)">
- <view><u-icon name="map" color="#4978F0" size="40"></u-icon></view>
+ <view class="map-icon"
+ @click.stop="skipMap(item)">
+ <view><u-icon name="map"
+ color="#4978F0"
+ size="40"></u-icon></view>
</view>
</view>
<view class="first-extra">
<view class="main-information">
<view class="sign">鍗�</view>
<view class="filedname exceedHide">
- <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.customerName }}</text>
- <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName }}</text>
+ <text
+ v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' ">{{ item.customerName }}</text>
+ <text
+ v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' ">{{ item.deptName }}</text>
+ <text
+ v-else-if="item.orderType == '杞嚭'|| item.orderType == '杞叆'">{{item.toFiledName}}</text>
</view>
</view>
- <view class="map-icon" @click.stop="skipMap(item)">
- <view><u-icon name="map" color="#4978F0" size="40"></u-icon></view>
+ <view class="map-icon"
+ @click.stop="skipMap(item)">
+ <view><u-icon name="map"
+ color="#4978F0"
+ size="40"></u-icon></view>
</view>
</view>
<view class="third-line">
<view class="clock">
- <view class="time-icon"><u-icon name="clock" color="#515151" size="40"></u-icon></view>
+ <view class="time-icon"><u-icon name="clock"
+ color="#515151"
+ size="40"></u-icon></view>
<view class="send-date">{{ item.sendDate }}</view>
</view>
<view class="type">
@@ -97,7 +139,10 @@
<!-- <view class="order-type">{{ item.orderType }}</view> -->
</view>
</view>
- <view class="fourth-line" @click="toAppointmentClick(item)"><view class="button-img">绔嬪嵆棰勭害</view></view>
+ <view class="fourth-line"
+ @click="toAppointmentClick(item)">
+ <view class="button-img">绔嬪嵆棰勭害</view>
+ </view>
</view>
</view>
</view>
@@ -105,47 +150,68 @@
<!-- 宸查绾︽彁鐓ゅ崟 -->
<view class="Reserved">
<combined-title title="宸查绾︽彁鐓ゅ崟"></combined-title>
- <u-empty
- mode="data"
+ <u-empty mode="data"
icon="http://cdn.uviewui.com/uview/empty/data.png"
textSize="30"
iconSize="1000"
- v-if="driverBillOfLoadingData.list2 ? (driverBillOfLoadingData.list2.length == 0 ? true : false) : true"
- ></u-empty>
+ v-if="driverBillOfLoadingData.list2 ? (driverBillOfLoadingData.list2.length == 0 ? true : false) : true"></u-empty>
<view class="appointment-form">
- <view class="appointment-form-item" v-for="(item, index) in driverBillOfLoadingData.list2" :key="index" @click="list3CardIconClick(item)">
+ <view class="appointment-form-item"
+ v-for="(item, index) in driverBillOfLoadingData.list2"
+ :key="index"
+ @click="list3CardIconClick(item)">
<view class="main-divider"></view>
<view class="first-line">
<view class="main-information">
<view class="sign">瑁�</view>
<view class="filedname exceedHide">
- <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName }}</text>
- <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.customerName }}</text>
+ <text
+ v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' ">{{ item.deptName }}</text>
+ <text
+ v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' ">{{ item.customerName }}</text>
+ <text v-else-if="item.orderType == '杞嚭'||item.orderType == '杞叆'">
+ {{item.filedName}}
+
+ </text>
</view>
</view>
- <view class="map-icon" @click.stop="skipMap(item)">
- <view><u-icon name="map" color="#4978F0" size="40"></u-icon></view>
+ <view class="map-icon"
+ @click.stop="skipMap(item)">
+ <view><u-icon name="map"
+ color="#4978F0"
+ size="40"></u-icon></view>
</view>
</view>
<view class="second-line">
<view class="main-information">
<view class="sign">鍗�</view>
<view class="filedname exceedHide">
- <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.customerName }}</text>
- <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName }}</text>
+ <text
+ v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' ">{{ item.customerName }}</text>
+ <text
+ v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘'">{{ item.deptName }}</text>
+ <text v-else-if="item.orderType == '杞嚭'||item.orderType == '杞叆'">
+ {{item.toFiledName}}
+
+ </text>
</view>
</view>
- <view class="map-icon" @click.stop="skipMap(item)">
- <view><u-icon name="map" color="#4978F0" size="40"></u-icon></view>
+ <view class="map-icon"
+ @click.stop="skipMap(item)">
+ <view><u-icon name="map"
+ color="#4978F0"
+ size="40"></u-icon></view>
</view>
</view>
<view class="third-line">
<view class="clock havedclock">
- <view class="time-icon"><u-icon name="clock" color="#515151" size="40"></u-icon></view>
- <view class="send-date">{{ item.yuYueSection }}</view>
+ <view class="time-icon"><u-icon name="clock"
+ color="#515151"
+ size="40"></u-icon></view>
+ <view class="send-date">{{ item.yuYueSection|| '' }}</view>
</view>
<view class="type">
- <view class="coal-name">{{ item.coalName }}</view>
+ <view class="coal-name">{{ item.coalName || '' }}</view>
<!-- <view class="order-type">{{ item.orderType }}</view> -->
</view>
</view>
@@ -159,552 +225,614 @@
</template>
<script>
-import { customerId } from '@/utils/status';
-import combinedTitle from '@/components/combined-title/combined-title.vue';
+ import { customerId } from '@/utils/status';
+ import combinedTitle from '@/components/combined-title/combined-title.vue';
-export default {
- components: {
- combinedTitle
- },
- props: {
- indexdriverBillOfLoadingData: {
- type: Object,
- default: {}
- }
- },
- watch: {
- indexdriverBillOfLoadingData: {
- handler(v) {
- this.driverBillOfLoadingData = v;
- },
- deep: true,
- immediate: true
- }
- },
- data() {
- return {
- driverBillOfLoadingData: {
- list1: [],
- list2: [],
- list3: []
- },
- // 鎶㈠崟妯℃�佹
- qiangDanShow: false,
- qiangDanTitle: '鎶㈠崟鎻愮ず',
- qiangDanContent: '',
- qiangDanOrderPlanId: null,
- fleetId: '',
- xsUserId: '',
- customerId: ''
- };
- },
- onShow() {
- this.init();
- },
- methods: {
- // 璺宠浆鍦板浘
- skipMap(val) {
- uni.navigateTo({
- url: `/pages/public-page/mapRoute/mapRoute?customerId=${val.customerId}&filedId=${val.filedId}&orderType=${val.orderType}${
+ export default {
+ components: {
+ combinedTitle
+ },
+ props: {
+ indexdriverBillOfLoadingData: {
+ type: Object,
+ default: {}
+ }
+ },
+ watch: {
+ indexdriverBillOfLoadingData: {
+ handler(v) {
+ this.driverBillOfLoadingData = v;
+ },
+ deep: true,
+ immediate: true
+ }
+ },
+ data() {
+ return {
+ driverBillOfLoadingData: {
+ list1: [],
+ list2: [],
+ list3: []
+ },
+ // 鎶㈠崟妯℃�佹
+ qiangDanShow: false,
+ qiangDanTitle: '鎶㈠崟鎻愮ず',
+ qiangDanContent: '',
+ qiangDanOrderPlanId: null,
+ fleetId: '',
+ xsUserId: '',
+ customerId: ''
+ };
+ },
+ onShow() {
+ this.init();
+ },
+ methods: {
+ // 璺宠浆鍦板浘
+ skipMap(val) {
+ uni.navigateTo({
+ url: `/pages/public-page/mapRoute/mapRoute?customerId=${val.customerId}&filedId=${val.filedId}&orderType=${val.orderType}${
val.toFiledId ? `&toFiledId=${val.toFiledId}&filedId=${val.filedId}` : ''
}`
- });
- },
- init() {
- this.qiangDanList();
- },
- // 鍙告満棣栭〉鍒楄〃
- qiangDanList() {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- this.$reqGet('qiangDanList').then(res => {
- uni.hideLoading();
- this.driverBillOfLoadingData = res.data;
- });
- },
- // 鎶㈠崟鎸夐挳
- qiangDanBtn(value) {
- if (value.tmcCount == '0') {
- this.qiangDan(value.orderPlanId, value.fleetId, value.customerId === null ? '0' : value.customerId, value.xsUserId === null ? '0' : value.xsUserId);
- } else {
- this.qiangDanOrderPlanId = value.orderPlanId;
- this.fleetId = value.fleetId;
- this.customerId = value.customerId === null ? '0' : value.customerId;
- this.xsUserId = value.xsUserId === null ? '0' : value.xsUserId;
- this.qiangDanShow = true;
- this.qiangDanContent = `宸叉姠${value.tmcCount}鍗曪紝纭畾鎶㈠崟锛焋;
- }
- },
- // 鎶㈠崟妯℃�佹
- qiangDanConfirm() {
- this.qiangDanContent = '';
- this.qiangDanShow = false;
- this.qiangDan(this.qiangDanOrderPlanId, this.fleetId, this.customerId, this.xsUserId);
- },
- qiangDanCancel() {
- this.qiangDanShow = false;
- },
- // 鎶㈠崟璇锋眰
- qiangDan(id, fleetId, customerId, xsUserId) {
- this.$reqPost('qiangDan', { orderPlanId: id, fleetId: fleetId, customerId: customerId, xsUserId: xsUserId }, 'params')
- .then(res => {
- if (res.code == 0) {
- this.$u.toast('鎶㈠崟鎴愬姛');
- } else {
- this.$u.toast(res.msg ? res.msg : '鎶㈠崟澶辫触');
- }
- })
- .then(() => {
- setTimeout(() => {
- this.qiangDanList();
- }, 1000);
});
- },
- list3CardIconClick(value) {
- uni.navigateTo({
- url: `/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details?orderPlanId=${value.id}&yyId=${value.yyId}`
- });
- },
- // 鎻愮叅鍗曡鎯�
- cardBodyClick(name) {
- uni.navigateTo({
- url: `/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details?orderPlanId=${name}`
- });
- },
- // 鍘婚绾�
- toAppointmentClick(value) {
- uni.navigateTo({
- url: `/pages/driver-page/appointment/appointment?takeCoalId=${value.id}&filedId=${value.filedId}&deptId=${value.deptId}&sendDate=${value.sendDate}`
- });
+ },
+ init() {
+ this.qiangDanList();
+ },
+ // 鍙告満棣栭〉鍒楄〃
+ qiangDanList() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ this.$reqGet('qiangDanList').then(res => {
+ uni.hideLoading();
+ this.driverBillOfLoadingData = res.data;
+ });
+ },
+ // 鎶㈠崟鎸夐挳
+ qiangDanBtn(value) {
+ if (value.tmcCount == '0') {
+ this.qiangDan(value.orderPlanId, value.fleetId, value.customerId === null ? '0' : value.customerId,
+ value.xsUserId === null ? '0' : value.xsUserId);
+ } else {
+ this.qiangDanOrderPlanId = value.orderPlanId;
+ this.fleetId = value.fleetId;
+ this.customerId = value.customerId === null ? '0' : value.customerId;
+ this.xsUserId = value.xsUserId === null ? '0' : value.xsUserId;
+ this.qiangDanShow = true;
+ this.qiangDanContent = `宸叉姠${value.tmcCount}鍗曪紝纭畾鎶㈠崟锛焋;
+ }
+ },
+ // 鎶㈠崟妯℃�佹
+ qiangDanConfirm() {
+ this.qiangDanContent = '';
+ this.qiangDanShow = false;
+ this.qiangDan(this.qiangDanOrderPlanId, this.fleetId, this.customerId, this.xsUserId);
+ },
+ qiangDanCancel() {
+ this.qiangDanShow = false;
+ },
+ // 鎶㈠崟璇锋眰
+ qiangDan(id, fleetId, customerId, xsUserId) {
+ this.$reqPost('qiangDan', {
+ orderPlanId: id,
+ fleetId: fleetId,
+ customerId: customerId,
+ xsUserId: xsUserId
+ }, 'params')
+ .then(res => {
+ if (res.code == 0) {
+ this.$u.toast('鎶㈠崟鎴愬姛');
+ } else {
+ this.$u.toast(res.msg ? res.msg : '鎶㈠崟澶辫触');
+ }
+ })
+ .then(() => {
+ setTimeout(() => {
+ this.qiangDanList();
+ }, 1000);
+ });
+ },
+ list3CardIconClick(value) {
+ uni.navigateTo({
+ url: `/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details?orderPlanId=${value.id}&yyId=${value.yyId}`
+ });
+ },
+ // 鎻愮叅鍗曡鎯�
+ cardBodyClick(name) {
+ uni.navigateTo({
+ url: `/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details?orderPlanId=${name}`
+ });
+ },
+ // 鍘婚绾�
+ toAppointmentClick(value) {
+ uni.navigateTo({
+ url: `/pages/driver-page/appointment/appointment?takeCoalId=${value.id}&filedId=${value.filedId}&deptId=${value.deptId}&sendDate=${value.sendDate}`
+ });
+ }
}
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-@mixin formItem {
- width: vww(345);
- height: vww(150);
- margin-top: vww(5);
- background: #ffffff;
- box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
- border-radius: 20rpx;
- position: relative;
- display: flex;
- flex-direction: column;
- justify-content: space-around;
-}
-@mixin firstLine {
- width: 94%;
- height: vww(68);
- margin: vww(18) vww(16) 0 vww(16);
- display: flex;
- justify-content: space-between;
-}
-@mixin thirdLine {
- width: 30%;
- height: vww(68);
- margin-left: vww(15);
- display: flex;
- justify-content: space-between;
- align-items: center;
- .send-date {
- width: 148rpx;
- height: 24rpx;
- line-height: 24rpx;
- font-size: 28rpx;
- font-weight: 300;
- color: #515151;
+<style lang="scss"
+ scoped>
+ @mixin formItem {
+ width: vww(345);
+ height: vww(150);
+ margin-top: vww(5);
+ background: #ffffff;
+ box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
+ border-radius: 20rpx;
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
}
- .havedclock {
- width: 58% !important;
- margin-right: 0 !important;
+
+ @mixin firstLine {
+ width: 94%;
+ height: vww(68);
+ margin: vww(18) vww(16) 0 vww(16);
+ display: flex;
+ justify-content: space-between;
+ }
+
+ @mixin thirdLine {
+ width: 30%;
+ height: vww(68);
+ margin-left: vww(15);
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
.send-date {
- width: 100%;
- margin-left: vww(12);
+ width: 148rpx;
+ height: 24rpx;
+ line-height: 24rpx;
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #515151;
}
- }
-}
-@mixin flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-@mixin fourthLine {
- width: 34%;
- height: vww(68);
- display: flex;
- align-items: center;
- position: relative;
- left: vww(203);
- bottom: vww(3);
- .button-img {
- width: 100%;
- height: 100%;
- background: url('https://mx.jzeg.cn:9095/appimg/image/banner/button.png') no-repeat;
- background-size: cover;
- font-size: 28rpx;
- font-weight: 300;
- color: #ffffff;
- text-align: center;
- line-height: vww(40);
- }
-}
-.exceedHide {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-::v-deep.driver-index {
- width: 100%;
- margin: 0 auto;
- // 涓讳綋
- .driver-index-body {
- // margin-bottom: vww(56);
- // 寰呴鍙栨彁鐓ゅ崟
- .wait-collection {
- width: 100%;
- height: 600rpx;
- }
- .collection-form {
- width: vww(345);
- margin: 0 vww(15);
- position: relative;
- top: vww(-120);
- .collection-form-item {
- width: vww(345);
- height: vww(185);
- margin-top: vww(5);
- background: #ffffff;
- box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
- border-radius: 20rpx;
- position: relative;
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- .main-divider {
- width: 560rpx;
- height: 2rpx;
- background: #e3e3e3;
- position: absolute;
- top: 122rpx;
- left: 128rpx;
- }
- .first-line {
- width: 94%;
- height: vww(68);
- margin: vww(18) vww(16) 0 vww(16);
- display: flex;
- justify-content: space-between;
- .main-information {
- width: 88%;
- height: vww(28);
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .sign {
- width: vww(28);
- height: vww(28);
- line-height: vww(28);
- text-align: center;
- background: url('https://mx.jzeg.cn:9095/appimg/image/banner/blueblock.png') no-repeat;
- background-size: contain;
- font-size: 30rpx;
- font-weight: 400;
- color: #ffffff;
- margin-right: vww(20);
- }
- }
- .point-number {
- position: absolute;
- right: 0;
- width: 15%;
- text {
- font-size: 24rpx;
- font-weight: 400;
- color: #c78a64;
- }
- .residue {
- font-size: 40rpx;
- font-weight: 400;
- color: #f81414;
- }
- }
- }
- .first-extra {
- @include firstLine;
- .main-information {
- width: 100%;
- height: vww(28);
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .sign {
- width: vww(28);
- height: vww(28);
- line-height: vww(28);
- text-align: center;
- background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat;
- background-size: contain;
- font-size: 30rpx;
- font-weight: 400;
- color: #ffffff;
- margin-right: vww(20);
- }
- }
- }
- .second-line {
- width: 100%;
- height: vww(68);
- margin-left: vww(21);
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .coal-name {
- min-width: vww(50);
- height: 35rpx;
- font-size: 30rpx;
- font-weight: 300;
- color: #515151;
- position: relative;
- display: flex;
- justify-content: flex-start;
- }
- .black-block {
- min-width: vww(50);
- height: 30rpx;
- font-size: 30rpx;
- font-weight: 300;
- color: #515151;
- position: relative;
- top: vww(2);
- display: flex;
- justify-content: center;
- align-items: center;
- .black-bar {
- width: 2rpx;
- height: 30rpx;
- background: #515151;
- }
- }
- .coal-type {
- min-width: vww(50);
- height: 30rpx;
- font-size: 30rpx;
- font-weight: 300;
- color: #515151;
- text-align: center;
- }
- }
- .third-line {
- width: 100%;
- height: vww(68);
- margin-left: vww(21);
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .send-date {
- width: 148rpx;
- height: 24rpx;
- margin-left: vww(14);
- margin-right: vww(56);
- line-height: 24rpx;
- font-size: 28rpx;
- font-weight: 300;
- color: #515151;
- }
- .type {
- flex: 1;
- margin-right: vww(10);
- display: flex;
- justify-content: center;
- align-items: center;
- .coal-name {
- width: 120rpx;
- height: 42rpx;
- line-height: 42rpx;
- border: 2px solid #035cfb;
- border-radius: 4rpx;
- font-size: 28rpx;
- font-weight: 300;
- color: #035cfb;
- text-align: center;
- padding: vww(3) vww(11);
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- }
- .fourth-line {
- width: 30%;
- height: vww(68);
- margin-left: vww(15);
- display: flex;
- justify-content: flex-end;
- position: relative;
- left: vww(203);
- bottom: vww(3);
- .button-img {
- width: 100%;
- height: 100%;
- background: url('https://mx.jzeg.cn:9095/appimg/image/banner/button.png') no-repeat;
- background-size: cover;
- font-size: 28rpx;
- font-weight: 300;
- color: #ffffff;
- text-align: center;
- line-height: vww(33);
- }
- }
- }
- }
- .wait-appointment,
- .Reserved {
- position: relative;
- top: vww(-120);
- }
- .appointment-form {
- width: vww(345);
- margin: 0 vww(15);
- .appointment-form-item {
- @include formItem;
- height: vww(191);
- justify-content: space-between;
- overflow: hidden;
- .main-divider {
- width: 560rpx;
- height: 1rpx;
- background: #e3e3e3;
- position: absolute;
- top: 122rpx;
- left: 128rpx;
- }
- .first-line {
- position: relative;
- @include firstLine;
- .main-information {
- width: 100%;
- height: vww(28);
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .sign {
- width: vww(28);
- height: vww(28);
- line-height: vww(28);
- text-align: center;
- background: url('https://mx.jzeg.cn:9095/appimg/image/banner/blueblock.png') no-repeat;
- background-size: contain;
- font-size: 30rpx;
- font-weight: 400;
- color: #ffffff;
- margin-right: vww(20);
- }
- }
- }
- .first-extra {
- @include firstLine;
- .main-information {
- width: 100%;
- height: vww(28);
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .sign {
- width: vww(28);
- height: vww(28);
- line-height: vww(28);
- text-align: center;
- background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat;
- background-size: contain;
- font-size: 30rpx;
- font-weight: 400;
- color: #ffffff;
- margin-right: vww(20);
- }
- }
- }
- .second-line {
- @include firstLine;
- margin: 0;
- margin-left: vww(16);
- .main-information {
- width: 100%;
- height: vww(28);
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .sign {
- width: vww(28);
- height: vww(28);
- line-height: vww(28);
- text-align: center;
- background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat;
- background-size: contain;
- font-size: 30rpx;
- font-weight: 400;
- color: #ffffff;
- margin-right: vww(20);
- }
- }
- }
- .third-line {
- @include thirdLine;
- width: 94%;
- justify-content: flex-start;
- margin-left: vww(18);
- .clock {
- width: 40%;
- height: vww(21);
- margin-right: vww(50);
- line-height: vww(21);
- @include flex;
- justify-content: flex-start;
- .send-date {
- margin-left: vww(14);
- }
- }
- .type {
- flex: 1;
- margin-right: vww(10);
- display: flex;
- justify-content: center;
- align-items: center;
- .order-type,
- .coal-name {
- width: 120rpx;
- height: 42rpx;
- line-height: 42rpx;
- border: 2px solid #035cfb;
- border-radius: 4rpx;
- font-size: 28rpx;
- font-weight: 300;
- color: #035cfb;
- text-align: center;
- padding: vww(3) vww(11);
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- }
- .fourth-line {
- @include fourthLine;
- }
- }
- }
- .Reserved {
- .white-block {
+
+ .havedclock {
+ width: 58% !important;
+ margin-right: 0 !important;
+
+ .send-date {
width: 100%;
- height: vww(50);
- line-height: vww(50);
- text-align: center;
- color: #333;
- margin-top: vww(10);
+ margin-left: vww(12);
}
}
}
-}
-</style>
+
+ @mixin flex {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ @mixin fourthLine {
+ width: 34%;
+ height: vww(68);
+ display: flex;
+ align-items: center;
+ position: relative;
+ left: vww(203);
+ bottom: vww(3);
+
+ .button-img {
+ width: 100%;
+ height: 100%;
+ background: url('https://mx.jzeg.cn:9095/appimg/image/banner/button.png') no-repeat;
+ background-size: cover;
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #ffffff;
+ text-align: center;
+ line-height: vww(40);
+ }
+ }
+
+ .exceedHide {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
+ ::v-deep.driver-index {
+ width: 100%;
+ margin: 0 auto;
+
+ // 涓讳綋
+ .driver-index-body {
+
+ // margin-bottom: vww(56);
+ // 寰呴鍙栨彁鐓ゅ崟
+ .wait-collection {
+ width: 100%;
+ height: 600rpx;
+ }
+
+ .collection-form {
+ width: vww(345);
+ margin: 0 vww(15);
+ position: relative;
+ top: vww(-120);
+
+ .collection-form-item {
+ width: vww(345);
+ height: vww(185);
+ margin-top: vww(5);
+ background: #ffffff;
+ box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
+ border-radius: 20rpx;
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+
+ .main-divider {
+ width: 560rpx;
+ height: 2rpx;
+ background: #e3e3e3;
+ position: absolute;
+ top: 122rpx;
+ left: 128rpx;
+ }
+
+ .first-line {
+ width: 94%;
+ height: vww(68);
+ margin: vww(18) vww(16) 0 vww(16);
+ display: flex;
+ justify-content: space-between;
+
+ .main-information {
+ width: 88%;
+ height: vww(28);
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+
+ .sign {
+ width: vww(28);
+ height: vww(28);
+ line-height: vww(28);
+ text-align: center;
+ background: url('https://mx.jzeg.cn:9095/appimg/image/banner/blueblock.png') no-repeat;
+ background-size: contain;
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #ffffff;
+ margin-right: vww(20);
+ }
+ }
+
+ .point-number {
+ position: absolute;
+ right: 0;
+ width: 15%;
+
+ text {
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #c78a64;
+ }
+
+ .residue {
+ font-size: 40rpx;
+ font-weight: 400;
+ color: #f81414;
+ }
+ }
+ }
+
+ .first-extra {
+ @include firstLine;
+
+ .main-information {
+ width: 100%;
+ height: vww(28);
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+
+ .sign {
+ width: vww(28);
+ height: vww(28);
+ line-height: vww(28);
+ text-align: center;
+ background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat;
+ background-size: contain;
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #ffffff;
+ margin-right: vww(20);
+ }
+ }
+ }
+
+ .second-line {
+ width: 100%;
+ height: vww(68);
+ margin-left: vww(21);
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+
+ .coal-name {
+ min-width: vww(50);
+ height: 35rpx;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #515151;
+ position: relative;
+ display: flex;
+ justify-content: flex-start;
+ }
+
+ .black-block {
+ min-width: vww(50);
+ height: 30rpx;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #515151;
+ position: relative;
+ top: vww(2);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .black-bar {
+ width: 2rpx;
+ height: 30rpx;
+ background: #515151;
+ }
+ }
+
+ .coal-type {
+ min-width: vww(50);
+ height: 30rpx;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #515151;
+ text-align: center;
+ }
+ }
+
+ .third-line {
+ width: 100%;
+ height: vww(68);
+ margin-left: vww(21);
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+
+ .send-date {
+ width: 148rpx;
+ height: 24rpx;
+ margin-left: vww(14);
+ margin-right: vww(56);
+ line-height: 24rpx;
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #515151;
+ }
+
+ .type {
+ flex: 1;
+ margin-right: vww(10);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .coal-name {
+ width: 120rpx;
+ height: 42rpx;
+ line-height: 42rpx;
+ border: 2px solid #035cfb;
+ border-radius: 4rpx;
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #035cfb;
+ text-align: center;
+ padding: vww(3) vww(11);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+ }
+
+ .fourth-line {
+ width: 30%;
+ height: vww(68);
+ margin-left: vww(15);
+ display: flex;
+ justify-content: flex-end;
+ position: relative;
+ left: vww(203);
+ bottom: vww(3);
+
+ .button-img {
+ width: 100%;
+ height: 100%;
+ background: url('https://mx.jzeg.cn:9095/appimg/image/banner/button.png') no-repeat;
+ background-size: cover;
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #ffffff;
+ text-align: center;
+ line-height: vww(33);
+ }
+ }
+ }
+ }
+
+ .wait-appointment,
+ .Reserved {
+ position: relative;
+ top: vww(-120);
+ }
+
+ .appointment-form {
+ width: vww(345);
+ margin: 0 vww(15);
+
+ .appointment-form-item {
+ @include formItem;
+ height: vww(191);
+ justify-content: space-between;
+ overflow: hidden;
+
+ .main-divider {
+ width: 560rpx;
+ height: 1rpx;
+ background: #e3e3e3;
+ position: absolute;
+ top: 122rpx;
+ left: 128rpx;
+ }
+
+ .first-line {
+ position: relative;
+ @include firstLine;
+
+ .main-information {
+ width: 100%;
+ height: vww(28);
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+
+ .sign {
+ width: vww(28);
+ height: vww(28);
+ line-height: vww(28);
+ text-align: center;
+ background: url('https://mx.jzeg.cn:9095/appimg/image/banner/blueblock.png') no-repeat;
+ background-size: contain;
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #ffffff;
+ margin-right: vww(20);
+ }
+ }
+ }
+
+ .first-extra {
+ @include firstLine;
+
+ .main-information {
+ width: 100%;
+ height: vww(28);
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+
+ .sign {
+ width: vww(28);
+ height: vww(28);
+ line-height: vww(28);
+ text-align: center;
+ background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat;
+ background-size: contain;
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #ffffff;
+ margin-right: vww(20);
+ }
+ }
+ }
+
+ .second-line {
+ @include firstLine;
+ margin: 0;
+ margin-left: vww(16);
+
+ .main-information {
+ width: 100%;
+ height: vww(28);
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+
+ .sign {
+ width: vww(28);
+ height: vww(28);
+ line-height: vww(28);
+ text-align: center;
+ background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat;
+ background-size: contain;
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #ffffff;
+ margin-right: vww(20);
+ }
+ }
+ }
+
+ .third-line {
+ @include thirdLine;
+ width: 94%;
+ justify-content: flex-start;
+ margin-left: vww(18);
+
+ .clock {
+ width: 40%;
+ height: vww(21);
+ margin-right: vww(50);
+ line-height: vww(21);
+ @include flex;
+ justify-content: flex-start;
+
+ .send-date {
+ margin-left: vww(14);
+ }
+ }
+
+ .type {
+ flex: 1;
+ margin-right: vww(10);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .order-type,
+ .coal-name {
+ width: 120rpx;
+ height: 42rpx;
+ line-height: 42rpx;
+ border: 2px solid #035cfb;
+ border-radius: 4rpx;
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #035cfb;
+ text-align: center;
+ padding: vww(3) vww(11);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+ }
+
+ .fourth-line {
+ @include fourthLine;
+ }
+ }
+ }
+
+ .Reserved {
+ .white-block {
+ width: 100%;
+ height: vww(50);
+ line-height: vww(50);
+ text-align: center;
+ color: #333;
+ margin-top: vww(10);
+ }
+ }
+ }
+ }
+</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 bf10fb2..f3ce250 100644
--- a/pages/driver-page/drvier-my/drvier-my.vue
+++ b/pages/driver-page/drvier-my/drvier-my.vue
@@ -3,16 +3,23 @@
<view class="driver-banner">
<view class="navgation">鎴戠殑</view>
<view class="avatar">
- <view class="avatar-imgage" style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/driverava.png')no-repeat;background-size: cover;"></view>
+ <view class="avatar-imgage"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/driverava.png')no-repeat;background-size: cover;">
+ </view>
<view class="avatar-name">{{ userInfo.name || '' }}</view>
- <view class="edit-button"><u-button type="primary" @click="editBtnClick" shape="circle" plain>缂栬緫涓汉璧勬枡</u-button></view>
+ <view class="edit-button"><u-button type="primary"
+ @click="editBtnClick"
+ shape="circle"
+ plain>缂栬緫涓汉璧勬枡</u-button></view>
</view>
<view class="personal-information">
<view class="personal-information-block">
<view class="block-main">
- <view class="information-line" @click="">
+ <view class="information-line"
+ @click="">
<view class="line-label">
- <image src="https://mx.jzeg.cn:9095/appimg/image/banner/personalicon.png" mode="widthFix"></image>
+ <image src="https://mx.jzeg.cn:9095/appimg/image/banner/personalicon.png"
+ mode="widthFix"></image>
<view class="label-text">韬唤璇佸彿</view>
</view>
<view class="information-value">
@@ -22,7 +29,8 @@
</view>
<view class="information-line">
<view class="line-label">
- <image src="https://mx.jzeg.cn:9095/appimg/image/banner/phonenum.png" mode="widthFix"></image>
+ <image src="https://mx.jzeg.cn:9095/appimg/image/banner/phonenum.png"
+ mode="widthFix"></image>
<view class="label-text">鎵嬫満鍙�</view>
</view>
<view class="information-value">
@@ -32,7 +40,8 @@
</view>
<view class="information-line">
<view class="line-label">
- <image src="https://mx.jzeg.cn:9095/appimg/image/banner/carnum.png" mode="widthFix"></image>
+ <image src="https://mx.jzeg.cn:9095/appimg/image/banner/carnum.png"
+ mode="widthFix"></image>
<view class="label-text">杞︾墝鍙�</view>
</view>
<view class="information-value">
@@ -42,7 +51,8 @@
</view>
<view class="information-line">
<view class="line-label">
- <image src="https://mx.jzeg.cn:9095/appimg/image/banner/axisnum.png" mode="widthFix"></image>
+ <image src="https://mx.jzeg.cn:9095/appimg/image/banner/axisnum.png"
+ mode="widthFix"></image>
<view class="label-text">杞﹁酱鏁�</view>
</view>
<view class="information-value">
@@ -52,7 +62,8 @@
</view>
<view class="information-line last">
<view class="line-label">
- <image src="https://mx.jzeg.cn:9095/appimg/image/banner/weighnum.png" mode="widthFix"></image>
+ <image src="https://mx.jzeg.cn:9095/appimg/image/banner/weighnum.png"
+ mode="widthFix"></image>
<view class="label-text">浣撻噸</view>
</view>
<view class="information-value">
@@ -69,23 +80,35 @@
<view class="information-body">
<view class="car-img">
<view class="label-title">
- <image src="https://mx.jzeg.cn:9095/appimg/image/banner/carimg.png" mode="widthFix"></image>
+ <image src="https://mx.jzeg.cn:9095/appimg/image/banner/carimg.png"
+ mode="widthFix"></image>
<view class="label-text">杞﹁締鐓х墖</view>
</view>
<view class="img-container">
- <u--image :showLoading="true" :src="userInfo.carImg != null ? BaseUrl + userInfo.carImg : ''" width="80px" height="80px" @click="imageClick(1)">
- <view slot="error" style="font-size: 24rpx;">鍔犺浇澶辫触</view>
+ <u--image :showLoading="true"
+ :src="userInfo.carImg != null ? BaseUrl + userInfo.carImg : ''"
+ width="80px"
+ height="80px"
+ @click="imageClick(1)">
+ <view slot="error"
+ style="font-size: 24rpx;">鍔犺浇澶辫触</view>
</u--image>
</view>
</view>
<view class="car-img">
<view class="label-title">
- <image src="https://mx.jzeg.cn:9095/appimg/image/banner/cardimg.png" mode="widthFix"></image>
+ <image src="https://mx.jzeg.cn:9095/appimg/image/banner/cardimg.png"
+ mode="widthFix"></image>
<view class="label-text">琛岄┒璇佺収鐗�</view>
</view>
<view class="img-container">
- <u--image :showLoading="true" :src="userInfo.drivingImg != null ? BaseUrl + userInfo.drivingImg : ''" width="80px" height="80px" @click="imageClick(2)">
- <view slot="error" style="font-size: 24rpx;">鍔犺浇澶辫触</view>
+ <u--image :showLoading="true"
+ :src="userInfo.drivingImg != null ? BaseUrl + userInfo.drivingImg : ''"
+ width="80px"
+ height="80px"
+ @click="imageClick(2)">
+ <view slot="error"
+ style="font-size: 24rpx;">鍔犺浇澶辫触</view>
</u--image>
</view>
</view>
@@ -93,7 +116,11 @@
</view>
</view>
<view class="loginout">
- <view class="loginout-main"><u-button text="閫�鍑虹櫥褰�" type="primary" @click="logout" shape="circle" plain></u-button></view>
+ <view class="loginout-main"><u-button text="閫�鍑虹櫥褰�"
+ type="primary"
+ @click="logout"
+ shape="circle"
+ plain></u-button></view>
</view>
<!-- <view class="personal-information-form">
<u--form labelPosition="left" :model="userInfo" ref="form1">
@@ -135,38 +162,84 @@
<!-- 鍥剧墖棰勮寮瑰嚭妗� -->
<view class="previewImage-container">
- <u-popup :show="previewImageShow" mode="center" @close="previewImageClose" @open="previewImageOpen">
- <u--image :src="previewImageSrc != null ? BaseUrl + previewImageSrc : ''" width="400px" height="400px"></u--image>
+ <u-popup :show="previewImageShow"
+ mode="center"
+ @close="previewImageClose"
+ @open="previewImageOpen">
+ <u--image :src="previewImageSrc != null ? BaseUrl + previewImageSrc : ''"
+ width="400px"
+ height="400px"></u--image>
</u-popup>
</view>
<!-- 淇敼寮瑰嚭妗� -->
<view class="editDriverPopup-container">
- <u-popup :show="editDriverPopupShow" mode="bottom" @close="editDriverPopupClose" @open="editDriverPopupOpen" :closeable="true">
- <combined-title title="淇敼涓汉淇℃伅" style="margin-left:20rpx"></combined-title>
+ <u-popup :show="editDriverPopupShow"
+ mode="bottom"
+ @close="editDriverPopupClose"
+ @open="editDriverPopupOpen"
+ :closeable="true">
+ <combined-title title="淇敼涓汉淇℃伅"
+ style="margin-left:20rpx"></combined-title>
<view class="editDriverPopup-container-box">
- <u--form labelPosition="left" :model="editUserInfo" ref="editRef">
- <u-form-item labelWidth="20%" label="濮撳悕" prop="name" required>
- <u--input v-model="editUserInfo.name" border="none" inputAlign="left"></u--input>
+ <u--form labelPosition="left"
+ :model="editUserInfo"
+ ref="editRef">
+ <u-form-item labelWidth="20%"
+ label="濮撳悕"
+ prop="name"
+ required>
+ <u--input v-model="editUserInfo.name"
+ border="none"
+ inputAlign="left"></u--input>
</u-form-item>
- <u-form-item labelWidth="20%" label="韬唤璇佸彿" prop="idCard" required>
- <u--input v-model="editUserInfo.idCard" border="none" inputAlign="left"></u--input>
+ <u-form-item labelWidth="20%"
+ label="韬唤璇佸彿"
+ prop="idCard"
+ required>
+ <u--input v-model="editUserInfo.idCard"
+ border="none"
+ inputAlign="left"></u--input>
</u-form-item>
- <u-form-item labelWidth="20%" label="鎵嬫満鍙�" prop="phone" required>
- <u--input v-model="editUserInfo.phone" border="none" inputAlign="left"></u--input>
+ <u-form-item labelWidth="20%"
+ label="鎵嬫満鍙�"
+ prop="phone"
+ required>
+ <u--input v-model="editUserInfo.phone"
+ border="none"
+ inputAlign="left"></u--input>
</u-form-item>
- <u-form-item labelWidth="20%" label="杞︾墝鍙�" prop="carNo" required>
- <u--input v-model="editUserInfo.carNo" border="none" inputAlign="left"></u--input>
+ <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 labelWidth="20%" label="浣撻噸" prop="weight" required>
- <u--input v-model="editUserInfo.weight" border="none" inputAlign="left" placeholder="浣撻噸浠g浣滀负鍗曚綅"></u--input>
+ <u-form-item labelWidth="20%"
+ label="浣撻噸"
+ prop="weight"
+ required>
+ <u--input v-model="editUserInfo.weight"
+ border="none"
+ inputAlign="left"
+ placeholder="浣撻噸浠g浣滀负鍗曚綅"></u--input>
</u-form-item>
- <u-form-item labelWidth="20%" label="杞﹁酱鏁�" prop="axleNum" required>
- <u--input v-model="editUserInfo.axleNum" border="none" inputAlign="left"></u--input>
+ <u-form-item labelWidth="20%"
+ label="杞﹁酱鏁�"
+ prop="axleNum"
+ required>
+ <u--input v-model="editUserInfo.axleNum"
+ border="none"
+ inputAlign="left"></u--input>
</u-form-item>
- <u-form-item labelWidth="25%" label="杞﹁締鐓х墖" @click="beforeRead" prop="carImg" required>
- <u-upload
- :fileList="fileList1"
+ <u-form-item labelWidth="25%"
+ label="杞﹁締鐓х墖"
+ @click="beforeRead"
+ prop="carImg"
+ required>
+ <u-upload :fileList="fileList1"
@afterRead="afterRead"
@delete="deletePic"
name="1"
@@ -174,12 +247,15 @@
:maxCount="1"
width="250"
height="150"
- :previewFullImage="true"
- ></u-upload>
+ :previewFullImage="true"></u-upload>
</u-form-item>
- <u-form-item labelWidth="25%" label="琛岄┒璇佺収鐗�" ref="item1" @click="beforeRead" prop="drivingImg" required>
- <u-upload
- :fileList="fileList2"
+ <u-form-item labelWidth="25%"
+ label="琛岄┒璇佺収鐗�"
+ ref="item1"
+ @click="beforeRead"
+ prop="drivingImg"
+ required>
+ <u-upload :fileList="fileList2"
@afterRead="afterRead"
@delete="deletePic"
name="2"
@@ -187,108 +263,110 @@
:maxCount="1"
width="250"
height="150"
- :previewFullImage="true"
- ></u-upload>
+ :previewFullImage="true"></u-upload>
</u-form-item>
</u--form>
- <u-button text="鎻愪氦" @click="updateUser" type="primary"></u-button>
+ <u-button text="鎻愪氦"
+ @click="updateUser"
+ type="primary"></u-button>
</view>
</u-popup>
</view>
<view class="logoutModel">
- <u-modal :show="logoutShow" :title="logoutTitle" showCancelButton :content="logoutContent" @confirm="logoutConfirm" @cancel="logoutCancel"></u-modal>
+ <u-modal :show="logoutShow"
+ :title="logoutTitle"
+ showCancelButton
+ :content="logoutContent"
+ @confirm="logoutConfirm"
+ @cancel="logoutCancel"></u-modal>
</view>
</view>
</template>
<script>
-import { customerId, userInfo, redirectLogin } from '@/utils/status';
-import { BaseUrl } from '@/api/publicInterface.js';
-import { mapMutations } from 'vuex';
-export default {
- data() {
- return {
- // 鑾峰彇鐨勫徃鏈鸿鎯�
- userInfo: {},
- // 淇敼鍙告満璇︽儏
- editUserInfo: {
- phone: '',
- name: '',
- username: '',
- type: 3,
- idCard: '',
- carNo: '',
- carImg: '',
- drivingImg: '',
- axleNum: '',
- weight: '',
- userId: ''
- },
- rules: {
- name: {
- type: 'string',
- required: true,
- message: '璇峰~鍐欏鍚�',
- trigger: ['blur', 'change']
+ import { customerId, userInfo, redirectLogin } from '@/utils/status';
+ import { BaseUrl } from '@/api/publicInterface.js';
+ import { mapMutations } from 'vuex';
+ export default {
+ data() {
+ return {
+ // 鑾峰彇鐨勫徃鏈鸿鎯�
+ userInfo: {},
+ // 淇敼鍙告満璇︽儏
+ editUserInfo: {
+ phone: '',
+ name: '',
+ username: '',
+ type: 3,
+ idCard: '',
+ carNo: '',
+ carImg: '',
+ drivingImg: '',
+ axleNum: '',
+ weight: '',
+ userId: ''
},
- idCard: [
- {
+ rules: {
+ name: {
type: 'string',
required: true,
- message: '璇疯緭鍏ヨ韩浠借瘉鍙�',
+ 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: [
- {
+ 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,
+ message: '姝ら」涓哄繀濉」',
+ // blur鍜宑hange浜嬩欢瑙﹀彂妫�楠�
+ trigger: ['blur', 'change']
+ },
+ {
+ min: 11,
+ max: 11,
+ message: '璇疯緭鍏ュ悎娉曟墜鏈哄彿'
+ },
+ {
+ validator: (rule, value, callback) => {
+ return uni.$u.test.mobile(value);
+ },
+ message: '鎵嬫満鍙风爜鏍煎紡涓嶆纭�',
+ trigger: ['change', 'blur']
+ }
+ ],
+ weight: {
+ type: 'number',
required: true,
- message: '姝ら」涓哄繀濉」',
- // blur鍜宑hange浜嬩欢瑙﹀彂妫�楠�
+ message: '璇峰~鍐欎綋閲�',
trigger: ['blur', 'change']
},
- {
- min: 11,
- max: 11,
- message: '璇疯緭鍏ュ悎娉曟墜鏈哄彿'
- },
- {
- validator: (rule, value, callback) => {
- return uni.$u.test.mobile(value);
+ carNo: [{
+ type: 'string',
+ required: true,
+ message: '璇疯緭鍏ヨ溅鐗屽彿',
+ trigger: ['blur', 'change']
},
- message: '鎵嬫満鍙风爜鏍煎紡涓嶆纭�',
- trigger: ['change', 'blur']
- }
- ],
- weight: {
- type: 'number',
- required: true,
- message: '璇峰~鍐欎綋閲�',
- trigger: ['blur', 'change']
- },
- carNo: [
- {
- type: 'string',
- required: true,
- message: '璇疯緭鍏ヨ溅鐗屽彿',
- trigger: ['blur', 'change']
- },
- {
- transform(value) {
- return String(value);
- },
- validator: (rule, value, callback) => {
- return uni.$u.test.carNo(value);
- },
- message: '璇疯緭鍏ユ纭殑杞︾墝鍙�',
- trigger: ['change', 'blur']
- }
- ],
- axleNum: [
- {
+ {
+ transform(value) {
+ return String(value);
+ },
+ validator: (rule, value, callback) => {
+ return uni.$u.test.carNo(value);
+ },
+ message: '璇疯緭鍏ユ纭殑杞︾墝鍙�',
+ trigger: ['change', 'blur']
+ }
+ ],
+ axleNum: [{
transform(value) {
return Number(value);
},
@@ -297,412 +375,444 @@
},
message: '璇疯緭鍏ユ纭殑杞﹁酱鏁�',
trigger: ['change', 'blur']
+ }],
+ carImg: {
+ type: 'string',
+ required: true,
+ message: '璇蜂笂浼犺溅杈嗗浘鐗�',
+ trigger: ['blur', 'change']
+ },
+ drivingImg: {
+ type: 'string',
+ required: true,
+ message: '璇蜂笂浼犺椹惰瘉鐓х墖',
+ trigger: ['blur', 'change']
}
- ],
- carImg: {
- type: 'string',
- required: true,
- message: '璇蜂笂浼犺溅杈嗗浘鐗�',
- trigger: ['blur', 'change']
},
- drivingImg: {
- type: 'string',
- required: true,
- message: '璇蜂笂浼犺椹惰瘉鐓х墖',
- trigger: ['blur', 'change']
+ src: '',
+ fileList1: [],
+ fileList2: [],
+ // 淇敼淇℃伅寮瑰嚭妗�
+ editDriverPopupShow: false,
+ // previewImage
+ previewImageShow: false,
+ previewImageSrc: '',
+ // 閫�鍑烘ā鎬佹
+ logoutShow: false,
+ logoutTitle: '鎻愮ず',
+ logoutContent: '鏄惁纭閫�鍑�',
+ BaseUrl
+ };
+ },
+ onShow() {
+ // this.init();
+ },
+ onReady() {
+ this.$refs.editRef.setRules(this.rules);
+ },
+ methods: {
+ ...mapMutations(['changeisUploadimg']),
+ init() {
+ this.getUserEntity();
+ },
+ getUserEntity() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ this.$reqGet('getUserEntity').then(res => {
+ uni.hideLoading();
+ this.userInfo = res.data;
+ uni.setStorageSync('carImg', this.userInfo.carImg);
+ uni.setStorageSync('drivingImg', this.userInfo.drivingImg);
+ if (this.fileList1.length == 0) {
+ this.fileList1.push({
+ url: `${BaseUrl}${this.userInfo.carImg}`
+ });
+ }
+ if (this.fileList2.length == 0) {
+ this.fileList2.push({
+ url: `${BaseUrl}${this.userInfo.drivingImg}`
+ });
+ }
+ Object.keys(this.editUserInfo).map(item => {
+ if (res.data[item]) {
+ this.editUserInfo[item] = res.data[item];
+ }
+ });
+ });
+ },
+ // 淇敼鎸夐挳鐐瑰嚮
+ editBtnClick() {
+ this.editDriverPopupShow = true;
+ },
+ imageClick(index) {
+ // 閫氳繃index鍒囨崲鍥剧墖
+ console.log('鍒囨崲鍥剧墖', index);
+ if (index == 1) {
+ this.previewImageSrc = this.userInfo.carImg;
+ } else {
+ this.previewImageSrc = this.userInfo.drivingImg;
+ }
+ this.$nextTick(() => {
+ this.previewImageShow = true;
+ });
+ },
+ beforeRead() {
+ this.changeisUploadimg(true);
+ },
+ // 鍒犻櫎
+ deletePic(event) {
+ this.changeisUploadimg(true);
+ this[`fileList${event.name}`].splice(event.index, 1);
+ },
+ // 鏂板鍥剧墖
+ async afterRead(event) {
+ // 褰撹缃� mutiple 涓� true 鏃�, file 涓烘暟缁勬牸寮忥紝鍚﹀垯涓哄璞℃牸寮�
+ let lists = [].concat(event.file);
+ let fileListLen = this[`fileList${event.name}`].length;
+ lists.map(item => {
+ this[`fileList${event.name}`].push({
+ ...item,
+ status: 'uploading',
+ message: '涓婁紶涓�'
+ });
+ });
+ for (let i = 0; i < lists.length; i++) {
+ const result = await this.uploadFilePromise(lists[i].url, event.name);
+ let item = this[`fileList${event.name}`][fileListLen];
+ this[`fileList${event.name}`].splice(
+ fileListLen,
+ 1,
+ Object.assign(item, {
+ status: 'success',
+ message: '涓婁紶鎴愬姛',
+ url: result
+ })
+ );
+ fileListLen++;
}
},
- src: '',
- fileList1: [],
- fileList2: [],
- // 淇敼淇℃伅寮瑰嚭妗�
- editDriverPopupShow: false,
- // previewImage
- previewImageShow: false,
- previewImageSrc: '',
- // 閫�鍑烘ā鎬佹
- logoutShow: false,
- logoutTitle: '鎻愮ず',
- logoutContent: '鏄惁纭閫�鍑�',
- BaseUrl
- };
- },
- onShow() {
- // this.init();
- },
- onReady() {
- this.$refs.editRef.setRules(this.rules);
- },
- methods: {
- ...mapMutations(['changeisUploadimg']),
- init() {
- this.getUserEntity();
- },
- getUserEntity() {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- this.$reqGet('getUserEntity').then(res => {
- uni.hideLoading();
- this.userInfo = res.data;
- uni.setStorageSync('carImg', this.userInfo.carImg);
- uni.setStorageSync('drivingImg', this.userInfo.drivingImg);
- if (this.fileList1.length == 0) {
- this.fileList1.push({
- url: `${BaseUrl}${this.userInfo.carImg}`
+ uploadFilePromise(url, num) {
+ return new Promise((resolve, reject) => {
+ let a = uni.uploadFile({
+ url: BaseUrl + '/admin/sys-file/uploadUnToken',
+ filePath: url,
+ name: 'file',
+ // formData: {
+ // user: 'test'
+ // },
+ success: res => {
+ if (num == 1) {
+ this.editUserInfo.carImg = JSON.parse(res.data).data.url;
+ uni.setStorageSync('carImg', JSON.parse(res.data).data.url);
+ resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
+ } else if (num == 2) {
+ this.editUserInfo.drivingImg = JSON.parse(res.data).data.url;
+ uni.setStorageSync('drivingImg', JSON.parse(res.data).data.url);
+ resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
+ }
+ }
});
- }
- if (this.fileList2.length == 0) {
- this.fileList2.push({
- url: `${BaseUrl}${this.userInfo.drivingImg}`
- });
- }
- Object.keys(this.editUserInfo).map(item => {
- if (res.data[item]) {
- this.editUserInfo[item] = res.data[item];
- }
});
- });
- },
- // 淇敼鎸夐挳鐐瑰嚮
- editBtnClick() {
- this.editDriverPopupShow = true;
- },
- imageClick(index) {
- // 閫氳繃index鍒囨崲鍥剧墖
- console.log('鍒囨崲鍥剧墖', index);
- if (index == 1) {
- this.previewImageSrc = this.userInfo.carImg;
- } else {
- this.previewImageSrc = this.userInfo.drivingImg;
- }
- this.$nextTick(() => {
- this.previewImageShow = true;
- });
- },
- beforeRead() {
- this.changeisUploadimg(true);
- },
- // 鍒犻櫎
- deletePic(event) {
- this.changeisUploadimg(true);
- this[`fileList${event.name}`].splice(event.index, 1);
- },
- // 鏂板鍥剧墖
- async afterRead(event) {
- // 褰撹缃� mutiple 涓� true 鏃�, file 涓烘暟缁勬牸寮忥紝鍚﹀垯涓哄璞℃牸寮�
- let lists = [].concat(event.file);
- let fileListLen = this[`fileList${event.name}`].length;
- lists.map(item => {
- this[`fileList${event.name}`].push({
- ...item,
- status: 'uploading',
- message: '涓婁紶涓�'
- });
- });
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url, event.name);
- let item = this[`fileList${event.name}`][fileListLen];
- this[`fileList${event.name}`].splice(
- fileListLen,
- 1,
- Object.assign(item, {
- status: 'success',
- message: '涓婁紶鎴愬姛',
- url: result
+ },
+ /**
+ * @preview 棰勮鍥剧墖
+ */
+ previewImageClose() {
+ this.previewImageShow = false;
+ },
+ previewImageOpen() {
+ console.log('preview open');
+ },
+ /**
+ * @editPopup 淇敼寮瑰嚭妗嗕簨浠�
+ */
+ editDriverPopupClose() {
+ this.editDriverPopupShow = false;
+ },
+ editDriverPopupOpen() {
+ console.log('鎵撳紑浜�');
+ },
+ // 淇敼鐢ㄦ埛淇℃伅
+ updateUser() {
+ this.editUserInfo = {
+ ...this.editUserInfo,
+ carImg: uni.getStorageSync('carImg'),
+ drivingImg: uni.getStorageSync('drivingImg')
+ };
+ this.$refs.editRef
+ .validate()
+ .then(res => {
+ this.$reqPost('updateUser', this.editUserInfo, 'json').then(res => {
+ console.log('鏇存柊鏁版嵁', res);
+ this.editDriverPopupShow = false;
+ if (res.code == 0) {
+ this.$u.toast('淇敼鎴愬姛');
+ this.init();
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ });
})
- );
- fileListLen++;
- }
- },
- uploadFilePromise(url, num) {
- return new Promise((resolve, reject) => {
- let a = uni.uploadFile({
- url: BaseUrl + '/admin/sys-file/uploadUnToken',
- filePath: url,
- name: 'file',
- // formData: {
- // user: 'test'
- // },
- success: res => {
- if (num == 1) {
- this.editUserInfo.carImg = JSON.parse(res.data).data.url;
- uni.setStorageSync('carImg', JSON.parse(res.data).data.url);
- resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
- } else if (num == 2) {
- this.editUserInfo.drivingImg = JSON.parse(res.data).data.url;
- uni.setStorageSync('drivingImg', JSON.parse(res.data).data.url);
- resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
- }
- }
- });
- });
- },
- /**
- * @preview 棰勮鍥剧墖
- */
- previewImageClose() {
- this.previewImageShow = false;
- },
- previewImageOpen() {
- console.log('preview open');
- },
- /**
- * @editPopup 淇敼寮瑰嚭妗嗕簨浠�
- */
- editDriverPopupClose() {
- this.editDriverPopupShow = false;
- },
- editDriverPopupOpen() {
- console.log('鎵撳紑浜�');
- },
- // 淇敼鐢ㄦ埛淇℃伅
- updateUser() {
- this.editUserInfo = {
- ...this.editUserInfo,
- carImg: uni.getStorageSync('carImg'),
- drivingImg: uni.getStorageSync('drivingImg')
- };
- this.$refs.editRef
- .validate()
- .then(res => {
- this.$reqPost('updateUser', this.editUserInfo, 'json').then(res => {
- console.log('鏇存柊鏁版嵁', res);
- this.editDriverPopupShow = false;
- if (res.code == 0) {
- this.$u.toast('淇敼鎴愬姛');
- this.init();
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none',
- duration: 2000
- });
- }
+ .catch(err => {
+ this.$u.toast('淇敼澶辫触');
});
- })
- .catch(err => {
- this.$u.toast('淇敼澶辫触');
+ },
+ logout() {
+ this.logoutShow = true;
+ },
+ logoutConfirm() {
+ redirectLogin();
+ },
+ logoutCancel() {
+ this.logoutShow = false;
+ },
+ // 璺宠浆鍙戣繍缁熻椤甸潰
+ statistics() {
+ uni.navigateTo({
+ url: '/pages/customer-page/customer-my/faYunstatistics/faYunstatistics'
});
- },
- logout() {
- this.logoutShow = true;
- },
- logoutConfirm() {
- redirectLogin();
- },
- logoutCancel() {
- this.logoutShow = false;
- },
- // 璺宠浆鍙戣繍缁熻椤甸潰
- statistics() {
- uni.navigateTo({
- url: '/pages/customer-page/customer-my/faYunstatistics/faYunstatistics'
- });
+ }
}
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-@mixin flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-.statistics {
- margin-top: vww(10);
- margin-bottom: vww(10);
-}
-::v-deep.driver-my {
- width: 100%;
- margin: 0 auto;
- padding-bottom: vww(60);
- .driver-banner {
+<style lang="scss"
+ scoped>
+ @mixin flex {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ .statistics {
+ margin-top: vww(10);
+ margin-bottom: vww(10);
+ }
+
+ ::v-deep.driver-my {
width: 100%;
- height: 430rpx;
- background: linear-gradient(0deg, #ffffff 0%, #0055fe 100%);
- background-size: contain;
- position: fixed;
- top: 0;
- .navgation {
- width: 80rpx;
- height: 37rpx;
- font-size: 40rpx;
- font-weight: normal;
- color: #ffffff;
- line-height: 69rpx;
- margin: vww(60) auto;
- }
- .avatar {
+ margin: 0 auto;
+ padding-bottom: vww(60);
+
+ .driver-banner {
width: 100%;
height: 430rpx;
- display: flex;
- align-items: center;
+ background: linear-gradient(0deg, #ffffff 0%, #0055fe 100%);
+ background-size: contain;
position: fixed;
top: 0;
- .avatar-imgage {
- width: 98rpx;
- height: 98rpx;
- margin-left: vww(18);
- @include flex;
- justify-content: center;
- }
- .avatar-name {
- width: 200rpx;
- display: flex;
- flex-wrap: wrap;
- height: 32rpx;
- font-size: 34rpx;
- font-weight: bold;
+
+ .navgation {
+ width: 80rpx;
+ height: 37rpx;
+ font-size: 40rpx;
+ font-weight: normal;
color: #ffffff;
- margin-left: vww(17);
+ line-height: 69rpx;
+ margin: vww(60) auto;
}
- .edit-button {
- position: relative;
- left: vww(73);
- top: vww(4);
- }
- }
- .personal-information {
- width: 100%;
- display: flex;
- justify-content: center;
- position: relative;
- top: vww(20);
- &-block {
- width: 690rpx;
- height: 478rpx;
- background: #ffffff;
- box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
- border-radius: 20rpx;
+
+ .avatar {
+ width: 100%;
+ height: 430rpx;
display: flex;
- flex-direction: column;
- justify-content: space-between;
- .block-main {
- width: 636rpx;
- margin: vww(10) vww(14);
+ align-items: center;
+ position: fixed;
+ top: 0;
+
+ .avatar-imgage {
+ width: 98rpx;
+ height: 98rpx;
+ margin-left: vww(18);
+ @include flex;
+ justify-content: center;
}
- .information-line {
- @include flex width: 636rpx;
- height: vww(45);
- border-bottom: 1rpx solid #f0f1f6;
- .line-label {
- width: 188rpx;
- height: 90rpx;
- @include flex image {
- width: 50rpx;
- height: 50rpx;
+ .avatar-name {
+ width: 200rpx;
+ display: flex;
+ flex-wrap: wrap;
+ height: 32rpx;
+ font-size: 34rpx;
+ font-weight: bold;
+ color: #ffffff;
+ margin-left: vww(17);
+ }
+
+ .edit-button {
+ position: relative;
+ left: vww(73);
+ top: vww(4);
+ }
+ }
+
+ .personal-information {
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ position: relative;
+ top: vww(20);
+
+ &-block {
+ width: 690rpx;
+ height: 478rpx;
+ background: #ffffff;
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
+ border-radius: 20rpx;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+
+ .block-main {
+ width: 636rpx;
+ margin: vww(10) vww(14);
+ }
+
+ .information-line {
+ @include flex width: 636rpx;
+ height: vww(45);
+ border-bottom: 1rpx solid #f0f1f6;
+
+ .line-label {
+ width: 188rpx;
+ height: 90rpx;
+
+ @include flex image {
+ width: 50rpx;
+ height: 50rpx;
+ }
+
+ .label-text {
+ width: 120rpx;
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #000000;
+ line-height: 85rpx;
+ }
}
- .label-text {
- width: 120rpx;
+
+ .information-value {
+ min-width: vww(125);
+ @include flex;
font-size: 30rpx;
font-weight: 400;
color: #000000;
line-height: 85rpx;
}
}
- .information-value {
- min-width: vww(125);
- @include flex;
- font-size: 30rpx;
- font-weight: 400;
- color: #000000;
- line-height: 85rpx;
+
+ .last {
+ border-bottom: 0;
}
- }
- .last {
- border-bottom: 0;
}
}
}
- }
- .car-information {
- width: 100%;
- position: relative;
- top: vww(410);
- @include flex justify-content: center;
- .information-main {
- width: 690rpx;
- height: 552rpx;
- background: #ffffff;
- box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
- border-radius: 20rpx;
- .information-body {
- width: 636rpx;
- margin: vww(15) vww(14);
- @include flex flex-direction: column;
- .car-img {
- height: 246rpx;
- width: 100%;
+
+ .car-information {
+ width: 100%;
+ position: relative;
+ top: vww(410);
+ @include flex justify-content: center;
+
+ .information-main {
+ width: 690rpx;
+ height: 552rpx;
+ background: #ffffff;
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
+ border-radius: 20rpx;
+
+ .information-body {
+ width: 636rpx;
+ margin: vww(15) vww(14);
@include flex flex-direction: column;
- align-items: flex-start;
- .label-title {
- @include flex width: 200rpx;
- height: 100rpx;
- .label-text {
- width: 200rpx;
- height: 50rpx;
- }
- image {
- width: 50rpx;
- height: 50rpx;
+
+ .car-img {
+ height: 246rpx;
+ width: 100%;
+ @include flex;
+ flex-direction: column;
+ align-items: flex-start;
+
+ .label-title {
+ @include flex;
+ width: 220rpx;
+ height: 100rpx;
+
+ .label-text {
+ width: 100%;
+ height: 50rpx;
+ }
+
+ image {
+ width: 50rpx;
+ height: 50rpx;
+ }
}
}
}
}
}
- }
- .loginout {
- width: 100%;
- height: 74rpx;
- @include flex;
- justify-content: center;
- position: relative;
- bottom: vww(-430);
- .loginout-main {
- width: 84%;
- }
- }
- // 琛ㄥ崟
- .personal-information-form {
- margin-top: vww(200);
- .push-information-button {
- display: flex;
- margin: vww(20) auto 0;
- width: 80%;
- .u-button {
- &:nth-of-type(2) {
- margin-left: vww(10);
+ .loginout {
+ width: 100%;
+ height: 74rpx;
+ @include flex;
+ justify-content: center;
+ position: relative;
+ bottom: vww(-430);
+
+ .loginout-main {
+ width: 84%;
+ }
+ }
+
+ // 琛ㄥ崟
+ .personal-information-form {
+ margin-top: vww(200);
+
+ .push-information-button {
+ display: flex;
+ margin: vww(20) auto 0;
+ width: 80%;
+
+ .u-button {
+ &:nth-of-type(2) {
+ margin-left: vww(10);
+ }
}
}
}
- }
- // 棰勮鍥剧墖
- .previewImage-container {
- }
+ // 棰勮鍥剧墖
+ .previewImage-container {}
- // 淇敼寮瑰嚭妗�
- .editDriverPopup-container {
- .u-popup {
- .u-transition {
- height: 75%;
- .u-popup__content {
- overflow: scroll !important;
- .editDriverPopup-container-box {
- width: 90%;
- margin: 0 auto;
- }
+ // 淇敼寮瑰嚭妗�
+ .editDriverPopup-container {
+ .u-popup {
+ .u-transition {
+ height: 75%;
- //closeIcon
- .u-popup__content__close--top-right {
- top: vww(20) !important;
- .u-icon {
- .u-icon__icon {
- font-size: vww(20) !important;
+ .u-popup__content {
+ overflow: scroll !important;
+
+ .editDriverPopup-container-box {
+ width: 90%;
+ margin: 0 auto;
+ }
+
+ //closeIcon
+ .u-popup__content__close--top-right {
+ top: vww(20) !important;
+
+ .u-icon {
+ .u-icon__icon {
+ font-size: vww(20) !important;
+ }
}
}
}
@@ -710,5 +820,4 @@
}
}
}
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue b/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
index a933098..92084f9 100644
--- a/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
+++ b/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
@@ -1,18 +1,29 @@
<template>
<view class="freightForwarder-index">
<view class="freightForwarder-index-body">
- <view class="wait-collection" style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/customerbanner.png') no-repeat;background-size:contain"></view>
+ <view class="wait-collection"
+ style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/customerbanner.png') no-repeat;background-size:contain">
+ </view>
<view style="position: relative;top: -120px;">
- <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" textSize="30" iconSize="1000" v-if="orderPlanData.length == 0"></u-empty>
+ <u-empty mode="data"
+ icon="http://cdn.uviewui.com/uview/empty/data.png"
+ textSize="30"
+ iconSize="1000"
+ v-if="orderPlanData.length == 0"></u-empty>
</view>
<view class="collection-form">
- <view class="collection-form-item" v-for="(item, index) in orderPlanData" :key="index" @click="cardBodyClick(item)">
+ <view class="collection-form-item"
+ v-for="(item, index) in orderPlanData"
+ :key="index"
+ @click="cardBodyClick(item)">
<view class="first-line">
<view class="main-information">
<view class="sign">瑁�</view>
<view class="filedname exceedHide">
- <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName }}</text>
- <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.customerName }}</text>
+ <text
+ v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName }}</text>
+ <text
+ v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.customerName }}</text>
</view>
</view>
<view class="main-divider"></view>
@@ -25,8 +36,10 @@
<view class="main-information">
<view class="sign">鍗�</view>
<view class="filedname exceedHide">
- <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.customerName }}</text>
- <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName }}</text>
+ <text
+ v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.customerName }}</text>
+ <text
+ v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName }}</text>
</view>
</view>
</view>
@@ -34,19 +47,23 @@
<view class="coal-name">
<view class="">{{ item.coalName }}</view>
<view class="black-bar"></view>
- <view class="coal-type" v-if="item.orderType">{{ item.orderType }}</view>
+ <view class="coal-type"
+ v-if="item.orderType">{{ item.orderType }}</view>
</view>
</view>
<view class="third-line">
<view class="time-icon">
<view
- style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover"
- ></view>
+ style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover">
+ </view>
</view>
<view class="send-date">{{ item.sendDate }}</view>
</view>
<view class="fourth-line">
- <view class="forward" @click.stop="forwardClick(item)"><view class="button-image">杞彂</view></view>
+ <view class="forward"
+ @click.stop="forwardClick(item)">
+ <view class="button-image">杞彂</view>
+ </view>
</view>
</view>
</view>
@@ -55,16 +72,29 @@
</view> -->
<view class="history-numbers">
<combined-title title="鍘嗗彶鎻愮叅鍗�"></combined-title>
- <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltolower="historyScrolltolower">
- <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" textSize="30" iconSize="1000" v-if="historyCoalData.length === 0"></u-empty>
- <view class="history-information" v-for="(item, index) in historyCoalData" :key="index" @click="faYundetail(item)">
+ <scroll-view :scroll-top="scrollTop"
+ scroll-y="true"
+ class="scroll-Y"
+ @scrolltolower="historyScrolltolower">
+ <u-empty mode="data"
+ icon="http://cdn.uviewui.com/uview/empty/data.png"
+ textSize="30"
+ iconSize="1000"
+ v-if="historyCoalData.length === 0"></u-empty>
+ <view class="history-information"
+ v-for="(item, index) in historyCoalData"
+ :key="index"
+ @click="faYundetail(item)">
<view class="first">
<view class="">{{ item.deptName || '' }}</view>
- <view class=""><u-icon name="arrow-right" color="#999999" size="40"></u-icon></view>
+ <view class=""><u-icon name="arrow-right"
+ color="#999999"
+ size="40"></u-icon></view>
</view>
<view class="second">
<view class="coal-name">{{ item.coalName || '' }}</view>
- <view class="order-type" v-if="item.orderType">{{ item.orderType || '' }}</view>
+ <view class="order-type"
+ v-if="item.orderType">{{ item.orderType || '' }}</view>
</view>
<view class="third">
<view class="third-line">
@@ -73,8 +103,7 @@
</view>
<view class="third-line">
<view class="third-line_text">鍓╀綑鏁帮細</view>
- <view class="third-line_num" v-if="roleType == 1">{{ item.carNumSurplus1 }}</view>
- <view class="third-line_num" v-else-if="roleType == 2">{{ item.carNumSurplus }}</view>
+ <view class="third-line_num">{{ item.carNumSurplus }}</view>
</view>
<view class="third-line">
<view class="third-line_text">鎻愮叅鍗曚釜鏁帮細</view>
@@ -84,22 +113,23 @@
<view class="fourth">
<view class="fourth-icon">
<view
- style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover"
- ></view>
+ style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover">
+ </view>
</view>
<view class="senddate">{{ item.sendDate }}</view>
</view>
<view class="fourth">
<view class="fourth-icon">
<view
- style="width: 26rpx;height: 26rpx;line-height: 26rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/carnNUm.png') no-repeat;background-size: cover"
- ></view>
+ style="width: 26rpx;height: 26rpx;line-height: 26rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/carnNUm.png') no-repeat;background-size: cover">
+ </view>
</view>
<view class="senddate">{{ item.orderCode }}</view>
</view>
</view>
- <view class="more_text" v-if="showMoreData && historyCoalData.length !== 0">娌℃湁鏁版嵁浜�...</view>
- <view class="white-block"></view>
+ <view class="more_text"
+ v-if="showMoreData && historyCoalData.length !== 0">娌℃湁鏁版嵁浜�...</view>
+ <!-- <view class="white-block"></view> -->
</scroll-view>
</view>
</view>
@@ -107,418 +137,459 @@
</template>
<script>
-import combinedTitle from '@/components/combined-title/combined-title.vue';
-export default {
- props: {
- indexHistoryCoalData: {
- type: Array,
- default: []
- },
- indexHuoDaiOrderPlanData: {
- type: Array,
- default: []
- }
- },
- watch: {
- indexHistoryCoalData: {
- handler(v) {
- this.historyCoalData = v;
+ import combinedTitle from '@/components/combined-title/combined-title.vue';
+ export default {
+ props: {
+ indexHistoryCoalData: {
+ type: Array,
+ default: []
},
- deep: true,
- immediate: true
+ indexHuoDaiOrderPlanData: {
+ type: Array,
+ default: []
+ }
},
- indexHuoDaiOrderPlanData: {
- handler(v) {
- this.orderPlanData = v;
+ watch: {
+ indexHistoryCoalData: {
+ handler(v) {
+ this.historyCoalData = v;
+ },
+ deep: true,
+ immediate: true
},
- deep: true,
- immediate: true
- }
- },
- components: {
- combinedTitle
- },
- data() {
- return {
- orderPlanData: [],
- historyCoalData: [],
- // 琛ㄦ牸鍔犺浇鐘舵��
- loading: false,
- scrollTop: 0,
- // 姣忛〉鏁版嵁閲�
- pageSize: 10,
- // 褰撳墠椤�
- pageCurrent: 1,
- // 鏁版嵁鎬婚噺
- total: 0,
- // 鏄惁鏄剧ず鏇村鏁版嵁
- showMoreData: false
- };
- },
- onShow() {
- this.init();
- },
- computed: {
- huoDaiId() {
- return uni.getStorageSync('userInfo').id;
- }
- },
- methods: {
- // 鑾峰彇鍘嗗彶鎻愮叅鍗�
- getJhOrderPlanDataPage() {
- uni.showLoading({
- title: '鍔犺浇涓�'
- });
- this.$reqGet('getJhOrderPlanDataPage', { current: this.pageCurrent, size: this.pageSize }).then(res => {
- if (res.data.records) {
- if (this.pageCurrent > 1) {
- this.historyCoalData = this.historyCoalData.concat(res.data.records);
- this.historyCoalData = this.ArrSet(this.historyCoalData, 'id');
- uni.hideLoading();
- } else {
- this.historyCoalData = res.data.records;
- uni.hideLoading();
+ indexHuoDaiOrderPlanData: {
+ handler(v) {
+ this.orderPlanData = v;
+ },
+ deep: true,
+ immediate: true
+ }
+ },
+ components: {
+ combinedTitle
+ },
+ data() {
+ return {
+ orderPlanData: [],
+ historyCoalData: [],
+ // 琛ㄦ牸鍔犺浇鐘舵��
+ loading: false,
+ scrollTop: 0,
+ // 姣忛〉鏁版嵁閲�
+ pageSize: 10,
+ // 褰撳墠椤�
+ pageCurrent: 1,
+ // 鏁版嵁鎬婚噺
+ total: 0,
+ // 鏄惁鏄剧ず鏇村鏁版嵁
+ showMoreData: false
+ };
+ },
+ onShow() {
+ this.init();
+ },
+ computed: {
+ huoDaiId() {
+ return uni.getStorageSync('userInfo').id;
+ }
+ },
+ methods: {
+ // 鑾峰彇鍘嗗彶鎻愮叅鍗�
+ getJhOrderPlanDataPage() {
+ uni.showLoading({
+ title: '鍔犺浇涓�'
+ });
+ this.$reqGet('getJhOrderPlanDataPage', { current: this.pageCurrent, size: this.pageSize }).then(res => {
+ if (res.data.records) {
+ if (this.pageCurrent > 1) {
+ this.historyCoalData = this.historyCoalData.concat(res.data.records);
+ this.historyCoalData = this.ArrSet(this.historyCoalData, 'id');
+ uni.hideLoading();
+ } else {
+ this.historyCoalData = res.data.records;
+ uni.hideLoading();
+ }
}
- }
- });
- },
- // 涓婃媺鍔犺浇
- historyScrolltolower() {
- if (this.pageCurrent * this.pageSize >= this.total) return (this.showMoreData = true);
- this.pageCurrent++;
- this.getJhOrderPlanDataPage();
- },
- //fix 鐐瑰嚮鎻愮叅鍗曡繑鍥炰細澧炲姞閲嶅鏁版嵁
- ArrSet(Arr, id) {
- var obj = {};
- const arrays = Arr.reduce((setArr, item) => {
- obj[item[id]] ? '' : (obj[item[id]] = true && setArr.push(item));
- return setArr;
- }, []);
- return arrays;
- },
- init() {
- this.huoDaiList();
- this.getJhOrderPlanDataPage();
- },
- huoDaiList() {
- this.$reqGet('huoDaiList').then(res => {
- this.orderPlanData = res.data;
- });
- },
- cardBodyClick(item) {
- // let code = null;
- // this.orderPlanData.forEach(item => {
- // if (item.orderPlanId == id) {
- // code = item.code;
- // id = item.orderPlanId;
- // }
- // });
- uni.navigateTo({
- url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${item.orderPlanId}&code=${item.code}`
- });
- },
- // 杞彂
- forwardClick(value) {
- uni.navigateTo({
- url: `/pages/public-page/forward/forward?orderPlanId=${value.orderPlanId}&carNumSurplusHuodai=${value.carNumSurplusHuodai}&carNum=${value.carNum}`
- });
- },
- // 鐐瑰嚮鍘嗗彶鎻愮叅鍗曚竴琛岃幏鍙栬鎯�
- faYundetail(v) {
- uni.navigateTo({
- url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}`
- });
+ });
+ },
+ // 涓婃媺鍔犺浇
+ historyScrolltolower() {
+ if (this.pageCurrent * this.pageSize >= this.total) return (this.showMoreData = true);
+ this.pageCurrent++;
+ this.getJhOrderPlanDataPage();
+ },
+ //fix 鐐瑰嚮鎻愮叅鍗曡繑鍥炰細澧炲姞閲嶅鏁版嵁
+ ArrSet(Arr, id) {
+ var obj = {};
+ const arrays = Arr.reduce((setArr, item) => {
+ obj[item[id]] ? '' : (obj[item[id]] = true && setArr.push(item));
+ return setArr;
+ }, []);
+ return arrays;
+ },
+ init() {
+ this.huoDaiList();
+ this.getJhOrderPlanDataPage();
+ },
+ huoDaiList() {
+ this.$reqGet('huoDaiList').then(res => {
+ this.orderPlanData = res.data;
+ });
+ },
+ cardBodyClick(item) {
+ // let code = null;
+ // this.orderPlanData.forEach(item => {
+ // if (item.orderPlanId == id) {
+ // code = item.code;
+ // id = item.orderPlanId;
+ // }
+ // });
+ uni.navigateTo({
+ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${item.orderPlanId}&carNum=${item.carNum}`
+ });
+ },
+ // 杞彂
+ forwardClick(value) {
+ uni.navigateTo({
+ url: `/pages/public-page/forward/forward?orderPlanId=${value.orderPlanId}&carNumSurplusHuodai=${value.carNumSurplusHuodai}&carNum=${value.carNum}`
+ });
+ },
+ // 鐐瑰嚮鍘嗗彶鎻愮叅鍗曚竴琛岃幏鍙栬鎯�
+ faYundetail(v) {
+ uni.navigateTo({
+ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}`
+ });
+ }
}
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-@mixin flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-@mixin firstLine {
- width: 94%;
- height: vww(68);
- margin: vww(18) vww(16) 0 vww(16);
- display: flex;
- justify-content: space-between;
-}
-.scroll-Y {
- height: 900rpx;
- .more_text {
- color: #333;
- font-size: 24rpx;
- text-align: center;
+<style lang="scss"
+ scoped>
+ @mixin flex {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
}
-}
-.history-numbers {
- width: 100%;
- position: relative;
- top: vww(-110);
- .history-information {
- width: 690rpx;
- height: 398rpx;
- margin: vww(10) vww(15);
- background: #ffffff;
- box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
- border-radius: 20rpx;
- @include flex flex-direction: column;
- align-items: flex-start;
- justify-content: space-evenly;
- overflow: hidden;
- .first {
- width: 96%;
- height: 34rpx;
- font-size: 32rpx;
- font-weight: 300;
- color: #303030;
- @include flex;
- margin: vww(10) vww(10) 0;
+
+ @mixin firstLine {
+ width: 94%;
+ height: vww(68);
+ margin: vww(18) vww(16) 0 vww(16);
+ display: flex;
+ justify-content: space-between;
+ }
+
+ .scroll-Y {
+ height: 900rpx;
+
+ .more_text {
+ color: #333;
+ font-size: 24rpx;
+ text-align: center;
}
- .second {
- width: 100%;
- height: 31rpx;
- font-size: 30rpx;
- font-weight: 300;
- color: #515151;
- margin: vww(10) vww(10) 0;
- @include flex;
- justify-content: flex-start;
- .coal-name {
- min-width: vww(30);
- height: vww(20);
- margin-right: vww(21);
- }
- .order-type {
- color: #035cfb;
- border: 2px solid #035cfb;
- border-radius: 4rpx;
- padding: vww(2) vww(4);
- text-align: center;
- }
- }
- .third {
- width: 96%;
- height: 31rpx;
- font-size: 30rpx;
- font-weight: 300;
- color: #515151;
- margin: vww(10) vww(10) 0;
- @include flex;
- .third-line {
+ }
+
+ .history-numbers {
+ width: 100%;
+ position: relative;
+ top: vww(-110);
+
+ .history-information {
+ width: 690rpx;
+ height: 398rpx;
+ margin: vww(10) vww(15);
+ background: #ffffff;
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
+ border-radius: 20rpx;
+ @include flex flex-direction: column;
+ align-items: flex-start;
+ justify-content: space-evenly;
+ overflow: hidden;
+
+ .first {
+ width: 96%;
+ height: 34rpx;
+ font-size: 32rpx;
+ font-weight: 300;
+ color: #303030;
@include flex;
- &_text {
- color: #919090;
+ margin: vww(10) vww(10) 0;
+ }
+
+ .second {
+ width: 100%;
+ height: 31rpx;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #515151;
+ margin: vww(10) vww(10) 0;
+ @include flex;
+ justify-content: flex-start;
+
+ .coal-name {
+ min-width: vww(30);
+ height: vww(20);
+ margin-right: vww(21);
}
- &_num {
+
+ .order-type {
color: #035cfb;
+ border: 2px solid #035cfb;
+ border-radius: 4rpx;
+ padding: vww(2) vww(4);
+ text-align: center;
}
}
- }
- .fourth {
- width: 50%;
- height: 31rpx;
- font-size: 30rpx;
- font-weight: 300;
- color: #515151;
- margin: vww(10) vww(10) 0;
- @include flex;
- .fourth-icon {
- width: vww(13);
- height: vww(13);
- margin-right: vww(14);
+
+ .third {
+ width: 96%;
+ height: 31rpx;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #515151;
+ margin: vww(10) vww(10) 0;
+ @include flex;
+
+ .third-line {
+ @include flex;
+
+ &_text {
+ color: #919090;
+ }
+
+ &_num {
+ color: #035cfb;
+ }
+ }
}
- .senddate {
- flex: 1;
+
+ .fourth {
+ width: 50%;
+ height: 31rpx;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #515151;
+ margin: vww(10) vww(10) 0;
+ @include flex;
+
+ .fourth-icon {
+ width: vww(13);
+ height: vww(13);
+ margin-right: vww(14);
+ }
+
+ .senddate {
+ flex: 1;
+ }
}
}
}
-}
-.exceedHide {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-::v-deep.freightForwarder-index {
- width: 100%;
- margin: 0 auto;
- // 涓讳綋
- .freightForwarder-index-body {
- .wait-collection {
- width: 100%;
- height: 600rpx;
- position: relative;
- top: vww(-10);
- z-index: 0;
- }
- .collection-form {
- width: vww(345);
- margin: 0 vww(15);
- position: relative;
- top: vww(-144);
- .collection-form-item {
- width: 690rpx;
- height: 340rpx;
- background: #ffffff;
- box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
- border-radius: 20rpx;
- overflow: hidden;
- @include flex;
- flex-direction: column;
+
+ .exceedHide {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
+ ::v-deep.freightForwarder-index {
+ width: 100%;
+ margin: 0 auto;
+
+ // 涓讳綋
+ .freightForwarder-index-body {
+ .wait-collection {
+ width: 100%;
+ height: 600rpx;
position: relative;
- align-items: flex-start;
- margin-top: vww(10);
- .first-line {
- width: 94%;
- height: vww(30);
- margin: vww(10) vww(16) 0 vww(16);
- display: flex;
- justify-content: space-between;
- .main-information {
- width: 88%;
- height: vww(28);
+ top: vww(-10);
+ z-index: 0;
+ }
+
+ .collection-form {
+ width: vww(345);
+ margin: 0 vww(15);
+ position: relative;
+ top: vww(-144);
+
+ .collection-form-item {
+ width: 690rpx;
+ height: 340rpx;
+ background: #ffffff;
+ box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
+ border-radius: 20rpx;
+ overflow: hidden;
+ @include flex;
+ flex-direction: column;
+ position: relative;
+ align-items: flex-start;
+ margin-top: vww(10);
+
+ .first-line {
+ width: 94%;
+ height: vww(30);
+ margin: vww(10) vww(16) 0 vww(16);
display: flex;
- justify-content: flex-start;
- align-items: center;
- .sign {
- width: vww(28);
+ justify-content: space-between;
+
+ .main-information {
+ width: 88%;
height: vww(28);
- line-height: vww(28);
- text-align: center;
- background: url('https://mx.jzeg.cn:9095/appimg/image/banner/blueblock.png') no-repeat;
- background-size: contain;
- font-size: 30rpx;
- font-weight: 400;
- color: #ffffff;
- margin-right: vww(20);
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+
+ .sign {
+ width: vww(28);
+ height: vww(28);
+ line-height: vww(28);
+ text-align: center;
+ background: url('https://mx.jzeg.cn:9095/appimg/image/banner/blueblock.png') no-repeat;
+ background-size: contain;
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #ffffff;
+ margin-right: vww(20);
+ }
+ }
+
+ .main-divider {
+ width: 560rpx;
+ height: 1rpx;
+ background: #e3e3e3;
+ position: absolute;
+ top: 98rpx;
+ left: 122rpx;
+ }
+
+ .point-number {
+ position: absolute;
+ right: 0;
+ width: 15%;
+
+ text {
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #c78a64;
+ }
+
+ .residue {
+ font-size: 40rpx;
+ font-weight: 400;
+ color: #f81414;
+ }
}
}
- .main-divider {
- width: 560rpx;
- height: 1rpx;
- background: #e3e3e3;
- position: absolute;
- top: 98rpx;
- left: 122rpx;
- }
- .point-number {
- position: absolute;
- right: 0;
- width: 15%;
- text {
- font-size: 24rpx;
- font-weight: 400;
- color: #c78a64;
- }
- .residue {
- font-size: 40rpx;
- font-weight: 400;
- color: #f81414;
+
+ .first-extra {
+ @include firstLine;
+
+ .main-information {
+ width: 100%;
+ height: vww(28);
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+
+ .sign {
+ width: vww(28);
+ height: vww(28);
+ line-height: vww(28);
+ text-align: center;
+ background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat;
+ background-size: contain;
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #ffffff;
+ margin-right: vww(20);
+ }
}
}
- }
- .first-extra {
- @include firstLine;
- .main-information {
+
+ .second-line {
width: 100%;
- height: vww(28);
+ height: vww(40);
+ margin-left: vww(18);
display: flex;
justify-content: flex-start;
align-items: center;
- .sign {
- width: vww(28);
- height: vww(28);
- line-height: vww(28);
- text-align: center;
- background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat;
- background-size: contain;
+
+ .coal-name {
+ flex-grow: 1;
+ height: 30rpx;
font-size: 30rpx;
- font-weight: 400;
- color: #ffffff;
- margin-right: vww(20);
+ font-weight: 300;
+ color: #515151;
+ position: relative;
+ display: flex;
+ align-items: center;
+
+ .black-bar {
+ width: 2rpx;
+ height: 30rpx;
+ background: #515151;
+ margin-left: vww(12);
+ }
+
+ .coal-type {
+ margin-left: vww(12);
+ min-width: vww(50);
+ height: 30rpx;
+ line-height: 30rpx;
+ font-size: 30rpx;
+ font-weight: 300;
+ color: #515151;
+ }
}
}
- }
- .second-line {
- width: 100%;
- height: vww(40);
- margin-left: vww(18);
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .coal-name {
- flex-grow: 1;
- height: 30rpx;
- font-size: 30rpx;
- font-weight: 300;
- color: #515151;
- position: relative;
+
+ .third-line {
+ width: 40%;
+ height: vww(50);
+ margin-left: vww(18);
display: flex;
+ justify-content: flex-start;
align-items: center;
- .black-bar {
- width: 2rpx;
- height: 30rpx;
- background: #515151;
- margin-left: vww(12);
- }
- .coal-type {
- margin-left: vww(12);
- min-width: vww(50);
- height: 30rpx;
- line-height: 30rpx;
- font-size: 30rpx;
+
+ .send-date {
+ width: 148rpx;
+ height: 24rpx;
+ margin-left: vww(14);
+ line-height: 24rpx;
+ font-size: 28rpx;
font-weight: 300;
color: #515151;
}
}
- }
- .third-line {
- width: 40%;
- height: vww(50);
- margin-left: vww(18);
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .send-date {
- width: 148rpx;
- height: 24rpx;
- margin-left: vww(14);
- line-height: 24rpx;
- font-size: 28rpx;
- font-weight: 300;
- color: #515151;
- }
- }
- .fourth-line {
- width: 40%;
- height: vww(30);
- @include flex;
- position: relative;
- left: 60%;
- bottom: vww(10);
- .forward {
- width: vww(123);
- height: vww(48);
- left: vww(140);
- .button-image {
- width: 100%;
- height: 100%;
- background: url('../../../static/image/banner/button.png') no-repeat;
- background-size: cover;
- font-size: 28rpx;
- font-weight: 300;
- color: #fff;
- text-align: center;
- line-height: vww(45);
+
+ .fourth-line {
+ width: 40%;
+ height: vww(30);
+ @include flex;
+ position: relative;
+ left: 60%;
+ bottom: vww(10);
+
+ .forward {
+ width: vww(123);
+ height: vww(48);
+ left: vww(140);
+
+ .button-image {
+ width: 100%;
+ height: 100%;
+ background: url('../../../static/image/banner/button.png') no-repeat;
+ background-size: cover;
+ font-size: 28rpx;
+ font-weight: 300;
+ color: #fff;
+ text-align: center;
+ line-height: vww(45);
+ }
}
}
}
}
}
}
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/login/login.vue b/pages/login/login.vue
index c362e72..d697aee 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -5,263 +5,292 @@
<user-password :btnText="0" />
<!-- 寰俊openid鐧诲綍 -->
<view class="loginBtn">
- <u-button class="button" @click.stop="beforeLoginEvent" :disabled="btnLoading" :loading="btnLoading" type="primary" text="寰俊涓�閿櫥褰�"></u-button>
+ <u-button class="button"
+ @click.stop="beforeLoginEvent"
+ :disabled="btnLoading"
+ :loading="btnLoading"
+ type="primary"
+ text="寰俊涓�閿櫥褰�"></u-button>
</view>
- <view class="register" @click="registerClick"><text>娉ㄥ唽</text></view>
+ <view class="register"
+ @click="registerClick"><text>娉ㄥ唽</text></view>
<view class="login-bottom-box">
<view class="copyright">鍐�涓兘婧愭棤浜哄�煎畧寰俊灏忕▼搴�</view>
<view class="copyright">灏忕▼搴忎粎渚涘凡鎷ユ湁绯荤粺璐﹀彿鐗瑰畾鍐呴儴浜哄憳浣跨敤</view>
</view>
<!-- 寰俊鎺堟潈鍓嶇殑寮规 -->
<view class="loginPopup">
- <u-popup :show="loginPopupShow" mode="bottom" @close="closePopup" @open="openPopup" round="10" :safeAreaInsetBottom="true">
+ <u-popup :show="loginPopupShow"
+ mode="bottom"
+ @close="closePopup"
+ @open="openPopup"
+ round="10"
+ :safeAreaInsetBottom="true">
<view class="popup-warp">
<view class="body"><text>鏈皬绋嬪簭锛屼粎渚涘凡鎷ユ湁绯荤粺璐﹀彿鐗瑰畾鍐呴儴浜哄憳鐧诲綍浣跨敤锛岀偣鍑诲悓鎰忓嵆琛ㄧず鎮ㄥ凡鍚屾剰鐩稿簲淇℃伅鎺堟潈銆�</text></view>
<view class="btn">
- <u-button @click="loginPopupShow = false" type="error" text="涓嶅悓鎰�" shape="circle" :plain="true"></u-button>
- <u-button @click="wxLogin" type="error" text="鍚屾剰" throttleTime="3000" shape="circle"></u-button>
+ <u-button @click="loginPopupShow = false"
+ type="error"
+ text="涓嶅悓鎰�"
+ shape="circle"
+ :plain="true"></u-button>
+ <u-button @click="wxLogin"
+ type="error"
+ text="鍚屾剰"
+ throttleTime="3000"
+ shape="circle"></u-button>
</view>
</view>
</u-popup>
</view>
<!-- 璇㈤棶鏄惁缁戝畾寰俊 -->
<view class="bindWxModel">
- <u-modal :show="bindWxModelShow" :title="bindWxModelTitle" showCancelButton :content="bindWxContent" @confirm="bindWxConfirm" @cancel="bindWxCancel"></u-modal>
+ <u-modal :show="bindWxModelShow"
+ :title="bindWxModelTitle"
+ showCancelButton
+ :content="bindWxContent"
+ @confirm="bindWxConfirm"
+ @cancel="bindWxCancel"></u-modal>
</view>
</view>
</template>
<script>
-import { apiLoginWx, apiLoginPassword } from '@/api/publicInterface.js';
-import { mapMutations } from 'vuex';
-import userPassword from './userPassword.vue';
-import { setToken, setRefreshToken, setUsernameKey, setCustomerId, redirectHome } from '@/utils/status.js';
-export default {
- data() {
- return {
- btnLoading: false,
- loginPopupShow: false,
- // 缁戝畾寰俊妯℃�佹
- bindWxModelShow: false,
- bindWxModelTitle: '鎻愮ず',
- bindWxContent: '濡傛灉宸叉嫢鏈夌郴缁熻处鍙凤紝鍙互鐩存帴璺宠浆缁戝畾寰俊椤甸潰'
- };
- },
- components: {
- userPassword
- },
- methods: {
- ...mapMutations(['setUserTabbar']),
- // 璁块棶wx.login,鑾峰彇code
- beforeLoginEvent() {
- this.loginPopupShow = true;
+ import { apiLoginWx, apiLoginPassword } from '@/api/publicInterface.js';
+ import { mapMutations } from 'vuex';
+ import userPassword from './userPassword.vue';
+ import { setToken, setRefreshToken, setUsernameKey, setCustomerId, redirectHome } from '@/utils/status.js';
+ export default {
+ data() {
+ return {
+ btnLoading: false,
+ loginPopupShow: false,
+ // 缁戝畾寰俊妯℃�佹
+ bindWxModelShow: false,
+ bindWxModelTitle: '鎻愮ず',
+ bindWxContent: '濡傛灉宸叉嫢鏈夌郴缁熻处鍙凤紝鍙互鐩存帴璺宠浆缁戝畾寰俊椤甸潰'
+ };
},
- wxLogin() {
- // 鑾峰彇鐧诲綍鐢ㄦ埛code
- uni.login({
- success: res => {
- if (res.code) {
- uni.setStorageSync('code', res.code);
- this.apiLogin(res.code);
- } else {
- uni.showToast({
- title: '寰俊鐧诲綍澶辫触锛�',
- duration: 2000
- });
- }
- }
- });
+ components: {
+ userPassword
},
- // 鐧诲綍鎺ュ彛
- apiLogin(code) {
- /**
- * @openid
- * 鑾峰彇寰俊鐢ㄦ埛openid,寰俊涓�閿櫥褰曟殏鏃犵浉鍏虫帴鍙o紝鐢ㄤ簬娴嬭瘯鍛煎彨瀹㈡湇鍔熻兘
- */
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- // wx.request({
- // url: `https://api.weixin.qq.com/sns/jscode2session?appid=wx4a62fc1684c429a9&secret=ee90afe376cdcec2fdd947c0a4db961a&js_code=${code}&grant_type=authorization_code`,
- // success(res) {
- // uni.setStorageSync('openid', res.data.openid);
- // uni.showToast({
- // title: '鎴愬姛鑾峰彇娴嬭瘯openid',
- // icon: 'none'
- // });
- // }
- // });
- this.$nextTick(() => {
- apiLoginWx({ code: code }).then(res => {
- if (res.code != 1) {
- this.$u.toast('鐧诲綍鎴愬姛');
- // 鐧婚檰鎴愬姛锛屽瓨鍌ㄧ浉鍏充俊鎭�
- setToken(res.access_token);
- setRefreshToken(res.refresh_token);
- setUsernameKey(res.username);
- //鏌ヨ鐢ㄦ埛璇︾粏淇℃伅骞跺偍瀛�
- this.$reqGet('getUserEntity').then(res => {
- this.setUserTabbar(res.data.type);
- uni.setStorageSync('roleType', res.data.type);
- setCustomerId(res.data.customerid);
- uni.hideLoading();
- //璺宠浆椤甸潰
- this.$nextTick(() => {
- redirectHome();
+ methods: {
+ ...mapMutations(['setUserTabbar', 'changeisLogin']),
+ // 璁块棶wx.login,鑾峰彇code
+ beforeLoginEvent() {
+ this.loginPopupShow = true;
+ },
+ wxLogin() {
+ // 鑾峰彇鐧诲綍鐢ㄦ埛code
+ uni.login({
+ success: res => {
+ if (res.code) {
+ uni.setStorageSync('code', res.code);
+ this.apiLogin(res.code);
+ } else {
+ uni.showToast({
+ title: '寰俊鐧诲綍澶辫触锛�',
+ duration: 2000
});
- });
- } else {
- this.$u.toast(res.msg);
- this.bindWxModelShow = true;
+ }
}
});
- });
- this.loginPopupShow = false;
- },
- bindWxConfirm() {
- uni.navigateTo({
- url: `/pages/login/wxLogin?code=${uni.getStorageSync('code')}`
- });
- this.bindWxModelShow = false;
- },
- bindWxCancel() {
- this.bindWxModelShow = false;
- },
- // 寮瑰嚭灞傛椂闂�
- closePopup() {
- this.loginPopupShow = false;
- },
- openPopup() {
- console.log('鎵撳紑浜�');
- },
- registerClick() {
- uni.navigateTo({
- url: '/pages/register/register'
- });
+ },
+ // 鐧诲綍鎺ュ彛
+ apiLogin(code) {
+ // 鑾峰彇寰俊鐢ㄦ埛openid,寰俊涓�閿櫥褰曟殏鏃犵浉鍏虫帴鍙o紝鐢ㄤ簬娴嬭瘯鍛煎彨瀹㈡湇鍔熻兘
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ wx.request({
+ url: `https://api.weixin.qq.com/sns/jscode2session?appid=wx4a62fc1684c429a9&secret=ee90afe376cdcec2fdd947c0a4db961a&js_code=${code}&grant_type=authorization_code`,
+ success(res) {
+ uni.setStorageSync('openid', res.data.openid);
+ // uni.showToast({
+ // title: '鎴愬姛鑾峰彇娴嬭瘯openid',
+ // icon: 'none'
+ // });
+ }
+ });
+ this.$nextTick(() => {
+ apiLoginWx({ code: code }).then(res => {
+ if (res.code != 1) {
+ this.$u.toast('鐧诲綍鎴愬姛');
+ this.changeisLogin(true);
+ // 鐧婚檰鎴愬姛锛屽瓨鍌ㄧ浉鍏充俊鎭�
+ setToken(res.access_token);
+ setRefreshToken(res.refresh_token);
+ setUsernameKey(res.username);
+ //鏌ヨ鐢ㄦ埛璇︾粏淇℃伅骞跺偍瀛�
+ this.$reqGet('getUserEntity').then(res => {
+ this.setUserTabbar(res.data.type);
+ uni.setStorageSync('roleType', res.data.type);
+ setCustomerId(res.data.customerid);
+ uni.hideLoading();
+ //璺宠浆椤甸潰
+ this.$nextTick(() => {
+ redirectHome();
+ });
+ });
+ } else {
+ this.$u.toast(res.msg);
+ this.bindWxModelShow = true;
+ }
+ });
+ });
+ this.loginPopupShow = false;
+ },
+ bindWxConfirm() {
+ uni.navigateTo({
+ url: `/pages/login/wxLogin?code=${uni.getStorageSync('code')}`
+ });
+ this.bindWxModelShow = false;
+ },
+ bindWxCancel() {
+ this.bindWxModelShow = false;
+ },
+ // 寮瑰嚭灞傛椂闂�
+ closePopup() {
+ this.loginPopupShow = false;
+ },
+ openPopup() {
+ console.log('鎵撳紑浜�');
+ },
+ registerClick() {
+ uni.navigateTo({
+ url: '/pages/register/register'
+ });
+ }
}
- }
-};
+ };
</script>
<style lang="scss">
-@import 'index.scss';
-.login {
- // height: 100vh;
- // display: flex;
- // align-items: center;
+ @import 'index.scss';
- // .loginBtn {
- // margin: 0 auto;
- // width: 80%;
+ .login {
+ // height: 100vh;
+ // display: flex;
+ // align-items: center;
- // .u-button {
- // .u-icon {
- // .u-icon__icon {
- // font-size: vww(20) !important;
- // }
- // }
- // }
+ // .loginBtn {
+ // margin: 0 auto;
+ // width: 80%;
- // .u-button--success {
- // border-style: none;
- // }
- // }
- .loginBtn {
- margin-top: vww(20);
- .u-button {
+ // .u-button {
+ // .u-icon {
+ // .u-icon__icon {
+ // font-size: vww(20) !important;
+ // }
+ // }
+ // }
+
+ // .u-button--success {
+ // border-style: none;
+ // }
+ // }
+ .loginBtn {
+ margin-top: vww(20);
+
+ .u-button {
+ width: 80%;
+ }
+ }
+
+ .logo {
width: 80%;
- }
- }
- .logo {
- width: 80%;
- font-size: 64rpx;
- color: #497bff;
- margin: vww(100) auto 0;
- text-align: center;
- }
-
- .list-call-icon {
- color: #ff0000;
- }
-
- .currentPhone-box {
- text-align: center;
- padding: 40rpx 80rpx;
-
- .number-text {
- color: #000000;
- font-size: 60rpx;
+ font-size: 64rpx;
+ color: #497bff;
+ margin: vww(100) auto 0;
+ text-align: center;
}
- .other-text {
- color: #999999;
- font-size: 26rpx;
- padding: 20rpx 0;
+ .list-call-icon {
+ color: #ff0000;
}
- .u-btn {
- margin: 30rpx auto;
+ .currentPhone-box {
+ text-align: center;
+ padding: 40rpx 80rpx;
+
+ .number-text {
+ color: #000000;
+ font-size: 60rpx;
+ }
+
+ .other-text {
+ color: #999999;
+ font-size: 26rpx;
+ padding: 20rpx 0;
+ }
+
+ .u-btn {
+ margin: 30rpx auto;
+ }
+
+ .u-hairline-border {
+ border: 1px solid #fff;
+ }
}
- .u-hairline-border {
- border: 1px solid #fff;
+ .register {
+ color: #497bff;
+ height: 40rpx;
+ line-height: 40rpx;
+ font-size: 28rpx;
+ position: fixed;
+ bottom: vww(70);
+ text-align: center;
+ width: 100%;
}
- }
- .register {
- color: #497bff;
- height: 40rpx;
- line-height: 40rpx;
- font-size: 28rpx;
- position: fixed;
- bottom: vww(70);
- text-align: center;
- width: 100%;
- }
-
- .register-link {
- float: right;
- padding: 0 16rpx;
- }
-
- .reg-link {
- display: inline-block;
- color: #497bff;
- }
-
- .oauth2 {
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- margin: 0rpx 100rpx 30rpx;
-
- image {
- height: 80rpx;
- width: 80rpx;
+ .register-link {
+ float: right;
+ padding: 0 16rpx;
}
- }
- .u-tabs {
- padding: 0 70rpx;
- }
+ .reg-link {
+ display: inline-block;
+ color: #497bff;
+ }
- // 寮瑰嚭妗�
- .loginPopup {
- .u-popup {
- .u-transition {
- .u-popup__content {
- .popup-warp {
- height: vww(200);
- padding: vww(10) vww(20);
- .body {
- width: 100%;
- height: 70%;
- }
- .btn {
- display: flex;
- justify-content: space-between;
- .u-button {
- width: 40%;
+ .oauth2 {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-around;
+ margin: 0rpx 100rpx 30rpx;
+
+ image {
+ height: 80rpx;
+ width: 80rpx;
+ }
+ }
+
+ .u-tabs {
+ padding: 0 70rpx;
+ }
+
+ // 寮瑰嚭妗�
+ .loginPopup {
+ .u-popup {
+ .u-transition {
+ .u-popup__content {
+ .popup-warp {
+ height: vww(200);
+ padding: vww(10) vww(20);
+
+ .body {
+ width: 100%;
+ height: 70%;
+ }
+
+ .btn {
+ display: flex;
+ justify-content: space-between;
+
+ .u-button {
+ width: 40%;
+ }
}
}
}
@@ -269,5 +298,4 @@
}
}
}
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/public-page/forward/forward.vue b/pages/public-page/forward/forward.vue
index 7466107..0c8c3aa 100644
--- a/pages/public-page/forward/forward.vue
+++ b/pages/public-page/forward/forward.vue
@@ -17,9 +17,9 @@
<view v-else-if="roleType == 2" class="notice-bar"><u-notice-bar :text="text1" :fontSize="30"></u-notice-bar></view>
<view class="card-main">
<view class="card-block">
- <view class="forward-card" v-for="(val, index) in jhOrderPlanForwardList" :key="val.vid">
- <u-swipe-action>
- <u-swipe-action-item :options="options1" @click="deleteGroup(index, val)" :name="val.vid">
+ <u-swipe-action>
+ <u-swipe-action-item :options="options1" v-for="(val, index) in jhOrderPlanForwardList" :key="val.vid" :name="val.vid" @click="deleteGroup(index, val)">
+ <view class="forward-card">
<view class="card-content">
<u--form labelPosition="left" :model="forwardForm" ref="form1">
<u-form-item label="杞彂瀵硅薄" labelWidth="21%" ref="item1" @click="forwardObjectClick(index)">
@@ -37,16 +37,23 @@
></u--input>
</view>
<u-checkbox-group v-model="val.checkboxValue1" placement="column" @change="v => checkboxChange(v, index, val)">
- <u-checkbox size="30" shape="circle" labelSize="30" label="鍏ㄩ儴杞彂" name="鍏ㄩ儴杞彂" :disabled="val.ischecked"></u-checkbox>
+ <u-checkbox
+ size="30"
+ shape="circle"
+ labelSize="30"
+ label="鍏ㄩ儴杞彂"
+ name="鍏ㄩ儴杞彂"
+ :disabled="val.ischecked"
+ :checked="val.isSelected"
+ ></u-checkbox>
</u-checkbox-group>
</view>
</u-form-item>
- <!-- <u-form-item><u-button text="鍒犻櫎鏈粍" :hairline="false" type="error" @click="deleteGroup(index, val)"></u-button></u-form-item> -->
</u--form>
</view>
- </u-swipe-action-item>
- </u-swipe-action>
- </view>
+ </view>
+ </u-swipe-action-item>
+ </u-swipe-action>
</view>
</view>
@@ -103,7 +110,7 @@
this.orderPlanId = params.orderPlanId;
this.$reqGet('forwardList', { OrderPlanId: params.orderPlanId }).then(res => {
if (res.data.length !== 0 && this.roleType == 1) {
- this.jhOrderPlanForwardList = res.data.map(item => {
+ this.jhOrderPlanForwardList = res.data.map((item, index) => {
return {
id: item.id,
orderPlanId: item.orderPlanId,
@@ -112,11 +119,11 @@
xsUserId: item.xsUserId === null ? 0 : item.xsUserId,
fleetId: item.fleetId === null ? 0 : item.fleetId,
checkboxValue1: '',
- vid: new Date().getTime()
+ vid: `${new Date().getTime()}${index}${item.id}`
};
});
} else if (res.data.length !== 0 && this.roleType == 2) {
- this.jhOrderPlanForwardList = res.data.map(item => {
+ this.jhOrderPlanForwardList = res.data.map((item, index) => {
return {
id: item.id,
orderPlanId: item.orderPlanId,
@@ -125,16 +132,16 @@
xsUserId: item.xsUserId === null ? 0 : item.xsUserId,
fleetId: item.fleetId === null ? 0 : item.fleetId,
checkboxValue1: '',
- vid: new Date().getTime()
+ vid: `${new Date().getTime()}${index}${item.id}`
};
});
} else {
- this.jhOrderPlanForwardList = this.jhOrderPlanForwardList.map(v => {
- if (!v.orderPlanId) {
+ this.jhOrderPlanForwardList = this.jhOrderPlanForwardList.map((item, index) => {
+ if (!item.orderPlanId) {
return {
- ...v,
+ ...item,
orderPlanId: params.orderPlanId,
- vid: new Date().getTime()
+ vid: `${new Date().getTime()}${index}${item.id}`
};
}
});
@@ -156,7 +163,8 @@
carNum: null,
xsUserId: 0,
fleetId: 0,
- checkboxValue1: ''
+ checkboxValue1: '',
+ isSelected: false
}
],
// 绱㈠紩锛屽埄鐢ㄧ储寮曟纭樉绀�
@@ -250,29 +258,6 @@
};
});
if (value.length != 0) {
- let tempforwardSurplus = this.forwardSurplus;
- let tempcarNumSurplus1 = this.carNumSurplus1;
- // if (v.id) {
- // this.$reqGet('jhorderplanforward', { forwardId: v.id }).then(res => {
- // this.personalForward = res.data;
- // // 璁$畻鍏ㄩ儴杞彂鏁�
- // // 瀹㈡埛
- // if (this.roleType == 1) {
- // this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.personalForward.carNum, tempcarNumSurplus1);
- // this.calculate(this.jhOrderPlanForwardList);
- // if (tempcarNumSurplus1 == 0) {
- // this.jhOrderPlanForwardList[index].carNum = this.allrelay(0, this.carNumSurplus1);
- // }
- // }
- // tempcarNumSurplus1 = 0;
- // // 璐т唬
- // if (this.roleType == 2) {
- // this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.personalForward.carNum, tempforwardSurplus);
- // }
- // tempforwardSurplus = 0;
- // });
- // } else { }
-
if (this.roleType == 1) {
this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.carNumSurplus1, this.jhOrderPlanForwardList[index].carNum);
this.calculate(this.jhOrderPlanForwardList);
@@ -289,7 +274,7 @@
});
this.whetherClick = true;
} else {
- this.jhOrderPlanForwardList[index].carNum = 0;
+ this.jhOrderPlanForwardList[index].carNum = null;
this.calculate(this.jhOrderPlanForwardList);
}
},
@@ -351,8 +336,8 @@
}, 0);
console.log(total, '鎻愮叅鍗曚竴鍏辩殑鏁版嵁');
if (this.roleType == 1) {
- if (this.cars2 >= total) {
- this.carNumSurplus1 = this.cars2 - total;
+ if (Number(this.cars2) >= total) {
+ this.carNumSurplus1 = Number(this.cars2) - total;
this.whetherClick = false;
this.whetherClick1 = false;
} else {
@@ -363,8 +348,8 @@
}
}
if (this.roleType == 2) {
- if (this.carNum >= total) {
- this.carNumSurplusHuodai = this.carNum - total;
+ if (Number(this.carNum) >= total) {
+ this.carNumSurplusHuodai = Number(this.carNum) - total;
this.whetherClick = false;
this.whetherClick1 = false;
} else {
@@ -379,20 +364,31 @@
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(() => {
that.calculate(that.jhOrderPlanForwardList);
+ if (that.roleType == 1) {
+ if (that.jhOrderPlanForwardList[index].carNum < Number(that.carNumSurplus1)) {
+ that.$set(that.jhOrderPlanForwardList[index], 'checkboxValue1', '');
+ that.jhOrderPlanForwardList.forEach((v, i) => {
+ if (index != i) {
+ v.ischecked = false;
+ }
+ });
+ }
+ }
+
+ if (that.roleType == 2) {
+ if (that.jhOrderPlanForwardList[index].carNum < Number(that.carNumSurplusHuodai)) {
+ that.$set(that.jhOrderPlanForwardList[index], 'checkboxValue1', '');
+ that.jhOrderPlanForwardList.forEach((v, i) => {
+ if (index != i) {
+ v.ischecked = false;
+ }
+ });
+ }
+ }
time = null;
}, 800);
}
@@ -415,7 +411,8 @@
fleetId: 0,
checkboxValue1: '',
ischecked: false,
- vid: new Date().getTime()
+ vid: new Date().getTime(),
+ isSelected: false
});
} else {
this.jhOrderPlanForwardList.push({
@@ -426,7 +423,8 @@
fleetId: 0,
checkboxValue1: '',
ischecked: true,
- vid: new Date().getTime()
+ vid: new Date().getTime(),
+ isSelected: false
});
}
this.calculate(this.jhOrderPlanForwardList);
@@ -462,13 +460,7 @@
this.$u.toast('璇疯緭鍏ュ悎娉曟暟瀛�');
isPass = false;
return isPass;
- }
- // else if (Number(v.carNum) > Number(this.forwardSurplus)) {
- // this.$u.toast('瓒呰繃鏈�澶ц鍗曞墿浣欓噺');
- // isPass = false;
- // return isPass;
- // }
- else {
+ } else {
isPass = true;
return isPass;
}
diff --git a/pages/public-page/mapRoute/mapRoute.vue b/pages/public-page/mapRoute/mapRoute.vue
index 5671a6b..996618c 100644
--- a/pages/public-page/mapRoute/mapRoute.vue
+++ b/pages/public-page/mapRoute/mapRoute.vue
@@ -1,17 +1,16 @@
<template>
<view>
- <view class="page-body" style="margin-top: 4rpx;">
+ <view class="page-body"
+ style="margin-top: 4rpx;">
<view class="page-section page-section-gap">
- <map
- style="width: 100%; height: 600px;"
+ <map style="width: 100%; height: 600px;"
:latitude="latitude"
:longitude="longitude"
:markers="markers"
:polyline="polyline"
@markertap="awaken"
@callouttap="awaken"
- @tap="awaken"
- ></map>
+ @tap="awaken"></map>
</view>
</view>
<view class="tip">
@@ -24,253 +23,269 @@
<text>{{ duration || '' }}</text>
</view>
</view>
- <view class="open-button" @click="awaken"><u-button type="primary">浣跨敤鎵嬫満鍦板浘</u-button></view>
+ <view class="open-button"
+ @click="awaken"><u-button type="primary">浣跨敤鎵嬫満鍦板浘</u-button></view>
</view>
</template>
<script>
-export default {
- data() {
- return {
- latitude: 38.04606544104117,
- longitude: 114.48735479816793,
- customerId: '',
- filedId: '',
- orderType: '',
- toFiledId: '',
- // 璧风偣缁忕含搴�
- originlongitude: 39.909,
- originlatitude: 116.39742,
- // 缁堢偣
- finishlongitude: null,
- finishlatitude: null,
- markers: [
- {
- latitude: null,
- longitude: null,
- iconPath: 'https://mx.jzeg.cn:9095/appimg/image/banner/location.png',
- width: 23,
- height: 33,
- id: 0,
- callout: {
- content: '璧风偣', //鏂囨湰
- color: '#ffffff', //鏂囧瓧棰滆壊
- fontSize: 10, //鏂囨湰澶у皬
- borderRadius: 12, //杈规鍦嗚
- borderWidth: '10',
- bgColor: '#08b078', //鑳屾櫙棰滆壊
- display: 'ALWAYS' //甯告樉
+ export default {
+ data() {
+ return {
+ latitude: 38.04606544104117,
+ longitude: 114.48735479816793,
+ customerId: '',
+ filedId: '',
+ orderType: '',
+ toFiledId: '',
+ // 璧风偣缁忕含搴�
+ originlongitude: 39.909,
+ originlatitude: 116.39742,
+ // 缁堢偣
+ finishlongitude: null,
+ finishlatitude: null,
+ markers: [{
+ latitude: null,
+ longitude: null,
+ iconPath: 'https://mx.jzeg.cn:9095/appimg/image/banner/location.png',
+ width: 23,
+ height: 33,
+ id: 0,
+ callout: {
+ content: '璧风偣', //鏂囨湰
+ color: '#ffffff', //鏂囧瓧棰滆壊
+ fontSize: 10, //鏂囨湰澶у皬
+ borderRadius: 12, //杈规鍦嗚
+ borderWidth: '10',
+ bgColor: '#08b078', //鑳屾櫙棰滆壊
+ display: 'ALWAYS' //甯告樉
+ }
+ },
+ {
+ latitude: null,
+ longitude: null,
+ iconPath: 'https://mx.jzeg.cn:9095/appimg/image/banner/location.png',
+ width: 23,
+ height: 33,
+ id: 1,
+ callout: {
+ content: '缁堢偣', //鏂囨湰
+ color: '#ffffff', //鏂囧瓧棰滆壊
+ fontSize: 10, //鏂囨湰澶у皬
+ borderRadius: 12, //杈规鍦嗚
+ borderWidth: '10',
+ bgColor: '#fc645c', //鑳屾櫙棰滆壊
+ display: 'ALWAYS' //甯告樉
+ }
}
- },
- {
- latitude: null,
- longitude: null,
- iconPath: 'https://mx.jzeg.cn:9095/appimg/image/banner/location.png',
- width: 23,
- height: 33,
- id: 1,
- callout: {
- content: '缁堢偣', //鏂囨湰
- color: '#ffffff', //鏂囧瓧棰滆壊
- fontSize: 10, //鏂囨湰澶у皬
- borderRadius: 12, //杈规鍦嗚
- borderWidth: '10',
- bgColor: '#fc645c', //鑳屾櫙棰滆壊
- display: 'ALWAYS' //甯告樉
- }
- }
- ],
- polyline: [
- {
+ ],
+ polyline: [{
// 姣忎釜鐐圭殑缁忕含搴�
- points: [{ latitude: 38.04606544104117, longitude: 114.48735479816793 }, { latitude: 38.049531, longitude: 114.53521899999998 }],
+ points: [{ latitude: 38.04606544104117, longitude: 114.48735479816793 }, {
+ latitude: 38.049531,
+ longitude: 114.53521899999998
+ }],
// 棰滆壊
color: '#0091ff',
// 瀹藉害
width: 10
- }
- ],
- distance: null,
- duration: null,
- fromLocation: {},
- toLocation: {}
- };
- },
- methods: {
- getLocation() {
- uni.showLoading({
- title: '鍔犺浇涓��'
- });
- let QQMapWX = require('../../../utils/qqmap-wx-jssdk.js');
- let qqmapsdk = new QQMapWX({
- key: 'HTNBZ-LZGRQ-YDB5S-B4KAS-KLHJH-GHBUE' // 蹇呭~
- });
- const params = this.toFiledId ? { filedId: this.filedId, toFiledId: this.toFiledId } : { customerId: this.customerId, filedId: this.filedId };
- this.$reqGet('getAppLocation', params).then(result => {
- console.log(result, '鑵捐缁忕含搴�');
- let _this = this;
- console.log(_this.orderType, '绫诲瀷');
- let fromLocation;
- let toLocation;
- if (_this.orderType == '澶栬喘' || _this.orderType == '澶栭攢') {
- fromLocation = {
- longitude: result.data.customerLongitude,
- latitude: result.data.customerLatitude
- };
- toLocation = {
- longitude: result.data.filedLongitude,
- latitude: result.data.filedLatitude
- };
- } else if (_this.orderType == '鍐呰喘' || _this.orderType == '鍐呴攢') {
- fromLocation = {
- longitude: result.data.filedLongitude,
- latitude: result.data.filedLatitude
- };
- toLocation = {
- longitude: result.data.customerLongitude,
- latitude: result.data.customerLatitude
- };
- } else {
- fromLocation = {
- longitude: result.data.filedLongitude,
- latitude: result.data.filedLatitude
- };
- toLocation = {
- longitude: result.data.toFiledLongitude,
- latitude: result.data.toFiledLatitude
- };
+ }],
+ distance: null,
+ duration: null,
+ fromLocation: {},
+ toLocation: {}
+ };
+ },
+ methods: {
+ getLocation() {
+ uni.showLoading({
+ title: '鍔犺浇涓��'
+ });
+ let QQMapWX = require('../../../utils/qqmap-wx-jssdk.js');
+ let qqmapsdk = new QQMapWX({
+ key: 'HTNBZ-LZGRQ-YDB5S-B4KAS-KLHJH-GHBUE' // 蹇呭~
+ });
+ const params = this.toFiledId ? { filedId: this.filedId, toFiledId: this.toFiledId } : {
+ customerId: this
+ .customerId,
+ filedId: this.filedId
+ };
+ this.$reqGet('getAppLocation', params).then(result => {
+ console.log(result, '鑵捐缁忕含搴�');
+ let _this = this;
+ console.log(_this.orderType, '绫诲瀷');
+ let fromLocation;
+ let toLocation;
+ if (_this.orderType == '澶栬喘' || _this.orderType == '澶栭攢') {
+ fromLocation = {
+ longitude: result.data.customerLongitude,
+ latitude: result.data.customerLatitude
+ };
+ toLocation = {
+ longitude: result.data.filedLongitude,
+ latitude: result.data.filedLatitude
+ };
+ }
+ // else if (_this.orderType == '鍐呰喘' || _this.orderType == '鍐呴攢') {
+ // fromLocation = {
+ // longitude: result.data.filedLongitude,
+ // latitude: result.data.filedLatitude
+ // };
+ // toLocation = {
+ // longitude: result.data.customerLongitude,
+ // latitude: result.data.customerLatitude
+ // };
+ // }
+ else {
+ fromLocation = {
+ longitude: result.data.filedLongitude,
+ latitude: result.data.filedLatitude
+ };
+ toLocation = {
+ longitude: result.data.toFiledLongitude,
+ latitude: result.data.toFiledLatitude
+ };
+ // _this.fromLocation = fromLocation;
+ // _this.toLocation = toLocation;
+ }
+ console.log(fromLocation, toLocation);
_this.fromLocation = fromLocation;
_this.toLocation = toLocation;
- }
- _this.fromLocation = fromLocation;
- _this.toLocation = toLocation;
- //璋冪敤璺濈璁$畻鎺ュ彛
- qqmapsdk.direction({
- mode: 'driving',
- //from鍙傛暟涓嶅~榛樿褰撳墠鍦板潃
- from: fromLocation,
- to: toLocation,
- success: function(res) {
- console.log(res);
- let ret = res;
- let coors = ret.result.routes[0].polyline,
- pl = [];
- //鍧愭爣瑙e帇锛堣繑鍥炵殑鐐逛覆鍧愭爣锛岄�氳繃鍓嶅悜宸垎杩涜鍘嬬缉锛�
- let kr = 1000000;
- for (let i = 2; i < coors.length; i++) {
- coors[i] = Number(coors[i - 2]) + Number(coors[i]) / kr;
- }
- //灏嗚В鍘嬪悗鐨勫潗鏍囨斁鍏ョ偣涓叉暟缁刾l涓�
- for (let i = 0; i < coors.length; i += 2) {
- pl.push({ latitude: coors[i], longitude: coors[i + 1] });
- }
- console.log(pl);
- //璁剧疆polyline灞炴�э紝灏嗚矾绾挎樉绀哄嚭鏉�,灏嗚В鍘嬪潗鏍囩涓�涓暟鎹綔涓鸿捣鐐�
- _this.longitude = pl[0].longitude;
- _this.latitude = pl[0].latitude;
- _this.polyline = [
- {
+ //璋冪敤璺濈璁$畻鎺ュ彛
+ qqmapsdk.direction({
+ mode: 'driving',
+ //from鍙傛暟涓嶅~榛樿褰撳墠鍦板潃
+ from: fromLocation,
+ to: toLocation,
+ success: function(res) {
+ console.log(res);
+ let ret = res;
+ let coors = ret.result.routes[0].polyline,
+ pl = [];
+ //鍧愭爣瑙e帇锛堣繑鍥炵殑鐐逛覆鍧愭爣锛岄�氳繃鍓嶅悜宸垎杩涜鍘嬬缉锛�
+ let kr = 1000000;
+ for (let i = 2; i < coors.length; i++) {
+ coors[i] = Number(coors[i - 2]) + Number(coors[i]) / kr;
+ }
+ //灏嗚В鍘嬪悗鐨勫潗鏍囨斁鍏ョ偣涓叉暟缁刾l涓�
+ for (let i = 0; i < coors.length; i += 2) {
+ pl.push({ latitude: coors[i], longitude: coors[i + 1] });
+ }
+ console.log(pl);
+ //璁剧疆polyline灞炴�э紝灏嗚矾绾挎樉绀哄嚭鏉�,灏嗚В鍘嬪潗鏍囩涓�涓暟鎹綔涓鸿捣鐐�
+ _this.longitude = pl[0].longitude;
+ _this.latitude = pl[0].latitude;
+ _this.polyline = [{
points: pl,
color: '#04b474',
width: 4,
arrowLine: true
+ }];
+ if (_this.orderType == '澶栬喘' || _this.orderType == '澶栭攢') {
+ _this.$set(_this.markers[0], 'longitude', result.data
+ .customerLongitude);
+ _this.$set(_this.markers[0], 'latitude', result.data.customerLatitude);
+ _this.$set(_this.markers[1], 'longitude', result.data.filedLongitude);
+ _this.$set(_this.markers[1], 'latitude', result.data.filedLatitude);
}
- ];
- if (_this.orderType == '澶栬喘' || _this.orderType == '澶栭攢') {
- _this.$set(_this.markers[0], 'longitude', result.data.customerLongitude);
- _this.$set(_this.markers[0], 'latitude', result.data.customerLatitude);
- _this.$set(_this.markers[1], 'longitude', result.data.filedLongitude);
- _this.$set(_this.markers[1], 'latitude', result.data.filedLatitude);
- } else if (_this.orderType == '鍐呰喘' || _this.orderType == '鍐呴攢') {
- _this.$set(_this.markers[0], 'longitude', result.data.filedLongitude);
- _this.$set(_this.markers[0], 'latitude', result.data.filedLatitude);
- _this.$set(_this.markers[1], 'longitude', result.data.customerLongitude);
- _this.$set(_this.markers[1], 'latitude', result.data.customerLatitude);
- } else {
- _this.$set(_this.markers[0], 'longitude', result.data.filedLongitude);
- _this.$set(_this.markers[0], 'latitude', result.data.filedLatitude);
- _this.$set(_this.markers[1], 'longitude', result.data.toFiledLongitude);
- _this.$set(_this.markers[1], 'latitude', result.data.toFiledLatitude);
+ // else if (_this.orderType == '鍐呰喘' || _this.orderType == '鍐呴攢') {
+ // _this.$set(_this.markers[0], 'longitude', result.data.filedLongitude);
+ // _this.$set(_this.markers[0], 'latitude', result.data.filedLatitude);
+ // _this.$set(_this.markers[1], 'longitude', result.data
+ // .customerLongitude);
+ // _this.$set(_this.markers[1], 'latitude', result.data.customerLatitude);
+ // }
+ else {
+ _this.$set(_this.markers[0], 'longitude', result.data.filedLongitude);
+ _this.$set(_this.markers[0], 'latitude', result.data.filedLatitude);
+ _this.$set(_this.markers[1], 'longitude', result.data
+ .toFiledLongitude);
+ _this.$set(_this.markers[1], 'latitude', result.data.toFiledLatitude);
+ }
+ },
+ fail: function(error) {
+ console.error(error);
+ },
+ complete: function(res) {
+ console.log(res);
+ uni.hideLoading();
+ _this.distance = res.result.routes[0].distance;
+ _this.distance = (_this.distance / 1000).toFixed(2);
+ _this.duration = _this.handleTime(res.result.routes[0].duration);
}
- },
- fail: function(error) {
- console.error(error);
- },
- complete: function(res) {
- console.log(res);
- uni.hideLoading();
- _this.distance = res.result.routes[0].distance;
- _this.distance = (_this.distance / 1000).toFixed(2);
- _this.duration = _this.handleTime(res.result.routes[0].duration);
- }
+ });
});
- });
+ },
+ //
+ handleTime(time) {
+ let now = new Date(); // 鑾峰彇褰撳墠鏃堕棿
+ now.setMinutes(now.getMinutes() + time);
+ let hours = now
+ .getHours()
+ .toString()
+ .padStart(2, '0');
+ let minutes = now
+ .getMinutes()
+ .toString()
+ .padStart(2, '0');
+ return hours + ':' + minutes;
+ },
+ // 鍞ら啋
+ awaken() {
+ uni.openLocation({
+ latitude: this.markers[1].latitude,
+ longitude: this.markers[1].longitude,
+ name: '鐩殑鍦�',
+ address: '鐩殑鍦�'
+ });
+ }
},
- //
- handleTime(time) {
- let now = new Date(); // 鑾峰彇褰撳墠鏃堕棿
- now.setMinutes(now.getMinutes() + time);
- let hours = now
- .getHours()
- .toString()
- .padStart(2, '0');
- let minutes = now
- .getMinutes()
- .toString()
- .padStart(2, '0');
- return hours + ':' + minutes;
+ onLoad(params) {
+ this.customerId = params.customerId;
+ this.filedId = params.filedId;
+ this.orderType = params.orderType;
+ if (params.toFiledId) {
+ this.toFiledId = params.toFiledId;
+ }
},
- // 鍞ら啋
- awaken() {
- uni.openLocation({
- latitude: this.markers[1].latitude,
- longitude: this.markers[1].longitude,
- name: '鐩殑鍦颁綅缃�',
- address: '鐩殑鍦颁綅缃�'
- });
+ onShow() {
+ this.getLocation();
+ // this.awaken();
}
- },
- onLoad(params) {
- this.customerId = params.customerId;
- this.filedId = params.filedId;
- this.orderType = params.orderType;
- if (params.toFiledId) {
- this.toFiledId = params.toFiledId;
- }
- },
- onShow() {
- this.getLocation();
- // this.awaken();
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-.tip {
- width: 94%;
- font-size: 40rpx;
- margin: vww(22) auto;
- display: flex;
- justify-content: space-around;
- .first {
- color: #515151;
- text {
- font-size: 45rpx;
- color: #f81414;
+<style lang="scss"
+ scoped>
+ .tip {
+ width: 94%;
+ font-size: 40rpx;
+ margin: vww(22) auto;
+ display: flex;
+ justify-content: space-around;
+
+ .first {
+ color: #515151;
+
+ text {
+ font-size: 45rpx;
+ color: #f81414;
+ }
}
}
-}
-.open-button {
- width: 100%;
- margin: 40rpx 0;
- display: flex;
- justify-content: center;
- /deep/.u-button {
- width: 300rpx;
- border: 1px solid #3b56eb;
- border-radius: 37rpx 37rpx 37rpx 37rpx;
- background-color: transparent;
- color: #3b56eb;
+
+ .open-button {
+ width: 100%;
+ margin: 40rpx 0;
+ display: flex;
+ justify-content: center;
+
+ /deep/.u-button {
+ width: 300rpx;
+ border: 1px solid #3b56eb;
+ border-radius: 37rpx 37rpx 37rpx 37rpx;
+ background-color: transparent;
+ color: #3b56eb;
+ }
}
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/tabbar-page/index-tabbar/index-tabbar.vue b/pages/tabbar-page/index-tabbar/index-tabbar.vue
index 31aa244..78d1d35 100644
--- a/pages/tabbar-page/index-tabbar/index-tabbar.vue
+++ b/pages/tabbar-page/index-tabbar/index-tabbar.vue
@@ -2,256 +2,147 @@
<view class="max-block">
<view class="search-bar">
<view class="icon-body">
- <view class="icon-box" @click="messagePage">
- <u-badge :isDot="true" type="error" v-if="dotShow"></u-badge>
- <u-icon name="chat" color="#fff" size="50"></u-icon>
+ <view class="icon-box"
+ @click="messagePage">
+ <u-badge :isDot="true"
+ type="error"
+ v-if="dotShow"></u-badge>
+ <u-icon name="chat"
+ color="#fff"
+ size="50"></u-icon>
</view>
</view>
</view>
- <customer-index v-if="roleType == 1" ref="customerIndexRef" :orderPlanDataStore="orderPlanDataStore"></customer-index>
- <freight-forwarder-index
- v-if="roleType == 2"
+ <customer-index v-if="roleType == 1"
+ ref="customerIndexRef"
+ :orderPlanDataStore="orderPlanDataStore"></customer-index>
+ <freight-forwarder-index v-if="roleType == 2"
ref="freightForwarderIndexRef"
:indexHistoryCoalData="indexHistoryCoalData"
- :indexHuoDaiOrderPlanData="indexHuoDaiOrderPlanData"
- ></freight-forwarder-index>
- <driver-index v-if="roleType == 3" ref="driverIndexRef" :indexdriverBillOfLoadingData="indexdriverBillOfLoadingData"></driver-index>
+ :indexHuoDaiOrderPlanData="indexHuoDaiOrderPlanData"></freight-forwarder-index>
+ <driver-index v-if="roleType == 3"
+ ref="driverIndexRef"
+ :indexdriverBillOfLoadingData="indexdriverBillOfLoadingData"></driver-index>
<tab-bar :current="0"></tab-bar>
<!-- 鎺ㄩ�佹秷鎭脊绐� -->
- <u-modal :show="messagePushShow" :title="messageList.title" @confirm="messageconfirm" confirm-text="鍓嶅幓鏌ョ湅">
+ <u-modal :show="messagePushShow"
+ :title="messageList.title"
+ @confirm="messageconfirm"
+ confirm-text="鍓嶅幓鏌ョ湅">
<view class="slot-content"><rich-text :nodes="messageList.content"></rich-text></view>
</u-modal>
- <view class="white-block"></view>
+ <!-- <view class="white-block"></view> -->
</view>
</template>
<script>
-import customerIndex from '@/pages/customer-page/customer-index/customer-index.vue';
-import driverIndex from '@/pages/driver-page/driver-index/driver-index.vue';
-import freightForwarderIndex from '@/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue';
-import { mapState, mapMutations } from 'vuex';
-import { webSocketUrl } from '@/api/request.js';
+ import customerIndex from '@/pages/customer-page/customer-index/customer-index.vue';
+ import driverIndex from '@/pages/driver-page/driver-index/driver-index.vue';
+ import freightForwarderIndex from '@/pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue';
+ import { mapState, mapMutations } from 'vuex';
+ import { webSocketUrl } from '@/api/request.js';
-let socket = null;
-export default {
- components: {
- customerIndex,
- driverIndex,
- freightForwarderIndex
- },
- computed: {
- ...mapState(['globalweighHouseCode', 'globalweigh', 'globalisconnect'])
- },
- watch: {
- globalisconnect(v, oldv) {}
- },
- //棣栭〉涓嬫媺鍒锋柊
- onPullDownRefresh() {
- uni.showLoading({ title: '鍔犺浇涓�...' });
- // 鑾峰彇鍘嗗彶鎻愮叅鍗�
- if (this.roleType == 1 || this.roleType == 2) {
- this.$reqGet('getJhOrderPlanDataPage', { current: 1, size: 10 }).then(res => {
- if (res.data.records) {
- this.indexHistoryCoalData = res.data.records;
- uni.hideLoading();
- uni.stopPullDownRefresh();
- } else {
- this.$u.toast('鍔犺浇澶辫触');
- }
- });
- }
- // 瀹㈡埛鑾峰彇鏃ヨ鍒�
- if (this.roleType == 1) {
- this.$reqGet('GetOrderPlan').then(res => {
- if (res.data) {
- this.orderPlanDataStore = res.data;
- this.$u.toast('鍔犺浇鎴愬姛');
- uni.hideLoading();
- uni.stopPullDownRefresh();
- } else {
- this.$u.toast('鍔犺浇澶辫触');
- }
- });
- } else if (this.roleType == 2) {
- this.$reqGet('huoDaiList').then(res => {
- if (res.data) {
- this.indexHuoDaiOrderPlanData = res.data;
- this.$u.toast('鍔犺浇鎴愬姛');
- uni.hideLoading();
- uni.stopPullDownRefresh();
- } else {
- this.$u.toast('鍔犺浇澶辫触');
- }
- });
- } else if (this.roleType == 3) {
- this.$reqGet('qiangDanList').then(res => {
- if (res.code == 0) {
- this.indexdriverBillOfLoadingData = res.data;
- this.$u.toast('鍔犺浇鎴愬姛');
- uni.hideLoading();
- uni.stopPullDownRefresh();
- } else {
- this.$u.toast('鍔犺浇澶辫触');
- uni.hideLoading();
- uni.stopPullDownRefresh();
- }
- });
- }
- },
- onLoad() {
- // 寮�鍚弻浜洪�氳瘽
- wx.setEnable1v1Chat({
- enable: true,
- backgroundType: 1,
- minWindowType: 2,
- success() {
- console.log('寮�鍚弻浜洪�氳瘽鎴愬姛');
- },
- fail() {
- console.log('寮�鍚弻浜洪�氳瘽澶辫触');
- },
- complete() {
- console.log('寮�鍚弻浜洪�氳瘽鎴愬姛Complete');
- }
- });
- },
- data() {
- return {
- roleType: null,
- orderPlanDataStore: [],
- indexHuoDaiOrderPlanData: [],
- indexHistoryCoalData: [],
- indexdriverBillOfLoadingData: {},
- messagePushShow: false,
- messageList: {},
- isconnect: false,
- dotShow: false
- };
- },
- onShow() {
- this.init();
- if (!this.globalisconnect || !this.isconnect) {
- this.initWebsocket();
- }
- this.userAuthorization();
- this.messageReq();
- },
- onHide() {
- console.log('椤甸潰闅愯棌');
- // this.isconnect = false;
- // this.changeisconnect(false);
- // socket.close();
- if (!this.globalisconnect || !this.isconnect) {
- this.initWebsocket();
- }
- },
- onUnload() {
- console.log('椤甸潰鍗歌浇');
- socket.close();
- clearInterval(this.intervalId);
- },
- methods: {
- ...mapMutations(['pushMessage', 'changeWeigh', 'changeinfraredStatus', 'changeisconnect']),
- messagePage() {
- uni.navigateTo({
- url: '/pages/public-page/message/message'
- });
+ let socket = null;
+ export default {
+ components: {
+ customerIndex,
+ driverIndex,
+ freightForwarderIndex
},
- init() {
- this.roleType = uni.getStorageSync('roleType');
- switch (this.roleType) {
- case 1:
- console.log('customerIndexRef');
- this.$nextTick(() => {
- this.$refs.customerIndexRef.init();
- });
- break;
- case 2:
- console.log('freightForwarderIndexRef');
- this.$nextTick(() => {
- this.$refs.freightForwarderIndexRef.init();
- });
- break;
- case 3:
- console.log('driverIndexRef');
- this.$nextTick(() => {
- this.$refs.driverIndexRef.init();
- });
- break;
- default:
- break;
- }
+ computed: {
+ ...mapState(['globalweighHouseCode', 'globalweigh', 'globalisconnect', 'globalSocket', 'websocketData',
+ 'globalIntervalId'
+ ])
},
- // 瑕佹眰鐢ㄦ埛鎺堟潈鐩告満/楹﹀厠椋庢潈闄�
- userAuthorization() {
- wx.getSetting({
- success(res) {
- // wx.startRecord();
- console.log('success');
- if (!res.authSetting['scope.record'] || !res.authSetting['scope.camera']) {
- if (!res.authSetting['scope.camera']) {
- wx.authorize({
- scope: 'scope.camera',
- success() {
- // 鐢ㄦ埛宸茬粡鍚屾剰灏忕▼搴忎娇鐢ㄥ綍闊冲姛鑳斤紝鍚庣画璋冪敤 wx.startRecord 鎺ュ彛涓嶄細寮圭獥璇㈤棶
- console.log('鎺堟潈鎴愬姛');
- },
- fail() {
- console.log('鎺堟潈澶辫触');
- }
- });
- } else if (!res.authSetting['scope.record']) {
- wx.authorize({
- scope: 'scope.record',
- success() {
- // 鐢ㄦ埛宸茬粡鍚屾剰灏忕▼搴忎娇鐢ㄥ綍闊冲姛鑳斤紝鍚庣画璋冪敤 wx.startRecord 鎺ュ彛涓嶄細寮圭獥璇㈤棶
- console.log('鎺堟潈鎴愬姛');
- },
- fail: () => {
- console.log('鎺堟潈澶辫触');
- }
- });
- }
+ //棣栭〉涓嬫媺鍒锋柊
+ onPullDownRefresh() {
+ uni.showLoading({ title: '鍔犺浇涓�...' });
+ // 鑾峰彇鍘嗗彶鎻愮叅鍗�
+ if (this.roleType == 1 || this.roleType == 2) {
+ this.$reqGet('getJhOrderPlanDataPage', { current: 1, size: 10 }).then(res => {
+ if (res.data.records) {
+ this.indexHistoryCoalData = res.data.records;
+ uni.hideLoading();
+ uni.stopPullDownRefresh();
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
}
+ });
+ }
+ // 瀹㈡埛鑾峰彇鏃ヨ鍒�
+ if (this.roleType == 1) {
+ this.$reqGet('GetOrderPlan').then(res => {
+ if (res.data) {
+ this.orderPlanDataStore = res.data;
+ this.$u.toast('鍔犺浇鎴愬姛');
+ uni.hideLoading();
+ uni.stopPullDownRefresh();
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
+ }
+ });
+ } else if (this.roleType == 2) {
+ this.$reqGet('huoDaiList').then(res => {
+ if (res.data) {
+ this.indexHuoDaiOrderPlanData = res.data;
+ this.$u.toast('鍔犺浇鎴愬姛');
+ uni.hideLoading();
+ uni.stopPullDownRefresh();
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
+ }
+ });
+ } else if (this.roleType == 3) {
+ this.$reqGet('qiangDanList').then(res => {
+ if (res.code == 0) {
+ this.indexdriverBillOfLoadingData = res.data;
+ this.$u.toast('鍔犺浇鎴愬姛');
+ uni.hideLoading();
+ uni.stopPullDownRefresh();
+ } else {
+ this.$u.toast('鍔犺浇澶辫触');
+ uni.hideLoading();
+ uni.stopPullDownRefresh();
+ }
+ });
+ }
+ },
+ onLoad() {
+ // 寮�鍚弻浜洪�氳瘽
+ wx.setEnable1v1Chat({
+ enable: true,
+ backgroundType: 1,
+ minWindowType: 2,
+ success() {
+ console.log('寮�鍚弻浜洪�氳瘽鎴愬姛');
},
fail() {
- console.log('鑾峰彇澶辫触');
+ console.log('寮�鍚弻浜洪�氳瘽澶辫触');
+ },
+ complete() {
+ console.log('寮�鍚弻浜洪�氳瘽鎴愬姛Complete');
}
});
},
- // 鍒濆鍖杦ebsocket
- initWebsocket() {
- let wsUrl = `${webSocketUrl}?access_token=${uni.getStorageSync('token')}`;
- socket = uni.connectSocket({
- url: wsUrl,
- header: {
- CLIENT_TOC: 'Y'
- },
- complete: res => {
- console.log(res, 'socket缁撴灉');
- if (res.errMsg == 'connectSocket:ok') {
- this.changeisconnect(true);
- this.isconnect = true;
- }
- }
- });
- socket.onOpen(() => {
- console.log('onOpen');
- this.intervalId = setInterval(() => {
- socket.send({
- data: JSON.stringify({ type: 'ping' }),
- success(e) {
- console.log(e, '鍙戦�佸績璺虫垚鍔�');
- }
- });
- }, 30000);
- });
-
- // 鑾峰彇鏈嶅姟鍣ㄤ紶鏉ョ殑鏁版嵁锛屽仛鐩稿簲澶勭悊
- socket.onMessage(res => {
- console.log('message', res);
- if (res.data.startsWith('weigh')) {
- let nowWeighObj = JSON.parse(res.data.slice(7));
+ data() {
+ return {
+ roleType: null,
+ orderPlanDataStore: [],
+ indexHuoDaiOrderPlanData: [],
+ indexHistoryCoalData: [],
+ indexdriverBillOfLoadingData: {},
+ messagePushShow: false,
+ messageList: {},
+ isconnect: false,
+ dotShow: false,
+ appHide: false
+ };
+ },
+ watch: {
+ '$store.state.websocketData'(v) {
+ console.log(v, '鎺ュ彈鐨剋s鏁版嵁');
+ if (v.startsWith('weigh')) {
+ let nowWeighObj = JSON.parse(v.slice(7));
if (this.globalweighHouseCode && nowWeighObj.eqCode == this.globalweighHouseCode) {
if (nowWeighObj.eqInfraredStatus) {
this.changeinfraredStatus(true);
@@ -261,80 +152,214 @@
this.changeWeigh(nowWeighObj.weigh);
}
}
- } else if (res.data.startsWith('msg')) {
- this.messageList = JSON.parse(res.data.slice(5));
+ } else if (v.startsWith('msg')) {
+ this.messageList = JSON.parse(v.slice(5));
this.messagePushShow = true;
- } else {
+ } else {}
+ }
+ },
+ onShow() {
+ this.init();
+ if (!this.globalisconnect) {
+ this.$store.dispatch('websocketInit')
+ }
+ this.userAuthorization();
+ this.messageReq();
+ },
+ onHide() {
+ console.log('椤甸潰闅愯棌')
+ },
+ onUnload() {
+ console.log('椤甸潰鍗歌浇');
+ this.$store.dispatch('websocketOnClose')
+ clearInterval(this.globalIntervalId);
+ },
+ methods: {
+ ...mapMutations(['pushMessage', 'changeWeigh', 'changeinfraredStatus', 'changeisconnect', 'websocketInit']),
+ messagePage() {
+ uni.navigateTo({
+ url: '/pages/public-page/message/message'
+ });
+ },
+ init() {
+ this.roleType = uni.getStorageSync('roleType');
+ switch (this.roleType) {
+ case 1:
+ console.log('customerIndexRef');
+ this.$nextTick(() => {
+ this.$refs.customerIndexRef.init();
+ });
+ break;
+ case 2:
+ console.log('freightForwarderIndexRef');
+ this.$nextTick(() => {
+ this.$refs.freightForwarderIndexRef.init();
+ });
+ break;
+ case 3:
+ console.log('driverIndexRef');
+ this.$nextTick(() => {
+ this.$refs.driverIndexRef.init();
+ });
+ break;
+ default:
+ break;
}
- });
- socket.onClose(e => {
- console.log('webSocketClose', e);
- this.isconnect = false;
- });
- socket.onError(err => {
- console.log('socket鎶ラ敊', err);
- this.$u.toast('鍑虹幇閿欒锛岃閲嶆柊杩涘叆璇ラ〉闈紝閲嶈瘯锛侊紒');
- });
- },
- messageconfirm() {
- this.messagePushShow = false;
- uni.navigateTo({
- url: '/pages/public-page/message/message'
- });
- },
- messageReq() {
- this.$reqGet('getMessageByUser', { current: 1, size: 10 }).then(res => {
- if (res.code == 0) {
- this.messageList = res.data.records;
- this.messageList.forEach(v => {
- if (v.status !== 1) {
- this.dotShow = true;
- } else {
- this.dotShow = false;
+ },
+ // 瑕佹眰鐢ㄦ埛鎺堟潈鐩告満/楹﹀厠椋庢潈闄�
+ userAuthorization() {
+ wx.getSetting({
+ success(res) {
+ // wx.startRecord();
+ console.log('鎺堟潈鐩告満/楹﹀厠椋庢潈闄恠uccess');
+ if (!res.authSetting['scope.record'] || !res.authSetting['scope.camera']) {
+ if (!res.authSetting['scope.camera']) {
+ wx.authorize({
+ scope: 'scope.camera',
+ success() {
+ // 鐢ㄦ埛宸茬粡鍚屾剰灏忕▼搴忎娇鐢ㄥ綍闊冲姛鑳斤紝鍚庣画璋冪敤 wx.startRecord 鎺ュ彛涓嶄細寮圭獥璇㈤棶
+ console.log('鎺堟潈鎴愬姛');
+ },
+ fail() {
+ console.log('鎺堟潈澶辫触');
+ }
+ });
+ } else if (!res.authSetting['scope.record']) {
+ wx.authorize({
+ scope: 'scope.record',
+ success() {
+ // 鐢ㄦ埛宸茬粡鍚屾剰灏忕▼搴忎娇鐢ㄥ綍闊冲姛鑳斤紝鍚庣画璋冪敤 wx.startRecord 鎺ュ彛涓嶄細寮圭獥璇㈤棶
+ console.log('鎺堟潈鎴愬姛');
+ },
+ fail: () => {
+ console.log('鎺堟潈澶辫触');
+ }
+ });
+ }
}
- });
- }
- });
+ },
+ fail() {
+ console.log('鑾峰彇澶辫触');
+ }
+ });
+ },
+ // 鍒濆鍖杦ebsocket
+ initWebsocket() {
+ let wsUrl = `${webSocketUrl}?access_token=${uni.getStorageSync('token')}`;
+ socket = uni.connectSocket({
+ url: wsUrl,
+ header: {
+ CLIENT_TOC: 'Y'
+ },
+ complete: res => {
+ console.log(res, 'socket缁撴灉');
+ if (res.errMsg == 'connectSocket:ok') {
+ this.changeisconnect(true);
+ this.isconnect = true;
+ }
+ }
+ });
+ socket.onOpen(() => {
+ console.log('onOpen');
+ this.intervalId = setInterval(() => {
+ socket.send({
+ data: JSON.stringify({ type: 'ping' }),
+ success(e) {
+ console.log(e, '鍙戦�佸績璺虫垚鍔�');
+ }
+ });
+ }, 30000);
+ });
+
+ // 鑾峰彇鏈嶅姟鍣ㄤ紶鏉ョ殑鏁版嵁锛屽仛鐩稿簲澶勭悊
+ socket.onMessage(res => {
+ console.log('message', res);
+ if (res.data.startsWith('weigh')) {
+ let nowWeighObj = JSON.parse(res.data.slice(7));
+ if (this.globalweighHouseCode && nowWeighObj.eqCode == this.globalweighHouseCode) {
+ if (nowWeighObj.eqInfraredStatus) {
+ this.changeinfraredStatus(true);
+ this.changeWeigh(nowWeighObj.weigh);
+ } else {
+ this.changeinfraredStatus(false);
+ this.changeWeigh(nowWeighObj.weigh);
+ }
+ }
+ } else if (res.data.startsWith('msg')) {
+ this.messageList = JSON.parse(res.data.slice(5));
+ this.messagePushShow = true;
+ } else {}
+ });
+ socket.onClose(e => {
+ console.log('webSocketClose', e);
+ this.isconnect = false;
+ this.changeisconnect(false);
+ });
+ socket.onError(err => {
+ console.log('socket鎶ラ敊', err);
+ this.$u.toast('鍑虹幇閿欒锛岃閲嶆柊杩涘叆璇ラ〉闈紝閲嶈瘯锛侊紒');
+ });
+ },
+ messageconfirm() {
+ this.messagePushShow = false;
+ uni.navigateTo({
+ url: '/pages/public-page/message/message'
+ });
+ },
+ messageReq() {
+ this.$reqGet('getMessageByUser', { current: 1, size: 10 }).then(res => {
+ if (res.code == 0) {
+ this.messageList = res.data.records;
+ let filtermessage = this.messageList.filter(v => v.status == 0);
+ this.dotShow = filtermessage.length > 0;
+ }
+ });
+ }
}
- }
-};
+ };
</script>
-<style lang="scss" scoped>
-.max-block {
- font-family: siYuanLight !important;
-}
-.white-block {
- width: 100%;
- height: vww(20);
- margin-top: vww(10);
-}
-.search-bar {
- height: vww(20);
- width: 96%;
- position: absolute;
- top: vww(96);
- right: vww(32);
- z-index: 1;
- .icon-body {
- position: relative;
- display: flex;
- justify-content: flex-end;
- .icon-box {
- width: vww(30);
- height: vww(30);
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
+<style lang="scss"
+ scoped>
+ .max-block {
+ font-family: siYuanLight !important;
+ }
+
+ .white-block {
+ width: 100%;
+ height: vww(20);
+ margin-top: vww(10);
+ }
+
+ .search-bar {
+ height: vww(20);
+ width: 96%;
+ position: absolute;
+ top: vww(96);
+ right: vww(32);
+ z-index: 1;
+
+ .icon-body {
position: relative;
- /deep/ .u-badge {
- position: absolute;
- left: vww(18);
- top: vww(5);
- z-index: 1;
+ display: flex;
+ justify-content: flex-end;
+
+ .icon-box {
+ width: vww(30);
+ height: vww(30);
+ border-radius: 50%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ position: relative;
+
+ /deep/ .u-badge {
+ position: absolute;
+ left: vww(18);
+ top: vww(5);
+ z-index: 1;
+ }
}
}
}
-}
-</style>
+</style>
\ No newline at end of file
diff --git a/store/index.js b/store/index.js
index 72a6b9c..e420446 100644
--- a/store/index.js
+++ b/store/index.js
@@ -1,5 +1,6 @@
import Vue from 'vue'
import Vuex from 'vuex'
+import { webSocketUrl } from '@/api/request.js'
Vue.use(Vuex)
// 鍔ㄦ�佸簳閮╰abbar
@@ -72,7 +73,11 @@
userId: ''
},
globalisconnect: false,
- globalisUploadimg: false
+ globalisUploadimg: false,
+ globalisLogin: false,
+ socketTask: null,
+ websocketData: null, // 瀛樻斁浠庡悗绔帴鏀跺埌鐨剋ebsocket鏁版嵁
+ globalIntervalId: null,
},
mutations: {
lengthchange(state, payload) {
@@ -119,8 +124,59 @@
},
changeisUploadimg(state, payload) {
state.globalisUploadimg = payload
+ },
+ changeisLogin(state, payload) {
+ state.globalisLogin = payload
+ console.log(state.globalisLogin, '鍏ㄥ眬鐧诲綍鐘舵�佹敼鍙樹簡')
+ },
+ setWebsocketData(state, data) {
+ state.websocketData = data
+ }
+ },
+ actions: {
+ websocketInit({ state, dispatch, commit }) {
+ let wsUrl = `${webSocketUrl}?access_token=${uni.getStorageSync('token')}`
+ state.socketTast = uni.connectSocket({
+ url: wsUrl,
+ header: { CLIENT_TOC: 'Y' },
+ complete: res => {
+ console.log(res, 'socket缁撴灉')
+ if (res.errMsg === 'connectSocket:ok') {
+ commit('changeisconnect', true)
+ }
+ }
+ })
+ state.socketTast.onOpen(() => dispatch('websocketOnOpen'))
+ state.socketTast.onMessage(result => dispatch('websocketOnMessage', result.data))
+ state.socketTast.onClose(e => dispatch('websocketOnClose', e))
+ state.socketTast.onError(e => dispatch('websocketOnError'))
+ },
+ websocketOnOpen({ state, commit }) {
+ console.log('onOpen')
+ state.globalIntervalId = setInterval(() => {
+ state.socketTast.send({
+ data: JSON.stringify({ type: 'ping' }),
+ success(e) {
+ console.log(e, '鍙戦�佸績璺虫垚鍔�')
+ }
+ })
+ }, 30000)
+ },
+ websocketOnClose({ state, commit }) {
+ if (!state.socketTast) return
+ state.socketTast.close(e => {
+ commit('changeisconnect', false)
+ })
+ console.log('ws鍏抽棴')
+ },
+ websocketOnError(e) {
+ console.log('socket鎶ラ敊', e)
+ },
+ // 鎺ユ敹鏁版嵁
+ websocketOnMessage({ state, commit }, result) {
+ commit('setWebsocketData', result)
}
}
})
-export default store
+export default store
\ No newline at end of file
--
Gitblit v1.9.1