|
|
@@ -12,51 +12,17 @@ Ext.define('saas.view.sale.b2b.recformpanel.FormPanel', {
|
|
|
_codeField: 'ap_code',
|
|
|
_relationColumn: 'pd_puid',
|
|
|
_readUrl: '/api/sale/b2b/apCheck/getAllByKeywords',
|
|
|
- tbar: [{
|
|
|
- width:160,
|
|
|
+
|
|
|
+ items: [{
|
|
|
+ margin:'10 10 0 0',
|
|
|
+ columnWidth:0.25,
|
|
|
+ bind:'{suuorname}',
|
|
|
xtype: 'textfield',
|
|
|
- emptyText: '请输入客户名称'
|
|
|
- }, {
|
|
|
- margin:'0 0 0 10',
|
|
|
- width:100,
|
|
|
- name:'currencyCombo',
|
|
|
- xtype: 'combo',
|
|
|
- displayField: 'display',
|
|
|
- valueField: 'value',
|
|
|
- emptyText: '币别',
|
|
|
- listeners:{
|
|
|
- expand:function(f){
|
|
|
- if(f.picker&&f.isExpanded){
|
|
|
- f.picker.setHeight(33*f.store.getCount())
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- } ,{
|
|
|
- margin:'0 0 0 10',
|
|
|
- name:'date',
|
|
|
- xtype: 'condatefield',
|
|
|
- fieldLabel: '日期',
|
|
|
- width:520,
|
|
|
- },{
|
|
|
- margin:'0 0 0 10',
|
|
|
- xtype: 'button',
|
|
|
- text: '查询',
|
|
|
- handler:'query'
|
|
|
+ name:'suuorname',
|
|
|
+ fieldLabel: '应收客户',
|
|
|
+ editable:false,
|
|
|
+ readOnly:true
|
|
|
},{
|
|
|
- margin:'0 0 0 10',
|
|
|
- xtype: 'button',
|
|
|
- text: '确认对账'
|
|
|
- },'->',{
|
|
|
- margin:'0 10 0 0',
|
|
|
- ignore: true,
|
|
|
- style:'text-align: center;',
|
|
|
- bodyStyle:'margin-right:10px;',
|
|
|
- xtype:'displayfield',
|
|
|
- value:'<a href=\"javascript:saas.util.BaseUtil.openTab(\'sale-b2b-reconciliation-datalist\',\'对账列表\',\'maintab-query-salereconciliation\')\">对账记录</a>'
|
|
|
- }],
|
|
|
-
|
|
|
-
|
|
|
- items: [{
|
|
|
margin:'10 10 0 0',
|
|
|
columnWidth:0.25,
|
|
|
bind:'{thisMonthCount}',
|
|
|
@@ -244,9 +210,57 @@ Ext.define('saas.view.sale.b2b.recformpanel.FormPanel', {
|
|
|
}],
|
|
|
|
|
|
initComponent: function () {
|
|
|
- var me = this,
|
|
|
- viewModel = me.getViewModel();
|
|
|
- var url = me._readUrl;
|
|
|
+ var me = this;
|
|
|
+
|
|
|
+ me.tbar = [{
|
|
|
+ margin:'0 0 0 10',
|
|
|
+ width:200,
|
|
|
+ labelWidth:80,
|
|
|
+ name:'currencyCombo',
|
|
|
+ xtype: 'combo',
|
|
|
+ displayField: 'display',
|
|
|
+ value:me.currency,
|
|
|
+ valueField: 'value',
|
|
|
+ emptyText: '请选择',
|
|
|
+ fieldLabel:'币别',
|
|
|
+ store:{
|
|
|
+ fields: ['display', 'value'],
|
|
|
+ data: []
|
|
|
+ },
|
|
|
+ listeners:{
|
|
|
+ expand:function(f){
|
|
|
+ if(f.picker&&f.isExpanded){
|
|
|
+ f.picker.setHeight(33*f.store.getCount())
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } ,{
|
|
|
+ margin:'0 0 0 10',
|
|
|
+ name:'date',
|
|
|
+ xtype: 'condatefield',
|
|
|
+ fieldLabel: '日期',
|
|
|
+ width:520,
|
|
|
+ },{
|
|
|
+ margin:'0 0 0 10',
|
|
|
+ xtype: 'button',
|
|
|
+ text: '查询',
|
|
|
+ handler:'query'
|
|
|
+ },{
|
|
|
+ margin:'0 0 0 10',
|
|
|
+ xtype: 'button',
|
|
|
+ text: '确认对账',
|
|
|
+ handler:'check'
|
|
|
+ },'->',{
|
|
|
+ margin:'0 10 0 0',
|
|
|
+ ignore: true,
|
|
|
+ style:'text-align: center;',
|
|
|
+ bodyStyle:'margin-right:10px;',
|
|
|
+ xtype:'displayfield',
|
|
|
+ value:'<a href=\"javascript:saas.util.BaseUtil.openTab(\'sale-b2b-reconciliation-datalist\',\'对账列表\',\'maintab-query-salereconciliation\')\">对账记录</a>'
|
|
|
+ }];
|
|
|
+
|
|
|
+
|
|
|
+ var url = me._readUrl,viewModel = me.getViewModel();
|
|
|
var params = {
|
|
|
fromDate:me.fromDate,
|
|
|
endDate:me.endDate,
|
|
|
@@ -258,27 +272,16 @@ Ext.define('saas.view.sale.b2b.recformpanel.FormPanel', {
|
|
|
.then(function(res) {
|
|
|
me.setLoading(true);
|
|
|
if(res.success) {
|
|
|
- var mainDate = {};
|
|
|
var main = res.data.main;
|
|
|
- if(main.thisMonthCount){
|
|
|
- mainDate.thisMonthCount = main.thisMonthCount.amount
|
|
|
- }
|
|
|
- if(main.thisMonthDoneCount){
|
|
|
- mainDate.thisMonthDoneCount = main.thisMonthDoneCount.amount
|
|
|
- }
|
|
|
- if(main.thisMonthTodoCount){
|
|
|
- mainDate.thisMonthTodoCount = main.thisMonthTodoCount.amount
|
|
|
- }
|
|
|
- if(main.thisPeriodDoneAmount){
|
|
|
- mainDate.thisPeriodDoneAmount = main.thisPeriodDoneAmount.amount
|
|
|
- }
|
|
|
- if(main.thisPeriodSendAmount){
|
|
|
- mainDate.thisPeriodSendAmount = main.thisPeriodSendAmount.amount
|
|
|
- }
|
|
|
- if(main.totalCount){
|
|
|
- mainDate.totalCount = main.totalCount.amount
|
|
|
- }
|
|
|
- viewModel.setData(mainDate);
|
|
|
+ var mainDate = {
|
|
|
+ suuorname : me.suuorname,
|
|
|
+ thisMonthCount : main.thisMonthCount?main.thisMonthCount.amount:'',
|
|
|
+ thisMonthDoneCount : main.thisMonthDoneCount?main.thisMonthDoneCount.amount:'',
|
|
|
+ thisMonthTodoCount : main.thisMonthTodoCount?main.thisMonthTodoCount.amount:'',
|
|
|
+ thisPeriodDoneAmount : main.thisPeriodDoneAmount?main.thisPeriodDoneAmount.amount:'',
|
|
|
+ thisPeriodSendAmount : main.thisPeriodSendAmount?main.thisPeriodSendAmount.amount:'',
|
|
|
+ totalCount : main.totalCount?main.totalCount.amount:''
|
|
|
+ };
|
|
|
Ext.each(res.data.items,function(item,index){
|
|
|
if(item.haveChecked==0){
|
|
|
item.haveChecked = null
|
|
|
@@ -299,7 +302,7 @@ Ext.define('saas.view.sale.b2b.recformpanel.FormPanel', {
|
|
|
fields: ['display', 'value'],
|
|
|
data: o
|
|
|
});
|
|
|
- me.down('[name=currencyCombo]').value = me.currency
|
|
|
+ viewModel.setData(mainDate);
|
|
|
me.setLoading(false);
|
|
|
}
|
|
|
me.setLoading(false);
|