文 档 中 心 / Document Center
搜索 管理中心
壹川接口文档V3
添加新的打印模板
更新时间:2018-04-17 11:20:00   更新人员:叶洋   文档状态:完成 #174    测试接口
摘要
添加新的打印模板
  1. 接口基本信息
    接口名称:添加打印模板
    请求方法:POST
    接口地址:prtpl
    登录验证:是
  2. 请求参数
    参数名 参数 数据类型 是否必须 示例值 说明
    name 模板名称 string
    alias 别名 string 别名,不能重复
    type 模板类别 int 可选值:1面单2小票3其它自定义
    content 模板配置内容 string 配置可以通过工具生成
  3. 响应数据参数
    参数名 参数 数据类型 示例值 说明
    id 模板id int
    name 模板名称 string
    alias 别名 string 别名,不能重复
    type 模板类别 int 可选值:1面单2小票3其它自定义
    content 模板配置内容 string 配置可以通过工具生成
    status 状态 int
    create_time 创建时间 string
    create_by{} 创建人信息 object
    ├ uid ├ 创建人uid string
    ├ code ├ 创建人编码 string
    ├ username ├ 创建人用户名 string
    ├ nickname ├ 创建人昵称 string
    └ realname └ 创建人真实姓名 string
    update_time 更新时间 string
    update_by{} 更新人信息 object
    ├ uid ├ 更新人uid string
    ├ code ├ 更新人代码 string
    ├ username ├ 更新人用户名 string
    ├ nickname ├ 更新人昵称 string
    └ realname └ 更新人真实姓名 string
  4. 请求示例
    请求例子:
     
    apirq('prtpl', {
        method: "post",
        data: {
            "name": "运单打印",
            "alias": "waybill",
            "type": 1,
            "content": "123456"
        }
    }) 
    
    返回数据结果:
     
    {
        "code": 0,
        "msg": "数据添加成功!",
        "time": "1523934133",
        "data": {
            "id": 1,
            "name": "运单打印",
            "alias": "waybill",
            "type": 1,
            "content": "123456",
            "create_time": "2018-04-17 11:02:13",
            "create_by": {
                "uid": "0000000000000001",
                "code": "U1000000",
                "username": "administrator",
                "nickname": "超级管理员",
                "realname": "超级管理员"
            },
            "update_time": "2018-04-17 11:10:42",
            "update_by": {
                "uid": "0000000000000001",
                "code": "U1000000",
                "username": "administrator",
                "nickname": "超级管理员",
                "realname": "超级管理员"
            },
            "status": 1
        }
    } 
    
本书创建于 2018-03-30 12:03:13 ?如有疑问,请联系技术人员