@@ -37,7 +37,7 @@ func OrderList(c *gin.Context) { | |||||
} | } | ||||
enterpriseMap := db.GetEnterpriseMore(eg, enterpriseIds) | enterpriseMap := db.GetEnterpriseMore(eg, enterpriseIds) | ||||
for _, v := range *list { | for _, v := range *list { | ||||
v1 := JudgePackageOrdOrdState(&v) | |||||
v1 := v | |||||
isCanCancel := "1" | isCanCancel := "1" | ||||
if v1.State > 0 { | if v1.State > 0 { | ||||
isCanCancel = "0" | isCanCancel = "0" | ||||
@@ -102,7 +102,6 @@ func OrderGoodsList(c *gin.Context) { | |||||
} | } | ||||
enterpriseMap := db.GetEnterpriseMore(eg, enterpriseIds) | enterpriseMap := db.GetEnterpriseMore(eg, enterpriseIds) | ||||
for _, v := range list { | for _, v := range list { | ||||
JudgePackageOrdOrdStateSecond(v["oid"], v["state"]) | |||||
enterpriseName := "" | enterpriseName := "" | ||||
insideEnterpriseName := "" | insideEnterpriseName := "" | ||||
_, ok := enterpriseMap[utils.StrToInt(v["enterprise_id"])] | _, ok := enterpriseMap[utils.StrToInt(v["enterprise_id"])] | ||||
@@ -172,7 +171,6 @@ func NewOrderGoodsList(c *gin.Context) { | |||||
} | } | ||||
enterpriseMap := db.GetEnterpriseMore(eg, enterpriseIds) | enterpriseMap := db.GetEnterpriseMore(eg, enterpriseIds) | ||||
for _, v := range list { | for _, v := range list { | ||||
JudgePackageOrdOrdStateSecond(v["oid"], v["state"]) | |||||
enterpriseName := "" | enterpriseName := "" | ||||
insideEnterpriseName := "" | insideEnterpriseName := "" | ||||
_, ok := enterpriseMap[utils.StrToInt(v["enterprise_id"])] | _, ok := enterpriseMap[utils.StrToInt(v["enterprise_id"])] | ||||
@@ -710,7 +708,6 @@ func OrderDetail(c *gin.Context) { | |||||
e.OutErr(c, 400, e.NewErr(400, "订单不存在")) | e.OutErr(c, 400, e.NewErr(400, "订单不存在")) | ||||
return | return | ||||
} | } | ||||
order = JudgePackageOrdOrdState(order) | |||||
var enterpriseData model.Enterprise | var enterpriseData model.Enterprise | ||||
eg.Where("id=?", order.EnterpriseId).Get(&enterpriseData) | eg.Where("id=?", order.EnterpriseId).Get(&enterpriseData) | ||||
stateArr := []string{"待制作", "制作中", "烘焙中", "分拣中", "已完成", "已取消"} | stateArr := []string{"待制作", "制作中", "烘焙中", "分拣中", "已完成", "已取消"} | ||||
@@ -2,7 +2,6 @@ package svc | |||||
import ( | import ( | ||||
md2 "applet/app/admin/md" | md2 "applet/app/admin/md" | ||||
"applet/app/admin/svc/order" | |||||
"applet/app/bigData/md" | "applet/app/bigData/md" | ||||
"applet/app/db" | "applet/app/db" | ||||
"applet/app/db/model" | "applet/app/db/model" | ||||
@@ -228,7 +227,7 @@ func LeftDataForSorting() (resp []md.LeftDataForMakeResp, err error) { | |||||
} | } | ||||
var oIds []int64 | var oIds []int64 | ||||
for _, v := range orders { | for _, v := range orders { | ||||
v1 := order.JudgePackageOrdOrdState(&v) | |||||
v1 := v | |||||
if v1.State == 4 || v1.State == 5 { | if v1.State == 4 || v1.State == 5 { | ||||
continue | continue | ||||
} | } | ||||
@@ -435,8 +434,6 @@ func NewSortingCate() []map[string]string { | |||||
if utils.InArr(utils.IntToStr(v.EnterpriseId), ids) { | if utils.InArr(utils.IntToStr(v.EnterpriseId), ids) { | ||||
continue | continue | ||||
} | } | ||||
v1 := order.JudgePackageOrdOrdState(&v) | |||||
v = *v1 | |||||
tmp := map[string]string{ | tmp := map[string]string{ | ||||
"id": utils.IntToStr(v.EnterpriseId), | "id": utils.IntToStr(v.EnterpriseId), | ||||
"name": enterpriseMap[v.EnterpriseId].Name, | "name": enterpriseMap[v.EnterpriseId].Name, | ||||
@@ -474,7 +471,7 @@ func NewSortingData(c *gin.Context) []map[string]string { | |||||
} | } | ||||
var oIds []string | var oIds []string | ||||
for _, v := range orders { | for _, v := range orders { | ||||
v1 := order.JudgePackageOrdOrdState(&v) | |||||
v1 := v | |||||
if v1.State == 4 || v1.State == 5 { | if v1.State == 4 || v1.State == 5 { | ||||
continue | continue | ||||
} | } | ||||
@@ -522,7 +519,7 @@ func NewSortingGoodsCate() []map[string]string { | |||||
} | } | ||||
var oIds []string | var oIds []string | ||||
for _, v := range orders { | for _, v := range orders { | ||||
v1 := order.JudgePackageOrdOrdState(&v) | |||||
v1 := v | |||||
if v1.State == 4 || v1.State == 5 { | if v1.State == 4 || v1.State == 5 { | ||||
continue | continue | ||||
} | } | ||||
@@ -582,7 +579,7 @@ func NewSortingGoodsData(arg map[string]string) []map[string]string { | |||||
} | } | ||||
var oIds []string | var oIds []string | ||||
for _, v := range orders { | for _, v := range orders { | ||||
v1 := order.JudgePackageOrdOrdState(&v) | |||||
v1 := v | |||||
if v1.State == 4 || v1.State == 5 { | if v1.State == 4 || v1.State == 5 { | ||||
continue | continue | ||||
} | } | ||||
@@ -2,7 +2,6 @@ package svc | |||||
import ( | import ( | ||||
"applet/app/admin/md" | "applet/app/admin/md" | ||||
"applet/app/admin/svc/order" | |||||
svc2 "applet/app/bigData/svc" | svc2 "applet/app/bigData/svc" | ||||
"applet/app/db" | "applet/app/db" | ||||
"applet/app/e" | "applet/app/e" | ||||
@@ -31,9 +30,6 @@ func Order(c *gin.Context) { | |||||
stateArr := []string{"待制作", "制作中", "烘焙中", "分拣中", "已完成", "已取消"} | stateArr := []string{"待制作", "制作中", "烘焙中", "分拣中", "已完成", "已取消"} | ||||
btnArr := []string{"进入制作", "进入制作", "进入制作", "分拣完成", "查看详情", "已取消"} | btnArr := []string{"进入制作", "进入制作", "进入制作", "分拣完成", "查看详情", "已取消"} | ||||
for _, v := range *data { | for _, v := range *data { | ||||
v2 := &v | |||||
v2 = order.JudgePackageOrdOrdState(v2) | |||||
v = *v2 | |||||
enterpriseName := "" | enterpriseName := "" | ||||
_, ok := enterpriseMap[v.EnterpriseId] | _, ok := enterpriseMap[v.EnterpriseId] | ||||
if ok { | if ok { | ||||