提交工单去掉值前后空字符

This commit is contained in:
gityjf 2020-12-10 09:40:40 +08:00
parent e2eb6afbfd
commit 7e0e68931f

View File

@ -1,6 +1,7 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="java.math.BigDecimal"%>
<%@ page import="com.tenwa.apzl.comm.GpsEnum" %>
<%@ page import="com.tenwa.apzl.comm.GpsEnum"%>
<%@ page import="com.tenwa.comm.exception.BusinessException" %>
<%@ page import="java.math.BigDecimal" %>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2019-07-11
@ -15,12 +16,18 @@
String PhaseNo = CurPage.getParameter("PhaseNo");
String flowunid = CurPage.getParameter("ObjectNo");
String compClientID = request.getParameter("CompClientID");
String frameNumber = Sqlca.getString("select FRAME_NUMBER from LB_EQUIPMENT_CAR_TEMP where FLOWUNID='"+flowunid+"' and car_attribute='head' ");
ASResultSet rs2 = Sqlca.getResultSet2("select FRAME_NUMBER,model from LB_EQUIPMENT_CAR_TEMP where FLOWUNID='" + flowunid + "' and car_attribute='head' limit 1");
String frameNumber="",model ="";
if(rs2.next()){
frameNumber = rs2.getString("FRAME_NUMBER");
model = rs2.getString("model");
}else{
throw new BusinessException("车辆信息不存在!");
}
String id = Sqlca.getString("select id from LM_GPS_ORDER_TEMP where APPLY_NO='"+ProjectNo+"'");
String contact_name = Sqlca.getString("select CONTACT_NAME from GPS_config_info where isenable='1' ");//派工联系人
String contact_phone = Sqlca.getString("select CONTACT_PHONE from GPS_config_info where isenable='1' ");//派工联系人电话
String distributor_id = Sqlca.getString("select distributor_id from lb_project_info where id='"+ProjectId+"'");//获取经销商ID
String distributor_name = Sqlca.getString("select distributor_name from distributor_info where distributor_no='"+distributor_id+"'");//获取经销名称
@ -31,13 +38,11 @@
while(res.next()){
images.add(res.getString("URL"));
}
String period = incomNuber.divide(new BigDecimal("12"),0,BigDecimal.ROUND_UP).toString();
String sTempletNo = "LmGpsOrderInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
if(GpsEnum.ZR.getCode().equals(source)){
doTemp.setColumnAttribute("CARTYPE", "COLVISIBLE", "1");
doTemp.setColumnAttribute("CARTYPE", "COLREQUIRED", "1");
doTemp.setColumnAttribute("USERNAME", "COLVISIBLE", "1");
doTemp.setColumnAttribute("USERNAME", "COLREQUIRED", "1");
doTemp.setColumnAttribute("USERPHONE", "COLVISIBLE", "1");
@ -51,7 +56,7 @@
String [][] sButtons;
if("0010".equals(PhaseNo)){
sButtons = new String[][]{
{"true","All","Button","提交工单","提交工单","if(getItemValue(0,getRow(),'STATUS')!='7'){alert('不可重复提交!');return;}as_save(0,'submitOrder()')","","","",""},
{"true","All","Button","提交工单","提交工单","if(getItemValue(0,getRow(),'STATUS')!='7'){alert('不可重复提交!');return;}$('body').find('input:text').each(function(){$(this).val(this.value.trim())});as_save(0,'submitOrder()')","","","",""},
{"true","All","Button","查询工单","查询工单","queryOrder()","","","",""},
{"true","All","Button","修改工单","修改工单","alterOrder()","","","",""},
{"true","All","Button","取消工单","取消工单","cancelOrder()","","","",""},
@ -77,11 +82,12 @@
setItemValue(0,getRow(0),"CAR_ACCOUNT",'<%=distributor_name%>');
if('<%=source%>'=='1'){
setItemValue(0,getRow(0),"SHOPNAME",'<%=distributor_name%>');//2020-11-11 yjf 修改门店取值为拉车账号
setItemValue(0,getRow(0),"CARTYPE",'<%=model%>');//2020-11-13 yjf 从设备表中获取车型数据
}
setItemValue(0,getRow(0),"SOURCE",'<%=source%>');
var status = getItemValue(0,getRow(),"STATUS");
if('<%=frameNumber%>'!='null'&&(status=='7'||status=='1'||status=='8'))
setItemValue(0,getRow(0),"CAR_VIN",'<%=frameNumber%>');
if('<%=id%>'!='null')
@ -93,33 +99,37 @@
<%}%>
window.parent.editImage(ul);
<%}%>
time = document.getElementById("INSTALL_TIME");
//当前时间
var thisDate = new Date();
thisDate.setHours(thisDate.getHours()+2);
thisDate.setMinutes(thisDate.getMinutes()+10);
thisDate.setHours(thisDate.getHours()+2);
thisDate.setMinutes(thisDate.getMinutes()+10);
//最晚安装时间17:30
var latestDate = new Date();
latestDate.setHours(17);
latestDate.setMinutes(30);
if(thisDate.getTime() > latestDate.getTime()){
thisDate.setHours(thisDate.getHours()+24);
thisDate.setHours(8);
thisDate.setMinutes(0);
thisDate.setHours(8);
thisDate.setMinutes(0);
thisDate.setSeconds(0);
}
var dateStr = thisDate.Format("yyyy-MM-dd hh:mm:ss");
time.setAttribute("onclick","SelectDate(this,'yyyy-MM-dd hh:mm:ss','"+dateStr+"','2118/08/01')");
})
function submitOrder(){
var result =AsControl.RunJavaMethodTrans("com.tenwa.gps.GpsController","createOrder","applyNo=<%=ProjectNo%>,flowUnid=<%=flowunid%>,projectId=<%=ProjectId%>,userId=<%=userId%>,source=<%=source%>");
alert(result)
location.reload();
try{
var result =AsControl.RunJavaMethodTrans("com.tenwa.gps.GpsController","createOrder","applyNo=<%=ProjectNo%>,flowUnid=<%=flowunid%>,projectId=<%=ProjectId%>,userId=<%=userId%>,source=<%=source%>");
alert(result);
location.reload();
}catch (err){
alert(err)
}
}
function queryOrder(){
var orderNo = getItemValue(0,getRow(),"ORDER_NO");
var status = getItemValue(0,getRow(),"STATUS");
@ -132,7 +142,7 @@
alert(result)
location.reload();
}
//省市
function selectRegionCode(){
var sCity = getItemValue(0,getRow(),"ADDRESS_CODE");
@ -150,12 +160,12 @@
sAreaCodeValue = sAreaCodeInfo[0];//-- 行政区划代码
sAreaCodeName = sAreaCodeInfo[1];//--行政区划名称
setItemValue(0,getRow(),"ADDRESS_CODE",sAreaCodeValue);
setItemValue(0,getRow(),"ADDRESS_CODE_SHOW",sAreaCodeName);
setItemValue(0,getRow(),"ADDRESS_CODE_SHOW",sAreaCodeName);
}
}
},'请选择省市');
}
function showGPSImage(){
var status = getItemValue(0,getRow(),"STATUS");
if(status=='7'){
@ -168,7 +178,7 @@
}
window.parent.showImage();
}
function alterOrder(){
var status = getItemValue(0,getRow(),"STATUS");
if(status=='7'){
@ -198,7 +208,7 @@
as_save(0);
location.reload();
}
function cancelOrder(){
var status = getItemValue(0,getRow(),"STATUS");
if(status=='7'){
@ -211,6 +221,6 @@
location.reload();
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>