条件エディタ実装
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
import { actionAddins } from ".";
|
||||
import { IField, IAction,IActionResult, IActionNode, IActionProperty } from "../types/ActionTypes";
|
||||
import { IField, IAction,IActionResult, IActionNode, IActionProperty, IContext } from "../types/ActionTypes";
|
||||
import { Formatter } from "../util/format";
|
||||
|
||||
declare global {
|
||||
@@ -14,7 +14,7 @@ interface IAutoNumberingProps{
|
||||
format:string;
|
||||
prefix:string;
|
||||
suffix:string;
|
||||
|
||||
verName:string;
|
||||
}
|
||||
|
||||
export class AutoNumbering implements IAction{
|
||||
@@ -29,13 +29,14 @@ export class AutoNumbering implements IAction{
|
||||
field:{code:''},
|
||||
format:'',
|
||||
prefix:'',
|
||||
suffix:''
|
||||
suffix:'',
|
||||
verName:''
|
||||
}
|
||||
globalThis.window.$format=this.format;
|
||||
this.register();
|
||||
}
|
||||
|
||||
async process(actionNode:IActionNode,event:any):Promise<IActionResult> {
|
||||
async process(actionNode:IActionNode,event:any,context:IContext):Promise<IActionResult> {
|
||||
let result={
|
||||
canNext:false,
|
||||
result:false
|
||||
@@ -49,6 +50,10 @@ export class AutoNumbering implements IAction{
|
||||
const record = event.record;
|
||||
const docNum = await this.createNumber(this.props);
|
||||
record[this.props.field.code].value=docNum;
|
||||
//変数設定
|
||||
if(this.props.verName){
|
||||
context.variables[this.props.verName]=docNum;
|
||||
}
|
||||
result= {
|
||||
canNext:true,
|
||||
result:true
|
||||
|
||||
Reference in New Issue
Block a user