| | |
| | | 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}/> |