| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888 |
- <?php
- use common\helpers\ComponentHelper;
- ComponentHelper::loadComponentView('com-attachment');
- ComponentHelper::loadComponentView('com-image');
- ComponentHelper::loadComponentView('com-map');
- ?>
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <span>{{ custom_text }}管理</span>
- <div style="float: right; margin: -5px 0">
- <el-button type="primary" @click="addUser(true)" size="small">
- 添加{{ custom_text }}
- </el-button>
- <!-- <el-button type="primary" @click="$navigate({r:'store/client/reserve-staff/add'})" size="small">-->
- <!-- 添加{{ custom_text }}-->
- <!-- </el-button>-->
- </div>
- </div>
- <div class="table-body">
- <el-form size="small" :inline="true">
- <el-form-item>
- <el-input style="width: 200px" v-model="searchData.user_id" placeholder="请输入用户ID进行搜索" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-input style="width: 200px" v-model="searchData.keyword" placeholder="请输入用户昵称/手机号进行搜索" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-input style="width: 200px" v-model="searchData.name" placeholder="请输入名称进行搜索" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-input style="width: 200px" v-model="searchData.mobile" placeholder="请输入手机号进行搜索" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-date-picker size="small" v-model="searchData.date" type="datetimerange" style="float: left" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" @change="selectDateTime" end-placeholder="结束日期">
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="searchs" style="padding: 9px 15px !important">搜索</el-button>
- </el-form-item>
- </el-form>
- <el-tabs v-model="activeName" >
- <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" >
- <el-table-column prop="user_id" label="会员ID" align="center"></el-table-column>
- <el-table-column label="会员" >
- <template slot-scope="scope">
- <div class="table-info-img-text">
- <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div style="color:#000;">{{scope.row.user.nickname}}</div>
- <div style="font-size: 12px;">{{scope.row.mobile}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="姓名" prop="name" align="center" ></el-table-column>
- <el-table-column :label="custom_text + '等级'" align="center">
- <template slot-scope="scope">
- {{scope.row.level ? scope.row.level.name : '默认等级'}}
- </template>
- </el-table-column>
- <el-table-column label="资格证书" align="center">
- <template slot-scope="scope">
- <el-image
- v-for="(img, index) in scope.row.qualification_certificate"
- :key="index"
- style="width: 50px; height: 50px; margin-left: 5px"
- :src="img"
- :preview-src-list="scope.row.qualification_certificate">
- </el-image>
- </template>
- </el-table-column>
- <el-table-column label="订单核销数量" prop="store_order_num" align="center"></el-table-column>
- <el-table-column label="订单业绩数量(不含退款)" prop="order_count" align="center" min-width="110"></el-table-column>
- <el-table-column label="服务地址" prop="address" align="left"></el-table-column>
- <!-- <el-table-column label="入驻时间" align="center">-->
- <!-- <template slot-scope="scope">-->
- <!-- {{scope.row.settle.created_at|dateTimeFormat('Y-m-d H:i:s')}}-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column label="操作" align="center" min-width="200">
- <template slot-scope="scope">
- <el-button type="text" @click="$navigate({r:'store/client/reserve-staff/detail', id: scope.row.user_id})" class="all_text">查看</el-button>
- <el-button type="text" @click="onDelete(scope.row, scope.$index)" class="all_text" style="margin-left: 10px">删除</el-button>
- <el-button type="text" @click="association(scope.row)" class="all_text" style="margin-left: 10px">关联商品</el-button>
- <el-button type="text" @click="associationSecondaryCard(scope.row)" class="all_text"
- style="margin-left: 10px">关联次卡
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-tabs>
- <div flex="box:last cross:center">
- <div></div>
- <div>
- <el-pagination v-if="pagination" :page-size="page_size"
- style="float: right;" background @current-change="pageChange"
- layout="prev, pager, next" :total="pagination.totalCount">
- </el-pagination>
- </div>
- </div>
- </div>
- <el-dialog title="关联商品" :visible.sync="dialogVisibleAssociation">
- <el-button type="text" @click="associationAdd" class="all_text" style="margin-left: 10px">添加商品</el-button>
- <el-table :data="gridData">
- <el-table-column prop="id" label="商品ID" width="150"></el-table-column>
- <el-table-column prop="goods_name" label="商品" width="200">
- <template slot-scope="scope">
- <div flex="cross:center">
- <div style="margin-right: 10px;">
- <el-image style="width: 50px; height: 50px;border-radius: 5px;" :src="scope.row.cover_pic"></el-image>
- </div>
- <el-tooltip class="item" effect="dark" content="商品名称" placement="top">
- <span>{{scope.row.goods_name}}</span>
- </el-tooltip>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="created_at" label="创建时间">
- <template slot-scope="scope">
- {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" min-width="80">
- <template slot-scope="scope">
- <el-button @click="delFun(scope.$index)" type="danger" plain>取消</el-button>
- </template>
- </el-table-column>
- </el-table>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisibleAssociation = false">取 消</el-button>
- <el-button type="primary" @click="handleAssociationStoreGoods">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog title="关联次卡" :visible.sync="dialogVisibleAssociationSecondaryCard">
- <el-button type="text" @click="associationAddSecondaryCard" class="all_text" style="margin-left: 10px">
- 添加次卡
- </el-button>
- <el-table :data="gridDataSecondaryCard">
- <el-table-column prop="id" label="次卡ID"></el-table-column>
- <el-table-column prop="name" label="次卡名称"></el-table-column>
- <el-table-column prop="create_source_type_text" label="创建来源"></el-table-column>
- <el-table-column prop="created_at" label="创建时间">
- <template slot-scope="scope">
- {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center">
- <template slot-scope="scope">
- <el-button @click="delFunSecondaryCard(scope.$index)" type="danger" plain>取消</el-button>
- </template>
- </el-table-column>
- </el-table>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisibleAssociationSecondaryCard = false">取 消</el-button>
- <el-button type="primary" @click="handleAssociationStoreSecondaryCard">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog title="添加商品" :visible.sync="dialogVisibleAssociationAdd">
- <el-input v-model="searchGoodsData.keyword" placeholder="请输入商品ID或者商品名称" @keyup.enter.native="getAssociationAddList(1)">
- <el-button slot="append" @click="getAssociationAddList(1)">搜索</el-button>
- </el-input>
- <el-table ref="multipleTable" :data="gridDataGoodsList" @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="55"></el-table-column>
- <el-table-column prop="id" label="商品ID" width="150"></el-table-column>
- <el-table-column prop="goods_name" label="商品" width="200">
- <template slot-scope="scope">
- <div flex="cross:center">
- <div style="margin-right: 10px;">
- <el-image style="width: 50px; height: 50px;border-radius: 5px;" :src="scope.row.cover_pic"></el-image>
- </div>
- <el-tooltip class="item" effect="dark" content="商品名称" placement="top">
- <span>{{scope.row.goods_name}}</span>
- </el-tooltip>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="address" label="创建时间">
- <template slot-scope="scope">
- {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
- </template>
- </el-table-column>
- </el-table>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisibleAssociationAdd = false">取 消</el-button>
- <el-button type="primary" @click="associationAddSelected">确 定</el-button>
- </span>
- <div style="margin-top: 24px;">
- <el-row>
- <el-pagination
- v-if="paginationAdd"
- style="display: inline-block;"
- background
- :page-size="paginationAdd.pageSize"
- @current-change="getAssociationAddList"
- layout="prev, pager, next"
- :total="paginationAdd.total_count">
- </el-pagination>
- </el-row>
- </div>
- </el-dialog>
- <el-dialog title="添加次卡" :visible.sync="dialogVisibleAssociationAddSecondaryCard">
- <el-input v-model="searchSecondaryCardData.keyword" placeholder="请输入次卡ID或者次卡名称"
- @keyup.enter.native="getAssociationSecondaryCardAddList(1)">
- <el-button slot="append" @click="getAssociationSecondaryCardAddList(1)">搜索</el-button>
- </el-input>
- <el-table ref="multipleTableSecondaryCard" :data="gridDataSecondaryCardList"
- @selection-change="handleSelectionChangeSecondaryCard"
- >
- <el-table-column type="selection"></el-table-column>
- <el-table-column prop="id" label="次卡ID"></el-table-column>
- <el-table-column prop="name" label="次卡名称"></el-table-column>
- <el-table-column prop="create_source_type_text" label="创建来源"></el-table-column>
- <el-table-column prop="address" label="创建时间">
- <template slot-scope="scope">
- {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
- </template>
- </el-table-column>
- </el-table>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisibleAssociationAddSecondaryCard = false">取 消</el-button>
- <el-button type="primary" @click="associationAddSelectedSecondaryCard">确 定</el-button>
- </span>
- <div style="margin-top: 24px;">
- <el-row>
- <el-pagination
- v-if="paginationAddSecondaryCard"
- style="display: inline-block;"
- background
- :page-size="paginationAddSecondaryCard.pageSize"
- @current-change="getAssociationSecondaryCardAddList"
- layout="prev, pager, next"
- :total="paginationAddSecondaryCard.total_count">
- </el-pagination>
- </el-row>
- </div>
- </el-dialog>
- </el-card>
- <div class="level-edit">
- <?= ComponentHelper::loadComponentView('edit', __DIR__) ?>
- </div>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data: {
- searchData: {
- user_id: '',
- keyword: '', //会员昵称/手机号
- name: '',//用户来源
- mobile: '',//注册开始时间
- address: '',//注册结束时间
- date_start: '',
- date_end: '',
- date: '',
- },
- form: {
- user_id: '',
- level: '',
- idcard: '',
- idcard_front: '',
- idcard_back: '',
- address: '',
- longitude: '',
- latitude: '',
- nickname: '',
- name: '',
- mobile: '',
- qualification_certificate: [],
- avatar: '',
- age: '',
- gender: '1',
- },
- list: [],
- loading: false,
- btnLoading: false,
- activeName: '-1',
- pagination: null,
- page_size: 10,
- currentItem: null,
- drawer: false,
- direction: 'rtl',
- rules: {},
- levels: [],
- add: true,
- origin_level: '',
- user: {
- keyword: ''
- },
- lng_lat: '',
- page: 1,
- custom_text: '',
- dialogVisibleAssociation: false,
- dialogVisibleAssociationAdd: false,
- gridData:[],
- gridDataGoodsList:[],
- multipleSelection: [2096],
- searchGoodsData: {
- keyword: '',
- },
- checkedList:[],
- paginationAdd: null,
- user_id:'',
- selectedGoodsIds:[],
- selectedSecondaryCardIds: [],
- dialogVisibleAssociationSecondaryCard: false,
- dialogVisibleAssociationAddSecondaryCard: false,
- gridDataSecondaryCard: [],
- gridDataSecondaryCardList: [],
- multipleSelectionSecondaryCard: [],
- searchSecondaryCardData: {
- keyword: '',
- },
- paginationAddSecondaryCard: null,
- },
- computed: {
- },
- mounted() {
- this.loadData();
- },
- methods: {
- selectDateTime(e) {
- if (e != null) {
- this.searchData.date_start = e[0];
- this.searchData.date_end = e[1];
- } else {
- this.searchData.date_start = '';
- this.searchData.date_end = '';
- }
- this.searchs();
- },
- loadData() {
- this.loading = true;
- let params = {
- r: 'store/client/reserve-staff/index',
- page: this.page,
- };
- params = Object.assign(params, this.searchData);
- request({
- params: params,
- method: 'get',
- }).then(e => {
- this.loading = false;
- if (e.data.code == 0) {
- this.list = e.data.data.list;
- this.pagination = e.data.data.pagination;
- this.page_size = e.data.data.page_size;
- this.custom_text = e.data.data.custom_text;
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.loading = false;
- });
- },
- searchs() {
- this.page = 1;
- this.loadData();
- },
- pageChange(page) {
- this.page = page;
- this.loadData();
- },
- onDelete(item, index) {
- this.$confirm(`您是否真的要移除当前${this.custom_text}, 是否继续?`, '删除提醒', {
- type: 'warning'
- }).then(() => {
- this.btnLoading = false;
- request({
- params: {
- r: 'store/client/reserve-staff/delete'
- },
- method: 'post',
- data: {
- id: item.user_id,
- }
- }).then(e => {
- this.btnLoading = false;
- if (e.data.code == 0) {
- this.list.splice(index, 1)
- this.$message.success(e.data.msg);
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.btnLoading = false;
- });
- })
- },
- submitForm(formName) {
- let _this = this;
- this.$refs[formName].validate((valid) => {
- if (valid) {
- _this.btnLoading = true;
- request({
- params: {
- r: 'store/client/reserve-staff/add'
- },
- method: 'post',
- data: {
- form: _this.form,
- }
- }).then(e => {
- _this.btnLoading = false
- if (e.data.code == 0) {
- _this.drawer = false
- _this.$message.success(e.data.msg)
- this.page = 1;
- _this.loadData()
- } else {
- _this.$message.error(e.data.msg);
- }
- }).catch(e => {
- _this.$message.error(e.data.msg);
- _this.btnLoading = false;
- });
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- },
- addUser(add) {
- this.add = add
- this.drawer = true
- this.getLevels()
- },
- getLevels() {
- let _this = this;
- _this.btnLoading = true
- let basic_params = {
- r: 'store/client/reserve-staff/get-levels',
- };
- request({
- params: basic_params,
- method: 'get',
- }).then(e => {
- _this.btnLoading = false
- _this.levels = e.data.data
- }).catch(e => {
- console.log(e);
- });
- },
- handleClose(done) {
- this.drawer = false
- done()
- },
- querySearchAsync(queryString, cb) {
- this.user.keyword = queryString;
- this.getUser(cb);
- },
- getUser(cb) {
- request({
- params: {
- r: 'store/client/reserve-staff/search-user',
- keyword: this.user.keyword
- }
- }).then(res => {
- if (res.data.code == 0) {
- cb(res.data.data.list)
- } else {
- this.$message.error(res.data.msg);
- }
- });
- },
- agentClick(row) {
- this.form.user_id = row.id
- this.form.nickname = row.nickname
- this.handleBlur();
- },
- selectedImg(e, key) {
- this.form[key] = e[0].url;
- },
- delPic(key) {
- this.form[key] = '';
- },
- mapEvent(e) {
- this.form.longitude = e.long;
- this.form.latitude = e.lat;
- this.form.address = e.address;
- this.lng_lat = e.lat + '-' + e.long;
- },
- association(item) {
- this.dialogVisibleAssociation = true;
- this.user_id = item.user_id;
- let params = {
- r: 'store/client/reserve-staff/get-association-store-goods',
- user_id:item.user_id
- };
- request({
- params: params,
- method: 'get',
- }).then(e => {
- if (e.data.code == 0) {
- this.gridData = e.data.data;
- this.gridData.forEach((row)=>{
- this.selectedGoodsIds.push(row.id);
- });
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- });
- },
- associationAdd() {
- this.dialogVisibleAssociationAdd = true;
- this.getAssociationAddList(1);
- },
- // 获取待添加商品列表
- getAssociationAddList(page){
- let params = {
- r: 'store/client/reserve-staff/get-store-goods',
- page: page,
- };
- params = Object.assign(params, this.searchGoodsData);
- request({
- params: params,
- method: 'get',
- }).then(e => {
- if (e.data.code == 0) {
- this.gridDataGoodsList = e.data.data.list;
- this.paginationAdd = e.data.data.pagination;
- this.paginationAdd.pageSize = e.data.data.page_size;
- this.paginationAdd.total_count = this.paginationAdd.totalCount;
- this.gridData.forEach((item)=>{
- this.gridDataGoodsList.forEach((row)=>{
- if(row.id == item.id){
- this.$nextTick(() => {
- this.$refs.multipleTable.toggleRowSelection(row, true);
- });
- }
- })
- })
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- });
- },
- handleSelectionChange(val) {
- this.multipleSelection = val;
- },
- associationAddSelected(){
- if(this.gridData.length<=0){
- this.gridData = this.multipleSelection;
- this.multipleSelection.forEach((row)=>{
- this.selectedGoodsIds.push(row.id);
- });
- }else{
- this.gridData.forEach((item)=>{
- this.selectedGoodsIds.push(item.id);
- });
- this.multipleSelection.forEach((row)=>{
- if(!this.selectedGoodsIds.includes(row.id)){
- this.selectedGoodsIds.push(row.id);
- this.gridData.push(row);
- }
- });
- }
- this.dialogVisibleAssociationAdd = false;
- },
- handleAssociationStoreGoods(){
- request({
- params: {
- r: 'store/client/reserve-staff/handle-association-store-goods',
- },
- method: 'post',
- data: {
- goods_ids: this.selectedGoodsIds,
- user_id:this.user_id
- }
- }).then(e => {
- if (e.data.code == 0) {
- this.$message.success(e.data.msg)
- this.dialogVisibleAssociation = false;
- this.selectedGoodsIds = [];
- this.user_id = '';
- this.page = 1;
- this.loadData()
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.$message.error(e.data.msg);
- });
- },
- delFun(index) {
- this.gridData.splice(index, 1)
- this.selectedGoodsIds.splice(index, 1)
- },
- qualificationCertificatePic(e) {
- if (e.length) {
- e.forEach((item, index) => {
- if (this.form.qualification_certificate.length >= 9) return;
- this.form.qualification_certificate.push(item.url);
- })
- }
- },
- delQualificationCertificatePic( index) { // 删除图片
- this.form.qualification_certificate.splice(index, 1)
- },
- handleBlur(){
- request({
- params: {
- r: 'store/client/reserve-staff/check-staff-user',
- user_id: this.form.user_id
- }
- }).then(res => {
- if (res.data.code == 0) {
- this.form = res.data.data.user;
- this.form.gender = this.form.gender.toString();
- this.lng_lat = res.data.data.user.longitude+'-'+res.data.data.user.latitude;
- } else {
- this.$message.error(res.data.msg);
- }
- });
- },
- associationSecondaryCard(item) {
- this.dialogVisibleAssociationSecondaryCard = true;
- this.user_id = item.user_id;
- let params = {
- r: 'store/client/reserve-staff/get-association-store-secondary-card',
- user_id: item.user_id
- };
- request({
- params: params,
- method: 'get',
- }).then(e => {
- if (e.data.code == 0) {
- this.gridDataSecondaryCard = e.data.data;
- this.gridDataSecondaryCard.forEach((row) => {
- this.selectedSecondaryCardIds.push(row.id);
- });
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- });
- },
- associationAddSecondaryCard() {
- this.dialogVisibleAssociationAddSecondaryCard = true;
- this.getAssociationSecondaryCardAddList(1);
- },
- getAssociationSecondaryCardAddList(page) {
- let params = {
- r: 'store/client/reserve-staff/get-store-secondary-card',
- page: page,
- user_id: this.user_id
- };
- params = Object.assign(params, this.searchSecondaryCardData);
- request({
- params: params,
- method: 'get',
- }).then(e => {
- if (e.data.code == 0) {
- this.gridDataSecondaryCardList = e.data.data.list;
- this.paginationAddSecondaryCard = e.data.data.pagination;
- this.paginationAddSecondaryCard.pageSize = e.data.data.page_size;
- this.paginationAddSecondaryCard.total_count = this.paginationAddSecondaryCard.totalCount;
- this.gridData.forEach((item) => {
- this.gridDataSecondaryCardList.forEach((row) => {
- if (row.id == item.id) {
- this.$nextTick(() => {
- this.$refs.multipleTableSecondaryCard.toggleRowSelection(row, true);
- });
- }
- })
- })
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- });
- },
- associationAddSelectedSecondaryCard() {
- if (this.gridDataSecondaryCard.length <= 0) {
- this.gridDataSecondaryCard = this.multipleSelectionSecondaryCard;
- this.multipleSelectionSecondaryCard.forEach((row) => {
- this.selectedSecondaryCardIds.push(row.id);
- });
- } else {
- this.gridDataSecondaryCard.forEach((item) => {
- this.selectedGoodsIds.push(item.id);
- });
- this.multipleSelectionSecondaryCard.forEach((row) => {
- if (!this.selectedSecondaryCardIds.includes(row.id)) {
- this.selectedSecondaryCardIds.push(row.id);
- this.gridDataSecondaryCard.push(row);
- }
- });
- }
- this.dialogVisibleAssociationAddSecondaryCard = false;
- },
- handleSelectionChangeSecondaryCard(val) {
- this.multipleSelectionSecondaryCard = val;
- },
- handleAssociationStoreSecondaryCard() {
- request({
- params: {
- r: 'store/client/reserve-staff/handle-association-store-secondary-card',
- },
- method: 'post',
- data: {
- secondary_card_ids: this.selectedSecondaryCardIds,
- user_id: this.user_id
- }
- }).then(e => {
- if (e.data.code == 0) {
- this.$message.success(e.data.msg)
- this.dialogVisibleAssociationSecondaryCard = false;
- this.selectedSecondaryCardIds = [];
- this.user_id = '';
- this.page = 1;
- this.loadData()
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.$message.error(e.data.msg);
- });
- },
- delFunSecondaryCard(index) {
- this.gridDataSecondaryCard.splice(index, 1)
- this.selectedSecondaryCardIds.splice(index, 1)
- },
- }
- });
- </script>
- <style>
- .el-tabs__header {
- font-size: 16px;
- }
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .table-body .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- }
- .input-item {
- width: 250px;
- margin: 0 0 20px;
- display: inline-block;
- }
- /*.input-item .el-input__inner {*/
- /* border-right: 0;*/
- /*}*/
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- /*border-right: 0;*/
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- /*border-right: 0;*/
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- margin: 0;
- }
- .batch {
- margin: 0 0 20px;
- display: inline-block;
- }
- .batch .el-button {
- padding: 9px 15px !important;
- }
- .el-table th>.cell{
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .el-table__footer-wrapper, .el-table__header-wrapper{
- border-bottom: 1.4px solid #D6D6D6;
- }
- .el-table th>.cell {
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .table1 .el-table__footer-wrapper,
- .table1 .el-table__header-wrapper {
- border-bottom: 1.4px solid #D6D6D6;
- }
- .user_img{
- position: relative;
- margin-right: 8px;
- /* height: 50px;
- width: 50px; */
- }
- .default-avatar{
- width: 50px;
- height: 50px;
- border-radius: 50%;
- margin-right: 8px;
- }
- .uer-nickname {
- flex: 1;
- }
- .v-modal {
- z-index: 200 !important;
- }
- .add-image-btn {
- width: 100px;
- height: 100px;
- color: #419EFB;
- border: 1px solid #e2e2e2;
- cursor: pointer;
- }
- .del-btn {
- position: absolute;
- right: -14px;
- top: -14px;
- }
- .width-300 {
- max-width: 320px;
- }
- .card-covers {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- grid-gap: 10px;
- grid-auto-rows: minmax(100px, auto);
- grid-auto-flow: dense;
- }
- </style>
|