columns.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. export default function useColumns() {
  2. const TableColumns = [
  3. {
  4. item: { key: "code", title: "单据号", },
  5. attr: {},
  6. },
  7. {
  8. item: { key: "status", title: "单据状态", width: 80 },
  9. attr: { is: "el-dict-tag", dictName: "sys_status", },
  10. },
  11. {
  12. item: { key: "deliveryInventoryOrgName", title: "调出库存组织", },
  13. attr: {},
  14. },
  15. {
  16. item: { key: "billType", title: "订单类型", },
  17. attr: { is: "el-dict-tag", dictName: "sys_allot_billtype", },
  18. },
  19. {
  20. item: { key: "createByName", title: "制单人", width: 100 },
  21. attr: {},
  22. },
  23. {
  24. item: { key: "approveUser", title: "当前审批人", width: 100 },
  25. attr: {},
  26. },
  27. {
  28. item: { key: "billDate", title: "单据日期", width: 100 },
  29. attr: {},
  30. },
  31. {
  32. item: { key: "allotType", title: "调拨方式", width: 100 },
  33. attr: { is: "el-dict-tag", dictName: "sys_to_type", },
  34. },
  35. {
  36. item: { key: "deliveryCode", title: "调拨出库单号", },
  37. attr: {},
  38. },
  39. {
  40. item: { key: "storageCode", title: "调拨入库单号", },
  41. attr: {},
  42. },
  43. {
  44. item: { key: "storageInventoryOrgName", title: "调拨入库组织", },
  45. attr: {},
  46. },
  47. {
  48. item: { key: "businessPersonalName", title: "调出业务员", width: 100 },
  49. attr: {},
  50. },
  51. {
  52. item: { key: "deliveryDeptName", title: "调出部门", width: 100 },
  53. attr: {},
  54. },
  55. {
  56. item: { key: "currencyName", title: "币种", width: 100 },
  57. attr: {},
  58. },
  59. {
  60. item: { key: "rate", title: "折本汇率", width: 80 },
  61. attr: {},
  62. },
  63. {
  64. item: { key: "onRouteAffilliation", title: "在途归属", },
  65. attr: {},
  66. },
  67. {
  68. item: { key: "qty", title: "总数量", width: 100 },
  69. attr: { isSummary: true, },
  70. },
  71. {
  72. item: { key: "accountPath", title: "结算路径", },
  73. attr: {},
  74. },
  75. {
  76. item: { key: "customerName", title: "客户", },
  77. attr: {},
  78. },
  79. {
  80. item: { key: "deliveryWarehouseName", title: "调出仓库", },
  81. attr: {},
  82. },
  83. {
  84. item: { key: "storageWarehouseName", title: "调入仓库", },
  85. attr: {},
  86. },
  87. {
  88. item: { key: "materialProject", title: "物流项目组", },
  89. attr: {},
  90. },
  91. {
  92. item: { key: "liacenterName", title: "利润中心", },
  93. attr: {},
  94. },
  95. {
  96. item: { key: "remark", title: "备注", },
  97. attr: {},
  98. },
  99. {
  100. item: { key: "createTime", title: "制单日期", width: 100 },
  101. attr: {},
  102. },
  103. ].map(({ item, attr }) => ({
  104. attr,
  105. item: {
  106. ...item,
  107. width: item.width || 160,
  108. sortabled: true,
  109. fixedabled: true,
  110. filterabled: true,
  111. hiddenabled: true,
  112. },
  113. }));
  114. const TabColumns = [
  115. // 物料信息
  116. {
  117. item: {
  118. key: "materialInfo",
  119. title: "物料信息"
  120. },
  121. attr: { value: [], },
  122. TableColumns: [
  123. {
  124. item: { key: "rowno", title: "行号", width: 80 },
  125. attr: {},
  126. },
  127. {
  128. item: { key: "materialCode", title: "物料编码", },
  129. attr: {},
  130. },
  131. {
  132. item: { key: "materialName", title: "物料名称", },
  133. attr: {},
  134. },
  135. {
  136. item: { key: "deliveryCode", title: "调拨出库单号", },
  137. attr: {},
  138. },
  139. {
  140. item: { key: "storageCode", title: "调拨入库单号", },
  141. attr: {},
  142. },
  143. {
  144. item: { key: "specification", title: "规格", },
  145. attr: {},
  146. },
  147. {
  148. item: { key: "manufacturer", title: "生产厂家/代理人", },
  149. attr: {},
  150. },
  151. {
  152. item: { key: "originPlace", title: "产地", },
  153. attr: {},
  154. },
  155. {
  156. item: { key: "model", title: "型号", width: 100 },
  157. attr: {},
  158. },
  159. {
  160. item: { key: "unitName", title: "单位", width: 60 },
  161. attr: {},
  162. },
  163. {
  164. item: { key: "qty", title: "数量", width: 100 },
  165. attr: {},
  166. },
  167. {
  168. item: { key: "mainUnit", title: "主单位", },
  169. attr: {},
  170. },
  171. {
  172. item: { key: "equation", title: "换算率", width: 100 },
  173. attr: {},
  174. },
  175. {
  176. item: { key: "mainQty", title: "主数量", width: 100 },
  177. attr: {},
  178. },
  179. {
  180. item: { key: "rate", title: "税率", width: 100 },
  181. attr: {},
  182. },
  183. {
  184. item: { key: "patchNo", title: "批次号", },
  185. attr: {},
  186. },
  187. {
  188. item: { key: "producBatch", title: "产品批号", },
  189. attr: {},
  190. },
  191. {
  192. item: { key: "manufactureDate", title: "生产日期", },
  193. attr: {},
  194. },
  195. {
  196. item: { key: "periodEndDate", title: "有效期至/失效日期", },
  197. attr: {},
  198. },
  199. {
  200. item: { key: "ratifyCode", title: "批准文号", },
  201. attr: {},
  202. },
  203. {
  204. item: { key: "registration", title: "注册证号", },
  205. attr: {},
  206. },
  207. {
  208. item: { key: "productCode", title: "商品名", width: 100 },
  209. attr: {},
  210. },
  211. {
  212. item: { key: "commonCode", title: "通用名", },
  213. attr: {},
  214. },
  215. {
  216. item: { key: "drug", title: "剂型", width: 120 },
  217. attr: {},
  218. },
  219. {
  220. item: { key: "ruleDetail", title: "调入调出结算规则明细", },
  221. attr: {},
  222. },
  223. {
  224. item: { key: "marketingApprovalPersonal", title: "上市许可持有人", },
  225. attr: {},
  226. },
  227. {
  228. item: { key: "production", title: "生产许可证号/经营许可证号/备案凭证号", },
  229. attr: {},
  230. },
  231. {
  232. item: { key: "pi", title: "pi码", width: 100 },
  233. attr: {},
  234. },
  235. {
  236. item: { key: "classify", title: "类别", width: 100 },
  237. attr: {},
  238. },
  239. {
  240. item: { key: "customerLogistic", title: "客户物料码", },
  241. attr: {},
  242. },
  243. {
  244. item: { key: "customerLogisticName", title: "客户物料名称", },
  245. attr: {},
  246. },
  247. ].map(({ item, attr }) => ({
  248. attr,
  249. item: { ...item, width: item.width || 150 },
  250. }))
  251. },
  252. // 收发货信息
  253. {
  254. item: {
  255. key: "receiveInfo",
  256. title: "收发货信息"
  257. },
  258. attr: { value: [], },
  259. TableColumns: [
  260. {
  261. item: { key: "rowno", title: "行号", },
  262. attr: {},
  263. },
  264. {
  265. item: { key: "deliveryCode", title: "调拨出库单号", },
  266. attr: {},
  267. },
  268. {
  269. item: { key: "storageCode", title: "调拨入库单号", },
  270. attr: {},
  271. },
  272. {
  273. item: { key: "manufacturer", title: "生产厂家/代理人", },
  274. attr: {},
  275. },
  276. {
  277. item: { key: "originPlace", title: "产地", },
  278. attr: {},
  279. },
  280. {
  281. item: { key: "classify", title: "类别", },
  282. attr: {},
  283. },
  284. {
  285. item: { key: "deliveryWarehouseName", title: "调出仓库", },
  286. attr: {},
  287. },
  288. {
  289. item: { key: "storageWarehouseName", title: "调入仓库", },
  290. attr: {},
  291. },
  292. {
  293. item: { key: "businessPersonalName", title: "调入业务员", },
  294. attr: {},
  295. },
  296. {
  297. item: { key: "productBatch", title: "产品批号", },
  298. attr: {},
  299. },
  300. {
  301. item: { key: "manufactureDate", title: "生产日期", },
  302. attr: {},
  303. },
  304. {
  305. item: { key: "periodEndDate", title: "有效期至/失效日期", },
  306. attr: {},
  307. },
  308. {
  309. item: { key: "ratifyCode", title: "批准文号", },
  310. attr: {},
  311. },
  312. {
  313. item: { key: "registration", title: "注册证号", },
  314. attr: {},
  315. },
  316. {
  317. item: { key: "productCode", title: "商品名", },
  318. attr: {},
  319. },
  320. {
  321. item: { key: "commonCode", title: "通用名", },
  322. attr: {},
  323. },
  324. {
  325. item: { key: "drug", title: "剂型", },
  326. attr: {},
  327. },
  328. {
  329. item: { key: "customerName", title: "收货客户", },
  330. attr: {},
  331. },
  332. {
  333. item: { key: "addressaddress", title: "收货地址", },
  334. attr: {},
  335. },
  336. {
  337. item: { key: "area", title: "收货地区", },
  338. attr: {},
  339. },
  340. {
  341. item: { key: "place", title: "收货地点", },
  342. attr: {},
  343. },
  344. {
  345. item: { key: "deliveryDate", title: "计划发货日期", },
  346. attr: {},
  347. },
  348. {
  349. item: { key: "strageDate", title: "计划到货日期", },
  350. attr: {},
  351. },
  352. {
  353. item: { key: "transportation", title: "运输方式", },
  354. attr: {},
  355. },
  356. {
  357. item: { key: "remark", title: "备注", },
  358. attr: {},
  359. },
  360. {
  361. item: { key: "customerLogistic", title: "客户物料编码", },
  362. attr: {},
  363. },
  364. {
  365. item: { key: "customerLogisticName", title: "客户物料名称", },
  366. attr: {},
  367. },
  368. ].map(({ item, attr }) => ({
  369. attr,
  370. item: { ...item, width: item.width || 150 },
  371. }))
  372. },
  373. // 费用价格
  374. {
  375. item: {
  376. key: "priceList",
  377. title: "价格费用"
  378. },
  379. attr: { value: [], },
  380. TableColumns: [
  381. {
  382. item: { key: "rowno", title: "行号", },
  383. attr: {},
  384. },
  385. {
  386. item: { key: "deliveryCode", title: "调拨出库单号", },
  387. attr: {},
  388. },
  389. {
  390. item: { key: "storageCode", title: "调拨入库单号", },
  391. attr: {},
  392. },
  393. {
  394. item: { key: "manufacturer", title: "生产厂家/代理人", },
  395. attr: {},
  396. },
  397. {
  398. item: { key: "originPlace", title: "产地", },
  399. attr: {},
  400. },
  401. {
  402. item: { key: "classify", title: "类别", },
  403. attr: {},
  404. },
  405. {
  406. item: { key: "productBatch", title: "产品批号", },
  407. attr: {},
  408. },
  409. {
  410. item: { key: "manufactureDate", title: "生产日期", },
  411. attr: {},
  412. },
  413. {
  414. item: { key: "periodEndDate", title: "有效期至/失效日期", },
  415. attr: {},
  416. },
  417. {
  418. item: { key: "ratifyCode", title: "批准文号", },
  419. attr: {},
  420. },
  421. {
  422. item: { key: "registration", title: "注册证号", },
  423. attr: {},
  424. },
  425. {
  426. item: { key: "productCode", title: "商品名", },
  427. attr: {},
  428. },
  429. {
  430. item: { key: "commonCode", title: "通用名", },
  431. attr: {},
  432. },
  433. {
  434. item: { key: "drug", title: "剂型", },
  435. attr: {},
  436. },
  437. {
  438. item: { key: "customerLogistic", title: "客户物料码", },
  439. attr: {},
  440. },
  441. {
  442. item: { key: "customerLogisticName", title: "客户物料名称", },
  443. attr: {},
  444. },
  445. ].map(({ item, attr }) => ({
  446. attr,
  447. item: { ...item, width: item.width || 150 },
  448. })),
  449. },
  450. // 执行结果
  451. {
  452. item: {
  453. key: "resultList",
  454. title: "执行结果"
  455. },
  456. attr: { value: [], },
  457. TableColumns: [
  458. {
  459. item: { key: "rowno", title: "行号", },
  460. attr: {},
  461. },
  462. {
  463. item: { key: "deliveryCode", title: "调拨出库单号", },
  464. attr: {},
  465. },
  466. {
  467. item: { key: "storageCode", title: "调拨入库单号", },
  468. attr: {},
  469. },
  470. {
  471. item: { key: "manufacturer", title: "生产厂家/代理人", },
  472. attr: {},
  473. },
  474. {
  475. item: { key: "originPlace", title: "产地", },
  476. attr: {},
  477. },
  478. {
  479. item: { key: "classify", title: "类别", },
  480. attr: {},
  481. },
  482. {
  483. item: { key: "productBatch", title: "产品批号", },
  484. attr: {},
  485. },
  486. {
  487. item: { key: "manufactureDate", title: "生产日期", },
  488. attr: {},
  489. },
  490. {
  491. item: { key: "periodEndDate", title: "有效期至/失效日期", },
  492. attr: {},
  493. },
  494. {
  495. item: { key: "ratifyCode", title: "批准文号", },
  496. attr: {},
  497. },
  498. {
  499. item: { key: "registration", title: "注册证号", },
  500. attr: {},
  501. },
  502. {
  503. item: { key: "productCode", title: "商品名", },
  504. attr: {},
  505. },
  506. {
  507. item: { key: "commonCode", title: "通用名", },
  508. attr: {},
  509. },
  510. {
  511. item: { key: "drug", title: "剂型", },
  512. attr: {},
  513. },
  514. {
  515. item: { key: "customerLogistic", title: "客户物料码", },
  516. attr: {},
  517. },
  518. {
  519. item: { key: "customerLogisticName", title: "客户物料名称", },
  520. attr: {},
  521. },
  522. ].map(({ item, attr }) => ({
  523. attr,
  524. item: { ...item, width: item.width || 150 },
  525. })),
  526. },
  527. ];
  528. const SearchColumns = [
  529. {
  530. item: { key: "deliveryInventoryOrgName", title: "调出库存组织" },
  531. attr: {
  532. is: "el-popover-select-v2",
  533. referName: "ORG_PARAM",
  534. valueKey: "name",
  535. dataMapping: {
  536. deliveryInventoryOrg: "id",
  537. deliveryInventoryOrgName: "name"
  538. },
  539. },
  540. },
  541. {
  542. item: { width: 100, key: "billDates", title: "单据日期", },
  543. attr: {
  544. clearable: true,
  545. is: "el-date-picker",
  546. type: "daterange",
  547. rangeSeparator: "-",
  548. startPlaceholder: "开始日期",
  549. endPlaceholder: "结束日期",
  550. valueFormat: "yyyy-MM-dd",
  551. },
  552. },
  553. {
  554. item: { key: "billType", title: "订单类型" },
  555. attr: {
  556. is: "el-select",
  557. dictName: "sys_allot_billtype",
  558. clearable: true,
  559. },
  560. },
  561. {
  562. item: { key: "storageInventoryOrgName", title: "调入库存组织" },
  563. attr: {
  564. is: "el-popover-select-v2",
  565. referName: "ORG_PARAM",
  566. valueKey: "name",
  567. dataMapping: {
  568. storageInventoryOrg: "id",
  569. storageInventoryOrgName: "name"
  570. },
  571. },
  572. },
  573. {
  574. item: { key: "code", title: "单据号" },
  575. attr: {
  576. is: "el-input",
  577. clearable: true,
  578. },
  579. },
  580. {
  581. item: { key: "createByName", title: "制单人" },
  582. attr: {
  583. is: "el-popover-select-v2",
  584. referName: "CONTACTS_PARAM",
  585. valueKey: "name",
  586. dataMapping: {
  587. createBy: "code",
  588. createByName: "name"
  589. },
  590. },
  591. },
  592. ];
  593. return { TableColumns, TabColumns, SearchColumns }
  594. }