|
@@ -7,9 +7,9 @@
|
|
|
<script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
|
|
|
<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
|
|
|
<script type="text/javascript">
|
|
|
- var validateForm;
|
|
|
- var count = 0;
|
|
|
- $(document).ready(function() {
|
|
|
+ var validateForm;
|
|
|
+ var count = 0;
|
|
|
+ $(document).ready(function() {
|
|
|
layui.use(['form', 'layer'], function () {
|
|
|
var form = layui.form;
|
|
|
})
|
|
@@ -60,29 +60,29 @@
|
|
|
$(".isPublic").addClass("hide");
|
|
|
}
|
|
|
validateForm = $("#inputForm").validate({
|
|
|
- submitHandler: function(form){
|
|
|
- loading('正在提交,请稍等...');
|
|
|
- form.submit();
|
|
|
- },
|
|
|
+ submitHandler: function(form){
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
+ form.submit();
|
|
|
+ },
|
|
|
rules:{
|
|
|
},
|
|
|
messages:{
|
|
|
},
|
|
|
- errorContainer: "#messageBox",
|
|
|
- errorPlacement: function(error, element) {
|
|
|
- $("#messageBox").text("输入有误,请先更正。");
|
|
|
- if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|
|
- error.appendTo(element.parent().parent());
|
|
|
- } else {
|
|
|
- error.insertAfter(element);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ errorContainer: "#messageBox",
|
|
|
+ errorPlacement: function(error, element) {
|
|
|
+ $("#messageBox").text("输入有误,请先更正。");
|
|
|
+ if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|
|
+ error.appendTo(element.parent().parent());
|
|
|
+ } else {
|
|
|
+ error.insertAfter(element);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
laydate.render({
|
|
|
elem: '#submitterDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
|
|
|
event: 'focus', //响应事件。如果没有传入event,则按照默认的click
|
|
|
type : 'date'
|
|
|
-, trigger: 'click'
|
|
|
+ , trigger: 'click'
|
|
|
});
|
|
|
$("#attachment_btn").click(function () {
|
|
|
$("#attachment_file").click();
|
|
@@ -90,6 +90,20 @@
|
|
|
// getRandom();
|
|
|
|
|
|
});
|
|
|
+ <%--$.ajax({--%>
|
|
|
+ <%-- url:"${ctx}/reimbursementType/reimbursementType/projectCharge",--%>
|
|
|
+ <%-- dataType:"json",--%>
|
|
|
+ <%-- data:{pids:pIds},--%>
|
|
|
+ <%-- success:function (data) {--%>
|
|
|
+ <%-- var pid=pIds.split(',')[1];--%>
|
|
|
+ <%-- var sid="#"+id+"Name"--%>
|
|
|
+ <%-- if(data==1){--%>
|
|
|
+ <%-- $(sid).parent().parent().parent().parent().find("td").eq(4).find("input").eq(1).val(pid);--%>
|
|
|
+ <%-- }else {--%>
|
|
|
+ <%-- $(sid).parent().parent().parent().parent().find("td").eq(4).find("input").eq(1).val(pid);--%>
|
|
|
+ <%-- }--%>
|
|
|
+ <%-- }--%>
|
|
|
+ <%--})--%>
|
|
|
function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
var idArr = $("#workAccountList tr:visible");
|
|
|
if(idArr.length<1){
|
|
@@ -485,6 +499,24 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ function setPids(pIds,id){
|
|
|
+ $.ajax({
|
|
|
+ url:"${ctx}/reimbursementType/reimbursementType/projectCharge",
|
|
|
+ dataType:"json",
|
|
|
+ data:{pids:pIds},
|
|
|
+ success:function (data) {
|
|
|
+ var pid=pIds.split(',')[1];
|
|
|
+ var sid="#"+id+"Name"
|
|
|
+ if(data==1){
|
|
|
+ $(sid).parent().parent().parent().parent().find("td").eq(4).find("input").eq(1).val(pid);
|
|
|
+ $(sid).parent().parent().parent().parent().find("td").eq(4).find("input").eq(2).val("'90%','90%'");
|
|
|
+ }else {
|
|
|
+ $(sid).parent().parent().parent().parent().find("td").eq(4).find("input").eq(1).val(pid);
|
|
|
+ $(sid).parent().parent().parent().parent().find("td").eq(4).find("input").eq(2).val("'50%','50%'");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
</script>
|
|
|
<style>
|
|
|
/*超过5个汉字,调整label的长度,以下是配套的*/
|
|
@@ -648,9 +680,9 @@
|
|
|
<%--<th width="60px">编号</th>--%>
|
|
|
<th width="200px"><font color="red">*</font>报销人</th>
|
|
|
<th width="200px">报销部门</th>
|
|
|
+ <th width="200px">报销类型</th>
|
|
|
<th width="200px">报销项目</th>
|
|
|
<th width="200px">报告号</th>
|
|
|
- <th width="200px">报销类型</th>
|
|
|
<th width="200px"><font color="red">*</font>费用(元)</th>
|
|
|
<th width="200px">收据张数</th>
|
|
|
<th width="200px">出差天数</th>
|
|
@@ -682,23 +714,23 @@
|
|
|
<td>
|
|
|
<input id="workAccountList${index.index}_reimbursementNameofficeId" name="workAccountList[${index.index}].officeId" maxlength="32" type="text" value="${workAccount.officeId}" readonly="readonly" class="form-control required"/>
|
|
|
</td>
|
|
|
-
|
|
|
+ <td style="text-align:center;">
|
|
|
+ <div class="project_reimbursement_div" style="width: 200px">
|
|
|
+ <sys:treeselectAccessoryNoParent id="workAccountList${index.index}_type" name="workAccountList[${index.index}].type" value="${workAccount.type}" labelName="workAccountList[${index.index}].typeName" labelValue="${workAccount.typeName}"
|
|
|
+ title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId="" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
|
|
|
<td>
|
|
|
<div class="not_project_reimbursement_div" style="width: 200px">
|
|
|
<sys:reimburselectReproject url="${ctx}/workreimbursement/workReimbursement/selectReproject" id="workAccountList${index.index}_project" name="workAccountList[${index.index}].project.id" value="${workAccount.project.id}" title="选择报销项目" labelName="workAccountList[${index.index}].project.projectName"
|
|
|
- labelValue="${workAccount.project.projectName}" cssClass="form-control layui-input" fieldLabels="工程" fieldKeys="projectName" searchLabel="工程名称" searchKey="projectName" />
|
|
|
+ labelValue="${workAccount.project.projectName}" extId="${workAccount.projectRadio}" cssClass="form-control layui-input" fieldLabels="工程" fieldKeys="projectName" searchLabel="工程名称" searchKey="projectName" />
|
|
|
</div>
|
|
|
</td>
|
|
|
<td>
|
|
|
<input id="workAccountList${index.index}_projectReportNumber" name="workAccountList[${index.index}].projectReportNumber" type="text" value="${workAccount.projectReportNumber}" maxlength="32" readonly="readonly" class="form-control"/>
|
|
|
</td>
|
|
|
- <td style="text-align:center;">
|
|
|
- <div class="project_reimbursement_div" style="width: 200px">
|
|
|
- <sys:treeselectAccessoryNoParent id="workAccountList${index.index}_type" name="workAccountList[${index.index}].type" value="${workAccount.type}" labelName="workAccountList[${index.index}].typeName" labelValue="${workAccount.typeName}"
|
|
|
- title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId="" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
+
|
|
|
|
|
|
<td>
|
|
|
<input id="workAccountList${index.index}_money" onchange="getMoney(this.value)" name="workAccountList[${index.index}].money" type="text" value="${workAccount.money}" placeholder="请输入金额" maxlength="10" class="form-control number required"/>
|
|
@@ -762,21 +794,22 @@
|
|
|
<input id="workAccountList{{idx}}_reimbursementNameofficeId" type="text" value="{{row.officeId}}" maxlength="32" readonly="readonly" class="form-control"/>
|
|
|
</div>
|
|
|
</td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ <div class="project_reimbursement_div" style="width: 200px">
|
|
|
+ <sys:treeselectAccessoryNoParent id="workAccountList{{idx}}_type" name="workAccountList[{{idx}}].type" value="${workReimbursement.workReimbursementTypeInfo.id}" labelName="workAccountList[{{idx}}].typeName" labelValue="${workReimbursement.workReimbursementTypeInfo.standardDetail}"
|
|
|
+ title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId="" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
<td>
|
|
|
<div class="not_project_reimbursement_div" style="width: 200px">
|
|
|
<sys:reimburselectReproject url="${ctx}/workreimbursement/workReimbursement/selectReproject" id="workAccountList{{idx}}_project" name="workAccountList[{{idx}}].project.id" value="${workReimbursement.project.id}" title="选择报销项目" labelName="workAccountList[{{idx}}].project.projectName"
|
|
|
- labelValue="{{row.projectName}}" cssClass="form-control layui-input" fieldLabels="工程" fieldKeys="projectName" searchLabel="工程名称" searchKey="projectName" ></sys:reimburselectReproject>
|
|
|
+ labelValue="{{row.projectName}}" extId="" area="" cssClass="form-control layui-input" fieldLabels="工程" fieldKeys="projectName" searchLabel="工程名称" searchKey="projectName" ></sys:reimburselectReproject>
|
|
|
</div>
|
|
|
</td>
|
|
|
<td>
|
|
|
<input id="workAccountList{{idx}}_projectReportNumber" name="workAccountList[{{idx}}].projectReportNumber" type="text" value="{{row.projectReportNumber}}" maxlength="32" readonly="readonly" class="form-control"/>
|
|
|
</td>
|
|
|
- <td style="text-align:center;">
|
|
|
- <div class="project_reimbursement_div" style="width: 200px">
|
|
|
- <sys:treeselectAccessoryNoParent id="workAccountList{{idx}}_type" name="workAccountList[{{idx}}].type" value="${workReimbursement.workReimbursementTypeInfo.id}" labelName="workAccountList[{{idx}}].typeName" labelValue="${workReimbursement.workReimbursementTypeInfo.standardDetail}"
|
|
|
- title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId="" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
+
|
|
|
<td>
|
|
|
<input id="workAccountList{{idx}}_money" onchange="getMoney(this.value)" name="workAccountList[{{idx}}].money" type="text" value="{{row.money}}" placeholder="请输入费用" maxlength="10" class="form-control number"/>
|
|
|
</td>
|