新增编辑

master
chenzhi 5 years ago
parent fac157ddd7
commit 8a508c050d

@ -310,11 +310,40 @@ class CompanyRelationController extends AdminController
}
public function editRelation()
{
if ($_POST) {
$p= I('post.');
if(!isset($p['id'])){
$this->error('参数错误');
}
//查询
$y = $this->DBlogModel->where("id='{$p['id']}'")->find();
$p['remark'] = $p['remark'] ?? '';
if($y['settlement_type'] != $p['settlement_type'] || $y['invoice_type'] != $p['invoice_type'] || $y['invoice_content'] != $p['invoice_content'] || $y['is_payment'] != $p['is_payment'] || $y['collection'] != $p['collection']){
$p['status'] = 0;
$p['verify_log'] = json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y-m-d H:i:s")]);
}
$this->DBlogModel->save($p);
addOperationLog(['op_type'=>1,'key'=>$p['id'],'op_name'=>'修改','url'=>U('lists')]);
$this->ajaxReturn(["msg"=>"修改成功","code"=>1,"url"=>U("lists")]);
} else {
$params = I('get.');
$id = $params['id'] ?? 0;
$id = intval($id);
$map['id'] = $id;
$dbres = $this->DBlogModel->where($map)->find();
$this->assign('first_company_info',$this->getCompanyInfo($dbres['first_company_type'],$dbres['first_company_id']));
$this->assign('second_company_info',$this->getCompanyInfo($dbres['second_company_type'],$dbres['second_company_id']));
$dbres['first_company_type'] =$this->CompanyType[$dbres['first_company_type']];
$dbres['second_company_type'] =$this->CompanyType[$dbres['second_company_type']];
$this->assign('data', $dbres);
$this->display();
}
}
public function delRelation()
{
}
public function getCompanyList($type)
{
@ -347,6 +376,32 @@ class CompanyRelationController extends AdminController
}
$this->success($companyInfo,'',true);
}
public function getCompanyInfo($type,$id)
{
$companyInfo = [];
if($type == 0){
//己方公司
$companyInfo = M("CompanyInfo","tab_")->field("id,partner company_name,link_man,link_phone")->where("status='1' AND id='{$id}'")->find();
}
if($type == 1){
//上游
$companyInfo = M("Partner","tab_")->field("id,partner company_name,company_type,link_man,link_phone")->where("status='1' AND id='{$id}'")->find();
}
if($type == 2){
//下游游
$companyInfo = M("PromoteCompany","tab_")->field("id,company_belong,company_name,company_type,settlement_contact link_man,contact_phone link_phone")->where("status='1' AND id='{$id}'")->find();
}
if(isset($companyInfo['company_belong'])){
$companyInfo['company_belong'] = getCompanyBlong($companyInfo['company_belong']);
}
if(isset($companyInfo['company_type'])){
$companyInfo['company_type'] = ($companyInfo['company_type'] == 1 ? "公司" :'个人');
}
if(isset($companyInfo['link_phone']) && $companyInfo['link_phone']==0){
$companyInfo['link_phone'] = '';
}
return $companyInfo;
}
public function menuAuth()
{
$addurl = U("addRelation");

@ -205,10 +205,10 @@
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" value="1" name="status" checked="checked">
<input type="radio" value="1" name="is_payment" checked="checked">
</label>
<label>
<input type="radio" value="2" name="status">
<input type="radio" value="2" name="is_payment">
</label>
</span>
<span class="notice-text">选择否将不能进行线上打款</span>

@ -1,435 +0,0 @@
<extend name="Public/base" />
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.tabcon1711 input.time {
width: 150px;
}
#form .txt_area {
width: 300px;
height: 150px;
}
.tabcon1711 .form_unit {
margin-left: 2px;
}
.tabcon1711 .mustmark {
margin-left:-7px;
}
.list-ratio {
display: table;
}
.list-ratio .li-ratio {
display: flex;
margin-bottom: 20px;
align-items: center;
}
.list-ratio .li-ratio .turnover, .list-ratio .li-ratio .turnover-ratio {
position: relative;
}
.list-ratio .li-ratio .turnover span, .list-ratio .li-ratio .turnover-ratio .error-message {
color: red;
position: absolute;
left: 0;
top: 30px;
white-space: nowrap;
display: none;
}
.iconfont-btn {
cursor: pointer;
}
.iconfont-style {
font-size: 18px;
color: #fff;
border-radius: 4px;
border: 0;
padding: 5px;
margin-left: 10px;
}
.iconfont-selected {
background-color: #0A9AF2;
}
.iconfont-selected:hover {
background-color: #03a9f4;
}
.iconfont-unselected {
background-color: #999;
}
.iconfont-unselected:hover {
background-color: #ababab;
}
input[type=number]{
padding: 4px 6px;
font-size: 12px;
line-height: 20px;
color: #555;
vertical-align: middle;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
background-color: #fff;
border: 1px solid #ccc;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
-webkit-transition: border linear .2s, box-shadow linear .2s;
-moz-transition: border linear .2s, box-shadow linear .2s;
-o-transition: border linear .2s, box-shadow linear .2s;
transition: border linear .2s, box-shadow linear .2s;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">特殊比例申请修改</h3>
<p class="description_text" style="color: red;">说明:除了备注其他项的修改将会重走审批流程,若不需要修改请点击返回</p>
</div>
<!-- 标签页导航 -->
<div class="tab-wrap">
<div class="tab-content tabcon1711">
<!-- 表单 -->
<form id="form" action="{:U('editRatio')}" method="post" class="form-horizontal">
<!-- 基础文档模型 -->
<div id="tab1" class="tab-pane in tab1">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">推广公司:</td>
<td class="r table_radio">
<span class="form_radio table_btn">{$data.company_name}</span>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l">现包名:</td>
<td class="r table_radio">
<span class="form_radio table_btn">{$data.relation_game_name}</span>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l">原包名:</td>
<td class="r table_radio">
<span class="form_radio table_btn">{$data.original_package_name}</span>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>分成比例设定:</td>
<td class="r table_radio">
<label>默认分成比例:</label>
<input type="number" class="txt ratio" name="ratio" id="ratio" value="{$data.ratio|default='0.00'}" placeholder="" οninput="value=value.replace(/[^\w\.\/]/ig, '')" style="width: 60px;float: left;">
<span class="form_unit">%</span>
<span class="notice-text">当前需要修改成的分成比例</span>
</td>
</tr>
<tr><td style="height: 10px;"></td></tr>
<tr>
<td class="l"></td>
<td class="r table_radio">
<div class="list-ratio">
<div class="li-ratio">
<label class="instanceof_text" style="margin-right: 10px;">流水分成设定:</label>
<span class="iconfont-btn iconfont-btn-add" title="添加流水比例"><i class="iconfont-style iconfont-selected iconfont iconjiahao1"></i></span>
<span class="iconfont-btn iconfont-btn-del" title="删除流水比例"><i class="iconfont-style iconfont-selected iconfont iconjianhao"></i></span>
</div>
<volist name="data['turnover_ratio']" key="key" id="vo">
<div class="li-ratio">
<label class="instanceof_text" style="margin-right: 10px;">月流水</label>
<select name="instanceof[]" style="width: 50px;margin-right: 10px;">
<option value="1" <if condition="empty($vo['instanceof']) or $vo['instanceof'] eq 1">selected</if>>≥</option>
<option value="2" <if condition="!empty($vo['instanceof']) and $vo['instanceof'] eq 2">selected</if>>></option>
</select>
<div class="turnover">
<input type="text" class="txt turnover_money" name="turnover[]" value="{$vo['turnover']|default=''}" placeholder="" onKeyUp="value=value.replace(/[^\w\.\/]/ig,'')" style="width: 100px;margin-right: 10px;">
<span class="error-message"></span>
</div>
<label>分成比例:</label>
<div class="turnover-ratio">
<input type="text" class="txt turnover_ratio" name="turnover_ratio[]" value="{$vo['ratio']|default=''}" placeholder="" onKeyUp="value=value.replace(/[^\w\.\/]/ig,'')" style="width: 60px;">
<span class="form_unit" style="margin-right: 10px;">%</span>
<span class="error-message"></span>
</div>
</div>
</volist>
</div>
<span class="notice-text" style="width: auto;"></span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>生效期限:</td>
<td class="r table_radio">
<div style="float: left;">
<input type="text" class="txt time" name="begin_time" id="begin_time" placeholder="开始时间" value="{$data.begin_time}">
-
<input type="text" class="txt time" name="end_time" id="end_time" placeholder="结束时间" value="{$data.end_time}">
</div>
<span class="notice-text">结束时间不填则默认永久。</span>
</td>
</tr>
<tr>
<td class="l">备注:</td>
<td class="r table_radio">
<textarea type="text" name="remark" id="remark" class="txt_area">{$data.remark}</textarea>
<span class="notice-text"></span>
</td>
</tr>
</tbody>
</table>
</div>
<input type="hidden" name="id" id="id" value="{$data['id']|default=''}" />
<div class="form-item cf">
<button class="submit_btn mlspacing" id="submit" type="submit" target-form="form-horizontal">
保存
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();" >
返回
</a>
</div>
</form>
</div>
</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/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">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script src="__STATIC__/czinputcheck.js?v=1.29" type="text/javascript"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('index')}");
$(".select_gallery").select2();
$(function(){
$('.time').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true
});
var promoteGameRatioData = {};
promoteGameRatioData.ratio = '0.00';
promoteGameRatioData.begin_time = '';
promoteGameRatioData.end_time = '';
promoteGameRatioData.remark = '';
$('#ratio, #begin_time, #end_time, #remark').change(function () {
var val = $(this).val();
var elementIdName = $(this).attr('id');
promoteGameRatioData[elementIdName] = val;
});
subevn();
function subevn(){
$('#submit').off("click");
$('#submit').click(function (e) {
//查看是否报错
var flag = true;
var obj = {
"ratio":["number","默认比例必须是大于0的数字"],
"begin_time":["date","开始时间不能为空"],
"end_time":["nocheck"],
"remark":["nocheck",'',"textarea"]
}
var cres = CIC.checkAddInput(obj);
if(!cres){
return false;
}
if(cres.ratio > 100){
layer.msg("默认比例不能大于100", {icon: 2});
return false;
}
$(".error-message").each(function(index,elm){
var t = $(elm).css("display");
if(t == 'block' || t == 'inline'){
flag = false;
layer.msg("请先处理错误的比例配置", {icon: 2});
return false;
}
})
$(".turnover_money").each(function(index,elm){
var t = $(elm).val();
if(t == ''){
flag = false;
layer.msg("流水及比例不允许为空", {icon: 2});
return false;
}
})
if(!flag){
return false;
}
var target = $('form').get(0).action;
var query = $('form').serialize();
var that = this;
$(that).addClass('disabled').attr('autocomplete','off').prop('disabled',true);
$.post(target,query).success(function(data){
if(layer) {layer.closeAll('loading');}
if (data.code==1) {
if (data.url) {
updateAlert(data.msg + ' 页面即将自动跳转~');
}else{
updateAlert(data.msg);
}
setTimeout(function(){
$(that).removeClass('disabled').prop('disabled',false);
if (data.url) {
location.href=data.url;
}else if( $(that).hasClass('no-refresh')){
$('#tip').find('.tipclose').click();
}else{
location.reload();
}
},1500);
}else{
$(that).removeClass('disabled').prop('disabled',false);
layer.msg(data.msg,{icon: 2});
}
});
});
}
$('.iconfont-btn-add').click(function (e) {
var delBtn = $('.iconfont-btn-del');
var html = '';
html += '<div class="li-ratio">';
html += '<label class="instanceof_text">月流水:</label>';
html += '<select name="instanceof[]" style="width: 50px;margin-right: 10px;">';
html += '<option value="1"></option>';
html += '<option value="2">></option>';
html += '</select>';
html += '<div class="turnover">';
html += '<input type="text" class="txt turnover_money" name="turnover[]" value="" placeholder="请输入金额" onKeyUp="value=value.replace(/[^\\w\\.\\/]/ig, \'\')" style="width: 100px;margin-right: 10px;">';
html += '<span class="error-message"></span>';
html += '</div>';
html += '<label>分成比例:</label>';
html += '<div class="turnover-ratio">';
html += '<input type="text" class="txt turnover_ratio" name="turnover_ratio[]" value="" placeholder="请输入比例" onKeyUp="value=value.replace(/[^\\w\\.\\/]/ig, \'\')" style="width: 60px;">';
html += '<span class="form_unit" style="margin-right: 10px;">%</span>';
html += '<span class="error-message"></span>';
html += '</div>';
html += '</div>';
$('.list-ratio').append(html);
subevn();
if ($('.list-ratio').children().length > 1 && delBtn.children('i').hasClass('iconfont-unselected')) {
delBtn.children('i').removeClass('iconfont-unselected');
delBtn.children('i').addClass('iconfont-selected');
}
$('.list-ratio').children(':last-child').children('.turnover').children('input').change(function (e) {
turnoverChangeHandle();
});
$('.list-ratio').children(':last-child').children('.turnover-ratio').children('input').change(function (e) {
turnoverRatioChangeHandle();
});
});
$('.list-ratio').children('.li-ratio').children('.turnover').children('input').change(function (e) {
turnoverChangeHandle();
});
$('.list-ratio').children('.li-ratio').children('.turnover-ratio').children('input').change(function (e) {
turnoverRatioChangeHandle();
});
function turnoverChangeHandle()
{
$('.list-ratio').children('.li-ratio').children('.turnover').children('input').each(function () {
var that = $(this);
var thatLiRatio = that.parent().parent();
var thatLiRatioIndex = thatLiRatio.index();
var prevTurnover = 0;
var prev = thatLiRatio.prev().children().children('input');
var thatTurnover = parseFloat(that.val());
if (thatLiRatioIndex > 0) {
prevTurnover = parseFloat(prev.val());
prevTurnoverHandle(thatTurnover, prevTurnover, that);
}
});
}
function turnoverRatioChangeHandle() {
var ratio = parseFloat($('#ratio').val());
$('.list-ratio').children('.li-ratio').children('.turnover-ratio').children('input').each(function () {
var that = $(this);
var thatLiRatio = that.parent().parent();
var thatLiRatioIndex = thatLiRatio.index();
var thatTurnoverRatio = parseFloat(that.val());
if (thatLiRatioIndex === 1) {
prevTurnoverRatio = ratio;
prevTurnoverRatioHandle(thatTurnoverRatio, prevTurnoverRatio, that, true);
} else {
var prev = thatLiRatio.prev().children('.turnover-ratio').children('input');
var prevTurnoverRatio = parseFloat(prev.val());
prevTurnoverRatioHandle(thatTurnoverRatio, prevTurnoverRatio, that);
}
});
}
function prevTurnoverHandle(thatTurnover, prevTurnover, that)
{
if (thatTurnover <= prevTurnover) {
that.parent().children('span').text('月流水必须大于上一个月流水');
that.parent().children('span').show();
} else {
that.parent().children('span').hide();
}
return true;
}
function prevTurnoverRatioHandle(thatTurnoverRatio, prevTurnoverRatio, that, isDefault = false)
{
if (thatTurnoverRatio <= prevTurnoverRatio) {
var msg = isDefault ? '月流水分成比例必须大于默认分成比例' : '月流水分成比例必须大于上一个月流水分成比例';
that.parent().children('.error-message').text(msg);
that.parent().children('.error-message').show();
} else {
that.parent().children('.error-message').hide();
}
return true;
}
$('.iconfont-btn-del').click(function (e) {
var that = $(this);
if ($('.list-ratio').children().length > 1) {
$('.list-ratio').children(':last-child').remove();
if ($('.list-ratio').children().length === 1) {
that.children('i').removeClass('iconfont-selected');
that.children('i').addClass('iconfont-unselected');
}
}
});
});
</script>
</block>

@ -0,0 +1,301 @@
<extend name="Public/base" />
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.tabcon1711 input.time {
width: 150px;
}
#form .txt_area {
width: 300px;
height: 150px;
}
.tabcon1711 .form_unit {
margin-left: 2px;
}
.tabcon1711 .mustmark {
margin-left:-7px;
}
.list-ratio {
display: table;
}
.list-ratio .li-ratio {
display: flex;
margin-bottom: 20px;
align-items: center;
}
.list-ratio .li-ratio .turnover, .list-ratio .li-ratio .turnover-ratio {
position: relative;
}
.list-ratio .li-ratio .turnover span, .list-ratio .li-ratio .turnover-ratio .error-message {
color: red;
position: absolute;
left: 0;
top: 30px;
white-space: nowrap;
display: none;
}
.iconfont-btn {
cursor: pointer;
}
.iconfont-style {
font-size: 18px;
color: #fff;
border-radius: 4px;
border: 0;
padding: 5px;
margin-left: 10px;
}
.iconfont-selected {
background-color: #0A9AF2;
}
.iconfont-selected:hover {
background-color: #03a9f4;
}
.iconfont-unselected {
background-color: #999;
}
.iconfont-unselected:hover {
background-color: #ababab;
}
input[type=number]{
padding: 4px 6px;
font-size: 12px;
line-height: 20px;
color: #555;
vertical-align: middle;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
background-color: #fff;
border: 1px solid #ccc;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
-webkit-transition: border linear .2s, box-shadow linear .2s;
-moz-transition: border linear .2s, box-shadow linear .2s;
-o-transition: border linear .2s, box-shadow linear .2s;
transition: border linear .2s, box-shadow linear .2s;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">编辑公司绑定</h3>
<p class="description_text" style="color: red;">说明:除了备注,其他项的修改将会重走审批流程,若不需要修改请点击返回</p>
</div>
<!-- 标签页导航 -->
<div class="tab-wrap">
<div class="tab-content tabcon1711" >
<!-- 表单 -->
<form id="form" action="{:U('editRelation')}" method="post" class="form-horizontal" >
<div style="display: flex;">
<!-- 基础文档模型 -->
<div id="tab1" class="tab-pane in tab1">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">甲方公司类型:</td>
<td class="r table_radio">
<span class="form_radio table_btn">{$data.first_company_type}</span>
</td>
</tr>
<tr>
<td class="l">甲方公司:</td>
<td class="r table_radio">
<span class="form_radio table_btn">{$data.first_company_name}</span>
</td>
</tr>
<tbody id="first_company_info">
</tbody>
</tbody>
</table>
</div>
<div id="tab2" class="tab-pane in tab2">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">乙方公司类型:</td>
<td class="r table_radio">
<span class="form_radio table_btn">{$data.second_company_type}</span>
</td>
</tr>
<tr>
<td class="l">乙方公司:</td>
<td class="r table_radio">
<span class="form_radio table_btn">{$data.second_company_name}</span>
</td>
</tr>
<tbody id="second_company_info">
</tbody>
</tbody>
</table>
</div>
</div>
<div style="width: 80%;height: 1px;border-bottom: 1px solid #e6e6e6;margin: 10px;"></div>
<div id="tab3" class="tab-pane in tab3">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l"><i class="mustmark">*</i>结算周期:</td>
<td class="r">
<select name="settlement_type" id="settlement_type" class="select_gallery">
<option value="0" <if condition="$data['settlement_type'] eq 0">selected</if>>无</option>
<option value="1" <if condition="$data['settlement_type'] eq 1">selected</if>>周结</option>
<option value="2" <if condition="$data['settlement_type'] eq 2">selected</if>>月结</option>
</select>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>开票类型:</td>
<td class="r">
<select name="invoice_type" id="invoice_type" class="select_gallery">
<option value="1" <if condition="$data['invoice_type'] eq 1">selected</if>>专票</option>
<option value="2" <if condition="$data['invoice_type'] eq 2">selected</if>>普票</option>
</select>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l">开票内容:</td>
<td class="r table_radio">
<input type="text" name="invoice_content" id="invoice_content" class="input" value="{$data['invoice_content']}"></textarea>
</td>
</tr>
<tr>
<td class="l">是否有打款流程:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" value="1" name="is_payment" <if condition="$data['is_payment'] eq 1">checked="checked"</if>> 是
</label>
<label>
<input type="radio" value="2" name="is_payment" <if condition="$data['is_payment'] eq 2">checked="checked"</if>> 否
</label>
</span>
<span class="notice-text">选择否将不能进行线上打款</span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>收款方:</td>
<td class="r">
<select name="collection" id="collection" class="select_gallery">
<option value="1" <if condition="$data['collection'] eq 1">selected</if>>甲方</option>
<option value="2" <if condition="$data['collection'] eq 2">selected</if>>乙方</option>
</select>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l">备注:</td>
<td class="r table_radio">
<textarea type="text" name="remark" id="remark" class="txt_area">{$data['remark']}</textarea>
<span class="notice-text"></span>
</td>
</tr>
</tbody>
</table>
</div>
<input type="hidden" name="id" id="id" value="{$data['id']|default=''}" />
<div class="form-item cf">
<button class="submit_btn mlspacing" id="submit" type="submit" target-form="form-horizontal">
保存
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();" >
返回
</a>
</div>
</form>
</div>
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script src="__STATIC__/czinputcheck.js?v=1.29" type="text/javascript"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('index')}");
$(".select_gallery").select2();
var first_company={$first_company_info|json_encode=###,JSON_UNESCAPED_UNICODE};
var second_company={$second_company_info|json_encode=###,JSON_UNESCAPED_UNICODE};
$(function(){
//
$('#submit').click(function (e) {
//查看是否报错
var target = $('form').get(0).action;
var query = $('form').serialize();
var that = this;
$(that).addClass('disabled').attr('autocomplete','off').prop('disabled',true);
$.post(target,query).success(function(data){
if(layer) {layer.closeAll('loading');}
if (data.code==1) {
if (data.url) {
updateAlert(data.msg + ' 页面即将自动跳转~');
}else{
updateAlert(data.msg);
}
setTimeout(function(){
$(that).removeClass('disabled').prop('disabled',false);
if (data.url) {
location.href=data.url;
}else if( $(that).hasClass('no-refresh')){
$('#tip').find('.tipclose').click();
}else{
location.reload();
}
},1500);
}else{
$(that).removeClass('disabled').prop('disabled',false);
layer.msg(data.msg,{icon: 2});
}
});
});
$("#first_company_info").html(setCompanyInfo(first_company));
$("#second_company_info").html(setCompanyInfo(second_company));
function setCompanyInfo(companyinfo){
var companyinfostr = '';
if("company_belong" in companyinfo){
companyinfostr += '<tr><td class="l">内外团:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_belong+'</span></td></tr>';
}
if("company_type" in companyinfo){
companyinfostr += '<tr><td class="l">公司性质:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_type+'</span></td></tr>';
}
if("company_relation" in companyinfo){
companyinfostr += '<tr><td class="l">开发类型:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.company_relation+'</span></td></tr>';
}
if("link_man" in companyinfo){
companyinfostr += '<tr><td class="l">联系人:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.link_man+'</span></td></tr>';
}
if("link_phone" in companyinfo){
companyinfostr += '<tr><td class="l">联系电话:</td><td class="r table_radio"><span class="form_radio table_btn">'+companyinfo.link_phone+'</span></td></tr>';
}
return companyinfostr;
}
});
</script>
</block>

@ -291,14 +291,14 @@ $(function(){
$("#company_type").change();
$(".editRatio").on("click",function(){
$(".editRelation").on("click",function(){
var id = $(this).data("id");
var url = "{:U('editRatio')}"+"&id="+id;
var url = "{:U('editRelation')}"+"&id="+id;
window.location.href = url;
})
$(".delRatio").on("click",function(){
$(".delRelation").on("click",function(){
var id = $(this).data("id");
var url = "{:U('delRatio')}"+"&id="+id;
var url = "{:U('delRelation')}"+"&id="+id;
layer.confirm('删除后将无法恢复,请慎重选择', {
closeBtn:0,
title:false,

Loading…
Cancel
Save