|
|
|
@ -8,8 +8,10 @@ |
|
|
|
|
<el-input v-model="searchForm.name" placeholder="请输入姓名" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button @click="searchList">查询</el-button> |
|
|
|
|
<el-button type="primary" @click="handleAdd">新增</el-button> |
|
|
|
|
<el-button @click="searchList" v-hasPermi="['xj-applet:resell:search']">查询</el-button> |
|
|
|
|
<el-button type="primary" @click="handleAdd" v-hasPermi="['xj-applet:resell:add']" |
|
|
|
|
>新增</el-button |
|
|
|
|
> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<el-table v-loading="loading" :data="tableData" max-height="calc(100vh - 200px)"> |
|
|
|
@ -24,7 +26,13 @@ |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" width="120px"> |
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
<el-button type="primary" link @click="handleEdit(row)">修改</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
link |
|
|
|
|
@click="handleEdit(row)" |
|
|
|
|
v-hasPermi="['xj-applet:resell:update']" |
|
|
|
|
>修改</el-button |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -47,6 +55,29 @@ |
|
|
|
|
<el-form-item label="标记" prop="mark"> |
|
|
|
|
<el-input v-model="form.mark" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="赠送会员" prop="memberId"> |
|
|
|
|
<el-select v-model="form.memberId" clearable filterable style="width: 100%"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in vipOptions" |
|
|
|
|
:key="item.memberId" |
|
|
|
|
:label="item.memberName" |
|
|
|
|
:value="item.memberId" |
|
|
|
|
> |
|
|
|
|
<span style="float: left">{{ item.memberName }}</span> |
|
|
|
|
<span style="float: right; color: #aaa">{{ item.carName }}</span> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="赠送折扣" prop="discountId"> |
|
|
|
|
<el-select v-model="form.discountId" clearable filterable style="width: 100%"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in discountOptions" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.description" |
|
|
|
|
:value="item.id" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
<template #footer> |
|
|
|
@ -61,6 +92,8 @@ |
|
|
|
|
|
|
|
|
|
<script setup name="Resell"> |
|
|
|
|
import { getResellList, addResell, updateResell } from '@/api/xjapplet/resell' |
|
|
|
|
import { getVipDiscountOptions } from '@/api/xjapplet/discount' |
|
|
|
|
import { getVipTypeOptions } from '@/api/xjapplet/vip' |
|
|
|
|
|
|
|
|
|
const message = useMessage() |
|
|
|
|
|
|
|
|
@ -80,7 +113,9 @@ const showDialog = ref(false) |
|
|
|
|
const form = ref({ |
|
|
|
|
phone: '', |
|
|
|
|
name: '', |
|
|
|
|
mark: '' |
|
|
|
|
mark: '', |
|
|
|
|
discountId: undefined, |
|
|
|
|
memberId: undefined |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const rules = { |
|
|
|
@ -88,8 +123,17 @@ const rules = { |
|
|
|
|
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const vipOptions = ref([]) |
|
|
|
|
const discountOptions = ref([]) |
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
searchList() |
|
|
|
|
getVipDiscountOptions().then((response) => { |
|
|
|
|
discountOptions.value = response |
|
|
|
|
}) |
|
|
|
|
getVipTypeOptions({ carTypeId: searchForm.value.carTypeId }).then((response) => { |
|
|
|
|
vipOptions.value = response |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
function searchList() { |
|
|
|
|