|
@@ -124,7 +124,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
|
|
|
<div region="center" title="用户订单" data-options="iconCls:'icon-save'" style="overflow:auto;padding:10px;">
|
|
|
<div class="detail_layout">
|
|
@@ -133,6 +132,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
<div region="center" title="用户可用代金券" data-options="iconCls:'icon-save'" style="overflow:auto;padding:10px;">
|
|
|
<div class="detail_layout">
|
|
|
<div data-options="region:'center'" class="detail_center">
|
|
@@ -196,7 +196,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</li>
|
|
|
- <!-- <li class="f_item">
|
|
|
+ <li class="f_item">
|
|
|
<div class="box">
|
|
|
<div class="f_label">
|
|
|
<span>发送短信: </span>
|
|
@@ -205,9 +205,9 @@
|
|
|
<input name="need_sms" id="need_sms" type="checkbox" value="1" onclick="needMessage();"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </li> -->
|
|
|
+ </li>
|
|
|
|
|
|
- <li class="f_item" id="coupon_copy_item" style="display: none;">
|
|
|
+ <li class="f_item" id="coupon_copy_item" >
|
|
|
<div class="box">
|
|
|
<div class="f_label">
|
|
|
<span>默认文案: </span>
|
|
@@ -231,41 +231,105 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <div region="center" title="修改余额" data-options="iconCls:'icon-save'" style="overflow:auto;padding:10px;">
|
|
|
+ <div class="detail_layout">
|
|
|
+ <div data-options="region:'center'" class="detail_center">
|
|
|
+ <div class="detail_main">
|
|
|
+ <form id="sendCoupon_form" method="post">
|
|
|
+ <ul>
|
|
|
+ <li class="f_item">
|
|
|
+ <div class="box">
|
|
|
+ <div class="f_label">
|
|
|
+ <span>ID: </span>
|
|
|
+ </div>
|
|
|
+ <div class="box_flex f_content">
|
|
|
+ <span id="balance_user_str"></span>
|
|
|
+ <input type="hidden" name="id" id="balance_user_id" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="f_item">
|
|
|
+ <div class="box">
|
|
|
+ <div class="f_label">
|
|
|
+ <span>金额: </span>
|
|
|
+ </div>
|
|
|
+ <div class="box_flex f_content">
|
|
|
+ <input name="amount" id="amount" placeholder="如100或者-100" style="width:250px;"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
|
|
|
+ <li class="f_item">
|
|
|
+ <div class="box">
|
|
|
+ <div class="f_label">
|
|
|
+ <span>类型: </span>
|
|
|
+ </div>
|
|
|
+ <div class="box_flex f_content">
|
|
|
+ <input type="radio" name="type" value="admin_recharge">后台充值
|
|
|
+ <input type="radio" name="type" value="order">下订单
|
|
|
+ <input type="radio" name="type" value="send">赠送
|
|
|
+ <input type="radio" name="type" value="other">其他
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+
|
|
|
+ <li class="f_item">
|
|
|
+ <div class="box">
|
|
|
+ <div class="f_label">
|
|
|
+ <span>备注: </span>
|
|
|
+ </div>
|
|
|
+ <div class="box_flex f_content">
|
|
|
+ <textarea name="memo" id="memo" style="width:250px;height:120px;"></textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div data-options="region:'south'" class="detail_south">
|
|
|
+ <div class="detail_toolbar">
|
|
|
+ <a href="javascript:void(0);" class="easyui-linkbutton set_button" iconCls="icon-save" onclick="sendCoupon();return false;">发送</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div data-options="region:'south'" class="detail_south">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div region="center" title="余额记录" data-options="iconCls:'icon-save'" style="overflow:auto;padding:10px;">
|
|
|
+ <div class="detail_layout">
|
|
|
+ <div data-options="region:'center'" class="detail_center">
|
|
|
+ <table id="balance_dg"></table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
<!--新增用户结束 -->
|
|
|
-<style type="text/css">
|
|
|
-#pets_info_container .pets_item {margin:6px 0;border:1px solid #0099FF;border-radius: 4px;width: 100%;padding: 6px 8px;}
|
|
|
-#pets_info_container .pets_label {display: inline-block; width: 40px;}
|
|
|
-#pets_info_container .pets_value {display: inline-block; width: 80px;}
|
|
|
-</style>
|
|
|
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/qiniu_upload_single.js?v=20200907"></script>
|
|
|
<script type="text/javascript">
|
|
|
var jq_dg_content = $('#dg_content');
|
|
|
var w_width = $(window).width();
|
|
|
var w_height = $(window).height();
|
|
|
var jq_content_form = $('#content_form');
|
|
|
-var jq_msg_form = $("#message_form");
|
|
|
-var jq_filter_status = $('#filter_status');
|
|
|
var jq_action_info = $('#action_info');
|
|
|
var jq_add_dialog = $('#add_dialog');
|
|
|
var jq_add_form = $('#add_form');
|
|
|
var jq_score_form = $('#score_form');
|
|
|
-var jq_status_select = $('#status_select');
|
|
|
var jq_avatar = $('#avatar_info');
|
|
|
var jq_ss = $('#ss');
|
|
|
var jq_acc = $('#acc_container');
|
|
|
var module_router = site_root + '/index.php?r=rUser';
|
|
|
-
|
|
|
+var type = <?php echo json_encode($type); ?>;
|
|
|
var jq_sendCoupon_form = $('#sendCoupon_form');
|
|
|
-var jq_filter_app_client = $('#filter_app_client');
|
|
|
|
|
|
var price = '';
|
|
|
var endtime = '';
|
|
|
|
|
|
var jq_order_dg = $('#order_dg');
|
|
|
+var jq_balance_dg = $('#balance_dg');
|
|
|
|
|
|
console.log(window.location.href);
|
|
|
$(function(){
|
|
@@ -447,7 +511,7 @@ $(function(){
|
|
|
jq_content_form.form('load', data);
|
|
|
console.log(data);
|
|
|
$('#id_str').html(data.id);
|
|
|
-
|
|
|
+ $('#balance_id_str').val(data.id);
|
|
|
$('#register_time_str').html(format_time_stamp(data.register_time,true));
|
|
|
|
|
|
|
|
@@ -459,7 +523,7 @@ $(function(){
|
|
|
|
|
|
$('#view_latitude').val(data.latitude);
|
|
|
$('#view_longitude').val(data.longitude);
|
|
|
-
|
|
|
+ $('#balance_user_id').val(data.id);
|
|
|
|
|
|
jq_sendCoupon_form.form('clear');
|
|
|
$('#coupon_user_id').val(data.id);
|
|
@@ -487,6 +551,25 @@ $(function(){
|
|
|
]]
|
|
|
});
|
|
|
|
|
|
+ jq_balance_dg.datagrid({
|
|
|
+ url: site_root + '/index.php?r=rUser/balanceLog',
|
|
|
+ fitColumns: true,
|
|
|
+ pagination: true,
|
|
|
+ pageList: [20, 30, 50],
|
|
|
+ pageSize: 20,
|
|
|
+ singleSelect: true,
|
|
|
+ queryParams: {
|
|
|
+ search: data.id
|
|
|
+ },
|
|
|
+ columns: [[
|
|
|
+ {field: 'time_str', title: '时间', width: 100},
|
|
|
+ {field: 'type_str', title: '类型', width: 100,},
|
|
|
+ {field: 'action_user', title: '操作者', width: 100,},
|
|
|
+ {field:'amount', title:'数量', width:40},
|
|
|
+ {field:'memo', title:'说明', width:40}
|
|
|
+ ]]
|
|
|
+ });
|
|
|
+
|
|
|
jq_order_dg.datagrid({
|
|
|
url: site_root + '/index.php?r=rOrder/list',
|
|
|
fitColumns: true,
|
|
@@ -500,7 +583,7 @@ $(function(){
|
|
|
columns: [[
|
|
|
{field: 'products', title: '服务', width: 40,
|
|
|
formatter: function(value, row) {
|
|
|
- return value[0].type_str.replace('','');
|
|
|
+ return type[value].text;
|
|
|
}
|
|
|
},
|
|
|
{field: 'order_time_str', title: '下单时间', width: 100,
|
|
@@ -517,18 +600,11 @@ $(function(){
|
|
|
return month+'月'+date+'日 '+hour + ':00';
|
|
|
}
|
|
|
},
|
|
|
- {field: 'precedence', title: '加急', width: 20,
|
|
|
- formatter: function(value, row) {
|
|
|
- if (value == 1) {
|
|
|
- return '是';
|
|
|
- } else {
|
|
|
- return '否';
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
{field:'af_sum_price', title:'总额', width:40},
|
|
|
{field:'sum_price', title:'折后', width:40},
|
|
|
{field: 'status_str', title: '订单状态', width: 40},
|
|
|
+ {field:'counts', title:'数量', width:20,sortable:false},
|
|
|
{field:'score', title:'评价',width:20,
|
|
|
formatter:function(value, row) {
|
|
|
if (value == 100) {
|
|
@@ -573,7 +649,8 @@ $(function(){
|
|
|
$('#view_latitude').val('');
|
|
|
$('#view_longitude').val('');
|
|
|
|
|
|
-
|
|
|
+ $('#balance_user_id').val('');
|
|
|
+ $('#balance_id_str').html('');
|
|
|
$('#coupon_user_id').val('');
|
|
|
$('#coupon_user_str').html('');
|
|
|
$('#coupon_id').val('');
|
|
@@ -621,7 +698,44 @@ $(function(){
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+//修改余额
|
|
|
+ jq_balance_form.form({
|
|
|
+ url: site_root + '/index.php?r=rUser/changeBalance',
|
|
|
+ onSubmit: function(param){
|
|
|
+ if (!$('#balance_user_id').val()){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ var isValid = $(this).form('validate');
|
|
|
+ if (!isValid){
|
|
|
+ $.messager.progress('close');
|
|
|
+ }
|
|
|
+ return isValid;
|
|
|
+ },
|
|
|
+ success: function(res){
|
|
|
+ $.messager.progress('close');
|
|
|
+ var res = JSON.parse(res);
|
|
|
+ if (res.success){
|
|
|
+ $.messager.show({
|
|
|
+ title: '提示',
|
|
|
+ msg: '保存成功',
|
|
|
+ timeout: 3500,
|
|
|
+ showType: 'slide'
|
|
|
+ });
|
|
|
+ $('#user_balance').val('');
|
|
|
+ $('#user_reason').val('');
|
|
|
+ jq_dg_content.datagrid('clearSelections');
|
|
|
+ jq_dg_content.datagrid('reload');
|
|
|
+ }else{
|
|
|
+ $.messager.show({
|
|
|
+ title: '提示',
|
|
|
+ msg: res.message,
|
|
|
+ timeout: 3500,
|
|
|
+ showType: 'slide'
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
// 发送优惠券
|
|
|
jq_sendCoupon_form.form({
|
|
@@ -716,6 +830,21 @@ function save_content(){
|
|
|
jq_content_form.submit();
|
|
|
}
|
|
|
|
|
|
+//修改余额
|
|
|
+function saveBalance(){
|
|
|
+ var a_id = $('#balance_user_id').val();
|
|
|
+ if (!a_id){
|
|
|
+ $.messager.alert('提示', "请先选择一个用户");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ var balance = $('#user_balance').val();
|
|
|
+ var balanceParse = parseInt(balance);
|
|
|
+
|
|
|
+ $.messager.progress();
|
|
|
+ jq_score_form.submit();
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
function add_content(){
|
|
|
jq_add_dialog.dialog('open');
|
|
@@ -783,13 +912,24 @@ function getCoupon() {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- price = '恭喜你获得一张价值'+couponInfo.content['value']+'元的上门服务优惠券。';
|
|
|
+ price = '恭喜你获得一张价值'+couponInfo.content['value']+'元的家政上门服务优惠券。';
|
|
|
var copy = endtime == '' ? price : price + endtime;
|
|
|
$('#coupon_copy').val(copy);
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+function needMessage() {
|
|
|
+ if ($('#need_sms').is(':checked') || $('#need_zpush').is(':checked')) {
|
|
|
+ if ($('#coupon_copy').val() == '' && $('#coupon_id').val() != '') {
|
|
|
+ getCoupon();
|
|
|
+ }
|
|
|
+ $('#coupon_copy_item').show();
|
|
|
+ } else {
|
|
|
+ $('#coupon_copy_item').hide();
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
function formatCity(value){
|
|
|
var _city = "";
|
|
|
if(value.province){
|