fix: 统一顺运宝单条采集客户端选择 (#174)
This commit is contained in:
@@ -207,8 +207,13 @@ func (h *Handler) SybDetail(c *gin.Context) {
|
||||
fail(c, http.StatusNotFound, "顺运宝货运单明细不存在。")
|
||||
return
|
||||
}
|
||||
assignableClients, err := service.ListAssignableClients(h.db, currentUser(c), h.onlineThreshold)
|
||||
if err != nil {
|
||||
fail(c, http.StatusInternalServerError, "读取可分配客户端失败,数据没有被改动。")
|
||||
return
|
||||
}
|
||||
c.HTML(http.StatusOK, "syb/detail_modal", gin.H{
|
||||
"D": detail, "CSRFToken": csrfToken(c),
|
||||
"D": detail, "CSRFToken": csrfToken(c), "AssignableClients": assignableClients,
|
||||
"Keyword": c.Query("order_no"), "ShopFilter": c.Query("shop"), "StageFilter": c.Query("stage"),
|
||||
"CurrentPage": service.ParsePage(c.Query("page")),
|
||||
})
|
||||
@@ -603,7 +608,8 @@ func (h *Handler) SybAssociatePdd(c *gin.Context) {
|
||||
|
||||
// SybCollectPdd 为货运单当前关联的 PDD 商品创建采集任务。
|
||||
func (h *Handler) SybCollectPdd(c *gin.Context) {
|
||||
result, err := service.CreateSybPddCollectTaskForUser(h.db, currentUser(c), c.PostForm("syb_id"))
|
||||
result, err := service.CreateSybPddCollectTasksForUser(
|
||||
h.db, currentUser(c), []string{c.PostForm("syb_id")}, c.PostForm("client_id"))
|
||||
if err != nil {
|
||||
h.sybRedirect(c, "采集任务未创建:"+err.Error())
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user