You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simple-yewu/frontend/views/insurer/my-list-info.php

377 lines
18 KiB

5 years ago
<?php
use \common\libs\MyLib;
use common\models\PriceT;
5 years ago
?>
<?php $this->beginBlock('header_css'); ?>
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<form class="form-horizontal" id="orderFrm">
<input type="hidden" name="car_id" value="<?=$order_info->car_id?>">
<input type="hidden" name="order_id" value="<?=$order_info->id?>">
<input type="hidden" name="fanxian_id" value="<?=$order_info->fanxian_id?>">
<input type="hidden" name="celuo_id" value="<?=$order_info->celuo_id?>">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>保单信息</h5>
</div>
<div class="ibox-content">
<table class="table table-bordered">
<tr>
<th class="bg-warning">车牌号</th>
<td><?=$order_info->car_no?></td>
<th class="bg-warning" nowrap>初登日期</th>
<td><?=$car_info->register_date?></td>
<th class="bg-warning" nowrap>座位数</th>
<td><?=$order_info->seats?></td>
<th class="bg-warning" nowrap>电子邮件</th>
<td><?=$order_info->email?></td>
</tr>
<tr>
<th class="bg-warning">车型</th>
<td><?=$car_info->factory_model?></td>
<th class="bg-warning" nowrap>发动机号</th>
<td><?=$order_info->engine_no?></td>
<th class="bg-warning" nowrap>车架号</th>
<td><?=$order_info->car_frame_no?></td>
<th class="bg-warning" nowrap>新车购置价</th>
<td><?=$order_info->purchase_price?></td>
</tr>
<tr>
<th class="bg-warning">车主</th>
<td><?=$order_info->car_man?></td>
<th class="bg-warning">证件类型</th>
<td><?=$order_info->car_man_type?></td>
<th class="bg-warning">证件号码</th>
<td><?=$order_info->car_man_number?></td>
<th class="bg-warning">联系电话</th>
<td><?=$order_info->car_man_phone?></td>
</tr>
<tr>
<th class="bg-warning">被投保人</th>
<td><?=$order_info->id_man?></td>
<th class="bg-warning">证件类型</th>
<td><?=$order_info->id_man_type?></td>
<th class="bg-warning">证件号码</th>
<td><?=$order_info->id_man_number?></td>
<th class="bg-warning">联系电话</th>
<td><?=$order_info->id_man_phone?></td>
</tr>
<tr>
<th class="bg-warning">投保人</th>
<td><?=$order_info->link_man?></td>
<th class="bg-warning">证件类型</th>
<td><?=$order_info->link_man_type?></td>
<th class="bg-warning">证件号码</th>
<td><?=$order_info->link_man_number?></td>
<th class="bg-warning">联系电话</th>
<td><?=$order_info->link_man_phone?></td>
</tr>
<tr>
<th class="bg-warning" nowrap>商业起保日期</th>
<td><?=$order_info->insurer1_begin_date?></td>
<th class="bg-warning" nowrap>交强起保日期</th>
<td><?=$order_info->insurer2_begin_date?></td>
<th class="bg-warning">保险公司</th>
<td><?=$order_info->company->name?></td>
<th class="bg-warning">车辆使用性质</th>
<td><?=$order_info->car->carUse->name?></td>
</tr>
</table>
</div>
</div>
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>险种</h5>
</div>
<div class="ibox-content">
<table class="table table-bordered">
<tr>
<?php
$len = count($insurer_type_items);
$index = 0;
for($i = 0; $i < $len; $i++) {
$item = $insurer_type_items[$i];
$order_id = $order_info->id;
if(!$order_id)
$order_id = 0;
$tmp_row = PriceT::find()
->where('order_id='.$order_id.' and type_id='.$item->id)
->one();
if(!$tmp_row || $tmp_row->val == '' || $tmp_row->val == '否') continue;
?>
<th class="bg-warning">
<?=$item->name?>(<?=$item->code?>)
</th>
<td><?=$tmp_row->val?></td>
<td><?=($tmp_row->is_nopay == 1)?'不计免赔':''?></td>
<?php
if(($index+1)%3==0) {
echo '</tr>';
echo '<tr>';
}
$index++;
}
?>
</tr>
</table>
</div>
</div>
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>保费信息</h5>
</div>
<div class="ibox-content">
<table class="table table-bordered">
<tr>
<th class="bg-warning">商业总净保费</th>
<td><?=$order_info->total1_clear?></td>
<th class="bg-warning">商业含税总保费</th>
<td><?=$order_info->total1?></td>
<th class="bg-warning">车船税</th>
<td><?=$order_info->total3?></td>
</tr>
<tr>
<th class="bg-warning">交强总净保费</th>
<td><?=$order_info->total2_clear?></td>
<th class="bg-warning">交强含税总保费</th>
<td><?=$order_info->total2?></td>
<th class="bg-warning">业务自付金额</th>
<td><?=$order_info->yuangong_money?></td>
</tr>
<tr>
<th class="bg-warning">折扣后商业净保费</th>
<td><?=$order_info->total1_real?></td>
<th class="bg-warning">减免金额</th>
<td><?=$order_info->total1_dis?></td>
<th class="bg-warning">商业折扣率</th>
<td><?=$order_info->total1_percent?></td>
</tr>
<tr>
<th class="bg-warning">共计签单</th>
<td><?=$order_info->total_all?></td>
<th class="bg-warning">应收</th>
<td><?=$order_info->total_real?></td>
<th class="bg-warning">支付方式</th>
<td><?=$order_info->payType ? $order_info->payType->name : ''?></td>
</tr>
<tr>
<th class="bg-warning">备注</th>
<td colspan="5"><?=$order_info->price_remark?></td>
</tr>
</table>
</div>
</div>
<div id="gifts">
</div>
<div id="quans">
</div>
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>其他信息</h5>
</div>
<div class="ibox-content">
<table class="table table-bordered">
<tr>
<th class="bg-warning">领款人</th>
<td><?=$order_info->money_man?></td>
<th class="bg-warning">开户行</th>
<td><?=$order_info->money_bank?></td>
<th class="bg-warning">银行账号</th>
<td><?=$order_info->money_no?></td>
</tr>
<tr>
<th class="bg-warning">送单地址</th>
<td colspan="5" class="form-inline">
<?=$order_info->sendCity->name?>
<?=$order_info->sendDistrict->name?>
<?=$order_info->send_address?>
</td>
</tr>
<tr>
<th class="bg-warning">备注</th>
<td colspan="5"><?=$order_info->remark?></td>
</tr>
</table>
<div>
<div class="row">
<div class="col-md-5 col-md-offset-4">
<?php if($order_info->gift_status == 0) { ?>
<button type="button" class="btn btn-primary btn-save" type="button">
<strong>确认礼品</strong>
</button>
<?php } else if($my_id == 1) { ?>
<button type="button" class="btn btn-primary btn-gift" type="button">
<strong>取消确认礼品</strong>
</button>
<?php } ?>
<button type="button" class="btn btn-primary btn-back" type="button">
<strong>返 回</strong>
</button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script>
function getGifts(fanxian_id) {
$.get('/marketing-strategy/get-gifts?type=1&order_id=<?=$order_info->id?>&fanxian_id=' + fanxian_id, function(obj){
if(obj.success) {
var html = '<div class="ibox float-e-margins">';
html += '<div class="ibox-title">';
html += '<h5>礼品</h5>';
html += '</div>';
html += '<div class="ibox-content">';
obj.gifts.forEach(function(item, index) {
html += '<table class="table table-bordered">';
html += '<tr>';
html += '<th class="bg-warning">' + item.free_type + '</th>';
html += '</tr>';
html += '<tr>';
html += '<td>';
item.gifts.forEach(function(sub_item, sub_index) {
<?php if($order_info->gift_status == 0) { ?>
html += '<div class="checkbox checkbox-inline">';
html += '<input type="checkbox" id="gift_' + item.id + '_' + sub_item.id + '" name="gift_ids[]" value="' + item.id + '-' + sub_item.id + '"';
if(sub_item.selected == 1)
html += ' checked ';
html += '>';
html += '<label for="gift_' + item.id + '_' + sub_item.id + '">' + sub_item.name + '</label>';
html += '&nbsp;<a href="' + sub_item.original_img + '" target="_blank" title="预览"> <i class="fa fa-image"></i> </a>';
html += '</div>';
<?php } else { ?>
if(sub_item.selected == 1) {
html += '<div class="col-sm-4">' + sub_item.name;
html += '&nbsp;<a href="' + sub_item.gift_src + '" target="_blank" title="预览"> <i class="fa fa-image"></i> </a>';
html += '</div>';
}
<?php } ?>
});
html += '</td>';
html += '</tr>';
html += '</table>';
});
html += '</div>';
html += '</div>';
$('#gifts').html(html);
} else {
// parent.layer.msg(obj.msg);
}
}, 'json');
$.get('/marketing-strategy/get-gifts?type=2&order_id=<?=$order_info->id?>&fanxian_id=' + fanxian_id, function(obj){
if(obj.success) {
var html = '<div class="ibox float-e-margins">';
html += '<div class="ibox-title">';
html += '<h5>礼券</h5>';
html += '</div>';
html += '<div class="ibox-content">';
obj.gifts.forEach(function(item, index) {
html += '<table class="table table-bordered">';
html += '<tr>';
html += '<th class="bg-warning">' + item.free_type + '</th>';
html += '</tr>';
html += '<tr>';
html += '<td>';
item.gifts.forEach(function(sub_item, sub_index) {
<?php if($order_info->gift_status == 0) { ?>
html += '<div class="checkbox checkbox-inline">';
html += '<input type="checkbox" id="gift_' + item.id + '_' + sub_item.id + '" name="quan_ids[]" value="' + item.id + '-' + sub_item.id + '"';
if(sub_item.selected == 1)
html += ' checked ';
html += '>';
html += '<label for="gift_' + item.id + '_' + sub_item.id + '">' + sub_item.name + '</label>';
html += '&nbsp;<a href="' + sub_item.original_img + '" target="_blank" title="预览"> <i class="fa fa-image"></i> </a>';
html += '</div>';
<?php } else { ?>
if(sub_item.selected == 1) {
html += '<div class="col-sm-4">' + sub_item.name;
html += '&nbsp;<a href="' + sub_item.gift_src + '" target="_blank" title="预览"> <i class="fa fa-image"></i> </a>';
html += '</div>';
}
<?php } ?>
});
html += '</td>';
html += '</tr>';
html += '</table>';
});
html += '</div>';
html += '</div>';
$('#quans').html(html);
} else {
// parent.layer.msg(obj.msg);
}
}, 'json');
}
var o = {};
//判断是否填写了选项
function isNull(data){
if(data == "" || data == undefined || data == null){
return true;
}else{
return false;
}
}
$(function() {
$('.btn-back').click(function() {
5 years ago
window.location.href = '/insurer/my-list';
});
getGifts(<?=$order_info->fanxian_id?>);
$('.btn-gift').click(function() {
parent.layer.confirm('是否取消礼品确认?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
var params = $('#orderFrm').serialize();
var waiting = parent.layer.load(1, {
shade: [0.1,'#fff'] //0.1透明度的白色背景
});
$.post('/insurer/gift-un-save',params,function(data) {
parent.layer.close(waiting);
parent.layer.msg(data.msg);
if(data.success)
window.location.reload();
}, 'json');
}, function(){
//
});
});
$('.btn-save').click(function () {
parent.layer.confirm('注意:一旦确认礼品修改,则无法修改更换礼品??', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
parent.layer.confirm('再次确认修改礼品?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
var params = $('#orderFrm').serialize();
var waiting = parent.layer.load(1, {
shade: [0.1,'#fff'] //0.1透明度的白色背景
});
$.post('/insurer/gift-save',params,function(data) {
parent.layer.close(waiting);
parent.layer.msg(data.msg);
if(data.success)
window.location.reload();
}, 'json');
}, function(){
//
});
}, function(){
//
});
});
5 years ago
});
</script>
<?php $this->endBlock(); ?>