Merge remote-tracking branch 'origin/main'

This commit is contained in:
mzr 2025-04-09 14:44:30 +08:00
commit 00c266e729
21 changed files with 6564 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/*kHr1VQMdEU42oXEu346enLE2PHnzHrFdr/OxPw9YGIc=*/
/*kHr1VQMdEU42oXEu346enGx+6rXJ4OFHE2VimKRgjU4=*/
/**
* 表头区域
@ -55,4 +55,4 @@ export const pkname = 'pk_paybill';
* 列表联查页面pageId
*/
export const linkPageId = '20080EBM_LIST_LINK';
/*kHr1VQMdEU42oXEu346enLE2PHnzHrFdr/OxPw9YGIc=*/
/*kHr1VQMdEU42oXEu346enGx+6rXJ4OFHE2VimKRgjU4=*/

View File

@ -0,0 +1,421 @@
/*DncIqBreQz6WZRX+v7OzgRW7fkbxk12M9r3MB9P+hwI=*/
import { ajax, promptBox, toast } from 'nc-lightapp-front';
import { currentTypeAfterFormEvents } from '../../../../public/components/pubUtils/currentTypeAfterEvent';
import { autoAddLineKeys } from '../../../../public/components/pubUtils/billPubInfo';
import { checknoDisplayAfterEvent, checktypeAfterEvent,isbillrangeEdit } from '../../../../public/components/pubUtils/specialFieldAfterEvent.js';
import { formulamsgHint, renderData, headAfterEventRenderData, bodyAfterEventRenderData, errorDeal } from '../../../../public/components/afterEventPub/afterEventPubDeal';
import { getColvalues, getRowIds } from '../../../../public/components/pubUtils/billPubUtil';
import { moneyAndRateFields } from '../../../../public/components/pubUtils/specialFieldAfterEvent.js';
import { isExistsTopBill } from '../../../../public/components/pubUtils/billPubUtil.js';
import {afterEventFor36S3} from '../../../../public/components/pubUtils/arap436s3utils';
import { setAllocField } from '../../../../public/components/allocation.js';
import {refreshSmartCard} from '../../../../public/components/arapSmartCard.js';
export default function afterEvent(props, moduleId, key, value, changedrows, i, record, g) {
if (changedrows instanceof Array) {
if (changedrows[0].newvalue.value == changedrows[0].oldvalue.value) {
return;
}
}
let pagecode = this.getPagecode();
let index = 0;
if (moduleId == this.formId) {
index = 0;
} else if (moduleId == this.tableId) {
index = i;
}
if(this.props.getUrlParam("src")=="36S3"){
afterEventFor36S3(this,props, moduleId, key, value, changedrows, i, record, g);
return;
}
refreshSmartCard({props,key,moduleId, attrcode:key, record});//更新智能区
//表头编辑后事件
if (moduleId == this.formId) {
let data = null;
switch (key) {
case 'pk_org_v':
if (value.value == null || value.value == '') {
//清空财务组织
if (this.props.getUrlParam('type') === 'transfer') {
promptBox({
color: 'warning',
title: this.state.json['paybill-000018'] /* 国际化处理: 确认修改*/,
content: this.state.json['paybill-000053'] /* 国际化处理: 来源于上游的单据不允许清空财务组织!*/,
beSureBtnName: this.state.json['paybill-000004'] /* 国际化处理: 确定*/,
noCancelBtn: true,
beSureBtnClick: () => {
this.props.form.setFormItemsValue(this.formId, { pk_org_v: changedrows });
},
closeByClickBackDrop: false
});
} else {
promptBox({
color: 'warning',
title: this.state.json['paybill-000018'] /* 国际化处理: 确认修改*/,
content: this.state.json['paybill-000019'] /* 国际化处理: 确定​修改组织,这样会清空您录入的信息?*/,
beSureBtnName: this.state.json['paybill-000004'] /* 国际化处理: 确定*/,
cancelBtnName: this.state.json['paybill-000005'] /* 国际化处理: 取消*/,
beSureBtnClick: () => {
this.props.form.setFormItemsValue("allocobjrule",  { "allocobjrule": { value: '', display: '' } });
this.props.form.EmptyAllFormValue(this.formId);
this.props.cardTable.setTableData(this.tableId, { rows: [] });
this.initAdd(true);
},
cancelBtnClick: () => {
this.props.form.setFormItemsValue(this.formId, { pk_org_v: changedrows });
},
closeByClickBackDrop: false
});
}
} else if (changedrows.value != null && changedrows.value != '') {
//切换组织
promptBox({
color: 'warning',
title: this.state.json['paybill-000018'] /* 国际化处理: 确认修改*/,
content: this.state.json['paybill-000019'] /* 国际化处理: 确定​修改组织,这样会清空您录入的信息?*/,
beSureBtnName: this.state.json['paybill-000004'] /* 国际化处理: 确定*/,
cancelBtnName: this.state.json['paybill-000005'] /* 国际化处理: 取消*/,
beSureBtnClick: () => {
this.props.form.setFormItemsValue("allocobjrule",  { "allocobjrule": { value: '', display: '' } });
ajax({
url: '/nccloud/arap/paybill/cardheadafteredit.do',
data: {
pageId: pagecode,
event: this.props.createHeadAfterEventData(pagecode, this.formId, this.tableId, moduleId, key, value),
uiState: this.props.getUrlParam('status')
},
async: false,
success: (res) => {
//渲染数据
renderData(this, res);
//编辑公式提示
formulamsgHint(this, res);
},
error: (res) => {
errorDeal(this, res, changedrows, key);
}
});
},
cancelBtnClick: () => {
this.props.form.setFormItemsValue(this.formId, { pk_org_v: changedrows });
},
closeByClickBackDrop: false
});
} else {
data = {
pageId: pagecode,
event: this.props.createHeadAfterEventData(pagecode, this.formId, this.tableId, moduleId, key, value),
uiState: this.props.getUrlParam('status')
}
headFieldAfterRequest.call(this, data, key, changedrows)
}
break;
case 'supplier_v':
data = {
pageId: pagecode,
formEvent: props.createFormAfterEventData(pagecode, this.formId, this.tableId, key, value),
colValues: getColvalues(this.props, this.tableId, ['pk_org','pk_org_v', 'payaccount', 'recaccount','pk_currtype', 'supplier','supplier_v', 'buysellflag',
'objtype', "direction", "pk_billtype", "top_billtype", "pk_payterm", "pk_psndoc", "pk_deptid", "pk_deptid_v",'pk_ratetype','ratedate','ordercubasdoc','ordercubasdoc_v'].concat(moneyAndRateFields)),
rowids: getRowIds(this.props, this.tableId),
uiState: this.props.getUrlParam('status')
};
headFieldAfterRequest.call(this, data, key, changedrows)
break;
case 'payaccount':
data = {
pageId: pagecode,
formEvent: props.createFormAfterEventData(pagecode, this.formId, this.tableId, key, value),
colValues: getColvalues(this.props, this.tableId, ['pk_org','pk_org_v', 'payaccount', 'pk_currtype', 'supplier', 'supplier_v', 'buysellflag',
'objtype', "direction", "pk_billtype"].concat(moneyAndRateFields)),
rowids: getRowIds(this.props, this.tableId),
uiState: this.props.getUrlParam('status')
};
headFieldAfterRequest.call(this, data, key, changedrows)
break;
case 'pk_deptid_v':
data = {
pageId: pagecode,
formEvent: props.createFormAfterEventData(pagecode, this.formId, this.tableId, key, value),
colValues: getColvalues(this.props, this.tableId, ['pk_org','pk_org_v', 'pk_deptid', 'pk_deptid_v', 'pk_currtype', 'supplier','supplier_v', 'taxtype', 'buysellflag', 'objtype', "direction",'pk_psndoc','pk_pcorg','pk_pcorg_v', 'costcenter', 'billdate']),
rowids: getRowIds(this.props, this.tableId),
uiState: this.props.getUrlParam('status')
};
headFieldAfterRequest.call(this, data, key, changedrows)
break;
case 'pk_psndoc':
data = {
pageId: pagecode,
formEvent: props.createFormAfterEventData(pagecode, this.formId, this.tableId, key, value),
colValues: getColvalues(this.props, this.tableId, ['pk_org','pk_org_v', 'pk_psndoc', 'payaccount', 'recaccount', 'pk_deptid', 'pk_deptid_v', 'isrefused', 'prepay', 'isdiscount', 'objtype', 'direction', 'agentreceivelocal','buysellflag','pk_pcorg','pk_pcorg_v','costcenter']),
rowids: getRowIds(this.props, this.tableId),
uiState: this.props.getUrlParam('status')
};
headFieldAfterRequest.call(this, data, key, changedrows)
break;
case 'pk_currtype':
data = {
pageId: pagecode,
formEvent: props.createFormAfterEventData(pagecode, this.formId, this.tableId, key, value),
colValues: getColvalues(this.props, this.tableId, ["pk_org","pk_org_v","pk_group","pk_currtype","pk_billtype","billdate","rate","grouprate","globalrate",
"buysellflag","taxprice","local_taxprice","taxrate","occupationmny","money_bal","local_money_bal",
"globaldebit","globalnotax_de","globaltax_de","groupdebit","groupnotax_de", "recaccount",
"grouptax_de","local_money_de","local_notax_de","local_tax_de","money_de","notax_de","quantity_de","direction","settlecurr","settlemoney","pk_ratetype","ratedate","top_billtype","settlemoney","settlecurr",'supplier','supplier_v']),
rowids: getRowIds(this.props, this.tableId),
uiState: this.props.getUrlParam('status')
}
headFieldAfterRequest.call(this, data, key, changedrows)
//币种事件发送完要判断汇率
//v2111 汇率控制发生变化,都走编辑前进行控制 currentTypeAfterFormEvents(this.formId, props, key);
break;
case 'subjcode':
data = {
pageId: pagecode,
event: this.props.createHeadAfterEventData(pagecode, this.formId, this.tableId, moduleId, key, value),
uiState: this.props.getUrlParam('status')
}
headFieldAfterRequest.call(this, data, key, changedrows)
this.props.form.setFormItemsValue(this.formId, { 'subjcode': { value: value.refpk, display: value.dispname } });
break;
case 'pk_ratetype':
data = {
pageId: pagecode,
event: this.props.createHeadAfterEventData(pagecode, this.formId, this.tableId, moduleId, key, value),
uiState: this.props.getUrlParam('status')
}
if (value.value == null || value.value == '') {
promptBox({
color: 'warning',
title: this.state.json['paybill-000058'] /* 国际化处理: 确认清空*/,
content: this.state.json['paybill-000059'] /* 国际化处理: 确定​清空汇率类型,这样会清空金额相关的信息!*/,
beSureBtnName: this.state.json['paybill-000004'] /* 国际化处理: 确定*/,
cancelBtnName: this.state.json['paybill-000005'] /* 国际化处理: 取消*/,
beSureBtnClick: () => {
headFieldAfterRequest.call(this, data, key, changedrows)
},
cancelBtnClick: () => {
this.props.form.setFormItemsValue(this.formId, { pk_ratetype: changedrows });
},
closeByClickBackDrop: false
});
} else {
headFieldAfterRequest.call(this, data, key, changedrows)
}
break;
case 'pk_periodrule':
data = {
pageId: pagecode,
event: this.props.createHeadAfterEventData(pagecode, this.formId, this.tableId, moduleId, key, value),
uiState: this.props.getUrlParam('status')
}
headFieldAfterRequest.call(this, data, key, changedrows);
setAllocField(this);
break;
default:
if(key=='startdate'&&value.value){
value.value = value.value.substr(0, 10)+' 00:00:00';
this.props.form.setFormItemsValue(this.formId, { key: value });
}else if(key=='enddate'&&value.value){
value.value = value.value.substr(0, 10)+' 23:59:59';
this.props.form.setFormItemsValue(this.formId, { key: value });
}
data = {
pageId: pagecode,
event: this.props.createHeadAfterEventData(pagecode, this.formId, this.tableId, moduleId, key, value),
uiState: this.props.getUrlParam('status')
}
headFieldAfterRequest.call(this, data, key, changedrows)
break;
}
}
//表体编辑后事件
if (moduleId == this.tableId) {
//票据类型
if (key == 'checktype') {
checktypeAfterEvent(this.props, this.tableId, key, value, i);
}
if (key == 'direct_checkno') {
let checkno = this.props.cardTable.getValByKeyAndIndex(this.tableId, i, "checkno");
let checknovalue = checkno?checkno.value:null;
if(value=="N"&&isbillrangeEdit(checknovalue,value)){
this.props.cardTable.setEditableByIndex(this.tableId, i, ['billrangestart','billrangeend'], true);
}else{
this.props.cardTable.setEditableByIndex(this.tableId, i, ['billrangestart','billrangeend'], false);
}
}
//非元数据字段,票据号
if (key == 'checkno_display') {
checknoDisplayAfterEvent(this.props, this.tableId, key, value, i);
key = 'checkno';
let billtypecode = value.values.pk_billtypecode.value;
let subcontractcirculation = value.values.subcontractcirculation.value;
if(billtypecode=="36H2"){
this.isEditbillrangge = false;
}else if(billtypecode=="36H1"){
if(subcontractcirculation=="Y"){
this.isEditbillrangge = true;
}else{
this.isEditbillrangge = false;
}
}
}
//科目字段特殊拼接1121\应收票据
if(key == "subjcode"){
// this.props.cardTable.setValByKeyAndIndex(this.tableId, i, 'subjcode', { value: value.refpk, display: value.dispname })
}
if(key=='startdate'&&value){
value = value.substr(0, 10)+' 00:00:00';
this.props.cardTable.setValByKeyAndIndex(this.tableId, i , key , {value: value});
}else if(key=='enddate'&&value){
value = value.substr(0, 10)+' 23:59:59';
this.props.cardTable.setValByKeyAndIndex(this.tableId, i , key , {value: value});
}
ajax({
url: '/nccloud/arap/paybill/cardbodyafteredit.do',
data: {
rowindex: 0,
editindex: index,
pageId: pagecode,
changedrows: changedrows,
tableId:this.tableId,
body: props.cardTable.getDataByIndex(this.tableId, index),
formEvent: props.createFormAfterEventData(pagecode, this.formId, this.tableId, key, value),
uiState: this.props.getUrlParam('status')
},
loading:false,
async: false,
success: (res) => {
//渲染数据
bodyAfterEventRenderData(this, res, index);
if (this.props.getUrlParam('type') == 'transfer') {
this.synTransferData();
}
//表体改变表头税率编辑性
if (i == 0 && key == 'pk_currtype') {
//v2111 汇率控制发生变化,都走编辑前进行控制 currentTypeAfterFormEvents(this.formId, props, 'pk_currtype');
}
//编辑公式提示
formulamsgHint(this, res);
},
error: (res) => {
let str = res.message;
if (str.substring(0,16) == 'convertException') {
promptBox({
color: 'warning',
title: this.state.json['paybill-000000'] /* 国际化处理: 折算误差*/,
content: str.substring(16, str.length),
closeByClickBackDrop: false,
beSureBtnClick: () => {
afterTableEvent(this, props, i, pagecode, moduleId, key, changedrows, 'sure', index,value);
},
cancelBtnClick: () => {
afterTableEvent(this, props, i, pagecode, moduleId, key, changedrows, 'cancel', index,value);
}
});
} else {
if (key == 'startdate' || key == 'enddate'||key=='firstallocdate') {
this.props.cardTable.setValByKeyAndRowId(this.tableId, changedrows[0].rowid, key, { value: changedrows[0].oldvalue.value, display: changedrows[0].oldvalue.display });
} else {
this.props.cardTable.setValByKeyAndRowId(this.tableId, i, key, changedrows);
}
toast({ color: 'danger', content: str});;
}
}
});
//自动增行
autoAddline.call(this, moduleId, pagecode, key, i)
}
}
function afterTableEvent(that, props, i, pagecode, moduleId, key, changedrows, isCalculateConvert, index,value) {
ajax({
url: '/nccloud/arap/paybill/cardbodyafteredit.do',
data: {
rowindex: 0,
editindex: index,
pageId: pagecode,
changedrows: changedrows,
tableId:that.tableId,
body: props.cardTable.getDataByIndex(that.tableId, index),
formEvent: props.createFormAfterEventData(pagecode, that.formId, that.tableId, key, value),
uiState: that.props.getUrlParam('status'),
isCalculateConvert: isCalculateConvert
},
async: false,
success: (res) => {
//渲染数据
bodyAfterEventRenderData(that, res);
if (that.props.getUrlParam('type') == 'transfer') {
that.synTransferData();
}
//表体改变表头税率编辑性
if (i == 0 && key == 'pk_currtype') {
//v2111 汇率控制发生变化,都走编辑前进行控制 currentTypeAfterFormEvents(that.formId, props, 'pk_currtype');
}
//编辑公式提示
formulamsgHint(that, res);
}
});
}
export function headFieldAfterRequest(requestData, key, changedrows) {
ajax({
url: '/nccloud/arap/paybill/cardheadafteredit.do',
data: requestData,
async: false,
success: (res) => {
//渲染数据
headAfterEventRenderData(this, res);
//编辑公式提示
formulamsgHint(this, res);
if (key == 'pk_org_v') {
let pk_org_v = this.props.form.getFormItemsValue(this.formId, 'pk_org_v').value;
if (pk_org_v) {
this.props.resMetaAfterPkorgEdit();
this.state.buttonfalg = true;
} else {
this.state.buttonfalg = null;
}
this.toggleShow();
this.props.cardTable.setColValue(this.tableId,'prepay', { display:this.prepay.display,value: this.prepay.value});
}
if (this.props.getUrlParam('type') == 'transfer') {
this.synTransferData();
}
},
error: (res) => {
errorDeal(this, res, changedrows, key);
}
});
}
export function autoAddline(moduleId, pagecode, key, i) {
//自动增行
let allRowsNumber = this.props.cardTable.getNumberOfRows(this.tableId);
if (moduleId == this.tableId && allRowsNumber == i + 1 && autoAddLineKeys.indexOf(key) != -1 && !isExistsTopBill(this)) {
let data = this.props.createMasterChildData(pagecode, this.formId, this.tableId);
//清空cardData的表体
data.body[this.tableId].rows = [];
ajax({
url: '/nccloud/arap/paybillpub/addline.do',
data: data,
loading:false,
async: false,
success: (res) => {
if (res.data) {
if (res.data.head) {
this.props.form.setAllFormValue({ [this.formId]: res.data.head[this.formId] });
}
if (res.data.body) {
this.props.cardTable.addRow(this.tableId, allRowsNumber, res.data.body[this.tableId].rows[0].values, false);
this.props.cardTable.setValByKeyAndIndex(this.tableId, allRowsNumber, 'prepay', { display:this.prepay.display,value:this.prepay.value});
}
}
}
});
}
}
/*DncIqBreQz6WZRX+v7OzgRW7fkbxk12M9r3MB9P+hwI=*/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
/*zSUoWKMuZerEXLsc4aAHfpzRg5lzN2RmctWmdBaiPTc=*/
import { buttonClick} from './buttonClick';
import initTemplate from './initTemplate';
import afterEvent from './afterEvent';
import pageInfoClick from './pageInfoClick';
import transferButtonClick from './transferButtonClick';
export { buttonClick, afterEvent, initTemplate, pageInfoClick,transferButtonClick};
/*zSUoWKMuZerEXLsc4aAHfpzRg5lzN2RmctWmdBaiPTc=*/

View File

@ -0,0 +1,190 @@
/*pmFWCFu5nhKkBzYmrkBakYqb4t+QDKrWy/miWT3MDKY=*/
import { base, ajax, cacheTools, cardCache, toast } from 'nc-lightapp-front';
import excelImportconfig from 'uap/common/components/excelImportconfig';
import tableButtonClick from './tableButtonClick';
import { tableId, formId, billType, dataSource } from '../constants';
import { buttonVisible, getButtonsKey, getInnerButtonkey, cardBodyAndInnerButtonVisible } from '../../../../public/components/pubUtils/buttonvisible.js';
let { setDefData, getDefData } = cardCache;
import { loginContext, getContext, loginContextKeys } from '../../../../public/components/arapInitInfo/loginContext';
import { OperationColumn } from '../../../../public/components/pubUtils/arapConstant';
import {isHasLayout} from '../../../../public/components/arapSmartCard.js';
export default function (props, callback) {
const that = this;
//从地址栏获取页面编码
let appcode = props.getSearchParam('c');
let pagecode = this.getPagecode();
if (this.props.getUrlParam('srcbilltype')) {
//处理外系统推单,改变appcode、pagecode
dealOutToPaybill.call(this, props, appcode, pagecode)
} else {
if(this.props.getUrlParam('src') === '36S3'){
pagecode = this.props.getUrlParam('billtype')
}
init(that, props, appcode, pagecode, callback);
}
}
function init(that, props, appcode, pagecode, callback) {
let excelimportconfig = excelImportconfig(props, "arap", billType, true, "", { "appcode": appcode, "pagecode": that.getExportPageCode() });
let tradetype = pagecode
props.createUIDom(
{
pagecode: pagecode,//页面id
appcode: appcode,//注册按钮的id
reqDataQueryallbtns: {
rqUrl: '/arap/arappub/queryallbtns.do',
rqJson: `{\n \"pagecode\": \"${pagecode}\",\n \"appcode\": \"${appcode}\"\n,\n \"billtype\": \"${billType}\"\n,\n \"tradetype\": \"${tradetype}\"\n}`,
rqCode: 'button'
},
reqDataQuerypage: {
rqUrl: '/arap/arappub/querypage.do',
rqJson: `{\n \"pagecode\": \"${pagecode}\",\n \"appcode\": \"${appcode}\"\n}`,
rqCode: 'template'
}
},
function (data) {
if (data) {
if (!data.template[tableId]) {
return;
}
if (data.template) {
let meta = data.template;
let status = props.getUrlParam('status');
if(status=='edit'){
props.controlAutoFocus(true);//修改时不要日期聚焦
}
meta = modifierMeta(that, props, meta);
props.meta.setMeta(meta);
if(isHasLayout({data})){
that.setState({showExpandBtn:true});
}
}
if (data.button && data.button.button) {
let button = data.button.button;
let pullBillInfoVOAry = data.button.pullbillinfo;
getButtonsKey(button, that.Info.allButtonsKey);//保存所有头部和肩部按钮
that.Info.pullBillInfoVOAry = pullBillInfoVOAry;
props.button.setButtons(button);
props.button.setUploadConfig("ImportData", excelimportconfig);
}
if (callback) {
callback();
}
if (data.context) {
// 初始化上下文变量
loginContext(data.context);
if (getContext(loginContextKeys.transtype)) {
if (that.refs.tradetypeBtn) {
that.refs.tradetypeBtn.setVisible(false);
}
}
}
}
}
//false//请求模板不走缓存
)
}
function modifierMeta(that, props, meta) {
let status = props.getUrlParam('status');
meta[formId].status = status;
meta[formId].items.map((item,index)=>{
if(item.attrcode=='startdate'||item.attrcode=='enddate'||item.attrcode=='firstallocdate'){
item.isconverttimezones="2";//不转时区
}
})
meta[tableId].status = status;
meta[tableId].items.map((item,index)=>{
if(item.attrcode=='subjcode'){
item.fieldDisplayed='dispname';
}else if(item.attrcode=='startdate'||item.attrcode=='enddate'||item.attrcode=='firstallocdate'){
item.isconverttimezones="2";//不转时区
}else if(item.attrcode=='prepay'&&item.initialvalue){
that.prepay.display= item.initialvalue.display;
that.prepay.value= item.initialvalue.value;
}
})
//添加操作列
meta[tableId].items.push({
label: that.state.json['paybill-000007'],/* 国际化处理: 操作*/
itemtype: 'customer',
attrcode: 'opr',
width: OperationColumn,
visible: true,
fixed: 'right',
render: (text, record, index) => {
let trueBtn = cardBodyAndInnerButtonVisible(that, that.state.buttonfalg, record.expandRowStatus, record, index);
return props.button.createOprationButton(trueBtn, {
area: "card_inner",
buttonLimit: 3,
onButtonClick: (props, key) => tableButtonClick(that, props, key, text, record, index)
});
}
});
// //设置表头分摊相关字段
// let pk_periodrule = that.props.form.getFormItemsValue(that.formId, 'pk_periodrule').value;
// meta[formId].items.map((item,index)=>{
// if(item.attrcode=='startdate'||item.attrcode=='enddate'){
// if(pk_periodrule){
// item.required = true;
// }else{
// item.required = false;
// }
// }
// })
return meta;
}
//处理外系统推付款单
export function dealOutToPaybill(props, appcode, pagecode) {
let url = "";
let data = {};
let srcbilltype = this.props.getUrlParam('srcbilltype')
if (srcbilltype == '21') {//采购订单订单付款
url = "/nccloud/arap/paybill/putopaybill.do";
data = {
pk_bills: cacheTools.get('21ToF3Pks'),
pageId: pagecode
}
} else if (srcbilltype == 'FCT1') {//付款合同付款
url = "/nccloud/arap/paybill/fct1topaybill.do";
data = {
pk_bills: cacheTools.get('fct1ToF3Pks'),
pageId: pagecode
}
} else if (srcbilltype == 'Z2') {//采购合同付款
url = "/nccloud/arap/paybill/z2topaybill.do";
data = {
pk_bills: cacheTools.get('Z2TOD3Pks'),
pageId: pagecode
}
}
ajax({
url: url,
data: data,
success: (res) => {
if (res.data) {
if(Array.isArray(res.data)){
pagecode = res.data[0].head[this.formId].rows[0].values.pk_tradetype.value;
}else{
pagecode = res.data.head[this.formId].rows[0].values.pk_tradetype.value;
}
this.data = res.data
init(this, props, appcode, pagecode, this.initShow)
} else {
this.props.form.EmptyAllFormValue(this.formId);
this.props.cardTable.setTableData(this.tableId, { rows: [] });
}
}
})
}
/*pmFWCFu5nhKkBzYmrkBakYqb4t+QDKrWy/miWT3MDKY=*/

View File

@ -0,0 +1,67 @@
/*j07c8riwYnz20MYibuDbtKRzyoQHuVaQOXRyHJYcGsY=*/
import {ajax,cardCache, clearToast} from 'nc-lightapp-front';
import { formId ,dataSource,pkname} from '../constants';
import initTemplate from './initTemplate';
import {throwSagaErrorAgency} from '../../../../public/components/pubUtils/MicroServiceSocket.js';
let { getCacheById, updateCache, setDefData } = cardCache;
import {updateCacheTss} from '../../../../public/components/updateTableDataTs';
export default function (props, pk) {
if(!pk){//如果刷新了浏览器那么pk将不会存在如果pk不存在return
return;
}
let cardData = getCacheById(pk, dataSource);
let tradeType = this.getPagecode();
if(cardData){
if(!props.getUrlParam("scene")){
let pagecode = cardData.head[this.formId].rows[0].values.pk_tradetype.value;
//更新url中的pagecode是为了切换模板重新查询按钮
props.setUrlParam({status:'browse',id:pk,pagecode:pagecode})
//点击上一张下一张单据时,要将单据的交易类型放入缓存(和切换交易类型一致),下次点击新增自制时,取缓存中的交易类型
setDefData('sessionTradeType', dataSource, pagecode);
if(tradeType !=pagecode){
initTemplate.call(this, this.props);
}
} else{
props.setUrlParam({id:pk})
}
props.form.setAllFormValue({ [this.formId]: cardData.head[this.formId] });
props.cardTable.setTableData(this.tableId, cardData.body[this.tableId],null, null, true,false,{ resetSort: true });
this.toggleShow('',cardData);
throwSagaErrorAgency.call(this,cardData)
}else{
let data = {
pk_bill: pk
};
ajax({
url: '/nccloud/arap/paybill/querycard.do',
data: data,
success: (res) => {
if (res.data) {
if (res.data.head) {
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],null, null, true,false,{ resetSort: true });
}
updateCache(pkname,pk,res.data,this.formId,dataSource);
updateCacheTss.call(this,{pkname,data:res.data,dataSource,tableId:this.tableId,formId:this.formId});
if(!props.getUrlParam("scene")){
let pagecode = res.data.head[formId].rows[0].values.pk_tradetype.value;
props.setUrlParam({id:pk,pagecode:pagecode})
setDefData('sessionTradeType', dataSource, pagecode);
if(tradeType !=pagecode){
initTemplate.call(this, this.props);
}
}else{
props.setUrlParam({id:pk})
}
this.toggleShow('',res);
throwSagaErrorAgency.call(this,res)
}
}
});
}
clearToast();
}
/*j07c8riwYnz20MYibuDbtKRzyoQHuVaQOXRyHJYcGsY=*/

View File

@ -0,0 +1,88 @@
/*0GI1xcoeligdpMeXoHBphrnqLawXs2pmyhj4kEvBMik=*/
import { ajax, base, toast, cardCache } from 'nc-lightapp-front';
import { tableId, dataSource, formId } from '../constants';
import { innerButton } from '../../../../public/components/pubUtils/buttonName.js';
import { copyInner, deleteInner, pasteInner } from '../../../../public/components/pubUtils/billPubUtil.js';
import { cardBodyControl } from '../../../../public/components/pubUtils/buttonvisible.js';
import { modifyChecknoItemtype } from '../../../../public/components/pubUtils/specialFieldAfterEvent.js';
export default function (that, props, key, text, record, index) {
switch (key) {
// 表格操修改
case innerButton.open_browse://展开
props.cardTable.toggleRowView(that.tableId, record);
break;
case innerButton.Close_browse://收起
props.cardTable.toggleRowView(that.tableId, record);
break;
case innerButton.open_edit:
let ishideAdd = false
let cardData = that.props.createMasterChildData(that.getPagecode(), that.formId, that.tableId);
if(cardData && cardData.body && cardData.body[that.tableId] && cardData.body[that.tableId].rows){
let bodyrows= cardData.body[that.tableId].rows;
for(let i=0;i<bodyrows.length;i++){
let top_billid = '';
let top_itemid = '';
if(bodyrows[i].values.top_billid){
top_billid = bodyrows[i].values.top_billid.value;
}
if(bodyrows[i].values.top_itemid){
top_itemid = bodyrows[i].values.top_itemid.value;
}
if( top_billid || top_itemid ){
ishideAdd = true
break
}
}
}
that.setState({hideAdd: ishideAdd})
//动态修改票据号字段类型
modifyChecknoItemtype(props, that.tableId, record.values.pk_org_v.value, record.values.checktype?record.values.checktype.value:null)
props.cardTable.openModel(tableId, 'edit', record, index);
break;
case innerButton.Copy_inner://复制行
copyInner(record, dataSource,that);
that.setState({
buttonfalg: false
}, () => {
cardBodyControl(props, that.state.buttonfalg);
let isrefund = props.form.getFormItemsValue(that.formId, 'isrefund')?props.form.getFormItemsValue(that.formId, 'isrefund').value : false
if(isrefund){
props.button.setButtonVisible(['AddLine', 'Insert_inner'], false);
}
})
break;
case innerButton.Insert_inner://插入行
let data = props.createMasterChildData(that.getPagecode(), formId, tableId);
//清空cardData的表体
data.body[tableId].rows = [];
ajax({
url: '/nccloud/arap/paybillpub/addline.do',
data: data,
success: (res) => {
let rowindex = index;
if (res.data && res.data.body) {
props.cardTable.addRow(tableId, index, res.data.body[tableId].rows[0].values);
} else {
props.cardTable.addRow(tableId);
rowindex = that.props.cardTable.getNumberOfRows(that.tableId);
}
that.props.cardTable.setValByKeyAndIndex(that.tableId, rowindex, 'prepay', { display:that.prepay.display,value:that.prepay.value})
}
});
break;
case innerButton.Delete_inner://删行
deleteInner(that, props, tableId, index);
//删行之后控制肩部按钮
that.onSelected();
break;
case innerButton.Paste_inner://粘贴至此
pasteInner(that, props, dataSource, tableId, index)
break;
default:
break;
}
};
/*0GI1xcoeligdpMeXoHBphrnqLawXs2pmyhj4kEvBMik=*/

View File

@ -0,0 +1,182 @@
/*Zqktha8lwfXAWZRCgtFOTNdNqMZuNDDIjwAwoTnhGJE=*/
import { ajax, base, toast, cardCache, promptBox } from 'nc-lightapp-front';
import { tableId, formId, leftarea, dataSource, pkname } from '../constants';
import { buttonClick } from './buttonClick';
import {toggleBtnStatus,throwSagaErrorAgency} from '../../../../public/components/pubUtils/MicroServiceSocket.js';
let { setDefData, getDefData, addCache, deleteCacheById, getCacheById, updateCache, } = cardCache;
import {updateCacheTss} from '../../../../public/components/updateTableDataTs';
export default function transferButtonClick(props, id) {
let that = this
let amount = props.transferTable.getTransformFormAmount(leftarea)
if (amount == 1) {
buttonClick.call(this, props, id);
return
}
switch (id) {
case 'Cancel':
{
promptBox({
color: 'warning',
title: this.state.json['paybill-000037'],/* 国际化处理: 请注意*/
content: this.state.json['paybill-000003'],/* 国际化处理: 确定要取消吗?*/
beSureBtnName: this.state.json['paybill-000039'],/* 国际化处理: 是*/
cancelBtnName: this.state.json['paybill-000040'],/* 国际化处理: 否*/
beSureBtnClick: () => {
if(this.props.getUrlParam('id')){
this.props.setUrlParam({ status: 'browse' });
let id = this.props.getUrlParam('id');
let cardData = getCacheById(id, dataSource);
if (cardData) {
this.props.beforeUpdatePage();//打开开关
this.props.form.EmptyAllFormValue(this.formId);
this.props.cardTable.setTableData(this.tableId, { rows: [] });
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');
this.props.updatePage(this.formId, this.tableId);//关闭开关
this.toggleShow();
}
}else {
props.transferTable.setTransformFormStatus(leftarea, {
status: false,
onChange: (current, next) => {
// toast({ color: 'success', content: '取消成功' });
}
})
}
}
})
}
break;
case 'Delete':
promptBox({
color: 'warning',
title: this.state.json['paybill-000002'] /* 国际化处理: 删除*/,
content: this.state.json['paybill-000006'] /* 国际化处理: ​确定要删除吗?*/,
noFooter: false,
noCancelBtn: false,
beSureBtnName: this.state.json['paybill-000004'] /* 国际化处理: 确定*/,
cancelBtnName: this.state.json['paybill-000005'] /* 国际化处理: 取消*/,
beSureBtnClick: () => {
ajax({
url: '/nccloud/arap/arappub/delete.do',
data: [{
pk_bill: this.props.getUrlParam('id'),
ts: this.props.form.getFormItemsValue(this.formId, 'ts').value,
billType: this.billType
}],
success: function (res) {
if (props.transferTable.getTransformFormAmount(leftarea) == 1) {
history.go(-1);
} else {
deleteCacheById(pkname, props.getUrlParam('id'), dataSource);
props.transferTable.setTransformFormStatus(leftarea, {
status: false,
onChange: (current, next) => {
toast({ color: 'success', content: that.state.json['paybill-000009'] });/* 国际化处理: 删除成功*/
}
})
}
}
})
}
});
break;
case 'Copy':
ajax({
url: '/nccloud/arap/arappub/copy.do',
data: {
pk_bill: props.getUrlParam('id'),
ts: this.props.form.getFormItemsValue(this.formId, 'ts').value,
pageId: this.getPagecode(),
billType: this.billType,
tradeType: this.getPagecode(),
},
success: (res) => {
if (res.data) {
if (res.data.head) {
this.props.form.EmptyAllFormValue(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, res.data.body[this.tableId]);
}
}
this.props.setUrlParam({ status: 'add' })
this.props.addUrlParam({ operFlag: 'copy' })
this.state.buttonfalg = true;
props.resMetaAfterPkorgEdit();
this.props.form.setFormItemsDisabled(this.formId, { 'pk_org_v': false });
this.toggleShow()
}
});
break;
default:
buttonClick.call(this, props, id);
break;
}
}
export function setValue(props, res) {
this.props.beforeUpdatePage();//打开开关
if(res){
toggleBtnStatus.call(this,res,'card_head');
}
if (res.data.head && res.data.head[formId]) {
props.form.setAllFormValue({ [formId]: res.data.head[formId] });
}
if (res.data.body && res.data.body[tableId]) {
props.cardTable.updateDataByRowId(this.tableId, res.data.body[this.tableId]);
}
let pk_paybill = this.props.form.getFormItemsValue(this.formId, 'pk_paybill').value
let newCardData = this.props.createMasterChildData(
this.getPagecode(),
this.formId,
this.tableId
);
let pkvalues = [];
let amount = this.props.cardTable.getNumberOfRows(this.tableId) * 1
for(var i =0 ; i< amount; i++){
let top_itemid = this.props.cardTable.getValByKeyAndIndex(this.tableId, i, 'top_itemid').value;
let top_termch = this.props.cardTable.getValByKeyAndIndex(this.tableId, 0, 'top_termch');
if(top_termch && top_termch.value){
top_itemid = top_itemid + '@' + top_termch.value;
}
pkvalues.push(top_itemid);
// pkvalues.push(this.props.cardTable.getValByKeyAndIndex(this.tableId, i, 'top_itemid').value);
}
/**
* 保存转单上游选中表体pks到转单的dataSource中
*/
props.transferTable.savePk(props.getUrlParam("dataSource"), pkvalues);
/**
* 将新增单据数据保存到dataSource
*/
if (props.getUrlParam('status') == 'add') {
addCache(pk_paybill, newCardData, formId, dataSource)
}else {
updateCache(pkname, pk_paybill, newCardData, formId, dataSource);
updateCacheTss.call(this,{pkname,data:res.data,dataSource,tableId:this.tableId,formId:this.formId});
}
this.props.updatePage(this.formId, this.tableId);//关闭开关
this.props.transferTable.setTransformFormStatus(leftarea, {
status: true
//onChange: (current, next, currentIndex) => {
// // toast({ color: 'success', content: this.state.json['paybill-000026'] });/* 国际化处理: 操作成功*/
// this.transferIndex = currentIndex + 1;
// this.Info.isNeedSelect = true
// props.transferTable.setTransferListValueByIndex(
// leftarea,
// newCardData,
// currentIndex
// )
//}
})
throwSagaErrorAgency.call(this,res)
}
/*Zqktha8lwfXAWZRCgtFOTNdNqMZuNDDIjwAwoTnhGJE=*/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,40 @@
/*kHr1VQMdEU42oXEu346enGx+6rXJ4OFHE2VimKRgjU4=*/
/**
* 查询区域
*/
export const searchId = 'query';
/**
* 列表区域
*/
export const tableId = 'list';
/**
* 单据类型
*/
export const billType = 'F3';
/**
* 默认交易类型
*/
export const tradeType = 'D3';
/**
* 默认模板节点标识
*/
export const nodekey = "list";
/**
* 单页应用缓存
*/
export const dataSource = 'fi.arap.paybill.20080EBM';
/**
* 单页应用缓存主键名字(该名字为表的主键名字)
*/
export const pkname = 'pk_paybill';
export const searchKey = 'pk_paybill_search';
/*kHr1VQMdEU42oXEu346enGx+6rXJ4OFHE2VimKRgjU4=*/

View File

@ -0,0 +1,673 @@
/*q2LCmxM8POvl78IL0LiydiXQT6yFM8mpfFEU8+B79Fw=*/
import { ajax, toast, printer, cardCache, promptBox } from 'nc-lightapp-front';
import { billType, tradeType, dataSource, searchId, tableId,pkname } from '../constants';
import { headButton } from '../../../../public/components/pubUtils/buttonName.js';
import { getTransferInfo } from '../../../../public/components/pubUtils/transferButtonUtil.js';
import { imageScan, imageView } from 'sscrp/rppub/components/image';
import arapLinkReport from '../../../../public/components/arapBillLinkReport.js';
import linkvouchar from '../../../../public/components/linkvouchar.js';
import madeBill from '../../../../public/components/madeBill.js';
import { getContext, loginContextKeys } from '../../../../public/components/arapInitInfo/loginContext';
import { batchGenerate, batchSendSpAndCancelSenSPPubFun } from '../../../../public/components/pubUtils/billPubUtil.js';
import IndependentSettleUtil from 'sp/pub/utils/IndependentSettleUtil';
import { moduleEnable, IMAG } from '../../../../public/components/moduleEnable.js';
import {ListAllocperiodruleLinkQuery} from '../../../../public/components/allocation.js';
let { getDefData, setDefData } = cardCache;
import linkSourceList from '../../../../public/components/linkSourceList.js';
import updateTableDataTs,{getAllCheckedDataNew,deleteTableRowsByRowIds,deleteCachePKAndTS} from '../../../../public/components/updateTableDataTs';
export default function buttonClick(props, id) {
const { openToIndepSettle } = IndependentSettleUtil;
let code = getContext(loginContextKeys.transtype);
let pagecode = props.getSearchParam('p');
this.dataInSaga.butncode = id;
switch (id) {
case headButton.Add:
pagecode = getDefData('sessionTradeType', dataSource);
if (code) {
pagecode = code;
} else if (!pagecode) {
pagecode = tradeType;
}
props.pushTo('/card', {
status: 'add',
pagecode: pagecode
});
break;
case headButton.Commit: // 批量提交
commitOpreration(this, this.props, this.tableId, billType, headButton.Commit);
break;
case headButton.Uncommit: // 批量收回
commitOpreration(this, this.props, this.tableId, billType, headButton.Uncommit);
break;
case headButton.Generate://生成
batchGenerate(this)
break;
case headButton.SendSP://传结算
batchSendSpAndCancelSenSPPubFun(this, 1)
break;
case headButton.CancelSendSP://取消传结算
batchSendSpAndCancelSenSPPubFun(this, 2)
break;
case headButton.Delete:
promptBox({
color: 'warning',
title: this.state.json['paybill-000002'] /* 国际化处理: 删除*/,
content: this.state.json['paybill-000052'] /* 国际化处理: ​确定要删除所选数据吗?*/,
noFooter: false,
noCancelBtn: false,
beSureBtnName: this.state.json['paybill-000004'] /* 国际化处理: 确定*/,
cancelBtnName: this.state.json['paybill-000005'] /* 国际化处理: 取消*/,
beSureBtnClick: () => {
// let delObjs = getAllCheckedData.call(this, this.props, this.tableId, billType);
let {delObjs ,rowIds}= getAllCheckedDataNew.call(this, this.props, this.tableId, billType,pkname);
if (delObjs.length == 0) {
toast({ color: 'warning', content: this.state.json['paybill-000012'] }); /* 国际化处理: 请选中至少一行数据!*/
return;
}
// if (delObjs.length == 1) {
// this.Info.pk_bill = delObjs[0].pk_bill;
// this.Info.ts = delObjs[0].ts;
// this.Info.index = delObjs[0].index;
// this.delConfirm();
// } else {
ajax({
url: '/nccloud/arap/arappub/delete.do',
data: delObjs,
success: (res) => {
let { success, data } = res;
if (success) {
if (data) {
toast({
duration: 'infinity',
color: data.PopupWindowStyle,
content: data.errMsg
});
//删除当前行数据
// props.table.deleteTableRowsByIndex(tableId, data.successIndexs);
deleteTableRowsByRowIds.call(this,{props,data,rowIds,tableId});
//删除缓存数据
if(data.successPKs){
// props.table.deleteCacheId(tableId, data.successPKs);
deleteCachePKAndTS.call(this,{props,tableId,successPKs:data.successPKs,checkedRows:delObjs,pkId:'pk_bill',pkname});
}
//列表控制按钮
this.onSelected();
}
}
}
});
// }
}
});
break;
case headButton.MadeBill: //制单
madeBill(
this,
props,
this.props.table.getCheckedRows(this.tableId,false),
'pk_paybill',
props.getSearchParam('c'),
true
);
break;
case headButton.BillLinkQuery: //联查单据
let selectInfo = getFirstCheckedData.call(this,this.props, this.tableId);
this.Info.pk_bill = selectInfo.data.values.pk_paybill.value;
this.Info.pk_tradetype = selectInfo.data.values.pk_tradetype.value;
this.setState({
showBillTrack: true
});
break;
case headButton.LinkInvoice: //发票查看
if (!moduleEnable(this, IMAG)) { //校验关联模块是否启用
return;
}
this.setState({ showSSCmodule: true });
let InvoiceInfo = getFirstCheckedData.call(this,this.props, this.tableId);
const billId = InvoiceInfo.data.values.pk_paybill.value;
const billtype = InvoiceInfo.data.values.pk_billtype.value;
const billCode = InvoiceInfo.data.values.billno.value;
const pk_org = InvoiceInfo.data.values.pk_org.value;
const tradetype = InvoiceInfo.data.values.pk_tradetype.value;
const viewRandom = new Date().getTime();
this.setState({
sscivmInvoiceData: { billId, billtype, billCode, pk_org, tradetype, viewRandom }
});
break;
case headButton.LinkAprv: //审批详情
let LinkAprvData = this.props.table.getCheckedRows(this.tableId,false)[0];
if (LinkAprvData) {
this.Info.pk_bill = LinkAprvData.data.values.pk_paybill.value;
this.Info.pk_tradetype = LinkAprvData.data.values.pk_tradetype.value;
this.setState({
showApproveDetail: true
});
} else {
toast({ color: 'warning', content: this.state.json['paybill-000029'] }); /* 国际化处理: 请选中一行数据!*/
}
break;
case headButton.ConnectSettleInfo: //关联结算信息
ajax({
url: '/nccloud/arap/arappub/validatecmp.do',
data: null,
success: (res) => {
if (res.success) {
pagecode = getDefData('sessionTradeType', dataSource);
if (code) {
pagecode = code;
} else if (!pagecode) {
pagecode = tradeType;
}
openToIndepSettle({
props,
direction: "1",
pk_billtypecode:"F3",
rollbackAppcode: props.getSearchParam('c'),
rollbackPageCode: pagecode
})
}
}
});
break;
case headButton.LinkInformer: //到账通知
let InformerInfo = getFirstCheckedData.call(this,this.props, this.tableId);
ajax({
url: '/nccloud/arap/arappub/linkinformer.do',
data: Object.assign({
pk_bill: InformerInfo.data.values.pk_paybill.value,
billType: billType
}, this.dataInSaga),
success: (res) => {
if (res.success && res.data) {
let length = res.data.length;
if (length == 1) {
props.openTo('/nccloud/resources/cmp/informer/LinkBill/card/index.html', {
appcode: '36070AISC',
pagecode: '36070AILLINK',
status: 'browse',
id: res.data
});
} else {
props.openTo('/nccloud/resources/cmp/informer/LinkBill/list/index.html', {
appcode: '36070AISC',
pagecode: '36070AICLINK',
status: 'browse',
ids: res.data
});
}
}
}
});
break;
case headButton.LinkBal: //联查余额表
let linkBalInfo = getFirstCheckedData.call(this,this.props, this.tableId);
arapLinkReport(
this.props,
linkBalInfo.data.values.pk_paybill.value,
billType,
linkBalInfo.data.values.objtype.value,
linkBalInfo.data.values.pk_org_v
);
break;
case headButton.LinkDeal: //联查处理情况
let dealInfo = getFirstCheckedData.call(this,this.props, this.tableId);
ajax({
url: '/nccloud/arap/arappub/linkdeal.do',
data: Object.assign({
pk_bill: dealInfo.data.values.pk_paybill.value,
ts: dealInfo.data.values.ts.value,
billType: billType
}, this.dataInSaga),
success: (res) => {
if (res.success) {
//打开处理情况模态框
let data = res.data;
//当前选中数据的第一行的交易类型和单据号,用于联查处理情况的模态框上面的显示
let checkedData = this.props.table.getCheckedRows(this.tableId,false)[0].data.values;
this.Info.combinedExaminationData = data;
this.Info.pk_tradetypeid = checkedData.pk_tradetypeid
? checkedData.pk_tradetypeid.display
: null;
this.Info.billno = checkedData.billno ? checkedData.billno.value : null;
this.handleCombined();
}
}
});
break;
case headButton.LinkVouchar: //联查凭证
let voucharInfo = getFirstCheckedData.call(this,this.props, this.tableId);
linkvouchar(this, props, voucharInfo, voucharInfo.data.values.pk_paybill.value, props.getSearchParam('c'));
break;
case headButton.LinkConfer: //联查协同单据
let conferInfo = getFirstCheckedData.call(this,this.props, this.tableId);
ajax({
url: '/nccloud/arap/arappub/linkconfer.do',
async: false,
data: Object.assign({
pk_bill: conferInfo.data.values.pk_paybill.value,
billType: billType
}, this.dataInSaga),
success: (res) => {
let data = res.data;
if (data) {
props.openTo(data.url, data.condition);
}
}
});
break;
case headButton.LinkTbb: //联查计划预算
let tbbInfo = getFirstCheckedData.call(this,this.props, this.tableId);
ajax({
url: '/nccloud/arap/arappub/linktbb.do',
data: {
pk_bill: tbbInfo.data.values.pk_paybill.value,
billType: billType
},
success: (res) => {
this.Info.tbbLinkSourceData = res.data;
this.setState({
isTbbLinkshow: true
});
}
});
break;
case headButton.Print: //打印
let printData = this.props.table.getCheckedRows(this.tableId);
if (printData.length == 0) {
toast({ color: 'warning', content: this.state.json['paybill-000029'] }); /* 国际化处理: 请选中一行数据!*/
return;
}
let pk_bills = [];
printData.forEach((val) => {
pk_bills.push(val.data.values ? val.data.values.pk_paybill.value : val.data.pk);
});
this.printData.oids = pk_bills;
this.printData.nodekey = 'card';
this.onPrint();
break;
case headButton.PrintList: //打印清单
printData = this.props.table.getCheckedRows(this.tableId);
pk_bills = [];
printData.forEach((val) => {
pk_bills.push(val.data.values ? val.data.values.pk_paybill.value : val.data.pk);
});
if (pk_bills.length == 0) {
toast({ color: 'warning', content: this.state.json['paybill-000029'] }); /* 国际化处理: 请选中一行数据!*/
return;
}
this.printData.oids = pk_bills;
this.printData.nodekey = 'list';
// printer(
// 'pdf', //支持两类: 'html'为模板打印, 'pdf'为pdf打印
// '/nccloud/arap/arappub/print.do', //后台服务url
// this.printData
// );
this.printPreviewBill(true);
break;
case headButton.Output: //打印输出
printData = this.props.table.getCheckedRows(this.tableId);
if (printData.length == 0) {
toast({ color: 'warning', content: this.state.json['paybill-000029'] }); /* 国际化处理: 请选中一行数据!*/
return;
}
pk_bills = [];
printData.forEach((val) => {
pk_bills.push(val.data.values ? val.data.values.pk_paybill.value : val.data.pk);
});
this.outputData.oids = pk_bills;
this.outputData.nodekey = 'card';
this.printOutput();
break;
case headButton.OutputList: //输出清单
printData = this.props.table.getCheckedRows(this.tableId);
if (printData.length == 0) {
toast({ color: 'warning', content: this.state.json['paybill-000029'] }); /* 国际化处理: 请选中一行数据!*/
return;
}
pk_bills = [];
printData.forEach((val) => {
pk_bills.push(val.data.values ? val.data.values.pk_paybill.value : val.data.pk);
});
this.outputData.oids = pk_bills;
this.outputData.nodekey = 'list';
this.printOutput();
break;
case headButton.OfficalPrint: //正式打印
printData = this.props.table.getCheckedRows(this.tableId);
if (printData.length == 0) {
toast({ color: 'warning', content: this.state.json['paybill-000029'] }); /* 国际化处理: 请选中一行数据!*/
return;
}
pk_bills = [];
printData.forEach((val) => {
let pkBill = val.data.values ? val.data.values.pk_paybill.value : val.data.pk;
pk_bills.push(pkBill+"_"+val.index);
});
this.printData.oids = pk_bills;
this.printData.nodekey = 'card';
this.officalPrintOutput();
break;
case headButton.CancelPrint: //取消正式打印
printData = this.props.table.getCheckedRows(this.tableId);
if (printData.length == 0) {
toast({ color: 'warning', content: this.state.json['paybill-000029'] }); /* 国际化处理: 请选中一行数据!*/
return;
}
pk_bills = [];
printData.forEach((val) => {
let pkBill = val.data.values ? val.data.values.pk_paybill.value : val.data.pk;
pk_bills.push(pkBill+"_"+val.index);
});
this.printData.oids = pk_bills;
this.printData.nodekey = 'card';
this.cancelPrintOutput();
break;
case headButton.ExportData: //导出
if (this.state.forceRender) {
this.setState({ forceRender: false })
}
let outputData = this.props.table.getCheckedRows(this.tableId);
pk_bills = [];
outputData.forEach((val) => {
pk_bills.push(val.data.values ? val.data.values.pk_paybill.value : val.data.pk);
});
if (pk_bills.length == 0) {
toast({ color: 'warning', content: this.state.json['paybill-000029'] }); /* 国际化处理: 请选中一行数据!*/
return;
}
this.Info.selectedPKS = pk_bills; //传递主键数组,之前nc需要导出的加主键
this.props.modal.show('exportFileModal'); //不需要导出的只执行这行代码
break;
case headButton.Refresh: //刷新
let data = getDefData(searchId, dataSource);
if (data) {
data.queryInfo.pageInfo = this.props.table.getTablePageInfo(this.tableId);//重新获取分页信息
ajax({
url: '/nccloud/arap/paybill/queryscheme.do',
data: Object.assign(data, this.dataInSaga),
success: (res) => {
let { success, data } = res;
if (success) {
if (data) {
toast({ color: 'success', title: this.state.json['paybill-000051'] }); /* 国际化处理: 刷新成功*/
this.props.table.setAllTableData(this.tableId, data[this.tableId]);
setDefData(this.tableId, dataSource, data); //放入缓存
this.onSelected();
} else {
toast({ color: 'success', title: this.state.json['paybill-000051'] }); /* 国际化处理: 刷新成功*/
this.props.table.setAllTableData(this.tableId, { rows: [] });
}
}
}
});
}else if ('browse' == this.props.getUrlParam('status')&&'fip' == this.props.getUrlParam('scene')) {
//联查
linkSourceList(this.props, this.tableId);
} else {
toast({ color: 'success', title: this.state.json['paybill-000051'] }); /* 国际化处理: 刷新成功*/
this.props.table.setAllTableData(this.tableId, { rows: [] });
}
break;
case headButton.ReceiptCheck: //影像查看pk_tradetype
if (!moduleEnable(this, IMAG)) { //校验关联模块是否启用
return;
}
let CheckInfo = getFirstCheckedData.call(this,this.props, this.tableId);
var billInfoMap = {};
//基础字段 单据pk,单据类型,交易类型,单据的组织
billInfoMap.pk_billid = CheckInfo.data.values.pk_paybill.value;
billInfoMap.pk_billtype = CheckInfo.data.values.pk_billtype.value;
billInfoMap.pk_tradetype = CheckInfo.data.values.pk_tradetype.value;
billInfoMap.pk_org = CheckInfo.data.values.pk_org.value;
imageView(billInfoMap, 'iweb');
break;
case headButton.ReceiptScan: //影像扫描
if (!moduleEnable(this, IMAG)) { //校验关联模块是否启用
return;
}
let ScanInfo = getFirstCheckedData.call(this,this.props, this.tableId);
var billInfoMap = {};
//基础字段 单据pk,单据类型,交易类型,单据的组织
billInfoMap.pk_billid = ScanInfo.data.values.pk_paybill.value;
billInfoMap.pk_billtype = ScanInfo.data.values.pk_billtype.value;
billInfoMap.pk_tradetype = ScanInfo.data.values.pk_tradetype.value;
billInfoMap.pk_org = ScanInfo.data.values.pk_org.value;
//影像所需 FieldMap
billInfoMap.BillType = ScanInfo.data.values.pk_tradetype.value;
billInfoMap.BillDate = ScanInfo.data.values.creationtime.value;
billInfoMap.Busi_Serial_No = ScanInfo.data.values.pk_paybill.value;
// billInfoMap.pk_billtype = billdata.head.head.rows[0].values.pk_billtype.value;
billInfoMap.OrgNo = ScanInfo.data.values.pk_org.value;
billInfoMap.BillCode = ScanInfo.data.values.billno.value;
billInfoMap.OrgName = ScanInfo.data.values.pk_org_v.display;
billInfoMap.Cash = ScanInfo.data.values.money.value;
imageScan(billInfoMap, 'iweb');
break;
case headButton.AttachManage:
let AttachInfo = getFirstCheckedData.call(this,this.props, this.tableId);
this.Info.pk_bill = AttachInfo.data.values.pk_paybill.value;
this.Info.billno = AttachInfo.data.values.billno.value;
//设置付款框左侧分组
setBillConfig(this);
this.setState({
showUploader: true,
target: null
});
break;
case headButton.AllocperiodruleLinkQuery:
ListAllocperiodruleLinkQuery(this);
break;
default:
let transferInfo = getTransferInfo(this, id);
if (transferInfo) {
ajax({
url: '/nccloud/arap/arappub/queryrelatedapp.do',
data: {
billType: transferInfo.src_billtype,
transTypes: transferInfo.transtypes
},
success: (res) => {
if (res) {
//将业务流程放入缓存
setDefData(
transferInfo.src_billtype + transferInfo.transtypes[0],
'transfer.dataSource',
transferInfo.busitypes
);
let dest_tradetype = getDefData('sessionTradeType', dataSource);
if (code) {
dest_tradetype = code;
} else if (!dest_tradetype) {
dest_tradetype = tradeType;
}
let url = '/' + transferInfo.src_billtype;
props.pushTo(url, {
//appcode:res.data.appcode,
src_appcode: res.data.appcode,
src_tradetype: transferInfo.transtypes[0], //来源交易类型
dest_billtype: billType,
dest_tradetype: dest_tradetype
});
}
}
});
}
break;
}
}
//获取选中数据的第一行,选中多行的时候只取第一行数据
let getFirstCheckedData = function (props, tableId) {
let checkedData = props.table.getCheckedRows(tableId,false);
let checkedObj;
if (checkedData.length > 0) {
checkedObj = checkedData[0];
} else {
toast({ color: 'warning', content: this.state.json['paybill-000029'] }); /* 国际化处理: 请选中一行数据!*/
return;
}
return checkedObj;
};
//获取选中数据的id和billType
let getAllCheckedData = function (props, tableId, billType) {
let checkedData = props.table.getCheckedRows(tableId);
let checkedObj = [];
checkedData.forEach((val) => {
checkedObj.push(Object.assign({
pk_bill: val.data.values ? val.data.values.pk_paybill.value : val.data.pk,
billno: val.data.values?val.data.values.billno.value:val.data.billno,
ts: val.data.values ? val.data.values.ts.value : val.data.ts,
billType: billType,
index: val.index,
rowid:val.data&&val.data.rowid?val.data.rowid:'',
pageId: props.getSearchParam('p')
}, this.dataInSaga));
});
return checkedObj;
};
let commitOpreration = function (that, props, tableId, billType, actionType) {
let commitParams = getAllCheckedData.call(that, props, tableId, billType);
if (commitParams.length == 0) {
toast({ color: 'warning', content: that.state.json['paybill-000012'] }); /* 国际化处理: 请选中至少一行数据!*/
return;
}
let ajaxUrl = '';
if (actionType == headButton.Commit) {
ajaxUrl = '/nccloud/arap/arappub/batchcommit.do';
} else if (actionType == headButton.Uncommit) {
ajaxUrl = '/nccloud/arap/arappub/batchuncommit.do';
}
if (commitParams.length == 1 && actionType == headButton.Commit) {
let checkedRows=props.table.getCheckedRows(tableId);
//单条的时候走单条的处理
that.Info.tipUrl = '/nccloud/arap/arappub/commit.do';
that.Info.record = checkedRows[0].data.values?checkedRows[0].data.values:checkedRows[0].data;
that.Info.record.numberindex = { scale: 0, value: commitParams[0].index + 1 };
that.commitAndUncommit();
return;
}
ajax({
url: ajaxUrl,
data: commitParams,
success: (res) => {
let { success, data } = res;
if (success) {
// if (data.grid) {
// let grid = data.grid;
// let updateValue = [];
// for (let key in grid) {
// updateValue.push({ index: key, data: { values: grid[key].values } });
// }
// props.table.updateDataByIndexs(tableId, updateValue);
// props.table.selectAllRows(tableId, false) //由于平台没支持跨页 操作后updateDataByIndexs 取消跨页勾选,此处自己调一次全部取消勾选
// }
if(data&&data.grid){
updateTableDataTs.call(that,{props,data,tableId});
}
if (data.message) {
toast({
duration: 'infinity',
color: data.PopupWindowStyle,
content: data.message
});
that.onSelected();
}
}
}
});
};
/**
* qinwef 2022-0211
* 加载附件管理左侧分组
*/
function setBillConfig(that) {
let selectInfo = getFirstCheckedData.call(that,that.props, that.tableId);
let billPK = selectInfo.data.values.pk_paybill.value;
let billno = selectInfo.data.values.billno.value;
let billType = selectInfo.data.values.pk_billtype.value;
let nowBillTypeName = that.state.json['paybill-000064'];
// if(billno!=null&&billno!='undefined'&&billno!='null'&&billno!=''){
// nowBillTypeName=nowBillTypeName+billno;
// }
//初始设置:主单据
that.Config.billConfig = [{
billId: billPK,
folderName: nowBillTypeName,
disableButton:JSON.stringify( ["fs_group_delete","fs_group_edit"]),
showtype: "SHOWTYPE20"
},{
billId:billPK+"/"+that.state.json['paybill-000066'],
folderName: that.state.json['paybill-000066'],
disableButton: JSON.stringify( ["fs_group_add","fs_group_delete","fs_group_edit","fs_delete","fs_move","fs_edit","fs_upload"]),
showtype: "SHOWTYPE40"
}];
//进行单据追溯,查询上游单据
let datas = {
"queryCondition": {
"bill_PK": billPK,
"bill_type": billType
}
};
ajax({
url: '/nccloud/baseapp/riart/billFlow/billFlowAction.do',
data: datas,
async:false,
success: (res) => {
let upBillInfo = res.data;
let upBillIdList = [];
let upBillTypeMap = new Map();
let upBillTypeNameMap = new Map();
let upBillnoMap = new Map();
let upForwardMap = new Map();
if (upBillInfo != null && upBillInfo.length > 0) {
for (let i = 0; i < upBillInfo.length; i++) {
let isForward = upBillInfo[i].isForward;
let billId = upBillInfo[i].lightBillVO.billID;
let billTypeName = upBillInfo[i].lightBillVO.billTypeName;
let billType = upBillInfo[i].lightBillVO.billType;
let billno= upBillInfo[i].lightBillVO.billCode;
if (billId != null&&billPK!=billId&&isForward<0) {
upBillIdList.push(billId);
upBillTypeMap.set(billId, billType);
upBillTypeNameMap.set(billId, billTypeName);
upBillnoMap.set(billId,billno);
upForwardMap.set(isForward);
}
}
}
if (upBillIdList != null && upBillIdList.length > 0) {
for(let j=0;j<upBillIdList.length;j++){
let pkbill=upBillIdList[j];
let pk_billtype=upBillTypeMap.get(pkbill);
let billcon = {
billId: pkbill,
folderName: upBillTypeNameMap.get(upBillIdList[j])+upBillnoMap.get(upBillIdList[j]),
disableButton: JSON.stringify( ["fs_group_add","fs_group_delete","fs_group_edit","fs_delete","fs_move","fs_edit","fs_upload_url","fs_upload"]),
showtype: "SHOWTYPE40"
};
that.Config.billConfig.push(billcon);
}
}
}
})
}
/*q2LCmxM8POvl78IL0LiydiXQT6yFM8mpfFEU8+B79Fw=*/

View File

@ -0,0 +1,29 @@
/*cPNGnaeBPyStdnXF1v4DzvVIxTefC48Ooe2HpMq06fo=*/
import { cardCache } from 'nc-lightapp-front';
let { setDefData } = cardCache;
import { searchId, searchKey, dataSource } from '../constants';
export default function doubleClick(record, index, e) {
//表页跳转的时候,获取所有查询区条件,并放入缓存
let searchVal = this.props.search.getAllSearchData(searchId);
if (searchVal) {
setDefData(searchKey, dataSource, searchVal);
}
if (this.props.getUrlParam("scene") == 'linksce' || this.props.getUrlParam("scene") == 'fip') {
this.props.pushTo('/card', {
status: 'browse',
id: record.pk_paybill.value,
pagecode: '20080EBM_CARD_LINK',
scene: 'linksce'
})
} else {
this.props.pushTo('/card', {
status: 'browse',
id: record.pk_paybill.value,
pagecode: record.pk_tradetype.value,
})
}
}
/*cPNGnaeBPyStdnXF1v4DzvVIxTefC48Ooe2HpMq06fo=*/

View File

@ -0,0 +1,9 @@
/*zSUoWKMuZerEXLsc4aAHfpzRg5lzN2RmctWmdBaiPTc=*/
import searchBtnClick from './searchBtnClick';
import initTemplate from './initTemplate';
import pageInfoClick from './pageInfoClick';
import buttonClick from './buttonClick';
import doubleClick from './doubleClick';
export { searchBtnClick, pageInfoClick,initTemplate,buttonClick ,doubleClick};
/*zSUoWKMuZerEXLsc4aAHfpzRg5lzN2RmctWmdBaiPTc=*/

View File

@ -0,0 +1,161 @@
/*pmFWCFu5nhKkBzYmrkBakYqb4t+QDKrWy/miWT3MDKY=*/
import { createPage, ajax, base, toast ,cardCache } from 'nc-lightapp-front';
import excelImportconfig from 'uap/common/components/excelImportconfig';
let { NCPopconfirm, NCIcon } = base;
import tableButtonClick from './tableButtonClick';
import { buttonVisible, getButtonsKey ,getInnerButtonkey} from '../../../../public/components/pubUtils/buttonvisible.js';
import { tableId, searchId, billType, tradeType,dataSource, searchKey } from '../constants';
import { headButton ,innerButton} from '../../../../public/components/pubUtils/buttonName.js';
import {modifierSearchMetas} from '../../../../public/components/pubUtils/arapListSearchRefFilter';
let { setDefData, getDefData } = cardCache;
import { loginContext, getContext, loginContextKeys } from '../../../../public/components/arapInitInfo/loginContext';
import setDefOrgBilldateSrchArea from '../../../../public/components/defOrgBilldateSrchArea.js';
import {OperationColumn} from '../../../../public/components/pubUtils/arapConstant';
export default function (props,callback) {
const that = this;
let pagecode = that.getPagecode();
let appcode = props.getSearchParam('c') ? props.getSearchParam('c') : props.getUrlParam('c');
let excelimportconfig = excelImportconfig(props, "arap", billType,true,"",{"appcode":appcode,"pagecode":"20080EBM_CARD"});
let tradetype = getTradeType()
props.createUIDom(
{
pagecode: pagecode,//页面id
appcode: appcode,//注册按钮的id
reqDataQueryallbtns: {
rqUrl: '/arap/arappub/queryallbtns.do',
rqJson: `{\n \"pagecode\": \"${pagecode}\",\n \"appcode\": \"${appcode}\"\n,\n \"billtype\": \"${billType}\"\n,\n \"tradetype\": \"${tradetype}\"\n}`,
rqCode: 'button'
},
reqDataQuerypage: {
rqUrl: '/arap/arappub/querypage.do',
rqJson: `{\n \"pagecode\": \"${pagecode}\",\n \"appcode\": \"${appcode}\"\n}`,
rqCode: 'template'
}
},
function (data) {
if (data) {
if(!data.template[tableId]){
return;
}
let lineButton = [];
if (data.button && data.button.button) {
let button = data.button.button;
let pullBillInfoVOAry = data.button.pullbillinfo
that.Info.pullBillInfoVOAry = pullBillInfoVOAry
lineButton = getInnerButtonkey(button);
getButtonsKey(button, that.Info.allButtonsKey);//获取所有按钮
props.button.setButtons(button);
props.button.setPopContent(innerButton.Delete_Inner, that.state.json['paybill-000006']);/*删除信息提示框*//* 国际化处理: 确定要删除吗?*/
props.button.setUploadConfig("ImportData", excelimportconfig);
}
if (data.template) {
//高级查询设置财务组织默认值
setDefOrgBilldateSrchArea(props, searchId, data);
let meta = data.template;
meta = modifierMeta(that,props, meta,lineButton);
props.meta.setMeta(meta,() => {
if (data.context.paramMap != null&&data.context.paramMap.transtype_name&&data.context.paramMap.pk_transtype){
props.search.setSearchValByField(searchId, 'pk_tradetypeid', { display: data.context.paramMap.transtype_name, value: data.context.paramMap.pk_transtype });
}
});
modifierSearchMetas(searchId, props, meta, billType,data.context.paramMap?data.context.paramMap.transtype:null, that);
}
if (data.context) {
// 初始化上下文变量
loginContext(data.context);
if(getContext(loginContextKeys.transtype)){
if (that.refs.tradetypeBtn) {
that.refs.tradetypeBtn.setVisible(false);
}
}
}
if(callback){
callback()
}
}
}
)
}
function modifierMeta(that,props, meta,lineButton) {
meta[tableId].items = meta[tableId].items.map((item, key) => {
if (item.attrcode == 'billno') {
item.render = (text, record, index) => {
return (
<a
style={{ textDecoration: 'none', cursor: 'pointer' }}
onClick={() => {
let searchVal = props.search.getAllSearchData(searchId);
if (searchVal) {
setDefData(searchKey, dataSource, searchVal);
}
if (props.getUrlParam("scene") == 'linksce' || props.getUrlParam("scene") == 'fip') {
props.pushTo('/card', {
status: 'browse',
id: record.pk_paybill.value,
pagecode:'20080EBM_CARD_LINK',
scene:'linksce'
})
}else{
props.pushTo('/card', {
status: 'browse',
id: record.pk_paybill.value,
pagecode:record.pk_tradetype.value,
})
}
}}
>
{record.billno && record.billno.value}
</a>
);
};
}
return item;
});
//添加操作列
meta[tableId].items.push({
label: that.state.json['paybill-000007'],/* 国际化处理: 操作*/
itemtype: 'customer',
attrcode: 'opr',
width: OperationColumn,
visible: true,
fixed: 'right',
render: (text, record, index) => {
let buttonAry = lineButton ? lineButton : [];
let trueBtn = [];
for (let i = 0; i < buttonAry.length; i++) {
let flag = buttonVisible('browse', record, buttonAry[i]);
if (flag) {
trueBtn.push(buttonAry[i]);
}
}
return props.button.createOprationButton(trueBtn, {
area: "list_inner",
buttonLimit: 3,
onButtonClick: (props, key) => tableButtonClick(that,props, key, text, record, index)
});
}
});
return meta;
}
function getTradeType(){
let cacheTradeType = getDefData('sessionTradeType', dataSource);
if (cacheTradeType != null && cacheTradeType != undefined) {
return cacheTradeType;
} else {
return tradeType;
}
}
/*pmFWCFu5nhKkBzYmrkBakYqb4t+QDKrWy/miWT3MDKY=*/

View File

@ -0,0 +1,31 @@
/*j07c8riwYnz20MYibuDbtKRzyoQHuVaQOXRyHJYcGsY=*/
import {ajax} from 'nc-lightapp-front';
import { tableId} from '../constants';
export default function (props, config, pks) {
let that = this;
if(!pks || pks.length == 0){
return ;
}
let data = {
pk_bills: pks,
pageId: props.getSearchParam('p')
};
ajax({
url: '/nccloud/arap/paybill/querygridbyids.do',
data: data,
success: function (res) {
let { success, data } = res;
if (success) {
if (data) {
props.table.setAllTableData(tableId, data[tableId]);
} else {
props.table.setAllTableData(tableId, { rows: [] });
}
}
that.onSelected();
}
});
}
/*j07c8riwYnz20MYibuDbtKRzyoQHuVaQOXRyHJYcGsY=*/

View File

@ -0,0 +1,48 @@
/*YuO8szH0cVixePu/Bt+mG6B82aSbGhMosB18vg69kDk=*/
import {ajax,toast,cardCache} from 'nc-lightapp-front';
import { tableId, searchId,dataSource} from '../constants';
let {setDefData, getDefData } = cardCache;
import { loginContext, getContext, loginContextKeys } from '../../../../public/components/arapInitInfo/loginContext';
//点击查询,获取查询区数据
export default function clickSearchBtn(props,searchVal) {
if(searchVal&&searchVal.conditions&&searchVal.conditions.length>0){
let transtype = getContext(loginContextKeys.transtype);
let pageInfo = props.table.getTablePageInfo(this.tableId);
let queryInfo = props.search.getQueryInfo(this.searchId);
queryInfo.pageInfo = pageInfo;
let data = {
pageId: props.getSearchParam('p'),
queryInfo:queryInfo,
tradeType:transtype
};
setDefData(searchId, dataSource, data);//放入缓存
ajax({
url: '/nccloud/arap/paybill/queryscheme.do',
data: data,
success: (res) => {
let { success, data } = res;
if (success) {
if(data){
let num = data[this.tableId]?data[this.tableId].allpks:data['bodys'].allpks;//第二种场景是浏览器刷新props.getSearchParam('p')获取异常
let tableDate = data[this.tableId]?data[this.tableId]:data['bodys'];
toast({ color: 'success', content: this.state.json['paybill-000015']+num.length+this.state.json['paybill-000016'] });/* 国际化处理: 查询成功,共,条*/
this.props.table.setAllTableData(this.tableId, tableDate);
this.props.table.selectAllRows(this.tableId, false)
setDefData(this.tableId, dataSource, data);//放入缓存
this.onSelected()
}else{
toast({ color: 'warning', content: this.state.json['paybill-000017'] });/* 国际化处理: 未查询出符合条件的数据*/
this.props.table.setAllTableData(this.tableId, {rows:[]});
}
}
}
});
}
};
/*YuO8szH0cVixePu/Bt+mG6B82aSbGhMosB18vg69kDk=*/

View File

@ -0,0 +1,93 @@
/*0GI1xcoeligdpMeXoHBphrnqLawXs2pmyhj4kEvBMik=*/
import { ajax, toast ,promptBox} from 'nc-lightapp-front';
import { billType, tableId } from '../constants';
import { innerButton } from '../../../../public/components/pubUtils/buttonName.js';
import madeBill from '../../../../public/components/madeBill.js';
export default function (that,props, key, text, record, index) {
switch (key) {
case innerButton.Edit_inner:
ajax({
url: '/nccloud/arap/arappub/edit.do',
data: {
pk_bill: record.pk_paybill.value,
billType: billType,
ts: record.ts.value
},
success: (res) => {
if (res.success) {
let src ='';
if(res.data&&res.data.isFrom36S3){
src ='36S3';
}
if (props.getUrlParam("scene") == 'linksce' || props.getUrlParam("scene") == 'fip') {
props.pushTo('/card', {
status: 'edit',
id: record.pk_paybill.value,
pagecode:'20080EBM_CARD_LINK',
scene:'linksce',
srcFrom36S3:src
})
}else{
props.pushTo('/card', {
status: 'edit',
id: record.pk_paybill.value,
pagecode:record.pk_tradetype.value,
srcFrom36S3:src
})
}
}
}
});
break;
case innerButton.Delete_Inner:
that.Info.pk_bill = record.pk_paybill.value
that.Info.ts = record.ts.value
that.Info.index = index;
that.delConfirm();
break;
case innerButton.Copy_inner:
if (props.getUrlParam("scene") == 'linksce' ||props.getUrlParam("scene") == 'fip') {
props.pushTo('/card', {
status: 'add',
id: record.pk_paybill.value,
type: 'copy',
pagecode:'20080EBM_CARD_LINK',
scene:'linksce'
})
}else{
if(record.objtype.value == '0'&&record.isrefund&&record.isrefund.value ){
toast({ color: 'danger', content: that.state.json['paybill-000056'] }); /* 国际化处理:退款付款单不能执行该操作!*/
return true;
}
props.pushTo('/card', {
status: 'add',
id: record.pk_paybill.value,
type: 'copy',
pagecode:record.pk_tradetype.value,
})
}
break;
case innerButton.Commit_inner:
that.Info.tipUrl = '/nccloud/arap/arappub/commit.do';
that.Info.record = record;
that.commitAndUncommit();
break;
case innerButton.Uncommit_inner:
that.Info.tipUrl = '/nccloud/arap/arappub/uncommit.do';
that.Info.record = record;
that.commitAndUncommit();
break;
case innerButton.MadeBill_inner://制单
let madeData = [{
pk_bill: record.pk_paybill.value,
billType: billType,
tradeType: record.pk_tradetype.value,
}]
madeBill(that,props,madeData,'',props.getSearchParam('c'));
break;
default:
break;
}
};
/*0GI1xcoeligdpMeXoHBphrnqLawXs2pmyhj4kEvBMik=*/

View File

@ -0,0 +1,833 @@
/*zSUoWKMuZerEXLsc4aAHfpzRg5lzN2RmctWmdBaiPTc=*/
//主子表列表
import React, { Component } from 'react';
import { createPage, ajax, base, high, print, toast, cardCache, cacheTools, getMultiLang } from 'nc-lightapp-front';
import { buttonClick, initTemplate, searchBtnClick, pageInfoClick, tableModelConfirm, doubleClick } from './events';
import {
getButtonsKey,
onListButtonControl
} from '../../../public/components/pubUtils/buttonvisible.js';
import { tableId, searchId, nodekey, billType, dataSource, pkname, searchKey, tradeType } from './constants';
import CombinedExaminationModel from '../../../public/components/combinedExaminationModel'; //联查处理情况
import linkSourceList from '../../../public/components/linkSourceList.js';
import Inspection from 'epmp/exports/components/Inspection';
import ApproveDetail from 'uap/common/components/ApproveDetail';
import NCUploader from 'uap/common/components/NCUploader';
const { NCDiv } = base;
let { BillTrack, PrintOutput} = high;
let { setDefData, getDefData, getCacheById, getCurrentLastId } = cardCache;
import { getContext, loginContextKeys } from '../../../public/components/arapInitInfo/loginContext';
import TradeTypeButton from '../../../public/components/tradetype'; //交易类型按钮
import '../../../public/less/tradetype.less';
import afterEvent from '../../../public/components/searchAreaAfterEvent'; //查询区编辑后事件
import InvoiceLink from 'sscivm/ivmpub/components/invoice-link'
import ExcelOutput from 'uap/common/components/ExcelOutput';
import ApprovalTrans from 'uap/common/components/approvalTrans';
import {listSocketConnect} from '../../../public/components/pubUtils/MicroServiceSocket.js';
import { extendArea, getInitdata } from '../../../public/components/tradetypeToEmptyArea/listEmptyArea';
import {updateTableRecordTs} from '../../../public/components/updateTableDataTs';
import poc from 'uap/common/components/printOnClient';
const {printPreview, printOnClient, PubSub, printerView, printOnClientByMoreTem} = poc;
class List extends Component {
constructor(props) {
super(props);
this.state = {
checkedTradetype:'',//手动选中的交易类型
isCombinedExaminationModelShow: false, //联查处理情况模态框
isTbbLinkshow: false, //控制联查执行预算的模态框
showBillTrack: false, //单据追溯模态框显示的状态
showApproveDetail: false, //是否显示审批详情模态框
showUploader: false, //附件管理
target: null, //附件管理
compositedisplay: false,
json: {},
forceRender: true,//导出模板懒加载true为不加载false为加载
sscivmInvoiceData: {}, //联查发票
tradeNames: [], //空指引--交易类型
buttons: [], //空指引--按钮
showSSCmodule: false
};
this.printData = {
billtype: billType, //单据类型
appcode: props.getSearchParam('c') ? props.getSearchParam('c') : props.getUrlParam('c'), //功能节点编码,即模板编码
nodekey: nodekey, //模板节点标识
oids: null, // 功能节点的数据主键
userjson: billType, //单据类型,billtype不是必需字段后台没有设置接收字段以userjson代替
funcode:props.getSearchParam('c') ? props.getSearchParam('c') : props.getUrlParam('c')
};
this.outputData = {
billtype: billType, //单据类型
funcode: props.getSearchParam('c') ? props.getSearchParam('c') : props.getUrlParam('c'), //功能节点编码,即模板编码 \
appcode: props.getSearchParam('c') ? props.getSearchParam('c') : props.getUrlParam('c'), //功能节点编码,即模板编码
nodekey: nodekey, //模板节点标识
oids: null, // 功能节点的数据主键
userjson: billType, //单据类型,billtype不是必需字段后台没有设置接收字段以userjson代替
outputType: 'output'
};
this.searchId = searchId;
this.tableId = tableId;
this.billType = billType;
this.pkname = pkname;
this.pageId = props.getSearchParam('p');
let { search } = this.props;
let { setSearchValByField, getAllSearchData } = search;
this.setSearchValByField = setSearchValByField; //设置查询区某个字段值
this.getAllSearchData = getAllSearchData; //获取查询区所有字段数据
this.Info = {
allButtonsKey: [], //保存所有头部按钮
tbbLinkSourceData: null, //联查执行预算的数据
combinedExaminationData: [], //联查处理情况模态框表格数据
pk_tradetypeid: null, //当前选中第一行行的交易类型
pk_tradetype: null, //当前选中第一行行的交易类型code
billno: null, //当前选中第一行的单据号
billCode: '', // 发票号
pk_bill: null, //当前选中第一行的主键pk
ts: null,
selectedPKS: [], //导出数据的主键pk
tipContent: '', //提示框Content
tipUrl: null, //提示框二次交互的url
exType: null, //异常类型现为三种1,2,3
record: null, //点提交时当前行数据
flag: false, //提交收回异常交互参数值默认为false
index: null, //当前选中行的序号
compositedata: null //指派信息处理
};
this.dataInSaga = { //用于saga里面的busiinfo
appcode: props.getSearchParam('c') ? props.getSearchParam('c') : null,
pagecode: props.getSearchParam('p') ? props.getSearchParam('p') : null,
butncode: null
}
this.Config= {
billConfig:[]
};
props.use.table(tableId);
props.use.search(searchId);
}
componentWillReceiveProps(nextProps) { }
componentWillMount() {
if (getDefData('scene', dataSource) == 'bz') {
this.dealBzScence();
} else {
let callback = (json) => {
this.setState({ json: json }, () => {
initTemplate.call(this, this.props, this.initShow);
});
};
getMultiLang({ moduleId: ['paybill', 'public'], domainName: 'arap', currentLocale: 'simpchn', callback });
}
}
//在第一次渲染后调用
componentDidMount() {
getInitdata(this, dataSource, billType, tradeType, this.state);
}
getPagecode = () => {
let pagecode = null;
if (this.props.getUrlParam('scene') || this.props.getSearchParam('p') == '20080EBM_LIST_LINK') {
if (!this.props.getUrlParam('scene')) {
////浏览器的刷新可能导致场景丢失,这里自己塞一次
this.props.setUrlParam({ scene: 'linksce' });
}
pagecode = '20080EBM_LIST_LINK';
} else {
pagecode = '20080EBM_LIST';
}
return pagecode;
};
initShow = () => {
this.onSelected(); //缓存不存在,就控制按钮
if (!this.props.table.hasCacheData(dataSource)) {
if (this.props.getUrlParam('src') == 'widget') {
let RecToDoSearchVO = cacheTools.get('F3widget');
let pageInfo = this.props.table.getTablePageInfo(this.tableId);
let queryInfo = {
pageInfo: pageInfo,
queryAreaCode: this.searchId, //查询区编码
oid: '0001Z31000000005PSYI',
querytype: 'tree'
};
let data = {
pageId: this.props.getSearchParam('p'),
queryInfo: queryInfo,
toDoSearchVO: RecToDoSearchVO
};
ajax({
url: '/nccloud/arap/paybill/querywidget.do',
data: data,
success: (res) => {
let { data } = res;
if (data) {
this.props.table.setAllTableData(this.tableId, data[this.tableId]);
} else {
toast({ color: 'warning', content: this.state.json['paybill-000017'] }); /* 国际化处理: 未查询到数据*/
this.props.table.setAllTableData(this.tableId, { rows: [] });
}
setDefData(this.tableId, dataSource, data); //放入缓存
}
});
} else if (this.props.getUrlParam('src') == 'widgetconfer') {
let PayConferSearchVO = cacheTools.get('F3widgetconfer');
let pageInfo = this.props.table.getTablePageInfo(this.tableId);
let queryInfo = {
pageInfo: pageInfo,
queryAreaCode: this.searchId, //查询区编码
oid: '0001Z31000000005PSYI',
querytype: 'tree'
};
let data = {
pageId: this.props.getSearchParam('p'),
queryInfo: queryInfo,
arapConferSearchVO: PayConferSearchVO
};
ajax({
url: '/nccloud/arap/paybill/queryconferwidget.do',
data: data,
success: (res) => {
let { data } = res;
if (data) {
this.props.table.setAllTableData(this.tableId, data[this.tableId]);
} else {
toast({ color: 'warning', content: this.state.json['paybill-000017'] }); /* 国际化处理: 未查询到数据*/
this.props.table.setAllTableData(this.tableId, { rows: [] });
}
setDefData(this.tableId, dataSource, data); //放入缓存
}
});
} else if ('browse' == this.props.getUrlParam('status')) {
if ('fip' == this.props.getUrlParam('scene')||'linksce' == this.props.getUrlParam('scene')) {
linkSourceList(this.props, this.tableId);
}
}
}
let isSwitchTradeType = getDefData('isSwitchTradeType', dataSource);
if (isSwitchTradeType) {
//如果卡片切换过交易类型的话,列表返回卡片需要重新刷新列表按钮
this.switchTemplate.call(this);
}
//控制联查期间按钮
let selectedData = this.props.table.getCheckedRows(this.tableId);
if(selectedData&&selectedData.length>0){
this.props.button.setButtonDisabled("AllocperiodruleLinkQuery", false);
}else{
this.props.button.setButtonDisabled("AllocperiodruleLinkQuery", true);
}
};
//处理报账平台返回到列表界面的场景
dealBzScence = () => {
let id = getCurrentLastId(dataSource);
if (id) {
let cardData = getCacheById(id, dataSource);
let pagecode = cardData.head.head.rows[0].values.pk_tradetype.value;
let pk_paybill = cardData.head.head.rows[0].values.pk_paybill.value;
this.props.pushTo('/card', {
status: 'browse',
id: pk_paybill,
pagecode: pagecode,
scene: 'bz'
});
} else {
this.props.pushTo('/card', {
status: 'browse',
pagecode: getDefData('pagecode', dataSource),
scene: 'bz'
});
}
};
//列表控制按钮
onSelected = () => {
onListButtonControl(this);
};
//联查处理情况按钮
handleCombined = () => {
this.setState({
isCombinedExaminationModelShow: true
}, () => {
if (this.state.isCombinedExaminationModelShow) {
this.child.modalOpen();
} else {
this.child.modalClose();
}
});
};
onRender = (ref) => {
this.child = ref;
};
//关闭联查执行预算的模态框
tbbLinkcancel() {
this.setState({
isTbbLinkshow: false
});
}
//打印
onPrint = () => {
// print(
// 'pdf', //支持两类: 'html'为模板打印, 'pdf'为pdf打印
// '/nccloud/arap/arappub/print.do', //后台服务url
// this.printData
// );
this.printPreviewBill();
};
//正式打印
officalPrintOutput = () => {
this.printData.userjson = billType+","+this.props.getSearchParam('p');
ajax({
url: '/nccloud/arap/arappub/officialPrint.do',
data: this.printData,
async: false,
success: (res) => {
if (res.success) {
// print(
// 'pdf', //支持两类: 'html'为模板打印, 'pdf'为pdf打印
// '/nccloud/arap/arappub/print.do', //后台服务url
// this.printData,
// false
// );
this.printPreviewBill();
if (res.data.grid) {
let grid = res.data.grid;
let updateValue = [];
for (let key in grid) {
updateValue.push({ index: key, data: { values: grid[key].values } });
}
this.props.table.updateDataByIndexs(tableId, updateValue);
this.props.table.selectAllRows(tableId, false) //由于平台没支持跨页 操作后updateDataByIndexs 取消跨页勾选,此处自己调一次全部取消勾选
this.onSelected();
}
}
}
});
};
//预览打印
printPreviewBill = (islist) => {
if(islist){
print(
'pdf', //支持两类: 'html'为模板打印, 'pdf'为pdf打印
'/nccloud/arap/arappub/print.do',
{
billtype:this.printData.billtype,
funcode: this.printData.funcode,
appcode: this.printData.appcode, //⼩应⽤编码
pageCode:this.props.getSearchParam('p'),
nodekey: this.printData.nodekey, //模板节点标识
oids: this.printData.oids,
type :'1',
sysType: '2'
},
false
);
}else{
printPreview(
this.props,
'/nccloud/arap/arappub/print.do',
{
billtype:this.printData.billtype,
funcode: this.printData.funcode,
appcode: this.printData.appcode, //⼩应⽤编码
pageCode:this.props.getSearchParam('p'),
nodekey: this.printData.nodekey, //模板节点标识
oids: this.printData.oids,
type :'1',
sysType: '1',
realData:'true_part'
},
true
)
}
}
//取消正式打印
cancelPrintOutput = () => {
this.printData.userjson = billType+","+this.props.getSearchParam('p');
ajax({
url: '/nccloud/arap/arappub/cancelPrint.do',
data: this.printData,
async: false,
success: (res) => {
if (res.success) {
if (res.data.grid) {
let grid = res.data.grid;
let updateValue = [];
for (let key in grid) {
updateValue.push({ index: key, data: { values: grid[key].values } });
}
this.props.table.updateDataByIndexs(tableId, updateValue);
this.props.table.selectAllRows(tableId, false) //由于平台没支持跨页 操作后updateDataByIndexs 取消跨页勾选,此处自己调一次全部取消勾选
}
//取消正式打印提示框
toast({ color: 'success', content: this.state.json['paybill-000072'] });
this.onSelected();
}
}
});
};
//打印输出
printOutput = () => {
this.refs.printOutput.open();
};
//输出成功回调函数
onSubmit() { }
//审批详情模态框控制
closeApprove = () => {
this.setState({
showApproveDetail: false
});
};
//提交和收回弹框点击取消
clearExType = () => {
this.Info.exType = null;
this.Info.flag = true;
this.Info.tipContent = '';
this.Info.tipUrl = '';
this.Info.compositedata = null;
if (this.state.compositedisplay) {
this.setState({ compositedisplay: false });
}
};
//提交and收回公共调用函数
commitAndUncommit = () => {
let tipUrl = this.Info.tipUrl;
let extype = this.Info.exType;
let flag = this.Info.flag;
let record = this.Info.record;
ajax({
url: tipUrl,
data:Object.assign({
pk_bill: record.pk_paybill&&record.pk_paybill.value?record.pk_paybill.value:record.pk,
ts: record.ts&&record.ts.value?record.ts.value:record.ts,
pageId: this.props.getSearchParam('p'),
billType: this.billType,
type: 1,
extype: extype,
flag: flag,
assignObj: this.Info.compositedata
},this.dataInSaga) ,
success: (res) => {
if (res.data.exType == '1') {
let content = res.data.message;
this.Info.tipContent = content;
this.Info.tipUrl = tipUrl;
this.Info.exType = '1';
this.Info.flag = true;
this.props.modal.show('commitAndUncommit');
return;
} else if (
res.data.workflow &&
(res.data.workflow == 'approveflow' || res.data.workflow == 'workflow')
) {
this.Info.compositedata = res.data;
this.Info.tipUrl = tipUrl;
this.setState({ compositedisplay: true });
return;
}
if (res.success) {
this.clearExType();
if(tipUrl.indexOf("uncommit")!=-1){
toast({ color: 'success', content: this.state.json['paybill-000069'] }); /* 国际化处理: 收回成功*/
}else{
toast({ color: 'success', content: this.state.json['paybill-000068'] }); /* 国际化处理: 提交成功*/
}
//更新当前行数据
if(res.data&&res.data[this.tableId]){
updateTableRecordTs.call(this,{props:this.props,data:res.data,tableId:this.tableId,pkname});
}
// this.props.table.updateDataByIndexs(this.tableId, [
// { index: record.numberindex.value - 1, data: { values: res.data[this.tableId].rows[0].values } }
// ]);
this.onSelected();
}
}
});
};
delConfirm = (extype, flag) => {
ajax({
url: '/nccloud/arap/arappub/delete.do',
data: [
Object.assign({
pk_bill: this.Info.pk_bill,
ts: this.Info.ts,
billType: this.billType,
index: this.Info.index,
extype: extype,
flag: flag
},this.dataInSaga)
],
success: (res) => {
let { success, data } = res;
if (success) {
if (data) {
if (res.data.exType == '1') {
this.Info.tipContent = res.data.message;
this.Info.exType = '1';
this.Info.flag = true;
this.props.modal.show('deleteCheck');
return;
} else {
toast({
color: data.PopupWindowStyle,
content: data.errMsg
});
//删除当前行数据
this.props.table.deleteTableRowsByIndex(this.tableId, data.successIndexs);
//删除缓存数据
this.props.table.deleteCacheId(this.tableId, data.successPKs);
//删行之后控制肩部按钮
this.onSelected();
this.clearExType();
}
}
}
}
});
};
//单据删除模态框确定按钮点击事件
deleteBillSureBtnClick = () => {
let exType = this.Info.exType;
let flag = this.Info.flag;
this.delConfirm(exType, flag);
};
// 附件的关闭点击
onHideUploader = () => {
this.setState({
showUploader: false
});
};
switchTemplate = (checkedTradetype) => {
//initTemplate.call(this, this.props);
let {tradeNames}=this.state;
let pagecode = this.getPagecode();
let appcode = this.props.getSearchParam('c') ? this.props.getSearchParam('c') : this.props.getUrlParam('c');
let tradetype = getDefData('sessionTradeType', dataSource);
if (!tradetype) {
tradetype = tradeType;
}
let isHasTradeName=false;
let new_tradeNames=[];
if(checkedTradetype){
tradeNames.forEach((item,index)=>{
if(item.code==checkedTradetype.code){
isHasTradeName=true;
}else{
new_tradeNames.push(item);
}
})
// if(!isHasTradeName){
new_tradeNames.unshift(checkedTradetype);
// }
this.setState({
tradeNames:new_tradeNames,
checkedTradetype:checkedTradetype
})
}
ajax({
url: '/nccloud/arap/arappub/queryallbtns.do',
data: {
appcode: appcode,
pagecode: pagecode,
tradetype: tradetype,
billtype: billType
},
success: (res) => {
let data = res.data;
if (data.button) {
let button = data.button;
this.Info.pullBillInfoVOAry = data.pullbillinfo;
getButtonsKey(button, this.Info.allButtonsKey); //获取所有按钮
this.props.button.setButtons(button);
}
}
});
};
// 查询区渲染完成回调函数
renderCompleteEvent = () => {
let cachesearch = getDefData(searchKey, dataSource);
if (cachesearch && cachesearch.conditions) {
// this.props.search.setSearchValue(this.searchId, cachesearch);
for (let item of cachesearch.conditions) {
if (item.field == 'billdate') {
// 时间类型特殊处理
let time = [];
time.push(item.value.firstvalue);
time.push(item.value.secondvalue);
this.props.search.setSearchValByField(this.searchId, item.field, {
display: item.display,
value: time
});
} else {
this.props.search.setSearchValByField(this.searchId, item.field, {
display: item.display,
value: item.value.firstvalue
});
}
}
}
};
dealGroupMoveList = (groupList) =>{
return groupList.filter( (item, index) => item.fullPath && item.fullPath.indexOf(this.Info.pk_bill)!=-1);
}
//处理附件分组:
dealGroupList =(list)=>{
let pk_bill=this.Info.pk_bill;
let tempList=list;
if(tempList!=null&&tempList.length>0){
for(let i=0;i<tempList.length;i++){
if(pk_bill!=null&&pk_bill==tempList[i]["fullPath"]){
let child = tempList[i]["children"];
if(child!=null&&child.length>0){
for(let j=0;j<child.length;j++){
tempList[i]["children"][j]["disableButton"]= JSON.stringify( ["fs_group_add"]);
}
}
tempList[i]["disableButton"]= JSON.stringify( ["fs_group_delete","fs_group_edit"]);
}else{
tempList[i]["disableButton"]=JSON.stringify( ["fs_group_add","fs_group_delete","fs_group_edit","fs_delete","fs_move","fs_edit","fs_upload"]);
}
}
}
return list;
}
updateTradeType=(value)=>{
this.setState({
checkedTradetype:value
})
}
render() {
let { table, search, modal } = this.props;
let { createSimpleTable } = table;
let { NCCreateSearch } = search;
let { createModal } = modal;
let { showUploader, target } = this.state;
const { createBillHeadInfo } = this.props.BillHeadInfo;
return (
<div className="nc-bill-list" style={{ marginTop: 0 }}>
{listSocketConnect.call(this)}
<NCDiv areaCode={NCDiv.config.HEADER} className="nc-bill-header-area">
<div className="header-title-search-area">
{createBillHeadInfo({
title: this.props.getSearchParam('n')?this.props.getSearchParam('n'):this.state.json['paybill-000046'],//国际化处理: 付款单
initShowBackBtn: false,
})}
</div>
<div className="header-button-area">
{/* {交易类型按钮,默认场景} */}
{!this.props.getUrlParam('scene') && !getContext(loginContextKeys.transtype) ? (
<div className="trade-type">
{TradeTypeButton({
ref: 'tradetypeBtn',
billtype: 'F3',
dataSource: dataSource,
switchTemplate: this.switchTemplate.bind(this),
propschil:this.props,
type:'list',
appcode: this.props.getSearchParam('c') ? this.props.getSearchParam('c') : this.props.getUrlParam('c'),
pagecode: this.props.getSearchParam('p') ? this.props.getSearchParam('p') : null
})}
</div>
) : null}
{this.props.button.createButtonApp({
area: 'list_head',
buttonLimit: 3,
onButtonClick: buttonClick.bind(this),
popContainer: document.querySelector('.header-button-area')
})}
</div>
</NCDiv>
<div className="nc-bill-search-area">
{NCCreateSearch(
this.searchId, //模块id
{
clickSearchBtn: searchBtnClick.bind(this), // 点击按钮事件
showAdvBtn: true, // 显示高级按钮
onAfterEvent: afterEvent.bind(this), //编辑后事件
renderCompleteEvent: this.renderCompleteEvent // 查询区渲染完成回调函数
}
)}
</div>
<div className="nc-bill-table-area">
{createSimpleTable(this.tableId, {
fieldid: "paybill",
dataSource: dataSource,
pkname: pkname,
handlePageInfoChange: pageInfoClick.bind(this),
tableModelConfirm: tableModelConfirm,
onRowDoubleClick: doubleClick.bind(this),
showCheck: true,
showIndex: true,
onSelected: this.onSelected.bind(this),
onSelectedAll: this.onSelected.bind(this),
crossPageSelect:true,
selectedChange:(...params)=>{
this.onSelected.call(this)
},
high_selectable: {
enable: true //默认为true
},
// 框选
onBatchSelected: (...params) => {
this.onSelected.call(this)
},
componentInitFinished: () => {
this.onSelected();
},
renderEmptyText: () => {
return this.state.json['public-000291']/* 国际化处理: 当前页面暂无数据,这些操作将帮助你开始*/;
},
renderExtendZone: () => {
return extendArea.call(this,{dataSource, billType, tradeType, buttonClick,updateTradeType:this.updateTradeType})
}
})}
</div>
{/* 联查收付款协议 */}
<CombinedExaminationModel
show={this.state.isCombinedExaminationModelShow}
combinedExaminationData={this.Info.combinedExaminationData}
pk_tradetypeid={this.Info.pk_tradetypeid}
billno={this.Info.billno}
handleModel={this.handleCombined.bind(this)}
onRef={this.onRender}
/>
{/* 单据追溯组件 */}
<BillTrack
show={this.state.showBillTrack}
close={() => {
this.setState({ showBillTrack: false });
}}
pk={this.Info.pk_bill} //单据id
type={this.Info.pk_tradetype} //单据类型
/>
{/* {审批详情} */}
<ApproveDetail
show={this.state.showApproveDetail}
close={this.closeApprove}
billtype={this.Info.pk_tradetype}
billid={this.Info.pk_bill}
/>
{/* {打印输出} */}
<PrintOutput
ref="printOutput"
url="/nccloud/arap/arappub/outPut.do"
data={this.outputData}
callback={this.onSubmit}
/>
{/* {导入} */}
{createModal('importModal', {
noFooter: true,
className: 'import-modal',
hasBackDrop: false
})}
<ExcelOutput
{...Object.assign(this.props)}
moduleName="arap" //模块名
billType={this.billType} //单据类型
pagecode="20080EBM_CARD"
appcode={
this.props.getSearchParam('c') ? this.props.getSearchParam('c') : this.props.getUrlParam('c')
}
selectedPKS={this.Info.selectedPKS}
exportTreeUrl={"/nccloud/arap/paybill/paybillexport.do"}
forceRender = {this.state.forceRender}
/>
{/* 联查计划预算 */}
<Inspection
show={this.state.isTbbLinkshow}
sourceData={this.Info.tbbLinkSourceData}
cancel={this.tbbLinkcancel.bind(this)}
/>
{/* {联查发票} */}
{this.state.showSSCmodule ? (
<InvoiceLink {...this.state.sscivmInvoiceData} table={this.props.table} />
) : null}
{showUploader && (
<NCUploader
billId={this.Info.pk_bill}
billNo={this.Info.billno}
target={target}
placement={'bottom'}
onHide={this.onHideUploader}
customize={{
pk_billType: this.billType
}}
billConfig = {this.Config.billConfig}
customInterface={{
//queryLeftTree: '/nccloud/arap/arappub/arapFileLeftTreeQuery.do',
queryAttachments: '/nccloud/arap/arappub/transformBillEnclosureQuery.do'
}}
formatGroupMoveList = { (groupList) => {
return this.dealGroupMoveList(groupList);
}}
getGroupList = { (list) => {
return this.dealGroupList(list);
}}
/>
)}
{/* 异常模态框 */}
<div>
{createModal('commitAndUncommit', {
title: this.state.json['paybill-000044'], //'预算异常提示信息',//'预算异常提示信息',//this.state.json['10170406-000017'],// 异常提示/* 国际化处理: 提示信息*/
content: this.Info.tipContent, // '预算不通过!',//this.modalContent.call(this), //弹框内容可以是字符串或dom
closeModalEve:()=>{
this.Info.flag = true
this.Info.exType=null
},
beSureBtnClick: this.commitAndUncommit.bind(this), //点击确定按钮事件
cancelBtnClick: this.clearExType.bind(this) //提交和收回取消事件
})}
{createModal('deleteCheck', {
title: this.state.json['paybill-000044'], //'预算异常提示信息',//'预算异常提示信息',//this.state.json['10170406-000017'],// 异常提示/* 国际化处理: 提示信息*/
content: this.Info.tipContent, // '预算不通过!',//this.modalContent.call(this), //弹框内容可以是字符串或dom
closeModalEve:()=>{
this.Info.flag = true
this.Info.exType=null
},
beSureBtnClick: this.deleteBillSureBtnClick.bind(this) //点击确定按钮事件
})}
{/* 指派信息弹框 */}
{this.state.compositedisplay ? (
<ApprovalTrans
title={this.state.json['paybill-000045']} /* 国际化处理: 指派*/
data={this.Info.compositedata}
display={this.state.compositedisplay}
getResult={this.commitAndUncommit.bind(this)}
cancel={this.clearExType.bind(this)}
/>
) : null}
</div>
</div>
);
}
}
List = createPage({})(List);
export default List;
/*zSUoWKMuZerEXLsc4aAHfpzRg5lzN2RmctWmdBaiPTc=*/

View File

@ -0,0 +1,33 @@
{
"dependjs": [
"../../../../sscivm/ivmpub/components/invoice-uploader/index.js",
"../../../../sscivm/ivmpub/components/invoice-link/index.js",
"../../../../sscrp/rppub/components/image/index.js",
"../../../../ampub/index.js",
"../../../../epmp/exports/components/Inspection/index.js",
"../../../../uap/common/components/ApproveDetail/index.js",
"../../../../uap/common/components/excelImportconfig/index.js",
"../../../../uap/common/components/ExcelOutput/index.js",
"../../../../uap/common/components/NCUploader/index.js",
"../../../../uap/common/components/approvalTrans/index.js",
"../../../../uap/common/components/ApproveDetail/index.js",
"../../../../sp/pub/utils/IndependentSettleUtil/index.js",
"../../../../uap/common/components/printOnClient/index.js"
],
"dependModuleName": [
"sscivm/ivmpub/components/invoice-uploader",
"sscivm/ivmpub/components/invoice-link",
"sscrp/rppub/components/image",
"ampub",
"epmp/exports/components/Inspection",
"uap/common/components/ApproveDetail",
"uap/common/components/ApproveDetail",
"uap/common/components/excelImportconfig",
"uap/common/components/ExcelOutput",
"uap/common/components/NCUploader",
"uap/common/components/approvalTrans",
"sp/pub/utils/IndependentSettleUtil",
"uap/common/components/printOnClient"
]
}

View File

@ -0,0 +1,10 @@
/*zSUoWKMuZerEXLsc4aAHfpzRg5lzN2RmctWmdBaiPTc=*/
import { RenderRouter } from 'nc-lightapp-front';
import routes from './router';
(function main(routers, htmlTagid) {
RenderRouter(routers, htmlTagid);
})(routes, "app");
/*zSUoWKMuZerEXLsc4aAHfpzRg5lzN2RmctWmdBaiPTc=*/

View File

@ -0,0 +1,98 @@
/*tTimbHVfNMl+Pbqkv0j1sznfVXzCyreCe5PVeEUJhYI=*/
import { asyncComponent, useJS } from 'nc-lightapp-front';
import List from '../list';
//付款单卡片
const card = asyncComponent(() => import(/*webpackChunkName:"/arap/paybill/paybill/card/card"*/ /* webpackMode: "eager" */ '../card'));
//预核销
const prev = asyncComponent(() => import(/*webpackChunkName:"/arap/verificationsheet/preverify/list/prev"*/ /* webpackMode: "eager" */ '../../../verificationsheet/preverify/list'));
//及时核销 list
const nowv = asyncComponent(() => import(/*webpackChunkName:"/arap/verificationsheet/verifynow/list/nowv"*/ /* webpackMode: "eager" */ '../../../verificationsheet/verifynow/list'));
//及时核销card
const nowvcard = asyncComponent(() => import(/*webpackChunkName:"/arap/verificationsheet/verifynow/nowvcard"*/ /* webpackMode: "eager" */ '../../../verificationsheet/verifynow/nowvcard'));
//应收单转单
const F0 = asyncComponent(() => import(/*webpackChunkName:"/arap/receivablebill/recbill/transfer/f0transfer"*/ /* webpackMode: "eager" */ '../../../receivablebill/recbill/transfer'));
//应付单转单
const F1 = asyncComponent(() => import(/*webpackChunkName:"/arap/payablebill/payablebill/transfer/f1transfer"*/ /* webpackMode: "eager" */ '../../../payablebill/payablebill/transfer'));
//收款单
const F2 = asyncComponent(() => import(/*webpackChunkName:"/arap/gatheringbill/gatheringbill/transfer/f2transfer"*/ /* webpackMode: "eager" */ '../../../gatheringbill/gatheringbill/transfer'));
//付款合同转单
// const FCT1 = asyncComponent(() => import(/*webpackChunkName:"/fct/bill/ap/transfer/fct1transfer"*/ /* webpackMode: "eager" */ '../../../../fct/bill/ap/transfer'));
//付款申请转单
// const apply = asyncComponent(() => import(/*webpackChunkName:"/cmp/apply/apply/ref23/36d1transfer"*/ /* webpackMode: "eager" */ '../../../../cmp/apply/apply/ref23'));
//采用useJS方式运行需要依赖引用模块的编译后代码
useJS.setConfig({
"fct/bill/ap/transfer/index": "../../../../fct/bill/ap/transfer/index.js",
"cmp/apply/apply/ref23/index":"../../../../cmp/apply/apply/ref23/index.js",
'ali/rent/paymentapplytransfer/source/index': '../../../../ali/rent/paymentapplytransfer/source/index.js'
})
const FCT1 = useJS(["fct/bill/ap/transfer/index"], function (FCT1) {
return FCT1;
})
const apply = useJS(["cmp/apply/apply/ref23/index"], function (apply) {
return apply;
})
//付款单拉 -> 资产租入管理付款申请单
const For4A3L = useJS([ 'ali/rent/paymentapplytransfer/source/index' ], function(For4A3L) {
return For4A3L;
});
const routes = [
{
path: '/',
component: List,
exact: true
},
{
path: '/list',
component: List
},
{
path: '/card',
component: card
},
{
path: '/prev',
component: prev
},
{
path: '/nowv',
component: nowv
},
{
path: '/nowvcard',
component: nowvcard
},
{
path: '/F0',
component: F0
},
{
path: '/F1',
component: F1
},
{
path: '/F2',
component: F2
},
{
path: '/FCT1',
component: FCT1
},
{
path: '/36D1',
component: apply
},
{
path: '/4A3L',
component: For4A3L
}
];
export default routes;
/*tTimbHVfNMl+Pbqkv0j1sznfVXzCyreCe5PVeEUJhYI=*/