撤销误删除文件
This commit is contained in:
parent
505c0461cf
commit
b0f7ebd7f3
62
WebContent/Tenwa/Apzl/productCorpus/LbCorpusSourceList.jsp
Normal file
62
WebContent/Tenwa/Apzl/productCorpus/LbCorpusSourceList.jsp
Normal file
@ -0,0 +1,62 @@
|
||||
<%@page import="com.amarsoft.app.base.util.ObjectWindowHelper"%>
|
||||
<%@page import="com.amarsoft.app.base.businessobject.*"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
/*
|
||||
本金资源顺序列表
|
||||
*/
|
||||
String productId= CurPage.getParameter("productId");
|
||||
ASObjectModel doTemp = new ASObjectModel("LB_PRODUCT_CORPUS_SOURCE");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow(productId);
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","新增","新增","newRecord();","","","","btn_icon_add",""},
|
||||
{"true","","Button","保存","保存","save()","","","","",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function newRecord(){
|
||||
var position= getRowCount(0);
|
||||
as_add(0);
|
||||
tableDatas['myiframe0'][position][0]='<%=productId%>';
|
||||
}
|
||||
function save(){
|
||||
if(checkAll()=='s'){
|
||||
as_save(0);
|
||||
self.location.reload();
|
||||
}
|
||||
}
|
||||
function checkAll(){
|
||||
//双循环来遍历查重
|
||||
for(var i=0;i<getRowCount(0);i++){
|
||||
for(var j = i+1; j < getRowCount(0); j++){
|
||||
var orderList = getItemValue(0,i,'ORDER_LIST');
|
||||
var corpusSource = getItemValue(0,i,'CORPUS_SOURCE');
|
||||
var orderListLast = getItemValue(0,j,'ORDER_LIST');
|
||||
var corpusSourceLast = getItemValue(0,j,'CORPUS_SOURCE');
|
||||
if(i==0){
|
||||
if(orderList==null||orderList==''||corpusSource==null||corpusSourceLast==''||orderListLast==null||orderListLast==''||corpusSourceLast==null||corpusSourceLast==''){
|
||||
alert('资金来源或排序号不能为空');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(orderList==orderListLast){
|
||||
alert('排序号不可以重复');
|
||||
return;
|
||||
}else if(corpusSource==corpusSourceLast){
|
||||
alert('资金来源不可以重复');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 's';
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -0,0 +1,78 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
|
||||
/*
|
||||
产品配置资金来源顺序主页面
|
||||
*/
|
||||
ASObjectModel doTemp = new ASObjectModel("VI_PRODUCT_CORPUS_SOURCE");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
// dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","","Button","编辑","编辑","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","删除","删除","deleteProduct()","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function newRecord(){
|
||||
var productId='';
|
||||
AsDialog.OpenSelector("selectProductList","","dialogWidth=" + parseInt(window.screen.width * 0.6) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",
|
||||
function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="")
|
||||
{
|
||||
//alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
productId = sReturn[0];
|
||||
|
||||
var sUrl = "/Tenwa/Apzl/productCorpus/LbProductCorpusUpDown.jsp";
|
||||
AsDialog.PopView(sUrl,'productId='+productId,'dialogWidth=950px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;',function(){reloadSelf();},'新建');
|
||||
},"请选择产品",'');
|
||||
//将返回的产品ID传输到编辑的info页面,info页面只是展示作用,然后list页面新增的时候再保存。
|
||||
//编辑按钮不采用在后面添加超连接形式,曾经有的页面采用这种方式数据量大时特别卡。采用系统封装按钮事件来实现。
|
||||
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Apzl/productCorpus/LbProductCorpusUpDown.jsp";
|
||||
var sPara = getItemValue(0,getRow(0),'PRODUCT_ID');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsDialog.PopView(sUrl,'productId=' +sPara ,'dialogWidth=950px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;',function(){reloadSelf();},'编辑');
|
||||
}
|
||||
/*function afterSearch(){
|
||||
for(var i=0;i<getRowCount(0);i++){
|
||||
if(getObj(0,i,"action")!=null){
|
||||
getObj(0,i,"action").innerHTML='<a class="box" style="text-align:center;" onclick="edit(\''+getItemValue(0,i,"PRODUCT_ID")+'\')" style={color:#000;text-decoration:underline;}><font color="blue">     编辑</font></ a>';
|
||||
}
|
||||
};
|
||||
}
|
||||
function edit(productId){
|
||||
var sUrl="/Tenwa/Apzl/productCar/LmProductUpAndDown.jsp";
|
||||
var sPara = "productId="+productId;
|
||||
AsDialog.PopView(sUrl,sPara,"dialogWidth=950px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){reloadSelf();},"配置车辆");
|
||||
}*/
|
||||
function deleteProduct(){
|
||||
var sPara ='productId='+ getItemValue(0,getRow(0),'PRODUCT_ID');
|
||||
var sResult = AsControl.RunJsp('/Tenwa/Apzl/productCorpus/deleteProductCorpus.jsp',sPara);
|
||||
alert(sResult);
|
||||
parent.reloadSelf();
|
||||
}
|
||||
|
||||
/*
|
||||
function mySelectRow(){
|
||||
var TYPENO = getItemValue(0,getRow(0),"TYPENO");
|
||||
parent.OpenInfo(TYPENO);
|
||||
//list 页面同步info页面的联动传至单击事件
|
||||
}
|
||||
*/
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -0,0 +1,20 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%><%@
|
||||
include file="/IncludeBegin.jsp"%><%
|
||||
/*
|
||||
页面说明: 示例上下联动框架页面
|
||||
*/
|
||||
String productId = CurPage.getParameter("productId");
|
||||
%><%@include file="/Resources/CodeParts/Frame02.jsp"%>
|
||||
<script type="text/javascript">
|
||||
mytoptd.height=100;
|
||||
OpenInfo();
|
||||
OpenList();
|
||||
function OpenInfo(){
|
||||
AsControl.OpenView("/Tenwa/Apzl/productCorpus/LbProductInfo.jsp","productId=<%=productId%>","rightup");
|
||||
}
|
||||
|
||||
function OpenList(){
|
||||
AsControl.OpenView("/Tenwa/Apzl/productCorpus/LbCorpusSourceList.jsp","productId=<%=productId%>", "rightdown");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/IncludeEnd.jsp"%>
|
||||
26
WebContent/Tenwa/Apzl/productCorpus/LbProductInfo.jsp
Normal file
26
WebContent/Tenwa/Apzl/productCorpus/LbProductInfo.jsp
Normal file
@ -0,0 +1,26 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
产品简介
|
||||
*/
|
||||
String productId = CurPage.getParameter("productId");
|
||||
String sTempletNo = "LbProductInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(productId);
|
||||
|
||||
String sButtons[][] = {
|
||||
//{"true","All","Button","保存","保存所有修改","save()","","","",""},
|
||||
//{"true","All","Button","返回","返回列表","returnList()","","","",""}
|
||||
};
|
||||
sButtonPosition = "south";
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
/* function save(){
|
||||
as_save("myiframe0","returnList()");
|
||||
} */
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
20
WebContent/Tenwa/Apzl/productCorpus/deleteProductCorpus.jsp
Normal file
20
WebContent/Tenwa/Apzl/productCorpus/deleteProductCorpus.jsp
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
<%@page import="com.amarsoft.are.jbo.JBOTransaction"%>
|
||||
<%@page import="com.amarsoft.are.jbo.JBOFactory"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/IncludeBeginMDAJAX.jsp"%><%
|
||||
String sResult = "";
|
||||
String productId = CurPage.getParameter("productId");
|
||||
int count = JBOFactory.createBizObjectQuery("jbo.prd.LB_PRODUCT_CORPUS_SOURCE", "select 1 from O where PRODUCT_ID=:productId").setParameter("productId", productId).getTotalCount();
|
||||
int count_d = JBOFactory.createBizObjectQuery("jbo.prd.LB_PRODUCT_CORPUS_SOURCE", "delete from O where PRODUCT_ID=:productId").setParameter("productId", productId).executeUpdate();
|
||||
if(count==count_d){
|
||||
sResult="删除成功";
|
||||
}else if(count_d==0){
|
||||
sResult="删除失败";
|
||||
}else if(count>count_d&&count_d>0){
|
||||
sResult="部分删除,请记录当前产品ID或产品名称,并联系系统管理员";
|
||||
}else{
|
||||
sResult="未知错误,请记录当前产品ID或产品名称,并联系系统管理员";
|
||||
}
|
||||
out.println(sResult);
|
||||
%><%@ include file="/IncludeEndAJAX.jsp"%>
|
||||
Loading…
x
Reference in New Issue
Block a user