更新pcb后台

parent 84a6f0dd
......@@ -2,11 +2,14 @@
namespace App\Http\Controllers;
use App\Http\Page;
use App\Map\PcbOrderInvoiceMap;
use App\Map\PcbOrderMap;
use App\Map\PcbOrderShippingMap;
use App\Model\PaymentDaysModel;
use App\Model\Pcb\PcbOrderModel;
use App\Model\Pcb\PcbPublicModel;
use App\Model\Pcb\PcbPurchaseModel;
use Illuminate\Http\Request;
use App\Http\Requests;
......@@ -76,6 +79,14 @@ class WebController extends Controller
$data['order_type'] = PcbOrderMap::$order_type;
$data['status'] = PcbOrderMap::$status;
$data['shipping'] = objectToArray(DB::connection("order")->table("lie_shipping")->get());
//分页
$response = (new PcbOrderModel())->getList();
$page = new Page($response[3], 10);
$page->setConfig('theme', '%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%');
$show = $page->show();
$data['list'] = $response[2];
$data['page'] = $show;
return view("Pcb",$data);
}
//pcb详情
......@@ -175,6 +186,14 @@ class WebController extends Controller
$data['title']='PCB交易列表';
$data['order_type'] = PcbOrderMap::$order_type;
$data['status'] = PcbOrderMap::$status;
//分页
$response = (new PcbPurchaseModel())->getList();
$page = new Page($response[3], 10);
$page->setConfig('theme', '%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%');
$show = $page->show();
$data['list'] = $response[2];
$data['page'] = $show;
return view("Pcb",$data);
}
//pcb详情
......
......@@ -386,4 +386,11 @@ function arrayToCommaStr($data,$col,$type=''){
$e[$k] = (array)objectToArray($v);
}
return $e;
}
// 计算中文字符串长度
function utf8_strlen($string = null) {
// 将字符串分解为单元
preg_match_all("/./us", $string, $match);
// 返回单元个数
return count($match[0]);
}
\ No newline at end of file
......@@ -58,6 +58,8 @@ class PcbOrderModel extends Model
})->orderBy('order_id','desc');
//getSql();
if ($type == 1){
$input['limit'] = 10;
$input['p'] = isset($input['p']) ? $input['p'] : 1;
$list = $list->paginate($input['limit'], ['*'], 'p', $input['p'])->toArray();
if (!$list) return [20001, '没有数据'];
$data = $this->clearData($list['data']);
......@@ -94,6 +96,12 @@ class PcbOrderModel extends Model
$v['order_type'] = PcbOrderMap::$order_type[$v['order_type']];
$v['status_name'] = PcbOrderMap::$status[$v['status']];
$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']) : "";
$shipping = $con->table('shipping')->where(['relevance_id' => $v['order_id'],'shipping_type'=>1])->first();
$v['shipping_no'] = $shipping ? $shipping->shipping_no : "";
$v['shipping_name'] = $shipping ? $shipping->shipping_name : "";
$userCompany = DB::connection('order')->table("lie_user_company")->where("user_id",$v['user_id'])->first();
$v['company_name'] = $userCompany ? $userCompany->com_name : "" ;
}
return $data;
}
......
......@@ -13,6 +13,9 @@ class PcbPublicModel
* 插入后台客服审核结果
*/
public function auditOrder($audit_uid,$order_id,$order_sn,$remark,$type = 1){
if ($remark == "" || utf8_strlen($remark) > 30){
return [1009,'只能输入1~30个字符'];
}
$con = DB::connection('pcb');
$data = [
'audit_uid'=>$audit_uid,
......
......@@ -45,6 +45,8 @@ class PcbPurchaseModel extends Model
})->orderBy('purchase_id','desc');
//getSql();
if ($type == 1){
$input['limit'] = 10;
$input['p'] = isset($input['p']) ? $input['p'] : 1;
$list = $list->paginate($input['limit'], ['*'], 'p', $input['p'])->toArray();
if (!$list) return [20001, '没有数据'];
$data = $this->clearData($list['data']);
......@@ -53,11 +55,13 @@ class PcbPurchaseModel extends Model
return $this->clearData($list->get()->toArray());
}
}
//清洗列表数据
//清洗列表数据
private function clearData($data){
if (!is_array($data) || count($data) == 0 || $data == ""){
return [];
}
$con = DB::connection('pcb');
foreach ($data as $k=>&$v){
//查询采购
if ($v['purchase_amount'] > 0){
......@@ -70,6 +74,13 @@ class PcbPurchaseModel extends Model
$v['order_type'] = PcbOrderMap::$order_type[$v['order_type']];
$v['status_name'] = PcbOrderMap::$status[$v['status']];
$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']) : "";
$shipping = $con->table('shipping')->where(['relevance_id' => $v['order_id'],'shipping_type'=>1])->first();
$v['shipping_no'] = $shipping ? $shipping->shipping_no : "";
$v['shipping_name'] = $shipping ? $shipping->shipping_name : "";
//供应商审核结果
$orderAuditReason2 = $con->table('order_audit_reason')->where(['order_id' => $v['order_id'],'type'=>2])->orderBy("id","desc")->first();
$v['audit_reason'] = $orderAuditReason2 ? $orderAuditReason2->remark : "";
}
return $data;
}
......
......@@ -4,48 +4,17 @@ layui.use(['table','form','element','layer', 'laydate'], function() {
var form = layui.form;
var laydate = layui.laydate;
setTimeout(function () {
table.render({
elem: '#list'
,url:'/api/ApiPcbOrderList'
,method:'post'
,cellMinWidth: 100 //全局定义常规单元格的最小宽度
,request: {
pageName: 'p' //页码的参数名称,默认:page
,limitName: 'limit' //每页数据量的参数名,默认:limit
}
,where: {start_time: $("input[name='start_time']").val(), end_time: $("input[name='end_time']").val()} //如果无需传递额外参数,可不加该参数
,loading:true
,first: true //不显示首页
,last: false //不显示尾页
,id:'Abnormal'
,cols: [[
{field:'order_id', title: 'ID',width:120,align:'center'}
,{field:'user_account', title: '会员账号',width:160,align:'center'}
,{field:'order_sn', title: '交易订单编号',width:160,align:'center'}
,{field:'purchase_sn', title: '采购订单编号',width:160,align:'center'}
,{field:'tiaojia', title: '是否调价',width:160,align:'center'}
,{field:'order_amount', title: '订单金额',width:160,align:'center'}
,{field:'purchase_amount', title: '调整后订单金额',width:160,align:'center'}
,{field:'status_name', title: '订单状态',width:160,align:'center'}
,{field:'order_type', title: '订单类型',width:160,align:'center'}
,{field:'order_pay_type', title: '支付方式',width:160,align:'center'}
,{field:'create_time', title: '下单时间',width:160,align:'center'}
,{field:'adtag', title: 'adtag',width:160,align:'center'}
,{field:'ptag', title: 'ptag',width:160,align:'center'}
,{field:'cahe', title: '操作',templet:'#cahe',width:150,align:'center', fixed: 'right'}
]]
,page:{ }
,done: function(res, curr, count) {
// 若无数据,则禁用导出按钮
if (!count) {
$('.export').addClass('layui-disabled');
} else {
$('.export').removeClass('layui-disabled');
}
}
});
},500)
// 展示列表下的内容
$('.show-list').click(function(){
var nextTr = $(this).parent('tr').next('.show-other-content');
if (nextTr.css('display') == 'none') {
$(this).parent('tr').siblings('.show-other-content').hide();
nextTr.show();
} else {
nextTr.hide();
}
})
form.on('submit(load)', function(data){
form.render();
......@@ -152,6 +121,7 @@ layui.use(['table','form','element','layer', 'laydate'], function() {
}
})
}))
})
//确定发货
......
......@@ -4,46 +4,18 @@ layui.use(['table','form','element','layer', 'laydate'], function() {
var form = layui.form;
var laydate = layui.laydate;
setTimeout(function () {
table.render({
elem: '#list'
,url:'/api/ApiPcbPurchaseList'
,method:'post'
,cellMinWidth: 100 //全局定义常规单元格的最小宽度
,request: {
pageName: 'p' //页码的参数名称,默认:page
,limitName: 'limit' //每页数据量的参数名,默认:limit
}
,where: {start_time: $("input[name='start_time']").val(), end_time: $("input[name='end_time']").val()} //如果无需传递额外参数,可不加该参数
,loading:true
,first: true //不显示首页
,last: false //不显示尾页
,id:'Abnormal'
,cols: [[
{field:'purchase_id', title: 'ID',width:120,align:'center'}
,{field:'user_account', title: '会员账号',width:160,align:'center'}
,{field:'order_sn', title: '交易订单编号',width:160,align:'center'}
,{field:'purchase_sn', title: '采购订单编号',width:160,align:'center'}
,{field:'tiaojia', title: '是否调价',width:160,align:'center'}
,{field:'order_amount', title: '订单金额',width:160,align:'center'}
,{field:'purchase_amount', title: '调整后订单金额',width:160,align:'center'}
,{field:'status_name', title: '订单状态',width:160,align:'center'}
,{field:'order_type', title: '订单类型',width:160,align:'center'}
,{field:'order_pay_type', title: '支付方式',width:160,align:'center'}
,{field:'create_time', title: '下单时间',width:160,align:'center'}
,{field:'cahe', title: '操作',templet:'#cahe',width:150,align:'center', fixed: 'right'}
]]
,page:{ }
,done: function(res, curr, count) {
// 若无数据,则禁用导出按钮
if (!count) {
$('.export').addClass('layui-disabled');
} else {
$('.export').removeClass('layui-disabled');
}
}
});
},500)
// 展示列表下的内容
$('.show-list').click(function(){
var nextTr = $(this).parent('tr').next('.show-other-content');
if (nextTr.css('display') == 'none') {
$(this).parent('tr').siblings('.show-other-content').hide();
nextTr.show();
} else {
nextTr.hide();
}
})
form.on('submit(load)', function(data){
form.render();
......
......@@ -272,7 +272,6 @@
// 展示列表下的内容
$('.show-list').click(function(){
var nextTr = $(this).parent('tr').next('.show-other-content');
if (nextTr.css('display') == 'none') {
$(this).parent('tr').siblings('.show-other-content').hide();
nextTr.show();
......
<style type="text/css">
.c1{background-color: #f9f9f9}
.c2{background-color: #f2f2f2}
</style>
<div class="row">
<div class="wrapper">
<div class="page-content order-details">
......@@ -6,11 +11,11 @@
<table class="table table-bordered order-express">
<tbody>
<tr class="caption">
<th colspan="7" style="text-align: center; background: #f9f9f9;">
<th colspan="7" style="text-align: center; " class="c1">
基础信息
</th>
</tr>
<tr>
<tr class="c2">
<th>会员账号</th>
<th>交易订单编号</th>
<th>是否调价</th>
......@@ -26,7 +31,7 @@
<td><?= @$purchase['purchase_amount']; ?></td>
<td><?= @$orderBase['status_name'] ?></td>
</tr>
<tr>
<tr class="c2">
<th>订单类型</th>
<th>是否返单</th>
<th>公司名称</th>
......@@ -34,7 +39,7 @@
<th>下单时间</th>
<th>支付时间</th>
</tr>
<tr>
<tr >
<td><?= @$orderBase['order_type'] ?></td>
<td><?= $orderBase['is_return_order'] ? "是" : "否" ?></td>
<td><?= $orderBase['company_name'] ?></td>
......@@ -42,15 +47,15 @@
<td><?= @$orderBase['create_time'] ?></td>
<td><?= @$orderBase['pay_time'] ?></td>
</tr>
<tr>
<th>支付方式</th>
<th>采购订单编号</th>
<tr >
<th class="c2">支付方式</th>
<th class="c2">采购订单编号</th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
<tr>
<tr style="height: 30px;">
<td><?= $orderBase['order_pay_type'] ?></td>
<td><?= @$purchase['purchase_sn'] ?></td>
<td></td>
......@@ -70,7 +75,7 @@
收货信息
</th>
</tr>
<tr>
<tr class="c2">
<th>收货人</th>
<th>联系方式</th>
<th>收货地址</th>
......@@ -100,6 +105,7 @@
<td colspan="3">
<table class="table table-bordered">
<tbody>
<?php if(@$orderInfo['technical_contact'] != "") {?>
<tr>
<th>技术联系人</th>
<th>联系方式</th>
......@@ -108,6 +114,7 @@
<td><?= @$orderInfo['technical_contact'] ?></td>
<td><?= @$orderInfo['technical_contact_tel'] ?></td>
</tr>
<?php } else{ echo '<tr><td colspan="2">无</td></tr>'; } ?>
</tbody>
</table>
</td>
......@@ -128,6 +135,7 @@
<td colspan="3">
<table class="table table-bordered">
<tbody>
<?php if(count($orderInvoice)) {?>
<tr>
<th>发票类型</th>
<th>发票抬头</th>
......@@ -152,6 +160,7 @@
<td><?= @$orderInvoice['bank_account'] ?></td>
<td></td>
</tr>
<?php } else{ echo '<tr><td colspan="2">不需要开票</td></tr>'; } ?>
</tbody>
</table>
</td>
......@@ -172,7 +181,7 @@
<td colspan="3">
<table class="table table-bordered">
<tbody>
<tr>
<tr class="c2">
<th>板子长宽</th>
<th>板子数量</th>
<th>板子面积</th>
......@@ -188,7 +197,7 @@
<td><?= $orderInfo['design_num'] ?></td>
<td><?= $orderInfo['board_color'] ?></td>
</tr>
<tr>
<tr class="c2">
<th>板子厚度</th>
<th>最小线宽/线距</th>
<th>过孔</th>
......@@ -204,7 +213,7 @@
<td><?= $orderInfo['copper_thickness'] ?></td>
<td><?= $orderInfo['test_type'] ?></td>
</tr>
<tr>
<tr class="c2">
<th>焊盘喷镀</th>
<th>阻焊覆盖</th>
<th>内层铜厚</th>
......@@ -221,20 +230,20 @@
<td></td>
</tr>
<tr>
<th>其他要求</th>
<th class="c2">其他要求</th>
<th colspan="5"><?= $orderBase['order_remark'] ?></th>
</tr>
<tr>
<th>特殊工艺</th>
<th class="c2">特殊工艺</th>
<th colspan="5"><?= $orderInfo['teshu'] ?></th>
</tr>
<tr>
<th>供应商审核结果</th>
<th class="c2">供应商审核结果</th>
<th colspan="5"><?= @$orderAuditReason2['remark'] ?></th>
</tr>
<tr>
<th>确认后审核结果</th>
<th colspan="5"><input style="width: 300px;" value="<?= @$orderAuditReason1['remark'] ?>" type="text" id="content" name="">&nbsp;&nbsp;<button class="layui-btn layui-btn-xs" onclick="AuditOrder()" >提交</button></th>
<th class="c2">确认后审核结果</th>
<th colspan="5"><input style="width: 350px;" value="<?= @$orderAuditReason1['remark'] ?>" type="text" id="content" name="">&nbsp;&nbsp;<button class="layui-btn layui-btn-sm layui-btn-normal" onclick="AuditOrder()" >提交</button></th>
</tr>
</tbody>
</table>
......@@ -256,7 +265,7 @@
<td colspan="3">
<table class="table table-bordered">
<tbody>
<tr>
<tr class="c2">
<th>工程费</th>
<th>拼版费</th>
<th>版费</th>
......@@ -272,7 +281,7 @@
<td><?= $orderAuditDetail['pdf_net'] ?></td>
<td><?= $orderAuditDetail['pcb_ysf_net'] ?></td>
</tr>
<tr>
<tr class="c2">
<th>测试费</th>
<th>加急费</th>
<th>税费</th>
......@@ -289,13 +298,13 @@
<td></td>
</tr>
<tr>
<th>总计</th>
<th class="c2">总计</th>
<th colspan="2"><?= $orderBase['order_amount'] ?></th>
<th>获得积分</th>
<th class="c2">获得积分</th>
<th colspan="2"><?= $orderBase['integral'] ?></th>
</tr>
<tr>
<th>其他费用说明</th>
<th class="c2">其他费用说明</th>
<th colspan="5"></th>
</tr>
</tbody>
......
<form class="layui-form" id="form1">
@include('orderlist.css')
<form class="layui-form" id="form1" action="/web/PcbOrderList" method="get">
<div class="layui-collapse layui-box" lay-filter="where">
<div class="layui-colla-item">
<h2 class="layui-colla-title" style="margin: 0">查询条件 (点击收起)</h2>
......@@ -6,12 +8,9 @@
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">下单时间:</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="start_time" id="start_time" placeholder="开始时间" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="end_time" id="end_time" placeholder="结束时间" autocomplete="off" class="layui-input">
<div class="layui-input-inline" style="width: 500px;">
<input type="text" name="start_time" id="start_time" value="<?= @$_GET['start_time'] ?>" placeholder="开始时间" style="float: left" autocomplete="off" class="layui-input">
<input type="text" name="end_time" id="end_time" value="<?= @$_GET['end_time'] ?>" placeholder="结束时间" style="float: left;margin-left: 10px;" autocomplete="off" class="layui-input">
</div>
</div>
</div>
......@@ -19,19 +18,19 @@
<div class="layui-inline">
<label class="layui-form-label">会员账号:</label>
<div class="layui-input-inline">
<input type="text" name="user_account" placeholder="" autocomplete="off" class="layui-input">
<input type="text" name="user_account" value="<?= @$_GET['user_account'] ?>" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">交易订单编号:</label>
<div class="layui-input-inline">
<input type="text" name="order_sn" placeholder="" autocomplete="off" class="layui-input">
<input type="text" name="order_sn" value="<?= @$_GET['order_sn'] ?>" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">采购订单编号:</label>
<div class="layui-input-inline">
<input type="text" name="purchase_sn" placeholder="" autocomplete="off" class="layui-input">
<input type="text" name="purchase_sn" value="<?= @$_GET['purchase_sn'] ?>" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
</div>
......@@ -42,7 +41,7 @@
<input type="hidden" name="status" value="">
@if(!empty($status) && is_array($status))
@foreach($status as $k=>$v)
<input type="checkbox" lay-filter="*" data-type="status" value="{{$k}}" title="{{$v or '未知'}}" >
<input type="checkbox" lay-filter="*" @if(in_array($k,explode(',',@$_GET['status']))){{ "checked" }} @endif data-type="status" value="{{$k}}" title="{{$v or '未知'}}" >
@endforeach
@endif
</div>
......@@ -55,7 +54,7 @@
<input type="hidden" name="order_type" value="">
@if(!empty($order_type) && is_array($order_type))
@foreach($order_type as $k=>$v)
<input type="checkbox" lay-filter="*" data-type="status" value="{{$k}}" title="{{$v or '未知'}}" >
<input type="checkbox" lay-filter="*" data-type="status" @if(in_array($k,explode(',',@$_GET['order_type']))) {{ "checked" }} @endif value="{{$k}}" title="{{$v or '未知'}}" >
@endforeach
@endif
</div>
......@@ -63,38 +62,114 @@
<div class="layui-inline">
<label class="layui-form-label">adtag:</label>
<div class="layui-input-inline">
<input type="text" name="adtag" placeholder="" autocomplete="off" class="layui-input">
<input type="text" name="adtag" placeholder="" value="<?= @$_GET['adtag'] ?>" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">ptag:</label>
<div class="layui-input-inline">
<input type="text" name="ptag" placeholder="" autocomplete="off" class="layui-input">
<input type="text" name="ptag" placeholder="" value="<?= @$_GET['ptag'] ?>" autocomplete="off" class="layui-input">
</div>
</div>
</div>
</div>
</div>
</div>
<div style="margin-top: 10px">
<input type="hidden" value="<?= @$_GET['p'] ?>" name="p">
<div style="margin-top: 10px;margin-bottom: 60px;">
<div style="float: left;">
<button class="layui-btn" lay-submit="" lay-filter="load">立即查询</button>
<button class="layui-btn" type="submit">立即查询</button>
<button type="reset" class="layui-btn layui-btn-primary">重置条件</button>
<button class="layui-btn export" >导出</button>
</div>
</div>
</form>
<table class="layui-table" lay-filter="test" id="list"></table>
<script type="text/html" id="cahe">
<a href="/web/PcbOrderDetail?order_id=@{{ d.order_id }}" class="btn btn-xs btn-outline btn-success"><strong>详情</strong></a>
@{{# if(d.status==1){ }}
<button class="btn btn-xs btn-outline btn-danger" lay-submit="" order_id="@{{ d.order_id }}" order_sn="@{{ d.order_sn }}" onclick="AddPurchase(@{{ d.order_id }})">发起采购</button>
@{{# } }}
@{{# if(d.status==14 && d.shipping_time == 0){ }}
<button class="btn btn-xs btn-outline btn-danger" lay-submit="" order_id="@{{ d.order_id }}" order_sn="@{{ d.order_sn }}" lay-filter="SendPurchase">发货</button>
@{{# } }}
</script>
<div class="row-fluid table-responsive">
<table class="table table-hover">
<thead>
<tr >
<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>
<th class="pl30" style="background-color: #f2f2f2">支付方式</th>
<th class="pl30" style="background-color: #f2f2f2">下单时间</th>
<th class="pl30" style="background-color: #f2f2f2">操作</th>
</tr>
</thead>
<tbody>
<?php if(!count($list)){echo "<tr ><td colspan='11' style='text-align: center;font-weight: bold'>无数据</td></tr>" ;} foreach ($list as $k=>$v) { ?>
<tr>
<td class="show-list"><?= $v['user_account'] ?></td>
<td class="show-list"><?= $v['order_sn'] ?></td>
<td class="show-list"><?= $v['purchase_sn'] ?></td>
<td class="show-list"><?= $v['tiaojia'] ?></td>
<td class="show-list"><?= $v['order_amount'] ?></td>
<td class="show-list"><?= $v['purchase_amount'] ?></td>
<td class="show-list"><?= $v['status_name'] ?></td>
<td class="show-list"><?= $v['order_type'] ?></td>
<td class="show-list"><?= $v['order_pay_type'] ?></td>
<td class="show-list"><?= $v['create_time'] ?></td>
<td>
<div class="btn-group btn-group-xs">
<a href="/web/PcbOrderDetail?order_id=<?= $v['order_id'] ?>" class="btn btn-xs btn-outline btn-success"><strong>详情</strong></a>
<?php if($v['status'] == 1 ) {?>
<button class="btn btn-xs btn-outline btn-danger" lay-submit="" order_id="<?= $v['order_id'] ?>" order_sn="<?= $v['order_sn'] ?>" onclick="AddPurchase(<?= $v['order_id'] ?>)">发起采购</button> &nbsp;&nbsp;
<?php } if($v['status'] == 14 && $v['shipping_time'] == 0) { ?>
<button class="btn btn-xs btn-outline btn-danger" lay-submit="" order_id="<?= $v['order_id'] ?>" order_sn="<?= $v['order_sn'] ?>" lay-filter="SendPurchase">发货</button>
<?php } ?>
</div>
</td>
</tr>
<!-- 点击展示内容 -->
<tr class="show-other-content">
<td colspan="12">
<table class="table table-hover table-bordered">
<tbody>
<tr>
<td class="table-list-title">采购订单编号</td>
<td class="table-list-content"><?= $v['purchase_sn'] ?> </td>
<td class="table-list-title">公司名称</td>
<td class="table-list-content">{{$v['company_name']}}</td>
</tr>
<tr>
<td class="table-list-title">支付时间</td>
<td class="table-list-content"><?= $v['pay_time'] ?></td>
<td class="table-list-title">快递单号</td>
<td class="table-list-content"> <?= $v['shipping_no'] ?></td>
</tr>
<tr>
<td class="table-list-title">配送方式</td>
<td class="table-list-content"><?= $v['shipping_name'] ?> </td>
<td class="table-list-title">Adtag或其它</td>
<td class="table-list-content"><?= $v['adtag'] ?> </td>
</tr>
</tbody></table>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<div class="row-fluid pagination">
<?php echo $page; ?>
</div>
<!--弹出层-->
<div id="sendPurchase" style="display: none">
......
<style type="text/css">
.c1{background-color: #f9f9f9}
.c2{background-color: #f2f2f2}
</style>
<div class="row">
<div class="wrapper">
<div class="page-content order-details">
......@@ -10,7 +14,7 @@
基础信息
</th>
</tr>
<tr>
<tr class="c2">
<th>采购订单编号</th>
<th>交易订单编号</th>
<th>是否调价</th>
......@@ -53,7 +57,7 @@
收货信息
</th>
</tr>
<tr>
<tr class="c2">
<th>收货人</th>
<th>联系方式</th>
<th>收货地址</th>
......@@ -83,7 +87,7 @@
<td colspan="3">
<table class="table table-bordered">
<tbody>
<tr>
<tr class="c2">
<th>发票类型</th>
<th>发票抬头</th>
<th>公司注册地址</th>
......@@ -96,9 +100,9 @@
<td><?= @$liexinInfo['tax_no'] ?></td>
</tr>
<tr>
<th>公司电话</th>
<th>开户银行</th>
<th>银行卡号</th>
<th class="c2">公司电话</th>
<th class="c2">开户银行</th>
<th class="c2">银行卡号</th>
<th></th>
</tr>
<tr>
......@@ -127,7 +131,7 @@
<td colspan="3">
<table class="table table-bordered">
<tbody>
<tr>
<tr class="c2">
<th>板子长宽</th>
<th>板子数量</th>
<th>板子面积</th>
......@@ -143,7 +147,7 @@
<td><?= $orderInfo['design_num'] ?></td>
<td><?= $orderInfo['board_color'] ?></td>
</tr>
<tr>
<tr class="c2">
<th>板子厚度</th>
<th>最小线宽/线距</th>
<th>过孔</th>
......@@ -160,11 +164,11 @@
<td><?= $orderInfo['test_type'] ?></td>
</tr>
<tr>
<th>焊盘喷镀</th>
<th>阻焊覆盖</th>
<th>内层铜厚</th>
<th>生产周期</th>
<th>交货日期</th>
<th class="c2">焊盘喷镀</th>
<th class="c2">阻焊覆盖</th>
<th class="c2">内层铜厚</th>
<th class="c2">生产周期</th>
<th class="c2">交货日期</th>
<th></th>
</tr>
<tr>
......@@ -176,15 +180,15 @@
<td></td>
</tr>
<tr>
<th>其他要求</th>
<th class="c2">其他要求</th>
<th colspan="5"><?= $orderBase['order_remark'] ?></th>
</tr>
<tr>
<th>特殊工艺</th>
<th class="c2">特殊工艺</th>
<th colspan="5"><?= $orderInfo['teshu'] ?></th>
</tr>
<tr>
<th>供应商审核结果</th>
<th class="c2">供应商审核结果</th>
<th colspan="5"><?= @$orderAuditReason2['remark'] ?></th>
</tr>
</tbody>
......@@ -207,7 +211,7 @@
<td colspan="3">
<table class="table table-bordered">
<tbody>
<tr>
<tr class="c2">
<th>工程费</th>
<th>拼版费</th>
<th>版费</th>
......@@ -224,11 +228,11 @@
<td><?= $orderAuditDetail['pcb_ysf_net'] ?></td>
</tr>
<tr>
<th>测试费</th>
<th>加急费</th>
<th>税费</th>
<th>快递费</th>
<th>其他费用</th>
<th class="c2">测试费</th>
<th class="c2">加急费</th>
<th class="c2">税费</th>
<th class="c2">快递费</th>
<th class="c2">其他费用</th>
<th></th>
</tr>
<tr>
......@@ -240,13 +244,13 @@
<td></td>
</tr>
<tr>
<th>总计</th>
<th class="c2">总计</th>
<th colspan="2"><?= $orderBase['order_amount'] ?></th>
<th>获得积分</th>
<th class="c2">获得积分</th>
<th colspan="2"><?= $orderBase['integral'] ?></th>
</tr>
<tr>
<th>其他费用说明</th>
<th class="c2">其他费用说明</th>
<th colspan="5"></th>
</tr>
</tbody>
......
<form class="layui-form" id="form1">
<div class="layui-collapse layui-box" lay-filter="where">
<div class="layui-colla-item">
<h2 class="layui-colla-title" style="margin: 0">查询条件 (点击收起)</h2>
<div class="layui-colla-content layui-show">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">下单时间:</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="start_time" id="start_time" placeholder="开始时间" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="end_time" id="end_time" placeholder="结束时间" autocomplete="off" class="layui-input">
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">会员账号:</label>
<div class="layui-input-inline">
<input type="text" name="user_account" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">交易订单编号:</label>
<div class="layui-input-inline">
<input type="text" name="order_sn" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">采购订单编号:</label>
<div class="layui-input-inline">
<input type="text" name="purchase_sn" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">订单状态:</label>
<div class="layui-input-inline payment-status" style="width: 800px !important;">
<input type="hidden" name="status" value="">
@if(!empty($status) && is_array($status))
@foreach($status as $k=>$v)
<input type="checkbox" lay-filter="*" data-type="status" value="{{$k}}" title="{{$v or '未知'}}" >
@endforeach
@endif
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">订单类型:</label>
<div class="layui-input-inline payment-status">
<input type="hidden" name="order_type" value="">
@if(!empty($order_type) && is_array($order_type))
@foreach($order_type as $k=>$v)
<input type="checkbox" lay-filter="*" data-type="status" value="{{$k}}" title="{{$v or '未知'}}" >
@endforeach
@endif
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">adtag:</label>
<div class="layui-input-inline">
<input type="text" name="adtag" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">ptag:</label>
<div class="layui-input-inline">
<input type="text" name="ptag" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
</div>
</div>
</div>
</div>
<div style="margin-top: 10px">
<div style="float: left;">
<button class="layui-btn" lay-submit="" lay-filter="load">立即查询</button>
<button type="reset" class="layui-btn layui-btn-primary">重置条件</button>
<button class="layui-btn export" >导出</button>
</div>
</div>
</form>
<table class="layui-table" lay-filter="test" id="list"></table>
<script type="text/html" id="cahe">
<a href="/web/PcbPurchaseDetail?purchase_id=@{{ d.purchase_id }}&order_id=@{{ d.order_id }}" class="btn btn-xs btn-outline btn-success"><strong>详情</strong></a>
@{{# 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="confirmOrder(@{{ d.purchase_id }})">采购确认</button>
@{{# } }}
</script>
<form class="layui-form" id="form1">
@include('orderlist.css')
<form class="layui-form" id="form1" action="/web/PcbPurchaseList" method="get">
<div class="layui-collapse layui-box" lay-filter="where">
<div class="layui-colla-item">
<h2 class="layui-colla-title" style="margin: 0">查询条件 (点击收起)</h2>
......@@ -6,47 +8,38 @@
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">下单时间:</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="start_time" id="start_time" placeholder="开始时间" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="end_time" id="end_time" placeholder="结束时间" autocomplete="off" class="layui-input">
<div class="layui-input-inline" style="width: 500px;">
<input type="text" name="start_time" id="start_time" value="<?= @$_GET['start_time'] ?>" placeholder="开始时间" style="float: left" autocomplete="off" class="layui-input">
<input type="text" name="end_time" id="end_time" value="<?= @$_GET['end_time'] ?>" placeholder="结束时间" style="float: left;margin-left: 10px;" autocomplete="off" class="layui-input">
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">会员账号:</label>
<div class="layui-input-inline">
<input type="text" name="user_account" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">交易订单编号:</label>
<div class="layui-input-inline">
<input type="text" name="order_sn" placeholder="" autocomplete="off" class="layui-input">
<input type="text" name="order_sn" value="<?= @$_GET['order_sn'] ?>" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">采购订单编号:</label>
<div class="layui-input-inline">
<input type="text" name="purchase_sn" placeholder="" autocomplete="off" class="layui-input">
<input type="text" name="purchase_sn" value="<?= @$_GET['purchase_sn'] ?>" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">订单状态:</label>
<div class="layui-input-inline payment-status" style="width: 800px !important;">
<input type="hidden" name="status" value="">
@if(!empty($status) && is_array($status))
@foreach($status as $k=>$v)
<input type="checkbox" lay-filter="*" data-type="status" value="{{$k}}" title="{{$v or '未知'}}" >
@endforeach
@endif
<div class="layui-input-inline">
<div class="layui-input-inline payment-status" style="width: 800px !important;">
<input type="hidden" name="status" value="">
@if(!empty($status) && is_array($status))
@foreach($status as $k=>$v)
<input type="checkbox" lay-filter="*" @if(in_array($k,explode(',',@$_GET['status']))){{ "checked" }} @endif data-type="status" value="{{$k}}" title="{{$v or '未知'}}" >
@endforeach
@endif
</div>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
......@@ -55,42 +48,96 @@
<input type="hidden" name="order_type" value="">
@if(!empty($order_type) && is_array($order_type))
@foreach($order_type as $k=>$v)
<input type="checkbox" lay-filter="*" data-type="status" value="{{$k}}" title="{{$v or '未知'}}" >
<input type="checkbox" lay-filter="*" data-type="status" @if(in_array($k,explode(',',@$_GET['order_type']))) {{ "checked" }} @endif value="{{$k}}" title="{{$v or '未知'}}" >
@endforeach
@endif
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">adtag:</label>
<div class="layui-input-inline">
<input type="text" name="adtag" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">ptag:</label>
<div class="layui-input-inline">
<input type="text" name="ptag" placeholder="" autocomplete="off" class="layui-input">
</div>
</div>
</div>
</div>
</div>
</div>
<div style="margin-top: 10px">
<input type="hidden" value="<?= @$_GET['p'] ?>" name="p">
<div style="margin-top: 10px;margin-bottom: 60px;">
<div style="float: left;">
<button class="layui-btn" lay-submit="" lay-filter="load">立即查询</button>
<button class="layui-btn" type="submit">立即查询</button>
<button type="reset" class="layui-btn layui-btn-primary">重置条件</button>
<button class="layui-btn export" >导出</button>
</div>
</div>
</form>
<table class="layui-table" lay-filter="test" id="list"></table>
<script type="text/html" id="cahe">
<a href="/web/PcbPurchaseDetail?purchase_id=@{{ d.purchase_id }}&order_id=@{{ d.order_id }}" class="btn btn-xs btn-outline btn-success"><strong>详情</strong></a>
@{{# 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="confirmOrder(@{{ d.purchase_id }})">采购确认</button>
@{{# } }}
</script>
<div class="row-fluid table-responsive">
<table class="table table-hover">
<thead>
<tr >
<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>
<th class="pl30" style="background-color: #f2f2f2">下单时间</th>
<th class="pl30" style="background-color: #f2f2f2">操作</th>
</tr>
</thead>
<tbody>
<?php if(!count($list)){echo "<tr ><td colspan='11' style='text-align: center;font-weight: bold'>无数据</td></tr>" ;} foreach ($list as $k=>$v) { ?>
<tr>
<td class="show-list"><?= $v['order_sn'] ?></td>
<td class="show-list"><?= $v['purchase_sn'] ?></td>
<td class="show-list"><?= $v['tiaojia'] ?></td>
<td class="show-list"><?= $v['order_amount'] ?></td>
<td class="show-list"><?= $v['purchase_amount'] ?></td>
<td class="show-list"><?= $v['status_name'] ?></td>
<td class="show-list"><?= $v['order_type'] ?></td>
<td class="show-list"><?= $v['order_pay_type'] ?></td>
<td class="show-list"><?= $v['create_time'] ?></td>
<td>
<div class="btn-group btn-group-xs">
<a href="/web/PcbPurchaseDetail?purchase_id=@{{ d.purchase_id }}&order_id={{ $v['order_id'] }}" class="btn btn-xs btn-outline btn-success"><strong>详情</strong></a>
<?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 } ?>
</div>
</td>
</tr>
<!-- 点击展示内容 -->
<tr class="show-other-content">
<td colspan="12">
<table class="table table-hover table-bordered">
<tbody>
<tr>
<td class="table-list-title">支付时间</td>
<td class="table-list-content"><?= $v['pay_time'] ?></td>
<td class="table-list-title">快递单号</td>
<td class="table-list-content"> <?= $v['shipping_no'] ?></td>
</tr>
<tr>
<td class="table-list-title">配送方式</td>
<td class="table-list-content"><?= $v['shipping_name'] ?> </td>
<td class="table-list-title">供应商审核结果</td>
<td class="table-list-content"><?= $v['audit_reason'] ?> </td>
</tr>
</tbody></table>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<div class="row-fluid pagination">
<?php echo $page; ?>
</div>
......@@ -459,6 +459,7 @@
@endif
</table>
</div>
<div class="row-fluid pagination">
@if ($username != 'vpadmin@ichunt.com')
<span class="show-list-info">
......
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