|
@@ -23,42 +23,77 @@
|
|
|
var extid=$("#${id}extId").val();
|
|
|
var area=$("#${id}area").val();
|
|
|
if (extid!=null && extid != ''){
|
|
|
- top.layer.open({
|
|
|
- type: 2,
|
|
|
- area: ['80%','80%'],
|
|
|
- title:"${title}",
|
|
|
- name:'friend',
|
|
|
- skin:"two-btns",
|
|
|
- content: encodeURI("${url}?userId="+userId+"&fieldLabels=${fieldLabels}&fieldKeys=${fieldKeys}&url=${url}&searchLabel=${searchLabel}&searchKey=${searchKey}&extid="+extid),
|
|
|
- btn: ['确定', '关闭'],
|
|
|
- yes: function(index, layero){
|
|
|
- var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
- var item = iframeWin.getSelectedItem();
|
|
|
- console.log(item);
|
|
|
- if(item == "-1"){
|
|
|
- return;
|
|
|
+ if(extid == '1'){
|
|
|
+ top.layer.open({
|
|
|
+ type: 2,
|
|
|
+ area: ['80%','80%'],
|
|
|
+ title:"${title}",
|
|
|
+ name:'friend',
|
|
|
+ skin:"two-btns",
|
|
|
+ content: encodeURI("${url}?userId="+userId+"&fieldLabels=${fieldLabels}&fieldKeys=${fieldKeys}&url=${url}&searchLabel=${searchLabel}&searchKey=${searchKey}&extid="+extid),
|
|
|
+ btn: ['确定', '关闭'],
|
|
|
+ yes: function(index, layero){
|
|
|
+ var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
+ var item = iframeWin.getSelectedItem();
|
|
|
+ console.log(item);
|
|
|
+ if(item == "-1"){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var items = item.split('_item_');
|
|
|
+ console.log(items)
|
|
|
+ //判断是否选择报销项目
|
|
|
+ if(items[0] == 1){
|
|
|
+ $("#${id}Radio").val(items[0]);
|
|
|
+ $("#${id}Id").val(items[1]);
|
|
|
+ $("#${id}Name").val(items[2]);
|
|
|
+ $("#${id}ReportNumber").val(items[3]);
|
|
|
+ }else{
|
|
|
+ $("#${id}Radio").val(items[0]);
|
|
|
+ $("#${id}Name").val(items[1]);
|
|
|
+ $("#${id}ReportNumber").val("");
|
|
|
+ }
|
|
|
+ top.layer.close(index);//关闭对话框。
|
|
|
+ //setValue(item.split('_item_')[0]);
|
|
|
+ },
|
|
|
+ cancel: function(index){
|
|
|
}
|
|
|
- var items = item.split('_item_');
|
|
|
- console.log(items)
|
|
|
- //判断是否选择报销项目
|
|
|
- if(items[0] == 1){
|
|
|
- $("#${id}Radio").val(items[0]);
|
|
|
- $("#${id}Id").val(items[1]);
|
|
|
- $("#${id}Name").val(items[2]);
|
|
|
- $("#${id}ReportNumber").val(items[3]);
|
|
|
- }else{
|
|
|
- $("#${id}Radio").val(items[0]);
|
|
|
- $("#${id}Name").val(items[1]);
|
|
|
- $("#${id}ReportNumber").val("");
|
|
|
+ });
|
|
|
+ }else if (extid=="2"){
|
|
|
+ top.layer.open({
|
|
|
+ type: 2,
|
|
|
+ area: ['50%','50%'],
|
|
|
+ title:"${title}",
|
|
|
+ name:'friend',
|
|
|
+ skin:"two-btns",
|
|
|
+ content: encodeURI("${url}?userId="+userId+"&fieldLabels=${fieldLabels}&fieldKeys=${fieldKeys}&url=${url}&searchLabel=${searchLabel}&searchKey=${searchKey}&extid="+extid),
|
|
|
+ btn: ['确定', '关闭'],
|
|
|
+ yes: function(index, layero){
|
|
|
+ var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
+ var item = iframeWin.getSelectedItem();
|
|
|
+ console.log(item);
|
|
|
+ if(item == "-1"){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var items = item.split('_item_');
|
|
|
+ console.log(items)
|
|
|
+ //判断是否选择报销项目
|
|
|
+ if(items[0] == 1){
|
|
|
+ $("#${id}Radio").val(items[0]);
|
|
|
+ $("#${id}Id").val(items[1]);
|
|
|
+ $("#${id}Name").val(items[2]);
|
|
|
+ $("#${id}ReportNumber").val(items[3]);
|
|
|
+ }else{
|
|
|
+ $("#${id}Radio").val(items[0]);
|
|
|
+ $("#${id}Name").val(items[1]);
|
|
|
+ $("#${id}ReportNumber").val("");
|
|
|
+ }
|
|
|
+ top.layer.close(index);//关闭对话框。
|
|
|
+ //setValue(item.split('_item_')[0]);
|
|
|
+ },
|
|
|
+ cancel: function(index){
|
|
|
}
|
|
|
- top.layer.close(index);//关闭对话框。
|
|
|
- //setValue(item.split('_item_')[0]);
|
|
|
- },
|
|
|
- cancel: function(index){
|
|
|
- }
|
|
|
- });
|
|
|
- // }else{
|
|
|
- // top.layer.msg("请先选择报销类型", {icon: 0});
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
};
|