How to use enumValue method in ts-auto-mock

Best JavaScript code snippet using ts-auto-mock

global.js

Source:global.js Github

copy

Full Screen

1let common = {2 lockStatus: [{3 label: '未锁定',4 value: '0'5 },6 {7 label: '已锁定',8 value: '1'9 }10 ]11}12/* 注:不要更改枚举的索引位置 */13let options = {14 // 售价策略15 pricing: [{16 label: '销售价格',17 value: 'SELL_PRICE_BASED'18 },19 {20 label: '预估采购',21 value: 'PURCHASE_PRICE_BASED'22 }23 ],24 // 语种25 languages: [{26 label: '英语',27 value: 'en'28 },29 {30 label: '德语',31 value: 'de'32 },33 {34 label: '日语',35 value: 'ja'36 },37 {38 label: '意大利语',39 value: 'it'40 },41 {42 label: '西班牙语',43 value: 'es'44 },45 {46 label: '法语',47 value: 'fr'48 },49 {50 label: '葡萄牙语',51 value: 'pt'52 },53 {54 label: '阿拉伯语',55 value: 'ar'56 }57 ],58 // 小数位数59 decimalPoints: [{60 label: '0',61 value: 062 },63 {64 label: '1',65 value: 166 },67 {68 label: '2',69 value: 270 }71 ],72 // 售后类型73 afterSaleTypeEnums: [{74 label: '退款',75 value: 'REFUND'76 },77 {78 label: '补发',79 value: 'REISSUE'80 }81 // { label: "退件", value: "PACKAGE_REJECT" }82 ],83 // 退款类型84 refundTypeOps: {85 AMOUNT: '按金额',86 QUANTITY: '按数量',87 FREIGHT: '仅运费'88 },89 // 售后来源90 reasonSourceEnums: [{91 label: '邮件',92 value: 'EMAIL'93 },94 {95 label: 'PayPal纠纷',96 value: 'PAYPAL_DISPUTE'97 },98 {99 label: '其他付款平台纠纷',100 value: 'OTHER_DISPUTE'101 },102 {103 label: '公司内部',104 value: 'COMPANY'105 }106 // { label: "系统", value: "SYSTEM" }107 ],108 // 订单合并状态109 orderSplitUnionEnums: [{110 label: '普通',111 value: 'NORMAL'112 },113 {114 label: '拆分',115 value: 'SPLIT'116 },117 {118 label: '合并',119 value: 'UNION'120 }121 ],122 // 订单状态123 orderStatusEnums: [{124 label: '已下单',125 value: 'ORDERED'126 },127 {128 label: '已审核',129 value: 'APPROVED'130 },131 {132 label: '已预报',133 value: 'GETTED'134 },135 {136 label: '已配货',137 value: 'DISTRIBUTED'138 },139 {140 label: '拣货中',141 value: 'PICKING'142 },143 {144 label: '已打包',145 value: 'PACKAGE'146 },147 {148 label: '已发货',149 value: 'DELIVERED'150 },151 // { label: "已提货", value: "PICKUP" },152 {153 label: '已搁置',154 value: 'SHELVE'155 },156 // { label: '已签收',value: 'SIGNED' },157 {158 label: '已取消',159 value: 'STOP'160 },161 {162 label: '已退件',163 value: 'REJECTED'164 }165 ],166 orderStatusEntrepotEnums: [{167 label: '已配货',168 value: 'DISTRIBUTED'169 },170 {171 label: '拣货中',172 value: 'PICKING'173 },174 {175 label: '已打包',176 value: 'PACKAGE'177 }178 ],179 stockSearchTypeEnums: [{180 label: 'SKU',181 value: '1'182 },183 {184 label: '货架',185 value: '0'186 },187 {188 label: '产品中文名',189 value: '2'190 },191 {192 label: 'SPU',193 value: '3'194 }195 ],196 inventoryTypeEnums: [{197 label: '盘亏',198 value: 'LOSS'199 },200 {201 label: '盘盈',202 value: 'PROFIT'203 }204 ],205 // 出入库枚举206 stockOutInEnums: [{207 label: '出库',208 value: 'OUTBOUND'209 },210 {211 label: '入库',212 value: 'INBOUND'213 }214 ],215 // 库存操作类型枚举216 stockOptTypeEnums: [{217 label: '采购入库',218 value: 'IN_INVENTORY'219 },220 {221 label: '销售出库',222 value: 'DELIVERY'223 },224 {225 label: '退件入库',226 value: 'PACKAGE_REFUND'227 },228 {229 label: '盘盈入库',230 value: 'INVENTORY_PROFIT'231 },232 {233 label: '盘亏出库',234 value: 'INVENTORY_SHORTAGES'235 },236 {237 label: '赠品入库',238 value: 'GIFT_IN_INVENTORY'239 },240 {241 label: '库存迁移',242 value: 'INVENTORY_TRANSFER'243 },244 {245 label: '样品入库',246 value: 'SAMPLE_IN'247 },248 {249 label: '样品出库',250 value: 'SAMPLE_OUT'251 },252 {253 label: '销售退货入库',254 value: 'SALES_RETURN_IN'255 },256 {257 label: '入库单盘盈入库',258 value: 'IN_SURPLUS_INVENTORY'259 }260 ],261 // 包裹状态枚举262 packageStatusEnums: [{263 label: '已配货',264 value: 'DISTRIBUTED'265 },266 {267 label: '拣货中',268 value: 'PICKING'269 },270 {271 label: '已打包',272 value: 'PRINTED'273 },274 {275 label: '待还库',276 value: 'PENDING_WAREHOUSE'277 },278 {279 label: '已发货',280 value: 'DELIVERED'281 },282 {283 label: '已回收',284 value: 'RECALLED'285 },286 {287 label: '待配货',288 value: 'WAITING_FOR_DISTRIBUTION'289 },290 {291 label: '强制抹平',292 value: 'FORCE_RETURN_INVENTORY'293 }294 ],295 // 拣货任务状态枚举296 pickTaskStatusEnums: [{297 label: '待指派',298 value: 'WAIT_ASSIGN'299 },300 {301 label: '已指派',302 value: 'ASSIGN'303 },304 {305 label: '拣货中',306 value: 'PICKING'307 },308 {309 label: '已完成',310 value: 'COMPLETED'311 }312 ],313 // 包裹拣货类型枚举314 packagePickTypeEnums: [{315 label: '单品单个',316 value: 'ONE2ONE',317 enumValue: 0318 },319 {320 label: '单品多个',321 value: 'ONE2MANY',322 enumValue: 1323 },324 {325 label: '多品多个',326 value: 'MANY2MANY',327 enumValue: 2328 }329 // { label: '特大', value: 'BIG' },330 // { label: '特殊', value: 'SPECIAL' },331 // { label: '固定搭配', value: 'FIXED' }332 ],333 // 商品货源类型枚举334 productSourceTypeEnums: [{335 label: '预售',336 value: 'PRESALE'337 },338 {339 label: '定制',340 value: 'CUSTOMIZED'341 },342 {343 label: '现货',344 value: 'GOODS_IN_STOCK'345 },346 {347 label: '现货-预售',348 value: 'BIGOODS_IN_STOCK_PRESALEG'349 },350 {351 label: '现货-定制',352 value: 'GOODS_IN_STOCK_CUSTOMIZED'353 },354 {355 label: '线上现货',356 value: 'GOODS_IN_STOCK_OFFLINE'357 },358 {359 label: 'ODM现货',360 value: 'GOODS_IN_STOCK_ODM'361 },362 {363 label: '档口现货',364 value: 'GOODS_IN_STOCK_STALL'365 }366 ],367 // 采购平台368 purchasePlatform: [{369 label: '线下',370 value: 'OFFLINE',371 enumValue: 0372 },373 {374 label: '1688',375 value: 'ALI_1688',376 enumValue: 1377 },378 {379 label: '淘宝',380 value: 'TAOBAO',381 enumValue: 2382 },383 {384 label: '天猫',385 value: 'TMALL',386 enumValue: 3387 },388 {389 label: '拼多多',390 value: 'PINDUODUO',391 enumValue: 4392 },393 {394 label: '京东',395 value: 'JD',396 enumValue: 5397 }398 ],399 // 采购方式400 purchaseMode: [{401 label: '线下',402 value: 'OFFLINE',403 enumValue: 0404 },405 {406 label: '1688',407 value: 'ALI_1688',408 enumValue: 1409 },410 {411 label: '淘宝',412 value: 'TAOBAO',413 enumValue: 2414 },415 {416 label: '天猫',417 value: 'TMALL',418 enumValue: 3419 },420 {421 label: '拼多多',422 value: 'PINDUODUO',423 enumValue: 4424 },425 {426 label: '京东',427 value: 'JD',428 enumValue: 5429 }430 ],431 // 采购结算方式432 purchaseClearingMode: [{433 label: '网商100%预付',434 value: 'NET',435 enumValue: 0436 },437 {438 label: '货到付款',439 value: 'COD',440 enumValue: 1441 },442 {443 label: '周结',444 value: 'WEEK',445 enumValue: 2446 },447 {448 label: '半月结',449 value: 'HALF_MONTH',450 enumValue: 3451 },452 {453 label: '月结',454 value: 'MONTH',455 enumValue: 4456 },457 {458 label: '预付转账',459 value: 'PREPAID',460 enumValue: 5461 },462 {463 label: '阿里账期',464 value: 'ALI',465 enumValue: 6466 },467 {468 label: '档口现付',469 value: 'PAY_AS_YOU_GO',470 enumValue: 7471 }472 ],473 // 授信等级474 creditGrade: [{475 label: '低',476 value: 'LOW',477 enumValue: 0478 },479 {480 label: '中',481 value: 'MIDDLE',482 enumValue: 1483 },484 {485 label: '高',486 value: 'HIGH',487 enumValue: 2488 },489 {490 label: '黑名单',491 value: 'BLACK',492 enumValue: 3493 }494 ],495 // 供应商设置节点496 supplierSettingMode: [{497 label: '预售开发授信等级',498 value: 'PRESALE_CREDIT_GRADE',499 enumValue: 0500 }],501 // 采购单价审核状态502 priceAuditStatus: [{503 label: '待审核',504 value: 'PENDING_AUDIT',505 enumValue: 0506 },507 {508 label: '已通过',509 value: 'AUDIT_PASSED',510 enumValue: 1511 },512 {513 label: '已拒绝',514 value: 'AUDIT_REJECTED',515 enumValue: 2516 }517 ],518 // 供应商性质519 supplierNature: [{520 label: '生产型',521 value: 'PRODUCTION',522 enumValue: 0523 },524 {525 label: '贸易型',526 value: 'TRADED',527 enumValue: 1528 },529 {530 label: '个体工商户',531 value: 'INDIVIDUAL_BUSINESS',532 enumValue: 2533 },534 {535 label: '淘宝个体',536 value: 'TAOBAO_INDIVIDUAL',537 enumValue: 3538 }539 ],540 // 翻译状态541 translateStatus: [{542 label: '不需要翻译',543 value: 'NO'544 },545 {546 label: '翻译中',547 value: 'IN_TRANSLATE'548 },549 {550 label: '待翻译',551 value: 'WAIT'552 },553 {554 label: '翻译失败',555 value: 'FAIL'556 },557 {558 label: '翻译成功',559 value: 'SUCCESS'560 }561 ],562 // 下单平台563 purchasePlatform2: [{564 label: '线下供应商',565 value: 'OFFLINE',566 enumValue: 0567 },568 {569 label: '1688供应商',570 value: 'ALI_1688',571 enumValue: 1572 }573 ],574 // 供应商罚款状态575 supplierFineStatus: [{576 label: '审核中',577 value: 'AUDITING',578 enumValue: 0579 },580 {581 label: '已通过',582 value: 'AUDIT_PASSED',583 enumValue: 1584 },585 {586 label: '已拒绝',587 value: 'AUDIT_REJECTED',588 enumValue: 2589 }590 ],591 // 线下付款状态592 paymentStatus: [{593 label: '待付款',594 value: 'PENDING_PAYMENT',595 enumValue: 0596 },597 {598 label: '付款中',599 value: 'PAYING',600 enumValue: 3601 },602 {603 label: '已付款',604 value: 'PAID',605 enumValue: 1606 },607 {608 label: '付款失败',609 value: 'PAYMENT_FAIL',610 enumValue: 4611 },612 {613 label: '已拒绝',614 value: 'REJECTED',615 enumValue: 2616 }617 ],618 productGradeList: [{619 label: '高',620 value: 'HIGH'621 },622 {623 label: '中',624 value: 'MIDDLE'625 },626 {627 label: '低',628 value: 'LOW'629 }630 ],631 // sku购销状态632 purchaseSalesStatus: [{633 label: '停售',634 value: '1'635 },636 {637 label: '停售清仓',638 value: '2'639 },640 {641 label: '正常销售',642 value: '3'643 },644 {645 label: '新品测试',646 value: '4'647 },648 {649 label: '缺货',650 value: '5'651 }652 ],653 // SPU发布状态654 spuPublishStatus: [{655 label: '已停售',656 value: 10,657 key: 'OFFLINE'658 }, {659 label: '可发布',660 value: 20,661 key: 'PUBLISH'662 }],663 // 产品上下架状态664 upDownStatusOptions: [{665 label: '新建',666 value: '0',667 key: 'NEW'668 },669 {670 label: '上架中',671 value: '1',672 key: 'WAIT_UP'673 },674 {675 label: '已上架',676 value: '2',677 key: 'UP_ED'678 },679 {680 label: '上架失败',681 value: '3',682 key: 'UP_FAIL'683 },684 {685 label: '下架中',686 value: '4',687 key: 'WAIT_DOWN'688 },689 {690 label: '已下架',691 value: '5',692 key: 'DOWN_ED'693 },694 {695 label: '下架失败',696 value: '6',697 key: 'DOWN_FAIL'698 },699 {700 label: '删除中',701 value: '7',702 key: 'WAIT_DEL'703 },704 // {label: "已删除", value: "8", key: "DEL_ED"},705 {706 label: '删除失败',707 value: '9',708 key: 'DEL_FAIL'709 }710 ],711 hasSetOfflineDateOps: [{712 label: '有',713 value: true714 },715 {716 label: '无',717 value: false718 }719 ],720 // 产品状态721 productStatus: [{722 label: '新建',723 value: '0'724 },725 {726 label: '上架中',727 value: '1'728 },729 {730 label: '已上架',731 value: '2'732 },733 {734 label: '上架失败',735 value: '3'736 },737 {738 label: '下架中',739 value: '4'740 },741 {742 label: '已下架',743 value: '5'744 },745 {746 label: '下架失败',747 value: '6'748 }749 ],750 purchaseUnPackStatus: [{751 label: '未开始',752 value: 'NOT_START',753 enumValue: 0754 },755 {756 label: '已开始',757 value: 'STARTED',758 enumValue: 1759 }760 ],761 purchaseOrderedPlatform: [{762 label: '线下',763 value: 'OFFLINE',764 enumValue: 0765 },766 {767 label: '1688',768 value: 'ALI_1688',769 enumValue: 1770 }771 ],772 supplierPlatformStatus: [{773 label: '等待买家付款',774 value: 'waitbuyerpay',775 enumValue: 1776 },777 {778 label: '等待卖家发货',779 value: 'waitsellersend',780 enumValue: 2781 },782 {783 label: '等待买家收货',784 value: 'waitbuyerreceive',785 enumValue: 3786 },787 {788 label: '已收货',789 value: 'confirm_goods',790 enumValue: 4791 },792 {793 label: '交易成功',794 value: 'success',795 enumValue: 5796 },797 {798 label: '交易取消',799 value: 'cancel',800 enumValue: 6801 },802 {803 label: '交易终止',804 value: 'terminated',805 enumValue: 7806 }807 ],808 inStockLessGoodsDealMode: [{809 label: '损耗',810 value: 'WASTAGE',811 enumValue: 0812 },813 {814 label: '供应商退款',815 value: 'REFUND',816 enumValue: 1817 },818 {819 label: '供应商补货',820 value: 'REISSUE',821 enumValue: 2822 }823 ],824 unpackingStatusOptions: [{825 label: '未拆包',826 value: 'NO_UNPACK',827 enumValue: 1828 },829 {830 label: '部份拆包',831 value: 'PART_UNPACK',832 enumValue: 2833 },834 {835 label: '己拆包',836 value: 'COMPLETE_UNPACK',837 enumValue: 3838 }839 ],840 // 库存日志-操作841 inventoryLogOperateEnums: [{842 label: 'PDA采购入库',843 value: '操作PDA_PURCHASE_IN_INVENTORY',844 enumValue: 0845 },846 {847 label: '核重发货出库',848 value: 'VERIFY_DELIVERY_IN_INVENTORY',849 enumValue: 1850 },851 {852 label: 'PDA盘亏',853 value: 'PDA_MAKE_LOSS',854 enumValue: 2855 },856 {857 label: 'PDA盘盈',858 value: 'PDA_MAKE_WIN',859 enumValue: 3860 },861 {862 label: '单品/批量盘亏',863 value: 'SINGLE_OR_BATCH_MAKE_LOSS',864 enumValue: 4865 },866 {867 label: '单品/批量盘盈',868 value: 'SINGLE_OR_BATCH_MAKE_WIN',869 enumValue: 5870 },871 {872 label: '配货',873 value: 'DISTRIBUTION',874 enumValue: 6875 },876 {877 label: '核重发货、无效包裹',878 value: 'VERIFY_DELIVERY_INVALID_PACKAGE',879 enumValue: 7880 },881 {882 label: 'PDA库位转移',883 value: 'PDA_TRANSFER_INVENTORY',884 enumValue: 8885 },886 {887 label: '锁定',888 value: 'LOCK',889 enumValue: 9890 },891 {892 label: '解锁',893 value: 'UNLOCK',894 enumValue: 10895 },896 {897 label: '退件入库-申请还库',898 value: 'REFUND_IN_INVENTORY_APPLY_RETURN_INVENTORY',899 enumValue: 11900 },901 {902 label: 'PDA待还库',903 value: 'PDA_WAIT_RETURNED',904 enumValue: 12905 },906 {907 label: '仓库取消发货',908 value: 'PDA_RETURNED',909 enumValue: 13910 },911 {912 label: '重置订单',913 value: 'VIRTUAL_ORDER_RESET',914 enumValue: 14915 },916 {917 label: '搁置订单',918 value: 'VIRTUAL_ORDER_SHELVE',919 enumValue: 15920 },921 {922 label: '拣货失败',923 value: 'PICKING_FAILURE',924 enumValue: 16925 }926 ],927 // 库存日志-分类928 inventoryLogTypeEnums: [{929 label: '初始化库存',930 value: 'INIT_INVENTORY',931 enumValue: 0932 },933 {934 label: '采购入库',935 value: 'IN_INVENTORY',936 enumValue: 1937 },938 {939 label: '销售出库',940 value: 'DELIVERY',941 enumValue: 2942 },943 {944 label: '包裹生成',945 value: 'PACKAGE_GENERATE',946 enumValue: 3947 },948 {949 label: '待还库包裹回收',950 value: 'PACKAGE_RECOVERY',951 enumValue: 4952 },953 {954 label: '库存转入',955 value: 'SHIFT_IN',956 enumValue: 5957 },958 {959 label: '库存转出',960 value: 'SHIFT_OUT',961 enumValue: 6962 },963 {964 label: '包裹还库',965 value: 'RETURN_INVENTORY',966 enumValue: 7967 },968 {969 label: '退件入库',970 value: 'PACKAGE_REFUND',971 enumValue: 8972 },973 {974 label: '盘盈入库',975 value: 'INVENTORY_PROFIT',976 enumValue: 9977 },978 {979 label: '盘亏出库',980 value: 'INVENTORY_SHORTAGES',981 enumValue: 10982 },983 {984 label: '待还库',985 value: 'WAIT_RETURNED',986 enumValue: 11987 },988 {989 label: '拣货失败',990 value: 'PICKING_FAILED',991 enumValue: 12992 },993 {994 label: '订单重置',995 value: 'VIRTUAL_ORDER_RESET',996 enumValue: 13997 },998 {999 label: '订单搁置',1000 value: 'VIRTUAL_ORDER_SHELVE',1001 enumValue: 141002 },1003 {1004 label: '仓库取消发货',1005 value: 'CANCEL_DELIVER',1006 enumValue: 151007 },1008 {1009 label: '赠品入库',1010 value: 'GIFT_IN_INVENTORY',1011 enumValue: 161012 },1013 {1014 label: '配货成功',1015 value: 'DISTRIBUTE_SUCCESS',1016 enumValue: 171017 },1018 {1019 label: '无效包裹回收',1020 value: 'INVALID_PACKAGE_RECYCLE',1021 enumValue: 181022 },1023 {1024 label: '库位转移',1025 value: 'TRANSFER_INVENTORY',1026 enumValue: 191027 },1028 {1029 label: '锁定',1030 value: 'LOCK',1031 enumValue: 201032 },1033 {1034 label: '解锁',1035 value: 'UNLOCK',1036 enumValue: 211037 },1038 {1039 label: '申请还库成功',1040 value: 'APPLY_RETURN_INVENTORY_SUCCESS',1041 enumValue: 221042 },1043 {1044 label: '还库成功',1045 value: 'RETURN_INVENTORY_SUCCESS',1046 enumValue: 231047 }1048 ],1049 // 库存日志-修改内容1050 inventoryLogUpdatedContentEnums: [{1051 label: '可用数量',1052 value: 'AVAILABLE_QUANTITY',1053 enumValue: 01054 },1055 {1056 label: '货架位',1057 value: 'LOCATION_CODE',1058 enumValue: 11059 },1060 {1061 label: '预留数量',1062 value: 'RESERVED_QUANTITY',1063 enumValue: 21064 },1065 {1066 label: '待还库数量',1067 value: 'WAIT_RETURN_QUANTITY',1068 enumValue: 31069 },1070 {1071 label: '锁定状态',1072 value: 'LOCK_STATUS',1073 enumValue: 41074 }1075 ],1076 // 版型模板状态1077 layoutTemplateStatus: [{1078 label: '草稿',1079 value: '0'1080 },1081 {1082 label: '待审核',1083 value: '1'1084 },1085 {1086 label: '审核拒绝',1087 value: '2'1088 },1089 {1090 label: '审核通过',1091 value: '3'1092 }1093 ],1094 layoutTemplateType: [{1095 label: '通用模板',1096 value: 01097 },1098 {1099 label: '定制模板',1100 value: 11101 }1102 ],1103 fabricType: [{1104 label: '面料',1105 value: 0,1106 name: 'FABRIC'1107 },1108 {1109 label: '辅料',1110 value: 1,1111 name: 'ACCESSORIES'1112 },1113 {1114 label: '鞋底',1115 value: 2,1116 name: 'SOLE'1117 }1118 ],1119 companyBody: [{1120 label: 'GLOBAL',1121 value: 1,1122 val: 'GLOBAL',1123 type: 'old'1124 },1125 {1126 label: 'TECHNOLOGY',1127 value: 2,1128 val: 'TECHNOLOGY',1129 type: 'old'1130 },1131 {1132 label: 'Global Holding',1133 value: 3,1134 val: 'GLOBAL_HOLDING'1135 },1136 {1137 label: 'Pioneer ECOM',1138 value: 4,1139 val: 'PIONEER_ECOM'1140 },1141 {1142 label: 'Global Online',1143 value: 5,1144 val: 'GLOBAL_ONLINE'1145 }1146 ],1147 siteType: [{1148 label: '品牌站',1149 value: 'BRAND_STATION'1150 // value: 11151 },1152 {1153 label: '大站',1154 value: 'LONG_TERM_STATION'1155 // value: 21156 },1157 {1158 label: '站群',1159 value: 'STATION_GROUP'1160 // value: 31161 },1162 {1163 label: '亚马逊',1164 value: 'AMAZON'1165 // value: 41166 },1167 {1168 label: 'APP',1169 value: 'APP'1170 // value: 51171 }1172 ],1173 similarityList: [1174 {1175 label: 'S',1176 value: 'S'1177 },1178 {1179 label: 'A',1180 value: 'A'1181 },1182 {1183 label: 'B',1184 value: 'B'1185 },1186 {1187 label: 'C',1188 value: 'C'1189 },1190 {1191 label: 'D',1192 value: 'D'1193 }1194 ],1195 sizeConfigStatus: [{1196 label: '禁用',1197 value: false1198 }, {1199 label: '启用',1200 value: true1201 }],1202 offlineType: [{ // 停售类型1203 label: '停售',1204 value: 11205 }, {1206 label: '停售清仓',1207 value: 21208 }],1209 offlineReason: [{ // 停售原因1210 label: '侵权',1211 value: 11212 }, {1213 label: '测试失败',1214 value: 21215 }, {1216 label: '重复spu',1217 value: 31218 }, {1219 label: '换产品池',1220 value: 41221 }, {1222 label: '无货源',1223 value: 51224 }, {1225 label: '信息录入错误',1226 value: 61227 }, {1228 label: '僵尸spu',1229 value: 71230 }, {1231 label: '亚马逊品下架',1232 value: 81233 }],1234 logisticsStatusList: [1235 { label: '已预报', value: 101, isShow: false },1236 { label: '出库交接', value: 103, isShow: true },1237 { label: '物流已收货', value: 200, isShow: true },1238 { label: '离开始发国', value: 202, isShow: true },1239 { label: '到达目的国', value: 203, isShow: true },1240 { label: '末端提取', value: 204, isShow: true },1241 { label: '运输途中', value: 205, isShow: true },1242 { label: '妥投', value: 206, isShow: true },1243 { label: '退货', value: 207, isShow: false }1244 ],1245 logisticSourceList: [1246 { label: '成都ERP', value: 1 },1247 { label: '深圳ERP', value: 2 }1248 ],1249 // 采购单状态1250 purchaseOrderStatus: [1251 {1252 label: '已下单',1253 value: 'ORDERED',1254 enum: 01255 },1256 {1257 label: '待审核',1258 value: 'NOT_AUDITED',1259 enum: 11260 },1261 {1262 label: '审核拒绝',1263 value: 'AUDIT_REFUSED',1264 enum: 21265 },1266 {1267 label: '已确认',1268 value: 'CONFIRMED',1269 enum: 31270 },1271 {1272 label: '待收货',1273 value: 'WAITING_FOR_RECEIVING',1274 enum: 41275 },1276 {1277 label: '已收货',1278 value: 'RECEIPTED',1279 enum: 51280 },1281 {1282 label: '已完成',1283 value: 'COMPLETED',1284 enum: 61285 },1286 {1287 label: '已核销',1288 value: 'CONSUMED',1289 enum: 71290 },1291 {1292 label: '已取消',1293 value: 'CANCELED',1294 enum: 81295 }1296 ]1297}1298/* 枚举相关键 */1299let keys = {1300 optionKeys: {1301 LABEL: 'label',1302 VALUE: 'value',1303 ENUM_VALUE: 'enumValue'1304 },1305 // 订单状态枚举键1306 orderStatus: {1307 ORDERED: 'ORDERED',1308 APPROVED: 'APPROVED',1309 GETTED: 'GETTED',1310 DISTRIBUTED: 'DISTRIBUTED',1311 PICKING: 'PICKING',1312 PACKAGE: 'PACKAGE',1313 DELIVERED: 'DELIVERED',1314 PICKUP: 'PICKUP',1315 SHELVE: 'SHELVE',1316 STOP: 'STOP',1317 REJECTED: 'REJECTED'1318 },1319 // 订单异常状态枚举键1320 orderExceptionStatus: {1321 // SKU匹配失败1322 SKU_MATCHED_FAIL: 'SKU_MATCHED_FAIL',1323 // 需人工审核1324 ORDER_RULE_FAIL: 'ORDER_RULE_FAIL',1325 // 物流分配失败1326 LOGISTICS_RULE_FAIL: 'LOGISTICS_RULE_FAIL',1327 // 运费计算失败1328 CALC_SHIPPING_FEE_FAIL: 'CALC_SHIPPING_FEE_FAIL',1329 // 预估利润过低1330 ESTIMATE_PROFIT: 'ESTIMATE_PROFIT',1331 // 获取跟踪单号失败1332 FETCH_TRACKING_NUMBER_FAIL: 'FETCH_TRACKING_NUMBER_FAIL',1333 // 已发货异常1334 PACKAGE_DELIVERED: 'PACKAGE_DELIVERED',1335 // 仓库取消发货1336 WAREHOURSE_CANCEL_DELIVERY: 'WAREHOURSE_CANCEL_DELIVERY',1337 // 包裹退件1338 PACKAGE_REJECT: 'PACKAGE_REJECT',1339 // 仓库分配失败1340 WAREHOUSE_RULE_FAIL: 'WAREHOUSE_RULE_FAIL',1341 // 黑名单匹配1342 ORDER_BLACKLIST_MATCHED: 'ORDER_BLACKLIST_MATCHED',1343 // 重置进行中1344 ORDER_RESET: 'ORDER_RESET',1345 // 搁置进行中1346 ORDER_SHELVE: 'ORDER_SHELVE '1347 },1348 // 订单平台枚举键1349 orderPlatform: {1350 SHOPIFY: 'SHOPIFY',1351 COD: 'COD',1352 COCOGENIE: 'COCOGENIE',1353 MANUAL: 'MANUAL'1354 },1355 // 订单合并状态枚举键1356 orderSplitOrUnion: {1357 UNION: 'UNION',1358 SPLIT: 'SPLIT'1359 },1360 // 订单中间状态枚举键1361 orderStopType: {1362 LOCK: 'LOCK',1363 VOID: 'VOID',1364 LOCKING: 'LOCKING',1365 VOIDING: 'VOIDING',1366 RESETING: 'RESETING',1367 GETTING: 'GETTING'1368 },1369 // 库存操作类型枚举键1370 stockOptType: {1371 IN_INVENTORY: 'IN_INVENTORY',1372 DELIVERY: 'DELIVERY',1373 PACKAGE_REFUND: 'PACKAGE_REFUND',1374 INVENTORY_PROFIT: 'INVENTORY_PROFIT',1375 INVENTORY_SHORTAGES: 'INVENTORY_SHORTAGES',1376 GIFT_IN_INVENTORY: 'GIFT_IN_INVENTORY',1377 INVENTORY_TRANSFER: 'INVENTORY_TRANSFER',1378 SAMPLE_IN: 'SAMPLE_IN',1379 SAMPLE_OUT: 'SAMPLE_OUT',1380 ALLOT_IN: 'ALLOT_IN',1381 ALLOT_OUT: 'ALLOT_OUT'1382 },1383 // 出入库枚举键1384 stockOutInEnums: {1385 OUTBOUND: 'OUTBOUND',1386 INBOUND: 'INBOUND'1387 },1388 // 包裹状态枚举键1389 packageStatus: {1390 DISTRIBUTED: 'DISTRIBUTED',1391 PICKING: 'PICKING',1392 PRINTED: 'PRINTED',1393 PENDING_WAREHOUSE: 'PENDING_WAREHOUSE',1394 DELIVERED: 'DELIVERED',1395 RECALLED: 'RECALLED',1396 WAITING_FOR_DISTRIBUTION: 'WAITING_FOR_DISTRIBUTION',1397 FORCE_RETURN_INVENTORY: 'FORCE_RETURN_INVENTORY'1398 },1399 // 包裹拣货类型枚举键1400 packagePickType: {1401 ONE2ONE: 'ONE2ONE',1402 ONE2MANY: 'ONE2MANY',1403 MANY2MANY: 'MANY2MANY',1404 BIG: 'BIG',1405 SPECIAL: 'SPECIAL',1406 FIXED: 'FIXED'1407 },1408 // 采购平台1409 purchasePlatform: {1410 ALI_1688: 'ALI_1688',1411 OFFLINE: 'OFFLINE',1412 JD: 'JD',1413 TAOBAO: 'TAOBAO',1414 TMALL: 'TMALL',1415 PINDUODUO: 'PINDUODUO'1416 },1417 // 采购方式1418 purchaseMode: {1419 ALI_1688: 'ALI_1688',1420 OFFLINE: 'OFFLINE',1421 JD: 'JD',1422 TAOBAO: 'TAOBAO',1423 TMALL: 'TMALL',1424 PINDUODUO: 'PINDUODUO'1425 },1426 // 采购结算方式1427 purchaseClearingMode: {1428 NET: 'NET',1429 COD: 'COD',1430 WEEK: 'WEEK',1431 HALF_MONTH: 'HALF_MONTH',1432 valMONTHue: 'MONTH',1433 PREPAID: 'PREPAID',1434 ALI: 'ALI',1435 PAY_AS_YOU_GO: 'PAY_AS_YOU_GO'1436 },1437 // 授信等级1438 creditGrade: {1439 LOW: 'LOW',1440 MIDDLE: 'MIDDLE',1441 HIGH: 'HIGH',1442 BLACK: 'BLACK'1443 },1444 // 供应商设置节点1445 supplierSettingMode: {1446 PRESALE_CREDIT_GRADE: 'PRESALE_CREDIT_GRADE'1447 },1448 purchaseUnPackStatus: {1449 NOT_START: 'NOT_START',1450 STARTED: 'STARTED'1451 },1452 offlineType: { // 停售类型1453 STOP_SALE: '停售',1454 STOP_CLEAR_SALE: '停售清仓'1455 },1456 offlineReason: { // 停售原因1457 INFRINGEMENT: '侵权',1458 TEST_FAILED: '测试失败',1459 REPEAT_SPU: '重复spu',1460 CHANGE_PRODUCT_POOL: '换产品池',1461 NO_SUPPLY: '无货源',1462 INFORMATION_INPUT_ERROR: '信息录入错误',1463 INACTIVE_SPU: '僵尸spu',1464 AMAZON_PRODUCTS_REMOVED: '亚马逊品下架'1465 }1466}1467let numKeys = {1468 platform: options.purchasePlatform.reduce(function (acc, currentValue) {1469 acc[currentValue.enumValue] = currentValue.label1470 return acc1471 }, {}),1472 purchaseType: options.purchaseMode.reduce(function (acc, currentValue) {1473 acc[currentValue.enumValue] = currentValue.label1474 return acc1475 }, {}),1476 // 结算方式1477 purchaseClearingMode: options.purchaseClearingMode.reduce(function (acc, currentValue) {1478 acc[currentValue.enumValue] = currentValue.label1479 return acc1480 }, {}),1481 purchaseUnPackStatus: options.purchaseUnPackStatus.reduce(function (acc, currentValue) {1482 acc[currentValue.enumValue] = currentValue.label1483 return acc1484 }, {})1485}1486let defaultValues = {1487 minPrice: 0,1488 maxPrice: 99999,1489 minQuantity: 0,1490 maxQuantity: 99991491}1492let sortOptOfIntercept = [{1493 label: '拦截时间',1494 value: 'interceptTime',1495 checked: true1496},1497{1498 label: '通知物流商时间',1499 value: 'interceptNotifyLogisticsTime',1500 checked: false1501},1502{1503 label: '拦截处理时间',1504 value: 'interceptHandleTime',1505 checked: false1506},1507{1508 label: '下单时间',1509 value: 'platformCreatedAt',1510 checked: false1511},1512{1513 label: '发货时间',1514 value: 'deliveredAt',1515 checked: false1516},1517{1518 label: '获取跟踪号时间',1519 value: 'fetchTrackingNumberAt',1520 checked: false1521}1522]1523export function GetItemByValue(options, value) {1524 const item = options.find(m => m[keys.optionKeys.VALUE] === value)1525 return item ? item : null1526}1527export function GetItemByEnumValue(options, value) {1528 const item = options.find(m => m[keys.optionKeys.ENUM_VALUE] === value)1529 return item ? item : null1530}1531export default {1532 common,1533 options,1534 keys,1535 numKeys,1536 defaultValues,1537 order: {1538 sortOptOfIntercept1539 }...

Full Screen

Full Screen

paymentMethod.js

Source:paymentMethod.js Github

copy

Full Screen

1/**2 * Created by WangQiHan on 2016/8/30.3 * Payment Method Format4 */5app.filter('paymentMethodFilter', function () {6 return function (val, key) {7 var paymentMethod = [8 { name: '未支付', ident: 'Unpay', enumValue: -2 },9 { name: '赠送', ident: 'Give', enumValue: -1},10 { name: '支付宝手机支付', ident: 'Alipay', enumValue: 0},11 { name: '支付宝手机网页支付', ident: 'AlipayWap', enumValue: 1 },12 { name: '支付宝扫码支付', ident: 'AlipayQr', enumValue: 2 },13 { name: '支付宝 PC 网页支付', ident: 'AlipayPcDirect', enumValue: 3 },14 { name: '百度钱包移动快捷支付', ident: 'Bfb', enumValue: 4 },15 { name: '百度钱包手机网页支付', ident: 'BfbWap', enumValue: 5},16 { name: '银联全渠道支付', ident: 'Upacp', enumValue: 6},17 { name: '银联全渠道手机网页支付', ident: 'UpacpWap', enumValue: 7 },18 { name: '银联 PC 网页支付', ident: 'UpacpPc', enumValue: 8},19 { name: '银联企业网银支付', ident: 'CpB2b', enumValue: 9},20 { name: '微信支付', ident: 'Wx', enumValue: 10 },21 { name: '微信公众账号支付', ident: 'WxPub', enumValue: 11},22 { name: '微信公众账号扫码支付', ident: 'WxPubQr', enumValue: 12},23 { name: '易宝手机网页支付', ident: 'YeepayWap', enumValue: 13 },24 { name: '京东手机网页支付', ident: 'JdpayWap', enumValue: 14},25 { name: '应用内快捷支付(银联)', ident: 'CnpU', enumValue: 15},26 { name: '应用内快捷支付(外卡)', ident: 'CnpF', enumValue: 16 },27 { name: 'Apple Pay', ident: 'ApplepayUpacp', enumValue: 17}28 ];29 for (var i = 0; i < paymentMethod.length; i++) {30 if (paymentMethod[i].enumValue == val) {31 return paymentMethod[i][key];32 }33 }34 }...

Full Screen

Full Screen

types-dto.models.ts

Source:types-dto.models.ts Github

copy

Full Screen

1import { EnumValue } from "./enum-value.models";2export interface TypesDto {3 musicTypes?: Array<EnumValue>;4 cuisineTypes?: Array<EnumValue>;5 amenityTypes?: Array<EnumValue>;6 ambianceTypes?: Array<EnumValue>;7 parkingTypes?: Array<EnumValue>;8 noiseLevels?: Array<EnumValue>;9 restaurantTypes?: Array<EnumValue>;10 reservationStatus?: Array<EnumValue>;11 pickupStatus?: Array<EnumValue>;12 deliveryStatus?: Array<EnumValue>;...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1import { enumValue } from 'ts-auto-mock/extension';2import { enumValue } from 'ts-auto-mock/extension';3export enum MyEnum {4}5const myEnumValue = enumValue(MyEnum);6const myEnumValue2 = enumValue(MyEnum);7export enum MyEnum {8}9import { enumValue } from 'ts-auto-mock/extension';10import { MyEnum } from './enum';11function getMyEnumValue() {12 return enumValue(MyEnum);13}14const myEnumValue = getMyEnumValue();15import { enumValue } from 'ts-auto-mock/extension';16import { MyEnum } from './enum';17function getMyEnumValue() {18 return enumValue(MyEnum);19}20const myEnumValue2 = getMyEnumValue();21import { reset } from 'ts-auto-mock/extension';22import { MyEnum } from './enum';23function getMyEnumValue() {24 return enumValue(MyEnum);25}26const myEnumValue = getMyEnumValue();27reset();28const myEnumValue2 = getMyEnumValue();

Full Screen

Using AI Code Generation

copy

Full Screen

1import {enumValue} from 'ts-auto-mock/enum';2import {MyEnum} from './enum';3describe('enumValue', () => {4 it('should return a value from the enum', () => {5 const result: MyEnum = enumValue(MyEnum);6 expect(result).toBeDefined();7 });8});9export enum MyEnum {10}11{12 "compilerOptions": {13 },14}15{16 "scripts": {17 },18 "dependencies": {19 },20 "devDependencies": {21 }22}23module.exports = {24 moduleNameMapper: {25 '^@/(.*)$': '<rootDir>/src/$1'26 },27 transform: {28 }29};

Full Screen

Using AI Code Generation

copy

Full Screen

1import { enumValue } from 'ts-auto-mock/extension';2enum TestEnum {3}4const testEnum = enumValue(TestEnum);5console.log(testEnum);6import { enumValue } from 'ts-auto-mock/extension';7enum TestEnum {8}9const testEnum = enumValue(TestEnum);10console.log(testEnum);11import { enumValue } from 'ts-auto-mock/extension';12enum TestEnum {13}14const testEnum = enumValue(TestEnum);15console.log(testEnum);16import { enumValue } from 'ts-auto-mock/extension';17enum TestEnum {18}19const testEnum = enumValue(TestEnum);20console.log(testEnum);21import { enumValue } from 'ts-auto-mock/extension';22enum TestEnum {23}24const testEnum = enumValue(TestEnum);25console.log(testEnum);26import { enumValue } from 'ts-auto-mock/extension';27enum TestEnum {28}29const testEnum = enumValue(TestEnum);30console.log(testEnum);31import { enumValue } from 'ts-auto-mock/extension';32enum TestEnum {33}34const testEnum = enumValue(TestEnum);35console.log(testEnum);36import { enumValue } from 'ts-auto-mock/extension';37enum TestEnum {38}39const testEnum = enumValue(TestEnum);40console.log(testEnum);41import {

Full Screen

Using AI Code Generation

copy

Full Screen

1import { enumValue } from 'ts-auto-mock/enum';2import { MyEnum } from './enum';3const myEnum: MyEnum = enumValue(MyEnum);4import { enumValue } from 'ts-auto-mock/enum';5import { MyEnum } from './enum';6const myEnum: MyEnum = enumValue(MyEnum);7import { enumValue } from 'ts-auto-mock/enum';8import { MyEnum } from './enum';9const myEnum: MyEnum = enumValue(MyEnum, 0);

Full Screen

Using AI Code Generation

copy

Full Screen

1const {enumValue} = require('ts-auto-mock/extension');2enum MyEnum {3}4const myEnum: MyEnum = enumValue(MyEnum);5const {enumValue} = require('ts-auto-mock/extension');6enum MyEnum {7}8const myEnum: MyEnum = enumValue(MyEnum);9const {enumValue} = require('ts-auto-mock/extension');10enum MyEnum {11}12const myEnum: MyEnum = enumValue(MyEnum);13const myEnum = 'A';14const myEnum = 'B';15const myEnum = 'A';16module.exports = {17 {18 targets: {19 },20 },21 {22 enum: {23 },24 },25};26module.exports = {27 {28 targets: {29 },30 },31 {32 enum: {33 },34 },35};36I have a plugin that adds a custom import to a file on the fly. I want to be able to add the import to a file that is already open in the editor, but I can’t seem to find an API to do that. The closest I’ve found is the “import” command, but that doesn’t seem to work with custom imports. Is there an API to do this

Full Screen

Using AI Code Generation

copy

Full Screen

1import { enumValue } from 'ts-auto-mock/extension';2import { MyEnum } from './enum';3export const myEnum = enumValue(MyEnum);4export enum MyEnum {5}6import { myEnum } from './test1';

Full Screen

Using AI Code Generation

copy

Full Screen

1import { enumValue } from 'ts-auto-mock/enum';2import { createMock } from 'ts-auto-mock';3export enum TestEnum {4}5describe('test enum', () => {6 it('enumValue', () => {7 const mock = createMock<TestEnum>();8 expect(mock).toBe(enumValue(TestEnum));9 });10});

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run ts-auto-mock automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful