ll
liukangdong
2025-03-11 8093070b19412312f64046244ebf9ed9c5c77a7b
admin/src/views/platform/LogisticsRecord/waybill.vue
@@ -14,7 +14,7 @@
      <el-button :loading="exLoading" @click="handleEx"
        v-permissions="['business:platformjob:exportExcel']">导出</el-button>
    </div>
    <el-table class="mb20" v-loading="loading" :data="list" stripe>
    <el-table :height="tableHeightNew" v-loading="loading" :data="list" stripe>
      <el-table-column prop="billCode" 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 /> -->
@@ -22,8 +22,13 @@
      <el-table-column prop="carrierName" label="运输公司" min-width="100" show-overflow-tooltip />
      <el-table-column prop="driverName" label="司机" min-width="100" show-overflow-tooltip />
      <el-table-column prop="drivierPhone" label="司机电话" min-width="100" show-overflow-tooltip />
<!--      <el-table-column prop="wmsContractNum" label="WMS合同号" min-width="100" show-overflow-tooltip >
      <template v-slot="scope">
        <span v-if="scope.row.platformWmsJob">{{ scope.row.platformWmsJob.contractNum }}</span>
      </template>
      </el-table-column>-->
      <el-table-column prop="inTypeTemp" label="作业类型" min-width="100" show-overflow-tooltip>
        <template v-slot="scope">
        <template v-slot="scope">
          <span v-if="scope.row.type == '0'">自有车卸货</span>
          <span v-if="scope.row.type == '1'">自有车装货</span>
          <span v-if="scope.row.type == '2'">外协车卸货</span>
@@ -39,8 +44,8 @@
      </el-table-column>
      <el-table-column prop="name" label="操作" min-width="120" align="center" fixed="right" show-overflow-tooltip>
        <template v-slot="scope">
          <el-button v-if="scope.row.status == '12'" type="text" class="red" v-permissions="['business:platformjob:delete']"
            @click="handleDel(scope.row)">删除</el-button>
          <el-button v-if="scope.row.status == '12'" type="text" class="red"
            v-permissions="['business:platformjob:delete']" @click="handleDel(scope.row)">删除</el-button>
          <el-button v-if="scope.row != 12" type="text" v-permissions="['business:platformjob:query']"
            @click="handleDetail(scope.row)">运单详情</el-button>
        </template>
@@ -63,7 +68,9 @@
import UploadFaceImg from '@/components/common/UploadFaceImg'
import { Message } from 'element-ui'
import dayjs from 'dayjs'
import BaseComputHeight from "@/components/base/BaseComputHeight";
export default {
  extends: BaseComputHeight,
  components: {
    Pagination,
    QueryForm,
@@ -84,7 +91,9 @@
      },
      filters: {
        selDate: [],
        fastdate: 0
        fastdate: 0,
        createDateStart: '',
        createDateEnd: ''
      },
      list: [],
      queryFormConfig: {
@@ -98,6 +107,11 @@
            filed: 'driverName',
            type: 'input',
            label: '驾驶员'
          },
          {
            filed: 'wmsContractNum',
            type: 'input',
            label: '合同号'
          },
          {
            filed: 'carCodeFront',
@@ -125,10 +139,10 @@
            ]
          },
          {
            filed: 'selDate',
            type: 'datetimerange',
            label: '操作时间',
            pickerOptions: {}
            filed1: 'createDateStart',
            filed2: 'createDateEnd',
            type: 'datetime',
            label: '操作时间'
          },
          {
            type: 'slot',
@@ -142,19 +156,20 @@
  },
  created() {
    this.changeRadio('0')
    this.getList()
  },
  methods: {
    changeRadio(day) {
      const arr = [dayjs().subtract(day, 'day').format('YYYY-MM-DD') + ' 00:00:00', dayjs().format('YYYY-MM-DD') + ' 23:59:59']
      this.$set(this.filters, 'selDate', arr)
      this.getList()
      this.filters.createDateStart = arr[0]
      this.filters.createDateEnd = arr[1]
      this.getList(1)
    },
    changeForm(str) {
      if (str === 'selDate') {
        this.$set(this.filters, 'fastdate', null)
        this.getList()
      if(this.filters.createDateStart > this.filters.createDateEnd){
        this.filters.createDateStart = this.filters.createDateEnd
        return this.$message.error('开始时间不能大于结束时间')
      }
      this.getList()
    },
    getList(page) {
      const { pagination, filters } = this
@@ -162,10 +177,8 @@
      platformJobPage({
        model: {
          ...filters,
          jobType: '0',
          createDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null,
          createDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null,
        },
          jobType: '0'
         },
        capacity: pagination.pageSize,
        page: page || pagination.page,
      }).then(res => {
@@ -181,7 +194,7 @@
      })
    },
    handleDel(row) {
      this.$dialog.exportConfirm('确认删除吗?').then(() => {
      this.$dialog.deleteConfirm('确认删除吗?').then(() => {
        platformJobDel(row.id).then(res => {
          Message.success('删除成功')
          this.getList()
@@ -192,11 +205,15 @@
      this.$dialog.exportConfirm('确认导出吗?')
        .then(() => {
          this.exLoading = true
          const { filters } = this
          platformJobExport({
            page: this.pagination.page,
            capacity: 1000000,
            jobType: '0',
            model: this.filters
            model: {
              ...filters,
              jobType: '0'
            }
          })
            .then(response => {
              this.download(response)
@@ -211,11 +228,9 @@
    },
    clear() {
      this.pagination.page = 1
      this.filters = {
        selDate: [],
        fastdate: 0
      }
      this.getList()
      this.filters = {}
      this.getList(0)
      // this.changeRadio('0')
    },
    handleDetail(row) {
      this.isShowDetail = true
@@ -227,6 +242,7 @@
    },
    handleSizeChange(capacity) {
      this.pagination.pageSize = capacity
      this.getList()
    }
  }
}
@@ -238,4 +254,4 @@
  color: #000000;
  margin-bottom: 15px;
}
</style>
</style>