From 80b5be5e4ff4cb99aeb8c4e872ff1a8e208a9b0a Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 30 十一月 2023 09:53:54 +0800
Subject: [PATCH] '功能修改'

---
 kp_html/kp/js/page.js |   78 +++++++++++++++++++++++++--------------
 1 files changed, 50 insertions(+), 28 deletions(-)

diff --git a/kp_html/kp/js/page.js b/kp_html/kp/js/page.js
index 37e39f1..c31f783 100644
--- a/kp_html/kp/js/page.js
+++ b/kp_html/kp/js/page.js
@@ -84,8 +84,8 @@
 			data: {
 				code: "000000",
 				code_name: "----",
-				last_show_dialog:0,
-				limit_up_search_key:'',
+				last_show_dialog: 0,
+				limit_up_search_key: '',
 				trade_data: {
 					order: 0
 				},
@@ -205,14 +205,30 @@
 				},
 				kpl_code_info: {
 					code_records: [
-						[["鍘熷洜",''], "2020-01-01", [["鏉垮潡",'']]],
-						[["鍘熷洜",''], "2020-01-01", [["鏉垮潡",'']]],
-						[["鍘熷洜",''], "2020-01-01", [["鏉垮潡",'']]]
+						[
+							["鍘熷洜", ''], "2020-01-01", [
+								["鏉垮潡", '']
+							]
+						],
+						[
+							["鍘熷洜", ''], "2020-01-01", [
+								["鏉垮潡", '']
+							]
+						],
+						[
+							["鍘熷洜", ''], "2020-01-01", [
+								["鏉垮潡", '']
+							]
+						]
 					],
-					today: [["娑ㄥ仠鍘熷洜",''], "2023-01-01", [["浼犲獟",'']]],
+					today: [
+						["娑ㄥ仠鍘熷洜", ''], "2023-01-01", [
+							["浼犲獟", '']
+						]
+					],
 					plate: [
-						["鏉垮潡1", "1%",''],
-						["鏉垮潡2", "0.5%",'']
+						["鏉垮潡1", "1%", ''],
+						["鏉垮潡2", "0.5%", '']
 					]
 				},
 				initiative_buy_codes: [{
@@ -257,7 +273,8 @@
 					open_limit_up_count: 10,
 					limit_up_codes: [
 						//(浠g爜,鍚嶇О,娑ㄥ仠鐘舵��(0-鏃犵姸鎬� 1-娑ㄥ仠 2-鐐告澘),榫欏嚑,棣栨澘,鍒嗗��,娑ㄥ仠鏃堕棿,鍘熷洜,鐩稿悓鍘熷洜浠g爜鏁伴噺,鑷敱娴侀��,涔嬪墠鐨勬澘鍧�)
-						["000333", "缇庣殑闆嗗洟", 1, "榫�1", "棣栨澘", "200", "10:00:00", "涓�瀛e害澧為暱", "1", "12.02浜�",'12浜�','',
+						["000333", "缇庣殑闆嗗洟", 1, "榫�1", "棣栨澘", "200", "10:00:00", "涓�瀛e害澧為暱", "1", "12.02浜�",
+							'12浜�', '',
 							''
 						],
 						["000333", "缇庣殑闆嗗洟", 1, "榫�1", "棣栨澘", "200", "10:00:00", "涓�瀛e害澧為暱", "1", "12.02浜�",
@@ -333,6 +350,7 @@
 
 				},
 				want_codes: [],
+				want_codes_plate: "",
 				choose_code: {
 					first: '',
 					second: ''
@@ -340,6 +358,15 @@
 				industry_data_type: 0,
 				jingxuan_data_type: 0,
 
+			},
+			watch: {
+				want_codes: function() {
+					layer.open({
+						title: app.want_codes_plate,
+						type: 1,
+						content: $("#want_code_dialog"),
+					});
+				}
 			},
 			methods: {
 				refresh: function() {
@@ -351,9 +378,9 @@
 					init_data();
 					_resize();
 				},
-				limit_up_search:function(){
+				limit_up_search: function() {
 					key = $("#limit_up_search_key").val();
-					app.limit_up_search_key=key;
+					app.limit_up_search_key = key;
 				},
 				//鑾峰彇琛屼笟鏁版嵁
 				get_industry_data: function(type) {
@@ -521,14 +548,13 @@
 									.plate;
 								app.$set(app.choose_code_info.code_list_info, index, app
 									.choose_code_info.code_list_info[index]);
-								if (app.choose_code.second_info)
-								{
+								if (app.choose_code.second_info) {
 									//鏆傚瓨閫変腑浜岀骇浠g爜鏁版嵁
 									app.choose_code.second_info.code_records = app.kpl_code_info
 										.code_records;
 									app.choose_code.second_info.plate = app.kpl_code_info.plate;
 								}
-								
+
 							});
 					}
 				},
@@ -567,24 +593,20 @@
 					init_data();
 				},
 				show_want_codes: function(plate) {
-					if (Date.now() - app.last_show_dialog<500){
+					if (Date.now() - app.last_show_dialog < 500) {
 						return;
 					}
-					app.last_show_dialog= Date.now()
-					
+					app.last_show_dialog = Date.now()
+
 					http_util.get_plate_codes(plate, function(result) {
 						result = JSON.parse(result);
-						console.log("娑ㄥ仠鍘熷洜鎴愬垎鑲¤繑鍥烇細",result);
+						console.log("娑ㄥ仠鍘熷洜鎴愬垎鑲¤繑鍥烇細", result);
 						var datas = result.data;
+						app.want_codes_title = plate;
 						app.want_codes = datas;
-						console.log("娑ㄥ仠鍘熷洜鎴愬垎鑲★細",datas)
-						setTimeout(function() {
-							layer.open({
-								title:  plate,
-								type: 1,
-								content: $("#want_code_dialog"),
-							})
-						}, 100);
+
+						console.log("娑ㄥ仠鍘熷洜鎴愬垎鑲★細", datas)
+
 					});
 
 				},
@@ -592,8 +614,8 @@
 					http_util.do_action_for_code(app.want_codes[index][0], "", 5,
 						function(result) {
 							if (result.code == 0) {
-								app.want_codes[index][2]=0;
-								app.$set(app.want_codes,index,app.want_codes[index]);
+								app.want_codes[index][2] = 0;
+								app.$set(app.want_codes, index, app.want_codes[index]);
 								app.get_limit_up_list(app.code, true);
 							}
 						});

--
Gitblit v1.8.0