同步代码2
This commit is contained in:
parent
98427962a0
commit
876e666ce9
|
|
@ -2,7 +2,7 @@
|
||||||
import { ajax, promptBox, toast } from 'nc-lightapp-front';
|
import { ajax, promptBox, toast } from 'nc-lightapp-front';
|
||||||
import { currentTypeAfterFormEvents } from '../../../../public/components/pubUtils/currentTypeAfterEvent';
|
import { currentTypeAfterFormEvents } from '../../../../public/components/pubUtils/currentTypeAfterEvent';
|
||||||
import { autoAddLineKeys } from '../../../../public/components/pubUtils/billPubInfo';
|
import { autoAddLineKeys } from '../../../../public/components/pubUtils/billPubInfo';
|
||||||
import { checknoDisplayAfterEvent, checktypeAfterEvent,isbillrangeEdit } from '../../../../public/components/pubUtils/specialFieldAfterEvent.js';
|
import { checknoDisplayAfterEvent, checktypeAfterEvent, isbillrangeEdit,currtypeAfterEvent } from '../../../../public/components/pubUtils/specialFieldAfterEvent.js';
|
||||||
import { formulamsgHint, renderData, headAfterEventRenderData, bodyAfterEventRenderData, errorDeal } from '../../../../public/components/afterEventPub/afterEventPubDeal';
|
import { formulamsgHint, renderData, headAfterEventRenderData, bodyAfterEventRenderData, errorDeal } from '../../../../public/components/afterEventPub/afterEventPubDeal';
|
||||||
import { getColvalues, getRowIds } from '../../../../public/components/pubUtils/billPubUtil';
|
import { getColvalues, getRowIds } from '../../../../public/components/pubUtils/billPubUtil';
|
||||||
import { moneyAndRateFields } from '../../../../public/components/pubUtils/specialFieldAfterEvent.js';
|
import { moneyAndRateFields } from '../../../../public/components/pubUtils/specialFieldAfterEvent.js';
|
||||||
|
|
@ -94,6 +94,25 @@ export default function afterEvent(props, moduleId, key, value, changedrows, i,
|
||||||
errorDeal(this, res, changedrows, key);
|
errorDeal(this, res, changedrows, key);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
ajax({
|
||||||
|
url: '/nccloud/arap/arappub/ischecknoref.do',
|
||||||
|
data: {
|
||||||
|
autoButton:'autoButton',
|
||||||
|
pk_org: value.key
|
||||||
|
},
|
||||||
|
async: false,
|
||||||
|
success: (res) => {
|
||||||
|
if(res.data){
|
||||||
|
if (status == 'browse') {
|
||||||
|
this.props.button.setButtonVisible('AutoBillrange', false);
|
||||||
|
}else{
|
||||||
|
this.props.button.setButtonVisible('AutoBillrange', true);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.props.button.setButtonVisible('AutoBillrange', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
cancelBtnClick: () => {
|
cancelBtnClick: () => {
|
||||||
this.props.form.setFormItemsValue(this.formId, { pk_org_v: changedrows });
|
this.props.form.setFormItemsValue(this.formId, { pk_org_v: changedrows });
|
||||||
|
|
@ -227,8 +246,13 @@ export default function afterEvent(props, moduleId, key, value, changedrows, i,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//表体编辑后事件
|
//表体编辑后事件增加编辑票据号对于子票区间的控制
|
||||||
if (moduleId == this.tableId) {
|
if (moduleId == this.tableId) {
|
||||||
|
//币种
|
||||||
|
if (key == 'pk_currtype') {
|
||||||
|
currtypeAfterEvent(this.props, this.tableId, key, value, i);
|
||||||
|
}
|
||||||
|
|
||||||
//票据类型
|
//票据类型
|
||||||
if (key == 'checktype') {
|
if (key == 'checktype') {
|
||||||
checktypeAfterEvent(this.props, this.tableId, key, value, i);
|
checktypeAfterEvent(this.props, this.tableId, key, value, i);
|
||||||
|
|
@ -236,7 +260,7 @@ export default function afterEvent(props, moduleId, key, value, changedrows, i,
|
||||||
if (key == 'direct_checkno') {
|
if (key == 'direct_checkno') {
|
||||||
let checkno = this.props.cardTable.getValByKeyAndIndex(this.tableId, i, "checkno");
|
let checkno = this.props.cardTable.getValByKeyAndIndex(this.tableId, i, "checkno");
|
||||||
let checknovalue = checkno?checkno.value:null;
|
let checknovalue = checkno?checkno.value:null;
|
||||||
if(value=="N"&&isbillrangeEdit(checknovalue,value)){
|
if((value=="N"||value==false)&&isbillrangeEdit(checknovalue,value)){
|
||||||
this.props.cardTable.setEditableByIndex(this.tableId, i, ['billrangestart','billrangeend'], true);
|
this.props.cardTable.setEditableByIndex(this.tableId, i, ['billrangestart','billrangeend'], true);
|
||||||
}else{
|
}else{
|
||||||
this.props.cardTable.setEditableByIndex(this.tableId, i, ['billrangestart','billrangeend'], false);
|
this.props.cardTable.setEditableByIndex(this.tableId, i, ['billrangestart','billrangeend'], false);
|
||||||
|
|
@ -246,11 +270,12 @@ export default function afterEvent(props, moduleId, key, value, changedrows, i,
|
||||||
if (key == 'checkno_display') {
|
if (key == 'checkno_display') {
|
||||||
checknoDisplayAfterEvent(this.props, this.tableId, key, value, i);
|
checknoDisplayAfterEvent(this.props, this.tableId, key, value, i);
|
||||||
key = 'checkno';
|
key = 'checkno';
|
||||||
|
if(value!=null && value.values!=null){
|
||||||
let billtypecode = value.values.pk_billtypecode.value;
|
let billtypecode = value.values.pk_billtypecode.value;
|
||||||
let subcontractcirculation = value.values.subcontractcirculation.value;
|
let subcontractcirculation = value.values.subcontractcirculation.value;
|
||||||
if(billtypecode=="36H2"){
|
if(billtypecode=="36H2"){
|
||||||
this.isEditbillrangge = false;
|
this.isEditbillrangge = false;
|
||||||
}else if(billtypecode=="36H1"){
|
}else if(billtypecode=="36H1"||billtypecode=="36HN"){
|
||||||
if(subcontractcirculation=="Y"){
|
if(subcontractcirculation=="Y"){
|
||||||
this.isEditbillrangge = true;
|
this.isEditbillrangge = true;
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -258,6 +283,7 @@ export default function afterEvent(props, moduleId, key, value, changedrows, i,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//科目字段特殊拼接1121\应收票据
|
//科目字段特殊拼接1121\应收票据
|
||||||
if(key == "subjcode"){
|
if(key == "subjcode"){
|
||||||
// this.props.cardTable.setValByKeyAndIndex(this.tableId, i, 'subjcode', { value: value.refpk, display: value.dispname })
|
// this.props.cardTable.setValByKeyAndIndex(this.tableId, i, 'subjcode', { value: value.refpk, display: value.dispname })
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
import { ajax, toast, cardCache, promptBox,metaCache} from 'nc-lightapp-front';
|
import { ajax, toast, cardCache, promptBox,metaCache} from 'nc-lightapp-front';
|
||||||
import { headButton,innerButton, bodyButton } from '../../../../public/components/pubUtils/buttonName';
|
import { headButton,innerButton, bodyButton } from '../../../../public/components/pubUtils/buttonName';
|
||||||
import {
|
import {
|
||||||
|
autoCountBillrange,
|
||||||
delLine,
|
delLine,
|
||||||
copyLine,
|
copyLine,
|
||||||
pasteLine,
|
pasteLine,
|
||||||
|
|
@ -23,7 +24,8 @@ import {
|
||||||
billEditProperties,
|
billEditProperties,
|
||||||
dealCommisionPayFieldBack,
|
dealCommisionPayFieldBack,
|
||||||
cardFieldsEditableWithResetProxy,
|
cardFieldsEditableWithResetProxy,
|
||||||
checkRedType
|
checkRedType,
|
||||||
|
directChecknoEditable
|
||||||
} from '../../../../public/components/pubUtils/billFieldEditableUtil.js';
|
} from '../../../../public/components/pubUtils/billFieldEditableUtil.js';
|
||||||
import { getContext, loginContextKeys } from '../../../../public/components/arapInitInfo/loginContext';
|
import { getContext, loginContextKeys } from '../../../../public/components/arapInitInfo/loginContext';
|
||||||
import { moduleEnable, IMAG, SSCIVM } from '../../../../public/components/moduleEnable.js';
|
import { moduleEnable, IMAG, SSCIVM } from '../../../../public/components/moduleEnable.js';
|
||||||
|
|
@ -678,6 +680,9 @@ export function buttonClick(props, id) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case bodyButton.AutoBillrange://自动计算子票区间
|
||||||
|
autoCountBillrange(this,dataSource)
|
||||||
|
break;
|
||||||
case bodyButton.PasteLine: //粘贴行
|
case bodyButton.PasteLine: //粘贴行
|
||||||
pasteLine(this);
|
pasteLine(this);
|
||||||
break;
|
break;
|
||||||
|
|
@ -920,6 +925,8 @@ export function cardBillEdit() {
|
||||||
dealCommisionPayField(this.props, this.formId, this.tableId);
|
dealCommisionPayField(this.props, this.formId, this.tableId);
|
||||||
//处理往来对象的可编辑性
|
//处理往来对象的可编辑性
|
||||||
objtypeEditable(this.props, this.formId, this.tableId);
|
objtypeEditable(this.props, this.formId, this.tableId);
|
||||||
|
//处理直联电票的可编辑行
|
||||||
|
directChecknoEditable(this.props, this.formId, this.tableId)
|
||||||
if (res.data && res.data.head) {
|
if (res.data && res.data.head) {
|
||||||
this.props.form.setFormItemsDisabled(this.formId, res.data.head);
|
this.props.form.setFormItemsDisabled(this.formId, res.data.head);
|
||||||
this.headBack = res.data.headBack
|
this.headBack = res.data.headBack
|
||||||
|
|
|
||||||
|
|
@ -278,6 +278,9 @@ export default function buttonClick(props, id) {
|
||||||
break;
|
break;
|
||||||
case headButton.Print: //打印
|
case headButton.Print: //打印
|
||||||
let printData = this.props.table.getCheckedRows(this.tableId);
|
let printData = this.props.table.getCheckedRows(this.tableId);
|
||||||
|
printData.sort((a, b) => {
|
||||||
|
return a.index - b.index;
|
||||||
|
});
|
||||||
if (printData.length == 0) {
|
if (printData.length == 0) {
|
||||||
toast({ color: 'warning', content: this.state.json['paybill-000029'] }); /* 国际化处理: 请选中一行数据!*/
|
toast({ color: 'warning', content: this.state.json['paybill-000029'] }); /* 国际化处理: 请选中一行数据!*/
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -763,9 +763,9 @@ class List extends Component {
|
||||||
cancel={this.tbbLinkcancel.bind(this)}
|
cancel={this.tbbLinkcancel.bind(this)}
|
||||||
/>
|
/>
|
||||||
{/* {联查发票} */}
|
{/* {联查发票} */}
|
||||||
{this.state.showSSCmodule ? (
|
{/* {this.state.showSSCmodule ? (
|
||||||
<InvoiceLink {...this.state.sscivmInvoiceData} table={this.props.table} />
|
<InvoiceLink {...this.state.sscivmInvoiceData} table={this.props.table} />
|
||||||
) : null}
|
) : null} */}
|
||||||
{showUploader && (
|
{showUploader && (
|
||||||
<NCUploader
|
<NCUploader
|
||||||
billId={this.Info.pk_bill}
|
billId={this.Info.pk_bill}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@ import {
|
||||||
import { buttonController } from '../viewController';
|
import { buttonController } from '../viewController';
|
||||||
import { BUTTONID, AREA, FIELD, COPYPASTEBTNS, URL, UISTATE, DISABLEBTNS, PAGECODE } from '../../constance';
|
import { BUTTONID, AREA, FIELD, COPYPASTEBTNS, URL, UISTATE, DISABLEBTNS, PAGECODE } from '../../constance';
|
||||||
import printCountQuery from '../../../../../scmpub/scmpub/pub/tool/printCountQuery';
|
import printCountQuery from '../../../../../scmpub/scmpub/pub/tool/printCountQuery';
|
||||||
|
import { ajax } from 'nc-lightapp-front';
|
||||||
|
|
||||||
export default function buttonClick(props, key, text, record, index) {
|
export default function buttonClick(props, key, text, record, index) {
|
||||||
let CONSTFIELD = {
|
let CONSTFIELD = {
|
||||||
dataSource: FIELD.dataSource
|
dataSource: FIELD.dataSource
|
||||||
|
|
@ -166,6 +168,68 @@ export default function buttonClick(props, key, text, record, index) {
|
||||||
case BUTTONID.printCountQuery:
|
case BUTTONID.printCountQuery:
|
||||||
let CONST = { hid: FIELD.cspecialhid, area: AREA.head };
|
let CONST = { hid: FIELD.cspecialhid, area: AREA.head };
|
||||||
printCountQuery.call(this, props, { type: 2, CONST, modal: 'code-config' });
|
printCountQuery.call(this, props, { type: 2, CONST, modal: 'code-config' });
|
||||||
|
break;
|
||||||
|
//
|
||||||
|
case "summarize":
|
||||||
|
// let id= props.form.getFormItemsValue(AREA.head, FIELD.cspecialhid).value; // 主键
|
||||||
|
// var thsi1=this;
|
||||||
|
// let allRows = props.cardTable.getVisibleRows(AREA.body);
|
||||||
|
// let data=[];
|
||||||
|
// for (let i = 0; i < allRows.length; i++) {
|
||||||
|
// let row = allRows[i];
|
||||||
|
// if(row.values.nnum && row.values.cmaterialoid && row.values.type){
|
||||||
|
// let row1={nnum:row.values.nnum.value,
|
||||||
|
// materialid:row.values.cmaterialoid.value,
|
||||||
|
// nassistnum:row.values.nassistnum.value,
|
||||||
|
// type:row.values.type.value,
|
||||||
|
// pk:row.values.cspecialbid.value,
|
||||||
|
// index:i}
|
||||||
|
// data.push(row1);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// let summarizedata = { pk: id };
|
||||||
|
// ajax({
|
||||||
|
// url: '/nccloud/ic/assembly/summarize.do', // 删除
|
||||||
|
// data: data,
|
||||||
|
// method: 'post',
|
||||||
|
// success: function(res) {
|
||||||
|
|
||||||
|
// if(res.data){
|
||||||
|
// for(let i = 0; i < res.data.length; i++){
|
||||||
|
// let res1 = res.data[i]
|
||||||
|
// props.cardTable.setValByKeyAndIndex(AREA.body, res1.index, FIELD.nnum, { value: ""+res1.nnum,display:""+res1.nnum }); //主数量
|
||||||
|
// props.cardTable.setValByKeyAndIndex(AREA.body, res1.index, FIELD.nassistnum, { value:""+res1.nnum,nassistnum:""+res1.nassistnum }); //主数量
|
||||||
|
// props.cardTable.setValByKeyAndIndex(AREA.body, res1.index, FIELD.vbdef1, { value: ""+res1.vbdef1,display:""+res1.vbdef1 }); //主数量
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // refreshBtnClick.bind(thsi1, props)();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
let allRows = props.cardTable.getVisibleRows(AREA.body);
|
||||||
|
let summarize=0;
|
||||||
|
for (let i = 0; i < allRows.length; i++) {
|
||||||
|
let row = allRows[i];
|
||||||
|
if(row.values.type && row.values.type.value == "1" && row.values.vbdef1.value){
|
||||||
|
|
||||||
|
let vbdef1 =Number(row.values.nnum.value) *Number(row.values["cmaterialvid.def28"].value) ;
|
||||||
|
props.cardTable.setValByKeyAndIndex(AREA.body, i, "vbdef1", { value: ""+vbdef1 }); //主数量
|
||||||
|
props.cardTable.setValByKeyAndIndex(AREA.body, i, FIELD.vbdef, [{vbdef1:{ value: ""+vbdef1 }}]);
|
||||||
|
|
||||||
|
|
||||||
|
summarize=summarize+Number(vbdef1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (let i = 0; i < allRows.length; i++) {
|
||||||
|
let row = allRows[i];
|
||||||
|
if(row.values.type && row.values.type.value == "0"){
|
||||||
|
props.cardTable.setValByKeyAndIndex(AREA.body, i, FIELD.nnum, { value: ""+summarize,display:""+summarize }); //主数量
|
||||||
|
props.cardTable.setValByKeyAndIndex(AREA.body, i, FIELD.nassistnum, { value:""+summarize,display:""+summarize }); //主数量
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue