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);
}
}

Ext.js给form加背景图片的更多相关文章
- Ext JS 如何动态加载JavaScript创建窗体
JavaScript不需要编译即可运行,这让JavaScript构建的应用程序可以变得很灵活.我们可以根据需要动态从服务器加载JavaScript脚本来创建和控制UI来与用户交互.下面结合Ext JS ...
- js 定时更改div背景图片
今天遇到一个业务场景,使用js将一个div标签的背景图片定时更换一下. 之前百度了几个,有css+js,也有css3的,不过css3的兼容有问题,之后同事提示,可以使用js直接来更换div的北京图片, ...
- js 动态设置 div 背景图片 并滚动显示
var imgs =["../img/index/bgstyle/style1/index_top_bg2.jpg", "../img/index/bgstyle/sty ...
- js根据ID修改背景图片
<SCRIPT language=javascript> function expand(el) { var childObj = document.getElementById(&quo ...
- js设置随机切换背景图片
<script> var imgs =["http://images.cnblogs.com/cnblogs_com/xiaobo-Linux/1112236/o_2.jpg&q ...
- 5UCMS判断当前栏目高亮(用于当前所在栏目加背景图片或颜色)
5UCMS判断当前栏目高亮标签 比较简单的是频道页(channel.html): 大类代码: <!--menu:{ $row=10 $table=channel }--> <li { ...
- iOS关于UILabel 基本属性 背景图片 背景色
[代码] iOS关于UILabel 基本属性 背景图片 背景色 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ...
- Ext JS 6开发实例(二) :使用CMD创建应用程序
由于Ext JS 6将原来的Ext JS和Sencha Touch合并为一个框架,因而在使用CMD来创建应用程序前,需要考虑清楚你是要创建一个通用应用程序,还是仅仅只是针对桌面或移动设备的应用程序. ...
- css网页中设置背景图片的方法详解
在css代码中设置背景图片的方法,包括背景图片.背景重复.背景固定.背景定位等 用css设置网页中的背景图片,主要有如下几个属性: 1,背景颜色 {">说明:参数取值和颜色属性一样 ...
随机推荐
- jquery显示隐藏效果
通过 jQuery,您可以使用 hide() 和 show() 方法来隐藏和显示 HTML 元素toggle() 方法来切换 hide() 和 show() 方法. 1.hide()隐藏元素 $(se ...
- [LoadRunner]录制启动时报“The JVM could not be started……”错误解决方案
在LR准备点击录制java over http协议时,程序报如下错误: 报错提示是设置的JVM值设置问题,导致不能启动. 解决方案一 点击F4快捷按钮,会弹出以下界面,在选中的位置选择对应的java路 ...
- python3发送邮件01(简单例子,不带附件)
# -*- coding:utf-8 -*-import smtplibfrom email.header import Headerfrom email.mime.text import MIMET ...
- SQL 字符串函数
http://www.w3cschool.cn/sql/sql-string-functions.html SQL 字符串函数 序号 Name Description 备注 1 ASCII() 返回最 ...
- Nginx FastCGI PHP
We can see this comment in nginx.conf. # pass the PHP scripts to FastCGI server listening on 127.0.0 ...
- 2017.10.7 QBXT 模拟赛
题目链接 T1 容斥原理,根据奇偶性进行加减 #include<iostream> #include<cstdio> using namespace std; typedef ...
- UI EventSystem事件监听
Unity5.0 EventSystem事件系统的详细说明 一.EventSystem对象的说明 当我们在场景中创建任一UI对象后,Hierarchy面板中都可以看到系统自动创建了对象EventSys ...
- falling object思路总结
1.用检测的方法把falling object标记为一个类别,然后检测出类别.这种方式不可行的原因:因为falling object可能是任何东西,所以可能是一个路锥,也可能是一个玻璃瓶,还可能是掉下 ...
- Bootstrap历练实例:默认的面板(Panels)
Bootstrap 面板(Panels) 本章将讲解 Bootstrap 面板(Panels).面板组件用于把 DOM 组件插入到一个盒子中.创建一个基本的面板,只需要向 <div> 元素 ...
- 使用CAShapeLayer实现复杂的View的遮罩效果
一.案例演示 最近在整理一个聊天的项目的时候,发送图片的时候,会有一个三角的指向效果,指向这张图片的发送者.服务端返回给我们的图片只是一张矩形的图片,我们如何把一张矩形的图片或者View,加上一层自定 ...