column.js 13 KB

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