优化页面

main
home.fengxinyhyl 7 months ago
parent d2a37de243
commit 56ca235aa1
  1. 2
      app/common/dao/user/UserDao.php
  2. 2
      app/common/repositories/store/product/ProductRepository.php
  3. 2
      app/common/repositories/user/UserAssetsLogRepository.php
  4. 3
      app/common/repositories/user/UserRepository.php
  5. 3
      app/controller/admin/user/User.php
  6. 6
      view/admin/src/router/modules/user.js
  7. 18
      view/admin/src/views/merchant/list/handle/merEditForm.vue
  8. 12
      view/admin/src/views/merchant/type/index.vue
  9. 47
      view/admin/src/views/merchant/type/typeEditForm.vue
  10. 166
      view/admin/src/views/user/deposit/list.vue
  11. 9
      view/admin/src/views/user/list/index.vue
  12. 10
      view/admin/src/views/user/list/userDetails.vue
  13. 4
      view/mer/src/views/product/addProduct/index.vue

@ -89,6 +89,8 @@ class UserDao extends BaseDao
return $query->where('User.user_type', $where['user_type']);
})->when(isset($where['is_lottery']) && $where['is_lottery'] !== '', function (BaseQuery $query) use ($where) {
return $query->where('User.is_lottery', $where['is_lottery']);
})->when(isset($where['is_hot']) && $where['is_hot'] !== '', function (BaseQuery $query) use ($where) {
return $query->where('User.is_hot', $where['is_hot']);
})->when(isset($where['uid']) && $where['uid'] !== '', function (BaseQuery $query) use ($where) {
return $query->where('User.uid', $where['uid']);
})->when(isset($where['status']) && $where['status'] !== '', function (BaseQuery $query) use ($where) {

@ -168,7 +168,7 @@ class ProductRepository extends BaseRepository
Elm::number('hot_integral_rate', '爆单区返佣比例:')->placeholder('请输入爆单区返佣比例')
->max(100)->min(0)->required(),
Elm::number('hot_integral_total', '爆单区返佣积分:')->placeholder('请输入爆单区返佣积分')
->max(100)->min(0)->required(),
->min(0)->required(),
// Elm::number('order_sum', '营业额:')->placeholder('请输入营业额')->min(0)->required(),

@ -356,6 +356,8 @@ class UserAssetsLogRepository extends BaseRepository
continue;
}
$this->userRepository->update($order['uid'], array('is_hot' => 1));
$item = $hotRepository->getWhere(['uid' => $order['uid']]);
if ($item) {
$item['total'] += $product['hot_integral_total'] * $productItem['product_num'];

@ -19,6 +19,7 @@ use app\common\model\user\User;
use app\common\model\wechat\WechatUser;
use app\common\repositories\BaseRepository;
use app\common\repositories\community\CommunityRepository;
use app\common\repositories\store\order\StoreOrderHotRepository;
use app\common\repositories\store\order\StoreOrderRepository;
use app\common\repositories\store\service\StoreServiceRepository;
use app\common\repositories\system\attachment\AttachmentRepository;
@ -1623,6 +1624,8 @@ class UserRepository extends BaseRepository
// 添加用户扩展信息
$info['extend_info'] = app()->make(UserFieldsRepository::class)->info((int)$uid, false)['extend_info'];
$info['assets'] = app()->make(UserAssetsRepository::class)->assets($uid);
$hot = app(StoreOrderHotRepository::class)->getWhere(['uid' => $uid]);
$info['hot']= $hot ? $hot->toArray(): array('total' => 0, 'current' => 0);
return $info;
}

@ -100,7 +100,8 @@ class User extends BaseController
'member_level',
'keyword',
'birthday',
'is_lottery'
'is_lottery',
'is_hot'
]);
[$page, $limit] = $this->getPage();
return app('json')->success($this->repository->getList($where, $page, $limit));

@ -49,6 +49,12 @@ const userRouter =
name: 'deposit',
meta: { title: '预存管理', noCache: true }
},
{
path: 'deposit/list',
component: () => import('@/views/user/list'),
name: 'depositList',
meta: { title: '预存列表', noCache: true }
},
{
path: 'label',
component: () => import('@/views/user/group'),

@ -260,24 +260,6 @@
</el-col>
</el-row>
</div>
<div class="section">
<div class="title">财务帐号</div>
<el-row :gutter="24" class="mt20">
<el-col :span="12">
<el-form-item label="分账商户号:" prop="sub_mchid">
<el-input
placeholder="请填写分账商户号"
size="small"
v-model="merData.sub_mchid"
class="selWidth"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<div class="info-red" style="margin-left: 120px;">当开启自动分账时每个子商户在微信后台的分账商户号即特约子商户号</div>
</el-col>
</el-row>
</div>
</el-tab-pane>
</el-tabs>
</el-form>

@ -24,13 +24,7 @@
prop="merchant_count"
min-width="120"
/>
<el-table-column prop="type_name" label="店铺保证金" min-width="120">
<template slot-scope="scope">
<span class="spBlock">{{
scope.row.is_margin ? scope.row.margin + "元" : "无"
}}</span>
</template>
</el-table-column>
<el-table-column
prop="type_info"
label="店铺类型要求"
@ -183,7 +177,7 @@ export default {
this.isCreate = true;
this.$refs.typeDetail.addType();
this.$refs.tree && this.$refs.tree.setCheckedKeys([]);
},
//
jurisdiction() {
@ -245,6 +239,6 @@ export default {
<style scoped lang="scss">
.input_inline ::v-deep .el-input {
width: 200px;
margin-right: 5px;
margin-right: 5px;
}
</style>

@ -21,21 +21,21 @@
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="店铺保证金:">
<el-radio-group v-model="formValidate.is_margin">
<el-radio :label="0" class="radio"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
<span v-if="formValidate.is_margin == 1">
<el-input
v-model="formValidate.margin"
placeholder="请填写保证金"
style="width:120px;margin-left: 8px;"
/>
</span>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="店铺保证金:">-->
<!-- <el-radio-group v-model="formValidate.is_margin">-->
<!-- <el-radio :label="0" class="radio"></el-radio>-->
<!-- <el-radio :label="1"></el-radio>-->
<!-- </el-radio-group>-->
<!-- <span v-if="formValidate.is_margin == 1">-->
<!-- <el-input-->
<!-- v-model="formValidate.margin"-->
<!-- placeholder="请填写保证金"-->
<!-- style="width:120px;margin-left: 8px;"-->
<!-- /> -->
<!-- </span> -->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="12">
@ -117,10 +117,10 @@
></el-tree>
</el-form-item>
</div>
</el-tab-pane>
</el-tabs>
</el-tab-pane>
</el-tabs>
</el-form>
</template>
<script>
// +----------------------------------------------------------------------
@ -151,7 +151,7 @@ export default {
type: Boolean,
default: false
}
},
},
data() {
return {
loading: false,
@ -169,7 +169,7 @@ export default {
},
};
},
filters: {
},
mounted() {
@ -190,7 +190,7 @@ export default {
this.$message.error(res.message);
this.loading = false;
});
}
}
});
},
/**重置表单验证 */
@ -204,7 +204,7 @@ export default {
/**编辑初始化 */
editInit() {
this.name = 'basic'
this.setChecked();
this.setChecked();
},
/**根据返回数据选中权限 */
setChecked(){
@ -222,7 +222,7 @@ export default {
this.$message.error(res.message);
});
} else {
return false;
}
});
@ -305,4 +305,3 @@ export default {
}
</style>

@ -0,0 +1,166 @@
<template>
<div class="divBox">
<el-card>
<div class="mb20">
<el-button size="small" type="primary" @click="onAdd">{{ '添加预存'}}</el-button>
</div>
<el-table
v-loading="listLoading"
:data="tableData.data"
size="small"
highlight-current-row
>
<el-table-column
label="ID"
min-width="60"
>
<template slot-scope="{row}">
<span v-text="row.id" />
</template>
</el-table-column>
<el-table-column
:label="'预存金额'"
min-width="180"
>
<template slot-scope="{row}">
<span v-text="row.money" />
</template>
</el-table-column>
<el-table-column
prop="cycle"
label="提现周期"
min-width="150"
/>
<el-table-column
prop="count"
label="名额"
min-width="150"
/>
<el-table-column
prop="diamond"
label="赠送钻石/天"
min-width="150"
/>
<el-table-column
prop="diamond_max"
label="钻石最大值"
min-width="150"
/>
<el-table-column
prop="create_time"
label="创建时间"
min-width="150"
/>
<el-table-column label="操作" min-width="90" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click="onEdit(scope.row.id)">编辑</el-button>
<el-button type="text" size="small" @click="handleDelete(scope.row.id, scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
background
:page-size="tableFrom.limit"
:current-page="tableFrom.page"
layout="total, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
</div>
</el-card>
</div>
</template>
<script>
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {
depositLstApi,
depositFormApi,
depositEditApi,
depositDeleteApi,
} from '@/api/user'
export default {
name: 'UserGroup',
data() {
return {
tableFrom: {
page: 1,
limit: 20
},
tableData: {
data: [],
total: 0
},
listLoading: true
}
},
mounted() {
this.getList()
},
watch:{
'$route.path': {
handler: function() {
this.getList()
},
immediate: false,
deep: true
},
},
methods: {
//
getList() {
this.listLoading = true
depositLstApi(this.tableFrom).then(res => {
this.tableData.data = res.data.list
this.tableData.total = res.data.count
this.listLoading = false
}).catch(res => {
this.listLoading = false
this.$message.error(res.message)
})
},
pageChange(page) {
this.tableFrom.page = page
this.getList()
},
handleSizeChange(val) {
this.tableFrom.limit = val
this.getList()
},
//
onAdd() {
this.$modalForm(depositFormApi()).then(() => this.getList())
},
//
onEdit(id) {
this.$modalForm(depositEditApi(id)).then(() => this.getList())
},
//
handleDelete(id, idx) {
this.$modalSure('删除').then(() => {
depositDeleteApi(id).then(({ message }) => {
this.$message.success(message)
this.tableData.data.splice(idx, 1)
this.getList()
}).catch(({ message }) => {
this.$message.error(message)
})
})
}
}
}
</script>
<style scoped lang="scss">
</style>

@ -25,6 +25,12 @@
<el-option value="0" label="否" />
</el-select>
</el-form-item>
<el-form-item label="预存用户:" prop="is_hot">
<el-select v-model="userFrom.is_hot" placeholder="请选择" class="selWidth" clearable filterable @change="changeSearch(1)">
<el-option value="1" label="是" />
<el-option value="0" label="否" />
</el-select>
</el-form-item>
</div>
<el-form-item class="search-form-sub">
<el-button type="primary" size="small" @click="changeSearch(1)">搜索</el-button>
@ -470,7 +476,8 @@ export default {
group_id: '',
fields_type: '',
fields_value: '',
is_lottery: ''
is_lottery: '',
is_hot: '',
},
address: [],
grid: {

@ -79,6 +79,16 @@
<div>{{psInfo.assets.stock}}</div>
</li>
</ul>
<ul class="list">
<li class="item">
<div class="title">爆单积分最大值</div>
<div>{{psInfo.hot.total}}</div>
</li>
<li class="item">
<div class="title">当前爆单积分</div>
<div>{{psInfo.hot.current}}</div>
</li>
</ul>
</div>
</div>
<el-tabs type="border-card" v-model="activeName" @tab-click="tabClick">

@ -46,7 +46,7 @@
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="24">
<el-form-item label="商品类型:" required>
<el-form-item label="商品类型:" required prop="is_hot">
<el-radio-group v-model="formValidate.is_hot">
<el-radio :label="0" class="radio">普通商品</el-radio>
<el-radio :label="1">爆单商品</el-radio>
@ -1331,6 +1331,7 @@ const defaultObj = {
image: '',
slider_image: [],
store_name: '',
is_hot:0,
store_info: '',
keyword: '',
brand_id: '', // id
@ -2641,6 +2642,7 @@ export default {
attrValue: info.attrValue,
slider_image: info.slider_image,
store_name: info.store_name,
is_hot: info.is_hot ? info.is_hot :0,
store_info: info.store_info,
good_ids: info.good_ids || [],
keyword: info.keyword,

Loading…
Cancel
Save