{{define "tasks.html"}} 采购任务 · 采购服务
采购服务
{{if .FullPage}}
{{template "form" .}}
{{else}}

采购任务

只显示待开始的手工任务。

{{if .Success}}

任务已创建,已显示在列表首行。

{{end}}{{if .Drafts}}
{{range .Drafts}}{{end}}
标题颜色分类尺码价格上限数量采购结果状态创建时间
{{.Title}}{{.SKUColor}}{{.SKUSize}}¥{{.MaxTotalPrice}}{{.Quantity}}—待开始
{{else}}

还没有待开始任务

创建一条手工任务后会显示在这里。

{{end}}
{{if .OpenForm}}{{template "form" .}}{{end}}{{end}} {{end}} {{define "form"}}

创建采购任务

保存后仅生成待开始任务,不会执行其他动作。

{{if .Errors}}{{end}}
{{template "field" (list "title" "任务名称" .Form.Title .Errors .FocusField)}}{{template "field" (list "product_url" "商品链接" .Form.ProductURL .Errors .FocusField)}}{{template "field" (list "sku_color" "颜色分类" .Form.SKUColor .Errors .FocusField)}}{{template "field" (list "sku_size" "尺码" .Form.SKUSize .Errors .FocusField)}}{{template "field" (list "quantity" "数量" .Form.Quantity .Errors .FocusField)}}{{template "field" (list "max_total_price" "价格上限" .Form.MaxTotalPrice .Errors .FocusField)}}
取消
{{end}} {{define "field"}}{{$name:=index . 0}}{{$label:=index . 1}}{{$value:=index . 2}}{{$errors:=index . 3}}{{$focus:=index . 4}}
{{with index $errors $name}}

{{.}}

{{end}}
{{end}}