column.js 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  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. },
  155. },
  156. },
  157. {
  158. item:{
  159. key:'materialName',
  160. title:'物料名称',
  161. require: true,
  162. },
  163. attr:{
  164. is: "el-input",
  165. // disabled:true,
  166. },
  167. },
  168. {
  169. item:{
  170. key:'medicineMaterial',
  171. title:'医药物料',
  172. },
  173. attr:{
  174. is: "el-select",
  175. dictName: "sys_number_yes_no", // 字典名
  176. },
  177. },
  178. {
  179. item:{
  180. key:'productionPermit',
  181. title:'生产许可证',
  182. },
  183. attr:{
  184. is: "el-input",
  185. },
  186. },
  187. {
  188. item:{
  189. key:'specification',
  190. title:'规格',
  191. require: true,
  192. },
  193. attr:{
  194. is: "el-input",
  195. },
  196. },
  197. {
  198. item:{
  199. key:'model',
  200. title:'型号',
  201. },
  202. attr:{
  203. is: "el-input",
  204. },
  205. },
  206. {
  207. item:{
  208. key:'factoryName',
  209. title:'生产厂家/代理人',
  210. require: true,
  211. },
  212. attr:{
  213. is: "el-popover-select-v2",
  214. valueKey: "name",
  215. referName: "MANUFACTURER_PARAM",
  216. dataMapping: {
  217. factory:'id'
  218. }
  219. },
  220. },
  221. {
  222. item:{
  223. key:'registrant',
  224. title:'注册人/上市许可持有人',
  225. require: true,
  226. },
  227. attr:{
  228. is: "el-input",
  229. },
  230. },
  231. {
  232. item:{
  233. key:'storageConditions',
  234. title:'存储条件',
  235. require: true,
  236. },
  237. attr:{
  238. is: "el-select",
  239. dictName: "sys_storage_condition", // 字典名
  240. },
  241. },
  242. {
  243. item:{
  244. key:'transportCondition',
  245. title:'运输条件',
  246. },
  247. attr:{
  248. is: "el-select",
  249. dictName: "sys_conditions_carriage", // 字典名
  250. },
  251. },
  252. {
  253. item:{
  254. key:'leadTime',
  255. title:'交货周期',
  256. },
  257. attr:{
  258. is: "el-input-number",
  259. controlsPosition:"right",
  260. min:0
  261. },
  262. },
  263. // {
  264. // item:{
  265. // key:'diCode',
  266. // title:'DI码',
  267. // },
  268. // attr:{
  269. // is: "el-input",
  270. // },
  271. // },
  272. // {
  273. // item:{
  274. // key:'remark',
  275. // title:'备注',
  276. // },
  277. // attr:{
  278. // is: "el-input",
  279. // },
  280. // },
  281. {
  282. item:{
  283. key:'oneClass',
  284. title:'一级分类',
  285. },
  286. attr:{
  287. is: "el-input",
  288. disabled:true,
  289. },
  290. },
  291. {
  292. item:{
  293. key:'twoClass',
  294. title:'二级分类',
  295. },
  296. attr:{
  297. is: "el-input",
  298. disabled:true,
  299. },
  300. },
  301. {
  302. item:{
  303. key:'threeClass',
  304. title:'三级分类',
  305. },
  306. attr:{
  307. is: "el-input",
  308. disabled:true,
  309. },
  310. },
  311. {
  312. item:{
  313. key:'fourClass',
  314. title:'四级分类',
  315. },
  316. attr:{
  317. is: "el-input",
  318. disabled:true,
  319. },
  320. },
  321. {
  322. item:{
  323. key:'drug',
  324. title:'药品',
  325. },
  326. attr:{
  327. is: "el-select",
  328. dictName: "sys_medicine", // 字典名
  329. },
  330. },
  331. {
  332. item:{
  333. key:'registrationNo',
  334. title:'注册证号/备案凭证编号',
  335. },
  336. attr:{
  337. is: "el-input",
  338. },
  339. },
  340. {
  341. item:{
  342. key:'medicalDevices',
  343. title:'医疗器械',
  344. },
  345. attr:{
  346. is: "el-select",
  347. dictName: "medical_instruments", // 字典名
  348. },
  349. },
  350. {
  351. item:{
  352. key:'maintenanceType',
  353. title:'养护类型',
  354. },
  355. attr:{
  356. is: "el-select",
  357. dictName: "curing_type", // 字典名
  358. },
  359. },
  360. {
  361. item:{
  362. key:'dosageFromName',
  363. title:'剂型',
  364. },
  365. attr:{
  366. is: "el-popover-tree-select",
  367. referName: "DOSAGEFORM_PARAM",
  368. valueKey: "name",
  369. dataMapping: {
  370. dosageFrom:'id'
  371. }
  372. },
  373. },
  374. ]
  375. },
  376. ]
  377. return {TableColumns,TabColumns}
  378. }