Commit 26cad81b by 朱继来

国产样片添加状态

parent 21c84a8c
......@@ -215,8 +215,28 @@ class UserSampleApplyModel extends Model
->orderBy('apply_id', 'asc')
->paginate($limit, ['*'], 'page', $page)->toArray();
$list['data'] = $this->handleDomesticData($list['data']);
return [0, '获取成功', $list['data'], $list['total']];
}
// 处理记录
public function handleDomesticData($data)
{
if (!$data) return false;
$OrderModel = new OrderModel();
foreach ($data as &$v) {
$order = $OrderModel->where('order_id', $v['order_id'])->select('status')->first();
if (!$order) continue;
$v['order_status'] = Config('params.order_status')[$order->status];
}
return $data;
}
}
\ No newline at end of file
......@@ -21,13 +21,14 @@ layui.use(['form', 'table', 'laydate'], function(){
,cols: [[ //表头
{title: '序号', type: 'numbers', fixed: 'left', width: 80}
,{field: 'user_id', title: '用户ID', width: 100}
,{field: 'account', title: '用户账户', width: 180}
,{field: 'account', title: '用户账户', width: 187}
,{field: 'apply_num', title: '申请样片数', width: 120}
,{field: 'order_id', title: '订单ID', width: 100}
,{field: 'order_sn', title: '订单编号', width: 180}
,{field: 'order_status', title: '订单状态', width: 120}
,{field: 'goods_id', title: '样片ID', width: 200}
,{field: 'goods_name', title: '样片名称', width: 300}
,{field: 'create_time', title: '最近一次领取时间'}
,{field: 'create_time', title: '最近一次领取时间', width: 180}
]]
,limit: 10
,limits: [10, 20, 50,]
......
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