<tr>
<td>服务类型:</td>
<td>
<input class="easyui-combobox" id="serveType" name="serveType" data-options="panelHeight:'auto',editable:false,valueField:'dataDicValue',textField:'dataDicValue',url:'${pageContext.request.contextPath}/dataDic/dataDicComboList.do?dataDicName=2'"/> <font color="red">*</font>
</td>
<td> </td>
<td>客户</td>
<td><input type="text" id="customer" name="customer" class="easyui-validatebox" required="true"/> <font color="red">*</font></td>
</tr>
<tr>
<td>概要:</td>
<td colspan="4">
<input type="text" id="overview" name="overview" style="width: 419px" class="easyui-validatebox" required="true"/> <font color="red">*</font>
</td>
</tr>
<tr>
<td>服务请求:</td>
<td colspan="4">
<textarea id="servicerequest" name="servicerequest" rows="5" cols="49" class="easyui-validatebox" required="true">
</textarea> <font color="red">*</font>
</td>
</tr>
<tr>
<td>创建人:</td>
<td>
<input type="hidden" name="state" value="新创建"/>
<input type="text" readonly="readonly" id="createPeople" name="createPeople" value="${currentUser.trueName }"/>
</td>
<td> </td>
<td>创建时间:</td>
<td><input type="text" id="createTime" name="createTime" readonly="readonly"/></td>
</tr>
<tr>
<td colspan="4"></td>
<td>
<a href="javascript:saveCustomerService()" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:resetValue()" class="easyui-linkbutton" iconCls="icon-reset">重置</a>
</td>
</tr>
</table>
public class CustomerService implements Serializable{
private static final long serialVersionUID = 1L;
private Integer id; // 编号
private String serveType; // 服务类型 1,咨询 2,建议 3,投诉
private String overview; // 概要
private String customer; // 客户
private String state; // 1,新创建 2,已分配 3,已处理 4,已归档
private String servicerequest; // 服务请求
private String createPeople; // 创建人
private Date createTime; // 创建日期
private String assigner; // 分配人
private Date assignTime; // 分配日期
private String serviceProce; // 服务处理
private String serviceProcePeople; // 服务处理人
private Date serviceProceTime; // 服务处理日期
private String serviceProceResult; // 服务处理结果
private String myd; // 客户满意度
......
}
/**
* 添加或者修改客服服务
* @param contact
* @param response
* @return
* @throws Exception
* @技术声明:用easyui传递对象时,前台的参数名称需要与后端定义实体类时的参数名称一模一样
*/
@RequestMapping("/save")
public String save(CustomerService customerService,HttpServletResponse response)throws Exception{
System.out.println("customerService==="+customerService.getServicerequest());
int resultTotal=0; // 操作的记录条数
if(customerService.getId()==null){
resultTotal=customerServiceService.add(customerService);
}else{
resultTotal=customerServiceService.update(customerService);
}
JSONObject result=new JSONObject();
if(resultTotal>0){
result.put("success", true);
}else{
result.put("success", false);
}
ResponseUtil.write(response, result);
return null;
}