123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527 |
- @extends('admin/layout')
- @section('header')
- <link href="{{asset('css/plugins/chosen/chosen.css')}}" rel="stylesheet">
- <style>
- .for_area {
- display: inline-block;
- width: 200px;
- }
- .upload_img {
- height: 150px;
- }
- .select1{
- width: 350px;
- }
- </style>
- @endsection
- @section('content')
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-content">
- <form class="form-horizontal" id="form">
- <div class="form-group">
- <label class="col-sm-2 control-label" for="cn_title"><span class="red">* </span>项目名称(中文):</label>
- <div class="col-sm-8">
- <input type="text" class="form-control select1" id="cn_title" name="cn_title"
- value="{{$data->cn_title ?? ''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="en_title"><span class="red">* </span>项目名称(英文):</label>
- <div class="col-sm-8">
- <input type="text" class="form-control select1" id="en_title" name="en_title"
- value="{{$data->en_title ?? ''}}">
- </div>
- </div>
- {{-- <div class="form-group">
- <label class="col-sm-2 control-label" for="old_id">项目原始Id:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control select1" id="old_id" name="old_id"
- value="{{$data->old_id ?? ''}}">
- </div>
- </div>--}}
- <div class="form-group">
- <label class="col-sm-2 control-label" for="domain"><span class="red">* </span>域名:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control select1" id="domain" name="domain"
- value="{{$data->domain??''}}">
- <span style="font-size: 12px;color: grey">如果有直接填写进去,如果无,请填写意向域名。请填写主域,不要包含www。例:baidu.com</span>
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="site_type"><span class="red">* </span>项目类型:</label>
- <div class="col-sm-8">
- <select class="form-control select1" id="site_type" name="site_type">
- <option value="">请选择</option>
- <option value="1" @if(($data->site_type??'')==1) selected @endif>企业网站</option>
- <option value="2" @if(($data->site_type??'')==2) selected @endif>电商网站</option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="nature_type"><span class="red">* </span>公司性质:</label>
- <div class="col-sm-8">
- <select class="form-control select1"
- id="nature_type" name="nature_type">
- <option value="">请选择公司性质</option>
- @foreach($natures as $nature)
- <option value="{{$nature['inx']}}"
- @if(($data->nature_type??null)==$nature['inx']) selected @endif>{{$nature['val']}}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="business_id"><span class="red">* </span>所属行业:</label>
- <div class="col-sm-8 ">
- <select class="form-control select1"
- id="business_id" name="business_id">
- <option value="">请选择行业</option>
- @foreach ($businesses as $business)
- <option value="{{$business->id}}"
- @if(($data->business_id??null)==$business->id) selected @endif>{{$business->title}}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="form-group contacts">
- <div class="col-sm-10 col-sm-offset-1">
- <label for="contact_ids">客户联系人Ⅰ 姓名:</label>
- <input type="text" class="form-control"
- style="width: 200px;display: inline-block;margin-left: 20px"
- name="contact_name" title="" value="{{$data->contacts[0]['name']??''}}">
- <label for="contact_ids" style="margin-left: 10px">邮箱:</label>
- <input type="email" class="form-control" style="width: 300px;display: inline-block;"
- name="contact_email" title="" value="{{$data->contacts[0]['email']??''}}">
- <label for="contact_ids" style="margin-left: 10px">手机:</label>
- <input type="text" class="form-control"
- style="width: 300px;display: inline-block;" title="" name="contact_mobile"
- value="{{$data->contacts[0]['mobile']??''}}">
- <label style="margin-left: 10px">职位:</label>
- <input type="text" class="form-control" style="width: 200px;display: inline-block;" name="contact_position"
- value="{{$data->contacts[0]['position']??''}}">
- </div>
- </div>
- <div class="form-group contacts">ctm
- <div class="col-sm-10 col-sm-offset-1">
- <label>客户联系人Ⅱ 姓名:</label>
- <input type="text" class="form-control"
- style="width: 200px;display: inline-block;margin-left: 20px"
- name="contact_name" title="" value="{{$data->contacts[1]['name']??''}}">
- <label style="margin-left: 10px">邮箱:</label>
- <input type="email" class="form-control" style="width: 300px;display: inline-block;"
- name="contact_email" title="" value="{{$data->contacts[1]['email']??''}}">
- <label style="margin-left: 10px">手机:</label>
- <input type="text" class="form-control"
- style="width: 300px;display: inline-block;" title="" name="contact_mobile"
- value="{{$data->contacts[1]['mobile']??''}}">
- <label style="margin-left: 10px">职位:</label>
- <input type="text" class="form-control"
- style="width: 200px;display: inline-block;" name="contact_position"
- value="{{$data->contacts[1]['position']??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="customer_demand_type"><span class="red">* </span>客户需求:</label>
- <div class="col-sm-8">
- <select class="form-control select1" id="customer_demand_type" name="customer_demand_type">
- <option value="">请选择</option>
- <option value="1" @if(($data->customer_demand_type??'')==1) selected @endif>客户询盘</option>
- <option value="2" @if(($data->customer_demand_type??'')==2) selected @endif>营销推广</option>
- <option value="3" @if(($data->customer_demand_type??'')==3) selected @endif>两者兼有</option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="sign_amount"><span class="red">* </span>签单价格:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control select1" id="sign_amount" name="sign_amount"
- value="{{$data->sign_amount??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="pay_way"><span class="red">* </span>付款方式:</label>
- <div class="col-sm-8">
- <select class="form-control select1" id="pay_way" name="pay_way">
- <option value="">请选择</option>
- <option value="1" @if(($data->pay_way??'')==1) selected @endif>分期</option>
- <option value="2" @if(($data->pay_way??'')==2) selected @endif>全款</option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="data_prepare_level"><span class="red">* </span>客户资料准备程度:</label>
- <div class="col-sm-8">
- <select class="form-control select1" id="data_prepare_level" name="data_prepare_level">
- <option value="">请选择</option>
- <option value="1" @if(($data->data_prepare_level??'')==1) selected @endif>已经准备</option>
- <option value="2" @if(($data->data_prepare_level??'')==2) selected @endif>一般准备</option>
- <option value="3" @if(($data->data_prepare_level??'')==3) selected @endif>还未准备</option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="keyword_know_level"><span class="red">* </span>对关键词了解程度:</label>
- <div class="col-sm-8">
- <select class="form-control select1" id="keyword_know_level" name="keyword_know_level">
- <option value="">请选择</option>
- <option value="1" @if(($data->keyword_know_level??'')==1) selected @endif>已经了解</option>
- <option value="2" @if(($data->keyword_know_level??'')==2) selected @endif>一般了解</option>
- <option value="3" @if(($data->keyword_know_level??'')==3) selected @endif>不太了解</option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="is_rebuild">客户是否了解要重新建站:</label>
- <div class="col-sm-8">
- <select class="form-control select1" id="is_rebuild" name="is_rebuild">
- <option value="">请选择</option>
- <option value="1" @if(($data->is_rebuild??'')==1) selected @endif>是</option>
- <option value="2" @if(($data->is_rebuild??'')==2) selected @endif>否</option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="is_design_all">客户是否要整站设计:</label>
- <div class="col-sm-8">
- <select class="form-control select1" id="is_design_all" name="is_design_all">
- <option value="">请选择</option>
- <option value="1" @if(($data->is_design_all??'')==1) selected @endif>是</option>
- <option value="2" @if(($data->is_design_all??'')==2) selected @endif>否</option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label"><span class="red">* </span>地区:</label>
- <div class="col-sm-8" data-toggle="distpicker" id="distpicker">
- <select class="form-control for_area" title=""
- data-province="{{$data->area_text[0]??''}}"
- name="area_text"></select>
- <select class="form-control for_area" title=""
- data-city="{{$data->area_text[1]??''}}"
- name="area_text"></select>
- <select class="form-control for_area" title=""
- data-district="{{$data->area_text[2]??''}}"
- name="area_text"></select>
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="contract_ids"><span class="red">* </span>服务项目:</label>
- <div class="col-sm-8 ">
- <select class="form-control" style="width:350px;"
- id="contract_ids" name="contract_ids" multiple size="5">
- @foreach ($contracts as $item)
- <option value="{{$item->id}}"
- @if(in_array($item->id,$data->contract_ids??[])) selected @endif>{{$item->title}}</option>
- @endforeach
- </select>
- <span style="color: red;font-size: 12px">ctrl+鼠标点击/shift+鼠标点击 多选</span>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="keyword_goal"><span class="red">* </span>关键词达标数:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control select1" id="keyword_goal" name="keyword_goal"
- value="{{$data->keyword_goal??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="link_goal"><span class="red">* </span>外链平台数:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control select1" id="link_goal" name="link_goal"
- value="{{$data->link_goal??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="article_goal"><span class="red">* </span>软文达标数:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control select1" id="article_goal" name="article_goal"
- value="{{$data->article_goal??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="other_demand">其他需求:</label>
- <div class="col-sm-8">
- <textarea class="form-control select1" id="other_demand"
- name="other_demand">{{$data->other_demand??''}}</textarea>
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="remark">其他备注:</label>
- <div class="col-sm-8">
- <textarea class="form-control select1" id="remark"
- name="remark">{{$data->remark??''}}</textarea>
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="head">首付:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control select1" id="head" name="head"
- value="{{$payment->head??''}}">
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="done">建站收款:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control select1" id="done" name="done"
- value="{{$payment->done??''}}">
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="reach">达标尾款:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control select1" id="reach" name="reach"
- value="{{$payment->reach??''}}">
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="service_final_payment">服务期尾款:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control select1" id="service_final_payment" name="service_final_payment"
- value="{{$payment->service_final_payment??''}}">
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <label class="col-sm-2 control-label" for="renewal">续费:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control select1" id="renewal" name="renewal"
- value="{{$payment->renewal??''}}">
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <div class="col-sm-4 col-sm-offset-2">
- <button class="btn btn-primary" type="button" data-id="{{$data->id??0}}" id="save"
- onclick="units.save({{$data->id??0}})">
- 保存
- </button>
- <button class="btn btn-white closeLayer" type="button" id="cancel">取消</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- @endsection
- @section('footer')
- <script src="{{asset('js/plugins/chosen/chosen.jquery.js')}}"></script>
- <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
- <script src="{{asset('js/plugins/distpicker-master/dist/distpicker.js?v=1')}}"></script>
- <script>
- var config = {".chosen-select": {}};
- for (var selector in config) $(selector).chosen(config[selector]);
- laydate.render({
- elem: '#order_at', //指定元素
- type: 'date'
- });
- var units = {
- save: function (id) {
- var contacts = [];
- $(".contacts").each(function () { //客户联系人
- contacts.push({
- name: $(this).find("[name=contact_name]").val(),
- email: $(this).find("[name=contact_email]").val(),
- mobile: $(this).find("[name=contact_mobile]").val(),
- position: $(this).find("[name=contact_position]").val()
- });
- });
- var areaText = [];
- $("[name=area_text]").each(function () { //地区
- if ($(this).val().length !== 0) {
- areaText.push($(this).val());
- }
- });
- var site = tips.getFormValues('#form');
- site.contacts = contacts;
- site.area_text = areaText;
- site.contract_ids=$("#contract_ids").val();
- var payment = {
- head: $("#head").val(),
- //head_pic: $("#head_pic").val(),
- done: $("#done").val(),
- //done_pic: $("#done_pic").val(),
- reach: $("#reach").val(),
- //reach_pic: $("#reach_pic").val(),
- renewal: $("#renewal").val(),
- //renewal_pic: $("#renewal_pic").val(),
- service_final_payment:$("#service_final_payment").val(),
- };
- var ajaxConfig = {
- url: '/admin/sites/' + id,
- type: 'put',
- data: {site: site, payment: payment},
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000}, function () {
- window.parent.tips.tableRefresh('#table');
- tips.closeParentLayer();
- });
- }
- };
- tips.ajax(ajaxConfig);
- }
- };
- $(document).on('click', '[name=file_upload]', function () {
- $(this).next().trigger('click');
- });
- $(document).on('change', '[name=uploadFile]', function () {
- var _this = this;
- if (!$(this)[0].files[0]) {
- return;
- }
- var formData = new FormData();
- formData.append('file', $(this)[0].files[0]);
- var ln;
- $.ajax({
- url: '/admin/tool/upload',
- type: 'POST',
- cache: false,
- data: formData,
- processData: false,
- contentType: false,
- beforeSend: function () {
- ln = layer.load();
- },
- complete: function () {
- layer.close(ln);
- },
- success: function (result) {
- var data = result.data;
- $('#' + $(_this).data('for')).attr('src', data.file_url);
- $(_this).next().val(data.file_url);
- },
- error: function (XMLHttpRequest) {
- if (XMLHttpRequest.status === 500) {
- layer.alert("异步请求失败", {icon: 5});
- return;
- }
- layer.alert(JSON.parse(XMLHttpRequest.responseText).message, {icon: 0});
- }
- });
- });
- </script>
- @endsection
|