Commit cee685c1 by fengjiansheng

format(@gms/gms-plugin-billexpand): formula format

parent 61e4d39f
......@@ -3,13 +3,11 @@ import _ from 'lodash'
/**
* 前端公式 获取基础数据包含的子基础数据的code
* @author fengjiansheng
* @data 2021-08-22
* @date 2021-08-22
*/
export default {
execute: function () {
console.log("s1 GetBaseDataSonCode")
if (arguments && arguments[0] && arguments[0].length > 1 && arguments[1]) {
// TODO 参数校验
if(arguments[0][0] && arguments[0][0].getResult() && arguments[0][0].getResult().Value){
let temp1 = arguments[0][0].getResult().Value
let temp2 = arguments[0][1].StaticValue.toLowerCase()
......
......@@ -4,12 +4,10 @@ import _ from 'lodash'
* 前端公式 计算精确天数
* 公式说明 根据首日是否凌晨入住及尾日是否延迟退房来计算两个日期的精确间隔天数
* @author fengjiansheng
* @data 2021-08-27
* @update 2021-09-01
* @date 2021-08-27
*/
export default {
execute: function () {
console.log("s1 GetExactDays")
if (arguments && arguments[0] && arguments[0][0] && arguments[0][1]) {
let date1 = arguments[0][0].getResult().Value
let date2 = arguments[0][1].getResult().Value
......
import FormulaConstants from "@/formula/FormulaConstants";
/**
* 前端公式 获取多选基础数据指定字段的值
* GetMultiBaseDataFieldValues
* @author fengjiansheng
* @date 2021-11-15
*/
import FormulaConstants from "@/formula/FormulaConstants";
export default {
execute: function () {
if (arguments && arguments[0] && arguments[0].length > 1 && arguments[1]) {
......
......@@ -7,7 +7,6 @@ import _ from 'lodash'
*/
export default {
execute: function () {
console.log("s1 HasContainExpandFields")
if (arguments && arguments[0] && arguments[0].length > 1 && arguments[1]) {
if(arguments[0][0] && arguments[0][0].getResult() && arguments[0][0].getResult().Value){
let baseData = arguments[0][0].getResult().Value
......
import _ from 'lodash'
/**
* 校验公式 检测多选基础数据中是否含有某(些)字段的值
......@@ -7,7 +6,6 @@ import _ from 'lodash'
*/
export default {
execute: function () {
console.log("s1 HasContainMultiBaseDataFields")
if (arguments && arguments[0] && arguments[0].length > 1 && arguments[1]) {
if(arguments[0][0] && arguments[0][0].getResult() && arguments[0][0].getResult().Value){
let baseDataList=arguments[0][0].getResult().Value
......
import _ from 'lodash'
/**
* 校验公式 检测基础数据Code中是否包含有另外一个String
* 公式说明 此公式判断字符串包含关系 以支撑部分需要进行两个基础数据校验的需求
......@@ -10,7 +8,6 @@ import _ from 'lodash'
*/
export default {
execute: function () {
console.log("s1 HasContainSubString")
if (arguments && arguments[0] && arguments[0].length > 1 && arguments[1]) {
// TODO 后续可拓展更严谨的判断 eg.是否开头包含等..
if (arguments[0][0] && arguments[0][0].getResult() && arguments[0][0].getResult().Value) {
......
......@@ -7,9 +7,7 @@ import _ from 'lodash'
*/
export default {
execute: function () {
console.log("s1 SetInternalAccommodation")
if (arguments && arguments[0] && arguments[0].length >= 5 && arguments[1]) {
// TODO 参数校验
let context = arguments[1]
let targetSubField = arguments[0][0];
let internalStandardBaseDataCode = arguments[0][1].getResult().Value;
......
......@@ -7,9 +7,7 @@ import _ from 'lodash'
*/
export default {
execute: function () {
console.log("s1 SetInternalAccommodationTotal")
if (arguments && arguments[0] && arguments[0].length >= 7 && arguments[1]) {
// TODO 参数校验
let context = arguments[1]
let targetSubField = arguments[0][0];
let internalStandardBaseDataCode = arguments[0][1].getResult().Value;
......
......@@ -7,9 +7,7 @@ import _ from 'lodash'
*/
export default {
execute: function () {
console.log("s1 SetIsOverStandard")
if (arguments && arguments[0] && arguments[0].length === 3 && arguments[1]) {
// TODO 参数校验
let context = arguments[1]
let targetSubField = arguments[0][0];
let tmpField = targetSubField.FieldCode
......
......@@ -8,7 +8,6 @@ import _ from 'lodash'
*/
export default {
execute: function () {
console.log("s1 SetMasterAmount")
if (arguments && arguments[0] && arguments[0].length > 1 && arguments[1]) {
let context = arguments[1]
let masterField = arguments[0][0]
......
......@@ -8,7 +8,6 @@ import _ from 'lodash'
*/
export default {
execute: function () {
console.log("s1 SetMasterJdhdAmount")
if (arguments && arguments[0] && arguments[0].length > 0 && arguments[1]) {
let context = arguments[1]
let controlField = arguments[0][arguments[0].length - 1]
......
......@@ -7,7 +7,6 @@ import _ from 'lodash'
*/
export default {
execute: function () {
console.log("s1 SetSubFieldNull")
if (arguments && arguments[0] && arguments[0].length === 1 && arguments[1]) {
let context = arguments[1]
let subField = arguments[0][0]
......
......@@ -5,7 +5,6 @@
*/
export default {
execute: function () {
console.log("s1 SubString")
if (arguments && arguments[0] && arguments[0].length >= 2 && arguments[0].length <= 3 && arguments[1]) {
let s = arguments[0][0].getResult().Value
let a;
......
......@@ -6,7 +6,8 @@ import _ from "./FormulaConstants";
* @date 2022-03-02
*/
export default {
formulaName: "SubTableHasContainField", execute: function () {
formulaName: "SubTableHasContainField",
execute: function () {
if (arguments && arguments[0] && arguments[0].length === 2) {
let context = arguments[1]
let field = arguments[0][0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment