SetControlDisable.js 729 Bytes
Newer Older
wangcong committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
export default {
  /**
   * @author cy
   * 动态表单控件只读公式
   * @param
   * 参数一 组件标识
   * 参数二 状态 0 表示可编辑 1表示只读
   */
  execute: function () {
    const bill = arguments[1]
    const targetControl = arguments[0][0].StaticValue.split(',')
    const disableStatus = arguments[0][1].StaticValue
    const subTableName = arguments[0][2].StaticValue
    if (bill) {
      targetControl.forEach(item => {
        if (subTableName) {
          bill.setSubTableDisable(subTableName, item, disableStatus)
        } else {
          bill.setControlDiable(item, disableStatus)
        }
      })
    }
  },
  getResultType: function () {
    return FMR.ConstDataTypes.General;
  },
}