column.js 36 KB

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