经销商留言处理

This commit is contained in:
zzk 2023-09-12 18:58:48 +08:00
parent 7363a39e08
commit b5ad1c88b1
6 changed files with 357 additions and 1 deletions

View File

@ -0,0 +1,89 @@
<%@page import="com.itextpdf.text.log.SysoCounter"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@include file="/Frame/resources/include/include_begin_info.jspf"%><%
String id = CurPage.getParameter("id");//ID
String flowunid = CurPage.getParameter("flowunid");//流程编号
String phaseNo = CurPage.getAttribute("phaseNo"); //流程节点
String taskno=CurPage.getParameter("taskno"); //流程节点ID
String userid=CurPage.getParameter("userid");//当前登录人
String orgid=CurPage.getParameter("orgid");//当前登录部门
String username = Sqlca.getString("select username from user_info ui where userid = '"+userid+"'");
String orgname = Sqlca.getString("select orgname from org_info oi where orgid = '"+orgid+"'");
//判断修改人是否为提交人
String comm = "select case when phaseno = '"+phaseNo+"' and inputuser = '"+userid+"' then 'false' else 'true' end as comm from communication where id = '"+id+"'";
String sPrevUrl = CurPage.getParameter("PrevUrl");
if(sPrevUrl == null) sPrevUrl = "/Tenwa/Customer/Lessee/Comm/Communication/Communication_list.jsp";
String sTempletNo = "COMMUNICATION_INFO";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "0";//只读模式
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
String sButtons[][] = {
{"true", "All", "Button", "保存","保存所有修改", "saveRecord()", "", "", "", ""},
};
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
window.onload=function(){
var today = new Date();
setItemValue(0,0,"flowunid",'<%=flowunid%>');
setItemValue(0,0,"phaseno",'<%=phaseNo%>');
setItemValue(0,0,"taskno",'<%=taskno%>');
setItemValue(0,0,"username",'<%=username%>');
setItemValue(0,0,"orgname",'<%=orgname%>');
setItemValue(0,0,"inputtime",getNowFormatDate());
};
function goBack(){
parent.AsDialog.ClosePage();
}
function saveRecord(){
var comm = "<%=comm%>";
if(comm == "false"){
alert("只有录入人可以修改! ");
goBack();
}else {
var remark = getItemValue(0,0,"remark");
var time = getNowFormatDate();
var param = "flowunid=<%=flowunid%>,phaseNo=<%=phaseNo%>,taskno=<%=taskno%>,userid=<%=userid%>,orgid=<%=orgid%>,remark="+remark+",time="+time+",id=<%=id%>";
var Return = AsControl.RunJavaMethodTrans("com.tenwa.voucher.CreateVoucherProcess.Communicationsave","soleVerify",param);
if(Return=="true"){
alert("保存成功! ");
goBack();
}else{
alert("保存失败,请联系管理员! ");
return;
}
}
}
function getNowFormatDate() {
var date = new Date();
var seperator1 = "/";
var seperator2 = ":";
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
+ " " + date.getHours() + seperator2 + date.getMinutes()
+ seperator2 + date.getSeconds();
return currentdate;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,68 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
//String PG_TITLE = "微信对公账号维护"; // 浏览器窗口标题 <title> PG_TITLE </title>
String flowunid = CurPage.getParameter("ObjectNo");//流程编号
String phaseNo = CurPage.getAttribute("PhaseNo"); //流程节点
String taskno=CurPage.getParameter("TaskNo"); //流程节点ID
String userid = CurPage.getUserId();//当前登录人
String orgid = CurPage.getUser().getOrgID();//当前登录部门
String communicationid = Sqlca.getString("select id from communication where flowunid = '"+flowunid+"' and phaseno = '"+phaseNo+"'");
ASObjectModel doTemp = new ASObjectModel("COMMUNICATION_LIST");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
//dwTemp.MultiSelect = true; //多选
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(20);
dwTemp.genHTMLObjectWindow(flowunid);
String sButtons[][] = {
{"true","All","Button","123新增","123新增","newRecord()","","","","btn_icon_add",""},
{"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit",""},
//{"true","All","Button","删除","删除","deleteRecord()","","","","btn_icon_delete",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
var Id;
var contractNoArray;
var batchNoArray;
function newRecord(){
var communicationid = "<%=communicationid%>";
if(communicationid == "" || communicationid == null){
var param = "flowunid=<%=flowunid%>&phaseNo=<%=phaseNo%>&taskno=<%=taskno%>&userid=<%=userid%>&orgid=<%=orgid%>";
var sUrl = "/Tenwa/Customer/Lessee/Comm/Communication/Communication_info.jsp";
AsDialog.PopView(sUrl,param,"resizable=yes;dialogWidth=1000px;dialogHeight=400px;center:yes;status:no;statusbar:no",function(){
reloadSelf();},"新增信息");
}else {
alert("此流程节点已有经销商留言,无法添加! ");
}
}
function viewAndEdit(){
var sUrl = "/Tenwa/Customer/Lessee/Comm/Communication/Communication_info.jsp";
var id = getItemValue(0,getRow(0),'ID');
var param = "flowunid=<%=flowunid%>&phaseNo=<%=phaseNo%>&taskno=<%=taskno%>&userid=<%=userid%>&orgid=<%=orgid%>&id="+id;
if(typeof(id)=="undefined" || id.length==0 ){
alert("参数不能为空!");
return ;
}
AsDialog.PopView(sUrl,param,"resizable=yes;dialogWidth=1000px;dialogHeight=400px;center:yes;status:no;statusbar:no",function(){reloadSelf();},"修改信息");
}
function deleteRecord(){
var id = getItemValue(0,getRow(0),'id');
if(typeof(id)=="undefined" || id.length==0 ){
alert("请选择一条信息!");
return ;
}
if(confirm('确实要删除吗?')){
as_delete(0);
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -687,7 +687,6 @@
});
//拒单理由
var vo = getItemValue(0,0,"secondchoice");
console.log("========================"+vo);
if(vo=="0010"||vo=="0040"){
showItem(0,"VETO");
setItemRequired(0,"VETO",true);

View File

@ -1004,6 +1004,28 @@
</managerProperties>
</manager>
</class>
<class name="COMMUNICATION" label="经销商留言信息" keyAttributes="">
<attributes>
<attribute name="id" label="合同ID" type="STRING" length="32"/>
<attribute name="taskno" label="流程节点ID" type="STRING" length="32"/>
<attribute name="flowunid" label="流程编号" type="STRING" length="32"/>
<attribute name="phaseno" label="流程节点" type="STRING" length="200"/>
<attribute name="inputuser" label="录入人" type="STRING" length="200"/>
<attribute name="inputorg" label="录入部门" type="STRING" length="200"/>
<attribute name="inputtime" label="录入时间" type="STRING" length="32"/>
<attribute name="updateuser" label="修改人" type="STRING" length="32"/>
<attribute name="updatetime" label="修改时间" type="STRING" length="32"/>
<attribute name="remark" label="备注信息" type="STRING" length="1000"/>
<attribute name="username" label="录入人名称" type="STRING" length="200"/>
<attribute name="orgname" label="录入部门名称" type="STRING" length="200"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="communication" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
<package name="jbo.com.tenwa.entity.comm.taxinfo" >
<class name="TAX_INFO" label="税率信息维护" keyAttributes="ID">

View File

@ -0,0 +1,102 @@
package com.tenwa.voucher.CreateVoucherProcess;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
public class Communicationsave {
private String id;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
private String flowunid;
public String getFlowunid() {
return flowunid;
}
public void setFlowunid(String flowunid) {
this.flowunid = flowunid;
}
private String phaseNo;
public String getPhaseNo() {
return phaseNo;
}
public void setPhaseNo(String phaseNo) {
this.phaseNo = phaseNo;
}
private String taskno;
public String getTaskno() {
return taskno;
}
public void setTaskno(String taskno) {
this.taskno = taskno;
}
private String userid;
public String getUserid() {
return userid;
}
public void setUserid(String userid) {
this.userid = userid;
}
private String orgid;
public String getOrgid() {
return orgid;
}
public void setOrgid(String orgid) {
this.orgid = orgid;
}
private String remark;
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
private String time;
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String soleVerify(JBOTransaction tx) throws Exception {
tx= JBOFactory.createJBOTransaction();
String returns="true";
String id = this.id;
String taskno = this.taskno;
String flowunid = this.flowunid;
String phaseNo = this.phaseNo;
String userid = this.userid;
String orgid = this.orgid;
String remark = this.remark;
try {
Transaction sqlca = Transaction.createTransaction(tx);
String ssql = "insert into communication(id,taskno,flowunid,phaseno,inputuser,inputorg,inputtime,remark)"+
"VALUES(replace(uuid(),'-',''),'"+taskno+"','"+flowunid+"','"+phaseNo+"','"+userid+"','"+orgid+"',replace(now(),'-','/'),'"+remark+"')";
SqlObject sqlObject = new SqlObject(ssql);
sqlca.executeSQL(sqlObject);
tx.commit();
return returns;
} catch (JBOException e) {
e.printStackTrace();
returns = "false";
return returns;
}
}
}

View File

@ -0,0 +1,76 @@
package jbo.com.tenwa.entity.comm.flow;
import java.lang.String;
/**
* 放款订单信息 - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface COMMUNICATION {
/**
* 放款订单信息<br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.com.tenwa.entity.comm.flow.COMMUNICATION";
/**
* ID STRING(32)<br>
*/
public static final String id = "id";
/**
* 流程节点ID STRING(32)<br>
*/
public static final String taskno = "taskno";
/**
* 流程编号 STRING(32)<br>
*/
public static final String flowunid = "flowunid";
/**
* 流程节点 STRING(32)<br>
*/
public static final String phaseno = "phaseno";
/**
* 录入人 STRING(200)<br>
*/
public static final String inputuser = "inputuser";
/**
* 录入部门 STRING(200)<br>
*/
public static final String inputorg = "inputorg";
/**
* 录入时间 STRING(10<br>
*/
public static final String inputtime = "inputtime";
/**
* 修改人 STRING(32)<br>
*/
public static final String updateuser = "updateuser";
/**
* 修改时间 STRING(32)<br>
*/
public static final String updatetime = "updatetime";
/**
* 备注信息 STRING(1000)<br>
*/
public static final String remark = "remark";
/**
* 录入人名称 STRING(1000)<br>
*/
public static final String username = "username";
/**
* 录入部门名称 STRING(1000)<br>
*/
public static final String orgname = "orgname";
}