           <div class="layui-inline">
            <label class="layui-form-label">工程</label>
            <div class="layui-input-block">
                <input type="text" name="gongtext"  placeholder="点击搜索工程" autocomplete="off"  class="layui-input" id="demo" readonly="readonly" value="" ts-selected="0">

                <input type="hidden" id="gong" name="gong" value="">
              
            </div>
 </div>

 <script>

    layui.use(['table', 'form', 'tableSelect','miniAdmin'], function () {
        var $ = layui.jquery,
            table = layui.table,
            form = layui.form,
            tableSelect = layui.tableSelect;
             miniAdmin = layui.miniAdmin;

        


        tableSelect.render({
            elem: '#demo',
            checkedKey: 'id',
            table: {
                url: '<?=u("app","list",array("table"=>"gong","ck"=>1))?>',
                cols: [[
                    { type: 'radio' },
             
                    { field: 'title', title: '公司名称' },
                ]]
            },
            done: function (elem, data) {
                var NEWJSON = []
                layui.each(data.data, function (index, item) {
                    NEWJSON.push(item.title)
                    $("#gong").val(item.id)
                })
                elem.val(NEWJSON.join(","))
            }
        })

    });


</script>

<style>
	

</style>