Merge branch 'positec' into dms
| | |
| | | execType -- 脚本传输方式,值为x时,启用AES加密 |
| | | SysNotice -- 是否开启系统消息 |
| | | updateStatus -- 是否更新开发状态,默认开启,当值为 false 时禁用 |
| | | forcedUpdate -- 传输号升级时,是否自动退出,格式为(YYYY-MM-DD),用于升级后刷新用户本地配置 |
| | | forcedUpdate -- 传输号升级时,是否自动退出,格式为(YYYY-MM-DD),用于升级后刷新用户本地配置 |
| | | errorLog -- 记录500、504时的报错日志,值为 true 时开启,业务系统有效 |
| | |
| | | placement: 'bottomRight', |
| | | duration: 15 |
| | | }) |
| | | if ([500, 504].includes(response.status) && error.config && error.config.url && error.config.data) { |
| | | window.mkInfo(error.config.url) |
| | | window.mkInfo(error.config.data) |
| | | if (window.GLOB.errorLog && !sessionStorage.getItem('local_error')) { |
| | | let urlReg = new RegExp('^(' + window.GLOB.baseurl + '|/)webapi/(exstars|dostars)', 'ig') |
| | | if (urlReg.test(error.config.url) && !/s_special_error_note_log/.test(error.config.url)) { |
| | | let res = null |
| | | try { |
| | | let data = JSON.parse(error.config.data) |
| | | if (!data.rduri) { |
| | | res = { |
| | | api_url: error.config.url, |
| | | error_code: response.status, |
| | | error_time: moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | api_param: error.config.data |
| | | } |
| | | } |
| | | } catch (e) { |
| | | res = null |
| | | } |
| | | if (res) { |
| | | sessionStorage.setItem('local_error', JSON.stringify(res)) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | return Promise.reject(response) |
| | |
| | | background: rgba(0, 0, 0, 0); |
| | | } |
| | | .ant-calendar-header .ant-calendar-prev-century-btn::before, .ant-calendar-header .ant-calendar-prev-decade-btn::before, .ant-calendar-header .ant-calendar-prev-year-btn::before, .ant-calendar-header .ant-calendar-prev-century-btn::after, .ant-calendar-header .ant-calendar-prev-decade-btn::after, .ant-calendar-header .ant-calendar-prev-year-btn::after { |
| | | border-color: rgba(0, 0, 0, 0.65)!important; |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | border-width: 2px 0 0 2px!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-next-century-btn::before, .ant-calendar-header .ant-calendar-next-decade-btn::before, .ant-calendar-header .ant-calendar-next-year-btn::before, .ant-calendar-header .ant-calendar-next-century-btn::after, .ant-calendar-header .ant-calendar-next-decade-btn::after, .ant-calendar-header .ant-calendar-next-year-btn::after { |
| | | border-color: rgba(0, 0, 0, 0.65)!important; |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | border-width: 2px 0 0 2px!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-next-century-btn:hover::before, .ant-calendar-header .ant-calendar-next-decade-btn:hover::before, .ant-calendar-header .ant-calendar-next-year-btn:hover::before, .ant-calendar-header .ant-calendar-next-century-btn:hover::after, .ant-calendar-header .ant-calendar-next-decade-btn:hover::after, .ant-calendar-header .ant-calendar-next-year-btn:hover::after { |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | border-color: rgba(0, 0, 0, 1)!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-prev-century-btn:hover::before, .ant-calendar-header .ant-calendar-prev-decade-btn:hover::before, .ant-calendar-header .ant-calendar-prev-year-btn:hover::before, .ant-calendar-header .ant-calendar-prev-century-btn:hover::after, .ant-calendar-header .ant-calendar-prev-decade-btn:hover::after, .ant-calendar-header .ant-calendar-prev-year-btn:hover::after { |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | border-color: rgba(0, 0, 0, 1)!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-prev-month-btn { |
| | | left: 35px!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-next-month-btn { |
| | | right: 35px!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-prev-month-btn::before, .ant-calendar-header .ant-calendar-prev-month-btn::after { |
| | | border-color: rgba(0, 0, 0, 0.65)!important; |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | border-width: 2px 0 0 2px!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-next-month-btn::before, .ant-calendar-header .ant-calendar-next-month-btn::after { |
| | | border-color: rgba(0, 0, 0, 0.65)!important; |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | border-width: 2px 0 0 2px!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-prev-month-btn:hover::before, .ant-calendar-header .ant-calendar-prev-month-btn:hover::after { |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | border-color: rgba(0, 0, 0, 1)!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-next-month-btn:hover::before, .ant-calendar-header .ant-calendar-next-month-btn:hover::after { |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | border-color: rgba(0, 0, 0, 1)!important; |
| | | } |
| | | |
| | | // 重置模态框滚动条 |
| | |
| | | } |
| | | } |
| | | }) |
| | | |
| | | if (sessionStorage.getItem('local_error')) { |
| | | try { |
| | | let param = JSON.parse(sessionStorage.getItem('local_error')) |
| | | setTimeout(() => { |
| | | Api.genericInterface({ |
| | | func: 's_special_error_note_log', |
| | | ...param |
| | | }).then(res => { |
| | | if (res.status) { |
| | | sessionStorage.removeItem('local_error') |
| | | } |
| | | }) |
| | | }, 3000) |
| | | } catch (e) { |
| | | sessionStorage.removeItem('local_error') |
| | | } |
| | | } |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | |
| | | if (_vals.length === new Set(_vals).size) { |
| | | m.hidden = true |
| | | } |
| | | } else if (!p.values.includes(_val)) { |
| | | } else if (p.values && !p.values.includes(_val)) { |
| | | m.hidden = true |
| | | } |
| | | }) |
| | |
| | | |
| | | GLOB.mainSystemApi = systemApi |
| | | } |
| | | |
| | | if (config.errorLog === 'true' && /#\/(login|main|billprint|docprint|tab|iframe|view|ssologin)/.test(window.location.href)) { |
| | | GLOB.errorLog = true |
| | | } |
| | | } |
| | | |
| | | if (/#\/hs$/.test(window.location.href)) { // hs下不打印脚本 |
| | |
| | | required: false, |
| | | linkField: 'datatype', |
| | | options: [ |
| | | {ParentID: '', value: 'static', label: '静态值'}, |
| | | {ParentID: 'dynamic', value: 'dynamic', label: '动态值'}, |
| | | {ParentID: 'dynamic', value: 'joint', label: '拼接值'}, |
| | | {ParentID: 'public', value: 'dynamic', label: '动态值'}, |
| | | {ParentID: '', value: 'static', label: '静态值'}, |
| | | {ParentID: 'dynamic', value: 'joint', label: '拼接值'}, |
| | | {ParentID: 'public', value: 'joint', label: '拼接值'}, |
| | | ], |
| | | forbid: subtype !== 'propcard' |
| | |
| | | type: 'select', |
| | | field: 'selStyle', |
| | | label: '选中风格', |
| | | initval: wrap.selStyle || 'active', |
| | | initval: wrap.selStyle || 'none', |
| | | tooltip: '存在边框时,边框会使用系统色。', |
| | | required: false, |
| | | options: [ |
| | |
| | | name: card.name, |
| | | subtype: card.subtype, |
| | | setting: { interType: 'system' }, |
| | | wrap: { name: card.name, width: card.width || 24, title: '', datatype: 'static' }, |
| | | wrap: { name: card.name, width: card.width || 24, title: '', datatype: 'static', cardType: 'radio' }, |
| | | style: { marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px' }, |
| | | headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }, |
| | | columns: [], |
| | |
| | | _fieldval.color = 'primary' |
| | | } |
| | | } |
| | | this.record.resetPageIndex = 'false' |
| | | if ([this.record.execSuccess, this.record.execError].includes('grid')) { |
| | | _fieldval.resetPageIndex = 'false' |
| | | } |
| | | } else if (value === 'audit') { |
| | | _fieldval.label = '审核' |
| | | _fieldval.Ot = 'required' |
| | |
| | | } else { |
| | | _fieldval.color = 'danger' |
| | | } |
| | | this.record.resetPageIndex = 'true' |
| | | if ([this.record.execSuccess, this.record.execError].includes('grid')) { |
| | | _fieldval.resetPageIndex = 'true' |
| | | } |
| | | } else if (value === 'custom') { |
| | | _fieldval.Ot = 'required' |
| | | } |
| | |
| | | field: 'selected', |
| | | label: '数据选中', |
| | | initval: wrap.selected || 'false', |
| | | tooltip: '初始化:数据加载时选中首行数据,仅执行一次。数据加载:每次数据加载时均选中首行(当按钮执行完成并返回主键值时,默认选中主键值对应行)。选中标记:返回数据中存在 selected 字段,且值为 true 的数据被选中。注:启用无人值守时无效。', |
| | | tooltip: '初始化:数据加载时选中首行数据,仅执行一次。数据加载:每次数据加载时均选中首行(当按钮执行完成并返回主键值时,默认选中主键值对应行)。选中标记:返回数据中存在 selected 字段,且值为 true 的数据被选中。本地记录:数据刷新时上次被选中的行将自动选中。注:启用无人值守时无效。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'false', label: '无'}, |
| | | {value: 'init', label: '初始化'}, |
| | | {value: 'always', label: '数据加载'}, |
| | | {value: 'sign', label: '选中标记'} |
| | | {value: 'sign', label: '选中标记'}, |
| | | {value: 'local', label: '本地记录'}, |
| | | ], |
| | | }, |
| | | { |
| | |
| | | |
| | | if (_card.mergeCol) { |
| | | let col = _card.cols[_card.mergeCol[0]] |
| | | _card.cols.splice(_card.mergeCol[0], 1, ...col.pops) |
| | | if (col.pops) { |
| | | _card.cols.splice(_card.mergeCol[0], 1, ...col.pops) |
| | | } |
| | | } |
| | | |
| | | if (_card.wrap.commit === 'simple') { |
| | |
| | | field: 'selected', |
| | | label: '数据选中', |
| | | initval: wrap.selected || 'false', |
| | | tooltip: '初始化:数据加载时选中首行数据,仅执行一次。数据加载:每次数据加载时均选中首行(当按钮执行完成并返回主键值时,默认选中主键值对应行)。选中标记:返回数据中存在 selected 字段,且值为 true 的数据被选中。', |
| | | tooltip: '初始化:数据加载时选中首行数据,仅执行一次。数据加载:每次数据加载时均选中首行(当按钮执行完成并返回主键值时,默认选中主键值对应行)。选中标记:返回数据中存在 selected 字段,且值为 true 的数据被选中。本地记录:数据刷新时上次被选中的行将自动选中。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'false', label: '无'}, |
| | | {value: 'init', label: '初始化'}, |
| | | {value: 'always', label: '数据加载'}, |
| | | {value: 'sign', label: '选中标记'} |
| | | {value: 'sign', label: '选中标记'}, |
| | | {value: 'local', label: '本地记录'}, |
| | | ], |
| | | }, |
| | | { |
| | |
| | | |
| | | if (r.custompage && setting.laypage === 'true' && _columns.findIndex(col => col.field === 'mk_total') === -1) { |
| | | if (config.subtype !== 'basetable') { |
| | | Modal.warning({ |
| | | title: `数据源或自定义脚本中使用自定义分页排序时,请在字段集中添加 mk_total。`, |
| | | const that = this |
| | | Modal.confirm({ |
| | | title: `数据源或自定义脚本中使用自定义分页排序时,字段集中需要添加 mk_total。`, |
| | | okText: '知道了', |
| | | cancelText: '添加', |
| | | onOk: () => { |
| | | reject() |
| | | }, |
| | | onCancel() { |
| | | let item = { |
| | | field: 'mk_total', |
| | | label: 'mk_total', |
| | | datatype: 'Int', |
| | | uuid: Utils.getuuid() |
| | | } |
| | | |
| | | that.setState({ columns: [item, ...columns] }) |
| | | reject() |
| | | } |
| | | }) |
| | | return |
| | |
| | | this.props.refreshdata({pageIndex}) |
| | | } |
| | | |
| | | mkCheckTopLine = (menuId, id, selected) => { |
| | | mkCheckTopLine = (menuId, id, selected, orikeys) => { |
| | | const { MenuID, data, setting } = this.props |
| | | |
| | | if (MenuID !== menuId) return |
| | |
| | | index = i |
| | | } |
| | | }) |
| | | } else if (selected === 'local') { |
| | | if (orikeys && orikeys.length) { |
| | | data.forEach((item, i) => { |
| | | if (!item.$disabled && orikeys.includes(item.$$uuid)) { |
| | | items.push(item) |
| | | keys.push(i) |
| | | index = i |
| | | } |
| | | }) |
| | | } |
| | | } else if (selected !== 'false') { |
| | | if (!data[0].$disabled) { |
| | | index = 0 |
| | |
| | | |
| | | let setting = {..._config.setting, ..._config.wrap} |
| | | |
| | | if (setting.selected !== 'always' && setting.selected !== 'init' && setting.selected !== 'sign') { |
| | | if (!['always', 'init', 'sign', 'local'].includes(setting.selected)) { |
| | | setting.selected = 'false' |
| | | } |
| | | |
| | |
| | | if (result.status) { |
| | | if (result.$requestId && this.requestId !== result.$requestId) return |
| | | |
| | | if (repage === 'false' && result.data.length === 0 && pageIndex > 1) { |
| | | if (result.data.length === 0 && pageIndex > 1) { |
| | | this.reloadIndex() |
| | | return |
| | | } |
| | |
| | | } |
| | | |
| | | if (data.length && (id || setting.selected !== 'false')) { |
| | | let keys = null |
| | | if (setting.selected === 'local') { |
| | | keys = this.state.selectedData.map(cell => cell.$$uuid) |
| | | } |
| | | setTimeout(() => { |
| | | MKEmitter.emit('mkCheckTopLine', config.uuid, id, setting.selected) |
| | | MKEmitter.emit('mkCheckTopLine', config.uuid, id, setting.selected, keys) |
| | | }, 200) |
| | | } else { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, '', '') // 广播数据切换 |
| | |
| | | |
| | | let setting = {..._config.setting, ..._config.wrap} |
| | | |
| | | if (setting.selected !== 'always' && setting.selected !== 'init' && setting.selected !== 'sign') { |
| | | if (!['always', 'init', 'sign', 'local'].includes(setting.selected)) { |
| | | setting.selected = 'false' |
| | | } |
| | | |
| | |
| | | Api.writeCacheConfig(config.uuid, result.data || [], BID) |
| | | } |
| | | |
| | | if (repage === 'false' && result.data.length === 0 && pageIndex > 1) { |
| | | if (result.data.length === 0 && pageIndex > 1) { |
| | | this.reloadIndex() |
| | | return |
| | | } |
| | |
| | | } |
| | | |
| | | if (data.length && (id || setting.selected !== 'false')) { |
| | | let keys = null |
| | | if (setting.selected === 'local') { |
| | | keys = this.state.selectedData.map(cell => cell.$$uuid) |
| | | } |
| | | setTimeout(() => { |
| | | MKEmitter.emit('mkCheckTopLine', config.uuid, id, setting.selected) |
| | | MKEmitter.emit('mkCheckTopLine', config.uuid, id, setting.selected, keys) |
| | | }, 200) |
| | | } else { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, '', '') // 广播数据切换 |
| | |
| | | const { btn } = this.props |
| | | |
| | | let callback = null |
| | | let printReject = null |
| | | let skip = false |
| | | let send = false |
| | | |
| | | let data = fromJS({ |
| | | data: printlist, |
| | | form: formdata |
| | | }).toJS() |
| | | |
| | | if (!window.GLOB.errorLog) { |
| | | printReject = (msg) => { |
| | | if (send) return |
| | | |
| | | send = true |
| | | data.message = msg |
| | | |
| | | window.mkInfo(JSON.stringify(data)) |
| | | } |
| | | } else { |
| | | printReject = (msg) => { |
| | | if (send) return |
| | | |
| | | send = true |
| | | data.message = msg |
| | | |
| | | let param = { |
| | | func: 's_special_error_note_log', |
| | | api_url: btn.logLabel, |
| | | error_code: 507, |
| | | error_time: moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | api_param: JSON.stringify(data) |
| | | } |
| | | Api.genericInterface(param) |
| | | } |
| | | } |
| | | |
| | | if (/callback\(\)/.test(btn.verify.printFunc)) { |
| | | callback = () => { |
| | | if (skip) return |
| | | skip = true |
| | | |
| | | this.execSuccess({ |
| | | ErrCode: '-1', |
| | | message: '', |
| | |
| | | |
| | | try { |
| | | // eslint-disable-next-line |
| | | let func = new Function('data', 'form', 'printer', 'notification', 'Api', 'systemType', 'callback', btn.verify.printFunc) |
| | | func(printlist, formdata, btn.verify, notification, Api, window.GLOB.systemType, callback) |
| | | let func = new Function('data', 'form', 'printer', 'notification', 'Api', 'systemType', 'callback', 'printReject', btn.verify.printFunc) |
| | | func(printlist, formdata, btn.verify, notification, Api, window.GLOB.systemType, callback, printReject) |
| | | |
| | | // 自定义打印示例 |
| | | // let defaultPrinter = printer.defaultPrinter || 'lackprinter' |
| | |
| | | message: window.GLOB.dict['func_error'] || '自定义函数执行错误!', |
| | | duration: 5 |
| | | }) |
| | | |
| | | printReject(window.GLOB.dict['func_error'] || '自定义函数执行错误!') |
| | | } |
| | | } |
| | | |
| | |
| | | const { btn } = this.props |
| | | const { dict } = this.state |
| | | |
| | | let printReject = null |
| | | let send = false |
| | | |
| | | let data = fromJS({ |
| | | data: list, |
| | | template: template |
| | | }).toJS() |
| | | |
| | | if (!window.GLOB.errorLog) { |
| | | printReject = (msg) => { |
| | | if (send) return |
| | | |
| | | send = true |
| | | data.message = msg |
| | | |
| | | window.mkInfo(JSON.stringify(data)) |
| | | } |
| | | } else { |
| | | printReject = (msg) => { |
| | | if (send) return |
| | | |
| | | send = true |
| | | data.message = msg |
| | | |
| | | let param = { |
| | | func: 's_special_error_note_log', |
| | | api_url: btn.logLabel, |
| | | error_code: 507, |
| | | error_time: moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | api_param: JSON.stringify(data) |
| | | } |
| | | Api.genericInterface(param) |
| | | } |
| | | } |
| | | |
| | | let _errors = [] |
| | | |
| | | let defaultPrinter = btn.verify.defaultPrinter || 'lackprinter' |
| | |
| | | message: data.message, |
| | | status: false |
| | | }) |
| | | |
| | | printReject(data.message) |
| | | } |
| | | } |
| | | |
| | |
| | | } else if (['mk_address'].includes(s)) { |
| | | decSql.push(`@mk_address nvarchar(100)`) |
| | | } else if (['mk_deleted'].includes(s)) { |
| | | secSql.push(`@mk_deleted int`) |
| | | decSql.push(`@mk_deleted int`) |
| | | } else { |
| | | decSql.push(`@${s} nvarchar(50)`) |
| | | } |
| | |
| | | } |
| | | |
| | | item.urlkeys && item.urlkeys.forEach(key => { |
| | | if (values.hasOwnProperty(key.toLowerCase())) return |
| | | |
| | | values[key] = item.urlparam[key] |
| | | }) |
| | | |