v1.0

parent 862230a5
...@@ -71,7 +71,7 @@ class ApiController extends Controller ...@@ -71,7 +71,7 @@ class ApiController extends Controller
} }
//价格审核列表 //价格审核列表
private function ApiGoodsAuditList($request, $id){ private function ApiGoodsAuditList($request, $id){
(new GoodsAuditModel())->getList($request->input()); ExportLayui((new GoodsAuditModel())->getList($request->input(),$request->supplier_id));
} }
//获取对账单列表明细 //获取对账单列表明细
private function ApiAccountCheckingDetail($request, $id){ private function ApiAccountCheckingDetail($request, $id){
......
...@@ -13,7 +13,7 @@ use Illuminate\Support\Facades\Redis; ...@@ -13,7 +13,7 @@ use Illuminate\Support\Facades\Redis;
class GoodsAuditModel extends Model class GoodsAuditModel extends Model
{ {
protected $connection='yunxin'; protected $connection='yunxin';
protected $table='supplier_account'; protected $table='goods_audit';
protected $primaryKey='id'; protected $primaryKey='id';
public $timestamps = false; public $timestamps = false;
//列表 //列表
...@@ -39,8 +39,12 @@ class GoodsAuditModel extends Model ...@@ -39,8 +39,12 @@ class GoodsAuditModel extends Model
$list = $list->orderBy('create_time','desc')->paginate(@$input['limit'] ? @$input['limit'] : 10, ['*'], 'p', @$input['p'] ? @$input['p']:1 )->toArray(); $list = $list->orderBy('create_time','desc')->paginate(@$input['limit'] ? @$input['limit'] : 10, ['*'], 'p', @$input['p'] ? @$input['p']:1 )->toArray();
if (!$list) return [20001, '没有数据']; if (!$list) return [20001, '没有数据'];
$status = GoodsAuditMap::$status; $status = GoodsAuditMap::$status;
$packingList = (new PackingModel())->packingList();
foreach ($list['data'] as $k=>&$v){ foreach ($list['data'] as $k=>&$v){
$v['status'] = $status[$v['status']]; $v['status'] = @$status[$v['status']];
$v['create_time'] = timeToDate($v['create_time']);
$v['deal_time'] = timeToDate($v['deal_time']);
$v['packing'] = @$packingList[$v['packing']] ? $packingList[$v['packing']] : "";
} }
return [0, '成功', $list['data'], $list['total']]; return [0, '成功', $list['data'], $list['total']];
} }
......
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class PackingModel extends Model
{
protected $connection='pur';
protected $table='packing';
protected $primaryKey = 'packing_id';
public $timestamps = false;
public function packingList($status=1){
$map['status']=$status;
return $this->where($map)->lists('packing_name','packing_id')->toArray();
}
}
...@@ -14,13 +14,20 @@ ...@@ -14,13 +14,20 @@
for (i = 0; i < res.data.length; i++) { for (i = 0; i < res.data.length; i++) {
var s = res.data[i]; var s = res.data[i];
html += "<tr class=\"you\"> " + html += "<tr class=\"you\"> " +
"<td><span class=\"t1\">"+s.supplier_goods_id+"</span></td>" + "<td><span class=\"t1\">"+s.goods_code+"</span></td>" +
"<td><span class=\"t1\">"+s.goods_name+"</span></td>" + "<td><span class=\"t1\">"+s.goods_name+"</span></td>" +
"<td><span class=\"t1\">"+s.supplier_brand_name+"</span></td>" + "<td><span class=\"t1\">"+s.brand_name+"</span></td>" +
"<td><span class=\"t1\">"+s.status+"</span></td>" +
"<td><span class=\"t1\">"+s.encap+"</span></td>" + "<td><span class=\"t1\">"+s.encap+"</span></td>" +
"<td><span class=\"t1\">"+s.packing+"</span></td>" +
"<td><span class=\"t1\">"+s.mpq+"</span></td>" + "<td><span class=\"t1\">"+s.mpq+"</span></td>" +
"<td><span class=\"t1\">"+s.real_number+"</span></td>" + "<td><span class=\"t1\">"+s.last_price+"</span></td>" +
"<td><span class=\"t1\">"+s.initial_price+"</span></td>" + "<td><span class=\"t1\">"+s.new_price+"</span></td>" +
"<td><span class=\"t1\">"+s.create_name+"</span></td>" +
"<td><span class=\"t1\">"+s.create_time+"</span></td>" +
"<td><span class=\"t1\">"+s.deal_name+"</span></td>" +
"<td><span class=\"t1\">"+s.deal_time+"</span></td>" +
"<td><span class=\"t1\">"+s.remark+"</span></td>" +
"</tr>" "</tr>"
} }
$("#shopListContent").html(html) $("#shopListContent").html(html)
......
<div class="lx-content-r fr"> <div class="lx-content-r fr">
<div class="tit-bar"> <div class="tit-bar">
<a href="">库存管理</a> <a href="">订单管理</a>
<span>&gt;</span> <span>&gt;</span>
<a class="text" href="">订单列表</a> <a class="text" href="">{{ $title }}</a>
</div> </div>
<div class="con-section shop-list"> <div class="con-section shop-list">
<p class="text">订单列表</p> <p class="text">{{ $title }}</p>
<form action=""> <form action="">
<div class="search-bar"> <div class="search-bar">
<div class="lineBlock input-inline va-m"> <div class="lineBlock input-inline va-m">
...@@ -31,12 +31,20 @@ ...@@ -31,12 +31,20 @@
<div class="table-list" id="shopList"> <div class="table-list" id="shopList">
<table> <table>
<tr> <tr>
<th>退货单号<b></b></th> <th>商品编码<b></b></th>
<th>创建时间<b></b></th> <th>商品型号<b></b></th>
<th>币种<b></b></th> <th>品牌名称<b></b></th>
<th>金额<b></b></th>
<th>状态<b></b></th> <th>状态<b></b></th>
<th>操作</th> <th>封装<b></b></th>
<th>包装方式<b></b></th>
<th>标准包装量<b></b></th>
<th>原始售价<b></b></th>
<th>最新售价<b></b></th>
<th>创建人<b></b></th>
<th>创建时间<b></b></th>
<th>处理人<b></b></th>
<th>处理人名称<b></b></th>
<th>备注<b></b></th>
</tr> </tr>
<tbody id="shopListContent"> <tbody id="shopListContent">
......
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