更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -12,7 +12,6 @@ import (
|
||||
"github.com/beego/beego/v2/client/orm"
|
||||
)
|
||||
|
||||
// BackendErpProductController 商品档案 + 商品分类(进销存基础数据)
|
||||
type BackendErpProductController struct {
|
||||
BackendErpBaseController
|
||||
}
|
||||
@@ -45,7 +44,6 @@ type erpProductPayload struct {
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
// List GET /backend/erp/product/list
|
||||
func (c *BackendErpProductController) List() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -68,7 +66,6 @@ func (c *BackendErpProductController) List() {
|
||||
c.listOK(list, total, page, pageSize)
|
||||
}
|
||||
|
||||
// Detail GET /backend/erp/product/:id
|
||||
func (c *BackendErpProductController) Detail() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -82,7 +79,6 @@ func (c *BackendErpProductController) Detail() {
|
||||
c.ok(p)
|
||||
}
|
||||
|
||||
// Create POST /backend/erp/product
|
||||
func (c *BackendErpProductController) Create() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -125,7 +121,6 @@ func (c *BackendErpProductController) Create() {
|
||||
c.ok(map[string]interface{}{"id": id, "product_code": row.ProductCode})
|
||||
}
|
||||
|
||||
// Update PUT /backend/erp/product/:id
|
||||
func (c *BackendErpProductController) Update() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -168,8 +163,6 @@ func (c *BackendErpProductController) Update() {
|
||||
c.ok(nil)
|
||||
}
|
||||
|
||||
// Delete DELETE /backend/erp/product/:id
|
||||
// 软删除;已有库存或已开过单的商品不允许删除,避免历史数据失去指向。
|
||||
func (c *BackendErpProductController) Delete() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -211,7 +204,6 @@ func (c *BackendErpProductController) Delete() {
|
||||
c.ok(nil)
|
||||
}
|
||||
|
||||
// ToggleStatus POST /backend/erp/product/:id/status
|
||||
func (c *BackendErpProductController) ToggleStatus() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -238,9 +230,6 @@ func (c *BackendErpProductController) ToggleStatus() {
|
||||
c.ok(nil)
|
||||
}
|
||||
|
||||
// ---- 分类 ----
|
||||
|
||||
// CategoryList GET /backend/erp/product/category/list
|
||||
func (c *BackendErpProductController) CategoryList() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -254,7 +243,6 @@ func (c *BackendErpProductController) CategoryList() {
|
||||
c.ok(map[string]interface{}{"list": rows, "tree": tree})
|
||||
}
|
||||
|
||||
// CategorySave POST /backend/erp/product/category 新建传 id=0,修改传原 id
|
||||
func (c *BackendErpProductController) CategorySave() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -316,7 +304,6 @@ func (c *BackendErpProductController) CategorySave() {
|
||||
c.ok(map[string]interface{}{"id": id})
|
||||
}
|
||||
|
||||
// CategoryDelete DELETE /backend/erp/product/category/:id
|
||||
func (c *BackendErpProductController) CategoryDelete() {
|
||||
cl, err := c.claims()
|
||||
if c.denied(err) {
|
||||
@@ -357,8 +344,6 @@ func (c *BackendErpProductController) CategoryDelete() {
|
||||
c.ok(nil)
|
||||
}
|
||||
|
||||
// ---- 内部工具 ----
|
||||
|
||||
func erpApplyProduct(row *models.ErpProduct, p *erpProductPayload) models.ErpProduct {
|
||||
out := *row
|
||||
out.ProductCode = strings.TrimSpace(p.ProductCode)
|
||||
@@ -458,7 +443,6 @@ func erpProductStocks(tid string, productID uint64) []map[string]interface{} {
|
||||
return out
|
||||
}
|
||||
|
||||
// erpSafetyState low-低于安全库存 / over-超过最高库存 / normal
|
||||
func erpSafetyState(safety, qty, max float64) string {
|
||||
if safety > 0 && qty < safety {
|
||||
return "low"
|
||||
|
||||
Reference in new issue
Block a user