zoukankan      html  css  js  c++  java
  • Ext.js给form加背景图片

    {
                    iconCls: 'zyl_icons_showdetail',
                    tooltip: '查看',
                    handler: function(gridView, rowIndex, colIndex) {
                        var rowInfo = gridView.up('grid').getStore().getAt(rowIndex);
                        if (Ext.isEmpty(rowInfo.get('adFlag'))) {
                            rowInfo.set('adFlag', 0);
                        }
                        var viewWindow = me.getOpBillLineInfoViewWindow(new Array());
                        var viewForm = viewWindow.getOpBillLineInfoViewTab().getOpBillLineInfoViewForm();
                        viewForm.setOperatorType(rowInfo.data);
                        viewWindow.showData = rowInfo.data;
                        viewWindow.show();
    
                        var imgSign='url(../../images/seal/unsign.png) 0px 0 no-repeat';
                        var imgReceipt='';
                        var imgSettle='';
                        var imgRefund='';
                        if(rowInfo.data.billState==4){
                            imgSign='url(../../images/seal/sign.png) 0px 0 no-repeat';
                        }
    //----------------------------------------------回单信息-----------------------------------------------
    //----------------------------------------------------------------------------------------------------
                        if(rowInfo.data.receiptMethodCode!=1){
    
                        //回单状态 0.未收回、1.已收回 、2.已寄出、3、已接收、4.已返客户
                        //回单图片 receiptCol已收集1 receiptMail 2已寄出 receiptRec 3已返发站 receiptRt 4已返客户
                        Ext.Ajax.request({
                            url: opHostName + '/op/receiptBillCollect.do' + urlToken,
                            params: {
                                'uniteBillCode': rowInfo.data.uniteBillCode
                            },
                            success: function (response) {
                                var respText = Ext.JSON.decode(response.responseText);
                                if (respText.data == null) {
                                    return;
                                }
                                var receiptForm = Ext.getCmp('Op_OpBillLineInfo_ReceiptBillCollectForm_ID').getForm();
                                var receiptModel = Ext.create('Op.OpBillLineInfo.RecBillCollectModel', respText.data);
                                receiptForm.loadRecord(receiptModel);
    
                                if(respText.data.status==1){
                                    imgReceipt=',url(../../images/seal/receiptCol.png) 840px 0px no-repeat';
                                }else if(respText.data.status==2){
                                    imgReceipt=',url(../../images/seal/receiptMail.png) 840px 0px no-repeat';
                                }else if(respText.data.status==3){
                                    imgReceipt=',url(../../images/seal/receiptRec.png) 840px 0px no-repeat';
                                }else if(respText.data.status==4){
                                    imgReceipt=',url(../../images/seal/receiptRt.png) 840px 0px no-repeat';
                                }
                                    viewForm.setBodyStyle('background: '+imgSign+imgReceipt+imgRefund+imgSettle);
                                if (respText.data.openBillTime != null) {
                                    receiptForm.findField('openBillTime').setValue(Ext.Date.format(new Date(respText.data.openBillTime), 'Y-m-d H:i:s'))
                                }
                                if (respText.data.signTime != null) {
                                    receiptForm.findField('signTime').setValue(Ext.Date.format(new Date(respText.data.signTime), 'Y-m-d H:i:s'))
                                }
                                if (respText.data.inventoryEnterTime != null) {
                                    receiptForm.findField('inventoryEnterTime').setValue(Ext.Date.format(new Date(respText.data.inventoryEnterTime), 'Y-m-d H:i:s'))
                                }
                                if (respText.data.modifyTime != null) {
                                    receiptForm.findField('modifyTime').setValue(Ext.Date.format(new Date(respText.data.modifyTime), 'Y-m-d H:i:s'))
                                }
                                if (respText.data.backTime != null) {
                                    receiptForm.findField('backTime').setValue(Ext.Date.format(new Date(respText.data.backTime), 'Y-m-d H:i:s'))
                                }
                            },
                            failure: function (response) {
                                Ext.ux.Toast.msg('提示', response.responseText, 'error');
                            }
                        });
    
                        }
    //----------------------------------------------记账信息-----------------------------------------------
    //----------------------------------------------------------------------------------------------------
                       if(rowInfo.data.collectGoodsPrice!=0){
                        Ext.Ajax.request({
                            url: foHostName + '/fo/queryCashAccountList.do' + urlToken,
                            params: {
                                'uniteBillCode': rowInfo.data.uniteBillCode
                            },
                            success: function (response) {
                                var result = Ext.JSON.decode(response.responseText);
                                var grid = Ext.getCmp('Op_OpBillLineInfo_AccountGridPanel_ID').getStore();
                                if (!Ext.isEmpty(result.data)) {
                                    grid.removeAll();
                                    grid.add(result.data);
    
                                    for(var j = 0,len = result.data.length; j < len; j++){
    
                                        if(result.data[j].status==1&&result.data[j].priceType==40){
                                           imgRefund=',url(../../images/seal/refund.png) 560px 0 no-repeat';
                                           break;
                                        }else{
                                           imgRefund=',url(../../images/seal/unrefund.png) 560px 0 no-repeat';
                                        }
    
                                        if(result.data[j].status==1&&(result.data[j].priceType==31||result.data[j].priceType==33||result.data[j].priceType==34||result.data[j].priceType==35||result.data[j].priceType==36)){
                                           imgSettle=',url(../../images/seal/tranceFeeSettle.png) 280px 0 no-repeat';
                                           break;
                                        }else if(result.data[j].priceType==31||result.data[j].priceType==33||result.data[j].priceType==34||result.data[j].priceType==35||result.data[j].priceType==36){
                                           imgSettle=',url(../../images/seal/tranceFeeUnSettle.png) 280px 0 no-repeat';
                                        }
                                    }
                                   viewForm.setBodyStyle('background: '+imgSign+imgReceipt+imgRefund+imgSettle);
                                }
                            },
                            failure: function (response) {
                                Ext.ux.Toast.msg('提示', response.responseText, 'error');
                            }
                        });
                            }
    
                            viewForm.setBodyStyle('background: '+imgSign+imgReceipt+imgRefund+imgSettle);
    
                    }
                }

  • 相关阅读:
    使用多线程生产者消费者模式实现抓斗图
    selenium+chrome抓取淘宝搜索抓娃娃关键页面
    mysql必知必会
    mongoDB高级查询$type4array使用解析
    并发服务器几种实现方法总结
    python的面向对象和面向过程
    lazarus,synedit输入小键盘特殊符号的补丁
    Delphi中静态方法重载还是覆盖的讨论
    python全栈开发_day4_if,while和for
    python全栈开发_day3_数据类型,输入输出及运算符
  • 原文地址:https://www.cnblogs.com/feifeicui/p/10620931.html
Copyright © 2011-2022 走看看