column.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. import {
  2. initPage,
  3. initParams,
  4. initColumns,
  5. initDicts,
  6. } from "@/utils/init";
  7. export const TableColumns = [
  8. // { key: "id", title: "主键" },
  9. // { key: "puOrg", title: "采购组织" },
  10. { key: "puOrgName", title: "采购组织", inputType: "Input" },
  11. {
  12. key: "billType",
  13. title: "订单类型",
  14. inputType: "Select",
  15. referName: "sys_order_type",
  16. },
  17. { key: "code", title: "订单编号", inputType: "Input" },
  18. {
  19. key: "status",
  20. title: "单据状态",
  21. inputType: "Select",
  22. width:80,
  23. referName: "documents_status", // 字典名
  24. },
  25. { key: "billDate", title: "订单日期" },
  26. // { key: "supplier", title: "供应商" },
  27. { key: "supplierName", title: "供应商", inputType: "Input" },
  28. { key: "paymentAgreementName", title: "付款协议" },
  29. {
  30. key: "source",
  31. title: "订单来源",
  32. inputType: "Select",
  33. referName: "order_source", // 字典名
  34. width:80,
  35. },
  36. // { key: "paymentAgreement", title: "付款协议" },
  37. // { key: "buyer", title: "采购员" },ut
  38. { key: "buyerName", title: "采购员" },
  39. // { key: "puDept", title: "采购部门" },
  40. { key: "puDeptName", title: "采购部门" },
  41. // { key: "customer", title: "收货客户" },
  42. { key: "customerName", title: "收货客户" },
  43. {
  44. key: "isDeliver",
  45. title: "是否发货",
  46. inputType: 'Checkbox',
  47. },
  48. {
  49. key: "isArrival",
  50. title: "到货超期",
  51. inputType: 'Checkbox',
  52. width:80,
  53. },
  54. {
  55. key: "isBack",
  56. title: "退货",
  57. inputType: 'Checkbox',
  58. width:80,
  59. },
  60. // { key: "freezeCause", title: "冻结原因" },
  61. { key: "qty", title: "总数量" },
  62. { key: "money", title: "总数量" },
  63. {
  64. key: "isMarketing",
  65. title: "已协同生成销售订单",
  66. inputType: 'Checkbox',
  67. },
  68. {
  69. key: "isMarketingSource",
  70. title: "由销售订单协同生成",
  71. inputType: 'Checkbox',
  72. },
  73. // { key: "personal", title: "人员" },
  74. { key: "personalName", title: "人员" },
  75. // { key: "isSendSrm", title: "是否同步SRM" },
  76. {
  77. key: "isInvoice",
  78. title: "发票标识",
  79. inputType: 'Checkbox',
  80. width:80,
  81. },
  82. { key: "rebateMoney", title: "订单使用返利金额" },
  83. { key: "deductionMoney", title: "订单抵扣余款金额" },
  84. // { key: "warehouse", title: "WMS入库仓库" },
  85. { key: "warehouseName", title: "收货仓库" }, //WMS入库仓库名称
  86. // { key: "goodsAllocation", title: "货位" },
  87. { key: "goodsAllocationName", title: "货位" },
  88. // { key: "customerDept", title: "客户部门" },
  89. { key: "customerDeptName", title: "客户部门" },
  90. // { key: "supplierContacts", title: "供应商业务联系人" },
  91. { key: "supplierContactsName", title: "供应商业务联系人" },
  92. {
  93. key: "isUrgency",
  94. title: "紧急程度",
  95. inputType: 'Checkbox',
  96. width:80,
  97. },
  98. // { key: "agent", title: "代理人" }, // 建议删除
  99. { key: "agentName", title: "代理人" },
  100. {
  101. key: "isClose",
  102. title: "最终关闭",
  103. inputType: 'Checkbox',
  104. width:80,
  105. },
  106. { key: "applyPaymentMoney", title: "累计付款申请金额" },
  107. { key: "paymentMoney", title: "累计付款金额" },
  108. { key: "invoiceMoney", title: "发票金额" },
  109. // { key: "supplierPersonal", title: "供应商业务员" },
  110. { key: "supplierPersonalName", title: "供应商业务员" },
  111. { key: "marketingCode", title: "销售订单号" },
  112. // { key: "tenantId", title: "租户号" },
  113. // { key: "revision", title: "乐观锁" },
  114. { key: "createByName", title: "创建人" },
  115. { key: "updateByName", title: "更新人" },
  116. // { key: "delFlag", title: "删除标记" },
  117. { key: "flowId", title: "OA流程ID" },
  118. { key: "approver", title: "审批人" },
  119. { key: "approverFinishTime", title: "审批时间" },
  120. { key: "approveTime", title: "提交时间" },
  121. { key: "createTime", title: "制单日期/创建时间" },
  122. { key: "remark", title: "备注" },
  123. { key: "updateTime", title: "最后修改时间" },
  124. { key: "oaDemandNo", title: "OA需求单号" },
  125. { key: "address", title: "收货地址" },
  126. { key: "contacts", title: "收获联系人" },
  127. {
  128. key: "isSendWms",
  129. title: "已同步WMS",
  130. inputType: 'Checkbox',
  131. width:120,
  132. },
  133. { key: "retReasonName", title: "退换原因" },
  134. { key: "closeTime", title: "最终关闭日期" },
  135. { key: "processTypeName", title: "处理方式" },
  136. { key: "isEnd", title: "整单关闭标识" },
  137. { key: "projectNowName", title: "在建工程项目" },
  138. { key: "operatingItemsName", title: "经营性项目" },
  139. { key: "isArrivalReson", title: "到货超期原因" },
  140. { key: "midOrderNo", title: "中台采购订单号" },
  141. ];
  142. export const TabColumns = [
  143. {
  144. title: '物料信息',
  145. key: 'puOrderItemList',
  146. tableColumns: [
  147. { key: "rowNo", title: "行号" },
  148. // { key: "orderId", title: "采购订单ID" },
  149. { key: "material", title: "物料" },
  150. { key: "materialName", title: "物料名称", width: 180 },
  151. { key: "materialCode", title: "物料编码", width: 180 },
  152. { key: "materialClassify", title: "物料分类", width: 180 },
  153. { key: "materialManufacturersCode", title: "厂家物料编码", width: 180 },
  154. { key: "specification", title: "规格", width: 180 },
  155. { key: "model", title: "型号", width: 180 },
  156. {
  157. key: "isMedcine",
  158. title: "医药物料",
  159. inputType: 'Checkbox',
  160. width:80,
  161. },
  162. { key: "manufacturerName", title: "生产厂家代理人", width: 180 },
  163. {
  164. key: "isDrug",
  165. title: "物料药品属性",
  166. inputType: 'Checkbox',
  167. width:80,
  168. },
  169. { key: "unitName", title: "单位", width: 180 },
  170. { key: "qty", title: "数量" },
  171. // { key: "currency", title: "币种" },
  172. // { key: "currencyName", title: "币种" },
  173. { key: "taxPrice", title: "含税单价" },
  174. { key: "money", title: "价税合计" },
  175. { key: "tax", title: "税率" },
  176. { key: "taxDeductMoneya", title: "折扣金额" },
  177. { key: "arrivalQty", title: "已到货数量" },
  178. { key: "unarrivedQty", title: "未到货数量" },
  179. { key: "notaxMoney", title: "无税金额" },
  180. { key: "priceSource", title: "价格目录ID" },
  181. {
  182. key: "isStorage",
  183. title: "入库关闭",
  184. inputType: 'Checkbox',
  185. width:80,
  186. },
  187. {
  188. key: "isInvoice",
  189. title: "开票关闭",
  190. inputType: 'Checkbox',
  191. width:80,
  192. },
  193. {
  194. key: "isArrival",
  195. title: "到货关闭",
  196. inputType: 'Checkbox',
  197. width:80,
  198. },
  199. {
  200. key: "isPayment",
  201. title: "付款关闭",
  202. inputType: 'Checkbox',
  203. width:80,
  204. },
  205. {
  206. key: "isGift",
  207. title: "赠品",
  208. inputType: 'Checkbox',
  209. width:80,
  210. },
  211. { key: "warehouse", title: "收货仓库", width: 180 },
  212. { key: "place", title: "收货地点", width: 180 },
  213. { key: "address", title: "收货地址", width: 180 },
  214. { key: "productBatch", title: "产品批号", width: 180 },
  215. { key: "manufactureDate", title: "生产日期", width: 180 },
  216. { key: "efficacyLoseDate", title: "有效期至/失效日期", width: 180 },
  217. { key: "approvalNumber", title: "批准文号", width: 180 },
  218. { key: "registration", title: "注册证号", width: 180 },
  219. {
  220. key: "storageCondition",
  221. title: "存储条件",
  222. inputType: "Select",
  223. referName: "sys_storage_condition", // 字典名
  224. },
  225. {
  226. key: "carriageCondition",
  227. title: "运输条件",
  228. inputType: "Select",
  229. referName: "sys_conditions_carriage", // 字典名
  230. },
  231. {
  232. key: "isBatchLock",
  233. title: "批号锁定标识",
  234. inputType: 'Checkbox',
  235. width:80,
  236. },
  237. {
  238. key: "isReplenishment",
  239. title: "补单标识",
  240. inputType: 'Checkbox',
  241. width:80,
  242. },
  243. { key: "isUrgency", title: "紧急标识" },
  244. { key: "originalQty", title: "原始数量" },
  245. { key: "originalMoney", title: "原始金额" },
  246. { key: "directProductBatch", title: "直运产品批号", width: 180 },
  247. { key: "discountRule", title: "折扣规则编码", width: 180 },
  248. { key: "reservedQty", title: "预留数量" },
  249. { key: "reservedPeriod", title: "预留周期", width: 180 },
  250. { key: "taxDeductClassify", title: "扣税类别" },
  251. { key: "exchangeRate", title: "折本汇率" },
  252. { key: "source", title: "上游单据号", width: 180 },
  253. { key: "sourceId", title: "上游单据ID", width: 180 },
  254. { key: "demandCode", title: "采购需求单号", width: 180 },
  255. { key: "arrivalDatePlan", title: "计划到货日期", width: 180 },
  256. {
  257. key: "priceType",
  258. title: "价格类型",
  259. inputType: "Select",
  260. referName: "sys_price_type", // 字典名
  261. },
  262. {
  263. key: "isDistributionPrice",
  264. title: "配送价",
  265. inputType: 'Checkbox',
  266. width:80,
  267. },
  268. // { key: "tenantId", title: "租户号" },
  269. // { key: "revision", title: "乐观锁" },
  270. { key: "createByName", title: "创建人" },
  271. { key: "updateByName", title: "更新人" },
  272. // { key: "delFlag", title: "删除标记" },
  273. // { key: "materialClassifyOne", title: "物料一级分类" },
  274. { key: "materialClassifyOneName", title: "物料一级分类", width: 180 },
  275. // { key: "materialClassifyTwo", title: "物料二级分类" },
  276. { key: "materialClassifyTwoName", title: "物料二级分类", width: 180 },
  277. // { key: "materialClassifyThree", title: "物料三级分类" },
  278. { key: "materialClassifyThreeName", title: "物料三级分类", width: 180 },
  279. // { key: "materialClassifyFour", title: "物料四级分类" },
  280. { key: "materialClassifyFourName", title: "物料四级分类", width: 180 },
  281. { key: "price", title: "无税单价" }
  282. ]
  283. },
  284. {
  285. title: '执行结果',
  286. key: 'puOrderExecuteList',
  287. tableColumns: [
  288. // { key: "id", title: "主键" },
  289. // { key: "orderId", title: "采购订单ID", width: 180 },
  290. { key: "rowno", title: "行号" },
  291. { key: "material", title: "物料", width: 180 },
  292. { key: "materialName", title: "物料名称", width: 180 },
  293. { key: "specification", title: "规格" },
  294. { key: "qty", title: "数量" },
  295. { key: "stroageQty", title: "累计到货主数量" },
  296. { key: "stockQty", title: "累计入库主数量" },
  297. { key: "invoiceQty", title: "累计开票主数量" },
  298. { key: "rollbackQty", title: "累计退货主数量" },
  299. { key: "backStockQty", title: "累计退库主数量" },
  300. { key: "floatQty", title: "未到货数量" },
  301. // { key: "tenantId", title: "租户号" },
  302. // { key: "revision", title: "乐观锁" },
  303. { key: "createByName", title: "创建人名称", width: 180 },
  304. { key: "updateByName", title: "更新人名称", width: 180 },
  305. // { key: "delFlag", title: "删除标记" }
  306. ]
  307. },
  308. ];
  309. // export const SearchColumns = TableColumns.filter((element) => element.search);
  310. export const SearchColumns = [
  311. {
  312. key: "source",
  313. title: "订单来源",
  314. inputType: "Select",
  315. referName: "order_source", // 字典名
  316. clearable:true,
  317. },
  318. {
  319. key: "code",
  320. title: "订单编号",
  321. inputType: "Input",
  322. clearable:true,
  323. },
  324. {
  325. key: "date",
  326. title: "订单日期",
  327. type: "daterange",
  328. inputType: "DatePicker",
  329. unlinkPanels: true,
  330. rangeSeparator: "至",
  331. valueFormat: "yyyy-MM-dd",
  332. endPlaceholder: "结束日期",
  333. startPlaceholder: "开始日期",
  334. clearable:true,
  335. },
  336. {
  337. key: "status",
  338. title: "单据状态",
  339. inputType: "Select",
  340. referName: "documents_status", // 字典名
  341. clearable:true,
  342. },
  343. {
  344. key: "supplierName",
  345. title: "供应商",
  346. inputType: "PopoverSelect",
  347. valueKey: "id",
  348. referName: "SUPPLIER_PARAM",
  349. dataMapping: {
  350. // supplier: "id",
  351. supplierName: "name",
  352. },
  353. queryParams: () => ({}),
  354. clearable:true,
  355. },
  356. {
  357. key: "puOrgIds",
  358. title: "采购组织",
  359. inputType: "PopoverSelect",
  360. multiple:true,
  361. valueKey: "id",
  362. referName: "ORG_PARAM",
  363. dataMapping: {},
  364. queryParams: () => ({}),
  365. clearable:true,
  366. },
  367. {
  368. key: "materialCode",
  369. title: "物料编码",
  370. inputType: "PopoverSelect",
  371. valueKey: "code",
  372. referName: "MATERIAL_PARAM",
  373. dataMapping: {},
  374. queryParams: () => ({}),
  375. clearable:true,
  376. },
  377. {
  378. key: "materialName",
  379. title: "物料名称",
  380. inputType: "PopoverSelect",
  381. valueKey: "name",
  382. referName: "MATERIAL_PARAM",
  383. dataMapping: {},
  384. queryParams: () => ({}),
  385. clearable:true,
  386. },
  387. {
  388. key: "deliveryStatus",
  389. title: "erp发送状态",
  390. inputType: "Select",
  391. referName: "order_delivery_status", // 字典名
  392. clearable:true,
  393. },
  394. {
  395. key: "contractNo",
  396. title: "合同号",
  397. inputType: "Input",
  398. clearable:true,
  399. },
  400. {
  401. key: "projectNowName",
  402. title: "在建工程项目",
  403. inputType: "PopoverSelect",
  404. require: true,
  405. valueKey: "name",
  406. referName: "PROJECT_PARAM",
  407. dataMapping: {},
  408. queryParams: () => ({}),
  409. clearable:true,
  410. },
  411. {
  412. key: "buyers",
  413. title: "采购员",
  414. inputType: "PopoverSelect",
  415. multiple:true,
  416. valueKey: "code",
  417. referName: "CONTACTS_PARAM",
  418. dataMapping: {},
  419. queryParams: () => ({}),
  420. clearable:true,
  421. },
  422. {
  423. key: "billTypes",
  424. title: "订单类型",
  425. inputType: "Select",
  426. referName: "sys_order_type", // 字典名
  427. multiple:true,
  428. tags:true,
  429. clearable:true,
  430. },
  431. {
  432. key: "demandCode",
  433. title: "采购需求单号",
  434. inputType: "Input",
  435. clearable:true,
  436. },
  437. {
  438. key: "isDrug",
  439. title: "物料药品属性",
  440. inputType: "SelectCheck",
  441. clearable:true,
  442. },
  443. ];
  444. const NewColumns = initColumns(TableColumns);
  445. const NewSearchColumns = initColumns(SearchColumns);
  446. const NewTabColumns = TabColumns.map((element) => ({
  447. ...element,
  448. tableColumns: initColumns(element.tableColumns),
  449. }));
  450. //
  451. export const SelectColumns = NewColumns.filter(column => column.inputType === 'Select')
  452. NewTabColumns.forEach(column => {
  453. SelectColumns.push(...column.tableColumns.filter(cColumn => cColumn.inputType === 'Select'))
  454. });
  455. SelectColumns.push(...NewSearchColumns.filter(column => column.inputType === 'Select'))