From a5873caf8debaf9521fc6dea3f12bfa568ca7e2e Mon Sep 17 00:00:00 2001
From: chenxiaojun <956334972@qq.com>
Date: Tue, 22 Oct 2019 16:17:04 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E5=90=8E=E5=8F=B0->?=
=?UTF-8?q?=E6=A3=80=E7=B4=A2bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Home/View/default/Query/dailySummary.html | 40 +++++++++-------
.../Home/View/default/Query/recharge.html | 40 +++++++++-------
.../Home/View/default/Query/register.html | 40 +++++++++-------
.../Home/View/default/Query/summary.html | 48 ++++++++++---------
4 files changed, 92 insertions(+), 76 deletions(-)
diff --git a/Application/Home/View/default/Query/dailySummary.html b/Application/Home/View/default/Query/dailySummary.html
index 73c5b191a..2358784c8 100644
--- a/Application/Home/View/default/Query/dailySummary.html
+++ b/Application/Home/View/default/Query/dailySummary.html
@@ -457,20 +457,17 @@
$('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text();
+ var html = "";
- $.ajax({
- url: "{:U('getChildPromoteList')}",
- type: "post",
- data: {promote_id:promoteId},
- dataType: 'json',
- success: function (data) {
- var html = "";
+ if (promoteId > 0) {
+ html += "";
- if (promoteId > 0) {
- html += "";
- }
-
- if (data.status == 1) {
+ $.ajax({
+ url: "{:U('getChildPromoteList')}",
+ type: "post",
+ data: {promote_id:promoteId},
+ dataType: 'json',
+ success: function (data) {
var promoteData = data.data;
if (promoteData.length > 0) {
@@ -478,15 +475,22 @@
html += "";
}
}
- }
- $("#promote_id").empty();
- $('#promote_id').html(html);
- $("#promote_id").select2();
- }
- });
+ showPromoteSelect(html);
+ }
+ });
+ } else {
+ showPromoteSelect(html);
+ }
});
+ function showPromoteSelect(html)
+ {
+ $("#promote_id").empty();
+ $('#promote_id').html(html);
+ $("#promote_id").select2();
+ }
+
$('#own').on('click', function () {
var ownId = $('#own_id').val();
var checkBox = $(this).children('i');
diff --git a/Application/Home/View/default/Query/recharge.html b/Application/Home/View/default/Query/recharge.html
index 3e1c5e4dc..842af2012 100644
--- a/Application/Home/View/default/Query/recharge.html
+++ b/Application/Home/View/default/Query/recharge.html
@@ -279,20 +279,17 @@
$('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text();
+ var html = "";
- $.ajax({
- url: "{:U('getChildPromoteList')}",
- type: "post",
- data: {promote_id:promoteId},
- dataType: 'json',
- success: function (data) {
- var html = "";
+ if (promoteId > 0) {
+ html += "";
- if (promoteId > 0) {
- html += "";
- }
-
- if (data.status == 1) {
+ $.ajax({
+ url: "{:U('getChildPromoteList')}",
+ type: "post",
+ data: {promote_id:promoteId},
+ dataType: 'json',
+ success: function (data) {
var promoteData = data.data;
if (promoteData.length > 0) {
@@ -300,15 +297,22 @@
html += "";
}
}
- }
- $("#promote_id").empty();
- $('#promote_id').html(html);
- $("#promote_id").select2();
- }
- });
+ showPromoteSelect(html);
+ }
+ });
+ } else {
+ showPromoteSelect(html);
+ }
});
+ function showPromoteSelect(html)
+ {
+ $("#promote_id").empty();
+ $('#promote_id').html(html);
+ $("#promote_id").select2();
+ }
+
$('#own').on('click',function () {
var ownId = $('#own_id').val();
var checkBox = $(this).children('i');
diff --git a/Application/Home/View/default/Query/register.html b/Application/Home/View/default/Query/register.html
index d422f83eb..0d2a5cbf9 100644
--- a/Application/Home/View/default/Query/register.html
+++ b/Application/Home/View/default/Query/register.html
@@ -188,20 +188,17 @@
$('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text();
+ var html = "";
- $.ajax({
- url: "{:U('getChildPromoteList')}",
- type: "post",
- data: {promote_id:promoteId},
- dataType: 'json',
- success: function (data) {
- var html = "";
+ if (promoteId > 0) {
+ html += "";
- if (promoteId > 0) {
- html += "";
- }
-
- if (data.status == 1) {
+ $.ajax({
+ url: "{:U('getChildPromoteList')}",
+ type: "post",
+ data: {promote_id:promoteId},
+ dataType: 'json',
+ success: function (data) {
var promoteData = data.data;
if (promoteData.length > 0) {
@@ -209,15 +206,22 @@
html += "";
}
}
- }
- $("#promote_id").empty();
- $('#promote_id').html(html);
- $("#promote_id").select2();
- }
- });
+ showPromoteSelect(html);
+ }
+ });
+ } else {
+ showPromoteSelect(html);
+ }
});
+ function showPromoteSelect(html)
+ {
+ $("#promote_id").empty();
+ $('#promote_id').html(html);
+ $("#promote_id").select2();
+ }
+
$('#own').on('click',function () {
var ownId = $('#own_id').val();
var checkBox = $(this).children('i');
diff --git a/Application/Home/View/default/Query/summary.html b/Application/Home/View/default/Query/summary.html
index 507647703..636d00b3f 100644
--- a/Application/Home/View/default/Query/summary.html
+++ b/Application/Home/View/default/Query/summary.html
@@ -242,22 +242,19 @@
setValue('row', '{:I("get.row",10)}');
$('#team_leader_id').change(function () {
- var promoteId = parseInt($(this).val());
- var promoteValue = $(this).find("option:selected").text();
-
- $.ajax({
- url: "{:U('getChildPromoteList')}",
- type: "post",
- data: {promote_id:promoteId},
- dataType: 'json',
- success: function (data) {
- var html = "";
-
- if (promoteId > 0) {
- html += "";
- }
-
- if (data.status == 1) {
+ var promoteId = parseInt($(this).val());
+ var promoteValue = $(this).find("option:selected").text();
+ var html = "";
+
+ if (promoteId > 0) {
+ html += "";
+
+ $.ajax({
+ url: "{:U('getChildPromoteList')}",
+ type: "post",
+ data: {promote_id:promoteId},
+ dataType: 'json',
+ success: function (data) {
var promoteData = data.data;
if (promoteData.length > 0) {
@@ -265,15 +262,22 @@
html += "";
}
}
- }
- $("#promote_id").empty();
- $('#promote_id').html(html);
- $("#promote_id").select2();
- }
- });
+ showPromoteSelect(html);
+ }
+ });
+ } else {
+ showPromoteSelect(html);
+ }
});
+ function showPromoteSelect(html)
+ {
+ $("#promote_id").empty();
+ $('#promote_id').html(html);
+ $("#promote_id").select2();
+ }
+
$('#own').on('click',function () {
var ownId = $('#own_id').val();
var checkBox = $(this).children('i');