sbd-npm 1.3.79 → 1.3.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/stock_basics.js +19 -13
package/package.json
CHANGED
package/stock_basics.js
CHANGED
@@ -1142,12 +1142,14 @@ let Stock = {
|
|
1142
1142
|
"caption": "none",
|
1143
1143
|
"head_cols": [
|
1144
1144
|
{"name": "日期", "class": "info", "table_sort": 1},
|
1145
|
-
{"name": "融资余额", "table_sort": 1},
|
1146
|
-
{"name": "融资余额增值", "table_sort": 1, "title": "
|
1145
|
+
{"name": "融资余额", "table_sort": 1, "title": "本日融资余额 = 前日融资余额 + 本日融资买入额 - 本日融资偿还额"},
|
1146
|
+
{"name": "融资余额增值", "table_sort": 1, "title": "当天融资余额跟前一天融资余额的差值,即`本日融资买入额` - `本日融资偿还额`"},
|
1147
1147
|
{"name": "融资买入额", "table_sort": 1},
|
1148
|
-
{"name": "融资偿还额", "table_sort": 1},
|
1149
|
-
{"name": "融券余额", "table_sort": 1},
|
1150
|
-
{"name": "融券余量", "table_sort": 1},
|
1148
|
+
{"name": "融资偿还额", "table_sort": 1, "title": "本日融资偿还额 = 本日直接还款额 + 本日卖券还款额 + 本日融资强制平仓额 + 本日融资正权益调整 - 本日融资负权益调整"},
|
1149
|
+
{"name": "融券余额", "table_sort": 1, "title": "本日融资融券余额 = 本日融资余额 + 本日融券余量金额"},
|
1150
|
+
{"name": "融券余量", "table_sort": 1, "title": "本日融券余量 = 前日融券余量 + 本日融券卖出数量 - 本日融券偿还量"},
|
1151
|
+
{"name": "收盘价", "table_sort": 1},
|
1152
|
+
{"name": "涨跌", "table_sort": 1},
|
1151
1153
|
]
|
1152
1154
|
});
|
1153
1155
|
Util.post("/stock/" + Stock["code"], {action: "margin_detail"}, function (j) {
|
@@ -1170,18 +1172,22 @@ let Stock = {
|
|
1170
1172
|
_html.push("<td title='", item["rzche"], "' data-val='", item["rzche"], "'>", Util.to_unit(item["rzche"], 3), "</td>");
|
1171
1173
|
_html.push("<td title='", item["rqye"], "' data-val='", item["rqye"], "'>", (item["rqye"] > 0 ? Util.to_unit(item["rqye"], 3) : "--"), "</td>");
|
1172
1174
|
_html.push("<td title='", item["rqyl"], "' data-val='", item["rqyl"], "'>", Util.to_unit(item["rqyl"], 3), "</td>");
|
1175
|
+
let text_color = Util.text_color(item["p_change"]);
|
1176
|
+
_html.push("<td><b class='", text_color, "'>", item["close"], "</b></td>");
|
1177
|
+
item["p_change"] = item["p_change"] > 0 ? ("+" + Util.to_float(item["p_change"], 2)) : Util.to_float(item["p_change"], 2);
|
1178
|
+
_html.push("<td><b class='", text_color, "'>", item["p_change"], "%</b></td>");
|
1173
1179
|
_html.push("</tr>");
|
1174
1180
|
});
|
1175
1181
|
Util.render_table_html("margin_modal_body_body", _html);
|
1176
1182
|
if (j["data"].length > 1) {
|
1177
|
-
let margin_modal_summary = " (
|
1183
|
+
let margin_modal_summary = " [当前最新(" + Util.seconds_to_format(j["data"][0]["date"], "%Y-%m-%d") + ")的融资余额: <b class='text-info'>" + Util.to_unit(j["data"][0]["rzye"]) + "</b>";
|
1178
1184
|
let gap_rzye = j["data"][0]["rzye"] - j["data"][1]["rzye"];
|
1179
1185
|
if (gap_rzye > 0) {
|
1180
|
-
margin_modal_summary += "
|
1186
|
+
margin_modal_summary += ",相对于前一天余额增加 <b class='text-danger'>+" + Util.to_unit(gap_rzye) + "</b>";
|
1181
1187
|
} else if (gap_rzye < 0) {
|
1182
|
-
margin_modal_summary += "
|
1188
|
+
margin_modal_summary += ",相对于前一天余额减少 <b class='text-success'>" + Util.to_unit(gap_rzye) + "</b>";
|
1183
1189
|
}
|
1184
|
-
margin_modal_summary += "
|
1190
|
+
margin_modal_summary += "]";
|
1185
1191
|
$("#margin_modal_summary").html(margin_modal_summary);
|
1186
1192
|
}
|
1187
1193
|
Util.hide_tips();
|
@@ -1287,14 +1293,14 @@ let Stock = {
|
|
1287
1293
|
_html.push("</tr>");
|
1288
1294
|
});
|
1289
1295
|
if (j["data"].length > 1) {
|
1290
|
-
let hkex_holding_modal_summary = " (
|
1296
|
+
let hkex_holding_modal_summary = " [当前最新(" + Util.seconds_to_format(j["data"][0]["date"], "%Y-%m-%d") + ")的持股比例: <b class='text-info'>" + j["data"][0]["ratio"] + "%</b>";
|
1291
1297
|
let gap_volume = j["data"][0]["volume"] - j["data"][1]["volume"];
|
1292
1298
|
if (gap_volume > 0) {
|
1293
|
-
hkex_holding_modal_summary += "
|
1299
|
+
hkex_holding_modal_summary += ",相对于前一天持股增加 <b class='text-danger'>+" + Util.to_ten_thousand(gap_volume) + "万股</b>";
|
1294
1300
|
} else if (gap_volume < 0) {
|
1295
|
-
hkex_holding_modal_summary += "
|
1301
|
+
hkex_holding_modal_summary += ",相对于前一天持股减少 <b class='text-success'>" + Util.to_ten_thousand(gap_volume) + "万股</b>";
|
1296
1302
|
}
|
1297
|
-
hkex_holding_modal_summary += "
|
1303
|
+
hkex_holding_modal_summary += "]";
|
1298
1304
|
$("#hkex_holding_modal_summary").html(hkex_holding_modal_summary);
|
1299
1305
|
}
|
1300
1306
|
Util.render_table_html("hkex_holding_modal_body_body", _html);
|