|
|
@@ -777,46 +777,11 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
toChinesNum(num) {
|
|
|
- if (num == 1500000) {
|
|
|
- return 150 + '万'
|
|
|
- }
|
|
|
- let changeNum = ["零", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
|
- let unit = ["", "0", "00", "000", "0000"];
|
|
|
num = parseInt(num);
|
|
|
- let getWan = (temp) => {
|
|
|
- let strArr = temp.toString().split("").reverse();
|
|
|
- let newNum = "";
|
|
|
- let newArr = [];
|
|
|
- strArr.forEach((item, index) => {
|
|
|
- newArr.unshift(
|
|
|
- item === "0" ? changeNum[item] : changeNum[item] + unit[index]
|
|
|
- );
|
|
|
- });
|
|
|
- let numArr = [];
|
|
|
- newArr.forEach((m, n) => {
|
|
|
- if (m !== "零") numArr.push(n);
|
|
|
- });
|
|
|
- if (newArr.length > 1) {
|
|
|
- newArr.forEach((m, n) => {
|
|
|
- if (newArr[newArr.length - 1] === "零") {
|
|
|
- if (n <= numArr[numArr.length - 1]) {
|
|
|
- newNum += m;
|
|
|
- }
|
|
|
- } else {
|
|
|
- newNum += m;
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- newNum = newArr[0];
|
|
|
- }
|
|
|
- return newNum;
|
|
|
- };
|
|
|
- let overWan = Math.floor(num / 10000);
|
|
|
- let noWan = num % 10000;
|
|
|
- if (noWan.toString().length < 4) {
|
|
|
- noWan = "0" + noWan;
|
|
|
+ if (num >= 10000) {
|
|
|
+ return (num / 10000) + '万';
|
|
|
}
|
|
|
- return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
|
|
|
+ return num.toString();
|
|
|
},
|
|
|
//联级选择器触发事件
|
|
|
handleChange(val) {
|
|
|
@@ -2446,4 +2411,4 @@ export default {
|
|
|
/deep/.el-table .el-table__row.blue-row:hover{
|
|
|
color: #000;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|