wushaodong 4 anni fa
parent
commit
dd7c6c9a67

+ 2 - 2
apps/customer/filters.py

@@ -1,7 +1,7 @@
 # coding=utf-8
 import django_filters
 
-from .models import ReportCustomer,NewCustomer
+from .models import ReportCustomer, NewCustomer, Review
 
 class ReportCustomerFilter(django_filters.FilterSet):
     name = django_filters.CharFilter(field_name='name', lookup_expr='icontains')
@@ -26,5 +26,5 @@ class ReviewFilter(django_filters.FilterSet):
     tel = django_filters.CharFilter(field_name='customer__tel', lookup_expr='icontains')
 
     class Meta:
-        model = NewCustomer
+        model = Review
         fields = '__all__'

+ 1 - 1
apps/customer/views.py

@@ -81,7 +81,7 @@ class ReportCustomerViewSet(CustomModelViewSet):
                                        track_user_id=user_id, next_time=next_time, stage_progress=stage_progress,
                                        create_user=instance.create_user,
                                        name=instance.name,tel=instance.tel,village=instance.village,
-                                       address=instance.address,source=instance.source,
+                                       address=instance.address,source=instance.source,notes=instance.notes,
                                        )
             projects = instance.project.all()
             for project in projects:

+ 1 - 3
uis/views/customer/check_customer.html

@@ -35,7 +35,6 @@
                             <div class="layui-input-block">
                                 <select lay-verify="required" name="check_status">
                                      <option value="">请选择审核状态</option>
-                                     <option value="0">未审核</option>
                                      <option value="1">继续跟踪</option>
                                      <option value="2">放弃</option>
                                  </select>
@@ -50,7 +49,7 @@
                         <div>
                             <label class="layui-form-label"><font color='red' size="4">*</font>下次回访:</label>
                             <div class="layui-input-block">
-                                 <input lay-verify="required" type="text" name="next_time" class="layui-input" id="test1" placeholder="修改下次回访日期">
+                                 <input lay-verify="required" type="text" name="next_time" class="layui-input" id="test1" placeholder="下次回访日期">
                             </div>
                         </div>
                         <button id="id_save" class="layui-btn" lay-submit lay-filter="component-form-element"
@@ -79,7 +78,6 @@
 
         laydate.render({
             elem: '#test1'
-            ,type: 'datetime'
         });
         var editdata = JSON.parse(JSON.stringify(parent.layui.table.editdata)); // 框架有Bug所以这么转换
         form.val("component-form-element", {next_time: editdata['next_time_f']});

+ 17 - 8
uis/views/customer/check_index.html

@@ -71,6 +71,14 @@
                                 <input type="text" name="name" autocomplete="off" class="layui-input"
                                        placeholder="姓名"/>
                             </div>
+                            <div class="seach_items">
+                                <select name="check_status">
+                                     <option value="">请选择审核状态</option>
+                                     <option value="0">未审核</option>
+                                     <option value="1">继续跟踪</option>
+                                     <option value="2">放弃</option>
+                                 </select>
+                            </div>
                         </form>
                         <div style="clear: both;"></div>
                     </div>
@@ -103,20 +111,21 @@
             elem: '#customer_datagrid'
             , url: '/customer/review/'
             , cols: [[
-                {field: 'name', title: '姓名', width: 110}
-                , {field: 'tel', title: '电话', width: 120}
+                {field: 'name', title: '姓名', width: 100}
+                , {field: 'tel', title: '电话', width: 130}
                 , {field: 'address', title: '地址', width: 200}
                 , {field: 'project_text', title: '项目', width: 150}
                 , {field: 'village', title: '小区', width: 150}
                 , {field: 'description', title: '回访情况', width: 200}
-                , {field: 'instruction', title: '申请支援或放弃', width: 110}
-                , {field: 'is_giveup_text', title: '是否放弃', width: 100}
+                , {field: 'instruction', title: '申请支援或放弃', width: 200}
+                , {field: 'is_giveup_text', title: '是否放弃', width: 90}
+                , {field: 'create_user_text', title: '跟踪人', width: 110}
+                , {field: 'create_time_f', title: '跟踪时间', width: 150}
                 , {field: 'check_status_text', title: '审核状态', width: 110}
-                , {field: 'create_user_text', title: '审核人', width: 110}
+                , {field: 'check_user_text', title: '审核人', width: 110}
                 , {field: 'check_comment', title: '审核批示', width: 100}
                 , {field: 'check_time_f', title: '审核时间', width: 180}
-                , {field: 'track_user_text', title: '跟踪人', width: 110}
-                , {field: 'next_time_f', title: '下次回访时间', width: 180}
+                , {field: 'next_time_f', title: '下次回访时间', width: 130}
                 , {width: 80, align: 'center', fixed: 'right', toolbar: '#customer-operate-bar'}
             ]]
             , page: true
@@ -134,7 +143,7 @@
                layer.open({
                 type: 2,
                 title: '审核',
-                area: ['35%', '50%'],
+                area: ['35%', '70%'],
                 btn: ['保存', '取消'],
                 yes: function (index, dom) {
                     layui.onSubmitChild = function (res) {

+ 3 - 3
uis/views/customer/index.html

@@ -160,10 +160,9 @@
                 , {field: 'project_text', title: '项目', width: 100}
                 , {field: 'stage_progress_text', title: '阶段进度', width: 100}
                 , {field: 'potential_level_text', title: '客户级别', width: 100}
-                , {field: 'notes', title: '备注', width: 200}
-                , {field: 'status_text', title: '状态', width: 80}
+                , {field: 'status_text', title: '状态', width: 60}
                 , {field: 'track_user_text', title: '跟踪人', width: 100}
-                , {field: 'end_time_f', title: '最后跟踪时间', width: 120}
+                , {field: 'end_time_f', title: '最后跟踪时间', width: 150}
                 , {field: 'last_review', title: '最后跟踪情况', width: 200}
                 , {field: 'next_time_f', title: '下次跟踪时间', width: 120}
                 , {field: 'follow_count', title: '跟踪次数', width: 100}
@@ -171,6 +170,7 @@
                 , {field: 'last_enter_time', title: '最后进店时间', width: 150}
                 , {field: 'create_time_f', title: '建档时间', width: 150}
                 , {field: 'create_user_text', title: '建档人', width: 100}
+                , {field: 'notes', title: '备注', width: 200}
                 , {width: 130, align: 'center', fixed: 'right', toolbar: '#customer-operate-bar'}
             ]]
             , page: true