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,背景颜色 {">说明:参数取值和颜色属性一样 ...
随机推荐
- css3动画之圆形运动轨迹
css3中通过@keyframes定义动画,animation设置动画属性,从而实现动画效果: 在animation属性当中,可以规定动画的名称.整个动画的运行时间.运动的速度曲线以及其延迟时间.播放 ...
- 【装载】删除Oracle11G
卸载Oracle步骤:1.停止所有与ORACLE相关的服务.2. 使用OUI(Oracle Universal Installer)卸载Oracle软件. “开始”->“程序”->“O ...
- Yii2 的快速配置 api 服务 yii2-fast-api
yii2-fast-api yii2-fast-api是一个Yii2框架的扩展,用于配置完善Yii2,以实现api的快速开发. 此扩展默认的场景是APP的后端接口开发,因此偏向于实用主义,并未完全采用 ...
- 机器学习经典算法之SVM
SVM 的英文叫 Support Vector Machine,中文名为支持向量机.它是常见的一种分类方法,在机器学习中,SVM 是有监督的学习模型. 什么是有监督的学习模型呢?它指的是我们需要事先对 ...
- Delphi7使用二维码
参考:http://jingyan.baidu.com/article/e75057f2ad6481ebc81a897b.html 首先下载对应的 dll (已经上传到博客园文件) 然后就是Delph ...
- Securityonion介绍
下载地址 https://github.com/Security-Onion-Solutions/security-onion/blob/master/Verify_ISO.md ...
- 【Windows 10 v1703】解决桌面出现Removable Storage Devices的问题
症状如下: 右键没有正常菜单,不能查看属性. 不能通过文件树找到这个文件夹. 出现原因不明. 暂时的解决方案: 右键,新建一个快捷方式.然后将快捷方式拖进垃圾桶,删除.这个文件夹将会被连带删除. 感谢 ...
- 香港城大:首创3D打印磁控微型机器人技术推动人体送药研究发展
香港城市大学研究团队全球首创由磁力推动.3D打印的微型机器人技术,能于生物体内精确地运载细胞到指定位置,预料可用作人体送药,为癌症治疗.细胞层面的治疗.再生医学等方面的应用,带来革命性改变. 近年,再 ...
- 使用ImageList组件制作动画图片
实现效果: 知识运用: Timer组件的Enabled属性 Tick事件 PictureBox控件的Image属性 ImageList组件的Images属性 实现代码: private void F ...
- cpp代码调试,调试扑克牌的代码
#include <iostream> #include <vector> #include <algorithm> using namespace std; cl ...