发票后台管理生成
This commit is contained in:
parent
0392286497
commit
015ce9ca58
74
application/admin/controller/user/invoice/Apply.php
Normal file
74
application/admin/controller/user/invoice/Apply.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\user\invoice;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
|
||||
/**
|
||||
* 个人发票申请管理
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class Apply extends Backend
|
||||
{
|
||||
|
||||
/**
|
||||
* Apply模型对象
|
||||
* @var \app\admin\model\user\invoice\Apply
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\user\invoice\Apply;
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
$this->view->assign("applyTypeList", $this->model->getApplyTypeList());
|
||||
$this->view->assign("headTypeList", $this->model->getHeadTypeList());
|
||||
$this->view->assign("invoiceTypeList", $this->model->getInvoiceTypeList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
//如果发送的来源是Selectpage,则转发到Selectpage
|
||||
if ($this->request->request('keyField')) {
|
||||
return $this->selectpage();
|
||||
}
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
|
||||
$list = $this->model
|
||||
->with(['user'])
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
||||
foreach ($list as $row) {
|
||||
|
||||
$row->getRelation('user')->visible(['nickname','mobile','avatar']);
|
||||
}
|
||||
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
|
||||
return json($result);
|
||||
}
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
}
|
73
application/admin/controller/user/invoice/Header.php
Normal file
73
application/admin/controller/user/invoice/Header.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\user\invoice;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
|
||||
/**
|
||||
* 个人发票抬头管理
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class Header extends Backend
|
||||
{
|
||||
|
||||
/**
|
||||
* Header模型对象
|
||||
* @var \app\admin\model\user\invoice\Header
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\user\invoice\Header;
|
||||
$this->view->assign("headTypeList", $this->model->getHeadTypeList());
|
||||
$this->view->assign("invoiceTypeList", $this->model->getInvoiceTypeList());
|
||||
$this->view->assign("isDefaultList", $this->model->getIsDefaultList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
//如果发送的来源是Selectpage,则转发到Selectpage
|
||||
if ($this->request->request('keyField')) {
|
||||
return $this->selectpage();
|
||||
}
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
|
||||
$list = $this->model
|
||||
->with(['user'])
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
||||
foreach ($list as $row) {
|
||||
|
||||
$row->getRelation('user')->visible(['nickname','mobile','avatar']);
|
||||
}
|
||||
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
|
||||
return json($result);
|
||||
}
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
}
|
34
application/admin/lang/zh-cn/user/invoice/apply.php
Normal file
34
application/admin/lang/zh-cn/user/invoice/apply.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'User_id' => '用户id',
|
||||
'Status' => '申请状态',
|
||||
'Status 1' => '申请中',
|
||||
'Set status to 1' => '设为申请中',
|
||||
'Status 2' => '已开票',
|
||||
'Set status to 2' => '设为已开票',
|
||||
'Apply_type' => '申请类型',
|
||||
'Apply_type 1' => '单开',
|
||||
'Apply_type 2' => '连开',
|
||||
'Price' => '申请金额',
|
||||
'Head_type' => '抬头类型',
|
||||
'Head_type personal' => '个人或事业单位',
|
||||
'Head_type corporate' => '企业',
|
||||
'Invoice_type' => '发票类型',
|
||||
'Invoice_type ordinary' => '普通发票',
|
||||
'Invoice_type special' => '专用发票',
|
||||
'Invoice_header' => '发票抬头',
|
||||
'Tax_id' => '税号',
|
||||
'Bank_deposit' => '开户银行',
|
||||
'Bank_number' => '银行账号',
|
||||
'Enterprise_address' => '企业地址',
|
||||
'Enterprise_phone' => '企业电话',
|
||||
'Invoice_reservation_phone' => '发票预留电话',
|
||||
'Invoice_reservation_email' => '发票预留邮箱',
|
||||
'Invoicingtime' => '开票时间',
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'User.nickname' => '昵称',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像'
|
||||
];
|
27
application/admin/lang/zh-cn/user/invoice/header.php
Normal file
27
application/admin/lang/zh-cn/user/invoice/header.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'User_id' => '用户id',
|
||||
'Head_type' => '抬头类型',
|
||||
'Head_type personal' => '个人或事业单位',
|
||||
'Head_type corporate' => '企业',
|
||||
'Invoice_type' => '发票类型',
|
||||
'Invoice_type ordinary' => '普通发票',
|
||||
'Invoice_type special' => '专用发票',
|
||||
'Invoice_header' => '发票抬头',
|
||||
'Tax_id' => '税号',
|
||||
'Bank_deposit' => '开户银行',
|
||||
'Bank_number' => '银行账号',
|
||||
'Enterprise_address' => '企业地址',
|
||||
'Enterprise_phone' => '企业电话',
|
||||
'Invoice_reservation_phone' => '发票预留电话',
|
||||
'Invoice_reservation_email' => '发票预留邮箱',
|
||||
'Is_default' => '是否默认',
|
||||
'Is_default 0' => '否',
|
||||
'Is_default 1' => '是',
|
||||
'Createtime' => '创建时间',
|
||||
'Updatetime' => '修改时间',
|
||||
'User.nickname' => '昵称',
|
||||
'User.mobile' => '手机号',
|
||||
'User.avatar' => '头像'
|
||||
];
|
106
application/admin/model/user/invoice/Apply.php
Normal file
106
application/admin/model/user/invoice/Apply.php
Normal file
@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model\user\invoice;
|
||||
|
||||
use think\Model;
|
||||
|
||||
|
||||
class Apply extends Model
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $name = 'user_invoice_apply';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
protected $deleteTime = false;
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
'status_text',
|
||||
'apply_type_text',
|
||||
'head_type_text',
|
||||
'invoice_type_text',
|
||||
'invoicingtime_text'
|
||||
];
|
||||
|
||||
|
||||
|
||||
public function getStatusList()
|
||||
{
|
||||
return ['1' => __('Status 1'), '2' => __('Status 2')];
|
||||
}
|
||||
|
||||
public function getApplyTypeList()
|
||||
{
|
||||
return ['1' => __('Apply_type 1'), '2' => __('Apply_type 2')];
|
||||
}
|
||||
|
||||
public function getHeadTypeList()
|
||||
{
|
||||
return ['personal' => __('Head_type personal'), 'corporate' => __('Head_type corporate')];
|
||||
}
|
||||
|
||||
public function getInvoiceTypeList()
|
||||
{
|
||||
return ['ordinary' => __('Invoice_type ordinary'), 'special' => __('Invoice_type special')];
|
||||
}
|
||||
|
||||
|
||||
public function getStatusTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
|
||||
$list = $this->getStatusList();
|
||||
return isset($list[$value]) ? $list[$value] : '';
|
||||
}
|
||||
|
||||
|
||||
public function getApplyTypeTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ? $value : (isset($data['apply_type']) ? $data['apply_type'] : '');
|
||||
$list = $this->getApplyTypeList();
|
||||
return isset($list[$value]) ? $list[$value] : '';
|
||||
}
|
||||
|
||||
|
||||
public function getHeadTypeTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ? $value : (isset($data['head_type']) ? $data['head_type'] : '');
|
||||
$list = $this->getHeadTypeList();
|
||||
return isset($list[$value]) ? $list[$value] : '';
|
||||
}
|
||||
|
||||
|
||||
public function getInvoiceTypeTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ? $value : (isset($data['invoice_type']) ? $data['invoice_type'] : '');
|
||||
$list = $this->getInvoiceTypeList();
|
||||
return isset($list[$value]) ? $list[$value] : '';
|
||||
}
|
||||
|
||||
|
||||
public function getInvoicingtimeTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ? $value : (isset($data['invoicingtime']) ? $data['invoicingtime'] : '');
|
||||
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||
}
|
||||
|
||||
protected function setInvoicingtimeAttr($value)
|
||||
{
|
||||
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
|
||||
}
|
||||
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
}
|
81
application/admin/model/user/invoice/Header.php
Normal file
81
application/admin/model/user/invoice/Header.php
Normal file
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model\user\invoice;
|
||||
|
||||
use think\Model;
|
||||
|
||||
|
||||
class Header extends Model
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $name = 'user_invoice_header';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'integer';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
protected $deleteTime = false;
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
'head_type_text',
|
||||
'invoice_type_text',
|
||||
'is_default_text'
|
||||
];
|
||||
|
||||
|
||||
|
||||
public function getHeadTypeList()
|
||||
{
|
||||
return ['personal' => __('Head_type personal'), 'corporate' => __('Head_type corporate')];
|
||||
}
|
||||
|
||||
public function getInvoiceTypeList()
|
||||
{
|
||||
return ['ordinary' => __('Invoice_type ordinary'), 'special' => __('Invoice_type special')];
|
||||
}
|
||||
|
||||
public function getIsDefaultList()
|
||||
{
|
||||
return ['0' => __('Is_default 0'), '1' => __('Is_default 1')];
|
||||
}
|
||||
|
||||
|
||||
public function getHeadTypeTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ? $value : (isset($data['head_type']) ? $data['head_type'] : '');
|
||||
$list = $this->getHeadTypeList();
|
||||
return isset($list[$value]) ? $list[$value] : '';
|
||||
}
|
||||
|
||||
|
||||
public function getInvoiceTypeTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ? $value : (isset($data['invoice_type']) ? $data['invoice_type'] : '');
|
||||
$list = $this->getInvoiceTypeList();
|
||||
return isset($list[$value]) ? $list[$value] : '';
|
||||
}
|
||||
|
||||
|
||||
public function getIsDefaultTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ? $value : (isset($data['is_default']) ? $data['is_default'] : '');
|
||||
$list = $this->getIsDefaultList();
|
||||
return isset($list[$value]) ? $list[$value] : '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
}
|
27
application/admin/validate/user/invoice/Apply.php
Normal file
27
application/admin/validate/user/invoice/Apply.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\user\invoice;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Apply extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
27
application/admin/validate/user/invoice/Header.php
Normal file
27
application/admin/validate/user/invoice/Header.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\user\invoice;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Header extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
@ -21,7 +21,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('确定的退款金额')} :</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-price" data-rule="required" class="form-control" disabled step="0.01" name="row[price]" type="number" value="{$row.sub_refundprice|htmlentities}">
|
||||
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.sub_refundprice|htmlentities}">
|
||||
<span style="color: red">( 如果未全退,剩余未退金额将正常结算给商家 )</span>
|
||||
</div>
|
||||
</div>
|
||||
|
123
application/admin/view/user/invoice/apply/add.html
Normal file
123
application/admin/view/user/invoice/apply/add.html
Normal file
@ -0,0 +1,123 @@
|
||||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<div class="radio">
|
||||
{foreach name="statusList" item="vo"}
|
||||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Apply_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-apply_type" data-rule="required" class="form-control selectpicker" name="row[apply_type]">
|
||||
{foreach name="applyTypeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="0.00">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Head_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-head_type" data-rule="required" class="form-control selectpicker" name="row[head_type]">
|
||||
{foreach name="headTypeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="personal"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-invoice_type" data-rule="required" class="form-control selectpicker" name="row[invoice_type]">
|
||||
{foreach name="invoiceTypeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="ordinary"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_header')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoice_header" data-rule="required" class="form-control" name="row[invoice_header]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Tax_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-tax_id" data-rule="required" data-source="tax/index" class="form-control selectpage" name="row[tax_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Bank_deposit')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-bank_deposit" class="form-control" name="row[bank_deposit]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Bank_number')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-bank_number" class="form-control" name="row[bank_number]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Enterprise_address')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-enterprise_address" class="form-control" name="row[enterprise_address]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Enterprise_phone')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-enterprise_phone" class="form-control" name="row[enterprise_phone]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_reservation_phone')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoice_reservation_phone" data-rule="required" class="form-control" name="row[invoice_reservation_phone]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_reservation_email')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoice_reservation_email" data-rule="required" class="form-control" name="row[invoice_reservation_email]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoicingtime')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoicingtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[invoicingtime]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
123
application/admin/view/user/invoice/apply/edit.html
Normal file
123
application/admin/view/user/invoice/apply/edit.html
Normal file
@ -0,0 +1,123 @@
|
||||
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<div class="radio">
|
||||
{foreach name="statusList" item="vo"}
|
||||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Apply_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-apply_type" data-rule="required" class="form-control selectpicker" name="row[apply_type]">
|
||||
{foreach name="applyTypeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="$row.apply_type"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Head_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-head_type" data-rule="required" class="form-control selectpicker" name="row[head_type]">
|
||||
{foreach name="headTypeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="$row.head_type"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-invoice_type" data-rule="required" class="form-control selectpicker" name="row[invoice_type]">
|
||||
{foreach name="invoiceTypeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="$row.invoice_type"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_header')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoice_header" data-rule="required" class="form-control" name="row[invoice_header]" type="text" value="{$row.invoice_header|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Tax_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-tax_id" data-rule="required" data-source="tax/index" class="form-control selectpage" name="row[tax_id]" type="text" value="{$row.tax_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Bank_deposit')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-bank_deposit" class="form-control" name="row[bank_deposit]" type="text" value="{$row.bank_deposit|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Bank_number')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-bank_number" class="form-control" name="row[bank_number]" type="text" value="{$row.bank_number|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Enterprise_address')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-enterprise_address" class="form-control" name="row[enterprise_address]" type="text" value="{$row.enterprise_address|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Enterprise_phone')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-enterprise_phone" class="form-control" name="row[enterprise_phone]" type="text" value="{$row.enterprise_phone|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_reservation_phone')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoice_reservation_phone" data-rule="required" class="form-control" name="row[invoice_reservation_phone]" type="text" value="{$row.invoice_reservation_phone|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_reservation_email')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoice_reservation_email" data-rule="required" class="form-control" name="row[invoice_reservation_email]" type="text" value="{$row.invoice_reservation_email|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoicingtime')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoicingtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[invoicingtime]" type="text" value="{:$row.invoicingtime?datetime($row.invoicingtime):''}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
46
application/admin/view/user/invoice/apply/index.html
Normal file
46
application/admin/view/user/invoice/apply/index.html
Normal file
@ -0,0 +1,46 @@
|
||||
<div class="panel panel-default panel-intro">
|
||||
|
||||
<div class="panel-heading">
|
||||
{:build_heading(null,FALSE)}
|
||||
<ul class="nav nav-tabs" data-field="status">
|
||||
<li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
|
||||
{foreach name="statusList" item="vo"}
|
||||
<li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('user/invoice/apply/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('user/invoice/apply/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
||||
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('user/invoice/apply/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||
|
||||
|
||||
<div class="dropdown btn-group {:$auth->check('user/invoice/apply/multi')?'':'hide'}">
|
||||
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
|
||||
<ul class="dropdown-menu text-left" role="menu">
|
||||
{foreach name="statusList" item="vo"}
|
||||
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||
data-operate-edit="{:$auth->check('user/invoice/apply/edit')}"
|
||||
data-operate-del="{:$auth->check('user/invoice/apply/del')}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
99
application/admin/view/user/invoice/header/add.html
Normal file
99
application/admin/view/user/invoice/header/add.html
Normal file
@ -0,0 +1,99 @@
|
||||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Head_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-head_type" data-rule="required" class="form-control selectpicker" name="row[head_type]">
|
||||
{foreach name="headTypeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="personal"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-invoice_type" data-rule="required" class="form-control selectpicker" name="row[invoice_type]">
|
||||
{foreach name="invoiceTypeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="ordinary"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_header')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoice_header" data-rule="required" class="form-control" name="row[invoice_header]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Tax_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-tax_id" data-rule="required" data-source="tax/index" class="form-control selectpage" name="row[tax_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Bank_deposit')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-bank_deposit" class="form-control" name="row[bank_deposit]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Bank_number')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-bank_number" class="form-control" name="row[bank_number]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Enterprise_address')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-enterprise_address" class="form-control" name="row[enterprise_address]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Enterprise_phone')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-enterprise_phone" class="form-control" name="row[enterprise_phone]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_reservation_phone')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoice_reservation_phone" data-rule="required" class="form-control" name="row[invoice_reservation_phone]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_reservation_email')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoice_reservation_email" data-rule="required" class="form-control" name="row[invoice_reservation_email]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Is_default')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-is_default" data-rule="required" class="form-control selectpicker" name="row[is_default]">
|
||||
{foreach name="isDefaultList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
99
application/admin/view/user/invoice/header/edit.html
Normal file
99
application/admin/view/user/invoice/header/edit.html
Normal file
@ -0,0 +1,99 @@
|
||||
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Head_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-head_type" data-rule="required" class="form-control selectpicker" name="row[head_type]">
|
||||
{foreach name="headTypeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="$row.head_type"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-invoice_type" data-rule="required" class="form-control selectpicker" name="row[invoice_type]">
|
||||
{foreach name="invoiceTypeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="$row.invoice_type"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_header')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoice_header" data-rule="required" class="form-control" name="row[invoice_header]" type="text" value="{$row.invoice_header|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Tax_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-tax_id" data-rule="required" data-source="tax/index" class="form-control selectpage" name="row[tax_id]" type="text" value="{$row.tax_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Bank_deposit')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-bank_deposit" class="form-control" name="row[bank_deposit]" type="text" value="{$row.bank_deposit|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Bank_number')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-bank_number" class="form-control" name="row[bank_number]" type="text" value="{$row.bank_number|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Enterprise_address')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-enterprise_address" class="form-control" name="row[enterprise_address]" type="text" value="{$row.enterprise_address|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Enterprise_phone')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-enterprise_phone" class="form-control" name="row[enterprise_phone]" type="text" value="{$row.enterprise_phone|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_reservation_phone')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoice_reservation_phone" data-rule="required" class="form-control" name="row[invoice_reservation_phone]" type="text" value="{$row.invoice_reservation_phone|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_reservation_email')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoice_reservation_email" data-rule="required" class="form-control" name="row[invoice_reservation_email]" type="text" value="{$row.invoice_reservation_email|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Is_default')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-is_default" data-rule="required" class="form-control selectpicker" name="row[is_default]">
|
||||
{foreach name="isDefaultList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="$row.is_default"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
29
application/admin/view/user/invoice/header/index.html
Normal file
29
application/admin/view/user/invoice/header/index.html
Normal file
@ -0,0 +1,29 @@
|
||||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('user/invoice/header/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('user/invoice/header/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
||||
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('user/invoice/header/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||
data-operate-edit="{:$auth->check('user/invoice/header/edit')}"
|
||||
data-operate-del="{:$auth->check('user/invoice/header/del')}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -515,7 +515,7 @@ class Activity extends BaseModel
|
||||
// 'type.require' => '地点类型必填',
|
||||
'stock.require'=> '活动限制人数必填',
|
||||
// 'address_type.require'=> '地址类型必填',
|
||||
'content.require'=> '课程详情必填',
|
||||
'content.require'=> '活动详情必填',
|
||||
'cate_ids.require'=> '平台分类必填',
|
||||
'price.require'=> '售价必填',
|
||||
|
||||
@ -531,6 +531,17 @@ class Activity extends BaseModel
|
||||
|
||||
self::check($params,$rule,$rule_msg);
|
||||
|
||||
if ($params["content"]) {
|
||||
$params["content"] = htmlspecialchars_decode($params["content"]);
|
||||
|
||||
// 过滤掉禁止自动换行属性:text-wrap-mode: nowrap;
|
||||
$pattern = '/text-wrap-mode\s*:\s*nowrap\s*(?:;|\n)/i'; // 匹配 text-wrap-mode: nowrap 后接分号或换行符
|
||||
$params["content"] = preg_replace($pattern, '', $params["content"]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$images = is_array($params["images"]) ? $params["images"] : explode(",",$params["images"]);
|
||||
@ -1329,7 +1340,7 @@ class Activity extends BaseModel
|
||||
$order = \app\common\model\school\activity\order\OrderDetail::where("activity_id",$classes_lib_id)->select();
|
||||
foreach ($order as $row){
|
||||
$update = $classes_lib->toArray();
|
||||
$update_data = $row->checkAssemblyParameters($update,["id","price","status","createtime","updatetime"]);
|
||||
$update_data = $row->checkAssemblyParameters($update,["id","price","createtime"]);
|
||||
$row->save($update_data);
|
||||
}
|
||||
// \app\common\model\school\activity\order\Order::where("activity_id",$classes_lib_id)->update(["fee_scale"=>$classes_lib["fee_scale"]]);
|
||||
|
20581
extend/bw/sensitivewords/Vocabulary/最终敏感词库_去常用词版.txt
Normal file
20581
extend/bw/sensitivewords/Vocabulary/最终敏感词库_去常用词版.txt
Normal file
File diff suppressed because it is too large
Load Diff
72
public/assets/js/backend/user/invoice/apply.js
Normal file
72
public/assets/js/backend/user/invoice/apply.js
Normal file
@ -0,0 +1,72 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'user/invoice/apply/index' + location.search,
|
||||
add_url: 'user/invoice/apply/add',
|
||||
edit_url: 'user/invoice/apply/edit',
|
||||
del_url: 'user/invoice/apply/del',
|
||||
multi_url: 'user/invoice/apply/multi',
|
||||
import_url: 'user/invoice/apply/import',
|
||||
table: 'user_invoice_apply',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
fixedColumns: true,
|
||||
fixedRightNumber: 1,
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'user_id', title: __('User_id')},
|
||||
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status},
|
||||
{field: 'apply_type', title: __('Apply_type'), searchList: {"1":__('Apply_type 1'),"2":__('Apply_type 2')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'price', title: __('Price'), operate:'BETWEEN'},
|
||||
{field: 'head_type', title: __('Head_type'), searchList: {"personal":__('Head_type personal'),"corporate":__('Head_type corporate')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'invoice_type', title: __('Invoice_type'), searchList: {"ordinary":__('Invoice_type ordinary'),"special":__('Invoice_type special')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'invoice_header', title: __('Invoice_header'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'tax_id', title: __('Tax_id'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'bank_deposit', title: __('Bank_deposit'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'bank_number', title: __('Bank_number'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'enterprise_address', title: __('Enterprise_address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'enterprise_phone', title: __('Enterprise_phone'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'invoice_reservation_phone', title: __('Invoice_reservation_phone'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'invoice_reservation_email', title: __('Invoice_reservation_email'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'invoicingtime', title: __('Invoicingtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
|
||||
{field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
|
||||
{field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
edit: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
69
public/assets/js/backend/user/invoice/header.js
Normal file
69
public/assets/js/backend/user/invoice/header.js
Normal file
@ -0,0 +1,69 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'user/invoice/header/index' + location.search,
|
||||
add_url: 'user/invoice/header/add',
|
||||
edit_url: 'user/invoice/header/edit',
|
||||
del_url: 'user/invoice/header/del',
|
||||
multi_url: 'user/invoice/header/multi',
|
||||
import_url: 'user/invoice/header/import',
|
||||
table: 'user_invoice_header',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
fixedColumns: true,
|
||||
fixedRightNumber: 1,
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'user_id', title: __('User_id')},
|
||||
{field: 'head_type', title: __('Head_type'), searchList: {"personal":__('Head_type personal'),"corporate":__('Head_type corporate')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'invoice_type', title: __('Invoice_type'), searchList: {"ordinary":__('Invoice_type ordinary'),"special":__('Invoice_type special')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'invoice_header', title: __('Invoice_header'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'tax_id', title: __('Tax_id'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'bank_deposit', title: __('Bank_deposit'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'bank_number', title: __('Bank_number'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'enterprise_address', title: __('Enterprise_address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'enterprise_phone', title: __('Enterprise_phone'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'invoice_reservation_phone', title: __('Invoice_reservation_phone'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'invoice_reservation_email', title: __('Invoice_reservation_email'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'is_default', title: __('Is_default'), searchList: {"0":__('Is_default 0'),"1":__('Is_default 1')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
|
||||
{field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
|
||||
{field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
edit: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user