/*pmFWCFu5nhKkBzYmrkBaka23LzwyeVw+yP0Qu3SWeVg=*/ import { logicalOpenBill } from './logicalEvents' export default function ({ createUIDom, meta: { setMeta }, table: { setTableRender }, search: { getSearchValByField }, button: { createErrorButton, createOprationButton, setButtons} }) { const _this = this createUIDom({ pagecode: '701004SPJK_L', appcode: '701004SPJK' }, function ({ template, button }) { template.approvalMonitoringList.pagination = true let idx = -1, len = template.approvalMonitoringList.items.length while (++idx < len) { let item = template.approvalMonitoringList.items[idx] if (item.attrcode.indexOf('.') > -1) item.attrcode = item.attrcode.split('.')[1] } // 查询区参照过滤 template.approvalMonitoringSearchArea.items.map( (one, index) => { if (one.attrcode.indexOf('billtype') > -1) { // 单据类型 one.refcode = `/uap/refer/riart/billtype/index.js` one.queryCondition = () => ({ GridRefActionExt: 'nccloud.web.ssctp.sscbd.ref.sqlbuilder.BilltypeRefSqlBuilder' }) } else if (one.attrcode.indexOf('pk_org') > -1) { // 报账单位 one.queryCondition = () => ({ TreeRefActionExt: 'nccloud.web.ssctp.report.sqlbuilder.OrgRefBuilder', pk_sscunit: _this.props.search.getSearchValByField('approvalMonitoringSearchArea', 'pk_currenttask.pk_sscunit').value.firstvalue, isMutiGroup: 'Y', }) } else if (one.attrcode.indexOf('pk_sscunit') > -1) { // 共享中心 one.queryCondition = () => ({ isNeedPerm: 'N' // 是否受当前登录用户的集团数据权限控制 }) } } ); //增加按钮退出人工处理 setButtons(button); let event = { label: _this.state.multiLang['701001RWCL-0060'], itemtype: 'customer', className: 'opr', attrcode: 'opr', visible: true, width: '125px', fixed: 'right', render: (text, record, index) => { return createErrorButton({ record: record, sucessCallBack: () => { return createOprationButton(['ManualReturn'], { area: "approvalMonitoringList", buttonLimit: 3, onButtonClick: (props, btnKey) => { _this.selectedRow = record; _this.selectedIdx = index; _this.headerBtnClick() } }) } }) } }; template.approvalMonitoringList.items.push(event); setMeta(template); // 单据号列自定义 setTableRender('approvalMonitoringList', "billno", (text, record, index) => { return ( logicalOpenBill.call(_this, record)} >{record.billno.value} ) }) setTableRender('approvalMonitoringList', "resultsflag", (text, record, index) => { return ( record.resultsflag.value === 'Y' ? : ) }) }); } /*pmFWCFu5nhKkBzYmrkBaka23LzwyeVw+yP0Qu3SWeVg=*/