Merge branch 'hcy_pcb_20181221-r' into development

parents 01ce4978 8fc775de
...@@ -6,6 +6,7 @@ use App\Http\Page; ...@@ -6,6 +6,7 @@ use App\Http\Page;
use App\Map\PcbOrderInvoiceMap; use App\Map\PcbOrderInvoiceMap;
use App\Map\PcbOrderMap; use App\Map\PcbOrderMap;
use App\Map\PcbOrderShippingMap; use App\Map\PcbOrderShippingMap;
use App\Map\PcbPurchaseMap;
use App\Model\PaymentDaysModel; use App\Model\PaymentDaysModel;
use App\Model\Pcb\PcbOrderModel; use App\Model\Pcb\PcbOrderModel;
use App\Model\Pcb\PcbPublicModel; use App\Model\Pcb\PcbPublicModel;
...@@ -185,7 +186,7 @@ class WebController extends Controller ...@@ -185,7 +186,7 @@ class WebController extends Controller
private function PcbPurchaseList($request,$data,$id){ private function PcbPurchaseList($request,$data,$id){
$data['title']='PCB交易列表'; $data['title']='PCB交易列表';
$data['order_type'] = PcbOrderMap::$order_type; $data['order_type'] = PcbOrderMap::$order_type;
$data['status'] = PcbOrderMap::$status; $data['status'] = PcbPurchaseMap::$status;
//分页 //分页
$response = (new PcbPurchaseModel())->getList(); $response = (new PcbPurchaseModel())->getList();
$page = new Page($response[3], 10); $page = new Page($response[3], 10);
...@@ -228,7 +229,6 @@ class WebController extends Controller ...@@ -228,7 +229,6 @@ class WebController extends Controller
//拼接基本信息 //拼接基本信息
$orderBase = objectToArray($orderBase); $orderBase = objectToArray($orderBase);
$orderBase['order_type'] = PcbOrderMap::$order_type[$orderBase['order_type']]; $orderBase['order_type'] = PcbOrderMap::$order_type[$orderBase['order_type']];
$orderBase['status_name'] = PcbOrderMap::$status[$orderBase['status']];
$orderBase['create_time'] = $orderBase['create_time'] > 0 ? date('Y-m-d H:i:s',$orderBase['create_time']) : ""; $orderBase['create_time'] = $orderBase['create_time'] > 0 ? date('Y-m-d H:i:s',$orderBase['create_time']) : "";
$orderBase['finish_time'] = $orderBase['finish_time'] > 0 ? date('Y-m-d H:i:s',$orderBase['finish_time']) : ""; $orderBase['finish_time'] = $orderBase['finish_time'] > 0 ? date('Y-m-d H:i:s',$orderBase['finish_time']) : "";
$orderBase['pay_time'] = $orderBase['pay_time'] > 0 ? date('Y-m-d H:i:s',$orderBase['pay_time']) : ""; $orderBase['pay_time'] = $orderBase['pay_time'] > 0 ? date('Y-m-d H:i:s',$orderBase['pay_time']) : "";
...@@ -240,7 +240,9 @@ class WebController extends Controller ...@@ -240,7 +240,9 @@ class WebController extends Controller
$purchase = objectToArray($purchase); $purchase = objectToArray($purchase);
$purchase['shipping_time'] = $purchase['shipping_time'] > 0 ? date('Y-m-d H:i:s',$purchase['shipping_time']) : ""; $purchase['shipping_time'] = $purchase['shipping_time'] > 0 ? date('Y-m-d H:i:s',$purchase['shipping_time']) : "";
$purchase['purchase_amount'] = $purchase['purchase_amount'] > 0 ? $purchase['purchase_amount'] : ""; $purchase['purchase_amount'] = $purchase['purchase_amount'] > 0 ? $purchase['purchase_amount'] : "";
$purchase['pay_time'] = $purchase['pay_time'] > 0 ? date('Y-m-d H:i:s',$purchase['pay_time']): "";
$purchase['order_pay_type'] = PcbOrderMap::$order_pay_type[$purchase['order_pay_type']]; $purchase['order_pay_type'] = PcbOrderMap::$order_pay_type[$purchase['order_pay_type']];
$purchase['status_name'] = @PcbPurchaseMap::$status[$purchase['status']];
if($purchase['purchase_amount'] == 0){ if($purchase['purchase_amount'] == 0){
$orderBase['tiaojia'] = ""; $orderBase['tiaojia'] = "";
}else{ }else{
......
...@@ -18,7 +18,6 @@ class PcbOrderMap{ ...@@ -18,7 +18,6 @@ class PcbOrderMap{
"15"=>"已发货给客户", "15"=>"已发货给客户",
"20"=>"交易完成", "20"=>"交易完成",
]; ];
/* /*
* 支付方式 * 支付方式
*/ */
......
<?php
namespace App\Map;
class PcbPurchaseMap{
//类型 :1付预付款单 2退预付款单 3收款 4付款
//订单状态
public static $status=[
"-1"=>"已取消",
"2"=>"采购中",
"3"=>"采购完成待确认",
"4"=>"确认不通过",
"5"=>"确认通过",
"12"=>"生产中",
"13"=>"生产完成",
"14"=>"已发货到猎芯",
"15"=>"猎芯已收货",
"20"=>"交易完成",
];
}
\ No newline at end of file
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Model\Pcb; namespace App\Model\Pcb;
use App\Map\PcbOrderMap; use App\Map\PcbOrderMap;
use App\Map\PcbPurchaseMap;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Request; use Request;
use DB; use DB;
...@@ -72,7 +73,7 @@ class PcbPurchaseModel extends Model ...@@ -72,7 +73,7 @@ class PcbPurchaseModel extends Model
$v['order_pay_type'] = PcbOrderMap::$order_pay_type[$v['order_pay_type']]; $v['order_pay_type'] = PcbOrderMap::$order_pay_type[$v['order_pay_type']];
$v['order_type'] = PcbOrderMap::$order_type[$v['order_type']]; $v['order_type'] = PcbOrderMap::$order_type[$v['order_type']];
$v['status_name'] = PcbOrderMap::$status[$v['status']]; $v['status_name'] = @PcbPurchaseMap::$status[$v['status']];
$v['create_time'] = date('Y-m-d H:i:s',$v['create_time']); $v['create_time'] = date('Y-m-d H:i:s',$v['create_time']);
$v['pay_time'] = $v['pay_time'] > 0 ? date('Y-m-d H:i:s',$v['pay_time']) : ""; $v['pay_time'] = $v['pay_time'] > 0 ? date('Y-m-d H:i:s',$v['pay_time']) : "";
$shipping = $con->table('shipping')->where(['relevance_id' => $v['order_id'],'shipping_type'=>1])->first(); $shipping = $con->table('shipping')->where(['relevance_id' => $v['order_id'],'shipping_type'=>1])->first();
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<th>是否调价</th> <th>是否调价</th>
<th>调整前订单金额(含税10%)</th> <th>调整前订单金额(含税10%)</th>
<th>调整后金额(含税10%)</th> <th>调整后金额(含税10%)</th>
<th>订单状态</th> <th>采购状态</th>
</tr> </tr>
<tr> <tr>
<td><?= @$purchase['purchase_sn'] ?></td> <td><?= @$purchase['purchase_sn'] ?></td>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<td><?= @$orderBase['tiaojia'] ?></td> <td><?= @$orderBase['tiaojia'] ?></td>
<td><?= @$orderBase['order_amount'] ?></td> <td><?= @$orderBase['order_amount'] ?></td>
<td><?= @$purchase['purchase_amount']; ?></td> <td><?= @$purchase['purchase_amount']; ?></td>
<td><?= @$orderBase['status_name'] ?></td> <td><?= @$purchase['status_name'] ?></td>
</tr> </tr>
<tr> <tr>
<th class="c2">订单类型</th> <th class="c2">订单类型</th>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<tr> <tr>
<td><?= @$orderBase['order_type'] ?></td> <td><?= @$orderBase['order_type'] ?></td>
<td><?= @$orderBase['create_time'] ?></td> <td><?= @$orderBase['create_time'] ?></td>
<td><?= @$orderBase['pay_time'] ?></td> <td><?= @$purchase['pay_time'] ?></td>
<td><?= @$purchase['order_pay_type'] ?></td> <td><?= @$purchase['order_pay_type'] ?></td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">订单状态:</label> <label class="layui-form-label">采购状态:</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<div class="layui-input-inline payment-status" style="width: 800px !important;"> <div class="layui-input-inline payment-status" style="width: 800px !important;">
<input type="hidden" name="status" value=""> <input type="hidden" name="status" value="">
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<th class="pl30" style="background-color: #f2f2f2">是否调价</th> <th class="pl30" style="background-color: #f2f2f2">是否调价</th>
<th class="pl30" style="background-color: #f2f2f2">订单金额(含税10%)</th> <th class="pl30" style="background-color: #f2f2f2">订单金额(含税10%)</th>
<th class="pl30" style="background-color: #f2f2f2">调整后订单金额(含税10%)</th> <th class="pl30" style="background-color: #f2f2f2">调整后订单金额(含税10%)</th>
<th class="pl30" style="background-color: #f2f2f2">订单状态</th> <th class="pl30" style="background-color: #f2f2f2">采购状态</th>
<th class="pl30" style="background-color: #f2f2f2">订单类型</th> <th class="pl30" style="background-color: #f2f2f2">订单类型</th>
<th class="pl30" style="background-color: #f2f2f2">支付方式</th> <th class="pl30" style="background-color: #f2f2f2">支付方式</th>
<th class="pl30" style="background-color: #f2f2f2">下单时间</th> <th class="pl30" style="background-color: #f2f2f2">下单时间</th>
......
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