- 调整财务相关菜单名称、排序与权限逻辑 - 新增充值订单与退款记录的页签切换功能 - 修改结算时间、状态等术语表述,优化理解性 - 隐藏非核心列表字段,简化页面展示 - 完善钱包流水统计说明,明确数据口径 - 新增企业资质审核相关关联入口 - 修复充值退款菜单重复显示问题 - 新增相关测试用例保障功能稳定性
82 行
4.4 KiB
JavaScript
82 行
4.4 KiB
JavaScript
define(['jquery', 'bootstrap', 'backend', 'table', 'backend/admin-table-layout', 'form'], function ($, undefined, Backend, Table, TableLayout, Form) {
|
|
|
|
var Controller = {
|
|
index: function () {
|
|
Table.api.init({
|
|
extend: {
|
|
index_url: 'invoice_title/index' + location.search,
|
|
detail_url: 'invoice_title/detail',
|
|
edit_url: 'invoice_title/edit',
|
|
del_url: 'invoice_title/del',
|
|
table: 'invoice_title',
|
|
}
|
|
});
|
|
|
|
var table = $("#table");
|
|
|
|
table.bootstrapTable({
|
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
|
pk: 'id',
|
|
sortName: 'id',
|
|
sortOrder: 'desc',
|
|
fixedColumns: false,
|
|
fixedRightNumber: 0,
|
|
columns: [
|
|
[
|
|
{field: 'index', visible: false, title: '序号', operate: false, formatter: Table.api.formatter.index, width: '60px'},
|
|
{field: 'title', title: '发票抬头', operate: 'LIKE', formatter: function (v, row) {
|
|
var def = Number(row.is_default) === 1 ? ' <span class="label label-success">默认</span>' : '';
|
|
return '<strong>' + Fast.api.escape(v || '-') + '</strong>' + def;
|
|
}},
|
|
{field: 'title_type', title: '抬头类型', searchList: {"enterprise":"企业单位","personal":"个人/非企业"}, formatter: Table.api.formatter.label, custom: {enterprise: 'primary', personal: 'default'}},
|
|
{field: 'default_invoice_type', title: '默认票种', searchList: {"normal":"普通发票","special":"专用发票"}, formatter: Table.api.formatter.label, custom: {normal: 'info', special: 'warning'}},
|
|
{field: 'tax_no', title: '纳税人识别号', operate: 'LIKE', formatter: function (v) {
|
|
return v ? '<code>' + Fast.api.escape(v) + '</code>' : '<span class="text-muted">-</span>';
|
|
}},
|
|
{field: 'merchant.name', title: '归属企业', operate: 'LIKE', formatter: function (v) {
|
|
return v ? Fast.api.escape(v) : '<span class="text-muted">个人业主</span>';
|
|
}},
|
|
{field: 'user.nickname', title: '维护用户', operate: 'LIKE'},
|
|
{field: 'email', visible: false, title: '接收邮箱', operate: 'LIKE', formatter: function (v) { return v ? Fast.api.escape(v) : '-'; }},
|
|
{field: 'issued_count', visible: false, title: '已开票数', operate: false},
|
|
{field: 'issued_amount', visible: false, title: '已开票金额', operate: false},
|
|
{field: 'updatetime', title: '更新时间', operate: 'RANGE', addclass: 'datetimerange', autocomplete: false, formatter: Table.api.formatter.datetime, width: '150px'},
|
|
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
|
|
buttons: [
|
|
{
|
|
name: 'detail',
|
|
text: '详情',
|
|
title: '发票抬头详情',
|
|
classname: 'btn btn-xs btn-info btn-detailone',
|
|
extend: 'data-area=\'["880px","82%"]\''
|
|
},
|
|
{
|
|
name: 'edit',
|
|
text: '订正',
|
|
title: '订正抬头档案',
|
|
classname: 'btn btn-xs btn-success btn-editone',
|
|
extend: 'data-area=\'["860px","80%"]\''
|
|
}
|
|
],
|
|
formatter: Table.api.formatter.operate}
|
|
]
|
|
]
|
|
});
|
|
|
|
Table.api.bindevent(table);
|
|
},
|
|
detail: function () {
|
|
Controller.api.bindevent();
|
|
},
|
|
edit: function () {
|
|
Controller.api.bindevent();
|
|
},
|
|
api: {
|
|
bindevent: function () {
|
|
Form.api.bindevent($("form[role=form]"));
|
|
}
|
|
}
|
|
};
|
|
return Controller;
|
|
});
|