意见.php
5.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php $this->load->view('common/header'); ?>
<body>
<div class="cl pd-5 bg-1">
<span class="l">
<?php if($applyOrderVO->status == 4): ?>
<button class="btn btn-primary radius" onclick="loadIframe('<?=site_url('work/check/6/'.$id)?>', '录入信用报告');">录入信用报告</button>
<button class="btn btn-primary radius" onclick="loadIframe('<?=site_url('work/check/7/'.$id)?>', '网查筛查');">网查筛查</button>
<button class="btn btn-primary radius" onclick="loadIframe('<?=site_url('work/check/8/'.$id)?>', '电核');">电核</button>
<?php endif;?>
<button class="btn btn-primary radius" onclick="loadIframe('<?=site_url('work/check/9/'.$id)?>', '受理意见');">受理意见</button>
</span>
</div>
<form action="" id="form">
<div class="panel panel-default mb-20">
<div class="panel-header">审核意见</div>
<div class="panel-body">
<div class="row cl">
<div class="form-group col-sm-4 col-md-2">
<label>拟批</label>
<input type="text" class="form-control input-text" name="mockMoney" value="">
<span class="glyphicon form-control-feedback">元</span>
</div>
<div class="form-group col-sm-12">
<textarea class="textarea" placeholder="" name="description"></textarea>
</div>
</div>
<div class="row cl">
<div class="form-group col-sm-4 col-md-2">
<label>是否发起尽调</label>
<span class="form-control select-box">
<select class="select uploader" name="dueDiligence" size="1">
<option value="1">是</option>
<option value="0">否</option>
</select>
</span>
</div>
<div class="form-group col-sm-12">
<textarea class="textarea" placeholder="" name="diligencePurpose"></textarea>
</div>
</div>
</div>
</div>
<input type="hidden" name="orderId" value="<?=$id?>">
</form>
<div class="row cl pb-20 col-sm-12">
<div class="col-sm-offset-4 col-sm-2">
<button class="btn btn-warning btn-block" onclick="history.back()">退回订单</button>
</div>
<div class="col-sm-2">
<button class="btn btn-primary btn-block" onclick="next()">通过</button>
</div>
</div>
<?php $this->load->view('common/footer'); ?>
<script>
function next () {
layer.confirm('确认通过', {
btn: ['确认','取消'],
title: '通过',
icon: 3
}, function(){
var data = $('#form').serializeJson();
//发起尽调
if(data.dueDiligence){
$.ajax({
type: 'post',
url: apiBaseUrl + 'flow/firstDueDiligence',
cache: false,
data: JSON.stringify(data),
dataType: 'json',
contentType: "application/json; charset=UTF-8",
success: function (data) {
if (data.msg) {
layer.alert(data.msg);
} else if (data.code != 0) {
layer.alert('操作失败');
} else {
layer.alert('操作成功');
}
if(data.success){
setTimeout(function () {
loadIframe('<?=site_url('/work/check/12/'.$id);?>', '审核意见');
}, 500)
}
},
error: function () {
layer.alert("操作失败")
}
})
}else{
data.status = 1;
var orderStatus = "<?=$applyOrderVO->status?>";
var url = 'flow/saveFirstCheck';
if(orderStatus == 4) {
url = url;
} else if(orderStatus == 5) {
url = 'flow/saveSecoundCheck';
} else if(orderStatus == 6) {
url = 'flow/saveLastCheck';
}
$.ajax({
type: 'post',
url: apiBaseUrl + url,
cache: false,
data: JSON.stringify(data),
dataType: 'json',
contentType: "application/json; charset=UTF-8",
success: function (data) {
if (data.msg) {
layer.alert(data.msg);
} else if (data.code != 0) {
layer.alert('操作失败');
} else {
layer.alert('操作成功');
}
if(!data.code){
setTimeout(function () {
loadIframe('<?=site_url('/work/check/12/'.$id);?>', '审核意见');
}, 500)
}
},
error: function () {
layer.alert("操作失败")
}
})
}
});
}
</script>
</body>
</html>