From 3ef0b7eaa1bfbfe0e5dfbb2fba211d4047463589 Mon Sep 17 00:00:00 2001 From: xyz <747050115@qq.com> Date: Mon, 3 Mar 2025 14:09:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=98=E6=AC=BE=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/arap/paybill/paybill/card/index.js | 230 ++++++++++++++----------- 1 file changed, 126 insertions(+), 104 deletions(-) diff --git a/src/arap/paybill/paybill/card/index.js b/src/arap/paybill/paybill/card/index.js index 233b0ff..5196ce7 100644 --- a/src/arap/paybill/paybill/card/index.js +++ b/src/arap/paybill/paybill/card/index.js @@ -1,9 +1,9 @@ /*OzMWWmeUkX2mnz6RiozMFtvpszW1VXMiEadMVDPJ1jw=*/ //主子表卡片 -import React, { Component } from 'react'; -import { createPage, ajax, base, toast, high, print, cardCache, getMultiLang } from 'nc-lightapp-front'; -import { buttonClick, initTemplate, afterEvent, pageInfoClick, transferButtonClick } from './events'; -import { setValue } from './events/transferButtonClick'; +import React, {Component} from 'react'; +import {createPage, ajax, base, toast, high, print, cardCache, getMultiLang} from 'nc-lightapp-front'; +import {buttonClick, initTemplate, afterEvent, pageInfoClick, transferButtonClick} from './events'; +import {setValue} from './events/transferButtonClick'; import { buttonVisible, getButtonsKey, @@ -13,17 +13,18 @@ import { onSelectedCardBodyEditControl, initCardBodybrowseControl } from '../../../public/components/pubUtils/buttonvisible.js'; -import { tableId, formId, billType, leftarea, dataSource, pkname, linkPageId, tradeType } from './constants'; +import {tableId, formId, billType, leftarea, dataSource, pkname, linkPageId, tradeType} from './constants'; import CombinedExaminationModel from '../../../public/components/combinedExaminationModel'; //联查处理情况 -import { bodyBeforeEvent } from '../../../public/components/pubUtils/arapTableRefFilter'; -import { formBeforeEvent } from '../../../public/components/pubUtils/arapFormRefFilter'; +import {bodyBeforeEvent} from '../../../public/components/pubUtils/arapTableRefFilter'; +import {formBeforeEvent} from '../../../public/components/pubUtils/arapFormRefFilter'; import linkSourceCard from '../../../public/components/linkSourceCard.js'; import cmpLinkArapCard from '../../../public/components/cmpLinkArapCard.js'; -import { calculateHeadMoney, delBlankLine } from '../../../public/components/pubUtils/billPubUtil.js'; -import { billEditProperties } from '../../../public/components/pubUtils/billFieldEditableUtil.js'; -import { updatePandC } from '../../../public/components/pubUtils/updatePandC'; -let { Inspection, BillTrack, NCUploader, PrintOutput, ApproveDetail } = high; -let { NCButton, NCDiv, NCAffix } = base; +import {calculateHeadMoney, delBlankLine} from '../../../public/components/pubUtils/billPubUtil.js'; +import {billEditProperties} from '../../../public/components/pubUtils/billFieldEditableUtil.js'; +import {updatePandC} from '../../../public/components/pubUtils/updatePandC'; + +let {Inspection, BillTrack, NCUploader, PrintOutput, ApproveDetail} = high; +let {NCButton, NCDiv, NCAffix} = base; let { setDefData, getDefData, @@ -34,10 +35,10 @@ let { updateCache, getCurrentLastId } = cardCache; -import { getContext, loginContextKeys } from '../../../public/components/arapInitInfo/loginContext'; +import {getContext, loginContextKeys} from '../../../public/components/arapInitInfo/loginContext'; import TradeTypeButton from '../../../public/components/tradetype'; //交易类型按钮 -import { modifyChecknoItemtype } from '../../../public/components/pubUtils/specialFieldAfterEvent.js'; -import { dealCardData } from '../../../public/components/pubUtils/dealCardData'; +import {modifyChecknoItemtype} from '../../../public/components/pubUtils/specialFieldAfterEvent.js'; +import {dealCardData} from '../../../public/components/pubUtils/dealCardData'; import { objtypeEditable, dealCommisionPayField, @@ -49,8 +50,15 @@ import { import '../../../public/less/tradetype.less'; import InvoiceUploader from 'sscivm/ivmpub/components/invoice-uploader'; import InvoiceLink from 'sscivm/ivmpub/components/invoice-link'; -const { ExcelImport, ApprovalTrans } = high; -import { cardSocketConnect, cardSocketErrorFlag, toggleBtnStatus, throwSagaErrorAgency } from '../../../public/components/pubUtils/MicroServiceSocket.js'; + +const {ExcelImport, ApprovalTrans} = high; +import { + cardSocketConnect, + cardSocketErrorFlag, + toggleBtnStatus, + throwSagaErrorAgency +} from '../../../public/components/pubUtils/MicroServiceSocket.js'; + class Card extends Component { constructor(props) { super(props); @@ -122,7 +130,7 @@ class Card extends Component { updatePandC(this); } let callback = (json) => { - this.setState({ json: json }, () => { + this.setState({json: json}, () => { window.onbeforeunload = () => { let status = this.props.getUrlParam('status'); if (status == 'edit' || status == 'add') { @@ -132,17 +140,21 @@ class Card extends Component { initTemplate.call(this, this.props, this.initShow); }); }; - getMultiLang({ moduleId: ['paybill', 'public'], domainName: 'arap', currentLocale: 'simpchn', callback }); + getMultiLang({moduleId: ['paybill', 'public'], domainName: 'arap', currentLocale: 'simpchn', callback}); + } + + componentWillReceiveProps(nextProps) { } - componentWillReceiveProps(nextProps) { } // 附件的关闭点击 onHideUploader = () => { this.setState({ showUploader: false }); }; + componentDidMount() { + console.log() if (this.props.getUrlParam('scene')) { let scene = this.props.getUrlParam('scene'); setDefData('scene', dataSource, scene); @@ -158,7 +170,7 @@ class Card extends Component { } if (pagecode == '20080EBM_CARD_LINK' && !this.props.getUrlParam('scene')) { //浏览器的刷新可能导致场景丢失,这里自己塞一次 - this.props.ViewModel.setData('nccloud-router-params', { scene: 'linksce' }); + this.props.ViewModel.setData('nccloud-router-params', {scene: 'linksce'}); } return pagecode; }; @@ -169,7 +181,7 @@ class Card extends Component { } if (pagecode == '20080EBM_CARD_LINK' && !this.props.getUrlParam('scene')) { //浏览器的刷新可能导致场景丢失,这里自己塞一次 - this.props.ViewModel.setData('nccloud-router-params', { scene: 'linksce' }); + this.props.ViewModel.setData('nccloud-router-params', {scene: 'linksce'}); } return pagecode; @@ -213,7 +225,7 @@ class Card extends Component { this.props.beforeUpdatePage(); //打开开关 if (res.data) { if (res.data.head) { - this.props.form.setAllFormValue({ [this.formId]: res.data.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: res.data.head[this.formId]}); } if (res.data.body) { this.props.cardTable.setTableData(this.tableId, res.data.body[this.tableId]); @@ -228,13 +240,13 @@ class Card extends Component { }, error: (res) => { this.props.form.EmptyAllFormValue(this.formId); - this.props.cardTable.setTableData(this.tableId, { rows: [] }); - this.props.setUrlParam({ status: 'browse' }); + this.props.cardTable.setTableData(this.tableId, {rows: []}); + this.props.setUrlParam({status: 'browse'}); this.props.cardTable.setStatus(this.tableId, 'browse'); this.props.form.setFormStatus(this.formId, 'browse'); this.toggleShow(); let str = res.message; - toast({ color: 'danger', content: str });; + toast({color: 'danger', content: str}); } }); } else if (this.props.getUrlParam('status') == 'edit' || this.props.getUrlParam('status') == 'browse') { @@ -245,12 +257,12 @@ class Card extends Component { } ajax({ url: '/nccloud/arap/paybill/querycard.do', - data: { pk_bill: pk_bill }, + data: {pk_bill: pk_bill}, success: (res) => { this.props.beforeUpdatePage(); //打开开关 if (res.data) { if (res.data.head) { - this.props.form.setAllFormValue({ [this.formId]: res.data.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: res.data.head[this.formId]}); } if (res.data.body) { this.props.cardTable.setTableData(this.tableId, res.data.body[this.tableId]); @@ -280,21 +292,21 @@ class Card extends Component { }, error: (res) => { this.props.form.EmptyAllFormValue(this.formId); - this.props.cardTable.setTableData(this.tableId, { rows: [] }); - this.props.setUrlParam({ status: 'browse' }); - this.props.setUrlParam({ id: null }); + this.props.cardTable.setTableData(this.tableId, {rows: []}); + this.props.setUrlParam({status: 'browse'}); + this.props.setUrlParam({id: null}); deleteCacheById(pkname, pk_bill, dataSource); this.props.cardTable.setStatus(this.tableId, 'browse'); this.props.form.setFormStatus(this.formId, 'browse'); this.toggleShow(); let str = res.message; - toast({ color: 'danger', content: str });; + toast({color: 'danger', content: str}); } }); } else if (this.props.getUrlParam('status') == 'add' && this.props.getUrlParam('src') == 'settlement') { //资金,关联结算信息 if (!this.props.getUrlParam('pk_settle')) { - toast({ color: 'danger', content: this.state.json['paybill-000041'] }); /* 国际化处理: 数据异常,请重新操作!*/ + toast({color: 'danger', content: this.state.json['paybill-000041']}); /* 国际化处理: 数据异常,请重新操作!*/ } ajax({ url: '/nccloud/arap/arappub/associatesettinfo.do', @@ -307,10 +319,10 @@ class Card extends Component { if (res.data) { if (res.data.head) { this.props.form.EmptyAllFormValue(this.formId); - this.props.form.setAllFormValue({ [this.formId]: res.data.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: res.data.head[this.formId]}); } if (res.data.body) { - this.props.cardTable.setTableData(this.tableId, { rows: [] }); + this.props.cardTable.setTableData(this.tableId, {rows: []}); this.props.cardTable.setTableData(this.tableId, res.data.body[this.tableId]); } } @@ -327,7 +339,7 @@ class Card extends Component { //推单新增时在inittemplate里处理 this.props.beforeUpdatePage(); //打开开关 if (this.data.head) { - this.props.form.setAllFormValue({ [this.formId]: this.data.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: this.data.head[this.formId]}); } if (this.data.body) { this.props.cardTable.setTableData(this.tableId, this.data.body[this.tableId]); @@ -411,12 +423,12 @@ class Card extends Component { success: (res) => { if (res.data) { this.props.beforeUpdatePage(); //打开开关 - this.props.form.setAllFormValue({ [this.formId]: res.data.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: res.data.head[this.formId]}); this.props.cardTable.setTableData(this.tableId, res.data.body[this.tableId]); let pk_org_v = res.data.head[this.formId].rows[0].values.pk_org_v.value; if (pk_org_v) { this.props.resMetaAfterPkorgEdit(); - this.props.form.setFormItemsDisabled(this.formId, { pk_org_v: false }); + this.props.form.setFormItemsDisabled(this.formId, {pk_org_v: false}); this.state.buttonfalg = true; } else { this.state.buttonfalg = null; @@ -438,13 +450,13 @@ class Card extends Component { let str = res.message; let status = this.props.getUrlParam('status'); if (status != 'browse') { - this.props.setUrlParam({ status: 'browse' }); + this.props.setUrlParam({status: 'browse'}); this.props.form.setFormStatus(this.formId, 'browse'); this.props.cardTable.setStatus(this.tableId, 'browse'); this.toggleShow(); } ; - toast({ color: 'danger', content: str });; + toast({color: 'danger', content: str}); } }); }; @@ -464,14 +476,14 @@ class Card extends Component { } else { let head = this.props.createMasterChildData(this.getPagecode(), this.formId, this.tableId).head[ this.formId - ]; + ]; if (head) { cardhead = head.rows[0].values; } } if (status != 'browse') { this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', false); - this.props.BillHeadInfo.setBillHeadInfoVisible({ showBackBtn: false }); + this.props.BillHeadInfo.setBillHeadInfoVisible({showBackBtn: false}); if (this.refs.tradetypeBtn && !getContext(loginContextKeys.transtype)) { this.refs.tradetypeBtn.setVisible(false); //设置交易类型是否显示 } @@ -481,7 +493,7 @@ class Card extends Component { } else { this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', true); } - this.props.BillHeadInfo.setBillHeadInfoVisible({ showBackBtn: true }); + this.props.BillHeadInfo.setBillHeadInfoVisible({showBackBtn: true}); if (this.refs.tradetypeBtn && !getContext(loginContextKeys.transtype)) { this.refs.tradetypeBtn.setVisible(true); //设置交易类型是否显示 } @@ -512,11 +524,11 @@ class Card extends Component { //联查场景,默认场景,浏览态存在返回按钮 if (this.props.getUrlParam('scene') && this.props.getUrlParam('scene') != 'linksce' && this.props.getUrlParam('scene') != 'fip') { - this.props.BillHeadInfo.setBillHeadInfoVisible({ showBackBtn: false }); + this.props.BillHeadInfo.setBillHeadInfoVisible({showBackBtn: false}); } //来自流程中心的,不存在返回按钮 if (this.props.getUrlParam('mark') && this.props.getUrlParam('mark') == 'processCenter') { - this.props.BillHeadInfo.setBillHeadInfoVisible({ showBackBtn: false }); + this.props.BillHeadInfo.setBillHeadInfoVisible({showBackBtn: false}); } }; //卡片表体点击行事件 @@ -548,20 +560,20 @@ class Card extends Component { this.props.modal.show('deleteCheck'); return; } else { - toast({ color: 'success', content: this.state.json['paybill-000009'] }); /* 国际化处理: 删除成功*/ + toast({color: 'success', content: this.state.json['paybill-000009']}); /* 国际化处理: 删除成功*/ let id = this.props.getUrlParam('id'); deleteCacheById(pkname, id, dataSource); let nextId = getNextId(id, dataSource); if (nextId) { if (this.props.getUrlParam('type') === 'transfer') { - this.props.setUrlParam({ status: 'browse' }); + this.props.setUrlParam({status: 'browse'}); } - this.props.setUrlParam({ id: nextId }); + this.props.setUrlParam({id: nextId}); this.initShow(); } else { - this.props.setUrlParam({ id: null }); + this.props.setUrlParam({id: null}); this.props.form.EmptyAllFormValue(this.formId); - this.props.cardTable.setTableData(this.tableId, { rows: [] }); + this.props.cardTable.setTableData(this.tableId, {rows: []}); this.toggleShow(); } this.clearExType(); @@ -584,11 +596,11 @@ class Card extends Component { this.props.beforeUpdatePage(); //打开开关 this.state.buttonfalg = null; if (this.props.getUrlParam('status') === 'edit') { - this.props.setUrlParam({ status: 'browse' }); + this.props.setUrlParam({status: 'browse'}); let id = this.props.getUrlParam('id'); let cardData = getCacheById(id, dataSource); if (cardData) { - this.props.form.setAllFormValue({ [this.formId]: cardData.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: cardData.head[this.formId]}); this.props.cardTable.setTableData(this.tableId, cardData.body[this.tableId]); this.props.cardTable.setStatus(this.tableId, 'browse'); this.props.form.setFormStatus(this.formId, 'browse'); @@ -603,14 +615,14 @@ class Card extends Component { id = getCurrentLastId(dataSource); } if (id) { - this.props.setUrlParam({ status: 'browse', id: id }); + this.props.setUrlParam({status: 'browse', id: id}); let cardData = getCacheById(id, dataSource); if (cardData) { - this.props.form.setAllFormValue({ [this.formId]: cardData.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: cardData.head[this.formId]}); this.props.cardTable.setTableData(this.tableId, cardData.body[this.tableId]); let pagecode = cardData.head[this.formId].rows[0].values.pk_tradetype.value; if (this.getPagecode() != pagecode && !this.props.getUrlParam('scene')) { - this.props.setUrlParam({ pagecode: pagecode }); + this.props.setUrlParam({pagecode: pagecode}); initTemplate.call(this, this.props); } this.props.cardTable.setStatus(this.tableId, 'browse'); @@ -623,8 +635,8 @@ class Card extends Component { } } else { this.props.form.EmptyAllFormValue(this.formId); - this.props.cardTable.setTableData(this.tableId, { rows: [] }); - this.props.setUrlParam({ status: 'browse' }); + this.props.cardTable.setTableData(this.tableId, {rows: []}); + this.props.setUrlParam({status: 'browse'}); this.props.cardTable.setStatus(this.tableId, 'browse'); this.props.form.setFormStatus(this.formId, 'browse'); this.props.updatePage(this.formId, this.tableId); //关闭开关 @@ -635,6 +647,15 @@ class Card extends Component { //保存单据 saveBill = (url, extype, flag, modelIndex) => { + /*let saveData = this.props.createMasterChildData(this.getPagecode(), this.formId, this.tableId) + let newData = dealCardData(this, saveData); //去掉空值,减少压缩时间 + let tableLength = newData.body.bodys.rows.length + console.log(this.props.form) + // console.log(this.props.form.getFormItemsValue(this.formId, 'def5')) + this.props.form.setFormItemsValue(this.formId, {'def5': {'value': tableLength, 'display': undefined}}); //附件数量*/ + // return false //todo + + if (url != '/nccloud/arap/arappub/tempsave.do') { //暂存不进行校验 //删除空白行 @@ -687,8 +708,8 @@ class Card extends Component { res.data.assignInfo.workflow == 'workflow')) { this.Info.compositedata = res.data.assignInfo; this.Info.exType = res.data.exType; - this.Info.tipUrl = '/nccloud/arap/arappub/saveandcommit.do'; //指派信息确定按钮继续走保存提交; - this.setState({ compositedisplay: true }); + this.Info.tipUrl = '/nccloud/arap/arappub/saveandcommit.do'; //指派信息确定按钮继续走保存提交; + this.setState({compositedisplay: true}); return; } else { this.commitAndUncommit(); @@ -711,8 +732,8 @@ class Card extends Component { res.data.assignInfo.workflow == 'workflow')) { this.Info.compositedata = res.data.assignInfo; this.Info.exType = res.data.exType; - this.Info.tipUrl = '/nccloud/arap/arappub/saveandcommit.do'; //指派信息确定按钮继续走保存提交; - this.setState({ compositedisplay: true }); + this.Info.tipUrl = '/nccloud/arap/arappub/saveandcommit.do'; //指派信息确定按钮继续走保存提交; + this.setState({compositedisplay: true}); return; } else { this.commitAndUncommit(); @@ -735,7 +756,7 @@ class Card extends Component { this.Info.exType = res.data.exType; this.Info.billCard = res.data.billCard; this.Info.tipUrl = '/nccloud/arap/arappub/saveandcommit.do'; - this.setState({ compositedisplay: true }); + this.setState({compositedisplay: true}); return; } if (res.data) { @@ -744,7 +765,7 @@ class Card extends Component { } else { this.props.beforeUpdatePage(); //打开开关 if (res.data.head && res.data.head[this.formId]) { - this.props.form.setAllFormValue({ [this.formId]: res.data.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: res.data.head[this.formId]}); pk_paybill = res.data.head[this.formId].rows[0].values.pk_paybill.value; pk_tradetype = res.data.head[this.formId].rows[0].values.pk_tradetype.value; } @@ -769,7 +790,7 @@ class Card extends Component { this.props.delUrlParam('type'); } if (this.props.getUrlParam('scene')) { - this.props.setUrlParam({ status: 'browse', id: pk_paybill }); + this.props.setUrlParam({status: 'browse', id: pk_paybill}); } else { this.props.setUrlParam({ status: 'browse', @@ -779,9 +800,9 @@ class Card extends Component { } } if (!res.data.message) { - toast({ color: 'success', content: this.state.json['paybill-000010'] }); /* 国际化处理: 保存成功*/ + toast({color: 'success', content: this.state.json['paybill-000010']}); /* 国际化处理: 保存成功*/ } else { - toast({ color: 'danger', content: JSON.stringify(res.data.message) }); + toast({color: 'danger', content: JSON.stringify(res.data.message)}); } } } @@ -797,7 +818,7 @@ class Card extends Component { }); }; - this.props.validateToSave(datas.cardData, callback, { table1: 'cardTable' }, 'card'); + this.props.validateToSave(datas.cardData, callback, {table1: 'cardTable'}, 'card'); }; //提交和收回弹框点击取消 @@ -813,7 +834,7 @@ class Card extends Component { this.Info.saveflag = false; }; cancelClickInCommit = () => { //保存提交事务,取消指派框 - this.setState({ compositedisplay: false }); + this.setState({compositedisplay: false}); this.Info.saveflag = false; this.clearExType(); }; @@ -826,7 +847,7 @@ class Card extends Component { this.props.beforeUpdatePage(); //打开开关 this.state.buttonfalg = null; if (this.Info.billCard.head) { - this.props.form.setAllFormValue({ [this.formId]: this.Info.billCard.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: this.Info.billCard.head[this.formId]}); } if (this.Info.billCard.body) { this.props.cardTable.updateDataByRowId(this.tableId, this.Info.billCard.body[this.tableId]); @@ -851,7 +872,7 @@ class Card extends Component { this.toggleShow(); } if (this.state.compositedisplay) { - this.setState({ compositedisplay: false }); + this.setState({compositedisplay: false}); } this.clearExType(); }; @@ -888,12 +909,12 @@ class Card extends Component { ) { this.Info.compositedata = res.data; this.Info.tipUrl = tipUrl; - this.setState({ compositedisplay: true }); + this.setState({compositedisplay: true}); return; } if (res.success) { if (res.data.head) { - this.props.form.setAllFormValue({ [this.formId]: res.data.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: res.data.head[this.formId]}); } if (res.data.body) { this.props.cardTable.setTableData(this.tableId, res.data.body[this.tableId]); @@ -917,11 +938,11 @@ class Card extends Component { id: this.Info.pk_bill == null ? this.props.getUrlParam('id') : this.Info.pk_bill }); if (this.state.compositedisplay) { - this.setState({ compositedisplay: false }); + this.setState({compositedisplay: false}); } this.clearExType(); this.toggleShow('', res); - toast({ color: 'success', content: this.state.json['paybill-000026'] }); /* 国际化处理: 操作成功*/ + toast({color: 'success', content: this.state.json['paybill-000026']}); /* 国际化处理: 操作成功*/ } } }); @@ -954,7 +975,7 @@ class Card extends Component { success: (res) => { if (res.success) { if (res.data.head) { - this.props.form.setAllFormValue({ [this.formId]: res.data.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: res.data.head[this.formId]}); } if (res.data.body) { this.props.cardTable.setTableData(this.tableId, res.data.body[this.tableId]); @@ -977,11 +998,11 @@ class Card extends Component { id: res.data.head.head ? res.data.head.head.rows[0].values.pk_paybill.value : res.data.head.rows[0].values.pk_paybill.value }); if (this.state.compositedisplay) { - this.setState({ compositedisplay: false }); + this.setState({compositedisplay: false}); } this.clearExType(); this.toggleShow('', res); - toast({ color: 'success', content: this.state.json['receivablebill-000025'] }); /* 国际化处理: 操作成功*/ + toast({color: 'success', content: this.state.json['receivablebill-000025']}); /* 国际化处理: 操作成功*/ } } }); @@ -999,7 +1020,7 @@ class Card extends Component { pause = (url) => { let selectedData = this.props.cardTable.getCheckedRows(this.tableId); if (selectedData.length == 0) { - toast({ color: 'warning', content: this.state.json['paybill-000033'] }); /* 国际化处理: 请选择表体行!*/ + toast({color: 'warning', content: this.state.json['paybill-000033']}); /* 国际化处理: 请选择表体行!*/ return; } let pauseObj = []; @@ -1024,11 +1045,11 @@ class Card extends Component { content: res.data.message }); } else { - toast({ color: 'success', content: this.state.json['paybill-000026'] }); /* 国际化处理: 操作成功*/ + toast({color: 'success', content: this.state.json['paybill-000026']}); /* 国际化处理: 操作成功*/ } if (res.data.billCard) { if (res.data.billCard.head) { - this.props.form.setAllFormValue({ [this.formId]: res.data.billCard.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: res.data.billCard.head[this.formId]}); } if (res.data.billCard.body) { this.props.cardTable.setTableData(this.tableId, res.data.billCard.body[this.tableId]); @@ -1125,14 +1146,15 @@ class Card extends Component { success: (res) => { if (res.success) { //打开协同单据节点 - toast({ color: 'success', content: res.data }); + toast({color: 'success', content: res.data}); } } }); }; //输出成功回调函数 - onSubmit() { } + onSubmit() { + } //返回列表 backList = () => { @@ -1198,7 +1220,7 @@ class Card extends Component { success: (res) => { if (res.data) { if (res.data.head) { - this.props.form.setAllFormValue({ [this.formId]: res.data.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: res.data.head[this.formId]}); } if (res.data.body) { this.props.cardTable.updateDataByIndexs(this.tableId, [ @@ -1215,7 +1237,7 @@ class Card extends Component { } }); } else { - toast({ color: 'warning', content: this.state.json['paybill-000027'] }); /* 国际化处理: 请先选择财务组织*/ + toast({color: 'warning', content: this.state.json['paybill-000027']}); /* 国际化处理: 请先选择财务组织*/ } }; @@ -1248,16 +1270,16 @@ class Card extends Component { }; render() { - let { cardTable, form, button, modal, cardPagination, transferTable } = this.props; - const { createBillHeadInfo } = this.props.BillHeadInfo; + let {cardTable, form, button, modal, cardPagination, transferTable} = this.props; + const {createBillHeadInfo} = this.props.BillHeadInfo; let buttons = this.props.button.getButtons(); - let { createForm } = form; - let { createCardTable } = cardTable; - const { createCardPagination } = cardPagination; - let { createModal } = modal; + let {createForm} = form; + let {createCardTable} = cardTable; + const {createCardPagination} = cardPagination; + let {createModal} = modal; let transfer = this.props.getUrlParam('type') == 'transfer'; - const { createTransferList } = transferTable; - let { showUploader, target } = this.state; + const {createTransferList} = transferTable; + let {showUploader, target} = this.state; // console.log('transfer==============' + transfer) if (transfer) { return ( @@ -1302,10 +1324,10 @@ class Card extends Component { if (isEdit == 'browse') { let id = record.head[this.formId].rows[0].values.pk_paybill.value; record = id == null ? record : getCacheById(id, dataSource); - this.props.setUrlParam({ status: 'browse' }); - this.props.setUrlParam({ id: id }); + this.props.setUrlParam({status: 'browse'}); + this.props.setUrlParam({id: id}); } else { - this.props.setUrlParam({ status: 'add' }); + this.props.setUrlParam({status: 'add'}); this.props.delUrlParam('id'); this.state.buttonfalg = true; } @@ -1313,7 +1335,7 @@ class Card extends Component { this.props.beforeUpdatePage(); //打开开关 this.props.form.setFormStatus(this.formId, isEdit); this.props.cardTable.setStatus(this.tableId, isEdit); - this.props.form.setAllFormValue({ [this.formId]: record.head[this.formId] }); + this.props.form.setAllFormValue({[this.formId]: record.head[this.formId]}); this.props.cardTable.setTableData(this.tableId, record.body[this.tableId]); this.props.updatePage(this.formId, this.tableId); //关闭开关 } @@ -1394,7 +1416,7 @@ class Card extends Component { { - this.setState({ showBillTrack: false }); + this.setState({showBillTrack: false}); }} pk={this.props.getUrlParam('id')} //单据id type={ @@ -1452,7 +1474,7 @@ class Card extends Component { // {...this.props} {...this.state.sscivmInvoiceData} /> - + {/* 异常模态框 */}
{createModal('saveCheck', { @@ -1538,9 +1560,9 @@ class Card extends Component {
{/* {分页按钮,默认场景或者联查场景} */} {this.props.getUrlParam('scene') == 'linksce' || - this.props.getUrlParam('scene') == 'fip' || - !this.props.getUrlParam('scene') ? ( -
+ this.props.getUrlParam('scene') == 'fip' || + !this.props.getUrlParam('scene') ? ( +
{createCardPagination({ handlePageInfoChange: pageInfoClick.bind(this), dataSource: dataSource @@ -1589,7 +1611,7 @@ class Card extends Component { // {...this.props} {...this.state.sscivmInvoiceData} /> - + {/* {联查处理情况} */} { - this.setState({ showBillTrack: false }); + this.setState({showBillTrack: false}); }} pk={this.props.getUrlParam('id')} //单据id type={ @@ -1748,4 +1770,4 @@ Card = createPage({ export default Card; -/*OzMWWmeUkX2mnz6RiozMFtvpszW1VXMiEadMVDPJ1jw=*/ \ No newline at end of file +/*OzMWWmeUkX2mnz6RiozMFtvpszW1VXMiEadMVDPJ1jw=*/