CuspSupplierProfile.data.ts 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  1. import {BasicColumn} from '/@/components/Table';
  2. import {FormSchema} from '/@/components/Table';
  3. import { rules} from '/@/utils/helper/validator';
  4. import { render } from '/@/utils/common/renderUtils';
  5. import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
  6. import { getWeekMonthQuarterYear } from '/@/utils';
  7. import { uploadUrl } from '/@/api/common/api';
  8. //列表数据
  9. export const columns: BasicColumn[] = [
  10. {
  11. title: '编码(code)',
  12. align:"center",
  13. dataIndex: 'code'
  14. },
  15. {
  16. title: '名称(name)',
  17. align:"center",
  18. dataIndex: 'name'
  19. },
  20. {
  21. title: '简称(abbreviation)',
  22. align:"center",
  23. dataIndex: 'abbreviation'
  24. },
  25. {
  26. title: '供应商性质(supplier nature)',
  27. align:"center",
  28. dataIndex: 'supplierNature_dictText',
  29. width:200
  30. },
  31. {
  32. title: '税号(duty paragraph)',
  33. align:"center",
  34. dataIndex: 'dutyParagraph',
  35. width:200
  36. },
  37. {
  38. title: '法人(legal person)',
  39. align:"center",
  40. dataIndex: 'legalPerson'
  41. },
  42. {
  43. title: '联系人(contacts)',
  44. align:"center",
  45. dataIndex: 'contacts'
  46. },
  47. {
  48. title: '联系电话(phone)',
  49. align:"center",
  50. dataIndex: 'phone'
  51. },
  52. {
  53. title: '国家(country)',
  54. align:"center",
  55. dataIndex: 'country'
  56. },
  57. {
  58. title: '付款条件(payment terms)',
  59. align:"center",
  60. dataIndex: 'paymentTerms',
  61. width:200
  62. },
  63. {
  64. title: '原厂(original factory)',
  65. align:"center",
  66. dataIndex: 'originalFactory_dictText',
  67. width:180
  68. },
  69. {
  70. title: '状态(status)',
  71. align:"center",
  72. dataIndex: 'status_dictText'
  73. },
  74. {
  75. title: '考评等级(evaluation level)',
  76. align:"center",
  77. dataIndex: 'evaluationLevel_dictText',
  78. width:200
  79. },
  80. {
  81. title: '临时供应商(temporary supplier)',
  82. align:"center",
  83. dataIndex: 'temporarySupplier',
  84. customRender:function (t, r, index) {
  85. if(t.text==1){
  86. return '申请中(application in progress)'
  87. }else if(t.text==0){
  88. return '是(yes)'
  89. }else if(t.text==2){
  90. return '否'
  91. }
  92. }
  93. },
  94. ];
  95. //查询数据
  96. export const searchFormSchema: FormSchema[] = [
  97. {
  98. label: "编码(code)",
  99. field: "code",
  100. component: 'Input',
  101. labelWidth: 150,
  102. //colProps: {span: 6},
  103. },
  104. {
  105. label: "名称(name)",
  106. field: "name",
  107. component: 'Input',
  108. labelWidth: 150,
  109. //colProps: {span: 6},
  110. },
  111. {
  112. label: "简称(abbreviation)",
  113. field: "abbreviation",
  114. component: 'Input',
  115. labelWidth: 180,
  116. //colProps: {span: 6},
  117. },
  118. {
  119. label: "税号(dutyParagraph)",
  120. field: "dutyParagraph",
  121. component: 'Input',
  122. labelWidth: 150,
  123. //colProps: {span: 6},
  124. },
  125. {
  126. label: "联系人(contacts)",
  127. field: "contacts",
  128. component: 'Input',
  129. labelWidth: 150,
  130. //colProps: {span: 6},
  131. },
  132. {
  133. label: "联系电话(phone)",
  134. field: "phone",
  135. component: 'Input',
  136. labelWidth: 150,
  137. //colProps: {span: 6},
  138. },
  139. {
  140. label: "付款条件(payment terms)",
  141. field: "paymentTerms",
  142. component: 'JDictSelectTag',
  143. // component: 'JSelectMultiple',
  144. labelWidth: 180,
  145. componentProps:{
  146. dictCode:"payment_terms"
  147. },
  148. //colProps: {span: 6},
  149. },
  150. {
  151. label: "国家(country)",
  152. field: "country",
  153. component: 'JDictSelectTag',
  154. labelWidth: 150,
  155. componentProps:{
  156. dictCode: 'country'
  157. },
  158. //colProps: {span: 6},
  159. },
  160. {
  161. label: "考评评级(evaluation level)",
  162. field: "evaluationLevel",
  163. component: 'JDictSelectTag',
  164. labelWidth: 180,
  165. componentProps:{
  166. dictCode:"grade"
  167. },
  168. //colProps: {span: 6},
  169. },
  170. {
  171. label: "原厂(original factory)",
  172. field: "originalFactory",
  173. component: 'JDictSelectTag',
  174. labelWidth: 150,
  175. componentProps:{
  176. dictCode: "yes_or_no"
  177. },
  178. //colProps: {span: 6},
  179. },
  180. {
  181. label: "供应商性质(supplier nature)",
  182. field: "supplierNature",
  183. component: 'JDictSelectTag',
  184. labelWidth: 180,
  185. componentProps:{
  186. dictCode: "supplier_nature"
  187. },
  188. //colProps: {span: 6},
  189. },
  190. {
  191. label: "状态(status)",
  192. field: "status",
  193. labelWidth: 150,
  194. component: 'JDictSelectTag',
  195. componentProps:{
  196. dictCode: "valid_status"
  197. },
  198. //colProps: {span: 6},
  199. },
  200. {
  201. label: "临时供应商(temporary supplier)",
  202. field: "temporarySupplier",
  203. component: 'JDictSelectTag',
  204. labelWidth: 210,
  205. componentProps:{
  206. dictCode: "should_apply"
  207. },
  208. //colProps: {span: 6},
  209. },
  210. ];
  211. //表单数据
  212. export const formSchema: FormSchema[] = [
  213. {
  214. label: '编码(code)',
  215. field: 'code',
  216. component: 'Input',
  217. labelWidth: 200,
  218. colProps: {span: 12},
  219. componentProps: {
  220. placeholder:'自动生成'
  221. },
  222. dynamicDisabled:true
  223. },
  224. {
  225. label: '名称(name)',
  226. field: 'name',
  227. colProps: {span: 12},
  228. component: 'Input',
  229. labelWidth: 200,
  230. required: true,
  231. },
  232. {
  233. label: '简称(abbreviation)',
  234. field: 'abbreviation',
  235. colProps: {span: 12},
  236. labelWidth: 200,
  237. component: 'Input',
  238. },
  239. {
  240. label: '曾用名(name used before)',
  241. field: 'nameUsedBefore',
  242. colProps: {span: 12},
  243. component: 'Input',
  244. labelWidth: 200,
  245. },
  246. {
  247. label: '税号(duty paragraph)',
  248. field: 'dutyParagraph',
  249. colProps: {span: 12},
  250. labelWidth: 200,
  251. component: 'Input',
  252. },
  253. {
  254. label: '法人(legal person)',
  255. field: 'legalPerson',
  256. colProps: {span: 12},
  257. component: 'Input',
  258. labelWidth: 200,
  259. },
  260. {
  261. label: '联系人(contacts)',
  262. field: 'contacts',
  263. colProps: {span: 12},
  264. labelWidth: 200,
  265. component: 'Input',
  266. },
  267. {
  268. label: '联系电话(phone)',
  269. field: 'phone',
  270. colProps: {span: 12},
  271. component: 'Input',
  272. labelWidth: 200,
  273. },
  274. {
  275. label: '邮箱(email)',
  276. field: 'email',
  277. colProps: {span: 12},
  278. labelWidth: 200,
  279. component: 'Input',
  280. },
  281. {
  282. label: '注册地址(register address)',
  283. field: 'registerAddress',
  284. colProps: {span: 12},
  285. component: 'Input',
  286. labelWidth: 200,
  287. },
  288. {
  289. label: '公司地址(address)',
  290. field: 'address',
  291. colProps: {span: 12},
  292. labelWidth: 200,
  293. component: 'Input',
  294. },
  295. {
  296. label: '供应商性质(supplier nature)',
  297. field: 'supplierNature',
  298. colProps: {span: 12},
  299. labelWidth: 200,
  300. component: 'JDictSelectTag',
  301. componentProps:{
  302. dictCode:"supplier_nature"
  303. },
  304. },
  305. {
  306. label: '国家(country)',
  307. field: 'country',
  308. colProps: {span: 12},
  309. labelWidth: 200,
  310. component: 'JDictSelectTag',
  311. componentProps:{
  312. dictCode:"country"
  313. },
  314. },
  315. {
  316. label: '国外供应商(abroad supplier)',
  317. field: 'abroadSupplier',
  318. colProps: {span: 12},
  319. component: 'JDictSelectTag',
  320. componentProps:{
  321. dictCode:"yes_or_no",
  322. stringToNumber: true,
  323. },
  324. labelWidth: 200,
  325. },
  326. {
  327. label: '币种(currency)',
  328. field: 'currency',
  329. colProps: {span: 12},
  330. labelWidth: 200,
  331. component: 'JDictSelectTag',
  332. componentProps:{
  333. dictCode:"currency "
  334. },
  335. },
  336. {
  337. label: '原厂(original factory)',
  338. field: 'originalFactory',
  339. colProps: {span: 12},
  340. labelWidth: 200,
  341. component: 'JDictSelectTag',
  342. componentProps:{
  343. dictCode:"yes_or_no",
  344. stringToNumber: true,
  345. },
  346. },
  347. {
  348. label: '开户行(opening bank)',
  349. field: 'openingBank',
  350. labelWidth: 200,
  351. colProps: {span: 12},
  352. component: 'Input',
  353. },
  354. {
  355. label: '付款条件(payment terms)',
  356. field: 'paymentTerms',
  357. colProps: {span: 12},
  358. labelWidth: 200,
  359. component: 'JDictSelectTag',
  360. componentProps:{
  361. dictCode:"supplier_payment_terms"
  362. },
  363. },
  364. {
  365. label: '户名(opening name)',
  366. field: 'openingName',
  367. colProps: {span: 12},
  368. labelWidth: 200,
  369. component: 'Input',
  370. },
  371. {
  372. label: '银行代码(swift code)',
  373. field: 'swiftCode',
  374. labelWidth: 200,
  375. colProps: {span: 12},
  376. component: 'Input',
  377. },
  378. {
  379. label: '银行帐号(bank account)',
  380. field: 'bankAccount',
  381. colProps: {span: 12},
  382. labelWidth: 200,
  383. component: 'Input',
  384. },
  385. {
  386. label: '状态(status)',
  387. field: 'status',
  388. colProps: {span: 12},
  389. labelWidth: 200,
  390. component: 'JDictSelectTag',
  391. componentProps:{
  392. dictCode:"valid_status",
  393. stringToNumber: true,
  394. },
  395. },
  396. {
  397. label: '营业执照(business license)',
  398. field: 'businessLicense',
  399. colProps: {span: 6},
  400. labelWidth: 200,
  401. component: 'JUpload',
  402. componentProps: {
  403. //是否显示选择按钮
  404. text: '上传',
  405. //最大上传数
  406. maxCount: 1,
  407. //是否显示下载按钮
  408. download: true,
  409. },
  410. },
  411. {
  412. label: '其他文件(other files)',
  413. field: 'otherFiles',
  414. colProps: {span: 6},
  415. labelWidth: 200,
  416. component: 'JUpload',
  417. },
  418. {
  419. label: '备注(notes)',
  420. field: 'notes',
  421. colProps: {span: 24},
  422. labelWidth: 200,
  423. component: 'Input',
  424. },
  425. // TODO 主键隐藏字段,目前写死为ID
  426. {
  427. label: '',
  428. field: 'id',
  429. component: 'Input',
  430. show: false
  431. },
  432. ];
  433. //子表单数据
  434. //子表表格配置
  435. export const cuspSupplierProfileManColumns: JVxeColumn[] = [
  436. {
  437. title: '姓名(name)',
  438. key: 'name',
  439. type: JVxeTypes.input,
  440. placeholder: '请输入${title}',
  441. defaultValue:'',
  442. },
  443. {
  444. title: '电话(mobile)',
  445. key: 'mobile',
  446. type: JVxeTypes.input,
  447. placeholder: '请输入${title}',
  448. defaultValue:'',
  449. },
  450. {
  451. title: '邮箱(email)',
  452. key: 'email',
  453. type: JVxeTypes.input,
  454. placeholder: '请输入${title}',
  455. defaultValue:'',
  456. },
  457. {
  458. title: '职位(position)',
  459. key: 'position',
  460. type: JVxeTypes.input,
  461. placeholder: '请输入${title}',
  462. defaultValue:'',
  463. },
  464. {
  465. title: '操作(operation)',
  466. key: 'action',
  467. width:"200px",
  468. // 固定在右侧
  469. fixed: 'right',
  470. // 对齐方式为居中
  471. align: 'center',
  472. // 组件类型定义为【插槽】
  473. type: JVxeTypes.slot,
  474. // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
  475. slotName: 'action',
  476. },
  477. ]
  478. export const cuspSupplierProfileQualificationColumns: JVxeColumn[] = [
  479. {
  480. title: '资质证书名称(qualification certificate name)',
  481. key: 'qualificationCertificateName',
  482. type: JVxeTypes.input,
  483. placeholder: '请输入${title}',
  484. defaultValue:'',
  485. },
  486. {
  487. title: '有效期始(valid begin)',
  488. key: 'validBegin',
  489. type: JVxeTypes.date,
  490. width:"200px",
  491. placeholder: '请输入${title}',
  492. defaultValue:'',
  493. },
  494. {
  495. title: '有效期止(valid end)',
  496. key: 'validEnd',
  497. // type: JVxeTypes.datetime,
  498. type: JVxeTypes.date,
  499. width:"200px",
  500. placeholder: '请输入${title}',
  501. defaultValue:'',
  502. },
  503. {
  504. title: '资质证书附件(qualification certificate)',
  505. key: 'qualificationCertificate',
  506. type: JVxeTypes.upload,
  507. btnText: '点击上传',
  508. token: true,
  509. responseName: 'message',
  510. action: uploadUrl,
  511. },
  512. {
  513. title: '临期提醒',
  514. key: 'deadlineReminder',
  515. type: JVxeTypes.select,
  516. options: [],
  517. dictCode: 'yes_or_no',
  518. stringToNumber: true,
  519. placeholder: '请选择',
  520. },
  521. {
  522. title: '操作(operation)',
  523. key: 'action',
  524. width:"200px",
  525. // 固定在右侧
  526. fixed: 'right',
  527. // 对齐方式为居中
  528. align: 'center',
  529. // 组件类型定义为【插槽】
  530. type: JVxeTypes.slot,
  531. // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
  532. slotName: 'action',
  533. },
  534. ]
  535. // 高级查询数据
  536. export const superQuerySchema = {
  537. status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',dictCode: '',},
  538. code: {title: '编码',order: 2,view: 'text', type: 'string',},
  539. name: {title: '名称',order: 3,view: 'text', type: 'string',},
  540. abbreviation: {title: '简称',order: 4,view: 'text', type: 'string',},
  541. nameUsedBefore: {title: '曾用名',order: 5,view: 'text', type: 'string',},
  542. dutyParagraph: {title: '税号',order: 6,view: 'text', type: 'string',},
  543. legalPerson: {title: '法人',order: 7,view: 'text', type: 'string',},
  544. contacts: {title: '联系人',order: 8,view: 'text', type: 'string',},
  545. phone: {title: '联系电话',order: 9,view: 'text', type: 'string',},
  546. email: {title: '邮箱',order: 10,view: 'text', type: 'string',},
  547. registerAddress: {title: '注册地址',order: 11,view: 'text', type: 'string',},
  548. address: {title: '公司地址',order: 12,view: 'text', type: 'string',},
  549. supplierNature: {title: '供应商性质',order: 13,view: 'list', type: 'string',dictCode: '',},
  550. country: {title: '国家',order: 14,view: 'list', type: 'string',dictCode: '',},
  551. currency: {title: '币种',order: 15,view: 'text', type: 'string',},
  552. abroadSupplier: {title: '国外供应商',order: 16,view: 'number', type: 'number',},
  553. originalFactory: {title: '原厂',order: 17,view: 'number', type: 'number',dictCode: '',},
  554. openingBank: {title: '开户行',order: 18,view: 'text', type: 'string',},
  555. paymentTerms: {title: '付款条件',order: 19,view: 'list', type: 'string',dictCode: '',},
  556. swiftCode: {title: '银行代码',order: 20,view: 'text', type: 'string',},
  557. bankAccount: {title: '银行帐号',order: 21,view: 'text', type: 'string',},
  558. businessLicense: {title: '营业执照',order: 22,view: 'text', type: 'string',},
  559. otherFiles: {title: '其他文件',order: 23,view: 'text', type: 'string',},
  560. notes: {title: '备注',order: 24,view: 'text', type: 'string',},
  561. temporarySupplier: {title: '临时供应商',order: 25,view: 'number', type: 'number',dictCode: '',},
  562. evaluationLevel: {title: '供应商等级',order: 26,view: 'list', type: 'string',dictCode: '',},
  563. //子表高级查询
  564. cuspSupplierProfileMan: {
  565. title: '供应商档案-联系人',
  566. view: 'table',
  567. fields: {
  568. status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
  569. headId: {title: '主表主键(供应商档案)',order: 2,view: 'text', type: 'string',},
  570. code: {title: '编码',order: 3,view: 'text', type: 'string',},
  571. name: {title: '姓名',order: 4,view: 'text', type: 'string',},
  572. mobile: {title: '电话',order: 5,view: 'text', type: 'string',},
  573. email: {title: '邮箱',order: 6,view: 'text', type: 'string',},
  574. position: {title: '职位',order: 7,view: 'text', type: 'string',},
  575. }
  576. },
  577. cuspSupplierProfileQualification: {
  578. title: '供应商档案-资质信息',
  579. view: 'table',
  580. fields: {
  581. status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
  582. headId: {title: '主表主键(供应商档案)',order: 2,view: 'text', type: 'string',},
  583. qualificationCertificateName: {title: '资质证书名称',order: 3,view: 'text', type: 'string',},
  584. qualificationCertificateCode: {title: '资质证书编码',order: 4,view: 'text', type: 'string',},
  585. validBegin: {title: '有效期始',order: 5,view: 'datetime', type: 'string',},
  586. validEnd: {title: '有效期止',order: 6,view: 'datetime', type: 'string',},
  587. qualificationCertificate: {title: '资质证书附件',order: 7,view: 'text', type: 'string',},
  588. deadlineReminder: {title: '临期提醒',order: 8,view: 'number', type: 'number',},
  589. }
  590. },
  591. };
  592. /**
  593. * 流程表单调用这个方法获取formSchema
  594. * @param param
  595. */
  596. export function getBpmFormSchema(_formData): FormSchema[]{
  597. // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
  598. return formSchema;
  599. }