|  | @@ -6,7 +6,7 @@
 | 
	
		
			
				|  |  |        :model="queryParams"
 | 
	
		
			
				|  |  |        ref="queryFormRef"
 | 
	
		
			
				|  |  |        :inline="true"
 | 
	
		
			
				|  |  | -      label-width="68px"
 | 
	
		
			
				|  |  | +      label-width="100px"
 | 
	
		
			
				|  |  |      >
 | 
	
		
			
				|  |  |        <el-form-item label="企业全称" prop="name" v-hasPermi="['menduner:system:enterprise:query']">
 | 
	
		
			
				|  |  |          <el-input
 | 
	
	
		
			
				|  | @@ -55,6 +55,32 @@
 | 
	
		
			
				|  |  |            class="!w-240px"
 | 
	
		
			
				|  |  |          />
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  | +      <el-form-item label="会员套餐" prop="vipFlag">
 | 
	
		
			
				|  |  | +        <el-select
 | 
	
		
			
				|  |  | +          v-model="queryParams.vipFlag"
 | 
	
		
			
				|  |  | +          placeholder="请选择会员套餐"
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +          class="!w-240px"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <el-option
 | 
	
		
			
				|  |  | +            v-for="dict in packageList"
 | 
	
		
			
				|  |  | +            :key="dict.id"
 | 
	
		
			
				|  |  | +            :label="dict.text"
 | 
	
		
			
				|  |  | +            :value="dict.id"
 | 
	
		
			
				|  |  | +          />
 | 
	
		
			
				|  |  | +        </el-select>
 | 
	
		
			
				|  |  | +      </el-form-item>
 | 
	
		
			
				|  |  | +      <el-form-item label="会员过期时间" prop="vipExpireDate">
 | 
	
		
			
				|  |  | +        <el-date-picker
 | 
	
		
			
				|  |  | +          v-model="queryParams.vipExpireDate"
 | 
	
		
			
				|  |  | +          value-format="YYYY-MM-DD HH:mm:ss"
 | 
	
		
			
				|  |  | +          type="daterange"
 | 
	
		
			
				|  |  | +          start-placeholder="开始日期"
 | 
	
		
			
				|  |  | +          end-placeholder="结束日期"
 | 
	
		
			
				|  |  | +          :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
 | 
	
		
			
				|  |  | +          class="!w-240px"
 | 
	
		
			
				|  |  | +        />
 | 
	
		
			
				|  |  | +      </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  |          <el-button v-hasPermi="['menduner:system:enterprise:query']" @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
 | 
	
		
			
				|  |  |          <el-button v-hasPermi="['menduner:system:enterprise:query']" @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
 | 
	
	
		
			
				|  | @@ -93,9 +119,11 @@
 | 
	
		
			
				|  |  |        <el-table-column label="地址" align="center" prop="address" />
 | 
	
		
			
				|  |  |        <el-table-column label="会员" align="center" prop="vipFlag">
 | 
	
		
			
				|  |  |          <template #default="{ row }">
 | 
	
		
			
				|  |  | -          <span :style="{'color': row.vipExpireDate ? row.vipExpireDate > Date.now() ? '#67C23A' : '#E6A23C' : ''}">
 | 
	
		
			
				|  |  | -            {{ row.vipExpireDate ? row.vipExpireDate > Date.now() ? '会员' : '过期' : '非会员' }}
 | 
	
		
			
				|  |  | -          </span>
 | 
	
		
			
				|  |  | +          <span v-if="row.vipExpireDate && row.vipExpireDate > Date.now()" style="color: #67C23A;">{{ packageList.find(e => e.id === Number(row.vipFlag))?.text }}</span>
 | 
	
		
			
				|  |  | +          <span v-else :style="{'color': !row.vipExpireDate ? '' : '#E6A23C'}">{{ !row.vipExpireDate ? '非会员' : '过期' }}</span>
 | 
	
		
			
				|  |  | +          <!-- <span :style="{'color': row.vipExpireDate ? row.vipExpireDate > Date.now() ? '#67C23A' : '#E6A23C' : ''}">
 | 
	
		
			
				|  |  | +            {{ row.vipExpireDate ? row.vipExpireDate > Date.now() ? packageList.find(e => e.id === Number(row.vipFlag))?.text : '过期' : '非会员' }}
 | 
	
		
			
				|  |  | +          </span> -->
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |        </el-table-column>
 | 
	
		
			
				|  |  |        <el-table-column label="会员到期时间" align="center" prop="vipExpireFormatDate" />
 | 
	
	
		
			
				|  | @@ -132,7 +160,7 @@
 | 
	
		
			
				|  |  |    <PositionTypeForm ref="positionRef" @success="getList" />
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    <!-- 会员套餐 -->
 | 
	
		
			
				|  |  | -  <SetVip ref="vipPackageRef" @success="getList" />
 | 
	
		
			
				|  |  | +  <SetVip ref="vipPackageRef" :packageList="packageList" @success="getList" />
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script setup lang="ts">
 | 
	
	
		
			
				|  | @@ -167,7 +195,9 @@ const queryParams = reactive({
 | 
	
		
			
				|  |  |    industryId: undefined,
 | 
	
		
			
				|  |  |    financingStatus: undefined,
 | 
	
		
			
				|  |  |    scale: undefined,
 | 
	
		
			
				|  |  | -  createTime: undefined
 | 
	
		
			
				|  |  | +  createTime: undefined,
 | 
	
		
			
				|  |  | +  vipFlag: undefined,
 | 
	
		
			
				|  |  | +  vipExpireDate: undefined
 | 
	
		
			
				|  |  |  })
 | 
	
		
			
				|  |  |  const positionRef = ref()
 | 
	
		
			
				|  |  |  const queryFormRef = ref() // 搜索的表单
 | 
	
	
		
			
				|  | @@ -181,6 +211,14 @@ const getTree = async () => {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  getTree()
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +// 套餐列表
 | 
	
		
			
				|  |  | +const packageList = ref([])
 | 
	
		
			
				|  |  | +const getPackList = async () => {
 | 
	
		
			
				|  |  | +	const data = await EnterpriseApi.getEnterprisePackageList()
 | 
	
		
			
				|  |  | +	packageList.value = data
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +getPackList()
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  /** 查询列表 */
 | 
	
		
			
				|  |  |  const getList = async () => {
 | 
	
		
			
				|  |  |    loading.value = true
 |