liudan 1 year ago
commit a662266c08
  1. 9
      app/common/dao/user/DepositRecordDao.php
  2. 2
      app/common/dao/user/UserDao.php
  3. 10
      app/common/model/user/DepositRecord.php
  4. 2
      app/common/repositories/store/order/StoreOrderCreateRepository.php
  5. 2
      app/common/repositories/store/product/ProductRepository.php
  6. 9
      app/common/repositories/user/DepositRecordRepository.php
  7. 52
      app/common/repositories/user/UserAssetsLogRepository.php
  8. 2
      app/common/repositories/user/UserAssetsRepository.php
  9. 3
      app/common/repositories/user/UserRepository.php
  10. 11
      app/controller/admin/store/StoreProduct.php
  11. 32
      app/controller/admin/system/Deposit.php
  12. 2
      app/controller/admin/system/Lottery.php
  13. 3
      app/controller/admin/user/User.php
  14. 18
      app/controller/admin/user/UserExtract.php
  15. 2
      app/controller/api/Auth.php
  16. 2
      app/controller/merchant/store/product/Product.php
  17. 2
      public/mer.html
  18. 2
      public/system.html
  19. 3
      route/admin/accounts.php
  20. 6
      route/admin/system.php
  21. 9
      view/admin/src/api/accounts.js
  22. 9
      view/admin/src/api/user.js
  23. 6
      view/admin/src/router/modules/user.js
  24. 18
      view/admin/src/views/merchant/list/handle/merEditForm.vue
  25. 12
      view/admin/src/views/merchant/type/index.vue
  26. 47
      view/admin/src/views/merchant/type/typeEditForm.vue
  27. 189
      view/admin/src/views/user/deposit/list.vue
  28. 9
      view/admin/src/views/user/list/index.vue
  29. 10
      view/admin/src/views/user/list/userDetails.vue
  30. 15
      view/admin/src/views/user/prize/index.vue
  31. 18
      view/mer/src/views/order/index.vue
  32. 1
      view/mer/src/views/order/orderDetails.vue
  33. 18
      view/mer/src/views/product/addProduct/index.vue
  34. 6
      view/mer/src/views/product/productList/index.vue

@ -15,6 +15,7 @@ use app\common\model\user\DepositRecord;
use app\common\model\user\UserAssets;
use app\common\model\user\UserRecharge;
use app\common\repositories\store\order\StoreOrderRepository;
use think\db\BaseQuery;
class DepositRecordDao extends BaseDao
{
@ -32,4 +33,12 @@ class DepositRecordDao extends BaseDao
public function getSum($uid, $field){
return DepositRecord::where('uid', $uid)->where('status','in', [1,2])->sum($field);
}
public function search($where){
$query = DepositRecord::when(isset($where['uid']) && $where['uid'] !== '', function (BaseQuery $query) use ($where) {
return $query->where('uid', $where['uid']);
})
->where('status', 'in', [1,3]);
return $query;
}
}

@ -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) {

@ -11,6 +11,7 @@
namespace app\common\model\user;
use app\common\model\BaseModel;
use app\common\model\store\Deposit;
class DepositRecord extends BaseModel
@ -40,5 +41,14 @@ class DepositRecord extends BaseModel
return $params;
}
public function user()
{
return $this->hasOne(User::class, 'uid', 'uid');
}
public function deposit()
{
return $this->hasOne(Deposit::class, 'id', 'deposit_id');
}
}

@ -39,7 +39,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
{
$uid = $user->uid;
$assets = app(UserAssetsRepository::class)->assets($uid);
$userIntegral = $assets['integral_buy'];
$userIntegral = $assets['integral_buy'] + $assets['integral_withdraw'];
$key = md5(json_encode(compact('cartId', 'takes', 'useCoupon', 'useIntegral', 'addressId'))) . $uid;
//去掉过期的优惠券信息

@ -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(),

@ -56,9 +56,16 @@ class DepositRecordRepository extends BaseRepository
public function getList($where, $page, $limit)
{
$query = $this->dao->searchJoinQuery($where)->order('a.pay_time DESC,a.create_time DESC');
$query = $this->dao->search($where)->with(['user', 'deposit'])->order('create_time DESC');
$count = $query->count();
$list = $query->page($page, $limit)->select();
$dailyRepository = app(DepositRecordDailyRepository::class);
foreach ($list as &$item){
$daily = $dailyRepository->getWhere(['record_id' =>$item['id']]);
$item['diamond_current'] = $daily? $daily['diamond'] : 0;
}
return compact('count', 'list');
}

@ -40,16 +40,16 @@ class UserAssetsLogRepository extends BaseRepository
const INTEGRAL_BUY_SHARE = 2; // '分享奖返佣--复购积分',
const INTEGRAL_WITHDRAW_SERVE = 3; // '服务奖返佣--提现积分',
const INTEGRAL_BUY_SERVE = 4; // '服务奖返佣--复购积分',
const INTEGRAL_WITHDRAW_SEND = 5; // '他人转让--提现积分',
const INTEGRAL_WITHDRAW_GET = 6; // '转让他人--提现积分',
const INTEGRAL_WITHDRAW_SEND = 5; // '转让他人--提现积分',
const INTEGRAL_WITHDRAW_GET = 6; // '他人转让--提现积分',
const INTEGRAL_WITHDRAW_DIAMOND = 7; // '兑换钻石--提现积分',
const INTEGRAL_WITHDRAW_HOT = 8; // '爆单奖--提现积分',
const INTEGRAL_BUY_HOT = 9; // '爆单奖--复购积分',
const INTEGRAL_BUY = 10; // '消费--复购积分',
const INTEGRAL_BUY = 10; // '消费--积分',
const INTEGRAL_WITHDRAW = 11; // '提现--提现积分',
const DIAMOND_SEND = 20; //他人转让
const DIAMOND_GET = 21; //转让他人
const DIAMOND_SEND = 20; //转让他人
const DIAMOND_GET = 21; //他人转让
const DIAMOND_STOCK = 22; //兑换本票
const DIAMOND_INTEGRAL = 23; //积分兑换
const DIAMOND_SHARE = 24; //分享奖返佣
@ -96,16 +96,16 @@ class UserAssetsLogRepository extends BaseRepository
self::INTEGRAL_BUY_SHARE => '分享奖返佣--复购积分',
self::INTEGRAL_WITHDRAW_SERVE => '服务奖返佣--提现积分',
self::INTEGRAL_BUY_SERVE => '服务奖返佣--复购积分',
self::INTEGRAL_WITHDRAW_SEND => '他人转让--提现积分',
self::INTEGRAL_WITHDRAW_GET => '转让他人--提现积分',
self::INTEGRAL_WITHDRAW_SEND => '转让他人--提现积分',
self::INTEGRAL_WITHDRAW_GET => '他人转让--提现积分',
self::INTEGRAL_WITHDRAW_DIAMOND => '兑换钻石--提现积分',
self::INTEGRAL_WITHDRAW_HOT => '爆单奖--提现积分',
self::INTEGRAL_BUY_HOT => '爆单奖--复购积分',
self::INTEGRAL_BUY => '消费--复购积分',
self::INTEGRAL_BUY => '消费--积分',
self::INTEGRAL_WITHDRAW => '提现--提现积分',
self::DIAMOND_SEND => '他人转让',
self::DIAMOND_GET => '转让他人',
self::DIAMOND_SEND => '转让他人',
self::DIAMOND_GET => '他人转让',
self::DIAMOND_STOCK => '兑换本票',
self::DIAMOND_INTEGRAL => '积分兑换',
self::DIAMOND_SHARE => '分享奖返佣',
@ -143,26 +143,38 @@ class UserAssetsLogRepository extends BaseRepository
if ($item) {
$item->status = self::STATUS_REFUND;
$item->save();
$this->userAssetsRepository->updateAssets($orderItem['uid'], $item['ext']);
}
$this->userAssetsRepository->updateAssets($orderItem['uid'], array('integral_buy' => -1 * $item['count']));
}
public function userPayEvent($groupOrder)
{
$assets = $this->userAssetsRepository->assets($groupOrder['uid']);
foreach ($groupOrder['orderList'] as $orderItem) {
// 5. 本人使用的福利积分
if ($orderItem['integral']) {
$updateData = array('integral_buy' => 0, 'integral_withdraw' => 0);
if ($orderItem['integral'] > $assets['integral_buy']) {
$updateData['integral_buy'] = $assets['integral_buy'];
$updateData['integral_withdraw'] = $orderItem['integral'] - $assets['integral_buy'];
} else {
$updateData['integral_buy'] = $orderItem['integral'];
}
$log = array('uid' => $orderItem['uid'],
'asset_type' => self::ASSET_INTEGRAL,
'type' => self::INTEGRAL_BUY,
'status' => self::STATUS_BUY,
'order_id' => $orderItem['order_id'],
'count' => -$orderItem['integral'],
'ext' => $updateData,
);
$this->addLog([$log]);
$this->userAssetsRepository->updateAssets($orderItem['uid'], array('integral_buy' => -$orderItem['integral']));
foreach ($updateData as $key => $value){
$assets[$key] -= $value;
}
$this->userAssetsRepository->updateAssets($orderItem['uid'], $updateData, false);
}
}
}
@ -356,7 +368,9 @@ class UserAssetsLogRepository extends BaseRepository
continue;
}
$item = $hotRepository->getWhere(['product_id' => $productItem['product_id'], 'uid' => $order['uid']]);
$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'];
$item->save();
@ -372,17 +386,17 @@ class UserAssetsLogRepository extends BaseRepository
}
// 计算每个购买当前爆单商品的积分数据
$profit = $productItem['total_price'] - $productItem['cost'] * $productItem['product_num'];
$where = array();
$where[] = array('product_id', '=', $productItem['product_id']);
$list = $hotRepository->getList($where);
$profit = $productItem['total_price'] - $productItem['cost'] * $productItem['product_num'];
$where = array();
// $where[] = array('product_id', '=', $productItem['product_id']);
$list = $hotRepository->getList($where);
$logList = array();
foreach ($list as $item) {
$tmp = $this->_getIntegral($profit * $product['hot_integral_rate'] / 100 / count($list));
if ($item['total'] - $item['current'] < $tmp['integral_buy'] + $tmp['integral_withdraw']) {
$tmp = $this->_getIntegral($item['total'] - $item['current']);
$item['status'] = 1;
$tmp = $this->_getIntegral($item['total'] - $item['current']);
// $item['status'] = 1;
}
$this->userAssetsRepository->updateAssets($item['uid'], $tmp);
$item['current'] += $tmp['integral_buy'] + $tmp['integral_withdraw'];

@ -222,7 +222,7 @@ class UserAssetsRepository extends BaseRepository
$logList[] = array(
'uid' => $uid,
'asset_type' => UserAssetsLogRepository::ASSET_DIAMOND,
'type' => UserAssetsLogRepository::DIAMOND_DEPOSIT,
'type' => UserAssetsLogRepository::DIAMOND_STOCK,
'status' => UserAssetsLogRepository::STATUS_USE,
'count' => $diamond,
);

@ -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;
}

@ -12,6 +12,7 @@
namespace app\controller\admin\store;
use app\common\repositories\store\product\ProductAttrValueRepository;
use app\common\repositories\store\product\SpuRepository;
use app\common\repositories\system\merchant\MerchantRepository;
use app\common\repositories\system\operate\OperateLogRepository;
@ -24,6 +25,7 @@ use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
use think\facade\Queue;
use think\facade\Request;
class StoreProduct extends BaseController
{
@ -164,6 +166,15 @@ class StoreProduct extends BaseController
{
$data = $this->checkParams($validate);
$this->repository->adminUpdate($id, $data);
$productAttrRepository = \app(ProductAttrValueRepository::class);
$attrValue = Request::post('attrValue');
if($attrValue){
foreach ($attrValue as $item){
$productAttrRepository->update($item['value_id'], array('price' => $item['price'],'cost' => $item['cost']));
}
}
return app('json')->success('编辑成功');
}

@ -15,6 +15,8 @@ namespace app\controller\admin\system;
use app\common\repositories\store\DepositRepository;
use app\common\repositories\user\DepositRecordRepository;
use app\common\repositories\user\UserAssetsRepository;
use app\validate\admin\DepositValidate;
use crmeb\basic\BaseController;
use FormBuilder\Exception\FormBuilderException;
@ -22,6 +24,7 @@ use think\App;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
use think\facade\Request;
/**
* Class UserGroup
@ -36,15 +39,21 @@ class Deposit extends BaseController
*/
protected $repository;
/**
* @var DepositRecordRepository
*/
protected $recordRepository;
/**
* UserGroup constructor.
* @param App $app
* @param DepositRepository $repository
*/
public function __construct(App $app, DepositRepository $repository)
public function __construct(App $app, DepositRepository $repository, DepositRecordRepository $recordRepository)
{
parent::__construct($app);
$this->repository = $repository;
$this->recordRepository = $recordRepository;
}
/**
@ -61,6 +70,27 @@ class Deposit extends BaseController
return app('json')->success($this->repository->getList(['status' => 1], $page, $limit));
}
public function userList()
{
[$page, $limit] = $this->getPage();
$uid = Request::get('uid');
return app('json')->success($this->recordRepository->getList(['uid' =>$uid], $page, $limit));
}
public function userFree($id)
{
$item = $this->recordRepository->get($id);
if(empty($item)){
\app('json')->fail('查找不到记录');
}
$item->status = 3;
$item->save();
app(UserAssetsRepository::class)->updateAssets($item['uid'], array('deposit' => $item['price']));
return app('json')->success([1]);
}
/**
* @return mixed
* @throws FormBuilderException

@ -62,7 +62,7 @@ class Lottery extends BaseController
{
$data = Request::post();
if(count($data) != 8){
if(count($data) != 6){
return app('json')->fail('参数错误');
}

@ -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));

@ -76,6 +76,24 @@ class UserExtract extends BaseController
return app('json')->success('审核成功');
}
/**
* TODO
* @param $id
* @return mixed
* @author Qinii
* @day 2020-06-16
*/
public function updateImage($id)
{
$data = $this->request->params(['image']);
if (!$this->repository->getWhereCount($id))
return app('json')->fail('数据不存在或状态错误');
halt($data);
$this->repository->update($id, $data);
return app('json')->success('审核成功');
}
public function export()
{
$where = $this->request->params(['status', 'keyword', 'date', 'extract_type']);

@ -84,7 +84,7 @@ class Auth extends BaseController
// }
// app(UserAssetsLogRepository::class)->shareAward(1);
// app(DepositRecordDailyRepository::class)->runDaily();
app(DepositRecordDailyRepository::class)->runDaily();
// event('pay_success_user_recharge', array('order_sn' => 'wxu2024041817195114'));
return app('json')->success();
}

@ -51,7 +51,7 @@ class Product extends BaseController
{
[$page, $limit] = $this->getPage();
$type = $this->request->param('type', 1);
$where = $this->request->params(['temp_id', 'cate_id', 'keyword', 'mer_cate_id', 'is_gift_bag', 'status', 'us_status', 'product_id', 'mer_labels', ['order', 'sort'], 'is_ficti', 'svip_price_type', 'filters_type', 'is_action', 'is_good', 'not_product_id', 'form_id']);
$where = $this->request->params(['temp_id', 'cate_id', 'keyword', 'mer_cate_id', 'is_gift_bag', 'status', 'us_status', 'product_id', 'mer_labels', ['order', 'sort'], 'is_ficti', 'is_hot', 'svip_price_type', 'filters_type', 'is_action', 'is_good', 'not_product_id', 'form_id']);
$where = array_merge($where, $this->repository->switchType($type, $this->request->merId(), 0));
return app('json')->success($this->repository->getList($this->request->merId(), $where, $page, $limit));
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -87,6 +87,9 @@ Route::group(function () {
Route::post('status/:id', 'UserExtract/switchStatus')->name('systemUserExtractSwitchStatus')->option([
'_alias' => '审核',
]);
Route::post('image/:id', 'UserExtract/switchStatus')->name('systemUserExtractSwitchStatus')->option([
'_alias' => '上传凭证',
]);
Route::get('export', 'UserExtract/export')->name('systemUserExtractExport')->option([
'_alias' => '导出',
]);

@ -37,6 +37,12 @@ Route::group(function () {
Route::get('lst', '/lst')->name('systemDepositLst')->option([
'_alias' => '预存管理',
]);
Route::get('user/lst', '/userList')->name('systemDepositLst')->option([
'_alias' => '用户预存列表',
]);
Route::post('user/free/:id', '/userFree')->name('systemDepositLst')->option([
'_alias' => '用户预存解冻',
]);
Route::post('create/deposit', '/create')->name('systemDepositCreate')->option([
'_alias' => '预存添加',
]);

@ -23,6 +23,13 @@ export function extractStatusApi(id, data) {
return request.post(`user/extract/status/${id}`, data)
}
/**
* @description 提现 -- 审核
*/
export function extractImageApi(id, data) {
return request.post(`user/extract/image/${id}`, data)
}
/**
* @description 充值记录 -- 列表
*/
@ -271,4 +278,4 @@ export function singleMerBillExport(type,data) {
*/
export function singleMerBillHeader(id,data) {
return request.get(`financial_record/mer_title/${id}`, data)
}
}

@ -107,6 +107,13 @@ export function depositFormApi() {
export function depositLstApi(data) {
return request.get('deposit/lst', data)
}
export function depositUserLstApi(data) {
return request.get('deposit/user/lst', data)
}
export function depositUserFreeApi(id) {
return request.post(`deposit/user/free/${id}`)
}
/**
* @description 预存管理 -- 删除
*/
@ -522,4 +529,4 @@ export function getLotteryData(data) {
// 保存抽奖
export function setLotteryData(data) {
return request.post('lottery/save', data)
}
}

@ -49,6 +49,12 @@ const userRouter =
name: 'deposit',
meta: { title: '预存管理', noCache: true }
},
{
path: 'deposit/list',
component: () => import('@/views/user/deposit/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,189 @@
<template>
<div class="divBox">
<div class="selCard">
<el-form inline size="small" label-width="85px">
<div class="acea-row search-form">
<div>
<el-form-item label="id:">
<el-input placeholder="请输入内容" v-model="tableFrom.uid" class="input-with-select selWidth" clearable @keyup.enter.native="getList(1)">
</el-input>
</el-form-item>
</div>
<el-form-item class="search-form-sub">
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button>
</el-form-item>
</div>
</el-form>
</div>
<el-card>
<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.user.phone" />
</template>
</el-table-column>
<el-table-column
label="预存金额"
min-width="180"
>
<template slot-scope="{row}">
<span v-text="row.price" />
</template>
</el-table-column>
<el-table-column
label="预存时间"
min-width="180"
>
<template slot-scope="{row}">
<span v-text="row.create_time" />
</template>
</el-table-column>
<el-table-column
prop="deposit.cycle"
label="提现周期(天)"
min-width="150"
/>
<el-table-column
prop="diamond_current"
label="已获得钻石"
min-width="150"
/>
<el-table-column
prop="deposit.diamond"
label="赠送钻石/天"
min-width="150"
/>
<el-table-column
prop="deposit.diamond_max"
label="钻石最大值"
min-width="150"
/>
<el-table-column
label="预存状态"
min-width="180"
>
<template slot-scope="{row}">
<span >{{ row.status == 1? '冻结' : '解冻' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" min-width="90" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.status == 1" type="text" size="small" @click="handleFree(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 {
depositUserLstApi,
depositUserFreeApi,
} from '@/api/user'
export default {
name: 'UserGroup',
data() {
return {
tableFrom: {
uid:'',
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
depositUserLstApi(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()
},
//
handleFree(id, idx) {
this.$modalSure('解冻').then(() => {
depositUserFreeApi(id).then(({ message }) => {
this.$message.success(message)
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">

@ -30,14 +30,14 @@ export default{
data(){
return{
list:[
],
numList:["一","二","三","四","五","六"]
}
},
methods:{
typeChange(val,item){
if(val!=1){
item.value=0;
}
@ -49,11 +49,14 @@ export default{
})
},
submitHandle(){
setLotteryData(this.list).then(res=>{
this.getLotteryData()
this.$message({type:'success',message:'保存成功'});
})
.catch(res => {
this.$message.error(res.message);
})
}
},
mounted(){
@ -63,7 +66,7 @@ export default{
</script>
<style lang="scss" scoped>
.prize{
background-color: #fff;
padding:10px 20px;
}
@ -93,10 +96,10 @@ export default{
span{
display:inline-block;
width:50px;
margin-left: 20px;
}
}
}
}
</style>
</style>

@ -219,15 +219,15 @@
<el-form-item v-if="isResend && noLogistics != 3 && tableFrom.order_type != 2" :label="shipment.delivery_type == 1 || shipment.delivery_type == 4 ? '原快递单号:' : '送货人手机号:'">
<span>{{ original.delivery_id }}</span>
</el-form-item>
<el-form-item label="选择类型:" prop="delivery_type">
<el-radio-group v-model="shipment.delivery_type" @change="changeSend">
<el-radio v-if="!isBatch && tableFrom.order_type != 2 && orderType != 1" :label="1">手动发货</el-radio>
<el-radio :label="3" class="radio"> {{orderType == 1 ? '虚拟发货' : '无需物流'}}</el-radio>
<el-radio v-if="isDump==1 && tableFrom.order_type != 2 && orderType !=1 && !isBatch" :label="4" class="radio">电子面单打印</el-radio>
<el-radio v-if="tableFrom.order_type != 2 && orderType !=1" :label="2">自己配送</el-radio>
<el-radio v-if="tableFrom.order_type != 2 && orderType !=1 && !isBatch" :label="5">同城配送</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="选择类型:" prop="delivery_type">-->
<!-- <el-radio-group v-model="shipment.delivery_type" @change="changeSend">-->
<!-- <el-radio v-if="!isBatch && tableFrom.order_type != 2 && orderType != 1" :label="1">手动发货</el-radio>-->
<!-- <el-radio :label="3" class="radio"> {{orderType == 1 ? '虚拟发货' : '无需物流'}}</el-radio>-->
<!-- <el-radio v-if="isDump==1 && tableFrom.order_type != 2 && orderType !=1 && !isBatch" :label="4" class="radio">电子面单打印</el-radio>-->
<!-- <el-radio v-if="tableFrom.order_type != 2 && orderType !=1" :label="2">自己配送</el-radio>-->
<!-- <el-radio v-if="tableFrom.order_type != 2 && orderType !=1 && !isBatch" :label="5">同城配送</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item v-if="shipment.delivery_type == 5 && tableFrom.order_type != 2 && orderType !=1" label="选择发货点:" prop="station_id">
<el-select
v-model="shipment.station_id"

@ -218,7 +218,6 @@
<li class="item">
<div>快递单号</div>
<div class="value">{{ orderDetailList.delivery_id ? orderDetailList.delivery_id : '-' }}</div>
<el-button type="text" size="mini" style="margin-left: 5px" @click="openLogistics">物流查询</el-button>
</li>
</ul>
</div>

@ -45,14 +45,14 @@
<!-- </div>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="24">
<el-form-item label="商品类型:" required>
<el-radio-group v-model="formValidate.is_hot">
<el-radio :label="0" class="radio">普通商品</el-radio>
<el-radio :label="1">爆单商品</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<!-- <el-col :span="24">-->
<!-- <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>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="24">
<el-form-item label="商品名称:" prop="store_name">
<el-input
@ -1331,6 +1331,7 @@ const defaultObj = {
image: '',
slider_image: [],
store_name: '',
// is_hot:'',
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,
store_info: info.store_info,
good_ids: info.good_ids || [],
keyword: info.keyword,

@ -19,7 +19,7 @@
<el-input v-model="tableFrom.keyword" placeholder="请输入商品名称,关键字" class="selWidth" clearable @keyup.enter.native="getList(1)" />
</el-form-item>
<el-form-item label="商品类型:" prop="is_ficti">
<el-select v-model="tableFrom.is_ficti" placeholder="请选择" class="filter-item selWidth" clearable @change="getList(1)">
<el-select v-model="tableFrom.is_hot" placeholder="请选择" class="filter-item selWidth" clearable @change="getList(1)">
<el-option v-for="item in productTypeList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
@ -500,6 +500,7 @@ export default {
form_id: '',
type: this.$route.query.type ? this.$route.query.type : '1',
is_ficti: "",
is_hot: "",
is_gift_bag: '',
us_status: '',
mer_labels: '',
@ -518,8 +519,7 @@ export default {
],
productTypeList: [
{ label: '普通商品', value: 0 },
{ label: '虚拟商品', value: 1 },
{ label: '卡密商品', value: 2 }
{ label: '爆单商品', value: 1 },
],
tempRule: {
temp_id: [{required: true,message: '请选择运费模板',trigger: 'change'}]

Loading…
Cancel
Save