123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- Ext.define('make.view.money.billOutAP.BenchQueryPanel', {
- extend: 'saas.view.core.bench.Query',
- xtype: 'money-billoutap-benchpanel',
- viewModel: 'money-billoutap-benchquery',
- caller:'BillOutAP',
- items: [
- {
- itemId: 'All',
- xtype: 'money-billoutap-querypanel'
- },
- {
- //待开票 采购出入库
- itemId: 'money-billoutap-benchpanel-1',
- xtype: 'purchase-purchasein-querypanel-6',
- countGroupFields:'pi_vendcode,pi_currency',
- defaultCondition:"((pi_class in('采购验收单','采购验退单','PURCIN','PURCOUT') and pi_status='已审核') or (pi_class='ESTIMATE' and prodiodetail.pd_type in('采购入库','采购退货'))) "
- +"and abs(round(ifnull(prodiodetail.pd_ordertotal,0),2))>abs(round(ifnull(prodiodetail.pd_billamount,0),2))",
- _needCount: true
-
- },
- {
- //待开票 外协出入库
- itemId: 'money-billoutap-benchpanel-2',
- xtype: 'osmake-osmakecheckin-querypanel-5',
- countGroupFields:'pi_vendcode,pi_currency',
- baseVastUrl: '/api/make/prodinout/',
- defaultCondition:"((pi_status='已审核' and pi_class in('OSMAKEIN','OSMAKEINBACK')) or(pi_class='ESTIMATE' and prodiodetail.pd_type in('外协验收','外协验退'))) "
- +"and abs(round(ifnull(prodiodetail.pd_ordertotal,0),2))>abs(round(ifnull(prodiodetail.pd_billamount,0),2))",
- _needCount: true
-
- },
- {
- //待开票 采购对账单
- itemId: 'money-billoutap-benchpanel-3',
- xtype: 'purchase-b2b-reconciliation-querypanel-4',
- countGroupFields:'ac_vendcode,ac_currency',
- defaultCondition:"ac_class='PURC' and ac_statuscode='AUDITED' and abs(ifnull(apcheckdetail.ad_billqty,0))<abs(ifnull(ad_b2bqty,0))",
- _needCount: true
-
- },
- {
- //待开票 外协对账单
- itemId: 'money-billoutap-benchpanel-4',
- xtype: 'osmake-reconciliation-querypanel-4',
- countGroupFields:'ac_vendcode,ac_currency',
- defaultCondition:"ac_class='OS' and ac_statuscode='AUDITED' and abs(ifnull(apcheckdetail.ad_billqty,0))<abs(ifnull(ad_b2bqty,0))",
- _needCount: true
-
- },
- {
- //待审核
- itemId: 'money-billoutap-benchpanel-5',
- xtype: 'money-billoutap-querypanel-1',
- _needCount: true,//是否需计数 如果存在明细数据按整单合计,同时配置 countGroupFields 如:sa_code 多个分组 sa_code,sa_custcode
- defaultCondition:"bi_statuscode <> 'AUDITED'"
-
- },
- {
- //已审核
- itemId: 'money-billoutap-benchpanel-6',
- xtype: 'money-billoutap-querypanel-2',
- _needCount: false,//是否需计数
- defaultCondition:"bi_statuscode='AUDITED'"
- }
- ],
- countUrl:'money/billoutap/count',
- addBtnText:'',
- hiddenMe:true,
- isFirst:1,//第一次打开自动切换到对应待处理panel 再次切回来(非重新打开时,不处理)
- listeners: {
- onTabActivate:function(tabView){
- var me=this;
- if(me.isFirst){
- var BillOutAPSource=Ext.getCmp('mainView').getViewModel().get('BillOutAPSource')
- if("CHECK"==BillOutAPSource){
- itemId='money-billoutap-benchpanel-3';
- }else if("PRODIO"==BillOutAPSource){
- itemId='money-billoutap-benchpanel-1';
- }else{
- itemId='money-billoutap-benchpanel-5';
- }
- tabView.benchRefresh(tabView, itemId);
- Ext.defer(function(){
- tabView.updateCount();
- },200);
- me.isFirst=0;
- }
- }
- }
- });
|