44 lines
1.8 KiB
JavaScript
44 lines
1.8 KiB
JavaScript
|
/*YuO8szH0cVixePu/Bt+mG59VFWmooH8DYVqzRLG5lkY=*/
|
|||
|
import { ajax, base, spaCache, toast } from 'nc-lightapp-front';
|
|||
|
let { setDefData, getDefData } = spaCache;
|
|||
|
import { pagecode, searchId, headId, bodyId, billType, dataSource } from '../constants';
|
|||
|
import {sortFunction} from '../../../../public/components/pubUtils/billPubUtil'
|
|||
|
|
|||
|
|
|||
|
//点击查询,获取查询区数据
|
|||
|
export default function () {
|
|||
|
let searchVal = this.props.search.getAllSearchData(searchId);
|
|||
|
if(searchVal && this.props.getUrlParam('dest_tradetype')){
|
|||
|
let data = {
|
|||
|
queryInfo: this.props.search.getQueryInfo(searchId),
|
|||
|
appcode: this.props.getUrlParam('src_appcode'),
|
|||
|
pageId: pagecode,
|
|||
|
src_billtype: billType,
|
|||
|
dest_tradetype: this.props.getUrlParam('dest_tradetype'),
|
|||
|
busitype: getDefData(billType + this.props.getUrlParam('src_tradetype'), "transfer.dataSource")
|
|||
|
}
|
|||
|
//得到数据渲染到页面
|
|||
|
ajax({
|
|||
|
url: '/nccloud/arap/arappub/transferquery.do',
|
|||
|
data: data,
|
|||
|
success: (res) => {
|
|||
|
if (res.data) {
|
|||
|
let newdata = res.data.sort(sortFunction('billdate','billno',headId))
|
|||
|
this.props.transferTable.setTransferTableValue(headId, bodyId, newdata, 'pk_recbill', 'pk_recitem');
|
|||
|
/*
|
|||
|
* key:存储数据的key
|
|||
|
* dataSource: 缓存数据命名空间
|
|||
|
* data: 存储数据
|
|||
|
*/
|
|||
|
setDefData('searchData', dataSource, res.data);
|
|||
|
toast({ color: 'success', content: this.state.json['receivablebill-000031']+res.data.length+this.state.json['receivablebill-000032'] });/* 国际化处理: 查询成功,共,条*/
|
|||
|
} else {
|
|||
|
this.props.transferTable.setTransferTableValue(headId, bodyId, [], 'pk_recbill', 'pk_recitem');
|
|||
|
toast({ content: this.state.json['receivablebill-000063'], color: 'warning'});/* 国际化处理: 未查询到符合条件的数据*/
|
|||
|
}
|
|||
|
}
|
|||
|
})
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/*YuO8szH0cVixePu/Bt+mG59VFWmooH8DYVqzRLG5lkY=*/
|