mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-25 22:27:55 +08:00
优化代码
This commit is contained in:
parent
b3b308b7c9
commit
54785c5756
@ -26,34 +26,22 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
<span>
|
||||
<vc:i18n name="名称" namespace="staff"></vc:i18n>
|
||||
</span>
|
||||
<vc:i18n name="名称" namespace="staff"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span>
|
||||
<vc:i18n name="手机号" namespace="staff"></vc:i18n>
|
||||
</span>
|
||||
<vc:i18n name="手机号" namespace="staff"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span>
|
||||
<vc:i18n name="邮箱" namespace="staff"></vc:i18n>
|
||||
</span>
|
||||
<vc:i18n name="邮箱" namespace="staff"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span>
|
||||
<vc:i18n name="地址" namespace="staff"></vc:i18n>
|
||||
</span>
|
||||
<vc:i18n name="地址" namespace="staff"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span>
|
||||
<vc:i18n name="性别" namespace="staff"></vc:i18n>
|
||||
</span>
|
||||
<vc:i18n name="性别" namespace="staff"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span>
|
||||
<vc:i18n name="操作" namespace="staff"></vc:i18n>
|
||||
</span>
|
||||
<vc:i18n name="操作" namespace="staff"></vc:i18n>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
130
public/pages/admin/integralDetail/integralDetail.html
Normal file
130
public/pages/admin/integralDetail/integralDetail.html
Normal file
@ -0,0 +1,130 @@
|
||||
<div>
|
||||
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<vc:i18n name="查询条件"></vc:i18n>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择账户ID','integralDetail')"
|
||||
v-model="integralDetailInfo.conditions.integralId" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<select class="custom-select" v-model="integralDetailInfo.conditions.detailType">
|
||||
<option selected value="">{{vc.i18n('请选择类型','integralDetail')}}</option>
|
||||
<option value="1001">{{vc.i18n('转入','integralDetail')}}</option>
|
||||
<option value="2002">{{vc.i18n('转出','integralDetail')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<select class="custom-select" v-model="integralDetailInfo.conditions.objType">
|
||||
<option selected value="">{{vc.i18n('请选择对象类型','integralDetail')}}</option>
|
||||
<option value="6006">{{vc.i18n('用户','integralDetail')}}</option>
|
||||
<option value="7007">{{vc.i18n('商户','integralDetail')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择交易单号','integralDetail')"
|
||||
v-model="integralDetailInfo.conditions.orderId" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryIntegralDetailMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> <span>
|
||||
<vc:i18n name="查询"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<vc:i18n name="积分交易" namespace="integralDetail"></vc:i18n>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='编号' namespace='integralDetail'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='账户名称' namespace='integralDetail'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='账户编号' namespace='integralDetail'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='类型' namespace='integralDetail'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='关联账户' namespace='integralDetail'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='积分数' namespace='integralDetail'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='对象类型' namespace='integralDetail'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='对象ID' namespace='integralDetail'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='手机号' namespace='integralDetail'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='交易单号' namespace='integralDetail'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='交易时间' namespace='integralDetail'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='备注' namespace='integralDetail'></vc:i18n>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="integralDetail in integralDetailInfo.integralDetails">
|
||||
<td class="text-center">{{integralDetail.detailId}}</td>
|
||||
<td class="text-center">{{integralDetail.integralName}}</td>
|
||||
<td class="text-center">{{integralDetail.integralId}}</td>
|
||||
<td class="text-center">{{integralDetail.detailType == '2002'?'转出':'转入'}}</td>
|
||||
<td class="text-center">{{integralDetail.relIntegralId}}</td>
|
||||
<td class="text-center">{{integralDetail.amount}}</td>
|
||||
<td class="text-center">{{integralDetail.objType== '7007'?'商户':'用户'}}</td>
|
||||
<td class="text-center">{{integralDetail.objId}}</td>
|
||||
<td class="text-center">{{integralDetail.link}}</td>
|
||||
<td class="text-center">{{integralDetail.orderId}}</td>
|
||||
<td class="text-center">{{integralDetail.createTime}}</td>
|
||||
<td class="text-center">{{integralDetail.remark}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
79
public/pages/admin/integralDetail/integralDetail.js
Normal file
79
public/pages/admin/integralDetail/integralDetail.js
Normal file
@ -0,0 +1,79 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
integralDetailInfo: {
|
||||
integralDetails: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
detailId: '',
|
||||
conditions: {
|
||||
integralId: '',
|
||||
detailType: '',
|
||||
relIntegralId: '',
|
||||
amount: '',
|
||||
objType: '',
|
||||
orderId: '',
|
||||
mallApiCode:'queryIntegralDetailBmoImpl'
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
$that._listIntegralDetails(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('integralDetail', 'listIntegralDetail', function (_param) {
|
||||
$that._listIntegralDetails(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
$that._listIntegralDetails(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listIntegralDetails: function (_page, _rows) {
|
||||
|
||||
$that.integralDetailInfo.conditions.page = _page;
|
||||
$that.integralDetailInfo.conditions.row = _rows;
|
||||
let param = {
|
||||
params: $that.integralDetailInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/mall.getAdminMallOpenApi',
|
||||
param,
|
||||
function (json, res) {
|
||||
let _json = JSON.parse(json);
|
||||
$that.integralDetailInfo.total = _json.total;
|
||||
$that.integralDetailInfo.records = _json.records;
|
||||
$that.integralDetailInfo.integralDetails = _json.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: $that.integralDetailInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_queryIntegralDetailMethod: function () {
|
||||
$that._listIntegralDetails(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if ($that.integralDetailInfo.moreCondition) {
|
||||
$that.integralDetailInfo.moreCondition = false;
|
||||
} else {
|
||||
$that.integralDetailInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
102
public/pages/admin/userIntegral/userIntegral.html
Normal file
102
public/pages/admin/userIntegral/userIntegral.html
Normal file
@ -0,0 +1,102 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-md-1 padding-r-0">
|
||||
<div class=" border-radius ">
|
||||
<div class="margin-xs-r treeview ">
|
||||
<ul class="list-group text-center border-radius">
|
||||
<li class="list-group-item node-orgTree "
|
||||
@click="_switchIntegralObjType('6006')"
|
||||
:class="{'vc-node-selected':userIntegralInfo.conditions.objType == '6006'}">
|
||||
个人
|
||||
</li>
|
||||
<li class="list-group-item node-orgTree "
|
||||
@click="_switchIntegralObjType('7007')"
|
||||
:class="{'vc-node-selected':userIntegralInfo.conditions.objType == '7007'}">
|
||||
商户
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-11">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<vc:i18n name="查询条件"></vc:i18n>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择账户名称','userIntegral')"
|
||||
v-model="userIntegralInfo.conditions.integralName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryIntegralMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> <span>
|
||||
<vc:i18n name="查询"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<vc:i18n name="用户积分" namespace="userIntegral"></vc:i18n>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_toMerchantModal()">
|
||||
管理
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='编号' namespace='userIntegral'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='账户名称' namespace='userIntegral'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='对象类型' namespace='userIntegral'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='用户编号' namespace='userIntegral'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='手机号' namespace='userIntegral'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='积分数' namespace='userIntegral'></vc:i18n>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="integral in userIntegralInfo.integrals">
|
||||
<td class="text-center">{{integral.integralId}}</td>
|
||||
<td class="text-center">{{integral.integralName}}</td>
|
||||
<td class="text-center">{{integral.objType== '7007'?'商户':'用户'}}</td>
|
||||
<td class="text-center">{{integral.objId}}</td>
|
||||
<td class="text-center">{{integral.link}}</td>
|
||||
<td class="text-center">{{integral.amount}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
84
public/pages/admin/userIntegral/userIntegral.js
Normal file
84
public/pages/admin/userIntegral/userIntegral.js
Normal file
@ -0,0 +1,84 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
userIntegralInfo: {
|
||||
integrals: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
integralId: '',
|
||||
conditions: {
|
||||
integralName: '',
|
||||
objType: '6006',
|
||||
objId: '',
|
||||
amount: '',
|
||||
mallApiCode:'queryIntegralBmoImpl'
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
$that._listIntegrals(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('userIntegral', 'listIntegral', function (_param) {
|
||||
$that._listIntegrals(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
$that._listIntegrals(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listIntegrals: function (_page, _rows) {
|
||||
$that.userIntegralInfo.conditions.page = _page;
|
||||
$that.userIntegralInfo.conditions.row = _rows;
|
||||
let param = {
|
||||
params: $that.userIntegralInfo.conditions
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/mall.getAdminMallOpenApi',
|
||||
param,
|
||||
function (json, res) {
|
||||
let _json = JSON.parse(json);
|
||||
$that.userIntegralInfo.total = _json.total;
|
||||
$that.userIntegralInfo.records = _json.records;
|
||||
$that.userIntegralInfo.integrals = _json.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: $that.userIntegralInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_queryIntegralMethod: function () {
|
||||
$that._listIntegrals(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if ($that.userIntegralInfo.moreCondition) {
|
||||
$that.userIntegralInfo.moreCondition = false;
|
||||
} else {
|
||||
$that.userIntegralInfo.moreCondition = true;
|
||||
}
|
||||
},
|
||||
_toMerchantModal: function() {
|
||||
let _objType = $that.userIntegralInfo.conditions.objType;
|
||||
if(_objType == '7007'){
|
||||
vc.jumpToMall('/#/pages/admin/userIntegral?tab=用户积分')
|
||||
}else{
|
||||
vc.jumpToMall('/#/pages/admin/storeIntegral?tab=商家积分')
|
||||
}
|
||||
},
|
||||
_switchIntegralObjType:function(_objType){
|
||||
$that.userIntegralInfo.conditions.objType = _objType;
|
||||
$that._listIntegrals(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user