|
本帖最后由 webcrow 于 2016-8-24 08:53 编辑
我在页面的一个组件的时间里面点击,它会莫名其妙在后面多加一串js开头的部分,自己手工删除后模型检查编译都没有问题,然后运行出错,按f12提示什么事件没有绑定上去:比如我点击windowReceiver1Receive 方法,光标会跳到正确的地方,但是js后面会加上那么一段,删除了再点击还是如此
define(function(require){
var $ = require("jquery");
var justep = require("$UI/system/lib/justep");
var Model = function(){
this.callParent();
};
Model.prototype.button3Click = function(event){
//if(this.comp("dataFlowBillList").getCount()>0){
// var fileName=this.comp("dataFlowBillList").getValue("cProductPICName");
try{
if(this.phyFileName.toString().length>6)
{
var s1=this.phyFileName.substr(0,2);
var s2=this.phyFileName.substr(2,2);
var s3=this.phyFileName.substr(4,2);
var s='$UI/nehoMES/systemMaintain/customerRes/productFile/'
+s1+'/'+s2+'/'+s3+'/'+this.phyFileName;
var url = require.toUrl(s+"?"+justep.UUID.createUUID());
window.open("http://"+this.docServerIP+":8080"+url);
}
}catch(error){
justep.Util.hint("图片文件有错误......");
}
};
Model.prototype.refreshServerIP = function(ServerName){
var dataServer = this.comp("dataServerIP");
dataServer.setFilter("uifilter", " cComGUID='"+this.comGUID+"' and cServerName = '"+ServerName+"'");
dataServer.refreshData();
};
Model.prototype.modelLoad = function(event){
debugger;
this.comGUID=$.trim(justep.Util.getCookie("companyGUID"));
this.refreshServerIP("文档服务器");
if(this.comp("dataServerIP").count()>0)
this.docServerIP=this.comp("dataServerIP").getValue("cServerIP");
};
Model.prototype.dataFlowBillCustomRefresh = function(event){
var data = this.comp('dataFlowBill');
var params = {
deviceCode:this.deviceCode,
flowID:this.flowID,
queryType:0
};
justep.Baas.sendRequest({
"url" : "/nehoMES/deviceNet",
"action" : "getFlowBillParam",
"async" : false,
"params" : params,
"success" : function(ret) {
data.loadData(ret);
}
});
};
Model.prototype.button1Click = function(event){
this.comp("dataWorkOrder").setFilter("uifilter", " cComGUID='"+this.comGUID+"' and cBillCode = '"+this.billCode+"'");
this.comp("dataWorkOrder").refreshData();
};
Model.prototype.windowReceiver1Receive = function(event){
this.deviceCode=event.data.deviceCode;
this.flowID=event.data.flowID;
this.phyFileName=event.data.phyFileName;
this.billCode=event.data.billCode;
this.comp('dataFlowBill').refreshData();
};
return Model;
});
define(function(require){
var $ = require("jquery");
var Model = function(){
this.callParent();
};
Model.prototype.windowReceiver1Receive = function(event){
};
return Model;
});
|
|