Ejemplo n.º 1
0
def issues_add_form(oprs=[]):
    return btforms.Form(btforms.Textbox('account_number',
                                        rules.len_of(1, 32),
                                        description=u'用户账号',
                                        readonly='readonly',
                                        **input_style),
                        btforms.Dropdown('issues_type',
                                         description=u'工单类型',
                                         args=issues_types.items(),
                                         **input_style),
                        btforms.Textarea('content',
                                         rules.len_of(1, 1024),
                                         description=u'工单内容',
                                         rows=6,
                                         required='required',
                                         **input_style),
                        btforms.Dropdown('builder_name',
                                         description=u'指派施工人员',
                                         args=oprs,
                                         required='required',
                                         **input_style),
                        btforms.Button('submit',
                                       type='submit',
                                       html=u'<b> 提交 </b>',
                                       **button_style),
                        action='/admin/issues/add',
                        title=u'创建用户工单')()
Ejemplo n.º 2
0
def customer_update_form(nodes=[]):
    return btforms.Form(btforms.Hidden('account_number', description=u'用户账号'),
                        btforms.Dropdown('node_id',
                                         description=u'区域*',
                                         args=nodes,
                                         required='required',
                                         **input_style),
                        btforms.Dropdown('area_id',
                                         description=u'社区*',
                                         args=[],
                                         required='required',
                                         **input_style),
                        btforms.Hidden('customer_id',
                                       description=u'mid',
                                       required='required',
                                       **input_style),
                        btforms.Textbox('realname',
                                        rules.len_of(1, 64),
                                        description=u'用户姓名',
                                        required='required',
                                        **input_style),
                        btforms.Hidden('customer_name',
                                       description=u'自助服务用户名',
                                       readonly='readonly',
                                       autocomplete='off',
                                       **input_style),
                        btforms.Hidden('new_password',
                                       rules.len_of(0, 128),
                                       value='',
                                       description=u'自助服务密码(留空不修改)',
                                       **input_style),
                        btforms.Textbox('email',
                                        rules.len_of(0, 128),
                                        description=u'电子邮箱',
                                        **input_style),
                        btforms.Textbox('idcard',
                                        rules.len_of(0, 32),
                                        description=u'证件号码',
                                        **input_style),
                        btforms.Textbox('mobile',
                                        rules.len_of(0, 32),
                                        description=u'用户手机号码',
                                        **input_style),
                        btforms.Textbox('address',
                                        description=u'用户地址',
                                        hr=True,
                                        **input_style),
                        btforms.Textarea('customer_desc',
                                         description=u'用户描述',
                                         rows=4,
                                         **input_style),
                        btforms.Button('submit',
                                       type='submit',
                                       html=u'<b>提交</b>',
                                       **button_style),
                        title=u'用户基本信息修改',
                        action='/admin/customer/update')
Ejemplo n.º 3
0
 def mps_form():
     return btforms.Form(btforms.Textbox('mps_apiurl',
                                         description=u'微信公众号接口地址',
                                         **input_style),
                         btforms.Password('mps_token',
                                          description=u'微信公众号令牌(Token)',
                                          **input_style),
                         btforms.Textbox('mps_appid',
                                         description=u'微信公众号应用ID',
                                         **input_style),
                         btforms.Password('mps_apisecret',
                                          description=u'微信公众号应用密钥',
                                          **input_style),
                         btforms.Password('mps_encoding_aes_key',
                                          description=u'微信公众号消息加解密密钥',
                                          **input_style),
                         btforms.Dropdown('mps_encrypt_mode',
                                          args=en_modes.items(),
                                          description=u'微信公众号消息加解密模式',
                                          **input_style),
                         btforms.Textbox('mps_dnsv_upload',
                                         description=u'域名验证文件',
                                         type='button',
                                         **input_style),
                         btforms.Textarea('mps_welcome_text',
                                          description=u'公众号欢迎信息',
                                          rows=5,
                                          hr=True,
                                          **input_style),
                         btforms.Dropdown('mps_wxpay_enable',
                                          args=booleans.items(),
                                          description=u'启用微信支付',
                                          **input_style),
                         btforms.Textbox('mps_wxpay_mch_id',
                                         description=u'微信支付商户号',
                                         **input_style),
                         btforms.Password('mps_wxpay_key',
                                          description=u'微信支付Key',
                                          **input_style),
                         btforms.Textbox('mps_wxpay_ip',
                                         description=u'微信支付商户网站IP',
                                         **input_style),
                         btforms.Textbox('mps_wxpay_notify_url',
                                         description=u'微信支付结果通知URL',
                                         **input_style),
                         btforms.Button('submit',
                                        type='submit',
                                        html=u'<b>更新</b>',
                                        **button_style),
                         title=u'微信公众号配置管理',
                         action='/admin/param/update?active=mpscfg')
Ejemplo n.º 4
0
def account_change_form(products=[]):
    return btforms.Form(btforms.Hidden('account_number',
                                       description=u'用户账号',
                                       required='required',
                                       **input_style),
                        btforms.Dropdown('product_id',
                                         args=products,
                                         description=u'资费',
                                         required='required',
                                         **input_style),
                        btforms.Textbox('add_value',
                                        rules.is_rmb,
                                        description=u'缴费金额',
                                        required='required',
                                        value='0',
                                        **input_style),
                        btforms.Textbox('expire_date',
                                        rules.is_date,
                                        description=u'过期日期',
                                        value='0000-00-00',
                                        **input_style),
                        btforms.Textbox('balance',
                                        rules.is_rmb,
                                        description=u'用户变更后余额',
                                        value='0.00',
                                        **input_style),
                        btforms.Textbox('time_length',
                                        description=u'用户时长(小时)',
                                        value='0.00',
                                        **input_style),
                        btforms.Textbox('flow_length',
                                        description=u'用户流量(G)',
                                        value='0',
                                        **input_style),
                        btforms.Textarea('operate_desc',
                                         rules.len_of(0, 512),
                                         description=u'操作描述',
                                         rows=4,
                                         **input_style),
                        btforms.Button('submit',
                                       type='submit',
                                       html=u'<b>提交</b>',
                                       **button_style),
                        title=u'用户资费变更',
                        action='/admin/account/change')
Ejemplo n.º 5
0
 def mps_form():
     return btforms.Form(btforms.Textbox('mps_apiurl',
                                         description=u'微信公众号接口地址',
                                         readonly='readonly',
                                         **input_style),
                         btforms.Textbox('mps_appid',
                                         description=u'微信公众号应用ID',
                                         readonly='readonly',
                                         **input_style),
                         btforms.Dropdown('mps_encrypt_mode',
                                          args=en_modes.items(),
                                          description=u'微信公众号消息加解密模式',
                                          **input_style),
                         btforms.Textarea('mps_welcome_text',
                                          description=u'公众号欢迎信息',
                                          rows=5,
                                          readonly='readonly',
                                          **input_style),
                         title=u'微信公众号配置管理(演示配置)',
                         action='/admin/param/update?active=mpscfg')
Ejemplo n.º 6
0
def account_update_form():
    return btforms.Form(btforms.Textbox('account_number',
                                        description=u'用户账号',
                                        readonly='readonly',
                                        **input_style),
                        btforms.Textbox('ip_address',
                                        description=u'用户IP地址',
                                        **input_style),
                        btforms.Hidden('install_address',
                                       description=u'用户安装地址',
                                       required='required',
                                       **input_style),
                        btforms.Hidden('new_password',
                                       description=u'认证密码(留空不修改)',
                                       **input_style),
                        btforms.Textbox('user_concur_number',
                                        rules.is_number,
                                        description=u'用户并发数',
                                        required='required',
                                        **input_style),
                        btforms.Dropdown('bind_mac',
                                         args=boolean.items(),
                                         description=u'是否绑定MAC',
                                         **input_style),
                        btforms.Dropdown('bind_vlan',
                                         args=boolean.items(),
                                         description=u'是否绑定VLAN',
                                         **input_style),
                        btforms.Textbox('domain',
                                        description=u'用户域',
                                        **input_style),
                        btforms.Textarea('account_desc',
                                         description=u'用户描述',
                                         rows=4,
                                         **input_style),
                        btforms.Button('submit',
                                       type='submit',
                                       html=u'<b>提交</b>',
                                       **button_style),
                        title=u'用户策略修改',
                        action='/admin/account/update')
Ejemplo n.º 7
0
def issues_process_form():
    return btforms.Form(btforms.Hidden('issues_id',
                                       rules.len_of(1, 32),
                                       description=u'工单id',
                                       required='required',
                                       **input_style),
                        btforms.Textarea('accept_result',
                                         rules.len_of(1, 1024),
                                         description=u'处理描述',
                                         rows=6,
                                         required='required',
                                         **input_style),
                        btforms.Dropdown('accept_status',
                                         description=u'处理结果',
                                         args=process_status.items(),
                                         required='required',
                                         **input_style),
                        btforms.Button('submit',
                                       type='submit',
                                       html=u'<b> 处理用户工单 </b>',
                                       **button_style),
                        action='/admin/issues/process',
                        title=u'处理用户工单')()
Ejemplo n.º 8
0
def node_update_form(rule_ids=[], bas_ids=[]):
    return btforms.Form(btforms.Hidden('id', description=u'区域ID'),
                        btforms.Textbox('node_name',
                                        rules.len_of(2, 32),
                                        description=u'区域名称',
                                        **input_style),
                        btforms.Dropdown('node_type',
                                         description=u'区域接入类型',
                                         args=node_types.items(),
                                         required='required',
                                         help=u'仅提供设备同步使用',
                                         **input_style),
                        btforms.Dropdown('rule_id',
                                         description=u'账号生成规则',
                                         args=rule_ids,
                                         required='required',
                                         **input_style),
                        btforms.Dropdown('bas_id',
                                         description=u'绑定接入设备',
                                         args=bas_ids,
                                         multiple='multiple',
                                         size=6,
                                         **input_style),
                        btforms.Textarea('node_desc',
                                         rules.len_of(2, 128),
                                         description=u'区域描述',
                                         rows=3,
                                         required='required',
                                         **input_style),
                        btforms.Button('submit',
                                       type='submit',
                                       html=u'<b>更新</b>',
                                       **button_style),
                        title=u'修改区域',
                        htopic='node',
                        action='/admin/node/update')
Ejemplo n.º 9
0
def note_print_form(tpls = []):
    return btforms.Form(btforms.Dropdown('tpl_id', args=tpls, description=u'票据模板', required='required', **input_style), btforms.Textbox('note_id', rules.len_of(2, 32), description=u'票据凭证号', required='required', readonly='readonly', **input_style), btforms.Textbox('order_id', description=u'缴费订单号', readonly='readonly', **input_style), btforms.Textbox('customer_cname', description=u'客户姓名', required='required', readonly='readonly', **input_style), btforms.Textbox('account_number', description=u'上网账号', readonly='readonly', **input_style), btforms.Textbox('mobile', description=u'手机号码', required='required', readonly='readonly', **input_style), btforms.Textbox('install_address', description=u'客户安装地址', required='required', readonly='readonly', **input_style), btforms.Textbox('pay_type', description=u'付款方式', required='required', readonly='readonly', **input_style), btforms.Textbox('pay_date', description=u'付款日期', required='required', readonly='readonly', **input_style), btforms.Textbox('expire_date', description=u'到期日期', required='required', readonly='readonly', **input_style), btforms.Textbox('order_num', description=u'订购套餐数', required='required', readonly='readonly', **input_style), btforms.Textbox('fee_price', description=u'套餐单价', required='required', readonly='readonly', **input_style), btforms.Textbox('fee_total', description=u'套餐总价', required='required', readonly='readonly', **input_style), btforms.Textarea('remark', description=u'备注内容', rows=4, readonly='readonly', **input_style), btforms.Textbox('operator_name', description=u'收款人', readonly='readonly', **input_style), btforms.Button('doprint', type='button', onclick='doPrint();', html=u'<b>打印预览</b>', **button_style), title=u'用户票据打印', action='/admin/customer/note/print')
Ejemplo n.º 10
0
def adconfig_form(nodes=[], **kwargs):
    form = btforms.Form(title=u'高级参数设置',
                        action='/admin/param/update?active=adconfig')
    items = form.inputs = []
    items.append(
        btforms.Dropdown('system_api_enable',
                         args=booleans.items(),
                         description=u'启用API接口',
                         **input_style))
    items.append(
        btforms.Textbox('system_ticket_expire_days',
                        description=u'上网日志保留天数',
                        **input_style))
    items.append(
        btforms.Textbox('expire_notify_days',
                        rules.is_number,
                        description=u'到期提醒提前天数',
                        **input_style))
    items.append(
        btforms.Textbox('expire_ipaddr_pool',
                        description=u'到期用户下发地址池',
                        help=u'到期,余额不足用户下发,不使用可填写none',
                        **input_style))
    items.append(
        btforms.Dropdown('renew_time_type',
                         args=renew_time_types.items(),
                         description=u'续费模式',
                         **input_style))
    items.append(
        btforms.Dropdown('default_user_node_id',
                         args=nodes,
                         description=u'默认用户区域',
                         help=u'自助开户使用',
                         **input_style))
    items.append(
        btforms.Textbox('billtask_last_day',
                        rules.is_number,
                        description=u'用户账单任务截止日期(1-28)',
                        **input_style))
    items.append(
        btforms.Dropdown('billing_fee_precision',
                         args=fee_precisions.items(),
                         description=u'后付费账单金额精度(元/分)',
                         **input_style))
    items.append(
        btforms.Dropdown('default_product_policy',
                         args=default_product_policy.items(),
                         description=u'自助注册默认资费',
                         **input_style))
    items.append(
        btforms.Dropdown('usrportal_smsvcode_required',
                         args=booleans.items(),
                         description=u'自助注册开户采用短信验证',
                         **input_style))
    items.append(
        btforms.Dropdown('usrportal_email_required',
                         args=booleans.items(),
                         description=u'自助注册开户采用邮件验证',
                         **input_style))
    items.append(
        btforms.Dropdown('ssportal_allow_release_bind',
                         args=booleans.items(),
                         description=u'自助服务允许清除Mac绑定',
                         **input_style))
    items.append(
        btforms.Dropdown('ssportal_allow_online_unlock',
                         args=booleans.items(),
                         description=u'自助服务允许下线操作',
                         **input_style))
    items.append(
        btforms.Textarea('ssportal_paydone_text',
                         description=u'自助服务支付完成提示信息(支持html)',
                         rows=5,
                         **input_style))
    items.append(
        btforms.Button('submit',
                       type='submit',
                       html=u'<b>更新</b>',
                       **button_style))
    return form
Ejemplo n.º 11
0
def agency_update_form(nodes = [], products = []):
    return btforms.Form(btforms.Hidden('agency_id', description=u'编号'), btforms.Textbox('agency_name', rules.len_of(1, 255), description=u'代理商名称', **input_style), btforms.Textbox('contact', rules.not_null, description=u'联系人', **input_style), btforms.Textbox('mobile', rules.len_of(1, 255), description=u'手机号码', **input_style), btforms.Textbox('share_rate', rules.is_number, description=u'分成比例(0-100)', **input_style), btforms.Textbox('operator_name', description=u'操作员名称', readonly='readonly', **input_style), btforms.Textbox('operator_desc', rules.len_of(0, 255), description=u'操作员姓名', **input_style), btforms.Password('operator_pass', rules.len_of(0, 128), description=u'操作员密码(留空不修改)', autocomplete='off', **input_style), btforms.Dropdown('operator_status', description=u'操作员状态', args=opr_status_dict.items(), required='required', **input_style), btforms.Dropdown('operator_nodes', description=u'关联区域(多选)', args=nodes, required='required', multiple='multiple', size=4, **input_style), btforms.Dropdown('operator_products', description=u'关联资费(多选)', args=products, required='required', multiple='multiple', size=6, **input_style), btforms.Textarea('agency_desc', description=u'代理商描述', rows=2, **input_style), btforms.Button('submit', type='submit', html=u'<b>提交</b>', **button_style), title=u'代理商修改', action='/admin/agency/update')
Ejemplo n.º 12
0
def agency_add_form(nodes = [], products = []):
    return btforms.Form(btforms.Textbox('agency_name', rules.len_of(1, 255), description=u'代理商名称', **input_style), btforms.Textbox('contact', rules.not_null, description=u'联系人', **input_style), btforms.Textbox('mobile', rules.len_of(1, 255), description=u'手机号码', **input_style), btforms.Textbox('amount', rules.is_rmb, description=u'初始余额', **input_style), btforms.Textbox('share_rate', rules.is_number, description=u'分成比例(0-100)', **input_style), btforms.Textbox('operator_name', rules.len_of(2, 32), description=u'操作员名称', required='required', **input_style), btforms.Password('operator_pass', rules.len_of(6, 128), description=u'操作员密码', required='required', **input_style), btforms.Dropdown('operator_nodes', description=u'关联区域(多选)', args=nodes, required='required', multiple='multiple', size=4, **input_style), btforms.Dropdown('operator_products', description=u'关联资费(多选)', args=products, required='required', multiple='multiple', size=6, **input_style), btforms.Textarea('agency_desc', description=u'代理商描述', rows=2, **input_style), btforms.Button('submit', type='submit', html=u'<b>提交</b>', **button_style), title=u'代理商开户', action='/admin/agency/add')
Ejemplo n.º 13
0
}
print_tpl_add_form = btforms.Form(btforms.Textbox('tpl_name',
                                                  rules.len_of(2, 128),
                                                  description=u'模板名',
                                                  required='required',
                                                  **input_style),
                                  btforms.Dropdown('tpl_types',
                                                   description=u'打印类型(多选)',
                                                   args=tpl_types.items(),
                                                   required='required',
                                                   multiple='multiple',
                                                   size=5,
                                                   **input_style),
                                  btforms.Textarea('tpl_content',
                                                   rules.not_null,
                                                   description=u'模板内容',
                                                   rows=14,
                                                   required='required',
                                                   **input_style),
                                  btforms.Button('submit',
                                                 type='submit',
                                                 html=u'<b>提交</b>',
                                                 **button_style),
                                  title=u'创建票据模板',
                                  action='/admin/printtpl/add')
print_tpl_update_form = btforms.Form(btforms.Hidden('id', description=u'模板ID'),
                                     btforms.Textbox('tpl_name',
                                                     rules.len_of(2, 128),
                                                     description=u'模板名',
                                                     **input_style),
                                     btforms.Dropdown('tpl_types',
                                                      description=u'打印类型(多选)',
Ejemplo n.º 14
0
#!/usr/bin/env python
# coding=utf-8
from taurusxradius.taurusxlib import btforms
from taurusxradius.taurusxlib.btforms import dataform
from taurusxradius.taurusxlib.btforms import rules
from taurusxradius.taurusxlib.btforms.rules import button_style, input_style
from taurusxradius.modules.settings import *
button_style = {'class': 'btn btn-sm'}
tpl_types = {OpenNotify: u'用户开户通知模板',
 NextNotify: u'用户续费通知模板',
 ExpireNotify: u'用户到期通知模板',
 IssuesNotify: u'工单通知模板',
 VcodeNotify: u'验证码通知模板'}
content_tpl_add_form = btforms.Form(btforms.Dropdown('tpl_type', args=tpl_types.items(), description=u'模板类型', required='required', **input_style), btforms.Textbox('tpl_id', rules.not_null, description=u'模板ID', required='required', **input_style), btforms.Textarea('tpl_content', rules.len_of(2, 1024), description=u'模板内容', rows=7, required='required', **input_style), btforms.Button('submit', type='submit', html=u'<b>提交</b>', **button_style), title=u'创建模板', action='/admin/contenttpl/add')
content_tpl_update_form = btforms.Form(btforms.Hidden('id', description=u'模板ID'), btforms.Dropdown('tpl_type', args=tpl_types.items(), description=u'模板类型', **input_style), btforms.Textbox('tpl_id', rules.not_null, description=u'模板ID', required='required', **input_style), btforms.Textarea('tpl_content', rules.len_of(2, 1024), description=u'模板内容', rows=7, required='required', **input_style), btforms.Button('submit', type='submit', html=u'<b>更新</b>', **button_style), title=u'修改模板', action='/admin/contenttpl/update')
Ejemplo n.º 15
0
def register_customer_open_form():
    form = btforms.Form(title=u'用户注册开户')
    items = form.inputs = []
    items.append(
        btforms.Textbox('node_id',
                        description=u'区域*',
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('area_id',
                        description=u'社区*',
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('realname',
                        rules.len_of(1, 64),
                        description=u'用户姓名*',
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('idcard',
                        rules.len_of(0, 18),
                        description=u'证件号码*',
                        **input_style))
    items.append(
        btforms.Textbox('mobile',
                        rules.len_of(0, 11),
                        description=u'用户手机号码*',
                        **input_style))
    items.append(btforms.Textbox('email', description=u'电子邮箱*', **input_style))
    items.append(
        btforms.Textbox('address',
                        rules.len_of(1, 255),
                        description=u'用户地址',
                        hr=True,
                        **input_style))
    items.append(
        btforms.Textbox('account_number',
                        description=u'用户账号*',
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('password',
                        description=u'认证密码*',
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('ip_address', description=u'用户IP地址', **input_style))
    items.append(
        btforms.Textbox('product_id',
                        description=u'资费*',
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('agency_id', description=u'代理商', **input_style))
    items.append(
        btforms.Textbox('charge_code', description=u'收费项', **input_style))
    items.append(
        btforms.Textbox('months', description=u'月数(包月有效)', **input_style))
    items.append(
        btforms.Textbox('days', description=u'天数(包日有效)', **input_style))
    items.append(
        btforms.Textbox('giftdays',
                        rules.is_number,
                        description=u'赠送天数',
                        help=u'包月资费,买断包月资费有效',
                        value=0,
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('giftflows',
                        rules.is_number,
                        description=u'赠送流量(G)',
                        help=u'流量包月资费有效',
                        value=0,
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('fee_value',
                        rules.is_rmb,
                        description=u'缴费金额(套餐资费+收费项)*',
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('expire_date',
                        rules.is_date,
                        description=u'过期日期*',
                        readonly='readonly',
                        **input_style))
    items.append(
        btforms.Hidden('status', value=1, description=u'用户状态', **input_style))
    items.append(
        btforms.Textbox('builder_name', description=u'指派施工人员', **input_style))
    items.append(
        btforms.Textarea('customer_desc',
                         description=u'备注信息',
                         rows=4,
                         **input_style))
    items.append(
        btforms.Textbox('billing_type', description=u'计费开始时间', **input_style))
    items.append(btforms.Hidden('account_rule', description=u'账号生成规则'))
    return form
Ejemplo n.º 16
0
def customer_open_form(nodes=[], products=[], agencies=[]):
    form = btforms.Form(title=u'用户正常开户', action='/admin/customer/open')
    items = form.inputs = []
    items.append(
        btforms.Dropdown('node_id',
                         description=u'区域*',
                         args=nodes,
                         required='required',
                         **input_style))
    items.append(
        btforms.Dropdown('area_id',
                         description=u'社区*',
                         args=[],
                         required='required',
                         **input_style))
    items.append(
        btforms.Textbox('realname',
                        rules.len_of(1, 64),
                        description=u'用户姓名*',
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('idcard',
                        rules.len_of(0, 18),
                        description=u'证件号码*',
                        **input_style))
    items.append(
        btforms.Textbox('mobile',
                        rules.len_of(0, 11),
                        description=u'用户手机号码*',
                        **input_style))
    items.append(btforms.Textbox('email', description=u'电子邮箱*', **input_style))
    items.append(
        btforms.Textbox('address',
                        rules.len_of(1, 255),
                        description=u'用户地址',
                        hr=True,
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('account_number',
                        description=u'用户账号*',
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('password',
                        description=u'认证密码*',
                        required='required',
                        **input_style))
    items.append(
        btforms.Button('button',
                       type='button',
                       onclick='reBuildAccount();',
                       html=u'<b>生成账号密码</b>',
                       **_btn_style))
    items.append(
        btforms.Textbox('ip_address', description=u'用户IP地址', **input_style))
    items.append(
        btforms.Dropdown('product_id',
                         args=products,
                         description=u'资费*',
                         required='required',
                         **input_style))
    items.append(
        btforms.Dropdown('agency_id',
                         args=agencies,
                         description=u'代理商',
                         **input_style))
    items.append(
        btforms.Dropdown('charge_code',
                         args=[],
                         description=u'收费项',
                         **input_style))
    items.append(
        btforms.Textbox('months', description=u'月数(包月有效)', **input_style))
    items.append(
        btforms.Textbox('days', description=u'天数(包日有效)', **input_style))
    items.append(
        btforms.Textbox('giftdays',
                        rules.is_number,
                        description=u'赠送天数',
                        help=u'包月资费,买断包月资费有效',
                        value=0,
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('giftflows',
                        rules.is_number,
                        description=u'赠送流量(G)',
                        help=u'流量包月资费有效',
                        value=0,
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('fee_value',
                        rules.is_rmb,
                        description=u'缴费金额(套餐资费+收费项)*',
                        required='required',
                        **input_style))
    items.append(
        btforms.Textbox('expire_date',
                        rules.is_date,
                        description=u'过期日期*',
                        readonly='readonly',
                        **input_style))
    items.append(
        btforms.Hidden('status', value=1, description=u'用户状态', **input_style))
    items.append(
        btforms.Dropdown('builder_name',
                         args=[],
                         description=u'指派施工人员',
                         **input_style))
    items.append(
        btforms.Textarea('customer_desc',
                         description=u'备注信息',
                         rows=4,
                         **input_style))
    items.append(
        btforms.Dropdown('billing_type',
                         args=billing_types.items(),
                         description=u'计费开始时间',
                         **input_style))
    items.append(btforms.Hidden('account_rule', description=u'账号生成规则'))
    items.append(
        btforms.Button('submit',
                       type='submit',
                       html=u'<b>提交</b>',
                       **button_style))
    return form
Ejemplo n.º 17
0
def account_open_form(products=[]):
    return btforms.Form(btforms.Hidden('node_id',
                                       description=u'区域',
                                       **input_style),
                        btforms.Hidden('customer_id', description=u'编号'),
                        btforms.Textbox('realname',
                                        description=u'用户姓名',
                                        readonly='readonly',
                                        **input_style),
                        btforms.Textbox('account_number',
                                        description=u'用户账号',
                                        required='required',
                                        **input_style),
                        btforms.Textbox('password',
                                        description=u'认证密码',
                                        required='required',
                                        **input_style),
                        btforms.Button('button',
                                       type='button',
                                       onclick='reBuildAccount();',
                                       html=u'<b>重新生成账号密码</b>',
                                       **_btn_style),
                        btforms.Textbox('ip_address',
                                        description=u'用户IP地址',
                                        **input_style),
                        btforms.Textbox('address',
                                        description=u'用户装机地址',
                                        required='required',
                                        **input_style),
                        btforms.Dropdown('product_id',
                                         args=products,
                                         description=u'资费',
                                         required='required',
                                         **input_style),
                        btforms.Textbox('months',
                                        rules.is_number,
                                        description=u'月数(包月有效)',
                                        required='required',
                                        **input_style),
                        btforms.Textbox('giftdays',
                                        rules.is_number,
                                        description=u'赠送天数',
                                        value=0,
                                        required='required',
                                        **input_style),
                        btforms.Textbox('fee_value',
                                        rules.is_rmb,
                                        description=u'缴费金额',
                                        required='required',
                                        **input_style),
                        btforms.Textbox('expire_date',
                                        rules.is_date,
                                        description=u'过期日期',
                                        required='required',
                                        **input_style),
                        btforms.Hidden('status',
                                       value=1,
                                       description=u'用户状态',
                                       **input_style),
                        btforms.Textarea('account_desc',
                                         description=u'用户描述',
                                         rows=4,
                                         **input_style),
                        btforms.Button('submit',
                                       type='submit',
                                       html=u'<b>提交</b>',
                                       **button_style),
                        title=u'用户新开账号',
                        action='/admin/account/open')
Ejemplo n.º 18
0
                                                 required='required',
                                                 **input_style),
                                 btforms.Textbox('fee_value',
                                                 rules.is_rmb,
                                                 description=u'缴费金额',
                                                 value=0,
                                                 required='required',
                                                 **input_style),
                                 btforms.Textbox('expire_date',
                                                 rules.is_date,
                                                 description=u'过期日期',
                                                 readonly='readonly',
                                                 **input_style),
                                 btforms.Textarea('operate_desc',
                                                  rules.len_of(0, 512),
                                                  description=u'操作描述',
                                                  rows=4,
                                                  **input_style),
                                 btforms.Button('submit',
                                                type='submit',
                                                html=u'<b>提交</b>',
                                                **button_style),
                                 title=u'用户续费',
                                 action='/admin/account/next')
account_charge_form = btforms.Form(btforms.Hidden('account_number',
                                                  description=u'用户账号',
                                                  required='required',
                                                  **input_style),
                                   btforms.Textbox('fee_value',
                                                   rules.is_rmb,
                                                   description=u'缴费金额',