deal.html
8.2 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<include file="public@head_common"/>
<link rel="stylesheet" type="text/css" href="__TMPL__/public/mobile/css/weui.css" />
<link rel="stylesheet" type="text/css" href="__TMPL__/public/mobile/css/myweui.css" />
<link rel="stylesheet" type="text/css" href="__TMPL__/public/mobile/css/augly.css" />
<link rel="stylesheet" type="text/css" href="__TMPL__/public/mobile/css/write/deal_list.css" />
<title>已提交订单</title>
<style type="text/css">
.foot_icon{
display: flex;
justify-content: center;
/* position: absolute; */
position: fixed;
bottom: 0.2rem;
left: 0;
right: 0;
}
</style>
</head>
<body>
<div class="header">
<div class="return">
<span class="back_href">
<i class="iconfont icon-jiantou-copy"></i>返回
</span>
</div>
已提交订单
</div>
<div class="test_num"></div>
<div class="header_place"></div>
<div class="tab_tit">
<p class="tab_item write_order">填写电子订单</p>
<p class="tab_item active">查看已提交订单</p>
</div>
<div class="choose_time">
<i class="iconfont icon-rili"></i>选择提交时间
</div>
<div class="deal_list">
<volist name="orderList" id="vo">
<div class="list_style" data-href="{:url('detail',['id'=>$sort_id,'order_id'=>$vo['id']])}">
<div class="style_one">
<p class="style_text">
订单类型:<span class="font_weight">{$vo.sort_name}</span>
</p>
<eq name="vo.status" value="0">
<p class="order_state">未支付</p>
</eq>
<eq name="vo.status" value="1">
<p class="no_pay">已支付</p>
</eq>
</div>
<p class="order_num">订单编号:{$vo.order_sn}</p>
<p class="order_data" id="change_time">提交时间:{:date('Y-m-d',$vo['create_time'])}</p>
<p class="order_data">订单确认码:{$vo.number}</p>
<p class="order_data">联系电话:{$vo.mobile}</p>
<eq name="vo.status" value="0">
<div class="change_btn" data-href="{:url('edit',['id'=>$sort_id,'order_id'=>$vo['id']])}">修改</div>
</eq>
</div>
</volist>
</div>
<!--<div class="list_style">-->
<!--<div class="style_one">-->
<!--<p class="style_text">-->
<!--订单类型:<span class="font_weight">新规</span>-->
<!--</p>-->
<!--<p class="no_pay">未支付</p>-->
<!--</div>-->
<!--<p class="order_num">订单编号:1822 3766 4456 8888</p>-->
<!--<p class="order_data">提交时间:2018-04-10</p>-->
<!--</div>-->
<div class="footstyle bottom_icon">
<img src="__TMPL__/public/mobile/images/biglogo@2x.png" class="bottom_img" />
<p class="bottom_text">{$site_info.site_name}</p>
</div>
<script src="__TMPL__/public/mobile/js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/mobile/js/weui.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/mobile/js/myweui.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/mobile/js/swiper-4.3.5.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/mobile/js/common.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$('.choose_time').click(function(){
weui.datePicker({
start: 2000,
end: 2030,
defaultValue: [2015, 6, 9],
onChange: function(result) {
console.log(result);
},
onConfirm: function(result) {
var birthday = result[0].label + result[1].label + result[2].label;
$('.choose_time').html(`<i class="iconfont icon-rili"></i>${birthday}`);
var date = result[0].value + '-' + result[1].value + '-' + result[2].value;
var data = {
date: date,
sort_id: "{$sort_id}"
};
list(data);
},
id: 'datePicker'
});
});
$('body').on('click','.weui-picker__action',function() {
if($(this).data('action') == 'cancel') {
$('.choose_time').html(`<i class="iconfont icon-rili"></i>选择提交时间`);
list({
date: '',
sort_id: "{$sort_id}"
});
}
});
$('.deal_list').on('click','.change_btn',function(event){
event.stopPropagation();
location.href = $(this).data('href');
});
$('.deal_list').on('click','.list_style',function(){
event.stopPropagation();
location.href = $(this).data('href');
});
$('.tab_tit').on('click','.write_order',function(){
location.href = "{$orderUrl}";
});
// ajax数据渲染
function list(data) {
$.ajax({
url: "{:url('choosetime_detail')}",
type: "POST",
data: data,
dataType: "JSON",
success: function (res) {
console.log(res);
if (res.code == 1) {
if(res.data.length == 0) {
$('.deal_list').html('');
} else {
html = '';
$(res.data).each(function(index,element){
var status = `<p class="order_state">未支付</p>`;
var change = `<div class="change_btn" data-href="${element.edit_url}">修改</div>`;
if(element.status == 1) {
status = `<p class="no_pay">已支付</p>`;
change = '';
}
html += `<div class="list_style" data-href="${element.detail_url}">
<div class="style_one">
<p class="style_text">
订单类型:<span class="font_weight">${element.sort_name}</span>
</p>
${status}
</div>
<p class="order_num">订单编号:${element.order_sn}</p>
<p class="order_data" id="change_time">提交时间:${element.create_time}</p>
<p class="order_data">订单确认码:${element.number}</p>
<p class="order_data">联系电话:${element.mobile}</p>
${change}
</div>`;
});
$('.deal_list').html(html);
}
} else {
_error(res.msg);
}
},
error: function(XHR,errorMsg,errorType) {
_error(errorMsg);
},
complete: function(XHR,TS) {
}
});
}
// 弹窗提示
var popup_switch = true;
function _error(test) {
if(popup_switch) {
popup_switch = false;
$('.test_num').html(test);
$('.test_num').removeClass('Augly-fadeout');
$('.test_num').addClass('Augly-fadein');
$('.test_num').show();
setTimeout(function() {
$('.test_num').removeClass('Augly-fadein');
$('.test_num').addClass('Augly-fadeout');
popup_switch = true
}, 1500)
} else {
popup_switch = true
}
}
//固定公司底部的名字
var h=$(".deal_list").height();
if(h>445){
$(".footstyle").addClass("bottom_icon");
$(".footstyle").removeClass("foot_icon");
}else if(h<=445){
$(".footstyle").addClass("foot_icon");
$(".footstyle").removeClass("bottom_icon");
}
// alert($(".deal_list").height())
</script>
</body>
</html>