{ "tblname": "opportunities", "title": "商机管理", "params": { "sortby": ["created_at desc"], "logined_userid": "owner_id", "confidential_fields": [], "editor": { "binds": [ { "wid": "estimated_amount", "event": "changed", "actiontype": "script", "target": "predicted_revenue", "script": "const amount = parseFloat(widget.getValue()) || 0;\nconst probability = parseFloat(document.getElementById('probability')?.value) || 0;\nconst predicted = (amount * probability / 100).toFixed(2);\ndocument.getElementById('predicted_revenue').value = predicted;" }, { "wid": "probability", "event": "changed", "actiontype": "script", "target": "predicted_revenue", "script": "const amount = parseFloat(document.getElementById('estimated_amount')?.value) || 0;\nconst probability = parseFloat(widget.getValue()) || 0;\nconst predicted = (amount * probability / 100).toFixed(2);\ndocument.getElementById('predicted_revenue').value = predicted;" } ] }, "browserfields": { "exclouded": ["id", "customer_id", "owner_id", "created_at", "updated_at"], "alters": { "current_stage": { "uitype": "code", "data": [ {"value": "初步接洽", "text": "初步接洽"}, {"value": "需求确认", "text": "需求确认"}, {"value": "方案报价", "text": "方案报价"}, {"value": "合同谈判", "text": "合同谈判"}, {"value": "成交", "text": "成交"} ] }, "source_type": { "uitype": "code", "data": [ {"value": "manual", "text": "手动录入"}, {"value": "lead", "text": "线索转化"} ] }, "status": { "uitype": "code", "data": [ {"value": "active", "text": "活跃"}, {"value": "won", "text": "已成交"}, {"value": "lost", "text": "已丢失"}, {"value": "closed", "text": "已关闭"} ] } } }, "editexclouded": ["id", "customer_id", "owner_id", "created_at", "updated_at", "predicted_revenue"], "subtables": [ { "field": "opportunity_id", "title": "阶段变更历史", "url": "{{entire_url('opportunity_stage_history')}}", "subtable": "opportunity_stage_history" } ] } }