|
@@ -610,7 +610,7 @@ func (e WaybillController) Audit(c *gin.Context) {
|
|
|
e.Error(500, err, err.Error())
|
|
|
return
|
|
|
}
|
|
|
- e.OK(req.GetId(), "修改成功")
|
|
|
+ e.OK(req.GetId(), "审核成功")
|
|
|
}
|
|
|
|
|
|
// AdminAudit 管理员审核订单
|
|
@@ -622,7 +622,7 @@ func (e WaybillController) Audit(c *gin.Context) {
|
|
|
// @Param data body dto.WaybillAdmin true "body"
|
|
|
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
|
|
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
|
|
-// @Router /api/waybill/audit [put]
|
|
|
+// @Router /api/waybill/adminaudit [put]
|
|
|
// @Security Bearer
|
|
|
func (e WaybillController) AdminAudit(c *gin.Context) {
|
|
|
s := service.Waybill{}
|
|
@@ -638,14 +638,24 @@ func (e WaybillController) AdminAudit(c *gin.Context) {
|
|
|
return
|
|
|
}
|
|
|
p := actions.GetPermissionFromContext(c)
|
|
|
-
|
|
|
+ var userObj model.SysUser
|
|
|
+ userSvc := service.SysUser{}
|
|
|
+ err = userSvc.Get(&dto.SysUserGetReq{Id: p.UserId}, nil, &userObj)
|
|
|
+ if err != nil {
|
|
|
+ e.Error(500, err, err.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if userObj.Type != model.SysUserTypeSys {
|
|
|
+ e.Error(500, err, err.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
req.SetUpdateBy(user.GetUserId(c))
|
|
|
err = s.AdminAudit(&req, p)
|
|
|
if err != nil {
|
|
|
e.Error(500, err, err.Error())
|
|
|
return
|
|
|
}
|
|
|
- e.OK(req.GetId(), "修改成功")
|
|
|
+ e.OK(req.GetId(), "审核成功")
|
|
|
}
|
|
|
|
|
|
// Delivery 派单
|
|
@@ -779,7 +789,7 @@ func (e WaybillController) Receipt(c *gin.Context) {
|
|
|
e.Error(500, err, err.Error())
|
|
|
return
|
|
|
}
|
|
|
- e.OK(req.WaybillNo, "签收成功")
|
|
|
+ e.OK(req.WaybillNo, "提交成功")
|
|
|
}
|
|
|
|
|
|
// CustomerReceipt 客户签收
|