作者 anyv
1 个管道 的构建 通过 耗费 25 秒

12

... ... @@ -394,6 +394,20 @@ class SalesmanController extends AdminBaseController{
}
}
dump($data);die;*/
if(!empty($data)){
foreach ($data as $key => $val){
if($val['type'] == 2){
$indent_good = Db::name('indent_goods') -> where('indent_id',$val['indent_id']) -> select() -> toArray();
$indent_goods = '';
foreach ($indent_good as $key1 => $val1){
$indent_goods .= $val1['book_name'].',';
}
$data[$key]['indent_good'] = $indent_goods;
}else{
$data[$key]['indent_good'] = $val['book_name'];
}
}
}
$this -> assign('data',$data);
return $this -> fetch();
... ...
... ... @@ -139,7 +139,23 @@ class UsersController extends AdminBaseController{
public function users_money(){
$uid = $this -> request -> param();
$data = Db::name('money_income') -> where('uid',$uid['uid']) -> select();
$data = Db::name('money_income') -> where('uid',$uid['uid']) -> select() -> toArray();
if(!empty($data)){
foreach ($data as $key => $val){
if($val['type'] == 2){
$data[$key]['indent'] = Db::name('indent') -> where('id',$val['indent_id']) -> find();
$indent_good = Db::name('indent_goods') -> where('indent_id',$val['indent_id']) -> select() -> toArray();
$indent_goods = '';
foreach ($indent_good as $key1 => $val1){
$indent_goods .= $val1['book_name'].',';
}
$data[$key]['indent_good'] = $indent_goods;
}else{
$data[$key]['indent'] = Db::name('indent') -> where('id',$val['indent_id']) -> find();
$data[$key]['indent_good'] = $val['book_name'];
}
}
}
$this -> assign('data',$data);
return $this -> fetch();
... ...
... ... @@ -10,6 +10,9 @@
<thead>
<tr>
<th>收入时间</th>
<th>收入类别</th>
<th>订单号</th>
<th>书籍</th>
<th>金额</th>
</tr>
</thead>
... ... @@ -17,6 +20,17 @@
<volist name="data" id="vo">
<tr>
<td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
<td>
<if condition="$vo.type eq 1">
平台收入
<else/>
团购收入
</if>
</td>
<td>{$vo.order_number}</td>
<td>
{$vo.indent_good}
</td>
<td>{$vo.money}</td>
</tr>
</volist>
... ...
... ... @@ -10,6 +10,9 @@
<thead>
<tr>
<th>收入时间</th>
<th>收入类别</th>
<th>订单号</th>
<th>书籍</th>
<th>金额</th>
</tr>
</thead>
... ... @@ -17,6 +20,17 @@
<volist name="data" id="vo">
<tr>
<td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
<td>
<if condition="$vo.type eq 1">
平台收入
<else/>
团购收入
</if>
</td>
<td>{$vo.indent.order_number}</td>
<td>
{$vo.indent_good}
</td>
<td>{$vo.money}</td>
</tr>
</volist>
... ...
... ... @@ -91,7 +91,7 @@
</div>
<!-- 小标题 -->
<div class="xiaoyuan_tuangou">
<div class="in_campust2">超值特卖,团购立减100元!</div>
<div class="in_campust2">限量优惠天天抢</div>
<div class="in_campusTitle3">
更多
<a href="{:url('Index/salesman_goods')}">
... ...
... ... @@ -94,11 +94,11 @@
<!--<div class="myorder_bottom2_2">查看订单</div>-->
<!--</a>-->
<elseif condition="$vo.state eq 5"/>
<if condition="$vo.is_courier eq 2">
<a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}">
<div class="myorder_bottom2_2">查看物流</div>
</a>
</if>
<div class="myorder_bottom2_2 delivery" data-id="{$vo.id}">确认收货</div>
<elseif condition="$vo.state eq 3"/>
<!--<div class="myorder_bottom2_2">去评价</div>-->
... ...
... ... @@ -88,18 +88,16 @@
<p>分类</p>
</li>
</a>
<a href="w_shopping_cart.html">
<a href="{:url('Shopcart/shop_cart')}">
<li>
<img src="__TMPL__/public/assets/images/17.png" alt="" />
<p>购物车</p>
</li>
</a>
<a href="log_one.html">
<li>
<img src="__TMPL__/public/assets/images/19.png" alt="" />
<p style="color:#FF7700;">我的</p>
</li>
</a>
</ul>
</div>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
... ...
... ... @@ -148,7 +148,7 @@
$.post("{:url('Shopcart/shop_cart_pay')}",{id:goods_id,myprice:myprice},function(data){
obj = JSON.parse(data);
if(obj.type == 3){
alert('业务员商品和平台商品不能同时购买!');
alert('团购商品和热销商品请分别付款');
}else if(obj.type == 1){
window.location.href = "{:url('Orderpage/order_page')}?indet_id="+obj.indet_id;
}else if(obj.type == 2){
... ...
... ... @@ -1566,11 +1566,12 @@ cursor: pointer;
padding: 0.14rem 0 0.08rem 0!important;
cursor: pointer;
display: flex;
justify-content: space-around;
/*justify-content: space-around;*/
align-items: center
}
.log_five_handle_one {
width: 25%;
display: flex;
flex-direction: column;
cursor: pointer;
... ...