修改商品成长值为销售值,并添加用户信息余额和积分反回
parent
96937e6959
commit
724d82cddc
|
|
@ -120,7 +120,7 @@ class ProductSkuController extends AdminController
|
||||||
}
|
}
|
||||||
return bcmul($vipPrice, 100);
|
return bcmul($vipPrice, 100);
|
||||||
});
|
});
|
||||||
$form->number('growth_value')->min(0)->default(0);
|
$form->currency('sales_value')->symbol('@')->default(0);
|
||||||
$form->divider();
|
$form->divider();
|
||||||
$form->select('attr_group')->options(ProductGroup::all()->pluck('name', 'id'));
|
$form->select('attr_group')->options(ProductGroup::all()->pluck('name', 'id'));
|
||||||
$form->selectAttr('attrs')->listen('attr_group');
|
$form->selectAttr('attrs')->listen('attr_group');
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ class ProductSpuController extends AdminController
|
||||||
return '¥'.bcdiv($value, 100, 2);
|
return '¥'.bcdiv($value, 100, 2);
|
||||||
});
|
});
|
||||||
$grid->column('weight');
|
$grid->column('weight');
|
||||||
$grid->column('growth_value');
|
$grid->column('sales_value');
|
||||||
$grid->column('created_at')->sortable();
|
$grid->column('created_at')->sortable();
|
||||||
|
|
||||||
//排序
|
//排序
|
||||||
|
|
@ -184,7 +184,7 @@ class ProductSpuController extends AdminController
|
||||||
}
|
}
|
||||||
return bcmul($vipPrice, 100);
|
return bcmul($vipPrice, 100);
|
||||||
});
|
});
|
||||||
$form->number('growth_value')->min(0)->default(0);
|
$form->currency('sales_value')->symbol('@')->default(0);
|
||||||
$form->divider();
|
$form->divider();
|
||||||
$form->select('attr_group')->options(ProductGroup::all()->pluck('name', 'id'));
|
$form->select('attr_group')->options(ProductGroup::all()->pluck('name', 'id'));
|
||||||
$form->selectAttr('attrs')->listen('attr_group');
|
$form->selectAttr('attrs')->listen('attr_group');
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ class ProductSkuTable extends Grid
|
||||||
return '¥'.bcdiv($value, 100, 2);
|
return '¥'.bcdiv($value, 100, 2);
|
||||||
});
|
});
|
||||||
$grid->column('weight');
|
$grid->column('weight');
|
||||||
$grid->column('growth_value');
|
$grid->column('sales_value');
|
||||||
$grid->column('stock');
|
$grid->column('stock');
|
||||||
$grid->column('sales');
|
$grid->column('sales');
|
||||||
$grid->column('verify_state')
|
$grid->column('verify_state')
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ class ProduckSkuResource extends JsonResource
|
||||||
return $this->buynote?->content;
|
return $this->buynote?->content;
|
||||||
}),
|
}),
|
||||||
'growth_value' => (int) $this->growth_value,
|
'growth_value' => (int) $this->growth_value,
|
||||||
|
'sales_value' => (int) $this->sales_value,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ class UserInfoResource extends JsonResource
|
||||||
'gender' => (string) $this->gender,
|
'gender' => (string) $this->gender,
|
||||||
'birthday' => (string) $this->birthday?->toDateString(),
|
'birthday' => (string) $this->birthday?->toDateString(),
|
||||||
'code' => (string) $this->code,
|
'code' => (string) $this->code,
|
||||||
|
'balance' => '1000.00', //todo 用户余额
|
||||||
|
'points' => (int) $this->points,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,8 @@ trait SkuInfo
|
||||||
'buynote_id' => $spu->buynote_id,
|
'buynote_id' => $spu->buynote_id,
|
||||||
'shipping_template_id'=> $spu->shipping_template_id,
|
'shipping_template_id'=> $spu->shipping_template_id,
|
||||||
'verify_state' => 0, //默认为正常
|
'verify_state' => 0, //默认为正常
|
||||||
'growth_value' => $spu->growth_value,
|
// 'growth_value' => $spu->growth_value,
|
||||||
|
'sales_value' => $spu->sales_value,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ return [
|
||||||
'num'=>'赠送数量',
|
'num'=>'赠送数量',
|
||||||
'limit'=>'限量',
|
'limit'=>'限量',
|
||||||
'growth_value'=>'成长值',
|
'growth_value'=>'成长值',
|
||||||
|
'sales_value'=>'销售值',
|
||||||
],
|
],
|
||||||
'options' => [
|
'options' => [
|
||||||
'deny' => '删除失败',
|
'deny' => '删除失败',
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ return [
|
||||||
'verify_state'=>'状态',
|
'verify_state'=>'状态',
|
||||||
'release_at'=>'上架时间',
|
'release_at'=>'上架时间',
|
||||||
'growth_value'=>'成长值',
|
'growth_value'=>'成长值',
|
||||||
|
'sales_value'=>'销售值',
|
||||||
],
|
],
|
||||||
'options' => [
|
'options' => [
|
||||||
'deny' => '删除失败',
|
'deny' => '删除失败',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue