smartclient 动态获取后台执行状态

//*************************************条码输入框及事件处理*********************************************************
  	isc.SearchForm.create({
		ID:"findForm",
		left:20,
		autoFocus:true,//设置自动获取光标
		width:"120",
		//action:"BarCode/insertBarcode.action",
		fields:[{name: "barcode", type:"text", title:"barcode",width:250,height:25}],
		
		itemKeyPress:function(item,keyName,characterName){
			var itemName=this.getItems()[0].getFieldName();
			var barcode = this.getItems()[0].getValue(); // 获取输入文本框中的值
			var focusNode = this;
			var itemObj=this.getItem(itemName);
			if((barcode !== null) && (keyName == 'Enter')){  //如果条码不为空 and 单击回车键
				console.log("Enter Event !");
				//findForm.submitForm(); 
				RPCManager.sendRequest({
					paramsOnly:true,
					actionURL: "BarCode/insertBarcode.action",
					params:{inputbarcode:barcode},
					callback:function(data) {focusNode.myCallBack(data);}
				});
			}
		},
		myCallBack:function(data) {
			var msg=data.data.split(",")[0].split(":")[1];
			var barcode = data.data.split(",")[1].split(":")[1];
			var line = "barcodeline";
			var head = "barcodehead";
			console.log(data.data);
			if(barcode.contains(head)){
			  	BarcodeHead.filterData();
				console.log("barcode head is--->"+barcode);
				alert("温馨提示:" + msg );
			}else if (barcode.contains(line)){
				var recId = data.data.split(",")[2].split(":")[1].substring(0,2);
				console.log("recId is --->"+recId);
				var FKRecId = { PickListTableRecId:recId };
				LineList.filterData(FKRecId); //上载成功后自动刷新数据
				alert("温馨提示:" + msg );
			}else{
				alert("温馨提示 :" + msg );
			}
			var tag = this.getFields()[0].getValue();
			console.log("this.barcode is:tag "+ tag);
		}
	})


你可能感兴趣的:(function,null,callback)