ll
liukangdong
2025-02-25 5857dfa10b70a061b8e4711dd8f18b585ac6fc23
admin/src/views/platform/LogisticsRecord/leaveAuth.vue
@@ -16,14 +16,19 @@
    </div>
    <el-table class="mb20" v-loading="loading" :data="list" stripe>
      <el-table-column type="index" label="序号" width="70" show-overflow-tooltip />
      <el-table-column prop="billCode" label="运单号" min-width="100" show-overflow-tooltip />
      <el-table-column prop="billCode" label="运单号/合同号" min-width="100" show-overflow-tooltip>
        <template v-slot="scope">
          <span>{{ scope.row.billCode || scope.row.contractNum }}</span>
        </template>
      </el-table-column>
      <!-- <el-table-column prop="totalNum" label="总作业量(万支)" min-width="100" show-overflow-tooltip /> -->
      <el-table-column prop="carCodeFront" label="车牌号" min-width="100" show-overflow-tooltip />
      <el-table-column prop="carCodeBack" label="电子锁状态" min-width="100" show-overflow-tooltip>
        <template v-slot="scope">
          <span class="red" v-if="scope.row.lockStatus == 0">未上锁</span>
          <span class="red" v-if="scope.row.lockStatus == 1">部分上锁</span>
          <span v-if="scope.row.lockStatus == 2">全部上锁</span>
          <span class="red" v-if="scope.row.billCode && scope.row.lockStatus == 0">未上锁</span>
          <span class="red" v-if="scope.row.billCode && scope.row.lockStatus == 1">部分上锁</span>
          <span v-if="scope.row.billCode && scope.row.lockStatus == 2">全部上锁</span>
          <span v-if="!scope.row.billCode">-</span>
        </template>
      </el-table-column>
      <el-table-column prop="carrierName" label="运输公司" min-width="100" show-overflow-tooltip />
@@ -46,8 +51,9 @@
      <el-table-column prop="remark" label="备注" min-width="150" show-overflow-tooltip />
      <el-table-column label="操作" align="center" fixed="right" min-width="100" show-overflow-tooltip>
        <template v-slot="scope">
          <el-button type="text" v-permissions="['business:platformbooks:detail']"
          <el-button v-if="scope.row.status == 6" type="text" v-permissions="['business:platformbooks:detail']"
            @click="handleAuth(scope.row)">离园授权</el-button>
          <span v-else>-</span>
        </template>
      </el-table-column>
    </el-table>
@@ -100,7 +106,7 @@
            label: '合同号'
          },
          {
            filed: 'code',
            filed: 'billCode',
            type: 'input',
            label: '运单号'
          },
@@ -115,9 +121,18 @@
            label: '驾驶员'
          },
          {
            filed: 'queryStatusForPower',
            type: 'select',
            label: '授权状态',
            options: [
              { value: '9,10', label: '已授权' },
              { value: '6', label: '未授权' }
            ]
          },
          {
            filed: 'selDate',
            type: 'datetimerange',
            label: '操作时间',
            label: '作业完成时间搜索',
            pickerOptions: {}
          },
          {
@@ -152,10 +167,11 @@
      platformJobPage({
        model: {
          ...filters,
          queryStatus: '6,9,10',
          beginWorkDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
          beginWorkDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null,
          queryStatus: '6,9,10,2,3,4',
          beginDoneDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
          beginDoneDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null,
        },
        sorts: [{ direction: 'DESC', property: 'DONE_DATE' }],
        capacity: pagination.pageSize,
        page: page || pagination.page,
      }).then(res => {
@@ -174,8 +190,8 @@
      this.$prompt('备注', '离园授权', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
      }).then(({ remark }) => {
        platformPowerLevel({ jobId: row.id, remark }).then(res => {
      }).then(({ value }) => {
        platformPowerLevel({ jobId: row.id, remark: value }).then(res => {
          Message.success('离园授权成功')
          this.getList()
        })
@@ -206,7 +222,6 @@
      this.pagination.page = 1
      this.filters = {
        selDate: [],
        fastdate: 0
      }
      this.getList()
    },
@@ -221,6 +236,7 @@
    },
    handleSizeChange(capacity) {
      this.pagination.pageSize = capacity
      this.getList()
    }
  }
}