market.js 20.7 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
//exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.240:8088/platform'; 
//exports.domain = 'http://172.16.6.162:8088/platform';
//exports.domain = 'http://172.16.6.108:8088/platform';//谭玲
//exports.domain = 'http://172.16.6.201:8088/platform';//谭玲
exports.domain = 'http://172.16.6.250:2081/platform';//庞洁
//exports.domain = 'http://172.16.6.189:8088/platform';//李建

//营销管理路由配置
exports.res = [
    {
        //营销码管理 -> 页面渲染
        route: '/market/coupon/index',
        method: 'GET',
        view: 'pages/market/index',
        src: '/market/coupon',
        noApi: true,
        data: {
            pageTitle: '优惠码列表',
            filter: true,
            createUrl: '/market/coupon/add',
            gridurl: '/market/coupon/getPromotion'
            // tabUrl: '/getCodeCount',
            // sendUrl: '/sendPromotion',
            // auditUrl: '/auditPromotion'
        }
    },
    {
        //营销码管理 -> 列表数据
        route: '/market/coupon/getPromotion',
        method: 'POST',
        url: '/promotioncode/getPromotionCodeList',
        isJsonRaw: true,
        params: [{
            name: 'status',
            type: 'Number'
        }, {
            name: 'page',
            type: 'Number'
        }, {
            name: 'size',
            type: 'Number'
        }, {
            name: 'batchNo',
            type: 'Number'
        }, {
            name: 'name',
            type: 'String'
        }, {
            name: 'reqDepartment',
            type: 'String'
        }]
    }, {
        //营销码管理 -> 列表操作
        route: '/market/coupon/auditPromotion',
        method: 'POST',
        url: '/promotioncode/auditPromotionCode',
        isJsonRaw: true,
        params: [{
            name: 'id',
            type: 'Number'
        }, {
            name: 'status',
            type: 'Number'
        }, {
            name: 'reason',
            type: 'String'
        }]
    }, {
        //营销码管理 -> 发放列表
        route: '/market/coupon/sendPromotion',
        method: 'POST',
        url: '/promotioncode/getPromotionCodeSendList',
        isJsonRaw: true,
        params: [{
            name: 'auditTime',
            type: 'String'
        }]
    }, {
        //营销码管理 -> tab卡数据
        route: '/market/coupon/getCodeCount',
        method: 'POST',
        url: '/promotioncode/getPromotionCodeCountByStatus',
        isJsonRaw: true,
        params: [{
            name: 'reqDepartment',
            type: 'String'
        }, {
            name: 'name',
            type: 'String'
        }, {
            name: 'batchNo',
            type: 'Number'
        }]
    }, {
        //营销码管理 -> 添加优惠码页面渲染
        route: '/market/coupon/add',
        method: 'GET',
        view: 'pages/market/coupon-edit',
        src: '/market/coupon-edit',
        data: {
            action: "/market/coupon/addCode",
            type: "add",
            data: {
                limitTimes: "0",
                reqDepartment: "零售部/营销策划",
                userSourceLimit: "1",
                userTypeLimit: "1",
                userUseLimit: "1",
                staff: "admin",
                status: "0"
            }
        }
    }, {
        //营销码管理 -> 添加优惠码
        route: '/market/coupon/addCode',
        method: 'POST',
        url: '/promotioncode/addPromotionCode',
        isJsonRaw: true,
        params: [{
            name: 'name',
            type: 'String'
        }, {
            name: 'limitTimes',
            type: 'String'
        }, {
            name: 'code',
            type: 'String'
        }, {
            name: 'describe',
            type: 'String'
        }, {
            name: 'promotionInfo',
            type: 'String'
        }, {
            name: 'userSourceLimit',
            type: 'String'
        }, {
            name: 'userTypeLimit',
            type: 'String'
        }, {
            name: 'creatorId',
            type: 'String'
        }, {
            name: 'limitDateFrom',
            type: 'String'
        }, {
            name: 'limitDateTo',
            type: 'String'
        }, {
            name: 'createTime',
            type: 'String'
        }, {
            name: 'reqDepartment',
            type: 'String'
        }, {
            name: 'status',
            type: 'String'
        }, {
            name: 'staff',
            type: 'String'
        }]
    }, {
        //营销码管理 -> 编辑优惠码页面渲染
        route: '/market/coupon/update/:id',
        method: 'GET',
        view: 'pages/market/coupon-edit',
        url: '/promotioncode/getPromotionCode',
        isJsonRaw: true,
        data: {
            action: "/market/coupon/updateCode",
            type: "update"
        },
        src: '/market/coupon-edit',
        params: [{
            name: "id",
            type: "String"
        }]
    }, {
        //营销码管理 -> 优惠码详情
        route: '/market/coupon/info/:id',
        method: 'GET',
        view: 'pages/market/coupon-edit',
        url: '/promotioncode/getPromotionCode',
        isJsonRaw: true,
        src: '/market/coupon-edit',
        data: {
            type: "info"
        },
        params: [{
            name: "id",
            type: "String"
        }]
    }, {
        //营销码管理 -> 验证优惠码
        route: '/market/coupon/checkPromotionCode',
        method: 'POST',
        url: '/promotioncode/checkPromotionCode',
        isJsonRaw: true,
        params: [{
            name: 'code',
            type: 'String'
        }]
    }, {
        //营销码管理 -> 编辑优惠码
        route: '/market/coupon/updateCode',
        method: 'POST',
        url: '/promotioncode/updatePromotionCode',
        isJsonRaw: true,
        params: [{
            name: 'id',
            type: 'String'
        }, {
            name: 'name',
            type: 'String'
        }, {
            name: 'limitTimes',
            type: 'String'
        }, {
            name: 'code',
            type: 'String'
        }, {
            name: 'describe',
            type: 'String'
        }, {
            name: 'promotionInfo',
            type: 'String'
        }, {
            name: 'userSourceLimit',
            type: 'String'
        }, {
            name: 'userTypeLimit',
            type: 'String'
        }, {
            name: 'creatorId',
            type: 'String'
        }, {
            name: 'limitDateFrom',
            type: 'String'
        }, {
            name: 'limitDateTo',
            type: 'String'
        }, {
            name: 'createTime',
            type: 'String'
        }, {
            name: 'reqDepartment',
            type: 'String'
        }, {
            name: 'status',
            type: 'String'
        }]
    },
    /*******************************************************************/
    {
        //限购码管理 -> 页面渲染
        route: '/market/limitcode/index',
        method: 'GET',
        view: 'pages/market/index',
        src: '/market/limitcode',
        noApi: true,
        data: {
            pageTitle: '限购码列表',
            filter: true,
            createUrl: '/market/limitcode/add',
            gridurl: '/limitCode/getLimitCodeList',
            limitcode:true
        }
    }, {
        //限购码管理 -> 限购码列表
        route: '/limitCode/getLimitCodeList',
        method: 'POST',
        url: '/limitCode/getLimitCodeList',
        isJsonRaw: true,
        params: [{
            name: 'status',
            type: 'Number'
        }, {
            name: 'page',
            type: 'Number'
        }, {
            name: 'size',
            type: 'Number'
        }, {
            name: 'batchNo',
            type: 'String'
        }, {
            name: 'name',
            type: 'String'
        }, {
            name: 'reqDepartment',
            type: 'String'
        }, {
            name: 'sku',
            type: 'String'
        }, {
            name: 'skn',
            type: 'String'
        }]
    }, {
        //限购码管理 -> 添加限购码页面渲染
        route: '/market/limitcode/add',
        method: 'GET',
        view: 'pages/market/limitcode-edit',
        data: {
            action: "/limitCode/addLimitCode",
            type: "add",
            data: {
                reqDepartment: "零售部/营销策划",
                limitTimes: 1,
                userUseLimit: 1,
                userTypeLimit: '新注册|注册未购买|普通会员|银卡会员|金卡会员|白金会员'
            }
        },
        src: '/market/limitcode-edit'
    }, {
        //限购码管理 -> 添加限购码
        route: '/limitCode/addLimitCode',
        method: 'POST',
        url: '/limitCode/addLimitCode',
        isJsonRaw: true,
        params: [{
            name: "name",
            type: "String"
        }, {
            name: "limitTimes",
            type: "Number"
        }, {
            name: "reqDepartment",
            type: "String"
        }, {
            name: "limitDateFrom",
            type: "String"
        }, {
            name: "limitDateTo",
            type: "String"
        }, {
            name: "describe",
            type: "String"
        }, {
            name: "userUseLimit",
            type: "Number"
        }, {
            name: "userTypeLimit",
            type: "String"
        }, {
            name: "limitSkn",
            type: "String"
        }, {
            name: "creatorName",
            type: "String"
        }, {
            name: "creatorId",
            type: "Number"
        }, {
            name: "status",
            type: "Number"
        }, {
            name: "skus",
            type: "string"
        }, {
            name: "skuTimes",
            type: "string"
        }, {
            name: "limitCodeType",
            type: "string"
        }]
    },{
        //检查SKN的合法性并且获得其下的所有SKU
        route: '/limitCode/checkSknValidity',
        method: 'POST',
        url: '/limitCode/checkSknValidity',
        params:[
            {name: "skn", type: "string"},
            {name: "id", type: "string"}
        ]
    }, {
        //限购码管理 -> 查看限购码页面渲染
        route: '/market/limitcode/info/:id',
        method: 'GET',
        view: 'pages/market/limitcode-info',
        url: "/limitCode/getLimitCode",
        src: "/market/limitcode-info",
        isJsonRaw: true,
        params: [{
            name: 'id',
            type: 'String'
        }]
    }, {
        //限购码管理 -> 修改限购码页面渲染
        route: '/market/limitcode/update/:id',
        method: 'GET',
        view: 'pages/market/limitcode-edit',
        url: "/limitCode/getLimitCode",
        src: '/market/limitcode-edit',
        isJsonRaw: true,
        data: {
            action: "/limitCode/updateLimitCode",
            type: "update",
        },
        params: [{
            name: 'id',
            type: 'String'
        }]
    }, {
        route:'/limitCode/getLimitCode',
        method:'POST',
        url:'/limitCode/getLimitCode',
        params:[
            {name:'id', type:'string'}
        ]
    },{
        //限购码管理 -> 编辑限购码页面渲染
        route: '/market/limitcode/edit/:id',
        method: 'GET',
        view: 'pages/market/limitcode-edit',
        //url: "/limitCode/getLimitCode",
        src: '/market/limitcode-edit',
        //isJsonRaw: true,
        data: {
            action: "/limitCode/updateLimitCode",
            type: "edit",
        },
        params: [{
            name: 'id',
            type: 'String'
        }]
    }, {
        //限购码管理 -> 编辑限购码接口
        route: '/limitCode/updateLimitCode',
        method: 'POST',
        url: '/limitCode/updateLimitCode',
        isJsonRaw: true,
        params: [{
            name: "name",
            type: "String"
        }, {
            name: "limitTimes",
            type: "Number"
        }, {
            name: "reqDepartment",
            type: "String"
        }, {
            name: "limitDateFrom",
            type: "String"
        }, {
            name: "limitDateTo",
            type: "String"
        }, {
            name: "describe",
            type: "String"
        }, {
            name: "userUseLimit",
            type: "Number"
        }, {
            name: "userTypeLimit",
            type: "String"
        }, {
            name: "limitSkn",
            type: "String"
        }, {
            name: "creatorName",
            type: "String"
        }, {
            name: "creatorId",
            type: "Number"
        }, {
            name: "status",
            type: "Number"
        }, {
            name: "id",
            type: "Number"
        }, {
            name: "batchNo",
            type: "Number"
        }, {
            name: "limitCodeType",
            type: "string"
        }, {
            name: "skuTimes",
            type: "string"
        }, {
            name: "skus",
            type: "string"
        }]
    }, {
        //限购码管理 -> 修改限购码接口
        route: '/limitCode/auditLimitCode',
        method: 'POST',
        view: 'pages/limitcode/info',
        url: "/limitCode/auditLimitCode",
        isJsonRaw: true,
        params: [{
            name: 'id',
            type: 'Number'
        }, {
            name: 'status',
            type: 'Number'
        }, {
            name: 'reason',
            type: 'String'
        }]
    }, {
        //限购码管理 -> tab卡数据
        route: '/limitCode/getLimitCodeCountByStatus',
        method: 'POST',
        url: '/limitCode/getLimitCodeCountByStatus',
        isJsonRaw: true,
        params: [{
            name: 'reqDepartment',
            type: 'String'
        }, {
            name: 'name',
            type: 'String'
        }, {
            name: 'batchNo',
            type: 'Number'
        }]
    },
    /*************************************************************************/
    {
        //vip累计金额翻倍 -> 列表页面渲染
        route: '/market/vipamount/index',
        method: 'GET',
        view: 'pages/market/index',
        src: '/market/vipamount',
        noApi: true,
        data: {
            pageTitle: 'vip累计金额翻倍',
            createUrl: '/market/vipamount/add',
            gridurl: '/market/vipamount/list'
        }
    }, {
        //vip累计金额翻倍 -> 列表数据
        route: '/market/vipamount/list',
        method: 'POST',
        //url: '/activity/queryActivityList',
        apis: {
            vipList: {
                url: '/activity/queryActivityList',
                params: [{
                    name: 'type',
                    type: 'Number'
                }, {
                    name: 'size',
                    type: 'Number'
                }, {
                    name: 'page',
                    type: 'Number'
                }],
                isJsonRaw: true
            },
            activity: {
                url: '/activity/queryActivityList',
                params: [{
                    name: 'status',
                    type: 'Number',
                    def: 0
                }],
                isJsonRaw: true
            }
        }

    }, {
        //vip累计金额翻倍 -> 添加页面渲染
        route: '/market/vipamount/add',
        method: 'GET',
        view: 'pages/market/vipamount-edit',
        src: '/market/vipamount-edit',
        data: {
            action: '/market/vipamount/save',
        }
    }, {
        //vip累计金额翻倍 -> 添加编辑活动
        route: '/market/vipamount/save',
        method: 'POST',
        url: '/activity/saveActivity',
        isJsonRaw: true,
        params: [{
            name: 'id',
            type: 'Number'
        }, {
            name: 'num',
            type: 'Number'
        }, {
            name: 'title',
            type: 'String'
        }, {
            name: 'startTime',
            type: 'Number'
        }, {
            name: 'endTime',
            type: 'Number'
        }, {
            name: 'type',
            type: 'Number'
        }, {
            name: 'status',
            type: 'Number'
        }]
    },
    /***********************************************************/
    {
        //发券管理列表页渲染
        route: "/market/couponSend/index",
        method: "GET",
        view: "pages/market/couponSend",
        src: "/market/couponSend"
    },
    {
        //发券管理列表
        route: "/coupon/querySendCouponList",
        method: "POST",
        url: "/coupon/querySendCouponList",
        params: [
            {name: "couponType", type: "number"},
            {name: "couponId", type: "number"},
            {name: "couponName", type: "string"},
            {name: "department", type: "number"},
            {name: "page", type: "number"},
            {name: "size", type: "number"},
            {name: "startTimeStr", type: "number"},
            {name: "endTimeStr", type: "number"}
        ]
    },
    {
        //发券页渲染
        route: "/market/couponSend/send/:param",
        method: "GET",
        view: "pages/market/sendCoupon",
        src: "/market/sendCoupon"
    },
    {
        //查询文件发券列表
        route: "/couponSendInfo/getListByCouponId",
        method: "POST",
        url: "/couponSendInfo/getListByCouponId",
        params: [
            {name: "couponId", type: "number"}
        ]
    },
    {
        //手工发券
        route: "/coupon/sendCoupon",
        method: "POST",
        url: "/coupon/sendCoupon",
        params: [
            {name: "couponId", type: "number"},
            {name: "uids", type: "string"}
        ]
    },
    {
        //文件上传重发
        route: "/couponSendInfo/sendAgainById",
        method: "POST",
        url: "/couponSendInfo/sendAgainById",
        params: [
            {name: "id", type: "number"}
        ]
    },
    {
        //发放记录页面渲染
        route: "/market/couponSend/sendHistory/:param",
        method: "GET",
        view: "pages/market/sendHistory",
        src: "/market/sendHistory"
    },
    {
        //查询用户券列表
        route: "/couponLogs/queryUserCouponLogsList",
        method: "POST",
        url: "/couponLogs/queryUserCouponLogsList",
        params: [
            {name: "page", type: "number"},
            {name: "size", type: "number"},
            {name: "couponId", type: "number"},
            {name: "couponCode", type: "string"},
            {name: "couponName", type: "string"},
            {name: "couponId", type: "number"},
            {name: "orderCode", type: "number"},
            {name: "uid", type: "number"}
        ]
    },
    {
        //优惠券使用历史页面渲染
        route: "/market/couponSend/useHistory/:param",
        method: "GET",
        view: "pages/market/useHistory",
        src: "/market/useHistory"
    },
    {
        //优惠券查询页面渲染
        route: "/market/queryCoupon/index",
        method: "GET",
        view: "pages/market/queryCoupon",
        src: "/market/queryCoupon"
    },
    {
        //延长优惠券有效期
        route: "/couponLogs/delayUserCoupon",
        method: "POST",
        url: "/couponLogs/delayUserCoupon",
        params: [
            {name: "id", type: "number"},
            {name: "endTime", type: "number"}
        ]
    },
    {
        //手工退券
        route: "/couponLogs/cancelCouponUse",
        method: "POST",
        url: "/couponLogs/cancelCouponUse",
        params: [
            {name: "id", type: "number"}
        ]
    },
    /****************************************优惠券管理********************/
    {
        //优惠券管理页面渲染
        route: "/market/couponList/index",
        method: "GET",
        view: "pages/market/couponList",
        src: "/market/couponList",
        data: {
            createUrl: "/market/couponList/add"
        }
    },
    {
        //优惠券列表
        route: "/coupon/queryCouponList",
        method: "POST",
        url: "/coupon/queryCouponList",
        params: [
            {name: "page", type: "number"},
            {name: "size", type: "number"},
            {name: "couponId", type: "number"},
            {name: "department", type: "number"},
            {name: "couponName", type: "string"},
            {name: "status", type: "number"}
        ]
    },
    {
        //优惠券列表新增页面渲染
        route: "/market/couponList/add",
        method: "GET",
        view: "pages/market/couponListAdd",
        src: "/market/couponListAdd",
        data: {
            type: "add",
            actions: ""
        }
    },
    {
        //优惠券列表编辑页面渲染
        route: "/market/couponList/add",
        method: "POST",
        url: "pages/market/couponListAdd",

        data: {
            type: "add",
            actions: ""
        }
    }
];