column.js 8.9 KB

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