Commit 37c6e986 authored by 谢希宇's avatar 谢希宇

Aidea product update by Strive Date 2020-11-27

parent 1b257dd7
...@@ -57,6 +57,39 @@ ...@@ -57,6 +57,39 @@
<div class="wrapper"> <div class="wrapper">
<div class="content-wrapper" style="margin-left:0;"> <div class="content-wrapper" style="margin-left:0;">
<!-- 当前选中框id -->
<input type="hidden" id="orderId">
<div class="modal fade" id="remindExampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="remindExampleModalLabel" style="font-weight: 700;">设置订单提醒</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form style="height: 80px;">
<div class="col-xs-6">
<select id="remind" name="remind" class="form-control required">
<option value="0">请选择提醒周期</option>
<option value="1">7天前</option>
<option value="2">当日</option>
<option value="3">7天后</option>
<option value="0">关闭提醒</option>
</select>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary" onclick="submitRemind()">提交</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
...@@ -384,6 +417,7 @@ ...@@ -384,6 +417,7 @@
{ {
"mData": "tradeNo" "mData": "tradeNo"
} }
, ,
{ {
"mData": "confirm" "mData": "confirm"
...@@ -420,7 +454,7 @@ ...@@ -420,7 +454,7 @@
], ],
"aoColumnDefs": [ "aoColumnDefs": [
{ // set default column settings { // set default column settings
//'visible': false, //'visible': false,
'aTargets': [0], 'aTargets': [0],
"mData":"id", "mData":"id",
"mRender": function(a, b, c, d){ "mRender": function(a, b, c, d){
...@@ -438,16 +472,16 @@ ...@@ -438,16 +472,16 @@
}, },
/*{ /*{
'targets': [1], 'targets': [1],
"mData":"id", "mData":"id",
"mRender": function(a, b, c, d){ "mRender": function(a, b, c, d){
if(isCheckedQyCode.indexOf(a+"")!=-1){ if(isCheckedQyCode.indexOf(a+"")!=-1){
return '<input class="isExport" checked value="'+a+'" type="checkBox">'; return '<input class="isExport" checked value="'+a+'" type="checkBox">';
}else{ }else{
return '<input class="isExport" value="'+a+'" type="checkBox">'; return '<input class="isExport" value="'+a+'" type="checkBox">';
} }
} }
},*/ },*/
{ {
"aTargets": [1], "aTargets": [1],
"mData": "number", "mData": "number",
...@@ -639,9 +673,10 @@ ...@@ -639,9 +673,10 @@
if (c.status != '4' && c.status != '5') { if (c.status != '4' && c.status != '5') {
html += '<li><a onclick="showModal(' + a + ')">订单关闭</a></li>'; html += '<li><a onclick="showModal(' + a + ')">订单关闭</a></li>';
} }
/* if (c.status == 4){ if (c.status == '4') {
html += '<li><a href="#springUrl("/a/order/invoice?id=' + a + '")">开发票</a></li>'; //需求订单已完成设置提醒
}*/ html += '<li><a onclick="showRemindModal(' + a + ')">订单提醒</a></li>';
}
// if (c.status == '2') {//待发货才可以出库操作 // if (c.status == '2') {//待发货才可以出库操作
// html += '<li><a href="#springUrl("/a/order/sendOut?id=' + a + '")">订单出库</a></li>'; // html += '<li><a href="#springUrl("/a/order/sendOut?id=' + a + '")">订单出库</a></li>';
// } // }
...@@ -794,6 +829,51 @@ ...@@ -794,6 +829,51 @@
}); });
Cfapp.init(); Cfapp.init();
function showRemindModal() {
$("#orderId").val(id);
$('#remindExampleModal').modal('show');
}
function submitRemind() {
let option = $('#remind option:selected') .val();
if (option == null || option == '') {
Cfapp.alert({
message: "请选择对应周期",
btntext: "确定",
success: function () {}
});
return;
}
var url = "#springUrl('/a/order/setOrderRemind')";
$.ajax({
url: url,
type: "GET",
data: {id: $("#orderId").val(),
option: option},
success: function (rsp) {
$('#remindExampleModal').modal('hide');
if (rsp.errorNo == "0") {
Cfapp.alert({
message: "设置成功",
btntext: "确定",
success: function () {
location.href = "#springUrl('/a/order/list')";
}
});
} else {
Cfapp.alert({
message: "设置失败",
btntext: "确定",
success: function () {
location.href = "#springUrl('/a/order/list')";
}
});
}
}
});
}
function showModal(id) { function showModal(id) {
$("#orderId").val(id); $("#orderId").val(id);
...@@ -881,16 +961,16 @@ ...@@ -881,16 +961,16 @@
} }
}) })
/*Cfapp.confirm({ /*Cfapp.confirm({
message: "确定要开发票吗", message: "确定要开发票吗",
btnoktext: "确定", btnoktext: "确定",
btncanceltext: "取消", btncanceltext: "取消",
success: function () { success: function () {
}, },
cancel: function () { cancel: function () {
$(".modal-backdrop").fadeOut(); $(".modal-backdrop").fadeOut();
} }
});*/ });*/
} }
function updateStatu(id, status, reason) { function updateStatu(id, status, reason) {
...@@ -900,7 +980,7 @@ ...@@ -900,7 +980,7 @@
type: "GET", type: "GET",
data: {id: id, data: {id: id,
orderCancel: reason, orderCancel: reason,
status: status}, status: status},
success: function (rsp) { success: function (rsp) {
if (status == '5') { if (status == '5') {
$('#exampleModal').modal('hide'); $('#exampleModal').modal('hide');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment