功能说明:获取当前机构已启用的商机字段信息(包括基础字段,自定义字段和表单字段)
请求方式:POST(HTTPS)
请求地址:https://qwif.do1.com.cn/qwcgi/api/crm/business/getBusinessFields.do?token=token&corpId=corpId
CrmApi api = QwSdkUtil.getInter(CrmApi.class);
// 调用接口
ApiCrmBusinessFieldsResultVO result = api.getBusinessFields(
QwSdkUtil.getCacheToken());
System.out.println(JSONUtil.stringify(result));
{
"code":"0",
"data":
{
"basicFields":
[
{
"fieldName":"title",
"isNecessary":"1",
"label":"标题",
"sort":"1",
"type":"TextField"
},
{
"fieldName":"content",
"isNecessary":"0",
"label":"内容",
"sort":"2",
"type":"TextArea"
},
{
"fieldName":"clientId",
"isNecessary":"1",
"label":"所属客户",
"sort":"3",
"type":"TextField"
},
{
"fieldName":"contactsIds",
"isNecessary":"0",
"label":"客户联系人",
"sort":"4",
"type":"TextField"
},
{
"fieldName":"partnersIds",
"isNecessary":"0",
"label":"商机合作伙伴",
"sort":"5",
"type":"TextField"
},
{
"choices":
[
{
"optionId":"5d68e5707b0b4e15a179bd037e33aeac",
"optionName":"初步交流",
"sort":"0",
"value":"1"
},
{
"optionId":"5d68e5707b0b4e15a179bd037e33aeac",
"optionName":"需求沟通",
"sort":"1",
"value":"2"
},
{
"optionId":"5d68e5707b0b4e15a179bd037e33aeac",
"optionName":"商务沟通",
"sort":"2",
"value":"3"
},
{
"optionId":"5d68e5707b0b4e15a179bd037e33aeac",
"optionName":"签约失败",
"sort":"3",
"value":"4"
},
{
"optionId":"5d68e5707b0b4e15a179bd037e33aeac",
"optionName":"签约交款",
"sort":"4",
"value":"5"
}
],
"fieldName":"businessStage",
"isNecessary":"1",
"label":"目前阶段",
"sort":"6",
"type":"SelectField"
},
{
"choices":
[
{
"optionId":"59eb99469f784cc090c92e6e02d0c513",
"optionName":"战略商机",
"sort":"0",
"value":"11"
},
{
"optionId":"5d68e5707b0b4e15a179bd037e33aeac",
"optionName":"时间商机",
"sort":"1",
"value":"12"
}
],
"fieldName":"businessType",
"isNecessary":"0",
"label":"商机类别",
"sort":"7",
"type":"SelectField"
},
{
"fieldName":"estimatedSale",
"isNecessary":"0",
"label":"销售额(元)",
"sort":"8",
"type":"Number"
},
{
"fieldName":"estimatedDate",
"isNecessary":"1",
"label":"结单日期",
"sort":"9",
"type":"DateTime"
},
{
"choices":
[
{
"optionId":"365cf1c30ba1b7d19f8e9d9cccb92b81",
"optionName":"价格原因",
"sort":"1"
},
{
"optionId":"365cf1c30ba1b7d19f8e9d9cccb92b82",
"optionName":"质量原因",
"sort":"2"
},
{
"optionId":"365cf1c30ba1b7d19f8e9d9cccb92b83",
"optionName":"客户预算原因",
"sort":"3"
},
{
"optionId":"365cf1c30ba1b7d19f8e9d9cccb92b84",
"optionName":"客户关系原因",
"sort":"4"
}
],
"fieldName":"loseReasonDesc",
"isNecessary":"1",
"label":"输单原因",
"sort":"10",
"type":"SelectField"
},
{
"fieldName":"chargePersonId",
"isNecessary":"1",
"label":"负责人Id",
"sort":"11",
"type":"TextField"
},
{
"fieldName":"relativePersonsIds",
"isNecessary":"1",
"label":"相关负责人Ids",
"sort":"12",
"type":"TextField"
},
{
"fieldName":"submitType",
"isNecessary":"0",
"label":"通知类型",
"sort":"13",
"type":"TextField"
}
],
"customFields":
[
{
"customFieldId":"ad3383676ae1090cf39bdc9e6fa20676",
"desc":"填写单行内容",
"isNecessary":"0",
"label":"其他要求",
"sort":"1",
"type":"TextField"
},
{
"customFieldId":"c1bec3b07dfc8f7e350afc8da30e5cb1",
"desc":"填写多行内容",
"isNecessary":"0",
"label":"备注",
"sort":"2",
"type":"TextArea"
},
{
"choices":
[
{
"optionId":"3556a5e73566430ab5ef40d0921adac0",
"optionName":"方式1",
"sort":"1",
"value":"1"
},
{
"optionId":"98ec2968791c431ea04b1ad03c0d7d02",
"optionName":"方式2",
"sort":"2",
"value":"2"
},
{
"optionId":"daad6499a8234fe491f93a93ca0fe38a",
"optionName":"方式3",
"sort":"3",
"value":"3"
}
],
"customFieldId":"6cae2f16cd2a67b2b4613b3719527a47Y",
"isNecessary":"0",
"label":"支付方式",
"sort":"3",
"type":"SelectField"
},
{
"customFieldId":"21e7c172cc7a1bec704b793d5e739beb",
"desc":"填写联系方式",
"isNecessary":"0",
"label":"其他联系方式",
"sort":"6",
"type":"PhoneNumber"
},
{
"customFieldId":"4e4eb8cba8a0d9e72a085f2f36d861a0",
"desc":"填写日期",
"isNecessary":"0",
"label":"商谈日期",
"sort":"4",
"type":"DateTime"
},
{
"customFieldId":"73504817cff862f1748b2735a852fbfe",
"desc":"填写整数",
"isNecessary":"0",
"label":"预置基站数量",
"sort":"5",
"type":"Integer"
},
{
"customFieldId":"bf459fb4837c9a6b161ddac72dd7c836",
"desc":"填写小数,保留两位小数",
"isNecessary":"0",
"label":"违约金",
"sort":"5",
"type":"Double"
},
{
"customFieldId":"5c8fe1262515a435e6eb004f540d1c5f",
"desc":"填写百分数,带百分号",
"isNecessary":"0",
"label":"普及率",
"sort":"5",
"type":"Percent"
},
{
"customFieldId":"80cf88634c7b0e27f6d5d42badecca1f",
"desc":"必填",
"isNecessary":"0",
"label":"必填字段",
"sort":"6",
"type":"TextField"
}
],
"seniorFields":
[
{
"fieldId":"fo4acf32007e5742c2ac001dc9a96e2be7",
"fieldName":"(表单)单行文字",
"isNecessary":"true",
"note":"请输入",
"sort":"1",
"type":"TextField"
},
{
"fieldId":"fo0074c8bb21b943cbb674f75a867e0fac",
"fieldName":"(表单)邮箱",
"isNecessary":"false",
"note":"请输入",
"sort":"2",
"type":"EmailField"
},
{
"fieldId":"fod3174d0bbc7449c080449c0cbbe6cc86",
"fieldName":"(表单)数字",
"isNecessary":"true",
"note":"请输入",
"sort":"3",
"type":"NumberField"
},
{
"fieldId":"fo6d502db6136a4a1e821415f383b0ffaa",
"fieldName":"(表单)电话",
"isNecessary":"false",
"note":"分隔请用-或空格,国际电话请加+",
"sort":"4",
"type":"TelephoneField"
},
{
"fieldId":"foc14e0347f57b40d283324c3b489f5d0f",
"fieldName":"(表单)手机",
"isNecessary":"false",
"note":"请输入",
"sort":"5",
"type":"MobileField"
},
{
"fieldId":"fof58d5ec766514c53bdb4961110053575",
"fieldName":"(表单)多行文字",
"isNecessary":"false",
"note":"请输入",
"sort":"6",
"type":"TextArea"
},
{
"fieldId":"fo375dfaeb87b241e681634b7dc8906bee",
"fieldName":"(表单)日期",
"isNecessary":"false",
"note":"请选择",
"sort":"7",
"type":"DateField"
},
{
"fieldId":"fo855fd02dffc8461d984a12c119730df2",
"fieldName":"(表单)时间",
"isNecessary":"false",
"note":"请选择",
"sort":"8",
"type":"TimeField"
},
{
"fieldId":"fo9a71a63280374c5b851de2f752d466a9",
"fieldName":"(表单)日期时间",
"isNecessary":"false",
"note":"请选择",
"sort":"9",
"type":"DateTimeField"
},
{
"choices":
[
{
"optionId":"foe0cd24dc3f6440ebaf4014cc1506ae3e",
"optionName":"选项1",
"sort":1
},
{
"optionId":"fobcb78b055b284d47819e249331d9eed2",
"optionName":"选项2",
"sort":2
},
{
"optionId":"foe58efb490f6e4be28d4fdd63e8dac0e1",
"optionName":"选项3",
"sort":3
}
],
"fieldId":"fo0dec944e2817445787141a96a9922aa2",
"fieldName":"(表单)单项选择",
"isNecessary":"false",
"sort":"10",
"type":"RadioButton"
},
{
"choices":
[
{
"optionId":"fo2a53981b22ec4d298b8f43ed41e99a82",
"optionName":"选项1",
"sort":1
},
{
"optionId":"foe6b5df849f824a23bc95f48893218192",
"optionName":"选项2",
"sort":2
},
{
"optionId":"fo30168fb6ce7d432f88e89858316146d5",
"optionName":"选项3",
"sort":3
}
],
"fieldId":"foe59e667acacc46799d99e12d1af34fa9",
"fieldName":"(表单)多项选择",
"isNecessary":"false",
"sort":"11",
"type":"CheckBox"
},
{
"choices":
[
{
"optionId":"fo81a20466198c43fa87b7592e4db09d8c",
"optionName":"选项1",
"sort":1
},
{
"optionId":"fo3ea9316e9eba49dfa816df1dd8441296",
"optionName":"选项2",
"sort":2
},
{
"optionId":"fo6735fc627040495088f7de855c0e4020",
"optionName":"选项3",
"sort":3
}
],
"fieldId":"fobfb40e3e839d441286fce7cb25f30618",
"fieldName":"(表单)下拉框",
"isNecessary":"false",
"sort":"12",
"type":"DropDown"
},
{
"choices":
[
{
"optionId":"foe19826c750d042b49eed2edc85f8763f",
"optionName":"选项",
"sort":1
},
{
"optionId":"foe1652cf16c4b4c9182eb3a1dcc552e03",
"optionName":"选项",
"sort":2
},
{
"optionId":"fo041f54152075400c825098dcdbfff441",
"optionName":"选项",
"sort":3
}
],
"fieldId":"foa7b53a4b28a841bb8feffbca2efaae42",
"fieldName":"(表单)评分",
"isNecessary":"false",
"sort":"13",
"type":"RatingField"
},
{
"fieldId":"fo8cad6f5a58ba46558b9431d5204edb2b",
"fieldName":"(表单)地理位置",
"isNecessary":"false",
"sort":"14",
"type":"GeoField"
},
{
"fieldId":"fo192681ba68204d908e70f81066512a26",
"fieldName":"(表单)说明项",
"isNecessary":"false",
"note":"请输入",
"sort":"15",
"type":"ImageCheckBox"
},
{
"fieldId":"fo7d684233347749e9916d69469a5963f1",
"fieldName":"(表单)分节",
"isNecessary":"false",
"sort":"16",
"type":"SectionBreak"
},
{
"fieldId":"fo03a32cded98b45f0802326e78a3422aa",
"fieldName":"(表单)图片",
"isNecessary":"false",
"sort":"17",
"type":"ImageField"
},
{
"fieldId":"focac8c53ef9344513adf316dd744fcc88",
"fieldName":"(表单)附件",
"isNecessary":"false",
"sort":"18",
"type":"AccessoryField"
},
{
"fieldId":"fo50ab5879143647ab903b8e57ecd1db44",
"fieldName":"(表单)省市区",
"isNecessary":"false",
"sort":"19",
"type":"CityField"
},
{
"fieldId":"fo33f8c688a7ee445a9f7c3c0f5fee89cc",
"fieldName":"(表单)计算式",
"isNecessary":"false",
"note":"(表单)数字",
"sort":"20",
"type":"EquationField"
},
{
"choices":
[
{
"optionId":"fo6e892337a7f14bd29dab052e61fe9542",
"optionName":"选项1:二级选项1",
"sort":1
},
{
"optionId":"fo6e892337a7f14bd29dab052e61fe9542",
"optionName":"选项1:二级选项2",
"sort":2
},
{
"optionId":"foe7416257061342888ed9361dce544ef0",
"optionName":"选项2:二级选项1",
"sort":3
},
{
"optionId":"foe7416257061342888ed9361dce544ef0",
"optionName":"选项2:二级选项2",
"sort":4
}
],
"fieldId":"fo4a614a867c60409f814dbd1981f5f13f",
"fieldName":"(表单)两级下拉框",
"isNecessary":"false",
"sort":"21",
"type":"CascadeDropDown"
},
{
"fieldId":"fofc48b703309d44fa8c02099cafb50638",
"fieldName":"(表单)微信扫码",
"isNecessary":"false",
"sort":"22",
"type":"ImageRadioButton"
},
{
"fieldId":"fo21d3476b5a4647e584f85f78acf8f1f8",
"fieldName":"(表单)流水号",
"isNecessary":"false",
"note":"请输入",
"sort":"23",
"type":"SerialNumberField"
},
{
"fieldId":"foe2d99bcf4fc0470b9326c408016a7295",
"fieldName":"(表单)手写签名",
"isNecessary":"false",
"note":"请输入",
"sort":"24",
"type":"HandWrittenField"
},
{
"fieldId":"fo468250bcf0bb4a949a786b473349c561",
"fieldName":"(表单)通讯录成员",
"isNecessary":"false",
"sort":"25",
"type":"MEMBERCustomerField"
},
{
"fieldId":"foa2a9b2d6f631454080cdbe2b002af086",
"fieldName":"(表单)部门",
"isNecessary":"false",
"sort":"26",
"type":"DEPTCustomerField"
}
]
},
"desc":"成功"
}
basicField参数
| 参数 | 说明 | 备注 |
|---|---|---|
| fieldName | 字段名 |
|
| type | 字段类型 |
TextField:单行;TextArea:多行;SelectField:下拉选项;DateTime:日期; Number:浮点或整数;PhoneNumber:电话号码 |
| label | 字段中文注释 |
|
| isNecessary | 是否必须 |
|
| sort | 排序号 |
|
| choices | 选项choice数组 | 只有是SelectField类型才有值,其余未空数组[] |
customField参数
| 参数 | 说明 | 备注 |
|---|---|---|
| customFieldId | 自定义字段Id |
|
| type | 自定义字段类型 |
TextField:单行;TextArea:多行;SelectField:下拉选项;DateTime:日期; Integer:整数;Double:小数;Percent:百分数;PhoneNumber:电话号码 |
| label | 自定义字段中文注释 |
|
| isNecessary | 是否必填 | 1:必填;0:非必填 |
| sort | 排序号 |
|
| desc | 自定义字段填写提示 |
|
| choices | 选项choice数组 |
只有是SelectField类型才有值,其余未空数组[] |
seniorFields参数
|
参数 |
说明 |
备注 |
|---|---|---|
|
fieldId |
表单字段ID |
|
|
fieldName |
表单字段名称 |
|
|
type |
字段类型 |
TextField(单行文字)、EmailField(邮箱)、NumberField(数字)、TelephoneField(电话)、MobileField(手机)、 MEMBERCustomerField(通讯录成员)、DEPTCustomerField(部门) |
|
isNecessary |
是否必填 |
true=必填,false=非必填 |
|
sort |
排序号 |
|
|
choices |
选项列表 |
只有 RadioButton(单项选择)、CheckBox(多项选择)、DropDown(下拉框)、RatingField(评分)、CascadeDropDown(两级下拉框) 才有值,其余为[] |
|
note |
填写提示 |
|
choice参数
| 参数 | 说明 | 备注 |
|---|---|---|
|
optionId |
选项Id | 新增商机时填输单原因需要填id |
| optionName | 选项名 |
|
| sort | 排序号 |
|
| value | 选项值 | 用于新增商机中的SelectField类型字段的填写。 |