doum
2025-09-04 9d901b4215323c97a00a068cd962f5c9c04dadfa
admin/src/components/business/OperaOrderDetailWindow.vue
@@ -11,9 +11,10 @@
      <div class="renzheng" >
        <div class="info" >
            <span class="m10">订单信息</span>
            <el-tag type="primary" class="ml10 tag2" v-if="info.status == 0||info.status == 1||info.status == 3">{{ info.statusName }}</el-tag>
            <el-tag type="primary" class="ml10 tag2" v-if="info.status == 0||info.status == 1||info.status == 2||info.status == 3">{{ info.statusName }}</el-tag>
            <el-tag type="success" class="ml10 tag2" v-if="info.status == 4">{{ info.statusName }}</el-tag>
            <el-tag type="danger" class="ml10 tag2" v-if="info.status == 99">{{ info.statusName }}</el-tag>
            <div style="display: inline-block;float: right;font-size: 12px"><el-button icon="el-icon-timer" type="primary" @click="showLogList" >订单流转日志</el-button></div>
        </div>
        <div class="detail" >
          <div class="line">
@@ -55,12 +56,13 @@
              <span class="txt" v-if="info.type==0">{{(info.workType==0?'采摘工':(info.workType==1?'分拣工':'包装工')) }}</span>
              <span v-else>-</span>
            </div>
            <div  class="cont"><span class="label">采摘品种:</span> <span class="txt">{{info.categoryName || ''}}</span></div>
            <div  class="cont"><span class="label">品种:</span> <span class="txt">{{info.categoryName || ''}}</span></div>
          </div>
          <div class="line">
            <div class="cont"><span class="label">采摘重量:</span> <span class="txt">{{info.priceNum1 || '' }}斤</span></div>
            <div class="cont"  v-if="info.workType==1"><span class="label">人数:</span> <span class="txt">{{info.priceNum1 || '' }}人</span></div>
            <div class="cont"  v-if="info.workType==0"><span class="label">重量:</span> <span class="txt">{{info.priceNum1 || '' }}斤</span></div>
            <div class="cont"><span class="label">用工时间:</span><span class="txt">{{info.startDate|| '' }}-{{info.endDate|| '' }}</span></div>
            <div class="cont"><span class="label">用工天数:</span><span class="txt">{{info.totalDays || 0 }}</span></div>
            <div class="cont"><span class="label">用工天数:</span><span class="txt">{{info.totalDays || 0 }}天</span></div>
          </div>
          <div class="line">
            <div class="cont"><span class="label">用工地点:</span> <span class="txt">{{info.location || '' }}</span></div>
@@ -82,7 +84,7 @@
          <div class="line" v-if="info.multifileList && info.multifileList.length>0">
            <div class="cont">
              <template v-if="info.multifileList && info.multifileList.length>0">
              <div v-for="item in info.multifileList" style="display: inline-block" :key="item">
              <div v-for="item in info.multifileList" style="display: inline-block" :key="'aaa'+item.id">
                <el-image v-if="item.fileurlFull" style="width: 50px; height: 50px; margin-right: 10px" :src="item.fileurlFull"
                          :preview-src-list="[info.fileurlFull]">
                </el-image>
@@ -95,25 +97,186 @@
            <div  style="margin-top: 20px"> <span class="label">  审核信息:</span> <span class="txt">{{info.auditRemark || '' }}</span></div>
          </div>
        </div>
        <div class="detail" v-if="info.type==1">
          <div class="line">
            <div class="cont"><span class="label"> 订单类型:</span> <span class="txt">{{(info.type==0?'用工单':(info.type==1?'货运单':'订单单')) }}</span></div>
            <div  class="cont"><span class="label">车辆:</span> <span class="txt">{{info.categoryName || ''}}-{{info.carUnit || ''}}</span></div>
            <div  class="cont"><span class="label">用车时间:</span> <span class="txt">{{info.startDate|| '' }}-{{info.endDate|| '' }}</span></div>
          </div>
          <div class="line">
            <div class="cont" >  <span class="label"> 地址信息:</span> <span class="label" v-if="!wayList || wayList.length==0">-</span> </div>
          </div>
          <div class="line"  v-if="wayList && wayList.length>0">
            <div class="cont"  style="padding-left: 40px;background-color: #e4ecfe">
                <div v-for="(item,index) in wayList" style="display: block;margin: 10px" :key="'bbb'+index">
                   <span v-if="index == 0">用车起点:{{item.location || ''}}</span>
                   <span v-if="index >0 && index < wayList.length-1">途经地点:{{item.location || ''}}</span>
                   <span v-if="index == wayList.length-1">用车终点:{{item.location || ''}}</span>
                </div>
            </div>
          </div>
          <div class="line">
            <div class="cont"><span class="label">用工天数:</span><span class="txt">{{info.totalDays || 0 }}</span></div>
            <div class="cont"><span class="label">运输重量/数量:</span> <span class="txt">{{info.transportNum || '' }}{{info.transportUnit || ''}}</span></div>
            <div class="cont"><span class="label">费用标准:</span><span class="txt">{{((info.price||0)/100).toFixed(2) }}{{info.priceUnit || '' }}</span></div>
          </div>
          <div class="line">
            <div class="cont"><span class="label">预估总费用:</span><span class="txt yellowbtn">{{((info.estimatedAccount||0)/100).toFixed(2) }}元</span></div>
          </div>
          <div class="line">
            <div class="cont" ><span class="label">需求补充:</span><span class="txt">{{info.supplement || '' }}</span></div>
          </div>
          <div class="line">
            <div class="cont">
              <span class="label">图片:</span>
              <span class="txt" v-if="!info.multifileList || info.multifileList.length ==0">无</span>
            </div>
          </div>
          <div class="line" v-if="info.multifileList && info.multifileList.length>0">
            <div class="cont">
              <template v-if="info.multifileList && info.multifileList.length>0">
                <div v-for="item in info.multifileList" style="display: inline-block" :key="item.id">
                  <el-image v-if="item.fileurlFull" style="width: 50px; height: 50px; margin-right: 10px" :src="item.fileurlFull"
                            :preview-src-list="[info.fileurlFull]">
                  </el-image>
                </div>
              </template>
            </div>
          </div>
        </div>
        <div class="detail" v-if="info.type==2">
          <div class="line">
            <div class="cont"><span class="label">订单类型:</span> <span class="txt">{{(info.type==0?'用工单':(info.type==1?'货运单':'订单单')) }}</span></div>
            <div class="cont"><span class="label">用餐时间:</span><span class="txt">{{info.startDate|| '' }}-{{info.endDate|| '' }}</span></div>
            <div class="cont"><span class="label">用餐天数:</span><span class="txt">{{info.totalDays || 0 }}</span></div>
          </div>
          <div class="line">
            <div class="cont"><span class="label">用餐地点:</span><span class="txt">{{info.location || '' }}</span></div>
            <div class="cont"  style="flex: 2" >
              <span class="label"> 餐标/份数:</span>
              <span v-for="(item,index) in wayList"   :key="'bbb'+index">
                 {{item.name || ''}}{{((item.price||0)/100).toFixed(2)}}元{{item.num||0}}份{{index != wayList.length-1?'|':''}}
              </span>
              <span class="label" v-if="!wayList || wayList.length==0">-</span>
            </div>
          </div>
          <div class="line">
            <div class="cont"  ><span class="label">地点描述:</span><span class="txt">{{info.locationRemark || '' }}</span></div>
          </div>
          <div class="line">
            <div class="cont" ><span class="label">需求描述:</span><span class="txt">{{info.supplement || '' }}</span></div>
          </div>
          <div class="line">
            <div class="cont">
              <span class="label">图片:</span>
              <span class="txt" v-if="!info.multifileList || info.multifileList.length ==0">无</span>
            </div>
          </div>
          <div class="line" v-if="info.multifileList && info.multifileList.length>0">
            <div class="cont">
              <template v-if="info.multifileList && info.multifileList.length>0">
                <div v-for="item in info.multifileList" style="display: inline-block" :key="'aaa'+item.id">
                  <el-image v-if="item.fileurlFull" style="width: 50px; height: 50px; margin-right: 10px" :src="item.fileurlFull"
                            :preview-src-list="[info.fileurlFull]">
                  </el-image>
                </div>
              </template>
            </div>
          </div>
        </div>
      </div>
      <div class="renzheng" v-if="(info.type ===0 || info.type===1)&&(info.status===5|| info.status===4)" >
        <div class="info" >
          <span class="m10">费用确认</span>
        </div>
        <div class="detail" style=" ">
          <div class="line">
            <div class="cont"><span class="label">实际{{feeFrom.priceParam1.name }}:</span><span class="txt">{{info.priceNum1 || 0 }}{{feeFrom.priceParam1.unit }}</span></div>
            <div class="cont" v-if="feeFrom.priceParam2.name!=null"><span class="label">实际{{feeFrom.priceParam2.name }}:</span><span class="txt">{{info.priceNum2 || 0 }}{{feeFrom.priceParam2.unit }}</span></div>
            <div class="cont"  :style="feeFrom.priceParam2.name!=null?'':'flex: 2'"><span class="label">其他费用:</span> <span class="txt">{{((info.confirmOtherFee||0)/100).toFixed(2) }}元</span></div>
          </div>
          <div class="line">
            <div class="cont"><span class="label">实际总费用:</span><span class="txt yellowbtn">{{((info.estimatedAccount||0)/100).toFixed(2) }}元</span></div>
            <div class="cont"  style="flex: 2"><span class="label">备注:</span><span class="txt">{{info.confirmFeeRemark || '' }}</span></div>
          </div>
        </div>
      </div>
      <div class="renzheng" >
        <div class="info" >
          <span class="m10">发单方信息</span>
        </div>
        <div class="detail" >
          <div class="line">
            <div class="cont"><span class="label">昵称:</span> <span class="txt">{{ info.releaseName||'' }}</span></div>
            <div  class="cont"  ><span class="label">联系方式:</span> <span class="txt ">{{ info.releasePhone||'' }}</span></div>
            <div  class="cont" ><span class="label">其他联系人:</span> <span class="txt ">{{ info.linkName||'' }}-{{ info.linkPhone||'未设置' }}</span></div>
          </div>
        </div>
      </div>
      <div class="renzheng" >
        <div class="info" >
          <span class="m10">接单方信息</span>
        </div>
        <div class="detail" >
          <div class="line">
            <div class="cont"><span class="label">姓名/单位:</span> <span class="txt">{{ info.acceptName||'' }}</span></div>
            <div  class="cont" style="flex: 2"><span class="label">联系方式:</span> <span class="txt ">{{ info.acceptPhone||'' }}</span></div>
          </div>
        </div>
      </div>
      <div class="renzheng" >
        <div class="info" >
          <span class="m10">评价信息</span>
        </div>
        <div class="detail" >
          <div class="line">
            <div class="cont"><span class="label">{{info.commentType ==1 ?'系统自动评价':'发单方评价'}}</span> <span class="txt">{{ info.commentTime}}</span></div>
          </div>
          <div class="line">
            <div class="cont">
              <el-button class="label" :class="getScoreLevel(1)" style="border: none;cursor: default" icon="el-icon-star-on"></el-button>
              <el-button class="label" :class="getScoreLevel(2)" style="border: grey;cursor: default" icon="el-icon-star-on"></el-button>
              <el-button class="label" :class="getScoreLevel(3)" style="border: grey;cursor: default" icon="el-icon-star-on"></el-button>
              <el-button class="label" :class="getScoreLevel(4)" style="border: grey;cursor: default" icon="el-icon-star-on"></el-button>
              <el-button class="label" :class="getScoreLevel(5)" style="border: grey;cursor: default" icon="el-icon-star-on"></el-button>
            </div>
          </div>
          <div class="line">
            <div class="cont"><span class="label">评价内容:</span> <span class="txt">{{ info.commentInfo || '-'}}</span></div>
          </div>
        </div>
      </div>
    </div>
    <orderProgress ref ='orderProgress'></orderProgress>
  </GlobalWindow>
</template>
<script>
import GlobalWindow from '@/components/common/GlobalWindow'
import BaseOpera from '@/components/base/BaseOpera'
import { getById,cancel } from '@/api/business/orders'
import orderProgress from '@/components/business/orderProgress'
import { getById, cancel } from '@/api/business/orders'
export default {
  components: {
    GlobalWindow
    GlobalWindow, orderProgress
  },
  extends: BaseOpera,
  data () {
    return {
      id: '',
      wayList: [],
      info: {},
      loading: false
      loading: false,
      feeFrom: {
        priceParam1: {
          name: null,
          unit: null
        },
        priceParam2: {
          name: null,
          unit: null
        }
      }
    }
  },
  methods: {
@@ -122,6 +285,17 @@
      this.visible = true
      this.tableData2 = []
      this.id = row.id
      this.wayList = []
      this.feeFrom = {
        priceParam1: {
          name: null,
          unit: null
        },
        priceParam2: {
          name: null,
          unit: null
        }
      }
      this.getData()
    },
    getData () {
@@ -129,11 +303,24 @@
        .then(res => {
          this.info = res
          this.visible = true
          console.log(this.info)
          if (this.info.wayInfo) {
            this.wayList = JSON.parse(this.info.wayInfo)
          }
          this.initPriceNumParam()
          console.log(this.wayList)
        })
    },
    close () {
    },
    showLogList () {
      this.$refs.orderProgress.open('订单流转日志', this.info.orderLogList || [])
    },
    getScoreLevel (num) {
      if (this.info.commentLevel && this.info.commentLevel >= num) {
        return 'staron'
      }
      return 'staroff'
    },
    checkDo (status) {
      console.log(this.$refs.formCheck.length)
@@ -162,6 +349,54 @@
              })
          })
      })
    },
    initPriceNumParam () {
      this.feeFrom.priceParam1.name = null
      this.feeFrom.priceParam1.unit = null
      this.feeFrom.priceParam2.name = null
      this.feeFrom.priceParam2.unit = null
      if (this.info.type === 0 && this.info.workType === 1) {
        // 分拣工
        this.feeFrom.priceParam1.name = '用工天数:'
        this.feeFrom.priceParam1.unit = '天'
        this.feeFrom.priceParam2.name = '用工人数:'
        this.feeFrom.priceParam2.unit = '人'
      } else if (this.info.type === 0 && this.info.workType === 0) {
        // 采摘工
        this.feeFrom.priceParam1.name = '采摘重量:'
        this.feeFrom.priceParam1.unit = '斤'
        this.feeFrom.priceParam2.name = null
        this.feeFrom.priceParam2.unit = null
      } else if (this.info.type === 0 && this.info.workType === 2) {
        // 包装工
        if (this.info.carType === 0) {
          // 按天
          this.feeFrom.priceParam1.name = '用工天数'
          this.feeFrom.priceParam1.unit = '天'
          this.feeFrom.priceParam2.name = '用工人数'
          this.feeFrom.priceParam2.unit = '人'
        } else if (this.info.carType === 1) {
          // 按小时
          this.feeFrom.priceParam1.name = '工作时长'
          this.feeFrom.priceParam1.unit = '时'
          this.feeFrom.priceParam2.name = '用工人数'
          this.feeFrom.priceParam2.unit = '人'
        } else if (this.info.carType === 1) {
          // 按小时
          this.feeFrom.priceParam1.name = '包装重量'
          this.feeFrom.priceParam1.unit = '斤'
          this.feeFrom.priceParam2.name = null
          this.feeFrom.priceParam2.unit = null
        }
      } else if (this.info.type === 1 && this.info.carType === 0) {
        // 运货单 按天数
        this.feeFrom.priceParam1.name = '用车天数'
        this.feeFrom.priceParam1.unit = '天'
      } else if (this.info.type === 1 && this.info.carType === 1) {
        // 运货单 按次数
        this.feeFrom.priceParam1.name = '用车次数'
        this.feeFrom.priceParam1.unit = '次'
      }
    }
  }
}
@@ -178,8 +413,14 @@
  z-index: 999;
  padding: 16px;
}
.staroff{
  color: #8c939d !important;
}
.staron{
  color: #ff4d00 !important;
}
.renzheng{
  margin: 0px 0px 50px 20px;
  margin: 0px 0px 30px 20px;
  width: calc(100% - 60px);
  .detail{
    font-size: 14px;