AdwebEnquiry.data.ts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. import { BasicColumn, FormSchema } from '/@/components/Table';
  2. import { rules } from '@/utils/helper/validator';
  3. //列表数据
  4. export const columns: BasicColumn[] = [
  5. {
  6. title: '站点名称',
  7. align: 'center',
  8. dataIndex: 'siteName',
  9. defaultHidden: true,
  10. },
  11. {
  12. title: '姓名',
  13. align: 'left',
  14. dataIndex: 'contact',
  15. },
  16. {
  17. title: '邮箱',
  18. align: 'center',
  19. dataIndex: 'fromEmail',
  20. width: 300,
  21. },
  22. {
  23. title: 'WhatsApp',
  24. align: 'center',
  25. dataIndex: 'whatsApp',
  26. customRender: function ({ text }) {
  27. if (text == null || text == '' || text == undefined) {
  28. return '--';
  29. } else {
  30. return text;
  31. }
  32. },
  33. },
  34. {
  35. title: '手机号',
  36. align: 'center',
  37. dataIndex: 'phone',
  38. customRender: function ({ text }) {
  39. if (text == null || text == '' || text == undefined) {
  40. return '--';
  41. } else {
  42. return text;
  43. }
  44. },
  45. },
  46. {
  47. title: '来源IP',
  48. align: 'center',
  49. dataIndex: 'fromIp',
  50. defaultHidden: true,
  51. customRender: function ({ text }) {
  52. if (text == null || text == '' || text == undefined) {
  53. return '--';
  54. } else {
  55. return text;
  56. }
  57. },
  58. },
  59. {
  60. title: '状态',
  61. align: 'center',
  62. dataIndex: 'readStatus',
  63. },
  64. {
  65. title: '询盘详情',
  66. align: 'left',
  67. dataIndex: 'details',
  68. },
  69. // {
  70. // title: '跟进人',
  71. // align: "center",
  72. // dataIndex: 'principalUid',
  73. // },
  74. {
  75. title: '来源页面',
  76. align: 'left',
  77. dataIndex: 'fromPage',
  78. },
  79. {
  80. title: '分类',
  81. align: 'center',
  82. dataIndex: 'userEffective',
  83. },
  84. {
  85. title: '询盘审核进度',
  86. align: 'center',
  87. dataIndex: 'verifyProgress',
  88. },
  89. {
  90. title: '来源国家',
  91. align: 'left',
  92. dataIndex: 'countryName',
  93. customRender: function ({ text }) {
  94. if (text == null || text == '' || text == undefined) {
  95. return '--';
  96. } else {
  97. return text;
  98. }
  99. },
  100. },
  101. {
  102. title: '来源插件',
  103. align: 'center',
  104. dataIndex: 'pluginName',
  105. defaultHidden: true,
  106. },
  107. {
  108. title: '询盘时间',
  109. align: 'center',
  110. dataIndex: 'recordCtime',
  111. customRender: function ({ text }) {
  112. return !text ? '' : text.length > 16 ? text.substr(0, 16) : text;
  113. },
  114. },
  115. {
  116. title: '创建时间',
  117. align: 'center',
  118. dataIndex: 'ctime',
  119. customRender: function ({ text }) {
  120. return !text ? '' : text.length > 16 ? text.substr(0, 16) : text;
  121. },
  122. },
  123. {
  124. title: '跟进人',
  125. align: 'center',
  126. dataIndex: 'principalUid',
  127. width: 200,
  128. },
  129. ];
  130. export const wasteColumns: BasicColumn[] = [
  131. {
  132. title: '站点名称',
  133. align: 'center',
  134. dataIndex: 'siteName',
  135. defaultHidden: true,
  136. },
  137. {
  138. title: '姓名',
  139. align: 'center',
  140. dataIndex: 'contact',
  141. },
  142. {
  143. title: '邮箱',
  144. align: 'center',
  145. dataIndex: 'fromEmail',
  146. },
  147. {
  148. title: '手机号',
  149. align: 'center',
  150. dataIndex: 'phone',
  151. customRender: function ({ text }) {
  152. if (text == null || text == '' || text == undefined) {
  153. return '--';
  154. } else {
  155. return text;
  156. }
  157. },
  158. },
  159. {
  160. title: '来源IP',
  161. align: 'center',
  162. dataIndex: 'fromIp',
  163. customRender: function ({ text }) {
  164. if (text == null || text == '' || text == undefined) {
  165. return '--';
  166. } else {
  167. return text;
  168. }
  169. },
  170. },
  171. {
  172. title: '状态',
  173. align: 'center',
  174. dataIndex: 'readStatus',
  175. },
  176. {
  177. title: '询盘详情',
  178. align: 'center',
  179. dataIndex: 'details',
  180. },
  181. // {
  182. // title: '跟进人',
  183. // align: "center",
  184. // dataIndex: 'principalUid',
  185. // },
  186. {
  187. title: '来源页面',
  188. align: 'center',
  189. dataIndex: 'fromPage',
  190. },
  191. {
  192. title: '询盘类型',
  193. align: 'center',
  194. dataIndex: 'wasteEnquiryType',
  195. },
  196. {
  197. title: '来源国家',
  198. align: 'center',
  199. dataIndex: 'countryName',
  200. customRender: function ({ text }) {
  201. if (text == null || text == '' || text == undefined) {
  202. return '--';
  203. } else {
  204. return text;
  205. }
  206. },
  207. },
  208. {
  209. title: '询盘时间',
  210. align: 'center',
  211. dataIndex: 'recordCtime',
  212. customRender: function ({ text }) {
  213. return !text ? '' : text.length > 16 ? text.substr(0, 16) : text;
  214. },
  215. },
  216. {
  217. title: '创建时间',
  218. align: 'center',
  219. dataIndex: 'ctime',
  220. customRender: function ({ text }) {
  221. return !text ? '' : text.length > 16 ? text.substr(0, 16) : text;
  222. },
  223. },
  224. ];
  225. export const formSchema: FormSchema[] = [
  226. {
  227. label: '',
  228. field: 'id',
  229. component: 'Input',
  230. show: false,
  231. },
  232. {
  233. label: '姓名',
  234. field: 'name',
  235. component: 'Input',
  236. required: true,
  237. dynamicDisabled: ({ values }) => {
  238. return !!values.id;
  239. },
  240. },
  241. {
  242. label: '邮箱',
  243. field: 'email',
  244. component: 'Input',
  245. required: true,
  246. dynamicRules: ({}) => {
  247. return [{ ...rules.rule('email', false)[0], trigger: 'blur' }];
  248. },
  249. },
  250. {
  251. label: '手机号码',
  252. field: 'phone',
  253. component: 'Input',
  254. dynamicRules: ({}) => {
  255. return [{ pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误', trigger: 'blur' }];
  256. },
  257. },
  258. {
  259. label: '询盘内容',
  260. field: 'message',
  261. required: true,
  262. component: 'InputTextArea',
  263. componentProps: {
  264. placeholder: '请输入询盘内容',
  265. rows: 8,
  266. },
  267. },
  268. {
  269. label: '询盘来源',
  270. field: 'fromSource',
  271. component: 'Select',
  272. componentProps: {
  273. mode: 'single',
  274. options: [
  275. {
  276. label: '邮件',
  277. value: 'email',
  278. },
  279. {
  280. label: '广告',
  281. value: 'ad',
  282. },
  283. {
  284. label: '社媒',
  285. value: 'socialMedia',
  286. },
  287. {
  288. label: '聊天',
  289. value: 'chat',
  290. },
  291. {
  292. label: '电话',
  293. value: 'phone',
  294. },
  295. ],
  296. },
  297. },
  298. {
  299. label: '来源国家',
  300. field: 'countryCode',
  301. component: 'JSearchSelect',
  302. componentProps: {
  303. dict: 'adweb_country,country_name,country_iso_code',
  304. async: true,
  305. },
  306. },
  307. {
  308. label: '图片上传',
  309. field: 'enquiryFile',
  310. component: 'JImageUpload',
  311. componentProps: {
  312. fileMax: 1,
  313. bizPath: 'enquiry',
  314. },
  315. },
  316. ];
  317. // 高级查询数据
  318. export const superQuerySchema = {
  319. fromIp: { title: '询盘来源IP', order: 0, view: 'text', type: 'string' },
  320. fromEmail: { title: '询盘发送者邮箱账号', order: 1, view: 'text', type: 'string' },
  321. modular: { title: '询盘模块:admp_web:admp网站询盘 ;email:邮件询盘 ;diy_element:自定义组件询盘', order: 2, view: 'text', type: 'string' },
  322. fromUser: { title: '发送人姓名', order: 3, view: 'text', type: 'string' },
  323. status: { title: '0删除,1有效,默认值1 2:待解析 3:数据解析中 4.解析失败', order: 4, view: 'number', type: 'number' },
  324. dealCount: { title: '数据解析次数', order: 5, view: 'number', type: 'number' },
  325. sysEffective: { title: '系统有效性 0:无效 1;有效 后台字段', order: 6, view: 'number', type: 'number' },
  326. userEffective: { title: '用户有效性 0:无效 1:有效 2 : 待定 取自字典表', order: 7, view: 'number', type: 'number' },
  327. sensitiveMessage: { title: '敏感信息', order: 8, view: 'textarea', type: 'string' },
  328. phase: { title: '询盘阶段,由跟踪来决定(1:待沟通 ;2:沟通中;3:成单;4;放弃)', order: 9, view: 'text', type: 'string' },
  329. trackStatus: { title: '跟进跟进状态,由跟踪来决定(1:待跟进 ;2:跟进中;3:完成;4;停止)', order: 10, view: 'text', type: 'string' },
  330. uid: { title: '询盘所属用户主账号ID', order: 11, view: 'text', type: 'string' },
  331. tracker: { title: '询盘跟进人 id', order: 12, view: 'number', type: 'number' },
  332. recordCtime: { title: '询盘创建时间', order: 13, view: 'datetime', type: 'string' },
  333. ctime: { title: 'ADMP平台创建时间', order: 14, view: 'datetime', type: 'string' },
  334. country: { title: '国家/地区(根据ip获取)', order: 15, view: 'text', type: 'string' },
  335. countryIsoCode: { title: '通过ip解析获得国家码', order: 16, view: 'text', type: 'string' },
  336. areaIsoCode: { title: '通过ip解析获得区域码', order: 17, view: 'text', type: 'string' },
  337. pluginName: { title: '询盘插件名称,名称小写,如:wpforms', order: 18, view: 'text', type: 'string' },
  338. siteCode: { title: '站点code,关联站点表', order: 19, view: 'text', type: 'string' },
  339. siteToken: { title: '站点token', order: 20, view: 'text', type: 'string' },
  340. siteHost: { title: '询盘来自站点的域名', order: 21, view: 'text', type: 'string' },
  341. recordId: { title: '询盘原站点记录ID', order: 22, view: 'text', type: 'string' },
  342. utime: { title: '状态更新时间', order: 23, view: 'datetime', type: 'string' },
  343. replyTime: { title: '回复时间', order: 24, view: 'datetime', type: 'string' },
  344. forward: { title: '转发状态:0未转发,1已转发,默认值0', order: 25, view: 'number', type: 'number' },
  345. forwardTime: { title: '转发时间', order: 26, view: 'datetime', type: 'string' },
  346. visitId: { title: '访客id', order: 27, view: 'text', type: 'string' },
  347. siteId: { title: '来源于站点的id', order: 28, view: 'number', type: 'number' },
  348. companyId: { title: '公司id', order: 29, view: 'number', type: 'number' },
  349. contactIds: { title: '联系人id,字符串组合', order: 30, view: 'text', type: 'string' },
  350. jobId: { title: '定时器任务修改查询唯一标识(10位随机数)', order: 31, view: 'text', type: 'string' },
  351. replayStatus: { title: '回复状态', order: 32, view: 'text', type: 'string' },
  352. noOut: { title: '外部编号', order: 33, view: 'text', type: 'string' },
  353. modifyRecordCtime: { title: '处理后的询盘当地时间字段', order: 34, view: 'datetime', type: 'string' },
  354. transContent: { title: 'transContent', order: 35, view: 'textarea', type: 'string' },
  355. countryCode: { title: '国家code', order: 36, view: 'text', type: 'string' },
  356. countryName: { title: '国家名', order: 37, view: 'text', type: 'string' },
  357. whatsApp: { title: 'WhatsApp', order: 38, view: 'text', type: 'string' },
  358. wasteEnquiry: { title: '0:不是;1:是', order: 39, view: 'number', type: 'number' },
  359. pushStatus: { title: '推送状态,0:待发送,1:成功,2不予发送', order: 40, view: 'number', type: 'number' },
  360. pushErrorNum: { title: '推送错误次数', order: 41, view: 'number', type: 'number' },
  361. name: { title: '姓名', order: 42, view: 'text', type: 'string' },
  362. email: { title: '邮箱地址', order: 43, view: 'text', type: 'string' },
  363. message: { title: '询盘信息', order: 44, view: 'textarea', type: 'string' },
  364. company: { title: '用户名称', order: 45, view: 'text', type: 'string' },
  365. fromPage: { title: '来源页面', order: 46, view: 'text', type: 'string' },
  366. customerIp: { title: 'form表单传入Ip', order: 47, view: 'text', type: 'string' },
  367. phone: { title: '手机号', order: 48, view: 'text', type: 'string' },
  368. whatsapp: { title: 'WhatsApp', order: 49, view: 'text', type: 'string' },
  369. readStatus: { title: '阅读状态,0是未阅读,1是已阅读', order: 50, view: 'number', type: 'number' },
  370. principalUid: { title: '负责人的id', order: 51, view: 'text', type: 'string' },
  371. principalType: { title: '0代表系统根据规则分配,1代表主账户指定', order: 52, view: 'number', type: 'number' },
  372. address: { title: 'form表单中的地址', order: 53, view: 'textarea', type: 'string' },
  373. specialField: { title: '客户自定义字段', order: 54, view: 'textarea', type: 'string' },
  374. requestTime: { title: '向Wp发送请求时间', order: 55, view: 'datetime', type: 'string' },
  375. acquireMessageTime: { title: 'Adweb实时获取WebHookS消息时间,定时器无该值', order: 56, view: 'datetime', type: 'string' },
  376. effectiveReason: { title: '疑似垃圾询盘理由', order: 57, view: 'text', type: 'string' },
  377. wasteEnquiryType: { title: '垃圾询盘类型,关键词:keyword,邮箱:email,ip: ip,其他:other', order: 58, view: 'text', type: 'string' },
  378. cartItems: { title: '询盘关联产品', order: 59, view: 'textarea', type: 'string' },
  379. };