更新pcb后台

parent 1a720583
......@@ -102,10 +102,7 @@ class WebController extends Controller
//订单发票信息
$orderInvoice = $con->table('order_invoice')->where(['order_id' => $order_id])->first();
//物流信息
$shipping = $con->table('shipping')->where(['order_id' => $order_id,'shipping_type'=>1])->first();
if ($shipping){
$shipping = objectToArray($shipping);
}
$shipping = $con->table('shipping')->where(['relevance_id' => $order_id,'shipping_type'=>1])->first();
//查询操作日志
$actionLog = $con->table("action_log")->where(["type"=>1,'oid'=>$order_id])->orderBy("id","desc")->get();
......@@ -155,7 +152,7 @@ class WebController extends Controller
$data['orderAuditReason2'] = objectToArray($orderAuditReason2);
$data['orderInfo'] = objectToArray($orderInfo);
$data['orderInvoice'] = $orderInvoice;
$data['shipping'] = $shipping;
$data['shipping'] = objectToArray($shipping);
$data['actionLog'] = objectToArray($actionLog);
return view("Pcb",$data);
......
......@@ -121,21 +121,24 @@ layui.use(['table','form','element','layer', 'laydate'], function() {
})
//确定发货
function SurePurchase(purchase_id) {
$.ajax({
url:'/api/ApiConfirmOrder',
type:'post',
data:{"purchase_id":purchase_id},
async: false,
dataType:'json',
timeout:10000,
success:function (res) {
if(res.err_code == 0){
alert_succ(res.errmsg,function () {
window.location.href='/web/Abnormal';
})
}else{
alert_err(res.errmsg)
alert_confirm("采购已完成,请确认是否通过审核?",function () {
$.ajax({
url:'/api/ApiConfirmOrder',
type:'post',
data:{"purchase_id":purchase_id},
async: false,
dataType:'json',
timeout:10000,
success:function (res) {
if(res.err_code == 0){
alert_succ(res.errmsg,function () {
window.location.href='/web/Abnormal';
})
}else{
alert_err(res.errmsg)
}
}
}
})
})
}
......@@ -81,8 +81,8 @@
<td><?= $orderAddress['consignee'] ?></td>
<td><?= $orderAddress['mobile'] ?></td>
<td><?= $orderAddress["province"].$orderAddress["city"].$orderAddress["district"].$orderAddress['detail_address'] ?></td>
<td><?= @$orderShipping['shipping_name'] ?></td>
<td><?= @$orderShipping['shipping_no'] ?></td>
<td><?= @$shipping['shipping_name'] ?></td>
<td><?= @$shipping['shipping_no'] ?></td>
</tr>
</tbody>
</table>
......
......@@ -88,7 +88,7 @@
<script type="text/html" id="cahe">
<a href="/web/PcbPurchaseDetail?purchase_id=@{{ d.purchase_id }}&order_id=@{{ d.order_id }}" target="_blank" class="btn btn-xs btn-outline btn-success"><strong>详情</strong></a>
@{{# if(d.status==1){ }}
@{{# if(d.status==3){ }}
<button class="btn btn-xs btn-outline btn-danger" lay-submit="" order_id="@{{ d.purchase_id }}" order_sn="@{{ d.purchase_sn }}" onclick="SurePurchase(@{{ d.purchase_id }})">采购确认</button>
@{{# } }}
</script>
......
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