doum
2025-09-15 82735e4d46ac7b9969facef2acc8f8e793b68f71
small-program/pages/index/index.vue
@@ -2,6 +2,10 @@
   <view class="index">
      <!-- 接单方 -->
      <view class="index-j" v-if="userInfo && userInfo.useIdentity === 1">
         <view class="kefubtn" @click="contactPhone()">
            <image style="width: 36rpx;height: 36rpx" src="/static/icon/ic_kefu.png" mode="widthFix"></image>
            <text>客服</text>
         </view>
         <view class="index-j-head">
            <view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
            <view class="index-c-title" :style="{ height: navHeight + 'px' }">
@@ -21,55 +25,63 @@
         </view>
         <view class="index-j-list">
            <view class="index-list-item" v-if="orderList && orderList.length" v-for="(item, index) in orderList" :key="index">
               <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  @click="goOrderDetail(item.id)">
                  <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">{{item.distance}}km</view>
                  </view>
                  <view class="index-list-item-head-r">{{item.distance}}km</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.priceNum1}}人
               </view>
               <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 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}}天
               </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-if="item.wayInfo" 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>{{item.location}}</text>
                  <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 0">
                     {{item.categoryName}}|{{item.priceNum1}}斤
                  </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 class="index-list-item-info" v-if="item.type === 0 && item.workType === 1">
                     {{item.categoryName}}|{{item.priceNum2}}人
                  </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 class="index-list-item-info" v-if="item.type === 0 && item.workType === 2&& item.carType === 0">
                     {{item.categoryName}}|{{item.priceNum1}}天 |{{item.priceNum2}}人
                  </view>
               </template>
               <view class="index-list-item-price">
                  <text>预估:</text>
                  <text>¥{{item.estimatedAccount / 100}}</text>
                  <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-if="item.wayInfo" 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>预估:</text>
                     <text>¥{{item.estimatedAccount / 100}}</text>
                  </view>
               </view>
               <view class="eidt">
                  <!-- <sunui-mverify @change="getaccept($event, item.id, index)"></sunui-mverify> -->
@@ -82,7 +94,7 @@
      </view>
      
      <!-- 发单方  -->
      <view class="index-c" v-if="!userInfo || userInfo.useIdentity === 0">
      <view class="index-c" v-if="!isLogin || !userInfo || userInfo.useIdentity === 0">
         <view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
         <view class="index-c-title" :style="{ height: navHeight + 'px' }" @click="selectAddress(-1)">
            <text class="index-c-title-logo">近快</text>
@@ -125,7 +137,7 @@
                              </view>
                              <view class="radio-item-list-data">
                                 <text style="flex-shrink: 0;">份数:</text>
                                 <input type="number" v-model="item.num" placeholder="请输入">
                                 <input type="digit" v-model="item.num" placeholder="请输入">
                                 <text style="color: #999999;">份</text>
                                 <view class="radio-item-list-data-btn" @click="clear(index)">取消</view>
                              </view>
@@ -146,29 +158,30 @@
                        <input type="text" v-model="form.locationRemark" placeholder="请输入" />
                     </view>
                  </view>
                  <view class="list-item-row" v-if="viewStatus">
                  <view class="list-item-row"  >
                     <view class="list-item-row-label">需求补充</view>
                     <view class="list-item-row-val">
                        <textarea v-model="form.supplement" cols="30" rows="10" placeholder="请输入" maxlength="200"></textarea>
                     </view>
                  </view>
                  <view class="list-item-row" v-if="viewStatus">
                  <view class="list-item-row"  >
                     <view class="list-item-row-label">图片</view>
                     <view class="list-item-row-upload">
                        <view class="upload-item" v-if=" form.multifileList" v-for="(item, index) in form.multifileList" :key="index">
                        <view class="upload-item" v-if=" form.multifileList" v-for="(item, index) in form.multifileList" :key="index" @click="preview(index, form.multifileList)">
                           <image :src="item.url" mode="widthFix"></image>
                           <image class="upload-item-dele" @click="form.multifileList.splice(index, 1)" src="/static/icon/ic_delete1@2x.png" mode="widthFix"></image>
                           <image class="upload-item-dele" @click.stop="form.multifileList.splice(index, 1)" src="/static/icon/ic_delete1@2x.png" mode="widthFix"></image>
                        </view>
                        <view class="upload-item" @click="uploadImg">
                           <u-icon name="plus" color="#999999" size="24"></u-icon>
                           <text>点击上传</text>
                        </view>
                        <view style="width: 208rpx; height: 0;"></view>
                     </view>
                  </view>
                  <view class="list-item-zk" @click="viewStatus = !viewStatus">
                  <!-- <view class="list-item-zk" @click="viewStatus = !viewStatus">
                     <text>{{viewStatus ? '收起' : '补充需求'}}</text>
                     <u-icon :name="viewStatus ? 'arrow-up' : 'arrow-down'" color="#00BC12" size="16"></u-icon>
                  </view>
                  </view> -->
               </view>
               <view class="list-item">
                  <view class="list-item-label">联系人信息</view>
@@ -321,11 +334,21 @@
         <view class="phone">
            <view class="phone-head">
               <view></view>
               <text>客服电话</text>
               <text>联系客服</text>
            </view>
             <view class="phone-item" v-if="serverPhone" v-for="(item,index) in serverPhone"    :key="item" @click="contactPhoneDo(item)">
                <view></view>
                <text>{{item}}</text>
            <view class="phone-item">
               <view>
                  <image style="width: 36rpx;height: 36rpx" src="/static/icon/ic_kefu.png" mode="widthFix"></image>
                  <button open-type="contact" plain="true" bindcontact="handleContact">在线客服</button>
               </view>
                <view class="line" v-if="serverPhone && serverPhone.length"></view>
            </view>
             <view class="phone-item" v-if="serverPhone" v-for="(item,index) in serverPhone"  :key="item" @click="contactPhoneDo(item)">
                <view>
                  <image src="/static/icon/ic_call@2x.png" mode="widthFix"></image>
                  <text>{{item}}</text>
               </view>
                <view class="line" v-if="index<serverPhone.length-1"></view>
             </view>  
             <view style="width: 100%; height: 30rpx;"></view>
            <!-- <view class="phone-botton"  @click="contactPhone()" >关闭</view> -->
@@ -416,7 +439,7 @@
            carRemark: '',
            
            orderFood: [],
            viewStatus: false,
            viewStatus: true,
            
            form: {
               startDate: '',
@@ -519,7 +542,7 @@
            this.isLogin = false
            console.log('未登陆')
         }
         this.payOrderId=null
         // this.payOrderId=null
      },
      watch: {
         typeId: {
@@ -561,13 +584,21 @@
         }
      },
      methods: {
         preview(current, arr) {
            let urls = arr.map(item => item.url || item.fileurlFull)
            uni.previewImage({ current, urls })
         },
         goOrderDetail(id){
            uni.navigateTo({
               url: `/pages/order-details/order-details?id=`+id
               url: '/pages/order-details/order-details?id='+id
            })
            this.orderId=null
            this.payOrderId=null
            this.show2=false
            var that =this
            setTimeout(function(){
               that.orderId=null
               that.payOrderId=null
               that.show2=false
            },1000)
         },
         clearFormParam(){
            this.form.startDate = ''
@@ -772,7 +803,7 @@
                           fail(err) {
                              that.payOrderId = res.data.id
                              that.show2=true
                              console.log(err)
                              console.log("=====================",    res.data.id,that.payOrderId,err)
                           }
                        })
                     }
@@ -1043,6 +1074,33 @@
         border-radius: 44rpx;
      }
      .index-j {
         .kefubtn{
            background-color: white;
            display: flex;
            justify-content: center;
            align-items: center;
            position: fixed;
            bottom: 100rpx;
            flex-direction: column;
            right:30rpx;
            height: 88rpx;
            width: 88rpx;
            border: 1rpx solid #f2f2f2;
            border-radius: 50%;
            image{
               width: 36rpx;
               width: 36rpx;
            }
            text{
               width: 44rpx;
               height: 32rpx;
               font-weight: 400;
               font-size: 22rpx;
               color: #222222;
               line-height: 32rpx;
               text-align: center;
            }
         }
         width: 100%;
         .index-j-head {
            width: 100%;
@@ -1531,19 +1589,19 @@
                     width: 100%;
                     display: flex;
                     align-items: center;
                     justify-content: space-between;
                     flex-wrap: wrap;
                     padding: 30rpx 0;
                     box-sizing: border-box;
                     .upload-item {
                        width: 156rpx;
                        height: 156rpx;
                        width: 208rpx;
                        height: 208rpx;
                        display: flex;
                        align-items: center;
                        flex-direction: column;
                        justify-content: center;
                        background: #F8F9FB;
                        border-radius: 8rpx;
                        margin-right: 20rpx;
                        border: 2rpx solid #EEEEEE;
                        position: relative;
                        &:last-child {
@@ -2033,12 +2091,34 @@
               color: #222222;
            }
         }
         .phone-item {
            width: 100%;
            text-align: center;
            justify-content: space-between;
            border-bottom: 1rpx solid #eeeeee;
            display: flex;
            justify-content: center;
            flex-direction: column;
            // border-bottom: 1rpx solid #eeeeee;
            line-height: 78rpx;
            button{
               border: 1rpx white solid;
               display: inline;
               width: 300rpx;
               font-weight: 500;
               font-size: 32rpx;
               line-height: 32rpx;
               color: #222222;
            }
            image{
               width: 28rpx;
               height: 28rpx;
               margin-right: 30rpx;
            }
            .line{
               width: 100%;
               height: 1rpx;
               background-color: #f2f2f2
            }
            text {
               font-weight: 500;
               font-size: 28rpx;