20170818

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了20170818相关的知识,希望对你有一定的参考价值。

<link href="../../../../img/Form/bootstrap.css" rel="stylesheet" type="text/css" />

<div id="mainDiv" bindtables="FM_ReleatedTrade" style="position: relative;">
<style type="text/css">
table, tr, td, thead, tbody, tfoot { border-style: none;
border-color: inherit;
border-width: medium;
margin-left: 3px;
}
#div-pr input[type="button"] { border: 1px solid #CCC; }
#radioselectTime
{
height: 20px;
}
.style1
{
width: 289px;
}
#requestDept
{
width: 168px;
}
.style2
{
width: 313px;
}
.style3
{
width: 315px;
}
.style4
{
width: 790px;
height: 43px;
}
.style5
{
width: 83%;
height: 43px;
}
.style6
{
height: 43px;
}

</style>
<table class="nobody">
<tr>
<td style="width: 20%;" align="left">
<img src="../../../../img/Form/logo.jpg" />
</td>
<td style="width: 20%;">
</td>
<td align="left" style="font-size: small;" class="style1">
<strong class="title">关联交易审批</strong>
</td>
</tr>
</table>
<table class="table table-bordered">
<tr>
<td align="right" >
TaskID:
<input formdatasrc="FM_ReleatedTrade.TaskId"
readonly />
</td>
<td align="right">
提交日期:
</td>
<td align="right">
<input id="CurrentTime" formdatasrc="FM_ReleatedTrade.SubmitDate"
formdatatag="FM_ReleatedTrade.SubmitDate" readonly />
</td>
</tr>
</table>
<table style="width: 100%;">
<colgroup>
<col style="width: 8%" />
<col style="width: 12%" />
<col style="width: 8%" />
<col style="width: 20%" />
<col style="width: 8%" />
<col style="width: 12%" />
<col style="width: 8%" />
<col style="width: 8%" />
</colgroup>
<tr>
<td align="left">
提交人:
</td>
<td align="left">
<input class="noborder_inactive" style="display: none;" id="requestAccount" defval="sysLoginUser.Account"
formdatasrc="FM_ReleatedTrade.RequestAccount" formdatatag="FM_ReleatedTrade.RequestAccount"
readonly />
<input class="underbar_inactive" defval="sysLoginUser.DisplayName"
readonly formdatasrc="FM_ReleatedTrade.RequestName" formdatatag="FM_ReleatedTrade.RequestName" />
</td>
<td align="left" class="style2">
职位:&nbsp;&nbsp;
</td>
<td align="left">
<input style="display: none" id="requestPositionId" formdatasrc="FM_ReleatedTrade.RequestPositionId"
formdatatag="FM_ReleatedTrade.RequestPositionId" />
<input id="requestPositionName" style="display: none" formdatasrc="FM_ReleatedTrade.RequestPositionName"
formdatatag="FM_ReleatedTrade.RequestPositionName" />
<select id="selrequestPositionName" formdatasrc="FM_ReleatedTrade.RequestPositionName">
</select>
</td>
<td align="left">
部门&nbsp;:&nbsp;
</td>
<td>
<input style="display: none;" class="underbar_inactive" readonly id="requestDeptId"
formdatasrc="FM_ReleatedTrade.RequestDeptId" formdatatag="FM_ReleatedTrade.RequestDeptId" />
<input class="underbar_inactive" readonly id="requestDept" formdatasrc="FM_ReleatedTrade.RequestDept"
formdatatag="FM_ReleatedTrade.RequestDept"/>
</td>
<td align="left" class="style3">
机构:&nbsp;&nbsp;
</td>
<td>
<input class="underbar_inactive" id="requestLocation" formdatasrc="FM_ReleatedTrade.requestLocation"
formdatatag="FM_ReleatedTrade.requestLocation" readonly />
<input class="underbar_inactive" style="display: none;" id="requestLocationId" formdatasrc="FM_ReleatedTrade.RequestLocationId"
formdatatag="FM_ReleatedTrade.RequestLocationId" readonly />
</td>
</tr>
<tr>
<td align="left">
关联方名称:
</td>
<td>
<input id="txtRelationName" class="underbar_inactive" formdatatag="FM_ReleatedTrade.RelationName"
formdatasrc="FM_ReleatedTrade.RelationName">
</td>
<td align="left">
交易金额:
</td>
<td>
<input id="txtTotalAmount" class="underbar_inactive" formdatatag="FM_ReleatedTrade.TotalAmount"
formdatasrc="FM_ReleatedTrade.TotalAmount">
</td>
<td align="left">
关联方主体类别:
</td>
<td>
<select id="Select1" name="GLFZhuTiType" formdatasrc="FM_ReleatedTrade.GLFZhuTiType"
formdatatag="FM_ReleatedTrade.GLFZhuTiType">
<option value="请选择">请选择</option>
<option value="自然人">自然人</option>
<option value="法人">法人</option>
</select>
</td>
<td align="left">
关联交易类型:
</td>
<td>
<select id="Select2" name="GLJiaoYiType" formdatasrc="FM_ReleatedTrade.GLJiaoYiType"
formdatatag="FM_ReleatedTrade.GLJiaoYiType">
<option value="请选择">请选择</option>
<option value="资金运用类">资金运用类</option>
<option value="资产类">资产类</option>
<option value="利益转移类">利益转移类</option>
<option value="保险或保险代理或再保险业务类">保险或保险代理或再保险业务类</option>
<option value="劳务服务类">劳务服务类</option>
</select>
</td>
</tr>
<tr style="margin-top:5px;">
<td align="left">
交易内容:
</td>
<td colspan="9">
<textarea id="txtDescription" style="width: 98%; height: 100px;" formdatatag="FM_ReleatedTrade.Description"
formdatasrc="FM_ReleatedTrade.Description"></textarea>
</td>
</tr>
<tr>
<td colspan="9" align="left">
<a id="upfile1"><u>附件</u></a>
<div id="show_id1">
</div>
<div>
<input id="sid1" formdatasrc="FM_ReleatedTrade.AttachSid" formdatatag="FM_ReleatedTrade.AttachSid"
type="hidden" />
<input id="cid1" formdatasrc="FM_ReleatedTrade.AttachCid" formdatatag="FM_ReleatedTrade.AttachCid"
type="hidden" />
</div>
</td>
</tr>
</table>
</div>
<!-- 代码区域:需要的取消注释 -->
<script type="text/javascript">
//上传附件时,参数初始化
function build_upload(id, show_id, sid, cid) {
$("#" + id).LiveflowUpload({
uploadtype: "3",
uploadpath: "../modules/workflow/test",
allowdel: true,
allowupload: true,
dispdiv: show_id,
elemsid: sid,
elemcid: cid,
template: webRoot + "local/ch/com/uploadtemplate.htm",
setCompleted: $.LiveflowUpload.setCompleteForFCO,
refid: ""
});
}

function customInit() {
build_upload("upfile1", "show_id1", "sid1", "cid1");
}

//#region 自定义代码
////模板加载成功后,解析之前的
//function customInit() { };

////模块解析完成后,数据加载前
//function customAfterParse() { };

////数据加载完成后
//function customAfterLoadData() { };

////动作提交前
//function customBeforeAction(actionname) { };

////动作执行后(data:填写表单保存,值为draftid;如果提交,值为taskID)
//function customAfterAction(actionname, data) {
// return true;
//};


////选人控件自定义代码:selected格式为{“userid”:”fullname”}
//function customAfterSelectUser(selected) { };

//#endregion


//#region 其它页面脚本


//#endregion

function customAfterParse() {
$(function () {
//去除所有边框
$("#CurrentTime").val(GetNowDate()); //设置提交日期;
//获取提交人职务信息
var txtRequestAccount = $("#requestAccount").val();
var datas = requestAction("998", { "account": txtRequestAccount });
datas = eval("[" + datas + "]");
var jeson = datas[0].ds;
if (jeson.length > 0) {
if (jeson.length == 1) {
$("#selrequestPositionName").append("<option value=‘" + jeson[0].nodeid + "‘ selected>" + jeson[0].locationname + ‘-‘ + jeson[0].groupname + ‘-‘ + jeson[0].jobtitle + "</option>");

$("#requestPositionName").val(jeson[0].locationname + ‘-‘ + jeson[0].groupname + ‘-‘ + jeson[0].jobtitle);
$("#requestPositionId").val(jeson[0].nodeid);
$("#requestLocation").val(jeson[0].locationname);
$("#requestDeptId").val(jeson[0].group_id);
$("#requestDept").val(jeson[0].groupname);
$("#requestLocationId").val(jeson[0].locationid);


}
else {
$("#selrequestPositionName").append("<option value=‘‘ >--请选择--</option>");

for (var i = 0; i < jeson.length; i++) {
$("#selrequestPositionName").append("<option value=‘" + jeson[i].nodeid + "‘ locationid=‘" + jeson[i].locationid + "‘ nodeid=‘" + jeson[i].nodeid + "‘ groupid=‘" + jeson[i].group_id + "‘ locationname=‘" + jeson[i].locationname + "‘ groupname=‘" + jeson[i].groupname + "‘ >" + jeson[i].locationname + ‘-‘ + jeson[i].groupname + ‘-‘ + jeson[i].jobtitle + "</option>");
}
$("#selrequestPositionName").bind("change", function () {
$("#requestPositionName").val($(this).find("option:selected").text());
$("#requestPositionId").val($(this).find("option:selected").attr("nodeid"));
$("#requestLocation").val($(this).find("option:selected").attr("locationname"));
$("#requestDeptId").val($(this).find("option:selected").attr("groupid"));
$("#requestDept").val($(this).find("option:selected").attr("groupname"));
$("#requestLocationId").val($(this).find("option:selected").attr("locationid"));
});
}
}
});
}
// 向服务端请求数据
function requestAction(req, params) {
var request;
$.ajax({
type: "POST",
url: webRoot + "local/ch/modules/Plug_HK_JCSJ/Handler/CommonHandler.ashx?req=" + req,
async: false,
data: params || {},
success: function (data) {
request = data;
}
});
if (request == "") request = undefined;
return request;
}

//返回格式化后的当前时间
function GetNowDate() {
var date1 = new Date().getFullYear();
var date2 = new Date().getMonth() + 1;
var date3 = new Date().getDate();
var date = date1 + "-" + date2 + "-" + date3;
return date;
}

//页面逻辑
function customBeforeAction() {
var txtDescription = $("#txtDescription").val();

// alert("1");
if (txtDescription == "" || txtDescription == null) {
alert("交易内容不能为空!");
return false;
}

return true;
}
</script>
<!-- 代码区域 -->

以上是关于20170818的主要内容,如果未能解决你的问题,请参考以下文章

Java编程思想(20170818)

20170818 - 今日技能封装 - A

自然语言处理真实项目实战(20170818)

20170818 - 今日技能封装 - Q