column.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. import {
  2. initColumns,
  3. initDicts,
  4. } from "@/utils/init/index.js";
  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,precision:2, },
  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: "订单使用返利金额" ,precision:2,},
  76. { key: "deductionMoney", title: "订单抵扣余款金额" ,precision:2,},
  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: "累计付款申请金额", precision:2,},
  96. { key: "paymentMoney", title: "累计付款金额" ,precision:2,},
  97. { key: "invoiceMoney", title: "发票金额" ,precision:2,},
  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: "demandCode", title:"采购需求单号"},
  140. { key: "material", title: "物料ID" },
  141. { key: "materialName", title: "物料名称", },
  142. { key: "materialCode", title: "物料编码", },
  143. // { key: "materialClassify", title: "物料分类", },
  144. { key: "materialManufacturersCode", title: "厂家物料编码", },
  145. { key: "specification", title: "规格", },
  146. { key: "model", title: "型号",width: 120 },
  147. {
  148. key: "isMedcine",
  149. title: "医药物料",
  150. inputType: 'Checkbox',
  151. width:80,
  152. },
  153. { key: "manufacturerName", title: "生产厂家代理人", },
  154. {
  155. key: "isDrug",
  156. title: "物料药品属性",
  157. inputType: 'Checkbox',
  158. width:80,
  159. },
  160. { key: "unitName", title: "单位", width: 120 },
  161. { key: "qty", title: "数量",width:120, },
  162. // { key: "currency", title: "币种" },
  163. { key: "currencyName", title: "币种" },
  164. { key: "taxPrice", title: "含税单价" ,width:120,precision:2,},
  165. { key: "money", title: "价税合计" ,width:120, precision:2,},
  166. { key: "tax", title: "税率" ,width:120, precision:2,},
  167. { key: "taxDeductMoneya", title: "折扣金额", width:120, precision:2, },
  168. { key: "arrivalQty", title: "已到货数量" , width:120,},
  169. { key: "unarrivedQty", title: "未到货数量" , width:120,},
  170. { key: "price", title: "无税单价" , idth:120, precision:2,},
  171. { key: "notaxMoney", title: "无税金额" , width:120, precision:2,},
  172. { key: "priceSource", title: "价格目录ID" },
  173. {
  174. key: "isStorage",
  175. title: "入库关闭",
  176. inputType: 'Checkbox',
  177. width:80,
  178. },
  179. {
  180. key: "isInvoice",
  181. title: "开票关闭",
  182. inputType: 'Checkbox',
  183. width:80,
  184. },
  185. {
  186. key: "isArrival",
  187. title: "到货关闭",
  188. inputType: 'Checkbox',
  189. width:80,
  190. },
  191. {
  192. key: "isPayment",
  193. title: "付款关闭",
  194. inputType: 'Checkbox',
  195. width:80,
  196. },
  197. {
  198. key: "isGift",
  199. title: "赠品",
  200. inputType: 'Checkbox',
  201. width:80,
  202. },
  203. { key: "warehouse", title: "收货仓库", },
  204. { key: "place", title: "收货地点", },
  205. { key: "address", title: "收货地址", },
  206. { key: "productBatch", title: "产品批号", },
  207. { key: "manufactureDate", title: "生产日期", },
  208. { key: "efficacyLoseDate", title: "有效期至/失效日期", },
  209. { key: "approvalNumber", title: "批准文号", },
  210. { key: "registration", title: "注册证号", },
  211. {
  212. key: "storageCondition",
  213. title: "存储条件",
  214. inputType: "Select",
  215. referName: "sys_storage_condition", // 字典名
  216. },
  217. {
  218. key: "carriageCondition",
  219. title: "运输条件",
  220. inputType: "Select",
  221. referName: "sys_conditions_carriage", // 字典名
  222. },
  223. {
  224. key: "isBatchLock",
  225. title: "批号锁定标识",
  226. inputType: 'Checkbox',
  227. width:80,
  228. },
  229. {
  230. key: "isReplenishment",
  231. title: "补单标识",
  232. inputType: 'Checkbox',
  233. width:80,
  234. },
  235. {
  236. key: "isUrgency",
  237. title: "紧急标识" ,
  238. inputType: 'Checkbox',
  239. width:80,
  240. },
  241. { key: "originalQty", title: "原始数量" ,width:120,},
  242. { key: "originalMoney", title: "原始金额" ,width:120,precision:2,},
  243. { key: "reservedQty", title: "预留数量",width:120, },
  244. { key: "reservedPeriod", title: "预留周期", },
  245. { key: "taxDeductClassify", title: "扣税类别" },
  246. { key: "exchangeRate", title: "折本汇率" ,width:100,},
  247. { key: "directProductBatch", title: "直运产品批号", },
  248. { key: "discountRule", title: "折扣规则编码", },
  249. { key: "source", title: "上游单据号", },
  250. { key: "sourceId", title: "上游单据ID", },
  251. { key: "demandCode", title: "采购需求单号", },
  252. { key: "arrivalDatePlan", title: "计划到货日期", },
  253. {
  254. key: "priceType",
  255. title: "价格类型",
  256. inputType: "Select",
  257. referName: "sys_price_type", // 字典名
  258. },
  259. {
  260. key: "isDistributionPrice",
  261. title: "配送价",
  262. inputType: 'Checkbox',
  263. width:80,
  264. },
  265. { key: "materialClassifyOneName", title: "物料一级分类", },
  266. { key: "materialClassifyTwoName", title: "物料二级分类", },
  267. { key: "materialClassifyThreeName", title: "物料三级分类", },
  268. { key: "materialClassifyFourName", title: "物料四级分类", },
  269. { key: "createByName", title: "创建人",width:100, },
  270. { key: "updateByName", title: "更新人" ,width:100,},
  271. ]
  272. },
  273. {
  274. title: '执行结果',
  275. key: 'puOrderExecuteList',
  276. tableColumns: [
  277. // { key: "orderId", title: "采购订单ID", },
  278. { key: "rowno", title: "行号",width:80, },
  279. { key: "material", title: "物料ID", },
  280. { key: "materialName", title: "物料名称", },
  281. { key: "specification", title: "规格" },
  282. { key: "qty", title: "数量",width:120, },
  283. { key: "stroageQty", title: "累计到货主数量",width:120, },
  284. { key: "stockQty", title: "累计入库主数量",width:120, },
  285. { key: "invoiceQty", title: "累计开票主数量",width:120, },
  286. { key: "rollbackQty", title: "累计退货主数量",width:120, },
  287. { key: "backStockQty", title: "累计退库主数量",width:120, },
  288. { key: "floatQty", title: "未到货数量" },
  289. { key: "createByName", title: "创建人名称", },
  290. { key: "updateByName", title: "更新人名称", },
  291. ]
  292. },
  293. ];
  294. // export const SearchColumns = TableColumns.filter((element) => element.search);
  295. export const SearchColumns = [
  296. {
  297. key: "source",
  298. title: "订单来源",
  299. inputType: "Select",
  300. referName: "order_source", // 字典名
  301. clearable:true,
  302. },
  303. {
  304. key: "code",
  305. title: "订单编号",
  306. inputType: "Input",
  307. clearable:true,
  308. },
  309. {
  310. key: "date",
  311. title: "订单日期",
  312. type: "daterange",
  313. inputType: "DatePicker",
  314. unlinkPanels: true,
  315. rangeSeparator: "至",
  316. valueFormat: "yyyy-MM-dd",
  317. endPlaceholder: "结束日期",
  318. startPlaceholder: "开始日期",
  319. clearable:true,
  320. },
  321. {
  322. key: "status",
  323. title: "单据状态",
  324. inputType: "Select",
  325. referName: "documents_status", // 字典名
  326. clearable:true,
  327. },
  328. {
  329. key: "supplierName",
  330. title: "供应商",
  331. inputType: "PopoverSelect",
  332. valueKey: "id",
  333. referName: "SUPPLIER_PARAM",
  334. dataMapping: {
  335. // supplier: "id",
  336. supplierName: "name",
  337. },
  338. queryParams: () => ({}),
  339. clearable:true,
  340. },
  341. {
  342. key: "puOrgIds",
  343. title: "采购组织",
  344. inputType: "PopoverSelect",
  345. multiple:true,
  346. valueKey: "id",
  347. referName: "ORG_PARAM",
  348. dataMapping: {},
  349. queryParams: () => ({}),
  350. clearable:true,
  351. },
  352. {
  353. key: "materialCode",
  354. title: "物料编码",
  355. inputType: "PopoverSelect",
  356. valueKey: "code",
  357. referName: "MATERIAL_PARAM",
  358. dataMapping: {},
  359. queryParams: () => ({}),
  360. clearable:true,
  361. },
  362. {
  363. key: "materialName",
  364. title: "物料名称",
  365. inputType: "PopoverSelect",
  366. valueKey: "name",
  367. referName: "MATERIAL_PARAM",
  368. dataMapping: {},
  369. queryParams: () => ({}),
  370. clearable:true,
  371. },
  372. {
  373. key: "deliveryStatus",
  374. title: "erp发送状态",
  375. inputType: "Select",
  376. referName: "order_delivery_status", // 字典名
  377. clearable:true,
  378. },
  379. {
  380. key: "contractNo",
  381. title: "合同号",
  382. inputType: "Input",
  383. clearable:true,
  384. },
  385. {
  386. key: "projectNowName",
  387. title: "在建工程项目",
  388. inputType: "PopoverSelect",
  389. require: true,
  390. valueKey: "name",
  391. referName: "PROJECT_PARAM",
  392. dataMapping: {},
  393. queryParams: () => ({}),
  394. clearable:true,
  395. },
  396. {
  397. key: "buyers",
  398. title: "采购员",
  399. inputType: "PopoverSelect",
  400. multiple:true,
  401. valueKey: "code",
  402. referName: "CONTACTS_PARAM",
  403. dataMapping: {},
  404. queryParams: () => ({}),
  405. clearable:true,
  406. },
  407. {
  408. key: "billTypes",
  409. title: "订单类型",
  410. inputType: "Select",
  411. referName: "sys_order_type", // 字典名
  412. multiple:true,
  413. tags:true,
  414. clearable:true,
  415. },
  416. {
  417. key: "demandCode",
  418. title: "采购需求单号",
  419. inputType: "Input",
  420. clearable:true,
  421. },
  422. {
  423. key: "isDrug",
  424. title: "物料药品属性",
  425. inputType: "SelectCheck",
  426. clearable:true,
  427. },
  428. ];
  429. const NewColumns = initColumns(TableColumns);
  430. const NewSearchColumns = initColumns(SearchColumns);
  431. const NewTabColumns = TabColumns.map((element) => ({
  432. ...element,
  433. tableColumns: initColumns(element.tableColumns),
  434. }));
  435. //
  436. export const SelectColumns = NewColumns.filter(column => column.inputType === 'Select')
  437. NewTabColumns.forEach(column => {
  438. SelectColumns.push(...column.tableColumns.filter(cColumn => cColumn.inputType === 'Select'))
  439. });
  440. SelectColumns.push(...NewSearchColumns.filter(column => column.inputType === 'Select'))