column.js 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  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: "Select",
  160. referName: "sys_status",
  161. disabled: true,
  162. readonly: true,
  163. value: "0",
  164. },
  165. ];
  166. export const TabColumns = [
  167. {
  168. title: "物料信息表",
  169. key: "priceApplyItems",
  170. tableColumns: [
  171. {
  172. title: "物料名称",
  173. key: "materialName",
  174. inputType: "PopoverSelect",
  175. width: 200,
  176. referName: "MATERIAL_PARAM",
  177. dataMapping: {
  178. material: "id",
  179. materialCode: "code",
  180. materialName: "name",
  181. puUnit: "unitIdName",
  182. specification: "specification",
  183. manufacturer: "manufacturerIdName",
  184. },
  185. },
  186. { title: "物料编码", key: "materialCode" },
  187. {
  188. title: "生产厂家",
  189. key: "manufacturer",
  190. },
  191. {
  192. title: "规格",
  193. key: "specification",
  194. },
  195. {
  196. title: "型号",
  197. key: "model",
  198. },
  199. {
  200. title: "单位名称",
  201. key: "unitName",
  202. inputType: "PopoverSelect",
  203. width: 200,
  204. referName: "UNIT_PARAM",
  205. dataMapping: {
  206. puUnit: "name",
  207. },
  208. },
  209. {
  210. title: "单位",
  211. key: "unit",
  212. },
  213. {
  214. title: "采购单位名称",
  215. key: "puUnitName",
  216. inputType: "PopoverSelect",
  217. width: 200,
  218. referName: "UNIT_PARAM",
  219. dataMapping: {
  220. puUnit: "name",
  221. },
  222. },
  223. {
  224. title: "采购单位",
  225. key: "puUnit",
  226. },
  227. {
  228. title: "采购换算率",
  229. key: "conversionRate",
  230. inputType: "InputNumber",
  231. width: 200,
  232. },
  233. {
  234. title: "税率%",
  235. key: "tax",
  236. inputType: "PopoverSelect",
  237. referName: "TAX_RATE_PARAM",
  238. dataMapping: {
  239. tax: "ntaxrate",
  240. },
  241. width: 200,
  242. },
  243. {
  244. title: "含税单价",
  245. key: "taxPrice",
  246. inputType: "InputNumber",
  247. width: 200,
  248. },
  249. {
  250. title: "无税单价",
  251. key: "taxFreePrice",
  252. inputType: "ComputedInput",
  253. width: 200,
  254. computed: (prop) => {
  255. const { tax, taxPrice } = prop;
  256. const newTax = Number(tax) / 100;
  257. const taxFreePrice = (taxPrice / (1 + newTax)).toFixed(8);
  258. return taxFreePrice === "NaN" ? null : taxFreePrice;
  259. },
  260. },
  261. {
  262. key: "currencyName",
  263. title: "币种名称",
  264. inputType: "PopoverSelect",
  265. referName: "CURRENCY_PARAM",
  266. dataMapping: {
  267. currency: "code",
  268. currencyName: "name",
  269. },
  270. },
  271. {
  272. title: "币种",
  273. key: "currency",
  274. },
  275. {
  276. key: "periodBegin",
  277. title: "价格有效期(起)",
  278. inputType: "DatePicker",
  279. valueFormat: "yyyy-MM-dd",
  280. },
  281. {
  282. key: "periodEnd",
  283. title: "价格有效期(止)",
  284. inputType: "DatePicker",
  285. valueFormat: "yyyy-MM-dd",
  286. },
  287. {
  288. title: "客户名称",
  289. key: "customerName",
  290. inputType: "PopoverSelect",
  291. width: 200,
  292. referName: "CUSTOMER_PARAM",
  293. dataMapping: {
  294. customer: "code",
  295. customerName: "name",
  296. },
  297. },
  298. {
  299. title: "客户",
  300. key: "customer",
  301. },
  302. {
  303. title: "首次报批",
  304. key: "isApprovalFirst",
  305. width: 200,
  306. inputType: "Select",
  307. referName: "sys_yes_no",
  308. },
  309. {
  310. title: "价格调整",
  311. key: "isPriceAdjustment",
  312. width: 200,
  313. inputType: "Select",
  314. referName: "sys_yes_no",
  315. },
  316. {
  317. key: "priceType",
  318. title: "价格类型",
  319. inputType: "Select",
  320. referName: "sys_price_type",
  321. },
  322. {
  323. title: "配送价",
  324. key: "isDistributionPrice",
  325. width: 200,
  326. inputType: "Select",
  327. referName: "sys_yes_no",
  328. },
  329. {
  330. title: "创建人名称",
  331. key: "createByName",
  332. },
  333. {
  334. title: "更新人名称",
  335. key: "updateByName",
  336. },
  337. ],
  338. },
  339. {
  340. title: "合同执行组织范围",
  341. key: "priceApplyOrgs",
  342. tableColumns: [
  343. {
  344. title: "组织名称",
  345. key: "orgName",
  346. inputType: "PopoverSelect",
  347. referName: "ORG_PARAM",
  348. dataMapping: {
  349. org: "code",
  350. orgName: "name",
  351. },
  352. },
  353. { title: "组织编码", key: "org" },
  354. {
  355. title: "创建人名称",
  356. key: "createByName",
  357. },
  358. {
  359. title: "更新人名称",
  360. key: "updateByName",
  361. },
  362. ],
  363. },
  364. ];
  365. export default { FormColumns, TabColumns };