111 lines
2.3 KiB
JSON
111 lines
2.3 KiB
JSON
{
|
|
"tablename": "receipts",
|
|
"grid": {
|
|
"fields": [
|
|
{
|
|
"name": "receipt_number",
|
|
"title": "收款编号",
|
|
"width": 150
|
|
},
|
|
{
|
|
"name": "customer_name",
|
|
"title": "客户名称",
|
|
"width": 200
|
|
},
|
|
{
|
|
"name": "total_amount",
|
|
"title": "收款总额",
|
|
"width": 120,
|
|
"alter": "money"
|
|
},
|
|
{
|
|
"name": "receipt_date",
|
|
"title": "收款日期",
|
|
"width": 120,
|
|
"alter": "date"
|
|
},
|
|
{
|
|
"name": "receipt_method",
|
|
"title": "收款方式",
|
|
"width": 120,
|
|
"alter": "code:PAYMENT_METHOD"
|
|
},
|
|
{
|
|
"name": "receipt_status",
|
|
"title": "状态",
|
|
"width": 100,
|
|
"alter": "code:RECEIPT_STATUS"
|
|
},
|
|
{
|
|
"name": "created_by_name",
|
|
"title": "创建人",
|
|
"width": 120
|
|
},
|
|
{
|
|
"name": "description",
|
|
"title": "备注",
|
|
"width": 200
|
|
}
|
|
],
|
|
"joins": [
|
|
{
|
|
"table": "customers",
|
|
"alias": "cu",
|
|
"on": "receipts.customer_id = cu.id"
|
|
},
|
|
{
|
|
"table": "users",
|
|
"alias": "u",
|
|
"on": "receipts.created_by = u.id"
|
|
}
|
|
],
|
|
"select_fields": [
|
|
"receipts.*",
|
|
"cu.name as customer_name",
|
|
"u.username as created_by_name"
|
|
]
|
|
},
|
|
"form": {
|
|
"fields": [
|
|
{
|
|
"name": "receipt_number",
|
|
"title": "收款编号",
|
|
"widget": "text",
|
|
"readonly": true
|
|
},
|
|
{
|
|
"name": "customer_id",
|
|
"title": "客户",
|
|
"widget": "select",
|
|
"options": "customers"
|
|
},
|
|
{
|
|
"name": "total_amount",
|
|
"title": "收款总额",
|
|
"widget": "number"
|
|
},
|
|
{
|
|
"name": "receipt_date",
|
|
"title": "收款日期",
|
|
"widget": "date"
|
|
},
|
|
{
|
|
"name": "receipt_method",
|
|
"title": "收款方式",
|
|
"widget": "select",
|
|
"options": "code:PAYMENT_METHOD"
|
|
},
|
|
{
|
|
"name": "receipt_status",
|
|
"title": "状态",
|
|
"widget": "select",
|
|
"options": "code:RECEIPT_STATUS"
|
|
},
|
|
{
|
|
"name": "description",
|
|
"title": "备注",
|
|
"widget": "textarea"
|
|
}
|
|
]
|
|
}
|
|
} |