feat/task1-c-wallet
parent
e0d4466abc
commit
242583d9c6
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace Admin\Controller;
|
||||
|
||||
use Service\OrderService;
|
||||
|
||||
/**
|
||||
* 订单管理
|
||||
* @author Devil
|
||||
|
|
@ -137,7 +139,15 @@ class OrderController extends CommonController
|
|||
$v['receive_county_name'] = GetRegionName($v['receive_county']);
|
||||
|
||||
// 商品列表
|
||||
$v['goods'] = M('OrderDetail')->where(['order_id'=>$v['id']])->select();;
|
||||
$goods = M('OrderDetail')->where(['order_id'=>$v['id']])->select();
|
||||
if(!empty($goods))
|
||||
{
|
||||
foreach($goods as &$vs)
|
||||
{
|
||||
$vs['attribute'] = empty($vs['attribute']) ? null : json_decode($vs['attribute'], true);
|
||||
}
|
||||
}
|
||||
$v['goods'] = $goods;
|
||||
|
||||
// 描述
|
||||
$v['describe'] = '共'.count($v['goods']).'件 合计:¥'.$v['total_price'].'元';
|
||||
|
|
@ -164,6 +174,7 @@ class OrderController extends CommonController
|
|||
{
|
||||
$like_keyword = array('like', '%'.I('keyword').'%');
|
||||
$where[] = array(
|
||||
'order_no' => $like_keyword,
|
||||
'receive_name' => $like_keyword,
|
||||
'receive_tel' => $like_keyword,
|
||||
'receive_address' => $like_keyword,
|
||||
|
|
@ -220,33 +231,14 @@ class OrderController extends CommonController
|
|||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 参数处理
|
||||
$id = I('id');
|
||||
|
||||
// 删除数据
|
||||
if(!empty($id))
|
||||
{
|
||||
// 订单模型
|
||||
$m = M('Order');
|
||||
|
||||
// 订单是否存在
|
||||
$data = $m->where(array('id'=>$id))->getField('id');
|
||||
if(empty($data))
|
||||
{
|
||||
$this->ajaxReturn(L('common_data_no_exist_error'), -2);
|
||||
}
|
||||
|
||||
// 删除订单
|
||||
$status = $m->where(array('id'=>$id))->save(['is_delete_time'=>time()]);
|
||||
if($status !== false)
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_delete_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_delete_error'), -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
// 删除操作
|
||||
$params = $_POST;
|
||||
$params['user_id'] = $params['value'];
|
||||
$params['creator'] = $this->admin['id'];
|
||||
$params['creator_name'] = $this->admin['username'];
|
||||
$params['user_type'] = 'admin';
|
||||
$ret = OrderService::OrderDelete($params);
|
||||
$this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -264,39 +256,13 @@ class OrderController extends CommonController
|
|||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 参数处理
|
||||
$id = I('id');
|
||||
|
||||
// 取消数据
|
||||
if(!empty($id))
|
||||
{
|
||||
// 订单模型
|
||||
$m = M('Order');
|
||||
|
||||
// 订单是否存在
|
||||
$data = $m->field('id,status')->find($id);
|
||||
if(empty($data))
|
||||
{
|
||||
$this->ajaxReturn(L('common_data_no_exist_error'), -2);
|
||||
}
|
||||
|
||||
// 状态
|
||||
if(!in_array($data['status'], [0,1]))
|
||||
{
|
||||
$this->ajaxReturn('状态不可操作['.L('common_order_admin_status')[$data['status']]['name'].']', -3);
|
||||
}
|
||||
|
||||
// 取消订单
|
||||
$status = $m->where(array('id'=>$id))->save(['status'=>5, 'upd_time'=>time(), 'cancel_time'=>time()]);
|
||||
if($status !== false)
|
||||
{
|
||||
$this->ajaxReturn(L('common_cancel_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_cancel_error'), -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
// 取消操作
|
||||
$params = $_POST;
|
||||
$params['user_id'] = $params['value'];
|
||||
$params['creator'] = $this->admin['id'];
|
||||
$params['creator_name'] = $this->admin['username'];
|
||||
$ret = OrderService::OrderCancel($params);
|
||||
$this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -364,39 +330,13 @@ class OrderController extends CommonController
|
|||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 参数处理
|
||||
$id = I('id');
|
||||
|
||||
// 取消数据
|
||||
if(!empty($id))
|
||||
{
|
||||
// 订单模型
|
||||
$m = M('Order');
|
||||
|
||||
// 订单是否存在
|
||||
$data = $m->field('id,status')->find($id);
|
||||
if(empty($data))
|
||||
{
|
||||
$this->ajaxReturn(L('common_data_no_exist_error'), -2);
|
||||
}
|
||||
|
||||
// 状态
|
||||
if(!in_array($data['status'], [3]))
|
||||
{
|
||||
$this->ajaxReturn('状态不可操作['.L('common_order_admin_status')[$data['status']]['name'].']', -3);
|
||||
}
|
||||
|
||||
// 取消订单
|
||||
$status = $m->where(array('id'=>$id))->save(['status'=>4, 'upd_time'=>time(), 'success_time'=>time()]);
|
||||
if($status !== false)
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_collect_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_collect_error'), -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
// 收货操作
|
||||
$params = $_POST;
|
||||
$params['user_id'] = $params['value'];
|
||||
$params['creator'] = $this->admin['id'];
|
||||
$params['creator_name'] = $this->admin['username'];
|
||||
$ret = OrderService::OrderConfirm($params);
|
||||
$this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return array(
|
||||
'order_so_keyword_tips' => '姓名/手机/地址/快递单号',
|
||||
'order_so_keyword_tips' => '订单号/姓名/手机/地址/快递单号',
|
||||
'order_time_start_text' => '起始时间',
|
||||
'order_time_end_text' => '结束时间',
|
||||
|
||||
|
|
|
|||
|
|
@ -66,13 +66,19 @@
|
|||
<foreach name="v.goods" item="vs">
|
||||
<div class="goods-item">
|
||||
<div class="base">
|
||||
<a href="javascript:;" target="_blank" title="{{$v.title}}">
|
||||
<a href="{{:HomeUrl('Goods', 'Index', ['id'=>$vs['goods_id']])}}" target="_blank" title="{{$v.title}}">
|
||||
<img src="{{$image_host}}{{$vs['images']}}" class="am-img-thumbnail am-radius goods-images am-hide-sm-only" />
|
||||
</a>
|
||||
<a href="javascript:;" target="_blank" title="{{$vs.title}}" <if condition="!empty($vs['title_color'])"> style="color:{{$vs.title_color}};" </if> >{{$vs.title}}</a>
|
||||
<a href="{{:HomeUrl('Goods', 'Index', ['id'=>$vs['goods_id']])}}" target="_blank" title="{{$vs.title}}" <if condition="!empty($vs['title_color'])"> style="color:{{$vs.title_color}};" </if> >{{$vs.title}}</a>
|
||||
</div>
|
||||
<div class="other">
|
||||
<span class="fl">{{$vs.attribute}}</span>
|
||||
<span class="fl">
|
||||
<notempty name="vs.attribute">
|
||||
<foreach name="vs.attribute" key="kss" item="vss">
|
||||
{{$vss.attr_type_name}}:{{$vss.attr_name}}<if condition="$kss eq count($vs.attribute)-1">,</if>
|
||||
</foreach>
|
||||
</notempty>
|
||||
</span>
|
||||
<span class="fr">{{$vs.price}}x{{$vs.buy_number}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -117,10 +123,10 @@
|
|||
<foreach name="v.goods" item="vs">
|
||||
<div class="goods-item">
|
||||
<div class="base">
|
||||
<a href="javascript:;" target="_blank" title="{{$v.title}}">
|
||||
<a href="{{:HomeUrl('Goods', 'Index', ['id'=>$vs['goods_id']])}}" target="_blank" title="{{$v.title}}">
|
||||
<img src="{{$image_host}}{{$vs['images']}}" class="am-img-thumbnail am-radius goods-images am-hide-sm-only" />
|
||||
</a>
|
||||
<a href="javascript:;" target="_blank" title="{{$vs.title}}" <if condition="!empty($vs['title_color'])"> style="color:{{$vs.title_color}};" </if> >{{$vs.title}}</a>
|
||||
<a href="{{:HomeUrl('Goods', 'Index', ['id'=>$vs['goods_id']])}}" target="_blank" title="{{$vs.title}}" <if condition="!empty($vs['title_color'])"> style="color:{{$vs.title_color}};" </if> >{{$vs.title}}</a>
|
||||
</div>
|
||||
<div class="other">
|
||||
<span class="fl">{{$vs.attribute}}</span>
|
||||
|
|
@ -196,16 +202,16 @@
|
|||
</td>
|
||||
<td class="view-operation">
|
||||
<if condition="in_array($v['status'], [0,1])">
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-paint-brush submit-ajax" data-url="{{:U('Admin/Order/Cancel')}}" data-id="{{$v.id}}" data-view="reload" data-msg="{{:L('common_cancel_tips')}}"> {{:L('common_operation_cancel')}}</button>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-paint-brush submit-ajax" data-url="{{:U('Admin/Order/Cancel')}}" data-id="{{$v.id}}" data-value="{{$v.user_id}}" data-view="reload" data-msg="{{:L('common_cancel_tips')}}"> {{:L('common_operation_cancel')}}</button>
|
||||
</if>
|
||||
<if condition="$v['status'] eq 2">
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-send-o submit-ajax" data-url="{{:U('Admin/Order/Delivery')}}" data-id="{{$v.id}}" data-view="reload" data-msg="{{:L('common_delivery_tips')}}"> {{:L('common_delivery_submit')}}</button>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-send-o submit-ajax" data-url="{{:U('Admin/Order/Delivery')}}" data-id="{{$v.id}}" data-value="{{$v.user_id}}" data-view="reload" data-msg="{{:L('common_delivery_tips')}}"> {{:L('common_delivery_submit')}}</button>
|
||||
</if>
|
||||
<if condition="$v['status'] eq 3">
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-check-circle-o submit-ajax" data-url="{{:U('Admin/Order/Collect')}}" data-id="{{$v.id}}" data-view="reload" data-msg="{{:L('common_collect_tips')}}"> {{:L('common_collect_submit')}}</button>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-check-circle-o submit-ajax" data-url="{{:U('Admin/Order/Collect')}}" data-id="{{$v.id}}" data-value="{{$v.user_id}}" data-view="reload" data-msg="{{:L('common_collect_tips')}}"> {{:L('common_collect_submit')}}</button>
|
||||
</if>
|
||||
<if condition="in_array($v['status'], [0,1,5,6])">
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/Order/Delete')}}" data-id="{{$v.id}}"> {{:L('common_operation_delete')}}</button>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-ajax" data-url="{{:U('Admin/Order/Delete')}}" data-id="{{$v.id}}" data-value="{{$v.user_id}}" data-view="delete" data-msg="{{:L('common_delete_tips')}}"> {{:L('common_operation_delete')}}</button>
|
||||
</if>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ class CommonController extends Controller
|
|||
$user['mobile_security']= empty($user['mobile']) ? '' : substr($user['mobile'], 0, 3).'***'.substr($user['mobile'], -3);
|
||||
$user['email_security'] = empty($user['email']) ? '' : substr($user['email'], 0, 3).'***'.substr($user['email'], -3);
|
||||
|
||||
// 页面显示名称
|
||||
// 显示名称,根据规则优先展示
|
||||
$user['user_name_view'] = $user['username'];
|
||||
if(empty($user['user_name_view']))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -72,10 +72,18 @@ class OrderController extends CommonController
|
|||
);
|
||||
$data = OrderService::OrderList($data_params);
|
||||
$this->assign('data_list', $data['data']);
|
||||
|
||||
// 发起支付 - 支付方式
|
||||
$this->assign('buy_payment_list', ResourcesService::BuyPaymentList());
|
||||
|
||||
// 品牌分类
|
||||
// $brand_category = M('BrandCategory')->where(['is_enable'=>1])->field('id,name')->select();
|
||||
// $this->assign('brand_category', $brand_category);
|
||||
// 支付方式
|
||||
$this->assign('payment_list', ResourcesService::PaymentList());
|
||||
|
||||
// 订单状态
|
||||
$this->assign('common_order_user_status', L('common_order_user_status'));
|
||||
|
||||
// 支付状态
|
||||
$this->assign('common_order_pay_status', L('common_order_pay_status'));
|
||||
|
||||
// 参数
|
||||
$this->assign('params', $params);
|
||||
|
|
@ -129,5 +137,79 @@ class OrderController extends CommonController
|
|||
$this->display('/Public/PayError');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单取消
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-30
|
||||
* @desc description
|
||||
*/
|
||||
public function Cancel()
|
||||
{
|
||||
if(IS_POST)
|
||||
{
|
||||
$params = $_POST;
|
||||
$params['user_id'] = $this->user['id'];
|
||||
$params['creator'] = $this->user['id'];
|
||||
$params['creator_name'] = $this->user['user_name_view'];
|
||||
$ret = OrderService::OrderCancel($params);
|
||||
$this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']);
|
||||
} else {
|
||||
$this->assign('msg', L('common_unauthorized_access'));
|
||||
$this->display('/Public/TipsError');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单收货
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-30
|
||||
* @desc description
|
||||
*/
|
||||
public function Confirm()
|
||||
{
|
||||
if(IS_POST)
|
||||
{
|
||||
$params = $_POST;
|
||||
$params['user_id'] = $this->user['id'];
|
||||
$params['creator'] = $this->user['id'];
|
||||
$params['creator_name'] = $this->user['user_name_view'];
|
||||
$ret = OrderService::OrderConfirm($params);
|
||||
$this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']);
|
||||
} else {
|
||||
$this->assign('msg', L('common_unauthorized_access'));
|
||||
$this->display('/Public/TipsError');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单删除
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-30
|
||||
* @desc description
|
||||
*/
|
||||
public function Delete()
|
||||
{
|
||||
if(IS_POST)
|
||||
{
|
||||
$params = $_POST;
|
||||
$params['user_id'] = $this->user['id'];
|
||||
$params['creator'] = $this->user['id'];
|
||||
$params['creator_name'] = $this->user['user_name_view'];
|
||||
$params['user_type'] = 'user';
|
||||
$ret = OrderService::OrderDelete($params);
|
||||
$this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']);
|
||||
} else {
|
||||
$this->assign('msg', L('common_unauthorized_access'));
|
||||
$this->display('/Public/TipsError');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* 模块语言包-订单管理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return array(
|
||||
'order_payment_not_data_tips' => '没有支付方式',
|
||||
);
|
||||
?>
|
||||
|
|
@ -240,7 +240,7 @@
|
|||
<input type="hidden" name="goods_id" value="<if condition="isset($params['goods_id'])">{{$params.goods_id}}<else />0</if>" />
|
||||
<input type="hidden" name="buy_type" value="<if condition="isset($params['buy_type'])">{{$params.buy_type}}<else />goods</if>" />
|
||||
<input type="hidden" name="stock" value="<if condition="isset($params['stock'])">{{$params.stock}}<else />1</if>" />
|
||||
<input type="hidden" name="attr" value="<if condition="isset($params['attr'])">{{$params.attr}}</if>" />
|
||||
<input type="hidden" name="attr" value='<if condition="isset($params['attr'])">{{$params.attr}}</if>' />
|
||||
<input type="hidden" name="ids" value="<if condition="isset($params['ids'])">{{$params.ids}}</if>" />
|
||||
<input type="hidden" name="address_id" value="0" />
|
||||
<input type="hidden" name="express_id" value="0" />
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
<!-- content -->
|
||||
<div class="am-container user-main">
|
||||
|
||||
<!-- user menu start -->
|
||||
<include file="Public/UserMenu" />
|
||||
<!-- user menu end -->
|
||||
|
|
@ -21,90 +22,94 @@
|
|||
<!-- content start -->
|
||||
<div class="user-content">
|
||||
<div class="user-content-body">
|
||||
<form class="am-form form-validation" method="post" action="{{:U('Home/Order/Index')}}" request-type="form" novalidate="novalidate">
|
||||
<form class="am-form form-validation" method="post" action="{{:U('Home/Order/Index')}}" request-type="form">
|
||||
<div class="thin">
|
||||
<div class="am-input-group am-input-group-sm am-fl so">
|
||||
<input type="text" name="keywords" class="am-radius" placeholder="账单号或关键字" value="">
|
||||
<input type="text" name="keywords" class="am-radius" placeholder="账单号或关键字" value="<notempty name="params.keywords">{{$params.keywords}}</notempty>" />
|
||||
<span class="am-input-group-btn">
|
||||
<button class="am-btn am-btn-default am-radius" type="submit" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜索</button>
|
||||
</span>
|
||||
</div>
|
||||
<label class="am-fl thin_sub">
|
||||
更多筛选条件
|
||||
<input type="checkbox" name="so_type" value="1" class="none am-field-valid" <if condition="isset($params['so_type'])">checked</if> />
|
||||
<input type="checkbox" name="is_more" value="1" class="none am-field-valid" <if condition="isset($params['is_more'])">checked</if> />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
</label>
|
||||
</div>
|
||||
<table class="so-list <if condition="!isset($params['so_type'])">none</if>">
|
||||
<table class="so-list <if condition="!isset($params['is_more'])">none</if>">
|
||||
<tbody><tr>
|
||||
<td class="time">
|
||||
<span>时间:</span>
|
||||
<span class="am-form-group">
|
||||
<input type="text" name="time_start" class="am-form-field am-input-sm am-radius Wdate" placeholder="起始时间" value="" data-validation-message="日期格式有误" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})"><i class="am-icon-calendar"></i>
|
||||
<input type="text" name="time_start" class="am-form-field am-input-sm am-radius Wdate" placeholder="起始时间" value="<notempty name="params.time_start">{{$params.time_start}}</notempty>" data-validation-message="日期格式有误" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})" /><i class="am-icon-calendar"></i>
|
||||
</span>
|
||||
<em class="text-grey">~</em>
|
||||
<span class="am-form-group">
|
||||
<input type="text" name="time_end" class="am-form-field am-input-sm am-radius Wdate" placeholder="结束时间" value="" pattern="^[0-9]{4}-[0-9]{2}-[0-9]{2}$" data-validation-message="日期格式有误" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})"><i class="am-icon-calendar"></i>
|
||||
<input type="text" name="time_end" class="am-form-field am-input-sm am-radius Wdate" placeholder="结束时间" value="<notempty name="params.time_end">{{$params.time_end}}</notempty>" pattern="^[0-9]{4}-[0-9]{2}-[0-9]{2}$" data-validation-message="日期格式有误" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})" /><i class="am-icon-calendar"></i>
|
||||
</span>
|
||||
</td>
|
||||
<td class="price">
|
||||
<span>价格:</span>
|
||||
<span class="am-form-group">
|
||||
<input type="text" name="price_start" class="am-form-field am-input-sm am-radius" placeholder="最小价格" pattern="^([0-9]{1}\d{0,6})(\.\d{1,2})?$" data-validation-message="价格0~9之间的数字" value="">
|
||||
<input type="text" name="price_start" class="am-form-field am-input-sm am-radius" placeholder="最小价格" pattern="^([0-9]{1}\d{0,6})(\.\d{1,2})?$" data-validation-message="价格0~9之间的数字" value="<notempty name="params.price_start">{{$params.price_start}}</notempty>" />
|
||||
</span>
|
||||
<em class="text-grey">~</em>
|
||||
<span class="am-form-group">
|
||||
<input type="text" name="price_end" class="am-form-field am-input-sm am-radius" placeholder="最大价格" pattern="^([0-9]{1}\d{0,6})(\.\d{1,2})?$" data-validation-message="价格0~9之间的数字" value="">
|
||||
<input type="text" name="price_end" class="am-form-field am-input-sm am-radius" placeholder="最大价格" pattern="^([0-9]{1}\d{0,6})(\.\d{1,2})?$" data-validation-message="价格0~9之间的数字" value="<notempty name="params.price_end">{{$params.price_end}}</notempty>" />
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>支付:</span>
|
||||
<select name="pay_id" class="chosen-select">
|
||||
<option value="0" selected="">支付方式...</option>
|
||||
<option value="1">现金</option>
|
||||
<option value="2">账户余额</option>
|
||||
<option value="3">支付宝</option>
|
||||
<option value="4">会员卡消费</option>
|
||||
<option value="5">微信</option>
|
||||
<select name="payment_id" class="chosen-select" data-placeholder="支付方式...">
|
||||
<option value="-1">支付方式...</option>
|
||||
<notempty name="payment_list">
|
||||
<foreach name="payment_list" item="payment">
|
||||
<option value="{{$payment.id}}" <if condition="isset($params['payment_id']) and $params['payment_id'] eq $payment['id']">selected</if>>{{$payment.name}}</option>
|
||||
</foreach>
|
||||
</notempty>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<span>付款:</span>
|
||||
<select name="pay_state" class="chosen-select">
|
||||
<select name="pay_status" class="chosen-select" data-placeholder="付款状态...">
|
||||
<option value="-1">付款状态...</option>
|
||||
<option value="0">待支付</option>
|
||||
<option value="1">已支付</option>
|
||||
<option value="2">已退款</option>
|
||||
<notempty name="common_order_pay_status">
|
||||
<foreach name="common_order_pay_status" item="pay">
|
||||
<option value="{{$pay.id}}" <if condition="isset($params['pay_status']) and $params['pay_status'] eq $pay['id']">selected</if>>{{$pay.name}}</option>
|
||||
</foreach>
|
||||
</notempty>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>状态:</span>
|
||||
<select name="state" class="chosen-select">
|
||||
<option value="-1">账单状态...</option>
|
||||
<option value="0">未完成</option>
|
||||
<option value="1">已完成</option>
|
||||
<select name="status" class="chosen-select" data-placeholder="订单状态...">
|
||||
<option value="-1">订单状态...</option>
|
||||
<notempty name="common_order_user_status">
|
||||
<foreach name="common_order_user_status" item="status">
|
||||
<option value="{{$status.id}}" <if condition="isset($params['status']) and $params['status'] eq $status['id']">selected</if>>{{$status.name}}</option>
|
||||
</foreach>
|
||||
</notempty>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜 索</button>
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜索</button>
|
||||
<a href="{{:U('Home/Order/Index')}}">
|
||||
<button class="am-btn am-btn-warning am-radius am-btn-sm reset-submit">清除条件</button>
|
||||
<button type="button" class="am-btn am-btn-warning am-radius am-btn-sm reset-submit">清除条件</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</form>
|
||||
|
||||
|
||||
<!-- 订单抬头 -->
|
||||
<div class="am-alert am-alert-secondary meila-radius">
|
||||
<table class="w100 content-title">
|
||||
<table class="content-title">
|
||||
<tbody><tr>
|
||||
<th class="row-content">商品</th>
|
||||
<th class="row-price am-hide-sm-only">单价</th>
|
||||
|
|
@ -117,83 +122,126 @@
|
|||
</div>
|
||||
|
||||
<!-- 订单列表 -->
|
||||
<foreach name="data_list" item="order">
|
||||
<table class="data-list <if condition="$order['status'] eq 1">data-ongoing</if>">
|
||||
<tr class="content-hd">
|
||||
<td colspan="6">
|
||||
title
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<foreach name="order.items" key="keys" item="goods">
|
||||
<tr id="data-list-{{$goods.goods_id}}" data-id="{{$goods.goods_id}}" data-goods-id="{{$goods.goods_id}}">
|
||||
<td class="base row-content">
|
||||
<div class="goods-detail">
|
||||
<a href="{{$goods.goods_url}}" target="_blank">
|
||||
<img src="{{$goods.images}}">
|
||||
</a>
|
||||
<div class="goods-base">
|
||||
<a href="{{$goods.goods_url}}" target="_blank" class="goods-title">{{$goods.title}}</a>
|
||||
<notempty name="goods.attribute">
|
||||
<ul class="goods-attr">
|
||||
<foreach name="goods.attribute" item="attr">
|
||||
<li>{{$attr.attr_type_name}}:{{$attr.attr_name}}</li>
|
||||
</foreach>
|
||||
</ul>
|
||||
</notempty>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wap-base am-show-sm-only">
|
||||
<if condition="$goods['original_price'] gt 0">
|
||||
<span class="original-price">¥{{$goods.original_price}}</span>
|
||||
</if>
|
||||
<strong class="line-price">¥{{$goods.price}}</strong>
|
||||
<span class="wap-number">x{{$goods.buy_number}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="row-price am-hide-sm-only">
|
||||
<if condition="$goods['original_price'] gt 0">
|
||||
<p class="original-price">¥{{$goods.original_price}}</p>
|
||||
</if>
|
||||
<p class="line-price">¥{{$goods.price}}</p>
|
||||
</td>
|
||||
<td class="row-number am-hide-sm-only">
|
||||
x{{$goods.buy_number}}
|
||||
</td>
|
||||
<if condition="$keys eq 0">
|
||||
<td class="row-total-price" rowspan="{{$order.items_count}}">
|
||||
<strong class="total-price-content">¥{{$order.total_price}}</strong>
|
||||
<notempty name="data_list">
|
||||
<foreach name="data_list" item="order">
|
||||
<table id="data-list-{{$order.id}}" class="data-list <if condition="$order['status'] eq 1">data-ongoing</if>">
|
||||
<tr class="content-hd">
|
||||
<td colspan="6">
|
||||
<span class="am-icon-calendar-check-o"> {{:date('Y-m-d', $order['add_time'])}}</span>
|
||||
<span class="am-icon-bookmark-o"> {{$order.order_no}}</span>
|
||||
</td>
|
||||
<td class="row-status am-hide-sm-only" rowspan="{{$order.items_count}}">
|
||||
{{$order.status_name}}
|
||||
</td>
|
||||
<td class="row-operate" rowspan="{{$order.items_count}}">
|
||||
<!-- 0待确认, 1已确认/待支付, 2已支付/待发货, 3已发货/待收货, 4已完成, 5已取消, 6已关闭 -->
|
||||
<if condition="in_array($order['status'], [0,1])">
|
||||
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-cancel" data-url="{{:U('Home/Order/Cancel', ['id'=>$order['id']])}}">取消</button>
|
||||
</tr>
|
||||
<foreach name="order.items" key="keys" item="goods">
|
||||
<tr>
|
||||
<td class="base row-content">
|
||||
<div class="goods-detail">
|
||||
<a href="{{$goods.goods_url}}" target="_blank">
|
||||
<img src="{{$goods.images}}">
|
||||
</a>
|
||||
<div class="goods-base">
|
||||
<a href="{{$goods.goods_url}}" target="_blank" class="goods-title">{{$goods.title}}</a>
|
||||
<notempty name="goods.attribute">
|
||||
<ul class="goods-attr">
|
||||
<foreach name="goods.attribute" item="attr">
|
||||
<li>{{$attr.attr_type_name}}:{{$attr.attr_name}}</li>
|
||||
</foreach>
|
||||
</ul>
|
||||
</notempty>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wap-base am-show-sm-only">
|
||||
<if condition="$goods['original_price'] gt 0">
|
||||
<span class="original-price">¥{{$goods.original_price}}</span>
|
||||
</if>
|
||||
<strong class="line-price">¥{{$goods.price}}</strong>
|
||||
<span class="wap-number">x{{$goods.buy_number}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="row-price am-hide-sm-only">
|
||||
<if condition="$goods['original_price'] gt 0">
|
||||
<p class="original-price">¥{{$goods.original_price}}</p>
|
||||
</if>
|
||||
<p class="line-price">¥{{$goods.price}}</p>
|
||||
</td>
|
||||
<td class="row-number am-hide-sm-only">
|
||||
x{{$goods.buy_number}}
|
||||
</td>
|
||||
<if condition="$keys eq 0">
|
||||
<td class="row-total-price" rowspan="{{$order.items_count}}">
|
||||
<strong class="total-price-content">¥{{$order.total_price}}</strong>
|
||||
</td>
|
||||
<td class="row-status am-hide-sm-only" rowspan="{{$order.items_count}}">
|
||||
{{$order.status_name}}
|
||||
<div class="base-operate">
|
||||
<a class="block" href="{{:U('Home/Order/Detail', ['id'=>$order['id']])}}" target="_blank">订单详情</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="row-operate" rowspan="{{$order.items_count}}">
|
||||
<!-- 0待确认, 1已确认/待支付, 2已支付/待发货, 3已发货/待收货, 4已完成, 5已取消, 6已关闭 -->
|
||||
<if condition="in_array($order['status'], [0,1])">
|
||||
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-ajax submit-cancel" data-url="{{:U('Home/Order/Cancel')}}" data-id="{{$order.id}}" data-view="reload">取消</button>
|
||||
</if>
|
||||
<if condition="in_array($order['status'], [1])">
|
||||
<button class="am-btn am-btn-primary am-btn-xs am-radius am-btn-block submit-pay" data-id="{{$order.id}}" data-payment-id="{{$order.payment_id}}" data-am-modal="{target: '#order-pay-popup'}">支付</button>
|
||||
</if>
|
||||
<if condition="in_array($order['status'], [3])">
|
||||
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block submit-ajax submit-confirm" data-url="{{:U('Home/Order/Confirm')}}" data-id="{{$order.id}}" data-view="reload" data-msg="请仔细确认已收到货物、确认继续吗?">收货</button>
|
||||
</if>
|
||||
<if condition="in_array($order['status'], [4,5,6])">
|
||||
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:U('Home/Order/Delete')}}" data-id="{{$order.id}}" data-view="reload">删除</button>
|
||||
</if>
|
||||
</td>
|
||||
</if>
|
||||
<if condition="in_array($order['status'], [1])">
|
||||
<a href="{{:U('Home/Order/Pay', ['id'=>$order['id']])}}" class="am-btn am-btn-primary am-btn-xs am-radius am-btn-block submit-pay">支付</a>
|
||||
</if>
|
||||
<if condition="in_array($order['status'], [3])">
|
||||
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block submit-confirm" data-url="{{:U('Home/Order/Cancel', ['id'=>$order['id']])}}">收货</button>
|
||||
</if>
|
||||
</td>
|
||||
</if>
|
||||
<!-- <td class="total-price am-hide-sm-only">
|
||||
<strong class="total-price-content">¥{{$goods.total_price}}</strong>
|
||||
</td> -->
|
||||
</tr>
|
||||
</tr>
|
||||
</foreach>
|
||||
</table>
|
||||
</foreach>
|
||||
|
||||
</table>
|
||||
</foreach>
|
||||
|
||||
|
||||
<!-- 分页 -->
|
||||
{{$page_html}}
|
||||
</notempty>
|
||||
<empty name="data_list">
|
||||
<div class="table-no"><i class="am-icon-warning"></i> {{:L('common_not_data_tips')}}</div>
|
||||
</empty>
|
||||
|
||||
<!-- 分页 -->
|
||||
{{$page_html}}
|
||||
|
||||
<!-- 支付弹窗 -->
|
||||
<div class="am-popup am-radius" id="order-pay-popup">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title">支付</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<form class="am-form pay-form" method="post" action="{{:U('Home/Order/Pay')}}">
|
||||
<!-- 支付方式 -->
|
||||
<div class="business-item">
|
||||
<h3>选择支付</h3>
|
||||
<notempty name="buy_payment_list">
|
||||
<ul class="payment-list">
|
||||
<foreach name="buy_payment_list" item="payment">
|
||||
<li class="payment-items-{{$payment.id}}" data-value="{{$payment.id}}">
|
||||
<notempty name="payment.logo">
|
||||
<img src="{{$payment.logo}}" />
|
||||
</notempty>
|
||||
<span>{{$payment.name}}</span>
|
||||
<i class="icon-active"></i>
|
||||
</li>
|
||||
</foreach>
|
||||
</ul>
|
||||
</notempty>
|
||||
<empty name="buy_payment_list">
|
||||
<div class="table-no"><i class="am-icon-warning"></i> {{:L('order_payment_not_data_tips')}}</div>
|
||||
</empty>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" value="0" />
|
||||
<input type="hidden" name="payment_id" value="0" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">确认支付</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content end -->
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@
|
|||
<form class="am-form form-validation" method="post" action="{{:U('Home/User/Reg')}}" request-type="ajax-url" request-value="{{$referer_url}}">
|
||||
<fieldset>
|
||||
<span class="">{{:L('user_reg_there_are_accounts_text')}}</span>
|
||||
<a href="{{:U('Home/User/LoginInfo')}}" class="am-btn am-btn-secondary am-btn-xs am-radius">{{:L('user_reg_login_immediately_text')}}</a>
|
||||
<a href="{{:U('Home/User/LoginInfo')}}">
|
||||
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius">{{:L('user_reg_login_immediately_text')}}</button>
|
||||
</a>
|
||||
<hr />
|
||||
<label>{{:L('common_email_name')}}
|
||||
<if condition="in_array('sms', MyC('home_user_reg_state'))">
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@
|
|||
<form class="am-form form-validation" method="post" action="{{:U('Home/User/ForgetPwd')}}" request-type="ajax-url" request-value="{{:U('Home/User/LoginInfo')}}">
|
||||
<fieldset>
|
||||
<span class="">{{:L('user_reg_there_are_accounts_text')}}</span>
|
||||
<a href="{{:U('Home/User/LoginInfo')}}" class="am-btn am-btn-secondary am-btn-xs am-radius">{{:L('user_reg_login_immediately_text')}}</a>
|
||||
<a href="{{:U('Home/User/LoginInfo')}}">
|
||||
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius">{{:L('user_reg_login_immediately_text')}}</button>
|
||||
</a>
|
||||
<hr />
|
||||
<label>{{:L('user_login_accounts_text')}}</label>
|
||||
<div class="am-form-group">
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@
|
|||
<fieldset>
|
||||
<if condition="in_array('sms', MyC('home_user_reg_state')) or in_array('email', MyC('home_user_reg_state'))">
|
||||
<span class="">{{:L('user_login_on_accounts_text')}}</span>
|
||||
<a href="{{:U('Home/User/RegInfo')}}" class="am-btn am-btn-secondary am-btn-xs am-radius">{{:L('user_login_immediately_reg_text')}}</a>
|
||||
<a href="{{:U('Home/User/RegInfo')}}">
|
||||
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius">{{:L('user_login_immediately_reg_text')}}</button>
|
||||
</a>
|
||||
<hr />
|
||||
</if>
|
||||
<label>{{:L('user_login_accounts_text')}}</label>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@
|
|||
<fieldset>
|
||||
<if condition="in_array('sms', MyC('home_user_reg_state')) or in_array('email', MyC('home_user_reg_state'))">
|
||||
<span class="">{{:L('user_login_on_accounts_text')}}</span>
|
||||
<a href="{{:U('Home/User/RegInfo')}}" target="_blank" class="am-btn am-btn-secondary am-btn-xs am-radius">{{:L('user_login_immediately_reg_text')}}</a>
|
||||
<a href="{{:U('Home/User/RegInfo')}}" target="_blank">
|
||||
<button class="am-btn am-btn-secondary am-btn-xs am-radius">{{:L('user_login_immediately_reg_text')}}</button>
|
||||
</a>
|
||||
<hr />
|
||||
</if>
|
||||
<label>{{:L('user_login_accounts_text')}}</label>
|
||||
|
|
|
|||
|
|
@ -17,14 +17,18 @@
|
|||
<div class="am-u-md-6 am-u-sm-centered">
|
||||
<div class="reg-switch-view">
|
||||
<if condition="in_array('sms', MyC('home_user_reg_state'))">
|
||||
<a class="am-btn am-btn-danger" href="{{:U('Home/User/SmsRegInfo')}}"><i class="am-icon-comment-o am-icon-sm"></i> {{:L('common_close_sms_user_reg_text')}}</a>
|
||||
<a href="{{:U('Home/User/SmsRegInfo')}}">
|
||||
<button class="am-btn am-btn-primary"><i class="am-icon-comment-o am-icon-sm"></i> {{:L('common_close_sms_user_reg_text')}}</button>
|
||||
</a>
|
||||
<else />
|
||||
<a class="am-btn am-btn-danger am-disabled" href="javascript:;"><i class="am-icon-comment-o am-icon-sm"></i> {{:L('common_close_sms_user_reg_tips')}}</a>
|
||||
<button class="am-btn am-btn-danger am-disabled" href="javascript:;"><i class="am-icon-comment-o am-icon-sm"></i> {{:L('common_close_sms_user_reg_tips')}}</button>
|
||||
</if>
|
||||
<if condition="in_array('email', MyC('home_user_reg_state'))">
|
||||
<a class="am-btn am-btn-secondary" href="{{:U('Home/User/EmailRegInfo')}}"><i class="am-icon-envelope-o am-icon-sm"></i> {{:L('common_close_email_user_reg_text')}}</a>
|
||||
<a href="{{:U('Home/User/EmailRegInfo')}}">
|
||||
<button class="am-btn am-btn-secondary"><i class="am-icon-envelope-o am-icon-sm"></i> {{:L('common_close_email_user_reg_text')}}</button>
|
||||
</a>
|
||||
<else />
|
||||
<a class="am-btn am-btn-danger am-disabled" href="javascript:;"><i class="am-icon-envelope-o am-icon-sm"></i> {{:L('common_close_email_user_reg_tips')}}</a>
|
||||
<button class="am-btn am-btn-danger am-disabled" href="javascript:;"><i class="am-icon-envelope-o am-icon-sm"></i> {{:L('common_close_email_user_reg_tips')}}</button>
|
||||
</if>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@
|
|||
<form class="am-form form-validation" method="post" action="{{:U('Home/User/Reg')}}" request-type="ajax-url" request-value="{{$referer_url}}">
|
||||
<fieldset>
|
||||
<span class="">{{:L('user_reg_there_are_accounts_text')}}</span>
|
||||
<a href="{{:U('Home/User/LoginInfo')}}" class="am-btn am-btn-secondary am-btn-xs am-radius">{{:L('user_reg_login_immediately_text')}}</a>
|
||||
<a href="{{:U('Home/User/LoginInfo')}}">
|
||||
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius">{{:L('user_reg_login_immediately_text')}}</button>
|
||||
</a>
|
||||
<hr />
|
||||
<label>{{:L('common_mobile_name')}}
|
||||
<if condition="in_array('email', MyC('home_user_reg_state'))">
|
||||
|
|
|
|||
|
|
@ -84,13 +84,33 @@ class Page
|
|||
*/
|
||||
public function GetPageHtml()
|
||||
{
|
||||
$this->html .= '<ul class="am-pagination am-pagination-centered"><li';
|
||||
$this->html .= ($this->page > 1) ? '' : ' class="am-disabled"';
|
||||
$this->html .= '><a href="'.$this->url.$this->page_start_tag.'page='.($this->page-1).'" class="am-radius">«</a></li>';
|
||||
$before_disabled .= ($this->page > 1) ? '' : ' class="am-disabled"';
|
||||
$after_disabled = ($this->page > 0 && $this->page < $this->page_total) ? '' : ' class="am-disabled"';
|
||||
|
||||
$this->html .= '<ul class="am-pagination am-pagination-centered">';
|
||||
$this->html .= '<li '.$before_disabled.'>';
|
||||
$this->html .= '<a href="'.$this->url.$this->page_start_tag.'page=1" class="am-radius am-icon-angle-double-left"></a>';
|
||||
$this->html .= '</li>';
|
||||
|
||||
$this->html .= '<li '.$before_disabled.'>';
|
||||
$this->html .= '<a href="'.$this->url.$this->page_start_tag.'page='.($this->page-1).'" class="am-radius am-icon-angle-left"></a>';
|
||||
$this->html .= '</li>';
|
||||
|
||||
$this->html .= $this->GetButtonNumberHtml();
|
||||
$this->html .= '<li';
|
||||
$this->html .= ($this->page > 0 && $this->page < $this->page_total) ? '' : ' class="am-disabled"';
|
||||
$this->html .= '><a href="'.$this->url.$this->page_start_tag.'page='.($this->page+1).'" class="am-radius">»</a></li></ul>';
|
||||
|
||||
$this->html .= '<li '.$after_disabled.'>';
|
||||
$this->html .= '<a href="'.$this->url.$this->page_start_tag.'page='.($this->page+1).'" class="am-radius am-icon-angle-right"></a>';
|
||||
$this->html .= '</li>';
|
||||
|
||||
$this->html .= '<li '.$after_disabled.'>';
|
||||
$this->html .= '<a href="'.$this->url.$this->page_start_tag.'page='.$this->page_total.'" class="am-radius am-icon-angle-double-right"></a>';
|
||||
$this->html .= '</li>';
|
||||
|
||||
$this->html .= '<div>';
|
||||
$this->html .= '<span>共 '.$this->total.' 条数据</span>';
|
||||
$this->html .= ' <span>共 '.$this->page_total.' 页</span>';
|
||||
$this->html .= '</div>';
|
||||
$this->html .= '</ul>';
|
||||
|
||||
return $this->html;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -243,11 +243,11 @@ class Alipay
|
|||
'format' => 'xml',
|
||||
'v' => '2.0',
|
||||
'partner' => $this->config['partner'],
|
||||
'req_id' => $params['order_sn'],
|
||||
'req_id' => $params['order_no'],
|
||||
'sec_id' => 'MD5',
|
||||
'req_data' => $this->GetReqData($params),
|
||||
'subject' => $params['name'],
|
||||
'out_trade_no' => $params['order_sn'],
|
||||
'out_trade_no' => $params['order_no'],
|
||||
'total_fee' => $params['total_price'],
|
||||
'seller_account_name' => $this->config['account'],
|
||||
'call_back_url' => $params['call_back_url'],
|
||||
|
|
@ -296,7 +296,7 @@ class Alipay
|
|||
{
|
||||
return '<direct_trade_create_req>
|
||||
<subject>'.$params['name'].'</subject>
|
||||
<out_trade_no>'.$params['order_sn'].'</out_trade_no>
|
||||
<out_trade_no>'.$params['order_no'].'</out_trade_no>
|
||||
<total_fee>'.$params['total_price'].'</total_fee>
|
||||
<seller_account_name>'.$this->config['account'].'</seller_account_name>
|
||||
<call_back_url>'.$params['call_back_url'].'</call_back_url>
|
||||
|
|
@ -327,7 +327,7 @@ class Alipay
|
|||
|
||||
/* 业务参数 */
|
||||
'subject' => $params['name'],
|
||||
'out_trade_no' => $params['order_sn'],
|
||||
'out_trade_no' => $params['order_no'],
|
||||
'price' => $params['total_price'],
|
||||
|
||||
'quantity' => 1,
|
||||
|
|
|
|||
|
|
@ -568,6 +568,7 @@ class BuyService
|
|||
|
||||
// 订单写入
|
||||
$order = [
|
||||
'order_no' => date('YmdHis').GetNumberCode(6),
|
||||
'user_id' => $params['user']['id'],
|
||||
'shop_id' => $shop_id,
|
||||
'receive_address_id' => $address['data']['id'],
|
||||
|
|
@ -603,7 +604,7 @@ class BuyService
|
|||
'order_id' => $order_id,
|
||||
'user_id' => $params['user']['id'],
|
||||
'shop_id' => $shop_id,
|
||||
'goods_id' => $v['id'],
|
||||
'goods_id' => $v['goods_id'],
|
||||
'title' => $v['title'],
|
||||
'images' => $v['images_old'],
|
||||
'original_price' => $v['original_price'],
|
||||
|
|
|
|||
|
|
@ -46,23 +46,24 @@ class OrderService
|
|||
|
||||
// 获取订单信息
|
||||
$where = ['id'=>intval($params['id']), 'user_id' => $params['user']['id']];
|
||||
$data = M('Order')->where($where)->field('id,status,total_price,payment_id')->find();
|
||||
if(empty($data))
|
||||
$order = M('Order')->where($where)->field('id,order_no,status,total_price,payment_id')->find();
|
||||
if(empty($order))
|
||||
{
|
||||
return DataReturn(L('common_data_no_exist_error'), -1);
|
||||
}
|
||||
if($data['total_price'] <= 0.00)
|
||||
if($order['total_price'] <= 0.00)
|
||||
{
|
||||
return DataReturn('金额不能为0', -1);
|
||||
}
|
||||
if($data['status'] != 1)
|
||||
if($order['status'] != 1)
|
||||
{
|
||||
$status_text = L('common_order_user_status')[$data['status']]['name'];
|
||||
$status_text = L('common_order_user_status')[$order['status']]['name'];
|
||||
return DataReturn('状态不可操作['.$status_text.']', -1);
|
||||
}
|
||||
|
||||
// 支付方式
|
||||
$payment = ResourcesService::PaymentList(['where'=>['id'=>$data['payment_id']]]);
|
||||
$payment_id = empty($params['payment_id']) ? $order['payment_id'] : intval($params['payment_id']);
|
||||
$payment = ResourcesService::PaymentList(['where'=>['id'=>$payment_id]]);
|
||||
if(empty($payment[0]))
|
||||
{
|
||||
return DataReturn('支付方式有误', -1);
|
||||
|
|
@ -72,9 +73,9 @@ class OrderService
|
|||
$url = __MY_URL__.'payment_order_'.strtolower($payment[0]['payment']);
|
||||
$pay_data = array(
|
||||
'out_user' => md5($params['user']['id']),
|
||||
'order_sn' => date('YmdHis').$data['id'],
|
||||
'order_no' => $order['order_no'],
|
||||
'name' => '订单支付',
|
||||
'total_price' => $data['total_price'],
|
||||
'total_price' => $order['total_price'],
|
||||
'notify_url' => $url.'_notify.php',
|
||||
'call_back_url' => $url.'_respond.php',
|
||||
);
|
||||
|
|
@ -82,8 +83,6 @@ class OrderService
|
|||
$ret = (new $pay_name($payment[0]['config']))->Pay($pay_data);
|
||||
if(isset($ret['code']) && $ret['code'] == 0)
|
||||
{
|
||||
// 存储session订单id
|
||||
$_SESSION['payment_order_id'] = $data['id'];
|
||||
return $ret;
|
||||
}
|
||||
return DataReturn('支付接口异常', -1);
|
||||
|
|
@ -154,16 +153,15 @@ class OrderService
|
|||
|
||||
// 获取订单信息
|
||||
$m = M('Order');
|
||||
$where = ['id'=>self::OutTradeNoParsing($ret['data']['out_trade_no'])];
|
||||
$data = $m->where($where)->field('id,status,total_price,payment_id,user_id,shop_id')->find();
|
||||
file_put_contents('/data/www/project/shopxo/service/dddddd.txt', json_encode($data));
|
||||
if(empty($data))
|
||||
$where = ['order_no'=>$ret['data']['out_trade_no'], 'is_delete_time'=>0, 'user_is_delete_time'=>0];
|
||||
$order = $m->where($where)->field('id,status,total_price,payment_id,user_id,shop_id')->find();
|
||||
if(empty($order))
|
||||
{
|
||||
return DataReturn(L('common_data_no_exist_error'), -1);
|
||||
}
|
||||
if($data['status'] > 1)
|
||||
if($order['status'] > 1)
|
||||
{
|
||||
$status_text = L('common_order_user_status')[$data['status']]['name'];
|
||||
$status_text = L('common_order_user_status')[$order['status']]['name'];
|
||||
return DataReturn('状态不可操作['.$status_text.']', 0);
|
||||
}
|
||||
|
||||
|
|
@ -173,61 +171,54 @@ class OrderService
|
|||
|
||||
// 写入支付日志
|
||||
$pay_log_data = [
|
||||
'user_id' => $data['user_id'],
|
||||
'order_id' => $data['id'],
|
||||
'user_id' => $order['user_id'],
|
||||
'order_id' => $order['id'],
|
||||
'trade_no' => $ret['data']['trade_no'],
|
||||
'user' => $buyer_email,
|
||||
'total_fee' => $total_amount,
|
||||
'amount' => $data['total_price'],
|
||||
'amount' => $order['total_price'],
|
||||
'subject' => $ret['data']['subject'],
|
||||
'pay_type' => 0,
|
||||
'payment' => PAYMENT_TYPE,
|
||||
'payment_name' => $payment[0]['name'],
|
||||
'business_type' => 0,
|
||||
'add_time' => time(),
|
||||
];
|
||||
M('PayLog')->add($pay_log_data);
|
||||
|
||||
// 消息通知
|
||||
$detail = '订单支付成功,金额'.PriceBeautify($data['total_price']).'元';
|
||||
CommonMessageAdd('订单支付', $detail, $data['user_id']);
|
||||
$detail = '订单支付成功,金额'.PriceBeautify($order['total_price']).'元';
|
||||
ResourcesService::MessageAdd($order['user_id'], '订单支付', $detail, 1, $order['id']);
|
||||
|
||||
// 开启事务
|
||||
$m->startTrans();
|
||||
|
||||
// 更新订单状态
|
||||
$upd_data = array(
|
||||
'status' => 2,
|
||||
'pay_status'=> 1,
|
||||
'pay_price' => $total_amount,
|
||||
'pay_time' => time(),
|
||||
'upd_time' => time(),
|
||||
'status' => 2,
|
||||
'pay_status' => 1,
|
||||
'pay_price' => $total_amount,
|
||||
'payment_id' => $payment['id'],
|
||||
'pay_time' => time(),
|
||||
'upd_time' => time(),
|
||||
);
|
||||
if($m->where(['id'=>$data['id']])->save($upd_data))
|
||||
if($m->where(['id'=>$order['id']])->save($upd_data))
|
||||
{
|
||||
// 提交事务
|
||||
$m->commit();
|
||||
// 添加状态日志
|
||||
if(self::OrderHistoryAdd($order['id'], 2, $order['status'], '支付', 0, '系统'))
|
||||
{
|
||||
// 提交事务
|
||||
$m->commit();
|
||||
|
||||
// 成功
|
||||
return DataReturn('处理成功', 0);
|
||||
// 成功
|
||||
return DataReturn('处理成功', 0);
|
||||
}
|
||||
}
|
||||
|
||||
// 事务回滚
|
||||
$m->rollback();
|
||||
|
||||
// 处理失败
|
||||
return DataReturn('处理失败222', -100);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单号解析
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-28
|
||||
* @desc description
|
||||
* @param [string] $out_trade_no [支付回传订单号]
|
||||
*/
|
||||
public static function OutTradeNoParsing($out_trade_no)
|
||||
{
|
||||
return substr($out_trade_no, 14);
|
||||
return DataReturn('处理失败', -100);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -242,7 +233,8 @@ class OrderService
|
|||
public static function HomeOrderListWhere($params = [])
|
||||
{
|
||||
$where = [
|
||||
'is_delete_time' => 0,
|
||||
'is_delete_time' => 0,
|
||||
'user_is_delete_time' => 0,
|
||||
];
|
||||
|
||||
// 用户id
|
||||
|
|
@ -251,6 +243,55 @@ class OrderService
|
|||
$where['user_id'] = $params['user']['id'];
|
||||
}
|
||||
|
||||
if(!empty($params['keywords']))
|
||||
{
|
||||
$like_keywords = array('like', '%'.I('keywords').'%');
|
||||
$where[] = [
|
||||
'order_no' => $like_keywords,
|
||||
'receive_name' => $like_keywords,
|
||||
'receive_tel' => $like_keywords,
|
||||
'_logic' => 'or',
|
||||
];
|
||||
}
|
||||
|
||||
// 是否更多条件
|
||||
if(I('is_more', 0) == 1)
|
||||
{
|
||||
// 等值
|
||||
if(I('payment_id', -1) > -1)
|
||||
{
|
||||
$where['payment_id'] = intval(I('payment_id', 0));
|
||||
}
|
||||
if(I('pay_status', -1) > -1)
|
||||
{
|
||||
$where['pay_status'] = intval(I('pay_status', 0));
|
||||
}
|
||||
if(I('status', -1) > -1)
|
||||
{
|
||||
$where['status'] = intval(I('status', 0));
|
||||
}
|
||||
|
||||
// 时间
|
||||
if(!empty($_REQUEST['time_start']))
|
||||
{
|
||||
$where['add_time'][] = array('gt', strtotime(I('time_start')));
|
||||
}
|
||||
if(!empty($_REQUEST['time_end']))
|
||||
{
|
||||
$where['add_time'][] = array('lt', strtotime(I('time_end')));
|
||||
}
|
||||
|
||||
// 价格
|
||||
if(!empty($_REQUEST['price_start']))
|
||||
{
|
||||
$where['price'][] = array('gt', floatval(I('price_start')));
|
||||
}
|
||||
if(!empty($_REQUEST['price_end']))
|
||||
{
|
||||
$where['price'][] = array('lt', floatval(I('price_end')));
|
||||
}
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
|
||||
|
|
@ -319,11 +360,11 @@ class OrderService
|
|||
$detail_m = M('OrderDetail');
|
||||
$detail_field = 'id,goods_id,title,images,original_price,price,attribute,buy_number';
|
||||
$images_host = C('IMAGE_HOST');
|
||||
$total_price = 0;
|
||||
$order_status_list = L('common_order_user_status');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 订单基础
|
||||
$total_price = 0;
|
||||
$v['status_name'] = $order_status_list[$v['status']]['name'];
|
||||
$v['payment_name'] = '';
|
||||
|
||||
|
|
@ -346,5 +387,245 @@ class OrderService
|
|||
}
|
||||
return DataReturn('处理成功', 0, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单日志添加
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-30
|
||||
* @desc description
|
||||
* @param [int] $order_id [订单id]
|
||||
* @param [int] $new_status [更新后的状态]
|
||||
* @param [int] $original_status [原始状态]
|
||||
* @param [string] $msg [描述]
|
||||
* @param [int] $creator [操作人]
|
||||
* @param [string] $creator_name [操作人名称]
|
||||
* @return [boolean] [成功 true, 失败 false]
|
||||
*/
|
||||
public static function OrderHistoryAdd($order_id, $new_status, $original_status, $msg = '', $creator = 0, $creator_name = '')
|
||||
{
|
||||
// 状态描述
|
||||
$order_status_list = L('common_order_user_status');
|
||||
$original_status_name = $order_status_list[$original_status]['name'];
|
||||
$new_status_name = $order_status_list[$new_status]['name'];
|
||||
$msg .= '['.$original_status_name.'-'.$new_status_name.']';
|
||||
|
||||
// 添加
|
||||
$data = [
|
||||
'order_id' => intval($order_id),
|
||||
'new_status' => intval($new_status),
|
||||
'original_status' => intval($original_status),
|
||||
'msg' => htmlentities($msg),
|
||||
'creator' => intval($creator),
|
||||
'creator_name' => htmlentities($creator_name),
|
||||
'add_time' => time(),
|
||||
];
|
||||
return M('OrderStatusHistory')->add($data) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单取消
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-30
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function OrderCancel($params = [])
|
||||
{
|
||||
// 请求参数
|
||||
$p = [
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'id',
|
||||
'error_msg' => '订单id有误',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'user_id',
|
||||
'error_msg' => '用户id有误',
|
||||
],
|
||||
];
|
||||
$ret = params_checked($params, $p);
|
||||
if($ret !== true)
|
||||
{
|
||||
return DataReturn($ret, -1);
|
||||
}
|
||||
|
||||
// 获取订单信息
|
||||
$m = M('Order');
|
||||
$where = ['id'=>intval($params['id']), 'user_id'=>$params['user_id'], 'is_delete_time'=>0, 'user_is_delete_time'=>0];
|
||||
$order = $m->where($where)->field('id,status,user_id')->find();
|
||||
if(empty($order))
|
||||
{
|
||||
return DataReturn(L('common_data_no_exist_error'), -1);
|
||||
}
|
||||
if(!in_array($order['status'], [0,1]))
|
||||
{
|
||||
$status_text = L('common_order_user_status')[$order['status']]['name'];
|
||||
return DataReturn('状态不可操作['.$status_text.']', -1);
|
||||
}
|
||||
|
||||
$data = [
|
||||
'status' => 5,
|
||||
'upd_time' => time(),
|
||||
];
|
||||
if($m->where($where)->save($data))
|
||||
{
|
||||
// 用户消息
|
||||
ResourcesService::MessageAdd($order['user_id'], '订单取消', '订单取消成功', 1, $order['id']);
|
||||
|
||||
// 订单状态日志
|
||||
$creator = isset($params['creator']) ? intval($params['creator']) : 0;
|
||||
$creator_name = isset($params['creator_name']) ? htmlentities($params['creator_name']) : '';
|
||||
self::OrderHistoryAdd($order['id'], $data['status'], $order['status'], '取消', $creator, $creator_name);
|
||||
return DataReturn(L('common_cancel_success'), 0);
|
||||
}
|
||||
return DataReturn(L('common_cancel_error'), -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单收货
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-30
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function OrderConfirm($params = [])
|
||||
{
|
||||
// 请求参数
|
||||
$p = [
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'id',
|
||||
'error_msg' => '订单id有误',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'user_id',
|
||||
'error_msg' => '用户id有误',
|
||||
],
|
||||
];
|
||||
$ret = params_checked($params, $p);
|
||||
if($ret !== true)
|
||||
{
|
||||
return DataReturn($ret, -1);
|
||||
}
|
||||
|
||||
// 获取订单信息
|
||||
$m = M('Order');
|
||||
$where = ['id'=>intval($params['id']), 'user_id'=>$params['user_id'], 'is_delete_time'=>0, 'user_is_delete_time'=>0];
|
||||
$order = $m->where($where)->field('id,status,user_id')->find();
|
||||
if(empty($order))
|
||||
{
|
||||
return DataReturn(L('common_data_no_exist_error'), -1);
|
||||
}
|
||||
if(!in_array($order['status'], [3]))
|
||||
{
|
||||
$status_text = L('common_order_user_status')[$order['status']]['name'];
|
||||
return DataReturn('状态不可操作['.$status_text.']', -1);
|
||||
}
|
||||
|
||||
$data = [
|
||||
'status' => 4,
|
||||
'upd_time' => time(),
|
||||
];
|
||||
if($m->where($where)->save($data))
|
||||
{
|
||||
// 用户消息
|
||||
ResourcesService::MessageAdd($order['user_id'], '订单收货', '订单收货成功', 1, $order['id']);
|
||||
|
||||
// 订单状态日志
|
||||
$creator = isset($params['creator']) ? intval($params['creator']) : 0;
|
||||
$creator_name = isset($params['creator_name']) ? htmlentities($params['creator_name']) : '';
|
||||
self::OrderHistoryAdd($order['id'], $data['status'], $order['status'], '收货', $creator, $creator_name);
|
||||
return DataReturn(L('common_operation_collect_success'), 0);
|
||||
}
|
||||
return DataReturn(L('common_operation_collect_error'), -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单删除
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-30
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function OrderDelete($params = [])
|
||||
{
|
||||
// 请求参数
|
||||
$p = [
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'id',
|
||||
'error_msg' => '订单id有误',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'user_id',
|
||||
'error_msg' => '用户id有误',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'user_type',
|
||||
'error_msg' => '用户类型有误',
|
||||
],
|
||||
];
|
||||
$ret = params_checked($params, $p);
|
||||
if($ret !== true)
|
||||
{
|
||||
return DataReturn($ret, -1);
|
||||
}
|
||||
|
||||
// 用户类型
|
||||
switch($params['user_type'])
|
||||
{
|
||||
case 'admin' :
|
||||
$delete_field = 'is_delete_time';
|
||||
break;
|
||||
|
||||
case 'user' :
|
||||
$delete_field = 'user_is_delete_time';
|
||||
break;
|
||||
}
|
||||
if(empty($delete_field))
|
||||
{
|
||||
return DataReturn('用户类型有误['.$params['user_type'].']', -2);
|
||||
}
|
||||
|
||||
// 获取订单信息
|
||||
$m = M('Order');
|
||||
$where = ['id'=>intval($params['id']), 'user_id'=>$params['user_id'], 'is_delete_time'=>0, 'user_is_delete_time'=>0];
|
||||
$order = $m->where($where)->field('id,status,user_id')->find();
|
||||
if(empty($order))
|
||||
{
|
||||
return DataReturn(L('common_data_no_exist_error'), -1);
|
||||
}
|
||||
if(!in_array($order['status'], [4,5,6]))
|
||||
{
|
||||
$status_text = L('common_order_user_status')[$order['status']]['name'];
|
||||
return DataReturn('状态不可操作['.$status_text.']', -1);
|
||||
}
|
||||
|
||||
$data = [
|
||||
$delete_field => time(),
|
||||
'upd_time' => time(),
|
||||
];
|
||||
if($m->where($where)->save($data))
|
||||
{
|
||||
// 用户消息
|
||||
ResourcesService::MessageAdd($order['user_id'], '订单删除', '订单删除成功', 1, $order['id']);
|
||||
|
||||
return DataReturn(L('common_operation_delete_success'), 0);
|
||||
}
|
||||
return DataReturn(L('common_operation_delete_error'), -1);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
@ -145,5 +145,34 @@ class ResourcesService
|
|||
|
||||
return M('Region')->where($where)->field($field)->order('id asc, sort asc')->select();
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息添加
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-21
|
||||
* @desc description
|
||||
* @param [int] $user_id [用户id]
|
||||
* @param [string] $title [标题]
|
||||
* @param [string] $detail [内容]
|
||||
* @param [int] $business_type [业务类型(0默认, 1订单, ...)]
|
||||
* @param [int] $business_id [业务id]
|
||||
* @param [int] $type [类型(默认0 普通消息)]
|
||||
* @return [boolean] [成功true, 失败false]
|
||||
*/
|
||||
public static function MessageAdd($user_id, $title, $detail, $business_type = 0, $business_id = 0, $type = 0)
|
||||
{
|
||||
$data = array(
|
||||
'title' => $title,
|
||||
'detail' => $detail,
|
||||
'user_id' => intval($user_id),
|
||||
'business_type' => intval($business_type),
|
||||
'business_id' => intval($business_id),
|
||||
'type' => intval($type),
|
||||
'add_time' => time(),
|
||||
);
|
||||
return M('Message')->add($data) > 0;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -761,7 +761,7 @@ function ConfirmNetworkAjax(e)
|
|||
var url = e.data('url');
|
||||
var view = e.data('view') || '';
|
||||
var title = e.data('title') || '温馨提示';
|
||||
var msg = e.data('msg') || '操作后不可恢复、确认操作吗?';
|
||||
var msg = e.data('msg') || '操作后不可恢复、确认继续吗?';
|
||||
|
||||
AMUI.dialog.confirm({
|
||||
title: title,
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ color: #FFF;}
|
|||
.new-addr-bar {padding: 0px 5px;vertical-align: top;}
|
||||
.address-default { display:block !important;}
|
||||
|
||||
/*物流*/
|
||||
.business-item ul li { border:1px solid transparent ;overflow: hidden; }
|
||||
/* 物流/支付 */
|
||||
.business-item ul li { border:1px solid transparent ;overflow: hidden; float: left; cursor: pointer; padding: 5px; border: 1px solid #eee; margin: 0 10px 10px 0; }
|
||||
ul.logistics-list li.selected, ul.payment-list li.selected {border-color:#d2364c ;position:relative ;}
|
||||
ul.logistics-list li.selected i.icon-active, ul.payment-list li.selected i.icon-active {
|
||||
position: absolute;
|
||||
|
|
@ -28,9 +28,7 @@ ul.logistics-list li.selected i.icon-active, ul.payment-list li.selected i.icon-
|
|||
background: url(../Images/sys_item_selected.gif) no-repeat right bottom;
|
||||
}
|
||||
.business-item ul { padding: 10px 3px 5px 5px;}
|
||||
.business-item ul li { float: left; cursor: pointer; padding: 5px; border: 1px solid #eee; }
|
||||
ul.logistics-list li img, ul.payment-list li img { width: 36px; height: 36px; }
|
||||
.business-item ul li { margin: 0 10px 10px 0; }
|
||||
|
||||
/*运费、留言*/
|
||||
.buy-message{padding:0px 5px}
|
||||
|
|
|
|||
|
|
@ -535,45 +535,45 @@ background:url(../Images/ibar_sprites.png) no-repeat;background-position:0px -23
|
|||
}
|
||||
|
||||
.am-btn-secondary {
|
||||
color: #74C0E6;
|
||||
background-color: #D1EDFB;
|
||||
border-color: #D1EDFB;
|
||||
color: #f77076;
|
||||
background-color: #ffe2e5;
|
||||
border-color: #ffe2e5;
|
||||
}
|
||||
.am-btn-secondary:hover, .am-btn-secondary:focus {
|
||||
background-color: #bce9ff;
|
||||
background-color: #fd9ba5;
|
||||
}
|
||||
.am-btn-secondary:hover, .am-btn-secondary:focus, .am-btn-secondary:active, .am-btn-secondary.am-active, .am-dropdown.am-active .am-btn-secondary.am-dropdown-toggle {
|
||||
color: #fff;
|
||||
border-color: #bce9ff;
|
||||
border-color: #fd9ba5;
|
||||
}
|
||||
.am-btn-secondary.am-disabled, .am-btn-secondary[disabled], fieldset[disabled] .am-btn-secondary, .am-btn-secondary.am-disabled:hover, .am-btn-secondary[disabled]:hover, fieldset[disabled] .am-btn-secondary:hover, .am-btn-secondary.am-disabled:focus, .am-btn-secondary[disabled]:focus, fieldset[disabled] .am-btn-secondary:focus, .am-btn-secondary.am-disabled:active, .am-btn-secondary[disabled]:active, fieldset[disabled] .am-btn-secondary:active, .am-btn-secondary.am-disabled.am-active, .am-btn-secondary[disabled].am-active, fieldset[disabled] .am-btn-secondary.am-active {
|
||||
background-color: #D1EDFB;
|
||||
border-color: #D1EDFB;
|
||||
background-color: #ffe2e5;
|
||||
border-color: #ffe2e5;
|
||||
}
|
||||
.am-btn-secondary:active, .am-btn-secondary.am-active, .am-dropdown.am-active .am-btn-secondary.am-dropdown-toggle {
|
||||
background-image: none;
|
||||
background-color: #bce9ff;
|
||||
background-color: #fd9ba5;
|
||||
}
|
||||
|
||||
.am-btn-primary {
|
||||
color: #31a8e5;
|
||||
background-color: #b3e5ff;
|
||||
border-color: #b3e5ff;
|
||||
color: #d13b49;
|
||||
background-color: #ffcbd0;
|
||||
border-color: #ffcbd0;
|
||||
}
|
||||
.am-btn-primary:hover, .am-btn-primary:focus {
|
||||
background-color: #93daff;
|
||||
background-color: #f77682;
|
||||
}
|
||||
.am-btn-primary:hover, .am-btn-primary:focus, .am-btn-primary:active, .am-btn-primary.am-active, .am-dropdown.am-active .am-btn-primary.am-dropdown-toggle {
|
||||
color: #fff;
|
||||
border-color: #93daff;
|
||||
border-color: #f77682;
|
||||
}
|
||||
.am-btn-primary.am-disabled, .am-btn-primary[disabled], fieldset[disabled] .am-btn-primary, .am-btn-primary.am-disabled:hover, .am-btn-primary[disabled]:hover, fieldset[disabled] .am-btn-primary:hover, .am-btn-primary.am-disabled:focus, .am-btn-primary[disabled]:focus, fieldset[disabled] .am-btn-primary:focus, .am-btn-primary.am-disabled:active, .am-btn-primary[disabled]:active, fieldset[disabled] .am-btn-primary:active, .am-btn-primary.am-disabled.am-active, .am-btn-primary[disabled].am-active, fieldset[disabled] .am-btn-primary.am-active {
|
||||
background-color: #b3e5ff;
|
||||
border-color: #b3e5ff;
|
||||
background-color: #ffcbd0;
|
||||
border-color: #ffcbd0;
|
||||
}
|
||||
.am-btn-primary:active, .am-btn-primary.am-active, .am-dropdown.am-active .am-btn-primary.am-dropdown-toggle {
|
||||
background-image: none;
|
||||
background-color: #93daff;
|
||||
background-color: #f77682;
|
||||
}
|
||||
|
||||
.am-btn-danger {
|
||||
|
|
@ -619,27 +619,28 @@ background:url(../Images/ibar_sprites.png) no-repeat;background-position:0px -23
|
|||
}
|
||||
|
||||
.am-btn-warning {
|
||||
color: #E8BA88;
|
||||
background-color: #FBF1E9;
|
||||
border-color: #FBF1E9;
|
||||
color: #FF9800;
|
||||
background-color: #ffe5be;
|
||||
border-color: #ffe5be;
|
||||
}
|
||||
.am-btn-warning:hover, .am-btn-warning:focus {
|
||||
background-color: #FBDBC3;
|
||||
background-color: #ffc165;
|
||||
}
|
||||
.am-btn-warning:hover, .am-btn-warning:focus, .am-btn-warning:active, .am-btn-warning.am-active, .am-dropdown.am-active .am-btn-warning.am-dropdown-toggle {
|
||||
color: #fff;
|
||||
border-color: #FBDBC3;
|
||||
border-color: #ffc165;
|
||||
}
|
||||
.am-btn-warning.am-disabled, .am-btn-warning[disabled], fieldset[disabled] .am-btn-warning, .am-btn-warning.am-disabled:hover, .am-btn-warning[disabled]:hover, fieldset[disabled] .am-btn-warning:hover, .am-btn-warning.am-disabled:focus, .am-btn-warning[disabled]:focus, fieldset[disabled] .am-btn-warning:focus, .am-btn-warning.am-disabled:active, .am-btn-warning[disabled]:active, fieldset[disabled] .am-btn-warning:active, .am-btn-warning.am-disabled.am-active, .am-btn-warning[disabled].am-active, fieldset[disabled] .am-btn-warning.am-active {
|
||||
background-color: #FBF1E9;
|
||||
border-color: #FBF1E9;
|
||||
background-color: #ffe5be;
|
||||
border-color: #ffe5be;
|
||||
}
|
||||
.am-btn-warning:active, .am-btn-warning.am-active, .am-dropdown.am-active .am-btn-warning.am-dropdown-toggle {
|
||||
background-image: none;
|
||||
background-color: #FBDBC3;
|
||||
background-color: #ffc165;
|
||||
}
|
||||
|
||||
.am-popup-hd .am-popup-title { font-size: 18px; }
|
||||
.am-pagination > .am-active > a, .am-pagination > .am-active > a:hover { background-color: #d13b49; border-color: #d13b49; }
|
||||
.am-popup-bd { padding: 5px; background: none; }
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
.thin_sub { font-weight:100; margin:10px 0px 0px 10px; cursor: pointer; }
|
||||
.so-list { width:100%; margin-top: 20px; }
|
||||
.so-list * { font-size:1.2rem !important; }
|
||||
.so-list span { color:#666; }
|
||||
.so-list input { height:28px; display:inline !important; }
|
||||
.time input, .so-list .chosen-container { background:#FFF !important; }
|
||||
.time input { width:100px !important; }
|
||||
|
|
@ -53,33 +52,37 @@ table.data-list { margin-top: 10px; }
|
|||
table.data-list-success, table.data-list-success td { border:1px solid #daf3ff; }
|
||||
table.data-list { background:#FFF; border-radius:2px; -moz-border-radius:2px; -webkit-border-radius:2px; }
|
||||
table.data-list * { font-size:12px; }
|
||||
table.data-list td { padding:10px; }
|
||||
.content-title th { text-align:center; }
|
||||
table.data-list td { padding:10px; vertical-align: top; }
|
||||
.content-title th, table.data-list tr td+td { text-align:center; }
|
||||
|
||||
.content img { width:80px; height:80px; }
|
||||
.content p { margin:0px; }
|
||||
.content a:hover { color:#F60; }
|
||||
.row-content { min-width:102px; }
|
||||
table.data-list tr td+td { text-align:center; }
|
||||
.content-checkbox-operate { padding:3px 5px; }
|
||||
.submit-pay { margin-top: 5px; }
|
||||
.wap-base { padding-top: 3px; }
|
||||
.wap-base, .base-operate { padding-top: 3px; }
|
||||
.base-operate { margin-top: 3px; }
|
||||
.content-hd td span { color: #666; }
|
||||
.content-hd td span:not(:last-child) { margin-right: 20px; }
|
||||
|
||||
|
||||
/* 不在进行中 */
|
||||
table.data-list { border-left: 1px solid #eee; border-right: 1px solid #eee; }
|
||||
table.data-list { border: 1px solid #eee; }
|
||||
table.data-list td.row-number, table.data-list td.row-total-price, table.data-list td.row-status, table.data-list td.row-operate { border-right: 1px solid #eee; }
|
||||
table.data-list td { border-bottom:1px solid #eee; }
|
||||
table.data-list .content-hd td { background:#EEE; border-bottom-color:#EEE; }
|
||||
table.data-list:hover { box-shadow:0 1px 1px #E4E4E4; background:#FCFCFC; }
|
||||
table.data-list .content-hd td { background:#eee; border-bottom-color:#eee; }
|
||||
table.data-list:hover { box-shadow:0 1px 1px #E4E4E4; background:#fbfbfb; }
|
||||
table.data-list .base-operate { border-top: 1px dashed #eee; }
|
||||
|
||||
|
||||
/* 进行中 */
|
||||
table.data-ongoing { border-left: 1px solid #daf3ff; border-right: 1px solid #daf3ff; }
|
||||
table.data-ongoing td.row-number, table.data-ongoing td.row-total-price, table.data-ongoing td.row-status, table.data-ongoing td.row-operate { border-right: 1px solid #daf3ff; }
|
||||
table.data-ongoing td { border-bottom:1px solid #daf3ff; }
|
||||
table.data-ongoing .content-hd td { background: #eaf8ff; border-bottom-color:#eaf8ff; }
|
||||
table.data-ongoing:hover { box-shadow:0 1px 1px #9AD6F3; background:#F9FDFF; }
|
||||
table.data-ongoing { border: 1px solid #fff1f5; }
|
||||
table.data-ongoing td.row-number, table.data-ongoing td.row-total-price, table.data-ongoing td.row-status, table.data-ongoing td.row-operate { border-right: 1px solid #fff1f5; }
|
||||
table.data-ongoing td { border-bottom:1px solid #fff1f5; }
|
||||
table.data-ongoing .content-hd td { background: #fff1f5; border-bottom-color:#fff1f5; }
|
||||
table.data-ongoing:hover { box-shadow:0 1px 1px #ffd6e2; background:#fffbfc; }
|
||||
table.data-ongoing .base-operate { border-top: 1px dashed #fff1f5; }
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -97,3 +100,22 @@ table.data-ongoing:hover { box-shadow:0 1px 1px #9AD6F3; background:#F9FDFF; }
|
|||
.line-price { color: #3c3c3c; }
|
||||
.line-price, strong.total-price-content { font-weight: 700; }
|
||||
strong.total-price-content { color: #d2364c; font-size: 16px; }
|
||||
|
||||
|
||||
/**
|
||||
* 支付弹窗
|
||||
*/
|
||||
.business-item h3 { border-bottom: 3px solid #e3e3e3; margin-top:5px; font-size: 14px;font-weight: 700; }
|
||||
.business-item ul { padding: 10px 3px 5px 5px; overflow: hidden; }
|
||||
.business-item ul li { border:1px solid transparent ;overflow: hidden; float: left; cursor: pointer; padding: 5px; border: 1px solid #eee; margin: 0 10px 10px 0; }
|
||||
.business-item ul li img { width: 36px; height: 36px; }
|
||||
.business-item ul li.selected { border-color: #d2364c ; position: relative; }
|
||||
.business-item ul li.selected i.icon-active { position: absolute; width: 10px; height: 10px; font-size: 0; line-height: 0; right: 0px; bottom: 0px; background: url(../Images/sys_item_selected.gif) no-repeat right bottom; }
|
||||
@media only screen and (min-width:640px) {
|
||||
.business-item ul li {width:calc(33% - 5px); }
|
||||
.business-item ul li:nth-child(3n) { margin-right: 0; }
|
||||
}
|
||||
@media only screen and (max-width:640px) {
|
||||
.business-item ul li { width: calc(50% - 5px); }
|
||||
.business-item ul li:nth-child(2n) { margin-right: 0; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ form.form-validation, .reg-switch-view { margin: 30px 0 60px 0; }
|
|||
.reg-switch-tips { font-weight: 100; font-size: 12px; color: #f87689; margin-left: 20px; }
|
||||
#verify-win .am-modal-bd .base { overflow: hidden; }
|
||||
#verify-win .am-modal-bd .base .verify-tips { font-size: 12px; }
|
||||
.reg-switch-view a { width: 49%; line-height: 100px; font-size: 16px; }
|
||||
.reg-switch-view button { width: 49%; line-height: 100px; font-size: 16px; }
|
||||
|
||||
/**
|
||||
* PC
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ $(function()
|
|||
/* 搜索切换 */
|
||||
var $so_list = $('.so-list');
|
||||
$thin_sub = $('.thin_sub');
|
||||
$thin_sub.find('input[name="so_type"]').change(function()
|
||||
$thin_sub.find('input[name="is_more"]').change(function()
|
||||
{
|
||||
if($thin_sub.find('i').hasClass('am-icon-angle-down'))
|
||||
{
|
||||
|
|
@ -14,7 +14,7 @@ $(function()
|
|||
$thin_sub.find('i').removeClass('am-icon-angle-up');
|
||||
}
|
||||
|
||||
if($thin_sub.find('input[name="so_type"]:checked').val() == undefined)
|
||||
if($thin_sub.find('input[name="is_more"]:checked').val() == undefined)
|
||||
{
|
||||
$so_list.addClass('none');
|
||||
} else {
|
||||
|
|
@ -22,4 +22,47 @@ $(function()
|
|||
}
|
||||
});
|
||||
|
||||
// 支付操作
|
||||
$('.submit-pay').on('click', function()
|
||||
{
|
||||
$('form.pay-form input[name=id]').val($(this).data('id'));
|
||||
var payment_id = $(this).data('payment-id') || 0;
|
||||
if($('.payment-items-'+payment_id).length > 0)
|
||||
{
|
||||
$('form.pay-form input[name=payment_id]').val(payment_id);
|
||||
$('.payment-items-'+payment_id).addClass('selected').siblings('li').removeClass('selected');
|
||||
} else {
|
||||
$('form.pay-form input[name=payment_id]').val(0);
|
||||
$('ul.payment-list li.selected').removeClass('selected');
|
||||
}
|
||||
});
|
||||
|
||||
// 混合列表选择
|
||||
$('.business-item ul li').on('click', function()
|
||||
{
|
||||
if($(this).hasClass('selected'))
|
||||
{
|
||||
$(this).removeClass('selected');
|
||||
} else {
|
||||
$(this).addClass('selected').siblings('li').removeClass('selected');
|
||||
}
|
||||
});
|
||||
|
||||
// 支付表单
|
||||
$('form.pay-form button[type=submit]').on('click', function()
|
||||
{
|
||||
var id = $('form.pay-form input[name=id]').val() || 0;
|
||||
if(id == 0)
|
||||
{
|
||||
PromptCenter('订单id有误');
|
||||
return false;
|
||||
}
|
||||
var payment_id = $('form.pay-form input[name=payment_id]').val() || 0;
|
||||
if(payment_id == 0)
|
||||
{
|
||||
PromptCenter('请选择支付方式');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
77
shopxo.sql
77
shopxo.sql
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue