Merge branch 'hcy_pcb_20181221-r' into development

parents 8ad40c26 d84ffee7
......@@ -86,4 +86,8 @@ class ApiController extends Controller
private function ApiOfflinePay($request){
echo (new PcbServerModel())->offlinePay($request->user->userId,$request->input("order_id"),$request->input("pay_money"));
}
//pcb后台点击采购确认
private function ApiSetOrderProduct($request){
echo (new PcbServerModel())->setOrdserProduct($request->user->userId,$request->input("purchase_id"));
}
}
......@@ -44,7 +44,7 @@ class PcbServerModel
return $res;
}
/*
*
*线下支付
* @param int $order_id 订单id
* @param int $status 状态
*/
......@@ -60,4 +60,19 @@ class PcbServerModel
}
return $res;
}
/*
* 确定货已入库
* @param int $purchase_id 采购ID
*/
public function setOrdserProduct($admin_id,$purchase_id){
$param = [
'purchase_id'=> $purchase_id ,
];
$res = curlApi($this->PcbUrl.'/pcb/adminapi/setOrderProduct',$param,'POST');
$json = json_decode($res,true);
if ($json['err_code'] == 0){
PcbActionLogModel::log(1,'setOrderProduct',"确定货已入库",$purchase_id,$admin_id);
}
return $res;
}
}
\ No newline at end of file
......@@ -101,6 +101,7 @@ function confirmOrder(purchase_id) {
confirmOrder2(purchase_id,-1); //不通过
});
}
//采购确认
function confirmOrder2(purchase_id,status) {
$.ajax({
url:'/api/ApiConfirmOrder',
......@@ -119,4 +120,26 @@ function confirmOrder2(purchase_id,status) {
}
}
})
}
//货已到猎芯
function setOrderProduct(purchase_id) {
alert_confirm("确认货已入库?",function () {
$.ajax({
url:'/api/ApiSetOrderProduct ',
type:'post',
data:{"purchase_id":purchase_id},
async: false,
dataType:'json',
timeout:10000,
success:function (res) {
if(res.err_code == 0){
alert_succ(res.err_msg,function () {
window.location.reload()
})
}else{
alert_err(res.err_msg)
}
}
})
})
}
\ No newline at end of file
......@@ -219,15 +219,21 @@
<th>内层铜厚</th>
<th>生产周期</th>
<th>交货日期</th>
<th></th>
<th>板材</th>
</tr>
<tr>
<td><?= @$orderInfo['surface'] ?></td>
<td><?= $orderInfo['via_process'] ?></td>
<td><?= $orderInfo['copper_thickness'] ?></td>
<td><?= $orderInfo['inside_copper_thickness'] ?></td>
<td><?= @$orderAuditDetail['text'] ?></td>
<td><?= $purchase['finish_time'] ?></td>
<td></td>
<td><?= $purchase['material'] ?></td>
</tr>
<tr class="c2">
<th>过孔</th>
</tr>
<tr>
<td><?= $orderInfo['min_hole_size'].'mm' ?></td>
</tr>
<tr>
<th class="c2">其他要求</th>
......
......@@ -169,15 +169,21 @@
<th class="c2">内层铜厚</th>
<th class="c2">生产周期</th>
<th class="c2">交货日期</th>
<th></th>
<th>板材</th>
</tr>
<tr>
<td><?= @$orderInfo['surface'] ?></td>
<td><?= $orderInfo['via_process'] ?></td>
<td><?= $orderInfo['copper_thickness'] ?></td>
<td><?= @$orderAuditDetail['text'] ?></td>
<td><?= $purchase['finish_time'] ?></td>
<td></td>
<td><?= $orderInfo['inside_copper_thickness'] ?></td>
<td><?= @$purchaseAuditDetail['text'] ?></td>
<td><?= $purchase['finish_time'] > 0 ? date("Y-m-d H:i:s",$purchase['finish_time']) : "" ?></td>
<td><?= $orderInfo['material'] ?></td>
</tr>
<tr class="c2">
<th>过孔</th>
</tr>
<tr>
<td><?= $orderInfo['min_hole_size'].'mm' ?></td>
</tr>
<tr>
<th class="c2">其他要求</th>
......
......@@ -104,6 +104,9 @@
<?php if($v['status'] == 3 ) {?>
<button class="btn btn-xs btn-outline btn-danger" lay-submit="" order_id="{{ $v['purchase_id'] }}" order_sn="{{ $v['purchase_sn'] }}" onclick="confirmOrder({{ $v['purchase_id'] }})">采购确认</button>
<?php } ?>
<?php if($v['status'] == 13 ) {?>
<button class="btn btn-xs btn-outline btn-danger" lay-submit="" order_id="{{ $v['purchase_id'] }}" order_sn="{{ $v['purchase_sn'] }}" onclick="setOrderProduct({{ $v['purchase_id'] }})">确认入库</button>
<?php } ?>
</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