Commit f63c96f0 by 朱继来

Merge branch 'zjl_adjust_20180925' into development

parents 64ff8254 c3e5b51b
......@@ -318,7 +318,11 @@ Class AddOrderController extends Controller
$response = json_decode(curlApi($url, $data), true);
if ($response['err_code'] == 0) {
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg'], 'data'=>$response['data']];
} else {
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg']];
}
}
}
......
......@@ -608,6 +608,7 @@ Class OrderController extends Controller
array('create_time_sec', '下单时间'),
array('com_name', '公司名称'),
array('goods_name', '商品型号'),
array('supplier_name', '制造商'),
array('goods_number', '数量'),
array('goods_price', '单价'),
array('goods_amount', '商品小计'),
......@@ -622,7 +623,6 @@ Class OrderController extends Controller
array('shipping_status','发货状态'),
array('inv_type', '发票类型'),
array('invoice_status', '发票状态'),
array('company_name', '供应商'),
array('sale_name', $sale_name),
array('adtags', 'adtags来源'),
array('client_source', '新用户来源'),
......@@ -771,7 +771,7 @@ Class OrderController extends Controller
})
->where('it.status', '<>', -1)
->where('o.order_goods_type', '=', $map['order_goods_type'])
->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.inv_type', 'i.invoice_status', 'a.consignee', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'c.com_name', 'oe.send_remark')
->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'a.consignee', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'c.com_name', 'oe.send_remark')
->groupBy('it.rec_id')
->orderBy('o.create_time', 'DESC')
->get();
......@@ -874,6 +874,7 @@ Class OrderController extends Controller
$tmp[$i]['create_time_date'] = '';
$tmp[$i]['create_time_sec'] = '';
$tmp[$i]['com_name'] = '';
$tmp[$i]['supplier_name'] = '';
$tmp[$i]['goods_sum'] = '';
$tmp[$i]['shipping_fee'] = '';
$tmp[$i]['extra_fee'] = '';
......@@ -885,7 +886,6 @@ Class OrderController extends Controller
$tmp[$i]['shipping_status'] = ''; // 发货状态
$tmp[$i]['inv_type'] = ''; // 发票类型
$tmp[$i]['invoice_status'] = ''; // 发票状态
$tmp[$i]['company_name'] = '';
$tmp[$i]['sale_name'] = ''; // 推送业务员
$tmp[$i]['adtags'] = '';
$tmp[$i]['client_source'] = '';
......@@ -897,7 +897,8 @@ Class OrderController extends Controller
$tmp[$i]['consignee'] = isset($order[$i]->consignee) ? $order[$i]->consignee : '';
$tmp[$i]['create_time_date'] = date('Y-m-d', $order[$i]->create_time);
$tmp[$i]['create_time_sec'] = date('H:i:s', $order[$i]->create_time);
$tmp[$i]['com_name'] = isset($order[$i]->com_name) ? $order[$i]->com_name : '';
$tmp[$i]['com_name'] = isset($order[$i]->tax_title) ? $order[$i]->tax_title : '';
$tmp[$i]['supplier_name'] = $order[$i]->supplier_name;
$tmp[$i]['goods_sum'] = $this->getOrderPrice($order[$i]->order_id, 1);
$tmp[$i]['shipping_fee'] = $this->getOrderPrice($order[$i]->order_id, 3);
$tmp[$i]['extra_fee'] = $this->getOrderPrice($order[$i]->order_id, 2);
......@@ -909,7 +910,6 @@ Class OrderController extends Controller
$tmp[$i]['shipping_status'] = !empty($order[$i]->shipping_status) ? $shipping_status[$order[$i]->shipping_status] : '无发货信息'; // 发货状态
$tmp[$i]['inv_type'] = $order[$i]->inv_type ? $inv_type[$order[$i]->inv_type] : '未知'; // 发票类型
$tmp[$i]['invoice_status'] = !empty($order[$i]->invoice_status) ? $invoice_status[$order[$i]->invoice_status] : '无发票信息'; // 发票状态
$tmp[$i]['company_name'] = $order[$i]->supplier_name;
$tmp[$i]['sale_name'] = isset($sales) ? $sales->name : ''; // 推送业务员
$tmp[$i]['adtags'] = $order[$i]->order_source;
$tmp[$i]['client_source'] = $order[$i]->client_source;
......@@ -1906,6 +1906,7 @@ Class OrderController extends Controller
$order = DB::connection('order')
->table('lie_order')
->where('order_goods_type', '=', 1)
->where('order_pay_type', '<>', 3) // 过滤账期订单
->where('status', '=', 2)
// ->whereNotIn('user_id', $this->testMobile())
->where('is_type', '=', 0)
......
......@@ -994,6 +994,9 @@
if (val == 2) {
$('.show-advance-pay').show();
} else if (val == 3) {
$('.show-advance-pay').hide();
$('.show-pay-time').hide();
} else {
$('.show-advance-pay').hide();
}
......@@ -1294,6 +1297,8 @@
return false;
}
// 非账期订单选择付款时间
if (pay_type != 3) {
if (payTime == '') {
layer.msg('请选择付款时间');
return false;
......@@ -1316,6 +1321,7 @@
return false;
}
}
}
var currencySign = currency == 1 ? '¥' : '$';
var goods_amount = currencySign+$('input[name=goods_amount]').val();
......
......@@ -161,6 +161,29 @@
nextTr.hide();
}
})
// 下载合同
$('.download-contract').click(function(){
var order_id = $(this).data('id');
$.ajax({
url: '/ajaxDownloadContract',
type: 'post',
data: {order_id:order_id},
dataType: 'json',
success: function(resp) {
if (resp.errcode != 0) {
layer.msg(resp.msg);
return false;
}
location.href = resp.data;
},
error: function(err) {
console.log(err)
}
})
})
}
}
});
......
......@@ -210,10 +210,11 @@
</table>
</div>
<div class="show-pay-time">
<p>付款时间</p>
<table class="table table-bordered table-hover">
<table class="table table-bordered table-hover change-table">
<tr>
<th width="20%">选择付款时间</th>
<th>选择付款时间</th>
<td>
<select name="payTime" class="payTime">
<option value="">请选择</option>
......@@ -230,6 +231,7 @@
</td>
</tr>
</table>
</div>
@if ($order_info['status'] == 1 && $order_temp_info['status'] == 1)
<a class="btn btn-primary checkAdjusted">查看调价信息</a>
......@@ -253,6 +255,8 @@
@endif
</div>
<!-- 非账期订单显示剩余时间 -->
@if ($order_info['order_pay_type'] != 3)
<div class="checked_right">
<p class="showtime">
<span class="error">剩余付款时间:</span>
......@@ -281,6 +285,7 @@
<button class="btn btn-info btn-xs delay_confirm">确认</button>
</div>
</div>
@endif
</div>
@endif
......
......@@ -241,6 +241,10 @@
<td>
<div class="btn-group btn-group-xs">
<a class="btn btn-primary" href="/details/{{$v['order_id']}}?tags=self" target="_blank">详情</a>
@if (in_array('download_contract', $userPerms))
<a class="btn btn-default download-contract" data-id="{{$v['order_id']}}" href="javascript:;">下载合同</a>
@endif
</div>
</td>
</tr>
......
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