| | |
| | | 模板类型: |
| | | <div>日常支出<DownOutlined/></div> |
| | | </div> |
| | | <Button className="out-background header-btn">关闭</Button> |
| | | <Button className="add-background header-btn">保存</Button> |
| | | <Button className="close-temp header-btn">关闭</Button> |
| | | <Button className="save-temp header-btn">保存</Button> |
| | | </div> : null} |
| | | <VoucherTable config={card}/> |
| | | {card.wrap.type === 'createVoucher' || card.wrap.type === 'checkVoucher' ? <div className="user">制单人:</div> : null} |
| | |
| | | border-color: rgb(50, 197, 210); |
| | | color: #ffffff; |
| | | } |
| | | .save-temp { |
| | | background-color: #1890ff; |
| | | border-color: #1890ff; |
| | | color: #ffffff; |
| | | } |
| | | .close-temp { |
| | | background-color: #ffffff; |
| | | border-color: #f5222d; |
| | | color: #f5222d; |
| | | } |
| | | |
| | | .system-background { |
| | | background: #1890ff; |
| | |
| | | } |
| | | }) |
| | | |
| | | let menulist = sessionStorage.getItem('fstMenuList') |
| | | if (menulist) { |
| | | try { |
| | | menulist = JSON.parse(menulist) |
| | | } catch (e) { |
| | | menulist = [] |
| | | } |
| | | } else { |
| | | menulist = [] |
| | | } |
| | | |
| | | modules = modules.filter(item => !bookids.includes(item.value)) |
| | | |
| | | const wrapForm = [ |
| | |
| | | tooltip: '表格主体部分两端的空白距离,表格在编辑时两端会有添加和删除图标。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | field: 'linkmenu', |
| | | label: '刷新菜单', |
| | | initval: wrap.linkmenu || [], |
| | | tooltip: '点击关闭时需要刷新的菜单。', |
| | | required: false, |
| | | options: menulist |
| | | } |
| | | ] |
| | | |
| | | return wrapForm |
| | |
| | | config: fromJS(config).toJS(), |
| | | btn: fromJS(btn).toJS() |
| | | }) |
| | | |
| | | window.GLOB.formId = '' |
| | | } |
| | | |
| | | handleBack = () => { |
| | |
| | | |
| | | return ( |
| | | <div className="menu-account-wrap" style={config.style}> |
| | | {config.wrap.MenuID ? <Select value={activeItem ? activeItem.id : ''} placeholder="请选择账套" onChange={this.changeBook} dropdownRender={menu => ( |
| | | {config.wrap.MenuID ? <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} value={activeItem ? activeItem.id : ''} placeholder="请选择账套" onChange={this.changeBook} dropdownRender={menu => ( |
| | | <div> |
| | | {menu} |
| | | <Divider style={{ margin: '4px 0' }} /> |
| | |
| | | </div> |
| | | )}> |
| | | {books.map(item => ( |
| | | <Option disabled={!item.months} key={item.id}>{item.account_name}</Option> |
| | | <Option key={item.id}>{item.account_name}</Option> |
| | | ))} |
| | | </Select> : <Select value={activeItem ? activeItem.id : ''} disabled={config.wrap.readonly === 'true'} placeholder="请选择账套" onChange={this.changeBook}> |
| | | </Select> : <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} value={activeItem ? activeItem.id : ''} disabled={config.wrap.readonly === 'true'} placeholder="请选择账套" onChange={this.changeBook}> |
| | | {books.map(item => ( |
| | | <Option disabled={!item.months} key={item.id}>{item.account_name}</Option> |
| | | <Option key={item.id}>{item.account_name}</Option> |
| | | ))} |
| | | </Select>} |
| | | {activeItem ? <span className="date">{activeItem.date}</span> : null} |
| | |
| | | let employee = [] |
| | | let cash_flow = [] |
| | | let others = [] |
| | | let logistics = [] |
| | | let lessor = [] |
| | | |
| | | res.sup && res.sup.forEach(item => { |
| | | names[item.sup_type_code] = item.sup_type_name |
| | |
| | | |
| | | res.supplier && res.supplier.forEach(item => { |
| | | supplier.push({value: item.suppliercode, label: item.suppliername}) |
| | | }) |
| | | |
| | | res.logistics && res.logistics.forEach(item => { |
| | | logistics.push({value: item.suppliercode, label: item.suppliername}) |
| | | }) |
| | | |
| | | res.lessor && res.lessor.forEach(item => { |
| | | lessor.push({value: item.suppliercode, label: item.suppliername}) |
| | | }) |
| | | |
| | | res.customer && res.customer.forEach(item => { |
| | |
| | | subjects: res.subjects || [], |
| | | names: names, |
| | | supplier: supplier, |
| | | logistics: logistics, |
| | | lessor: lessor, |
| | | customer: customer, |
| | | department: department, |
| | | project: project, |
| | |
| | | } else if (line.sup_accounting && line.supAccounts) { |
| | | line.supAccounts.forEach(item => { |
| | | if (item.sup_acc_type === 'supplier') { |
| | | if (!item.suppliercode || !item.suppliername) { |
| | | err = `第${_index}行,请选择辅助核算。` |
| | | } |
| | | } else if (item.sup_acc_type === 'logistics') { |
| | | if (!item.suppliercode || !item.suppliername) { |
| | | err = `第${_index}行,请选择辅助核算。` |
| | | } |
| | | } else if (item.sup_acc_type === 'lessor') { |
| | | if (!item.suppliercode || !item.suppliername) { |
| | | err = `第${_index}行,请选择辅助核算。` |
| | | } |
| | |
| | | } else if (line.sup_accounting && line.supAccounts) { |
| | | line.supAccounts.forEach(item => { |
| | | if (item.sup_acc_type === 'supplier') { |
| | | if (!item.suppliercode || !item.suppliername) { |
| | | err = `第${_index}行,请选择辅助核算。` |
| | | } |
| | | } else if (item.sup_acc_type === 'logistics') { |
| | | if (!item.suppliercode || !item.suppliername) { |
| | | err = `第${_index}行,请选择辅助核算。` |
| | | } |
| | | } else if (item.sup_acc_type === 'lessor') { |
| | | if (!item.suppliercode || !item.suppliername) { |
| | | err = `第${_index}行,请选择辅助核算。` |
| | | } |
| | |
| | | triggerclose = () => { |
| | | const { config, status } = this.state |
| | | |
| | | let tabId = '' |
| | | if (config.wrap.linkmenu && config.wrap.linkmenu.length > 0) { |
| | | tabId = config.wrap.linkmenu[config.wrap.linkmenu.length - 1] |
| | | } |
| | | |
| | | if (status === 'change') { |
| | | confirm({ |
| | | content: '内容已变更,确定要关闭吗?', |
| | | onOk() { |
| | | MKEmitter.emit('closeTabView', config.$pageId) |
| | | if (tabId) { |
| | | MKEmitter.emit('reloadMenuView', tabId, 'table') |
| | | } |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } else { |
| | | MKEmitter.emit('closeTabView', config.$pageId) |
| | | if (tabId) { |
| | | MKEmitter.emit('reloadMenuView', tabId, 'table') |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | </Select> |
| | | </div> |
| | | <div className="temp-action"> |
| | | <Button className="add-background header-btn" onClick={() => this.triggerTempsave()}>保存</Button> |
| | | <Button className="out-background header-btn" onClick={this.triggerclose}>关闭</Button> |
| | | <Button className="save-temp header-btn" onClick={() => this.triggerTempsave()}>保存</Button> |
| | | <Button className="close-temp header-btn" onClick={this.triggerclose}>关闭</Button> |
| | | </div> |
| | | </div> : null} |
| | | <VoucherTable config={config} loading={loading} data={data} onChange={this.dataChange}/> |
| | |
| | | color: #ffffff; |
| | | } |
| | | |
| | | .save-temp { |
| | | background-color: var(--mk-sys-color); |
| | | border-color: var(--mk-sys-color); |
| | | color: #ffffff; |
| | | } |
| | | .close-temp { |
| | | background-color: #ffffff; |
| | | border-color: #f5222d; |
| | | color: #f5222d; |
| | | } |
| | | |
| | | .system-background { |
| | | background: var(--mk-sys-color); |
| | | border-color: var(--mk-sys-color); |
| | |
| | | let account = {} |
| | | |
| | | subAccounts.forEach(item => { |
| | | if (item.field === 'supplier') { |
| | | if (item.field === 'supplier' || item.field === 'logistics' || item.field === 'lessor') { |
| | | account[item.field] = {suppliercode: item.value, suppliername: item.name} |
| | | } else if (item.field === 'customer') { |
| | | account[item.field] = {customercode: item.value, customername: item.name} |
| | |
| | | |
| | | if (record.sup_accounting && record.supAccounts) { |
| | | record.supAccounts.forEach(item => { |
| | | if (item.sup_acc_type === 'supplier') { |
| | | if (item.sup_acc_type === 'supplier' || item.sup_acc_type === 'logistics' || item.sup_acc_type === 'lessor') { |
| | | val += item.suppliercode ? '_' + item.suppliercode + ' ' + item.suppliername : '' |
| | | } else if (item.sup_acc_type === 'customer') { |
| | | val += item.customercode ? '_' + item.customercode + ' ' + item.customername : '' |
| | |
| | | const _locale = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS |
| | | |
| | | class Main extends Component { |
| | | state = {} |
| | | state = { |
| | | userId: sessionStorage.getItem('UserID') |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | if (!this.state.userId) { |
| | | this.props.history.replace('/login') |
| | | } |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('resetSelectLine', this.resetParentParam) |
| | |
| | | |
| | | render () { |
| | | const navBar = window.GLOB.navBar |
| | | |
| | | |
| | | if (!this.state.userId) return null |
| | | |
| | | return ( |
| | | <div className="mk-main-view"> |
| | | <ConfigProvider locale={_locale}> |
| | |
| | | }) |
| | | |
| | | setTimeout(() => { |
| | | if (config.enabled && this.verifyConfig()) { |
| | | let _pass = this.verifyConfig(config) |
| | | |
| | | if (config.enabled && !_pass) { |
| | | config.enabled = false |
| | | config.force = true |
| | | } else if (!config.enabled && config.force && _pass) { |
| | | config.enabled = true |
| | | delete config.force |
| | | } |
| | | |
| | | if (config.cacheUseful !== 'true') { |
| | |
| | | onEnabledChange = () => { |
| | | const { config } = this.state |
| | | |
| | | if (!config || (!config.enabled && this.verifyConfig(true))) { |
| | | return |
| | | } |
| | | let _config = {...config, enabled: !config.enabled} |
| | | |
| | | this.setState({ |
| | | config: {...config, enabled: !config.enabled} |
| | | }) |
| | | delete _config.force |
| | | |
| | | if (!_config.enabled) { |
| | | this.setState({ |
| | | config: _config |
| | | }) |
| | | } else if (this.verifyConfig(_config)) { |
| | | this.setState({ |
| | | config: _config |
| | | }) |
| | | } |
| | | } |
| | | |
| | | verifyConfig = (show) => { |
| | | const { config, MenuType } = this.state |
| | | verifyConfig = (config) => { |
| | | const { MenuType } = this.state |
| | | let error = '' |
| | | |
| | | let check = (components) => { |
| | |
| | | |
| | | check(config.components) |
| | | |
| | | if (show && error) { |
| | | if (config.enabled && error) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: error, |
| | |
| | | } |
| | | }) |
| | | |
| | | if (show && error) { |
| | | if (config.enabled && error) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: error, |
| | |
| | | } |
| | | } |
| | | |
| | | return error |
| | | return error === '' |
| | | } |
| | | |
| | | // 更新配置信息 |
| | |
| | | <PictureController/> |
| | | <StyleCombControlButton menu={config} /> |
| | | <PasteController insert={this.insert} /> |
| | | <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config && config.enabled} onChange={this.onEnabledChange} /> |
| | | {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null} |
| | | <Button type="primary" id="save-config" className={needUpdate ? 'update-tip' : ''} onClick={this.submitConfig} loading={menuloading}>保存</Button> |
| | | <Button type="default" onClick={this.closeView}>关闭</Button> |
| | | </div> |
| | |
| | | return |
| | | } |
| | | |
| | | if (config.enabled && this.verifyConfig()) { |
| | | let _pass = this.verifyConfig(config) |
| | | |
| | | if (config.enabled && !_pass) { |
| | | config.enabled = false |
| | | config.force = true |
| | | } else if (!config.enabled && config.force && _pass) { |
| | | config.enabled = true |
| | | delete config.force |
| | | } |
| | | |
| | | this.getMenuMessage(config) |
| | |
| | | onEnabledChange = () => { |
| | | const { config } = this.state |
| | | |
| | | if (!config.enabled && this.verifyConfig(true)) { |
| | | return |
| | | } |
| | | let _config = {...config, enabled: !config.enabled} |
| | | |
| | | this.setState({ |
| | | config: {...config, enabled: !config.enabled} |
| | | }) |
| | | delete _config.force |
| | | |
| | | if (!_config.enabled) { |
| | | this.setState({ |
| | | config: _config |
| | | }) |
| | | } else if (this.verifyConfig(_config)) { |
| | | this.setState({ |
| | | config: _config |
| | | }) |
| | | } |
| | | } |
| | | |
| | | verifyConfig = (show) => { |
| | | const { config } = this.state |
| | | verifyConfig = (config) => { |
| | | let error = '' |
| | | |
| | | let check = (components) => { |
| | |
| | | |
| | | check(config.components) |
| | | |
| | | if (show && error) { |
| | | if (config.enabled && error) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: error, |
| | |
| | | }) |
| | | } |
| | | |
| | | return error |
| | | return error === '' |
| | | } |
| | | |
| | | // 更新配置信息 |
| | |
| | | }) |
| | | |
| | | setTimeout(() => { |
| | | if (config.enabled && this.verifyConfig()) { |
| | | let _pass = this.verifyConfig(config) |
| | | |
| | | if (config.enabled && !_pass) { |
| | | config.enabled = false |
| | | config.force = true |
| | | } else if (!config.enabled && config.force && _pass) { |
| | | config.enabled = true |
| | | delete config.force |
| | | } |
| | | |
| | | if (config.cacheUseful !== 'true') { |
| | |
| | | onEnabledChange = () => { |
| | | const { config } = this.state |
| | | |
| | | if (!config || (!config.enabled && this.verifyConfig(true))) { |
| | | return |
| | | } |
| | | let _config = {...config, enabled: !config.enabled} |
| | | |
| | | this.setState({ |
| | | config: {...config, enabled: !config.enabled} |
| | | }) |
| | | delete _config.force |
| | | |
| | | if (!_config.enabled) { |
| | | this.setState({ |
| | | config: _config |
| | | }) |
| | | } else if (this.verifyConfig(_config)) { |
| | | this.setState({ |
| | | config: _config |
| | | }) |
| | | } |
| | | } |
| | | |
| | | verifyConfig = (show) => { |
| | | const { config } = this.state |
| | | verifyConfig = (config) => { |
| | | let error = '' |
| | | let searchSum = 0 |
| | | let swipes = [] |
| | |
| | | } |
| | | } |
| | | |
| | | if (show && error) { |
| | | if (config.enabled && error) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: error, |
| | |
| | | }) |
| | | } |
| | | |
| | | return error |
| | | return error === '' |
| | | } |
| | | |
| | | // 更新配置信息 |
| | |
| | | </div> |
| | | <div className="wrap"> |
| | | <Button type="primary" className={needUpdate ? 'update-tip' : ''} onClick={this.submitConfig} id="save-config" loading={menuloading}>保存</Button> |
| | | <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config && config.enabled} onChange={this.onEnabledChange} /> |
| | | {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null} |
| | | <ArrowLeftOutlined title="后退" className="back-view" onClick={this.backView}/> |
| | | <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button> |
| | | <CreateView resetmenu={this.getAppMenus} /> |
| | |
| | | return |
| | | } |
| | | |
| | | if (config.enabled && this.verifyConfig()) { |
| | | let _pass = this.verifyConfig(config) |
| | | |
| | | if (config.enabled && !_pass) { |
| | | config.enabled = false |
| | | config.force = true |
| | | } else if (!config.enabled && config.force && _pass) { |
| | | config.enabled = true |
| | | delete config.force |
| | | } |
| | | |
| | | this.getMenuMessage(config) |
| | |
| | | onEnabledChange = () => { |
| | | const { config } = this.state |
| | | |
| | | if (!config.enabled && this.verifyConfig(true)) { |
| | | return |
| | | } |
| | | let _config = {...config, enabled: !config.enabled} |
| | | |
| | | this.setState({ |
| | | config: {...config, enabled: !config.enabled} |
| | | }) |
| | | delete _config.force |
| | | |
| | | if (!_config.enabled) { |
| | | this.setState({ |
| | | config: _config |
| | | }) |
| | | } else if (this.verifyConfig(_config)) { |
| | | this.setState({ |
| | | config: _config |
| | | }) |
| | | } |
| | | } |
| | | |
| | | verifyConfig = (show) => { |
| | | const { config } = this.state |
| | | verifyConfig = (config) => { |
| | | let error = '' |
| | | |
| | | let check = (components) => { |
| | |
| | | |
| | | check(config.components) |
| | | |
| | | if (show && error) { |
| | | if (config.enabled && error) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: error, |
| | |
| | | }) |
| | | } |
| | | |
| | | return error |
| | | return error === '' |
| | | } |
| | | |
| | | // 更新配置信息 |
| | |
| | | }) |
| | | |
| | | setTimeout(() => { |
| | | if (config.enabled && this.verifyConfig()) { |
| | | let _pass = this.verifyConfig(config) |
| | | |
| | | if (config.enabled && !_pass) { |
| | | config.enabled = false |
| | | config.force = true |
| | | } else if (!config.enabled && config.force && _pass) { |
| | | config.enabled = true |
| | | delete config.force |
| | | } |
| | | |
| | | if (config.cacheUseful !== 'true') { |
| | |
| | | onEnabledChange = () => { |
| | | const { config } = this.state |
| | | |
| | | if (!config || (!config.enabled && this.verifyConfig(true))) { |
| | | return |
| | | } |
| | | let _config = {...config, enabled: !config.enabled} |
| | | |
| | | this.setState({ |
| | | config: {...config, enabled: !config.enabled} |
| | | }) |
| | | delete _config.force |
| | | |
| | | if (!_config.enabled) { |
| | | this.setState({ |
| | | config: _config |
| | | }) |
| | | } else if (this.verifyConfig(_config)) { |
| | | this.setState({ |
| | | config: _config |
| | | }) |
| | | } |
| | | } |
| | | |
| | | verifyConfig = (show) => { |
| | | const { config } = this.state |
| | | verifyConfig = (config) => { |
| | | let error = '' |
| | | |
| | | let check = (components) => { |
| | |
| | | |
| | | check(config.components) |
| | | |
| | | if (show && error) { |
| | | if (config.enabled && error) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: error, |
| | |
| | | }) |
| | | } |
| | | |
| | | return error |
| | | return error === '' |
| | | } |
| | | |
| | | // 更新配置信息 |
| | |
| | | </div> |
| | | <div className="wrap"> |
| | | <Button type="primary" className={needUpdate ? 'update-tip' : ''} id="save-config" onClick={this.submitConfig} loading={menuloading}>保存</Button> |
| | | <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config && config.enabled} onChange={this.onEnabledChange} /> |
| | | {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null} |
| | | <ArrowLeftOutlined title="后退" className="back-view" onClick={this.backView}/> |
| | | <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button> |
| | | <CreateView resetmenu={this.getAppMenus} /> |
| | |
| | | }) |
| | | |
| | | setTimeout(() => { |
| | | if (config.enabled && this.verifyConfig()) { |
| | | let _pass = this.verifyConfig(config) |
| | | |
| | | if (config.enabled && !_pass) { |
| | | config.enabled = false |
| | | config.force = true |
| | | } else if (!config.enabled && config.force && _pass) { |
| | | config.enabled = true |
| | | delete config.force |
| | | } |
| | | |
| | | let tbs = [] |
| | |
| | | onEnabledChange = () => { |
| | | const { config } = this.state |
| | | |
| | | if (!config || (!config.enabled && this.verifyConfig(true))) { |
| | | return |
| | | } |
| | | let _config = {...config, enabled: !config.enabled} |
| | | |
| | | this.setState({ |
| | | config: {...config, enabled: !config.enabled} |
| | | }) |
| | | delete _config.force |
| | | |
| | | if (!_config.enabled) { |
| | | this.setState({ |
| | | config: _config |
| | | }) |
| | | } else if (this.verifyConfig(_config)) { |
| | | this.setState({ |
| | | config: _config |
| | | }) |
| | | } |
| | | } |
| | | |
| | | verifyConfig = (show) => { |
| | | const { config } = this.state |
| | | verifyConfig = (config) => { |
| | | let error = '' |
| | | |
| | | config.components.forEach(item => { |
| | |
| | | } |
| | | } |
| | | |
| | | if (show && error) { |
| | | if (config.enabled && error) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: error, |
| | |
| | | }) |
| | | } |
| | | |
| | | return error |
| | | return error === '' |
| | | } |
| | | |
| | | // 更新配置信息 |
| | |
| | | <TableNodes config={config} /> |
| | | <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> |
| | | <PasteBaseTable type="page" insert={this.insert}/> |
| | | <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config && config.enabled} onChange={this.onEnabledChange} /> |
| | | {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null} |
| | | <Button type="primary" id="save-config" onClick={this.submitConfig} loading={menuloading}>保存</Button> |
| | | <Button type="default" onClick={this.closeView}>关闭</Button> |
| | | </div> |