From f5e8c9ecc4b1980e215dcf940aba004a8d6ab353 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 25 七月 2025 15:23:36 +0800 Subject: [PATCH] 网页内容修改 --- kp_html/kp/js/page.js | 668 ++++++++++++++++++++++++++++++------------------------- 1 files changed, 364 insertions(+), 304 deletions(-) diff --git a/kp_html/kp/js/page.js b/kp_html/kp/js/page.js index 3ee5ab4..196e371 100644 --- a/kp_html/kp/js/page.js +++ b/kp_html/kp/js/page.js @@ -67,7 +67,7 @@ app.get_limit_up_list(app.code, true); app.get_limit_up_statistic_infos(true); } - + }, 3000, 3000); setInterval(function() { @@ -82,28 +82,32 @@ app.get_kpl_market_feelings(); } }, 3000, 3000); - + setInterval(function() { if (is_trade_time()) { app.get_l2_subscript_codes(); } }, 3000, 3000); - + setInterval(function() { if (is_trade_time()) { app.get_big_order_deal_info(app.code); } }, 3000, 3000); - + setInterval(function() { if (is_trade_time()) { app.get_low_suction_place_order_records(); + app.get_low_suction_plates(); } - }, 3000, 3000); - - - + + + + + + + function init() { app = new Vue({ el: "#body", @@ -115,9 +119,9 @@ trade_data: { order: 0 }, - cb_list:null,// 鍙浆鍊哄垪琛� - cb_list_top:[], - cb_selected_code:'', + cb_list: null, // 鍙浆鍊哄垪琛� + cb_list_top: [], + cb_selected_code: '', // 浠g爜鐨勫紑鐩樺暒娑ㄥ仠鍘熷洜 kpl_limit_up_reason: '', default_score_data: { @@ -380,7 +384,7 @@ ["鏉垮潡", "2020-01-01"] ], blocks: ["鏉垮潡1", "鏉垮潡2"], - + }] }, @@ -396,37 +400,39 @@ // 甯傚満鎯呯华 market_feeling_info: {}, // 鏉垮潡杞姩 - latest_limit_up_blocks:[], - new_blocks:"",// 鏂板鐨勬蹇� - latest_limit_up_datas:[], - green_list:[], // 缁垮悕鍗� - limit_up_reason_statistic_new:[], - place_order_record_list:[], // 涓嬪崟璁板綍 - block_codes_in:[], - block_codes_out:[], - l2_subscript_codes:[], - want_list:[], - big_order_deal_info:null, // 澶у崟鎴愪氦 + latest_limit_up_blocks: [], + new_blocks: "", // 鏂板鐨勬蹇� + latest_limit_up_datas: [], + green_list: [], // 缁垮悕鍗� + limit_up_reason_statistic_new: [], + place_order_record_list: [], // 涓嬪崟璁板綍 + block_codes_in: [], + block_codes_out: [], + l2_subscript_codes: [], + want_list: [], + big_order_deal_info: null, // 澶у崟鎴愪氦 show_third_block_info: false, // 鏄惁鏄剧ず绗笁鏂规澘鍧� - forbidden_buy_plates:[],//绂佹涔板叆鐨勬澘鍧� - deleted_forbidden_buy_plates:[],//宸茬粡鍒犻櫎鐨勬澘鍧� - code_special_blocks:{}, - special_codes_list:[], - forbidden_refer_codes:[],// 鏉垮潡鎷夐粦鐩戞祴鐨勭エ - new_block_code_special_blocks:{}, - low_suction_plate_white_list:[], - low_suction_place_order_records:[], + forbidden_buy_plates: [], //绂佹涔板叆鐨勬澘鍧� + deleted_forbidden_buy_plates: [], //宸茬粡鍒犻櫎鐨勬澘鍧� + code_special_blocks: {}, + special_codes_list: [], + forbidden_refer_codes: [], // 鏉垮潡鎷夐粦鐩戞祴鐨勭エ + new_block_code_special_blocks: {}, + low_suction_plate_white_list: [], + low_suction_place_order_records: [], + low_suction_plates: [] + }, watch: { want_codes: function() { - setTimeout(function(){ + setTimeout(function() { layer.open({ title: app.want_codes_plate, type: 1, content: $("#want_code_dialog"), }); }, 100); - + } }, methods: { @@ -443,16 +449,16 @@ key = $("#limit_up_search_key").val(); app.limit_up_search_key = key; }, - select_in_money_type:function(type){ + select_in_money_type: function(type) { app.in_money_type = type; app.get_block_in_money_data(type); }, get_block_in_money_data: function(type) { - switch(type){ + switch (type) { case 0: case 1: case 2: - case 3:{ + case 3: { http_util.get_market_data(type, function(result) { result = JSON.parse(result); if (result.code == 0) { @@ -461,25 +467,24 @@ }); } break; - case 4: - case 5: - { - http_util.get_blocks_in_money_info(type%2, function(result) { - result = JSON.parse(result); - if (result.code == 0) { - app.jingxuan_datas = result.data; - } - }); - } - break; + case 4: + case 5: { + http_util.get_blocks_in_money_info(type % 2, function(result) { + result = JSON.parse(result); + if (result.code == 0) { + app.jingxuan_datas = result.data; + } + }); + } + break; } }, - - + + get_score_data: function(code, name, callback) { console.log("鑾峰彇鍒嗘暟鏁版嵁锛�", code, name); - var date=$("#date").val(); - http_util.get_score_data(code, name,date, function(res) { + var date = $("#date").val(); + http_util.get_score_data(code, name, date, function(res) { console.log("鍒嗘暟璇锋眰缁撴灉锛�", res) res = JSON.parse(res) if (res.code == 0) { @@ -507,7 +512,8 @@ for (var i = 0; i < app.first_info .limit_up_reason_statistic .length; i++) { - var limit_up_info = app.first_info.limit_up_reason_statistic[i]; + var limit_up_info = app.first_info + .limit_up_reason_statistic[i]; if (limit_up_info[0] == e[1]) { s = limit_up_info; break; @@ -540,7 +546,7 @@ }, get_limit_up_list: function(code, is_auto_refresh) { day = $("#date").val(); - http_util.get_limit_up_list(code,day, function(res) { + http_util.get_limit_up_list(code, day, function(res) { res = JSON.parse(res) if (res.code == 0) { app.first_info = res.data @@ -574,9 +580,11 @@ console.log("get_limit_up_statistic_infos", res); if (res.code == 0) { var temps = new Array(); - var current_limit_up_reason =null; + var current_limit_up_reason = null; res.data.limit_up_reason_statistic.forEach(function(d) { - if (app.code_third_blocks&&app.code_third_blocks.match_blocks&&app.code_third_blocks.match_blocks[0].includes(d[0])) { + if (app.code_third_blocks && app.code_third_blocks + .match_blocks && app.code_third_blocks + .match_blocks[0].includes(d[0])) { current_limit_up_reason = d; } else { temps.push(d); @@ -614,7 +622,7 @@ // } http_util.cancel_order(app.code, function() { //鎾ゅ崟鎴愬姛锛屽埛鏂颁唬鐮� - app.get_score_data(app.code,null,null); + app.get_score_data(app.code, null, null); }); }, forbidden_plate: function(plate, type) { @@ -630,20 +638,19 @@ } }); }, - + set_third_block_show: function(event) { var el = event.currentTarget; var checked = $(el).is(':checked'); app.show_third_block_info = checked; }, - + //閫変腑1绾т唬鐮� select_code_level_1: function(event, index) { var el = event.currentTarget; if (app.choose_code.first != app.first_info.limit_up_codes[index][0]) { app.choose_code.first = app.first_info.limit_up_codes[index][0]; app.code = app.first_info.limit_up_codes[index][0]; - pyjs.add_code_to_ths(app.code); app.code_name = app.code + "(" + app.first_info.limit_up_codes[index][1] + ")"; app.get_score_data(app.first_info.limit_up_codes[index][0], app.first_info @@ -651,12 +658,12 @@ app.get_plate_info(app.first_info.limit_up_codes[index][0]); app.get_code_third_blocks(app.code); app.get_big_order_deal_info(app.code); - + } }, - get_code_third_blocks:function(code){ + get_code_third_blocks: function(code) { http_util.get_code_third_blocks(app.code, function(res) { - console.log("涓夋柟鏉垮潡璇锋眰缁撴灉锛�",JSON.stringify(res.data)); + console.log("涓夋柟鏉垮潡璇锋眰缁撴灉锛�", JSON.stringify(res.data)); if (res.code == 0) { app.code_third_blocks = res.data; console.log(res.data) @@ -664,9 +671,9 @@ app.code_third_blocks = null; } }); - + }, - + //鍒犻櫎1绾т唬鐮� del_code_level_1: function(index) { http_util.add_ignore_code(1, app.first_info.limit_up_codes[index][0], function( @@ -751,8 +758,8 @@ app.big_order_deal_info = null; app.get_code_third_blocks(code); app.get_big_order_deal_info(code); - - + + //璇锋眰鏉垮潡 setTimeout(function() { @@ -762,30 +769,33 @@ if (res.code == 0) { res.data.plate.forEach(function(e) { var s = null; - if (app.first_info.limit_up_reason_statistic) { + if (app.first_info + .limit_up_reason_statistic) { for (var i = 0; i < app.first_info .limit_up_reason_statistic .length; i++) { if (app.first_info .limit_up_reason_statistic[ i][0] == e[1]) { - s = app.first_info.limit_up_reason_statistic[i]; + s = app.first_info + .limit_up_reason_statistic[ + i]; break; } } } e.push(s); }); - - + + app.kpl_code_info = res.data; // 璁剧疆褰撴棩娑ㄥ仠鍘熷洜 - try{ - app.kpl_limit_up_reason = app.kpl_code_info.today[0] - [0]; - }catch(e){ - } + try { + app.kpl_limit_up_reason = app.kpl_code_info + .today[0] + [0]; + } catch (e) {} // 灏嗗綋鍓嶆定鍋滃師鍥犵疆椤� var limit_up_reason_statistic = app.first_info .limit_up_reason_statistic; @@ -809,28 +819,28 @@ } }); }, 10); - + // this.set_selected_cb_top(true); //init_data(); }, - - get_big_order_deal_info:function(code){ - - http_util.get_big_order_deal_info(code,function(res){ + + get_big_order_deal_info: function(code) { + + http_util.get_big_order_deal_info(code, function(res) { res = JSON.parse(res); - if(res.code==0){ - app.big_order_deal_info = res.data[0]; + if (res.code == 0) { + app.big_order_deal_info = res.data[0]; } }); - + }, show_want_codes: function(plate) { if (Date.now() - app.last_show_dialog < 500) { return; } app.last_show_dialog = Date.now() - var day = $("#date").val(); - http_util.get_plate_codes(plate,day, function(result) { + var day = $("#date").val(); + http_util.get_plate_codes(plate, day, function(result) { result = JSON.parse(result); console.log("娑ㄥ仠鍘熷洜鎴愬垎鑲¤繑鍥烇細", result); var datas = result.data; @@ -847,8 +857,8 @@ return; } app.last_show_dialog = Date.now() - var day = $("#date").val(); - http_util.get_plate_codes_new(plate,day, function(result) { + var day = $("#date").val(); + http_util.get_plate_codes_new(plate, day, function(result) { result = JSON.parse(result); console.log("娑ㄥ仠鍘熷洜鎴愬垎鑲¤繑鍥烇細", result); var datas = result.data; @@ -858,7 +868,7 @@ app.forbidden_refer_codes = datas["forbidden_refer_codes"]; console.log("娑ㄥ仠鍘熷洜鎴愬垎鑲★細", datas) }); - + }, delete_from_want_codes: function(index) { http_util.do_action_for_code(app.want_codes[index][0], "", 5, @@ -932,76 +942,76 @@ } }); }, - add_or_remove_forbidden:function(event, code, index){ - + add_or_remove_forbidden: function(event, code, index) { + var el = event.currentTarget; var checked = $(el).is(':checked'); console.log(code, checked); - if(checked){ - http_util.do_action_for_code(code,'',0,function(res){ - + if (checked) { + http_util.do_action_for_code(code, '', 0, function(res) { + app.want_codes[index][9] = 1; - + }); - }else{ - http_util.do_action_for_code(code,'',1,function(res){ + } else { + http_util.do_action_for_code(code, '', 1, function(res) { app.want_codes[index][9] = 0; }); } - + }, - add_or_remove_green_buy:function(event,code, index){ - + add_or_remove_green_buy: function(event, code, index) { + var el = event.currentTarget; var checked = $(el).is(':checked'); console.log(code, checked); - if(checked){ - http_util.do_action_for_code(code,'',8,function(res){ - app.want_codes[index][4] = 1; + if (checked) { + http_util.do_action_for_code(code, '', 8, function(res) { + app.want_codes[index][4] = 1; }); - }else{ - http_util.do_action_for_code(code,'',9,function(res){ + } else { + http_util.do_action_for_code(code, '', 9, function(res) { app.want_codes[index][4] = 0; }); } - + }, - - add_or_remove_want_buy:function(event,code, index){ - + + add_or_remove_want_buy: function(event, code, index) { + var el = event.currentTarget; var checked = $(el).is(':checked'); console.log(code, checked); - if(checked){ - http_util.do_action_for_code(code,'',4,function(res){ - app.want_codes[index][12] = 1; + if (checked) { + http_util.do_action_for_code(code, '', 4, function(res) { + app.want_codes[index][12] = 1; }); - }else{ - http_util.do_action_for_code(code,'',5,function(res){ + } else { + http_util.do_action_for_code(code, '', 5, function(res) { app.want_codes[index][12] = 0; }); } - + }, - - set_selected_cb_top:function(update_top){ - var temp_list=app.cb_list; - for(var i=0;i<temp_list.length;i++){ - if(temp_list[i][0][0] == app.cb_selected_code){ + + set_selected_cb_top: function(update_top) { + var temp_list = app.cb_list; + for (var i = 0; i < temp_list.length; i++) { + if (temp_list[i][0][0] == app.cb_selected_code) { var data = temp_list[i]; temp_list.splice(i, 1); temp_list.unshift(data); app.cb_list = temp_list; - + break; } } - if(update_top){ + if (update_top) { // 鍏堝彉榛� // 缃《 - var temp_list=app.cb_list_top; - for(var i=0;i<temp_list.length;i++){ - if(temp_list[i][1][0] == app.code){ + var temp_list = app.cb_list_top; + for (var i = 0; i < temp_list.length; i++) { + if (temp_list[i][1][0] == app.code) { var data = temp_list[i]; temp_list.splice(i, 1); temp_list.unshift(data); @@ -1012,80 +1022,84 @@ } } }, - - select_cb:function(data){ + + select_cb: function(data) { app.cb_selected_code = data[0][0]; this.set_selected_cb_top(false); }, - - buy_by_ths:function(code){ - http_util.buy_by_ths(code,function(res){ - res= JSON.parse(res); - if(res.code!=0){ - layer.msg("涓嬪崟鍑洪敊锛�"+res.msg); - - }else{ + + buy_by_ths: function(code) { + http_util.buy_by_ths(code, function(res) { + res = JSON.parse(res); + if (res.code != 0) { + layer.msg("涓嬪崟鍑洪敊锛�" + res.msg); + + } else { layer.msg("涓嬪崟瀹屾垚"); } }); }, - statistic_latest_limit_up_block:function(code){ - http_util.statistic_latest_limit_up_block(code,function(res){ - res= JSON.parse(res); + statistic_latest_limit_up_block: function(code) { + http_util.statistic_latest_limit_up_block(code, function(res) { + res = JSON.parse(res); console.log(res); - if(res.code!=0){ + if (res.code != 0) { layer.msg(res.msg); - }else{ - app.latest_limit_up_blocks= res.data; + } else { + app.latest_limit_up_blocks = res.data; } }); - + }, // 鑾峰彇鏂板姒傚康 - get_new_blocks:function(){ - http_util.get_new_blocks(function(res){ - res= JSON.parse(res); - console.log(res); - if(res.code==0){ - var blocks = res.data; - var block_str=""; - for(var i=0;i<blocks.length;i++){ - block_str +=blocks[i]; - if(i<blocks.length-1){ - block_str+="銆�"; - } - } - app.new_blocks = block_str; - }else{ - layer.msg(res.msg); - } - - - - }) - + get_new_blocks: function() { + http_util.get_new_blocks(function(res) { + res = JSON.parse(res); + console.log(res); + if (res.code == 0) { + var blocks = res.data; + var block_str = ""; + for (var i = 0; i < blocks.length; i++) { + block_str += blocks[i]; + if (i < blocks.length - 1) { + block_str += "銆�"; + } + } + app.new_blocks = block_str; + } else { + layer.msg(res.msg); + } + + + + }) + }, - add_to_ths:function(code){ + add_to_ths: function(code) { console.log("================================="); pyjs.add_code_to_ths(code); - try{ + try { app.set_target_code(code); - }catch(e){ - } + } catch (e) {} }, - show_latest_limit_up_queue:function(time_str){ - http_util.get_kpl_latest_limit_up_queue_by_time(time_str,function(res){ + show_latest_limit_up_queue: function(time_str) { + http_util.get_kpl_latest_limit_up_queue_by_time(time_str, function(res) { res = JSON.parse(res); - if(res.code==0){ + if (res.code == 0) { datas = []; - res.data.sort((a,b)=>a[2] - b[2]); - res.data.forEach(function(e){ - let date = new Date(e[2]*1000); - let hours = String(date.getHours()).padStart(2, '0'); - let minutes = String(date.getMinutes()).padStart(2, '0'); - let seconds = String(date.getSeconds()).padStart(2, '0'); + res.data.sort((a, b) => a[2] - b[2]); + res.data.forEach(function(e) { + let date = new Date(e[2] * 1000); + let hours = String(date.getHours()).padStart(2, + '0'); + let minutes = String(date.getMinutes()).padStart(2, + '0'); + let seconds = String(date.getSeconds()).padStart(2, + '0'); temp_time_str = `${hours}:${minutes}:${seconds}`; - datas.push([e[0],e[1],temp_time_str,e[4],e[5],e[6]]); + datas.push([e[0], e[1], temp_time_str, e[4], e[5], + e[6] + ]); }); app.latest_limit_up_datas = datas; layer.open({ @@ -1096,9 +1110,9 @@ } }); }, - show_green_codes:function(){ - - http_util.get_green_codes(function(res){ + show_green_codes: function() { + + http_util.get_green_codes(function(res) { app.green_list = res.data; layer.open({ title: '缁垮悕鍗�', @@ -1106,18 +1120,18 @@ content: $("#green_list_dialog"), }); }); - + }, - delete_from_green_codes:function(code_info){ + delete_from_green_codes: function(code_info) { code = code_info.split(":")[1] http_util.do_action_for_code(code, '', 9); - http_util.get_green_codes(function(res){ + http_util.get_green_codes(function(res) { app.green_list = res.data; }); }, - - show_want_codes_list:function(){ - http_util.get_want_codes('',function(res){ + + show_want_codes_list: function() { + http_util.get_want_codes('', function(res) { app.want_list = res.data; layer.open({ title: '鎯充拱鍗�', @@ -1126,32 +1140,32 @@ }); }); }, - delete_from_want_codes:function(code_info){ + delete_from_want_codes: function(code_info) { code = code_info.split(":")[1] http_util.do_action_for_code(code, '', 5); - http_util.get_want_codes('',function(res){ + http_util.get_want_codes('', function(res) { app.want_list = res.data; }); }, - - get_place_order_records:function(){ + + get_place_order_records: function() { day = $("#date").val(); - http_util.get_place_order_records(day,function(res){ + http_util.get_place_order_records(day, function(res) { res = JSON.parse(res); - if(res.code == 0){ + if (res.code == 0) { app.place_order_record_list = res.data; } }); }, - get_block_codes_with_money:function(block, desc){ - http_util.get_block_codes_with_money(block, 1, function(res){ + get_block_codes_with_money: function(block, desc) { + http_util.get_block_codes_with_money(block, 1, function(res) { res = JSON.parse(res); - if(res.code == 0){ + if (res.code == 0) { app.block_codes_in = res.data; - - http_util.get_block_codes_with_money(block, 0, function(res){ + + http_util.get_block_codes_with_money(block, 0, function(res) { res = JSON.parse(res); - if(res.code == 0){ + if (res.code == 0) { app.block_codes_out = res.data; } layer.open({ @@ -1160,137 +1174,175 @@ content: $("#block_codes_dialog"), }); }); - - - - - + + + + + } }); }, - - get_l2_subscript_codes:function(){ - http_util.get_l2_subscript_codes(function(res){ - if(res.code == 0){ - try{ - res.data.list.sort((a, b) => (b[3][3]?1:0) - (a[3][3]?1:0)); - }catch(e){ - + + get_l2_subscript_codes: function() { + http_util.get_l2_subscript_codes(function(res) { + res= JSON.parse(res); + + if (res.code == 0) { + console.log("璁㈤槄鐨勪唬鐮侊細", res.data); + try { + res.data.sort((a, b) => b[4] - a[4]); + } catch (e) { + } - app.l2_subscript_codes = res.data.list; + app.l2_subscript_codes = res.data; } }); }, - - add_to_forbidden:function(code){ - http_util.do_action_for_code(code,'',0,function(res){ - layer.msg("鎷夐粦鎴愬姛"); - app.get_l2_subscript_codes(); - }); + + add_to_forbidden: function(code) { + http_util.do_action_for_code(code, '', 0, function(res) { + layer.msg("鎷夐粦鎴愬姛"); + app.get_l2_subscript_codes(); + }); }, - list_forbidden_buy_plates:function(){ - http_util.list_forbidden_plate(function(res){ + list_forbidden_buy_plates: function() { + http_util.list_forbidden_plate(function(res) { res = JSON.parse(res); - if(res.code==0){ + if (res.code == 0) { app.forbidden_buy_plates = res.data; } }); app.list_deleted_forbidden_plate(); }, - - list_deleted_forbidden_plate:function(){ - http_util.list_deleted_forbidden_plate(function(res){ + + list_deleted_forbidden_plate: function() { + http_util.list_deleted_forbidden_plate(function(res) { res = JSON.parse(res); - if(res.code==0){ + if (res.code == 0) { app.deleted_forbidden_buy_plates = res.data; } }); - + }, - - - - - - delete_forbidden_buy_plate:function(plate){ - http_util.delete_forbidden_plate(plate, function(res){ + + + + + + delete_forbidden_buy_plate: function(plate) { + http_util.delete_forbidden_plate(plate, function(res) { res = JSON.parse(res); - if(res.code==0){ + if (res.code == 0) { layer.msg("绉婚櫎鎴愬姛"); app.list_forbidden_buy_plates() - }else{ + } else { layer.msg(res.msg); } }); - + }, - add_forbidden_buy_plate:function(plate){ - http_util.forbidden_plate(plate, function(res){ + add_forbidden_buy_plate: function(plate) { + http_util.forbidden_plate(plate, function(res) { res = JSON.parse(res); - if(res.code==0){ + if (res.code == 0) { layer.msg("娣诲姞鎴愬姛"); app.list_forbidden_buy_plates() - }else{ + } else { layer.msg(res.msg); } }); - + }, - get_all_special_codes:function(){ - http_util.get_all_special_codes(function(res){ + get_all_special_codes: function() { + http_util.get_all_special_codes(function(res) { res = JSON.parse(res); - if(res.code==0){ + if (res.code == 0) { app.code_special_blocks = res.data; - }else{ + } else { layer.msg(res.msg); } }); }, - get_new_blocks_special_codes:function(){ - http_util.get_new_blocks_special_codes(function(res){ + get_new_blocks_special_codes: function() { + http_util.get_new_blocks_special_codes(function(res) { res = JSON.parse(res); - if(res.code==0){ + if (res.code == 0) { app.new_block_code_special_blocks = res.data; - }else{ + } else { layer.msg(res.msg); } }); }, - edit_total_big_order_threshold:function(){ + edit_total_big_order_threshold: function() { // 缂栬緫鎬诲ぇ鍗� - let threshold_money =app.big_order_deal_info[2][4]? app.big_order_deal_info[2][4] : app.big_order_deal_info[2][2]; + let threshold_money = app.big_order_deal_info[2][4] ? app.big_order_deal_info[2] + [4] : app.big_order_deal_info[2][2]; var threshold_money_number = 0; - if(threshold_money.indexOf("涓�")>=0){ - threshold_money_number = (parseFloat(threshold_money.replace("涓�",""))/10000).toFixed(2) - }else if(threshold_money.indexOf("浜�")>=0){ - threshold_money_number = (parseFloat(threshold_money.replace("浜�",""))).toFixed(2) - } - - layer.prompt({ - title: '淇敼绱澶у崟鎴愪氦闃堝�硷紙鍗曚綅锛氫嚎锛夊師鍊硷細'+app.big_order_deal_info[2][3] - ,formType: 0, //杈撳叆妗嗙被鍨嬶紝鏀寔0锛堟枃鏈級榛樿1锛堝瘑鐮侊級2锛堝琛屾枃鏈級 - value: threshold_money_number, //鍒濆鏃剁殑鍊硷紝榛樿绌哄瓧绗� - maxlength: 20, //鍙緭鍏ユ枃鏈殑鏈�澶ч暱搴︼紝榛樿500 - area: ['200px', '150px'] //鑷畾涔夋枃鏈煙瀹介珮 - },function(val, index){ - // 鍙湁褰撶偣鍑荤‘璁ゆ椂鎵嶄細鎵ц杩欓噷 - if(isNaN(val)){ + if (threshold_money.indexOf("涓�") >= 0) { + threshold_money_number = (parseFloat(threshold_money.replace("涓�", "")) / + 10000).toFixed(2) + } else if (threshold_money.indexOf("浜�") >= 0) { + threshold_money_number = (parseFloat(threshold_money.replace("浜�", ""))) + .toFixed(2) + } + + let prompt_index = layer.prompt({ + title: '淇敼绱澶у崟鎴愪氦闃堝�硷紙鍗曚綅锛氫嚎锛夊師鍊硷細' + app.big_order_deal_info[2][3], + formType: 0, //杈撳叆妗嗙被鍨嬶紝鏀寔0锛堟枃鏈級榛樿1锛堝瘑鐮侊級2锛堝琛屾枃鏈級 + value: threshold_money_number, //鍒濆鏃剁殑鍊硷紝榛樿绌哄瓧绗� + maxlength: 20, //鍙緭鍏ユ枃鏈殑鏈�澶ч暱搴︼紝榛樿500 + area: ['200px', '150px'], //鑷畾涔夋枃鏈煙瀹介珮 + success: function(layero, index) { + $(layero).on('keydown', function(e) { + if (e.keyCode === 13) { + // 缁戝畾enter + var val = $('.layui-layer-input').val(); + if (isNaN(val)) { + layer.msg("杈撳叆鏍煎紡鏈夎") + return; + } + let money = parseFloat(val).toFixed(2) * + 100000000 + http_util + .set_total_deal_big_order_threshold_money( + app.code, money, + function(res) { + if (res.code != 0) { + layer.msg(res.msg) + return; + } + layer.msg("淇敼鎴愬姛") + layer.close(prompt_index) // 鍏抽棴褰撳墠寮圭獥 + app.get_big_order_deal_info(app + .code); + setTimeout(function(){ + app.get_l2_subscript_codes(); + },100); + + }); + } + }); + } + }, function(val, index) { + // 鍙湁褰撶偣鍑荤‘璁ゆ椂鎵嶄細鎵ц杩欓噷 + if (isNaN(val)) { layer.msg("杈撳叆鏍煎紡鏈夎") return; } - let money = parseFloat(val).toFixed(2)*100000000 - http_util.set_total_deal_big_order_threshold_money(app.code, money, function(res){ - if(res.code!=0){ - layer.msg(res.msg) - return; - } - layer.msg("淇敼鎴愬姛") - layer.close(index)// 鍏抽棴褰撳墠寮圭獥 - app.get_big_order_deal_info(app.code); - }); + let money = parseFloat(val).toFixed(2) * 100000000 + http_util.set_total_deal_big_order_threshold_money(app.code, money, + function(res) { + if (res.code != 0) { + layer.msg(res.msg) + return; + } + layer.msg("淇敼鎴愬姛") + layer.close(index) // 鍏抽棴褰撳墠寮圭獥 + app.get_big_order_deal_info(app.code); + }); }) - - + + // layer.open({ // type: 0, // title:'淇敼澶у崟闃堝��', @@ -1300,44 +1352,43 @@ // // 楠岃瘉閫氳繃鍚庣殑鍥炶皟 // alert("123"); // } - + // }); - + }, - check_low_suction_white_plate:function(event, plate) - { - if(event.target.checked){ + check_low_suction_white_plate: function(event, plate) { + if (event.target.checked) { this.add_low_suction_white_plate(plate); - }else{ + } else { this.remove_low_suction_white_plate(plate); } }, - add_low_suction_white_plate:function(plate){ + add_low_suction_white_plate: function(plate) { // 娣诲姞浣庡惛鐧藉悕鍗� http_util_of_ls.add_plate_white_list(plate, function(res) { console.log("娣诲姞浣庡惛鐧藉悕鍗曪細", res); if (res.code == 0) { layer.msg("娣诲姞鎴愬姛") app.list_low_suction_white_plate() - }else{ + } else { layer.msg(res.msg) } }); }, - remove_low_suction_white_plate:function(plate){ + remove_low_suction_white_plate: function(plate) { // 娣诲姞浣庡惛鐧藉悕鍗� http_util_of_ls.delete_plate_white_list(plate, function(res) { console.log("鍒犻櫎浣庡惛鐧藉悕鍗曪細", res); if (res.code == 0) { layer.msg("鍒犻櫎鎴愬姛") app.list_low_suction_white_plate() - }else{ + } else { layer.msg(res.msg) } }); }, - - list_low_suction_white_plate:function(plate){ + + list_low_suction_white_plate: function(plate) { // 娣诲姞浣庡惛鐧藉悕鍗� http_util_of_ls.get_plate_white_list(function(res) { console.log("浣庡惛鐧藉悕鍗曞垪琛細", res); @@ -1346,27 +1397,35 @@ } }); }, - - get_low_suction_place_order_records:function(){ - http_util_of_ls.get_place_order_records(function(res){ + + get_low_suction_place_order_records: function() { + http_util_of_ls.get_place_order_records(function(res) { console.log("浣庡惛涓嬪崟璁板綍", JSON.stringify(res.data)) - if(res.code==0){ + if (res.code == 0) { app.low_suction_place_order_records = res.data; } }); + }, + get_low_suction_plates: function() { + http_util_of_ls.get_can_buy_plates(function(res) { + console.log("浣庡惛閲忓寲鏉垮潡", JSON.stringify(res.data)) + if (res.code == 0) { + app.low_suction_plates = res.data; + } + }); } - - - - - - - - } + + + + + + + + } }); } - function init_data() { + function init_data() { app.get_all_special_codes(); app.get_new_blocks_special_codes(); app.get_block_in_money_data(app.in_money_type); @@ -1376,7 +1435,8 @@ app.statistic_latest_limit_up_block(""); app.list_forbidden_buy_plates(); app.list_low_suction_white_plate(); - + app.get_low_suction_place_order_records(); + } $(".market .child-title").click(function() { -- Gitblit v1.8.0