提交 8943da08 编写于 作者: D devil

订单批量支付

上级 d9ecaa7d
......@@ -43,6 +43,7 @@ class Paylog
'key_field' => 'id',
'is_search' => 1,
'search_url' => MyUrl('admin/paylog/index'),
'is_middle' => 0,
],
// 表单配置
'form' => [
......@@ -60,6 +61,15 @@ class Paylog
'placeholder' => '请输入用户名/昵称/手机/邮箱',
],
],
[
'label' => '支付单号',
'view_type' => 'field',
'view_key' => 'log_no',
'search_config' => [
'form_type' => 'input',
'where_type' => '=',
],
],
[
'label' => '支付方式',
'view_type' => 'module',
......@@ -89,6 +99,24 @@ class Paylog
'is_multiple' => 1,
],
],
[
'label' => '业务订单金额(元)',
'view_type' => 'field',
'view_key' => 'total_price',
'search_config' => [
'form_type' => 'section',
'is_point' => 1,
],
],
[
'label' => '支付金额(元)',
'view_type' => 'field',
'view_key' => 'pay_price',
'search_config' => [
'form_type' => 'section',
'is_point' => 1,
],
],
[
'label' => '业务类型',
'view_type' => 'field',
......@@ -115,24 +143,6 @@ class Paylog
'where_handle_custom' => 'WhereValueBusinessInfo',
],
],
[
'label' => '业务订单金额(元)',
'view_type' => 'field',
'view_key' => 'total_price',
'search_config' => [
'form_type' => 'section',
'is_point' => 1,
],
],
[
'label' => '支付金额(元)',
'view_type' => 'field',
'view_key' => 'pay_price',
'search_config' => [
'form_type' => 'section',
'is_point' => 1,
],
],
[
'label' => '支付平台交易号',
'view_type' => 'field',
......
<!-- 关联业务数据 -->
{{if !empty($module_data) and !empty($module_data['business_list']) and is_array($module_data['business_list'])}}
<dl class="dl-content dl-content-dd-only">
<dl class="dl-content dl-content-dd-only dl-content-dd-compact">
{{foreach $module_data.business_list as $v}}
<dd>
<div class="am-nbfc">
......
......@@ -74,6 +74,9 @@ class Order extends Common
];
$ret = OrderService::OrderList($data_params);
// 发起支付 - 支付方式
$this->assign('buy_payment_list', PaymentService::BuyPaymentList(['is_enable'=>1, 'is_open_user'=>1]));
// 加载百度地图api
$this->assign('is_load_baidu_map_api', 1);
......@@ -100,7 +103,7 @@ class Order extends Common
$data = $this->OrderFirst();
if(!empty($data))
{
// 发起支付 - 支付方式
// 发起支付 - 支付方式
$this->assign('buy_payment_list', PaymentService::BuyPaymentList(['is_enable'=>1, 'is_open_user'=>1]));
// 虚拟销售配置
......@@ -111,7 +114,7 @@ class Order extends Common
$this->assign('is_load_baidu_map_api', 1);
// 浏览器名称
$this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('订单详情', 1));
$this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('订单详情', 1));
// 数据赋值
$this->assign('data', $data);
......@@ -212,7 +215,7 @@ class Order extends Common
*/
public function Pay()
{
$params = input();
$params = $this->data_request;
$params['user'] = $this->user;
$ret = OrderService::Pay($params);
if($ret['code'] == 0)
......@@ -235,7 +238,7 @@ class Order extends Common
public function Respond()
{
// 参数
$params = input();
$params = $this->data_request;
// 是否自定义状态
if(isset($params['appoint_status']))
......
......@@ -219,7 +219,7 @@
<button type="button" class="am-btn am-btn-warning am-btn-xs am-radius am-icon-paint-brush submit-ajax submit-cancel" data-url="{{:MyUrl('index/order/cancel')}}" data-id="{{$data.id}}" data-view="reload"> 取消</button>
{{/if}}
{{if in_array($data['status'], [1])}}
<button class="am-btn am-btn-primary am-btn-xs am-radius am-icon-paypal submit-pay" data-id="{{$data.id}}" data-payment-id="{{$data.payment_id}}" data-am-modal="{target: '#order-pay-popup'}" data-is-auto="{{if isset($params['is_pay_auto']) and $params['is_pay_auto'] eq 1}}1{{else /}}0{{/if}}" data-is-pay="{{if isset($params['is_pay_submit']) and $params['is_pay_submit'] eq 1}}1{{else /}}0{{/if}}"> {{if $data['is_under_line'] eq 1}}切换{{/if}}支付</button>
<button class="am-btn am-btn-primary am-btn-xs am-radius am-icon-paypal submit-pay" data-id="{{$data.id}}" data-payment-id="{{$data.payment_id}}"> {{if $data['is_under_line'] eq 1}}切换{{/if}}支付</button>
{{/if}}
{{if in_array($data['status'], [3])}}
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-check-circle-o submit-ajax submit-confirm" data-url="{{:MyUrl('index/order/collect')}}" data-id="{{$data.id}}" data-view="reload" data-msg="请仔细确认已收到货物、确认继续吗?"> 收货</button>
......@@ -321,7 +321,7 @@
</div>
<div>
<span>{{$data.address_data.province_name}} {{$data.address_data.city_name}} {{$data.address_data.county_name}} {{$data.address_data.address}}</span>
{{if $data.order_model eq 2 and $data.address_data.lng gt 0 and $data.address_data.lat gt 0}}
{{if $data.address_data.lng gt 0 and $data.address_data.lat gt 0}}
<button type="button" class="am-btn am-btn-success am-radius am-icon-map-marker submit-map-popup" data-lng="{{$data.address_data.lng}}" data-lat="{{$data.address_data.lat}}"> 查看位置</button>
{{/if}}
</div>
......@@ -377,24 +377,19 @@
</thead>
<tbody>
{{foreach $data.items as $goods}}
<tr id="data-list-{{$goods.id}}" data-id="{{$goods.id}}" data-goods-id="{{$goods.goods_id}}">
<td class="base">
<div class="goods-detail">
<tr>
<td>
<div class="am-nbfc am-text-left">
<a href="{{$goods.goods_url}}" target="_blank">
<img src="{{$goods.images}}" alt="{{$goods.title}}" class="am-img-thumbnail am-radius" />
<img src="{{$goods.images}}" class="am-img-thumbnail am-radius am-margin-right-xs am-fl" width="60" height="60" />
</a>
<div class="goods-base">
<a href="{{$goods.goods_url}}" target="_blank" class="goods-title">{{$goods.title}}</a>
{{if !empty($goods.spec) or !empty($goods['model'])}}
<ul class="am-margin-top-xs am-text-left goods-attr">
{{if !empty($goods['model'])}}
<li>型号:{{$goods.model}}</li>
{{/if}}
{{if !empty($goods.spec)}}
{{foreach $goods.spec as $spec}}
<li>{{$spec.type}}:{{$spec.value}}</li>
{{/foreach}}
{{/if}}
<div class="am-nbfc">
<a href="{{$goods.goods_url}}" target="_blank" class="am-nowrap-initial">{{$goods.title}}</a>
{{if !empty($goods.spec)}}
<ul class="goods-spec am-margin-top-xs">
{{foreach $goods.spec as $spec}}
<li>{{$spec.type}}:{{$spec.value}}</li>
{{/foreach}}
</ul>
{{/if}}
</div>
......@@ -403,7 +398,9 @@
{{if $goods['original_price'] gt 0}}
<span class="original-price">{{$price_symbol}}{{$goods.original_price}}</span>
{{/if}}
<strong class="total-price-content">{{$price_symbol}}{{$goods.price}}</strong>
<span class="price">
<strong>{{$price_symbol}}{{$goods.price}}</strong>
</span>
<span class="wap-number">x{{$goods.buy_number}}</span>
{{if isset($goods['returned_quantity']) and $goods['returned_quantity'] gt 0}}
<span class="am-badge am-round am-badge-warning-plain">已退 {{$goods.returned_quantity}}</span>
......@@ -422,7 +419,7 @@
<br /><span class="am-badge am-round am-badge-warning-plain">已退 {{$goods.returned_quantity}}</span>
{{/if}}
</td>
<td class="total-price am-hide-sm-only">
<td class="price am-hide-sm-only">
<strong class="total-price-content">{{$price_symbol}}{{$goods.total_price}}</strong>
{{if isset($goods['refund_price']) and $goods['refund_price'] gt 0}}
<br /><span class="am-badge am-round am-badge-warning-plain">已退 {{$goods.refund_price}}</span>
......@@ -491,43 +488,7 @@
</div>
<!-- 支付弹窗 -->
<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">&times;</span>
</div>
<div class="am-popup-bd">
<form class="am-form pay-form" method="post" action="{{:MyUrl('index/order/pay')}}">
<!-- 支付方式 -->
<div class="business-item">
<h3>选择支付</h3>
{{if !empty($buy_payment_list)}}
<ul class="payment-list" data-type="payment">
{{foreach $buy_payment_list as $payment}}
<li class="payment-items-{{$payment.id}}" data-value="{{$payment.id}}">
{{if !empty($payment.logo)}}
<img src="{{$payment.logo}}" />
{{/if}}
<span>{{$payment.name}}</span>
<i class="icon-active"></i>
</li>
{{/foreach}}
</ul>
{{/if}}
{{if empty($buy_payment_list)}}
<div class="table-no"><i class="am-icon-warning"></i> 没有支付方式</div>
{{/if}}
</div>
<div class="am-form-group am-form-group-refreshing">
<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:'处理中...'}">确认支付</button>
</div>
</form>
</div>
</div>
</div>
{{include file="order/payment_popup" /}}
</div>
<!-- content end -->
</div>
......
......@@ -3,7 +3,13 @@
<!-- 表单顶部操作栏 -->
{{block name="form_operate_top"}}
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-paypal batch-pay-submit"> 批量支付</button>
<button type="button" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-paypal batch-pay-submit" data-url="{{:MyUrl('index/order/pay')}}"> 批量支付</button>
<!-- 父级内容 -->
{__block__}
{{/block}}
<!-- 底部 -->
{{block name="form_page_bottom"}}
<!-- 支付弹窗 -->
{{include file="order/payment_popup" /}}
{{/block}}
\ No newline at end of file
......@@ -11,10 +11,10 @@
</button>
{{/if}}
{{if in_array($module_data['status'], [1])}}
<a class="am-btn am-btn-primary am-btn-xs am-radius am-btn-block" href="{{:MyUrl('index/order/detail', ['id'=>$module_data['id'], 'is_pay_auto'=>1])}}" target="_blank">
<button type="button" class="am-btn am-btn-primary am-btn-xs am-radius am-btn-block submit-pay" data-id="{{$module_data.id}}" data-payment-id="{{$module_data.payment_id}}">
<i class="am-icon-paypal"></i>
<span>支付</span>
</a>
</button>
{{/if}}
{{if in_array($module_data['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="{{:MyUrl('index/order/collect')}}" data-id="{{$module_data.id}}" data-view="reload" data-msg="请仔细确认已收到货物、确认继续吗?">
......
<div class="am-popup am-radius" id="order-pay-popup" data-is-auto="{{if isset($params['is_pay_auto']) and $params['is_pay_auto'] eq 1}}1{{else /}}0{{/if}}" data-is-pay="{{if isset($params['is_pay_submit']) and $params['is_pay_submit'] eq 1}}1{{else /}}0{{/if}}">
<div class="am-popup-inner">
<div class="am-popup-hd">
<h4 class="am-popup-title">支付</h4>
<span data-am-modal-close class="am-close">&times;</span>
</div>
<div class="am-popup-bd">
<form class="am-form pay-form" method="post" action="{{:MyUrl('index/order/pay')}}">
<!-- 支付方式 -->
<div class="business-item">
<h3>选择支付</h3>
{{if !empty($buy_payment_list)}}
<ul class="payment-list" data-type="payment">
{{foreach $buy_payment_list as $payment}}
<li class="payment-items-{{$payment.id}}" data-value="{{$payment.id}}">
{{if !empty($payment.logo)}}
<img src="{{$payment.logo}}" />
{{/if}}
<span>{{$payment.name}}</span>
<i class="icon-active"></i>
</li>
{{/foreach}}
</ul>
{{/if}}
{{if empty($buy_payment_list)}}
<div class="table-no"><i class="am-icon-warning"></i> 没有支付方式</div>
{{/if}}
</div>
<div class="am-form-group am-form-group-refreshing">
<input type="hidden" name="ids" value="{{if !empty($params['ids'])}}{{:urldecode($params.ids)}}{{/if}}" />
<input type="hidden" name="payment_id" value="{{if !empty($params['payment_id'])}}{{$params.payment_id}}{{/if}}" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认支付</button>
</div>
</form>
</div>
</div>
</div>
\ No newline at end of file
......@@ -157,4 +157,7 @@
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
<!-- footer end -->
<!-- page buttom -->
{{block name="form_page_bottom"}}{{/block}}
\ No newline at end of file
......@@ -29,33 +29,132 @@ class PayLogService
* @datetime 2019-05-07T00:57:36+0800
* @param [array] $params [输入参数]
* @param [int] $user_id [用户id]
* @param [int] $order_id [业务订单id]
* @param [int] $business_ids [业务订单id]
* @param [float] $total_price [业务订单实际金额]
* @param [string] $subject [业务订单名称]
* @param [int] $business_type [业务类型(0默认, 1订单, 2充值, ...)]
* @return [boolean] [成功true, 失败false]
*/
public static function PayLogInsert($params = [])
{
// 请求参数
$p = [
[
'checked_type' => 'empty',
'key_name' => 'business_ids',
'error_msg' => '业务id为空',
],
[
'checked_type' => 'is_array',
'key_name' => 'business_ids',
'error_msg' => '业务id数据类型有误',
],
[
'checked_type' => 'empty',
'key_name' => 'user_id',
'error_msg' => '用户id为空',
],
[
'checked_type' => 'empty',
'key_name' => 'business_type',
'error_msg' => '业务类型为空',
],
[
'checked_type' => 'empty',
'key_name' => 'total_price',
'error_msg' => '业务金额为空',
],
[
'checked_type' => 'min',
'key_name' => 'total_price',
'checked_data' => 0.01,
'error_msg' => '业务金额必须大于0',
],
];
$ret = ParamsChecked($params, $p);
if($ret !== true)
{
return DataReturn($ret, -1);
}
// 业务id
if(empty($params['business_ids']))
{
return DataReturn('业务id为空', -1);
}
// 日志主数据
$data = [
'log_no' => date('YmdHis').GetNumberCode(6),
'user_id' => intval($params['user_id']),
'total_price' => PriceNumberFormat($params['total_price']),
'business_type' => trim($params['business_type']),
'subject' => isset($params['subject']) ? $params['subject'] : '',
'payment' => isset($params['payment']) ? $params['payment'] : '',
'payment_name' => isset($params['payment_name']) ? $params['payment_name'] : '',
'add_time' => time(),
];
$pay_log_id = Db::name('PayLog')->insertGetId($data);
if($pay_log_id > 0)
{
$business_nos = isset($params['business_nos']) && is_array($params['business_nos']) ? $params['business_nos'] : [];
$value_data = [];
foreach($params['business_ids'] as $bk=>$bv)
{
$value_data[] = [
'pay_log_id' => $pay_log_id,
'business_id' => $bv,
'business_no' => isset($business_nos[$bk]) ? trim($business_nos[$bk]) : '',
'add_time' => time(),
];
}
$res = Db::name('PayLogValue')->insertAll($value_data);
if($res >= count($params['business_ids']))
{
$data['id'] = $pay_log_id;
return DataReturn('添加成功', 0, $data);
}
}
return DataReturn('支付订单添加失败', -100);
}
/**
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-07-27
* @desc description
* @param [int] $log_id [支付日志id]
* @param [string] $trade_no [支付平台交易号]
* @param [string] $buyer_user [支付平台用户帐号]
* @param [float] $pay_price [支付金额]
* @param [string] $subject [业务订单名称]
* @param [string] $payment [支付方式标记]
* @param [string] $payment_name [支付方式名称]
* @param [int] $business_type [业务类型(0默认, 1订单, 2充值, ...)]
* @return [boolean] [成功true, 失败false]
*/
public static function PayLogInsert($params = [])
public static function PayLogSuccess($params = [])
{
// 参数
if(empty($params['log_id']))
{
return DataReturn('日志id有误', -100);
}
// 更新数据
$data = [
'user_id' => isset($params['user_id']) ? intval($params['user_id']) : 0,
'order_id' => isset($params['order_id']) ? intval($params['order_id']) : 0,
'total_price' => isset($params['total_price']) ? PriceNumberFormat($params['total_price']) : 0.00,
'trade_no' => isset($params['trade_no']) ? $params['trade_no'] : '',
'buyer_user' => isset($params['buyer_user']) ? $params['buyer_user'] : '',
'pay_price' => isset($params['pay_price']) ? PriceNumberFormat($params['pay_price']) : 0.00,
'subject' => isset($params['subject']) ? $params['subject'] : '',
'payment' => isset($params['payment']) ? $params['payment'] : '',
'payment_name' => isset($params['payment_name']) ? $params['payment_name'] : '',
'business_type' => isset($params['business_type']) ? intval($params['business_type']) : 0,
'add_time' => time(),
'status' => 1,
'pay_time' => time(),
];
return Db::name('PayLog')->insertGetId($data) > 0;
if(Db::name('PayLog')->where(['id'=>intval($params['log_id']), 'status'=>0])->update($data))
{
return DataReturn('日志订单更新成功', 0);
}
return DataReturn('日志订单更新失败', -100);
}
/**
......
......@@ -16,6 +16,7 @@ ul { list-style: none; }
.dl-content dd:not(:last-child) { border-bottom: 1px solid #efefef; }
.dl-content dt, .dl-content dd { font-weight: normal !important; text-align: left; margin-top: 0px; line-height: 20px; min-height: 40px; padding-top: 10px; padding-bottom: 10px; }
.dl-content-dd-only dd { padding-left: 0; }
.dl-content-dd-compact dd { line-height: 25px; min-height: 25px; padding: 0; }
/**
* 表单优化
......
......@@ -1663,6 +1663,21 @@ function FromTableCheckedValues(form)
return values;
}
/**
* 判断变量是否为数组
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-07-28
* @desc description
* @param {[mixed]} value [变量值]
*/
function IsArray(value)
{
return Object.prototype.toString.call(value) == '[object Array]';
}
// 公共数据操作
$(function()
......
/**
* 订单列表
* 进度
*/
/* 列表 */
table { width: 100%; }
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; 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; }
.content-checkbox-operate { padding:3px 5px; }
.submit-pay { margin-top: 5px; }
.wap-base, .base-operate { padding-top: 3px; }
.base-operate { margin-top: 3px; }
.content-hd td span { color: #666; }
ul.progress {
margin: 20px 0;
}
ul.progress li {
position: relative;
}
ul.progress li i.step {
display: block;
background-color: #e1e1e1;
}
ul.progress li .digital {
background-color: #f7f7f7;
border-radius: 50px;
width: 36px;
height: 36px;
line-height: 26px;
text-align: center;
color: #e1e1e1;
font-weight: 700;
border: 6px solid #e1e1e1;
}
ul.progress li .base .title {
font-weight: 500;
color: #666;
}
ul.progress li .base .date {
color: #999;
}
ul.progress li.steps-success .digital {
border: 6px solid #4CAF50;
color: #fff;
}
ul.progress li.steps-success .digital {
background-color: #82cc85;
}
ul.progress li.steps-success i.step {
background-color: #4CAF50;
}
ul.progress li.current .title {
color: #4CAF50;
}
.base-right .icon-tips, .base-right .icon-success {
font-size: 50px;
}
.base-right .icon-tips {
color: #6980d0;
}
.base-right .icon-success {
color: #28801c;
}
@media only screen and (min-width: 641px) {
.row-content { width:25%; }
.row-price { width:15%; }
.row-number { width:10%; }
.row-goods-operate { width: 10%; }
.row-total-price { width:20%; }
.row-status { width:10%; }
.row-operate { width:10%; }
ul.progress {
overflow: hidden;
}
ul.progress li {
float: left;
width: 20%;
text-align: center;
}
ul.progress li i.step {
display: block;
height: 6px;
width: 100%;
position: absolute;
margin: 15px 0 0 -50%;
z-index: 1;
}
ul.progress li .digital {
position: absolute;
margin-left: calc(50% - 18px);
z-index: 2;
}
ul.progress li .base {
margin-top: 50px;
}
}
@media only screen and (max-width: 641px) {
table.data-list td { padding: 5px; }
.row-content { width:40%; }
.row-goods-operate { width: 20%; }
.row-status { width:20%; }
.row-operate { width:20%; }
ul.progress li i.step {
height: 60px;
width: 6px;
margin-left: 15px;
}
ul.progress li .base {
position: absolute;
left: 50px;
top: 0;
}
ul.progress li:not(:first-child) .base {
margin-top: 70px;
}
}
/* 不在进行中 */
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:#fbfbfb; }
table.data-list .base-operate { border-top: 1px dashed #eee; }
/**
* 文本列表
*/
.items {
line-height: 30px;
overflow: hidden;
}
.items-detail {
color: #666;
}
/* 进行中 */
table.data-ongoing { border: 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:#daf3ff; }
table.data-ongoing:hover { box-shadow:0 1px 1px #aed8ff; background:#f7fdff; }
table.data-ongoing .base-operate { border-top: 1px dashed #daf3ff; }
/**
* 订单详情基础
*/
.order-base .am-panel {
-webkit-box-shadow: none;
box-shadow: none;
}
.order-base .am-panel-bd, .order-base .base-right {
padding: 5px 10px;
}
.order-base, .order-base .status {
overflow: hidden;
}
.order-base .status-name {
line-height: 80px;
}
.order-base .operation .am-btn {
margin-left: 15px;
}
.order-base .logistics {
margin-top: 10px;
}
.order-base .am-btn-block {
width: auto;
padding-left: 1em;
padding-right: 1em;
}
@media only screen and (min-width: 641px) {
.order-base .base-left, .order-base .base-right {
width: 50%;
float: left;
}
.order-base {
border: 1px solid #ddd;
}
.order-base .am-panel-default {
border-color: #fff;
}
.order-base .am-panel {
border: 0;
margin: 0;
}
.order-base .base-left {
border-right: 1px solid #ddd;
}
.order-base .base-right {
padding-top: 0;
}
}
@media only screen and (max-width: 641px) {
.order-base .base-right {
border: 1px solid #ddd;
}
}
/**
* 业务面板
*/
.user-content-body .business-panel {
margin-top: 20px;
box-shadow: none;
-webkit-box-shadow: none;
}
/**
* 支付弹窗
*/
.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; box-shadow: 0px 0 0px 1px #d2364c; }
.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; }
.business-item ul li:hover { border: 1px solid #d2364c; box-shadow: 0px 0 0px 1px #d2364c; }
}
@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; }
}
/**
* 商品列表
*/
.goods-detail { position: relative; min-height: 80px; }
.goods-detail img { width: 80px; height: 80px; position: absolute; left: 0; top: 0; }
.goods-title { display: -webkit-box; max-height: 36px; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-title:hover { text-decoration: underline; }
.goods-base { float: left; top: 0; margin-left: 85px; }
.goods-attr { margin-top: 5px; }
.goods-attr li { color: #888; line-height: 16px; }
.original-price, .line-price, strong.total-price-content { font-family: Verdana,Tahoma,arial; }
.original-price { color: #9c9c9c; text-decoration: line-through; }
.line-price { color: #3c3c3c; }
.line-price, strong.total-price-content { font-weight: 700; }
strong.total-price-content { color: #d2364c; font-size: 14px; }
@media only screen and (max-width:640px) {
.goods-detail { min-height: 40px; }
.goods-detail .goods-images { display: none; }
.goods-base { margin-left: 0px; }
table.data-list td.row-status { border-left: 1px solid #eee; }
table.data-ongoing td.row-status { border-left: 1px solid #fff1f5; }
/**
* 虚拟销售
*/
.fictitious-panel-container ul.am-list li:first-child {
border-top: 0;
}
.fictitious-panel-container ul.am-list li:last-child {
border-bottom: 0;
}
\ No newline at end of file
/**
* 进度
*/
ul.progress {
margin: 20px 0;
}
ul.progress li {
position: relative;
}
ul.progress li i.step {
display: block;
background-color: #e1e1e1;
}
ul.progress li .digital {
background-color: #f7f7f7;
border-radius: 50px;
width: 36px;
height: 36px;
line-height: 26px;
text-align: center;
color: #e1e1e1;
font-weight: 700;
border: 6px solid #e1e1e1;
}
ul.progress li .base .title {
font-weight: 500;
color: #666;
}
ul.progress li .base .date {
color: #999;
}
ul.progress li.steps-success .digital {
border: 6px solid #4CAF50;
color: #fff;
}
ul.progress li.steps-success .digital {
background-color: #82cc85;
}
ul.progress li.steps-success i.step {
background-color: #4CAF50;
}
ul.progress li.current .title {
color: #4CAF50;
}
.base-right .icon-tips, .base-right .icon-success {
font-size: 50px;
}
.base-right .icon-tips {
color: #6980d0;
}
.base-right .icon-success {
color: #28801c;
}
@media only screen and (min-width: 641px) {
ul.progress {
overflow: hidden;
}
ul.progress li {
float: left;
width: 20%;
text-align: center;
}
ul.progress li i.step {
display: block;
height: 6px;
width: 100%;
position: absolute;
margin: 15px 0 0 -50%;
z-index: 1;
}
ul.progress li .digital {
position: absolute;
margin-left: calc(50% - 18px);
z-index: 2;
}
ul.progress li .base {
margin-top: 50px;
}
}
@media only screen and (max-width: 641px) {
ul.progress li i.step {
height: 60px;
width: 6px;
margin-left: 15px;
}
ul.progress li .base {
position: absolute;
left: 50px;
top: 0;
}
ul.progress li:not(:first-child) .base {
margin-top: 70px;
}
}
/**
* 文本列表
*/
.items {
line-height: 30px;
overflow: hidden;
}
.items-detail {
color: #666;
}
/**
* 订单详情基础
*/
.order-base .am-panel {
-webkit-box-shadow: none;
box-shadow: none;
}
.order-base .am-panel-bd, .order-base .base-right {
padding: 5px 10px;
}
.order-base, .order-base .status {
overflow: hidden;
}
.order-base .status-name {
line-height: 80px;
}
.order-base .operation .am-btn {
margin-left: 15px;
}
.order-base .logistics {
margin-top: 10px;
}
.order-base .am-btn-block {
width: auto;
padding-left: 1em;
padding-right: 1em;
}
@media only screen and (min-width: 641px) {
.order-base .base-left, .order-base .base-right {
width: 50%;
float: left;
}
.order-base {
border: 1px solid #ddd;
}
.order-base .am-panel-default {
border-color: #fff;
}
.order-base .am-panel {
border: 0;
margin: 0;
}
.order-base .base-left {
border-right: 1px solid #ddd;
}
.order-base .base-right {
padding-top: 0;
}
}
@media only screen and (max-width: 641px) {
.order-base .base-right {
border: 1px solid #ddd;
}
}
/**
* 业务面板
*/
.user-content-body .business-panel {
margin-top: 20px;
box-shadow: none;
-webkit-box-shadow: none;
}
/**
* 支付弹窗
*/
.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; box-shadow: 0px 0 0px 1px #d2364c; }
.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; }
.business-item ul li:hover { border: 1px solid #d2364c; box-shadow: 0px 0 0px 1px #d2364c; }
}
@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; }
}
/**
* 商品列表
*/
.order-goods { margin-top: 20px; }
.goods-detail img { width: 80px; height: 80px; position: absolute; left: 0; top: 0; }
.goods-detail { position: relative; min-height: 80px; }
.goods-title { display: block; max-height: 36px; overflow: hidden; text-overflow: ellipsis; }
.goods-title:hover { text-decoration: underline; }
.goods-base { float: left; top: 0; margin-left: 85px; }
.goods-attr li { color: #888; line-height: 16px; }
.original-price, .line-price { font-family: Verdana,Tahoma,arial; }
.original-price { color: #9c9c9c; text-decoration: line-through; }
.line-price { color: #3c3c3c; }
.line-price, strong.total-price-content, strong.total-price-content { font-weight: 700; font-family: Verdana,Tahoma,arial; }
strong.total-price-content { color: #d2364c; }
.am-table { margin-bottom: 10px; }
.am-table > tbody > tr > td { border-top: 1px solid #F5F5F5; }
.am-table > thead > tr > th { border-bottom: 1px solid #f7f7f7; }
@media only screen and (min-width:640px) {
.cart-content table tr .base { width: 40%; }
.cart-content table tr .price { width: 20%; }
.cart-content table tr .number { width: 20%; }
.cart-content table tr .total-price { width: 20%; }
.cart-content { margin-top: 20px; }
}
/**
* 自提点地图
*/
#popup-extraction-receive-map .am-popup-bd,
#map {
width: 100%;
height: 100%;
padding: 0;
}
#popup-extraction-receive-map .am-popup-hd {
border: 0;
}
/**
* 虚拟销售
*/
.fictitious-panel-container ul.am-list li:first-child {
border-top: 0;
}
.fictitious-panel-container ul.am-list li:last-child {
border-bottom: 0;
}
\ No newline at end of file
$(function()
{
// 支付窗口
var $pay_popup = $('#order-pay-popup');
// 支付窗口参数初始化
function PayPopupParamsInit(e)
function PayPopupParamsInit(ids, payment_id)
{
$('form.pay-form input[name=id]').val(e.data('id'));
var payment_id = e.data('payment-id') || 0;
if($('.payment-items-'+payment_id).length > 0)
// 数组则转成字符串
if(IsArray(ids))
{
ids = ids.join(',');
}
$('form.pay-form input[name=ids]').val(ids);
if((payment_id || null) != null && $('.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');
......@@ -17,7 +24,8 @@ $(function()
// 支付操作
$('.submit-pay').on('click', function()
{
PayPopupParamsInit($(this));
PayPopupParamsInit($(this).data('id'), $(this).data('payment-id'));
$pay_popup.modal();
});
// 混合列表选择
......@@ -36,8 +44,8 @@ $(function()
// 支付表单
$('form.pay-form button[type=submit]').on('click', function()
{
var id = $('form.pay-form input[name=id]').val() || 0;
if(id == 0)
var ids = $('form.pay-form input[name=ids]').val() || null;
if(ids == null)
{
PromptCenter('订单id有误');
return false;
......@@ -68,19 +76,18 @@ $(function()
});
// 自动支付处理
if($('.submit-pay').length > 0)
if($pay_popup.length > 0)
{
// 是否自动打开支付窗口
if($pay_popup.data('is-auto') == 1)
{
$pay_popup.modal();
}
// 是否自动提交支付表单
if($('.submit-pay').data('is-pay') == 1)
if($pay_popup.data('is-pay') == 1)
{
PayPopupParamsInit($('.submit-pay'));
$('#order-pay-popup button[type="submit"]').trigger('click');
} else {
// 是否自动打开支付窗口
if($('.submit-pay').data('is-auto') == 1)
{
$('.submit-pay').trigger('click');
}
$pay_popup.find('button[type="submit"]').trigger('click');
}
}
......@@ -89,11 +96,25 @@ $(function()
{
// 是否有选择的数据
var values = FromTableCheckedValues('order_form_checkbox_value');
console.log(values)
if(values.length <= 0)
{
Prompt('请先选中数据');
return false;
}
// 支付url支付地址
var url = $(this).data('url') || null;
if(url == null)
{
Prompt('支付url地址有误');
return false;
}
// 获取第一个订单支付方式
var payment_id = $('#data-list-'+values[0]).find('.submit-pay').data('payment-id') || null;
// 支付弹窗
PayPopupParamsInit(values, payment_id);
$pay_popup.modal();
});
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册