|
发表于 2023-5-16 10:14:24
|
显示全部楼层
不是太明白,我在外面都定义好了变量。在弹出框中没有用到this啊
var url= new Element(div_cpinfo.node);
var container=this.form.getApp().content;
// var aaaa=field.node;
var dialog = o2.DL.open({
"title": "产品信息查询",
"width": "900",
"height" : "600",
"isClose": true,
"offset": {"x":-50, "y": -100},
"mask": true,
"content": url,
"container": container,
"duration": 200,
"buttonList": [
{
"text": "确认",
"action": function(){
//获取数据表格“dt1”的正在编辑的条目。
var line_serch = datatable_cpinfo.currentEditedLine;
// line_serch.changeEditMode(false);
//获取数据
var data_cp = line_serch.getData();
if(Object.keys(data_cp).length>0){
line_cp.get("chanpin_mingcheng").setData(data_cp.cpselect_mingcheng);
line_cp.get("chanpin_pinhao").setData(data_cp.cpselect_pinhao);
line_cp.get("chanpin_xinghao").setData(data_cp.cpselect_xinghao);
// line_cp.changeEditMode(false);
dialog.close();
}
else{
alert("请选择一条数据");
}
}.bind(this)
},
{
"text": "关闭",
"action": function(){
dialog.close();
}.bind(this)
}
|
|