|
@@ -23,6 +23,7 @@ |
|
@@ -23,6 +23,7 @@ |
23
|
</div>
|
23
|
</div>
|
24
|
已提交订单
|
24
|
已提交订单
|
25
|
</div>
|
25
|
</div>
|
|
|
26
|
+<div class="test_num"></div>
|
26
|
<div class="header_place"></div>
|
27
|
<div class="header_place"></div>
|
27
|
|
28
|
|
28
|
<div class="tab_tit">
|
29
|
<div class="tab_tit">
|
|
@@ -95,54 +96,20 @@ |
|
@@ -95,54 +96,20 @@ |
95
|
date: date,
|
96
|
date: date,
|
96
|
sort_id: "{$sort_id}"
|
97
|
sort_id: "{$sort_id}"
|
97
|
};
|
98
|
};
|
98
|
- $.ajax({
|
|
|
99
|
- url: "{:url('choosetime_detail')}",
|
|
|
100
|
- type: "POST",
|
|
|
101
|
- data: data,
|
|
|
102
|
- dataType: "JSON",
|
|
|
103
|
- success: function (res) {
|
|
|
104
|
- console.log(res);
|
|
|
105
|
- if (res.code == 1) {
|
|
|
106
|
- if(res.data.length == 0) {
|
|
|
107
|
- $('.deal_list').html('');
|
|
|
108
|
- } else {
|
|
|
109
|
- html = '';
|
|
|
110
|
- $(res.data).each(function(index,element){
|
|
|
111
|
- var status = `<p class="order_state">未支付</p>`;
|
|
|
112
|
- var change = `<div class="change_btn" data-href="${element.edit_url}">修改</div>`;
|
|
|
113
|
- if(element.status == 1) {
|
|
|
114
|
- status = `<p class="no_pay">已支付</p>`;
|
|
|
115
|
- change = '';
|
|
|
116
|
- }
|
|
|
117
|
- html += `<div class="list_style" data-href="${element.detail_url}">
|
|
|
118
|
- <div class="style_one">
|
|
|
119
|
- <p class="style_text">
|
|
|
120
|
- 订单类型:<span class="font_weight">${element.name}</span>
|
|
|
121
|
- </p>
|
|
|
122
|
- ${status}
|
|
|
123
|
- </div>
|
|
|
124
|
- <p class="order_num">订单编号:${element.order_sn}</p>
|
|
|
125
|
- <p class="order_data" id="change_time">提交时间:${element.create_time}</p>
|
|
|
126
|
- ${change}
|
|
|
127
|
- </div>`;
|
|
|
128
|
- });
|
|
|
129
|
- $('.deal_list').html(html);
|
|
|
130
|
- }
|
|
|
131
|
- } else {
|
|
|
132
|
- _error(res.msg);
|
|
|
133
|
- }
|
|
|
134
|
- },
|
|
|
135
|
- error: function(XHR,errorMsg,errorType) {
|
|
|
136
|
- _error(errorMsg);
|
|
|
137
|
- },
|
|
|
138
|
- complete: function(XHR,TS) {
|
|
|
139
|
-
|
|
|
140
|
- }
|
|
|
141
|
- });
|
99
|
+ list(data);
|
142
|
},
|
100
|
},
|
143
|
id: 'datePicker'
|
101
|
id: 'datePicker'
|
144
|
});
|
102
|
});
|
145
|
});
|
103
|
});
|
|
|
104
|
+ $('body').on('click','.weui-picker__action',function() {
|
|
|
105
|
+ if($(this).data('action') == 'cancel') {
|
|
|
106
|
+ $('.choose_time').html(`<i class="iconfont icon-rili"></i>选择提交时间`);
|
|
|
107
|
+ list({
|
|
|
108
|
+ date: '',
|
|
|
109
|
+ sort_id: "{$sort_id}"
|
|
|
110
|
+ });
|
|
|
111
|
+ }
|
|
|
112
|
+ });
|
146
|
$('.deal_list').on('click','.change_btn',function(event){
|
113
|
$('.deal_list').on('click','.change_btn',function(event){
|
147
|
event.stopPropagation();
|
114
|
event.stopPropagation();
|
148
|
location.href = $(this).data('href');
|
115
|
location.href = $(this).data('href');
|
|
@@ -154,6 +121,71 @@ |
|
@@ -154,6 +121,71 @@ |
154
|
$('.tab_tit').on('click','.write_order',function(){
|
121
|
$('.tab_tit').on('click','.write_order',function(){
|
155
|
location.href = "{$orderUrl}";
|
122
|
location.href = "{$orderUrl}";
|
156
|
});
|
123
|
});
|
|
|
124
|
+ // ajax数据渲染
|
|
|
125
|
+ function list(data) {
|
|
|
126
|
+ $.ajax({
|
|
|
127
|
+ url: "{:url('choosetime_detail')}",
|
|
|
128
|
+ type: "POST",
|
|
|
129
|
+ data: data,
|
|
|
130
|
+ dataType: "JSON",
|
|
|
131
|
+ success: function (res) {
|
|
|
132
|
+ console.log(res);
|
|
|
133
|
+ if (res.code == 1) {
|
|
|
134
|
+ if(res.data.length == 0) {
|
|
|
135
|
+ $('.deal_list').html('');
|
|
|
136
|
+ } else {
|
|
|
137
|
+ html = '';
|
|
|
138
|
+ $(res.data).each(function(index,element){
|
|
|
139
|
+ var status = `<p class="order_state">未支付</p>`;
|
|
|
140
|
+ var change = `<div class="change_btn" data-href="${element.edit_url}">修改</div>`;
|
|
|
141
|
+ if(element.status == 1) {
|
|
|
142
|
+ status = `<p class="no_pay">已支付</p>`;
|
|
|
143
|
+ change = '';
|
|
|
144
|
+ }
|
|
|
145
|
+ html += `<div class="list_style" data-href="${element.detail_url}">
|
|
|
146
|
+ <div class="style_one">
|
|
|
147
|
+ <p class="style_text">
|
|
|
148
|
+ 订单类型:<span class="font_weight">${element.name}</span>
|
|
|
149
|
+ </p>
|
|
|
150
|
+ ${status}
|
|
|
151
|
+ </div>
|
|
|
152
|
+ <p class="order_num">订单编号:${element.order_sn}</p>
|
|
|
153
|
+ <p class="order_data" id="change_time">提交时间:${element.create_time}</p>
|
|
|
154
|
+ ${change}
|
|
|
155
|
+ </div>`;
|
|
|
156
|
+ });
|
|
|
157
|
+ $('.deal_list').html(html);
|
|
|
158
|
+ }
|
|
|
159
|
+ } else {
|
|
|
160
|
+ _error(res.msg);
|
|
|
161
|
+ }
|
|
|
162
|
+ },
|
|
|
163
|
+ error: function(XHR,errorMsg,errorType) {
|
|
|
164
|
+ _error(errorMsg);
|
|
|
165
|
+ },
|
|
|
166
|
+ complete: function(XHR,TS) {
|
|
|
167
|
+
|
|
|
168
|
+ }
|
|
|
169
|
+ });
|
|
|
170
|
+ }
|
|
|
171
|
+ // 弹窗提示
|
|
|
172
|
+ var popup_switch = true;
|
|
|
173
|
+ function _error(test) {
|
|
|
174
|
+ if(popup_switch) {
|
|
|
175
|
+ popup_switch = false;
|
|
|
176
|
+ $('.test_num').html(test);
|
|
|
177
|
+ $('.test_num').removeClass('Augly-fadeout');
|
|
|
178
|
+ $('.test_num').addClass('Augly-fadein');
|
|
|
179
|
+ $('.test_num').show();
|
|
|
180
|
+ setTimeout(function() {
|
|
|
181
|
+ $('.test_num').removeClass('Augly-fadein');
|
|
|
182
|
+ $('.test_num').addClass('Augly-fadeout');
|
|
|
183
|
+ popup_switch = true
|
|
|
184
|
+ }, 1500)
|
|
|
185
|
+ } else {
|
|
|
186
|
+ popup_switch = true
|
|
|
187
|
+ }
|
|
|
188
|
+ }
|
157
|
</script>
|
189
|
</script>
|
158
|
</body>
|
190
|
</body>
|
159
|
|
191
|
|