| | |
| | | this.setState({ |
| | | subAccounts: fromJS(this.state.subAccounts).toJS().map(cell => { |
| | | if (key === cell.field) { |
| | | cell.value = option.props.value |
| | | cell.name = option.props.name |
| | | cell.value = option ? option.props.value : '' |
| | | cell.name = option ? option.props.name : '' |
| | | } |
| | | return cell |
| | | }) |
| | |
| | | extra = <PlusOutlined onClick={this.plusLine}/> |
| | | |
| | | if (editing) { |
| | | let options = ['现金', '发票'] |
| | | let options = localStorage.getItem(window.GLOB.host + '_voucher_extract') |
| | | options = options ? JSON.parse(options) : [] |
| | | |
| | | children = <AutoComplete |
| | | dataSource={options.map((cell, i) => <AutoComplete.Option value={cell} key={i}> |
| | | {cell} |
| | |
| | | if (record.sup_accounting && record.supAccounts) { |
| | | record.supAccounts.forEach(item => { |
| | | if (item.sup_acc_type === 'supplier') { |
| | | val += item.suppliercode ? '_' + item.suppliercode : '' |
| | | val += item.suppliercode ? '_' + item.suppliercode + ' ' + item.suppliername : '' |
| | | } else if (item.sup_acc_type === 'customer') { |
| | | val += item.customercode ? '_' + item.customercode : '' |
| | | val += item.customercode ? '_' + item.customercode + ' ' + item.customername : '' |
| | | } else if (item.sup_acc_type === 'department') { |
| | | val += item.co_pro_code ? '_' + item.co_pro_code : '' |
| | | val += item.co_pro_code ? '_' + item.co_pro_code + ' ' + item.co_pro_name : '' |
| | | } else if (item.sup_acc_type === 'project') { |
| | | val += item.projectcode ? '_' + item.projectcode : '' |
| | | val += item.projectcode ? '_' + item.projectcode + ' ' + item.projectname : '' |
| | | } else if (item.sup_acc_type === 'inventory') { |
| | | val += item.productcode ? '_' + item.productcode : '' |
| | | val += item.productcode ? '_' + item.productcode + ' ' + item.productname : '' |
| | | } else if (item.sup_acc_type === 'employee') { |
| | | val += item.workercode ? '_' + item.workercode : '' |
| | | val += item.workercode ? '_' + item.workercode + ' ' + item.workername : '' |
| | | } else if (item.sup_acc_type === 'cash_flow') { |
| | | val += item.cash_flow_code ? '_' + item.cash_flow_code : '' |
| | | val += item.cash_flow_code ? '_' + item.cash_flow_code + ' ' + item.cash_flow_name : '' |
| | | } else if (item.sup_acc_code) { |
| | | val += '_' + item.sup_acc_code |
| | | val += '_' + item.sup_acc_code + ' ' + item.sup_acc_name |
| | | } |
| | | }) |
| | | } |