column.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  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: "采购组织名称", search: true, inputType: "Input" },
  11. {
  12. key: "billType",
  13. title: "订单类型",
  14. inputType: "Select",
  15. referName: "sys_order_type",
  16. },
  17. { key: "code", title: "订单编号", search: true, 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: "供应商", search: true, inputType: "Input" },
  28. { key: "paymentAgreementName", title: "付款协议" },
  29. // { key: "paymentAgreement", title: "付款协议" },
  30. // { key: "currency", title: "币种" },
  31. { key: "currencyName", title: "币种" },
  32. // { key: "buyer", title: "采购员" },ut
  33. { key: "buyerName", title: "采购员" },
  34. // { key: "puDept", title: "采购部门" },
  35. { key: "puDeptName", title: "采购部门" },
  36. // { key: "customer", title: "收货客户" },
  37. { key: "customerName", title: "收货客户" },
  38. { key: "isDeliver", title: "是否发货" },
  39. {
  40. key: "isArrival",
  41. title: "到货超期",
  42. inputType: 'Checkbox',
  43. width:80,
  44. },
  45. {
  46. key: "isBack",
  47. title: "退货",
  48. inputType: 'Checkbox',
  49. width:80,
  50. },
  51. // { key: "freezeCause", title: "冻结原因" },
  52. { key: "qty", title: "总数量" },
  53. { key: "money", title: "总数量" },
  54. {
  55. key: "isMarketing",
  56. title: "已协同生成销售订单",
  57. inputType: 'Checkbox',
  58. },
  59. {
  60. key: "isMarketingSource",
  61. title: "由销售订单协同生成",
  62. inputType: 'Checkbox',
  63. },
  64. // { key: "personal", title: "人员" },
  65. { key: "personalName", title: "人员" },
  66. // { key: "isSendSrm", title: "是否同步SRM" },
  67. {
  68. key: "isInvoice",
  69. title: "发票标识",
  70. inputType: 'Checkbox',
  71. width:80,
  72. },
  73. { key: "rebateMoney", title: "订单使用返利金额" },
  74. { key: "deductionMoney", title: "订单抵扣余款金额" },
  75. // { key: "warehouse", title: "WMS入库仓库" },
  76. { key: "warehouseName", title: "收货仓库" }, //WMS入库仓库名称
  77. // { key: "goodsAllocation", title: "货位" },
  78. { key: "goodsAllocationName", title: "货位" },
  79. // { key: "customerDept", title: "客户部门" },
  80. { key: "customerDeptName", title: "客户部门" },
  81. // { key: "supplierContacts", title: "供应商业务联系人" },
  82. { key: "supplierContactsName", title: "供应商业务联系人" },
  83. {
  84. key: "isUrgency",
  85. title: "紧急程度",
  86. inputType: 'Checkbox',
  87. width:80,
  88. },
  89. // { key: "agent", title: "代理人" }, // 建议删除
  90. { key: "agentName", title: "代理人" },
  91. {
  92. key: "isClose",
  93. title: "最终关闭",
  94. inputType: 'Checkbox',
  95. width:80,
  96. },
  97. { key: "applyPaymentMoney", title: "累计付款申请金额" },
  98. { key: "paymentMoney", title: "累计付款金额" },
  99. { key: "invoiceMoney", title: "发票金额" },
  100. // { key: "supplierPersonal", title: "供应商业务员" },
  101. { key: "supplierPersonalName", title: "供应商业务员" },
  102. { key: "marketingCode", title: "销售订单号" },
  103. // { key: "tenantId", title: "租户号" },
  104. // { key: "revision", title: "乐观锁" },
  105. { key: "createByName", title: "创建人" },
  106. { key: "updateByName", title: "更新人" },
  107. // { key: "delFlag", title: "删除标记" },
  108. { key: "flowId", title: "OA流程ID" },
  109. { key: "approver", title: "审批人" },
  110. { key: "approverFinishTime", title: "审批时间" },
  111. { key: "approveTime", title: "提交时间" },
  112. { key: "createTime", title: "制单日期/创建时间" },
  113. { key: "remark", title: "备注" },
  114. { key: "updateTime", title: "最后修改时间" },
  115. { key: "oaDemandNo", title: "OA需求单号" },
  116. { key: "address", title: "收货地址" },
  117. { key: "contacts", title: "收获联系人" },
  118. {
  119. key: "isSendWms",
  120. title: "已同步WMS",
  121. inputType: 'Checkbox',
  122. width:120,
  123. },
  124. { key: "retReasonName", title: "退换原因" },
  125. { key: "closeTime", title: "最终关闭日期" },
  126. { key: "processTypeName", title: "处理方式" },
  127. { key: "isEnd", title: "整单关闭标识" },
  128. { key: "projectNowName", title: "在建工程项目" },
  129. { key: "operatingItemsName", title: "经营性项目" },
  130. { key: "isArrivalReson", title: "到货超期原因" },
  131. { key: "midOrderNo", title: "中台采购订单号" }
  132. ];
  133. export const TabColumns = [
  134. {
  135. title: '物料信息',
  136. key: 'puOrderItemList',
  137. tableColumns: [
  138. { key: "rowNo", title: "行号" },
  139. // { key: "orderId", title: "采购订单ID" },
  140. { key: "material", title: "物料" },
  141. { key: "materialName", title: "物料名称", width: 180 },
  142. { key: "materialCode", title: "物料编码", width: 180 },
  143. { key: "materialClassify", title: "物料分类", width: 180 },
  144. { key: "materialManufacturersCode", title: "厂家物料编码", width: 180 },
  145. { key: "specification", title: "规格", width: 180 },
  146. { key: "model", title: "型号", width: 180 },
  147. {
  148. key: "isMedcine",
  149. title: "医药物料",
  150. width: 180,
  151. inputType: 'Checkbox',
  152. width:80,
  153. },
  154. { key: "manufacturer", title: "生产厂家代理人", width: 180 },
  155. { key: "isDrug", title: "物料药品属性", width: 180 },
  156. { key: "unit", title: "单位", width: 180 },
  157. { key: "qty", title: "数量" },
  158. { key: "taxPrice", title: "含税单价" },
  159. { key: "money", title: "价税合计" },
  160. { key: "tax", title: "税率" },
  161. { key: "taxDeductMoneya", title: "折扣金额" },
  162. { key: "arrivalQty", title: "已到货数量" },
  163. { key: "unarrivedQty", title: "未到货数量" },
  164. { key: "notaxMoney", title: "无税金额" },
  165. { key: "priceSource", title: "价格目录ID" },
  166. {
  167. key: "isStorage",
  168. title: "入库关闭",
  169. inputType: 'Checkbox',
  170. width:80,
  171. },
  172. {
  173. key: "isInvoice",
  174. title: "开票关闭",
  175. inputType: 'Checkbox',
  176. width:80,
  177. },
  178. {
  179. key: "isArrival",
  180. title: "到货关闭",
  181. inputType: 'Checkbox',
  182. width:80,
  183. },
  184. {
  185. key: "isPayment",
  186. title: "付款关闭",
  187. inputType: 'Checkbox',
  188. width:80,
  189. },
  190. {
  191. key: "isGift",
  192. title: "赠品",
  193. inputType: 'Checkbox',
  194. width:80,
  195. },
  196. { key: "warehouse", title: "收货仓库", width: 180 },
  197. { key: "place", title: "收货地点", width: 180 },
  198. { key: "address", title: "收货地址", width: 180 },
  199. { key: "productBatch", title: "产品批号", width: 180 },
  200. { key: "manufactureDate", title: "生产日期", width: 180 },
  201. { key: "efficacyLoseDate", title: "有效期至/失效日期", width: 180 },
  202. { key: "approvalNumber", title: "批准文号", width: 180 },
  203. { key: "registration", title: "注册证号", width: 180 },
  204. {
  205. key: "storageCondition",
  206. title: "存储条件",
  207. inputType: "Select",
  208. referName: "sys_storage_condition", // 字典名
  209. },
  210. {
  211. key: "carriageCondition",
  212. title: "运输条件",
  213. inputType: "Select",
  214. referName: "sys_conditions_carriage", // 字典名
  215. },
  216. {
  217. key: "isBatchLock",
  218. title: "批号锁定标识",
  219. inputType: 'Checkbox',
  220. width:80,
  221. },
  222. {
  223. key: "isReplenishment",
  224. title: "补单标识",
  225. inputType: 'Checkbox',
  226. width:80,
  227. },
  228. { key: "isUrgency", title: "紧急标识" },
  229. { key: "originalQty", title: "原始数量" },
  230. { key: "originalMoney", title: "原始金额" },
  231. { key: "directProductBatch", title: "直运产品批号", width: 180 },
  232. { key: "discountRule", title: "折扣规则编码", width: 180 },
  233. { key: "reservedQty", title: "预留数量" },
  234. { key: "reservedPeriod", title: "预留周期", width: 180 },
  235. { key: "taxDeductClassify", title: "扣税类别" },
  236. { key: "exchangeRate", title: "折本汇率" },
  237. { key: "source", title: "上游单据号", width: 180 },
  238. { key: "sourceId", title: "上游单据ID", width: 180 },
  239. { key: "demandCode", title: "采购需求单号", width: 180 },
  240. { key: "arrivalDatePlan", title: "计划到货日期", width: 180 },
  241. {
  242. key: "priceType",
  243. title: "价格类型",
  244. inputType: "Select",
  245. referName: "sys_price_type", // 字典名
  246. },
  247. {
  248. key: "isDistributionPrice",
  249. title: "配送价",
  250. inputType: 'Checkbox',
  251. width:80,
  252. },
  253. // { key: "tenantId", title: "租户号" },
  254. // { key: "revision", title: "乐观锁" },
  255. { key: "createByName", title: "创建人" },
  256. { key: "updateByName", title: "更新人" },
  257. // { key: "delFlag", title: "删除标记" },
  258. // { key: "materialClassifyOne", title: "物料一级分类" },
  259. { key: "materialClassifyOneName", title: "物料一级分类", width: 180 },
  260. // { key: "materialClassifyTwo", title: "物料二级分类" },
  261. { key: "materialClassifyTwoName", title: "物料二级分类", width: 180 },
  262. // { key: "materialClassifyThree", title: "物料三级分类" },
  263. { key: "materialClassifyThreeName", title: "物料三级分类", width: 180 },
  264. // { key: "materialClassifyFour", title: "物料四级分类" },
  265. { key: "materialClassifyFourName", title: "物料四级分类", width: 180 },
  266. { key: "price", title: "无税单价" }
  267. ]
  268. },
  269. {
  270. title: '执行结果',
  271. key: 'puOrderExecuteList',
  272. tableColumns: [
  273. // { key: "id", title: "主键" },
  274. // { key: "orderId", title: "采购订单ID", width: 180 },
  275. { key: "rowno", title: "行号" },
  276. { key: "material", title: "物料", width: 180 },
  277. { key: "materialName", title: "物料名称", width: 180 },
  278. { key: "specification", title: "规格" },
  279. { key: "qty", title: "数量" },
  280. { key: "stroageQty", title: "累计到货主数量" },
  281. { key: "stockQty", title: "累计入库主数量" },
  282. { key: "invoiceQty", title: "累计开票主数量" },
  283. { key: "rollbackQty", title: "累计退货主数量" },
  284. { key: "backStockQty", title: "累计退库主数量" },
  285. { key: "floatQty", title: "未到货数量" },
  286. // { key: "tenantId", title: "租户号" },
  287. // { key: "revision", title: "乐观锁" },
  288. { key: "createByName", title: "创建人名称", width: 180 },
  289. { key: "updateByName", title: "更新人名称", width: 180 },
  290. // { key: "delFlag", title: "删除标记" }
  291. ]
  292. },
  293. ];
  294. export const SearchColumns = TableColumns.filter((element) => element.search);
  295. const NewColumns = initColumns(TableColumns);
  296. const NewTabColumns = TabColumns.map((element) => ({
  297. ...element,
  298. tableColumns: initColumns(element.tableColumns),
  299. }));
  300. //
  301. export const SelectColumns = NewColumns.filter(column => column.inputType === 'Select')
  302. NewTabColumns.forEach(column => {
  303. SelectColumns.push(...column.tableColumns.filter(cColumn => cColumn.inputType === 'Select'))
  304. });