Esempio n. 1
0
def member_update_form():
    return pyforms.Form(
        pyforms.Textbox("realname",
                        description=u"用户姓名",
                        readonly="readonly",
                        **input_style),
        pyforms.Textbox("member_name",
                        description=u"用户登陆名",
                        readonly="readonly",
                        **input_style),
        pyforms.Password("new_password",
                         rules.len_of(0, 128),
                         value="",
                         description=u"用户登陆密码(留空不修改)",
                         **input_style),
        pyforms.Textbox("email",
                        rules.len_of(0, 128),
                        description=u"电子邮箱",
                        **input_style),
        # pyforms.Textbox("idcard", rules.len_of(0,32), description=u"证件号码", **input_style),
        # pyforms.Textbox("mobile", rules.len_of(0,32),description=u"用户手机号码", **input_style),
        pyforms.Textbox("address", description=u"用户地址", hr=True,
                        **input_style),
        pyforms.Button("submit",
                       type="submit",
                       html=u"<b>提交</b>",
                       **button_style),
        title=u"用户基本信息修改",
        action="/user/update")
Esempio n. 2
0
def cmanage_add_form(oprs=[]):
    return pyforms.Form(pyforms.Textbox("manager_code",
                                        rules.len_of(1, 32),
                                        description=u"客户经理工号",
                                        required="required",
                                        **input_style),
                        pyforms.Textbox("manager_name",
                                        rules.len_of(1, 64),
                                        description=u"客户经理姓名",
                                        required="required",
                                        **input_style),
                        pyforms.Textbox("manager_mobile",
                                        rules.len_of(1, 32),
                                        description=u"客户经理电话",
                                        required="required",
                                        **input_style),
                        pyforms.Textbox("manager_email",
                                        rules.len_of(1, 255),
                                        description=u"客户经理邮箱",
                                        **input_style),
                        pyforms.Dropdown("operator_name",
                                         description=u"关联操作员",
                                         args=oprs,
                                         **input_style),
                        pyforms.Button("submit",
                                       type="submit",
                                       html=u"<b> 提交 </b>",
                                       **button_style),
                        title=u"创建客户经理资料")()
Esempio n. 3
0
def account_open_form(products=[]):
    return pyforms.Form(pyforms.Textbox("recharge_card",
                                        description=u"充值卡号",
                                        required="required",
                                        **input_style),
                        pyforms.Password("recharge_pwd",
                                         description=u"充值卡密码",
                                         required="required",
                                         **input_style),
                        pyforms.Textbox("account_number",
                                        description=u"用户账号",
                                        required="required",
                                        **input_style),
                        pyforms.Password("password",
                                         description=u"认证密码",
                                         required="required",
                                         **input_style),
                        pyforms.Dropdown("product_id",
                                         args=products,
                                         description=u"资费",
                                         required="required",
                                         **input_style),
                        pyforms.Button("submit",
                                       type="submit",
                                       html=u"<b>提交</b>",
                                       **button_style),
                        title=u"用户自助开户",
                        action="/open")
Esempio n. 4
0
def issues_add_form(oprs=[]):
    return pyforms.Form(pyforms.Textbox("account_number",
                                        rules.len_of(1, 32),
                                        description=u"用户账号",
                                        required="required",
                                        **input_style),
                        pyforms.Dropdown("issues_type",
                                         description=u"工单类型",
                                         args=issues_types.items(),
                                         **input_style),
                        pyforms.Textarea("content",
                                         rules.len_of(1, 1024),
                                         description=u"工单内容",
                                         rows=6,
                                         required="required",
                                         **input_style),
                        pyforms.Dropdown("assign_operator",
                                         description=u"指派操作员",
                                         args=oprs,
                                         required="required",
                                         **input_style),
                        pyforms.Button("submit",
                                       type="submit",
                                       html=u"<b> 提交 </b>",
                                       **button_style),
                        action="/issues/add",
                        title=u"创建用户工单")()
Esempio n. 5
0
def member_join_form(nodes=[]):
    return pyforms.Form(pyforms.Dropdown("node_id",
                                         description=u"区域",
                                         args=nodes,
                                         required="required",
                                         **input_style),
                        pyforms.Textbox("realname",
                                        rules.len_of(2, 32),
                                        description=u"用户姓名(必填)",
                                        required="required",
                                        **input_style),
                        pyforms.Dropdown("sex",
                                         description=u"性别",
                                         args=sexopt.items(),
                                         required="required",
                                         **input_style),
                        pyforms.Textbox("age",
                                        rules.is_number,
                                        description=u"年龄(必填)",
                                        size=3,
                                        required="required",
                                        **input_style),
                        pyforms.Textbox("username",
                                        rules.is_alphanum3(6, 32),
                                        description=u"用户名(必填)",
                                        size=32,
                                        required="required",
                                        **input_style),
                        pyforms.Password("password",
                                         rules.len_of(6, 32),
                                         description=u"登录密码(必填)",
                                         size=32,
                                         required="required",
                                         **input_style),
                        pyforms.Textbox("email",
                                        rules.is_email,
                                        description=u"电子邮箱(必填)",
                                        size=64,
                                        required="required",
                                        **input_style),
                        pyforms.Textbox("idcard",
                                        rules.len_of(0, 32),
                                        description=u"证件号码",
                                        **input_style),
                        pyforms.Textbox("mobile",
                                        rules.len_of(0, 32),
                                        description=u"用户手机号码",
                                        **input_style),
                        pyforms.Textbox("address",
                                        description=u"用户地址",
                                        hr=True,
                                        **input_style),
                        pyforms.Button("submit",
                                       type="submit",
                                       html=u"<b>注册</b>",
                                       **button_style),
                        action="/join",
                        title=u"用户注册")
Esempio n. 6
0
def user_import_form(nodes=[],products=[]):
    return pyforms.Form(
        pyforms.Dropdown("node_id", description=u"用户区域", args=nodes, **input_style),
        pyforms.Dropdown("product_id",args=products, description=u"用户资费",  required="required", **input_style),
        pyforms.File("import_file", description=u"用户数据文件",  required="required", **input_style),
        pyforms.Button("submit",  type="submit", html=u"<b>立即导入</b>", **button_style),
        title=u"用户数据导入",
        action="/bus/member/import"
)
Esempio n. 7
0
def account_open_form(products=[]):
    return pyforms.Form(pyforms.Hidden("node_id",
                                       description=u"区域",
                                       **input_style),
                        pyforms.Hidden("member_id", description=u"编号"),
                        pyforms.Textbox("realname",
                                        description=u"用户姓名",
                                        readonly="readonly",
                                        **input_style),
                        pyforms.Textbox("account_number",
                                        description=u"用户账号",
                                        required="required",
                                        **input_style),
                        pyforms.Textbox("password",
                                        description=u"认证密码",
                                        required="required",
                                        **input_style),
                        pyforms.Textbox("ip_address",
                                        description=u"用户IP地址",
                                        **input_style),
                        pyforms.Textbox("address",
                                        description=u"用户装机地址",
                                        **input_style),
                        pyforms.Dropdown("product_id",
                                         args=products,
                                         description=u"资费",
                                         required="required",
                                         **input_style),
                        pyforms.Textbox("months",
                                        rules.is_number,
                                        description=u"月数(包月有效)",
                                        required="required",
                                        **input_style),
                        pyforms.Textbox("fee_value",
                                        rules.is_rmb,
                                        description=u"缴费金额",
                                        required="required",
                                        **input_style),
                        pyforms.Textbox("expire_date",
                                        rules.is_date,
                                        description=u"过期日期",
                                        required="required",
                                        **input_style),
                        pyforms.Hidden("status",
                                       value=1,
                                       description=u"用户状态",
                                       **input_style),
                        pyforms.Textarea("account_desc",
                                         description=u"用户描述",
                                         rows=4,
                                         **input_style),
                        pyforms.Button("submit",
                                       type="submit",
                                       html=u"<b>提交</b>",
                                       **button_style),
                        title=u"用户新开账号",
                        action="/account/open")
Esempio n. 8
0
def opr_add_form(nodes=[]):
    return pyforms.Form(
        pyforms.Textbox("operator_name", rules.len_of(2,32), description=u"操作员名称",required="required",**input_style),
        pyforms.Textbox("operator_desc", rules.len_of(0,255),description=u"操作员姓名",**input_style),
        pyforms.Password("operator_pass", rules.len_of(6, 128), description=u"操作员密码", required="required",**input_style),
        pyforms.Dropdown("operator_status", description=u"操作员状态", args=opr_status_dict.items(), required="required",**input_style),
        pyforms.Dropdown("operator_nodes", description=u"关联区域(多选)",args=nodes, required="required",multiple="multiple",size=4,**input_style),
        pyforms.Button("submit",  type="submit", html=u"<b>提交</b>", **button_style),
        title=u"增加操作员",
        action="/opr/add"
    )  
Esempio n. 9
0
def account_update_form():
    return pyforms.Form(
        pyforms.Textbox("account_number", description=u"用户账号",  readonly="readonly", **input_style),
        pyforms.Textbox("ip_address", description=u"用户IP地址",**input_style),
        pyforms.Hidden("install_address", description=u"用户安装地址",**input_style),
        pyforms.Textbox("new_password", description=u"认证密码(留空不修改)", **input_style),
        pyforms.Textbox("user_concur_number",rules.is_number, description=u"用户并发数",  required="required", **input_style),
        pyforms.Dropdown("bind_mac",  args=boolean.items(), description=u"是否绑定MAC",**input_style),
        pyforms.Dropdown("bind_vlan",  args=boolean.items(),description=u"是否绑定VLAN",**input_style),
        pyforms.Button("submit",  type="submit", html=u"<b>提交</b>", **button_style),
        title=u"用户变更资料",
        action="/bus/account/update"
    )
Esempio n. 10
0
def account_change_form(products=[]):
    return pyforms.Form(pyforms.Hidden("account_number",
                                       description=u"用户账号",
                                       required="required",
                                       **input_style),
                        pyforms.Dropdown("product_id",
                                         args=products,
                                         description=u"资费",
                                         required="required",
                                         **input_style),
                        pyforms.Textbox("add_value",
                                        rules.is_rmb,
                                        description=u"缴费金额",
                                        required="required",
                                        value="0",
                                        **input_style),
                        pyforms.Textbox("back_value",
                                        rules.is_rmb,
                                        description=u"退费金额",
                                        required="required",
                                        value="0",
                                        **input_style),
                        pyforms.Textbox("expire_date",
                                        rules.is_date,
                                        description=u"过期日期",
                                        value="0000-00-00",
                                        **input_style),
                        pyforms.Textbox("balance",
                                        rules.is_rmb,
                                        description=u"用户变更后余额",
                                        value="0.00",
                                        **input_style),
                        pyforms.Textbox("time_length",
                                        description=u"用户时长(小时)",
                                        value="0.00",
                                        **input_style),
                        pyforms.Textbox("flow_length",
                                        description=u"用户流量(MB)",
                                        value="0",
                                        **input_style),
                        pyforms.Textarea("operate_desc",
                                         rules.len_of(0, 512),
                                         description=u"操作描述",
                                         rows=4,
                                         **input_style),
                        pyforms.Button("submit",
                                       type="submit",
                                       html=u"<b>提交</b>",
                                       **button_style),
                        title=u"用户资费变更",
                        action="/account/change")
Esempio n. 11
0
def member_update_form(nodes=[]):
    return pyforms.Form(
        pyforms.Hidden("account_number", description=u"用户账号"),
        pyforms.Hidden("member_id", description=u"mid",  required="required", **input_style),
        pyforms.Textbox("realname", rules.len_of(2,32), description=u"用户姓名", required="required",**input_style),
        pyforms.Textbox("member_name", description=u"自助服务用户名", readonly="readonly",**input_style),
        pyforms.Password("new_password", rules.len_of(0,128),value="", description=u"自助服务密码(留空不修改)", **input_style),
        pyforms.Textbox("email", rules.len_of(0,128), description=u"电子邮箱", **input_style),
        pyforms.Textbox("idcard", rules.len_of(0,32), description=u"证件号码", **input_style),
        pyforms.Textbox("mobile", rules.len_of(0,32),description=u"用户手机号码", **input_style),
        pyforms.Textbox("address", description=u"用户地址",hr=True, **input_style),
        pyforms.Button("submit",  type="submit", html=u"<b>提交</b>", **button_style),
        title=u"用户基本信息修改",
        action="/bus/member/update"
    )
Esempio n. 12
0
def recharge_card_form(products=[]):
    return pyforms.Form(
        pyforms.Dropdown("card_type",  args=card_types.items(), description=u"充值卡类型",**input_style),
        pyforms.Textbox("batch_no", rules.is_number,maxlength=8,description=u"批次号(年+月+2位序号,如:20150201)",required="required", **input_style),
        pyforms.Dropdown("product_id",args=products, description=u"资费",**input_style),
        pyforms.Textbox("start_no",rules.is_number,maxlength=5, description=u"开始卡号(最大5位)",required="required",**input_style),
        pyforms.Textbox("stop_no", rules.is_number,maxlength=5,description=u"结束卡号(最大5位)",required="required",**input_style),
        pyforms.Textbox("pwd_len", rules.is_number,description=u"密码长度(最大为16)",value=8,**input_style),
        pyforms.Textbox("fee_value",rules.is_rmb, description=u"面值/销售价(元)",value=0,**input_style),
        pyforms.Textbox("months", rules.is_number,description=u"授权时间(月)",readonly="readonly",value=0,**input_style),
        pyforms.Textbox("times",description=u"总时长(小时)",readonly="readonly",value=0,**input_style),
        pyforms.Textbox("flows",description=u"总流量(MB)",readonly="readonly",value=0,**input_style),
        pyforms.Textbox("expire_date",rules.is_date, description=u"过期时间",required="required",**input_style),
        pyforms.Button("submit",  type="submit", html=u"<b>提交</b>", **button_style),
        title=u"充值卡生成",
        action="/card/create"
    )
Esempio n. 13
0
def product_add_form():
    return pyforms.Form(
        pyforms.Textbox("product_name", rules.len_of(4, 64), description=u"资费名称",  required="required",**input_style),
        pyforms.Dropdown("product_policy", args=product_policy.items(), description=u"计费策略", required="required",**input_style),
        pyforms.Textbox("fee_months", rules.is_number, description=u"买断授权月数",value=0, **input_style),
        pyforms.Textbox("fee_times", rules.is_number, description=u"买断时长(小时)",value=0, **input_style),
        pyforms.Textbox("fee_flows", rules.is_number, description=u"买断流量(MB)",value=0, **input_style),
        pyforms.Textbox("fee_price", rules.is_rmb, description=u"资费价格(元)", required="required", **input_style),
        pyforms.Hidden("fee_period",rules.is_period,description=u"开放认证时段",**input_style),
        pyforms.Textbox("concur_number", rules.is_numberOboveZore,description=u"并发数控制(0表示不限制)",value="0", **input_style),
        pyforms.Dropdown("bind_mac",  args=boolean.items(), description=u"是否绑定MAC ",**input_style),
        pyforms.Dropdown("bind_vlan",  args=boolean.items(),description=u"是否绑定VLAN ",**input_style),
        pyforms.Textbox("input_max_limit",  rules.is_number3,description=u"最大上行速率(Mbps)",required="required", **input_style),
        pyforms.Textbox("output_max_limit",  rules.is_number3,description=u"最大下行速率(Mbps)",required="required",**input_style),
        pyforms.Dropdown("product_status", args=product_status_dict.items(),description=u"资费状态", required="required", **input_style),
        pyforms.Button("submit", type="submit",id="submit",html=u"<b>提交</b>", **button_style),
        title=u"增加资费",
        action="/product/add"
    )
Esempio n. 14
0
def user_open_form(nodes=[],products=[]):
    return pyforms.Form(
        pyforms.Dropdown("node_id", description=u"区域", args=nodes,required="required", **input_style),
        pyforms.Textbox("realname", rules.len_of(2,32), description=u"用户姓名", required="required",**input_style),
        pyforms.Checkbox("is_samename",description=u"启用独立的自助服务用户名", checked=""),
        pyforms.Textbox("member_name", rules.len_of(0,64), description=u"自助服务用户名", **input_style),
        pyforms.Textbox("member_password", rules.len_of(0,128), description=u"自助服务用户密码", **input_style),
        pyforms.Textbox("idcard", rules.len_of(0,32), description=u"证件号码", **input_style),
        pyforms.Textbox("mobile", rules.len_of(0,32),description=u"用户手机号码", **input_style),
        pyforms.Textbox("address", description=u"用户地址",hr=True, **input_style),
        pyforms.Textbox("account_number", description=u"用户账号",  required="required", **input_style),
        pyforms.Textbox("password", description=u"认证密码", required="required", **input_style),
        pyforms.Textbox("ip_address", description=u"用户IP地址",**input_style),
        pyforms.Dropdown("product_id",args=products, description=u"资费",  required="required", **input_style),
        pyforms.Textbox("months",rules.is_number, description=u"月数(包月有效)", required="required", **input_style),
        pyforms.Textbox("fee_value",rules.is_rmb, description=u"缴费金额",  required="required", **input_style),
        pyforms.Textbox("expire_date", rules.is_date,description=u"过期日期",  required="required", **input_style),
        pyforms.Hidden("status",value=1, description=u"用户状态",  **input_style),
        pyforms.Button("submit",  type="submit", html=u"<b>提交</b>", **button_style),
        title=u"用户开户",
        action="/bus/member/open"
    )
Esempio n. 15
0
def issues_process_form():
    return pyforms.Form(pyforms.Hidden("issues_id",
                                       rules.len_of(1, 32),
                                       description=u"工单id",
                                       required="required",
                                       **input_style),
                        pyforms.Textarea("accept_result",
                                         rules.len_of(1, 1024),
                                         description=u"处理描述",
                                         rows=6,
                                         required="required",
                                         **input_style),
                        pyforms.Dropdown("accept_status",
                                         description=u"处理结果",
                                         args=process_status.items(),
                                         required="required",
                                         **input_style),
                        pyforms.Button("submit",
                                       type="submit",
                                       html=u"<b> 处理用户工单 </b>",
                                       **button_style),
                        action="/issues/process",
                        title=u"处理用户工单")()
Esempio n. 16
0
                                                     description=u"策略名称",
                                                     required="required",
                                                     help=u"策略参考",
                                                     **input_style),
                                     pyforms.Textbox("attr_value",
                                                     rules.len_of(1, 255),
                                                     description=u"策略值",
                                                     required="required",
                                                     **input_style),
                                     pyforms.Textbox("attr_desc",
                                                     rules.len_of(1, 255),
                                                     description=u"策略描述",
                                                     required="required",
                                                     **input_style),
                                     pyforms.Button("submit",
                                                    type="submit",
                                                    html=u"<b>提交</b>",
                                                    **button_style),
                                     title=u"增加策略属性",
                                     action="/product/attr/add")

product_attr_update_form = pyforms.Form(pyforms.Hidden("id",
                                                       description=u"编号"),
                                        pyforms.Hidden("product_id",
                                                       description=u"资费编号"),
                                        pyforms.Textbox("attr_name",
                                                        rules.len_of(1, 255),
                                                        description=u"策略名称",
                                                        readonly="required",
                                                        **input_style),
                                        pyforms.Textbox("attr_value",
                                                        rules.len_of(1, 255),