MrShi
2024-03-01 4b21a465f3c48120f1d10a5a04921dfdce7a0143
admin/src/views/business/empower.vue
@@ -2,8 +2,8 @@
    <TableLayout :permissions="['business:empower:query']">
        <!-- 搜索表单 -->
        <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
            <el-form-item label="姓名手机号" prop="keyWords">
                <el-input v-model="searchForm.keyWords" placeholder="请输入姓名/手机号" @keypress.enter.native="search"></el-input>
            <el-form-item label="姓名手机号" prop="memberName">
                <el-input v-model="searchForm.memberName" placeholder="请输入姓名/手机号" @keypress.enter.native="search"></el-input>
            </el-form-item>
            <el-form-item label="下发状态" prop="sendStatus">
                <el-select v-model="searchForm.sendStatus" placeholder="请选择" @keypress.enter.native="search">
@@ -16,12 +16,8 @@
                    <el-option label="不符合下发条件" value="6"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="公司" prop="companyId">
                <el-select v-model="searchForm.companyId" placeholder="请选择公司" @keypress.enter.native="search">
                    <el-option label="待下发" value="0"></el-option>
                    <el-option label="已下发" value="1"></el-option>
                    <el-option label="已取消" value="2"></el-option>
                </el-select>
            <el-form-item label="公司" prop="companyName">
                <el-input v-model="searchForm.companyName" placeholder="请输入" @keypress.enter.native="search"></el-input>
            </el-form-item>
            <el-form-item label="下发起始时间" prop="startTime">
                <el-date-picker
@@ -115,8 +111,10 @@
    return {
      // 搜索
      searchForm: {
        keyWords: '',
        companyId: '',
        memberName: '',
        companyName: '',
        sendStartDate: '',
        sendEndDate: '',
        startTime: '',
        endTime: '',
        sendStatus: '',
@@ -132,28 +130,30 @@
      'field.id': 'id',
      'field.main': 'id'
    })
    this.changeRadio('0')
    this.search()
  },
  methods: {
    changeRadio (e) {
      this.searchForm.radio = e
      if (e === '0') {
        this.searchForm.startTime = timeForMat(0)[0]
        this.searchForm.endTime = timeForMat(0)[1]
        this.searchForm.sendStartDate = timeForMat(0)[0]
        this.searchForm.sendEndDate = timeForMat(0)[1]
        this.time = timeForMat(0)
      } else if (e === '1') {
        this.searchForm.startTime = timeForMat(6)[0]
        this.searchForm.endTime = timeForMat(6)[1]
        this.searchForm.sendStartDate = timeForMat(6)[0]
        this.searchForm.sendEndDate = timeForMat(6)[1]
        this.time = timeForMat(6)
      } else if (e === '2') {
        this.searchForm.startTime = timeForMat(29)[0]
        this.searchForm.endTime = timeForMat(29)[1]
        this.searchForm.sendStartDate = timeForMat(29)[0]
        this.searchForm.sendEndDate = timeForMat(29)[1]
        this.time = timeForMat(29)
      }
      this.search()
    },
    seleTime (e) {
      this.searchForm.startTime = e[0]
      this.searchForm.endTime = e[1]
      this.searchForm.sendStartDate = e[0]
      this.searchForm.sendEndDate = e[1]
      this.searchForm.radio = null
      this.search()
    },