Commit b8f56dbd by 朱继来

Merge branch 'zjl_iteration_20181127' into development

parents 5fe2b66f eac51a4c
......@@ -1446,14 +1446,12 @@
// 弹出已调价的订单信息
$('.checkAdjusted').click(function(){
var adjusted_info = $('.adjusted_order').html();
var layer_btn;
var adjusted_info = $('.adjusted_order').html();
var order_id = $('input[name=order_id]').val();
var order_goods_type = $('input[name=order_goods_type]').val();
if (is_manager) {
layer_btn = ['驳回', '通过'];
} else {
layer_btn = [];
}
var layer_btn = is_manager ? ['通过', '驳回'] : [];
var url = order_goods_type == 1 ? '/details/'+order_id : '/details/'+order_id+'?tags=self';
// 弹出提示
layer.open({
......@@ -1463,15 +1461,15 @@
btn: layer_btn,
yes: function(index, layero){
$.ajax({
url : '/ajaxRejected',
url : '/ajaxSaveChange',
type: 'post',
data: $('#adjustedOrderForm').serialize()+'&order_status=1',
data: $('#adjustedOrderForm').serialize()+'&order_status=2',
dataType: 'json',
success: function (resp) {
if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功');
setTimeout(function(){
location.reload();
location.href = url;
}, 1000);
} else {
layer.alert(resp.errmsg || '网络异常');
......@@ -1485,15 +1483,16 @@
},
btn2: function(index, layero){
$.ajax({
url : '/ajaxSaveChange',
url : '/ajaxRejected',
type: 'post',
data: $('#adjustedOrderForm').serialize()+'&order_status=2',
data: $('#adjustedOrderForm').serialize()+'&order_status=1',
dataType: 'json',
success: function (resp) {
if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功');
setTimeout(function(){
location.reload();
// location.reload();
location.href = url;
}, 1000);
} else {
layer.alert(resp.errmsg || '网络异常');
......
......@@ -271,7 +271,7 @@
</table>
</div>
@if ($order_info['status'] == 1 && $order_temp_info['status'] == 1)
@if ($order_info['order_goods_type'] != 1 && in_array($order_info['status'], [1, 2]) && $order_temp_info['status'] == 1)
<a class="btn btn-primary checkAdjusted">查看调价信息</a>
@else
<a class="btn btn-primary checkOrder">提交</a>
......
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 sign in to comment