jiangping
2025-03-03 edce1f4bd7767b1a62fb70fd926b98796498c6d4
admin/src/views/operation/serviceCar/apprRecord.vue
@@ -56,7 +56,7 @@
          <el-option label="市外用车" value="1"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="出发时间" prop="startTime">
      <el-form-item label="申请时间" prop="startTime">
        <el-date-picker
          @change="seleTime"
          v-model="time"
@@ -184,7 +184,7 @@
        ></el-table-column>
        <el-table-column
          label="操作"
          min-width="160"
          min-width="180"
          align="center"
          fixed="right"
        >
@@ -196,7 +196,10 @@
              >查看详情</el-button
            >
            <!-- <el-button v-if="(row.status === 1 || row.status === 2) && new Date().getTime() < new Date(row.startTime).getTime()" type="text" icon="el-icon-delete" @click="rowRevokeClick(row)" >撤销</el-button> -->
            <el-button style="color: red"   v-if="    (row.status === 0 || row.status === 1 || row.status === 2) && new Date().getTime() < new Date(row.startTime).getTime() "  type="text"  icon="el-icon-delete"   @click="rowRevokeClick(row)" >撤销</el-button>
            <el-button style="color: red" v-if="row.hasRole ==1"  type="text"  icon="el-icon-delete"   @click="rowRevokeClick(row)" >撤销</el-button>
<!--
            <el-button style="color: red"   v-if="(row.status === 0 && row.creator == userInfo.id)||((row.status === 0 || row.status === 1 ) || ( row.status === 2 && new Date().getTime() < new Date(row.startTime).getTime() ))"  type="text"  icon="el-icon-delete"   @click="rowRevokeClick(row)" >撤销</el-button>
-->
            <el-button  style="color: red" type="text"  icon="el-icon-delete"   @click="deleteById(row)" >删除</el-button>
          </template>
        </el-table-column>
@@ -254,6 +257,7 @@
  components: { TableLayout, Pagination, OperaCarUseBookWindow, OperaCarUseBookParamWindow },
  data () {
    return {
      // userInfo: this.$store.state.userInfo,
      // 搜索
      searchForm: {
        memberName: '',
@@ -283,7 +287,7 @@
      'field.main': 'id'
    })
    // this.search()
    this.changeRadio('0')
    this.changeRadio(0)
    this.loadParams()
  },
  methods: {
@@ -321,15 +325,15 @@
    },
    changeRadio (e) {
      this.searchForm.radio = e
      if (e === '0') {
      if (e == 0) {
        this.searchForm.queryStartTime = timeForMat(0)[0]
        this.searchForm.queryEndTime = timeForMat(0)[1]
        this.time = timeForMat(0)
      } else if (e === '1') {
      } else if (e == 1) {
        this.searchForm.queryStartTime = timeForMat(6)[0]
        this.searchForm.queryEndTime = timeForMat(6)[1]
        this.time = timeForMat(6)
      } else if (e === '2') {
      } else if (e == 2) {
        this.searchForm.queryStartTime = timeForMat(29)[0]
        this.searchForm.queryEndTime = timeForMat(29)[1]
        this.time = timeForMat(29)
@@ -361,15 +365,19 @@
        })
    },
    seleTime (e) {
      this.searchForm.queryStartTime = e[0]
      this.searchForm.queryEndTime = e[1]
      this.searchForm.queryStartTime = null
      this.searchForm.queryEndTime = null
      if (e != null && e.length >= 2) {
        this.searchForm.queryStartTime = e[0]
        this.searchForm.queryEndTime = e[1]
      }
      this.searchForm.radio = null
      this.search()
    },
    reset () {
      this.$refs.searchForm.resetFields()
      this.searchForm.radio = '0'
      this.changeRadio('0')
      this.searchForm.radio = 0
      this.changeRadio(0)
      // this.search()
    }
  }