column.js 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. export default function useColumns(){
  2. const TableColumns = [
  3. {
  4. item:{
  5. key:'code',
  6. title:'单据编码',
  7. },
  8. attr:{
  9. is: "el-input",
  10. disabled:true,
  11. },
  12. },
  13. {
  14. item:{
  15. key:'orgName',
  16. title:'所属组织',
  17. },
  18. attr:{
  19. is: "el-popover-select-v2",
  20. valueKey: "name",
  21. referName: "ORG_PARAM",
  22. dataMapping: {
  23. orgId:'id'
  24. },
  25. disabled:true,
  26. },
  27. },
  28. {
  29. item:{
  30. key:'status',
  31. title:'单据状态',
  32. },
  33. attr:{
  34. is: "el-select",
  35. dictName: "documents_status", // 字典名
  36. disabled:true,
  37. },
  38. },
  39. // {
  40. // item:{
  41. // key:'approver',
  42. // title:'申请人',
  43. // },
  44. // attr:{
  45. // is: "el-input",
  46. // disabled:true,
  47. // },
  48. // },
  49. {
  50. item:{
  51. key:'applicationTime',
  52. title:'申请时间',
  53. },
  54. attr:{
  55. is: "el-date-picker",
  56. valueFormat: "yyyy-MM-dd HH:mm:ss",
  57. disabled:true,
  58. },
  59. },
  60. {
  61. item:{
  62. key:'createByName',
  63. title:'创建人',
  64. },
  65. attr:{
  66. is: "el-input",
  67. disabled:true,
  68. },
  69. },
  70. {
  71. item:{
  72. key:'createTime',
  73. title:'创建时间',
  74. },
  75. attr:{
  76. is: "el-date-picker",
  77. valueFormat: "yyyy-MM-dd HH:mm:ss",
  78. disabled:true,
  79. },
  80. },
  81. {
  82. item:{
  83. key:'updateByName',
  84. title:'最后修改人',
  85. },
  86. attr:{
  87. is: "el-input",
  88. disabled:true,
  89. },
  90. },
  91. {
  92. item:{
  93. key:'updateTime',
  94. title:'最后修改时间',
  95. },
  96. attr:{
  97. is: "el-date-picker",
  98. valueFormat: "yyyy-MM-dd HH:mm:ss",
  99. disabled:true,
  100. },
  101. },
  102. ].map(({ item, attr }) => ({
  103. attr,
  104. item: { ...item, hidden: true, span: item.span || 6 },
  105. }));
  106. const TabColumns = [
  107. {
  108. item:{
  109. key:'materialBasic',
  110. title:'物料信息',
  111. },
  112. attr:{
  113. value:[]
  114. },
  115. TableColumns:[
  116. {
  117. item:{
  118. key:'materialCode',
  119. title:'物料编码',
  120. require: true,
  121. },
  122. attr:{
  123. // readonly:true,
  124. is: "el-popover-select-v2",
  125. valueKey: "code",
  126. referName: "MATERIAL_PARAM",
  127. dataMapping: {
  128. materialId: "id",
  129. materialCode: "code",
  130. materialName: "name",
  131. diCode:'diCode',
  132. remark:'remark',
  133. model: "model",
  134. materialClassifyId:'classifyId',
  135. productionPermit:'productionPermit',
  136. specification: "specification",
  137. storageConditions:'storageCondition',
  138. transportCondition:'transportationCondition',
  139. medicineMaterial:'isMedicine',
  140. factory:'manufacturerId',
  141. factoryName:'manufacturerIdName',
  142. registrant:'registrant',
  143. oneClass:'oneClass',
  144. twoClass:'twoClass',
  145. threeClass:'threeClass',
  146. fourClass:'fourClass',
  147. drug:'isDrugNumber',
  148. registrationNo:'registrationNo',
  149. dosageFrom:'dosageFrom',
  150. dosageFromName:'dosageFromName',
  151. maintenanceType:'curingType',
  152. medicalDevices:'medicalInstruments',
  153. leadTime:'deliveryPeriod',
  154. isInventoryStatus:'isInventoryStatus',
  155. expiryDateManagerment:'expiryDateManagerment',
  156. usefulLife:'usefulLife',
  157. serialNoManager:'serialNoManager',
  158. ratifyBatchNo:'ratifyBatchNo',
  159. },
  160. },
  161. },
  162. {
  163. item:{
  164. key:'materialName',
  165. title:'物料名称',
  166. require: true,
  167. },
  168. attr:{
  169. is: "el-input",
  170. // disabled:true,
  171. },
  172. },
  173. {
  174. item:{
  175. key:'medicineMaterial',
  176. title:'医药物料',
  177. },
  178. attr:{
  179. is: "el-select",
  180. dictName: "sys_number_yes_no", // 字典名
  181. },
  182. },
  183. {
  184. item:{
  185. key:'productionPermit',
  186. title:'生产许可证',
  187. },
  188. attr:{
  189. is: "el-input",
  190. },
  191. },
  192. {
  193. item:{
  194. key:'specification',
  195. title:'规格',
  196. require: true,
  197. },
  198. attr:{
  199. is: "el-input",
  200. maxlength:150,
  201. },
  202. },
  203. {
  204. item:{
  205. key:'model',
  206. title:'型号',
  207. },
  208. attr:{
  209. is: "el-input",
  210. },
  211. },
  212. {
  213. item:{
  214. key:'factoryName',
  215. title:'生产厂家/代理人',
  216. require: true,
  217. },
  218. attr:{
  219. is: "el-popover-select-v2",
  220. valueKey: "name",
  221. referName: "MANUFACTURER_PARAM",
  222. dataMapping: {
  223. factory:'id'
  224. }
  225. },
  226. },
  227. {
  228. item:{
  229. key:'registrant',
  230. title:'注册人/上市许可持有人',
  231. require: true,
  232. },
  233. attr:{
  234. is: "el-input",
  235. },
  236. },
  237. {
  238. item:{
  239. key:'storageConditions',
  240. title:'存储条件',
  241. require: true,
  242. },
  243. attr:{
  244. is: "el-select",
  245. dictName: "sys_storage_condition", // 字典名
  246. },
  247. },
  248. {
  249. item:{
  250. key:'transportCondition',
  251. title:'运输条件',
  252. },
  253. attr:{
  254. is: "el-select",
  255. dictName: "sys_conditions_carriage", // 字典名
  256. },
  257. },
  258. {
  259. item:{
  260. key:'leadTime',
  261. title:'交货周期',
  262. },
  263. attr:{
  264. is: "el-input-number",
  265. controlsPosition:"right",
  266. min:0
  267. },
  268. },
  269. {
  270. item:{
  271. key:'isInventoryStatus',
  272. title:'批号及库存状态管理',
  273. },
  274. attr:{
  275. is: "el-select",
  276. dictName: "sys_number_yes_no", // 字典名
  277. },
  278. },
  279. {
  280. item:{
  281. key:'expiryDateManagerment',
  282. title:'效期管理',
  283. },
  284. attr:{
  285. is: "el-select",
  286. dictName: "sys_number_yes_no", // 字典名
  287. },
  288. },
  289. {
  290. item:{
  291. key:'serialNoManager',
  292. title:'是否序列号管理',
  293. },
  294. attr:{
  295. is: "el-select",
  296. dictName: "sys_number_yes_no", // 字典名
  297. },
  298. },
  299. {
  300. item:{
  301. key:'usefulLife',
  302. title:'有效期',
  303. },
  304. attr:{
  305. is: "el-input-number",
  306. controlsPosition:"right",
  307. min:0,
  308. },
  309. },
  310. // {
  311. // item:{
  312. // key:'diCode',
  313. // title:'DI码',
  314. // },
  315. // attr:{
  316. // is: "el-input",
  317. // },
  318. // },
  319. // {
  320. // item:{
  321. // key:'remark',
  322. // title:'备注',
  323. // },
  324. // attr:{
  325. // is: "el-input",
  326. // },
  327. // },
  328. {
  329. item:{
  330. key:'oneClass',
  331. title:'一级分类',
  332. },
  333. attr:{
  334. is: "el-input",
  335. disabled:true,
  336. },
  337. },
  338. {
  339. item:{
  340. key:'twoClass',
  341. title:'二级分类',
  342. },
  343. attr:{
  344. is: "el-input",
  345. disabled:true,
  346. },
  347. },
  348. {
  349. item:{
  350. key:'threeClass',
  351. title:'三级分类',
  352. },
  353. attr:{
  354. is: "el-input",
  355. disabled:true,
  356. },
  357. },
  358. {
  359. item:{
  360. key:'fourClass',
  361. title:'四级分类',
  362. },
  363. attr:{
  364. is: "el-input",
  365. disabled:true,
  366. },
  367. },
  368. {
  369. item:{
  370. key:'drug',
  371. title:'药品',
  372. },
  373. attr:{
  374. is: "el-select",
  375. dictName: "sys_medicine", // 字典名
  376. },
  377. },
  378. {
  379. item:{
  380. key:'ratifyBatchNo',
  381. title:'批准文号',
  382. },
  383. attr:{
  384. is: "el-input",
  385. },
  386. },
  387. {
  388. item:{
  389. key:'registrationNo',
  390. title:'注册证号/备案凭证编号',
  391. },
  392. attr:{
  393. is: "el-input",
  394. },
  395. },
  396. {
  397. item:{
  398. key:'medicalDevices',
  399. // title:'医疗器械',
  400. title:'管理类别',
  401. },
  402. attr:{
  403. is: "el-select",
  404. dictName: "medical_instruments", // 字典名
  405. },
  406. },
  407. {
  408. item:{
  409. key:'maintenanceType',
  410. title:'养护类型',
  411. },
  412. attr:{
  413. is: "el-select",
  414. dictName: "curing_type", // 字典名
  415. },
  416. },
  417. {
  418. item:{
  419. key:'dosageFromName',
  420. title:'剂型',
  421. },
  422. attr:{
  423. is: "el-popover-tree-select",
  424. referName: "DOSAGEFORM_PARAM",
  425. valueKey: "name",
  426. dataMapping: {
  427. dosageFrom:'id'
  428. }
  429. },
  430. },
  431. ]
  432. },
  433. ]
  434. return {TableColumns,TabColumns}
  435. }