|
@@ -1,349 +1,312 @@
|
|
|
<template>
|
|
|
- <div class="app-container">
|
|
|
- <el-form :model="queryParams" :label-position="left" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
- <el-form-item prop="phoneNumber">
|
|
|
- <el-input v-model="queryParams.phoneNumber" placeholder="请输入手机号" clearable @keyup.enter.native="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="nickName">
|
|
|
- <el-input v-model="queryParams.nickName" placeholder="请输入昵称" clearable @keyup.enter.native="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="realName">
|
|
|
- <el-input v-model="queryParams.realName" placeholder="请输入真实姓名" clearable @keyup.enter.native="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
|
- <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :model="queryParams" :label-position="left" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
+ <el-form-item prop="phoneNumber">
|
|
|
+ <el-input v-model="queryParams.phoneNumber" placeholder="请输入手机号" clearable @keyup.enter.native="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="nickName">
|
|
|
+ <el-input v-model="queryParams.nickName" placeholder="请输入昵称" clearable @keyup.enter.native="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="realName">
|
|
|
+ <el-input v-model="queryParams.realName" placeholder="请输入真实姓名" clearable @keyup.enter.native="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button type="primary" plain icon="el-icon-plus" @click="handleAdd" v-hasPermi="['app:user:add']" v-if="userInfoVO.userType == '02'">新增</el-button>
|
|
|
- </el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
- </el-row>
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button type="primary" plain icon="el-icon-plus" @click="handleAdd" v-hasPermi="['app:user:add']" v-if="userInfoVO.userType == '02'">新增
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ </el-row>
|
|
|
|
|
|
- <Page uri="/mapi/app/user/list" :request-params="queryParams" ref="pagination">
|
|
|
- <!-- <el-table-column type="selection" width="55" align="center" fixed="left"/>-->
|
|
|
- <!-- <el-table-column label="客户ID" align="center" prop="id" />-->
|
|
|
- <el-table-column label="昵称" align="center" prop="nickName" />
|
|
|
- <el-table-column label="真实姓名" align="center" prop="realName" />
|
|
|
- <el-table-column label="手机号" align="center" prop="phoneNumber" />
|
|
|
- <el-table-column label="头像" align="center" prop="avatarUrl">
|
|
|
+ <Page uri="/mapi/app/user/list" :request-params="queryParams" ref="pagination">
|
|
|
+ <!-- <el-table-column type="selection" width="55" align="center" fixed="left"/>-->
|
|
|
+ <!-- <el-table-column label="客户ID" align="center" prop="id" />-->
|
|
|
+ <el-table-column label="昵称" align="center" prop="nickName" />
|
|
|
+ <el-table-column label="真实姓名" align="center" prop="realName" />
|
|
|
+ <el-table-column label="手机号" align="center" prop="phoneNumber" />
|
|
|
+ <el-table-column label="头像" align="center" prop="avatarUrl">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-avatar shape="square" size="large" :src="scope.row.avatarUrl"></el-avatar>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="性别" align="center" prop="sex">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="生日" align="center" prop="birthday" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="客户等级" align="center" prop="level" />
|
|
|
+ <!-- <el-table-column label="微信唯一标识" align="center" prop="unionId" />-->
|
|
|
+ <!-- <el-table-column label="支付密码" align="center" prop="payPassword" />-->
|
|
|
+ <!-- <el-table-column label="是否使用支付密码" align="center" prop="isUsePayPassword" />-->
|
|
|
+ <!-- <el-table-column label="状态" align="center" prop="status">-->
|
|
|
+ <!-- <template slot-scope="scope">-->
|
|
|
+ <!-- <el-switch v-model="scope.row.status" active-value="0" inactive-value="1"-->
|
|
|
+ <!-- @change="handleStatusChange(scope.row)"></el-switch>-->
|
|
|
+ <!-- </template>-->
|
|
|
+ <!-- </el-table-column>-->
|
|
|
+
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150"
|
|
|
+ v-if="userInfoVO.userType == '02' || userInfoVO.userType == '00'">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['app:user:edit']"
|
|
|
+ v-if="userInfoVO.userType == '02'">修改</el-button>
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- -->
|
|
|
+ <!-- type="text"-->
|
|
|
+ <!-- icon="el-icon-delete"-->
|
|
|
+ <!-- @click="handleDelete(scope.row)"-->
|
|
|
+ <!-- v-hasPermi="['app:user:remove']"-->
|
|
|
+ <!-- >删除</el-button>-->
|
|
|
+ <el-button type="text" icon="el-icon-view" @click="handleView(scope.row)">客户信息</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </Page>
|
|
|
+ <!-- 添加或修改用户对话框 -->
|
|
|
+ <el-dialog :title="title" :visible.sync="open" size="80%" append-to-body destroy-on-close>
|
|
|
+ <EditUser ref="editUser" :dataSource="form" :isDisabled="isDisabled" @onSubmit="submitForm" />
|
|
|
+ <!-- <el-row :gutter="15" >-->
|
|
|
+ <!-- <el-form ref="form" :model="form" :rules="rules" label-width="100px">-->
|
|
|
+ <!-- <el-col :span="24">-->
|
|
|
+ <!-- <el-form-item label="昵称" prop="nickName">-->
|
|
|
+ <!-- <el-input v-model="form.nickName" placeholder="请输入昵称" maxlength="50" show-word-limit clearable :disabled="isDisabled"/>-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="真实姓名" prop="realName">-->
|
|
|
+ <!-- <el-input v-model="form.realName" placeholder="请输入真实姓名" maxlength="5" show-word-limit clearable :disabled="isDisabled"/>-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="手机号" prop="phoneNumber">-->
|
|
|
+ <!-- <el-input v-model="form.phoneNumber" placeholder="请输入手机号" maxlength="11" show-word-limit clearable :disabled="isDisabled"/>-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="性别" prop="sex">-->
|
|
|
+ <!-- <el-select v-model="form.sex" placeholder="请选择性别" clearable :disabled="isDisabled">-->
|
|
|
+ <!-- <el-option-->
|
|
|
+ <!-- v-for="dict in dict.type.sys_user_sex"-->
|
|
|
+ <!-- :key="dict.value"-->
|
|
|
+ <!-- :label="dict.label"-->
|
|
|
+ <!-- :value="dict.value"-->
|
|
|
+ <!-- ></el-option>-->
|
|
|
+ <!-- </el-select>-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="生日" prop="birthday" clearable >-->
|
|
|
+ <!-- <el-date-picker clearable-->
|
|
|
+ <!-- v-model="form.birthday"-->
|
|
|
+ <!-- type="date"-->
|
|
|
+ <!-- value-format="yyyy-MM-dd"-->
|
|
|
+ <!-- placeholder="请选择生日"-->
|
|
|
+ <!-- :disabled="isDisabled">-->
|
|
|
+ <!-- </el-date-picker>-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="头像地址" prop="avatarUrl" >-->
|
|
|
+ <!-- <image-upload v-model="form.avatarUrl" :limit="1" :disabled="isDisabled"/>-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="客户等级" prop="level">-->
|
|
|
+ <!-- <el-input-number v-model="form.level" :min="1" :max="50" label="请输入客户等级" :disabled="isDisabled"></el-input-number>-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="备注" prop="remark">-->
|
|
|
+ <!-- <el-input v-model="form.remark" placeholder="请输入备注" maxlength="50" show-word-limit />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
+ <!-- </el-form>-->
|
|
|
+ <!-- </el-row>-->
|
|
|
+
|
|
|
+ <!-- <div slot="footer" class="dialog-footer">-->
|
|
|
+ <!-- <el-button type="primary" @click="submitForm" style="margin-left: 5%">提交</el-button>-->
|
|
|
+ <!-- <el-button @click="cancel">取 消</el-button>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 客户详情 -->
|
|
|
+ <el-dialog title="客户详情" :visible.sync="userViewType" width="70%" append-to-body class="user_drawer">
|
|
|
+ <div class="userContent">
|
|
|
+ <el-descriptions :column="2" border>
|
|
|
+ <el-descriptions-item label="用户名">{{userInfo?userInfo.realName:'- -'}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="手机号" style="width: 100px">{{userInfo?userInfo.phoneNumber:'- -'}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="等级">{{userInfo?userInfo.level:'- -'}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="性别">
|
|
|
+ <dict-tag :options="dict.type.sys_user_sex" :value="userInfo.sex" />
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="生日">
|
|
|
+ {{ parseTime(userInfo.birthday, '{y}-{m}-{d}') }}
|
|
|
+ </el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="充值余额">
|
|
|
+ {{userInfo?userInfo.rechargeBalance : '- -'}}
|
|
|
+ </el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="赠送余额">
|
|
|
+ {{userInfo?userInfo.giveBalance:'- -'}}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="福利金余额">
|
|
|
+ {{userInfo?userInfo.welfareBalance : '- -'}}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="地址">
|
|
|
+ {{ getAddress(userInfo) ? getAddress(userInfo) : '暂无地址' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ <br />
|
|
|
+
|
|
|
+ <el-tabs type="border-card" v-model="activeValue" @tab-click="btn_chioc">
|
|
|
+ <el-tab-pane name="1">
|
|
|
+ <span slot="label"><i class="el-icon-s-ticket"></i> 优惠券</span>
|
|
|
+ <el-table v-loading="userloading" :data="userinfoData" fit highlight-current-row border stripe>
|
|
|
+ <el-table-column label="编号" align="center" prop="id" />
|
|
|
+ <el-table-column label="优惠券名称" align="center" prop="couponTypeTitle" width="120" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="优惠券类型" align="center" prop="discountWay" width="120" :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-avatar shape="square" size="large" :src="scope.row.avatarUrl"></el-avatar>
|
|
|
+ <dict-tag :options="dict.type.coupon_type" :value="scope.row.discountWay" />
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="性别" align="center" prop="sex">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="券值" align="center" prop="deductAmount" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
|
|
|
+ <span v-if="scope.row.discountWay == 0">满{{ scope.row.minAmount }}元减{{ scope.row.deductAmount }}元</span>
|
|
|
+ <span v-if="scope.row.discountWay == 1">满{{ scope.row.minAmount }}件减{{ scope.row.deductAmount }}件</span>
|
|
|
+ <span v-if="scope.row.discountWay == 2">{{ scope.row.discountRate }}%折扣</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="生日" align="center" prop="birthday" width="180">
|
|
|
+ <el-table-column label="有效期开始时间" align="center" prop="startDate" width="180"> </el-table-column>
|
|
|
+ <el-table-column label="有效期结束时间" align="center" prop="endDate" width="180"> </el-table-column>
|
|
|
+ <el-table-column label="是否核销" align="center" prop="isUsed" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
|
|
|
+ <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isUsed" />
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="客户等级" align="center" prop="level" />
|
|
|
- <!-- <el-table-column label="微信唯一标识" align="center" prop="unionId" />-->
|
|
|
- <!-- <el-table-column label="支付密码" align="center" prop="payPassword" />-->
|
|
|
- <!-- <el-table-column label="是否使用支付密码" align="center" prop="isUsePayPassword" />-->
|
|
|
- <!-- <el-table-column label="状态" align="center" prop="status">-->
|
|
|
- <!-- <template slot-scope="scope">-->
|
|
|
- <!-- <el-switch v-model="scope.row.status" active-value="0" inactive-value="1"-->
|
|
|
- <!-- @change="handleStatusChange(scope.row)"></el-switch>-->
|
|
|
- <!-- </template>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="核销门店" align="center" prop="usedOrgName" width="120" :show-overflow-tooltip="true" />
|
|
|
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150" v-if="userInfoVO.userType == '02' || userInfoVO.userType == '00'">
|
|
|
+ <el-table-column label="核销时间" align="center" prop="usedTime" width="180"> </el-table-column>
|
|
|
+
|
|
|
+
|
|
|
+ </el-table>
|
|
|
+ <pagination v-show="usertotal > 0" :total="usertotal" :page.sync="userViewForm.pageNum" :limit.sync="userViewForm.pageSize"
|
|
|
+ @pagination="getMemberCouponData" />
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane name="2">
|
|
|
+ <span slot="label"><i class="el-icon-coin"></i> 消费明细</span>
|
|
|
+ <el-table v-loading="userloading" :data="userinfoData" fit highlight-current-row border stripe>
|
|
|
+ <el-table-column label="订单编号" align="center" prop="orderNo" min-width="200" />
|
|
|
+ <el-table-column label="订单类型" align="center" prop="orderType" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['app:user:edit']" v-if="userInfoVO.userType == '02'">修改</el-button>
|
|
|
- <!-- <el-button-->
|
|
|
- <!-- -->
|
|
|
- <!-- type="text"-->
|
|
|
- <!-- icon="el-icon-delete"-->
|
|
|
- <!-- @click="handleDelete(scope.row)"-->
|
|
|
- <!-- v-hasPermi="['app:user:remove']"-->
|
|
|
- <!-- >删除</el-button>-->
|
|
|
- <el-button type="text" icon="el-icon-view" @click="handleView(scope.row)">客户信息</el-button>
|
|
|
+ <dict-tag :options="dict.type.order_type" :value="scope.row.orderType" />
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
- </Page>
|
|
|
- <!-- 添加或修改用户对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" size="80%" append-to-body destroy-on-close>
|
|
|
- <EditUser ref="editUser" :dataSource="form" :isDisabled="isDisabled" @onSubmit="submitForm" />
|
|
|
- <!-- <el-row :gutter="15" >-->
|
|
|
- <!-- <el-form ref="form" :model="form" :rules="rules" label-width="100px">-->
|
|
|
- <!-- <el-col :span="24">-->
|
|
|
- <!-- <el-form-item label="昵称" prop="nickName">-->
|
|
|
- <!-- <el-input v-model="form.nickName" placeholder="请输入昵称" maxlength="50" show-word-limit clearable :disabled="isDisabled"/>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="真实姓名" prop="realName">-->
|
|
|
- <!-- <el-input v-model="form.realName" placeholder="请输入真实姓名" maxlength="5" show-word-limit clearable :disabled="isDisabled"/>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="手机号" prop="phoneNumber">-->
|
|
|
- <!-- <el-input v-model="form.phoneNumber" placeholder="请输入手机号" maxlength="11" show-word-limit clearable :disabled="isDisabled"/>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="性别" prop="sex">-->
|
|
|
- <!-- <el-select v-model="form.sex" placeholder="请选择性别" clearable :disabled="isDisabled">-->
|
|
|
- <!-- <el-option-->
|
|
|
- <!-- v-for="dict in dict.type.sys_user_sex"-->
|
|
|
- <!-- :key="dict.value"-->
|
|
|
- <!-- :label="dict.label"-->
|
|
|
- <!-- :value="dict.value"-->
|
|
|
- <!-- ></el-option>-->
|
|
|
- <!-- </el-select>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="生日" prop="birthday" clearable >-->
|
|
|
- <!-- <el-date-picker clearable-->
|
|
|
- <!-- v-model="form.birthday"-->
|
|
|
- <!-- type="date"-->
|
|
|
- <!-- value-format="yyyy-MM-dd"-->
|
|
|
- <!-- placeholder="请选择生日"-->
|
|
|
- <!-- :disabled="isDisabled">-->
|
|
|
- <!-- </el-date-picker>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="头像地址" prop="avatarUrl" >-->
|
|
|
- <!-- <image-upload v-model="form.avatarUrl" :limit="1" :disabled="isDisabled"/>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="客户等级" prop="level">-->
|
|
|
- <!-- <el-input-number v-model="form.level" :min="1" :max="50" label="请输入客户等级" :disabled="isDisabled"></el-input-number>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="备注" prop="remark">-->
|
|
|
- <!-- <el-input v-model="form.remark" placeholder="请输入备注" maxlength="50" show-word-limit />-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- </el-col>-->
|
|
|
- <!-- </el-form>-->
|
|
|
- <!-- </el-row>-->
|
|
|
-
|
|
|
- <!-- <div slot="footer" class="dialog-footer">-->
|
|
|
- <!-- <el-button type="primary" @click="submitForm" style="margin-left: 5%">提交</el-button>-->
|
|
|
- <!-- <el-button @click="cancel">取 消</el-button>-->
|
|
|
- <!-- </div>-->
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <!-- 客户详情 -->
|
|
|
- <el-dialog title="客户详情" :visible.sync="userViewType" width="70%" append-to-body class="user_drawer">
|
|
|
- <div class="userContent">
|
|
|
- <el-card class="box-card">
|
|
|
- <div class="title">客户基本信息</div>
|
|
|
- <div class="userinfo">
|
|
|
- <div class="user_image">
|
|
|
- <image-preview :src="userInfo.avatarUrl" :width="150" :height="150" />
|
|
|
- </div>
|
|
|
- <div class="list_user">
|
|
|
- <div class="item_user">
|
|
|
- <div class="name">真实姓名</div>
|
|
|
- <div class="text">{{ userInfo.realName }}</div>
|
|
|
- </div>
|
|
|
- <div class="item_user">
|
|
|
- <div class="name">昵称</div>
|
|
|
- <div class="text">{{ userInfo.nickName }}</div>
|
|
|
- </div>
|
|
|
- <div class="item_user">
|
|
|
- <div class="name">性别</div>
|
|
|
- <div class="text">
|
|
|
- <dict-tag :options="dict.type.sys_user_sex" :value="userInfo.sex" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="item_user">
|
|
|
- <div class="name">手机号</div>
|
|
|
- <div class="text">{{ userInfo.phoneNumber }}</div>
|
|
|
- </div>
|
|
|
- <div class="item_user">
|
|
|
- <div class="name">生日</div>
|
|
|
- <div class="text">{{ parseTime(userInfo.birthday, '{y}-{m}-{d}') }}</div>
|
|
|
- </div>
|
|
|
- <div class="item_user">
|
|
|
- <div class="name">客户等级</div>
|
|
|
- <div class="text">{{ userInfo.level }}</div>
|
|
|
- </div>
|
|
|
- <div class="item_user">
|
|
|
- <div class="name">充值余额</div>
|
|
|
- <div class="text">{{ userInfo.rechargeBalance }}</div>
|
|
|
- </div>
|
|
|
- <div class="item_user">
|
|
|
- <div class="name">积分余额</div>
|
|
|
- <div class="text">{{ userInfo.pointBalance }}</div>
|
|
|
- </div>
|
|
|
- <div class="item_user">
|
|
|
- <div class="name">赠送余额</div>
|
|
|
- <div class="text">{{ userInfo.giveBalance }}</div>
|
|
|
- </div>
|
|
|
- <div class="item_user">
|
|
|
- <div class="name">福利金余额</div>
|
|
|
- <div class="text">{{ userInfo.welfareBalance }}</div>
|
|
|
- </div>
|
|
|
- <div class="item_user">
|
|
|
- <div class="name">地址</div>
|
|
|
- <div class="text">{{ getAddress(userInfo) ? getAddress(userInfo) : '暂无地址' }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
-
|
|
|
- <el-tabs type="border-card" v-model="activeValue" @tab-click="btn_chioc">
|
|
|
- <el-tab-pane name="1">
|
|
|
- <span slot="label"><i class="el-icon-s-ticket"></i> 优惠券</span>
|
|
|
- <el-table v-loading="userloading" :data="userinfoData">
|
|
|
- <el-table-column label="编号" align="center" prop="id" fixed="left" />
|
|
|
- <el-table-column label="优惠券名称" align="center" prop="couponTypeTitle" width="120" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="优惠券类型" align="center" prop="discountWay" width="120" :show-overflow-tooltip="true">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.coupon_type" :value="scope.row.discountWay" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="活动名称" align="center" prop="activityTitle" width="120" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="发放门店/工厂" align="center" prop="orgName" width="120" :show-overflow-tooltip="true" />
|
|
|
-
|
|
|
- <el-table-column label="是否核销" align="center" prop="isUsed" width="80">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isUnique" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="核销门店/工厂" align="center" prop="usedOrgName" width="120" :show-overflow-tooltip="true" />
|
|
|
-
|
|
|
- <el-table-column label="核销时间" align="center" prop="usedTime" width="180"> </el-table-column>
|
|
|
- <el-table-column label="有效期开始时间" align="center" prop="startDate" width="180"> </el-table-column>
|
|
|
- <el-table-column label="有效期结束时间" align="center" prop="endDate" width="180"> </el-table-column>
|
|
|
- <el-table-column label="是否单件抵扣券" align="center" prop="isUnique" width="180">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isUnique" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="是否手动发券" align="center" prop="canManual" width="180">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isUnique" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="抵用金额(元)" align="center" prop="deductAmount" width="120" />
|
|
|
- <el-table-column label="核销订单编码" align="center" prop="deductOrderNo" width="150" />
|
|
|
- </el-table>
|
|
|
- <pagination v-show="usertotal > 0" :total="usertotal" :page.sync="userViewForm.pageNum" :limit.sync="userViewForm.pageSize" @pagination="getMemberCouponData" />
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane name="2">
|
|
|
- <span slot="label"><i class="el-icon-coin"></i> 消费明细</span>
|
|
|
- <el-table v-loading="userloading" :data="userinfoData">
|
|
|
- <el-table-column label="订单编号" align="center" prop="orderNo" min-width="200" fixed="left" />
|
|
|
- <el-table-column label="订单类型" align="center" prop="orderType" width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.order_type" :value="scope.row.orderType" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="账单标题" align="center" prop="title" width="100" />
|
|
|
- <el-table-column label="支付方式" align="center" prop="payType" width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.recharge_pay_type" :value="scope.row.payType" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="支付总金额" align="center" prop="payTotalAmount" width="100" />
|
|
|
- <el-table-column label="现金支付金额" align="center" prop="cashPayAmount" width="100" />
|
|
|
- <el-table-column label="充值余额支付金额" align="center" prop="rechargePayAmount" width="150" />
|
|
|
- <el-table-column label="赠送余额支付金额" align="center" prop="givePayAmount" width="150" />
|
|
|
- <el-table-column label="福利金余额支付金额" align="center" prop="welfarePayAmount" width="150" />
|
|
|
- <el-table-column label="消费积分" align="center" prop="usePoint" width="80" />
|
|
|
- <el-table-column label="获取积分" align="center" prop="receivePoint" width="80" />
|
|
|
- <el-table-column label="是否退款" align="center" prop="isRefund" width="80" />
|
|
|
- </el-table>
|
|
|
- <pagination v-show="usertotal > 0" :total="usertotal" :page.sync="userViewForm.pageNum" :limit.sync="userViewForm.pageSize" @pagination="getMemberBillMstrData" />
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane name="3">
|
|
|
- <span slot="label"><i class="el-icon-shopping-cart-1"></i> 商品订单</span>
|
|
|
- <el-table v-loading="userloading" :data="userinfoData">
|
|
|
- <el-table-column label="订单编号" align="center" prop="orderNo" width="250px" fixed="left" />
|
|
|
- <el-table-column label="订单总价(元)" align="center" prop="totalPrice" width="200px" />
|
|
|
- <el-table-column label="抵扣金额(元)" align="center" prop="deductAmount" width="200px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.deductAmount ? scope.row.deductAmount : '0' }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="支付金额(元)" align="center" prop="payAmount" width="200px" />
|
|
|
- <el-table-column label="订单状态" align="center" prop="orderStatus" width="200px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.order_goods_status" :value="scope.row.orderStatus" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="支付方式" align="center" prop="payType">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.recharge_pay_type" :value="scope.row.payType" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="下单时间" align="center" prop="createTime" width="200px" />
|
|
|
- <el-table-column label="支付时间" align="center" prop="payTime" width="200px" />
|
|
|
- </el-table>
|
|
|
- <pagination v-show="usertotal > 0" :total="usertotal" :page.sync="userViewForm.pageNum" :limit.sync="userViewForm.pageSize" @pagination="getMemberOrderGoodsData" />
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane name="4">
|
|
|
- <span slot="label"><i class="el-icon-orange"></i> 洗衣订单</span>
|
|
|
- <el-table v-loading="userloading" :data="userinfoData">
|
|
|
- <el-table-column label="订单编号" align="center" prop="orderNo" min-width="200" fixed="left" />
|
|
|
- <el-table-column label="门店/工厂名称" align="center" prop="sysOrg.name" width="150" />
|
|
|
- <el-table-column label="数量" align="center" prop="orderClothCount" width="100" />
|
|
|
- <el-table-column label="合计" align="center" prop="clothItemName" width="200">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>合计:{{ scope.row.payAmount }}元</span>
|
|
|
- <br />
|
|
|
- <span v-if="scope.row.payType == '0'">支付方式:微信</span>
|
|
|
- <span v-if="scope.row.payType == '1'">支付方式:支付宝</span>
|
|
|
- <span v-if="scope.row.payType == '2'">支付方式:现金</span>
|
|
|
- <span v-if="scope.row.payType == '3'">支付方式:余额</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="订单来源" align="center" width="200">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.orderSource == 'OFFLINE'">线下</span>
|
|
|
- <span v-else>线上</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="订单时间" align="center" prop="createTime" min-width="200" />
|
|
|
- <el-table-column label="状态" align="center" width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.cloth_order_status" :value="scope.row.orderStatus" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <pagination v-show="usertotal > 0" :total="usertotal" :page.sync="userViewForm.pageNum" :limit.sync="userViewForm.pageSize" @pagination="getMemberOrderClothData" />
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane name="5">
|
|
|
- <span slot="label"><i class="el-icon-bank-card"></i> 会员卡</span>
|
|
|
- <el-table v-loading="userloading" :data="userinfoData">
|
|
|
- <el-table-column label="卡号" align="center" prop="cardNo" width="250px" fixed="left" />
|
|
|
- <el-table-column label="充值订单编号" align="center" prop="orderNo" width="250px" />
|
|
|
- <el-table-column label="充值金额(元)" align="center" prop="rechargeAmount" width="200px" />
|
|
|
- <el-table-column label="赠送金额(元)" align="center" prop="giveAmount" width="200px" />
|
|
|
- <el-table-column label="充值余额(元)" align="center" prop="rechargeBalance" width="200px" />
|
|
|
- <el-table-column label="赠送余额(元)" align="center" prop="giveBalance" width="200px" />
|
|
|
- <el-table-column label="积分金额" align="center" prop="pointBalance" width="200px" />
|
|
|
- <el-table-column label="赠送积分" align="center" prop="givePointAmount" width="200px" />
|
|
|
- <el-table-column label="福利金额(元)" align="center" prop="welfareAmount" width="200px" />
|
|
|
- <el-table-column label="福利金余额(元)" align="center" prop="welfareBalance" width="200px" />
|
|
|
- <el-table-column label="使用状态" align="center" prop="rechargeStatus" width="250px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.rechargeStatus == 1">已使用</el-tag>
|
|
|
- <el-tag type="info" v-else>未使用</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="删除状态" align="center" prop="rechargeStatus" width="250px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.delFlag == 0">正常</el-tag>
|
|
|
- <el-tag type="danger" v-else>删除</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="充值门店" align="center" prop="rechargeStoreName" width="200px" />
|
|
|
- <el-table-column label="充值时间" align="center" prop="rechargeTime" width="200px" />
|
|
|
- </el-table>
|
|
|
- <pagination v-show="usertotal > 0" :total="usertotal" :page.sync="userViewForm.pageNum" :limit.sync="userViewForm.pageSize" @pagination="getMemberCardData" />
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </div>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="账单标题" align="center" prop="title" width="100" />
|
|
|
+ <el-table-column label="支付方式" align="center" prop="payType" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.recharge_pay_type" :value="scope.row.payType" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="支付总金额" align="center" prop="payTotalAmount" width="100" />
|
|
|
+ <el-table-column label="现金支付金额" align="center" prop="cashPayAmount" width="100" />
|
|
|
+ <el-table-column label="充值余额支付金额" align="center" prop="rechargePayAmount" width="150" />
|
|
|
+ <el-table-column label="赠送余额支付金额" align="center" prop="givePayAmount" width="150" />
|
|
|
+ <el-table-column label="福利金余额支付金额" align="center" prop="welfarePayAmount" width="150" />
|
|
|
+ <el-table-column label="消费积分" align="center" prop="usePoint" width="80" />
|
|
|
+ <el-table-column label="获取积分" align="center" prop="receivePoint" width="80" />
|
|
|
+ <el-table-column label="是否退款" align="center" prop="isRefund" width="80" />
|
|
|
+ </el-table>
|
|
|
+ <pagination v-show="usertotal > 0" :total="usertotal" :page.sync="userViewForm.pageNum" :limit.sync="userViewForm.pageSize"
|
|
|
+ @pagination="getMemberBillMstrData" />
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane name="3">
|
|
|
+ <span slot="label"><i class="el-icon-shopping-cart-1"></i> 商品订单</span>
|
|
|
+ <el-table v-loading="userloading" :data="userinfoData" fit highlight-current-row border stripe>
|
|
|
+ <el-table-column label="订单编号" align="center" prop="orderNo" width="150" />
|
|
|
+ <el-table-column label="订单总价(元)" align="center" prop="totalPrice" width="150" />
|
|
|
+ <el-table-column label="抵扣金额(元)" align="center" prop="deductAmount" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.deductAmount ? scope.row.deductAmount : '0' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="支付金额(元)" align="center" prop="payAmount" width="150" />
|
|
|
+ <el-table-column label="订单状态" align="center" prop="orderStatus" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.order_goods_status" :value="scope.row.orderStatus" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="支付方式" align="center" prop="payType">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.recharge_pay_type" :value="scope.row.payType" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="下单时间" align="center" prop="createTime" width="150" />
|
|
|
+ <el-table-column label="支付时间" align="center" prop="payTime" width="150" />
|
|
|
+ </el-table>
|
|
|
+ <pagination v-show="usertotal > 0" :total="usertotal" :page.sync="userViewForm.pageNum" :limit.sync="userViewForm.pageSize"
|
|
|
+ @pagination="getMemberOrderGoodsData" />
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane name="4">
|
|
|
+ <span slot="label"><i class="el-icon-orange"></i> 洗衣订单</span>
|
|
|
+ <el-table v-loading="userloading" :data="userinfoData" fit highlight-current-row border stripe>
|
|
|
+ <el-table-column label="订单编号" align="center" prop="orderNo" min-width="150" />
|
|
|
+ <el-table-column label="门店/工厂名称" align="center" prop="sysOrg.name" width="150" />
|
|
|
+ <el-table-column label="数量" align="center" prop="orderClothCount" width="100" />
|
|
|
+ <el-table-column label="合计" align="center" prop="clothItemName" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>合计:{{ scope.row.payAmount }}元</span>
|
|
|
+ <br />
|
|
|
+ <span v-if="scope.row.payType == '0'">支付方式:微信</span>
|
|
|
+ <span v-if="scope.row.payType == '1'">支付方式:支付宝</span>
|
|
|
+ <span v-if="scope.row.payType == '2'">支付方式:现金</span>
|
|
|
+ <span v-if="scope.row.payType == '3'">支付方式:余额</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="订单来源" align="center" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.orderSource == 'OFFLINE'">线下</span>
|
|
|
+ <span v-else>线上</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="订单时间" align="center" prop="createTime" min-width="150" />
|
|
|
+ <el-table-column label="状态" align="center" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.cloth_order_status" :value="scope.row.orderStatus" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination v-show="usertotal > 0" :total="usertotal" :page.sync="userViewForm.pageNum" :limit.sync="userViewForm.pageSize"
|
|
|
+ @pagination="getMemberOrderClothData" />
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane name="5">
|
|
|
+ <span slot="label"><i class="el-icon-bank-card"></i> 会员卡</span>
|
|
|
+ <el-table v-loading="userloading" :data="userinfoData" fit highlight-current-row border stripe>
|
|
|
+ <el-table-column label="卡号" align="center" prop="cardNo" width="150px" />
|
|
|
+ <el-table-column label="充值金额(元)" align="center" prop="rechargeAmount" width="150px" />
|
|
|
+ <el-table-column label="赠送金额(元)" align="center" prop="giveAmount" width="150px" />
|
|
|
+ <el-table-column label="充值余额(元)" align="center" prop="rechargeBalance" width="150px" />
|
|
|
+ <el-table-column label="赠送余额(元)" align="center" prop="giveBalance" width="150px" />
|
|
|
+ <el-table-column label="福利金额(元)" align="center" prop="welfareAmount" width="150px" />
|
|
|
+ <el-table-column label="福利金余额(元)" align="center" prop="welfareBalance" width="150px" />
|
|
|
+ <el-table-column label="赠送积分" align="center" prop="givePointAmount" width="150px" />
|
|
|
+ <el-table-column label="使用状态" align="center" prop="rechargeStatus" width="150px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-if="scope.row.rechargeStatus == 1">已使用</el-tag>
|
|
|
+ <el-tag type="info" v-else>未使用</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="充值门店" align="center" prop="rechargeStoreName" width="200px" />
|
|
|
+ <el-table-column label="充值时间" align="center" prop="rechargeTime" width="150px" />
|
|
|
+ </el-table>
|
|
|
+ <pagination v-show="usertotal > 0" :total="usertotal" :page.sync="userViewForm.pageNum" :limit.sync="userViewForm.pageSize"
|
|
|
+ @pagination="getMemberCardData" />
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="usercancel" style="margin-left: 5%">关 闭</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="usercancel" style="margin-left: 5%">关 闭</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -351,320 +314,320 @@ import { listUser, getUser, delUser, addUser, updateUser, updateUserStatus, getM
|
|
|
import EditUser from './component/editUser'
|
|
|
|
|
|
export default {
|
|
|
- name: 'User',
|
|
|
- components: {
|
|
|
- EditUser
|
|
|
+ name: 'User',
|
|
|
+ components: {
|
|
|
+ EditUser
|
|
|
+ },
|
|
|
+ dicts: ['sys_user_sex', 'coupon_type', 'sys_yes_no', 'cloth_order_status', 'order_type', 'recharge_pay_type', 'order_goods_status'],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ userInfoVO: null,
|
|
|
+ // 遮罩层
|
|
|
+ loading: true,
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 用户表格数据
|
|
|
+ userList: [],
|
|
|
+ // 弹出层标题
|
|
|
+ title: '',
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ phoneNumber: null,
|
|
|
+ nickName: null,
|
|
|
+ realName: null
|
|
|
+ },
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ // 表单校验
|
|
|
+ rules: {
|
|
|
+ nickName: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '昵称不能为空',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ realName: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '真实姓名不能为空',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ phoneNumber: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '手机号不能为空',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ sex: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '性别不能为空',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ isDisabled: true,
|
|
|
+ userViewType: false,
|
|
|
+ userInfo: {},
|
|
|
+ userViewForm: {
|
|
|
+ appUserId: 0,
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10
|
|
|
+ },
|
|
|
+ usertotal: 0,
|
|
|
+ userloading: false,
|
|
|
+ userinfoData: [],
|
|
|
+ activeValue: '1'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.handleUser()
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleUser() {
|
|
|
+ this.userInfoVO = this.getUserInfo()
|
|
|
},
|
|
|
- dicts: ['sys_user_sex', 'coupon_type', 'sys_yes_no', 'cloth_order_status', 'order_type', 'recharge_pay_type', 'order_goods_status'],
|
|
|
- data() {
|
|
|
- return {
|
|
|
- userInfoVO: null,
|
|
|
- // 遮罩层
|
|
|
- loading: true,
|
|
|
- // 选中数组
|
|
|
- ids: [],
|
|
|
- // 非单个禁用
|
|
|
- single: true,
|
|
|
- // 非多个禁用
|
|
|
- multiple: true,
|
|
|
- // 显示搜索条件
|
|
|
- showSearch: true,
|
|
|
- // 总条数
|
|
|
- total: 0,
|
|
|
- // 用户表格数据
|
|
|
- userList: [],
|
|
|
- // 弹出层标题
|
|
|
- title: '',
|
|
|
- // 是否显示弹出层
|
|
|
- open: false,
|
|
|
- // 查询参数
|
|
|
- queryParams: {
|
|
|
- phoneNumber: null,
|
|
|
- nickName: null,
|
|
|
- realName: null
|
|
|
- },
|
|
|
- // 表单参数
|
|
|
- form: {},
|
|
|
- // 表单校验
|
|
|
- rules: {
|
|
|
- nickName: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '昵称不能为空',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ],
|
|
|
- realName: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '真实姓名不能为空',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ],
|
|
|
- phoneNumber: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '手机号不能为空',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ],
|
|
|
- sex: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: '性别不能为空',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- isDisabled: true,
|
|
|
- userViewType: false,
|
|
|
- userInfo: {},
|
|
|
- userViewForm: {
|
|
|
- appUserId: 0,
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10
|
|
|
- },
|
|
|
- usertotal: 0,
|
|
|
- userloading: false,
|
|
|
- userinfoData: [],
|
|
|
- activeValue: '1'
|
|
|
- }
|
|
|
+ /** 查询用户列表 */
|
|
|
+ getList() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.pagination.handleSearch(true)
|
|
|
+ })
|
|
|
},
|
|
|
- created() {
|
|
|
- this.handleUser()
|
|
|
- this.getList()
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.open = false
|
|
|
+ this.reset()
|
|
|
},
|
|
|
- methods: {
|
|
|
- handleUser() {
|
|
|
- this.userInfoVO = this.getUserInfo()
|
|
|
- },
|
|
|
- /** 查询用户列表 */
|
|
|
- getList() {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.pagination.handleSearch(true)
|
|
|
- })
|
|
|
- },
|
|
|
- // 取消按钮
|
|
|
- cancel() {
|
|
|
- this.open = false
|
|
|
- this.reset()
|
|
|
- },
|
|
|
- // 表单重置
|
|
|
- reset() {
|
|
|
- this.form = {
|
|
|
- id: null,
|
|
|
- phoneNumber: null,
|
|
|
- nickName: null,
|
|
|
- realName: null,
|
|
|
- sex: null,
|
|
|
- birthday: null,
|
|
|
- avatarUrl: null,
|
|
|
- unionId: null,
|
|
|
- createTime: null,
|
|
|
- payPassword: null,
|
|
|
- isUsePayPassword: null,
|
|
|
- status: '0',
|
|
|
- level: null
|
|
|
- }
|
|
|
- this.resetForm('form')
|
|
|
- },
|
|
|
- /** 搜索按钮操作 */
|
|
|
- handleQuery() {
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- /** 重置按钮操作 */
|
|
|
- resetQuery() {
|
|
|
- this.resetForm('queryForm')
|
|
|
- this.handleQuery()
|
|
|
- },
|
|
|
- // 多选框选中数据
|
|
|
- handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map((item) => item.id)
|
|
|
- this.single = selection.length !== 1
|
|
|
- this.multiple = !selection.length
|
|
|
- },
|
|
|
- /** 新增按钮操作 */
|
|
|
- handleAdd() {
|
|
|
- this.reset()
|
|
|
- this.open = true
|
|
|
- this.isDisabled = false
|
|
|
- this.title = '添加用户'
|
|
|
- },
|
|
|
- /** 修改按钮操作 */
|
|
|
- handleUpdate(row) {
|
|
|
- this.reset()
|
|
|
- const id = row.id || this.ids
|
|
|
- getUser(id).then((response) => {
|
|
|
- this.form = response.data
|
|
|
- this.open = true
|
|
|
- this.isDisabled = true
|
|
|
- this.title = '修改用户'
|
|
|
- })
|
|
|
- },
|
|
|
- /** 提交按钮 */
|
|
|
- submitForm() {
|
|
|
- // this.$refs["form"].validate(valid => {
|
|
|
- // if (valid) {
|
|
|
- // if (this.form.id != null) {
|
|
|
- // updateUser(this.form).then(response => {
|
|
|
- // this.$modal.msgSuccess("修改成功");
|
|
|
- // this.open = false;
|
|
|
- // this.getList();
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // addUser(this.form).then(response => {
|
|
|
- // this.$modal.msgSuccess("新增成功");
|
|
|
- // this.open = false;
|
|
|
- // this.getList();
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
- // });
|
|
|
- this.open = false
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- /** 删除按钮操作 */
|
|
|
- handleDelete(row) {
|
|
|
- const ids = row.id || this.ids
|
|
|
- this.$modal
|
|
|
- .confirm('是否确认删除用户编号为"' + ids + '"的数据项?')
|
|
|
- .then(function () {
|
|
|
- return delUser(ids)
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.getList()
|
|
|
- this.$modal.msgSuccess('删除成功')
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
- },
|
|
|
- /** 导出按钮操作 */
|
|
|
- handleExport() {
|
|
|
- this.download(
|
|
|
- 'mapi/app/user/export',
|
|
|
- {
|
|
|
- ...this.queryParams
|
|
|
- },
|
|
|
- `user_${new Date().getTime()}.xlsx`
|
|
|
- )
|
|
|
- },
|
|
|
- checkClose(done) {
|
|
|
- this.$confirm('是否关闭表单,关闭后数据将丢失?')
|
|
|
- .then(function () {
|
|
|
- done()
|
|
|
- })
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {})
|
|
|
- },
|
|
|
- handleStatusChange(row) {
|
|
|
- let text = row.status === '0' ? '启用' : '停用'
|
|
|
- this.$confirm('确认要' + text + ' ' + row.name + ' 吗?')
|
|
|
- .then(function () {
|
|
|
- return updateUserStatus(row.id, row.status)
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.$modal.msgSuccess(text + '成功')
|
|
|
- })
|
|
|
- .catch(function () {
|
|
|
- row.status = row.status === '0' ? '1' : '0'
|
|
|
- })
|
|
|
- },
|
|
|
- //客户详情弹框
|
|
|
- handleView(row) {
|
|
|
- getMemberInfoById({
|
|
|
- appUserId: row.id
|
|
|
- }).then((response) => {
|
|
|
- this.userViewType = true
|
|
|
- this.userInfo = response.data
|
|
|
- this.userViewForm = {
|
|
|
- appUserId: row.id,
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 15
|
|
|
- }
|
|
|
- this.activeValue = '1'
|
|
|
- this.getMemberCouponData()
|
|
|
- })
|
|
|
- },
|
|
|
- //获取会员优惠券列表
|
|
|
- getMemberCouponData() {
|
|
|
- this.userloading = true
|
|
|
- getMemberCouponInfo(this.userViewForm).then((response) => {
|
|
|
- this.userinfoData = response.data.records
|
|
|
- this.usertotal = response.data.total
|
|
|
- this.userloading = false
|
|
|
- })
|
|
|
- },
|
|
|
- //获取会员消费明细
|
|
|
- getMemberBillMstrData() {
|
|
|
- this.userloading = true
|
|
|
- getMemberBillMstrInfo(this.userViewForm).then((response) => {
|
|
|
- this.userinfoData = response.data.records
|
|
|
- this.usertotal = response.data.total
|
|
|
- this.userloading = false
|
|
|
- })
|
|
|
- },
|
|
|
- //获取会员商品订单信息
|
|
|
- getMemberOrderGoodsData() {
|
|
|
- this.userloading = true
|
|
|
- getMemberOrderGoodsInfo(this.userViewForm).then((response) => {
|
|
|
- this.userinfoData = response.data.records
|
|
|
- this.usertotal = response.data.total
|
|
|
- this.userloading = false
|
|
|
- })
|
|
|
- },
|
|
|
- //获取会员洗衣订单信息
|
|
|
- getMemberOrderClothData() {
|
|
|
- this.userloading = true
|
|
|
- getMemberOrderClothInfo(this.userViewForm).then((response) => {
|
|
|
- this.userinfoData = response.data.records
|
|
|
- this.usertotal = response.data.total
|
|
|
- this.userloading = false
|
|
|
- })
|
|
|
- },
|
|
|
- //总部客户管理- 会员卡列表查询
|
|
|
- getMemberCardData() {
|
|
|
- this.userloading = true
|
|
|
- getMemberCardInfoList(this.userViewForm).then((response) => {
|
|
|
- this.userinfoData = response.data.records
|
|
|
- this.usertotal = response.data.total
|
|
|
- this.userloading = false
|
|
|
- })
|
|
|
- },
|
|
|
- getAddress(userInfo) {
|
|
|
- return userInfo.province + userInfo.city + userInfo.area + userInfo.address + userInfo.addressDetail
|
|
|
- },
|
|
|
- btn_chioc(tab, event) {
|
|
|
- console.log('tab.index', tab.index)
|
|
|
- this.userViewForm.pageNum = 1
|
|
|
- this.userinfoData = []
|
|
|
- if (tab.index === '0') {
|
|
|
- this.getMemberCouponData()
|
|
|
- } else if (tab.index === '1') {
|
|
|
- this.getMemberBillMstrData()
|
|
|
- } else if (tab.index === '2') {
|
|
|
- this.getMemberOrderGoodsData()
|
|
|
- } else if (tab.index === '3') {
|
|
|
- this.getMemberOrderClothData()
|
|
|
- } else {
|
|
|
- this.getMemberCardData()
|
|
|
- }
|
|
|
- },
|
|
|
- usercheckClose(done) {
|
|
|
- this.$confirm('是否关闭客户详情?')
|
|
|
- .then(function () {
|
|
|
- done()
|
|
|
- })
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {})
|
|
|
- },
|
|
|
- // 取消按钮
|
|
|
- usercancel() {
|
|
|
- this.userViewType = false
|
|
|
- this.userInfo = {}
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {
|
|
|
+ id: null,
|
|
|
+ phoneNumber: null,
|
|
|
+ nickName: null,
|
|
|
+ realName: null,
|
|
|
+ sex: null,
|
|
|
+ birthday: null,
|
|
|
+ avatarUrl: null,
|
|
|
+ unionId: null,
|
|
|
+ createTime: null,
|
|
|
+ payPassword: null,
|
|
|
+ isUsePayPassword: null,
|
|
|
+ status: '0',
|
|
|
+ level: null
|
|
|
+ }
|
|
|
+ this.resetForm('form')
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm('queryForm')
|
|
|
+ this.handleQuery()
|
|
|
+ },
|
|
|
+ // 多选框选中数据
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.ids = selection.map((item) => item.id)
|
|
|
+ this.single = selection.length !== 1
|
|
|
+ this.multiple = !selection.length
|
|
|
+ },
|
|
|
+ /** 新增按钮操作 */
|
|
|
+ handleAdd() {
|
|
|
+ this.reset()
|
|
|
+ this.open = true
|
|
|
+ this.isDisabled = false
|
|
|
+ this.title = '添加用户'
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleUpdate(row) {
|
|
|
+ this.reset()
|
|
|
+ const id = row.id || this.ids
|
|
|
+ getUser(id).then((response) => {
|
|
|
+ this.form = response.data
|
|
|
+ this.open = true
|
|
|
+ this.isDisabled = true
|
|
|
+ this.title = '修改用户'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitForm() {
|
|
|
+ // this.$refs["form"].validate(valid => {
|
|
|
+ // if (valid) {
|
|
|
+ // if (this.form.id != null) {
|
|
|
+ // updateUser(this.form).then(response => {
|
|
|
+ // this.$modal.msgSuccess("修改成功");
|
|
|
+ // this.open = false;
|
|
|
+ // this.getList();
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // addUser(this.form).then(response => {
|
|
|
+ // this.$modal.msgSuccess("新增成功");
|
|
|
+ // this.open = false;
|
|
|
+ // this.getList();
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ this.open = false
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ /** 删除按钮操作 */
|
|
|
+ handleDelete(row) {
|
|
|
+ const ids = row.id || this.ids
|
|
|
+ this.$modal
|
|
|
+ .confirm('是否确认删除用户编号为"' + ids + '"的数据项?')
|
|
|
+ .then(function () {
|
|
|
+ return delUser(ids)
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getList()
|
|
|
+ this.$modal.msgSuccess('删除成功')
|
|
|
+ })
|
|
|
+ .catch(() => { })
|
|
|
+ },
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ handleExport() {
|
|
|
+ this.download(
|
|
|
+ 'mapi/app/user/export',
|
|
|
+ {
|
|
|
+ ...this.queryParams
|
|
|
},
|
|
|
- closeDialog() {
|
|
|
- this.open = false
|
|
|
+ `user_${new Date().getTime()}.xlsx`
|
|
|
+ )
|
|
|
+ },
|
|
|
+ checkClose(done) {
|
|
|
+ this.$confirm('是否关闭表单,关闭后数据将丢失?')
|
|
|
+ .then(function () {
|
|
|
+ done()
|
|
|
+ })
|
|
|
+ .then(() => { })
|
|
|
+ .catch(() => { })
|
|
|
+ },
|
|
|
+ handleStatusChange(row) {
|
|
|
+ let text = row.status === '0' ? '启用' : '停用'
|
|
|
+ this.$confirm('确认要' + text + ' ' + row.name + ' 吗?')
|
|
|
+ .then(function () {
|
|
|
+ return updateUserStatus(row.id, row.status)
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$modal.msgSuccess(text + '成功')
|
|
|
+ })
|
|
|
+ .catch(function () {
|
|
|
+ row.status = row.status === '0' ? '1' : '0'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //客户详情弹框
|
|
|
+ handleView(row) {
|
|
|
+ getMemberInfoById({
|
|
|
+ appUserId: row.id
|
|
|
+ }).then((response) => {
|
|
|
+ this.userViewType = true
|
|
|
+ this.userInfo = response.data
|
|
|
+ this.userViewForm = {
|
|
|
+ appUserId: row.id,
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 15
|
|
|
}
|
|
|
+ this.activeValue = '1'
|
|
|
+ this.getMemberCouponData()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //获取会员优惠券列表
|
|
|
+ getMemberCouponData() {
|
|
|
+ this.userloading = true
|
|
|
+ getMemberCouponInfo(this.userViewForm).then((response) => {
|
|
|
+ this.userinfoData = response.rows
|
|
|
+ this.usertotal = response.total
|
|
|
+ this.userloading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //获取会员消费明细
|
|
|
+ getMemberBillMstrData() {
|
|
|
+ this.userloading = true
|
|
|
+ getMemberBillMstrInfo(this.userViewForm).then((response) => {
|
|
|
+ this.userinfoData = response.data.records
|
|
|
+ this.usertotal = response.data.total
|
|
|
+ this.userloading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //获取会员商品订单信息
|
|
|
+ getMemberOrderGoodsData() {
|
|
|
+ this.userloading = true
|
|
|
+ getMemberOrderGoodsInfo(this.userViewForm).then((response) => {
|
|
|
+ this.userinfoData = response.data.records
|
|
|
+ this.usertotal = response.data.total
|
|
|
+ this.userloading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //获取会员洗衣订单信息
|
|
|
+ getMemberOrderClothData() {
|
|
|
+ this.userloading = true
|
|
|
+ getMemberOrderClothInfo(this.userViewForm).then((response) => {
|
|
|
+ this.userinfoData = response.data.records
|
|
|
+ this.usertotal = response.data.total
|
|
|
+ this.userloading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //总部客户管理- 会员卡列表查询
|
|
|
+ getMemberCardData() {
|
|
|
+ this.userloading = true
|
|
|
+ getMemberCardInfoList(this.userViewForm).then((response) => {
|
|
|
+ this.userinfoData = response.data.records
|
|
|
+ this.usertotal = response.data.total
|
|
|
+ this.userloading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getAddress(userInfo) {
|
|
|
+ return userInfo.province + userInfo.city + userInfo.area + userInfo.address + userInfo.addressDetail
|
|
|
+ },
|
|
|
+ btn_chioc(tab, event) {
|
|
|
+ console.log('tab.index', tab.index)
|
|
|
+ this.userViewForm.pageNum = 1
|
|
|
+ this.userinfoData = []
|
|
|
+ if (tab.index === '0') {
|
|
|
+ this.getMemberCouponData()
|
|
|
+ } else if (tab.index === '1') {
|
|
|
+ this.getMemberBillMstrData()
|
|
|
+ } else if (tab.index === '2') {
|
|
|
+ this.getMemberOrderGoodsData()
|
|
|
+ } else if (tab.index === '3') {
|
|
|
+ this.getMemberOrderClothData()
|
|
|
+ } else {
|
|
|
+ this.getMemberCardData()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ usercheckClose(done) {
|
|
|
+ this.$confirm('是否关闭客户详情?')
|
|
|
+ .then(function () {
|
|
|
+ done()
|
|
|
+ })
|
|
|
+ .then(() => { })
|
|
|
+ .catch(() => { })
|
|
|
+ },
|
|
|
+ // 取消按钮
|
|
|
+ usercancel() {
|
|
|
+ this.userViewType = false
|
|
|
+ this.userInfo = {}
|
|
|
+ },
|
|
|
+ closeDialog() {
|
|
|
+ this.open = false
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|