setter
parent
7fd388be9b
commit
59832c3a7d
|
@ -27,6 +27,8 @@ class Spu extends Base
|
|||
*/
|
||||
public function category(): Json
|
||||
{
|
||||
$list = SpuRepository::getInstance()->category(0,["id,pid,title,cover"])->toArray();
|
||||
return $this->json(0, 'success', $list);
|
||||
if(input("hasChildren/d",0)){
|
||||
$list = SpuRepository::getInstance()->categoryAll(["id,sort,pid,title,cover"]);
|
||||
|
||||
|
|
|
@ -338,7 +338,7 @@ class OrderRepository extends Repository
|
|||
$arr['id'] = $sku['id'];
|
||||
$arr['stock'] = Db::raw('`stock` - '.($dataSku[$sku['coding']] ?? 1));;
|
||||
$updateSkuStock[] = $arr;
|
||||
$updateSpuStock["spu_id"] = $sku['spu_id'];
|
||||
$updateSpuStock[$sku['spu_id']] = $sku['spu_id'];
|
||||
}
|
||||
|
||||
(new Sku())->saveAll($updateSkuStock);
|
||||
|
@ -410,8 +410,8 @@ class OrderRepository extends Repository
|
|||
'is_only' => isset($data['is_only']) && $data['is_only'] > 0 ? 1 : 0,
|
||||
'is_score' => $data['is_score'] ?? 0,
|
||||
|
||||
'wedding_date' => $data['wedding_date'] ?? null,
|
||||
'expected_delivery_date' => $data['expected_delivery_date'] ?? null,
|
||||
'wedding_date' => !empty($data['wedding_date']) ?$data['wedding_date']: null,
|
||||
'expected_delivery_date' => !empty($data['expected_delivery_date']) ?$data['expected_delivery_date']: null,
|
||||
'address' => $data['address'] ?? '',
|
||||
'phone' => $data['phone'] ?? '',
|
||||
'contacts' => $data['contacts'] ?? '',
|
||||
|
|
|
@ -50,7 +50,12 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect', 'laydate'
|
|||
// }, align: 'center'
|
||||
// },
|
||||
{field: 'price', title: '价格(¥)'},
|
||||
{field: 'stock', title: '总库存', minWidth: 100},
|
||||
{templet: function (d) {
|
||||
if(d.stock<=50){
|
||||
return "<span style='color: red;font-weight: bold'>"+d.stock+"</span>"
|
||||
}
|
||||
return d.stock;
|
||||
}, title: '总库存', minWidth: 100},
|
||||
// {field: 'amount', title: '销量(含初始销量)', minWidth: 100},
|
||||
// {field: 'init_amount', title: '初始销量', minWidth: 100},
|
||||
// {field: 'saleable_text', title: '状态', width: 150},
|
||||
|
|
Loading…
Reference in New Issue