column.js 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. export const FormColumns = [
  2. {
  3. key: "priceName",
  4. title: "价格名称",
  5. inputType: "Input",
  6. value: "价格申报单",
  7. },
  8. {
  9. key: "supplierName",
  10. title: "供应商",
  11. inputType: "PopoverSelect",
  12. referName: "SUPPLIER_PARAM",
  13. valueKey: "name",
  14. dataMapping: {
  15. supplier: "code",
  16. supplierName: "name",
  17. },
  18. require: true,
  19. },
  20. {
  21. key: "supplier",
  22. title: "供应商编码",
  23. inputType: "Input",
  24. disabled: true,
  25. readonly: true,
  26. },
  27. {
  28. key: "puOrgName",
  29. title: "采购组织",
  30. inputType: "PopoverSelect",
  31. referName: "ORG_PARAM",
  32. valueKey: "name",
  33. dataMapping: {
  34. puOrg: "code",
  35. puOrgName: "name",
  36. },
  37. require: true,
  38. },
  39. {
  40. key: "puOrg",
  41. title: "采购组织编码",
  42. inputType: "Input",
  43. disabled: true,
  44. readonly: true,
  45. },
  46. {
  47. key: "currencyName",
  48. title: "币种",
  49. inputType: "PopoverSelect",
  50. referName: "CURRENCY_PARAM",
  51. dataMapping: {
  52. currency: "code",
  53. currencyName: "name",
  54. },
  55. require: true,
  56. },
  57. {
  58. key: "currency",
  59. title: "币种编码",
  60. inputType: "Input",
  61. disabled: true,
  62. readonly: true,
  63. },
  64. {
  65. key: "explainStr",
  66. title: "价格合理性说明",
  67. inputType: "Input",
  68. require: true,
  69. },
  70. {
  71. key: "buyerName",
  72. title: "采购员",
  73. inputType: "PopoverSelect",
  74. referName: "CONTACTS_PARAM",
  75. dataMapping: {
  76. buyer: "code",
  77. buyerName: "name",
  78. },
  79. require: true,
  80. },
  81. {
  82. key: "buyer",
  83. title: "采购员编码",
  84. inputType: "Input",
  85. disabled: true,
  86. readonly: true,
  87. },
  88. {
  89. key: "puDeptName",
  90. title: "采购部门",
  91. inputType: "PopoverSelect",
  92. referName: "DEPT_PARAM",
  93. dataMapping: {
  94. puDept: "code",
  95. puDeptName: "name",
  96. },
  97. require: true,
  98. },
  99. {
  100. key: "puDept",
  101. title: "采购部门编码",
  102. inputType: "Input",
  103. disabled: true,
  104. readonly: true,
  105. },
  106. {
  107. key: "createByName",
  108. title: "创建人",
  109. inputType: "Input",
  110. disabled: true,
  111. readonly: true,
  112. },
  113. {
  114. key: "source",
  115. title: "来源单据号",
  116. inputType: "Input",
  117. disabled: true,
  118. readonly: true,
  119. },
  120. {
  121. key: "id",
  122. title: "来源单据id",
  123. inputType: "Input",
  124. disabled: true,
  125. readonly: true,
  126. },
  127. {
  128. key: "isEffective",
  129. title: "是否已推价格",
  130. inputType: "Select",
  131. referName: "is_effective",
  132. },
  133. {
  134. key: "effectiveDate",
  135. title: "生效日期",
  136. inputType: "Input",
  137. disabled: true,
  138. readonly: true,
  139. },
  140. {
  141. key: "file",
  142. title: "附件",
  143. inputType: "Upload",
  144. span: 24,
  145. disabled: true,
  146. readonly: true,
  147. value: [],
  148. },
  149. {
  150. key: "sourceType",
  151. title: "来源单据类型",
  152. inputType: "Input",
  153. disabled: true,
  154. readonly: true,
  155. },
  156. {
  157. key: "status",
  158. title: "单据状态",
  159. inputType: "Input",
  160. disabled: true,
  161. readonly: true,
  162. },
  163. ];
  164. export const TabColumns = [
  165. {
  166. title: "物料信息表",
  167. key: "priceApplyItems",
  168. tableColumns: [
  169. {
  170. title: "物料名称",
  171. key: "materialName",
  172. inputType: "PopoverSelect",
  173. width: 200,
  174. referName: "MATERIAL_PARAM",
  175. dataMapping: {
  176. material: "code",
  177. materialName: "name",
  178. puUnit: "unitIdName",
  179. specification: "specification",
  180. manufacturer: "manufacturerIdName",
  181. },
  182. },
  183. { title: "物料编码", key: "material" },
  184. {
  185. title: "生产厂家",
  186. key: "manufacturer",
  187. },
  188. {
  189. title: "规格",
  190. key: "specification",
  191. },
  192. {
  193. title: "型号",
  194. key: "model",
  195. },
  196. {
  197. title: "单位名称",
  198. key: "unitName",
  199. inputType: "PopoverSelect",
  200. width: 200,
  201. referName: "UNIT_PARAM",
  202. dataMapping: {
  203. puUnit: "name",
  204. },
  205. },
  206. {
  207. title: "单位",
  208. key: "unit",
  209. },
  210. {
  211. title: "采购单位名称",
  212. key: "puUnitName",
  213. inputType: "PopoverSelect",
  214. width: 200,
  215. referName: "UNIT_PARAM",
  216. dataMapping: {
  217. puUnit: "name",
  218. },
  219. },
  220. {
  221. title: "采购单位",
  222. key: "puUnit",
  223. },
  224. {
  225. title: "采购换算率",
  226. key: "conversionRate",
  227. inputType: "InputNumber",
  228. width: 200,
  229. },
  230. {
  231. title: "税率%",
  232. key: "tax",
  233. inputType: "PopoverSelect",
  234. referName: "TAX_RATE_PARAM",
  235. dataMapping: {
  236. tax: "ntaxrate",
  237. },
  238. width: 200,
  239. },
  240. {
  241. title: "含税单价",
  242. key: "taxPrice",
  243. inputType: "InputNumber",
  244. width: 200,
  245. },
  246. {
  247. title: "无税单价",
  248. key: "taxFreePrice",
  249. inputType: "ComputedInput",
  250. width: 200,
  251. computed: (prop) => {
  252. const { tax, taxPrice } = prop;
  253. const newTax = Number(tax) / 100;
  254. const taxFreePrice = (taxPrice / (1 + newTax)).toFixed(8);
  255. return taxFreePrice === "NaN" ? null : taxFreePrice;
  256. },
  257. },
  258. {
  259. key: "currencyName",
  260. title: "币种名称",
  261. inputType: "PopoverSelect",
  262. referName: "CURRENCY_PARAM",
  263. dataMapping: {
  264. currency: "code",
  265. currencyName: "name",
  266. },
  267. },
  268. {
  269. title: "币种",
  270. key: "currency",
  271. },
  272. {
  273. key: "periodBegin",
  274. title: "价格有效期(起)",
  275. inputType: "DatePicker",
  276. valueFormat: "yyyy-MM-dd",
  277. },
  278. {
  279. key: "periodEnd",
  280. title: "价格有效期(止)",
  281. inputType: "DatePicker",
  282. valueFormat: "yyyy-MM-dd",
  283. },
  284. {
  285. title: "客户名称",
  286. key: "customerName",
  287. inputType: "PopoverSelect",
  288. width: 200,
  289. referName: "CUSTOMER_PARAM",
  290. dataMapping: {
  291. customer: "code",
  292. customerName: "name",
  293. },
  294. },
  295. {
  296. title: "客户",
  297. key: "customer",
  298. },
  299. {
  300. title: "首次报批",
  301. key: "isApprovalFirst",
  302. width: 200,
  303. inputType: "Select",
  304. referName: "sys_yes_no",
  305. },
  306. {
  307. title: "价格调整",
  308. key: "isPriceAdjustment",
  309. width: 200,
  310. inputType: "Select",
  311. referName: "sys_yes_no",
  312. },
  313. {
  314. key: "priceType",
  315. title: "价格类型",
  316. inputType: "Select",
  317. referName: "sys_price_type",
  318. },
  319. {
  320. title: "配送价",
  321. key: "isDistributionPrice",
  322. width: 200,
  323. inputType: "Select",
  324. referName: "sys_yes_no",
  325. },
  326. {
  327. title: "创建人名称",
  328. key: "createByName",
  329. },
  330. {
  331. title: "更新人名称",
  332. key: "updateByName",
  333. },
  334. ],
  335. },
  336. {
  337. title: "合同执行组织范围",
  338. key: "priceApplyOrgs",
  339. tableColumns: [
  340. {
  341. title: "组织名称",
  342. key: "orgName",
  343. inputType: "PopoverSelect",
  344. referName: "ORG_PARAM",
  345. dataMapping: {
  346. org: "code",
  347. orgName: "name",
  348. },
  349. },
  350. { title: "组织编码", key: "org" },
  351. {
  352. title: "创建人名称",
  353. key: "createByName",
  354. },
  355. {
  356. title: "更新人名称",
  357. key: "updateByName",
  358. },
  359. ],
  360. },
  361. ];
  362. export default { FormColumns, TabColumns };