Exemplo n.º 1
0
    def test_2_recharge_different_sku_st_return_part(self):
        """
       同条码不同SKU,部分退货
        :return:
        """
        logging.debug("test_2_recharge_different_sku_st_return_part")
        if globals()['shopping_order_id'] is not None:
            return_order_id = globals()['shopping_order_id'] + "_2"
            recharge_param={
                'main_order_id':globals()['shopping_order_id'],
                'return_price':'6144.00','reason':'拍错/不想要',
                'remarks':'萨范德','afterSales_info[0][order_id]':return_order_id ,
                'afterSales_info[0][danjia]':'6400.00',
                'afterSales_info[0][sku_name]':'孟伟组合商品',
                'afterSales_info[0][sku_detail]':'2件商品',
                'afterSales_info[0][tiaoma]':'ZH02B215190T796242',
                'afterSales_info[0][kuanhao]':'',
                'afterSales_info[0][sku_id]':'5955',
                'afterSales_info[0][img]':'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg','afterSales_info[0][aftersale_num]':'1',
                'afterSales_info[0][aftersale_money]':'6144.00',
                'afterSales_info[0][goods_type]':'2'

            }
            market_service.return_order(recharge_param)
            # 更新充值后的验证数据
            self._test_data.update_post_verify_data()
            # 封装验证值
            self.expectedData(-6144 # 会员消费额
                              , 0  # 会员积分
                              , 2  # 会员卡等级
                              , 6144  # 会员余额
                              , 0  # 总揽到店次数
                              , 0  # 总揽新增会员数
                              , 0  # 总揽订单数
                              , 1  # 总揽退单数
                              , -6144  # 总揽销售总额
                              , 0  # M216C237C0458总仓库存
                              , 0  # M216C237C0464总仓库存
                              , 0  # M116E248B0158总仓库存
                              , 0  # M116E248B0164总仓库存
                              , 0  # M316J232B01106总仓库存
                              , 0  # M316J232B0176总仓库存
                              , 1  # ZH02B215190T796242总仓库存
                              , -0.61  # 验证值
                              , 3  # M216C237C0458门店库存
                              , 0  # M216C237C0464门店库存
                              , 1  # M116E248B0158门店库存
                              , 0  # M116E248B0164门店库存
                              , 0  # M316J232B01106门店库存
                              , 0  # M316J232B0176门店库存
                              , 0  # ZH02B215190T796242门店库存
                              , 0  # 门店到店次数期待增加值
                              , 0  # 门店新增会员数期待增加值
                              , 0  # 门店订单数期待增加值
                              , 1  # 门店退单数期待增加值
                              , -6144  # 门店销售总额期待增加值
                              ,-6144  # 门店平台销售总额期待增加值
                              )
            # 验证数据
            self._data_assertion()
    def test_2_return_sameCodeAndBar_order(self):
        """
         pos方式门店总仓混合下单退全部相同条款款号的商品
         3件组合商品全退
        :return:
        """
        logging.debug("test_2_return_sameCodeAndBar_order")
        return_order_id_a = globals()['shopping_order_id'] + "_0"
        return_order_id_b = globals()['shopping_order_id'] + "_1"
        return_order_id_c = globals()['shopping_order_id'] + "_2"
        order_param = {'main_order_id': globals()['shopping_order_id'], 'return_price': '18432.00', 'reason': '15天无理由退货', 'remarks': 'fff', 'afterSales_info[0][order_id]': return_order_id_c,
                       'afterSales_info[0][danjia]': '6400.00', 'afterSales_info[0][sku_name]': '孟伟组合商品', 'afterSales_info[0][sku_detail]': '2件商品', 'afterSales_info[0][tiaoma]': 'ZH02B215190T796242',
                       'afterSales_info[0][kuanhao]': '', 'afterSales_info[0][sku_id]': '5955', 'afterSales_info[0][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
                       'afterSales_info[0][aftersale_num]': '1', 'afterSales_info[0][aftersale_money]': '6144.00', 'afterSales_info[0][goods_type]': '2', 'afterSales_info[1][order_id]': return_order_id_b,
                       'afterSales_info[1][danjia]': '6400.00', 'afterSales_info[1][sku_name]': '孟伟组合商品', 'afterSales_info[1][sku_detail]': '2件商品', 'afterSales_info[1][tiaoma]': 'ZH02B215190T796242',
                       'afterSales_info[1][kuanhao]': '', 'afterSales_info[1][sku_id]': '5955', 'afterSales_info[1][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
                       'afterSales_info[1][aftersale_num]': '1', 'afterSales_info[1][aftersale_money]': '6144.00', 'afterSales_info[1][goods_type]': '2', 'afterSales_info[2][order_id]': return_order_id_a,
                       'afterSales_info[2][danjia]': '6400.00', 'afterSales_info[2][sku_name]': '孟伟组合商品', 'afterSales_info[2][sku_detail]': '2件商品', 'afterSales_info[2][tiaoma]': 'ZH02B215190T796242',
                       'afterSales_info[2][kuanhao]': '', 'afterSales_info[2][sku_id]': '5955', 'afterSales_info[2][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
                       'afterSales_info[2][aftersale_num]': '1', 'afterSales_info[2][aftersale_money]': '6144.00', 'afterSales_info[2][goods_type]': '2',
                       }
        market_service.return_order(order_param)
        # market_service.return_order_success(aftersaleid)
        # 更新充值后的验证数据
        self._test_data.update_post_verify_data()
        # 封装期待值
        self.expectedData(-18432  # 会员消费额
                          ,-18432  # 会员积分
                          , 2  # 会员卡等级
                          , 0  # 会员余额
                          , 0  # 总揽到店次数
                          , 0  # 总揽新增会员数
                          , 0  # 总揽订单数
                          , 1  # 总揽退单数
                          , -18432  # 总揽销售总额
                          , 0  # M216C237C0458总仓库存
                          , 0  # M216C237C0464总仓库存
                          , 0  # M116E248B0158总仓库存
                          , 0  # M116E248B0164总仓库存
                          , 0  # M316J232B01106总仓库存
                          , 0  # M316J232B0176总仓库存
                          , 3  # ZH02B215190T796242总仓库存
                          , -1.84  # 验证值
                          , 9  # M216C237C0458门店库存
                          , 0  # M216C237C0464门店库存
                          , 3  # M116E248B0158门店库存
                          , 0  # M116E248B0164门店库存
                          , 0  # M316J232B01106门店库存
                          , 0  # M316J232B0176门店库存
                          , 0  # ZH02B215190T796242门店库存
                          , 0  # 门店到店次数期待增加值
                          , 0  # 门店新增会员数期待增加值
                          , 0  # 门店订单数期待增加值
                          , 0  # 门店退单数期待增加值
                          , -18432 # 门店销售总额期待增加值
                          , -18432  # 门店平台销售总额期待增加值
                          )

        # 验证数据
        self._data_assertion()
Exemplo n.º 3
0
    def test_3_return_other(self):
        """
        退货1件组合商品
        ZH02B215190T796242   1件
        1件选择 深蓝色 58 和黑色 58
        退腰背夹M216C237,深蓝色,58 2个
        :return:
        """
        logging.debug("test_3_return_other")
        if globals()['shopping_order_id'] is not None:
            return_order_id0 = globals()['shopping_order_id'] + "_0"
            return_order_id2 = globals()['shopping_order_id'] + "_2"
            return_param = {'main_order_id': globals()['shopping_order_id'], 'return_price': '12633.60', 'reason': '拍错/不想要', 'remarks':'人体内', 'afterSales_info[0][order_id]': return_order_id2, 'afterSales_info[0][danjia]':'6400.00',
                            'afterSales_info[0][sku_name]': '孟伟组合商品', 'afterSales_info[0][sku_detail]': '2件商品', 'afterSales_info[0][tiaoma]':'ZH02B215190T796242', 'afterSales_info[0][kuanhao]': '',
                            'afterSales_info[0][sku_id]': '5955', 'afterSales_info[0][img]':'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg', 'afterSales_info[0][aftersale_num]': '1',
                            'afterSales_info[0][aftersale_money]': '6144.00', 'afterSales_info[0][goods_type]': '2', 'afterSales_info[1][order_id]':return_order_id0, 'afterSales_info[1][danjia]': '3380.00',
                            'afterSales_info[1][sku_name]': '腰背夹', 'afterSales_info[1][sku_detail]': '深蓝色 58', 'afterSales_info[1][tiaoma]':'M216C237C0458', 'afterSales_info[1][kuanhao]': 'M216C237',
                            'afterSales_info[1][sku_id]': '4878', 'afterSales_info[1][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019010579241063815.jpg' ,'afterSales_info[1][aftersale_num]': '2',
                            'afterSales_info[1][aftersale_money]': '6489.60', 'afterSales_info[1][goods_type]': '1'}

            market_service.return_order(return_param)
            # 更新充值后的验证数据
            self._test_data.update_post_verify_data()
            # 验证值
            self.expectedData(-12634 # 会员消费额
                              , -12634 # 会员积分
                              , 2 # 会员卡等级
                              , 0 # 会员余额
                              , 0 # 总揽到店次数
                              , 0 # 总揽新增会员数
                              , 0 # 总揽订单数
                              , 0 # 总揽退单数
                              , -12633.60 # 总揽销售总额
                              , 0 # M216C237C0458总仓库存
                              , 0 # M216C237C0464总仓库存
                              , 0 # M116E248B0158总仓库存
                              , 0 # M116E248B0164总仓库存
                              , 0 # M316J232B01106总仓库存
                              , 0 # M316J232B0176总仓库存
                              , 1 # ZH02B215190T796242总仓库存
                              , -1.26 # 验证值
                              , 5 # M216C237C0458门店库存
                              , 0 # M216C237C0464门店库存
                              , 1 # M116E248B0158门店库存
                              , 0 # M116E248B0164门店库存
                              , 0 # M316J232B01106门店库存
                              , 0 # M316J232B0176门店库存
                              , 0 # ZH02B215190T796242门店库存
                              , 0 # 门店到店次数期待增加值
                              , 0 # 门店新增会员数期待增加值
                              , 0 # 门店订单数期待增加值
                              , 0 # 门店退单数期待增加值
                              , -12633.60 # 门店销售总额期待增加值
                              , -12633.60 # 门店平台销售总额期待增加值
                              )
            # 验证数据
            self._data_assertion()
 def test_3_ChargeSimpleAndComplex_Return_part(self):
     """
     组合商品与普通商品余额方式门店混合
     部分退货(退2件组合商品‘孟伟组合商品’:ZH02B215190T796242)
     :return:
     """
     logging.debug("test_5_ChargeSimpleAndComplex_Return_part")
     if globals()['shopping_order_id'] is not None:
         return_order_a = globals()['shopping_order_id']
         return_order_b = globals()['shopping_order_id'] + "_2"
         return_order_c = globals()['shopping_order_id'] + "_1"
         recharge_param = {'main_order_id': return_order_a, 'return_price': '12288.00', 'reason': '拍错/不想要', 'remarks': 'gg', 'afterSales_info[0][order_id]': return_order_b, 'afterSales_info[0][danjia]': '6400.00',
                           'afterSales_info[0][sku_name]': '孟伟组合商品', 'afterSales_info[0][sku_detail]': '2件商品', 'afterSales_info[0][tiaoma]':'ZH02B215190T796242', 'afterSales_info[0][kuanhao]': '',
                           'afterSales_info[0][sku_id]': '5955', 'afterSales_info[0][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg', 'afterSales_info[0][aftersale_num]': '1',
                           'afterSales_info[0][aftersale_money]': '6144.00', 'afterSales_info[0][goods_type]': '2', 'afterSales_info[1][order_id]': return_order_c, 'afterSales_info[1][danjia]': '6400.00',
                           'afterSales_info[1][sku_name]': '孟伟组合商品', 'afterSales_info[1][sku_detail]': '2件商品', 'afterSales_info[1][tiaoma]':'ZH02B215190T796242', 'afterSales_info[1][kuanhao]': '',
                           'afterSales_info[1][sku_id]': '5955', 'afterSales_info[1][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg', 'afterSales_info[1][aftersale_num]': '1',
                           'afterSales_info[1][aftersale_money]': '6144.00', 'afterSales_info[1][goods_type]': '2'
                           }
         market_service.return_order(recharge_param)
         # 更新充值后的验证数据
         self._test_data.update_post_verify_data()
         # 封装验证值
         self.expectedData(-12288  # 会员消费额
                           , 0  # 会员积分
                           , 2  # 会员卡等级
                           , 12288  # 会员余额
                           , 0  # 总揽到店次数
                           , 0  # 总揽新增会员数
                           , 0  # 总揽订单数
                           , 1  # 总揽退单数
                           , -12288  # 总揽销售总额
                           , 0  # M216C237C0458总仓库存
                           , 0  # M216C237C0464总仓库存
                           , 0  # M116E248B0158总仓库存
                           , 0  # M116E248B0164总仓库存
                           , 0  # M316J232B01106总仓库存
                           , 0  # M316J232B0176总仓库存
                           , 2  # ZH02B215190T796242总仓库存
                           , -1.23  # 验证值
                           , 6  # M216C237C0458门店库存
                           , 0  # M216C237C0464门店库存
                           , 2  # M116E248B0158门店库存
                           , 0  # M116E248B0164门店库存
                           , 0  # M316J232B01106门店库存
                           , 0  # M316J232B0176门店库存
                           , 0  # ZH02B215190T796242门店库存
                           , 0  # 门店到店次数期待增加值
                           , 0  # 门店新增会员数期待增加值
                           , 0  # 门店订单数期待增加值
                           , 2  # 门店退单数期待增加值
                           ,-12288  # 门店销售总额期待增加值
                           , -12288  # 门店平台销售总额期待增加值
                           )
         # 验证数据
         self._data_assertion()
    def test_4_ChargeSimpleAndComplex_Exchange_other(self):
        """
        组合商品与普通商品余额方式门店混合,换的部分退货
        :return:
        """
        logging.debug("test_6_ChargeSimpleAndComplex_Exchange_other")
        if globals()['shopping_order_id'] is not None:
            exchange_order = market_service.find_order_id(globals()['shopping_order_id'], self._customer.member_number)
            exchange_order_a = exchange_order + '_0'

            recharge_param = {
              'main_order_id': exchange_order, 'return_price': '0.00', 'reason': '拍错/不想要', 'remarks': '',
              'afterSales_info[0][order_id]': exchange_order_a, 'afterSales_info[0][danjia]': '3380.00',
              'afterSales_info[0][sku_name]': '腰背夹', 'afterSales_info[0][sku_detail]': '深蓝色 64',
              'afterSales_info[0][tiaoma]': 'M216C237C0464', 'afterSales_info[0][kuanhao]': 'M216C237',
              'afterSales_info[0][sku_id]': '4879', 'afterSales_info[0][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019010579241063815.jpg',
              'afterSales_info[0][aftersale_num]': '2',
              'afterSales_info[0][aftersale_money]': '0.00', 'afterSales_info[0][goods_type]': '1',
            }
            market_service.return_order(recharge_param)
            # 更新充值后的验证数据
            self._test_data.update_post_verify_data()
            # 封装验证值
            self.expectedData(-6489  # 会员消费额
                              , 0  # 会员积分
                              , 2  # 会员卡等级
                              , 6489 # 会员余额
                              , 0  # 总揽到店次数
                              , 0  # 总揽新增会员数
                              , 0  # 总揽订单数
                              , 1  # 总揽退单数
                              , -6489  # 总揽销售总额
                              , 0  # M216C237C0458总仓库存
                              , 0  # M216C237C0464总仓库存
                              , 0  # M116E248B0158总仓库存
                              , 0  # M116E248B0164总仓库存
                              , 0  # M316J232B01106总仓库存
                              , 0  # M316J232B0176总仓库存
                              , 0  # ZH02B215190T796242总仓库存
                              , -0.65  # 验证值
                              , 0  # M216C237C0458门店库存
                              , 2  # M216C237C0464门店库存
                              , 0  # M116E248B0158门店库存
                              , 0  # M116E248B0164门店库存
                              , 0  # M316J232B01106门店库存
                              , 0  # M316J232B0176门店库存
                              , 0  # ZH02B215190T796242门店库存
                              , 0  # 门店到店次数期待增加值
                              , 0  # 门店新增会员数期待增加值
                              , 0  # 门店订单数期待增加值
                              , 1  # 门店退单数期待增加值
                              , -6489 # 门店销售总额期待增加值
                              , -6489  # 门店平台销售总额期待增加值
                              )
            # 验证数据
            self._data_assertion()
Exemplo n.º 6
0
 def test_3_return_some(self):
     """
     退货1件商品
     1件选择 男士塑身背心 黑色 76
     :return:
     """
     logging.debug("test_return_some")
     shopping_order_id = globals()['shopping_order_id']
     member_number = self._customer.member_number
     exchangeOrderId = market_service.find_order_id(shopping_order_id, member_number)
     return_order_id0 = exchangeOrderId + "_0"
     return_param = {'main_order_id': exchangeOrderId, 'return_price': '2660.00', 'reason': '拍错/不想要', 'remarks': '非', 'afterSales_info[0][order_id]': return_order_id0, 'afterSales_info[0][danjia]': '2660.00',
                     'afterSales_info[0][sku_name]': '男士塑身背心', 'afterSales_info[0][sku_detail]': '黑色 76', 'afterSales_info[0][tiaoma]': 'M316J232B0176', 'afterSales_info[0][kuanhao]': 'M316J232',
                     'afterSales_info[0][sku_id]': '4997', 'afterSales_info[0][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019010526413875910.jpg', 'afterSales_info[0][aftersale_num]': '1',
                     'afterSales_info[0][aftersale_money]': '2660.00', 'afterSales_info[0][goods_type]': '1'}
     market_service.return_order(return_param)
     # 更新充值后的验证数据
     self._test_data.update_post_verify_data()
     # 验证值
     self.expectedData(-2660 # 会员消费额
                           , 0 # 会员积分
                           , 2 # 会员卡等级
                           , 0 # 会员余额
                           , 0 # 总揽到店次数
                           , 0 # 总揽新增会员数
                           , 0 # 总揽订单数
                           , 0 # 总揽退单数
                           , -2660 # 总揽销售总额
                           , 0 # M216C237C0458总仓库存
                           , 0 # M216C237C0464总仓库存
                           , 0 # M116E248B0158总仓库存
                           , 0 # M116E248B0164总仓库存
                           , 0 # M316J232B01106总仓库存
                           , 0 # M316J232B0176总仓库存
                           , 0 # ZH02B215190T796242总仓库存
                           , -0.27 # 验证值
                           , 0 # M216C237C0458门店库存
                           , 0 # M216C237C0464门店库存
                           , 0 # M116E248B0158门店库存
                           , 0 # M116E248B0164门店库存
                           , 0 # M316J232B01106门店库存
                           , 1 # M316J232B0176门店库存
                           , 0 # ZH02B215190T796242门店库存
                           , 0 # 门店到店次数期待增加值
                           , 0 # 门店新增会员数期待增加值
                           , 0 # 门店订单数期待增加值
                           , 0 # 门店退单数期待增加值
                           , -2660 # 门店销售总额期待增加值
                           , -2660 # 门店平台销售总额期待增加值
                           )
     # 验证数据
     self._data_assertion()
Exemplo n.º 7
0
 def test_3_return_10pieces(self):
     """
     退货10件商品数据
     腰背夹M216C237,深蓝色,64 退10个
     :return:
     """
     logging.debug("test_3_return_10pieces")
     shopping_order_id = globals()['shopping_order_id']
     member_number = self._customer.member_number
     exchangeOrderId = market_service.find_order_id(shopping_order_id,
                                                    member_number)
     return_order_id = exchangeOrderId + "_0"
     return_param = {
         'main_order_id': exchangeOrderId,
         'return_price': '31096.00',
         'reason': '15天无理由退货',
         'remarks': '退货10件',
         'afterSales_info[0][order_id]': return_order_id,
         'afterSales_info[0][danjia]': '3380.00',
         'afterSales_info[0][sku_name]': '腰背夹',
         'afterSales_info[0][sku_detail]': '深蓝色 64',
         'afterSales_info[0][tiaoma]': 'M216C237C0464',
         'afterSales_info[0][kuanhao]': 'M216C237',
         'afterSales_info[0][sku_id]': '4879',
         'afterSales_info[0][img]':
         'https://lchapp.oss-cn-beijing.aliyuncs.com/2019010579241063815.jpg',
         'afterSales_info[0][aftersale_num]': '10',
         'afterSales_info[0][aftersale_money]': '31096.00',
         'afterSales_info[0][goods_type]': '1'
     }
     market_service.return_order(return_param)
     # 更新充值后的验证数据
     self._test_data.update_post_verify_data()
     # 验证值
     self.expectedData(
         -31096.00  # 会员消费额
         ,
         0  # 会员积分
         ,
         2  # 会员卡等级
         ,
         31096  # 会员余额
         ,
         0  # 总揽到店次数
         ,
         0  # 总揽新增会员数
         ,
         0  # 总揽订单数
         ,
         1  # 总揽退单数
         ,
         31096.00  # 总揽销售总额
         ,
         0  # M216C237C0458总仓库存
         ,
         0  # M216C237C0464总仓库存
         ,
         0  # M116E248B0158总仓库存
         ,
         0  # M116E248B0164总仓库存
         ,
         0  # M316J232B01106总仓库存
         ,
         0  # M316J232B0176总仓库存
         ,
         0  # ZH02B215190T796242总仓库存
         ,
         -3.11  # 验证值
         ,
         0  # M216C237C0458门店库存
         ,
         10  # M216C237C0464门店库存
         ,
         0  # M116E248B0158门店库存
         ,
         0  # M116E248B0164门店库存
         ,
         0  # M316J232B01106门店库存
         ,
         0  # M316J232B0176门店库存
         ,
         0  # ZH02B215190T796242门店库存
         ,
         0  # 门店到店次数期待增加值
         ,
         0  # 门店新增会员数期待增加值
         ,
         0  # 门店订单数期待增加值
         ,
         1  # 门店退单数期待增加值
         ,
         -31096.00  # 门店销售总额期待增加值
         ,
         -31096.00  # 门店平台销售总额期待增加值
     )
     # 验证数据
     self._data_assertion()
Exemplo n.º 8
0
    def test_2_return_all(self):
        """
        退货4件组合商品
        把4件组合商品全部退掉,2件选择 深蓝色 58 和黑色 58
                               2件选择 深蓝色 64 和黑色 64
        :return:
        """
        logging.debug("test_2_return_all")
        if globals()['shopping_order_id'] is not None:
            return_order_id0 = globals()['shopping_order_id'] + "_0"
            return_order_id1 = globals()['shopping_order_id'] + "_1"
            return_order_id2 = globals()['shopping_order_id'] + "_2"
            return_order_id3 = globals()['shopping_order_id'] + "_3"
            return_param = {
                'main_order_id': globals()['shopping_order_id'],
                'return_price': '24576.00',
                'reason': '拍错/不想要',
                'remarks': '萨范德',
                'afterSales_info[0][order_id]': return_order_id0,
                'afterSales_info[0][danjia]': '6400.00',
                'afterSales_info[0][sku_name]': '孟伟组合商品',
                'afterSales_info[0][sku_detail]': '2件商品',
                'afterSales_info[0][tiaoma]': 'ZH02B215190T796242',
                'afterSales_info[0][kuanhao]': '',
                'afterSales_info[0][sku_id]': '5955',
                'afterSales_info[0][img]':
                'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
                'afterSales_info[0][aftersale_num]': '1',
                'afterSales_info[0][aftersale_money]': '6144.00',
                'afterSales_info[0][goods_type]': '2',
                'afterSales_info[1][order_id]': return_order_id1,
                'afterSales_info[1][danjia]': '6400.00',
                'afterSales_info[1][sku_name]': '孟伟组合商品',
                'afterSales_info[1][sku_detail]': '2件商品',
                'afterSales_info[1][tiaoma]': 'ZH02B215190T796242',
                'afterSales_info[1][kuanhao]': '',
                'afterSales_info[1][sku_id]': '5955',
                'afterSales_info[1][img]':
                'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
                'afterSales_info[1][aftersale_num]': '1',
                'afterSales_info[1][aftersale_money]': '6144.00',
                'afterSales_info[1][goods_type]': '2',
                'afterSales_info[2][order_id]': return_order_id2,
                'afterSales_info[2][danjia]': '6400.00',
                'afterSales_info[2][sku_name]': '孟伟组合商品',
                'afterSales_info[2][sku_detail]': '2件商品',
                'afterSales_info[2][tiaoma]': 'ZH02B215190T796242',
                'afterSales_info[2][kuanhao]': '',
                'afterSales_info[2][sku_id]': '5955',
                'afterSales_info[2][img]':
                'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
                'afterSales_info[2][aftersale_num]': '1',
                'afterSales_info[2][aftersale_money]': '6144.00',
                'afterSales_info[2][goods_type]': '2',
                'afterSales_info[3][order_id]': return_order_id3,
                'afterSales_info[3][danjia]': '6400.00',
                'afterSales_info[3][sku_name]': '孟伟组合商品',
                'afterSales_info[3][sku_detail]': '2件商品',
                'afterSales_info[3][tiaoma]': 'ZH02B215190T796242',
                'afterSales_info[3][kuanhao]': '',
                'afterSales_info[3][sku_id]': '5955',
                'afterSales_info[3][img]':
                'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
                'afterSales_info[3][aftersale_num]': '1',
                'afterSales_info[3][aftersale_money]': '6144.00',
                'afterSales_info[3][goods_type]': '2'
            }

            market_service.return_order(return_param)
            # 更新充值后的验证数据
            self._test_data.update_post_verify_data()
            # 验证值
            self.expectedData(
                -24576.00  # 会员消费额
                ,
                -24576.00  # 会员积分
                ,
                2  # 会员卡等级
                ,
                0  # 会员余额
                ,
                0  # 总揽到店次数
                ,
                0  # 总揽新增会员数
                ,
                0  # 总揽订单数
                ,
                1  # 总揽退单数
                ,
                -24576.00  # 总揽销售总额
                ,
                0  # M216C237C0458总仓库存
                ,
                0  # M216C237C0464总仓库存
                ,
                0  # M116E248B0158总仓库存
                ,
                0  # M116E248B0164总仓库存
                ,
                0  # M316J232B01106总仓库存
                ,
                0  # M316J232B0176总仓库存
                ,
                4  # ZH02B215190T796242总仓库存
                ,
                -2.46  # 验证值
                ,
                6  # M216C237C0458门店库存
                ,
                6  # M216C237C0464门店库存
                ,
                2  # M116E248B0158门店库存
                ,
                2  # M116E248B0164门店库存
                ,
                0  # M316J232B01106门店库存
                ,
                0  # M316J232B0176门店库存
                ,
                0  # ZH02B215190T796242门店库存
                ,
                0  # 门店到店次数期待增加值
                ,
                0  # 门店新增会员数期待增加值
                ,
                0  # 门店订单数期待增加值
                ,
                0  # 门店退单数期待增加值
                ,
                -24576.00  # 门店销售总额期待增加值
                ,
                -24576.00  # 门店平台销售总额期待增加值
            )
            # 验证数据
            self._data_assertion()
Exemplo n.º 9
0
    def test_3_return_8pieces(self):
        """
        退货8件商品数据
        腰背夹M216C237,深蓝色,58 退8个
        :return:
        """
        logging.debug("test_return_8pieces")
        if globals()['shopping_order_id'] is not None:
            return_order_id = globals()['shopping_order_id'] + "_0"
            return_param = {
                'main_order_id': globals()['shopping_order_id'],
                'return_price': '24876.80',
                'reason': '15天无理由退货',
                'remarks': '退货8件',
                'afterSales_info[0][order_id]': return_order_id,
                'afterSales_info[0][danjia]': '3380.00',
                'afterSales_info[0][sku_name]': '腰背夹',
                'afterSales_info[0][sku_detail]': '深蓝色 58',
                'afterSales_info[0][tiaoma]': 'M216C237C0458',
                'afterSales_info[0][kuanhao]=M216C237': 'M216C237',
                'afterSales_info[0][sku_id]': '4878',
                'afterSales_info[0][img]':
                'https://lchapp.oss-cn-beijing.aliyuncs.com/2019010579241063815.jpg',
                'afterSales_info[0][aftersale_num]': '8',
                'afterSales_info[0][aftersale_money]': '24876.80',
                'afterSales_info[0][goods_type]': '1'
            }

            market_service.return_order(return_param)
            # 更新充值后的验证数据
            self._test_data.update_post_verify_data()
            # 验证值
            self.expectedData(
                -24876.80  # 会员消费额
                ,
                -24876.80  # 会员积分
                ,
                2  # 会员卡等级
                ,
                0  # 会员余额
                ,
                0  # 总揽到店次数
                ,
                0  # 总揽新增会员数
                ,
                0  # 总揽订单数
                ,
                0  # 总揽退单数
                ,
                -24876.80  # 总揽销售总额
                ,
                0  # M216C237C0458总仓库存
                ,
                0  # M216C237C0464总仓库存
                ,
                0  # M116E248B0158总仓库存
                ,
                0  # M116E248B0164总仓库存
                ,
                0  # M316J232B01106总仓库存
                ,
                0  # M316J232B0176总仓库存
                ,
                0  # ZH02B215190T796242总仓库存
                ,
                -2.49  # 验证值
                ,
                8  # M216C237C0458门店库存
                ,
                0  # M216C237C0464门店库存
                ,
                0  # M116E248B0158门店库存
                ,
                0  # M116E248B0164门店库存
                ,
                0  # M316J232B01106门店库存
                ,
                0  # M316J232B0176门店库存
                ,
                0  # ZH02B215190T796242门店库存
                ,
                0  # 门店到店次数期待增加值
                ,
                0  # 门店新增会员数期待增加值
                ,
                0  # 门店订单数期待增加值
                ,
                0  # 门店退单数期待增加值
                ,
                -24876.80  # 门店销售总额期待增加值
                ,
                -24876.80  # 门店平台销售总额期待增加值
            )
            # 验证数据
            self._data_assertion()
Exemplo n.º 10
0
 def test_3_Combination_and_common_return_part(self):
     """
     换的商品退货
     :return:
     """
     logging.debug("test_3_recharge_return_other")
     if globals()['shopping_order_id'] is not None:
         exchange_order_id = market_service.find_order_id(
             globals()['shopping_order_id'], self._customer.member_number)
         exchange_order_id_a = exchange_order_id + '_0'  #3244.80
         return_exchange = {
             'main_order_id': exchange_order_id,
             'return_price': '0.00',
             'reason': '拍错/不想要',
             'remarks': '',
             'afterSales_info[0][order_id]': exchange_order_id_a,
             'afterSales_info[0][danjia]': '3380.00',
             'afterSales_info[0][sku_name]': '腰背夹',
             'afterSales_info[0][sku_detail]': '深蓝色 64',
             'afterSales_info[0][tiaoma]': 'M216C237C0464',
             'afterSales_info[0][kuanhao]': 'M216C237',
             'afterSales_info[0][sku_id]': '4879',
             'afterSales_info[0][img]':
             'https://lchapp.oss-cn-beijing.aliyuncs.com/2019010579241063815.jpg',
             'afterSales_info[0][aftersale_num]': '1',
             'afterSales_info[0][aftersale_money]': '0.00',
             'afterSales_info[0][goods_type]': '1',
             's_confirm': '1'
         }
         market_service.return_order(return_exchange)
         # 更新充值后的验证数据
         self._test_data.update_post_verify_data()
         self._referral.update_post_verify_data()
         # 封装验证值
         self.expectedData(
             -3244  # 会员消费额
             ,
             -3244  # 会员积分
             ,
             2  # 会员卡等级
             ,
             0  # 会员余额
             ,
             0  # 总揽到店次数
             ,
             0  # 总揽新增会员数
             ,
             0  # 总揽订单数
             ,
             1  # 总揽退单数
             ,
             -3244  # 总揽销售总额
             ,
             0  # M216C237C0458总仓库存
             ,
             0  # M216C237C0464总仓库存
             ,
             0  # M116E248B0158总仓库存
             ,
             0  # M116E248B0164总仓库存
             ,
             0  # M316J232B01106总仓库存
             ,
             0  # M316J232B0176总仓库存
             ,
             0  # ZH02B215190T796242总仓库存
             ,
             -0.32  # 验证值
             ,
             0  # M216C237C0458门店库存
             ,
             1  # M216C237C0464门店库存
             ,
             0  # M116E248B0158门店库存
             ,
             0  # M116E248B0164门店库存
             ,
             0  # M316J232B01106门店库存
             ,
             0  # M316J232B0176门店库存
             ,
             0  # ZH02B215190T796242门店库存
             ,
             0  # 门店到店次数期待增加值
             ,
             0  # 门店新增会员数期待增加值
             ,
             0  # 门店订单数期待增加值
             ,
             0  # 门店退单数期待增加值
             ,
             -3244  # 门店销售总额期待增加值
             ,
             -3244  # 门店平台销售总额期待增加值
         )
         self._referral.expectedData = CustomerVerifyData.expected_data(
             0, -3244, 5, 0)
         # 验证数据
         self._data_assertion()
Exemplo n.º 11
0
 def test_4_return_pieces(self):
     """
     退货预售商品
     YS5130N748574
     :return:
     """
     logging.debug("test_4_return_10pieces")
     shopping_order_id = globals()['order_id']
     member_number = self._customer.member_number
     exchangeOrderId = market_service.find_order_id(shopping_order_id,
                                                    member_number)
     return_order_id = exchangeOrderId + "_0"
     return_param = {
         'main_order_id': exchangeOrderId,
         'return_price': '0.00',
         'reason': '15天无理由退货',
         'remarks': '测试',
         'afterSales_info[0][order_id]': return_order_id,
         'afterSales_info[0][danjia]': '1000.00',
         'afterSales_info[0][sku_name]': '周自动化测试勿动',
         'afterSales_info[0][sku_detail]': '',
         'afterSales_info[0][tiaoma]': 'YS5130N748574',
         'afterSales_info[0][kuanhao]': '',
         'afterSales_info[0][sku_id]': '6430',
         'afterSales_info[0][img]':
         'https://lchapp.oss-cn-beijing.aliyuncs.com/2019112610521983674.jpg',
         'afterSales_info[0][aftersale_num]': '1',
         'afterSales_info[0][aftersale_money]': '0.00',
         'afterSales_info[0][goods_type]': '2'
     }
     market_service.return_order(return_param)
     # 更新充值后的验证数据
     self._test_data.update_post_verify_data()
     self._test_data_re.update_post_verify_data()
     # 验证值
     self.expectedData(
         -1000  # 会员消费额
         ,
         0  # 会员积分
         ,
         2  # 会员卡等级
         ,
         0  # 会员余额
         ,
         0  # 总揽到店次数
         ,
         0  # 总揽新增会员数
         ,
         0  # 总揽订单数
         ,
         1  # 总揽退单数
         ,
         -1000.00  # 总揽销售总额
         ,
         0  # M216C237C0458总仓库存
         ,
         0  # M216C237C0464总仓库存
         ,
         0  # M116E248B0158总仓库存
         ,
         0  # M116E248B0164总仓库存
         ,
         0  # M316J232B01106总仓库存
         ,
         0  # M316J232B0176总仓库存
         ,
         0  # ZH02B215190T796242总仓库存
         ,
         -0.1  # 验证值
         ,
         0  # M216C237C0458门店库存
         ,
         1  # M216C237C0464门店库存
         ,
         0  # M116E248B0158门店库存
         ,
         1  # M116E248B0164门店库存
         ,
         0  # M316J232B01106门店库存
         ,
         0  # M316J232B0176门店库存
         ,
         0  # ZH02B215190T796242门店库存
         ,
         0  # 门店到店次数期待增加值
         ,
         0  # 门店新增会员数期待增加值
         ,
         0  # 门店订单数期待增加值
         ,
         1  # 门店退单数期待增加值
         ,
         -1000.00  # 门店销售总额期待增加值
         ,
         -1000.00  # 门店平台销售总额期待增加值
     )
     # 封装验证值
     self._customer_re.expectedData = CustomerVerifyData.expected_data(
         0, 0, 0, 0)  # 更新转介绍会员验证值
     # 验证数据
     self._data_assertion()
     self._data_assertion_re()
Exemplo n.º 12
0
    def test_3_return_some(self):
        """
        退货2件组合商品
        ZH02B215190T796242   2件
        1件选择 深蓝色 58 和黑色 58
        :return:
        """
        logging.debug("test_3_return_some")
        shopping_order_id = globals()['shopping_order_id']
        return_order_id1 = shopping_order_id + "_1"
        return_order_id2 = shopping_order_id + "_2"
        return_param = {
            'main_order_id': shopping_order_id,
            'return_price': '12288.00',
            'reason': '拍错/不想要',
            'remarks': 'gg',
            'afterSales_info[0][order_id]': return_order_id2,
            'afterSales_info[0][danjia]': '6400.00',
            'afterSales_info[0][sku_name]': '孟伟组合商品',
            'afterSales_info[0][sku_detail]': '2件商品',
            'afterSales_info[0][tiaoma]': 'ZH02B215190T796242',
            'afterSales_info[0][kuanhao]': '',
            'afterSales_info[0][sku_id]': '5955',
            'afterSales_info[0][img]':
            'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
            'afterSales_info[0][aftersale_num]': '1',
            'afterSales_info[0][aftersale_money]': '6144.00',
            'afterSales_info[0][goods_type]': '2',
            'afterSales_info[1][order_id]': return_order_id1,
            'afterSales_info[1][danjia]': '6400.00',
            'afterSales_info[1][sku_name]': '孟伟组合商品',
            'afterSales_info[1][sku_detail]': '2件商品',
            'afterSales_info[1][tiaoma]': 'ZH02B215190T796242',
            'afterSales_info[1][kuanhao]': '',
            'afterSales_info[1][sku_id]': '5955',
            'afterSales_info[1][img]':
            'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
            'afterSales_info[1][aftersale_num]': '1',
            'afterSales_info[1][aftersale_money]': '6144.00',
            'afterSales_info[1][goods_type]': '2'
        }

        market_service.return_order(return_param)
        # 更新充值后的验证数据
        self._test_data.update_post_verify_data()
        # 验证值
        self.expectedData(
            -12288  # 会员消费额
            ,
            0  # 会员积分
            ,
            2  # 会员卡等级
            ,
            12288  # 会员余额
            ,
            0  # 总揽到店次数
            ,
            0  # 总揽新增会员数
            ,
            0  # 总揽订单数
            ,
            0  # 总揽退单数
            ,
            -12288  # 总揽销售总额
            ,
            0  # M216C237C0458总仓库存
            ,
            0  # M216C237C0464总仓库存
            ,
            0  # M116E248B0158总仓库存
            ,
            0  # M116E248B0164总仓库存
            ,
            0  # M316J232B01106总仓库存
            ,
            0  # M316J232B0176总仓库存
            ,
            2  # ZH02B215190T796242总仓库存
            ,
            -1.22  # 验证值
            ,
            6  # M216C237C0458门店库存
            ,
            0  # M216C237C0464门店库存
            ,
            2  # M116E248B0158门店库存
            ,
            0  # M116E248B0164门店库存
            ,
            0  # M316J232B01106门店库存
            ,
            0  # M316J232B0176门店库存
            ,
            0  # ZH02B215190T796242门店库存
            ,
            0  # 门店到店次数期待增加值
            ,
            0  # 门店新增会员数期待增加值
            ,
            0  # 门店订单数期待增加值
            ,
            2  # 门店退单数期待增加值
            ,
            -12288  # 门店销售总额期待增加值
            ,
            -12288  # 门店平台销售总额期待增加值
        )
        # 验证数据
        self._data_assertion()
Exemplo n.º 13
0
 def test_3_recharge_same_sku_return_other(self):
     """
     同条码不同SKU,退3件组合商品
     :return:
     """
     logging.debug("test_3_recharge_return_other")
     if globals()['shopping_order_id'] is not None:
         return_order_id = globals()['shopping_order_id'] + "_3"
         return_order_id_b = globals()['shopping_order_id'] + "_1"
         return_order_id_a = globals()['shopping_order_id'] + "_0"
         recharge_param = {
             'main_order_id': globals()['shopping_order_id'],
             'return_price': '12480.00',
             'reason': '拍错/不想要',
             'remarks': '',
             'afterSales_info[0][order_id]': return_order_id,
             'afterSales_info[0][danjia]': '6400.00',
             'afterSales_info[0][sku_name]': '孟伟组合商品',
             'afterSales_info[0][sku_detail]': '2件商品',
             'afterSales_info[0][tiaoma]': 'ZH02B215190T796242',
             'afterSales_info[0][kuanhao]': '',
             'afterSales_info[0][sku_id]': '5955',
             'afterSales_info[0][img]':
             'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
             'afterSales_info[0][aftersale_num]': '1',
             'afterSales_info[0][aftersale_money]': '6144.00',
             'afterSales_info[0][goods_type]': '2',
             'afterSales_info[1][order_id]': return_order_id_b,
             'afterSales_info[1][danjia]': '3300.00',
             'afterSales_info[1][sku_name]': '自动化测试勿删',
             'afterSales_info[1][sku_detail]': '2件商品',
             'afterSales_info[1][tiaoma]': 'ZH02B215190T264284',
             'afterSales_info[1][kuanhao]': '',
             'afterSales_info[1][sku_id]': '5973',
             'afterSales_info[1][img]':
             'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
             'afterSales_info[1][aftersale_num]': '1',
             'afterSales_info[1][aftersale_money]': '3168.00',
             'afterSales_info[1][goods_type]': '2',
             'afterSales_info[2][order_id]': return_order_id_a,
             'afterSales_info[2][danjia]': '3300.00',
             'afterSales_info[2][sku_name]': '自动化测试勿删',
             'afterSales_info[2][sku_detail]': '2件商品',
             'afterSales_info[2][tiaoma]': 'ZH02B215190T264284',
             'afterSales_info[2][kuanhao]': '',
             'afterSales_info[2][sku_id]': '5973',
             'afterSales_info[2][img]':
             'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
             'afterSales_info[2][aftersale_num]': '1',
             'afterSales_info[2][aftersale_money]': '3168.00',
             'afterSales_info[2][goods_type]': '2',
         }
         market_service.return_order(recharge_param)
         # 更新充值后的验证数据
         self._test_data.update_post_verify_data()
         # 封装验证值
         self.expectedData(
             -12480  # 会员消费额
             ,
             0  # 会员积分
             ,
             2  # 会员卡等级
             ,
             12480  # 会员余额
             ,
             0  # 总揽到店次数
             ,
             0  # 总揽新增会员数
             ,
             0  # 总揽订单数
             ,
             3  # 总揽退单数
             ,
             -12480  # 总揽销售总额
             ,
             0  # M216C237C0458总仓库存
             ,
             0  # M216C237C0464总仓库存
             ,
             0  # M116E248B0158总仓库存
             ,
             0  # M116E248B0164总仓库存
             ,
             0  # M316J232B01106总仓库存
             ,
             0  # M316J232B0176总仓库存
             ,
             1  # ZH02B215190T796242总仓库存
             ,
             -1.25  # 验证值
             ,
             9  # M216C237C0458门店库存
             ,
             0  # M216C237C0464门店库存
             ,
             3  # M116E248B0158门店库存
             ,
             0  # M116E248B0164门店库存
             ,
             0  # M316J232B01106门店库存
             ,
             0  # M316J232B0176门店库存
             ,
             0  # ZH02B215190T796242门店库存
             ,
             0  # 门店到店次数期待增加值
             ,
             0  # 门店新增会员数期待增加值
             ,
             0  # 门店订单数期待增加值
             ,
             3  # 门店退单数期待增加值
             ,
             -12480  # 门店销售总额期待增加值
             ,
             -12480  # 门店平台销售总额期待增加值
         )
         # 验证数据
         self._data_assertion()
Exemplo n.º 14
0
 def test_2_NoDiscountNoScoreSimple_ReturnPart(self):
     """
     不折扣不积分商品,'男士塑身背心',退货
     :return:
     """
     logging.debug("test_2_NoDiscountNoScoreSimple_ReturnPart")
     if globals()['shopping_order_id'] is not None:
         return_order_id = globals()['shopping_order_id'] + "_0"
         recharge_param = {
             'main_order_id': globals()['shopping_order_id'],
             'return_price': '5320.00',
             'reason': '拍错/不想要',
             'remarks': '第三方',
             'afterSales_info[0][order_id]': return_order_id,
             'afterSales_info[0][danjia]': '2660.00',
             'afterSales_info[0][sku_name]': '男士塑身背心',
             'afterSales_info[0][sku_detail]': '黑色 98',
             'afterSales_info[0][tiaoma]': 'M316J232B0198',
             'afterSales_info[0][kuanhao]': 'M316J232',
             'afterSales_info[0][sku_id]': '4996',
             'afterSales_info[0][img]':
             'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
             'afterSales_info[0][aftersale_num]': '2',
             'afterSales_info[0][aftersale_money]': '5320.00',
             'afterSales_info[0][goods_type]': '1'
         }
         market_service.return_order(recharge_param)
         # 更新充值后的验证数据
         self._test_data.update_post_verify_data()
         # 封装验证值
         self.expectedData(
             -5320  # 会员消费额
             ,
             0  # 会员积分
             ,
             2  # 会员卡等级
             ,
             0  # 会员余额
             ,
             0  # 总揽到店次数
             ,
             0  # 总揽新增会员数
             ,
             0  # 总揽订单数
             ,
             1  # 总揽退单数
             ,
             -5320  # 总揽销售总额
             ,
             0  # M216C237C0458总仓库存
             ,
             0  # M216C237C0464总仓库存
             ,
             0  # M116E248B0158总仓库存
             ,
             0  # M116E248B0164总仓库存
             ,
             0  # M316J232B01106总仓库存
             ,
             0  # M316J232B0176总仓库存
             ,
             0  # ZH02B215190T796242总仓库存
             ,
             -0.53  # 验证值
             ,
             0  # M216C237C0458门店库存
             ,
             0  # M216C237C0464门店库存
             ,
             0  # M116E248B0158门店库存
             ,
             0  # M116E248B0164门店库存
             ,
             0  # M316J232B01106门店库存
             ,
             0  # M316J232B0176门店库存
             ,
             0  # ZH02B215190T796242门店库存
             ,
             0  # 门店到店次数期待增加值
             ,
             0  # 门店新增会员数期待增加值
             ,
             0  # 门店订单数期待增加值
             ,
             0  # 门店退单数期待增加值
             ,
             -5320  # 门店销售总额期待增加值
             ,
             -5320  # 门店平台销售总额期待增加值
         )
         # 验证数据
         self._data_assertion()
Exemplo n.º 15
0
 def test_3_recharge_return_other(self):
     """
     同条码同SKU,其余部分退货
     :return:
     """
     logging.debug("test_3_recharge_return_other")
     if globals()['shopping_order_id'] is not None:
         return_order_id = globals()['shopping_order_id'] + "_1"
         return_order_id_b = globals()['shopping_order_id'] + "_0"
         recharge_param = {
             'main_order_id': globals()['shopping_order_id'],
             'return_price': '12288.00',
             'reason': '拍错/不想要',
             'remarks': '哈哈哈',
             'afterSales_info[0][order_id]': return_order_id,
             'afterSales_info[0][danjia]': '6400.00',
             'afterSales_info[0][sku_name]': '孟伟组合商品',
             'afterSales_info[0][sku_detail]': '2件商品',
             'afterSales_info[0][tiaoma]': 'ZH02B215190T796242',
             'afterSales_info[0][kuanhao]': '',
             'afterSales_info[0][sku_id]': '5955',
             'afterSales_info[0][img]':
             'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
             'afterSales_info[0][aftersale_num]': '1',
             'afterSales_info[0][aftersale_money]': '6144.00',
             'afterSales_info[0][goods_type]': '2',
             'afterSales_info[1][order_id]': return_order_id_b,
             'afterSales_info[1][danjia]': '6400.00',
             'afterSales_info[1][sku_name]': '孟伟组合商品',
             'afterSales_info[1][sku_detail]': '2件商品',
             'afterSales_info[1][tiaoma]': 'ZH02B215190T796242',
             'afterSales_info[1][kuanhao]': '',
             'afterSales_info[1][sku_id]': '5955',
             'afterSales_info[1][img]':
             'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
             'afterSales_info[1][aftersale_num]': '1',
             'afterSales_info[1][aftersale_money]': '6144.00',
             'afterSales_info[1][goods_type]': '2',
         }
         before = market_service.find_repository()
         market_service.return_order(recharge_param)
         after = market_service.find_repository()
         # 更新充值后的验证数据
         self._test_data.update_post_verify_data()
         # 封装验证值
         self.expectedData(
             -12288  # 会员消费额
             ,
             0  # 会员积分
             ,
             2  # 会员卡等级
             ,
             12288  # 会员余额
             ,
             0  # 总揽到店次数
             ,
             0  # 总揽新增会员数
             ,
             0  # 总揽订单数
             ,
             1  # 总揽退单数
             ,
             -12288  # 总揽销售总额
             ,
             0  # M216C237C0458总仓库存
             ,
             0  # M216C237C0464总仓库存
             ,
             0  # M116E248B0158总仓库存
             ,
             0  # M116E248B0164总仓库存
             ,
             0  # M316J232B01106总仓库存
             ,
             0  # M316J232B0176总仓库存
             ,
             2  # ZH02B215190T796242总仓库存
             ,
             -1.23  # 验证值
             ,
             6  # M216C237C0458门店库存
             ,
             0  # M216C237C0464门店库存
             ,
             2  # M116E248B0158门店库存
             ,
             0  # M116E248B0164门店库存
             ,
             0  # M316J232B01106门店库存
             ,
             0  # M316J232B0176门店库存
             ,
             0  # ZH02B215190T796242门店库存
             ,
             0  # 门店到店次数期待增加值
             ,
             0  # 门店新增会员数期待增加值
             ,
             0  # 门店订单数期待增加值
             ,
             2  # 门店退单数期待增加值
             ,
             -12288  # 门店销售总额期待增加值
             ,
             -12288  # 门店平台销售总额期待增加值
         )
         # 验证数据
         self._data_assertion
         assert int(float(after)) - 0 - int(float(before)) == 0, '销售余额检测失败'
Exemplo n.º 16
0
    def test_4_Combination_and_common_return_other(self):
        """
        组合商品与普通商品posd订单,其余商品退货
        :return:
        """
        logging.debug("test_4_Combination_and_common_return_other")
        if globals()['shopping_order_id'] is not None:
            return_order_id = globals()['shopping_order_id'] + "_2"
            return_order_id_a = globals()['shopping_order_id'] + "_1"
            return_order_id_b = globals()['shopping_order_id'] + "_0"

            return_other = {
                'main_order_id': globals()['shopping_order_id'],
                'return_price': '15532.80',
                'reason': '缺货',
                'remarks': '',
                'afterSales_info[0][order_id]': return_order_id,
                'afterSales_info[0][danjia]': '6400.00',
                'afterSales_info[0][sku_name]': '孟伟组合商品',
                'afterSales_info[0][sku_detail]': '2件商品',
                'afterSales_info[0][tiaoma]': 'ZH02B215190T796242',
                'afterSales_info[0][kuanhao]': '',
                'afterSales_info[0][sku_id]': '5955',
                'afterSales_info[0][img]':
                'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
                'afterSales_info[0][aftersale_num]': '1',
                'afterSales_info[0][aftersale_money]': '6144.00',
                'afterSales_info[0][goods_type]': '2',
                'afterSales_info[1][order_id]': return_order_id_a,
                'afterSales_info[1][danjia]': '6400.00',
                'afterSales_info[1][sku_name]': '孟伟组合商品',
                'afterSales_info[1][sku_detail]': '2件商品',
                'afterSales_info[1][tiaoma]': 'ZH02B215190T796242',
                'afterSales_info[1][kuanhao]': '',
                'afterSales_info[1][sku_id]': '5955',
                'afterSales_info[1][img]':
                'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
                'afterSales_info[1][aftersale_num]': '1',
                'afterSales_info[1][aftersale_money]': '6144.00',
                'afterSales_info[1][goods_type]': '2',
                'afterSales_info[2][order_id]': return_order_id_b,
                'afterSales_info[2][danjia]': '3380.00',
                'afterSales_info[2][sku_name]': '腰背夹',
                'afterSales_info[2][sku_detail]': '深蓝色 58',
                'afterSales_info[2][tiaoma]': 'M216C237C0458',
                'afterSales_info[2][kuanhao]': 'M216C237',
                'afterSales_info[2][sku_id]': '4878',
                'afterSales_info[2][img]':
                'https://lchapp.oss-cn-beijing.aliyuncs.com/2019010579241063815.jpg',
                'afterSales_info[2][aftersale_num]': '1',
                'afterSales_info[2][aftersale_money]': '3244.80',
                'afterSales_info[2][goods_type]': '1'
            }
            market_service.return_order(return_other)
            # 更新充值后的验证数据
            self._test_data.update_post_verify_data()
            # 封装验证值
            self.expectedData(
                -15532  # 会员消费额
                ,
                -15532  # 会员积分
                ,
                2  # 会员卡等级
                ,
                0  # 会员余额
                ,
                0  # 总揽到店次数
                ,
                0  # 总揽新增会员数
                ,
                0  # 总揽订单数
                ,
                1  # 总揽退单数
                ,
                -15532  # 总揽销售总额
                ,
                0  # M216C237C0458总仓库存
                ,
                0  # M216C237C0464总仓库存
                ,
                0  # M116E248B0158总仓库存
                ,
                0  # M116E248B0164总仓库存
                ,
                0  # M316J232B01106总仓库存
                ,
                0  # M316J232B0176总仓库存
                ,
                2  # ZH02B215190T796242总仓库存
                ,
                -1.55  # 验证值
                ,
                7  # M216C237C0458门店库存
                ,
                0  # M216C237C0464门店库存
                ,
                2  # M116E248B0158门店库存
                ,
                0  # M116E248B0164门店库存
                ,
                0  # M316J232B01106门店库存
                ,
                0  # M316J232B0176门店库存
                ,
                0  # ZH02B215190T796242门店库存
                ,
                0  # 门店到店次数期待增加值
                ,
                0  # 门店新增会员数期待增加值
                ,
                0  # 门店订单数期待增加值
                ,
                0  # 门店退单数期待增加值
                ,
                -15532  # 门店销售总额期待增加值
                ,
                -15532  # 门店平台销售总额期待增加值
            )
            # 验证数据
            self._data_assertion()
    def test_3_ChargePreSaleGoods_Exchange_other(self):
        """
                预售商品换的两件商品退货
                :return:
                """
        logging.debug("test_3_ChargeSimpleAndComplex_Exchange_other")
        if globals()['order_shopping_id'] is not None:
            exchange_order = market_service.find_order_id(
                globals()['order_shopping_id'], self._customer.member_number)

            return_order_c = exchange_order + "_0"
            recharge_param = {
                'main_order_id': exchange_order,
                'return_price': '0.00',
                'reason': '15天无理由退货',
                'remarks': '不要了',
                'afterSales_info[0][order_id]': return_order_c,
                'afterSales_info[0][danjia]': '1234.00',
                'afterSales_info[0][sku_name]': '何明锐预售',
                'afterSales_info[0][sku_detail]': '',
                'afterSales_info[0][tiaoma]': 'YS6789N838655',
                'afterSales_info[0][kuanhao]': '',
                'afterSales_info[0][sku_id]': '6434',
                'afterSales_info[0][img]':
                'https://lchapp.oss-cn-beijing.aliyuncs.com/2019112758736210149.png',
                'afterSales_info[0][aftersale_num]': '1',
                'afterSales_info[0][aftersale_money]': '0.00',
                'afterSales_info[0][goods_type]': '2',
            }
            market_service.return_order(recharge_param)
            # 更新充值后的验证数据
            self._test_data.update_post_verify_data()
            self._test_data_re.update_post_verify_data()
            # 封装验证值
            self.expectedData(
                -1234  # 会员消费额
                ,
                0  # 会员积分
                ,
                2  # 会员卡等级
                ,
                1234  # 会员余额
                ,
                0  # 总揽到店次数
                ,
                0  # 总揽新增会员数
                ,
                0  # 总揽订单数
                ,
                1  # 总揽退单数
                ,
                0  # 总揽销售总额
                ,
                0  # M216C237C0458总仓库存
                ,
                0  # M216C237C0464总仓库存
                ,
                0  # M116E248B0158总仓库存
                ,
                0  # M116E248B0164总仓库存
                ,
                0  # M316J232B01106总仓库存
                ,
                0  # M316J232B0176总仓库存
                ,
                0  # ZH02B215190T796242总仓库存
                ,
                -0.12  # 验证值
                ,
                0  # M216C237C0458门店库存
                ,
                1  # M216C237C0464门店库存
                ,
                0  # M116E248B0158门店库存
                ,
                1  # M116E248B0164门店库存
                ,
                0  # M316J232B01106门店库存
                ,
                0  # M316J232B0176门店库存
                ,
                0  # ZH02B215190T796242门店库存
                ,
                0  # 门店到店次数期待增加值
                ,
                0  # 门店新增会员数期待增加值
                ,
                0  # 门店订单数期待增加值
                ,
                1  # 门店退单数期待增加值
                ,
                -1234  # 门店销售总额期待增加值
                ,
                -1234  # 门店平台销售总额期待增加值
            )
            # 封装验证值
            self._customer_re.expectedData = CustomerVerifyData.expected_data(
                0, -1234, 0, 0)  # 更新转介绍会员验证值
            # 验证数据
            self._data_assertion()
            self._data_assertion_re()
Exemplo n.º 18
0
    def test_3_NoDiscountNoScoreSimple_ReturnOther(self):
                """
               不折扣不积分与普通商品pos混合下单,剩余商品退货
                :return:
                """
                logging.debug("test_3_NoDiscountNoScoreSimple_ReturnOther")
                if globals()['shopping_order_id'] is not None:
                    return_order_id = globals()['shopping_order_id'] + "_2"
                    return_order_id_b = globals()['shopping_order_id'] + "_1"

                    return_other_param = {
                        'main_order_id': globals()['shopping_order_id'], 'return_price': '12288.00',
                        'reason': '15天无理由退货', 'remarks': '撒旦发', 'afterSales_info[0][order_id]': return_order_id,
                        'afterSales_info[0][danjia]': '6400.00',
                        'afterSales_info[0][sku_name]': '孟伟组合商品', 'afterSales_info[0][sku_detail]': '2件商品',
                        'afterSales_info[0][tiaoma]': 'ZH02B215190T796242', 'afterSales_info[0][kuanhao]': '',
                        'afterSales_info[0][sku_id]': '5955',
                        'afterSales_info[0][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
                        'afterSales_info[0][aftersale_num]': '1', 'afterSales_info[0][aftersale_money]': '6144.00',
                        'afterSales_info[0][goods_type]': '2',
                        'afterSales_info[1][order_id]': return_order_id_b, 'afterSales_info[1][danjia]': '6400.000',
                        'afterSales_info[1][sku_name]': '孟伟组合商品', 'afterSales_info[1][sku_detail]': '2件商品',
                        'afterSales_info[1][tiaoma]': 'ZH02B215190T796242', 'afterSales_info[1][kuanhao]': '',
                        'afterSales_info[1][sku_id]': '5955',
                        'afterSales_info[1][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019080310765489321.jpg',
                        'afterSales_info[1][aftersale_num]': '1', 'afterSales_info[1][aftersale_money]': '6144.00',
                        'afterSales_info[1][goods_type]': '2'
                    }
                    market_service.return_order(return_other_param)
                    # 更新充值后的验证数据
                    self._test_data.update_post_verify_data()
                    # 封装验证值
                    self.expectedData(-12288  # 会员消费额
                                      ,-12288 # 会员积分
                                      , 2  # 会员卡等级
                                      , 0  # 会员余额
                                      , 0  # 总揽到店次数
                                      , 0  # 总揽新增会员数
                                      , 0  # 总揽订单数
                                      , 1  # 总揽退单数
                                      , -12288  # 总揽销售总额
                                      , 0  # M216C237C0458总仓库存
                                      , 0  # M216C237C0464总仓库存
                                      , 0  # M116E248B0158总仓库存
                                      , 0  # M116E248B0164总仓库存
                                      , 0  # M316J232B01106总仓库存
                                      , 0  # M316J232B0176总仓库存
                                      , 2  # ZH02B215190T796242总仓库存
                                      , -1.23  # 验证值
                                      , 6  # M216C237C0458门店库存
                                      , 0  # M216C237C0464门店库存
                                      , 2  # M116E248B0158门店库存
                                      , 0  # M116E248B0164门店库存
                                      , 0  # M316J232B01106门店库存
                                      , 0  # M316J232B0176门店库存
                                      , 0  # ZH02B215190T796242门店库存
                                      , 0  # 门店到店次数期待增加值
                                      , 0  # 门店新增会员数期待增加值
                                      , 0  # 门店订单数期待增加值
                                      , 0  # 门店退单数期待增加值
                                      , -12288  # 门店销售总额期待增加值
                                      , -12288  # 门店平台销售总额期待增加值
                                      )
                    # 验证数据
                    self._data_assertion()