<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>商家中心-订单管理-{C('WEBNAME')}</title>
<link href="{THEME_STYLE_PATH}style/css/base.css" rel="stylesheet" type="text/css" />
<link href="{THEME_STYLE_PATH}style/css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{THEME_STYLE_PATH}style/css/user_style.css" />
<link rel="stylesheet" type="text/css" href="{THEME_STYLE_PATH}style/css/s_user_style.css" />
<script type="text/javascript" src="{THEME_STYLE_PATH}style/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="{JS_PATH}dialog/jquery.artDialog.js?skin=default"></script>
<script type="text/javascript" src="{JS_PATH}dialog/plugins/iframeTools.js"></script>
<script type="text/javascript" src="{THEME_STYLE_PATH}style/js/order.js"></script>
<script language="javascript" type="text/javascript" src="/static/js/echarts.min.js"></script>
<link rel="stylesheet" type="text/css" href="/static/js/fakel/jquery.mloading.css">
<script language="javascript" type="text/javascript" src="/static/js/fakel/jquery.mloading.js"></script>
<!-- 商家订单管理 -->
</head>
<body>
{include template('v2_merchant_header','member/common')}
<script type="text/javascript">
{php $userinfo = is_login();}
var site = {
"site_root" : '{__ROOT__}',
"js_path" : '{JS_PATH}',
"css_path" : '{CSS_PATH}',
"img_path" : '{IMG_PATH}',
"template_img" : '{THEME_STYLE_PATH}style/images',
"webname" : '{C("webname")}',
"order_url" : '{U("Order/DoOrder/manage")}',
"nickname" : '{nickname($userinfo["userid"])}',
"message":'{message_count($userinfo["userid"])}',
"user":<?php echo json_encode($userinfo ? $userinfo : array());?>
};
var order_data = {
{php $seller_get_appeal = string2array(C_READ('seller_get_appeal','rebate'));}
{php $seller_trialtalk_check = string2array(C_READ('seller_trialtalk_check'));}
{loop $lists $r}
<?php
if ($r['status']==6 && $r['appeal']['appeal_status']==0){ // 商家申诉倒计时
$end_time = $r['check_time']+$seller_get_appeal['time']*3600;
}elseif($r['status']==1 && $mod=='trial'){ // 待审核资格
$end_time = $r['create_time']+C_READ('seller_check_time')*86400;
}elseif($r['status']==2 && $mod=='trial' && $r['trial_report']){ // 待会员下单
$end_time = $r['check_time']+C_READ('buyer_write_order_time')*3600;
}elseif($r['status']==2 && $mod=='trial' && !$r['trial_report'] && !$r['order_sn']){ // 待填写订单号
$end_time = $r['check_time']+C_READ('buyer_write_order_time')*3600;
}elseif($r['status']==2 && $mod=='trial' && !$r['trial_report'] && $r['order_sn']){ // 审核订单号倒计时
$end_time = $r['check_time']+C_READ('seller_order_check_time')*3600;
}elseif($r['status']==8 && $mod=='trial' && !$r['trial_report']){ // 待填写试用报告倒计时
$end_time = $r['check_time']+C_READ('buyer_write_talk_time')*86400;
}elseif($r['status']==3 && $mod=='trial'){ // 待审核试用报告
$end_time = $r['check_time']+$seller_trialtalk_check['value']*86400;
}elseif($r['status'] == 2 && $mod == 'commission'&& !$r['order_sn']){
$end_time = $r['create_time']+C_READ('buyer_write_order_time','commission')*60;
}elseif($r['status'] == 3 && $mod == 'commission'&& $r['order_sn']){
$end_time = $r['check_time']+C_READ('seller_check_time','commission')*3600;
}elseif($r['status'] == 3 && $mod == 'rebate'&& $r['order_sn']){
$end_time = $r['check_time']+C_READ('seller_check_time','rebate')*86400;
}elseif($r['status'] == 5 && $mod == 'commission'&& $r['order_sn']){
$end_time = $r['check_time']+C_READ('seller_pay_time','commission')*3600;
}else{
$end_time = $r['create_time']+C_READ('seller_check_time','rebate')*86400;
}
?>
{if $n > 1},{/if}
{$r[id]}:{
"oid":"{$r[id]}",
"buyer_id":"{$r[buyer_id]}",
"mod":"{$r[product_info]['mod']}",
"seller_id":"{$r[seller_id]}",
"gid":"{$r[goods_id]}",
"title":"{$r[product_info]['title']}",
"url":"{$r[product_info][goods_url]}",
"userid":"<?php echo $this->userid;?>",
"modelid":"<?php echo $userinfo['modelid'];?>",
"price":"{$r[product_info]['goods_price']}",
"end_time" : "{$end_time}",
}
{/loop}
};
</script>
<div id="content">
<div class="wrap">
<p class="hint-wz clear hint_wz_2">
当前位置:
<b><a href="/">首页</a> > </b>
<b><a href="{U('member/profile/index')}">商家会员中心</a> > </b>
<b><a href="{U('member/merchant_product/activity',array('mod' =>$mod))}">{C($mod.'_name')}活动管理</a> ></b>
<b><a href="{U('member/order/v2_manage',array('goods_id' =>$pro['id']))}">审核订单</a></b>
</p>
</div>
<div class="user_index_content wrap-and clear">
{include template('v2_merchant_left','member/common')}
<div class="fr u_index_mess user_r_w_2">
<div class="s_right_wrap">
<h3 class="title s_bor_t">订单管理-{$pro['title']}</h3>
<ul class="s_s_list s_bor_t">
<li>活动类型:[{C($mod.'_name')}] </li>
<li>活动名称:<a href="{$pro['url']}" target="_blank"><span>{$pro['title']}</span></a></li>
<li>
{if $mod == 'weixin'}
分享奖励:¥
{else}
下单价:¥
{/if}
{$pro['goods_price']}</b></span>
{if $mod == 'trial' && $pro['goods_bonus'] > 0}
<strong class="cr" style="margin-left:6px;">赠送津贴<b>{$pro[goods_bonus]}</b>元</strong>
{elseif $mod == 'commission' && $pro['bonus_price']}
<strong class="cr" style="margin-left:6px;">试客津贴<b>{$pro[bonus_price]}</b>元</strong>
{/if}
</li>
<li class="clear">
<strong class="fl">库存情况:</strong>
<ul class="fl clear">
<li>总数<span class="cd">{$pro[goods_number]}</span>份</li>
<li>进行中<span class="cd">{$ing}</span>份</li>
<li>已完成<span class="cd">{get_over_trial_by_gid($pro[id])}</span>份</li>
<li>剩余<span class="cd">{php echo $pro[goods_number] - $pro[already_num]}</span>份</li>
</ul>
</li>
<li class="clear">
<strong class="fl">参与情况:</strong>
{if $mod == 'rebate'}
<ul class="fl clear">
<li>已抢购<span class="cd">{get_trial_by_gid($pro['id'])}</span>人</li>
<li>已通过<span class="cd">{get_trial_pass_by_gid($pro['id'])}</span>人</li>
<li>已放弃<span class="cd">{get_Close_order($pro['id'])}</span>人</li>
</ul>
{else}
<ul class="fl clear">
<li>总申请人数<span class="cd">{get_trial_by_gid($pro['id'])}</span>人</li>
<li>已通过<span class="cd">{get_trial_pass_by_gid($pro['id'])}</span>人申请</li>
<li>已放弃<span class="cd">{get_Close_order($pro['id'])}</span>人</li>
</ul>
{/if}
</li>
</ul>
<form action="{ACTION_NAME}" method="get">
<input type="hidden" name="m" value="Member">
<input type="hidden" name="c" value="order">
<input type="hidden" name="a" value="v2_manage">
<input type="hidden" name="goods_id" value="{$pro['id']}">
<input type="hidden" name="mod" value="{$mod}">
<p class="s_hd_status clear">
<select name="search_type" class="fl">
<option {if $search_type == 'order_sn'}selected{/if} value="order_sn">{get_shop_set($pro['source'],'name','bind')}订单号</option>
<option value="bind" {if $search_type == 'bind'}selected{/if}>{get_shop_set($pro['source'],'