From e755ab6c6edddf4accb51e241e6ec04c27cea091 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期二, 16 九月 2025 11:35:07 +0800
Subject: [PATCH] 前端
---
small-program/pages/demand-hall/demand-hall.vue | 915 ++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 588 insertions(+), 327 deletions(-)
diff --git a/small-program/pages/demand-hall/demand-hall.vue b/small-program/pages/demand-hall/demand-hall.vue
index 2e0e331..49f3a7c 100644
--- a/small-program/pages/demand-hall/demand-hall.vue
+++ b/small-program/pages/demand-hall/demand-hall.vue
@@ -6,278 +6,221 @@
<text>鎴戠殑璁㈠崟</text>
</view>
</view>
- <!-- 鍙戝崟鏂� -->
- <view class="index-labs" v-if="type === 0" :style="{ top: statusbarHeight + navHeight + 'px' }">
- <view class="index-labs-row">
- 鍏ㄩ儴
- <view class="index-labs-row-x"></view>
- </view>
- <view class="index-labs-row active">寰呮帴鍗�</view>
- <view class="index-labs-row">宸叉帴鍗�</view>
- <view class="index-labs-row">杩涜涓�</view>
- <view class="index-labs-row">寰呰瘎浠�</view>
- <view class="index-labs-row">宸插彇娑�</view>
- </view>
- <!-- 鎺ュ崟鏂� -->
- <view class="index-labs" v-if="type === 1" :style="{ top: statusbarHeight + navHeight + 'px' }">
- <view class="index-labs-row">
- 鍏ㄩ儴
- <view class="index-labs-row-x"></view>
- </view>
- <view class="index-labs-row active">宸叉帴鍗�</view>
- <view class="index-labs-row">杩涜涓�</view>
- <view class="index-labs-row">宸插畬鎴�</view>
- <view class="index-labs-row">宸插彇娑�</view>
- </view>
- <!-- 鍙戝崟鏂� -->
- <view class="index-list" v-if="type === 0">
- <view class="index-list-item">
- <view class="index-list-item-head">
- <view class="index-list-item-head-l">
- <view class="xoam"></view>
- <text>璁㈤鍗�</text>
- </view>
- <view class="index-list-item-head-r">寰呮帴鍗曟柟鎺ュ崟</view>
- </view>
- <view class="index-list-item-info">
- 鍗堥5鍏�(30浠�)锝滄櫄椁�8鍏�(20浠�)
- </view>
- <view class="index-list-item-dz">
- <image src="/static/icon/order_ic_location@2x.png" mode="widthFix"></image>
- <text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥タ闂ㄤ繚瀹夊</text>
- </view>
- <view class="index-list-item-dz">
- <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
- <text>07-26 鑷� 07-27锛�2澶╋級</text>
- </view>
- <view class="index-list-item-price">
- <text>棰勪及锛�</text>
- <text>楼1000.00</text>
- </view>
- <view class="eidt">
- <view></view>
- <view class="eidt-right">
- <view class="eidt-close">鍙栨秷璁㈠崟</view>
- <!-- <view class="eidt-close">鍒犻櫎璁㈠崟</view>
- <view class="eidt-phone">鑱旂郴甯堝倕</view>
- <view class="eidt-phone">璇勪环璁㈠崟</view>
- <view class="eidt-btn">淇敼璁㈠崟</view>
- <view class="eidt-btn">瀹屾垚骞舵敮浠�</view> -->
- </view>
- </view>
- </view>
- <view class="index-list-item">
- <view class="index-list-item-head">
- <view class="index-list-item-head-l">
- <view class="xoam"></view>
- <text>杩愯揣鍗�-灏忚揣杞�-鍘㈠紡</text>
- </view>
- <view class="index-list-item-head-r">寰呮帴鍗曟柟鎺ュ崟</view>
- </view>
- <view class="index-list-item-info">
- 钁¤悇锝�20000鏂わ綔闇�2杈�
- </view>
- <view class="index-list-item-date">
- <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
- <text>07-26 鑷� 07-27锛�2澶╋級</text>
- </view>
- <view class="address">
- <view class="address-xian"></view>
- <view class="address-row">
- <image src="/static/icon/ic_qidian@2x.png" mode="widthFix"></image>
- <text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥タ闂ㄤ繚瀹夊</text>
- </view>
- <view class="address-row">
- <image src="/static/icon/ic_jingguo@2x.png" mode="widthFix"></image>
- <text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥笢闂ㄤ繚瀹夊</text>
- </view>
- <view class="address-row">
- <image src="/static/icon/ic_zhongdian@2x.png" mode="widthFix"></image>
- <text>瀹夊窘鑾茶姳绉戞妧浜т笟鍥眴绫崇鎶�鏈夐檺鍏徃</text>
- </view>
- </view>
- <view class="index-list-item-price">
- <text>棰勪及锛�</text>
- <text>楼1000.00</text>
- </view>
- <view class="eidt">
- <view></view>
- <view class="eidt-right">
- <view class="eidt-close">鍙栨秷璁㈠崟</view>
- <!-- <view class="eidt-close">鍒犻櫎璁㈠崟</view>
- <view class="eidt-phone">鑱旂郴甯堝倕</view>
- <view class="eidt-phone">璇勪环璁㈠崟</view>
- <view class="eidt-btn">淇敼璁㈠崟</view>
- <view class="eidt-btn">瀹屾垚骞舵敮浠�</view> -->
- </view>
- </view>
- </view>
- <view class="index-list-item">
- <view class="index-list-item-head">
- <view class="index-list-item-head-l">
- <view class="xoam"></view>
- <text>鐢ㄥ伐鍗�-閲囨憳宸�</text>
- </view>
- <view class="index-list-item-head-r">寰呮帴鍗�</view>
- </view>
- <view class="index-list-item-info">
- 钁¤悇锝�2000鏂�
- </view>
- <view class="index-list-item-dz">
- <image src="/static/icon/order_ic_location@2x.png" mode="widthFix"></image>
- <text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥タ闂ㄤ繚瀹夊</text>
- </view>
- <view class="index-list-item-dz">
- <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
- <text>07-26 鑷� 07-27锛�2澶╋級</text>
- </view>
- <view class="index-list-item-price">
- <text>棰勪及锛�</text>
- <text>楼1000.00</text>
- </view>
- <view class="eidt">
- <view></view>
- <view class="eidt-right">
- <view class="eidt-close">鍙栨秷璁㈠崟</view>
- <!-- <view class="eidt-close">鍒犻櫎璁㈠崟</view>
- <view class="eidt-phone">鑱旂郴甯堝倕</view>
- <view class="eidt-phone">璇勪环璁㈠崟</view>
- <view class="eidt-btn">淇敼璁㈠崟</view>
- <view class="eidt-btn">瀹屾垚骞舵敮浠�</view> -->
- </view>
- </view>
- </view>
- </view>
- <!-- 鎺ュ崟鏂� -->
- <view class="index-list" v-if="type === 1">
- <view class="index-list-item">
- <view class="index-list-item-head">
- <view class="index-list-item-head-l">
- <view class="xoam"></view>
- <text>璁㈤鍗�</text>
- <view class="tips">绯荤粺娲惧崟</view>
- </view>
- <view class="index-list-item-head-r">宸叉帴鍗�</view>
- </view>
- <view class="index-list-item-info">
- 鍗堥5鍏�(30浠�)锝滄櫄椁�8鍏�(20浠�)
- </view>
- <view class="index-list-item-dz">
- <image src="/static/icon/order_ic_location@2x.png" mode="widthFix"></image>
- <text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥タ闂ㄤ繚瀹夊</text>
- </view>
- <view class="index-list-item-dz">
- <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
- <text>07-26 鑷� 07-27锛�2澶╋級</text>
- </view>
- <view class="index-list-item-price">
- <text>棰勪及锛�</text>
- <text>楼1000.00</text>
- </view>
- <view class="eidt">
- <view class="eidt-tips">
- <image src="/static/icon/ic_tip@2x.png" mode="widthFix"></image>
- <text>璁㈠崟宸蹭慨鏀�</text>
- </view>
- <view class="eidt-right">
- <view class="eidt-close">鍙栨秷璁㈠崟</view>
- <!-- <view class="eidt-close">鍒犻櫎璁㈠崟</view>
- <view class="eidt-phone">鑱旂郴甯堝倕</view>
- <view class="eidt-phone">璇勪环璁㈠崟</view>
- <view class="eidt-btn">淇敼璁㈠崟</view>
- <view class="eidt-btn">瀹屾垚骞舵敮浠�</view> -->
- </view>
- </view>
- </view>
- <view class="index-list-item">
- <view class="index-list-item-head">
- <view class="index-list-item-head-l">
- <view class="xoam"></view>
- <text>杩愯揣鍗�-灏忚揣杞�-鍘㈠紡</text>
- <view class="tips1">鑷富鎶㈠崟</view>
- </view>
- <view class="index-list-item-head-r">宸叉帴鍗�</view>
- </view>
- <view class="index-list-item-info">
- 钁¤悇锝�20000鏂わ綔闇�2杈�
- </view>
- <view class="index-list-item-date">
- <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
- <text>07-26 鑷� 07-27锛�2澶╋級</text>
- </view>
- <view class="address">
- <view class="address-xian"></view>
- <view class="address-row">
- <image src="/static/icon/ic_qidian@2x.png" mode="widthFix"></image>
- <text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥タ闂ㄤ繚瀹夊</text>
- </view>
- <view class="address-row">
- <image src="/static/icon/ic_jingguo@2x.png" mode="widthFix"></image>
- <text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥笢闂ㄤ繚瀹夊</text>
- </view>
- <view class="address-row">
- <image src="/static/icon/ic_zhongdian@2x.png" mode="widthFix"></image>
- <text>瀹夊窘鑾茶姳绉戞妧浜т笟鍥眴绫崇鎶�鏈夐檺鍏徃</text>
- </view>
- </view>
- <view class="index-list-item-price">
- <text>棰勪及锛�</text>
- <text>楼1000.00</text>
- </view>
- <view class="eidt">
- <view></view>
- <view class="eidt-right">
- <view class="eidt-close">鍙栨秷璁㈠崟</view>
- <!-- <view class="eidt-close">鍒犻櫎璁㈠崟</view>
- <view class="eidt-phone">鑱旂郴甯堝倕</view>
- <view class="eidt-phone">璇勪环璁㈠崟</view>
- <view class="eidt-btn">淇敼璁㈠崟</view>
- <view class="eidt-btn">瀹屾垚骞舵敮浠�</view> -->
- </view>
- </view>
- </view>
- <view class="index-list-item">
- <view class="index-list-item-head">
- <view class="index-list-item-head-l">
- <view class="xoam"></view>
- <text>鐢ㄥ伐鍗�-閲囨憳宸�</text>
- <view class="tips1">鑷富鎶㈠崟</view>
- </view>
- <view class="index-list-item-head-r">寰呮帴鍗�</view>
- </view>
- <view class="index-list-item-info">
- 钁¤悇锝�2000鏂�
- </view>
- <view class="index-list-item-dz">
- <image src="/static/icon/order_ic_location@2x.png" mode="widthFix"></image>
- <text>闀挎睙瑗胯矾澶ц渶灞辨.鏋楀叕鍥タ闂ㄤ繚瀹夊</text>
- </view>
- <view class="index-list-item-dz">
- <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
- <text>07-26 鑷� 07-27锛�2澶╋級</text>
- </view>
- <view class="index-list-item-price">
- <text>棰勪及锛�</text>
- <text>楼1000.00</text>
- </view>
- <view class="eidt">
- <view></view>
- <view class="eidt-right">
- <view class="eidt-close">鍙栨秷璁㈠崟</view>
- <!-- <view class="eidt-close">鍒犻櫎璁㈠崟</view>
- <view class="eidt-phone">鑱旂郴甯堝倕</view>
- <view class="eidt-phone">璇勪环璁㈠崟</view>
- <view class="eidt-btn">淇敼璁㈠崟</view>
- <view class="eidt-btn">瀹屾垚骞舵敮浠�</view> -->
- </view>
- </view>
- </view>
- </view>
- <!-- <view class="index-wu">
+ <!-- 鏈櫥褰� -->
+ <view class="index-wu" v-if="!isLogin">
<image src="/static/icon/default_login@2x.png" mode="widthFix"></image>
<text>鎮ㄨ繕娌℃湁鐧诲綍锛岃鐧诲綍鍚庢煡鐪嬭鍗�</text>
- <button>鐧诲綍</button>
- </view> -->
+ <button @click="toLogin">鐧诲綍</button>
+ </view>
+
+ <!-- 宸茬櫥闄� -->
+ <template v-else>
+ <!-- 鍙戝崟鏂� -->
+ <view class="index-labs" v-if="typeViewId === 0" :style="{ top: statusbarHeight + navHeight + 'px' }">
+ <scroll-view scroll-x class="scroll-view_H" :scroll-into-view="'view'+status">
+ <view :class=" item.id === status ? 'index-labs-row active' : 'index-labs-row'" v-for="(item, index) in list1" :id="'view'+item.id" :key="item.id" @click="clickOrderType(item.id)">
+ {{item.name}}
+ <view class="index-labs-row-x" v-if=" item.id === status"></view>
+ </view>
+ </scroll-view>
+ </view>
+ <!-- 鎺ュ崟鏂� -->
+ <view class="index-labs" v-if="typeViewId === 1" :style="{ top: statusbarHeight + navHeight + 'px' }">
+ <scroll-view scroll-x class="scroll-view_H" :scroll-into-view="'view'+status">
+ <view :class=" item.id === status ? 'index-labs-row active' : 'index-labs-row'" v-for="(item, index) in list" :id="'view'+item.id" :key="item.id" @click="clickOrderType(item.id)">
+ {{item.name}}
+ <view class="index-labs-row-x" v-if=" item.id === status "></view>
+ </view>
+ </scroll-view>
+ </view>
+ <!-- 鍙戝崟鏂� -->
+ <view class="index-list" v-if="typeViewId === 0">
+ <view class="index-list-wu" v-if="orderList.length === 0">
+ <text>宸插姞杞藉叏閮ㄦ暟鎹�</text>
+ </view>
+ <view class="index-list-item" v-for="(item, index) in orderList" :key="index" @click="jumpDesc(item)" v-else>
+ <view class="index-list-item-head">
+ <view class="index-list-item-head-l">
+ <view class="xoam"></view>
+ <text v-if="item.type === 0 && item.workType === 0">鐢ㄥ伐鍗� - 閲囨憳宸�</text>
+ <text v-else-if="item.type === 0 && item.workType === 1">鐢ㄥ伐鍗� - 鍒嗘嫞宸�</text>
+ <text v-else-if="item.type === 0 && item.workType === 2">鐢ㄥ伐鍗� - 鍖呰宸�</text>
+ <text v-else-if="item.type === 1">杩愯揣鍗� - {{item.categoryName}}</text>
+ <text v-else-if="item.type === 2">璁㈤鍗�</text>
+ </view>
+ <view class="index-list-item-head-r" v-if="item.status === 0 || item.status === 5">寰呮敮浠�</view>
+ <view class="index-list-item-head-r" v-if="item.status === 1">寰呮帴鍗�</view>
+ <view class="index-list-item-head-r" v-if="item.status === 2">宸叉帴鍗�</view>
+ <view class="index-list-item-head-r" v-if="item.status === 3">杩涜涓�</view>
+ <view class="index-list-item-head-r hui" v-if="item.status === 4 && item.commentStatus !== 0">宸插畬鎴�</view>
+ <view class="index-list-item-head-r hui" v-if="item.status === 99">宸插彇娑�</view>
+ <view class="index-list-item-head-r" v-if="item.status === 4 && item.commentStatus === 0">寰呰瘎浠�</view>
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 0">
+ {{item.categoryName}}锝渰{item.priceNum1}}鏂�
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 1">
+ {{item.categoryName}}锝渰{item.priceNum2}}浜�
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 2&& item.carType === 0">
+ {{item.categoryName}}锝渰{item.priceNum1}}澶� | {{item.priceNum2}}浜�
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 2&& item.carType === 1">
+ {{item.categoryName}}锝渰{item.priceNum1}}灏忔椂 | {{item.priceNum2}}浜�
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 2&& item.carType === 2">
+ {{item.categoryName}}锝渰{item.priceNum1}}鏂� | {{item.priceNum2}}浜�
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 1">
+ {{item.carUnit}} | {{item.transportTypeName}} | {{item.transportNum}}{{item.transportUnit}}锝滅敤杞{item.priceNum1}}{{item.carType === 0?"澶�":"娆�"}}
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 2">
+ {{item.wayInfoCopy}}
+ </view>
+ <view class="address" v-if="item.type === 1">
+ <view class="address-xian"></view>
+ <view class="address-row" v-for="(address, i) in item.wayInfo" :key="i">
+ <image src="/static/icon/ic_qidian@2x.png" mode="widthFix" v-if="i === 0"></image>
+ <image src="/static/icon/ic_jingguo@2x.png" mode="widthFix" v-else-if="i !== 0 && i !== item.wayInfo.length - 1"></image>
+ <image src="/static/icon/ic_zhongdian@2x.png" mode="widthFix" v-else-if="i === item.wayInfo.length - 1"></image>
+ <text>{{address.location}}</text>
+ </view>
+ </view>
+ <template v-if="[0, 2].includes(item.type)">
+ <view class="index-list-item-dz">
+ <image src="/static/icon/order_ic_location@2x.png" mode="widthFix"></image>
+ <text>{{item.location}}</text>
+ </view>
+ <view class="index-list-item-dz">
+ <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
+ <text>{{item.startDate}} 鑷� {{item.endDate}}锛坽{item.totalDays}}澶╋級</text>
+ </view>
+ </template>
+ <view class="index-list-item-price">
+ <text v-if="item.status==4 || item.type==2">宸叉敮浠橈細</text>
+ <text v-if="item.status!=4&& item.type!=2">棰勪及锛�</text>
+ <text>楼{{item.payAccount / 100}}</text>
+ </view>
+ <view class="eidt">
+ <view>
+ <view class="eidt-tips" v-if="item.status === 2 && item.isUpdate == 1"><text>宸蹭慨鏀癸紝寰呮帴鍗曟柟纭</text></view>
+ <view class="eidt-tips" v-if="item.status === 5">
+ <image src="/static/icon/ic_tip@2x.png" mode="widthFix"></image>
+ <text>鎺ュ崟鏂瑰凡纭璐圭敤锛岃鏀粯</text>
+ </view>
+ </view>
+ <view class="eidt-right">
+ <view class="eidt-close" v-if="[0,1,2].includes(item.status)" @click.stop="orderId = item.id, show = true">鍙栨秷璁㈠崟</view>
+ <view class="eidt-phone" v-if="[2].includes(item.status)">鑱旂郴甯堝倕</view>
+ <view class="eidt-phone" v-if="item.status === 4 && item.commentStatus === 0">璇勪环璁㈠崟</view>
+ <view class="eidt-btn" v-if="[0,1,2].includes(item.status) && item.type !== 2 && item.isUpdate!=1" @click.stop="jumpEdit(item)">淇敼璁㈠崟</view>
+ <view class="eidt-btn" v-if="(item.type == 2 && item.status === 0)" @click.stop="jumpDesc(item,1)">缁х画鏀粯</view>
+ <!-- <view class="eidt-btn" v-if="item.status === 2" @click.stop="startJobs(item.id)">寮�濮嬩綔涓�</view> -->
+ <view class="eidt-btn" v-if="item.type != 2 && item.status === 5" @click.stop="jumpDesc(item,2)">绔嬪嵆鏀粯</view>
+ <view class="eidt-btn" v-if="item.type == 2 && item.status === 3" @click.stop="jumpDesc(item)">瀹屾垚浣滀笟</view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <!-- 鎺ュ崟鏂� -->
+ <view class="index-list" v-if="typeViewId === 1">
+ <view class="index-list-wu" v-if="orderList.length === 0">
+ <text>宸插姞杞藉叏閮ㄦ暟鎹�</text>
+ </view>
+ <view class="index-list-item" v-for="(item, index) in orderList" :key="index" @click="jumpDesc(item)" v-else>
+ <view class="index-list-item-head">
+ <view class="index-list-item-head-l">
+ <view class="xoam"></view>
+ <text v-if="item.type === 0 && item.workType === 0">鐢ㄥ伐鍗� - 閲囨憳宸�</text>
+ <text v-else-if="item.type === 0 && item.workType === 1">鐢ㄥ伐鍗� - 鍒嗘嫞宸�</text>
+ <text v-else-if="item.type === 0 && item.workType === 2">鐢ㄥ伐鍗� - 鍖呰宸�</text>
+ <text v-else-if="item.type === 1">杩愯揣鍗� - {{item.categoryName}}</text>
+ <text v-else-if="item.type === 2">璁㈤鍗�</text>
+ <view class="tips" v-if="item.acceptType === 1">娲惧崟</view>
+ <view class="tips1" v-if="item.acceptType === 0">鎶㈠崟</view>
+ </view>
+ <view class="index-list-item-head-r" v-if="item.status === 0 || item.status === 5">寰呮敮浠�</view>
+ <view class="index-list-item-head-r" v-if="item.status === 2">宸叉帴鍗�</view>
+ <view class="index-list-item-head-r" v-if="item.status === 3">杩涜涓�</view>
+ <view class="index-list-item-head-r hui" v-if="item.status === 4">宸插畬鎴�</view>
+ <view class="index-list-item-head-r hui" v-if="item.status === 99">宸插彇娑�</view>
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 0">
+ {{item.categoryName}}锝渰{item.priceNum1}}鏂�
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 1">
+ {{item.categoryName}}锝渰{item.priceNum2}}浜�
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 2&& item.carType === 0">
+ {{item.categoryName}}锝渰{item.priceNum1}}澶� 锝渰{item.priceNum2}}浜�
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 2&& item.carType === 1">
+ {{item.categoryName}}锝渰{item.priceNum1}}灏忔椂 锝渰{item.priceNum2}}浜�
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 2&& item.carType === 2">
+ {{item.categoryName}}锝渰{item.priceNum1}}鏂�
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 1">
+ {{item.carUnit}} | {{item.transportTypeName}} | {{item.transportNum}}{{item.transportUnit}}锝滅敤杞{item.priceNum1}}{{item.carType === 0?"澶�":"娆�"}}
+ </view>
+ <view class="index-list-item-info" v-if="item.type === 2">
+ {{item.wayInfoCopy}}
+ </view>
+ <view class="address" v-if="item.type === 1">
+ <view class="address-xian"></view>
+ <view class="address-row" v-for="(address, i) in item.wayInfo" :key="i">
+ <image src="/static/icon/ic_qidian@2x.png" mode="widthFix" v-if="i === 0"></image>
+ <image src="/static/icon/ic_jingguo@2x.png" mode="widthFix" v-else-if="i !== 0 && i !== item.wayInfo.length - 1"></image>
+ <image src="/static/icon/ic_zhongdian@2x.png" mode="widthFix" v-else-if="i === item.wayInfo.length - 1"></image>
+ <text>{{address.location}}</text>
+ </view>
+ </view>
+ <template v-if="[0, 2].includes(item.type)">
+ <view class="index-list-item-dz">
+ <image src="/static/icon/order_ic_location@2x.png" mode="widthFix"></image>
+ <text>{{item.location}}</text>
+ </view>
+ <view class="index-list-item-dz">
+ <image src="/static/icon/order_ic_time@2x.png" mode="widthFix"></image>
+ <text>{{item.startDate}} 鑷� {{item.endDate}}锛坽{item.priceNum1}}澶╋級</text>
+ </view>
+ </template>
+ <view class="index-list-item-price">
+ <text v-if="item.status==4">宸叉敮浠橈細</text>
+ <text v-if="item.status!=4">棰勪及锛�</text>
+ <text>楼{{item.payAccount / 100}}</text>
+ </view>
+ <view class="eidt">
+ <view class="eidt-tips" v-if="item.isUpdate === 1">
+ <image src="/static/icon/ic_tip@2x.png" mode="widthFix"></image>
+ <text>璁㈠崟宸蹭慨鏀�</text>
+ </view>
+ <view class="eidt-tips" v-else></view>
+
+ <view class="eidt-right">
+ <view class="eidt-close" v-if="item.status === 2" @click.stop="orderId = item.id, show = true">鍙栨秷璁㈠崟</view>
+ <view class="eidt-phone" v-if="[2,3].includes(item.status)" @click.stop="phoneCall(item.linkPhone)">鑱旂郴涓氫富</view>
+ </view>
+ </view>
+ </view>
+ </view>
+ </template>
+
+ <u-modal
+ title="娓╅Θ鎻愮ず"
+ :show="show"
+ closeOnClickOverlay
+ showCancelButton
+ >
+ <view class="slot-content">
+ 纭鍙栨秷璁㈠崟鍚楋紵
+ </view>
+ <view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;">
+ <view class="btn1" @click="show = false">鎴戝啀鎯虫兂</view>
+ <view class="btn2" @click="cancelOrder">纭鍙栨秷</view>
+ </view>
+ </u-modal>
+
</view>
</template>
@@ -285,12 +228,270 @@
import { mapState } from 'vuex'
export default {
computed: {
- ...mapState(['navHeight', 'statusbarHeight'])
+ ...mapState(['navHeight', 'statusbarHeight','userInfo','token','openid', 'latitude', 'longitude'])
+ },
+ async onShow(options) {
+ var flag = getApp().globalData.orderStatus
+ console.log(getApp().globalData,"=====================================")
+ // this.status = ''
+ // this.commentStatus=''
+ // status: this.status === 5 ? 4 : this.status,
+ // commentStatus: this.status === 5 ? 0 : '',
+ if(flag =='1'){//鍙戝崟鏂瑰緟鎺ュ崟
+ this.status = 1
+ }else if(flag =='2'){//鍙戝崟鏂硅繘琛屼腑
+ this.status = 3
+ }else if(flag =='3'){//鍙戝崟鏂瑰緟璇勪环
+ this.status = 6
+ }else if(flag =='4'){//鎺ュ崟鏂瑰凡鎺ュ崟
+ this.status =2
+ }else if(flag =='5'){//鎺ュ崟鏂硅繘琛屼腑
+ this.status =3
+ }else if(flag =='6'){//鎺ュ崟鏂瑰凡瀹屾垚
+ this.status =4
+ }else if(flag =='0'){
+ this.status = -1
+ }
+ console.log(getApp().globalData,this.status ,"=====================================")
+ // this.typeViewId = 0
+ if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){
+ console.log('宸茬櫥闄�')
+ this.isLogin = true
+ /* this.getOrderList()
+ if (!this.isOnce) {
+ this.commentStatus = ''
+ this.orderList = []
+ this.next = true
+ this.page = 1
+ this.getOrderList()
+ } */
+ } else {
+ this.isLogin = false
+ this.typeViewId = 0
+ console.log('鏈櫥闄�')
+ }
+ if(this.isLogin){
+ if(this.typeViewId !== this.userInfo.useIdentity || flag !=null){
+ this.typeViewId = this.userInfo.useIdentity || 0
+ //濡傛灉鍙戠敓
+ this.initOrderList()
+ }else{
+ //濡傛灉鏈彂鐢熷彉鍖栦笉鍒锋柊
+ this.typeViewId = this.userInfo.useIdentity || 0
+ if(!this.orderList || !this.orderList.length){
+ this.initOrderList()
+ }else{
+ if( this.tempOrderId){
+ this.getOrderData()
+ }
+ }
+ console.log('this.tempOrderId',this.tempOrderId)
+ }
+ }
+ getApp().globalData.orderStatus =null
},
data() {
return {
- type: 1
+ show: false,
+ isLogin: false,
+ typeViewId: -1,
+ tempOrderId:null,
+ list: [
+ { name: '鍏ㄩ儴', id: -1 },
+ { name: '宸叉帴鍗�', id: 2 },
+ { name: '杩涜涓�', id: 3 },
+ { name: '寰呮敮浠�', id: 5 },
+ { name: '宸插畬鎴�', id: 4 },
+ // { name: '宸插彇娑�', id: 99 },
+ ],
+ list1: [
+ { name: '鍏ㄩ儴', id: -1 },
+ { name: '寰呮敮浠�', id: 0 },
+ { name: '寰呮帴鍗�', id: 1 },
+ { name: '宸叉帴鍗�', id: 2 },
+ { name: '杩涜涓�', id: 3 },
+ { name: '宸插畬鎴�', id: 4 },
+ { name: '宸插彇娑�', id: 99 },
+ { name: '寰呰瘎浠�', id: 6 }
+ ],
+ orderId: null,
+ status: -1,
+ commentStatus: '',
+ next: true,
+ page: 1,
+ orderList: [],
+ isOnce: true
};
+ },
+ async onLoad() {
+ await this.$onLaunched;
+ /* uni.$on('refresh', (data) => {
+ console.log('鎴戠殑璁㈠崟椤靛埛鏂�');
+ this.status = ''
+ this.commentStatus = ''
+ this.orderList = []
+ this.next = true
+ this.page = 1
+ this.getOrderList()
+ }) */
+
+ },
+ onReachBottom() {
+ if(this.isLogin){
+ this.getOrderList()
+ }
+ },
+ methods: {
+ toLogin() {
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ },
+ initOrderList() {
+ this.commentStatus = ''
+ this.orderList = []
+ this.next = true
+ this.page = 1
+ this.getOrderList()
+ },
+ startJobs(orderId) {
+ this.$u.api.begin({ orderId })
+ .then(res => {
+ if (res.code === 200) {
+ this.status = ''
+ this.commentStatus = ''
+ this.orderList = []
+ this.next = true
+ this.page = 1
+ this.getOrderList()
+ }
+
+ })
+ },
+ jumpDesc(item,flag) {
+ uni.navigateTo({
+ url: `/pages/order-details/order-details?id=${item.id}&flag=${flag}`
+ })
+ this.tempOrderId = item.id
+ },
+ // 淇敼
+ jumpEdit(item) {
+ this.tempOrderId =item.id
+ if (item.type === 0 && item.workType === 0) {
+ uni.navigateTo({
+ url: `/pages/using-workers/using-workers?id=${item.id}`
+ })
+ } else if (item.type === 0 && item.workType === 1) {
+ uni.navigateTo({
+ url: `/pages/sorting/sorting?id=${item.id}`
+ })
+ } else if (item.type === 0 && item.workType === 2) {
+ uni.navigateTo({
+ url: `/pages/packaging-worker/packaging-worker?id=${item.id}`
+ })
+ } else if (item.type === 1) {
+ uni.navigateTo({
+ url: `/pages/freight/freight?id=${item.id}`
+ })
+ }
+ },
+ cancelOrder() {
+ this.$u.api.cancelOrder({
+ orderId: this.orderId
+ }).then(res => {
+ if (res.code === 200) {
+ this.show = false
+ this.orderList = []
+ this.next = true
+ this.page = 1
+ this.getOrderList()
+ }
+ })
+ },
+ phoneCall(phoneNumber) {
+ uni.makePhoneCall({
+ phoneNumber
+ });
+ },
+ getOrderData(){
+ var that = this
+ var param ={ orderId:that.tempOrderId}
+ this.$u.api.getDetail(param).then(res =>{
+ if(res.code ===200 && res.data){
+ var isDel = false
+ var tempIndex = -1
+ that.orderList.forEach((item,index) =>{
+ if(item.id == res.data.id){
+ item.status = res.data.status
+ item.isUpdate = res.data.isUpdate
+ item.commentStatus = res.data.commentStatus
+ tempIndex = index
+ }
+
+ })
+ if(tempIndex > -1 ){
+ console.log(tempIndex,that.status,res.data.status,"===================")
+ if(that.status >=0 ){
+ //濡傛灉鏈夋爣绛鹃〉
+ if(that.status ===6 && res.data.commentStatus == 1){
+ isDel =true
+ console.log(tempIndex,that.status,res.data.status,"==================1")
+ }else if(that.status !=6 && that.status !== res.data.status){
+ isDel =true
+ console.log(tempIndex,that.status,res.data.status,"===================2")
+ }
+ }
+ if(isDel){
+ console.log(tempIndex,that.status,res.data.status,"===================3")
+ that.orderList.splice(tempIndex,1)
+ }
+ }
+ }
+ })
+ },
+ // 璁㈠崟鍒嗛〉
+ getOrderList() {
+ if (!this.next) return;
+ this.$u.api.orderPage({
+ capacity: 10,
+ page: this.page,
+ model: {
+ queryMyOrderType: this.userInfo.useIdentity,
+ status: this.status === 6 ? 4 : (this.status ==-1?"":this.status),
+ commentStatus: this.status === 6 ? 0 : '',
+ queryLat: this.latitude,
+ queryLgt: this.longitude
+ }
+ }).then(res => {
+ if (res.code !== 200) return;
+ this.isOnce = false
+ res.data.records.forEach(item => {
+ // 璁㈤鍗�
+ if (item.type === 2) {
+ item.wayInfoCopy = JSON.parse(item.wayInfo).map(item => {
+ return `${item.name}${item.price / 100}鍏�(${item.num}浠�)`
+ }).join(' | ')
+ // 杩愯揣
+ } else if (item.type === 1) {
+ item.wayInfo = JSON.parse(item.wayInfo)
+ }
+ })
+ this.orderList = [...this.orderList, ...res.data.records]
+ if (this.orderList.length >= res.data.total) {
+ this.next = false
+ } else {
+ this.page += 1
+ }
+ })
+ },
+ clickOrderType(id) {
+ this.commentStatus = ''
+ this.status = id
+ this.orderList = []
+ this.next = true
+ this.page = 1
+ this.getOrderList()
+ }
}
}
</script>
@@ -304,6 +505,36 @@
<style lang="scss" scoped>
.index {
width: 100%;
+ .slot-content {
+ width: 100%;
+ text-align: center;
+ font-weight: 400;
+ font-size: 30rpx;
+ color: #333333;
+ margin: 30rpx 0;
+ }
+ .btn1 {
+ width: 264rpx;
+ height: 88rpx;
+ line-height: 88rpx;
+ text-align: center;
+ font-weight: 400;
+ font-size: 32rpx;
+ color: #666666;
+ border-radius: 44rpx;
+ border: 1rpx solid #B2B2B2;
+ }
+ .btn2 {
+ width: 264rpx;
+ height: 88rpx;
+ line-height: 88rpx;
+ text-align: center;
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #FFFFFF;
+ background: #00BC12;
+ border-radius: 44rpx;
+ }
.index-j-head {
width: 100%;
background-color: #ffffff;
@@ -328,6 +559,15 @@
width: 100%;
padding: 20rpx 30rpx;
box-sizing: border-box;
+ .index-list-wu {
+ width: 100%;
+ margin-top: 40rpx;
+ text-align: center;
+ text {
+ font-size: 24rpx;
+ color: #666666;
+ }
+ }
.index-list-item {
width: 100%;
padding: 30rpx;
@@ -358,38 +598,48 @@
color: #FF0000;
}
}
- .eidt-close {
- width: 160rpx;
- height: 64rpx;
- font-weight: 400;
- font-size: 28rpx;
- color: #666666;
- line-height: 64rpx;
- text-align: center;
- border-radius: 34rpx;
- border: 1rpx solid #B2B2B2;
- }
- .eidt-phone {
- width: 160rpx;
- height: 64rpx;
- line-height: 64rpx;
- text-align: center;
- font-weight: 400;
- font-size: 28rpx;
- color: #00BC12;
- border-radius: 34rpx;
- border: 1rpx solid #00BC12;
- }
- .eidt-btn {
- width: 160rpx;
- height: 64rpx;
- line-height: 64rpx;
- text-align: center;
- font-weight: 400;
- font-size: 28rpx;
- color: #FFFFFF;
- background: #00BC12;
- border-radius: 34rpx;
+ .eidt-right {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ flex-wrap: wrap;
+ .eidt-close {
+ width: 160rpx;
+ height: 64rpx;
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #666666;
+ line-height: 64rpx;
+ text-align: center;
+ border-radius: 34rpx;
+ border: 1rpx solid #B2B2B2;
+ margin-left: 20rpx;
+ }
+ .eidt-phone {
+ width: 160rpx;
+ height: 64rpx;
+ line-height: 64rpx;
+ text-align: center;
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #00BC12;
+ border-radius: 34rpx;
+ border: 1rpx solid #00BC12;
+ margin-left: 20rpx;
+ }
+ .eidt-btn {
+ width: 160rpx;
+ height: 64rpx;
+ line-height: 64rpx;
+ text-align: center;
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #FFFFFF;
+ background: #00BC12;
+ border-radius: 34rpx;
+ margin-left: 20rpx;
+ }
}
}
.index-list-item-price {
@@ -530,6 +780,9 @@
border: 2rpx solid #FD9E24;
}
}
+ .hui {
+ color: #999999 !important;
+ }
.index-list-item-head-r {
font-weight: 400;
font-size: 28rpx;
@@ -541,35 +794,43 @@
.index-labs {
width: 100%;
height: 90rpx;
+ padding: 0 30rpx;
+ box-sizing: border-box;
display: flex;
align-items: center;
- justify-content: space-between;
background: #FFFFFF;
position: sticky;
left: 0;
- .active {
- font-weight: 500 !important;
- font-size: 32rpx !important;
- color: #222222 !important;
- }
- .index-labs-row {
- flex: 1;
+ .scroll-view_H {
+ width: 100%;
height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-weight: 400;
- font-size: 30rpx;
- color: #666666;
- position: relative;
- .index-labs-row-x {
- position: absolute;
- bottom: 0;
- left: 50%;
- width: 40rpx;
- height: 2rpx;
- background-color: #00BC12;
- transform: translate(-50%, 0);
+ white-space: nowrap;
+ .active {
+ font-weight: 500 !important;
+ font-size: 32rpx !important;
+ color: #00BC12 !important;
+ }
+ .index-labs-row {
+ display: inline-block;
+ height: 100%;
+ line-height: 90rpx;
+ font-weight: 400;
+ font-size: 30rpx;
+ color: #666666;
+ position: relative;
+ margin-right: 50rpx;
+ &:last-child {
+ margin: 0 !important;
+ }
+ .index-labs-row-x {
+ position: absolute;
+ bottom: 0;
+ left: 50%;
+ width: 40rpx;
+ height: 4rpx;
+ background-color: #00BC12;
+ transform: translate(-50%, 0);
+ }
}
}
}
--
Gitblit v1.9.3