column.js 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518
  1. import orderApi from "@/api/business/purchase/purchase-order";
  2. import Cookies from "js-cookie";
  3. // 集采中心
  4. const PurColumns =[
  5. {
  6. key: "puOrgName",
  7. title: "采购组织",
  8. inputType: "PopoverSelect",
  9. valueKey: "id",
  10. referName: "ORG_PARAM",
  11. dataMapping: {
  12. puOrg: "id",
  13. puOrgName: "name",
  14. },
  15. queryParams: () => ({}),
  16. require: true,
  17. isShow:true,
  18. },
  19. {
  20. key: "createTime",
  21. title: "制单日期",
  22. inputType: "DatePicker",
  23. type:'datetime',
  24. // valueFormat: "yyyy-MM-dd HH:mm:ss",
  25. require: true,
  26. disabled: true,
  27. isShow:true,
  28. },
  29. {
  30. key: "status",
  31. title: "单据状态",
  32. inputType: "Select",
  33. referName: "documents_status", // 字典名
  34. disabled: true,
  35. isShow:true,
  36. },
  37. {
  38. key: "paymentAgreementName",
  39. title: "付款协议",
  40. inputType: "PopoverSelect",
  41. valueKey: "id",
  42. referName: "PAYAGREEMENT_PARAM",
  43. dataMapping: {
  44. paymentAgreement: 'id',
  45. paymentAgreementName: 'name'
  46. },
  47. queryParams: () => ({}),
  48. isShow:true,
  49. disabled:true,
  50. },
  51. {
  52. key: "updateTime",
  53. title: "修改日期",
  54. inputType: "DatePicker",
  55. valueFormat: "yyyy-MM-dd HH-MM-SS",
  56. width: 200,
  57. disabled: true,
  58. isShow:true,
  59. },
  60. {
  61. key: "billType",
  62. title: "订单类型",
  63. inputType: "Select",
  64. referName: "sys_order_type", // 字典名
  65. isShow:true,
  66. require: true,
  67. },
  68. {
  69. key: "supplierName",
  70. title: "供应商",
  71. inputType: "PopoverSelect",
  72. valueKey: "id",
  73. referName: "SUPPLIER_PARAM",
  74. dataMapping: {
  75. supplier: "id",
  76. supplierCode:'code',
  77. supplierName: "name",
  78. paymentAgreement: 'paymentId',
  79. paymentAgreementName: 'paymentName',
  80. },
  81. queryParams: () => ({}),
  82. require: true,
  83. isShow:true,
  84. },
  85. {
  86. key: "qty",
  87. title: "总数量",
  88. inputType: "InputNumber",
  89. controlsPosition: "right",
  90. isShow:true,
  91. disabled:true,
  92. },
  93. {
  94. key: "warehouseName",
  95. title: "WMS入库仓库",
  96. inputType: "PopoverSelect",
  97. valueKey: "id",
  98. referName: "WAREHOUSE_PARAM",
  99. dataMapping: {
  100. warehouse: 'id',
  101. warehouseName: 'name',
  102. },
  103. queryParams: (params) => ({
  104. pkOrg: params.puOrg,
  105. }),
  106. isShow:true,
  107. // require: true,
  108. },
  109. {
  110. key: "goodsAllocationName",
  111. title: "货位",
  112. inputType: "PopoverSelect",
  113. valueKey: "id",
  114. referName: "ALLOCATION_PARAM",
  115. dataMapping: {
  116. goodsAllocation: 'id',
  117. goodsAllocationName: 'name',
  118. },
  119. isShow:true,
  120. queryParams: (params) => ({
  121. stordocId: params.warehouse,
  122. }),
  123. width: 200,
  124. },
  125. {
  126. key: "originalQty",
  127. title: "原始总数量",
  128. inputType: "InputNumber",
  129. controlsPosition: "right",
  130. isShow:true,
  131. disabled:true,
  132. },
  133. {
  134. key: "createByName",
  135. title: "制单人",
  136. inputType: "Input",
  137. isShow:true,
  138. disabled:true,
  139. },
  140. {
  141. key: "code",
  142. title: "订单编号",
  143. inputType: "Input",
  144. readonly: true,
  145. disabled: true,
  146. isShow:true,
  147. },
  148. {
  149. key: "money",
  150. title: "价税合计",
  151. inputType: "InputNumber",
  152. controlsPosition: "right",
  153. // precision:2,
  154. isShow:true,
  155. disabled:true,
  156. },
  157. {
  158. key: "goodsWarehouseName",
  159. title: "收货仓库",
  160. inputType: "PopoverSelect",
  161. valueKey: "name",
  162. referName: "ADDRESS_PARAM",
  163. isShow:true,
  164. require: true,
  165. dataMapping: {
  166. address: 'address',
  167. // addressName: '',
  168. goodsWarehouse:'id',
  169. goodsWarehouseName:'name',
  170. contacts:'contactsName',
  171. contactsPhone:'contactsPhone'
  172. },
  173. queryParams: () => ({}),
  174. },
  175. {
  176. key: "originalMoney",
  177. title: "原始金额",
  178. inputType: "InputNumber",
  179. controlsPosition: "right",
  180. // precision:2,
  181. isShow:true,
  182. disabled:true,
  183. width: 180,
  184. },
  185. {
  186. key: "buyerName",
  187. title: "采购员",
  188. inputType: "PopoverSelect",
  189. valueKey: "code",
  190. referName: "CONTACTS_PARAM",
  191. dataMapping: {
  192. buyer: 'code',
  193. buyerName: 'name'
  194. },
  195. queryParams: () => ({}),
  196. require: true,
  197. isShow:true,
  198. },
  199. {
  200. key: "erpOrderCode",
  201. title: "erp订单编号",
  202. inputType: "Input",
  203. readonly: true,
  204. disabled: true,
  205. isShow:true,
  206. },
  207. {
  208. key: "rebateMoney",
  209. title: "订单使用返利金额",
  210. inputType: "InputNumber",
  211. controlsPosition: "right",
  212. // precision:2,
  213. isShow:true,
  214. require: true,
  215. },
  216. {
  217. key: "address",
  218. title: "收货地址",
  219. inputType: "Input",
  220. require: true,
  221. disabled:true,
  222. isShow:true,
  223. width: 180
  224. },
  225. {
  226. key: "isEnd",
  227. title: "整单关闭标识",
  228. inputType: "Checkbox",
  229. isShow:true,
  230. },
  231. {
  232. key: "isBack",
  233. title: "退货",
  234. inputType: "Input",
  235. inputType: "Checkbox",
  236. isShow:true,
  237. },
  238. {
  239. key: "deductionMoney",
  240. title: "订单抵扣余款金额",
  241. inputType: "InputNumber",
  242. controlsPosition: "right",
  243. // precision:2,
  244. isShow:true,
  245. require: true,
  246. },
  247. {
  248. key: "contacts",
  249. title: "收货联系人",
  250. inputType: "Input",
  251. isShow:true,
  252. disabled:true,
  253. },
  254. {
  255. key: "isClose",
  256. title: "最终关闭",
  257. inputType: "Checkbox",
  258. isShow:true,
  259. disabled:true,
  260. },
  261. {
  262. key: "retReasonName",
  263. title: "退换原因",
  264. inputType: "PopoverSelect",
  265. valueKey: "id",
  266. referName: "RETREASON_PARAM",
  267. dataMapping: {
  268. retReason: 'id',
  269. retReasonName: 'name'
  270. },
  271. isShow:true,
  272. queryParams: () => ({}),
  273. },
  274. {
  275. key: "applyPaymentMoney",
  276. title: "累计付款申请金额",
  277. inputType: "InputNumber",
  278. controlsPosition: "right",
  279. // precision:2,
  280. isShow:true,
  281. disabled:true,
  282. },
  283. {
  284. key: "puDeptName",
  285. title: "采购部门",
  286. inputType: "PopoverSelect",
  287. valueKey: "id",
  288. referName: "DEPT_PARAM",
  289. dataMapping: {
  290. puDept: 'id',
  291. puDeptName: 'name'
  292. },
  293. queryParams: () => ({}),
  294. require: true,
  295. isShow:true,
  296. },
  297. {
  298. key: "closeTime",
  299. title: "最终关闭日期",
  300. inputType: "DatePicker",
  301. valueFormat: "yyyy-MM-dd",
  302. isShow:true,
  303. disabled:true,
  304. },
  305. {
  306. key: "processTypeName",
  307. title: "处理方式",
  308. inputType: "PopoverSelect",
  309. valueKey: "id",
  310. referName: "PROCESSTYPE_PARAM",
  311. dataMapping: {
  312. processType: 'id',
  313. processTypeName: 'name'
  314. },
  315. isShow:true,
  316. queryParams: () => ({}),
  317. },
  318. {
  319. key: "paymentMoney",
  320. title: "累计付款金额",
  321. inputType: "InputNumber",
  322. controlsPosition: "right",
  323. // precision:2,
  324. isShow:true,
  325. },
  326. {
  327. key: "freezeCause",
  328. title: "冻结原因",
  329. inputType: "Checkbox",
  330. isShow:true,
  331. },
  332. {
  333. key: "invoiceMoney",
  334. title: "发票金额",
  335. inputType: "InputNumber",
  336. controlsPosition: "right",
  337. isShow:true,
  338. },
  339. {
  340. key: "oaDemandNo",
  341. title: "OA需求单号",
  342. inputType: "Input",
  343. isShow:true,
  344. },
  345. {
  346. key: "remark",
  347. title: "备注",
  348. inputType: "Textarea",
  349. isShow:true,
  350. },
  351. ];
  352. const PurchaseTabColumns =[
  353. {
  354. title: '物料信息',
  355. key: 'puOrderItemList',
  356. tableColumns: [
  357. {
  358. key: "customerName",
  359. title: "收货客户",
  360. inputType: "PopoverSelect",
  361. valueKey: "id",
  362. referName: "CUSTOMER_PARAM",
  363. width: 180,
  364. dataMapping:{
  365. customer:'id',
  366. customerName:'name',
  367. },
  368. },
  369. {
  370. key: "rowNo",
  371. title: "行号",
  372. inputType: "Input",
  373. disabled:true,
  374. require:false,
  375. },
  376. {
  377. key: "materialName",
  378. title: "物料名称",
  379. inputType: "PopoverSelect",
  380. width: 180,
  381. require: true,
  382. valueKey: "id",
  383. referName: "MATERIAL_PARAM",
  384. dataMapping: {
  385. material: "id",
  386. materialName: "name",
  387. materialCode: "code",
  388. // materialClassify:'classifyIdName',
  389. materialManufacturersCode:'manufacturersMaterialCode',
  390. specification:'specification',
  391. model:'model',
  392. isMedcine:'isMedicine',
  393. manufacturer:'manufacturerId',
  394. manufacturerName:'manufacturerIdName',
  395. unit:'unitId',
  396. unitName:'unitIdName',
  397. // tax:'materialRateName',
  398. storageCondition:'storageCondition',
  399. carriageCondition:'transportationCondition',
  400. materialClassifyOneName:'oneClass',
  401. materialClassifyTwoName:'twoClass',
  402. materialClassifyThreeName:'threeClass',
  403. materialClassifyFourName:'fourClass',
  404. registration:'registrationNo',
  405. isDrug:'isDrug',
  406. },
  407. queryParams: () => ({}),
  408. width:180,
  409. },
  410. {
  411. key: "materialCode",
  412. title: "物料编码",
  413. inputType: "Input",
  414. require: true,
  415. width: 180,
  416. disabled:true,
  417. readonly:true,
  418. },
  419. { //specification
  420. key: "specification",
  421. title: "规格",
  422. inputType: "Input",
  423. width: 180 ,
  424. disabled:true,
  425. readonly:true,
  426. },
  427. { //model
  428. key: "model",
  429. title: "型号",
  430. inputType: "Input",
  431. disabled:true,
  432. readonly:true,
  433. },
  434. { // manufacturerId manufacturerIdName
  435. key: "manufacturerName",
  436. title: "生产厂家代理人",
  437. inputType: "Input",
  438. width: 180,
  439. disabled:true,
  440. readonly:true,
  441. },
  442. { //unitId unitIdName
  443. key: "unitName",
  444. title: "单位",
  445. inputType: "Input",
  446. disabled:true,
  447. readonly:true,
  448. },
  449. {
  450. key: "qty",
  451. title: "数量",
  452. inputType: "InputNumber",
  453. controlsPosition: "right",
  454. width: 120,
  455. require: true,
  456. isSummary:true,
  457. },
  458. {
  459. key: "taxPrice",
  460. title: "含税单价",
  461. inputType: "InputNumber",
  462. controlsPosition: "right",
  463. // precision:2,
  464. require: true,
  465. disabled:true,
  466. width: 180,
  467. },
  468. {
  469. key: "money",
  470. title: "价税合计",
  471. inputType: "InputNumber",
  472. controlsPosition: "right",
  473. // precision:2,
  474. disabled:true,
  475. width: 180,
  476. isSummary:true,
  477. },
  478. {
  479. key: "isGift",
  480. title: "赠品",
  481. inputType: "Checkbox",
  482. },
  483. {
  484. key: "nitemdiscountrate",
  485. title: "折扣(%)",
  486. inputType: "Input",
  487. // precision:2,
  488. disabled:true,
  489. width: 180,
  490. },
  491. {
  492. key: "taxDeductMoneya",
  493. title: "折扣金额",
  494. inputType: "InputNumber",
  495. controlsPosition: "right",
  496. // precision:2,
  497. disabled:true,
  498. width: 180,
  499. isSummary:true,
  500. },
  501. {
  502. key: "discountRule",
  503. title: "折扣规则编码",
  504. inputType: "Input",
  505. width: 180
  506. },
  507. { //materialRate materialRateName
  508. key: "tax",
  509. title: "税率",
  510. // inputType: "Input",
  511. inputType: "InputNumber",
  512. controlsPosition: "right",
  513. // precision:2,
  514. disabled:true,
  515. width: 180,
  516. },
  517. {
  518. key: "registration",
  519. title: "注册证号",
  520. inputType: "Input",
  521. width: 180 ,
  522. disabled:true,
  523. },
  524. {
  525. key: "demandCode",
  526. title: "采购需求单号",
  527. inputType: "Input",
  528. width: 180
  529. },
  530. {
  531. key: "isReplenishment",
  532. title: "补单标识",
  533. inputType: "Checkbox",
  534. },
  535. {
  536. key: "isUrgency",
  537. title: "紧急标识",
  538. inputType: "Checkbox",
  539. },
  540. {
  541. key: "priceType",
  542. title: "价格类型",
  543. inputType: "Select",
  544. referName: "sys_price_type", // 字典名
  545. width: 180,
  546. },
  547. {
  548. key: "isDistributionPrice",
  549. title: "配送价",
  550. inputType: "Checkbox",
  551. },
  552. {
  553. key: "floatQty",
  554. title: "未到货数量",
  555. inputType: "InputNumber",
  556. controlsPosition: "right",
  557. width: 180,
  558. isSummary:true,
  559. },
  560. { key: "isArrival", title: "到货关闭", inputType: "Checkbox", disabled:true,},
  561. { key: "isStorage", title: "入库关闭", inputType: "Checkbox", disabled:true, },
  562. { key: "isPayment", title: "付款关闭", inputType: "Checkbox", disabled:true, },
  563. { key: "isInvoice", title: "开票关闭", inputType: "Checkbox", disabled:true, },
  564. { //isMedicine isMedicineValue
  565. key: "isMedcine",
  566. title: "医药物料",
  567. inputType: "Checkbox",
  568. disabled:true,
  569. readonly:true,
  570. },
  571. {
  572. key: "originalQty",
  573. title: "原始数量",
  574. inputType: "InputNumber",
  575. controlsPosition: "right",
  576. disabled:true,
  577. width: 180 ,
  578. isSummary:true,
  579. },
  580. {
  581. key: "originalMoney",
  582. title: "原始金额",
  583. inputType: "InputNumber",
  584. controlsPosition: "right",
  585. // precision:2,
  586. disabled:true,
  587. width: 180,
  588. isSummary:true,
  589. },
  590. ]
  591. },
  592. {
  593. title: '执行结果',
  594. key: 'puOrderExecuteList',
  595. tableColumns: [
  596. // { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
  597. {
  598. key: "rowno",
  599. title: "行号",
  600. inputType: "Input",
  601. disabled:true,
  602. require:false,
  603. },
  604. {
  605. key: "materialName",
  606. title: "物料",
  607. inputType: "PopoverSelect",
  608. width: 180,
  609. require: true,
  610. valueKey: "id",
  611. referName: "MATERIAL_PARAM",
  612. dataMapping: {
  613. material: "id",
  614. materialName: "name",
  615. materialCode: "code",
  616. // materialClassify:'classifyIdName',
  617. materialManufacturersCode:'manufacturersMaterialCode',
  618. specification:'specification',
  619. model:'model',
  620. isMedcine:'isMedicine',
  621. manufacturer:'manufacturerId',
  622. manufacturerName:'manufacturerIdName',
  623. unit:'unitId',
  624. unitName:'unitIdName',
  625. // tax:'materialRateName',
  626. storageCondition:'storageCondition',
  627. carriageCondition:'transportationCondition',
  628. materialClassifyOneName:'oneClass',
  629. materialClassifyTwoName:'twoClass',
  630. materialClassifyThreeName:'threeClass',
  631. materialClassifyFourName:'fourClass',
  632. registration:'registrationNo',
  633. isDrug:'isDrug',
  634. },
  635. queryParams: () => ({}),
  636. width:180,
  637. },
  638. {
  639. key: "specification",
  640. title: "规格",
  641. inputType: "Input",
  642. disabled:true,
  643. readonly:true,
  644. },
  645. {
  646. key: "qty",
  647. title: "数量",
  648. inputType: "InputNumber",
  649. controlsPosition: "right",
  650. width: 180,
  651. require: true,
  652. isSummary:true,
  653. },
  654. {
  655. key: "stroageQty",
  656. title: "累计到货主数量",
  657. inputType: "InputNumber",
  658. controlsPosition: "right",
  659. width: 180,
  660. isSummary:true,
  661. },
  662. {
  663. key: "stockQty",
  664. title: "累计入库主数量",
  665. inputType: "InputNumber",
  666. controlsPosition: "right",
  667. width: 180,
  668. isSummary:true,
  669. },
  670. {
  671. key: "invoiceQty",
  672. title: "累计开票主数量",
  673. inputType: "InputNumber",
  674. controlsPosition: "right",
  675. width: 180,
  676. isSummary:true,
  677. },
  678. {
  679. key: "rollbackQty",
  680. title: "累计退货主数量",
  681. inputType: "InputNumber",
  682. controlsPosition: "right",
  683. width: 180,
  684. isSummary:true,
  685. },
  686. {
  687. key: "backStockQty",
  688. title: "累计退库主数量",
  689. inputType: "InputNumber",
  690. controlsPosition: "right",
  691. width: 180,
  692. isSummary:true,
  693. },
  694. {
  695. key: "floatQty",
  696. title: "未到货数量",
  697. inputType: "InputNumber",
  698. controlsPosition: "right",
  699. width: 180,
  700. isSummary:true,
  701. },
  702. // {
  703. // key: "createByName",
  704. // title: "创建人",
  705. // inputType: "Input",
  706. // width: 120
  707. // },
  708. // {
  709. // key: "updateByName",
  710. // title: "更新人",
  711. // inputType: "Input",
  712. // width: 120
  713. // },
  714. ]
  715. },
  716. ];
  717. // 事业发展部
  718. const CauseColumns =[
  719. {
  720. key: "puOrgName",
  721. title: "采购组织",
  722. inputType: "PopoverSelect",
  723. valueKey: "id",
  724. referName: "ORG_PARAM",
  725. dataMapping: {
  726. puOrg: "id",
  727. puOrgName: "name",
  728. },
  729. queryParams: () => ({}),
  730. require: true,
  731. isShow:true,
  732. },
  733. {
  734. key: "billType",
  735. title: "订单类型",
  736. inputType: "Select",
  737. referName: "sys_order_type", // 字典名
  738. isShow:true,
  739. require: true,
  740. },
  741. {
  742. key: "code",
  743. title: "订单编号",
  744. inputType: "Input",
  745. readonly: true,
  746. disabled: true,
  747. isShow:true,
  748. },
  749. {
  750. key: "billDate",
  751. title: "订单日期",
  752. inputType: "DatePicker",
  753. valueFormat: "yyyy-MM-dd",
  754. width: 200,
  755. require: true,
  756. isShow:true,
  757. },
  758. {
  759. key: "billType",
  760. title: "订单类型编号",
  761. inputType: "Input",
  762. disabled: true,
  763. isShow:true,
  764. require: true,
  765. },
  766. {
  767. key: "supplierName",
  768. title: "供应商",
  769. inputType: "PopoverSelect",
  770. valueKey: "id",
  771. referName: "SUPPLIER_PARAM",
  772. dataMapping: {
  773. supplier: "id",
  774. supplierCode:'code',
  775. supplierName: "name",
  776. paymentAgreement: 'paymentId',
  777. paymentAgreementName: 'paymentName',
  778. },
  779. queryParams: () => ({}),
  780. require: true,
  781. isShow:true,
  782. },
  783. {
  784. key: "paymentAgreementName",
  785. title: "付款协议",
  786. inputType: "PopoverSelect",
  787. valueKey: "id",
  788. referName: "PAYAGREEMENT_PARAM",
  789. dataMapping: {
  790. paymentAgreement: 'id',
  791. paymentAgreementName: 'name'
  792. },
  793. queryParams: () => ({}),
  794. isShow:true,
  795. disabled:true,
  796. require: true,
  797. },
  798. // {
  799. // key: "currencyName",
  800. // title: "币种",
  801. // inputType: "PopoverSelect",
  802. // valueKey: "id",
  803. // referName: "CURRENCY_PARAM",
  804. // dataMapping: {
  805. // currency: 'id',
  806. // currencyName: 'name'
  807. // },
  808. // queryParams: () => ({}),
  809. // width: 180,
  810. // },
  811. {
  812. key: "buyerName",
  813. title: "采购员",
  814. inputType: "PopoverSelect",
  815. valueKey: "code",
  816. referName: "CONTACTS_PARAM",
  817. dataMapping: {
  818. buyer: 'code',
  819. buyerName: 'name'
  820. },
  821. queryParams: () => ({}),
  822. require: true,
  823. isShow:true,
  824. },
  825. {
  826. key: "puDeptName",
  827. title: "采购部门",
  828. inputType: "PopoverSelect",
  829. valueKey: "id",
  830. referName: "DEPT_PARAM",
  831. dataMapping: {
  832. puDept: 'id',
  833. puDeptName: 'name'
  834. },
  835. queryParams: () => ({}),
  836. require: true,
  837. isShow:true,
  838. },
  839. { key: "isBack", title: "退货", inputType: "Input", inputType: "Checkbox", isShow:true,},
  840. { key: "freezeCause", title: "冻结原因", inputType: "Checkbox", isShow:true, },
  841. {
  842. key: "qty",
  843. title: "总数量",
  844. inputType: "InputNumber",
  845. controlsPosition: "right",
  846. isShow:true,
  847. disabled:true,
  848. },
  849. {
  850. key: "money",
  851. title: "价税合计",
  852. inputType: "InputNumber",
  853. controlsPosition: "right",
  854. // precision:2,
  855. isShow:true,
  856. disabled:true,
  857. },
  858. // {
  859. // key: "remark",
  860. // title: "备注",
  861. // inputType: "Textarea",
  862. // isShow:true,
  863. // },
  864. { key: "isMarketing", title: "已协同生成销售订单", inputType: "Checkbox", isShow:true,},
  865. { key: "isMarketingSource", title: "由销售订单协同生成", inputType: "Checkbox", isShow:true,},
  866. {
  867. key: "isInvoice",
  868. title: "发票标识",
  869. inputType: "Checkbox",
  870. isShow:true,
  871. disabled:true,
  872. },
  873. {
  874. key: "rebateMoney",
  875. title: "订单使用返利金额",
  876. inputType: "InputNumber",
  877. controlsPosition: "right",
  878. // precision:2,
  879. isShow:true,
  880. },
  881. {
  882. key: "deductionMoney",
  883. title: "订单抵扣余款金额",
  884. inputType: "InputNumber",
  885. controlsPosition: "right",
  886. // precision:2,
  887. isShow:true,
  888. },
  889. {
  890. key: "warehouseName",
  891. title: "WMS入库仓库",
  892. inputType: "PopoverSelect",
  893. valueKey: "id",
  894. referName: "WAREHOUSE_PARAM",
  895. dataMapping: {
  896. warehouse: 'id',
  897. warehouseName: 'name',
  898. },
  899. queryParams: (params) => ({
  900. pkOrg: params.puOrg,
  901. }),
  902. isShow:true,
  903. // require: true,
  904. },
  905. {
  906. key: "goodsAllocationName",
  907. title: "货位",
  908. inputType: "PopoverSelect",
  909. valueKey: "id",
  910. referName: "ALLOCATION_PARAM",
  911. dataMapping: {
  912. goodsAllocation: 'id',
  913. goodsAllocationName: 'name',
  914. },
  915. isShow:true,
  916. queryParams: (params) => ({
  917. stordocId: params.warehouse,
  918. }),
  919. width: 200,
  920. },
  921. {
  922. key: "customerDeptName",
  923. title: "客户部门",
  924. inputType: "PopoverSelect",
  925. width: 200,
  926. valueKey: "id",
  927. referName: "CUSTOMERDEPT_PARAM",
  928. dataMapping: {
  929. customerDept: 'id',
  930. customerDeptName: 'name'
  931. },
  932. isShow:true,
  933. queryParams: () => ({}),
  934. },
  935. // { key: "place", title: "收货地点", inputType: "Input", width: 180 },
  936. {
  937. key: "goodsWarehouseName",
  938. title: "收货仓库",
  939. inputType: "PopoverSelect",
  940. valueKey: "name",
  941. referName: "ADDRESS_PARAM",
  942. width: 200,
  943. isShow:true,
  944. dataMapping:{
  945. address: 'address',
  946. goodsWarehouse:'id',
  947. goodsWarehouseName:'name',
  948. contacts:'contactsName',
  949. contactsPhone:'contactsPhone'
  950. }
  951. },
  952. {
  953. key: "address",
  954. title: "收货地址",
  955. inputType: "Input",
  956. width: 180,
  957. isShow:true,
  958. disabled:true,
  959. },
  960. {
  961. key: "contacts",
  962. title: "收货联系人",
  963. inputType: "Input",
  964. isShow:true,
  965. disabled:true,
  966. },
  967. {
  968. key: "isClose",
  969. title: "最终关闭",
  970. inputType: "Checkbox",
  971. isShow:true,
  972. disabled:true,
  973. },
  974. {
  975. key: "supplierContactsName",
  976. title: "供应商业务联系人",
  977. inputType: "PopoverSelect",
  978. valueKey: "id",
  979. referName: "SUPPLIERCONTACTS_PARAM",
  980. dataMapping: {
  981. supplierContacts: 'id',
  982. supplierContactsName: 'name'
  983. },
  984. isShow:true,
  985. queryParams: (params) => ({
  986. supplierId:params.supplier
  987. }),
  988. width: 200,
  989. },
  990. {
  991. key: "isUrgency",
  992. title: "紧急程度",
  993. inputType: "Checkbox",
  994. isShow:true,
  995. disabled:true,
  996. },
  997. {
  998. key: "agentName",
  999. title: "代理人",
  1000. inputType: "PopoverSelect",
  1001. valueKey: "code",
  1002. referName: "CONTACTS_PARAM",
  1003. dataMapping: {
  1004. agent: 'code',
  1005. agentName: 'name'
  1006. },
  1007. isShow:true,
  1008. queryParams: () => ({}),
  1009. width: 200,
  1010. },
  1011. {
  1012. key: "invoiceMoney",
  1013. title: "发票金额",
  1014. inputType: "InputNumber",
  1015. controlsPosition: "right",
  1016. // precision:2,
  1017. isShow:true,
  1018. },
  1019. {
  1020. key: "closeTime",
  1021. title: "最终关闭日期",
  1022. inputType: "DatePicker",
  1023. valueFormat: "yyyy-MM-dd",
  1024. isShow:true,
  1025. disabled:true,
  1026. },
  1027. {
  1028. key: "applyPaymentMoney",
  1029. title: "累计付款申请金额",
  1030. inputType: "InputNumber",
  1031. controlsPosition: "right",
  1032. // precision:2,
  1033. isShow:true,
  1034. disabled:true,
  1035. },
  1036. {
  1037. key: "paymentMoney",
  1038. title: "累计付款金额",
  1039. inputType: "InputNumber",
  1040. controlsPosition: "right",
  1041. // precision:2,
  1042. isShow:true,
  1043. },
  1044. {
  1045. key: "supplierPersonalName",
  1046. title: "供应商业务员",
  1047. inputType: "PopoverSelect",
  1048. valueKey: "id",
  1049. // referName: "SUPPLIERCONTACTS_PARAM",
  1050. referName: "PSNLICENSE_PARAM",
  1051. dataMapping: {
  1052. supplierPersonal: 'id',
  1053. supplierPersonalName: 'name'
  1054. },
  1055. isShow:true,
  1056. queryParams: (params) => ({
  1057. // 组织、供应商id
  1058. pkOrg: params.puOrg,
  1059. supplierId:params.supplier
  1060. }),
  1061. },
  1062. {
  1063. key: "isSendSrm",
  1064. title: "是否同步SRM",
  1065. inputType: "Checkbox",
  1066. isShow:true,
  1067. },
  1068. {
  1069. key: "oaDemandNo",
  1070. title: "OA需求单号",
  1071. inputType: "Input",
  1072. isShow:true,
  1073. },
  1074. {
  1075. key: "remark",
  1076. title: "备注",
  1077. inputType: "Textarea",
  1078. isShow:true,
  1079. },
  1080. ];
  1081. const CauseTabColumns =[
  1082. {
  1083. title: '物料信息',
  1084. key: 'puOrderItemList',
  1085. tableColumns: [
  1086. {
  1087. key: "customerName",
  1088. title: "收货客户",
  1089. inputType: "PopoverSelect",
  1090. valueKey: "id",
  1091. referName: "CUSTOMER_PARAM",
  1092. width: 180,
  1093. dataMapping:{
  1094. customer:'id',
  1095. customerName:'name',
  1096. },
  1097. },
  1098. {
  1099. key: "rowNo",
  1100. title: "行号",
  1101. inputType: "Input",
  1102. disabled:true,
  1103. require:false,
  1104. },
  1105. {
  1106. key: "materialName",
  1107. title: "物料",
  1108. inputType: "PopoverSelect",
  1109. width: 180,
  1110. require: true,
  1111. valueKey: "id",
  1112. referName: "MATERIAL_PARAM",
  1113. dataMapping: {
  1114. material: "id",
  1115. materialName: "name",
  1116. materialCode: "code",
  1117. // materialClassify:'classifyIdName',
  1118. materialManufacturersCode:'manufacturersMaterialCode',
  1119. specification:'specification',
  1120. model:'model',
  1121. isMedcine:'isMedicineYN',
  1122. manufacturer:'manufacturerId',
  1123. manufacturerName:'manufacturerIdName',
  1124. unit:'unitId',
  1125. unitName:'unitIdName',
  1126. // tax:'materialRateName',
  1127. storageCondition:'storageCondition',
  1128. carriageCondition:'transportationCondition',
  1129. materialClassifyOneName:'oneClass',
  1130. materialClassifyTwoName:'twoClass',
  1131. materialClassifyThreeName:'threeClass',
  1132. materialClassifyFourName:'fourClass',
  1133. registration:'registrationNo',
  1134. isDrug:'isDrug',
  1135. rateCode: "materialRateName",
  1136. },
  1137. queryParams: () => ({}),
  1138. },
  1139. {
  1140. key: "materialCode",
  1141. title: "物料编码",
  1142. inputType: "Input",
  1143. require: true,
  1144. width: 180,
  1145. disabled:true,
  1146. readonly:true,
  1147. },
  1148. { //specification
  1149. key: "specification",
  1150. title: "规格",
  1151. inputType: "Input",
  1152. width: 180 ,
  1153. disabled:true,
  1154. readonly:true,
  1155. },
  1156. { //model
  1157. key: "model",
  1158. title: "型号",
  1159. inputType: "Input",
  1160. disabled:true,
  1161. readonly:true,
  1162. },
  1163. { //isMedicine isMedicineValue
  1164. key: "isMedcine",
  1165. title: "医药物料",
  1166. inputType: "Checkbox",
  1167. disabled:true,
  1168. readonly:true,
  1169. },
  1170. { //unitId unitIdName
  1171. key: "unitName",
  1172. title: "主单位",
  1173. inputType: "Input",
  1174. disabled:true,
  1175. readonly:true,
  1176. },
  1177. {
  1178. key: "qty",
  1179. title: "主数量",
  1180. inputType: "InputNumber",
  1181. controlsPosition: "right",
  1182. width: 120,
  1183. require: true,
  1184. isSummary:true,
  1185. },
  1186. {
  1187. key: "taxPrice",
  1188. title: "主含税单价",
  1189. inputType: "InputNumber",
  1190. controlsPosition: "right",
  1191. // precision:2,
  1192. require: true,
  1193. width: 180,
  1194. },
  1195. { //unitId unitIdName
  1196. key: "unitName",
  1197. title: "单位",
  1198. inputType: "Input",
  1199. disabled:true,
  1200. readonly:true,
  1201. require: true,
  1202. },
  1203. {
  1204. key: "qty",
  1205. title: "数量",
  1206. inputType: "InputNumber",
  1207. controlsPosition: "right",
  1208. width: 120,
  1209. isSummary:true,
  1210. },
  1211. {
  1212. key: "taxPrice",
  1213. title: "含税单价",
  1214. inputType: "InputNumber",
  1215. controlsPosition: "right",
  1216. // precision:2,
  1217. width: 180,
  1218. },
  1219. {
  1220. key: "money",
  1221. title: "价税合计",
  1222. inputType: "InputNumber",
  1223. controlsPosition: "right",
  1224. // precision:2,
  1225. disabled:true,
  1226. width: 180,
  1227. isSummary:true,
  1228. },
  1229. {
  1230. key: "ntaxnetprice",
  1231. title: "含税净价",
  1232. inputType: "Input",
  1233. controlsPosition: "right",
  1234. // precision:2,
  1235. disabled:true,
  1236. width: 180,
  1237. },
  1238. { //materialRate materialRateName
  1239. key: "tax",
  1240. title: "税率",
  1241. // inputType: "Input",
  1242. inputType: "InputNumber",
  1243. controlsPosition: "right",
  1244. // precision:2,
  1245. disabled:true,
  1246. require: true,
  1247. width: 180,
  1248. },
  1249. {
  1250. key: "taxDeductClassify",
  1251. title: "扣税类别",
  1252. inputType: "Select",
  1253. referName: "tax_deduction_category", // 字典名
  1254. width: 180,
  1255. require: true,
  1256. },
  1257. {
  1258. key: "exchangeRate",
  1259. title: "折本汇率",
  1260. inputType: "Input",
  1261. disabled:true,
  1262. width: 180,
  1263. require: true,
  1264. },
  1265. {
  1266. key: "nitemdiscountrate",
  1267. title: "折扣(%)",
  1268. inputType: "Input",
  1269. // precision:2,
  1270. disabled:true,
  1271. width: 180,
  1272. require: true,
  1273. },
  1274. {
  1275. key: "taxDeductMoneya",
  1276. title: "折扣金额",
  1277. inputType: "InputNumber",
  1278. controlsPosition: "right",
  1279. require: true,
  1280. // precision:2,
  1281. disabled:true,
  1282. width: 180,
  1283. isSummary:true,
  1284. },
  1285. {
  1286. key: "goodsWarehouseName",
  1287. title: "收货仓库",
  1288. inputType: "Input",
  1289. width: 200,
  1290. disabled:true,
  1291. },
  1292. { key: "productBatch", title: "产品批号", inputType: "Input", width: 180 },
  1293. {
  1294. key: "registration",
  1295. title: "注册证号",
  1296. inputType: "Input",
  1297. width: 180 ,
  1298. disabled:true,
  1299. },
  1300. { key: "isStorage", title: "入库关闭", inputType: "Checkbox", disabled:true, },
  1301. { key: "isInvoice", title: "开票关闭", inputType: "Checkbox", disabled:true, },
  1302. { key: "isArrival", title: "到货关闭", inputType: "Checkbox", disabled:true,},
  1303. { key: "isPayment", title: "付款关闭", inputType: "Checkbox", disabled:true, },
  1304. { key: "isGift", title: "赠品", inputType: "Checkbox", },
  1305. { //storageCondition storageConditionName
  1306. key: "storageCondition",
  1307. title: "存储条件",
  1308. inputType: "Select",
  1309. referName: "sys_storage_condition", // 字典名
  1310. width: 180,
  1311. disabled:true,
  1312. readonly:true,
  1313. },
  1314. { // transportationCondition transportationConditionName
  1315. key: "carriageCondition",
  1316. title: "运输条件",
  1317. inputType: "Select",
  1318. referName: "sys_conditions_carriage", // 字典名
  1319. width: 180,
  1320. disabled:true,
  1321. readonly:true,
  1322. },
  1323. {
  1324. key: "originalQty",
  1325. title: "原始数量",
  1326. inputType: "InputNumber",
  1327. controlsPosition: "right",
  1328. disabled:true,
  1329. width: 180 ,
  1330. isSummary:true,
  1331. },
  1332. {
  1333. key: "originalMoney",
  1334. title: "原始金额",
  1335. inputType: "InputNumber",
  1336. controlsPosition: "right",
  1337. // precision:2,
  1338. disabled:true,
  1339. width: 180,
  1340. isSummary:true,
  1341. },
  1342. { key: "discountRule", title: "折扣规则编码", inputType: "Input", width: 180 },
  1343. { key: "demandCode", title: "采购需求单号", inputType: "Input", width: 180 },
  1344. { key: "remark", title: "备注", inputType: "Input", width: 200 },
  1345. ]
  1346. },
  1347. {
  1348. title: '执行结果',
  1349. key: 'puOrderExecuteList',
  1350. tableColumns: [
  1351. // { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
  1352. {
  1353. key: "rowno",
  1354. title: "行号",
  1355. inputType: "Input",
  1356. disabled:true,
  1357. require:false,
  1358. },
  1359. {
  1360. key: "materialName",
  1361. title: "物料",
  1362. inputType: "PopoverSelect",
  1363. width: 180,
  1364. require: true,
  1365. valueKey: "id",
  1366. referName: "MATERIAL_PARAM",
  1367. dataMapping: {
  1368. material: "id",
  1369. materialName: "name",
  1370. materialCode: "code",
  1371. // materialClassify:'classifyIdName',
  1372. materialManufacturersCode:'manufacturersMaterialCode',
  1373. specification:'specification',
  1374. model:'model',
  1375. isMedcine:'isMedicine',
  1376. manufacturer:'manufacturerId',
  1377. manufacturerName:'manufacturerIdName',
  1378. unit:'unitId',
  1379. unitName:'unitIdName',
  1380. // tax:'materialRateName',
  1381. storageCondition:'storageCondition',
  1382. carriageCondition:'transportationCondition',
  1383. materialClassifyOneName:'oneClass',
  1384. materialClassifyTwoName:'twoClass',
  1385. materialClassifyThreeName:'threeClass',
  1386. materialClassifyFourName:'fourClass',
  1387. registration:'registrationNo',
  1388. isDrug:'isDrug',
  1389. },
  1390. queryParams: () => ({}),
  1391. width:180,
  1392. },
  1393. {
  1394. key: "specification",
  1395. title: "规格",
  1396. inputType: "Input",
  1397. disabled:true,
  1398. readonly:true,
  1399. },
  1400. {
  1401. key: "qty",
  1402. title: "数量",
  1403. inputType: "InputNumber",
  1404. controlsPosition: "right",
  1405. width: 180,
  1406. require: true,
  1407. isSummary:true,
  1408. },
  1409. {
  1410. key: "stroageQty",
  1411. title: "累计到货主数量",
  1412. inputType: "InputNumber",
  1413. controlsPosition: "right",
  1414. width: 180,
  1415. isSummary:true,
  1416. },
  1417. {
  1418. key: "stockQty",
  1419. title: "累计入库主数量",
  1420. inputType: "InputNumber",
  1421. controlsPosition: "right",
  1422. width: 180,
  1423. isSummary:true,
  1424. },
  1425. {
  1426. key: "invoiceQty",
  1427. title: "累计开票主数量",
  1428. inputType: "InputNumber",
  1429. controlsPosition: "right",
  1430. width: 180,
  1431. isSummary:true,
  1432. },
  1433. {
  1434. key: "rollbackQty",
  1435. title: "累计退货主数量",
  1436. inputType: "InputNumber",
  1437. controlsPosition: "right",
  1438. width: 180,
  1439. isSummary:true,
  1440. },
  1441. {
  1442. key: "backStockQty",
  1443. title: "累计退库主数量",
  1444. inputType: "InputNumber",
  1445. controlsPosition: "right",
  1446. width: 180,
  1447. isSummary:true,
  1448. },
  1449. {
  1450. key: "floatQty",
  1451. title: "未到货数量",
  1452. inputType: "InputNumber",
  1453. controlsPosition: "right",
  1454. width: 180,
  1455. isSummary:true,
  1456. },
  1457. // {
  1458. // key: "createByName",
  1459. // title: "创建人",
  1460. // inputType: "Input",
  1461. // width: 120
  1462. // },
  1463. // {
  1464. // key: "updateByName",
  1465. // title: "更新人",
  1466. // inputType: "Input",
  1467. // width: 120
  1468. // },
  1469. ]
  1470. },
  1471. ];
  1472. // export const initTabColumns = () => tabColumns;
  1473. export default function judgeColumns () {
  1474. let Columns = _.cloneDeep(PurColumns);
  1475. let TabColumns = _.cloneDeep(PurchaseTabColumns);
  1476. let roles = Cookies.get('roles').split(',');
  1477. let role = roles.find(item => item === "syfz-purchaseorder") || "procurementManager";
  1478. if(role === "syfz-purchaseorder"){
  1479. // 事业发展部
  1480. Columns = _.cloneDeep(CauseColumns);
  1481. TabColumns = _.cloneDeep(CauseTabColumns);
  1482. }
  1483. return {Columns,TabColumns}
  1484. }