|
@@ -87,3 +87,18 @@ Vue.filter('num', function (value) {
|
|
|
export function uppercaseFirst(string) {
|
|
|
return string.charAt(0).toUpperCase() + string.slice(1)
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/** 大额数字单位换算 */
|
|
|
+ export function getNum(num) {
|
|
|
+ num = Number(num);
|
|
|
+ if (!num) return '0.00';
|
|
|
+ if (num > 10000 || num < -10000) {
|
|
|
+ const moneys = num / 10000
|
|
|
+ const realVal = parseFloat(moneys).toFixed(2);
|
|
|
+ return realVal + "万"
|
|
|
+ } else {
|
|
|
+ return num.toFixed(2)
|
|
|
+ }
|
|
|
+}
|