[ルックアップ更新]条件式の不具合対応

This commit is contained in:
xiaozhe.ma
2024-08-29 12:33:00 +09:00
parent 60359ed9bd
commit 5fc03c6fe0
9 changed files with 965 additions and 27 deletions

View File

@@ -16,7 +16,7 @@ import "bootstrap/js/dist/modal";
import {Modal} from "bootstrap"
import $ from "jquery";
interface Props {
interface IAutoLookUpProps {
displayName: string;
lookupField: LookupField;
condition: Condition;
@@ -84,11 +84,11 @@ interface App {
export class AutoLookUpAction implements IAction {
name: string;
actionProps: IActionProperty[];
props: Props;
props: IAutoLookUpProps;
constructor() {
this.name = "ルックアップ更新";
this.actionProps = [];
this.props = {} as Props;
this.props = {} as IAutoLookUpProps;
this.register();
}
@@ -104,7 +104,7 @@ export class AutoLookUpAction implements IAction {
this.props = {
...actionNode.ActionValue,
condition: JSON.parse((actionNode.ActionValue as any).condition),
} as Props;
} as IAutoLookUpProps;
// console.log(context);
let result = {
@@ -150,12 +150,17 @@ export class AutoLookUpAction implements IAction {
* @returns
*/
makeQuery=(lookUpField:Field,key:any)=>{
let query ="";
if(typeof key==='number'){
return `${lookUpField.code} = ${key}`
query = `${lookUpField.code} = ${key}`
}
if(typeof key==='string'){
return `${lookUpField.code} = "${key}"`
query = `${lookUpField.code} = "${key}"`
}
if(this.props.condition.queryString!==''){
query = `${query} and (${this.props.condition.queryString})`
}
return query;
}
/**