column.js 7.4 KB

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