column.js 37 KB

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