<%@ page language="java" contentType="text/html; charset=UTF-8"
|
pageEncoding="UTF-8"%>
|
<%
|
String isShowOnlineMsg="[?isShowOnlineMsg]";
|
String isShowProcessTracking="[?isShowProcessTracking]";
|
%>
|
<link rel="stylesheet" type="text/css" href="/style/commons.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/commons.css")%>">
|
<link rel="stylesheet" type="text/css" href="/style/icon.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/icon.css")%>">
|
<link rel="stylesheet" type="text/css" href="/style/default/easyui.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/default/easyui.css")%>">
|
<link rel="stylesheet" type="text/css" href="/layui/css/layui.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/layui/css/layui.css")%>">
|
<script src="/layui/layui.all.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/layui/layui.all.js")%>" type="text/javascript"></script>
|
<script type="text/javascript" src="/shopping/view/javascript/gotop/js/jquery-1.10.2.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/shopping/view/javascript/gotop/js/jquery-1.10.2.min.js")%>"></script>
|
<script type="text/javascript" src="/js/jquery.cookie.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery.cookie.min.js")%>"></script>
|
<script type="text/javascript" src="/js/jquery-migrate-1.2.1.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery-migrate-1.2.1.js")%>"></script>
|
<script type="text/javascript" src="/js/layer/layer.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/layer/layer.js")%>"></script>
|
<script type="text/javascript" src="/js/general/jquery.easyui.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/general/jquery.easyui.min.js")%>"></script>
|
<script type="text/javascript" src="/js/general/easyui/jquery.easyui.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/general/easyui/jquery.easyui.min.js")%>"></script>
|
<script type="text/javascript" src="/js/general/jquery.easyui.dialog.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/general/jquery.easyui.dialog.js")%>"></script>
|
<script type="text/javascript" src="/js/locale/easyui-lang-zh_CN.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/locale/easyui-lang-zh_CN.js")%>"></script>
|
<script type="text/javascript" src="/js/docControl/control.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/docControl/control.js")%>"></script>
|
<script type="text/javascript" src="/js/index/funcLink.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/index/funcLink.js")%>"></script>
|
<script type="text/javascript" src="/js/index/jQueryRotate.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/index/jQueryRotate.js")%>"></script>
|
<script type="text/javascript" src="/js/index/rotate.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/index/rotate.js")%>"></script>
|
<script type="text/javascript" src="/js/panel.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/panel.js")%>"></script>
|
<script type="text/javascript" src="/Grid/GridE.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/Grid/GridE.js")%>"></script>
|
<script type="text/javascript" src="/js/hotkey.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/hotkey.js")%>" ></script>
|
<script type="text/javascript" src="/js/iscroll5.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/iscroll5.js")%>" ></script>
|
<%--<link rel="stylesheet" type="text/css" href="/js/bootstrap-upload/css/bootstrap.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/bootstrap-upload/css/bootstrap.css")%>"> --%>
|
<%--<script type="text/javascript" src="/shopping/view/javascript/bootstrap/js/bootstrap.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/shopping/view/javascript/bootstrap/js/bootstrap.min.js")%>"></script>--%>
|
<link rel="stylesheet" type="text/css"
|
href="/js/select2/dist/css/select2.min.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/select2/dist/css/select2.min.css")%>">
|
<script type="text/javascript"
|
src="/js/select2/dist/js/pinyin.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/select2/dist/js/pinyin.js")%>"></script>
|
<script type="text/javascript"
|
src="/js/select2/dist/js/select2.full.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/select2/dist/js/select2.full.js")%>"></script>
|
<script type="text/javascript"
|
src="/js/select2/dist/js/i18n/zh-CN.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/select2/dist/js/i18n/zh-CN.js")%>"></script>
|
@_add_js_css_@
|
<script type="text/javascript">
|
var spellPath="/<%=session.getAttribute(SessionKey.DATA_BASE_ID)%>/<%=session.getAttribute(SessionKey.VERSION_ID)%>/<%=session.getAttribute(SessionKey.SYSTEM_LANGUAGE)%>/";
|
var formId=<%=formId%>;
|
panelFormId=formId;
|
var formType=<%=formType%>;
|
var user="<%=userCode%>";
|
var isSuperUser="<%=isSuperUser %>";
|
var cccode='<%=session.getAttribute(SessionKey.CCCODE)%>';
|
//确认前状态
|
var predocstatus="[?predocstatus]";
|
var Custom_Doccode="@CustomDoccode@";
|
var btnId=null;//决定按钮检查
|
var check=0;//来判断是否保存与确定
|
var grid;//全局
|
var plane;
|
//通过,驳回,时代按钮所需全局变量
|
var panelHasSave=false;//面板是否保存
|
var btnSave=false;//是否这两个按钮保存
|
var isNew='<%=isNew %>';
|
function commitIs(check,flag){
|
if(top.approvedDoc){
|
top.approvedDoc.getCurTabsIndex();
|
}
|
//flag标记数据范围检查已通过
|
showLoading();
|
grid = mygrid;
|
var doc = getDoc('doccode', ".value");
|
var pm = panMain[panIndex];
|
grid.setPanelAction(((isNew == 1 && doc == "") ? "add" : "update"), pm.tableIs, doc);
|
plane = pm.getPanMap();
|
plane._YCAUDIT_ = shenji(panIndex, plane, doc); //审计处理
|
grid.postData(plane, check);
|
//操作时间:2014-3-26 15:52:04 ——辛煜波
|
if (check == 3) {
|
grid.tran(btnId == null ? "" : btnId, function (showIs, check) {
|
parent.errShow.frame = parent.frames[inThisFrame];
|
parent.errShow.show_divErro(showIs, check);
|
btnId = null;
|
}, 3, flag);
|
tranOk = false;
|
grid.aflg = 0;
|
} else {
|
grid.save(btnId == null ? "" : btnId, function (showIs, check) {
|
parent.errShow.frame = parent.frames[inThisFrame];
|
parent.errShow.show_divErro(showIs, check);
|
btnId=null;
|
}, check, flag);
|
}
|
}
|
|
function save(o, c) {
|
//2012-10-12 lqc
|
var flag = checkSession();//session失效后弹出登录框,flag为true时表示已经失效
|
if (flag) {
|
return;
|
}//end
|
if (!c || c == 0) {
|
if (o == 5) {//表示单据类型直接点保存,是为区分有在线支付功能时,确认也是执行保存操作
|
if ("undefined" != typeof onlinePay && onlinePay != null) {
|
onlinePay.pay = 0;
|
onlinePay.refund = 0;
|
onlinePay.isOnlinePay = false;
|
}
|
o = 2;//转换为2
|
}
|
save$(o);
|
} else {
|
centerPopup(formId, 2, function () {
|
save$(o);
|
}, '');
|
}
|
}
|
|
function save$(op) {
|
showLoading();
|
if (panMain[panIndex].checkUp()) {
|
check=op;
|
commitPan(check);
|
}else{
|
closeLoading();
|
}
|
}
|
|
function commitPan(check){//确定是凭证状态检查
|
if(check==3){
|
var url='/panState.do?formid='+formId+"&docdate="+getDoc('docdate','.value')+"&periodtype=#periodtype#&companyId="+getDoc('#comanyId#','.value');
|
url=encodeURI(url);
|
url=encodeURI(url);//必须两次
|
$.post(url,'',function(date){showPanMessge(date);},'text');
|
}else{
|
commitIs(check);
|
}
|
}
|
var notOk='';//判断是否检查凭证定义的正确性,''为正确
|
function showPanMessge(date){
|
date=date.substring(0,date.length-1);
|
var mass=date.split("#");
|
var in_fo=null;
|
notOk='';
|
for(i=0;i<mass.length;i++){
|
if(mass[i]!=""&&mass[i]!=null){
|
in_fo=mass[i].split(";pb;");
|
if(in_fo.length>1&&in_fo[1]=="0"){
|
alert(in_fo[0]);
|
// if(confirm(in_fo[0])){
|
notOk='not';
|
// }else{
|
// notOk='not';
|
// }
|
}else{
|
if(confirm(in_fo[0])){
|
notOk=='';
|
}else{
|
notOk='not';
|
break;
|
}
|
// notOk='not';
|
// alert(in_fo[0]);//弹出信息
|
}
|
}
|
}
|
if(notOk==''){
|
commitIs(check);
|
}else{
|
closeLoading();
|
}
|
}
|
function clearDoc(){//复单
|
isNew="1";
|
panMain[panIndex].isChange=1;
|
// setDoc('doccode',".value=''");//单号
|
// setDoc('docstatus',".value='#predocstatus#'"); //状态
|
var staname="";
|
if(typeof(stas)!="undefined"){staname=stas['#predocstatus#'];}else{staname='起草';}
|
setDocStatuInfo(staname);//
|
setDoc('docstatusname',".value='"+staname+"'");//状态描述
|
isAddLong=false;//决定有按钮控件是否还加上一定长度,使整体格式整齐
|
location.href = document.URL+"&cp=1&isNew=1&doccode="+getDoc('doccode','.value');
|
panMain[panIndex].noCopy();//取消不复制字段
|
// panMain[panIndex].loadSet(#predocstatus#);//加载设置
|
cp=true;
|
hiddenToolButton();
|
// mygrid.newRecord()
|
}
|
function delDoc(){ //删单
|
if(confirm("是否真的删除此单据?")) {
|
showLoading();
|
$.post("/panDelete.do?docstatus="+getDoc('docstatus','.value'),{"formid":formId,"doccode":getDoc('doccode','.value')},getMess,'text');
|
}
|
}
|
function disDoc(){ //作废单
|
if(confirm("是否真的作废此单据?")) {
|
showLoading();
|
$.post("/panDiscard.do?docstatus="+getDoc('docstatus','.value'),{"formid":formId,"doccode":getDoc('doccode','.value'),"formtype":formType},getMess,'text');
|
}
|
}
|
function getMess(data){
|
closeLoading();
|
var json=JSON.parse(data);
|
if(json.state==0){
|
alert('已经处理!');
|
if(opener!=null && typeof opener !="undefined" && opener.window!=null){
|
opener.window.location.reload();//刷新父窗口
|
}
|
closeme();//关闭当前窗口
|
}else{
|
//by by danaus 2022/9/13 17:52
|
if(json.msg.indexOf("@p@")) {
|
var msg=json.msg.split("@p@");
|
alert(msg[0]);
|
redirect(msg[1]);
|
}else {
|
alert(json.msg);//直接弹出错误
|
}
|
}
|
}
|
|
if(navigator.userAgent.match(/iPad|iPhone|Android/i)){
|
try{
|
var myScroll = new IScroll('#scrollbody', {
|
mouseWheel: true,
|
scrollbars: true,
|
zoom: true,
|
scrollX: true,
|
scrollY: true,
|
wheelAction: 'zoom'
|
});
|
}catch(e){}
|
}
|
</script>
|
<style type="text/css">
|
<!--
|
#scroller{
|
position:absolute;
|
z-index:1;
|
overflow:auto;/* winphone8º̡ndroid4+ */
|
-webkit-overflow-scrolling: touch; /* ios5+ */
|
width:100%;
|
height:100%;
|
}
|
body{margin: 0px;padding:0px;}
|
-->
|
</style>
|