...
|
...
|
@@ -23,6 +23,7 @@ |
|
|
</div>
|
|
|
已提交订单
|
|
|
</div>
|
|
|
<div class="test_num"></div>
|
|
|
<div class="header_place"></div>
|
|
|
|
|
|
<div class="tab_tit">
|
...
|
...
|
@@ -95,54 +96,20 @@ |
|
|
date: date,
|
|
|
sort_id: "{$sort_id}"
|
|
|
};
|
|
|
$.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.name}</span>
|
|
|
</p>
|
|
|
${status}
|
|
|
</div>
|
|
|
<p class="order_num">订单编号:${element.order_sn}</p>
|
|
|
<p class="order_data" id="change_time">提交时间:${element.create_time}</p>
|
|
|
${change}
|
|
|
</div>`;
|
|
|
});
|
|
|
$('.deal_list').html(html);
|
|
|
}
|
|
|
} else {
|
|
|
_error(res.msg);
|
|
|
}
|
|
|
},
|
|
|
error: function(XHR,errorMsg,errorType) {
|
|
|
_error(errorMsg);
|
|
|
},
|
|
|
complete: function(XHR,TS) {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
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');
|
...
|
...
|
@@ -154,6 +121,71 @@ |
|
|
$('.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.name}</span>
|
|
|
</p>
|
|
|
${status}
|
|
|
</div>
|
|
|
<p class="order_num">订单编号:${element.order_sn}</p>
|
|
|
<p class="order_data" id="change_time">提交时间:${element.create_time}</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
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
</body>
|
|
|
|
...
|
...
|
|