优化代码,增加苹果账户备注查询功能

dependabot/npm_and_yarn/fir_admin/url-parse-1.5.10
MMXX 3 years ago
parent d085d86a26
commit 04ccfe77a3
  1. 40
      fir_client/src/components/user/FirSuperSignBase.vue
  2. 2
      fir_ser/api/utils/crontab/ctasks.py
  3. 8
      fir_ser/api/views/supersign.py

@ -208,11 +208,11 @@
<el-input <el-input
v-model="appidseach" v-model="appidseach"
clearable clearable
placeholder="输入开发者ID或应用BundleID" placeholder="输入开发者ID或者备注或应用BundleID"
style="width: 27%;margin-right: 10px;margin-bottom: 10px"/> style="width: 30%;margin-right: 10px;margin-bottom: 10px"/>
<el-select v-model="developer_choice" clearable placeholder="账户类型" <el-select v-model="developer_choice" clearable placeholder="账户类型"
style="width: 12%;margin-right: 10px;margin-bottom: 10px"> style="width: 18%;margin-right: 10px;margin-bottom: 10px">
<el-option <el-option
v-for="item in developer_options" v-for="item in developer_options"
:key="item.value" :key="item.value"
@ -220,10 +220,8 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<el-button icon="el-icon-search" type="primary" @click="handleCurrentChange(1)">
搜索 <div style="width: 45%;margin-right: 20px;float:right;margin-bottom: 10px">
</el-button>
<div style="width: 45%;margin-right: 20px;float:right">
<el-link :underline="false">总设备量{{ developer_used_info.all_usable_number }} 已使用平台{{ <el-link :underline="false">总设备量{{ developer_used_info.all_usable_number }} 已使用平台{{
developer_used_info.all_use_number developer_used_info.all_use_number
}} 其他{{ developer_used_info.other_used_sum }} }} 其他{{ developer_used_info.other_used_sum }}
@ -238,6 +236,26 @@
type="line"/> type="line"/>
</div> </div>
<el-row>
<el-col :span="24"><div>
<el-select v-model="developer_status_choice" clearable multiple
placeholder="账户状态" style="width: 49%;margin-right: 45px;margin-bottom: 10px">
<el-option
v-for="item in status_choices"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-button icon="el-icon-search" type="primary" @click="handleCurrentChange(1)">
搜索
</el-button>
</div>
</el-col>
</el-row>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="app_developer_lists" :data="app_developer_lists"
@ -322,6 +340,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
:formatter="formatter_usable_number" :formatter="formatter_usable_number"
:sort-method="sort_method_usable_number"
align="center" align="center"
label="可用设备" label="可用设备"
prop="usable_number" prop="usable_number"
@ -1051,7 +1070,8 @@ export default {
bind_appletoapp_sure: false, bind_appletoapp_sure: false,
appletoapp_title: '', appletoapp_title: '',
status_choices: [], status_choices: [],
read_only_mode: 'off' read_only_mode: 'off',
developer_status_choice: []
} }
}, watch: { }, watch: {
'dialogaddDeveloperVisible': function () { 'dialogaddDeveloperVisible': function () {
@ -1061,6 +1081,9 @@ export default {
} }
}, },
methods: { methods: {
sort_method_usable_number(a, b) {
return this.formatter_usable_number(a) - this.formatter_usable_number(b)
},
formatter_usable_number(row) { formatter_usable_number(row) {
return row.usable_number - row.developer_used_number > 0 ? row.usable_number - row.developer_used_number : 0 return row.usable_number - row.developer_used_number > 0 ? row.usable_number - row.developer_used_number : 0
}, },
@ -1354,6 +1377,7 @@ export default {
// this.dialogaddDeveloperVisible=true; // this.dialogaddDeveloperVisible=true;
} else if (tabname === "iosdeveloper") { } else if (tabname === "iosdeveloper") {
data.developer_choice = this.developer_choice; data.developer_choice = this.developer_choice;
data.developer_status_choice = JSON.stringify(this.developer_status_choice);
this.iosdeveloperFun({"methods": "GET", "data": data}) this.iosdeveloperFun({"methods": "GET", "data": data})
} else if (tabname === "devicesbill") { } else if (tabname === "devicesbill") {
this.iosdevicebillFun({"methods": "GET", "data": data}) this.iosdevicebillFun({"methods": "GET", "data": data})

@ -65,7 +65,7 @@ def auto_delete_ios_mobile_tmp_file():
def auto_check_ios_developer_active(): def auto_check_ios_developer_active():
all_ios_developer = AppIOSDeveloperInfo.objects.filter(status=1) all_ios_developer = AppIOSDeveloperInfo.objects.filter(status__in=[1, 2])
error_issuer_id = {} error_issuer_id = {}
for ios_developer in all_ios_developer: for ios_developer in all_ios_developer:
userinfo = ios_developer.user_id userinfo = ios_developer.user_id

@ -4,6 +4,7 @@
# author: liuyu # author: liuyu
# date: 2020/3/4 # date: 2020/3/4
import datetime import datetime
import json
import logging import logging
from django.db.models import Count, Q, Sum from django.db.models import Count, Q, Sum
@ -43,12 +44,19 @@ class DeveloperView(APIView):
res = BaseResponse() res = BaseResponse()
issuer_id = request.query_params.get("issuer_id", '') issuer_id = request.query_params.get("issuer_id", '')
developer_choice = request.query_params.get("developer_choice", None) developer_choice = request.query_params.get("developer_choice", None)
developer_status_choice = request.query_params.get("developer_status_choice", None)
developer_obj = AppIOSDeveloperInfo.objects.filter(user_id=request.user) developer_obj = AppIOSDeveloperInfo.objects.filter(user_id=request.user)
if developer_choice and developer_choice in ['private', 'public']: if developer_choice and developer_choice in ['private', 'public']:
if developer_choice == 'public': if developer_choice == 'public':
developer_obj = developer_obj.exclude(appledevelopertoappuse__developerid__isnull=False) developer_obj = developer_obj.exclude(appledevelopertoappuse__developerid__isnull=False)
else: else:
developer_obj = developer_obj.filter(appledevelopertoappuse__developerid__isnull=False) developer_obj = developer_obj.filter(appledevelopertoappuse__developerid__isnull=False)
try:
status_choice = json.loads(developer_status_choice)
except Exception as e:
status_choice = None
if status_choice is not None and isinstance(status_choice, list) and status_choice:
developer_obj = developer_obj.filter(status__in=status_choice)
developer_obj = developer_obj.distinct() developer_obj = developer_obj.distinct()
res.use_num = get_developer_devices(developer_obj) res.use_num = get_developer_devices(developer_obj)
if issuer_id: if issuer_id:

Loading…
Cancel
Save