@@ -102,9 +102,13 @@ class Goods
private function set($up, $order, $num, $table, $method, $otherMethod, $type, $col, $v)
{
# 先验证有没有信息吧
- $w = $up;
+ foreach ($up as $k => $v) {
+ $k = str_replace('where_', '', $k);
+ $w[$k] = $v;
+ }
$w['goods_id'] = $v['goods_id'];
$info = Dever::db($table . '/goods')->one($w);
+ print_r($info);die;
if (!$info) {
Dever::db($table . '/goods')->insert($w);
} else {
@@ -28,7 +28,7 @@ class Factory_order extends Core
$button .= ' <a href="javascript:;" id="print_'.$v['id'].'" onclick="layer.alert(\'开发中\')"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 layui-btn layui-btn-xs">打印订单</button></a>';
if ($v['status'] == 4) {
- $url = Dever::url('admin/factory_order.action&order_id='.$v['id'], 'store');
+ $url = Dever::url('admin/factory_order.action_commit&order_id='.$v['id'], 'store');
$button .= ' <a href="javascript:;" onclick="load(\''.$url.'\')"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 layui-btn layui-btn-xs">确认收货</button></a>';
}
@@ -96,7 +96,7 @@ class Factory_order extends Core
# 确认收货
- public function action_api()
+ public function action_commit_api()
$order_id = Dever::input('order_id');