index.php 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('com-dialog-store');
  4. ?>
  5. <div id="app" v-cloak>
  6. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  7. <div slot="header">
  8. <div class="all_flex" style="margin-bottom: 30px;align-items: flex-end;">
  9. <div class="top_title">门店会员</div>
  10. <div style="font-size:12px;color: #919191;flex:1;"></div>
  11. </div>
  12. <el-form ref="form" style="margin-bottom: 10px;" :model="searchInfo" label-width="96px" size="mini">
  13. <el-row :gutter="24">
  14. <el-col :span="5" style="padding-left: 0;" class="top_form">
  15. <el-form-item label="用户">
  16. <el-input v-model="searchInfo.keyword" placeholder="请输入用户ID/昵称" clearable></el-input>
  17. </el-form-item>
  18. </el-col>
  19. <el-col :span="5" style="padding-left: 0;" class="top_form">
  20. <el-form-item label="关联时间">
  21. <el-date-picker
  22. v-model="addTime"
  23. type="datetimerange"
  24. range-separator="至"
  25. start-placeholder="开始日期"
  26. end-placeholder="结束日期"
  27. value-format="yyyy-MM-dd HH:mm:ss"
  28. @change="addTimeChange"
  29. :default-time="['00:00:00', '23:59:59']"
  30. >
  31. </el-date-picker>
  32. </el-form-item>
  33. </el-col>
  34. <div>
  35. <el-button @click="search" class="search_button all_button" size="small" type="primary">搜索</el-button>
  36. <el-button type="danger" size="small" @click="resetSearch" v-if="show_clear_search_btn">重置</el-button>
  37. </div>
  38. </el-row>
  39. <div>
  40. <el-button class="all_button" type="primary" size="small" @click="addAssociatedUser">添加</el-button>
  41. <el-button class="all_button" type="primary" size="small" @click="batchEditUserStore" style=" margin-left: 0px;" >会员批量修改</el-button>
  42. <el-button class="all_button" type="primary" size="small" @click="userBatchMigration" style=" margin-left: 0px;" >门店批量修改</el-button>
  43. </div>
  44. </el-form>
  45. <el-table class="table-info" ref="multipleTable" @selection-change="scFormTab" @sort-change="sortChang" stripe :data="form" highlight-current-row style="width: 100%" v-loading="listLoading">
  46. <el-table-column type="selection" width="100"></el-table-column>
  47. <el-table-column prop="user_id" label="会员ID" width="200" ></el-table-column>
  48. <el-table-column label="会员" width="300">
  49. <template slot-scope="scope">
  50. <div class="table-info-img-text">
  51. <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
  52. <div slot="error" class="image-slot">
  53. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  54. </div>
  55. </el-image>
  56. <div class="no_user" style="width: 50px; bottom:20px;" v-if="scope.row.user.status == 0">黑名单</div>
  57. <div class="table-info-text">
  58. <div style="color:#000;">{{scope.row.user.nickname}}</div>
  59. <div style="font-size: 12px;">{{scope.row.user.mobile}}</div>
  60. </div>
  61. </div>
  62. </template>
  63. </el-table-column>
  64. <el-table-column prop="score" label="关联时间" width="180px" align="center">
  65. <template slot-scope="scope">
  66. {{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}
  67. </template>
  68. </el-table-column>
  69. <el-table-column label="操作" min-width="170px" align="center" fixed="right">
  70. <template slot-scope="scope">
  71. <el-button type="text" @click="editUserStore(scope.row.user_id)" class="all_text">修改</el-button>
  72. </template>
  73. </el-table-column>
  74. </el-table>
  75. <!-- 底部按钮操作 -->
  76. <div style="margin: 10px 20px 0;">
  77. <!-- <el-checkbox class="up_checkbox_color" style="margin-right: 10px;" v-model="checkedAll" @change="tabAll"><div :class="{all_text:checkedAll}">全选当前页</div></el-checkbox>-->
  78. <div id="bottom_t" style="text-align: right;">
  79. <el-input v-model="page" placeholder="" size="small" @keyup.enter.native="pageSearch" style="width:50px; float: right; text-align: center; margin: 0;padding: 0;"></el-input>
  80. <el-pagination @current-change="pagination" background layout="prev, pager, next"
  81. :page-count="pageCount" :current-page="currentPage"></el-pagination>
  82. </div>
  83. </div>
  84. </div>
  85. <!-- 添加关联用户 -->
  86. <el-dialog :visible.sync="addUserFormDialogVisible" title="添加会员" @close="addUserFormDialogVisible = false" width="60%">
  87. <el-form :model="ruleForm" :rules="rules" size="small" ref="ruleForm" label-width="200px" v-loading="listLoading">
  88. <el-row>
  89. <el-col :span="24">
  90. <el-form-item label="会员" prop="user_id">
  91. <el-button type="primary" style="padding:9px 40px" size="small" @click.sync='chooseUser'>选择会员 </el-button>
  92. </el-form-item>
  93. <el-form-item label="选中会员" v-if="ruleForm.user_id">
  94. <div style="display: inline-block; margin-left: 15px;">会员ID:<span>{{ruleForm.user_id}}</span></div>
  95. <div style="display: inline-block; margin-left: 15px;">会员昵称:<span>{{ruleForm.nickname}}</span></div>
  96. </el-form-item>
  97. </el-col>
  98. </el-row>
  99. </el-form>
  100. <span slot="footer" class="dialog-footer">
  101. <el-button @click="addUserFormDialogVisible = false">取消</el-button>
  102. <el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
  103. </span>
  104. </el-dialog>
  105. <el-dialog title="添加会员" :visible.sync="addUserDialogVisible" width="60%">
  106. <div class="search-box">
  107. <div class="input-item" style="padding-right: 10px">
  108. <el-input @keyup.enter.native="getUser" size="small" placeholder="请输入会员ID" v-model="searchData.user_id"> </el-input>
  109. </div>
  110. <div class="input-item" style="padding-right: 10px">
  111. <el-input @keyup.enter.native="getUser" size="small" placeholder="会员昵称/手机号" v-model="searchData.keyword"> </el-input>
  112. </div>
  113. <el-button type="primary" size="small" @click="getUserClick">搜索</el-button>
  114. <el-button type="warning" size="small" @click="clearSearch" v-if="searchData.keyword || searchData.user_id" style="padding: 9px 15px !important;">清除搜索条件</el-button>
  115. </div>
  116. <el-table :data="addUserList" stripe v-loading="userListLoading" style="width: 100%" @current-change="clickChange">
  117. <el-table-column prop="date" width="50">
  118. <template slot-scope="scope">
  119. <el-radio v-model="userInfo" :label="scope.row"><i></i></el-radio>
  120. </template>
  121. </el-table-column>
  122. <el-table-column prop="id" label="ID" width="80"> </el-table-column>
  123. <el-table-column prop="avatar_url" label="会员" width="80">
  124. <template slot-scope="scope">
  125. <el-image style="width: 60px; height: 60px" :src="scope.row.avatar_url" fit="cover"></el-image>
  126. </template>
  127. </el-table-column>
  128. <el-table-column prop="nickname" width="180"> </el-table-column>
  129. <el-table-column prop="mobile" label="手机号" width="200">
  130. </el-table-column>
  131. <el-table-column prop="level_name" label="会员等级">
  132. <template slot-scope="scope">
  133. <div v-if="scope.row.level > 0">等级{{scope.row.level_name}}</div>
  134. <div v-else>普通用户</div>
  135. </template>
  136. </el-table-column>
  137. <el-table-column prop="parent_nickname" label="已绑定推荐人">
  138. </el-table-column>
  139. </el-table>
  140. <div style="text-align: right;margin: 20px 0;">
  141. <el-pagination @current-change="userPagination" background layout="prev, pager, next" :page-count="addUserPageCount"></el-pagination>
  142. </div>
  143. <span slot="footer" class="dialog-footer">
  144. <el-button @click="addUserDialogVisible = false">取 消</el-button>
  145. <el-button type="primary" @click="selectUser">确 定</el-button>
  146. </span>
  147. </el-dialog>
  148. <!-- 门店批量修改 -->
  149. <el-dialog title="门店批量修改" :visible.sync="userMigrationDialogVisible" >
  150. <div>
  151. <el-form :model="userMigrationForm" :rules="userMigrationRules" ref="userMigrationForm" size="small" label-width="200px">
  152. <el-form-item label="所属门店" prop="store_id">
  153. <com-dialog-store :multiple="false" @selected="storeSelect" title="修改门店">
  154. <el-button type="primary" size="mini">选择门店</el-button>
  155. </com-dialog-store>
  156. </el-form-item>
  157. <el-form-item v-if="migrationStore">
  158. <div style="max-width:400px;max-height: 300px;overflow-y: auto;background-color: #eee;margin: 5px 0;">
  159. <div flex>
  160. <div style="padding-right: 10px;flex-grow: 0">
  161. <com-image mode="aspectFill"
  162. :src="migrationStore.logo_img"></com-image>
  163. </div>
  164. <div style="flex-grow: 1;">
  165. <com-ellipsis :line="2">{{migrationStore.store_name}}
  166. </com-ellipsis>
  167. </div>
  168. </div>
  169. </div>
  170. </el-form-item>
  171. </el-form>
  172. </div>
  173. <span slot="footer" class="dialog-footer">
  174. <el-button @click="userMigrationDialogVisible=false" type="default" size="small">取消</el-button>
  175. <el-button type="primary" :loading="btnBossLoading" style="margin-bottom: 10px;" size="small" @click="submitForm('userMigrationForm')">保存</el-button>
  176. </span>
  177. </el-dialog>
  178. <el-dialog :title="userEditStoreFormTitle" :visible.sync="userEditDialogVisible" >
  179. <div>
  180. <el-form :model="userEditStoreForm" :rules="userEditRules" ref="userEditStoreForm" size="small" label-width="200px">
  181. <el-form-item label="所属门店" prop="store_id">
  182. <com-dialog-store :multiple="false" @selected="storeEditStoreSelect" title="修改门店">
  183. <el-button type="primary" size="mini">选择门店</el-button>
  184. </com-dialog-store>
  185. </el-form-item>
  186. <el-form-item v-if="userEditStore">
  187. <div style="max-width:400px;max-height: 300px;overflow-y: auto;background-color: #eee;margin: 5px 0;">
  188. <div flex>
  189. <div style="padding-right: 10px;flex-grow: 0">
  190. <com-image mode="aspectFill"
  191. :src="userEditStore.logo_img"></com-image>
  192. </div>
  193. <div style="flex-grow: 1;">
  194. <com-ellipsis :line="2">{{userEditStore.store_name}}
  195. </com-ellipsis>
  196. </div>
  197. </div>
  198. </div>
  199. </el-form-item>
  200. </el-form>
  201. </div>
  202. <span slot="footer" class="dialog-footer">
  203. <el-button @click="userEditDialogVisible=false" type="default" size="small">取消</el-button>
  204. <el-button type="primary" :loading="btnBossLoading" style="margin-bottom: 10px;" size="small" @click="submitForm('userEditStoreForm')">保存</el-button>
  205. </span>
  206. </el-dialog>
  207. </el-card>
  208. </div>
  209. <script>
  210. const app = new Vue({
  211. el: '#app',
  212. props: {
  213. edit_user_url: {
  214. type: String,
  215. default: 'mall/user/edit'
  216. },
  217. import_user_url: {
  218. type: String,
  219. default: 'mall/user/import-users'
  220. },
  221. },
  222. data() {
  223. return {
  224. store_id:'',
  225. platform: '0',
  226. member_level: '0',
  227. mall_members: [],
  228. keyword: '',
  229. keyword_user_id: '',
  230. form: [],
  231. member: [],
  232. pageCount: 0,
  233. page: 1,
  234. member_page: 1,
  235. currentPage: null,
  236. listLoading: false,
  237. btnLoading: false,
  238. user_count: 0,
  239. updateTime: '',
  240. searchInfo: {
  241. keyword: '',
  242. related_start: '',//注册开始时间
  243. related_end: '',//注册结束时间
  244. },
  245. addTime: '',//注册时间
  246. lastSpendTime: '',//上次消费时间
  247. visibleUserId: 0,
  248. checkedAll: false,
  249. selFormArr: [],//表格选中的元素
  250. sortFo: '', //排序方向:asc升序 desc降序 ''不排序
  251. sortPorp: '',//排序的元素属性名
  252. dataRenewBoo: false,
  253. userUrl: 'mall/user/index',
  254. install_addons: [],
  255. isFreezeCommission: 0,
  256. editRowId: 0,
  257. editColumnId: -1,
  258. searchData: {
  259. user_id: null,
  260. keyword: '',
  261. },
  262. //添加关联用户
  263. ruleForm: {
  264. user_id: null,
  265. nickname: ''
  266. },
  267. rules: {
  268. 'user_id': [{required: true, message: '会员不能为空'}],
  269. },
  270. userListLoading: false,
  271. addUserList: [],
  272. userInfo: {},
  273. addUserFormDialogVisible:false,
  274. addUserDialogVisible:false,
  275. // 门店批量修改
  276. userMigrationDialogVisible:false,
  277. btnBossLoading: false,
  278. userMigrationForm: {
  279. store_id: null,
  280. old_store_id:null,
  281. },
  282. migrationStore:null,
  283. userMigrationRules: {
  284. // 'store_id': [{required: true, message: '门店不能为空'}]
  285. },
  286. //用户修改 and 用户批量修改
  287. userEditStoreFormTitle:null,
  288. userEditDialogVisible:false,
  289. userEditStoreForm: {
  290. user_ids : [],
  291. store_id: null,
  292. old_store_id:null,
  293. },
  294. userEditRules: {
  295. // 'store_id': [{required: true, message: '门店不能为空'}],
  296. // 'userEditStoreForm.user_id': [{required: true, message: '会员不能为空'}],
  297. },
  298. userEditStore:null,
  299. };
  300. },
  301. computed: {
  302. show_clear_search_btn: function() {
  303. return !isEmpty(this.searchInfo.keyword)
  304. ||!isEmpty(this.searchInfo.related_start)
  305. ||!isEmpty(this.searchInfo.related_end)
  306. }
  307. },
  308. methods: {
  309. search() {
  310. // console.info(this.searchInfo);
  311. this.page = 1;
  312. this.getList();
  313. },
  314. pageSearch(){
  315. this.page_count = 1;
  316. this.getList();
  317. },
  318. pagination(currentPage) {
  319. this.checkedAll = false;
  320. this.selFormArr = [];
  321. this.page = currentPage;
  322. this.getList();
  323. },
  324. getList() {
  325. this.listLoading = true;
  326. let sort = '';
  327. let data = {
  328. page: this.page,
  329. keyword: this.searchInfo.keyword,
  330. related_start: this.searchInfo.related_start,
  331. related_end: this.searchInfo.related_end,
  332. limit:10,
  333. // search: JSON.stringify(this.searchInfo),
  334. }
  335. if(this.sortFo){
  336. sort = this.sortPorp + ' ' + this.sortFo;
  337. data.sort = sort;
  338. }
  339. let params = {
  340. r: 'store/store-user-associated/index',
  341. store_id: this.store_id,
  342. };
  343. params = Object.assign(params, data);
  344. request({
  345. params: params,
  346. method: 'get',
  347. }).then(e => {
  348. //console.info(e);
  349. if (e.data.code === 0) {
  350. //console.log(e.data.data.user_list.list);
  351. this.form = e.data.data.list;
  352. this.pageCount = e.data.data.page_count;
  353. this.currentPage = e.data.data.page;
  354. this.user_count = e.data.data.count;
  355. if(this.page_count !=1) this.pageCount = e.data.data.page_count;
  356. this.currentPage = parseInt(this.page);
  357. if(this.checkedAll){
  358. this.$nextTick(rrr => {
  359. this.form.forEach(v => {
  360. this.$refs.multipleTable.toggleRowSelection(v);
  361. })
  362. })
  363. }
  364. // if(this.currentPage == 1){
  365. // this.updateTime = e.data.data.mall_data.updated_at;
  366. // this.userTagList = e.data.data.tag_list;
  367. // this.memberLabelList = e.data.data.member_label_List;
  368. // this.channelArr = e.data.data.channel;
  369. // this.levels = e.data.data.levels;
  370. // this.currencyList = e.data.data.currency_list;
  371. // for (const key in e.data.data.mall_data) {
  372. // let info = this.orderTotalArr.filter(v => v.type == key); //订单概况
  373. // if(info.length){
  374. // let index = this.orderTotalArr.findIndex(v => v.type==info[0].type);
  375. // this.orderTotalArr[index].value = e.data.data.mall_data[key];
  376. // }
  377. // }
  378. // }
  379. } else {
  380. this.$message.error(e.data.msg);
  381. }
  382. this.listLoading = false;
  383. }).catch(e => {
  384. this.listLoading = false;
  385. });
  386. },
  387. addTimeChange(v){
  388. this.searchInfo.related_start = v?v[0]:'';
  389. this.searchInfo.related_end = v?v[1]:'';
  390. },
  391. resetSearch(){
  392. this.searchInfo = {
  393. keyword: '',
  394. related_start: '',//关联开始时间
  395. related_end: '',//关联结束时间
  396. }
  397. this.addTime = '';//注册时间
  398. this.lastSpendTime = '';//上次消费时间
  399. },
  400. // 排序
  401. sortChang(column){
  402. // console.info(column);
  403. if(column.order == 'ascending'){
  404. this.sortFo = 'asc';
  405. } else if(column.order == 'descending'){
  406. this.sortFo = 'desc';
  407. } else {
  408. this.sortFo = '';
  409. }
  410. this.sortPorp = column.prop;
  411. this.page = 1;
  412. this.getList();
  413. },
  414. // 修改表格表头样式
  415. tableStyle({row, column, rowIndex, columnIndex}){
  416. if(rowIndex === 0){
  417. // #FAFAFA #F0F7FF
  418. return "background: #F0F7FF;"
  419. }
  420. },
  421. rowStyle({row, rowIndex}){
  422. console.info(rowIndex);
  423. if((rowIndex+1) %2 == 0){
  424. return "background: #F5F7FB;"
  425. }
  426. },
  427. handleEditRow(row, scope){
  428. console.log('scope',scope);
  429. this.editRowId = row.id
  430. this.editColumnId = scope.column.id
  431. },
  432. addAssociatedUser() {
  433. this.ruleForm.user_id = null;
  434. this.ruleForm.nickname = null;
  435. this.addUserFormDialogVisible = true;
  436. this.clearSearch();
  437. },
  438. // 获取会员列表
  439. getUser() {
  440. let self = this;
  441. self.userListLoading = true;
  442. request({
  443. params: {
  444. r: 'store/store-user-associated/get-users',
  445. page: self.addUserCurrPage,
  446. ...self.searchData,
  447. },
  448. method: 'get',
  449. }).then(e => {
  450. self.userListLoading = false;
  451. if (e.data.code == 0) {
  452. self.addUserList = e.data.data.list;
  453. self.addUserPageCount = e.data.data.page_count;
  454. } else {
  455. self.$message.error(e.data.msg);
  456. return false;
  457. }
  458. }).catch(e => {
  459. console.log(e);
  460. self.$message.error('网络错误');
  461. return false;
  462. });
  463. },
  464. getUserClick() {
  465. this.addUserCurrPage = 1;
  466. this.getUser();
  467. },
  468. // 选择会员
  469. chooseUser() {
  470. this.getUser();
  471. this.addUserDialogVisible = true;
  472. },
  473. // 会员列表分页
  474. userPagination(addUserCurrPage) {
  475. this.addUserCurrPage = addUserCurrPage;
  476. this.getUser();
  477. },
  478. // 选中会员确定回调
  479. selectUser() {
  480. console.log('selectUser === : ', this.userInfo);
  481. this.ruleForm.user_id = this.userInfo.id;
  482. this.ruleForm.nickname = this.userInfo.nickname;
  483. this.addUserDialogVisible = false;
  484. },
  485. // 会员列表选中
  486. clickChange(userInfo) {
  487. this.userInfo = userInfo;
  488. },
  489. // 清楚搜索条件
  490. clearSearch() {
  491. this.searchData.user_id = null;
  492. this.searchData.keyword = '';
  493. this.getUser();
  494. },
  495. submitForm(formName) {
  496. let self = this;
  497. if (formName === 'userEditStoreForm') {
  498. if (!self.userEditStoreForm.user_id) {
  499. self.$message.error('请选择关联会员');
  500. return false;
  501. }
  502. if (!self.userEditStoreForm.store_id) {
  503. self.$message.error('门店不能为空');
  504. return false;
  505. }
  506. }
  507. if (formName === 'userMigrationForm') {
  508. if (!self.userMigrationForm .store_id) {
  509. self.$message.error('门店不能为空');
  510. return false;
  511. }
  512. }
  513. const isStoreIdRequired = formName === 'ruleForm';
  514. const request_map = {
  515. 'ruleForm': 'store/store-user-associated/add-user-store',
  516. 'userMigrationForm': 'store/store-user-associated/batch-edit-user-store',
  517. 'userEditStoreForm': 'store/store-user-associated/edit-user-store',
  518. };
  519. const dialogVisible_map = {
  520. 'ruleForm': 'addUserFormDialogVisible',
  521. 'userMigrationForm': 'userMigrationDialogVisible',
  522. 'userEditStoreForm': 'userEditDialogVisible',
  523. };
  524. const visibilityProp = dialogVisible_map[formName];
  525. self.$refs[formName].validate((valid, obj) => {
  526. console.log(valid, obj)
  527. if (valid) {
  528. self.btnLoading = true;
  529. request({
  530. params: {
  531. r: request_map[formName],
  532. },
  533. method: 'post',
  534. // data: Object.assign({
  535. // store_id: self.store_id
  536. // }, self[formName]),
  537. data: isStoreIdRequired ? Object.assign({ ...self[formName], store_id: self.store_id }) : self[formName],
  538. }).then(e => {
  539. self.btnLoading = false;
  540. if (e.data.code == 0) {
  541. self.$message.success('操作成功');
  542. } else {
  543. self.$message.error(e.data.msg);
  544. }
  545. this[visibilityProp] = false;
  546. this.userEditStore = this.migrationStore = null;
  547. this.getList();
  548. }).catch(e => {
  549. self.btnLoading = false;
  550. console.log(e);
  551. self.$message.error('网络错误');
  552. return false;
  553. });
  554. } else {
  555. self.btnLoading = false;
  556. var msg = '';
  557. for (let index in obj) {
  558. msg = msg + '*' + obj[index][0].message + ' ';
  559. }
  560. this.$message({
  561. message: msg,
  562. type: 'error'
  563. });
  564. return false;
  565. }
  566. });
  567. },
  568. storeSelect(param) {
  569. this.migrationStore = param;
  570. this.userMigrationForm.store_id = param.id;
  571. },
  572. editUserStore(id) {
  573. this.userEditStoreFormTitle = '修改';
  574. this.userEditDialogVisible = true;
  575. this.userEditStoreForm.user_id = id;
  576. this.userEditStoreForm.old_store_id = this.store_id;
  577. this.userEditStore = null;
  578. },
  579. storeEditStoreSelect(param) {
  580. this.userEditStore = param;
  581. this.userEditStoreForm.store_id = param.id;
  582. },
  583. batchEditUserStore() {
  584. this.userEditStoreFormTitle = '会员批量修改';
  585. this.userEditDialogVisible = true;
  586. this.userEditStore = null;
  587. this.userEditStoreForm.old_store_id = this.store_id;
  588. if(this.selFormArr.length > 0){
  589. let userArr = []
  590. this.selFormArr.forEach(v => {
  591. userArr.push(v.user_id);
  592. })
  593. this.userEditStoreForm.user_id = userArr.join();
  594. // console.log('user_id ========>', this.userEditStoreForm.user_id);
  595. }
  596. },
  597. userBatchMigration() {
  598. this.userMigrationDialogVisible = true;
  599. this.userMigrationForm.old_store_id = this.store_id;
  600. },
  601. scFormTab(sel){
  602. // console.info(sel);
  603. if(sel.length == this.form.length){
  604. this.checkedAll = true;
  605. }else {
  606. this.checkedAll = false;
  607. }
  608. this.selFormArr = sel;
  609. },
  610. },
  611. mounted: function () {
  612. getQuery('memberLabelIds')? this.searchInfo.memberLabelIds.push( getQuery('memberLabelIds') ):0;
  613. this.page = getQuery('page') ? getQuery('page') : 1;
  614. this.store_id = getQuery('store_id');
  615. console.log('store =>>>> ', this.store_id)
  616. // if(this.store_id){
  617. // this.$set(this.searchInfo,'lableValue',parseInt(this.store_id));
  618. // }
  619. this.getList();
  620. },
  621. });
  622. </script>
  623. <style>
  624. @media screen and (max-width: 1500px) {
  625. #app {
  626. min-width: 1270px;
  627. }
  628. }
  629. .top_title{
  630. font-weight: 600;
  631. font-size: 18px;
  632. margin-right: 12px;
  633. }
  634. .table-body {
  635. padding: 20px;
  636. background-color: #fff;
  637. }
  638. .table-info .el-button {
  639. /* padding: 0; */
  640. border: 0;
  641. margin: 0 5px;
  642. }
  643. .input-item {
  644. display: inline-block;
  645. width: 250px;
  646. margin: 0 0 20px;
  647. }
  648. .input-item .el-input__inner {
  649. border-right: 0;
  650. }
  651. .input-item .el-input__inner:hover {
  652. border: 1px solid #dcdfe6;
  653. border-right: 0;
  654. outline: 0;
  655. }
  656. .input-item .el-input__inner:focus {
  657. border: 1px solid #dcdfe6;
  658. border-right: 0;
  659. outline: 0;
  660. }
  661. .input-item .el-input-group__append {
  662. background-color: #fff;
  663. border-left: 0;
  664. width: 10%;
  665. padding: 0;
  666. }
  667. .input-item .el-input-group__append .el-button {
  668. padding: 0;
  669. }
  670. .input-item .el-input-group__append .el-button {
  671. margin: 0;
  672. }
  673. .select {
  674. float: left;
  675. width: 100px;
  676. margin-right: 10px;
  677. }
  678. .el-table th>.cell{
  679. color: #333;
  680. font-weight: bold;
  681. font-size: 14px;
  682. }
  683. /* .el-table__footer-wrapper, .el-table__header-wrapper{
  684. border-bottom: 1.4px solid #D6D6D6;
  685. } */
  686. .stat_details{
  687. padding: 5px 0 20px;
  688. display: flex;
  689. }
  690. .order_module{
  691. flex: 1;
  692. background: #F5F7FA;;
  693. margin: 0 5px;
  694. padding: 20px 25px;
  695. border-radius: 3px;
  696. text-align: center;
  697. border: 1px solid #F5F7FA;
  698. }
  699. .se_module{
  700. background: #E8F3FE;
  701. border: 1px solid #2E8FF4;
  702. color: #2E8FF4;
  703. }
  704. .order_module:last-child{
  705. margin-right: 0;
  706. }
  707. .order_module:first-child{
  708. margin-left: 0;
  709. }
  710. .price{
  711. font-size: 22px;
  712. font-weight: bold;
  713. }
  714. .oirder_modul_title{
  715. font-size: 12px;
  716. margin-bottom: 10px;
  717. display: flex;
  718. align-items: center;
  719. justify-content: center;
  720. }
  721. .oirder_modul_title .text{
  722. margin-right: 4px;
  723. }
  724. .stat_icon{
  725. font-size: 19px;
  726. color: #BFBFBF;
  727. }
  728. .el-col {
  729. padding: 0;
  730. }
  731. .all_flex{
  732. display: flex;
  733. }
  734. .value_input .el-form-item__content{
  735. display: flex;
  736. }
  737. .value_input .el-input-group input{
  738. width: 58px;
  739. border-right: 0;
  740. }
  741. .value_input .el-input-group{
  742. display: flex;
  743. width: 100px;
  744. }
  745. .value_input .el-input-group__append{
  746. display: flex;
  747. align-items: center;
  748. justify-content: center;
  749. background: #FFF;
  750. }
  751. .sel_input .el-input-group__append{
  752. border: 1px solid #03C5FF;
  753. border-left: 0;
  754. }
  755. .search_button{
  756. /* margin-left: 108px; */
  757. margin-right: 10px;
  758. width: 80px;
  759. }
  760. .el-table_1_column_3 .cell{
  761. display: flex;
  762. }
  763. .user_img{
  764. position: relative;
  765. margin-right: 8px;
  766. height: 50px;
  767. width: 50px;
  768. }
  769. .no_user{
  770. position: absolute;
  771. bottom: 0;
  772. width: 100%;
  773. text-align: center;
  774. white-space: nowrap;
  775. line-height: normal;
  776. background: #0000006b;
  777. color: #FFF;
  778. border-radius: 30px;
  779. }
  780. .el-popover{
  781. display: flex;
  782. flex-direction: column;
  783. align-items: flex-start;
  784. /* min-width: 80px; */
  785. }
  786. .el-button+.el-button{
  787. margin-left: 0;
  788. }
  789. .el-popover .el-button--text{
  790. color: #2E8FF4;
  791. }
  792. .bottom_but{
  793. margin-right: 20px;
  794. border: 1px solid #DCDFE6;
  795. padding: 12px 20px;
  796. border-radius: 4px;
  797. line-height: 14px;
  798. }
  799. .bottom_but:hover{
  800. cursor:pointer
  801. }
  802. .title_bu:hover{
  803. cursor:pointer;
  804. }
  805. .el-form-item .el-form-item__label{
  806. font-size: 12px;
  807. }
  808. .top_form .el-form-item__label{
  809. width: 64px !important;
  810. }
  811. .top_form .el-form-item__content{
  812. margin-left: 64px !important;
  813. }
  814. .el-form-item__content .el-range-editor{
  815. width: 100%;
  816. }
  817. .el-form-item__content .el-range-editor .el-icon-time{
  818. display: none;
  819. }
  820. .el-form-item__content .el-range-editor .el-range-separator{
  821. padding: 0;
  822. width: 8%;
  823. }
  824. .el-form-item__content .el-range-editor input{
  825. width: 49%;
  826. }
  827. .default-avatar{
  828. width: 50px;
  829. height: 50px;
  830. border-radius: 50%;
  831. }
  832. .order-status-container {
  833. display: flex;
  834. justify-content: flex-start;
  835. text-align: left;
  836. }
  837. </style>