column.js 13 KB

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