e97a6950 by wang

Merge remote-tracking branch 'origin/develop' into develop

2 parents ba06911b ee6a2d46
......@@ -155,7 +155,7 @@ class Work extends CI_Controller
'operatorRecord'=>$ret2,
'id'=>$id
);
// var_dump($data);exit;
$this->load->view('work/资料/资料补录', $data);
}
......
......@@ -155,4 +155,37 @@
}
})
}
function json(data) {
const n = new Object();
$.each(data, function (index, value) {
tree(index, value, n)
});
return n;
}
function tree(attr, value, tree) {
var nestedAttrs = attr.split('.')
for(var i = 0 ; i < nestedAttrs.length ; i++) {
if(i === (nestedAttrs.length -1)) {
if(tree[nestedAttrs[i]] !== value) {
tree[nestedAttrs[i]] = value
}
} else if(!tree.hasOwnProperty(nestedAttrs[i])) {
tree[nestedAttrs[i]] = {}
tree = tree[nestedAttrs[i]]
} else {
tree = tree[nestedAttrs[i]]
}
}
}
$('.Wdate').on('focus', function () {
WdatePicker();
});
function reload() {
table.fnDraw();
}
</script>
......
......@@ -115,10 +115,6 @@
});
}
function reload() {
table.fnDraw();
}
</script>
</body>
<html>
......
......@@ -6,7 +6,7 @@
<div class="form-group col-sm-3 col-md-2">
<label>资料上传</label>
<span class="form-control select-box">
<select class="select uploader" size="1" name="sourceType" id="upload">
<select class="select uploader" size="1" id="upload">
<?php foreach ($this->session->sourceBaseType as $k=>$v):?>
<option value="<?=$v->code?>" data-name="<?=$v->desc?>"><?=$v->desc?></option>
<?php if($v->children && !empty($v->children)):?>
......
......@@ -14,41 +14,15 @@
<div class="panel-header">选择贷款产品</div>
<div class="panel-body cl">
<div class="row cl text-c">
<?php foreach ($this->session->products as $k => $v): ?>
<div class="col-sm-4 mb-20">
<label class="radio">
<input type="radio" value="<?= $v->id ?>" name="1"/>
<img width="160" height="160" src="holder.js/180x18">
<input type="radio" value="<?= $v->id ?>" name="applyOrderVO.products" data-limit="<?=$v->loanLimit?>" data-deadline="<?=$v->loanDeadline?>"/>
<img width="160" height="160" src="<?=$v->imagePath?>">
<?= $v->productName ?>
</label>
</div>
<?php endforeach; ?>
<!--<div class="col-sm-4 mb-20">
<label class="radio">
<input type="radio" name="1"/>
<img src="holder.js/180x180">
</label>
</div>
<div class="col-sm-4 mb-20">
<label class="radio">
<input type="radio" name="1"/>
<img src="holder.js/180x180">
</label>
</div>
<div class="col-sm-4 mb-20">
<label class="radio">
<input type="radio" name="1"/>
<img src="holder.js/180x180">
</label>
</div>
<div class="col-sm-4 mb-20">
<label class="radio">
<input type="radio" name="1"/>
<img src="holder.js/180x180">
</label>
</div>-->
</div>
</div>
</div>
......@@ -67,13 +41,13 @@
<div class="row cl">
<div class="form-group col-sm-3 col-md-2">
<label>姓名</label>
<input type="text" class="form-control input-text" name="userName"
<input type="text" class="form-control input-text" name="clientInfoInputVO.userName"
value="<?= $clientInfoOutputVO ? $clientInfoOutputVO->userName : '' ?>">
</div>
<div class="form-group col-sm-3 col-md-2">
<label>性别</label>
<span class="form-control select-box">
<select class="select" size="1" name="gender">
<select class="select" size="1" name="clientInfoInputVO.gender">
<?php foreach ($this->session->genderEnum as $k => $v): ?>
<option <?= $clientInfoOutputVO && $clientInfoOutputVO->gender == $k ? 'selected' : '' ?>
value="<?= $k ?>"><?= $v ?></option>
......@@ -84,7 +58,7 @@
<div class="form-group col-sm-3 col-md-2">
<label>婚姻</label>
<span class="form-control select-box">
<select class="select" size="1" name="marriageState">
<select class="select" size="1" name="clientInfoInputVO.marriageState">
<?php foreach ($this->session->marryEnum as $k => $v): ?>
<option <?= $clientInfoOutputVO && $clientInfoOutputVO->marriageState == $k ? 'selected' : '' ?>
value="<?= $k ?>"><?= $v ?></option>
......@@ -94,7 +68,7 @@
</div>
<div class="form-group col-sm-3 col-md-2">
<label>出生日期</label>
<input type="text" name="birthDate" class="form-control input-text Wdate"
<input type="text" name="clientInfoInputVO.birthDate" class="form-control input-text Wdate"
value="<?= $clientInfoOutputVO ? $clientInfoOutputVO->birthDate : '' ?>" onfocus="WdatePicker()">
</div>
</div>
......@@ -103,7 +77,7 @@
<div class="form-group col-sm-3 col-md-2">
<label>教育程度</label>
<span class="form-control select-box">
<select class="select" size="1" name="educationDegree">
<select class="select" size="1" name="clientInfoInputVO.educationDegree">
<?php foreach ($this->session->educationEnum as $k => $v): ?>
<option <?= $clientInfoOutputVO && $clientInfoOutputVO->educationDegree == $k ? 'selected' : '' ?>
value="<?= $k ?>"><?= $v ?></option>
......@@ -113,7 +87,7 @@
</div>
<div class="form-group col-sm-3 col-md-2">
<label>身份证</label>
<input type="text" name="idCard" class="form-control input-text"
<input type="text" name="clientInfoInputVO.idCard" class="form-control input-text"
value="<?= $clientInfoOutputVO ? $clientInfoOutputVO->idCard : '' ?>">
</div>
</div>
......@@ -121,14 +95,14 @@
<div class="row cl">
<div class="form-group has-feedback col-sm-3 col-md-2">
<label>月收入</label>
<input type="text" name="monthlyIncome" class="form-control input-text"
<input type="text" name="clientInfoInputVO.monthlyIncome" class="form-control input-text"
value="<?= $clientInfoOutputVO ? $clientInfoOutputVO->monthlyIncome : '' ?>">
<span class="glyphicon glyphicon-rmb form-control-feedback" aria-hidden="true"></span>
</div>
<div class="form-group col-sm-3 col-md-2">
<label>有无本地房产</label>
<span class="form-control select-box">
<select class="select" size="1" name="localHouse">
<select class="select" size="1" name="clientInfoInputVO.localHouse">
<option <?= $clientInfoOutputVO && $clientInfoOutputVO->localHouse == $k ? 'selected' : '' ?>
value="0"></option>
<option <?= $clientInfoOutputVO && $clientInfoOutputVO->localHouse == $k ? 'selected' : '' ?>
......@@ -144,18 +118,18 @@
<div class="info">
<?php foreach ($this->session->dwellEnum as $k => $v): ?>
<div class="live-info">
<input type="checkbox" <?= $clientInfoOutputVO && $clientInfoOutputVO->dwellState == $k ? 'checked' : '' ?>
name="dwellState">
<input type="radio" <?= $clientInfoOutputVO && $clientInfoOutputVO->dwellState == $k ? 'checked' : '' ?>
name="clientInfoInputVO.dwellState">
<span><?= $v ?></span>
<?php if ($k == 0): ?>
<input type="text" <?= $clientInfoOutputVO && $clientInfoOutputVO->dwellState == $k ? $clientInfoOutputVO->dwellDetail : '' ?>
class="input-decoration w-50 text-c" name="dwellDetail" value="">
class="input-decoration w-50 text-c" name="clientInfoInputVO.dwellDetail" value="">
<?php elseif ($k == 1): ?>
<input type="text" <?= $clientInfoOutputVO && $clientInfoOutputVO->dwellState == $k ? $clientInfoOutputVO->dwellDetail : '' ?>
name="dwellDetail" class="input-decoration w-50 text-c">
name="clientInfoInputVO.dwellDetail" class="input-decoration w-50 text-c">
<?php elseif ($k == 2): ?>
<input type="text" <?= $clientInfoOutputVO && $clientInfoOutputVO->dwellState == $k ? $clientInfoOutputVO->dwellDetail : '' ?>
name="dwellDetail" class="input-decoration w-50 text-c">
name="clientInfoInputVO.dwellDetail" class="input-decoration w-50 text-c">
<?php endif; ?>
</div>
<?php endforeach; ?>
......@@ -193,27 +167,27 @@
<div class="row cl">
<div class="form-group col-sm-3 col-md-2">
<label>手机</label>
<input type="text" class="form-control input-text"
<input type="text" class="form-control input-text" name="clientInfoInputVO.phoneNumber"
value="<?= $clientInfoOutputVO ? $clientInfoOutputVO->phoneNumber : '' ?>">
</div>
<div class="form-group col-sm-3 col-md-2">
<label>户口所在地</label>
<span class="form-control select-box">
<select class="select" size="1" id="province">
<select class="select" size="1" id="province" name="clientInfoInputVO.registerProvince">
</select>
</span>
</div>
<div class="form-group col-sm-3 col-md-2">
<label>&nbsp;</label>
<span class="form-control select-box">
<select class="select" size="1" id="city">
<select class="select" size="1" id="city" name="clientInfoInputVO.registerCity">
</select>
</span>
</div>
<div class="form-group col-sm-3 col-md-2">
<label>&nbsp;</label>
<span class="form-control select-box">
<select class="select" size="1" id="county">
<select class="select" size="1" id="county" name="clientInfoInputVO.registerCounty">
</select>
</span>
</div>
......@@ -230,7 +204,7 @@
<div class="row cl">
<div class="form-group col-sm-6 col-md-4">
<label>现居住地址</label>
<input type="text" class="form-control input-text"
<input type="text" class="form-control input-text" name="clientInfoInputVO.currentAddress"
value="<?= $clientInfoOutputVO ? $clientInfoOutputVO->currentAddress :'' ?>">
</div>
</div>
......@@ -241,20 +215,21 @@
<div class="panel-header">单位信息</div>
<div class="panel-body">
<div class="row cl">
<input type="hidden" class="form-control input-text" name="clientInfoInputVO.userId" value="<?= $clientInfoOutputVO ? $clientInfoOutputVO->id: '' ?>">
<div class="form-group col-sm-3 col-md-2">
<label>单位名称</label>
<input type="text" class="form-control input-text"
<input type="text" class="form-control input-text" name="clientUnitInputVO.unitName"
value="<?= $clientUnitOutputVO ? $clientUnitOutputVO->unitName : '' ?>">
</div>
<div class="form-group col-sm-3 col-md-2">
<label>部门</label>
<input type="text" class="form-control input-text"
<input type="text" class="form-control input-text" name="clientUnitInputVO.department"
value="<?= $clientUnitOutputVO ? $clientUnitOutputVO->department : '' ?>">
</div>
<div class="form-group col-sm-3 col-md-2">
<label>单位性质</label>
<span class="form-control select-box">
<select class="select" size="1">
<select class="select" size="1" name="clientUnitInputVO.unitNature">
<?php foreach ($this->session->unitEnum as $k => $v): ?>
<option <?= $clientUnitOutputVO && $clientUnitOutputVO->unitNature == $k ? 'selected' : '' ?>
value="<?= $k ?>"><?= $v ?></option>
......@@ -275,7 +250,7 @@
</div>
<div class="form-group col-sm-3 col-md-2">
<label>职位名称</label>
<input type="text" class="form-control input-text"
<input type="text" class="form-control input-text" name="clientUnitInputVO.jobPosition"
value="<?= $clientUnitOutputVO ? $clientUnitOutputVO->jobPosition : '' ?>">
</div>
</div>
......@@ -283,25 +258,25 @@
<div class="row cl">
<div class="form-group col-sm-3 col-md-2">
<label>现单位入职时间</label>
<input type="text" class="form-control input-text Wdate" onfocus="WdatePicker()"
<input type="text" class="form-control input-text Wdate" name="clientUnitInputVO.currentUnitEntryDate"
value="<?= $clientUnitOutputVO ? $clientUnitOutputVO->currentUnitEntryDate : '' ?>">
</div>
<div class="form-group col-sm-3 col-md-2">
<label>现单位工作年限</label>
<input type="text" class="form-control input-text"
<input type="text" class="form-control input-text" name="clientUnitInputVO.currentUnitWorkYears"
value="<?= $clientUnitOutputVO ? $clientUnitOutputVO->currentUnitWorkYears : '' ?>">
<span class="glyphicon glyphicon-year form-control-feedback" aria-hidden="true"></span>
</div>
<div class="form-group col-sm-3 col-md-2">
<label>现单位电话</label>
<input type="text" class="form-control input-text"
<input type="text" class="form-control input-text" name="clientUnitInputVO.unitPhone"
value="<?= $clientUnitOutputVO ? $clientUnitOutputVO->unitPhone : '' ?>">
</div>
<div class="form-group col-sm-3 col-md-2">
<label>职称类型</label>
<span class="form-control select-box">
<select class="select" size="1">
<select class="select" size="1" name="clientUnitInputVO.jobType">
<?php foreach ($this->session->jobTypeEnum as $k => $v): ?>
<option <?= $clientUnitOutputVO && $clientUnitOutputVO->jobType == $k ? 'selected' : '' ?>
value="<?= $k ?>"><?= $v ?></option>
......@@ -315,14 +290,14 @@
<div class="row cl">
<div class="form-group col-sm-3 col-md-2">
<label>月收入</label>
<input type="text" class="form-control input-text"
<input type="text" class="form-control input-text" name="clientUnitInputVO.monthlyIncome"
value="<?= $clientUnitOutputVO ? $clientUnitOutputVO->monthlyIncome : '' ?>">
<span class="glyphicon glyphicon-rmb form-control-feedback" aria-hidden="true"></span>
</div>
<div class="form-group col-sm-3 col-md-2">
<label>工资发放形式</label>
<span class="form-control select-box">
<select class="select" size="1">
<select class="select" size="1" name="clientUnitInputVO.salaryGrantForm">
<?php foreach ($this->session->wagePaymentFormEnum as $k => $v): ?>
<option <?= $clientUnitOutputVO && $clientUnitOutputVO->salaryGrantForm == $k ? 'selected' : '' ?>
value="<?= $k ?>"><?= $v ?></option>
......@@ -335,7 +310,7 @@
<div class="row cl">
<div class="form-group col-sm-6 col-md-4">
<label>现单位所在地</label>
<input type="text" class="form-control input-text"
<input type="text" class="form-control input-text" name="clientUnitInputVO.currentUnitAddress"
value="<?= $clientUnitOutputVO ? $clientUnitOutputVO->currentUnitAddress : '' ?>">
</div>
</div>
......@@ -348,14 +323,15 @@
<?php if($clientContactOutputVOS):?>
<?php foreach ($clientContactOutputVOS as $k=>$v):?>
<div class="row cl">
<input type="hidden" class="form-control input-text" name="clientContactInputVOS.<?=$k?>.userId" value="<?= $clientInfoOutputVO ? $clientInfoOutputVO->id : '' ?>">
<div class="form-group col-sm-3 col-md-2">
<label>联系人姓名</label>
<input type="text" class="form-control input-text" name="contactName" value="<?=$v->contactName?>">
<input type="text" class="form-control input-text" name="clientContactInputVOS.<?=$k?>.contactName" value="<?=$v->contactName?>">
</div>
<div class="form-group col-sm-3 col-md-2">
<label>是您的</label>
<span class="form-control select-box">
<select class="select" size="1" name="contactRelation">
<select class="select" size="1" name="clientContactInputVOS.<?=$k?>.contactRelation">
<?php foreach ($this->session->relationEnum as $kk => $vv): ?>
<option <?= $vv && $v->contactRelation == $kk ? 'selected' : '' ?>
value="<?= $kk ?>"><?= $vv ?></option>
......@@ -365,20 +341,21 @@
</div>
<div class="form-group col-sm-3 col-md-2">
<label>手机号</label>
<input type="text" name="contactPhone" class="form-control input-text" value="<?=$v ? $v->contactPhone : ''?>">
<input type="text" name="clientContactInputVOS.<?=$k?>.contactPhone" class="form-control input-text" value="<?=$v ? $v->contactPhone : ''?>">
</div>
</div>
<?php endforeach;?>
<?php endif;?>
<div class="row cl">
<input type="hidden" class="form-control input-text" name="clientContactInputVOS.99.userId" value="<?= $clientInfoOutputVO ? $clientInfoOutputVO->id : '' ?>">
<div class="form-group col-sm-3 col-md-2">
<label>联系人姓名</label>
<input type="text" class="form-control input-text" name="contactName" value="">
<input type="text" class="form-control input-text" name="clientContactInputVOS.99.contactName" value="">
</div>
<div class="form-group col-sm-3 col-md-2">
<label>是您的</label>
<span class="form-control select-box">
<select class="select" size="1" name="contactRelation">
<select class="select" size="1" name="clientContactInputVOS.99.contactRelation">
<?php foreach ($this->session->relationEnum as $k => $v): ?>
<option value="<?= $k ?>"><?= $v ?></option>
<?php endforeach; ?>
......@@ -387,18 +364,19 @@
</div>
<div class="form-group col-sm-3 col-md-2">
<label>手机号</label>
<input type="text" class="form-control input-text" name="contactPhone" value="">
<input type="text" class="form-control input-text" name="clientContactInputVOS.99.contactPhone" value="">
</div>
</div>
<div class="row cl">
<input type="hidden" class="form-control input-text" name="clientContactInputVOS.98.userId" value="<?= $clientInfoOutputVO ? $clientInfoOutputVO->id : '' ?>">
<div class="form-group col-sm-3 col-md-2">
<label>联系人姓名</label>
<input type="text" class="form-control input-text" name="contactName" value="">
<input type="text" class="form-control input-text" name="clientContactInputVOS.98.contactName" value="">
</div>
<div class="form-group col-sm-3 col-md-2">
<label>是您的</label>
<span class="form-control select-box">
<select class="select" size="1" name="contactRelation">
<select class="select" size="1" name="clientContactInputVOS.98.contactRelation">
<?php foreach ($this->session->relationEnum as $k => $v): ?>
<option value="<?= $k ?>"><?= $v ?></option>
<?php endforeach; ?>
......@@ -407,18 +385,19 @@
</div>
<div class="form-group col-sm-3 col-md-2">
<label>手机号</label>
<input type="text" class="form-control input-text" name="contactPhone" value="">
<input type="text" class="form-control input-text" name="clientContactInputVOS.98.contactPhone" value="">
</div>
</div>
<div class="row cl">
<input type="hidden" class="form-control input-text" name="clientContactInputVOS.97.userId" value="<?= $clientInfoOutputVO ? $clientInfoOutputVO->id : '' ?>">
<div class="form-group col-sm-3 col-md-2">
<label>联系人姓名</label>
<input type="text" class="form-control input-text" name="contactName" value="">
<input type="text" class="form-control input-text" name="clientContactInputVOS.97.contactName" value="">
</div>
<div class="form-group col-sm-3 col-md-2">
<label>是您的</label>
<span class="form-control select-box">
<select class="select" size="1" name="contactRelation">
<select class="select" size="1" name="clientContactInputVOS.97.contactRelation">
<?php foreach ($this->session->relationEnum as $k => $v): ?>
<option value="<?= $k ?>"><?= $v ?></option>
<?php endforeach; ?>
......@@ -427,7 +406,7 @@
</div>
<div class="form-group col-sm-3 col-md-2">
<label>手机号</label>
<input type="text" class="form-control input-text" name="contactPhone" value="">
<input type="text" class="form-control input-text" name="clientContactInputVOS.97.contactPhone" value="">
</div>
</div>
</div>
......@@ -437,16 +416,17 @@
<div class="panel-header">贷款事项</div>
<div class="panel-body">
<div class="row cl">
<input type="hidden" class="form-control input-text" name="applyOrderVO.id" value="<?= $applyOrderVO ? $applyOrderVO->id : '' ?>">
<div class="form-group col-sm-3 col-md-2">
<label>申请金额</label>
<input type="text" class="form-control input-text"
<label id="applyMoney">申请金额</label>
<input type="number" class="form-control input-text" name="applyOrderVO.applyMoney"
value="<?= $applyOrderVO ? $applyOrderVO->applyMoney : '' ?>">
<span class="glyphicon glyphicon-rmb form-control-feedback" aria-hidden="true"></span>
</div>
<div class="form-group col-sm-3 col-md-2">
<label>贷款期限</label>
<label id="deadline">贷款期限</label>
<span class="form-control select-box">
<select class="select" size="1">
<select class="select" size="1" name="applyOrderVO.deadline">
<?php for ($i = 1; $i <= 12; $i++): ?>
<option <?= $applyOrderVO && $applyOrderVO->deadline ? 'selected' : '' ?>
value="<?= $i ?>"><?= $i ?></option>
......@@ -457,7 +437,7 @@
<div class="form-group col-sm-3 col-md-2">
<label>还款方式</label>
<span class="form-control select-box">
<select class="select" size=c"">
<select class="select" size=c"" name="applyOrderVO.payBackType">
<?php foreach ($this->session->repayments as $k => $v): ?>
<option <?= $applyOrderVO && $applyOrderVO->payBackType ? 'selected' : '' ?>
value="<?= $k ?>"><?= $v ?></option>
......@@ -468,7 +448,7 @@
<div class="form-group col-sm-3 col-md-2">
<label>贷款用途</label>
<span class="form-control select-box">
<select class="select" size="1">
<select class="select" size="1" name="applyOrderVO.use">
<?php foreach ($this->session->loanUseEnum as $k => $v): ?>
<option value="<?= $k ?>"><?= $v ?></option>
<?php endforeach; ?>
......@@ -483,20 +463,20 @@
<div class="panel-header">其他</div>
<div class="panel-body">
<div class="row cl">
<div class="form-group col-sm-3 col-md-2">
<!-- <div class="form-group col-sm-3 col-md-2">
<label>贷款品种/代码</label>
<span class="form-control select-box">
<select class="select" size="1">
<select class="select" size="1" name="applyOrderVO.productId">
<?php foreach ($this->session->products as $k => $v): ?>
<option value="<?= $v->id ?>"><?= $v->productName ?></option>
<?php endforeach; ?>
</select>
</span>
</div>
</div> -->
<div class="form-group col-sm-3 col-md-2">
<label>贷款性质</label>
<span class="form-control select-box">
<select class="select" size="1">
<select class="select" size="1" name="applyOrderVO.useNature">
<?php foreach ($this->session->loanNatureEnum as $k => $v): ?>
<option value="<?= $k ?>"><?= $v ?></option>
<?php endforeach; ?>
......@@ -517,7 +497,7 @@
<?php $this->load->view('work/图片上传'); ?>
<div class="col-sm-offset-4 col-sm-4 pb-20">
<button class="btn btn-primary btn-block" type="button" onclick="submit()">提交</button>
<button class="btn btn-primary btn-block" type="button" onclick="save()">提交</button>
</div>
</div>
</form>
......@@ -562,17 +542,45 @@
}
});
function submit() {
layer.confirm('提交成功之后, 将立即进入审批阶段', {
btn: ['确认', '取消'],
title: '提交订单'
}, function () {
layer_load('提交成功', '<?=site_url("work/recorded")?>');
function save() {
var data = $("form").serializeJson();
data = json(data);
data.clientContactInputVOS = Object.values(data.clientContactInputVOS);
ajax('client/collection', 'post', data, '操作成功', function () {
window.parent.reload();
layer_close();
});
}
var loc = beva.locationutil.attach('province', 'city', 'county', 'address');
$('input[name="applyOrderVO.products"]').on('change', function () {
const limit = $(this).data('limit');
const deadline = $(this).data('deadline');
$('#applyMoney').html('申请金额(max: '+limit+')');
$('#deadline').html('贷款期限(max: '+deadline+')');
})
$('input[name="applyOrderVO.applyMoney"]').on('keyup', function () {
var product = $('input[name="applyOrderVO.products"]:checked');
var limit = product.data('limit')
if($(this).val() > limit) {
$(this).val(limit)
}
});
$('select[name="applyOrderVO.deadline"]').on('change', function () {
var product = $('input[name="applyOrderVO.products"]:checked');
var deadline = product.data('deadline')
if($(this).val() > deadline) {
$(this).val(deadline)
}
});
uploadList();
</script>
</body>
......
......@@ -326,3 +326,7 @@ label.radio > input:checked + img{
.top .name, .top .num {
padding-left: 40px;
}
.input-text[type="number"] {
width: 100%;
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!