Commit 8f4171df by raojiaguan

优化后端公式在前端的文件量

parent da3ca9d3
/*
* @Author: shi ZongLiang
* @Date: 2021-07-26 20:19:42
* @LastEditors: shi ZongLiang
* @Description: 单据推送
*/
// ---后台公式
export default {
execute:function(){
console.log("进入单据推送公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 判断子表某个字段值相同则提示不然保存前端公式 // 判断子表某个字段值相同则提示不然保存前端公式
export default { export default {
execute: function () { execute: function () {
// console.log("进入: 判断子表某个字段值是否相同前端公式"); {
// 表名
// 有一个则直接执行判断;三个则判断是否属于要判断的情况 ,属于则判断,否则false
if (arguments[0][0] && arguments[0][1] && arguments[0][2]) {
let subTable = arguments[0][0].FieldTableCode
// 字段名
let subFieldCode = arguments[0][0].FieldCode
// 主表
let targetField = arguments[0][1]
let masterTable = arguments[0][1].FieldTableCode
// 字段
let masterFieldCode = arguments[0][1].FieldCode
// bill
let context = arguments[1]
// 字段值
let fieldValue = null
if (targetField instanceof BillDataNode) {
let masterObj = context.getTableType(masterTable)
if (masterObj.type == 'master') {
let masterData = context.getMasterData(masterObj.name)
fieldValue = masterData.getValue(masterFieldCode).code
}
}
let str = arguments[0][2].StaticValue
let strNum = str.split(",")
// 要判断是否重复的字段所在的表的所有字段
let tableObj = context.getTableType(subTable)
let dataFun = context.getSubData(tableObj.title)
let flag = 1 // 判断是否有相等字段
let num = 0 // 判断是否属于要判断的
// 一条以上数据进行判断
if (dataFun.length > 1) {
for (let i = 0; i < strNum.length; i++) {
if (fieldValue == strNum[i]) {
for (let j = 0; j < dataFun.length; j++) {
let _data1 = dataFun[j].getData()
for (let k = j + 1; k < dataFun.length; k++) {
let _data2 = dataFun[k].getData()
if (_data1[subFieldCode].value === _data2[subFieldCode].value) {
flag = 0
return false;
}
}
}
num = num + 1
}
}
} else if (dataFun.length <= 1) {
return true
}
// 不用判断
if (num == 0) {
return true
} else{
if (flag == 1) {
return true
}
}
} else {
let subTable = arguments[0][0].FieldTableCode let subTable = arguments[0][0].FieldTableCode
// 字段名 // 字段名
let subFieldCode = arguments[0][0].FieldCode let subFieldCode = arguments[0][0].FieldCode
...@@ -82,15 +19,13 @@ export default { ...@@ -82,15 +19,13 @@ export default {
for (let j = i + 1; j < dataFun.length; j++) { for (let j = i + 1; j < dataFun.length; j++) {
let _data2 = dataFun[j].getData() let _data2 = dataFun[j].getData()
if (_data1[subFieldCode].value === _data2[subFieldCode].value) { if (_data1[subFieldCode].value === _data2[subFieldCode].value) {
flag = 0
return false; return false;
} }
} }
} }
} else if (dataFun.length <= 1) { } else if (dataFun.length <= 1) {
return true return true
} }else{
if (flag === 1) {
return true; return true;
} }
} }
......
/**
* 扣减预算服务校验公式
* @author fengjiansheng
* @date 2022-03-24
*/
export default {
formulaName: "CheckReduceBudgetAmount",
execute: function () {
},
getResultType: function () {
return FMR.ConstDataTypes.General;
}
}
/**
* CheckReferenceRelation
* @author fengjiansheng
* @date 2021-12-30
*/
export default {
execute: function () {
},
getResultType: function () {
return FMR.ConstDataTypes.General;
}
}
/**
* 清空票据引用状态
* @author fengjiansheng
* @date 2021-12-22
*/
export default {
execute: function () {
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
export default {
execute:function(){
console.log("清除引用单据状态");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 清空子表数据 /**
* 清空子表数据
* @author raojiaguan
* @data 2022年3月25日11:47:28
*/
export default { export default {
execute: function () { execute: function () {
console.log("进入到补助标准赋值公式");
if (arguments && arguments[0] && arguments[1]) { if (arguments && arguments[0] && arguments[1]) {
let context = arguments[1] let context = arguments[1]
let tableName = arguments[0][0].StaticValue let tableName = arguments[0][0].StaticValue
......
import _ from 'lodash'
import util from './FormulaConstants'
/**
* 主子表字段比较公式
* 暂时仅实现 主表基础数据子表基础数据的比较
* @author fengjiansheng
* @date 2022-02-16
*/
export default {
formulaName: "EqualsMasterAndSubField",
execute: function () {
},
getResultType: function () {
return util.resultType.boolean
}
}
/**
* 后端公式统一导入到mcon.js指定文件
* @author raojiaguan
* @data 2022年3月25日11:47:28
*/
const gen = () => {
return {
execute:function(){
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
}
const formulaObject = {
}
;
['GmsGetNow','BillPush','CheckReduceBudgetAmount','CheckReferenceRelation','ClearImageInfoRefState',
'EqualsMasterAndSubField','GetAccessoryCount','GetBaseDataWithCodes','GetFwssBaseDataWithGroupField',
'GetLoginUserInfoBack','GetMdOrgParentField','GetOrgName','GetUserDepartment',
'GetUserStaff','GetUserStaffInfo','LoginUserIsContianRole','MdFilterBaseDataIdToMulti',
'MdFilterByMultipleFieldValue','MdFilterBySon','MdFilterBySpecialField',
'MdFilterByStartsWithFieldValue','MdFilterInfiniteValue','MdFilterOneToMulti',
'MdYWHDDXFilter','SubTableIsContainValue','SubTableOneToOneFilter','TakeOutBaseDataOne',
'UpdateAccount','UpdateBillMoneyFunction','UpdateBillReferenceRelationshipFunction','UpdateBorrowMoneyState',
'UpdateImageInfoRefState','UpdatePaymentState','UpdateRalationBillValueFunction','MdStringMultiFilter','GetYqddBaseDataWithGroupField'].forEach((name) => {
formulaObject[name] = gen()
})
export default formulaObject
\ No newline at end of file
//获取当前单据附件的数量
export default {
execute:function(){
console.log("进入获取附件数量公式")
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
export default {
execute:function(){
console.log("s1 GetBaseDataWithCodes")
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
export default {
execute:function(){
console.log("s1 GetFwssBaseDataWithGroupField")
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
// 获取用户登录信息---后台公式
export default {
execute:function(){
console.log("进入“获取用户登录信息”前端公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 根据当前组织机构获取需要的区划级别字段
export default {
execute:function(){
console.log("根据当前组织机构获取需要的区划级别字段");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 获取当前登录组织机构名称
export default {
execute:function(){
console.log("进入获取当前登录组织机构名称");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 获取当前用户关联职员基础数据---后台公式
export default {
execute:function(){
console.log("进入根据用户获取部门基础数据前端公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 获取当前用户关联职员基础数据---后台公式
export default {
execute:function(){
console.log("进入获取当前用户关联职员基础数据前端公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 获取当前用户关联职员基础数据的某个字段---后台公式
export default {
execute:function(){
console.log("进入获取当前用户关联职员基础数据的某个字段前端公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
export default {
execute:function(){
console.log("s1 GetYqddBaseDataWithGroupField")
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
// 获得当前系统日期
export default {
execute:function(){
// if(arguments&&arguments[1]){
// let context = arguments[1];
// }
// let myDate = new Date();
// return myDate.toLocaleDateString();
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 判断当前用户是否包含角色 - 后端公式
export default {
execute:function(){
console.log("进入获取当前用户关联职员基础数据前端公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 通过基础数据指定字段的id过滤基础数据---后台公式
export default {
execute:function(){
console.log("进入基础数据指定字段的id过滤基础数据");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 通过基础数据指定字段的值过滤基础数据---后台公式
export default {
execute:function(){
console.log("进入“通过基础数据指定字段的多个值过滤基础数据”前端公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 根据基础数据某项值带出相关的数据
export default {
execute:function(){
console.log("进入获取当前登录组织机构名称");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 通过基础数据指定字段的值过滤基础数据---后台公式
export default {
execute:function(){
console.log("进入通过基础数据指定字段的值过滤基础数据前端公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 通过基础数据指定字段的前几位多个值过滤基础数据---后台公式
export default {
execute:function(){
console.log("进入“通过基础数据指定字段的前几位多个值过滤基础数据”前端公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 通过基础数据指定字段的值过滤基础数据无限参数版---后台公式
export default {
execute:function(){
console.log("通过基础数据指定字段的值过滤基础数据无限参数版");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 通过基础数据一对多过滤---后台公式
export default {
execute:function(){
console.log("进入通过基础数据通过基础数据一对多过滤---后台公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 通过基础数据字符串输入一对多过滤---后台公式
export default {
execute:function(){
console.log("进入通过基础数据字符串输入一对多过滤---后台公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 业务活动对象专用过滤---后台公式
export default {
execute:function(){
console.log("业务活动对象专用过滤---后台公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 子表中的某个字段是否等于某个值
export default {
execute:function(){
console.log("子表中的某个字段是否等于某个值");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 根据基础数据某项值带出相关的数据
export default {
execute:function(){
console.log("根据基础数据某项值带出相关的数据");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
// 根据基础数据某项值带出相关的数据
export default {
execute:function(){
console.log("进入获取当前登录组织机构名称");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
/*
* @Author: shi ZongLiang
* @Date: 2021-08-26 15:13:56
* @LastEditors: shi ZongLiang
* @Description: 更新出纳账户结余数
*/
export default {
execute:function(){
console.log("进入更新出纳账户结余数的公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
/**
* 修改引用的回写金额公式,例如还款单引用借款单后需要修改借款单的剩余金额
*/
export default {
execute: function () {
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
/**
* UpdateBillReferenceRelationshipFunction
* 修改单据引用状态
* @author fengjiansheng
* @date 2022-01-21
*/
export default {
execute: function () {
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
//借款单,报销单引用借款单后,点击保存修改删除的还款单引用的借款单状态
export default {
execute:function(){
console.log("借款单,报销单引用借款单后,点击保存修改删除的还款单引用的借款单状态");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
/**
* UpdateImageInfoRefState
* 更新票据引用状态
* @author fengjiansheng
* @date 2021-12-22
*/
export default {
execute: function () {
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
/**
* UpdatePaymentState
* 审批通过修改支付状态
* @author fengjiansheng
* @date 2021-12-28
*/
export default {
execute: function () {
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
// ---后台公式
export default {
execute:function(){
console.log("进入更新关联单据数据公式");
},
getResultType:function(){
return FMR.ConstDataTypes.General;
}
}
\ No newline at end of file
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