|
@@ -0,0 +1,741 @@
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
+<%@ include file="/webpage/include/taglib.jsp"%>
|
|
|
+<%
|
|
|
+ String param = request.getParameter("param");
|
|
|
+
|
|
|
+%>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <title>客户信息管理</title>
|
|
|
+ <meta name="decorator" content="default"/>
|
|
|
+ <script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
|
|
|
+
|
|
|
+ <link href="${ctxStatic}/bootstrap-select-1.12.4/css/bootstrap-select.min.css" rel="stylesheet" />
|
|
|
+ <style>
|
|
|
+ #companyType-error{
|
|
|
+ left:0;
|
|
|
+ top:40px;
|
|
|
+ }
|
|
|
+ #clientType-error{
|
|
|
+ left:0;
|
|
|
+ top:40px;
|
|
|
+ }
|
|
|
+ #companyIndustry-error{
|
|
|
+ left:0;
|
|
|
+ top:40px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <script src="${ctxStatic}/bootstrap-select-1.12.4/js/bootstrap-select.min.js"></script>
|
|
|
+ <script type="text/javascript">
|
|
|
+ var validateForm;
|
|
|
+ var exitName = true;
|
|
|
+ function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
+ if(validateForm.form()){
|
|
|
+ var jobTypeStr = $("#jobTypeStr").val();
|
|
|
+ if (jobTypeStr == null || "" == jobTypeStr) {
|
|
|
+ parent.layer.msg("请选择联系人类型!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ var tableObj = document.getElementById('contentTable').rows[1];
|
|
|
+ if (tableObj == null) {
|
|
|
+ parent.layer.msg("请填写联系人信息!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(!exitName){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $("#inputForm").submit();
|
|
|
+ return true;
|
|
|
+ }else {
|
|
|
+ parent.layer.msg("信息未填写完整!", {icon: 5});
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $(document).ready(function() {
|
|
|
+ contentDetailTypeShow();
|
|
|
+ checkContentKeyUp('unitIntroduction',500);
|
|
|
+ $.validator.messages["orUnicode"] = true;
|
|
|
+ $.validator.methods["orUnicode"] = function( value, element ) {
|
|
|
+ return this.optional( element ) || /^[a-z0-9A-Z\-]*$/.test( value );
|
|
|
+ }
|
|
|
+ $.validator.messages["fax"] = true;
|
|
|
+ $.validator.methods["fax"] = function( value, element ) {
|
|
|
+ return this.optional( element ) || /^[0-9\-]*$/.test( value );
|
|
|
+ }
|
|
|
+ $.validator.messages["telephone"] = true;
|
|
|
+ $.validator.methods["telephone"] = function( value, element ) {
|
|
|
+ return this.optional( element ) || /^[0-9\-]*$/.test( value );
|
|
|
+ }
|
|
|
+ $.validator.messages["ourBank"] = true;
|
|
|
+ $.validator.methods["ourBank"] = function( value, element ) {
|
|
|
+ return this.optional( element ) || /^[\u4e00-\u9fa5]*$/.test( value );
|
|
|
+ }
|
|
|
+ $.validator.messages["taxId"] = true;
|
|
|
+ $.validator.methods["taxId"] = function( value, element ) {
|
|
|
+ return this.optional( element ) || /^[a-z0-9A-Z]*$/.test( value );
|
|
|
+ }
|
|
|
+
|
|
|
+ jQuery.validator.addMethod("isUscCode", function(value, element) {
|
|
|
+ if (this.optional(element)){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ var uscCode = /^((\w{15})|(\w{18})|(\w{20}))$/;
|
|
|
+ return uscCode.test(value);
|
|
|
+ }, "请填写正确的统一社会信用代码");
|
|
|
+
|
|
|
+ validateForm = $("#inputForm").validate({
|
|
|
+ rules:{
|
|
|
+ orUnicode:{
|
|
|
+ orUnicode:true
|
|
|
+ },
|
|
|
+ zipCode:{
|
|
|
+ digits:true
|
|
|
+ },
|
|
|
+ email:{
|
|
|
+ email:true
|
|
|
+ },
|
|
|
+ fax:{
|
|
|
+ fax:true
|
|
|
+ },
|
|
|
+ telephone:{
|
|
|
+ telephone:true
|
|
|
+ },
|
|
|
+ taxId:{
|
|
|
+ taxId:true
|
|
|
+ }
|
|
|
+ <%--uscCode:{remote: "${ctx}/workclientinfo/workClientInfo/checkUscCode?oldUscCode=" + encodeURIComponent($("#oldUscCode").val())}--%>
|
|
|
+ },
|
|
|
+ messages:{
|
|
|
+ orUnicode:{
|
|
|
+ orUnicode:"仅允许输入数字、大写拉丁字母、符号“-”"
|
|
|
+ },
|
|
|
+ zipCode:{
|
|
|
+ required:"必须输入数字"
|
|
|
+ },
|
|
|
+ email:{
|
|
|
+ email:"请输入合法的邮箱地址"
|
|
|
+ },
|
|
|
+ fax:{
|
|
|
+ fax:"仅允许输入数字、符号“-”"
|
|
|
+ },
|
|
|
+ telephone:{
|
|
|
+ telephone:"仅允许输入数字、符号“-”"
|
|
|
+ },
|
|
|
+ taxId:{
|
|
|
+ taxId:"仅允许输入数字、大写拉丁字母"
|
|
|
+ }
|
|
|
+ // uscCode:{remote:"重复的统一社会信用代码"}
|
|
|
+ },
|
|
|
+ submitHandler: function(form){
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
+ form.submit();
|
|
|
+ },
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $("#attachment_btn").click(function () {
|
|
|
+ $("#attachment_file").click();
|
|
|
+ });
|
|
|
+ $('input[name="hasUscc"]').on('ifChecked', function(event){
|
|
|
+ disUscc(event.target.defaultValue);
|
|
|
+ });
|
|
|
+ disUscc($('input[name="hasUscc"]:checked').val());
|
|
|
+ if($("#uscCode").val()!=null&&$("#uscCode").val()!='') {
|
|
|
+ $("#inputForm").validate().element($("#uscCode"));
|
|
|
+ }
|
|
|
+ // $("#name").blur(function(){
|
|
|
+ // checkName();
|
|
|
+ // })
|
|
|
+ $("#name").on("change",function(){
|
|
|
+ var id = $("#id").val();
|
|
|
+ var name = $("#name").val();
|
|
|
+ var uscCode = $("#uscCode").val();
|
|
|
+ $.ajax({
|
|
|
+ url:"${ctx}/workclientinfo/workClientInfo/checkClient",
|
|
|
+ type:"post",
|
|
|
+ data:{"id":id,
|
|
|
+ "name":name,
|
|
|
+ "uscCode":uscCode},
|
|
|
+ success:function(data){
|
|
|
+ if(data==="false"){
|
|
|
+ exitName=false
|
|
|
+ $("#ph").html("该客户已存在");
|
|
|
+ }else {
|
|
|
+ exitName=true
|
|
|
+ $("#ph").html('');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ )
|
|
|
+ <%--var arr="${workClientInfo.clientType}".split(',');--%>
|
|
|
+ // $('#clientType').selectpicker('val',arr);
|
|
|
+
|
|
|
+ /*新增代码传送统一社会信用代码*/
|
|
|
+ /*$("#uscCode").on("change",function(){
|
|
|
+ var id = $("#id").val();
|
|
|
+ var name = $("#name").val();
|
|
|
+ var uscCode = $("#uscCode").val();
|
|
|
+ $.ajax({
|
|
|
+ url:"${ctx}/workclientinfo/workClientInfo/checkClientUscCode",
|
|
|
+ type:"post",
|
|
|
+ data:{"id":id,
|
|
|
+ "name":name,
|
|
|
+ "uscCode":uscCode},
|
|
|
+ success:function(data){
|
|
|
+ console.log(data);
|
|
|
+ if(data.code=="false"){
|
|
|
+ exitName=false
|
|
|
+ $("#uscPh").html("该客户已存在");
|
|
|
+ }else {
|
|
|
+ exitName=true
|
|
|
+ $("#uscPh").html('');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ )*/
|
|
|
+ dismissDiv();
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ function testOurBank(value){
|
|
|
+ if(!/^[\u4e00-\u9fa5]*$/.test( value )){
|
|
|
+ parent.layer.msg("开户银行必须输入汉字",{icon:6});
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 只允许输入数字
|
|
|
+ * @param value
|
|
|
+ */
|
|
|
+ function testBankNumber(value){
|
|
|
+ if(!/^\d*$/.test( value )){
|
|
|
+ parent.layer.msg("开户帐号必须输入数字",{icon:6});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function addRow(list, idx, tpl, row){
|
|
|
+ var idx1 = $("#workClientBankList tr").length;
|
|
|
+ if(list == '#workClientBankList'){
|
|
|
+ bornTemplete(list, idx, tpl, row, idx1);
|
|
|
+ }
|
|
|
+ var idx2 = $("#workClientLinkmanList tr").length;
|
|
|
+ if(list == '#workClientLinkmanList'){
|
|
|
+ bornTemplete(list, idx, tpl, row, idx2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function bornTemplete(list, idx, tpl, row, idx1){
|
|
|
+ $(list).append(Mustache.render(tpl, {
|
|
|
+ idx: idx, delBtn: true, row: row,
|
|
|
+ order:idx1 + 1
|
|
|
+ }));
|
|
|
+ $(list+idx).find("select").each(function(){
|
|
|
+ $(this).val($(this).attr("data-value"));
|
|
|
+ });
|
|
|
+ $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
|
|
|
+ var ss = $(this).attr("data-value").split(',');
|
|
|
+ for (var i=0; i<ss.length; i++){
|
|
|
+ if($(this).val() == ss[i]){
|
|
|
+ $(this).attr("checked","checked");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function delRow(obj, prefix){
|
|
|
+ var id = $(prefix+"_id");
|
|
|
+ var delFlag = $(prefix+"_delFlag");
|
|
|
+ if (id.val() == ""){
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ }else if(delFlag.val() == "0"){
|
|
|
+ delFlag.val("1");
|
|
|
+ $(obj).html("÷").attr("title", "撤回删除");
|
|
|
+ $(obj).parent().parent().addClass("error");
|
|
|
+ $(obj).parent().parent().addClass("hide");
|
|
|
+ }else if(delFlag.val() == "1"){
|
|
|
+ delFlag.val("0");
|
|
|
+ $(obj).html("×").attr("title", "删除");
|
|
|
+ $(obj).parent().parent().removeClass("error");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ function urlRedict(file,attach){
|
|
|
+ parent.layer.confirm('确定删除吗?', {
|
|
|
+ btn: ['确认', '取消'] //可以无限个按钮
|
|
|
+ }, function(index, layero){
|
|
|
+ var index1 = parent.layer.load(0, {shade: false});
|
|
|
+ $.post("${ctx}/workfullmanage/workFullManage/deleteFile",
|
|
|
+ {"file":file,"attach":attach},
|
|
|
+ function(result){
|
|
|
+ var d = JSON.parse(result);
|
|
|
+ if(d.str){
|
|
|
+ location.reload();
|
|
|
+ parent.layer.msg("删除成功!!!",{icon:6});
|
|
|
+ parent.layer.close(index1);
|
|
|
+ parent.layer.close(index);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }, function(index){
|
|
|
+ parent.layer.close(index)
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ function checkName() {
|
|
|
+ var id = $("#id").val();
|
|
|
+ var name = $("#name").val();
|
|
|
+ var uscCode = $("#uscCode").val();
|
|
|
+ $.ajax({
|
|
|
+ url:"${ctx}/workclientinfo/workClientInfo/checkClient",
|
|
|
+ type:"post",
|
|
|
+ data:{"id":id,
|
|
|
+ "name":name,
|
|
|
+ "uscCode":uscCode},
|
|
|
+ success:function(data){
|
|
|
+
|
|
|
+ if(data=="false"){
|
|
|
+ exitName=false
|
|
|
+ $("#ph").html("该客户已存在");
|
|
|
+ }else {
|
|
|
+ exitName=true
|
|
|
+ $("#ph").html('');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function insertTitle(tValue){
|
|
|
+ var list = "${workClientInfo.workAttachments}";
|
|
|
+ var size = (list.split('url')).length-1;
|
|
|
+ var files = $("#attachment_file")[0].files;
|
|
|
+ for(var i = 0;i<files.length;i++) {
|
|
|
+ var file = files[i];
|
|
|
+ var attachmentId = "";
|
|
|
+ var attachmentFlag = "5";
|
|
|
+ console.log(file);
|
|
|
+ var timestamp = new Date().getTime();
|
|
|
+
|
|
|
+ var storeAs = "attachment-file/workClientInfo/" + timestamp + "/" + file['name'];
|
|
|
+ var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
|
|
|
+ /*将这段字符串存到数据库即可*/
|
|
|
+ var divId = "_attachment";
|
|
|
+ $("#addFile" + divId).show();
|
|
|
+ multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function disUscc(hasUscc) {
|
|
|
+ if("2"==hasUscc){
|
|
|
+ $(".companyType_uscCode").hide();
|
|
|
+ /*$('input[name="uscCode"]').attr("class","form-control");*/
|
|
|
+ $('input[name="uscCode"]').val("");
|
|
|
+ }else {
|
|
|
+ $(".companyType_uscCode").show();
|
|
|
+ /*$('input[name="uscCode"]').attr("class","form-control required isUscCode layui-input");*/
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 模糊查询下拉框
|
|
|
+ function fuzzyQuery(){
|
|
|
+ var keyword = $("#name").val();
|
|
|
+ if (keyword == null || keyword === "") {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $.post(
|
|
|
+ "${ctx}/workclientinfo/workClientInfo/enterpriseSearchByName",
|
|
|
+ {"keyword": keyword},
|
|
|
+ function (result) {
|
|
|
+ if (result == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var json = eval(result.data.items);
|
|
|
+ //如果精准查询,只有一条数据,则不显示模糊查询div,直接赋值
|
|
|
+ if (json.length == 1) {
|
|
|
+ var id = json[0].id;
|
|
|
+ $.getJSON(
|
|
|
+ "${ctx}/workclientinfo/workClientInfo/enterpriseTicketInfo",
|
|
|
+ {"id": id},
|
|
|
+ function (data) {
|
|
|
+ $("#name").val(data.ENTNAME).change();
|
|
|
+ $("#uscCode").val(data.TAXNUMBER);
|
|
|
+ $("#registerAddress").val(data.OPLOC);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var html = "<ul>";
|
|
|
+ for (var i = 0; i < json.length; i++) {
|
|
|
+ html += "<li value=" + json[i].id + ">" + json[i].entname + "</li>";
|
|
|
+ }
|
|
|
+ html += "</ul>";
|
|
|
+ $("#fuzzyQuerySelect").show().html(html);
|
|
|
+
|
|
|
+ //鼠标移动到某行上改变颜色
|
|
|
+ $("li").bind("mouseover", function () {
|
|
|
+ $(this).css("background-color", "grey");
|
|
|
+ });
|
|
|
+ $("li").bind("mouseout", function () {
|
|
|
+ $(this).css("background-color", "white");
|
|
|
+ });
|
|
|
+ //单击某行
|
|
|
+ $("li").bind("click", function () {
|
|
|
+ $("#fuzzyQuerySelect").hide();
|
|
|
+ var id = $(this).val();
|
|
|
+ $.getJSON(
|
|
|
+ "${ctx}/workclientinfo/workClientInfo/enterpriseTicketInfo",
|
|
|
+ {"id": id},
|
|
|
+ function (data) {
|
|
|
+ $("#name").val(data.ENTNAME).change();
|
|
|
+ $("#uscCode").val(data.TAXNUMBER);
|
|
|
+ $("#registerAddress").val(data.OPLOC);
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
+ });
|
|
|
+ }, "json");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ </script>
|
|
|
+
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="single-form">
|
|
|
+ <div class="container">
|
|
|
+ <input type="hidden" value="${param.param}" id="param">
|
|
|
+ <form:form id="inputForm" modelAttribute="workClientInfo" enctype="multipart/form-data"
|
|
|
+ onkeydown="if(event.keyCode==13)return false;" action="${ctx}/workclientinfo/workClientInfo/save"
|
|
|
+ method="post" class="form-horizontal">
|
|
|
+ <form:hidden path="id"/>
|
|
|
+ <input type="hidden" id="jobTypeStr" name="jobTypeStr" value="">
|
|
|
+ <div class="form-group layui-row first">
|
|
|
+ <div class="form-group-label"><h2>基本信息</h2></div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label double-line"><span class="require-item">*</span>拥有统一社会信用代码:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:radiobutton id="hasUscc" disabled="true" class="usccClass i-checks" path="hasUscc" value="1" label="是" checked="true" />
|
|
|
+
|
|
|
+ <form:radiobutton id="hasUscc" disabled="true" class="usccClass i-checks" path="hasUscc" value="2" label="否" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>客户名称:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.name}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label double-line"><span class="require-item">*</span>客户编号:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="number" id="number" htmlEscape="false" class="form-control layui-input" readonly="true"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label double-line"><span class="require-item">*</span>统一社会信用代码:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.uscCode}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>所在行业:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${fns:getMainDictLabel(workClientInfo.companyIndustry, 'company_industry', '')}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>所在地区:</label>
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
+ <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.area.name}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label">法人代表:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.lawerPresint}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label">邮政编码:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.zipCode}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label">传真:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.fax}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label">客户类型:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <input htmlEscape="false" readonly="true" class="form-control layui-input" value="<c:set value="${fn:split(workClientInfo.clientType, ',') }" var="clientTypes" /><c:forEach items="${clientTypes}" var="cType" varStatus="status">${fns:getMainDictLabel(cType, 'client_type', '')}<c:if test="${!status.last}">, </c:if></c:forEach>"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label">公司电话:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.telephone}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label">公司网址:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workClientInfo.companyUrl}"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>联系人类型:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <div id="jobType" class="xm-select-demo" tabindex="0" contenteditable="true"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="layui-item layui-col-sm12 lw7">
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>注册地址:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input readonly="true" path="registerAddress" id="registerAddress" htmlEscape="false"
|
|
|
+ class="form-control required layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm12 lw7">
|
|
|
+ <label class="layui-form-label">详细地址:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input readonly="true" path="address" id="address" htmlEscape="false" class="form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm12 lw7">
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>开户行信息:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+
|
|
|
+ <table id="bankinfo" class="table table-bordered table-condensed details">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th width="80px">序号</th>
|
|
|
+ <th ><font color="red">*</font>开户银行</th>
|
|
|
+ <th width="400px;"><font color="red">*</font>开户账号</th>
|
|
|
+
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="workClientBankList">
|
|
|
+ <c:forEach items="${workClientInfo.workClientBankList}" var="workClientBank" varStatus="status">
|
|
|
+ <tr>
|
|
|
+ <td>${status.index + 1}</td>
|
|
|
+ <td>${workClientBank.ourBank}</td>
|
|
|
+ <td>${workClientBank.bankNumber}</td>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ <c:if test="${bankSize == 0}">
|
|
|
+ <tr>
|
|
|
+ <td colspan="3">暂无数据</td>
|
|
|
+ </tr>
|
|
|
+ </c:if>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm12 with-textarea lw7">
|
|
|
+ <label class="layui-form-label">单位简介:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000" class="form-control" >${workClientInfo.unitIntroduction}</textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="form-group layui-row">
|
|
|
+ <div class="form-group-label"><h2>联系人信息</h2></div>
|
|
|
+ <div class="layui-item layui-col-xs12 form-table-container" >
|
|
|
+ <table id="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th class="hide"></th>
|
|
|
+ <th width="150px"><font color="red">*</font>联系人姓名</th>
|
|
|
+ <th >部门</th>
|
|
|
+ <th width="150px">职务</th>
|
|
|
+ <th width="150px">QQ</th>
|
|
|
+ <th width="150px">联系方式1</th>
|
|
|
+ <th width="150px">联系方式2</th>
|
|
|
+ <th width="150px">E-mail</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="workClientLinkmanList">
|
|
|
+ <c:forEach items="${workClientInfo.workClientLinkmanList}" var="workClientLinkman" varStatus="status">
|
|
|
+ <tr>
|
|
|
+ <td class="hide">${status.index + 1}</td>
|
|
|
+ <td >${workClientLinkman.name}</td>
|
|
|
+ <td >${workClientLinkman.office}</td>
|
|
|
+ <td >${workClientLinkman.position}</td>
|
|
|
+ <td >${workClientLinkman.qq}</td>
|
|
|
+ <td >${workClientLinkman.linkPhone}</td>
|
|
|
+ <td >${workClientLinkman.linkMobile}</td>
|
|
|
+ <td >${workClientLinkman.email}</td>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ <c:if test="${linkManSize == 0}">
|
|
|
+ <tr>
|
|
|
+ <td colspan="8">暂无数据</td>
|
|
|
+ </tr>
|
|
|
+ </c:if>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group layui-row">
|
|
|
+ <div class="form-group-label"><h2>附件信息</h2></div>
|
|
|
+ <div class="layui-item nav-btns">
|
|
|
+ <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
|
|
|
+ </div>
|
|
|
+ <div id="addFile_attachment" style="display: none" class="upload-progress">
|
|
|
+ <span id="fileName_attachment"></span>
|
|
|
+ <b><span id="baifenbi_attachment"></span></b>
|
|
|
+ <div class="progress">
|
|
|
+ <%--进度条--%>
|
|
|
+ <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <input id="attachment_file" type="file" name="attachment_file" multiple="multiple"
|
|
|
+ style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
|
|
|
+ <span id="attachment_title"></span>
|
|
|
+ <div class="layui-item layui-col-xs12" style="padding:0 16px;">
|
|
|
+ <table id="upTable" class="table table-bordered table-condensed details">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <%-- <th>序号</th>--%>
|
|
|
+ <th>文件</th>
|
|
|
+ <th>上传人</th>
|
|
|
+ <th>上传时间</th>
|
|
|
+ <th width="150px">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="file_attachment">
|
|
|
+ <c:forEach items="${workClientInfo.workAttachments}" var="workClientAttachment"
|
|
|
+ varStatus="status">
|
|
|
+ <tr>
|
|
|
+ <%-- <td>${status.index + 1}</td>--%>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
|
|
|
+ or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
|
|
|
+ <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)"
|
|
|
+ onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a>
|
|
|
+ </td>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)"
|
|
|
+ onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a>
|
|
|
+ </td>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ <td>${workClientAttachment.createBy.name}</td>
|
|
|
+ <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
|
|
|
+ <td class="op-td">
|
|
|
+ <div class="op-btn-box">
|
|
|
+ <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));"
|
|
|
+ class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
+ <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
|
|
|
+ <a href="javascript:void(0)"
|
|
|
+ onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')"
|
|
|
+ class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
|
|
|
+ </c:if>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group layui-row page-end"></div>
|
|
|
+ </form:form>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
|
|
|
+<script>
|
|
|
+ function contentDetailTypeShow() {
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'${ctx}/workclientinfo/workClientInfo/getJobType',
|
|
|
+ data:{
|
|
|
+ "type":2
|
|
|
+ },
|
|
|
+ success:function(data){
|
|
|
+ if(data.success) {
|
|
|
+ var data = data.body.list;
|
|
|
+ var newDataList = data;
|
|
|
+ var showList = [];
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'${ctx}/workclientinfo/workClientInfo/getJobTypeById',
|
|
|
+ data:{
|
|
|
+ "id":$("#id").val()
|
|
|
+ },
|
|
|
+ success:function(dataListById){
|
|
|
+ if(dataListById.success) {
|
|
|
+ var showDataList = dataListById.body.list;
|
|
|
+
|
|
|
+ for (i in newDataList) {
|
|
|
+ for (j in showDataList) {
|
|
|
+ if (newDataList[i].value == showDataList[j].value) {
|
|
|
+ var newData = {
|
|
|
+ "name": newDataList[i].name,
|
|
|
+ "value": newDataList[i].value,
|
|
|
+ "selected": true
|
|
|
+ }
|
|
|
+ showList.push(newData);
|
|
|
+ data.splice(i,1,newData);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ xmSelect.render({
|
|
|
+ el: '#jobType',
|
|
|
+ language: 'zn',
|
|
|
+ data:data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ var jobType = xmSelect.render({
|
|
|
+ el: '#jobType',
|
|
|
+ language: 'zn',
|
|
|
+ data: [
|
|
|
+ ]
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ document.getElementById('jobType').onblur=function(){
|
|
|
+ var list = [];
|
|
|
+ //获取当前多选选中的值
|
|
|
+ var selectArr = jobType.getValue();
|
|
|
+ for (var i in selectArr){
|
|
|
+ list.push(selectArr[i].value);
|
|
|
+ }
|
|
|
+ $("#jobTypeStr").val(list);
|
|
|
+ console.log(list);
|
|
|
+ }
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|