info.php
11.9 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<?php
use yii\helpers\Url;
use app\ht\helpers\CssFiles;
use domain\trade\workorder\WorkOrderStatus;
$this->title = '工单详情';
$this->params['breadcrumbs'][] = '工单管理';
$this->params['breadcrumbs'][] = ['label' => '工单列表', 'url' => ['/trade/work-order/index']];
$this->params['breadcrumbs'][] = $this->title;
CssFiles::register($this, 'exts/showimg/css/showimg.css');
$markTag = false;
$is_finished_tag = 0;
if (isset($is_finished)) {
// 如果有回访记录提交,回访完成,则标记为1,未完成,则标记为2
$is_finished_tag = ($is_finished == 1) ? 1 : 2 ;
}
?>
<style>
.checkout_m{float: left;margin-right: 8px !important;}
.checkLabel{margin-right:40px}
.actionBtn{cursor: pointer }
.jumper{margin-left:20px}
.content-wrap .content-edit-ready{float: right;}
.content-wrap .content-show{width: 80%;float: left!important;}
.content-edit-ready{width: 20%;}
.fake-textarea{
padding: 10px 15px;
border: 1px solid #CCCCCC;
color: #777777;
font-size: 14px;
cursor: text;
border-radius: 4px;
text-align: left;
width: 49%;
}
.content-show-textarea{width: 80%;height: 80px;}
textarea {border-radius: 4px;}
.ready-editor{display: none;}
.select-div {
display: inline-block;
float: left;
margin-right: 10px;
margin-bottom:5px;
color: #FFFFFF;
border-radius: 5px;
padding: 5px 10px 5px 10px;
/*background-color: #F4F4F4*/
}
.select-div:hover {
cursor: pointer;
}
.select-div input {
display: none;
}
.select-div span {
text-align: center;
}
</style>
<div class="panel panel-default">
<div id="warning"></div>
<input type="hidden" value="<?=$order['id'] ?>" name="order_id" id="order_id" >
<div class="panel-body">
<table class="table table-bordered">
<tr>
<td colspan="6" class="bg-info">订单信息</td>
</tr>
<tr>
<th width="10%">订单号</th>
<td width="20%"><?=$order['order_no']; ?></td>
<th width="10%">订单状态</th>
<td width="20%"><?= WorkOrderStatus::label($order['status']); ?></td>
<th width="10%">支付单号</th>
<td width="20%"><?=$order['pay_no']; ?></td>
</tr>
<tr>
<th>工程师姓名</th>
<td><?=$order['realname']; ?></td>
<th>工程师昵称</th>
<td><?=$order['nickname']; ?></td>
<th>工程师电话</th>
<td><?= $order['phone'] ?></td>
</tr>
<tr>
<th>支付时间</th>
<td><?php if (!empty($order['pay_at'])) {
echo Yii::$app->formatter->asTime($order['pay_at'],"yyyy-MM-dd HH:mm:ss");
?>
<?php }else{ ?>
暂无时间
<?php }?>
</td>
<th>用工类型</th>
<td><?=$order['employ_type']; ?></td>
<th>用工人数</th>
<td><?= $order['employ_num'] ?></td>
</tr>
<tr>
<th>用工地址</th>
<td>
<?= $order['address'] . "(" . $order['address_title'] . ")" ?>
</td>
<th>结算方式</th>
<td><?= $order["pay_type"] == 1 ? "按天" : "按小时" ?></td>
<th>是否支付</th>
<td><?= $order["has_pay"] == 1 ? "已支付" : "未支付" ?></td>
</tr>
<tr>
<th>单位时间用工费用</th>
<td><?=$order['pay_unit_fee']; ?></td>
<th>单位服务费金额</th>
<td><?=$order['service_unit_fee']; ?></td>
<th>服务费金额</th>
<td><?=$order['service_fee']; ?></td>
</tr>
<tr>
<th>实付服务费金额</th>
<td>
<?=$order['pay_service_fee']; ?> </span>
</td>
<th>备注</th>
<td colspan="3"> <?=$order['remark'];?> </td>
</tr>
<tr>
<th>是否已派单</th>
<td>
<?= $order["has_dispatch"] == 1 ? "已派单" : "未派单" ?>
</td>
<th>派单工程师</th>
<td><?= $order["dispatch_engineer_count"] ?></td>
<th>工单用人时间</th>
<td><?=date("Y-m-d H:i:s", $order['start_at']) ?> 至 <?=date("Y-m-d H:i:s", $order['end_at']) ?></td>
</tr>
<tr>
<th>订单操作</th>
<td colspan="5"></td>
</tr>
</table>
</div>
<div class="panel-body">
<table class="table table-bordered text-center">
<tr>
<td colspan="4" class="bg-info text-left">接单工程师</td>
</tr>
<tr>
<th class="text-center" width="25%">工程师姓名</th>
<th class="text-center" width="25%">工程师昵称</th>
<th class="text-center" width="25%">工程师手机号码</th>
<th class="text-center" width="25%">接单时间</th>
</tr>
<?php
if ($engineers){
foreach($engineers as $engineer): ?>
<tr>
<td class="text-left"><?=$engineer['realname'] ?></td>
<td class="text-left" ><?=$engineer['nickname'] ?></td>
<td><?=$engineer['phone'] ?></td>
<td><?=date("Y-m-d H:i:s", $engineer['created_at']) ?></td>
</tr>
<?php endforeach;
}else{
?>
<tr><td colspan="4" >暂无接单工程师</td></tr>
<?php
}
?>
</table>
</div>
<div class="panel-body form-inline">
<table class="table" style="border-top:none;">
<tr>
<td class="col-sm-6" style="vertical-align: top">
<table class="table table-bordered">
<tr>
<td class="bg-info">后台备注</td>
</tr>
<tr>
<td width="100%"><textarea class="form-control" style="width:100%;" rows="3" id="remark" name="remark"></textarea></td>
</tr>
<tr class="text-center">
<td>
<button type="button" class="btn btn-primary ladda-button" data-style="slide-up" id="save">提交备注</button>
</td>
</tr>
</table>
</td>
<td class="col-sm-6" style="vertical-align: top">
<table class="table table-bordered">
<tr>
<td colspan="3" class="bg-info">操作日志</td>
</tr>
<tr>
<th width="112" >操作时间</th>
<th width="130" >操作人员</th>
<th >操作内容</th>
</tr>
<?php foreach($logs as $log): ?>
<tr>
<td><?=Yii::$app->formatter->asTime($log['log_at'],"yyyy-MM-dd HH:mm:ss"); ?></td>
<td><?=$log['operator_user'] ?></td>
<td><?=$log['content'] ?></td>
</tr>
<?php endforeach; ?>
</table>
</td>
</tr>
</table>
</div>
</div>
<div class="modal fade" id="phoneModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">修改联系电话</h4>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<input type="text" class="form-control" id="changePhoneNumber" placeholder="例如 1380038000">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="phoneSubmitBtn">提交</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>
<script type="text/javascript" src="<?=Url::toRoute('/exts/showimg/js/showimg.js')?>" ></script>
<script src="<?=Yii::$app->request->baseUrl?>/exts/base/1.0.0/ui/kindeditor/kindeditor-all-min.js"></script>
<link rel="stylesheet" href="<?=Yii::$app->request->baseUrl?>/exts//base/1.0.0/ui/kindeditor/themes/simple/simple.css" />
<script type="text/javascript">
var kinditerArry = new Array();
function createMoreEditor(id) {
if (kinditerArry.hasOwnProperty(id)) {
kinditerArry[id].remove();
}
kinditerArry[id] = KindEditor.create('#content-show-textarea-' + id, {
allowFileManager : true,
themeType : 'simple',
minWidth : '432px',
filterMode: false, // 允许输入任何代码(不做过滤)
items : [
'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen',
'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage', 'gallery', '|',
'table', 'hr', 'pagebreak',
'anchor', 'link', 'unlink'
],
uploadJson : '<?= Url::toRoute(['/site/editor-upload']) ?>',
formatUploadUrl: false,
baseUrl: '<?= Yii::$app->request->baseUrl ?>'
});
}
</script>
<script>
$(document).ready(function () {
$("#save").bind("click", function () {
var id = $("#order_id").val();
var remark = $("#remark").val();
if (remark == null || remark == ""){
alert("请填写备注内容");
return false;
}
if (id == null || id == ""){
alert("丢失标记信息,无法提交备注");
return false;
}
var l = $.ladda(this);
$.ajax({
type: "post",
url: "do-update-remark",
dataType:"json",
data: $.csrf({"id":id,"remark":remark}),
success:function(msg){
alert(msg['msg']);
if (msg['status'] == 1){
location.reload();
}else{
}
},
beforeSend: function () {
// 开始显示
l.start();
},
complete: function () {
// 取消加载提示
l.stop();
},
error:function(msg){
}
});
});
})
</script>