Skip to content

ST售后快速录入

需求

一、产品概述及目标

1.1、 概述

目前售后异常的录入入口在MA—订单异常—搜索订单,符合产品功能结构,但有两个问题:

A、操作不符合常规(客户认知网购退货等操作,在订单层级进入) #添加售后按钮

B、操作频繁需在两个平台跳转

1.2、 目的

A、快速录入售后异常,

B、符合常规操作习惯

station

已有接口修改 /station/order/edit

Method: Get

request:

不变

response:

    code    M   int
    msg     M   string
    data    M  {
         新增
        "exception_reason": {
            "1": "未按用户时间到达",
            "5": "漏单",
            "6": "送错货品",
            "7": "下错单",
            "8": "需要备注",
            "10": "斤两不对(用户发现)",
            "12": "质量问题",
            "17": "规格问题",
            "22": "司机弄丢/弄坏",
            "25": "市场缺货(未出库)",
            "27": "系统问题",
            "61": "其它",
            "153": "采购问题",
            "176": "无法送达"
        }
        ...
    }

新增接口 /station/order/exception

method : POST

使用方法同 manage项目 的 /ordermanage/exception 接口,
但是减少了request所需的数据,只需必填数据和必要数据

request:

id M    #PL2609557
exception M  list:
[
    #情况1.修改/创建异常   [正常,退货,异常] → 异常
    {
       "id": O int ,                 #修改的异常id,在修改时提供 如:10
       "sku_id" M  str ,             #sku id 如:"D4077248"    
       "exception_reason": M int     #异常原因编号 如:1 
       "final_amount" M str:         #记账数 如:"10.00",
       "money_delta": M str,         #金额变动 如:"-320"
       station_store_id: M str       #入库站点 默认使用get接口中的 供货站点 supply_station_id 如"T11790"
    },
    #情况2.删除异常    异常→[正常,退货]
    {
        "id": M int,                 #删除的异常id 如:  10
        "sku_id": M  str,            #sku id 如:"D4077248"   
        "deleted": 1 ,           #删除操作,固定为 1
    }
]
,
refund M  list[
    #情况1.修改/创建退货  [正常,异常,退货]→退货
    {
        "id": O int ,              #修改的退货记录id 如:10
        "sku_id": M  str,          #sku id 如:"D4077248"   
        "exception_reason": M int  #异常原因编号 如:1 
        "request_amount": M str ,  #退货数 如:"1"
    },
    #情况2.删除退货      退货→[正常,异常]
    {
        "id" M int : 10,               #删除的退货记录id
        "sku_id" M str: ,              #sku id 如:"D4077248"
        "deleted" M : 1,               #确认删除,固定为1          
    }
]

response:

code    M   int
msg     M   string
data    M   int    

假设订单ID为 PL2609558
订单中有 两种sku商品 ["D4077248","D4077286"]

D4077248 单价为3.20 订购数为10.00  当前状态 正常
D4077286 单价为3.31 订购数为 36.00 当前状态 正常

1.将从 D4077248 正常 改成 异常 ,设置记账数为8.00 ,原因为 未按用户时间到达 1
则request:
id: PL2609557
exception: [
    {
        "sku_id": "D4077248",
        "exception_reason": 1,
        "money_delta": "-640",
        "final_amount": "8.00",
    }
]
refund: []

2. 在前一步的基础上,将从 D4077248 异常 改成 退货 ,设置退货数为5.00 ,原因为 未按用户时间到达 1
    并将D4077286 从 正常 改成 异常 ,设置记账数为34.00 ,原因为 未按用户时间到达 1

 则requset:
 id: PL2609557
 exception: [
    {
        "sku_id": "D4077286",
        "exception_reason": 1,
        "money_delta": "-662",      
        "final_amount": "34.00",
    },
    {
        "id": 13,
        "sku_id": "D4077248",
        "deleted": 1,
    }
]

refund: [
    {
        "sku_id": "D4077248",
        "exception_reason": 1,
        "request_amount": "5",
    }
]

完整数据实例以及主要字段说明


_id 订单号
status 订单状态
freeze 订单是否锁定
abnormals 异常
refunds 退货
time_config_id  运营时间对应的id
receive_begin_time 收货开始时间
receive_end_time 收货截止时间
create_time 下单时间
receiver_name 收货人
receiver_phone 收货人联系方式
address 地址


details中为下下方显示的具体商品信息
    id 商品id
    name 商品名
    quantity 下单数

    sale_ratio: 换算率(售卖单位/基本单位)
    sale_unit_name: 售卖单位
    std_unit_name: 基本单位

    sale_price 单价(销售单位)
    std_sale_price 单价(基本单位)
    real_item_price 下单金额
    real_quantity 出库数


final_amount 异常数
request_amount 退货数
type_id 售后原因

{
    "data": {
        "abnormals": [
            {
                "final_amount": 9,
                "detail_id": "D4077286",
                "text": "",
                "id": 3,
                "type_id": 1,
                "money_delta": 0,
                "type_text": "未按用户时间到达"
            }
        ],
        "total_price": 3621,
        "customer": {
            "receiver_name": "csd",
            "supply_station_id": "T11790",
            "extender": {
                "resname": "csd1001",
                "order_pay_method": 2
            },
            "address": "广东省深圳市南山区高新南四道19南门",
            "receive_begin_time": "2018-08-30 06:00",
            "receiver_phone": "123",
            "address_id": "88898",
            "uid": "95151",
            "receive_end_time": "2018-08-30 11:00",
            "address_sign_id": "30100200000"
        },
        "abnormal_money": 0,
        "is_aggregation": 0,
        "total_pay": 3621,
        "freight": 0,
        "paid_amount": 0,
        "status": 5,
        "district_code": "440300",
        "origin_total_price": 3621,
        "station_id": "T11790",
        "source_order_ids": [],
        "serials": [
            "b1637576910b3a648a764373a4e98cab",
            "a83eaebd42e0915d8bbf096d08e5f380",
            "01f730c9ee42e6d7820d2afa6cefa50a"
        ],
        "_id": "PL2609557",
        "district_name": "深圳市",
        "refunds": [
            {
                "id": 1,
                "station_store_id": "T11790",
                "out_sku_id": "D4077335",
                "real_amount": 0,
                "out_order_id": "PL2609557",
                "request_amount": 2,
                "detail_id": "D4077335",
                "state": 1,
                "type_id": 1,
                "text": "",
                "type_text": "未按用户时间到达"
            }
        ],
        "salemenu_ids": [
            "S9387"
        ],
        "sort_id": 1,
        "_lock": "no",
        "out_order_id": "",
        "real_pay": 0,
        "time_config_info": {
            "task_begin_time": "06:00",
            "final_distribute_time_span": 1,
            "desc": "默认服务时间",
            "final_distribute_time": "06:00",
            "receive_time_limit": {
                "e_span_time": 1,
                "end": "12:00",
                "start": "06:00",
                "receiveTimeSpan": "30",
                "s_span_time": 1
            },
            "service_time_creator": "T001",
            "order_time_limit": {
                "e_span_time": 0,
                "start": "06:00",
                "end": "23:00"
            },
            "type": 0,
            "name": "默认服务时间",
            "_id": "ST001"
        },
        "close_time": null,
        "real_price": 3621,
        "modify_time": "2018-08-29T11:01:30.164",
        "fake_total_price": 3621,
        "last_op_user": "zh_test01",
        "create_time": "2018-08-29T11:01:30.164",
        "batch_remark": "",
        "pay_status": 1,
        "time_config_id": "ST001",
        "last_op_time": "2018-08-29T15:08:00",
        "date_time": "2018-08-29T11:01:30.164",
        "settle_way": 1,
        "refund_amount": 0,
        "details": [
            {
                "category_title_2": "叶菜",
                "tax": "0.00",
                "last_purchase_price": {
                    "newest": {
                        "price": 200,
                        "purchase_supplier_name": "蔬菜供应商",
                        "purchase_supplier_id": "T15384"
                    },
                    "earlier": []
                },
                "request_refund_quantity": 0,
                "sale_price": "9.93",
                "real_is_weight": true,
                "sale_num_least": 1,
                "last_qoute_price": {
                    "newest": {
                        "price": null,
                        "purchase_supplier_name": null,
                        "purchase_supplier_id": null
                    },
                    "earlier": []
                },
                "tax_rate": 0,
                "sync_origin": "D4077286",
                "supplier_name": "蔬菜",
                "real_item_price": 2979,
                "sale_unit_name": "框",
                "real_quantity": 3,
                "spu_id": "C1348987",
                "purchase_quantity": 3,
                "std_sale_price": 331,
                "salemenu_id": "S9387",
                "is_weigh": 1,
                "weighted": 0,
                "sale_ratio": 3,
                "accept_quantity": 3,
                "out_of_stock": false,
                "sale_money": 2979,
                "attrition_rate": 0,
                "id": "D4077286",
                "category_title_1": "蔬菜",
                "origins": [],
                "std_unit_quantity": 9,
                "is_price_timing": false,
                "total_item_pay": 2979,
                "total_item_price": 2979,
                "exc_quantity": 0,
                "name": "小白菜",
                "quantity": 3,
                "stock_avg_price": 0,
                "std_unit_name": "袋",
                "weighting_quantity": 0,
                "std_real_quantity": 9,
                "last_in_stock_price": {
                    "newest": {
                        "price": null,
                        "purchase_supplier_name": null,
                        "purchase_supplier_id": null
                    },
                    "earlier": []
                },
                "real_refund_quantity": 0,
                "outer_id": "",
                "version": 4,
                "search_text": [
                    "XIAOBAICAI",
                    "XBC",
                    "小白菜",
                    ""
                ]
            },
            {
                "category_title_2": "叶菜",
                "tax": "0.00",
                "last_purchase_price": {
                    "newest": {
                        "price": 689,
                        "purchase_supplier_name": "蔬菜供应商",
                        "purchase_supplier_id": "T15384"
                    },
                    "earlier": []
                },
                "request_refund_quantity": 2,
                "sale_price": "2.10",
                "real_is_weight": true,
                "sale_num_least": 1,
                "last_qoute_price": {
                    "newest": {
                        "price": null,
                        "purchase_supplier_name": null,
                        "purchase_supplier_id": null
                    },
                    "earlier": []
                },
                "tax_rate": 0,
                "sync_origin": "D4077335",
                "supplier_name": "蔬菜",
                "real_item_price": 630,
                "sale_unit_name": "斤",
                "real_quantity": 3,
                "spu_id": "C1349008",
                "purchase_quantity": 3,
                "std_sale_price": 210,
                "salemenu_id": "S9387",
                "is_weigh": 1,
                "weighted": 0,
                "sale_ratio": 1,
                "accept_quantity": 3,
                "out_of_stock": false,
                "sale_money": 630,
                "attrition_rate": 0,
                "id": "D4077335",
                "category_title_1": "蔬菜",
                "origins": [],
                "std_unit_quantity": 3,
                "is_price_timing": false,
                "total_item_pay": 630,
                "total_item_price": 630,
                "exc_quantity": 0,
                "name": "上海青",
                "quantity": 3,
                "stock_avg_price": 0,
                "std_unit_name": "斤",
                "weighting_quantity": 0,
                "std_real_quantity": 3,
                "last_in_stock_price": {
                    "newest": {
                        "price": 300,
                        "purchase_supplier_name": "蔬菜供应商",
                        "purchase_supplier_id": "T15384"
                    },
                    "earlier": []
                },
                "real_refund_quantity": 0,
                "outer_id": "",
                "version": 5,
                "search_text": [
                    "SHANGHAIQING",
                    "SHQ",
                    "上海青",
                    ""
                ]
            },
            {
                "category_title_2": "叶菜",
                "tax": "0.00",
                "last_purchase_price": {
                    "newest": {
                        "price": 200,
                        "purchase_supplier_name": "蔬菜供应商",
                        "purchase_supplier_id": "T15384"
                    },
                    "earlier": []
                },
                "request_refund_quantity": 0,
                "sale_price": "0.03",
                "real_is_weight": true,
                "sale_num_least": 1,
                "last_qoute_price": {
                    "newest": {
                        "price": null,
                        "purchase_supplier_name": null,
                        "purchase_supplier_id": null
                    },
                    "earlier": []
                },
                "tax_rate": 0,
                "sync_origin": "D4077354",
                "supplier_name": "蔬菜",
                "real_item_price": 12,
                "sale_unit_name": "框",
                "real_quantity": 4,
                "spu_id": "C1348987",
                "purchase_quantity": 4,
                "std_sale_price": 1,
                "salemenu_id": "S9387",
                "is_weigh": 1,
                "weighted": 0,
                "sale_ratio": 3,
                "accept_quantity": 4,
                "out_of_stock": false,
                "sale_money": 12,
                "attrition_rate": 0,
                "id": "D4077354",
                "category_title_1": "蔬菜",
                "origins": [],
                "std_unit_quantity": 12,
                "is_price_timing": false,
                "total_item_pay": 12,
                "total_item_price": 12,
                "exc_quantity": 0,
                "name": "小白菜小白菜",
                "quantity": 4,
                "stock_avg_price": 0,
                "std_unit_name": "袋",
                "weighting_quantity": 0,
                "std_real_quantity": 12,
                "last_in_stock_price": {
                    "newest": {
                        "price": null,
                        "purchase_supplier_name": null,
                        "purchase_supplier_id": null
                    },
                    "earlier": []
                },
                "real_refund_quantity": 0,
                "outer_id": "",
                "version": 6,
                "search_text": [
                    "XIAOBAICAIXIAOBAICAI",
                    "XBCXBC",
                    "小白菜小白菜",
                    ""
                ]
            }
        ],
        "expire_time": "2018-08-29T11:06:30.164",
        "freeze": 0,
        "remark": null,
        "exception_reason": {
            "1": "未按用户时间到达",
            "5": "漏单",
            "6": "送错货品",
            "7": "下错单",
            "8": "需要备注",
            "10": "斤两不对(用户发现)",
            "12": "质量问题",
            "17": "规格问题",
            "22": "司机弄丢/弄坏",
            "25": "市场缺货(未出库)",
            "27": "系统问题",
            "61": "其它",
            "153": "采购问题",
            "176": "无法送达"
        }
    },
    "msg": "ok",
    "code": 0
}