Merge branch 'feature/group_type' of 47.111.118.107:wmtx/platform into feature/group_type

master
zhengyongxing 5 years ago
commit 2b335ec910

@ -1828,69 +1828,170 @@ function getCompanyList() {
}
function excelUpStreamTemplate() {
header("Content-type: text/html; charset=gb2312");
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
//上游cp对账单导出
function excelUpStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_all_sum_money) {
header("Content-type: text/html; charset=gb2312");
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
date_default_timezone_set('Europe/London');
Vendor("PHPExcel.PHPExcel");
$objReader = \PHPExcel_IOFactory::createReader('Excel5');
//设置模板文件
$objPHPExcel = $objReader->load("Public/Admin/excel/up_stream.xls");
//增加甲方信息
$objPHPExcel->getActiveSheet()->setCellValue('D2', $data['first_party_info']['partner']);
$objPHPExcel->getActiveSheet()->setCellValue('D3', $data['first_party_info']['link_man']);
$objPHPExcel->getActiveSheet()->setCellValue('D4', $data['first_party_info']['link_phone']);
$objPHPExcel->getActiveSheet()->setCellValue('D5', $data['first_party_info']['address']);
$objPHPExcel->getActiveSheet()->setCellValue('D6', $data['first_party_info']['company_tax_no']);
//增加乙方信息
$objPHPExcel->getActiveSheet()->setCellValue('J2', $data['second_party_info']['partner']);
$objPHPExcel->getActiveSheet()->setCellValue('J3', $data['second_party_info']['link_man']);
$objPHPExcel->getActiveSheet()->setCellValue('J4', $data['second_party_info']['link_phone']);
$objPHPExcel->getActiveSheet()->setCellValue('J5', $data['second_party_info']['address']);
$objPHPExcel->getActiveSheet()->setCellValue('J6', $data['second_party_info']['company_tax_no']);
$objPHPExcel->getActiveSheet()->setCellValue('D7', $data['receive_company']['partner']); //增加支付给对应公司
$line = 10;
//增加结算记录
foreach ($data['statement_info'] as $key => $value) {
$objPHPExcel->getActiveSheet()->insertNewRowBefore($line,1)->mergeCells("J$line:K$line");
$objPHPExcel->getActiveSheet()->setCellValue('C'.$line, $value['statement_begin_time'] . '-' . $value['statement_end_time']);
if ($value['statement_type'] == 1) {
$product_name = $value['type_name'];
$objPHPExcel->getActiveSheet()->setCellValue('F'.$line , '-');
$objPHPExcel->getActiveSheet()->setCellValue('G'.$line, '-');
$objPHPExcel->getActiveSheet()->setCellValue('H'.$line, '-');
$objPHPExcel->getActiveSheet()->setCellValue('I'.$line, '-');
} else {
$product_name = $value['game_name'];
$objPHPExcel->getActiveSheet()->setCellValue('F'.$line , $value['first_ratio'] . '%');
$objPHPExcel->getActiveSheet()->setCellValue('G'.$line, $value['second_ratio'] . '%');
$objPHPExcel->getActiveSheet()->setCellValue('H'.$line, $value['promote_ratio'] . '%');
$objPHPExcel->getActiveSheet()->setCellValue('I'.$line, $value['fax_ratio']. '%');
}
$objPHPExcel->getActiveSheet()->setCellValue('D'.$line, $product_name);
$objPHPExcel->getActiveSheet()->setCellValue('E'.$line, $value['pay_amount']);
date_default_timezone_set('Europe/London');
Vendor("PHPExcel.PHPExcel");
$objPHPExcel = new \PHPExcel();
$objReader = \PHPExcel_IOFactory::createReader('Excel5');
$objPHPExcel->getActiveSheet()->setCellValue('J'.$line, $value['sum_money']);
$line++;
}
//设置模板文件
$objPHPExcel = $objReader->load("Runtime/upstream.xls");
//合计
$objPHPExcel->getActiveSheet()->setCellValue("E" . ($line), $all_sum_money);
$objPHPExcel->getActiveSheet()->setCellValue("J" . ($line), $all_pay_amount);
$objPHPExcel->getActiveSheet()->setCellValue("J" . ($line+1), $big_all_sum_money); //本月分成总金额(人民币大写)
$objPHPExcel->getActiveSheet()->setCellValue('D2', 'chengzhi');
//收款方
$objPHPExcel->getActiveSheet()->setCellValue("D" . ($line+2), $data['receive_company']['partner']);
$objPHPExcel->getActiveSheet()->setCellValue("D" . ($line+3), $data['receive_company']['bank_account']);
$objPHPExcel->getActiveSheet()->setCellValue("D" . ($line+4), $data['receive_company']['opening_bank']);
$objPHPExcel->getActiveSheet()->insertNewRowBefore(10,1)->mergeCells('J10:K10')->insertNewRowBefore(10,1)->mergeCells('J10:K10');
//付款方
$objPHPExcel->getActiveSheet()->setCellValue("J" . ($line+2), $data['pay_company']['partner']);
$objPHPExcel->getActiveSheet()->setCellValue("J" . ($line+3), $data['pay_company']['bank_account']);
$objPHPExcel->getActiveSheet()->setCellValue("J" . ($line+4), $data['pay_company']['opening_bank']);
ob_end_clean();//清除缓冲区,避免乱码
header('pragma:public');
header('Content-type:application/vnd.ms-excel;charset=utf-8;name="上游结算单.xls"');
header("Content-Disposition:attachment;filename=上游结算单.xls");//attachment新窗口打印inline本窗口打印
$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
exit;
ob_end_clean();//清除缓冲区,避免乱码
header('pragma:public');
header('Content-type:application/vnd.ms-excel;charset=utf-8;name="15415.xls"');
header("Content-Disposition:attachment;filename=15415.xls");//attachment新窗口打印inline本窗口打印
$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
exit;
}
}
//下游工会对账单导出
function excelDownStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_all_sum_money) {
function excelDownStreamTemplate() {
header("Content-type: text/html; charset=gb2312");
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
header("Content-type: text/html; charset=utf-8");
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
date_default_timezone_set('Europe/London');
Vendor("PHPExcel.PHPExcel");
$objPHPExcel = new \PHPExcel();
$objReader = \PHPExcel_IOFactory::createReader('Excel5');
date_default_timezone_set('Europe/London');
Vendor("PHPExcel.PHPExcel");
$objPHPExcel = new \PHPExcel();
$objReader = \PHPExcel_IOFactory::createReader('Excel5');
//设置模板文件
$objPHPExcel = $objReader->load("upstream.xls");
//设置模板文件
$objPHPExcel = $objReader->load("Public/Admin/excel/down_stream.xls");
$statement_begin_time = set_show_time($data['statement_begin_time']);//对账开始时间
$statement_end_time = set_show_time($data['statement_end_time']);//对账截止时间
$objPHPExcel->getActiveSheet()->setCellValue('A1', "《 {$data['company_name']} 》结算单
{$statement_begin_time}-{$statement_end_time}");
$objPHPExcel->getActiveSheet()->setCellValue('D2', 'chengzhi');
if ($data['second_party_info']['settlement_type'] == '补点订单') {
$objPHPExcel->getActiveSheet()->setCellValue('D2' , '补点比例');
}
$objPHPExcel->getActiveSheet()->insertNewRowBefore(10,1);
$line = 3;
foreach ($data['statement_info'] as $key => $value) {
$objPHPExcel->getActiveSheet()->insertNewRowBefore($line,1);
$objPHPExcel->getActiveSheet()->removeConditionalStyles();
ob_end_clean();//清除缓冲区,避免乱码
header('pragma:public');
header('Content-type:application/vnd.ms-excel;charset=utf-8;name="15415.xls"');
header("Content-Disposition:attachment;filename=15415.xls");//attachment新窗口打印inline本窗口打印
$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
exit;
$objPHPExcel->getActiveSheet()->setCellValue('A'.$line, $value['statement_begin_time'] . '-' . $value['statement_end_time']);
if ($value['statement_type'] == 1) {
$product_name = $value['type_name'];
$objPHPExcel->getActiveSheet()->setCellValue('D'.$line, '-');
$objPHPExcel->getActiveSheet()->setCellValue('E'.$line, '-');
} else {
$product_name = $value['game_name'];
$objPHPExcel->getActiveSheet()->setCellValue('D'.$line, $value['second_ratio'] . '%');
$objPHPExcel->getActiveSheet()->setCellValue('E'.$line, $value['fax_ratio'] . '%');
}
$objPHPExcel->getActiveSheet()->setCellValue('B'.$line, $product_name);
$objPHPExcel->getActiveSheet()->setCellValue('C'.$line, $value['pay_amount']);
$objPHPExcel->getActiveSheet()->setCellValue('F'.$line, $value['sum_money']);
$line++;
}
$objPHPExcel->getActiveSheet()->setCellValue('C'.($line), $all_sum_money);//合计-平台总额
$objPHPExcel->getActiveSheet()->setCellValue('F'.($line), $all_pay_amount);//合计-结算金额
$objPHPExcel->getActiveSheet()->setCellValue('B'.($line+1), $big_all_sum_money);//大写支付结算金额
//甲方信息
$objPHPExcel->getActiveSheet()->setCellValue('B'.($line+3), $data['first_party_info']['jfCompany']);//甲方
$objPHPExcel->getActiveSheet()->setCellValue('B'.($line+4), $data['first_party_info']['jfPerson']);//联系人
$objPHPExcel->getActiveSheet()->setCellValue('B'.($line+5), $data['first_party_info']['jfTel']);//联系电话
$objPHPExcel->getActiveSheet()->setCellValue('B'.($line+6), $data['second_party_info']['invoice_item']);//开票项目
$objPHPExcel->getActiveSheet()->setCellValue('B'.($line+7), $data['second_party_info']['invoice_type']);//发票类型
//乙方信息
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+3), $data['second_party_info']['partner']);//乙方
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+4), $data['second_party_info']['link_man']);//联系人
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+5), $data['second_party_info']['link_phone']);//联系电话
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+6), $data['second_party_info']['address']);//邮寄地址
// $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+8), $value['pay_amount']);//请汇入此账号
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+8), $data['second_party_info']['bank_account_name']);//户名
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+9), $data['second_party_info']['bank_account']);//银行账号
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+10), $data['second_party_info']['opening_bank']);//开户行
$filename = '下游结算单';
ob_end_clean();//清除缓冲区,避免乱码
header('pragma:public');
header('Content-type:application/vnd.ms-excel;charset=utf-8;name="15415.xls"');
header("Content-Disposition:attachment;filename=$filename.xls");//attachment新窗口打印inline本窗口打印
$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
exit;
}
}
function getWithdrawNumber() {

@ -775,4 +775,78 @@ function camelize($str, $separator = '_', $littleHump = false)
function unCamelize($str, $separator = '_')
{
return strtolower(preg_replace('/([a-z])([A-Z])/', "$1" . $separator . "$2", $str));
}
}
function convertAmountToCn($num) {
//判断$num是否存在
if(!$num) return '零圆';
//保留小数点后两位
$num = round($num, 2);
//将浮点转换为整数
$tem_num = $num * 100;
//判断数字长度
$tem_num_len = strlen($tem_num);
if($tem_num_len > 14) {
return '数值过大';
}
//大写数字
$dint = array('零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖');
//大写金额单位
$danwei = array('仟', '佰', '拾', '亿', '仟', '佰', '拾', '万', '仟', '佰', '拾', '圆');
$danwei1 = array('角', '分');
//空的变量用来保存转换字符串
$daxie = '';
//分割数字,区分圆角分
list($left_num, $right_num) = explode('.', $num);
//计算单位长度
$danwei_len = count($danwei);
//计算分割后的字符串长度
$left_num_len = strlen($left_num);
$right_num_len = strlen($right_num);
//循环计算亿万元等
for($i = 0; $i < $left_num_len; $i++) {
//循环单个文字
$key_ = substr($left_num, $i, 1);
//判断数字不等于0或数字等于0与金额单位为亿、万、圆就返回完整单位的字符串
if($key_ !== '0' || ($key_ == '0' && ($danwei[$danwei_len - $left_num_len + $i] == '亿' || $danwei[$danwei_len - $left_num_len + $i] == '万' || $danwei[$danwei_len - $left_num_len + $i] == '圆'))) {
$daxie = $daxie . $dint[$key_] . $danwei[$danwei_len - $left_num_len + $i];
} else {
//否则就不含单位
$daxie = $daxie . $dint[$key_];
}
}
//循环计算角分
for($i = 0; $i < $right_num_len; $i++) {
$key_ = substr($right_num, $i, 1);
if($key_ > 0) {
$daxie = $daxie . $dint[$key_] . $danwei1[$i];
}
}
//计算转换后的长度
$daxie_len = strlen($daxie);
//设置文字切片从0开始utf-8汉字占3个字符
$j = 0;
while($daxie_len > 0) {
//每次切片两个汉字
$str = substr($daxie, $j, 6);
//判断切片后的文字不等于零万、零圆、零亿、零零
if($str == '零万' || $str == '零圆' || $str == '零亿' || $str == '零零') {
//重新切片
$left = substr($daxie, 0, $j);
$right = substr($daxie, $j + 3);
$daxie = $left . $right;
}
$j += 3;
$daxie_len -= 3;
}
return $daxie . '整';
}

@ -83,6 +83,12 @@ class PartnerController extends ThinkController
if (empty($partner)) {
$this->error('请输入合作方名称');
}
if (empty(I('link_man'))) {
$this->error('请输入联系人');
}
if (empty(I('link_phone'))) {
$this->error('请输入联系电话');
}
if (!in_array($status, [0, 1])) {
$this->error('参数异常');
}
@ -93,10 +99,14 @@ class PartnerController extends ThinkController
if ($res) {
$this->error('合作方已存在');
}
if(!preg_match("/^1[358][0-9]{9}$/u",I('link_phone'))) {
$this->error('联系电话格式不正确');
}
$res2 = $model->where(['link_phone' => I('link_phone')])->getField('id');
if ($res2) {
$this->error('已存在此联系电话');
}
$time = time();
$save['partner'] = $partner;
$save['status'] = $status;
@ -140,6 +150,12 @@ class PartnerController extends ThinkController
if (empty($partner)) {
$this->error('请输入合作方名称');
}
if (empty(I('link_man'))) {
$this->error('请输入联系人');
}
if (empty(I('link_phone'))) {
$this->error('请输入联系电话');
}
if (!in_array($status, [0, 1]) || $id == 0) {
$this->error('参数异常');
}
@ -160,7 +176,14 @@ class PartnerController extends ThinkController
if(!preg_match("/^1[358][0-9]{9}$/u",I('link_phone'))) {
$this->error('联系电话格式不正确');
}
$res2 = $model->where([
'link_phone' => I('link_phone'),
'id' => ['neq', $id]
])->getField('id');
if ($res2) {
$this->error('已存在此联系电话');
}
$time = time();
$save['id'] = $id;
$save['partner'] = $partner;

@ -221,8 +221,8 @@ class PromoteController extends ThinkController
if ($this->accountExist($account)) {
$this->error('该账号已存在');
}
$company_belong = $_REQUEST['company_belong'];
$company_relation = $_REQUEST['company_relation'];
$company_belong = $_REQUEST['company_belong'] ?? 0;
$company_relation = $_REQUEST['company_relation'] ?? 0;
$data = array(
'account'=>$account,
'password'=>$password,
@ -347,12 +347,12 @@ class PromoteController extends ThinkController
if ($promote['company_id'] != $company_id) {
$array['company_id'] = I('company_id');
}
if ($promote['company_belong'] != I('company_belong')) {
$array['company_belong'] = I('company_belong');
}
if ($promote['company_relation'] != I('company_relation')) {
$array['company_relation'] = I('company_relation');
}
// if ($promote['company_belong'] != I('company_belong')) {
// $array['company_belong'] = I('company_belong');
// }
// if ($promote['company_relation'] != I('company_relation')) {
// $array['company_relation'] = I('company_relation');
// }
if ($array) {
$res = M("promote", "tab_")->where("chain like '%/{$_POST['id']}/%'")->save($array);
}
@ -1292,6 +1292,16 @@ class PromoteController extends ThinkController
$verify_status = $_REQUEST['verify_status'];
$res = M('promote_belong', 'tab_')->where(['id' => ['in', I('ids')]])->save(['verify_status' => $verify_status]);
if (!is_null($res)) {
$promote_belongs = M('promote_belong', 'tab_')->where(['id' => ['in', I('ids')]])->select();
foreach ($promote_belongs as $promote_belong) {
$update = [
'company_belong' => $promote_belong['company_belong'],
'company_relation' => $promote_belong['company_relation']
];
$res = M("promote", "tab_")
->where("chain like '%/{$promote_belong['promote_id']}/%' or id={$promote_belong['promote_id']} ")
->save($update);
}
$this->success("操作成功", U('belong'));
} else {
$this->error('操作失败');

@ -69,13 +69,101 @@ class PublicController extends \Think\Controller
}
}
/**
* 后台用户登录
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
public function cp_login($mobile = null, $verify = null)
{
if (IS_POST) {
/* 检测验证码 TODO: */
// $this->checksafecode($mobile, $verify, false);
$promote = M('promote', 'tab_')->where([
'mobile_phone' => $mobile,
'level' => 1,
])->find();
if ($promote) {
/* 记录登录SESSION和COOKIES */
$cp_auth = array(
'user_id' => $promote['id'],
'account' => $promote['account'],
'mobile_phone' => $promote['mobile_phone'],
'nickname' => $promote['nickname'],
'username' => $promote['nickname'] ?: $promote['account'],
);
$session_name = 'cp_user_auth';
if (I('auto_login')) {
session(['name' => $session_name, 'expire' => 60*60*24*30], $cp_auth);
session(['name' => $session_name.'_sign', 'expire' => 60*60*24*30], data_auth_sign($cp_auth));
} else {
session($session_name, $cp_auth);
session($session_name.'_sign', data_auth_sign($cp_auth));
}
$uid = $promote['id'];
} else {
$partner = M('partner', 'tab_')->where(['link_man' => $mobile,])->find();
if ($partner) {
/* 记录登录SESSION和COOKIES */
$cp_auth = array(
'user_id' => $partner['id'],
'account' => $partner['link_phone'],
'mobile_phone' => $partner['link_phone'],
'nickname' => $partner['link_man'],
'username' => $partner['link_man'] ?: $partner['account'],
);
$session_name = 'cp_user_auth';
if (I('auto_login')) {
session(['name' => $session_name, 'expire' => 60*60*24*30], $cp_auth);
session(['name' => $session_name.'_sign', 'expire' => 60*60*24*30], data_auth_sign($cp_auth));
} else {
session($session_name, $cp_auth);
session($session_name.'_sign', data_auth_sign($cp_auth));
}
$uid = $promote['id'];
}
}
if (0 < $uid) { //UC登录成功
/* 登录用户 */
$this->success('登录成功!', U('VerifyBill/index'));
} else { //登录失败
$this->error('该账号没有权限登录对账系统');
}
} else {
if (session('cp_user_auth')) {
$this->redirect('VerifyBill/index');
} else {
/* 读取数据库中的配置 */
$config = S('DB_CONFIG_DATA');
if (!$config) {
$config = D('Config')->lists();
S('DB_CONFIG_DATA', $config);
}
C($config); //添加配置
$this->display();
}
}
}
public function cp_logout()
{
session('cp_user_auth', null);
session('cp_user_auth_sign', null);
$this->redirect('cp_login');
}
/* 退出登录 */
public function logout()
{
if (is_login()) {
D('Member')->logout();
session('[destroy]');
session('user_auth_promote_ids');
session('user_auth', null);
session('user_auth_sign', null);
session('user_auth_promote_ids', null);
cookie('think_language', Null);
// $this->success('退出成功!', U('login'));
$this->ajaxReturn(array('status' => 1, 'msg' => '退出成功!'));
@ -238,4 +326,48 @@ class PublicController extends \Think\Controller
cookie('think_language', 'en-us');
$this->ajaxReturn(['status' => 1]);
}
/**
* 发动手机验证码
*/
public function telsafecode($phone = '', $delay = 10, $flag = true)
{
$result = R('Common/Sms/send_sms_code', array($phone, $delay, false));
if ($result['code'] == 200) {
$data['status'] = 1;
$data['data'] = $result['data'];
} else {
$data['status'] = 0;
}
$data['msg'] = $result['msg'];
echo json_encode($data);
exit;
}
/**
* 手机安全码验证
* @param bool $flag true 用于直接异步请求 false 用于方法调用
* @param [type] $vcode [description]
*/
public function checksafecode($phone, $vcode, $flag = true)
{
$result = R('Common/Sms/verify_sms_code', array($phone, $vcode, false));
if ($result['code'] == 200) {
$data['status'] = 1;
if ($flag) {
echo json_encode($data);
exit;
}
} else {
$data['status'] = 0;
$data['msg'] = $result['msg'];
echo json_encode($data);
exit;
}
}
}

@ -0,0 +1,106 @@
<?php
namespace Admin\Controller;
use User\Api\UserApi as UserApi;
use Base\Service\PromoteService as PromoteService;
use Think\Controller;
/**
* 后台首页控制器
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
class VerifyBillController extends Controller {
/**
* VerifyBillController constructor.
*/
public function __construct()
{
parent::__construct();
if (empty(session('cp_user_auth'))) {
redirect('admin.php?s=public/cp_login.html');
}
}
/**
*
*/
public function index(){
$m_title = '对账单管理';
$list_data = DM('statement')->order('create_time desc')->select();
foreach ($list_data as $key => $value) {
$list_data[$key]['statement_type_str'] = $value['statement_type'] ? '工会对账单' : 'cp对账单';
}
$this->assign('list_data', $list_data);
$this->assign('meta_title', $m_title);
$this->display();
}
public function show()
{
$id = I('id');
$data = DM('statement')->where(['id' => $id])->find();
$data['first_party_info'] = json_decode($data['first_party_info'], 1);//甲方
$data['second_party_info'] = json_decode($data['second_party_info'], 1);//乙方
$data['statement_info'] = json_decode($data['statement_info'], 1);//结算记录
//收款方
$data['receive_company'] = $data['pay_type'] ? $data['first_party_info']['partner'] : $data['second_party_info']['partner'];
// dd($data);
$all_sum_money = array_sum(array_column($data['statement_info'], 'sum_money'));//合计平台总额
$all_pay_amount = array_sum(array_column($data['statement_info'], 'pay_amount'));//合计结算金额
$big_all_sum_money = convertAmountToCn($all_sum_money);//大写
$this->assign('big_all_sum_money', $big_all_sum_money);
$this->assign('all_sum_money', $all_sum_money);
$this->assign('all_pay_amount', $all_pay_amount);
$this->assign('data', $data);
$this->assign('from', I('from'));
if ($data['statement_type'] == 1) {//下游
$template = 'company_show';
} else {
$template = 'partner_show';//上游
}
$this->display($template);
}
public function confirm()
{
$id = I('id');
$res = DM('statement')->where(['id' => $id])->save(['is_confirm' => 1]);
if ($res) {
$this->success("操作成功", U('index'));
} else {
$this->error('操作失败');
}
}
/**
*导出excell
* @param int id
*/
public function export()
{
$id = I('id');
$data = DM('statement')->where(['id' => $id])->find();
$data['first_party_info'] = json_decode($data['first_party_info'], 1);//甲方
$data['second_party_info'] = json_decode($data['second_party_info'], 1);//乙方
$data['statement_info'] = json_decode($data['statement_info'], 1);//结算记录
//收款方
// dd($data);
$all_sum_money = array_sum(array_column($data['statement_info'], 'sum_money'));//合计平台总额
$all_pay_amount = array_sum(array_column($data['statement_info'], 'pay_amount'));//合计结算金额
$big_all_sum_money = convertAmountToCn($all_sum_money);//大写
$data['receive_company'] = $data['pay_type'] ? $data['first_party_info'] : $data['second_party_info'];
$data['pay_company'] = $data['pay_type'] ? $data['second_party_info'] : $data['first_party_info'];
dd($data['statement_info']);
if ($data['statement_type'] == 1) {//下游
excelDownStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_all_sum_money);
} else {//上游
excelUpStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_all_sum_money);
}
}
}

@ -414,6 +414,7 @@ class PromoteModel extends Model{
foreach ($result as $key => $value) {
$parseData[$key] = $value;
$parseData[$key]['company_belong_str'] = $value['company_belong'] ? '外团' : '内团';
$parseData[$key]['company_relation_str'] = $value['company_belong'] ? '只维护' : '自主开发及维护';
}
return $parseData;
}

@ -67,35 +67,35 @@
</td>
</tr>
<tr>
<td class="l">工会归属:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label >
<input type="radio" value="0" name="company_belong" checked="checked" class="company_belong"> 内团
</label >
<label >
<input type="radio" value="1" name="company_belong" class="company_belong"> 外团
</label>
</span>
<!-- <span class="notice-text"></span>-->
</td>
</tr>
<tr style="display: none" id="company_relation">
<td class="l">工会关系:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label >
<input type="radio" value="0" name="company_relation" checked="checked"> 自主开发及维护
</label >
<label >
<input type="radio" value="1" name="company_relation" > 只维护
</label>
</span>
<!-- <span class="notice-text"></span>-->
</td>
</tr>
<!-- <tr>-->
<!-- <td class="l">工会归属:</td>-->
<!-- <td class="r table_radio">-->
<!-- <span class="form_radio table_btn">-->
<!-- <label >-->
<!-- <input type="radio" value="0" name="company_belong" checked="checked" class="company_belong"> 内团-->
<!-- </label >-->
<!-- <label >-->
<!-- <input type="radio" value="1" name="company_belong" class="company_belong"> 外团-->
<!-- </label>-->
<!-- </span>-->
<!--&lt;!&ndash; <span class="notice-text"></span>&ndash;&gt;-->
<!-- </td>-->
<!-- </tr>-->
<!-- <tr style="display: none" id="company_relation">-->
<!-- <td class="l">工会关系:</td>-->
<!-- <td class="r table_radio">-->
<!-- <span class="form_radio table_btn">-->
<!-- <label >-->
<!-- <input type="radio" value="0" name="company_relation" checked="checked"> 自主开发及维护-->
<!-- </label >-->
<!-- <label >-->
<!-- <input type="radio" value="1" name="company_relation" > 只维护-->
<!-- </label>-->
<!-- </span>-->
<!--&lt;!&ndash; <span class="notice-text"></span>&ndash;&gt;-->
<!-- </td>-->
<!-- </tr>-->
<tr>
<td class="l">真实姓名:</td>

@ -195,7 +195,7 @@
</td>
</tr>
<!--如果是会长可编辑,其他人只能查看-->
<if condition="$data['level'] == 1">
<!-- <if condition="$data['level'] == 1">
<tr>
<td class="l">工会归属:</td>
<td class="r table_radio">
@ -215,7 +215,7 @@
name="company_belong" class="company_belong"> 外团
</label>
</span>
<!-- <span class="notice-text"></span>-->
&lt;!&ndash; <span class="notice-text"></span>&ndash;&gt;
</td>
</tr>
@ -234,11 +234,11 @@
name="company_relation" > 只维护
</label>
</span>
<!-- <span class="notice-text"></span>-->
&lt;!&ndash; <span class="notice-text"></span>&ndash;&gt;
</td>
</tr>
<else/>
<!--非会长只能查看-->
&lt;!&ndash;非会长只能查看&ndash;&gt;
<tr>
<td class="l">工会归属:</td>
<td class="r table_radio">
@ -250,7 +250,7 @@
<input type="radio" value="1" <?php echo (1 == $data['company_belong'] ? 'checked':''); ?> disabled="disabled" name="company_belong" class="company_belong"> 外团
</label>
</span>
<!-- <span class="notice-text"></span>-->
&lt;!&ndash; <span class="notice-text"></span>&ndash;&gt;
</td>
</tr>
@ -265,10 +265,10 @@
<input type="radio" value="1" <?php echo (1 == $data['company_relation'] ? 'checked':''); ?> disabled="disabled" name="company_relation" > 只维护
</label>
</span>
<!-- <span class="notice-text"></span>-->
&lt;!&ndash; <span class="notice-text"></span>&ndash;&gt;
</td>
</tr>
</if>
</if>-->
<tr>

@ -185,6 +185,7 @@
<th>渠道类型</th>
<th>所属会长</th>
<th>工会归属</th>
<th>工会关系</th>
<th>商务专员</th>
<th>状态</th>
<th>身份状态</th>
@ -233,6 +234,7 @@
</if>
</td>
<td>{$data['company_belong_str']}</td>
<td>{$data['company_relation_str']}</td>
<td>{:get_business_affairs_account($data['ba_id'])}</td>
<td>
<?php $status_str = get_info_status($data['status'],3); $status_str = $status_str ?: '待审核';?>

@ -0,0 +1,387 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>{$meta_title}-{:C('WEB_SITE_TITLE')}</title>
<link href="{:get_cover(C('SITE_ICO'),'path')}" type="image/x-icon" rel="shortcut icon">
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/module.css">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<block name="css"></block>
<link rel="stylesheet" type="text/css" href="__CSS__/{$Think.config.COLOR_STYLE}.css" media="all">
<!--[if lt IE 9]>
<script type="text/javascript" src="__STATIC__/jquery-1.10.2.min.js"></script>
<![endif]--><!--[if gte IE 9]><!-->
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__STATIC__/jquery.cookie.js"></script>
<script type="text/javascript" src="__JS__/jquery.mousewheel.js"></script>
<!--<![endif]-->
<block name="style"></block>
<style>
.select2-dropdown {
z-index: 1;
}
</style>
</head>
<body>
<!-- 头部 -->
<div class="header">
<!-- Logo -->
<span class="logo">
<img src="{:get_cover(C('HT_LOGO'),'path')}" style="width:160px;height: auto;margin-top: 10px;">
</span>
<!-- /Logo -->
<!-- 主导航 -->
<ul class="main-nav ienav">
<volist name="__MENU__.main" id="menu">
<li class="{$menu.class|default=''}"><a href="{$menu.url|U}"><p><i class="guidicon guidicon-{$menu.id}"></i></p><h5>{:L($menu['title'])}</h5></a></li>
</volist>
</ul>
<!-- /主导航 -->
<!-- 用户栏 -->
<div class="topright">
<ul>
<!-- <li><span><img src="__IMG__/help.png" title="帮助" class="helpimg"></span><a href="http://xue.vlcms.com/" target="_blank">帮助</a></li>-->
<li class="subjectlist jssubject">
<a href="javascript:;" class="cbtn jscbtn">主题<i></i></a>
<div class="subject-sublist jssubjectlist">
<?php $colorstyle = get_color_style_list();?>
<volist name="colorstyle.list" id="vo">
<div><a href="javascript:void(0);" target="_self" class="subject-item jssetcolor" data-value="{$key}">
<img src="__IMG__/{$key}.png" class="subject-pic"><p>
<span>{$vo}</span></p>
<i class="subject-icon <eq name='colorstyle.value' value='$key'>yes</eq>"></i></a>
</div>
</volist>
</div>
</li>
<li><a class="ajax-get" href="{:U('ClearCache/clear')}">清理缓存</a></li>
<!-- <li class="gwlist">
<div class="nav" id="nav">
<p class="set"><a>语言<i></i></a></p>
<ul class="new">
<li><a href="javascript:void(0);" target="_self">中文</a></li>
<li><a href="javascript:void(0);" target="_self">英文</a></li>
</ul>
</div>
</li> -->
<li><a class="tuichujs" href="{:U('public/cp_logout')}">退出</a></li>
</ul>
<div class="user">
<span>{:session('cp_user_auth.username')}</span>
<a href="{:U('Msg/lists')}">
<i>消息</i>
<b>{:get_msg()}</b>
</a>
</div>
</div>
</div>
<!--下拉样式-->
<script type="text/javascript">
$(function(){
$(".nav p").click(function(){
var ul=$(".new");
if(ul.css("display")=="none"){
ul.slideDown();
}else{
ul.slideUp();
}
});
$('.jscbtn').click(function() {
$(this).siblings().slideToggle(200);
return false;
});
$('.jssetcolor').click(function() {
var that = $(this),value=that.attr('data-value');
var par = that.closest('.jssubjectlist');
if (that.hasClass('disabled')) {return false;}
$('.jssetcolor').addClass('disabled');
$.post('{:U("Admin/set_color_style")}',{value:value},function(data) {
if (data.status==1) {
updateAlert(data.info,'tip_right');
setTimeout(function(){
$('#tip').find('.tipclose').click();
setTimeout(function(){location.reload();},300);
},1500);
} else {
updateAlert(data.info,'tip_error');
setTimeout(function(){
$('#tip').find('.tipclose').click();
},1500);
par.slideToggle(200);
$('.jssetcolor').removeClass('disabled');
}
},'json');
return false;
});
})
</script>
<div id="tip" class="tip"><a class="tipclose hidden" ></a><div class="tipmain"><div class="tipicon"></div><div class="tipinfo">这是内容</div></div></div>
<script>
/**顶部警告栏*/
var content = $('#main');
var top_alert = $('#tip');
//$('body').append('<div class="notice"><div><i></i>成功</div></div>');
top_alert.find('.tipclose').on('click', function () {
top_alert.removeClass('block').slideUp(200);
// content.animate({paddingTop:'-=55'},200);
});
$('.new li:eq(0)').click(function(){
$.ajax({
type: 'POST',
url: "{:U('Public/zh_cn')}",
success: function(data) {
location.reload();
},
error:function(){
}
});
})
$('.new li:eq(1)').click(function(){
$.ajax({
type: 'POST',
type:'json',
url: "/admin.php?s=/Public/en_us",
success: function(data) {
location.reload();
},
error:function(){
alert(111);
}
});
})
window.updateAlert = function (text,c) {
text = text||'default';
c = c||false;
if ( text!='default' ) {
top_alert.find('.tipinfo').text(text);
if (top_alert.hasClass('block')) {
} else {
top_alert.addClass('block').slideDown(200);
// content.animate({paddingTop:'+=55'},200);
}
} else {
if (top_alert.hasClass('block')) {
top_alert.removeClass('block').slideUp(200);
// content.animate({paddingTop:'-=55'},200);
}
}
if ( c!=false ) {
top_alert.removeClass('tip_error tip_right').addClass(c);
}
};
</script>
<!--下拉样式结束-->
<!-- /头部 -->
<!-- 边栏 -->
<div class="sidebar" <if condition="CONTROLLER_NAME eq Index"> style="display:none</if>">
<div class="user_nav">
<span><img src="/Public/Admin/images/tx.png"></span>
<p>{:session('cp_user_auth.username')}</p>
<p style="margin-top:0px;"><if condition = "$res['uid'] eq '1'">超级管理员<else />{$res1['title']}</if></p>
</div>
<div class="fgx">功能菜单</div>
<!-- 子导航 -->
<block name="sidebar">
<div id="subnav" class="subnav">
<notempty name="_extra_menu">
{// 动态扩展菜单 //}
{:extra_menu($_extra_menu,$__MENU__)}
</notempty>
<volist name="__MENU__.child" id="sub_menu">
<!-- 子导航 -->
<notempty name="sub_menu">
<notempty name="key"><h3 class="no"><i class="icon icon-unfold"></i>{:L($key)}</h3></notempty>
<ul class="side-sub-menu" style="display: none;">
<volist name="sub_menu" id="menu">
<li>
<a class="item" href="{$menu.url|U}">{:L($menu['title'])}</a>
</li>
</volist>
</ul>
</notempty>
<!-- /子导航 -->
</volist>
</div>
</block>
<!-- /子导航 -->
</div>
<!-- /边栏 -->
<!-- 内容区 -->
<div id="main-content" style="margin-top: 50px;position:relative;">
<div id="tip" class="tip"><a class="tipclose hidden" ></a><div class="tipmain"><div class="tipicon"></div><div class="tipinfo">这是内容</div></div></div>
<div id="main" class="main">
<block name="nav">
<!-- nav -->
<notempty name="_show_nav">
<div class="breadcrumb">
<span>位置:</span>
<assign name="i" value="1" />
<foreach name="_nav" item="v" key="k">
<if condition="$i eq count($_nav)">
<span>{$v}</span>
<else />
<span><a href="{$k}">{$v}</a>&gt;</span>
</if>
<assign name="i" value="$i+1" />
</foreach>
</div>
</notempty>
<!-- nav -->
</block>
<if condition="CONTROLLER_NAME neq 'Index' ">
</if>
<block name="body"> </block>
</div>
</div>
<!-- /内容区 -->
<script type="text/javascript">
(function(){
var ThinkPHP = window.Think = {
"ROOT" : "__ROOT__", //当前网站地址
"APP" : "__APP__", //当前项目地址
"PUBLIC" : "__PUBLIC__", //项目公共目录地址
"DEEP" : "{:C('URL_PATHINFO_DEPR')}", //PATHINFO分割符
"MODEL" : ["{:C('URL_MODEL')}", "{:C('URL_CASE_INSENSITIVE')}", "{:C('URL_HTML_SUFFIX')}"],
"VAR" : ["{:C('VAR_MODULE')}", "{:C('VAR_CONTROLLER')}", "{:C('VAR_ACTION')}"]
}
})();
</script>
<script type="text/javascript" src="__STATIC__/think.js"></script>
<script type="text/javascript" src="__JS__/common.js"></script>
<script type="text/javascript">
+function(){
var $window = $(window), $subnav = $("#subnav"), url;
$window.resize(function(){
$("#main").css("min-height", $window.height() - 130);
}).resize();
$('.tuichujs').click(function(){
$.ajax({
type: 'POST',
async: false,
dataType: 'json',
url: "{:U('Public/logout')}",
success: function(data) {
updateAlert('退出成功','tip_right');
setTimeout(function(){
$('#tip').find('.tipclose').click();
},1500);
location.reload();
},
error:function(){
updateAlert("服务器故障!",'tip_error');
setTimeout(function(){
$('#tip').find('.tipclose').click();
},1500);
}
});
});
/* 左边菜单高亮 */
url = window.location.pathname + window.location.search;
url = url.replace(/(\/(p)\/\d+)|(&p=\d+)|(\/(id)\/\d+)|(&id=\d+)|(\/(group)\/\d+)|(&group=\d+)/, "");
//$subnav.find('h3').addClass('no');
$subnav.find("a[href='" + url + "']").parent().addClass("current").closest('ul').prev('h3').removeClass('no');
/* 左边菜单显示收起 */
/*$("#subnav").on("click", "h3", function(){
var $this = $(this);
$this.toggleClass('no').find(".icon").toggleClass("icon-fold");
$this.next().slideToggle("fast").siblings(".side-sub-menu:visible").
prev("h3").addClass('no').find("i").addClass("icon-fold").end().end().hide();
});*/
$("#subnav").on("click", "h3", function(event){
var e = event || window.event;
var target = $(e.target);
var $this = $(this);
if ($this.index() == target.index())
$this.find(".icon").toggleClass("icon-fold");
else
$this.toggleClass('no').find(".icon").toggleClass("icon-fold");
$this.next().slideToggle("fast").siblings(".side-sub-menu:visible").
prev("h3").find("i").addClass("icon-fold").end().end().hide();
});
$("#subnav h3 a").click(function(e){e.stopPropagation()});
/* 头部管理员菜单 */
$(".user-bar").mouseenter(function(){
var userMenu = $(this).children(".user-menu ");
userMenu.removeClass("hidden");
clearTimeout(userMenu.data("timeout"));
}).mouseleave(function(){
var userMenu = $(this).children(".user-menu");
userMenu.data("timeout") && clearTimeout(userMenu.data("timeout"));
userMenu.data("timeout", setTimeout(function(){userMenu.addClass("hidden")}, 100));
});
/* 表单获取焦点变色 */
$("form").on("focus", "input", function(){
$(this).addClass('focus');
}).on("blur","input",function(){
$(this).removeClass('focus');
});
$("form").on("focus", "textarea", function(){
$(this).closest('label').addClass('focus');
}).on("blur","textarea",function(){
$(this).closest('label').removeClass('focus');
});
// 导航栏超出窗口高度后的模拟滚动条
var sHeight = $(".sidebar").height();
var subHeight = $(".subnav").height();
var diff = subHeight - sHeight; //250
var sub = $(".subnav");
if(diff > 0){
$(window).mousewheel(function(event, delta){
if(delta>0){
if(parseInt(sub.css('marginTop'))>-10){
sub.css('marginTop','0px');
}else{
sub.css('marginTop','+='+10);
}
}else{
if(parseInt(sub.css('marginTop'))<'-'+(diff-10)){
sub.css('marginTop','-'+(diff-10));
}else{
sub.css('marginTop','-='+10);
}
}
});
}
}();
</script>
<block name="script"></block>
</body>
</html>

@ -0,0 +1,206 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{:C('WEB_SITE_TITLE')}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- CSS -->
<link rel="stylesheet" href="__CSS__/reset.css">
<link rel="stylesheet" href="__CSS__/supersized.css">
<link rel="stylesheet" href="__CSS__/loginnews1711.css">
<script src="__JS__/jquery-3.0.0.min.js" ></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__JS__/cloud.js" type="text/javascript"></script>
<style>
#sendSasfeCode {
border-radius:3px;
width:29%;
cursor:pointer;
border:1px solid;
position:absolute;
top:0;
right:0;
height:48px;
text-align: center;
line-height: 50px;
}
.g-btntn{
border-color: grey;
color: grey;
}
.g-btn{
border-color: #2697FF;
color: #2697FF;
}
</style>
</head>
<body style="background-color:#1c77ac; background-image:url(__IMG__/light.png); background-repeat:no-repeat; background-position:center top; overflow:hidden;">
<div id="mainBody">
<div id="cloud1" class="cloud"></div>
<div id="cloud2" class="cloud"></div>
</div>
<div class="logintop">
<span>欢迎登录后台管理界面平台</span>
<ul>
<li><a href="http://xue.vlcms.com/" target="_blank">帮助</a></li>
<li><a href="http://www.vlcms.com/" target="_blank">关于</a></li>
</ul>
</div>
<div class="loginbody" >
<span class="systemlogo"></span>
<div class="loginbox">
<form class="inputlogin">
<div class="wrap">
<h3><span>手机号码快捷登录</span><span>User Login</span></h3>
<ul>
<li>
<img src="__IMG__/login_name.png" class="icon icon-user">
<input name="mobile" type="text" id="mobile" class="login_input" value="" autocomplete="off" placeholder="请输入手机号码" />
</li>
<li>
<img src="__IMG__/login_code.png" class="icon icon-code">
<input name="verify" type="text" class="login_input verify" value="" placeholder="请填写验证码"/>
<div id="sendSasfeCode" class="g-btn">获取验证码</div>
</li>
<li><input name="" type="submit" class="loginbtn" value="登录" /></li>
<li style="color: grey"><input type="checkbox" name="auto_login" id="">下次自动登录</li>
</ul>
</div>
</form>
</div>
</div>
<!-- <div class="loginbm"><i>&copy;徐州梦创信息科技有限公司 版权所有</i>2016&nbsp;<a href="http://www.vlcms.com/" target="_blank">vlcms.com</a> &copy;版权所有</div> -->
<div id="tip" class="tip"><a class="tipclose hidden" ></a><div class="tipmain"><div class="tipicon"></div><div class="tipinfo">这是内容</div></div></div>
<script>
$('#sendSasfeCode').on('click',function() {
if ($(this).hasClass('g-btntn')) {
return false;
}
var phone = $.trim($('#mobile').val());
if (phone == '') {
alert("手机号不能为空");
return false;
}
if (phone.length !== 11 || !(/^[1][35789][0-9]{9}$/.test(phone))) {
pmsg.msg("格式不正确");
return false;
}
$.ajax({
type:'post',
dataType:'json',
data:'phone='+phone,
url:'{:U("telsafecode")}',
success:function(data) {
if (data.status ==1) {
r(1);
} else {
alert(data.msg);
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
}
});
var r = function(i, t) {
if (i>0) {
var r = 60;
e='#sendSasfeCode';
$(e).removeClass('g-btn').addClass('g-btntn');
var a = setInterval(function() {
r--;
$(e).text(r + '秒');
0 == r && ($(e).removeClass('g-btntn').addClass('g-btn'),
$(e).text('获取验证码'),
clearInterval(a))
},1000)
}
};
});
/**顶部警告栏*/
var content = $('#main');
var top_alert = $('#tip');
top_alert.find('.tipclose').on('click', function () {
top_alert.removeClass('block').slideUp(200);
});
window.updateAlert = function (text,c) {
text = text||'default';
c = c||false;
if ( text!='default' ) {
top_alert.find('.tipinfo').text(text);
if (top_alert.hasClass('block')) {
} else {
top_alert.addClass('block').slideDown(200);
}
} else {
if (top_alert.hasClass('block')) {
top_alert.removeClass('block').slideUp(200);
}
}
if ( c!=false ) {
top_alert.removeClass('tip_error tip_right').addClass(c);
}
};
</script>
<script>
$(function(){
$(".inputlogin").unbind('submit').submit(function(){
$.ajax({
type: 'POST',
async: true,
dataType: 'json',
url: "{:U('cp_login')}",
data: $(".inputlogin").serialize(),
success: function(data) {
if(data.status!=1){
var msg = data.info ? data.info : data.msg;
alert(msg)
}else{
window.location.href = data.url;
}
},
error:function(){
updateAlert("服务器故障!",'tip_error');
setTimeout(function(){
$('#tip').find('.tipclose').click();
},1500);
}
});
return false;
});
});
</script>
</body>
</html>

@ -113,7 +113,8 @@
data: $(".inputlogin").serialize(),
success: function(data) {
if(data.status!=1){
updateAlert(data.info,'tip_error');
var msg = data.info ? data.info : data.msg;
updateAlert(msg,'tip_error');
setTimeout(function(){
$('#tip').find('.tipclose').click();
$('.reloadverify').click();

@ -128,10 +128,14 @@
<td>{$data.company_name}</td>
<td>{$data.statement_begin_time}-{$data.statement_end_time}</td>
<td>{$data.statement_money}</td>
<td>{$data.is_confirm}</td>
<td><a class="confirm " href="{:U('Member/del?id='.$data['id'])}">撤销</a>
<a class="confirm statement_edit" data-id="{$data.id}" data-type="{$data.statement_type}" ext_field="{$data.ext_field}">编辑</a></td>
<td><if condition="$data['is_confirm'] eq 0">未确认<elseif condition="$data['is_confirm'] eq 1"/>确认</if></td>
<td>
<a class="confirm statement_view" data-id="{$data.id}">查看</a>
<a class="confirm " href="{:U('Member/del?id='.$data['id'])}">撤销</a>
<if condition="$data['is_confirm'] eq 0">
<a class="confirm statement_edit" data-id="{$data.id}" data-type="{$data.statement_type}" ext_field="{$data.ext_field}">编辑</a>
</if>
</td>
</tr>
</volist>
</notemtpy>
@ -235,6 +239,18 @@
content: url
});
});
$(".statement_view").click(function () {
var url = "{:U('VerifyBill/show',array('id'=>$data['id'],'form'=>'pc'))}";
layer.open({
type: 2,
title: "海南万盟天下科技有限公司",
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: url
});
});
$("#search").click(function(){
var url = $(this).attr('url');

@ -26,14 +26,14 @@
<tr>
<td class="l noticeinfo">公司名称</td>
<td class="r table_radio">
<input name="config[name]" type="text" value="{$company_info['name']}" class="">
<input name="config[partner]" type="text" value="{$company_info['partner']}" class="">
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l noticeinfo">联系人</td>
<td class="r table_radio">
<input name="config[link_name]" type="text" value="{$company_info['link_name']}" class="">
<input name="config[link_man]" type="text" value="{$company_info['link_man']}" class="">
<span class="notice-text"></span>
</td>
</tr>

@ -0,0 +1,226 @@
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/black.css" type="text/css" />
<script src="__STATIC__/jquery.form.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.layui-layer-dialog .layui-layer-content{color:red}
.companys-item{
float: left;
width: 50%;
}
.companys-item .content{
margin-left: 50px;
padding-top: 20px;
}
.companys-item .content .item{
padding-bottom: 20px;
line-height: 2rem;
}
.bill-table td{
text-align: center;
}
</style>
<!-- <div class="cf main-place top_nav_list navtab_list">-->
<!-- <h3 class="page_title">万盟对账单管理</h3>-->
<!-- </div>-->
<!-- 数据列表 -->
<div class="data_list">
<div class="companys">
<div class="companys-left companys-item">
<div class="content">
<div class="item">乙方:{$data['second_party_info']['partner']}</div>
<div class="item">提现单号:{$data['ext_field']}</div>
<div class="item">订单类型:{$data['second_party_info']['settlement_type']}</div>
<div class="item">联系人:{$data['second_party_info']['link_man']}</div>
<div class="item">联系电话:{$data['second_party_info']['link_phone']}</div>
</div>
</div>
<div class="companys-right companys-item">
<div class="content">
<div class="item">户名:{$data['second_party_info']['bank_account_name']}</div>
<div class="item">银行账号:{$data['second_party_info']['bank_account']}</div>
<div class="item">开户行:{$data['second_party_info']['opening_bank']}</div>
<div class="item">邮寄地址:{$data['second_party_info']['address']}</div>
<div class="item">开票项目:{$data['second_party_info']['invoice_item']}</div>
<div class="item">发票类型:{$data['second_party_info']['invoice_type']}</div>
</div>
</div>
</div>
<table style="margin-top: 15px" class="bill-table">
<!-- 表头 -->
<thead>
<tr>
<th>结算时间</th>
<th >产品</th>
<th >平台总额</th>
<if condition = "$data.second_party_info.settlement_type eq '补点订单'">
<th >补点比例</th>
<else/>
<th >分成比例</th>
</if>
<th >税费费率</th>
<th >结算金额(元)</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<style>
.data-table thead th, .data-table tbody td{text-align:center}
.data-table tbody td{border-right:1px solid #DDDDDD;}
.d_list .drop-down ul {z-index:999;}
</style>
<if condition = "empty($data)">
<tr>
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "data">
<volist name="data.statement_info" id="item">
<if condition="$item.statement_type eq 1">
<tr>
<td >-</td>
<td >{$item.type_name}</td>
<td >-</td>
<td >-</td>
<td >-</td>
<td >{$item.sum_money}</td>
</tr>
<else/>
<tr>
<td >{$item.statement_begin_time}-{$item.statement_end_time}</td>
<td >{$item.game_name}</td>
<td >{$item.pay_amount}</td>
<td >{$item.second_ratio}%</td>
<td >{$item.fax_ratio}%</td>
<td >{$item.sum_money}</td>
</tr>
</if>
</volist>
<tr>
<td><span>总计</span></td>
<td><span>-</span></td>
<td ><span><if condition="$all_pay_amount neq ''">{$all_pay_amount}<else/>0</if></span></td>
<td>-</td>
<td>-</td>
<td><if condition="$all_sum_money neq ''">{$all_sum_money}<else/>0</if></td>
</tr>
<tr>
<td><span>本月分成总金额(人民币大写)</span></td>
<td>-</td>
<td >-</td>
<td>-</td>
<td>-</td>
<td><if condition="$big_all_sum_money neq ''">{$big_all_sum_money}<else/></if></td>
</tr>
</notemtpy>
</tbody>
</table>
<div class="companys">
<div class="companys-left companys-item" style="width: 100%">
<div class="content">
<div class="item">甲方:{$data['first_party_info']['jfCompany']}</div>
<div class="item">联系人:{$data['first_party_info']['jfPerson']}</div>
<div class="item">联系电话:{$data['first_party_info']['jfTel']}</div>
</div>
</div>
</div>
<form id="form" action="{:U('confirm')}" method="post" class="form-horizontal">
<input type="hidden" name="id" value="{$data.id}" id="id">
<input type="hidden" name="is_confirm" value="{$data.is_confirm}" id="is_confirm">
</form>
<?php if(empty($from)):?>
<div class="form-item cf">
<button class="submit_btn ajax-post" id="confirm" type="button" target-form="form-horizontal" style="float: right;
margin-right: 20px;margin-bottom: 20px;">
确认订单
</button>
</div>
<?php endif?>
</div>
<block name="script">
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
</script>
<script type="text/javascript">
//导航高亮
$(".show").click(function () {
var url = $(this).data('url');
layer.open({
type: 2,
title: '海南万盟天下有限公司',
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: url
});
});
$(function(){
$('#confirm').click(function () {
if (parseInt($('#is_confirm').val()) == 1) {
alert('账单已确认');
return false;
}
var url = "{:U('confirm')}";
$.post(url,{id:$('#id').val()}, function (res) {
console.log(res)
if (res.status) {
alert(res.info);
setTimeout(function () {
window.parent.location.reload();
}, 500)
} else {
alert(res.info);
}
})
})
})
</script>
</block>

@ -0,0 +1,358 @@
<extend name="Public/cp_base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/black.css" type="text/css" />
<script src="__STATIC__/jquery.form.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.layui-layer-dialog .layui-layer-content{color:red}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">万盟对账单管理</h3>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th>对账单类型</th>
<th>生成时间</th>
<th>对账单日期</th>
<th>对账金额</th>
<th>确认状态</th>
<th>操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<if condition = "empty($list_data)">
<tr>
<td colspan="16" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "list_data">
<volist name="list_data" id="data">
<tr>
<td>{$data.statement_type_str}</td>
<td>{:set_show_time($data['create_time'])}</td>
<td>{:set_show_time($data['statement_begin_time'])}-{:set_show_time($data['statement_end_time'])}</td>
<td>{$data.statement_money}</td>
<td>
<?php if($data['is_confirm'] == 0) {?>
<span>未确认</span>
<?php }?>
<?php if(intval($data['is_confirm']) == 1) {?>
<span>确认</span>
<?php }?>
</td>
<td>
<a href="javascript:void(0); " class="show" data-url="{:U('VerifyBill/show',array(
'id'=>$data['id']
))}">查看</a>
<a href="{:U('export',array('id'=>$data['id']))}" class="">导出</a>
</td>
</tr>
</volist>
</notemtpy>
</tbody>
</table>
</div>
</div>
<div class="page">
<if condition="$is_admin eq true ">
<a class="sch-btn" href="{:U('Export/promote_list',array_merge(['xlsname'=>'推广员管理_推广员列表'.((I('type',1)==2)?'_混服申请':'_推广员列表')],I('get.')))}">导出</a>
</if>
{$_page|default=''}
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="Promote/lists/type/{:I('type',1)}">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
$(".select_gallery").select2();
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Promote/belong')}');
$(".show").click(function () {
var url = $(this).data('url');
layer.open({
type: 2,
title: '海南万盟天下有限公司',
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: url
});
});
$(function(){
//搜索功能
$("#search").click(function(){
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&"+$('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
window.location.href = url;
});
$(".paixu").click(function(){
var that=$(this);
$data_order=that.attr('data-order');
$order_type='{$userarpu_order}';
if($order_type==''||$order_type=='4'){
$(".sortBy").attr('name','data_order');
val='3,'+$data_order;
$(".sortBy").attr('value',val);
$("#search").click();
}else if($order_type=='3'){
$(".sortBy").attr('name','data_order');
val='4,'+$data_order;
$(".sortBy").attr('value',val);
$("#search").click();
}
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
$("#admin").on('click',function(event) {
var navlist = $(this).find('.i_list_li');
if (navlist.hasClass('hidden')) {
navlist.removeClass('hidden');
$(this).find('#i_list_id').focus().val('');
} else {
navlist.addClass('hidden');
}
$(document).one("click", function(){
navlist.addClass('hidden');
});
event.stopPropagation();
});
$('#admin #i_list_id').on('keyup',function(event) {
var val = $.trim($(this).val()).toLowerCase();
$(this).closest('.drop-down').find('#i_list_idh').val(val);
});
$("#admin #i_list_li").find("a").each(function(){
$(this).click(function(){
var text = $.trim($(this).text()).toLowerCase();
$(this).closest('.drop-down').find("#i_list_id").val(text);
$(this).closest('.drop-down').find('#i_list_idh').val(text);
})
});
//下拉内容框
$(".drop-down2").on('click',function(event) {
var navlist = $(this).find('.i_list_li');
if (navlist.hasClass('hidden')) {
navlist.removeClass('hidden');
$('#i_list_id').focus().val('');
} else {
navlist.addClass('hidden');
}
$(document).one("click", function(){
navlist.addClass('hidden');
});
event.stopPropagation();
});
/* 状态搜索子菜单 */
/*渠道删除*/
$('.delete').click(function(){
var id = $(this).attr('data-id');
layer.confirm('渠道删除后,下级渠道同时被删除,所属数据归属于自然渠道!', {
title:'确定要删除该渠道?',
icon:0,
btn: ['删除','取消'] //按钮
}, function(){
$.ajax({
type: "POST",
url: "{:U('del_promote')}",
dataType: 'json',
async: false,
data: {id:id},
success:function(data){
if(data.status==1){
layer.msg(data.msg);
setTimeout(function(){
window.location.reload();
},1500);
}
}
});
}, function(){
layer.close();
});
})
})
</script>
<script type="text/javascript">
//点击字母按照条件按钮筛选
$(".pro_promot_select_list_con").click(function(){
//选中高亮样式
$(this).addClass('active');
$(this).siblings().removeClass('active');
var that = $(this);
var index = $(this).attr("data-index");
$("#game_list li").each(function(index,ele){
var short = $(this).attr('data-short');
$(this).show();
if(that.attr('data-index')){
if(that.attr('data-index')!=short.charAt(0)){
$(this).hide();
}
}
})
});
//打开弹窗
$(".ajax-view").click(function(){
//获取游戏列表
var url = "{:U('Promote/getPromoteGame')}";
var id = $(this).attr('data-id');
$.post(url,{id:id},function(res){
if(res.code==1){
$(".pro_promot_select_list a").eq(0).addClass('active');
$(".pro_promot_select_list a").eq(0).siblings().removeClass('active');
var game_list = res.data.game_list;
var promote_info = res.data.promote_info;
var lis = [];
$.each(game_list,function(index,ele){
if(ele.game_name.length>6){
ele.game_name = ele.game_name .substring(0,6)+"..."
}
lis.push('<li class="fl pro_promot_game_con" data-short="'+ele.short+'">');
if(promote_info['game_ids']==''){
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
}else{
if(promote_info['game_ids'].indexOf(ele.id)>-1){
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
}else{
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
}
}
lis.push('<label for="gameCheck'+index+'" class="fl"></label>');
lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>');
lis.push('</li>');
});
$("#game_list").html(lis.join(''));
$(".pro_promot_number").text(res.data.promote_info.account);
$("#se_promote_id").val(res.data.promote_info.id);
$(".pro_promot").css("display","block");
jsgameid();
}else{
var tip_msg = res.info ? res.info : '操作失败';
layer.msg(tip_msg);
}
});
});
//保存修改
$(".pro_promot_btn_confirm").click(function(){
$("#ajaxForm").ajaxSubmit(function(res){
layer.msg(res.msg);
$(".pro_promot").hide();
});
return false;
});
//关闭弹窗
$(".pro_promot_close").click(function(){
$(".pro_promot").css("display","none");
});
//取消修改
$(".pro_promot_btn_cancel").click(function(){
$(".pro_promot").css("display","none");
layer.msg('修改已取消');
});
$(".jsgamecheckall").click(function(){
$(this).closest('.jsgamecheckallbox').siblings("#game_list").find(".jsgameid").prop("checked", this.checked);
});
//可申请游戏 全选及全选反选 功能 @author zwm date 20180604
function jsgameid(){
$(".jsgameid").click(function(){
var option = $(this).closest('ul').find(".jsgameid"),
checkall = $(this).closest('ul').siblings('.jsgamecheckallbox').find('.jsgamecheckall');
option.each(function(i){
if(!this.checked){
checkall.prop("checked", false);
return false;
}else{
checkall.prop("checked", true);
}
});
});
}
</script>
</block>

@ -0,0 +1,256 @@
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/black.css" type="text/css" />
<script src="__STATIC__/jquery.form.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.layui-layer-dialog .layui-layer-content{color:red}
.companys-item{
float: left;
width: 50%;
}
.companys-item .content{
margin-left: 100px;
padding-top: 20px;
}
.companys-item .content .item{
padding-bottom: 20px;
line-height: 2rem;
}
.bill-table td{
text-align: center;
}
</style>
<!-- <div class="cf main-place top_nav_list navtab_list">-->
<!-- <h3 class="page_title">万盟对账单管理</h3>-->
<!-- </div>-->
<!-- 数据列表 -->
<div class="data_list">
<div class="companys">
<div class="companys-left companys-item">
<div class="content">
<div class="item">甲方:{$data['first_party_info']['partner']}</div>
<div class="item">联系人:{$data['first_party_info']['link_man']}</div>
<div class="item">联系电话:{$data['first_party_info']['link_phone']}</div>
<div class="item">邮寄地址:{$data['first_party_info']['address']}</div>
<div class="item">公司税号:{$data['first_party_info']['company_tax_no']}</div>
</div>
</div>
<div class="companys-right companys-item">
<div class="content">
<div class="item">乙方:{$data['second_party_info']['partner']}</div>
<div class="item">联系人:{$data['second_party_info']['link_man']}</div>
<div class="item">联系电话:{$data['second_party_info']['link_phone']}</div>
<div class="item">邮寄地址:{$data['second_party_info']['address']}</div>
<div class="item">公司税号:{$data['second_party_info']['company_tax_no']}</div>
</div>
</div>
</div>
<strong style="margin-bottom: 10px">支付给:{$data['receive_company']}</strong>
<table style="margin-top: 15px" class="bill-table">
<!-- 表头 -->
<thead>
<tr>
<th>结算时间</th>
<th >产品</th>
<th >平台总额</th>
<th >甲方分成比例</th>
<th >乙方分成比例</th>
<th >渠道费率</th>
<th >税费费率</th>
<th >结算金额(乙)<br>结算金额=平台总额*1-渠道费)*分成比例*(1-税费费率)</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<style>
.data-table thead th, .data-table tbody td{text-align:center}
.data-table tbody td{border-right:1px solid #DDDDDD;}
.d_list .drop-down ul {z-index:999;}
</style>
<if condition = "empty($data)">
<tr>
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
</tr>
</if>
<notemtpy name = "data">
<volist name="data.statement_info" id="item">
<if condition="$item.statement_type eq 1">
<tr>
<td >-</td>
<td >{$item.type_name}</td>
<td >{$item.pay_amount}</td>
<td >-</td>
<td >-</td>
<td >-</td>
<td >-</td>
<td >{$item.sum_money}</td>
</tr>
<else/>
<tr>
<td >{$item.statement_begin_time}-{$item.statement_end_time}</td>
<td >{$item.game_name}</td>
<td >{$item.pay_amount}</td>
<td >{$item.first_ratio}%</td>
<td >{$item.second_ratio}%</td>
<td >{$item.promote_ratio}%</td>
<td >{$item.fax_ratio}%</td>
<td >{$item.sum_money}</td>
</tr>
</if>
</volist>
<tr>
<td><span>总计</span></td>
<td><span>-</span></td>
<td ><span><if condition="$all_pay_amount neq ''">{$all_pay_amount}<else/>-</if></span></td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td><if condition="$all_sum_money neq ''">{$all_sum_money}<else/>0</if></td>
</tr>
<tr>
<td><span>本月分成总金额(人民币大写)</span></td>
<td>-</td>
<td >-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td><if condition="$big_all_sum_money neq ''">{$big_all_sum_money}<else/></if></td>
</tr>
</notemtpy>
</tbody>
</table>
<div class="companys">
<?php if($data['pay_type'] == 1):?>
<div class="companys-left companys-item">
<div class="content">
<div class="item">收款方名称:{$data['first_party_info']['partner']}</div>
<div class="item">银行账号:{$data['first_party_info']['bank_account']}</div>
<div class="item">开户行:{$data['first_party_info']['opening_bank']}</div>
</div>
</div>
<div class="companys-right companys-item">
<div class="content">
<div class="item">付款方名称:{$data['second_party_info']['partner']}</div>
<div class="item">银行账号:{$data['second_party_info']['bank_account']}</div>
<div class="item">开户行:{$data['second_party_info']['opening_bank']}</div>
</div>
</div>
<?php else:?>
<div class="companys-left companys-item">
<div class="content">
<div class="item">收款方名称:{$data['second_party_info']['partner']}</div>
<div class="item">银行账号:{$data['second_party_info']['bank_account']}</div>
<div class="item">开户行:{$data['second_party_info']['opening_bank']}</div>
</div>
</div>
<div class="companys-right companys-item">
<div class="content">
<div class="item">付款方名称:{$data['first_party_info']['partner']}</div>
<div class="item">银行账号:{$data['first_party_info']['bank_account']}</div>
<div class="item">开户行:{$data['first_party_info']['opening_bank']}</div>
</div>
</div>
<?php endif?>
</div>
<form id="form" action="{:U('confirm')}" method="post" class="form-horizontal">
<input type="hidden" name="id" value="{$data.id}" id="id">
<input type="hidden" name="is_confirm" value="{$data.is_confirm}" id="is_confirm">
</form>
<?php if(empty($from)):?>
<div class="form-item cf">
<button class="submit_btn ajax-post" id="confirm" type="button" target-form="form-horizontal" style="float: right;
margin-right: 20px;margin-bottom: 20px;">
确认订单
</button>
</div>
<?php endif?>
</div>
<block name="script">
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
</script>
<script type="text/javascript">
//导航高亮
$(".show").click(function () {
var url = $(this).data('url');
layer.open({
type: 2,
title: '海南万盟天下有限公司',
shadeClose: true,
shade: 0.8,
area: ['70%', '80%'],
content: url
});
});
$(function(){
$('#confirm').click(function () {
if (parseInt($('#is_confirm').val()) == 1) {
alert('账单已确认');
return false;
}
var url = "{:U('confirm')}";
$.post(url,{id:$('#id').val()}, function (res) {
console.log(res)
if (res.status) {
alert(res.info);
setTimeout(function () {
window.parent.location.reload();
}, 500)
} else {
alert(res.info);
}
})
})
})
</script>
</block>

@ -946,6 +946,10 @@ CREATE TABLE `tab_promote_belong` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='推广公会归属管理';
-- 公司信息 2020-1-8 刘伟文
INSERT INTO `tab_tool` (`name`, `title`, `config`, `template`, `type`, `status`, `create_time`) VALUES ('company_info', '公司信息', NULL, NULL, '1', '1', NULL);
-- cp/公会对账单 2020-1-7 陈志
CREATE TABLE `tab_statement` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
@ -970,18 +974,5 @@ CREATE TABLE `tab_statement` (
KEY `link_phone` (`link_phone`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='cp/公会对账单';
-- 新增CP游戏分成比例表 2020-01-09 郑昌隆
CREATE TABLE `tab_cp_game_ratio` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`game_id` int(11) DEFAULT '0' COMMENT '游戏ID',
`ratio` decimal(5,2) DEFAULT '0.00' COMMENT '分成比率',
`begin_total_amount` decimal(11,2) DEFAULT '0.00' COMMENT '分成开始档位总流水',
`add_time` int(11) DEFAULT '0' COMMENT '添加时间',
`update_time` int(11) DEFAULT '0' COMMENT '更新时间',
`is_del` tinyint(2) DEFAULT '0' COMMENT '1-已删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-- 玩家列表账户锁定添加备注 2020-01-09 郑昌隆
ALTER TABLE `tab_user` ADD COLUMN `lock_remark` varchar(512) NOT NULL DEFAULT '' COMMENT '账号锁定原因' after lock_status;

Binary file not shown.

@ -602,6 +602,10 @@ function D($name='',$layer='') {
return $model;
}
function DM($name='', $tablePrefix='tab_',$connection='') {
return M($name, $tablePrefix,$connection);
}
/**
* 实例化一个没有模型文件的Model
* @param string $name Model名称 支持指定基础模型 例如 MongoModel:User
@ -622,6 +626,7 @@ function M($name='', $tablePrefix='',$connection='') {
return $_model[$guid];
}
/**
* 解析资源地址并导入类库文件
* 例如 module/controller addon://module/behavior

Loading…
Cancel
Save