|
@@ -0,0 +1,100 @@
|
|
|
+{include file="public/header" /}
|
|
|
+<body class="gray-bg">
|
|
|
+<div class="layui-fluid layui-col-md12">
|
|
|
+ <div class="layui-card">
|
|
|
+ <div class="layui-card-body layui-form">
|
|
|
+ <div class="layui-row layui-col-space10 layui-form-item ">
|
|
|
+ <input type="hidden" name = 'ids' value="{$ids}">
|
|
|
+ <div style="margin-left: 30%;font-size: 15px"><strong>关联客户将与成交客户关联在一起</strong></div>
|
|
|
+ <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
|
|
|
+ <label class="layui-form-label" style="height: 20px;background-color:#C2C5D3;text-align: center ">已成交客户</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <select name="id" lay-verify="required" lay-search="">
|
|
|
+ {foreach name="guanlian" item="vo"}
|
|
|
+ <option value="{$vo.id}">{$vo.website}</option>
|
|
|
+ {/foreach}
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="layui-form-item layui-col-md-offset1 layui-col-md8" style='text-align:center'>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="component-form-element">保存
|
|
|
+ </button>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+{include file="public/footer" /}
|
|
|
+<script type="text/javascript" src="__JS__/plugins/cropper/Crop.js"></script>
|
|
|
+<script>
|
|
|
+ //裁剪后的处理
|
|
|
+ $("#sureCut").on("click",function () {
|
|
|
+ if ($("#tailoringImg").attr("src") == null ){
|
|
|
+ layer.msg('请先选择头像',{anim:6})
|
|
|
+ }else{
|
|
|
+ var cas = $('#tailoringImg').cropper('getCroppedCanvas');//获取被裁剪后的canvas
|
|
|
+ var base64url = cas.toDataURL('image/png'); //转换为base64地址形式
|
|
|
+ $("#img_data").attr('src',base64url).show();
|
|
|
+ $('#data_photo').val(base64url);
|
|
|
+ //关闭裁剪框
|
|
|
+ layer.closeAll();
|
|
|
+ }
|
|
|
+ });
|
|
|
+</script>
|
|
|
+<script>
|
|
|
+ layui.use(['form'], function() {
|
|
|
+ var form = layui.form;
|
|
|
+ // form.verify({
|
|
|
+ // username:function(value,item){
|
|
|
+ // if(!/^[\S]{2,10}$/.test(value)){
|
|
|
+ // return '名称必须2到10字符,且不能出现空格';
|
|
|
+ // }
|
|
|
+ // var checkResult = "";
|
|
|
+ // $.ajax({
|
|
|
+ // url:"{:url('User/checkName')}",
|
|
|
+ // type:'post',
|
|
|
+ // data:"username="+value,
|
|
|
+ // async: false,//必须同步
|
|
|
+ // success:function(res){
|
|
|
+ // if(res.code == 100){
|
|
|
+ // checkResult = "该名称已存在";
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // return checkResult;
|
|
|
+ // },
|
|
|
+ // pass: [/^[\S]{6,16}$/,'密码必须6到16位,且不能出现空格'],
|
|
|
+ // // headCrop:[/^[\S]$/,'头像不能为空'],
|
|
|
+ // // headCrop:function(value,item){
|
|
|
+ // // if(value == ""){
|
|
|
+ // // return '头像不能为空';
|
|
|
+ // // }
|
|
|
+ // // },
|
|
|
+ // realname:[/^[\S]{2,10}$/,'真实姓名必须2到10字符,且不能出现空格']
|
|
|
+ //
|
|
|
+ // });
|
|
|
+ form.on('submit(component-form-element)', function (data) {
|
|
|
+ $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
|
|
|
+ $.ajax({
|
|
|
+ url:"{:url('to_guanlian')}",
|
|
|
+ type:'post',
|
|
|
+ dataType:'json',
|
|
|
+ data:data.field,
|
|
|
+ success:function(res){
|
|
|
+ if (res.code == 200) {
|
|
|
+ wk.success(res.msg,'wk.layer_close()');
|
|
|
+ } else {
|
|
|
+ wk.error(res.msg,'$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\')');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ });
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|