package controllers

import (
	"time"
	"wb/ctrl"
	"wb/ii"
	"wb/ut"
)

type PurchaseController struct {
	ctrl.ItemController
}


func (this *PurchaseController) NestPrepare() {
	this.CtxItemInfo, _ = ii.ItemInfoMap["purchase"]
}

func (this *PurchaseController) UiList() {
	this.TplName = "purchase/list.tpl"
}

func (this *PurchaseController) UiAdd() {
	this.Data["tiemText"] = time.Now().Format(ut.TimeFormatter)
	this.TplName = "purchase/add.tpl"
}

func (this *PurchaseController) UiUpdate() {
	this.Data["sn"] = this.GetString("sn")
	this.TplName = "purchase/update.tpl"
}

func (this *PurchaseController) UiApprovalList() {
	this.TplName = "purchase/approvallist.tpl"
}

func (this *PurchaseController) UiOrderList() {
	this.TplName = "purchase/purchaseorderlist.tpl"
}

func (this *PurchaseController) UiOrderTrack() {
	this.TplName = "purchase/ordertrack.tpl"
}

func (this *PurchaseController) UiPrint() {
	this.TplName = "purchase/print.tpl"
}
