contract.js 99.4 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001
import React, { PropTypes } from 'react';
import * as types from '../constants/ActionTypes';
import { SubmissionError, change, submit } from 'redux-form';
import { message, notification } from 'antd';

import {
	getOrderFormList, getContractList, renew, getContractDetail, getOptRecordList, getAccountSetList, accountManage, getInoviceNum, getCancelNum, getBillNum
	, getBillList, createServiceContract, getNoContractList, getBillDetail, importBill, buildOrBlockBill, applyInvoice, getBillApplyRecordList, getApplyRecordList,
	getInvoiceList, getServerProjectList, getLegalEntityList, createAccount, getCancelBillList, toServiceCancel, getBillRunWaterList, exportOtherPay, getBillCancelRecordList
	, cancelBill, cancelWater, getCancelDetailList, getAccountInvoiceInfoList, getInvoice, sureSignInvoice, sureSendInvoice, returnInvoice, sureMakeInvoice,
	importWater, getBillDetailsList, updateBillOhterPay, delBillOhterPay, getReturnReason, getAccountDetails, updateAccount, updateContract, updateData, getPayerLegalList
	, getReceivableList, getDownPic, exportContract, getPayObjectsList, getSplitDetail, getAuditor, paySplit, checkSplit, surePay, payApply, getAccountManageList,
	getAccountNum, getWithDrawManageList, remitOpt, buildRemitBatch, getRemitBatchList, remitBatchOpt, remitSuccessImport, getMoneyByIds, billMergeImport, getInvoiceIdsList,
	getInvoiceDetail, invoiceRecordlist, getInvoiceRecord, getMakeInvoiceRecord, getWaterBillList, getBillCancelDetailList, getAccountSetRecordList, getAgreementManageList,
	agreementOpt, createAgreement, getConfirmAgreementStaffDetailsUtil, getAgreementDetails, updateAgreement, getPayProgressList, getTaskList, getBatchMathId, batchAssign, batchAssignImport,
	createSingleTask, freedomEmployeeImportDel, getLogList, batchAddTask, batchAssignFreelance, getFreedomJobList, batchTaskImport, getFreelanceList, getAssignList,
	batchFreelanceImport, freedomTaskImportDel, delTask, handlecreateBill, getLaborPoolDataList, addTask, assignEmps, getAssignFreelanceList, getMonthList,
	waterImport, getImportFailList, suerImportWater, getImportCancelBillList, importTask, getAccountManageNum, getBillCostSplitList, getSplitedList, getCanSplitedList,
	paySplitUpdate, batchStartPay, getDownLoadIDCard, importPrint, updateMobile, delTasker, getApplyList, getTenantType, laborPoolExportUtil, sureEmailInvoice,
	getOpenManageList, batchSetCustom, openManageExport, openOpt, changeName, openInfoDetail, importIndividual, importIndustrial, delIndustrial, updateOpenOpt,
	individualDown, cancelOpt, loadIndividualInvoice, registerInvoice, invoiceExport, exportInvoice, exportInvoiceSure, getOpenOptRecordList, getFailReason, getSocialTotal,
	contractExport, getServerIsCheck, getTaskDetailsList, batchGrant, exportTaskDetails, batchPositionExport, batchExportSure, updateLoginMobile, updateOrderMobile,
	getAsSetting, AsSet, getASYear, optAs, getRelevancePosition, getAccountIsExist, getTaskTypeList, contractImport, contractImportSure, setLabor, getPartyBLengalEntity,
	checkHrSendTask, batchResultImport, batchExportWaterSure, getMinishopListUtil, addMinishopUtil, editMinishopUtil, loadDownLoadBankCardUtil, printBillUtil, deleteBillUtil,
	delSplitDetail, paySplitTwo, getBusinessType, getServiceProject, getFeeProject, getFeeProjectCode, getPackageList, addPosition,getContractBaseInfo,
	contractPositionImport,addProtocol,contractPackage,getContractProjectInfo,getPolicyAreaList,getPackageAgreeList,renewContract,getRelationContractList,
	getServiceNormalName,cancelContract,approval

} from '../../utils/contractUtil';
import { splitQuery } from '../../utils/commonUtils';
import { NotificationIcon } from '../../utils/comonOtherUtil';
import { downloadFileByUrl } from '../../utils/fileUtil';

//接单表列表
export function loadOrderFormList(params) {
	return dispatch => {
		return getOrderFormList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_ORDER_FORM_LIST,
					orderFormList: data
				});
				dispatch(change('social_order', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//服务合同列表
export function loadContractList(params) {
	return dispatch => {
		return getContractList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_CONTRACT_LIST,
					contractList: data
				});
				dispatch(change('search_list_custom', 'total_count', total_count));
				return data;
			})
			.catch(err => { throw err; });
	};
}
//续签
export function renewAction(params) {
	return dispatch => {
		return renew(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '续签失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '合同续签成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
//查看合同详情
export function loadContractDetail(params) {
	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return getContractDetail(params)
			.then(data => {
				dispatch({ type: 'MASK_SHOW', maskShow: false });
				dispatch({
					type: types.LOAD_CONTRACT_DETAIL,
					contractDetail: data
				});
				return data;
			})
			.catch(err => { throw err; });
	};
}
//操作记录列表
export function loadOptRecordList(params, id) {
	return dispatch => {
		return getOptRecordList(params, id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_OPT_RECORD_LIST,
					optRecordList: data
				});
				dispatch(change('opt_record_list_custom', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//账套管理列表
export function loadAccountSetList(params) {
	return dispatch => {
		return getAccountSetList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_ACCOUNT_SET_LIST,
					accountSetList: data
				});
				dispatch(change('search_list_custom', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//账套管理停用/启用
export function accountManageAction(id, action) {
	return dispatch => {
		return accountManage(id, action)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操纵失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//开票信息统计
export function getInoviceNumAction(params) {
	return dispatch => {
		return getInoviceNum(params)
			.then(data => {
				dispatch({
					type: types.LOAD_INVOICE_NUM_TOTAL,
					invoiceNumTotal: data
				});
			})
			.catch(err => { throw err; });
	};
}
//待核销认领流水统计
export function getCancelNumAction(params) {
	return dispatch => {
		return getCancelNum(params)
			.then(data => {
				dispatch({
					type: types.LOAD_CANCEL_NUM,
					cancelNumTotal: data
				});
			})
			.catch(err => { throw err; });
	};
}
//各状态账单统计
export function getBillNumAction(params) {
	return dispatch => {
		return getBillNum(params)
			.then(data => {
				dispatch({
					type: types.LOAD_BILL_NUM_TOTAL,
					billNumTotal: data
				});
			})
			.catch(err => { throw err; });
	};
}
//账单列表
export function loadBillListAction(params) {
	return dispatch => {
		return getBillList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_BILL_LIST,
					billList: data
				});
				dispatch(change('bill_manage_info', 'total_count', total_count));
				// dispatch(change('bill_manage_info_cancel', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//创建合同
export function createContractAction(params) {
	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return createServiceContract(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '合同创建失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { throw err; dispatch({ type: 'MASK_SHOW', maskShow: false }); });
	}
}
//无账套结算费用列表
export function loadNoContractList(params) {
	return dispatch => {
		return getNoContractList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_NO_CONTRACT_LIST,
					noContractList: data
				});
				dispatch(change('search_list_custom', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//账单详情
export function loadBillDetailAction(params) {
	return dispatch => {
		return getBillDetail(params)
			.then(data => {
				dispatch({
					type: types.LOAD_BILL_DETAIL,
					billDetail: data
				});
				return data;
			})
			.catch(err => { throw err; });
	};
}
//账单拆分详情
export function loadBillSplitDetailAction(params) {
	return dispatch => {
		return getSplitBillDetail(params)
			.then(data => {
				dispatch({
					type: types.LOAD_SPLIT_BILL_DETAIL,
					splitBillDetail: data
				});
				return data;
			})
			.catch(err => { throw err; });
	};
}
//导出账单
export function importBillAction(id) {
	return dispatch => {
		return importBill(id).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '账单导出失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '账单导出成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
//生成/锁定/账单
export function buildOrBlockBillAction(id, params) {
	return dispatch => {
		return buildOrBlockBill(id, params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '操作失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
//申请发票
export function applyInvoiceAction(params) {
	return dispatch => {
		return applyInvoice(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '操作失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
//查看账单申请发票记录
export function loadBillApplyRecordList(params) {
	return dispatch => {
		return getBillApplyRecordList(params)
			.then(data => {
				const { items = [] } = data;
				dispatch({
					type: types.LOAD_BILL_APPLY_RECORD_LIST,
					billApplyRecordList: data
				});
				// dispatch(change('make_invoice_record', 'total_count', data.items.length));
			})
			.catch(err => { throw err; });
	};
}
//操作记录/开票记录
export function loadApplyRecordList(id) {
	return dispatch => {
		return getApplyRecordList(id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_APPLY_RECORD_LIST,
					applyRecordList: data
				});
				dispatch(change('make_out_invoice_record', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//核销账单列表
export function loadCancelBillList(params) {
	return dispatch => {
		return getCancelBillList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_CANCEL_BILL_LIST,
					cancelBillList: data
				});
				dispatch(change('search_list_custom', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}

//开票信息列表
export function loadInvoiceList(params) {
	return dispatch => {
		return getInvoiceList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_INVOICE_LIST,
					invoiceList: data
				});
				dispatch(change('search_list_custom', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
// 创建账套时合同和服务项目列表
export function loadServerProjectList(id) {
	return dispatch => {
		return getServerProjectList(id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_SERVER_PROJECT_LIST,
					serverProjectList: data
				});
				dispatch(change('search_list_custom', 'total_count', total_count));
				data && data.items && data.items.length > 0 && data.items.map((items, index) => {
					items.service_contents && items.service_contents.length > 0 && items.service_contents.map((list, i) => {
						list.isChecked = false;
					})
				});
				return data;
			})
			.catch(err => { throw err; });
	};
}
//生成账套
export function createAccountAction(params) {
	return dispatch => {
		return createAccount(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '操作失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
//转客服核销流水
export function toServiceCancelAction(id) {
	return dispatch => {
		return toServiceCancel(id).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '操作失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
// 流水列表
export function loadBillRunWaterList(id) {
	return dispatch => {
		return getBillRunWaterList(id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_BILL_RUN_WATER_LIST,
					billRunWaterList: data
				});
				// dispatch(change('bill_manage_info', 'total_count', total_count));
				dispatch(change('bill_manage_info_cancel', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//其他费用导入
export function exportOtherPayAction(id, url_obj) {
	return dispatch => {
		return exportOtherPay(id, url_obj).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '账单导入失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '账单导入成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
//查看账单核销记录
export function loadBillCancelRecordList(id) {
	return dispatch => {
		return getBillCancelRecordList(id)
			.then(data => {
				dispatch({
					type: types.LOAD_BILL_CANCEL_RECORD_LIST,
					billCancelRecordList: data
				});
			})
			.catch(err => { throw err; });
	};
}
//核销账单
export function cancelBillAction(id, url_obj) {
	return dispatch => {
		return cancelBill(id, url_obj).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '核销失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '核销成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
//核销流水
export function cancelWaterAction(id, url_obj) {
	return dispatch => {
		return cancelWater(id, url_obj).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '核销失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '核销成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
// 核销明细列表
export function loadCancelDetailList(id) {
	return dispatch => {
		return getCancelDetailList(id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_CANCEL_DETAIL_LIST,
					cancelDetailList: data
				});
				dispatch(change('water_cancel_list', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//  获取账套的发票信息 
export function loadAccountInvoiceInfoList(id) {
	return dispatch => {
		return getAccountInvoiceInfoList(id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_ACCOUNT_INVOICE_INFO_LIST,
					accountInvoiceInfoList: data
				});
				return data;
			})
			.catch(err => { throw err; });
	};
}
//领取发票
export function getInvoiceAction(id, params) {
	return dispatch => {
		return getInvoice(id, params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操纵失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//确认签收发票
export function sureSignInvoiceAction(id, params) {
	return dispatch => {
		return sureSignInvoice(id, params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操纵失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//邮寄发票
export function sureSendInvoiceAction(id, params) {
	return dispatch => {
		return sureSendInvoice(id, params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操纵失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//确认发送
export function sureEmailInvoiceAction(id, params) {
	return dispatch => {
		return sureEmailInvoice(id, params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操纵失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//驳回发票
export function returnInvoiceAction(id, params) {
	return dispatch => {
		return returnInvoice(id, params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操纵失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//确认开票
export function sureMakeInvoiceAction(id, params) {
	return dispatch => {
		return sureMakeInvoice(id, params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操纵失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//导入流水
export function importWaterAction(params) {
	return dispatch => {
		return importWater(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '修改失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {

				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//获取账单社保公积金/工资个税/其他费用/补养明细
export function loadBillDetailsList(id, params) {
	return dispatch => {
		return getBillDetailsList(id, params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_BILL_DETAILS_LIST,
					billDetailsList: data
				});
				dispatch(change('bill_details_form', 'total_count', total_count));
				return data;
			})
			.catch(err => { throw err; });
	};
}
//更新账单其他费用
export function updateBillOhterPayAction(id, params) {
	return dispatch => {
		return updateBillOhterPay(id, params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '修改失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '修改成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//删除账单其他费用
export function delBillOhterPayAction(id) {
	return dispatch => {
		return delBillOhterPay(id)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '删除失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '删除成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//获取发票驳回信息
export function loadReturnReason(id) {
	return dispatch => {
		return getReturnReason(id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.RETURN_REASON,
					returnInfos: data
				});
				return data;
			})
			.catch(err => { throw err; });
	};
}
//获取账套详情
export function loadAccountDetails(id) {
	return dispatch => {
		return getAccountDetails(id)
			.then(data => {

				dispatch({
					type: types.ACCOUNT_DETAILS,
					accountDetails: data
				});
				return data;
			})
			.catch(err => { throw err; });
	};
}
//修改账套
export function updateAccountAction(id, params) {
	return dispatch => {
		return updateAccount(id, params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '操作失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
//更新合同
export function updateContractAction(id, params) {
	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return updateContract(id, params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '合同更新失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '合同更新成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { throw err; dispatch({ type: 'MASK_SHOW', maskShow: false }); });
	}
}
//数据更新
export function updateDataAction(params) {
	return dispatch => {
		return updateData(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '数据更新失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '数据更新成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
// 打款方列表
export function loadPayerLegalList(id) {
	return dispatch => {
		return getPayerLegalList(id)
			.then(data => {
				const { value = [] } = data
				let items = [];
				if (value && value.length > 0) {
					value.map((list, i) => {
						items.push({
							id: list,
							name: list
						});
					});
				}
				dispatch({
					type: types.LOAD_PAYER_LEGAL_LIST,
					payerLegalList: items
				});
			})
			.catch(err => { throw err; });
	};
}
// 收款方列表
export function loadReceivableList(id) {
	return dispatch => {
		return getReceivableList(id)
			.then(data => {
				const { value = [] } = data
				let items = [];
				if (value && value.length > 0) {
					value.map((list, i) => {
						items.push({
							id: list,
							name: list
						});
					});
				}
				dispatch({
					type: types.LOAD_RECEIVABLE_LIST,
					receivableList: items
				});
			})
			.catch(err => { throw err; });
	};
}
//下载附件
export function loadDownPic(id) {
	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return getDownPic(id)
			.then(data => {
				const { download_path = '' } = data;
				if (download_path) {
					downloadFileByUrl(download_path);
				}
				dispatch({ type: 'MASK_SHOW', maskShow: false });
			})
			.catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err; });
	};
}
//发起支付申请
export function payApplyAction(id, params, action) {
	return dispatch => {
		return payApply(id, params, action)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操作有误,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//费用拆分
export function paySplitAction(params, action) {
	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return paySplit(params, action)
			.then(data => {
				dispatch({ type: 'MASK_SHOW', maskShow: false });
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操纵失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err; });
	};
}

//费用修改
export function paySplitUpdateAction(params, action) {
	return dispatch => {
		return paySplitUpdate(params, action)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操纵失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//应付管理 -- 确认/驳回
export function checkSplitAction(id, options) {
	return dispatch => {
		return checkSplit(id, options)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操纵失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//确认付款
export function surePayAction(action) {
	return dispatch => {
		return surePay(action)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '付款成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//获取所有支付对象
export function getPayObjectsListAction(id, action) {
	return dispatch => {
		return getPayObjectsList(id, action)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.GET_PAY_OBJECTS_LIST,
					payObjectsList: data
				});
				return data;
			})
			.catch(err => { throw err; });
	};
}
//应付管理统计
export function getAccountNumAction(params) {
	return dispatch => {
		return getAccountNum(params)
			.then(data => {
				dispatch({
					type: types.LOAD_ACCOUNT_NUM,
					accountNumTotal: data
				});
			})
			.catch(err => { throw err; });
	};
}
//应付管理列表
export function loadAccountManageListAction(params) {
	return dispatch => {
		return getAccountManageList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_ACCOUNT_MANAGE_LIST,
					accountManageList: data
				});
				dispatch(change('account_manage', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//费用拆分详情
export function loadSplitDetailAction(id) {
	return dispatch => {
		return getSplitDetail(id)
			.then(data => {
				dispatch({
					type: types.LOAD_SPLIT_DETAIL,
					splitDetail: data
				});
				return data;
			})
			.catch(err => { throw err; });
	};
}
//获取一二级审核人
export function loadAuditorAction(id) {
	return dispatch => {
		return getAuditor(id)
			.then(data => {
				dispatch({
					type: types.LOAD_AUDITOR,
					auditorItems: data
				});
				return data;
			})
			.catch(err => { throw err; });
	};
}
//服务合同导入
export function exportContractAction(url_obj) {
	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return exportContract(url_obj).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '服务合同导入失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '服务合同导入成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { throw err });
	}
}
//提现管理(待打款、打款中、打款成功)列表
export function loadwithDrawManageListAction(params) {
	return dispatch => {
		return getWithDrawManageList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_WITHDRAW_MANAGE_LIST,
					withDrawManageList: data
				});
				dispatch(change('withDraw_manage', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//提现管理(打款批次)列表
export function loadRemitBatchListAction(params) {
	return dispatch => {
		return getRemitBatchList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_REMIT_BATCH_LIST,
					remitBatchList: data
				});
				dispatch(change('remit_batch', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}

//打款操作
export function remitOptAction(action) {
	return dispatch => {
		return remitOpt(action)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操作失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//生成打款批次
export function buildRemitBatchAction(action) {
	return dispatch => {
		return buildRemitBatch(action)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操作失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//打款批次操作
export function remitBatchOptAction(id, action) {
	return dispatch => {
		return remitBatchOpt(id, action)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操作失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
					dispatch({
						type: types.IMPORT_REMIT_CYLES,
						remit_is_import: false
					});
				} else {
					if (data.errors && data.errors != '[]') {
						dispatch({
							type: types.IMPORT_REMIT_CYLES,
							remit_is_import: false
						});
					} else {
						dispatch({
							type: types.IMPORT_REMIT_CYLES,
							remit_is_import: true
						});
						notification.open({
							message: '成功',
							description: '操作成功',
							icon: <NotificationIcon type='success' />,
						});
					}

				}
				return data;
			})
			.catch(err => { throw err; });
	};
}

//打款成功导出
export function remitSuccessImportAction(params) {
	return dispatch => {
		return remitSuccessImport(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操作失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//创建批次返回的金额
export function getMoneyByIdsAction(params) {
	return dispatch => {
		return getMoneyByIds(params)
			.then(data => {
				return data;
			})
			.catch(err => { throw err; });
	};
}
//账单合并导出
export function billMergeImportAction(ids) {
	return dispatch => {
		return billMergeImport(ids).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: ',' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '账单导出成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
//获取账单下所有的发票模板id
export function loadInvoiceIdsAction(bill_id) {
	return dispatch => {
		return getInvoiceIdsList(bill_id)
			.then(data => {
				return data;
			})
			.catch(err => { throw err; });
	};
}
//查看账单发票模板详情
export function loadInvoiceDetailAction(bill_id, invoice_id) {
	return dispatch => {
		return getInvoiceDetail(bill_id, invoice_id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_INVOICE_DETAILS,
					invoiceDetailist: data
				});
				return data;
			})
			.catch(err => { throw err; });
	};
}
// 查看账单详情发票模板的发票实例
export function loadInvoiceRecordAction(bill_id, invoice_id) {
	return dispatch => {
		return getInvoiceRecord(bill_id, invoice_id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_INVOICE_RECORD_LIST,
					invoiceRecordlist: data
				});
			})
			.catch(err => { throw err; });
	};
}
// 查看账单详情发票模板的开票记录
export function loadMakeInvoiceRecordAction(bill_id, invoice_id) {
	return dispatch => {
		return getMakeInvoiceRecord(bill_id, invoice_id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_MAKE_INVOICE_RECORD_LIST,
					makeInvoiceRecordlist: data
				});
			})
			.catch(err => { throw err; });
	};
}
//核销流水页面筛选待核销账单详情
export function loadWaterBillListAction(params) {
	return dispatch => {
		return getWaterBillList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_WATER_BILL_LIST,
					waterBillList: data
				});
				dispatch(change('new_bill_manage_info', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
// 查看账单详情核销明细(原账单核销明细接口)
export function loadBillCancelDetailList(bill_id, id) {
	return dispatch => {
		return getBillCancelDetailList(bill_id, id)
			.then(data => {
				dispatch({
					type: types.LOAD_BILL_CANCEL_DETAIL_LIST,
					billCancelDetailList: data
				});
			})
			.catch(err => { throw err; });
	};
}
//账套 操作记录
export function loadAccountSetRecordList(params, id) {
	return dispatch => {
		return getAccountSetRecordList(params, id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_ACCOIUNT_SET_RECORD_LIST,
					accountSetRecordList: data
				});
				dispatch(change('make_account_set_record', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//协议管理列表
export function loadAgreementManageList(params, id) {
	return dispatch => {
		return getAgreementManageList(params, id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_AGREEMENT_MANAGE_LIST,
					agreemnetManageList: data
				});
				dispatch(change('agreement_manage_form', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//协议操作
export function agreementOptAction(params) {
	return dispatch => {
		return agreementOpt(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '协议操作失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '协议操作成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
//创建协议
export function createAgreementAction(ids) {
	return dispatch => {
		return createAgreement(ids).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '协议创建失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '协议创建成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}

//确认过协议人员明细
export function getConfirmAgreementStaffDetails(id, params) {
	return dispatch => {
		return getConfirmAgreementStaffDetailsUtil(id, params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.CONFIRM_AGREEMENT_STAFF_DETAILS,
					confirmAgreementStaffDetails: data
				});
				dispatch(change('search_agreement_staff_list_form', 'total_count', total_count));
				return data;
			})
			.catch(err => { throw err; });
	};
}

//协议详情
export function loadAgreementDetails(id) {
	return dispatch => {
		return getAgreementDetails(id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_AGREEMENT_DETAILS,
					agreementDetails: data
				});
				dispatch(change('agreement_manage_form', 'total_count', total_count));
				return data;
			})
			.catch(err => { throw err; });
	};
}
//修改协议
export function updateAgreementAction(params) {
	return dispatch => {
		return updateAgreement(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '协议修改失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '协议修改成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
//查看付款进度列表
export function loadPayProgressList(id) {
	return dispatch => {
		return getPayProgressList(id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_PAY_PROGRESS_LIST,
					payProgressList: data
				});
				dispatch(change('pay_progress_form', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//任务列表
export function loadTaskList(params, id) {
	return dispatch => {
		return getTaskList(params, id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_TASK_LIST,
					taskList: data
				});
				dispatch(change('task_assign_form', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//批量匹配-显示某条临时任务当前的人
export function loadFreedomJobsList(id) {
	return dispatch => {
		return getFreedomJobList(id)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				}
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_FREEDOM_JOBS_LIST,
					freedomJobsList: data
				});
				// dispatch(change('task_assign_form', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//生成批量匹配的id
export function loadBatchMatchId(params, id) {
	return dispatch => {
		return getBatchMathId(params, id)
			.then(data => {
				const { items = [], total_count } = data;

				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					return data;
				}

			})
			.catch(err => { throw err; });
	};
}
//批量指派的导入
export function batchAssignImportAction(params) {

	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return batchAssignImport(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '导入成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}
// 指派自由职业者的导入
export function batchFreelanceImportAction(params) {
	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return batchFreelanceImport(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '导入成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}
//批量任务的导入
export function batchTaskImportAction(params) {

	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return batchTaskImport(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '导入成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}
//批量指派-确认指派/取消
export function batchAssignAction(params) {

	return dispatch => {
		if (params.opt == 'sure') {
			dispatch({ type: 'MASK_SHOW', maskShow: true });
		}
		return batchAssign(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
				dispatch({ type: 'MASK_SHOW', maskShow: false });
			} else {
				if (params.opt == 'sure') {
					notification.open({
						message: '成功',
						description: '指派成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				dispatch({ type: 'MASK_SHOW', maskShow: false });
				return data;
			}


		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}
// 批量添加任务-确认发布/取消
export function batchAddTaskAction(params) {
	return dispatch => {

		return batchAddTask(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});

			} else {
				if (params.opt == 'sure') {
					notification.open({
						message: '成功',
						description: '指派成功',
						icon: <NotificationIcon type='success' />,
					});
					return data;
				}
			}
		}).catch(err => { throw err });
	}
}
// 指派自由职业者-确认指派/取消
export function batchAssignFreelanceAction(params) {
	return dispatch => {
		if (params.opt == 'sure') {
			dispatch({ type: 'MASK_SHOW', maskShow: true });
		}
		return batchAssignFreelance(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
				dispatch({ type: 'MASK_SHOW', maskShow: false });
			} else {
				if (params.opt == 'sure') {
					notification.open({
						message: '成功',
						description: '指派成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				dispatch({ type: 'MASK_SHOW', maskShow: false });
				return data;
			}

		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}
//创建单个任务
export function createSingleTaskAction(params) {
	return dispatch => {
		return createSingleTask(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '创建成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
// 自由职位者导入的删除
export function freedomEmployeeImportDelAction(params) {
	return dispatch => {
		return freedomEmployeeImportDel(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '删除成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
// 自由职位导入的删除
export function freedomTaskImportDelAction(params) {
	return dispatch => {
		return freedomTaskImportDel(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '删除成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
//日志列表
export function loadLogList(log_id) {
	return dispatch => {
		return getLogList(log_id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_LOG_LIST,
					logList: data
				});
				return data;
				dispatch(change('import_record', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}

//自由职业者列表
export function loadFreelanceList(params) {
	return dispatch => {
		return getFreelanceList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_FREELANCE_LIST,
					freelanceList: data
				});
				dispatch(change('new_bill_manage_info', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//查看指派列表
export function loadAssignList(params) {
	return dispatch => {
		return getAssignList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_ASSIGN_LIST,
					assignList: data
				});

				dispatch(change('taskDetail', 'total_count', total_count));
				return data;
			})
			.catch(err => { throw err; });
	};
}
//删除任务
export function delTaskAction(params) {
	return dispatch => {
		return delTask(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '任务删除成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}


export function loadhandlecreateBillAction(id, value) {
	return dispatch => {
		return handlecreateBill(id, value)
			.then(data => {
				if (data.code >= 300) {
					dispatch({
						type: types.CREATE_BILL_HANDLE,
						createBillMsg: data.message
					});
				} else {
					message.success('账单生成成功,请在“待生成账单”列表中查看')
					dispatch({
						type: types.CREATE_BILL_HANDLE,
						createBillMsg: ''
					});
				}
				dispatch({ type: 'MASK_SHOW', maskShow: false });
				return data;

			})
			.catch(err => { throw err; dispatch({ type: 'MASK_SHOW', maskShow: false }); });
	};
}

export function cleanCreateBillMsg() {
	return {
		type: types.CREATE_BILL_HANDLE,
		createBillMsg: ''
	}
}
//获取用工池列表
export function getLaborPoolDataListAction(params) {
	return dispatch => {
		return getLaborPoolDataList(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					const { items = [], total_count } = data;
					dispatch({
						type: types.LOAD_LABOR_POOL_DATA_LIST,
						laborPoolDataList: data
					});
					dispatch(change('pay_progress_forms', 'total_count', total_count));
				}

			})
			.catch(err => { throw err; });
	};
}

//添加任务
export function addTaskAction(params) {
	return dispatch => {
		return addTask(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '添加成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}

		}).catch(err => { throw err });
	}
}
// 指派自由职业者-现在自由职业之后传给我选择的id
export function assignEmpsAction(params) {
	return dispatch => {
		return assignEmps(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				return data;
			}

		}).catch(err => { throw err });
	}
}

//指派自由职业者-调用的接口
export function assignFreelanceList(params) {
	return dispatch => {
		return getAssignFreelanceList(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					return data;
				}
			})
			.catch(err => { throw err; });
	};
}
//获取待付款/已付款结算月份下拉列表
export function loadMonthListAction(params) {
	return dispatch => {
		return getMonthList(params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_MONTH_LIST,
					monthList: data
				});
			})
			.catch(err => { throw err; });
	};
}
//流水导入
export function waterImportAction(params) {

	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return waterImport(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '导入成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}
//查看某批次导入流水失败记录
export function loadImportFailList(log_id) {
	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return getImportFailList(log_id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_IMPORT_FAIL_LIST,
					importFailList: data
				});
				dispatch(change('import_fail_record', 'total_count', total_count));
				return data;

			})
			.catch(err => { throw err; });
	};
}
//确认导入流水
export function sureImportWaterAction(params) {

	return dispatch => {
		return suerImportWater(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_IMPORT_SUCCESS_LIST,
					importSuccessList: data
				});
				dispatch(change('import_success_record', 'total_count', total_count));
				return data;
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });

		}).catch(err => { throw err });
	}
}
// 查看某批次导入流水自动核销账单列表
export function loadImportCancelBillList(log_id) {
	return dispatch => {
		return getImportCancelBillList(log_id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_IMPORT_CANCEL_SUCCESS_LIST,
					importCancelSuccessList: data
				});
				return data;
			})
			.catch(err => { throw err; });
	};
}

// 任务导出
export function importTaskAction(params) {
	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return importTask(params).then(data => {
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
				dispatch({ type: 'MASK_SHOW', maskShow: false });
			} else {
				notification.open({
					message: '成功',
					description: '导出成功',
					icon: <NotificationIcon type='success' />,
				});
				dispatch({ type: 'MASK_SHOW', maskShow: false });
				return data;
			}

		}).catch(err => { throw err; dispatch({ type: 'MASK_SHOW', maskShow: false }); });
	}
}
//结算管理数据统计
export function getAccountManageNumAction(params) {
	return dispatch => {
		return getAccountManageNum(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					return data;
				}
			})
			.catch(err => { throw err; });
	};
}
// 账单费用拆分列表
export function loadBillCostSplitListAction(params) {
	return dispatch => {
		return getBillCostSplitList(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					const { items = [], total_count } = data;
					dispatch({
						type: types.LOAD_BILL_COST_SPLIT_LIST,
						billCostSplitList: data
					});
					dispatch(change('bill_cost_split_form', 'total_count', total_count));
					return data;
				}
			})
			.catch(err => { throw err; });
	};
}
// 已拆分费用项目列表
export function loadSplitedListAction(id) {
	return dispatch => {
		return getSplitedList(id)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					const { items = [], total_count } = data;
					dispatch({
						type: types.LOAD_SPLITED_LIST,
						splitedList: data
					});
					dispatch(change('splited_form', 'total_count', total_count));
					return data;
				}
			})
			.catch(err => { throw err; });
	};
}
// 账单可拆分费用项目列表
export function loadCanSpliteListAction(id) {
	return dispatch => {
		return getCanSplitedList(id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_CAN_SPLITED_LIST,
					canSplitedList: data
				});
				dispatch(change('can_splite_form', 'total_count', total_count));
				return data;
			})
			.catch(err => { throw err; });
	};
}
//批量发起付款申请
export function batchStartPayAction(id, action) {
	return dispatch => {
		return batchStartPay(id, action)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操纵失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
					return data;
				}

			})
			.catch(err => { throw err; });
	};
}
//简历库下载身份证
export function loadDownLoadIDCard(user_ids) {
	return dispatch => {
		return getDownLoadIDCard(user_ids)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操纵失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					const { path = '' } = data;
					if (path) {
						downloadFileByUrl(path);
					}
				}

			})
			.catch(err => { throw err; });
	};
}
//导出打印pdf
export function importPrintAction(id, action) {
	return dispatch => {
		return importPrint(id, action)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					const { path = '' } = data;
					if (path) {
						downloadFileByUrl(path);
					}
				}

			})
			.catch(err => { throw err; });
	};
}

//查看指派时-新增自由职业
export function updateMobileAction(params) {
	return dispatch => {
		return updateMobile(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else if (data.err) {
				notification.open({
					message: '错误',
					description: '' + data.err,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}

		}).catch(err => { throw err });
	}
}
//删除承揽者
export function delTaskerAction(params) {
	return dispatch => {
		return delTasker(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '删除成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}

		}).catch(err => { throw err });
	}
}

// 承揽者列表
export function loadApplyList() {
	return dispatch => {
		return getApplyList()
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_APPLY_LIST,
					applyList: data
				});
				return data;
			})
			.catch(err => { throw err; });
	};
}
// 获取机构类型
export function loadTenantType() {
	return dispatch => {
		return getTenantType()
			.then(data => {
				const { items = [], total_count } = data;
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					dispatch({
						type: types.GETTENANTTYPE,
						TenantType: data
					});
					return data;
				}
			})

			.catch(err => { throw err; });
	};
}

// 用工池导出
export function laborPoolExport(params) {
	return dispatch => {
		return laborPoolExportUtil(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					})
				} else {
					downloadFileByUrl(data.path)
				}
			})
			.catch(err => { throw err })
	}
}

//开户管理列表
export function loadOpenManageList(params, id) {
	return dispatch => {
		return getOpenManageList(params, id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_OPEN_MANAGE_LIST,
					openManageList: data
				});
				dispatch(change('open_manage_form', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}

//批量设置归属客户
export function batchSetCustomAction(params) {
	return dispatch => {
		return batchSetCustom(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '设置成功',
						icon: <NotificationIcon type='success' />,
					});
					return data;
				}
			})
			.catch(err => { throw err; });
	};
}
// 开户管理导出
export function openManageExportAction(params) {
	return dispatch => {
		return openManageExport(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					})
				} else {
					downloadFileByUrl(data.path)
				}
			})
			.catch(err => { throw err })
	}
}
// 开户操作(成功/失败)
export function openOptAction(id, params) {
	return dispatch => {
		return openOpt(id, params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					})
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
					return data;
				}
			})
			.catch(err => { throw err })
	}
}
// 更改个体工商户开户信息
export function updateOpenOptAction(id, params) {
	return dispatch => {
		return updateOpenOpt(id, params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					})
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
					return data;
				}
			})
			.catch(err => { throw err })
	}
}
// 更改个体工商户名字(自动/手动)
export function changeNameAction(id, params) {
	return dispatch => {
		return changeName(id, params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					})
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
					return data;
				}
			})
			.catch(err => { throw err })
	}
}
//查看个体工商户开户信息
export function openInfoDetailAction(params) {
	return dispatch => {
		return openInfoDetail(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					return data;
				}
			})
			.catch(err => { throw err; });
	};
}
// 临时导入个体工商户
export function importIndividualAction(params) {

	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return importIndividual(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '导入成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}
// 确认导入临时导入的个体工商户
export function importIndustrialAction(params) {
	return dispatch => {
		return importIndustrial(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});

			} else {
				notification.open({
					message: '成功',
					description: '导入成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}

		}).catch(err => { throw err });
	}
}
// 删除临时导入的个体工商户
export function delIndustrialAction(params) {
	return dispatch => {
		return delIndustrial(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});

			} else {
				notification.open({
					message: '成功',
					description: '删除成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}

		}).catch(err => { throw err });
	}
}
// 个体工商户下载附件
export function individualDownAction(id) {
	return dispatch => {
		return individualDown(id)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					})
				} else {
					downloadFileByUrl(data.path)
				}
			})
			.catch(err => { throw err })
	}
}
//查看开户失败原因
export function searchOpenFailReasonAction(id) {
	return dispatch => {
		return searchOpenFailReason(id).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});

			} else {
				return data;
			}

		}).catch(err => { throw err });
	}
}
//个体工商户发票列表
export function loadIndividualInvoiceList(params, id) {
	return dispatch => {
		return loadIndividualInvoice(params, id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_INDIVIDUAL_INVOICE,
					individualInvoiceList: data
				});
				dispatch(change('makeOut_invoice_form', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//登记发票
export function registerInvoiceAction(id, params) {
	return dispatch => {
		return registerInvoice(id, params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				})
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}
		})
			.catch(err => { throw err; });
	};
}
//开票列表导出
export function invoiceExportAction(params) {

	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return invoiceExport(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {

			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}
//导入个体工商户发票号码
export function exportInvoiceAction(params) {

	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return exportInvoice(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '导入成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}
//导入个体工商户发票号码最后的确认
export function exportInvoiceSureAction(params) {

	return dispatch => {
		return exportInvoiceSure(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '导入成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}
		}).catch(err => { throw err });
	}
}
// 销户
export function cancelOptAction(params) {
	return dispatch => {
		return cancelOpt(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});

			} else {
				notification.open({
					message: '成功',
					description: '销户成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}

		}).catch(err => { throw err });
	}
}
//开户管理操作记录列表
export function loadOpenOptRecordList(id, params) {
	return dispatch => {
		return getOpenOptRecordList(id, params)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_OPEN_OPT_RECORD_LIST,
					openOptRecordList: data
				});
				dispatch(change('makeOut_invoice_form', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
//开户管理 查看失败原因
export function getFailReasonAction(id) {
	return dispatch => {
		return getFailReason(id)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});

				} else {
					return data;
				}
			})
			.catch(err => { throw err; });
	};
}
//统计账单中某个项目的险种合计
export function loadSocialTotal(id, params) {
	return dispatch => {
		return getSocialTotal(id, params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});

				} else {
					return data;
				}
			})
			.catch(err => { throw err; });
	};
}
//检查账套的服务项目是否可以修改
export function loadServerIsCheck(id) {
	return dispatch => {
		return getServerIsCheck(id)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});

				} else {
					return data;
				}
			})
			.catch(err => { throw err; });
	};
}

//服务合同列表导出
export function contractExportAction(params) {
	return dispatch => {
		return contractExport(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操作失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { throw err; });
	};
}
//财务管理 - 任务明细 列表
export function loadTaskDetailsList(params, id) {
	return dispatch => {
		return getTaskDetailsList(params, id)
			.then(data => {
				const { items = [], total_count } = data;
				dispatch({
					type: types.LOAD_TASK_DETAILS,
					taskDetailsList: data
				});
				dispatch(change('task_details_form', 'total_count', total_count));
			})
			.catch(err => { throw err; });
	};
}
// 任务明细 批量发放
export function batchGrantAction(params) {
	return dispatch => {
		return batchGrant(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});

			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}

		}).catch(err => { throw err });
	}
}
//财务管理 任务明细 导出
export function exportTaskDetailsAction(parms) {
	return dispatch => {
		return exportTaskDetails(parms).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '导出成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data;
		}).catch(err => { throw err });
	}
}
//批量岗位导入
export function batchPositionExportAction(params) {

	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return batchPositionExport(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '导入成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}
//岗位导入-确认/取消
export function batchExportSureAction(params) {

	return dispatch => {
		if (params.opt == 'sure') {
			dispatch({ type: 'MASK_SHOW', maskShow: true });
		}
		return batchExportSure(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
				dispatch({ type: 'MASK_SHOW', maskShow: false });
			} else {
				if (params.opt == 'sure') {
					notification.open({
						message: '成功',
						description: '导入成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				dispatch({ type: 'MASK_SHOW', maskShow: false });
				return data;
			}


		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}
//用工池修改手机号
export function updateLoginMobileAction(params) {
	return dispatch => {
		return updateLoginMobile(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '修改成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}

		}).catch(err => { throw err });
	}
}
//开户管理更改接单手机号
export function updateOrderMobileAction(id, params) {
	return dispatch => {
		return updateOrderMobile(id, params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '修改成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}

		}).catch(err => { throw err });
	}
}
//获取年检设置
export function getAsSettingAction() {
	return dispatch => {
		return getAsSetting().then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				return data;
			}

		}).catch(err => { throw err });
	}
}
//年检设置
export function AsSetAction(params) {
	return dispatch => {
		return AsSet(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '设置成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}

		}).catch(err => { throw err });
	}
}
//获取待年检年份
export function getASYearAction(id) {
	return dispatch => {
		return getASYear(id).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				dispatch({
					type: types.GET_AS_YEAR_LIST,
					getAsYearList: data
				});
			}

		}).catch(err => { throw err });
	}
}
//办理年检
export function optAsAction(id, params) {
	return dispatch => {
		return optAs(id, params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '设置成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}

		}).catch(err => { throw err });
	}
}
//新增任务关联岗位列表
export function loadRelevancePositionList(params) {
	return dispatch => {
		return getRelevancePosition(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					const { items = [], total_count } = data;
					dispatch({
						type: types.LOAD_RELEVANCE_POSITION_LIST,
						relevancePos: data
					});
				}

			})
			.catch(err => { throw err; });
	};
}
//检测账套编号是否存在
export function checkAccountIsExist(params) {
	return dispatch => {
		return getAccountIsExist(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					return data;
				}

			})
			.catch(err => { throw err; });
	};
}
//获取任务类型列表
export function loadTaskTypeList(params) {
	return dispatch => {
		return getTaskTypeList(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					const { items = [], total_count } = data;
					dispatch({
						type: types.LOAD_TASK_TYPE_LIST,
						taskTypeList: data
					});
				}

			})
			.catch(err => { throw err; });
	};
}
//服务合同导入
export function contractImportAction(params) {

	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return contractImport(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '导入成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}
//服务合同导入-确认/取消
export function contractImportSureAction(params) {
	return dispatch => {
		if (params.opt == 'sure') {
			dispatch({ type: 'MASK_SHOW', maskShow: true });
		}
		return contractImportSure(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
				dispatch({ type: 'MASK_SHOW', maskShow: false });
			} else {
				if (params.opt == 'sure') {
					notification.open({
						message: '成功',
						description: '导入成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				dispatch({ type: 'MASK_SHOW', maskShow: false });
				return data;
			}


		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}
//任务指派 设置用工成果
export function setLaborAction(id, options) {
	return dispatch => {
		return setLabor(id, options).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '设置成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}

		}).catch(err => { throw err });
	}
}
//获取乙方法务实体信息
export function getPartyBLengalEntityAction(tentant_id, id) {
	return dispatch => {
		return getPartyBLengalEntity(tentant_id, id).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				return data;
			}

		}).catch(err => { throw err });
	}
}
//审核hr发起的任务
export function checkHrSendTaskAction(id, options) {
	return dispatch => {
		return checkHrSendTask(id, options).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
				return data;
			}


		}).catch(err => { throw err });
	}
}
//批量导入发放结果
export function batchResultImportAction(params) {
	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return batchResultImport(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '导入成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}

// 导入银行流水的操作
export function batchResultAction(params) {
	return dispatch => {
		if (params.opt == 'sure') {
			dispatch({ type: 'MASK_SHOW', maskShow: true });
		}
		return batchExportWaterSure(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
				dispatch({ type: 'MASK_SHOW', maskShow: false });
			} else {
				notification.open({
					message: '成功',
					description: '导入成功',
					icon: <NotificationIcon type='success' />,
				});
				dispatch({ type: 'MASK_SHOW', maskShow: false });
				return data;
			}

		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}

//店铺管理列表
export function getMinishopList(params) {
	return dispatch => {
		return getMinishopListUtil(params)
			.then(data => {
				if (data.code >= 300) {
					message.error(data.message, 2)
				} else {
					const { total_count = 0 } = data;
					dispatch({
						type: types.MINI_SHOP_LIST,
						minishopList: data
					})
					dispatch(change('search_mini_shop_list_form', 'total_count', total_count));
				}
			})
			.catch(err => { throw err; });
	};
}

/*添加店铺*/
export function addMinishop(values) {
	return dispatch => {
		return addMinishopUtil(values)
			.then(data => {
				if (data.code && data.code > 300) {
					message.error(data.message)
				} else {
					dispatch(change('mini_shop_list_form', 'visible', false));
					message.success("添加成功", 2)
					dispatch(submit('search_mini_shop_list_form'))
				}
			})
			.catch(err => {
				throw err;
			});
	};
}

/*编辑店铺*/
export function editMinishop(values) {
	return dispatch => {
		return editMinishopUtil(values)
			.then(data => {
				if (data.code && data.code > 300) {
					message.error(data.message)
				} else {
					dispatch(change('mini_shop_list_form', 'visible', false));
					message.success("编辑成功", 2)
					dispatch(submit('search_mini_shop_list_form'))
				}
			})
			.catch(err => {
				throw err;
			});
	};
}

//用工池下载银行卡照片
export function loadDownLoadBankCard(params) {
	return dispatch => {
		return loadDownLoadBankCardUtil(params)
			.then(data => {
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操作失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					const { items = [] } = data;
					if (items.length > 0) {
						const { bank_card_front } = items[0]
						window.open('/filemeta?t=' + new Date().getTime() + '&bucket=' + bank_card_front.bucket + '&object=' + bank_card_front.object);
					}
				}

			})
			.catch(err => { throw err; });
	};
}
//结算>结算管理>账单信息>查看 >打印
export function printBillUtilAction(params) {
	return dispatch => {
		return printBillUtil(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '操作失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
			}
			return data

		})
			.catch(err => { throw err; });
	};
}
//结算   删除未锁定账单
export function deleteBillUtilAction(params) {
	return dispatch => {
		return deleteBillUtil(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '操作失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data

		})
			.catch(err => { throw err; });
	};
}
// 删除二次拆分详情
export function delSplitDetailAction(params) {
	return dispatch => {
		return delSplitDetail(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '操作失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data
		})
			.catch(err => { throw err; });
	};
}
//拆分已拆分详情
export function paySplitTwoAction(params, action) {
	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return paySplitTwo(params, action)
			.then(data => {
				dispatch({ type: 'MASK_SHOW', maskShow: false });
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '操纵失败,' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					notification.open({
						message: '成功',
						description: '操作成功',
						icon: <NotificationIcon type='success' />,
					});
				}
				return data;
			})
			.catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err; });
	};
}

// 获取业务类型列表
export function loadBussinessType() {
	return dispatch => {
		return getBusinessType()
			.then(data => {
				const { items = [], total_count } = data;
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					//获取一级业务类型
					let businessTypes = [];
					data.items && data.items.length > 0 && data.items.map((item, i) => {
						businessTypes.push({
							'id': item.id,
							'name': item.name
						});
					});
					dispatch({
						type: types.BUSINESS_TYPE_LIST,
						businessTypeList: data
					});
					dispatch({
						type: types.BUSINESS_TYPE,
						businessTypes: businessTypes
					});
					return data;
				}
			})

			.catch(err => { throw err; });
	};
}

// 获取服务项目列表
export function loadServiceProject() {
	return dispatch => {
		return getServiceProject()
			.then(data => {
				const { items = [], total_count } = data;
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					//获取系统项目和自定义项目
					let syetemServerProjectList = data.items,
						customServerProjectList = data.custom;
					
					dispatch({
						type: types.SERVICE_PROJECT_LIST,
						syetemServerProjectList: syetemServerProjectList
					});
					dispatch({
						type: types.CUSTOM_SERVICE_PROJECT_LIST,
						customServerProjectList: customServerProjectList
					});
					return data;
				}
			})

			.catch(err => { throw err; });
	};
}


// 获取收费规则列表
export function loadFeeProject() {
	return dispatch => {
		return getFeeProject()
			.then(data => {
				const { items = [], total_count } = data;
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					dispatch({
						type: types.SERVICE_FEE_LIST,
						feeProjectList: data
					});
					return data;
				}
			})

			.catch(err => { throw err; });
	};
}
// 获取费用项目/服务费列表
export function loadFeeProjectCode() {
	return dispatch => {
		return getFeeProjectCode()
			.then(data => {
				const { items = [], total_count } = data;
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					let feeProjectCodeList = [];
					data && data.items && data.items.map((item,i)=>{
						feeProjectCodeList.push({
							code:item.id,
							name:item.name
						});
					});
					dispatch({
						type: types.SERVICE_FEE_CODE_LIST,
						feeProjectCodeList: feeProjectCodeList
					});
					return feeProjectCodeList;
				}
			})

			.catch(err => { throw err; });
	};
}

// 合同查看-审批/归档记录列表 
export function loadPackageList(id) {
	return dispatch => {
		return getPackageList(id)
			.then(data => {
				const { items = [], total_count } = data;
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					dispatch({
						type: types.PACKAGE_LIST,
						packageList: data
					});

					dispatch(change('contract_record_from', 'total_count', data.guidang.length));
					dispatch(change('contract_check_from', 'total_count', data.shenpi.length));
					return data;
				}
			})

			.catch(err => { throw err; });
	};
}

// 合同查看-查看关联合同列表
export function loadRelationContractList(id) {
	return dispatch => {
		return getRelationContractList(id)
			.then(data => {
				const { items = [], total_count } = data;
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					dispatch({
						type: types.RELATION_CONTRACT_LIST,
						relationContractList: data
					});
					dispatch(change('contract_package_form', 'total_count', total_count));
					return data;
				}
			})

			.catch(err => { throw err; });
	};
}

//创建合同-新增岗位单价
export function addPositionAction(id, options) {
	return dispatch => {
		return addPosition(id, options).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
				dispatch({
					type: types.ADD_position_LIST,
					addPositionList: data
				});
				dispatch(change('contract_position_from', 'total_count', data.items.length));
				return data;
			}


		}).catch(err => { throw err });
	}
}

// 合同查看-基本信息
export function loadContractBaseInfo(id) {
	return dispatch => {
		return getContractBaseInfo(id)
			.then(data => {
				const { items = [], total_count } = data;
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					dispatch({
						type: types.CONTRACT_BASE_INFO,
						contractBaseInfo: data
					});
					return data;
				}
			})

			.catch(err => { throw err; });
	};
}

//服务合同中岗位导入
export function contractPositionImportAction(params) {

	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return contractPositionImport(params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '导入成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			dispatch({
				type: types.ADD_position_LIST,
				addPositionList: data
			});
			dispatch(change('contract_position_from', 'total_count', data.items.length));
			return data;
		}).catch(err => { dispatch({ type: 'MASK_SHOW', maskShow: false }); throw err });
	}
}

// 添加补充协议
export function addProtocolAction(id,params) {
	return dispatch => {
		return addProtocol(id,params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '操作失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data
		})
			.catch(err => { throw err; });
	};
}
// 归档
export function contractPackageAction(id,params) {
	return dispatch => {
		return contractPackage(id,params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '操作失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data
		})
			.catch(err => { throw err; });
	};
}

// 合同查看-费用项目
export function loadContractProjectInfo(id) {
	return dispatch => {
		return getContractProjectInfo(id)
			.then(data => {
				const { items = [], total_count } = data;
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					dispatch({
						type: types.CONTRACT_CONTRACT_INFO,
						contractProjectInfo: data
					});
					return data;
				}
			})

			.catch(err => { throw err; });
	};
}
// 服务合同政策地区
export function loadPolicyAreaList(params) {
	return dispatch => {
		return getPolicyAreaList(params)
			.then(data => {
				const {items} = data;
				let areaList = [];
				items && items.length > 0 && items.map((item,i)=>{
					if(item.district_code){
						areaList.push({
							id:`${item.province_code}-${item.city_code}-${item.district_code}`,
							name:`${item.province}-${item.city}-${item.district}`,
						});
					}else{
						areaList.push({
							id:`${item.province_code}-${item.city_code}`,
							name:`${item.province}-${item.city}`,
						});
					}
					
				});
				dispatch({
					type: types.LOAD_POLICY_AREA_LIST,
					policyAreaList: areaList
				});
			})
			.catch(err => { throw err; });
	};
}
// 归档补充协议信息
export function loadPackageAgreeList(id) {
	return dispatch => {
		return getPackageAgreeList(id)
			.then(data => {
				const { items = [], total_count } = data;
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					dispatch({
						type: types.PACKAGEAGREE_LIST,
						packageAgreeList: data
					});
					return data;
				}
			})

			.catch(err => { throw err; });
	};
}
//续签合同
export function renewContractAction(id, params) {
	return dispatch => {
		dispatch({ type: 'MASK_SHOW', maskShow: true });
		return renewContract(id, params).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '合同续签失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			dispatch({ type: 'MASK_SHOW', maskShow: false });
			return data;
		}).catch(err => { throw err; dispatch({ type: 'MASK_SHOW', maskShow: false }); });
	}
}
// 获取服务合同常用名称设置
export function loadServiceNormalName(id) {
	return dispatch => {
		return getServiceNormalName(id)
			.then(data => {
				const { items = [], total_count } = data;
				if (data.code >= 300) {
					notification.open({
						message: '错误',
						description: '' + data.message,
						icon: <NotificationIcon type='error' />,
					});
				} else {
					dispatch({
						type: types.SERVICE_NORMAL_NAME,
						serviceNormalName: data.service_projects
					});
					return data;
				}
			})

			.catch(err => { throw err; });
	};
}

// 作废
export function cancelContractAction(id,options) {
	return dispatch => {
		return cancelContract(id,options).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '操作失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data
		})
			.catch(err => { throw err; });
	};
}

// 发起审批
export function approvalAction(id,options) {
	return dispatch => {
		return approval(id,options).then(data => {
			if (data.code >= 300) {
				notification.open({
					message: '错误',
					description: '操作失败,' + data.message,
					icon: <NotificationIcon type='error' />,
				});
			} else {
				notification.open({
					message: '成功',
					description: '操作成功',
					icon: <NotificationIcon type='success' />,
				});
			}
			return data
		})
			.catch(err => { throw err; });
	};
}