column.js 14 KB

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