hujingpei 4 vuotta sitten
vanhempi
sitoutus
ad14355dcf
2 muutettua tiedostoa jossa 4 lisäystä ja 3 poistoa
  1. 1 0
      apps/agent/serializers.py
  2. 3 3
      uis/views/store/index.html

+ 1 - 0
apps/agent/serializers.py

@@ -30,6 +30,7 @@ class StoreComboboxSerializer(serializers.ModelSerializer):
 class StoreSerializer(serializers.ModelSerializer):
     create_user_text = serializers.CharField(source='create_user.name', read_only=True)
     status_text = serializers.CharField(source='get_status_display', read_only=True)
+    check_user_text = serializers.CharField(source='check_user.name', read_only=True)
 
     class Meta:
         model = Store

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

@@ -118,8 +118,8 @@
                 , {field: 'create_time', title: '添加时间', width: 180}
                 , {field: 'end_date', title: '到期日期', width: 150}
                 , {field: 'notes', title: '备注', width: 200}
-                , {field: 'status', title: '状态', width: 150}
-                , {field: 'check_user', title: '审核人', width: 150}
+                , {field: 'status_text', title: '状态', width: 150}
+                , {field: 'check_user_text', title: '审核人', width: 150}
                 , {field: 'check_time', title: '审核时间', width: 180}
                 , {width: 180, align: 'center', fixed: 'right', toolbar: '#store-operate-bar'}
             ]]
@@ -134,7 +134,7 @@
                 layer.confirm('确定要删除吗?', function (index) {
                     layer.close(index);
                     admin.req({
-                        url: '/agent/agent/' + data.id + '/'
+                        url: '/agent/store/' + data.id + '/'
                         , type: 'delete'
                         , done: function (res) {
                             table.reload('store_datagrid', {});