import * as React from 'react'; import { Page } from 'tonva-tools'; import { FA } from 'tonva-react-form'; import { VSheet } from "./vSheet"; export class VSheetSaved extends VSheet { private brief: any; async open(brief?:any) { this.brief = brief; this.openPage(this.view); } private restart = async () => { this.ceasePage(); await this.event('new'); } actionClick = async (action:any) => { this.ceasePage(); let {id, flow, state} = this.brief; let res = await this.controller.action(id, flow, state, action.name); this.openPage(this.acted); } private buttons = <> 继续开单 this.backPage()}>返回 >; private view = () => { let {states} = this.entity; const state = '$'; let s = states.find(v => v.name === state); let actionButtons = <>{s.actions.map((v,index) => this.actionClick(v)} > {this.controller.getActionLabel(state, v.name)} )} >; return 单据已保存!系统尚未处理 {actionButtons} {this.buttons} ; } private acted = () => { return 单据已处理! {this.buttons} } }