column.js 8.4 KB

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