修改红包返现页面

master
yuan 7 years ago
parent f7774cf14f
commit 963c7951de

@ -490,4 +490,6 @@ CREATE TABLE `pmt_directed_bill_code` (
KEY `order_id` (`order_id`) KEY `order_id` (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
ALTER TABLE `act_red_packets_customer` ADD COLUMN `rule_max_num_limit` tinyint(1) DEFAULT 1 COMMENT '0:Whole Activity,1day'

@ -44,4 +44,8 @@ public interface ActRedPacketsCustomerOrdersMapper {
PageList<JSONObject> listOrders(JSONObject jsonObject, PageBounds pageBounds); PageList<JSONObject> listOrders(JSONObject jsonObject, PageBounds pageBounds);
List<JSONObject> listUnsend(@Param("act_id") String actId, @Param("before") Date before); List<JSONObject> listUnsend(@Param("act_id") String actId, @Param("before") Date before);
List<JSONObject> getCustomerRedpackAnalysis(JSONObject params);
JSONObject analysisCustomerLuckyMoney(JSONObject params);
} }

@ -13,6 +13,7 @@ public class CustomerRedpackActBean {
private String act_name; private String act_name;
private BigDecimal rule_order_total; private BigDecimal rule_order_total;
private int rule_max_num; private int rule_max_num;
private int rule_max_num_limit;
private int status=0; private int status=0;
private List<JSONObject> prize_type_list; private List<JSONObject> prize_type_list;
@ -59,4 +60,12 @@ public class CustomerRedpackActBean {
public void setPrize_type_list(List<JSONObject> prize_type_list) { public void setPrize_type_list(List<JSONObject> prize_type_list) {
this.prize_type_list = prize_type_list; this.prize_type_list = prize_type_list;
} }
public int getRule_max_num_limit() {
return rule_max_num_limit;
}
public void setRule_max_num_limit(int rule_max_num_limit) {
this.rule_max_num_limit = rule_max_num_limit;
}
} }

@ -2,6 +2,7 @@ package au.com.royalpay.payment.manage.redpack.beans;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException; import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.time.DateUtils;
import java.text.ParseException; import java.text.ParseException;
@ -50,16 +51,16 @@ public class RedpackQuery {
throw new ParamInvalidException("event_date", "error.payment.valid.invalid_date_format"); throw new ParamInvalidException("event_date", "error.payment.valid.invalid_date_format");
} }
} }
if (short_name != null){ if (StringUtils.isNotEmpty(short_name)){
param.put("short_name",short_name); param.put("short_name",short_name);
} }
if (client_moniker != null){ if (StringUtils.isNotEmpty(client_moniker)){
param.put("client_moniker",client_moniker); param.put("client_moniker",client_moniker);
} }
if (nickname != null){ if (StringUtils.isNotEmpty(nickname)){
param.put("nickname",nickname); param.put("nickname",nickname);
} }
if (org_id != null){ if (StringUtils.isNotEmpty(org_id)){
param.put("org_id",org_id); param.put("org_id",org_id);
} }
if (bd != null){ if (bd != null){

@ -1,8 +1,11 @@
package au.com.royalpay.payment.manage.redpack.core; package au.com.royalpay.payment.manage.redpack.core;
import au.com.royalpay.payment.core.exceptions.RedPackException; import au.com.royalpay.payment.core.exceptions.RedPackException;
import au.com.royalpay.payment.manage.redpack.beans.RedpackQuery;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import java.util.List;
/** /**
* Created by wangning on 2017/8/10. * Created by wangning on 2017/8/10.
*/ */
@ -23,4 +26,8 @@ public interface ActRedPackService {
JSONObject listCustomerOrders(JSONObject params, int page, int limit); JSONObject listCustomerOrders(JSONObject params, int page, int limit);
void resendFailed(); void resendFailed();
List<JSONObject> getCustomerRedpackAnalysis(String act_id, RedpackQuery redpackQuery);
JSONObject analysisCustomerLuckyMoney(JSONObject params);
} }

@ -7,6 +7,7 @@ import au.com.royalpay.payment.manage.mappers.redpack.ActPrizeTypeCustomerMapper
import au.com.royalpay.payment.manage.mappers.redpack.ActRedPacketsCustomerMapper; import au.com.royalpay.payment.manage.mappers.redpack.ActRedPacketsCustomerMapper;
import au.com.royalpay.payment.manage.mappers.redpack.ActRedPacketsCustomerOrdersMapper; import au.com.royalpay.payment.manage.mappers.redpack.ActRedPacketsCustomerOrdersMapper;
import au.com.royalpay.payment.manage.mappers.system.CustomerMapper; import au.com.royalpay.payment.manage.mappers.system.CustomerMapper;
import au.com.royalpay.payment.manage.redpack.beans.RedpackQuery;
import au.com.royalpay.payment.manage.redpack.core.ActRedPackService; import au.com.royalpay.payment.manage.redpack.core.ActRedPackService;
import au.com.royalpay.payment.tools.CommonConsts; import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
@ -286,4 +287,15 @@ public class ActRedPackServiceImpl implements ActRedPackService {
} }
} }
@Override
public List<JSONObject> getCustomerRedpackAnalysis(String act_id, RedpackQuery redpackQuery) {
JSONObject params = redpackQuery.params();
params.put("act_id", act_id);
return actRedPacketsCustomerOrdersMapper.getCustomerRedpackAnalysis(params);
}
@Override
public JSONObject analysisCustomerLuckyMoney(JSONObject params) {
return actRedPacketsCustomerOrdersMapper.analysisCustomerLuckyMoney(params);
}
} }

@ -1,12 +1,14 @@
package au.com.royalpay.payment.manage.redpack.web; package au.com.royalpay.payment.manage.redpack.web;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping; import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.redpack.beans.RedpackQuery;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole; import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.manage.redpack.core.ActRedPackService; import au.com.royalpay.payment.manage.redpack.core.ActRedPackService;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
/** /**
* Created by wangning on 2017/8/10. * Created by wangning on 2017/8/10.
@ -30,10 +32,21 @@ public class ActRedpackConfigController {
} }
@RequestMapping(value = "/act/{act_id}",method = RequestMethod.GET) @RequestMapping(value = "/act/{act_id}",method = RequestMethod.GET)
private JSONObject listCustomerOrders(@PathVariable String act_id, @RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int limit){ private JSONObject listCustomerOrders(@PathVariable String act_id, RedpackQuery redpackQuery){
JSONObject params = new JSONObject(); JSONObject params = redpackQuery.params();
params.put("actId",act_id); params.put("actId",act_id);
return actRedPackService.listCustomerOrders(params,page,limit); return actRedPackService.listCustomerOrders(params,redpackQuery.getPage(),redpackQuery.getLimit());
} }
@ManagerMapping(value = "/{act_id}/sendLogs/analysis",method = RequestMethod.GET)
public List<JSONObject> getCustomerRedpackAnalysis(@PathVariable String act_id, RedpackQuery query){
return actRedPackService.getCustomerRedpackAnalysis(act_id,query);
}
@ManagerMapping(value = "/act/{act_id}/analysis",method = RequestMethod.GET)
public JSONObject customerLuckyMoneyAnalysis(@PathVariable String act_id, RedpackQuery query){
JSONObject params= query.params();
params.put("act_id",act_id);
return actRedPackService.analysisCustomerLuckyMoney(params);
}
} }

@ -23,9 +23,25 @@
<select id="listOrders" resultType="com.alibaba.fastjson.JSONObject"> <select id="listOrders" resultType="com.alibaba.fastjson.JSONObject">
SELECT SELECT
a.*, a.*,
b.client_moniker b.client_moniker,
FROM act_red_packets_customer_orders a INNER JOIN sys_clients b ON a.client_id = b.client_id c.headimg,
c.nickname
FROM act_red_packets_customer_orders a
INNER JOIN sys_clients b ON a.client_id = b.client_id
LEFT JOIN sys_customer_relation c ON c.wechat_openid = a.open_id
WHERE act_id = #{actId} WHERE act_id = #{actId}
<if test="client_moniker != null">
AND b.client_moniker = #{client_moniker}
</if>
<if test="short_name != null">
AND b.short_name = #{short_name}
</if>
<if test="nickname != null">
<bind name="nickname_pattern" value="'%'+nickname+'%'"/>
and c.nickname like #{nickname_pattern}
</if>
<if test="from!=null">and a.event_time >= #{from}</if>
<if test="to!=null">and a.event_time &lt;= #{to}</if>
</select> </select>
<select id="listUnsend" resultType="com.alibaba.fastjson.JSONObject"> <select id="listUnsend" resultType="com.alibaba.fastjson.JSONObject">
SELECT * SELECT *
@ -48,4 +64,34 @@
]]> ]]>
</update> </update>
<select id="getCustomerRedpackAnalysis" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT date_format(event_time, '%Y-%m-%d') date,COUNT(red_packet_customer_order_id) counts,
sum(if(STATUS!=0,1,0)) sendtotal_counts,sum(if(status=1,1,0)) send_counts,sum(if(STATUS=2,1,0))fail_counts,sum(if(STATUS=3,1,0))receive_counts,sum(if(STATUS=4,1,0))refund_counts,
SUM(red_packet_amount) amount,sum(if(status=1 or status=3,red_packet_amount,0)) real_amount
FROM act_red_packets_customer_orders
where act_id = #{act_id}
and event_time is not null
and status !=0
]]>
<if test="from!=null">and event_time &gt;= #{from}</if>
<if test="to!=null">and event_time &lt;= #{to}</if>
GROUP BY date
</select>
<select id="analysisCustomerLuckyMoney" resultType="com.alibaba.fastjson.JSONObject">
SELECT COUNT(red_packet_customer_order_id) total_counts,sum(red_packet_amount) total_amount,
ifnull(SUM(if(status=0 AND lock_key is null,1,0)),0) unsend_counts,SUM(if(status=0 AND lock_key is null,red_packet_amount,0)) unsend_amount,
sum(if(status!=0,1,0)) send_counts,SUM(if(status !=0 ,red_packet_amount,0)) send_amount,
sum(if(status=2,1,0)) fail_counts,SUM(if(status=2,red_packet_amount,0)) fail_amount,
sum(if(status=1 or status=3,1,0)) receive_counts,SUM(if(status=1 or status=3,red_packet_amount,0)) receive_amount,
sum(if(status=4,1,0)) return_counts,SUM(if(status=4,red_packet_amount,0)) return_amount
FROM act_red_packets_customer_orders
<where>
act_id = #{act_id}
<if test="red_pack_type_id">and red_pack_type_id=#{red_pack_type_id}</if>
</where>
</select>
</mapper> </mapper>

@ -37,11 +37,184 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}]); }]);
app.controller('actCustomerRedpackOrdersCtrl',['$scope','$http',function ($scope, $http) { app.controller('actCustomerRedpackOrdersCtrl',['$scope','$http','$filter',function ($scope, $http,$filter) {
$scope.analysis = {};
$scope.today = new Date();
$scope.chooseToday = function () {
$scope.analysis.begin = $scope.analysis.end = new Date();
$scope.doAnalysis();
};
$scope.chooseYesterday = function () {
var yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
$scope.analysis.begin = $scope.analysis.end = yesterday;
$scope.doAnalysis();
};
$scope.chooseLast7Days = function () {
$scope.analysis.end = new Date();
var day = new Date();
day.setDate(day.getDate() - 7);
$scope.analysis.begin = day;
$scope.doAnalysis();
};
$scope.thisMonth = function () {
$scope.analysis.end = new Date();
var monthBegin = new Date();
monthBegin.setDate(1);
$scope.analysis.begin = monthBegin;
$scope.doAnalysis();
};
$scope.doAnalysis = function () {
var params = angular.copy($scope.analysis);
if (params.begin) {
params.from = $filter('date')(params.begin, 'yyyyMMdd');
} else {
params.from = $filter('date')(new Date(), 'yyyyMMdd');
}
if (params.end) {
params.to = $filter('date')(params.end, 'yyyyMMdd');
} else {
params.to = $filter('date')(new Date(), 'yyyyMMdd');
}
$http.get('/sys/redpack/customer/'+$scope.act.act_id+'/sendLogs/analysis', {params: params}).then(function (resp) {
$scope.redPackCounts = angular.copy(resp.data);
var dates = [];
var send_counts = [];
var fail_counts = [];
var receive_counts = [];
var refund_counts = [];
var amounts = [];
var real_amounts = [];
resp.data.forEach(function (e) {
dates.push(e.date);
send_counts.push(e.send_counts);
fail_counts.push(e.fail_counts);
receive_counts.push(e.receive_counts);
refund_counts.push(e.refund_counts);
amounts.push(e.amount);
real_amounts.push(e.real_amount);
});
var customerRedPackSendLogsHistory = function (dates, send_counts, fail_counts, receive_counts, refund_counts, amounts, real_amounts) {
return {
color: colors,
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
legend: {
data: ['已领取', '发送未领取', '发送失败', '退回', '发送红包金额', '实际红包金额']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
data: dates
}
],
yAxis: [
{
type: 'value',
name: 'RedPackets'
}, {
type: 'value',
name: 'Amount(¥)'
}
],
series: [{
name: '已领取',
type: 'bar',
stack: 'repackets',
data: receive_counts
},
{
name: '发送未领取',
type: 'bar',
stack: 'repackets',
data: send_counts
},
{
name: '发送失败',
type: 'bar',
stack: 'repackets',
data: fail_counts
},
{
name: '退回',
type: 'bar',
stack: 'repackets',
data: refund_counts
},
{
name: '发送红包金额',
type: 'line',
yAxisIndex: 1,
data: amounts
},
{
name: '实际红包金额',
type: 'line',
yAxisIndex: 1,
data: real_amounts
}
]
};
};
$scope.customerRedPackSendLogsHistory = customerRedPackSendLogsHistory(dates, send_counts, fail_counts, receive_counts, refund_counts, amounts, real_amounts);
})
};
$scope.chooseLast7Days();
/* 《==========================================OrderList========================================================>*/
$scope.params = {};
$scope.redpack_order_pagination = {}; $scope.redpack_order_pagination = {};
$scope.chooseTodayForLogs = function () {
$scope.params.begin = $scope.params.end = new Date();
$scope.listOrders(1);
};
$scope.chooseYesterdayForLogs = function () {
var yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
$scope.params.begin = $scope.params.end = yesterday;
$scope.listOrders(1);
};
$scope.chooseLast7DaysForLogs = function () {
$scope.params.end = new Date();
var day = new Date();
day.setDate(day.getDate() - 7);
$scope.params.begin = day;
$scope.listOrders(1);
};
$scope.thisMonthForLogs = function () {
$scope.params.end = new Date();
var monthBegin = new Date();
monthBegin.setDate(1);
$scope.params.begin = monthBegin;
$scope.listOrders(1);
};
$scope.customerLuckyMoneyAnalysis = function (params) {
$http.get('/sys/redpack/customer/act/' + $scope.act.act_id + '/analysis', {params: params}).then(function (resp) {
$scope.luckyMoneyAnalysis = resp.data;
});
};
$scope.customerLuckyMoneyAnalysis({});
$scope.listOrders = function (page) { $scope.listOrders = function (page) {
var params = angular.copy($scope.redpack_order_pagination); var params = angular.copy($scope.params);
params.page = page || params.page || 1; if (params.begin) {
params.from = $filter('date')(params.begin, 'yyyyMMdd');
}
if (params.end) {
params.to = $filter('date')(params.end, 'yyyyMMdd');
}
params.page = page || $scope.redpack_order_pagination.page || 1;
$http.get('/sys/redpack/customer/act/'+$scope.act.act_id, {params: params}).then(function (resp) { $http.get('/sys/redpack/customer/act/'+$scope.act.act_id, {params: params}).then(function (resp) {
$scope.redpack_order_pagination = resp.data.pagination; $scope.redpack_order_pagination = resp.data.pagination;
$scope.orders = resp.data.data; $scope.orders = resp.data.data;
@ -94,6 +267,17 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
}; };
$scope.listClients(); $scope.listClients();
$scope.addAttendClient = function () {
$uibModal.open({
templateUrl: '/static/config/redpackets/templates/add_act_client.html',
controller: 'addClientInfoCtrl',
resolve: {
act: $scope.act
}
}).result.then(function () {
$scope.listClients();
})
};
$scope.editClientInfo = function (client) { $scope.editClientInfo = function (client) {
var client = angular.copy(client); var client = angular.copy(client);
$uibModal.open({ $uibModal.open({
@ -129,6 +313,18 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
$scope.$close(); $scope.$close();
} }
}]); }]);
app.controller('addClientInfoCtrl',['$scope', '$http','act','commonDialog', function ($scope, $http,act,commonDialog) {
$scope.client = {act_name:act.act_name};
$scope.doAddClientInfo = function(){
var params= {'send_name':$scope.client.send_name,'act_name':$scope.client.act_name,'wishing':$scope.client.wishing};
$http.post('/sys/lucky_money/customer/acts/'+act.act_id+'/partners/'+$scope.client.client_moniker,params).then(function () {
commonDialog.alert({title: 'Success', content: '新增成功!', type: 'success'});
$scope.$close();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
});
}
}]);
app.filter('send_status', function () { app.filter('send_status', function () {
return function (stateValue) { return function (stateValue) {

@ -49,13 +49,20 @@
<p class="small text-info">红包限制:订单满足的最小金额</p> <p class="small text-info">红包限制:订单满足的最小金额</p>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group" ng-if="act.rule_max_num_limit">
<label class="control-label col-sm-2">RedPacket Counts</label> <label class="control-label col-sm-2">RedPacket Counts</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static" ng-bind="act.rule_max_num"></p> <p class="form-control-static" ng-bind="act.rule_max_num"></p>
<p class="small text-info">红包限制:每个客户每天最多所能获取的红包数量</p> <p class="small text-info">红包限制:每个客户每天最多所能获取的红包数量</p>
</div> </div>
</div> </div>
<div class="form-group" ng-if="!act.rule_max_num_limit">
<label class="control-label col-sm-2">RedPacket Counts</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="act.rule_max_num"></p>
<p class="small text-info">红包限制:每个客户活动期间最多所能获取的红包数量</p>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Activity Status</label> <label class="control-label col-sm-2">Activity Status</label>
<div class="col-sm-10"> <div class="col-sm-10">

@ -53,8 +53,20 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group">
<div class="form-group" <label class="control-label col-sm-2" for="rule_max_num-input">* RedPacket Counts Limit</label>
<div class="col-sm-8">
<label class="radio-inline">
<input type="radio" value="1" checked ng-model="act.rule_max_num_limit">
Day
</label>
<label class="radio-inline">
<input type="radio" value="0" ng-model="act.rule_max_num_limit">
Whole Activity
</label>
</div>
</div>
<div class="form-group" ng-if="act.rule_max_num_limit == 1"
ng-class="{'has-error':ActivityForm.rule_max_num.$invalid && ActivityForm.rule_max_num.$dirty}"> ng-class="{'has-error':ActivityForm.rule_max_num.$invalid && ActivityForm.rule_max_num.$dirty}">
<label class="control-label col-sm-2" for="rule_max_num-input">* RedPacket <label class="control-label col-sm-2" for="rule_max_num-input">* RedPacket
Counts</label> Counts</label>
@ -79,6 +91,31 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="act.rule_max_num_limit == 0"
ng-class="{'has-error':ActivityForm.rule_max_num.$invalid && ActivityForm.rule_max_num.$dirty}">
<label class="control-label col-sm-2" for="rule_max_num_day-input">* RedPacket
Counts</label>
<div class="col-sm-8">
<input type="number" name="rule_max_num" class="form-control"
ng-model="act.rule_max_num"
min="1" max="100" step="1"
id="rule_max_num_day-input" required>
<p class="small text-info">红包限制:每个客户活动内最多所能获取的红包数量</p>
<div ng-messages="act.rule_partner_max_num.$error"
ng-if="act.rule_max_num.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 100
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 1
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">Activity Status</label> <label class="col-sm-2 control-label">Activity Status</label>
<div class="col-sm-8 checkbox-inline"> <div class="col-sm-8 checkbox-inline">

@ -1,23 +1,35 @@
<div class="table-responsive"> <div class="box box-warning">
<table class="table table-striped table-hover"> <div class="box-header">
<thead> <div class="form-inline">
<tr> <div class="form-group">
<th>Client</th> <button class="btn btn-success" type="button" ng-click="addAttendClient()"><i class="fa fa-plus"></i> New Attend Partner</button>
<th>Send Name</th> </div>
<th>Act Name</th> </div>
<th>Operation</th> </div>
</tr>
</thead> </div>
<tbody> <div class="box box-warning">
<tr ng-repeat="client in clients"> <div class="table-responsive">
<td>{{client.short_name}}({{client.client_moniker}})</td> <table class="table table-striped table-hover">
<td ng-bind="client.send_name"></td> <thead>
<td ng-bind="client.act_name"></td> <tr>
<td> <th>Client</th>
<a role="button" ng-click="editClientInfo(client)"><i class="fa fa-cog"></i></a> <th>Send Name</th>
<a role="button" ng-click="deleteClient(client)" class="text-danger"><i class="fa fa-trash"></i></a> <th>Act Name</th>
</td> <th>Operation</th>
</tr> </tr>
</tbody> </thead>
</table> <tbody>
<tr ng-repeat="client in clients">
<td>{{client.short_name}}({{client.client_moniker}})</td>
<td ng-bind="client.send_name"></td>
<td ng-bind="client.act_name"></td>
<td>
<a role="button" ng-click="editClientInfo(client)"><i class="fa fa-cog"></i></a>
<a role="button" ng-click="deleteClient(client)" class="text-danger"><i class="fa fa-trash"></i></a>
</td>
</tr>
</tbody>
</table>
</div>
</div> </div>

@ -1,37 +1,206 @@
<div class="table-responsive"> <div class="box box-warning">
<table class="table table-striped table-hover"> <div class="box-header">
<thead> <div class="row">
<tr> <div class="col-sm-12">
<th>Client Moniker</th> <div class="form-horizontal">
<th>status</th> <div class="form-group col-xs-12 col-sm-12">
<th>Order Amount</th> <label class="control-label col-xs-4 col-sm-2">Date Range</label>
<th>Create Time</th> <div class="col-sm-10">
</tr> <div class="form-control-static form-inline">
</thead> <div style="display: inline-block">
<tbody> <input class="form-control" id="date-from-input"
<tr ng-repeat="order in orders"> ng-model="analysis.begin"
<td>{{order.client_moniker}}</td> uib-datepicker-popup size="10" placeholder="From"
<td>{{order.status|send_status}}</td> is-open="analysis_dateBegin.open" ng-click="analysis_dateBegin.open=true"
<td>{{order.order_amount}}</td> datepicker-options="{maxDate:analysis.end||today}">
<td>{{order.create_time}}</td> </div>
</tr> ~
</tbody> <div style="display: inline-block">
</table> <input class="form-control" id="date-to-input" ng-model="analysis.end"
uib-datepicker-popup size="10" placeholder="To"
is-open="analysis_dateTo.open" ng-click="analysis_dateTo.open=true"
datepicker-options="{minDate:analysis.begin,maxDate:today}">
</div>
<div class="box-footer" ng-if="orders.length"> <!--<div class="btn-group">-->
<uib-pagination class="pagination" <!--<a role="button" class="btn btn-default btn-sm"-->
total-items="redpack_order_pagination.totalCount" <!--ng-click="chooseToday()">Today</a>-->
boundary-links="true" <!--</div>-->
ng-model="redpack_order_pagination.page" <!--<div class="btn-group">-->
items-per-page="redpack_order_pagination.limit" <!--<a role="button" class="btn btn-default btn-sm"-->
max-size="10" <!--ng-click="chooseYesterday()">Yesterday</a>-->
ng-change="listOrders()" <!--</div>-->
previous-text="&lsaquo;" <div class="btn-group">
next-text="&rsaquo;" <a role="button" class="btn btn-default btn-sm"
first-text="&laquo;" ng-click="chooseLast7Days()">Last 7 Days</a>
last-text="&raquo;"></uib-pagination> </div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="thisMonth()">This Month</a>
</div>
<!--<div class="btn-group">-->
<!--<a role="button" class="btn btn-default btn-sm"-->
<!--ng-click="lastMonth()">Last Month</a>-->
<!--</div>-->
<!--<div class="btn-group">-->
<!--<a role="button" class="btn btn-default btn-sm"-->
<!--ng-click="thisYear()">This Year</a>-->
<!--</div>-->
<!--<div class="btn-group" uib-dropdown ng-if="currentUser.client.has_children">-->
<!--<button id="single-button" type="button" class="btn btn-primary"-->
<!--uib-dropdown-toggle ng-disabled="disabled">-->
<!--{{chooseShow}} <span class="caret"></span>-->
<!--</button>-->
<!--<ul class="dropdown-menu" uib-dropdown-menu aria-labelledby="single-button" style="min-width: 80px">-->
<!--<li><a ng-click="chooseClient('All')">All</a></li>-->
<!--<li ng-repeat="client in clients"><a ng-click="chooseClient(client)">{{client.short_name}}</a></li>-->
<!--</ul>-->
<!--</div>-->
<button class="btn btn-success" type="button"
ng-click="doAnalysis()">
<i class="fa fa-search"></i>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="box">
<div class="box-body">
<div class="chart col-md-12" echarts="customerRedPackSendLogsHistory" style="height: 300px"
ng-class="{nodata:customerRedPackSendLogsHistory.nodata}"></div>
</div>
</div>
<div class="box box-warning">
<div class="box-header">
<div class="row"> <div class="row">
<div class="col-xs-12">Total Records:{{redpack_order_pagination.totalCount}};Total Pages:{{redpack_order_pagination.totalPages}}</div> <div class="col-sm-12">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-4" for="partner-search">Partner Name</label>
<div class="col-xs-12 col-sm-6">
<input type="text" class="form-control" id="partner-search"
ng-enter="listOrders(1)"
ng-model="params.short_name">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-4" for="code-search">Partner Code</label>
<div class="col-xs-12 col-sm-6">
<input type="text" class="form-control" id="code-search"
ng-enter="listOrders(1)"
ng-model="params.client_moniker">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-2 col-sm-4" for="sub-merchant-search">
<span ng-bind='act.channel'></span>
Nickname</label>
<div class="col-xs-12 col-sm-6">
<input type="text" class="form-control" id="sub-merchant-search"
ng-enter="listOrders(1)"
ng-model="params.nickname">
</div>
</div>
<div class="form-group col-xs-12 col-sm-12">
<label class="control-label col-xs-4 col-sm-2">Date Range</label>
<div class="col-sm-10">
<div class="form-control-static form-inline">
<div style="display: inline-block">
<input class="form-control" id="date-from-input-logs"
ng-model="params.begin"
uib-datepicker-popup size="10" placeholder="From"
is-open="dateBegin.open" ng-click="dateBegin.open=true"
datepicker-options="{maxDate:params.end||today}">
</div>
~
<div style="display: inline-block">
<input class="form-control" id="date-to-input-logs"
ng-model="params.end"
uib-datepicker-popup size="10" placeholder="To"
is-open="dateTo.open" ng-click="dateTo.open=true"
datepicker-options="{minDate:params.begin,maxDate:today}">
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseTodayForLogs()">Today</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseYesterdayForLogs()">Yesterday</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseLast7DaysForLogs()">Last 7 Days</a>
</div>
<button class="btn btn-success" type="button"
ng-click="listOrders(1)">
<i class="fa fa-search"></i>
</button>
</div>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="panel panel-default">
<div class="panel-heading">
Orders<span style="font-size: smaller;color: grey">(总共红包{{luckyMoneyAnalysis.total_counts}}|{{luckyMoneyAnalysis.total_amount}}¥;
已发红包{{luckyMoneyAnalysis.send_counts}}|{{luckyMoneyAnalysis.send_amount}}¥;客户所得红包{{luckyMoneyAnalysis.receive_counts}}|{{luckyMoneyAnalysis.receive_amount}}¥
待发送红包{{luckyMoneyAnalysis.unsend_counts}}|{{luckyMoneyAnalysis.unsend_amount}}¥)</span></div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Client Moniker</th>
<th>Lucky Money</th>
<th>Order Amount</th>
<th>Nick Name</th>
<th>status</th>
<th>Event Time</th>
<th>Create Time</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="order in orders">
<td>{{order.client_moniker}}</td>
<td>{{order.red_packet_amount}}</td>
<td>{{order.order_amount}}</td>
<td><span><img style="height: 30px;width: 30px" class="img-circle"
ng-src="{{order.headimg}}"> {{order.nickname}}</span></td>
<td>{{order.status|send_status}}</td>
<td>{{order.event_time}}</td>
<td>{{order.create_time}}</td>
</tr>
</tbody>
</table>
<div class="box-footer" ng-if="orders.length">
<uib-pagination class="pagination"
total-items="redpack_order_pagination.totalCount"
boundary-links="true"
ng-model="redpack_order_pagination.page"
items-per-page="redpack_order_pagination.limit"
max-size="10"
ng-change="listOrders()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">Total Records:{{redpack_order_pagination.totalCount}};Total Pages:{{redpack_order_pagination.totalPages}}</div>
</div>
</div>
</div>
</div>
</div>

@ -0,0 +1,51 @@
<div class="modal-header">
<h4>Edit Client{{client.act_id}}</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<form name="clientForm" novalidate>
<label class="control-label col-sm-6" for="act-name-input">Partner Code</label>
<div class="col-sm-6">
<input class="form-control" ng-model="client.client_moniker"
type="text"
name="act_name"
id="client_moniker-input">
</div>
<div class="form-group"
ng-class="{'has-error':clientForm.client_moniker.$invalid && clientForm.client_moniker.$dirty}">
<label class="control-label col-sm-6" for="send-name-input">Send Name</label>
<div class="col-sm-6">
<input class="form-control" ng-model="client.send_name"
type="text"
name="send_name"
id="send-name-input">
</div>
<label class="control-label col-sm-6" for="act-name-input">Act Name</label>
<div class="col-sm-6">
<input class="form-control" ng-model="client.act_name"
type="text"
name="act_name"
id="act-name-input">
</div>
<label class="control-label col-sm-6" for="wishing-input">Wishing</label>
<div class="col-sm-6">
<input class="form-control" ng-model="client.wishing"
type="text"
name="wishing"
id="wishing-input">
</div>
</div>
</form>
</div>
<div class="col-sm-12">
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" ng-click="$dismiss()">Cancel</button>
<button type="button" class="btn btn-success" ng-click="doAddClientInfo()">save</button>
</div>
Loading…
Cancel
Save