approvedOutsourcingAll.jsx 105 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import "./public.less";
  5. import {
  6. Button,
  7. Form,
  8. Input,
  9. Select,
  10. Spin,
  11. Table,
  12. message,
  13. DatePicker,
  14. Modal,
  15. Upload,
  16. Tabs,
  17. Col,
  18. Tag
  19. } from "antd";
  20. import Receivable from "./receivable";
  21. import Assign from "@/manageCenter/publicComponent/assign";
  22. import ReactToPrint from "react-to-print";
  23. import OrderRiZi from "@/orderRiZi.jsx";
  24. import {
  25. getjiedian,
  26. getProcessStatus,
  27. getApproval,
  28. getNewOrderType,
  29. getLiquidationStatus,
  30. getProjectStatus,
  31. splitUrl,
  32. getprovince,
  33. getRefundStatus,
  34. getTransactionProject,
  35. getTaskStatus,
  36. getNewOrderStatus,
  37. getInvoiceStatus,
  38. getCuikuan
  39. } from "@/tools";
  40. import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
  41. const FormItem = Form.Item;
  42. const approvedOutsourcing = React.createClass({
  43. departmentList() {
  44. this.setState({
  45. loading: true
  46. });
  47. $.ajax({
  48. method: "get",
  49. dataType: "json",
  50. crossDomain: false,
  51. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  52. data: {},
  53. success: function(data) {
  54. let thedata = data.data;
  55. let theArr = [];
  56. if (!thedata) {
  57. if (data.error && data.error.length) {
  58. message.warning(data.error[0].message);
  59. }
  60. } else {
  61. thedata.map(function(item, index) {
  62. theArr.push({
  63. key: index,
  64. name: item.name,
  65. id: item.id
  66. });
  67. });
  68. }
  69. this.setState({
  70. departmentArr: theArr
  71. });
  72. }.bind(this)
  73. }).always(
  74. function() {
  75. this.setState({
  76. loading: false
  77. });
  78. }.bind(this)
  79. );
  80. },
  81. loadData(pageNo, pageSize) {
  82. this.state.data = [];
  83. this.setState({
  84. page: pageNo,
  85. loadingA: true
  86. });
  87. $.ajax({
  88. method: "get",
  89. dataType: "json",
  90. crossDomain: false,
  91. url: globalConfig.context + "/api/admin/financial/financeList",
  92. data: {
  93. pageNo: pageNo || 1,
  94. pageSize: pageSize || this.state.pagination.pageSize,
  95. buyerName: this.state.nameSearch, //客户名称
  96. orderNo: this.state.orderNoSearch,
  97. startTime: this.state.releaseDate[0],
  98. endTime: this.state.releaseDate[1],
  99. startFinalReceivablesTime: this.state.shouKuanDate[0],
  100. endFinalReceivablesTime: this.state.shouKuanDate[1],
  101. departmentId: this.state.departmenttList,
  102. processStatus: this.state.processStatusSearch,
  103. contractNo: this.state.contractNoSearch,
  104. outsource: 1,
  105. liquidationStatus: this.state.liquidationStatus
  106. },
  107. success: function(data) {
  108. let theArr = [];
  109. if (!data.data || !data.data.pagination.list) {
  110. if (data.error && data.error.length) {
  111. message.warning(data.error[0].message);
  112. }
  113. } else {
  114. for (let i = 0; i < data.data.pagination.list.length; i++) {
  115. let thisdata = data.data.pagination.list[i];
  116. theArr.push({
  117. key: thisdata.orderNo,
  118. orderNo: thisdata.orderNo,
  119. orderType: thisdata.orderType,
  120. orderStatus: thisdata.orderStatus,
  121. sellerName: thisdata.sellerName,
  122. processStatus: thisdata.processStatus,
  123. liquidationStatus: thisdata.liquidationStatus,
  124. approval: thisdata.approval,
  125. buyerName: thisdata.buyerName,
  126. actuallyTotalAmount: thisdata.actuallyTotalAmount,
  127. signTime: thisdata.signTime,
  128. companyId: thisdata.companyId,
  129. companyName: thisdata.companyName,
  130. buyerId: thisdata.buyerId,
  131. buyerName: thisdata.buyerName,
  132. contractNo: thisdata.contractNo,
  133. createTime: thisdata.createTime,
  134. departmentName: thisdata.departmentName,
  135. outsourceName: thisdata.outsourceName,
  136. invoiceAmount: thisdata.invoiceAmount,
  137. finalReceivables: thisdata.finalReceivables,
  138. finalReceivablesTime: thisdata.finalReceivablesTime,
  139. signTotalAmount: thisdata.signTotalAmount,
  140. outsourceAmount: thisdata.outsourceAmount,
  141. financeName: thisdata.financeName,
  142. outsourceAmount: thisdata.outsourceAmount
  143. });
  144. }
  145. }
  146. this.state.pagination.current = data.data.pagination.pageNo;
  147. this.state.pagination.total = data.data.pagination.totalCount;
  148. if (
  149. data.data &&
  150. data.data.pagination.list &&
  151. !data.data.pagination.list.length
  152. ) {
  153. this.state.pagination.current = 0;
  154. this.state.pagination.total = 0;
  155. }
  156. this.setState({
  157. totalPage: data.data.pagination.totalPage,
  158. dataSource: theArr,
  159. pagination: this.state.pagination,
  160. totalHui: data.data.count ? data.data.count.signTotalAmount : 0,
  161. hui: data.data.count ? data.data.count.actuallyTotalAmount : 0
  162. });
  163. }.bind(this)
  164. }).always(
  165. function() {
  166. this.setState({
  167. loadingA: false
  168. });
  169. }.bind(this)
  170. );
  171. },
  172. getInitialState() {
  173. return {
  174. rotateDeg: 0,
  175. searchMore: true,
  176. assignVisibleX: false,
  177. assignVisibleY: false,
  178. releaseDate: [],
  179. shouKuanDate: [],
  180. assignDataX: [],
  181. assignDataY: [],
  182. attachmentUrl: [],
  183. pictureUrl: [],
  184. totalPage: 0,
  185. modKey: "1",
  186. width: "800px",
  187. boHuivisible: false,
  188. selectedRowKeys: [],
  189. selectedRows: [],
  190. loading: false,
  191. pagination: {
  192. defaultCurrent: 1,
  193. defaultPageSize: 10,
  194. showQuickJumper: true,
  195. pageSize: 10,
  196. onChange: function(page) {
  197. this.loadData(page);
  198. }.bind(this),
  199. showTotal: function(total) {
  200. return "共" + total + "条数据";
  201. }
  202. },
  203. loadingA: false,
  204. // 子组件改变的表格title数组
  205. changeList: undefined,
  206. columns: [
  207. {
  208. title: "合同编号",
  209. dataIndex: "contractNo",
  210. key: "contractNo",
  211. className: "title-table"
  212. },
  213. {
  214. title: "订单编号",
  215. dataIndex: "orderNo",
  216. key: "orderNo",
  217. className: "title-table"
  218. // fixed: "left"
  219. },
  220. {
  221. title: "特批状态",
  222. dataIndex: "approval",
  223. key: "approval",
  224. className: "title-table",
  225. render: text => {
  226. if (text == 1 || text == 2) {
  227. return <Tag color="#f50">{getApproval(text)}</Tag>;
  228. }
  229. return getApproval(text);
  230. }
  231. },
  232. {
  233. title: "客户名称",
  234. dataIndex: "buyerName",
  235. key: "buyerName",
  236. className: "title-table"
  237. },
  238. {
  239. title: "订单部门",
  240. dataIndex: "departmentName",
  241. key: "departmentName",
  242. className: "title-table"
  243. },
  244. {
  245. title: "订单负责人",
  246. dataIndex: "sellerName",
  247. key: "sellerName",
  248. className: "title-table"
  249. },
  250. {
  251. title: "财务负责人",
  252. dataIndex: "financeName",
  253. key: "financeName",
  254. className: "title-table"
  255. },
  256. {
  257. title: "外包公司",
  258. dataIndex: "outsourceName",
  259. key: "outsourceName",
  260. className: "title-table"
  261. },
  262. {
  263. title: "外包成本",
  264. dataIndex: "outsourceAmount",
  265. key: "outsourceAmount",
  266. className: "title-table"
  267. },
  268. {
  269. title: "签单日期",
  270. dataIndex: "signTime",
  271. key: "signTime",
  272. className: "title-table"
  273. },
  274. {
  275. title: "下单日期",
  276. dataIndex: "createTime",
  277. key: "createTime",
  278. className: "title-table"
  279. },
  280. {
  281. title: "签单金额(万元)",
  282. dataIndex: "signTotalAmount",
  283. key: "signTotalAmount",
  284. className: "title-table"
  285. },
  286. {
  287. title: "开票金额(万元)",
  288. dataIndex: "invoiceAmount",
  289. key: "invoiceAmount",
  290. className: "title-table"
  291. },
  292. {
  293. title: "已收款(万元)",
  294. dataIndex: "actuallyTotalAmount",
  295. key: "actuallyTotalAmount",
  296. className: "title-table"
  297. },
  298. {
  299. title: "最近收款(万元)",
  300. dataIndex: "finalReceivables",
  301. key: "finalReceivables",
  302. className: "title-table"
  303. },
  304. {
  305. title: "最近收款时间",
  306. dataIndex: "finalReceivablesTime",
  307. key: "finalReceivablesTime",
  308. className: "title-table"
  309. },
  310. {
  311. title: "结算状态",
  312. dataIndex: "liquidationStatus",
  313. key: "liquidationStatus",
  314. className: "title-table",
  315. render: text => {
  316. return getLiquidationStatus(text);
  317. }
  318. },
  319. {
  320. title: "流程状态",
  321. dataIndex: "processStatus",
  322. key: "processStatus",
  323. className: "title-table",
  324. render: text => {
  325. return getProcessStatus(text);
  326. }
  327. },
  328. // {
  329. // title: "操作",
  330. // dataIndex: "caozuo",
  331. // key: "caouzo",
  332. // className: "title-table",
  333. // render: (text, recard) => {
  334. // return (
  335. // <div>
  336. // {recard.liquidationStatus < 2 &&
  337. // (recard.approval === 1 || recard.approval === 2) ? (
  338. // <Button
  339. // style={{ background: "rgb(192,192,192)" }}
  340. // onClick={e => {
  341. // e.stopPropagation(), this.evaluateX(recard);
  342. // }}
  343. // >
  344. // 收款
  345. // </Button>
  346. // ) : (
  347. // <Button
  348. // type="primary"
  349. // onClick={e => {
  350. // e.stopPropagation(), this.evaluateX(recard);
  351. // }}
  352. // >
  353. // 收款
  354. // </Button>
  355. // )}
  356. // {recard.processStatus < 4 ? (
  357. // <Button
  358. // type="primary"
  359. // onClick={e => {
  360. // e.stopPropagation(), this.evaluateZ(recard);
  361. // }}
  362. // style={{ marginLeft: "5px" }}
  363. // >
  364. // 通过
  365. // </Button>
  366. // ) : (
  367. // ""
  368. // )}
  369. // {!(
  370. // recard.actuallyTotalAmount &&
  371. // Number(recard.actuallyTotalAmount) > 0
  372. // ) && (
  373. // <Button
  374. // type="danger"
  375. // style={{ marginLeft: "5px" }}
  376. // onClick={e => {
  377. // e.stopPropagation(), this.reject(recard);
  378. // }}
  379. // >
  380. // 驳回
  381. // </Button>
  382. // )}
  383. // {
  384. // // <Button
  385. // // type="primary"
  386. // // style={{ marginLeft: "5px" }}
  387. // // onClick={e => {
  388. // // e.stopPropagation(), this.evaluateY(recard, "财务专员");
  389. // // console.log(recard);
  390. // // }}
  391. // // >
  392. // // 转交
  393. // // </Button>
  394. // }
  395. // </div>
  396. // );
  397. // }
  398. // }
  399. ],
  400. ContactsListsNew: [
  401. {
  402. title: "项目名称",
  403. dataIndex: "commodityName",
  404. key: "commodityName",
  405. render: text => {
  406. return <span>{text}</span>;
  407. }
  408. },
  409. {
  410. title: "项目分类",
  411. dataIndex: "projectType",
  412. key: "projectType",
  413. render: text => {
  414. let arr = this.state.dataSourceX || [];
  415. let str = "";
  416. for (let i = 0; i < arr.length; i++) {
  417. if (this.state.dataSourceX[i].sort == text) {
  418. str = this.state.dataSourceX[i].cname;
  419. return <span>{str}</span>;
  420. }
  421. }
  422. }
  423. },
  424. {
  425. title: "催款科目",
  426. dataIndex: "dunTypeName",
  427. key: "dunTypeName",
  428. render: text => {
  429. return <span>{text}</span>;
  430. }
  431. },
  432. {
  433. title: "时间(天)",
  434. dataIndex: "waitDay",
  435. key: "waitDay",
  436. render: (text, record) => {
  437. if (record.dunTypeName) {
  438. return <span>{text}</span>;
  439. }
  440. }
  441. },
  442. {
  443. title: "金额(万元)",
  444. dataIndex: "money",
  445. key: "money",
  446. render: (text, record) => {
  447. if (record.dunTypeName) {
  448. if (record.appropriationRatio && !record.money) {
  449. return <span>{record.appropriationRatio}(拨款比例)</span>;
  450. } else if (record.appropriationRatio && record.money) {
  451. return (
  452. <span>
  453. {text}(比例:{record.appropriationRatio})
  454. </span>
  455. );
  456. } else {
  457. return <span>{text}</span>;
  458. }
  459. }
  460. }
  461. },
  462. {
  463. title: "服务年限",
  464. dataIndex: "startDate",
  465. key: "startDate",
  466. render: (text, record) => {
  467. if (record.dunTypeName) {
  468. return <span>{text}</span>;
  469. }
  470. }
  471. },
  472. {
  473. title: "催款状态",
  474. dataIndex: "status",
  475. key: "status",
  476. render: text => {
  477. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  478. }
  479. }
  480. ],
  481. ContactsLists: [
  482. {
  483. title: "催款科目",
  484. dataIndex: "dunSubject",
  485. key: "dunSubject",
  486. render: text => {
  487. return getjiedian(text);
  488. }
  489. },
  490. {
  491. title: "金额(万元)",
  492. dataIndex: "money",
  493. key: "money"
  494. },
  495. {
  496. title: "催款状态",
  497. dataIndex: "dunStatus",
  498. key: "dunStatus",
  499. render: text => {
  500. return getCuikuan(text);
  501. }
  502. }
  503. ],
  504. proColumns: [
  505. {
  506. title: "序号",
  507. dataIndex: "key",
  508. key: "key"
  509. },
  510. {
  511. title: "合同编号",
  512. dataIndex: "contractNo",
  513. key: "contractNo"
  514. },
  515. {
  516. title: "订单编号",
  517. dataIndex: "orderNo",
  518. key: "orderNo"
  519. },
  520. {
  521. title: "客户名称",
  522. dataIndex: "userName",
  523. key: "userName"
  524. },
  525. {
  526. title: "订单负责人",
  527. dataIndex: "salesmanName",
  528. key: "salesmanName"
  529. },
  530. {
  531. title: "是否主项目",
  532. dataIndex: "main",
  533. key: "main",
  534. render: text => {
  535. return text == 0 ? "否" : "是";
  536. }
  537. },
  538. {
  539. title: "项目类别",
  540. dataIndex: "cname",
  541. key: "cname"
  542. },
  543. {
  544. title: "项目名称",
  545. dataIndex: "commodityName",
  546. key: "commodityName"
  547. },
  548. {
  549. title: "项目数量",
  550. dataIndex: "commodityQuantity",
  551. key: "commodityQuantity"
  552. },
  553. {
  554. title: "服务市价",
  555. dataIndex: "commodityPrice",
  556. key: "commodityPrice"
  557. },
  558. {
  559. title: "证书编号",
  560. dataIndex: "certificateNumber",
  561. key: "certificateNumber"
  562. },
  563. {
  564. title: "项目状态",
  565. dataIndex: "projectStatus",
  566. key: "projectStatus",
  567. render: text => {
  568. return getProjectStatus(text);
  569. }
  570. },
  571. {
  572. title: "项目说明",
  573. dataIndex: "taskComment",
  574. key: "taskComment"
  575. },
  576. {
  577. title: "外包(内部)公司",
  578. dataIndex: "outsourceName",
  579. key: "outsourceName"
  580. },
  581. {
  582. title: "外包(内部)价格",
  583. dataIndex: "outsourcePrice",
  584. key: "outsourcePrice"
  585. }
  586. ],
  587. cuiColumns: [
  588. {
  589. title: "序号",
  590. dataIndex: "key",
  591. key: "key"
  592. },
  593. {
  594. title: "合同编号",
  595. dataIndex: "contractNo",
  596. key: "contractNo"
  597. },
  598. {
  599. title: "订单编号",
  600. dataIndex: "orderNo",
  601. key: "orderNo"
  602. },
  603. {
  604. title: "客户名称",
  605. dataIndex: "userName",
  606. key: "userName"
  607. },
  608. {
  609. title: "订单负责人",
  610. dataIndex: "salesmanName",
  611. key: "salesmanName"
  612. },
  613. {
  614. title: "订单部门",
  615. dataIndex: "depName",
  616. key: "depName"
  617. },
  618. {
  619. title: "订单状态",
  620. dataIndex: "orderStatus",
  621. key: "orderStatus",
  622. render: text => {
  623. return getNewOrderStatus(text);
  624. }
  625. },
  626. {
  627. title: "项目状态",
  628. dataIndex: "projectStatus",
  629. key: "projectStatus",
  630. render: text => {
  631. return getProjectStatus(text);
  632. }
  633. },
  634. {
  635. title: "签单金额",
  636. dataIndex: "totalAmount",
  637. key: "totalAmount"
  638. },
  639. {
  640. title: "结算状态",
  641. dataIndex: "liquidationStatus",
  642. key: "liquidationStatus",
  643. render: text => {
  644. return getLiquidationStatus(text);
  645. }
  646. },
  647. {
  648. title: "已收款",
  649. dataIndex: "settlementAmount",
  650. key: "settlementAmount"
  651. },
  652. {
  653. title: "应收款",
  654. dataIndex: "accountsReceivable",
  655. key: "accountsReceivable"
  656. },
  657. {
  658. title: "催收科目",
  659. dataIndex: "dunSubject",
  660. key: "dunSubject"
  661. // render: text => {
  662. // return getjiedian(text);
  663. // }
  664. },
  665. {
  666. title: "催款状态",
  667. dataIndex: "dunStatus",
  668. key: "dunStatus"
  669. },
  670. {
  671. title: "催收启动时间",
  672. dataIndex: "startDate",
  673. key: "startDate"
  674. }
  675. ],
  676. timeColumns: [
  677. {
  678. title: "合同编号",
  679. dataIndex: "contractNo",
  680. key: "contractNo"
  681. },
  682. {
  683. title: "订单编号",
  684. dataIndex: "orderNo",
  685. key: "orderNo"
  686. },
  687. {
  688. title: "客户名称",
  689. dataIndex: "userName",
  690. key: "userName",
  691. render: text => {
  692. return text && text.length > 9 ? text.substr(0, 9) + "..." : text;
  693. }
  694. },
  695. {
  696. title: "订单部门",
  697. dataIndex: "depName",
  698. key: "depName"
  699. },
  700. {
  701. title: "订单负责人",
  702. dataIndex: "salesmanName",
  703. key: "salesmanName"
  704. },
  705. {
  706. title: "项目类别",
  707. dataIndex: "cname",
  708. key: "cname"
  709. },
  710. {
  711. title: "项目编号",
  712. dataIndex: "id",
  713. key: "id"
  714. },
  715. {
  716. title: "项目名称",
  717. dataIndex: "taskName",
  718. key: "taskName"
  719. },
  720. {
  721. title: "项目负责人",
  722. dataIndex: "receiverName",
  723. key: "receiverName"
  724. },
  725. {
  726. title: "项目价格(万元)",
  727. dataIndex: "commodityPrice",
  728. key: "commodityPrice"
  729. },
  730. {
  731. title: "数量(个)",
  732. dataIndex: "commodityQuantity",
  733. key: "commodityQuantity"
  734. },
  735. {
  736. title: "任务状态",
  737. dataIndex: "taskStatus",
  738. key: "taskStatus",
  739. render: text => {
  740. return getTaskStatus(text);
  741. }
  742. },
  743. {
  744. title: "项目状态",
  745. dataIndex: "projectStatus",
  746. key: "projectStatus",
  747. render: text => {
  748. return getProjectStatus(text);
  749. }
  750. },
  751. {
  752. title: "工时",
  753. dataIndex: "hours",
  754. key: "hours"
  755. },
  756. {
  757. title: "签单日期",
  758. dataIndex: "signTime",
  759. key: "signTime"
  760. },
  761. {
  762. title: "派单日期",
  763. dataIndex: "creteTime",
  764. key: "creteTime"
  765. },
  766. {
  767. title: "分配时间",
  768. dataIndex: "taskDistributionTime",
  769. key: "taskDistributionTime"
  770. },
  771. {
  772. title: "完成时间",
  773. dataIndex: "taskEndTime",
  774. key: "taskEndTime"
  775. }
  776. ],
  777. printColumns: [
  778. {
  779. title: "合同编号",
  780. dataIndex: "contractNo",
  781. key: "contractNo"
  782. },
  783. {
  784. title: "订单编号",
  785. dataIndex: "orderNo",
  786. key: "orderNo"
  787. // fixed: "left"
  788. },
  789. {
  790. title: "客户名称",
  791. dataIndex: "buyerName",
  792. key: "buyerName"
  793. },
  794. {
  795. title: "订单部门",
  796. dataIndex: "departmentName",
  797. key: "departmentName"
  798. },
  799. {
  800. title: "订单负责人",
  801. dataIndex: "sellerName",
  802. key: "sellerName"
  803. },
  804. {
  805. title: "签单日期",
  806. dataIndex: "signTime",
  807. key: "signTime"
  808. },
  809. {
  810. title: "下单日期",
  811. dataIndex: "createTime",
  812. key: "createTime"
  813. },
  814. {
  815. title: "签单金额(万元)",
  816. dataIndex: "signTotalAmount",
  817. key: "signTotalAmount"
  818. },
  819. {
  820. title: "开票金额(万元)",
  821. dataIndex: "invoiceAmount",
  822. key: "invoiceAmount"
  823. },
  824. {
  825. title: "已收款(万元)",
  826. dataIndex: "actuallyTotalAmount",
  827. key: "actuallyTotalAmount"
  828. },
  829. {
  830. title: "最近收款(万元)",
  831. dataIndex: "finalReceivables",
  832. key: "finalReceivables"
  833. },
  834. {
  835. title: "最近收款时间",
  836. dataIndex: "finalReceivablesTime",
  837. key: "finalReceivablesTime"
  838. },
  839. {
  840. title: "结算状态",
  841. dataIndex: "liquidationStatus",
  842. key: "liquidationStatus",
  843. render: text => {
  844. return getLiquidationStatus(text);
  845. }
  846. },
  847. {
  848. title: "流程状态",
  849. dataIndex: "processStatus",
  850. key: "processStatus",
  851. render: text => {
  852. return getProcessStatus(text);
  853. }
  854. },
  855. {
  856. title: "特批状态",
  857. dataIndex: "approval",
  858. key: "approval",
  859. render: text => {
  860. return getApproval(text);
  861. }
  862. }
  863. ],
  864. columnsX: [
  865. {
  866. title: "业务项目名称",
  867. dataIndex: "commodityName",
  868. key: "commodityName",
  869. render: text => {
  870. return text && text.length > 6 ? (
  871. <span title={text}>{text.substr(0, 8)}...</span>
  872. ) : (
  873. text
  874. );
  875. }
  876. },
  877. {
  878. title: "项目类别",
  879. dataIndex: "cname",
  880. key: "cname"
  881. },
  882. {
  883. title: "项目数量(个)",
  884. dataIndex: "commodityQuantity",
  885. key: "commodityQuantity"
  886. },
  887. {
  888. title: "服务市价(万元)",
  889. dataIndex: "commodityPrice",
  890. key: "commodityPrice"
  891. },
  892. {
  893. title: "项目状态",
  894. dataIndex: "projectStatus",
  895. key: "projectStatus",
  896. render: text => {
  897. return getProjectStatus(text);
  898. }
  899. },
  900. {
  901. title: "证书编号",
  902. dataIndex: "certificateNumber",
  903. key: "certificateNumber"
  904. },
  905. {
  906. title: "是否主要项目",
  907. dataIndex: "main",
  908. key: "main",
  909. render: text => {
  910. return text ? "是" : "否";
  911. }
  912. },
  913. {
  914. title: "项目说明",
  915. dataIndex: "taskComment",
  916. key: "taskComment",
  917. render: text => {
  918. return text && text.length > 8 ? (
  919. <span title={text}>{text.substr(0, 8)}...</span>
  920. ) : (
  921. text
  922. );
  923. }
  924. }
  925. ],
  926. columnsDate: [
  927. {
  928. title: "编号",
  929. dataIndex: "id",
  930. key: "id"
  931. },
  932. {
  933. title: "订单编号",
  934. dataIndex: "orderno",
  935. key: "orderno"
  936. },
  937. {
  938. title: "开票金额(万元)",
  939. dataIndex: "amount",
  940. key: "amount"
  941. },
  942. {
  943. title: "申请时间",
  944. dataIndex: "createTime",
  945. key: "createTime"
  946. },
  947. {
  948. title: "开票状态",
  949. dataIndex: "status",
  950. key: "status",
  951. render: text => {
  952. return getInvoiceStatus(text);
  953. }
  954. }
  955. ],
  956. columnsY: [
  957. {
  958. title: "流程",
  959. dataIndex: "processName",
  960. key: "processName"
  961. },
  962. {
  963. title: "操作人",
  964. dataIndex: "adminName",
  965. key: "adminName"
  966. },
  967. {
  968. title: "时间",
  969. dataIndex: "createDate",
  970. key: "createDate"
  971. }
  972. ],
  973. columnsW: [
  974. {
  975. title: "外包名称",
  976. dataIndex: "name",
  977. key: "name"
  978. },
  979. {
  980. title: "联系人",
  981. dataIndex: "contacts",
  982. key: "contacts"
  983. },
  984. {
  985. title: "联系人电话",
  986. dataIndex: "contactsMobile",
  987. key: "contactsMobile"
  988. },
  989. {
  990. title: "地址",
  991. dataIndex: "ProvinceCity",
  992. key: "ProvinceCity",
  993. render: test => {
  994. return test[0] === null
  995. ? ""
  996. : getprovince(test[0]) +
  997. "/" +
  998. getprovince(test[1]) +
  999. "/" +
  1000. getprovince(test[2]);
  1001. }
  1002. },
  1003. {
  1004. title: "地址详情",
  1005. dataIndex: "address",
  1006. key: "address",
  1007. render: text => {
  1008. return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
  1009. }
  1010. },
  1011. {
  1012. title: "创建时间",
  1013. dataIndex: "createTimes",
  1014. key: "createTimes"
  1015. },
  1016. {
  1017. title: "任务名称",
  1018. dataIndex: "tname",
  1019. key: "tname"
  1020. },
  1021. {
  1022. title: "合同编号",
  1023. dataIndex: "contractNo",
  1024. key: "contractNo"
  1025. },
  1026. {
  1027. title: "项目状态",
  1028. dataIndex: "projectStatus",
  1029. key: "projectStatus",
  1030. render: text => {
  1031. return getProjectStatus(text);
  1032. }
  1033. }
  1034. ],
  1035. dataSource: [],
  1036. searchTime: [,],
  1037. printColumns: [
  1038. {
  1039. title: "合同编号",
  1040. dataIndex: "contractNo",
  1041. key: "contractNo"
  1042. },
  1043. {
  1044. title: "订单编号",
  1045. dataIndex: "orderNo",
  1046. key: "orderNo"
  1047. // fixed: "left"
  1048. },
  1049. {
  1050. title: "客户名称",
  1051. dataIndex: "buyerName",
  1052. key: "buyerName"
  1053. },
  1054. {
  1055. title: "订单部门",
  1056. dataIndex: "departmentName",
  1057. key: "departmentName"
  1058. },
  1059. {
  1060. title: "订单负责人",
  1061. dataIndex: "sellerName",
  1062. key: "sellerName"
  1063. },
  1064. {
  1065. title: "外包公司",
  1066. dataIndex: "outsourceName",
  1067. key: "outsourceName"
  1068. },
  1069. {
  1070. title: "签单日期",
  1071. dataIndex: "signTime",
  1072. key: "signTime"
  1073. },
  1074. {
  1075. title: "下单日期",
  1076. dataIndex: "createTime",
  1077. key: "createTime"
  1078. },
  1079. {
  1080. title: "签单金额(万元)",
  1081. dataIndex: "signTotalAmount",
  1082. key: "signTotalAmount"
  1083. },
  1084. {
  1085. title: "开票金额(万元)",
  1086. dataIndex: "invoiceAmount",
  1087. key: "invoiceAmount"
  1088. },
  1089. {
  1090. title: "已收款(万元)",
  1091. dataIndex: "actuallyTotalAmount",
  1092. key: "actuallyTotalAmount"
  1093. },
  1094. {
  1095. title: "最近收款(万元)",
  1096. dataIndex: "finalReceivables",
  1097. key: "finalReceivables"
  1098. },
  1099. {
  1100. title: "最近收款时间",
  1101. dataIndex: "finalReceivablesTime",
  1102. key: "finalReceivablesTime"
  1103. },
  1104. {
  1105. title: "结算状态",
  1106. dataIndex: "liquidationStatus",
  1107. key: "liquidationStatus",
  1108. render: text => {
  1109. return getLiquidationStatus(text);
  1110. }
  1111. },
  1112. {
  1113. title: "流程状态",
  1114. dataIndex: "processStatus",
  1115. key: "processStatus",
  1116. render: text => {
  1117. return getProcessStatus(text);
  1118. }
  1119. },
  1120. {
  1121. title: "特批状态",
  1122. dataIndex: "approval",
  1123. key: "approval",
  1124. render: text => {
  1125. return getApproval(text);
  1126. }
  1127. }
  1128. ],
  1129. waterlistDate: [
  1130. {
  1131. title: "订单编号",
  1132. dataIndex: "orderNo",
  1133. key: "orderNo"
  1134. },
  1135. {
  1136. title: "平台流水号",
  1137. dataIndex: "billNo",
  1138. key: "billNo"
  1139. // fixed: "left"
  1140. },
  1141. {
  1142. title: "金额(万元)",
  1143. dataIndex: "transactionAmount",
  1144. key: "transactionAmount"
  1145. },
  1146. {
  1147. title: "收款方",
  1148. dataIndex: "payeeName",
  1149. key: "payeeName"
  1150. },
  1151. {
  1152. title: "付款方",
  1153. dataIndex: "payerName",
  1154. key: "payerName"
  1155. },
  1156. {
  1157. title: "流水科目",
  1158. dataIndex: "transactionSubject",
  1159. key: "transactionSubject",
  1160. render: text => {
  1161. return getTransactionProject(text);
  1162. }
  1163. },
  1164. {
  1165. title: "收款类型",
  1166. dataIndex: "type",
  1167. key: "type"
  1168. },
  1169. {
  1170. title: "财务流水时间",
  1171. dataIndex: "financialPayTimes",
  1172. key: "financialPayTimes"
  1173. },
  1174. {
  1175. title: "财务流水号",
  1176. dataIndex: "financialPayNo",
  1177. key: "financialPayNo"
  1178. },
  1179. {
  1180. title: "订单负责人",
  1181. dataIndex: "saleName",
  1182. key: "saleName"
  1183. },
  1184. {
  1185. title: "创建时间",
  1186. dataIndex: "createTimes",
  1187. key: "createTimes"
  1188. }
  1189. ],
  1190. waterData: []
  1191. };
  1192. },
  1193. // 特批通过
  1194. evaluateZ(record) {
  1195. $.ajax({
  1196. method: "POST",
  1197. dataType: "json",
  1198. crossDomain: false,
  1199. url: globalConfig.context + "/api/admin/financial/financeApproval",
  1200. data: {
  1201. orderNo: record.orderNo
  1202. }
  1203. }).done(
  1204. function(data) {
  1205. if (!data.error.length) {
  1206. message.success("通过成功!");
  1207. this.setState({
  1208. loading: false
  1209. });
  1210. this.loadData();
  1211. } else {
  1212. message.warning(data.error[0].message);
  1213. }
  1214. }.bind(this)
  1215. );
  1216. },
  1217. jdDate(orderNo) {
  1218. $.ajax({
  1219. method: "get",
  1220. dataType: "json",
  1221. crossDomain: false,
  1222. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  1223. data: {
  1224. orderNo: orderNo
  1225. },
  1226. success: function(data) {
  1227. let thisData = data.data;
  1228. if (!thisData.length) {
  1229. if (data.error && data.error.length) {
  1230. message.warning(data.error[0].message);
  1231. }
  1232. thisData = {};
  1233. } else {
  1234. this.setState({
  1235. jsDate: thisData
  1236. });
  1237. }
  1238. }.bind(this)
  1239. }).always(
  1240. function() {
  1241. this.setState({
  1242. loading: false
  1243. });
  1244. }.bind(this)
  1245. );
  1246. },
  1247. /* 收款 */
  1248. evaluateX(recard) {
  1249. this.state.assignDataX = recard;
  1250. this.setState({
  1251. assignVisibleX: true
  1252. });
  1253. },
  1254. /* 转交 */
  1255. evaluateY(recard, nub) {
  1256. this.state.assignDataY = recard;
  1257. this.setState({
  1258. nub,
  1259. assignVisibleY: true
  1260. });
  1261. },
  1262. /* 驳回 */
  1263. reject(recard) {
  1264. this.setState({
  1265. bohuiData: recard,
  1266. boHuiVisible: true,
  1267. content: ""
  1268. });
  1269. },
  1270. boHuiCancel() {
  1271. this.setState({
  1272. boHuiVisible: false,
  1273. reason: ""
  1274. });
  1275. },
  1276. componentWillMount() {
  1277. this.loadData();
  1278. this.departmentList();
  1279. },
  1280. tableRowClick(record) {
  1281. this.state.RowData = record;
  1282. this.setState({
  1283. showDesc: true,
  1284. visible: true,
  1285. orderNo: record.orderNo,
  1286. modKey: "1"
  1287. });
  1288. this.jdDate(record.orderNo);
  1289. this.loadXmu(record);
  1290. this.loadModal(record);
  1291. this.jiedian(record.orderNo);
  1292. this.jiedianNew(record.orderNo);
  1293. },
  1294. //详情
  1295. callBack(key) {
  1296. if (key === "2") {
  1297. this.setState({
  1298. modKey: key,
  1299. width: "1200px"
  1300. });
  1301. this.loadWaiBao();
  1302. }
  1303. if (key === "1") {
  1304. this.setState({
  1305. modKey: key,
  1306. width: "800px"
  1307. });
  1308. }
  1309. if (this.state.pictureUrl.length) {
  1310. let picArr = [];
  1311. this.state.pictureUrl.map(function(item) {
  1312. if (item.response && item.response.data && item.response.data.length) {
  1313. picArr.push(item.response.data);
  1314. }
  1315. });
  1316. }
  1317. if (key === "3") {
  1318. this.setState({
  1319. modKey: key,
  1320. width: "800px"
  1321. });
  1322. this.setState({
  1323. loading: true
  1324. });
  1325. $.ajax({
  1326. method: "get",
  1327. dataType: "json",
  1328. crossDomain: false,
  1329. url:
  1330. globalConfig.context + "/api/admin/outsourceOrg/orderOutsourceDtails",
  1331. data: {
  1332. orderNo: this.state.orderNo
  1333. },
  1334. success: function(data) {
  1335. let thisdata = data.data;
  1336. this.setState({
  1337. id: thisdata.id,
  1338. createTimes: thisdata.createTimes,
  1339. auditTimes: thisdata.auditTimes,
  1340. remarks: thisdata.remarks,
  1341. attachmentUrl: thisdata.attachmentUrl
  1342. ? splitUrl(
  1343. thisdata.attachmentUrl,
  1344. ",",
  1345. globalConfig.avatarHost + "/upload"
  1346. )
  1347. : [],
  1348. pictureUrl: thisdata.pictureUrl
  1349. ? splitUrl(
  1350. thisdata.pictureUrl,
  1351. ",",
  1352. globalConfig.avatarHost + "/upload"
  1353. )
  1354. : [], //图片地址
  1355. amount: thisdata.amount,
  1356. companyName: thisdata.companyName,
  1357. refundStatus: thisdata.refundStatus,
  1358. outsourceRemarks: thisdata.outsourceRemarks,
  1359. unitNumber: thisdata.unitNumber,
  1360. unitPrice: thisdata.unitPrice
  1361. });
  1362. }.bind(this)
  1363. }).always(
  1364. function() {
  1365. this.setState({
  1366. loading: false
  1367. });
  1368. }.bind(this)
  1369. );
  1370. }
  1371. },
  1372. //外包详情
  1373. loadWaiBao() {
  1374. $.ajax({
  1375. method: "get",
  1376. dataType: "json",
  1377. rossDomain: false,
  1378. url:
  1379. globalConfig.context +
  1380. "/api/admin/outsourceOrg/selectOrderOutsourceOrg",
  1381. data: {
  1382. orderNo: this.state.orderNo
  1383. },
  1384. success: function(data) {
  1385. let theArr = [];
  1386. if (data.error.length || data.data.list == "") {
  1387. if (data.error && data.error.length) {
  1388. message.warning(data.error[0].message);
  1389. }
  1390. } else {
  1391. for (let i = 0; i < data.data.length; i++) {
  1392. let thisdata = data.data[i];
  1393. let ProvinceCityArr = [];
  1394. let ProvinceS = thisdata.province; //省
  1395. let citys = thisdata.city; //市
  1396. let Areas = thisdata.area; //区
  1397. ProvinceCityArr.push(ProvinceS, citys, Areas);
  1398. theArr.push({
  1399. key: i,
  1400. id: thisdata.id,
  1401. name: thisdata.name,
  1402. contacts: thisdata.contacts, //订单编号
  1403. contactsMobile: thisdata.contactsMobile,
  1404. ProvinceCity: ProvinceCityArr[0] === null ? [] : ProvinceCityArr,
  1405. province: thisdata.province,
  1406. city: thisdata.city,
  1407. area: thisdata.area,
  1408. address: thisdata.address,
  1409. remarks: thisdata.remarks,
  1410. tid: thisdata.tid,
  1411. createTimes: thisdata.createTimes,
  1412. tname: thisdata.tname,
  1413. contractNo: thisdata.contractNo,
  1414. projectStatus: thisdata.projectStatus
  1415. });
  1416. }
  1417. }
  1418. this.setState(
  1419. {
  1420. dataSourceW: theArr
  1421. },
  1422. () => {}
  1423. );
  1424. }.bind(this)
  1425. }).always(
  1426. function() {
  1427. this.setState({
  1428. loading: false
  1429. });
  1430. }.bind(this)
  1431. );
  1432. },
  1433. loadXmu(record) {
  1434. this.state.data = [];
  1435. this.setState({
  1436. loading: true
  1437. });
  1438. $.ajax({
  1439. method: "get",
  1440. dataType: "json",
  1441. crossDomain: false,
  1442. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1443. data: {
  1444. orderNo: record.orderNo
  1445. },
  1446. success: function(data) {
  1447. let theArr = [];
  1448. if (!data.data) {
  1449. if (data.error && data.error.length) {
  1450. message.warning(data.error[0].message);
  1451. }
  1452. } else {
  1453. for (let i = 0; i < data.data.length; i++) {
  1454. let thisdata = data.data[i];
  1455. theArr.push({
  1456. key: i,
  1457. id: thisdata.id,
  1458. orderNo: thisdata.orderNo,
  1459. commodityName: thisdata.commodityName,
  1460. commodityPrice: thisdata.commodityPrice,
  1461. commodityQuantity: thisdata.commodityQuantity,
  1462. taskStatus: thisdata.taskStatus,
  1463. taskComment: thisdata.taskComment,
  1464. main: thisdata.main,
  1465. contacts: thisdata.contacts,
  1466. contactsMobile: thisdata.contactsMobile,
  1467. cname: thisdata.cname,
  1468. certificateNumber: thisdata.certificateNumber,
  1469. projectStatus: thisdata.projectStatus,
  1470. sort: thisdata.cSort
  1471. });
  1472. }
  1473. }
  1474. this.setState({
  1475. dataSourceX: theArr
  1476. });
  1477. }.bind(this)
  1478. }).always(
  1479. function() {
  1480. this.setState({
  1481. loading: false
  1482. });
  1483. }.bind(this)
  1484. );
  1485. },
  1486. loadModal(record) {
  1487. this.state.orderList = [];
  1488. $.ajax({
  1489. method: "get",
  1490. dataType: "json",
  1491. crossDomain: false,
  1492. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  1493. data: {
  1494. orderNo: record.orderNo
  1495. },
  1496. success: function(data) {
  1497. let thisData = data.data;
  1498. if (!thisData) {
  1499. if (data.error && data.error.length) {
  1500. message.warning(data.error[0].message);
  1501. }
  1502. thisData = {};
  1503. }
  1504. this.setState({
  1505. id: thisData.id,
  1506. orderList: thisData,
  1507. approval:
  1508. thisData.approval == 0
  1509. ? thisData.approval.toString()
  1510. : thisData.approval,
  1511. orderRemarks: thisData.orderRemarks,
  1512. orgCodeUrl: thisData.contractPictureUrl
  1513. ? splitUrl(
  1514. thisData.contractPictureUrl,
  1515. ",",
  1516. globalConfig.avatarHost + "/upload"
  1517. )
  1518. : [],
  1519. orderNo: thisData.orderNo, //订单编号
  1520. buyerId: thisData.buyerId,
  1521. depName: thisData.depName
  1522. });
  1523. }.bind(this)
  1524. }).always(
  1525. function() {
  1526. this.setState({
  1527. loading: false
  1528. });
  1529. }.bind(this)
  1530. );
  1531. },
  1532. rizhi() {
  1533. this.setState({
  1534. loading: true
  1535. });
  1536. $.ajax({
  1537. method: "get",
  1538. dataType: "json",
  1539. crossDomain: false,
  1540. url: "/api/admin/newOrder/selectOrderLog",
  1541. data: {
  1542. orderNo: this.state.orderNo
  1543. },
  1544. success: function(data) {
  1545. let theArr = [];
  1546. let thisData = data.data;
  1547. if (!thisData.length) {
  1548. if (data.error && data.error.length) {
  1549. message.warning(data.error[0].message);
  1550. }
  1551. thisData = {};
  1552. } else {
  1553. for (let i = 0; i < data.data.length; i++) {
  1554. let thisdata = data.data[i];
  1555. theArr.push({
  1556. processName: thisdata.processName,
  1557. adminName: thisdata.adminName,
  1558. createDate: thisdata.createDate
  1559. });
  1560. }
  1561. }
  1562. this.setState({
  1563. dataSourceY: theArr
  1564. });
  1565. }.bind(this)
  1566. }).always(
  1567. function() {
  1568. this.setState({
  1569. loading: false
  1570. });
  1571. }.bind(this)
  1572. );
  1573. },
  1574. closeOrderLog() {
  1575. this.setState({
  1576. avisible: false
  1577. });
  1578. },
  1579. load() {
  1580. if (this.state.attachmentUrl) {
  1581. let url = window.location.href.substring(7);
  1582. this.state.attachmentUrl.forEach(e => {
  1583. window.location.href =
  1584. "http://" +
  1585. url.substring(0, url.indexOf("/")) +
  1586. "/api/admin/outsourceOrg//downloadFile?path=" +
  1587. e.response.data;
  1588. });
  1589. } else {
  1590. message.error("此订单无上传文件");
  1591. }
  1592. },
  1593. getOrderLog() {
  1594. this.setState({
  1595. avisible: true
  1596. });
  1597. this.rizhi();
  1598. },
  1599. closeModal() {
  1600. this.setState(
  1601. {
  1602. visible: false,
  1603. width: "800px"
  1604. },
  1605. () => {
  1606. this.setState({
  1607. modKey: "1"
  1608. });
  1609. }
  1610. );
  1611. },
  1612. closeDesc(e, s) {
  1613. this.state.showDesc = e;
  1614. if (s) {
  1615. this.loadData();
  1616. }
  1617. },
  1618. closeAssignX(e, s) {
  1619. this.state.assignDataX = {};
  1620. this.state.assignVisibleX = e;
  1621. if (s) {
  1622. this.loadData();
  1623. }
  1624. },
  1625. closeAssignY(e, s) {
  1626. this.state.assignDataY = {};
  1627. this.state.assignVisibleY = e;
  1628. if (s) {
  1629. this.loadData();
  1630. }
  1631. },
  1632. search() {
  1633. this.loadData();
  1634. },
  1635. reset() {
  1636. this.state.nameSearch = "";
  1637. this.state.releaseDate = [];
  1638. this.state.shouKuanDate = [];
  1639. this.state.orderNoSearch = "";
  1640. this.state.departmenttList = undefined;
  1641. this.state.processStatus = [];
  1642. this.state.contractNoSearch = "";
  1643. this.state.liquidationStatus = [];
  1644. this.state.contractNo = "";
  1645. this.loadData();
  1646. },
  1647. boHuiCo() {
  1648. this.boHuiCancel();
  1649. this.boHuiSubmit();
  1650. },
  1651. //驳回
  1652. boHuiSubmit() {
  1653. if (!this.state.reason) {
  1654. message.warning("请填写驳回原因");
  1655. return false;
  1656. }
  1657. this.setState({
  1658. loading: true
  1659. });
  1660. $.ajax({
  1661. method: "POST",
  1662. dataType: "json",
  1663. crossDomain: false,
  1664. url: globalConfig.context + "/api/admin/financial/reject",
  1665. data: {
  1666. orderNo: this.state.bohuiData.orderNo,
  1667. reason: this.state.reason
  1668. }
  1669. }).done(
  1670. function(data) {
  1671. if (!data.error.length) {
  1672. message.success("驳回成功!");
  1673. this.setState({
  1674. loading: false
  1675. });
  1676. this.loadData();
  1677. } else {
  1678. message.warning(data.error[0].message);
  1679. }
  1680. }.bind(this)
  1681. );
  1682. },
  1683. searchSwitch() {
  1684. this.setState({
  1685. searchMore: !this.state.searchMore
  1686. });
  1687. },
  1688. changeList(arr) {
  1689. const newArr = [];
  1690. this.state.columns.forEach(item => {
  1691. arr.forEach(val => {
  1692. if (val === item.title) {
  1693. newArr.push(item);
  1694. }
  1695. });
  1696. });
  1697. this.setState({
  1698. changeList: newArr
  1699. });
  1700. },
  1701. onSelectChange(selectedRowKeys) {
  1702. // for(var i=0; i<selectedRowKeys.length; i++){
  1703. // for(var j=i+1; j<selectedRowKeys.length; j++){
  1704. // if(selectedRowKeys[i]==selectedRowKeys[j]){
  1705. // selectedRowKeys.splice(j,1);
  1706. // j--;
  1707. // }
  1708. // }
  1709. // }
  1710. console.log(selectedRowKeys);
  1711. this.setState({ selectedRowKeys });
  1712. },
  1713. inRecordData() {
  1714. this.setState({
  1715. loading: true
  1716. });
  1717. $.ajax({
  1718. method: "get",
  1719. dataType: "json",
  1720. crossDomain: false,
  1721. url:
  1722. globalConfig.context +
  1723. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1724. data: {
  1725. orderNo: this.state.selectedRowKeys[0],
  1726. pageSize: 9999
  1727. },
  1728. success: function(data) {
  1729. let theArr = [];
  1730. let sum = 0;
  1731. if (!data.data) {
  1732. if (data.error && data.error.length) {
  1733. message.warning(data.error[0].message);
  1734. }
  1735. } else {
  1736. for (let i = 0; i < data.data.list.length; i++) {
  1737. let thisdata = data.data.list[i];
  1738. sum += parseFloat(thisdata.amount);
  1739. theArr.push({
  1740. id: thisdata.id,
  1741. orderno: thisdata.orderno, //订单编号
  1742. amount: thisdata.amount, //签单金额
  1743. createTime: thisdata.createTime, //流程状态
  1744. status: thisdata.status, //结算状态
  1745. rejectReason: thisdata.rejectReason
  1746. });
  1747. }
  1748. }
  1749. this.setState({
  1750. recordData: theArr,
  1751. sum: sum.toFixed(4)
  1752. });
  1753. }.bind(this)
  1754. }).done(
  1755. function() {
  1756. this.setState({
  1757. loading: false
  1758. });
  1759. }.bind(this)
  1760. );
  1761. },
  1762. inRecordCanl() {
  1763. this.setState({
  1764. bvisible: false
  1765. });
  1766. },
  1767. waterData() {
  1768. this.state.data = [];
  1769. this.setState({
  1770. loading: true
  1771. });
  1772. $.ajax({
  1773. method: "get",
  1774. dataType: "json",
  1775. crossDomain: false,
  1776. url: globalConfig.context + "/api/admin/financial/myBillList",
  1777. data: {
  1778. orderNo: this.state.selectedRowKeys[0],
  1779. pageSize: 9999,
  1780. whoType: 1
  1781. },
  1782. success: function(data) {
  1783. let theArr = [];
  1784. let waterSum = 0;
  1785. if (!data.data || !data.data.list) {
  1786. if (data.error && data.error.length) {
  1787. message.warning(data.error[0].message);
  1788. }
  1789. } else {
  1790. for (let i = 0; i < data.data.list.length; i++) {
  1791. let thisdata = data.data.list[i];
  1792. waterSum += parseFloat(thisdata.transactionAmount);
  1793. theArr.push({
  1794. key: i,
  1795. orderNo: thisdata.orderNo,
  1796. billNo: thisdata.billNo,
  1797. transactionAmount: thisdata.transactionAmount,
  1798. payeeName: thisdata.payeeName,
  1799. payerName: thisdata.payerName,
  1800. transactionSubject: thisdata.transactionSubject,
  1801. transactionChannel: thisdata.transactionChannel,
  1802. financialPayTimes: thisdata.financialPayTimes,
  1803. financialPayNo: thisdata.financialPayNo,
  1804. createrName: thisdata.createrName,
  1805. saleName: thisdata.saleName,
  1806. createTimes: thisdata.createTimes,
  1807. type: thisdata.type == 0 ? "手工" : "批量"
  1808. });
  1809. }
  1810. }
  1811. this.setState({
  1812. waterData: theArr,
  1813. waterSum: waterSum.toFixed(4)
  1814. });
  1815. }.bind(this)
  1816. }).always(
  1817. function() {
  1818. this.setState({
  1819. loading: false
  1820. });
  1821. }.bind(this)
  1822. );
  1823. },
  1824. waterCanl() {
  1825. this.setState({
  1826. cvisible: false
  1827. });
  1828. },
  1829. exportAll() {
  1830. const data = {
  1831. pageSize: 9999,
  1832. buyerName: this.state.nameSearch, //客户名称
  1833. orderNo: this.state.orderNoSearch,
  1834. startTime: this.state.releaseDate[0],
  1835. endTime: this.state.releaseDate[1],
  1836. startFinalReceivablesTime: this.state.shouKuanDate[0],
  1837. endFinalReceivablesTime: this.state.shouKuanDate[1],
  1838. departmentId: this.state.departmenttList,
  1839. processStatus: this.state.processStatusSearch,
  1840. contractNo: this.state.contractNoSearch,
  1841. outsource: 1,
  1842. liquidationStatus: this.state.liquidationStatus
  1843. };
  1844. window.location.href =
  1845. globalConfig.context +
  1846. "/api/admin/receivables/exportReceivables?" +
  1847. $.param(data);
  1848. },
  1849. exportKaip() {
  1850. window.location.href =
  1851. globalConfig.context +
  1852. "/api/admin/receivables/exportInvoice?" +
  1853. `orderNo=${this.state.selectedRowKeys}`;
  1854. },
  1855. exportWater() {
  1856. window.location.href =
  1857. globalConfig.context +
  1858. "/api/admin/receivables/exportMyBill?" +
  1859. `orderNo=${this.state.selectedRowKeys}&whoType=1`;
  1860. },
  1861. printAll() {
  1862. this.setState({
  1863. dvisible: true
  1864. // loading: true
  1865. });
  1866. this.loadData(1, 9999);
  1867. },
  1868. downImg() {
  1869. let num = 0;
  1870. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1871. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1872. num = i;
  1873. }
  1874. }
  1875. if (num == this.state.orgCodeUrl.length - 1) {
  1876. return message.warning("已经是最后一张了哦");
  1877. }
  1878. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  1879. this.setState({
  1880. previewImage: this.state.previewImage,
  1881. rotateDeg: 0
  1882. });
  1883. },
  1884. upImg() {
  1885. let num = 0;
  1886. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1887. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1888. num = i;
  1889. }
  1890. }
  1891. if (num == 0) {
  1892. return message.warning("已经是第一张了哦");
  1893. }
  1894. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  1895. this.setState({
  1896. previewImage: this.state.previewImage,
  1897. rotateDeg: 0
  1898. });
  1899. },
  1900. rotate() {
  1901. let rotateDeg = this.state.rotateDeg + 90;
  1902. this.setState({
  1903. rotateDeg
  1904. });
  1905. },
  1906. timeData() {
  1907. this.setState({
  1908. loading: true
  1909. });
  1910. $.ajax({
  1911. method: "get",
  1912. dataType: "json",
  1913. crossDomain: false,
  1914. url: globalConfig.context + "/api/admin/orderProject/taskHoursList",
  1915. data: {
  1916. orderNo: this.state.selectedRowKeys[0],
  1917. pageSize: 9999
  1918. },
  1919. success: function(data) {
  1920. let theArr = [];
  1921. if (!data.data || !data.data.list) {
  1922. if (data.error && data.error.length) {
  1923. message.warning(data.error[0].message);
  1924. }
  1925. } else {
  1926. for (let i = 0; i < data.data.list.length; i++) {
  1927. let thisdata = data.data.list[i];
  1928. theArr.push({
  1929. key: i + 1,
  1930. id: thisdata.id, //ID
  1931. orderNo: thisdata.orderNo, //订单编号
  1932. taskName: thisdata.taskName, //任务名称
  1933. userName: thisdata.userName, //客户名称
  1934. cname: thisdata.cname, //项目品类
  1935. taskStatus: thisdata.taskStatus, //任务状态
  1936. receiverName: thisdata.receiverName, //负责人
  1937. hours: thisdata.hours, //任务工时
  1938. depName: thisdata.depName, //派单公司
  1939. contractNo: thisdata.contractNo,
  1940. signTime: thisdata.signTime,
  1941. creteTime: thisdata.creteTime,
  1942. projectStatus: thisdata.projectStatus,
  1943. commodityPrice: thisdata.commodityPrice, //价格
  1944. commodityQuantity: thisdata.commodityQuantity, //数量
  1945. salesmanName: thisdata.salesmanName, //订单负责人
  1946. taskDistributionTime: thisdata.taskDistributionTime,
  1947. taskEndTime: thisdata.taskEndTime
  1948. });
  1949. }
  1950. }
  1951. this.setState({
  1952. timeDataList: theArr
  1953. });
  1954. }.bind(this)
  1955. }).always(
  1956. function() {
  1957. this.setState({
  1958. loading: false
  1959. });
  1960. }.bind(this)
  1961. );
  1962. },
  1963. exportTime() {
  1964. const data = {
  1965. orderNo: this.state.selectedRowKeys[0],
  1966. outsourcing: 1
  1967. };
  1968. window.location.href =
  1969. globalConfig.context +
  1970. "/api/admin/orderProject/exportMyTaskList?" +
  1971. $.param(data);
  1972. },
  1973. exportPro() {
  1974. const data = {
  1975. orderNo: this.state.selectedRowKeys[0]
  1976. };
  1977. window.location.href =
  1978. globalConfig.context +
  1979. "/api/admin/newOrder/exportOrderTaskData?" +
  1980. $.param(data);
  1981. },
  1982. exportCui() {
  1983. var data = {
  1984. orderNo: this.state.selectedRowKeys[0]
  1985. ? this.state.selectedRowKeys[0]
  1986. : undefined, //订单编号
  1987. // specially: 1,
  1988. pageSize: 9999,
  1989. outsource: 1
  1990. };
  1991. window.location.href =
  1992. globalConfig.context +
  1993. "/api/admin/newOrder/exportOrderDunData?" +
  1994. $.param(data);
  1995. },
  1996. cuiData() {
  1997. this.setState({
  1998. loading: true
  1999. });
  2000. $.ajax({
  2001. method: "get",
  2002. dataType: "json",
  2003. crossDomain: false,
  2004. url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
  2005. data: {
  2006. orderNo: this.state.selectedRowKeys[0],
  2007. pageSize: 9999
  2008. },
  2009. success: function(data) {
  2010. let theArr = [];
  2011. if (!data.data || !data.data.list) {
  2012. if (data.error && data.error.length) {
  2013. message.warning(data.error[0].message);
  2014. }
  2015. } else {
  2016. for (let i = 0; i < data.data.list.length; i++) {
  2017. let thisdata = data.data.list[i];
  2018. theArr.push({
  2019. key: i + 1,
  2020. orderNo: thisdata.orderNo,
  2021. contractNo: thisdata.contractNo,
  2022. userName: thisdata.userName,
  2023. buyerName: thisdata.buyerName,
  2024. departmentName: thisdata.departmentName,
  2025. salesmanName: thisdata.salesmanName,
  2026. depName: thisdata.depName,
  2027. orderStatus: thisdata.orderStatus,
  2028. projectStatus: thisdata.projectStatus,
  2029. totalAmount: thisdata.totalAmount,
  2030. liquidationStatus: thisdata.liquidationStatus,
  2031. settlementAmount: thisdata.settlementAmount,
  2032. accountsReceivable: thisdata.accountsReceivable,
  2033. dunSubject: thisdata.dunSubject,
  2034. startDate: thisdata.startDate,
  2035. taskStatus: thisdata.taskStatus,
  2036. cname: thisdata.cname,
  2037. id: thisdata.id,
  2038. taskName: thisdata.taskName,
  2039. hours: thisdata.hours,
  2040. taskDistributionTime: thisdata.taskDistributionTime,
  2041. taskEndTime: thisdata.taskEndTime,
  2042. dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发"
  2043. });
  2044. }
  2045. }
  2046. this.setState({
  2047. cuiDataList: theArr
  2048. });
  2049. }.bind(this)
  2050. }).always(
  2051. function() {
  2052. this.setState({
  2053. loading: false
  2054. });
  2055. }.bind(this)
  2056. );
  2057. },
  2058. proData() {
  2059. this.setState({
  2060. loading: true
  2061. });
  2062. $.ajax({
  2063. method: "get",
  2064. dataType: "json",
  2065. crossDomain: false,
  2066. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  2067. data: {
  2068. orderNo: this.state.selectedRowKeys[0],
  2069. pageSize: 9999
  2070. },
  2071. success: function(data) {
  2072. let theArr = [];
  2073. let totalWaibao = 0;
  2074. if (!data.data) {
  2075. if (data.error && data.error.length) {
  2076. message.warning(data.error[0].message);
  2077. }
  2078. } else {
  2079. for (let i = 0; i < data.data.length; i++) {
  2080. let thisdata = data.data[i];
  2081. totalWaibao += thisdata.outsourcePrice;
  2082. theArr.push({
  2083. key: i + 1,
  2084. orderNo: thisdata.orderNo,
  2085. contractNo: thisdata.contractNo,
  2086. userName: thisdata.userName,
  2087. buyerName: thisdata.buyerName,
  2088. departmentName: thisdata.departmentName,
  2089. salesmanName: thisdata.salesmanName,
  2090. depName: thisdata.depName,
  2091. orderStatus: thisdata.orderStatus,
  2092. projectStatus: thisdata.projectStatus,
  2093. commodityName: thisdata.commodityName,
  2094. totalAmount: thisdata.totalAmount,
  2095. liquidationStatus: thisdata.liquidationStatus,
  2096. settlementAmount: thisdata.settlementAmount,
  2097. accountsReceivable: thisdata.accountsReceivable,
  2098. dunSubject: thisdata.dunSubject,
  2099. startDate: thisdata.startDate,
  2100. taskStatus: thisdata.taskStatus,
  2101. cname: thisdata.cname,
  2102. id: thisdata.id,
  2103. taskName: thisdata.taskName,
  2104. hours: thisdata.hours,
  2105. taskDistributionTime: thisdata.taskDistributionTime,
  2106. taskEndTime: thisdata.taskEndTime,
  2107. commodityQuantity: thisdata.commodityQuantity,
  2108. commodityPrice: thisdata.commodityPrice,
  2109. certificateNumber: thisdata.certificateNumber,
  2110. taskComment: thisdata.taskComment,
  2111. outsourceName: thisdata.outsourceName,
  2112. outsourcePrice: thisdata.outsourcePrice
  2113. });
  2114. }
  2115. }
  2116. totalWaibao = (Math.round(totalWaibao * 10000) / 10000).toFixed(4);
  2117. this.setState({
  2118. proDataList: theArr,
  2119. totalWaibao
  2120. });
  2121. }.bind(this)
  2122. }).always(
  2123. function() {
  2124. this.setState({
  2125. loading: false
  2126. });
  2127. }.bind(this)
  2128. );
  2129. },
  2130. jiedian(orderNos) {
  2131. $.ajax({
  2132. method: "get",
  2133. dataType: "json",
  2134. crossDomain: false,
  2135. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  2136. data: {
  2137. orderNo: orderNos
  2138. },
  2139. success: function(data) {
  2140. let theArr = [];
  2141. let thisData = [];
  2142. if (data.error.length || data.data.list == "") {
  2143. if (data.error && data.error.length) {
  2144. message.warning(data.error[0].message);
  2145. }
  2146. } else {
  2147. for (let i = 0; i < data.data.length; i++) {
  2148. thisData = data.data[i];
  2149. theArr.push({
  2150. key: i,
  2151. dunSubject: thisData.dunSubject
  2152. ? thisData.dunSubject.toString()
  2153. : "", //催款科目
  2154. id: thisData.id, //节点Id
  2155. money: thisData.money, //催款金额
  2156. dunStatus: thisData.dunStatus, //催款状态
  2157. orderNo: thisData.orderNo
  2158. });
  2159. }
  2160. this.setState({
  2161. contactList: theArr
  2162. });
  2163. }
  2164. }.bind(this)
  2165. }).always(
  2166. function() {
  2167. this.setState({
  2168. loading: false
  2169. });
  2170. }.bind(this)
  2171. );
  2172. },
  2173. //查看催款节点
  2174. jiedianNew(orderNos) {
  2175. $.ajax({
  2176. method: "get",
  2177. dataType: "json",
  2178. crossDomain: false,
  2179. url:
  2180. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  2181. data: {
  2182. orderNo: orderNos
  2183. },
  2184. success: function(data) {
  2185. if (data.error && data.error.length) {
  2186. message.warning(data.error[0].message);
  2187. } else {
  2188. let theArr = [];
  2189. let thisData = [];
  2190. let arr = data.data || [];
  2191. let totalCui = 0;
  2192. for (let i = 0; i < arr.length; i++) {
  2193. thisData = arr[i];
  2194. totalCui += +thisData.money;
  2195. theArr.push({
  2196. key: i,
  2197. dunSubject: thisData.dunSubject
  2198. ? thisData.dunSubject.toString()
  2199. : "", //催款科目
  2200. id: thisData.id, //节点Id
  2201. money: thisData.money, //催款金额
  2202. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  2203. commodityName: thisData.commodityName,
  2204. projectType: thisData.projectType,
  2205. dunTypeName: thisData.dunTypeName,
  2206. status: thisData.status,
  2207. waitDay: thisData.waitDay,
  2208. effectiveCount: thisData.effectiveCount,
  2209. startDate: thisData.startDate,
  2210. dunType: thisData.dunType,
  2211. appropriationRatio: thisData.appropriationRatio
  2212. });
  2213. }
  2214. if (!totalCui) {
  2215. totalCui = 0;
  2216. }
  2217. totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
  2218. this.setState({
  2219. contactListNew: theArr,
  2220. totalCui
  2221. });
  2222. }
  2223. }.bind(this)
  2224. }).always(
  2225. function() {
  2226. this.setState({
  2227. loading: false
  2228. });
  2229. }.bind(this)
  2230. );
  2231. },
  2232. render() {
  2233. const { TextArea } = Input;
  2234. const { RangePicker } = DatePicker;
  2235. const { TabPane } = Tabs;
  2236. var departmentArr = this.state.departmentArr || [];
  2237. const theData = this.state.orderList || {};
  2238. const formItemLayout = {
  2239. labelCol: { span: 8 },
  2240. wrapperCol: { span: 12 }
  2241. };
  2242. const { loading, selectedRowKeys, visible } = this.state;
  2243. const cuiDataList = this.state.contactList || [];
  2244. const rowSelection = {
  2245. selectedRowKeys,
  2246. onChange: this.onSelectChange,
  2247. hideDefaultSelections: true,
  2248. type: "radio"
  2249. };
  2250. const jsDate = this.state.jsDate || [];
  2251. return (
  2252. <div className="user-content">
  2253. <div className="content-title" style={{ marginBottom: 10 }}>
  2254. <span style={{ fontWeight: 900, fontSize: 16 }}>外包结算管理</span>
  2255. </div>
  2256. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  2257. <TabPane tab="更改表格显示数据" key="1">
  2258. <div style={{ marginLeft: 10 }}>
  2259. <ChooseList
  2260. columns={this.state.columns}
  2261. changeFn={this.changeList}
  2262. changeList={this.state.changeList}
  2263. top={55}
  2264. margin={11}
  2265. />
  2266. </div>
  2267. </TabPane>
  2268. <TabPane tab="搜索" key="2">
  2269. <div className="user-search" style={{ marginLeft: 10 }}>
  2270. <Input
  2271. placeholder="订单编号"
  2272. value={this.state.orderNoSearch}
  2273. onChange={e => {
  2274. this.setState({ orderNoSearch: e.target.value });
  2275. }}
  2276. />
  2277. <Input
  2278. placeholder="客户名称"
  2279. value={this.state.nameSearch}
  2280. onChange={e => {
  2281. this.setState({ nameSearch: e.target.value });
  2282. }}
  2283. />
  2284. <Select
  2285. placeholder="订单部门"
  2286. style={{ width: 150, marginRight: 10 }}
  2287. value={this.state.departmenttList}
  2288. onChange={e => {
  2289. this.setState({ departmenttList: e });
  2290. }}
  2291. >
  2292. {departmentArr.map(function(item) {
  2293. return (
  2294. <Select.Option key={item.id}>{item.name}</Select.Option>
  2295. );
  2296. })}
  2297. </Select>
  2298. <Input
  2299. placeholder="合同编号"
  2300. value={this.state.contractNoSearch}
  2301. onChange={e => {
  2302. this.setState({
  2303. contractNoSearch: e.target.value
  2304. });
  2305. }}
  2306. />
  2307. <Select
  2308. placeholder="流程状态"
  2309. onChange={e => {
  2310. this.setState({ processStatusSearch: e });
  2311. }}
  2312. style={{ width: 160, marginRight: 5 }}
  2313. value={this.state.processStatusSearch}
  2314. >
  2315. <Option value="3">未分配</Option>
  2316. <Option value="4">已分配</Option>
  2317. </Select>
  2318. <Select
  2319. placeholder="结算状态"
  2320. onChange={e => {
  2321. this.setState({ liquidationStatus: e });
  2322. }}
  2323. style={{ width: 160, marginRight: 5 }}
  2324. value={this.state.liquidationStatus}
  2325. >
  2326. <Option value="0">首付待付清</Option>
  2327. <Option value="1">尾款待付清</Option>
  2328. <Option value="2">已付清</Option>
  2329. </Select>
  2330. <span style={{ marginRight: 0 }}>下单日期:</span>
  2331. <RangePicker
  2332. value={[
  2333. this.state.releaseDate[0]
  2334. ? moment(this.state.releaseDate[0])
  2335. : null,
  2336. this.state.releaseDate[1]
  2337. ? moment(this.state.releaseDate[1])
  2338. : null
  2339. ]}
  2340. onChange={(data, dataString) => {
  2341. this.setState({ releaseDate: dataString });
  2342. }}
  2343. />
  2344. <span style={{}}>最近收款:</span>
  2345. <RangePicker
  2346. value={[
  2347. this.state.shouKuanDate[0]
  2348. ? moment(this.state.shouKuanDate[0])
  2349. : null,
  2350. this.state.shouKuanDate[1]
  2351. ? moment(this.state.shouKuanDate[1])
  2352. : null
  2353. ]}
  2354. onChange={(data, dataString) => {
  2355. this.setState({ shouKuanDate: dataString });
  2356. }}
  2357. />
  2358. <Button
  2359. type="primary"
  2360. onClick={this.search}
  2361. style={{ marginLeft: 10 }}
  2362. disabled={this.state.loadingA ? true : false}
  2363. >
  2364. 搜索
  2365. </Button>
  2366. <Button onClick={this.reset}>重置</Button>
  2367. </div>
  2368. </TabPane>
  2369. <TabPane tab="打印" key="3">
  2370. <Button
  2371. type="primary"
  2372. style={{ margin: "11px 0px 10px 10px" }}
  2373. onClick={this.printAll}
  2374. disabled={!this.state.dataSource.length}
  2375. >
  2376. 打印所有列表信息
  2377. </Button>
  2378. <Button
  2379. type="primary"
  2380. disabled={this.state.selectedRowKeys.length != 1}
  2381. style={{ margin: "11px 0px 10px 10px" }}
  2382. onClick={() => {
  2383. this.inRecordData();
  2384. this.setState({
  2385. bvisible: true
  2386. });
  2387. }}
  2388. >
  2389. 打印开票详情
  2390. </Button>
  2391. <Button
  2392. type="primary"
  2393. disabled={this.state.selectedRowKeys.length != 1}
  2394. style={{ margin: "11px 0px 10px 10px" }}
  2395. onClick={() => {
  2396. this.waterData();
  2397. this.setState({
  2398. cvisible: true
  2399. });
  2400. }}
  2401. >
  2402. 打印收款流水
  2403. </Button>
  2404. <Button
  2405. type="primary"
  2406. disabled={this.state.selectedRowKeys.length != 1}
  2407. style={{ margin: "11px 0px 10px 10px" }}
  2408. onClick={() => {
  2409. this.timeData();
  2410. this.setState({
  2411. timeVisible: true
  2412. });
  2413. }}
  2414. >
  2415. 打印工时信息
  2416. </Button>
  2417. <Button
  2418. type="primary"
  2419. disabled={this.state.selectedRowKeys.length != 1}
  2420. style={{ margin: "11px 0px 10px 10px" }}
  2421. onClick={() => {
  2422. this.cuiData();
  2423. this.setState({
  2424. cuiVisible: true
  2425. });
  2426. }}
  2427. >
  2428. 打印催款信息
  2429. </Button>
  2430. <Button
  2431. type="primary"
  2432. disabled={this.state.selectedRowKeys.length != 1}
  2433. style={{ margin: "11px 0px 10px 10px" }}
  2434. onClick={() => {
  2435. this.proData();
  2436. this.setState({
  2437. proVisible: true
  2438. });
  2439. }}
  2440. >
  2441. 打印项目信息
  2442. </Button>
  2443. </TabPane>
  2444. <TabPane tab="导出Excel" key="4">
  2445. <Button
  2446. type="primary"
  2447. style={{ margin: "11px 0px 10px 10px" }}
  2448. onClick={this.exportAll}
  2449. >
  2450. 导出当前列表
  2451. </Button>
  2452. <Button
  2453. type="primary"
  2454. disabled={this.state.selectedRowKeys.length != 1}
  2455. style={{ margin: "11px 0px 10px 10px" }}
  2456. onClick={this.exportKaip}
  2457. >
  2458. 导出所选开票详情
  2459. </Button>
  2460. <Button
  2461. type="primary"
  2462. disabled={this.state.selectedRowKeys.length != 1}
  2463. style={{ margin: "11px 0px 10px 10px" }}
  2464. onClick={this.exportWater}
  2465. >
  2466. 导出所选收款详情流水
  2467. </Button>
  2468. <Button
  2469. type="primary"
  2470. disabled={this.state.selectedRowKeys.length != 1}
  2471. style={{ margin: "11px 0px 10px 10px" }}
  2472. onClick={this.exportTime}
  2473. >
  2474. 导出所选工时信息
  2475. </Button>
  2476. <Button
  2477. type="primary"
  2478. disabled={this.state.selectedRowKeys.length != 1}
  2479. style={{ margin: "11px 0px 10px 10px" }}
  2480. onClick={this.exportCui}
  2481. >
  2482. 导出催款信息
  2483. </Button>
  2484. <Button
  2485. type="primary"
  2486. disabled={this.state.selectedRowKeys.length != 1}
  2487. style={{ margin: "11px 0px 10px 10px" }}
  2488. onClick={this.exportPro}
  2489. >
  2490. 导出项目详情
  2491. </Button>
  2492. </TabPane>
  2493. <TabPane tab="查看" key="5">
  2494. <Button
  2495. type="primary"
  2496. disabled={this.state.selectedRowKeys.length != 1}
  2497. style={{ margin: "11px 0px 10px 10px" }}
  2498. onClick={() => {
  2499. this.inRecordData();
  2500. this.setState({
  2501. bvisible: true
  2502. });
  2503. }}
  2504. >
  2505. 查看开票详情
  2506. </Button>
  2507. <Button
  2508. type="primary"
  2509. disabled={this.state.selectedRowKeys.length != 1}
  2510. style={{ margin: "11px 0px 10px 10px" }}
  2511. onClick={() => {
  2512. this.waterData();
  2513. this.setState({
  2514. cvisible: true
  2515. });
  2516. }}
  2517. >
  2518. 详情收款流水
  2519. </Button>
  2520. <Button
  2521. type="primary"
  2522. disabled={this.state.selectedRowKeys.length != 1}
  2523. style={{ margin: "11px 0px 10px 10px" }}
  2524. onClick={() => {
  2525. this.timeData();
  2526. this.setState({
  2527. timeVisible: true
  2528. });
  2529. }}
  2530. >
  2531. 工时信息
  2532. </Button>
  2533. <Button
  2534. type="primary"
  2535. disabled={this.state.selectedRowKeys.length != 1}
  2536. style={{ margin: "11px 0px 10px 10px" }}
  2537. onClick={() => {
  2538. this.cuiData();
  2539. this.setState({
  2540. cuiVisible: true
  2541. });
  2542. }}
  2543. >
  2544. 催款信息
  2545. </Button>
  2546. <Button
  2547. type="primary"
  2548. disabled={this.state.selectedRowKeys.length != 1}
  2549. style={{ margin: "11px 0px 10px 10px" }}
  2550. onClick={() => {
  2551. this.proData();
  2552. this.setState({
  2553. proVisible: true
  2554. });
  2555. }}
  2556. >
  2557. 项目信息
  2558. </Button>
  2559. </TabPane>
  2560. {/* <TabPane tab="批量操作" key="6">
  2561. <Button
  2562. type="primary"
  2563. disabled={this.state.selectedRowKeys.length == 0}
  2564. style={{ margin: "0px 0px 10px 10px" }}
  2565. onClick={e => {
  2566. e.stopPropagation(),
  2567. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  2568. }}
  2569. >
  2570. 转交
  2571. </Button>
  2572. </TabPane> */}
  2573. </Tabs>
  2574. <div className="patent-table">
  2575. <Spin spinning={this.state.loadingA}>
  2576. <Table
  2577. bordered
  2578. columns={
  2579. this.state.changeList == undefined
  2580. ? this.state.columns
  2581. : this.state.changeList
  2582. }
  2583. dataSource={this.state.dataSource}
  2584. rowSelection={false}
  2585. scroll={{ x: "max-content", y: 0 }}
  2586. pagination={this.state.pagination}
  2587. onRowDoubleClick={this.tableRowClick.bind(this)}
  2588. rowSelection={rowSelection}
  2589. size="small"
  2590. />
  2591. </Spin>
  2592. <p
  2593. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  2594. >
  2595. {
  2596. <span style={{ marginRight: 10 }}>
  2597. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  2598. </span>
  2599. }
  2600. {
  2601. <span>
  2602. {`合同额总计(万元):${
  2603. this.state.totalHui ? this.state.totalHui : "0"
  2604. }`}
  2605. </span>
  2606. }
  2607. </p>
  2608. </div>
  2609. <div className="patent-desc">
  2610. <Modal
  2611. maskClosable={false}
  2612. visible={this.state.visible}
  2613. onCancel={this.closeModal}
  2614. width={this.state.width}
  2615. footer=""
  2616. className="admin-desc-content"
  2617. >
  2618. <Tabs
  2619. onChange={this.callBack}
  2620. type="card"
  2621. activeKey={this.state.modKey}
  2622. >
  2623. <TabPane tab="项目概况" key="1">
  2624. <Form layout="horizontal" id="demand-form">
  2625. <Spin spinning={this.state.loading}>
  2626. <div className="clearfix">
  2627. <FormItem
  2628. className="half-item"
  2629. {...formItemLayout}
  2630. label="订单编号"
  2631. >
  2632. <span>{this.state.orderNo}</span>
  2633. </FormItem>
  2634. <FormItem
  2635. className="half-item"
  2636. {...formItemLayout}
  2637. label="签单时间"
  2638. >
  2639. <span>{theData.signDate}</span>
  2640. </FormItem>
  2641. <FormItem
  2642. className="half-item"
  2643. {...formItemLayout}
  2644. label="客户名称"
  2645. >
  2646. <span>{theData.userName}</span>
  2647. </FormItem>
  2648. <FormItem
  2649. className="half-item"
  2650. {...formItemLayout}
  2651. label="流转状态"
  2652. >
  2653. <span>{getProcessStatus(theData.processStatus)}</span>
  2654. </FormItem>
  2655. <FormItem
  2656. className="half-item"
  2657. {...formItemLayout}
  2658. label="订单类型"
  2659. >
  2660. <span>{getNewOrderType(theData.orderType)}</span>
  2661. </FormItem>
  2662. <FormItem
  2663. className="half-item"
  2664. {...formItemLayout}
  2665. label="结算状态"
  2666. >
  2667. <span>
  2668. {getLiquidationStatus(theData.liquidationStatus)}
  2669. </span>
  2670. </FormItem>
  2671. <FormItem
  2672. className="half-item"
  2673. {...formItemLayout}
  2674. label="签单总金额(万元)"
  2675. >
  2676. <span>{theData.totalAmount}</span>
  2677. </FormItem>
  2678. <FormItem
  2679. className="half-item"
  2680. {...formItemLayout}
  2681. label="首付款(万元)"
  2682. >
  2683. <span>{theData.firstAmount}</span>
  2684. </FormItem>
  2685. <FormItem
  2686. className="half-item"
  2687. {...formItemLayout}
  2688. label="已收款(万元)"
  2689. >
  2690. <span>{theData.settlementAmount}</span>
  2691. </FormItem>
  2692. <FormItem
  2693. className="half-item"
  2694. {...formItemLayout}
  2695. label="是否特批"
  2696. >
  2697. <span>{getApproval(theData.approval)}</span>
  2698. </FormItem>
  2699. {/*this.props.data.orderStatus=='6'&&<FormItem className="half-item" {...formItemLayout} label="已退(万元)">
  2700. <span>{this.props.data.refundAmount}</span>
  2701. </FormItem>*/}
  2702. </div>
  2703. <div className="clearfix">
  2704. <FormItem
  2705. labelCol={{ span: 5 }}
  2706. wrapperCol={{ span: 18 }}
  2707. label="合同扫描件"
  2708. >
  2709. <Upload
  2710. className="demandDetailShow-upload"
  2711. listType="picture-card"
  2712. fileList={this.state.orgCodeUrl}
  2713. onPreview={file => {
  2714. this.setState({
  2715. previewImage: file.url || file.thumbUrl,
  2716. previewVisible: true
  2717. });
  2718. }}
  2719. ></Upload>
  2720. <Modal
  2721. maskClosable={false}
  2722. footer={null}
  2723. visible={this.state.previewVisible}
  2724. onCancel={() => {
  2725. this.setState({
  2726. previewVisible: false,
  2727. rotateDeg: 0
  2728. });
  2729. }}
  2730. >
  2731. <img
  2732. alt=""
  2733. style={{
  2734. width: "100%",
  2735. transform: `rotate(${this.state.rotateDeg}deg)`
  2736. }}
  2737. src={this.state.previewImage || ""}
  2738. />
  2739. <Button
  2740. onClick={this.rotate}
  2741. style={{
  2742. position: "relative",
  2743. left: "50%",
  2744. transform: "translateX(-50%)"
  2745. }}
  2746. >
  2747. 旋转
  2748. </Button>
  2749. <Button
  2750. onClick={this.upImg}
  2751. style={{
  2752. position: "absolute",
  2753. left: -81,
  2754. top: "50%",
  2755. transform: "translateY(-50%)"
  2756. }}
  2757. >
  2758. 上一张
  2759. </Button>
  2760. <Button
  2761. onClick={this.downImg}
  2762. style={{
  2763. position: "absolute",
  2764. right: -81,
  2765. top: "50%",
  2766. transform: "translateY(-50%)"
  2767. }}
  2768. >
  2769. 下一张
  2770. </Button>
  2771. </Modal>
  2772. <Button
  2773. style={{
  2774. float: "right",
  2775. marginRight: "140px",
  2776. marginTop: "20px"
  2777. }}
  2778. onClick={this.getOrderLog}
  2779. >
  2780. 查看订单日志
  2781. </Button>
  2782. </FormItem>
  2783. </div>
  2784. <div className="clearfix">
  2785. <FormItem
  2786. className="half-item"
  2787. {...formItemLayout}
  2788. label="合同编号"
  2789. >
  2790. <span>{theData.contractNo}</span>
  2791. </FormItem>
  2792. <FormItem
  2793. className="half-item"
  2794. {...formItemLayout}
  2795. label="订单部门"
  2796. >
  2797. <span>{theData.depName}</span>
  2798. </FormItem>
  2799. </div>
  2800. <div className="clearfix">
  2801. <FormItem
  2802. labelCol={{ span: 5 }}
  2803. wrapperCol={{ span: 18 }}
  2804. label="订单留言"
  2805. >
  2806. <p style={{ width: 500, wordWrap: "break-word" }}>
  2807. {this.state.orderRemarks}
  2808. </p>
  2809. </FormItem>
  2810. </div>
  2811. {/* <div className="clearfix">
  2812. <FormItem
  2813. labelCol={{ span: 5 }}
  2814. wrapperCol={{ span: 18 }}
  2815. label="收款节点"
  2816. >
  2817. {jsDate.map(item => {
  2818. return (
  2819. <p>
  2820. {getjiedian(item.dunSubject)} -- {item.money} 万元
  2821. </p>
  2822. );
  2823. })}
  2824. </FormItem>
  2825. </div> */}
  2826. <div className="clearfix">
  2827. <FormItem
  2828. className="half-item"
  2829. {...formItemLayout}
  2830. label="订单负责人"
  2831. >
  2832. <span>{theData.salesmanName}</span>
  2833. </FormItem>
  2834. <FormItem
  2835. className="half-item"
  2836. {...formItemLayout}
  2837. label="订单负责人电话"
  2838. >
  2839. <span>{theData.salesmanMobile}</span>
  2840. </FormItem>
  2841. <FormItem
  2842. className="half-item"
  2843. {...formItemLayout}
  2844. label="当前财务负责人"
  2845. >
  2846. <span>{theData.nowFinance}</span>
  2847. </FormItem>
  2848. <FormItem
  2849. className="half-item"
  2850. {...formItemLayout}
  2851. label="当前财务负责人电话"
  2852. >
  2853. <span>{theData.nowFinanceMobile}</span>
  2854. </FormItem>
  2855. <FormItem
  2856. className="half-item"
  2857. {...formItemLayout}
  2858. style={{ opacity: ".5" }}
  2859. label="原订单负责人"
  2860. >
  2861. <span>{theData.oldSalesmanName}</span>
  2862. </FormItem>
  2863. <FormItem
  2864. className="half-item"
  2865. {...formItemLayout}
  2866. style={{ opacity: ".5" }}
  2867. label="原订单负责人电话"
  2868. >
  2869. <span>{theData.oldSalesmanMobile}</span>
  2870. </FormItem>
  2871. <FormItem
  2872. className="half-item"
  2873. {...formItemLayout}
  2874. style={{ opacity: ".5" }}
  2875. label="实际财务操作人"
  2876. >
  2877. <span>{theData.financeName}</span>
  2878. </FormItem>
  2879. <FormItem
  2880. className="half-item"
  2881. {...formItemLayout}
  2882. style={{ opacity: ".5" }}
  2883. label="实际财务操作人电话"
  2884. >
  2885. <span>{theData.financeMobile}</span>
  2886. </FormItem>
  2887. </div>
  2888. {/* <Modal
  2889. visible={this.state.avisible}
  2890. className="admin-desc-content"
  2891. width="800px"
  2892. maskClosable={false}
  2893. title="订单日志"
  2894. footer={null}
  2895. onCancel={this.closeOrderLog}
  2896. >
  2897. <div className="patent-table">
  2898. <Spin spinning={this.state.loading}>
  2899. <Table
  2900. columns={this.state.columnsY}
  2901. dataSource={this.state.dataSourceY}
  2902. pagination={false}
  2903. />
  2904. </Spin>
  2905. </div>
  2906. </Modal> */}
  2907. <OrderRiZi
  2908. dataSourcerizhi={this.state.dataSourceY}
  2909. closeOrderLog={this.closeOrderLog}
  2910. visible={this.state.avisible}
  2911. loading={this.state.loading}
  2912. />
  2913. <div className="clearfix">
  2914. <p style={{ fontSize: 18, marginLeft: 20 }}>项目业务</p>
  2915. <div className="patent-table">
  2916. <Spin spinning={this.state.loading}>
  2917. <Table
  2918. columns={this.state.columnsX}
  2919. dataSource={this.state.dataSourceX}
  2920. pagination={false}
  2921. />
  2922. </Spin>
  2923. </div>
  2924. </div>
  2925. <div>
  2926. <span style={{ marginLeft: 20, fontSize: "18px" }}>
  2927. 催款节点
  2928. </span>
  2929. <span
  2930. style={{
  2931. display: cuiDataList.length ? "none" : "inline-block",
  2932. marginLeft: 10,
  2933. color: "red"
  2934. }}
  2935. >
  2936. 金额总计(万元): {this.state.totalCui}
  2937. </span>
  2938. </div>
  2939. <div className="clearfix">
  2940. <Spin spinning={this.state.loading}>
  2941. <Form layout="horizontal" id="demand-form">
  2942. <Table
  2943. pagination={false}
  2944. bordered
  2945. size="small"
  2946. columns={
  2947. cuiDataList.length
  2948. ? this.state.ContactsLists
  2949. : this.state.ContactsListsNew
  2950. }
  2951. dataSource={
  2952. cuiDataList.length
  2953. ? this.state.contactList
  2954. : this.state.contactListNew
  2955. }
  2956. />
  2957. <Col
  2958. span={24}
  2959. offset={9}
  2960. style={{ marginTop: "15px" }}
  2961. ></Col>
  2962. </Form>
  2963. </Spin>
  2964. </div>
  2965. </Spin>
  2966. </Form>
  2967. </TabPane>
  2968. <TabPane tab="外包详情" key="2">
  2969. <div className="clearfix">
  2970. <p style={{ color: "red" }}>
  2971. 提示:查看备注请点击表格左侧加号按钮~
  2972. </p>
  2973. <div className="patent-table">
  2974. <Spin spinning={this.state.loading}>
  2975. <Table
  2976. columns={this.state.columnsW}
  2977. dataSource={this.state.dataSourceW}
  2978. pagination={false}
  2979. expandedRowRender={record => (
  2980. <p style={{ margin: 0 }}>{record.remarks}</p>
  2981. )}
  2982. scroll={{ x: 300, y: 0 }}
  2983. />
  2984. </Spin>
  2985. </div>
  2986. </div>
  2987. </TabPane>
  2988. <TabPane tab="外包审核" key="3">
  2989. <div className="clearfix">
  2990. <FormItem
  2991. className="half-item"
  2992. labelCol={{ span: 8 }}
  2993. wrapperCol={{ span: 14 }}
  2994. label="外包公司"
  2995. >
  2996. <span>{this.state.companyName}</span>
  2997. </FormItem>
  2998. </div>
  2999. <div className="clearfix">
  3000. <FormItem
  3001. className="half-item"
  3002. {...formItemLayout}
  3003. label="单价(万元)"
  3004. >
  3005. <span>{this.state.unitPrice}</span>
  3006. </FormItem>
  3007. </div>
  3008. <div className="clearfix">
  3009. <FormItem
  3010. className="half-item"
  3011. {...formItemLayout}
  3012. label="数量(万元)"
  3013. >
  3014. <span>{this.state.unitNumber}</span>
  3015. </FormItem>
  3016. </div>
  3017. <div className="clearfix">
  3018. <FormItem
  3019. className="half-item"
  3020. {...formItemLayout}
  3021. label="总金额(万元)"
  3022. >
  3023. <span>{this.state.amount}</span>
  3024. </FormItem>
  3025. </div>
  3026. <div className="clearfix">
  3027. <FormItem
  3028. className="half-item"
  3029. {...formItemLayout}
  3030. label="备注"
  3031. >
  3032. <span>{this.state.outsourceRemarks}</span>
  3033. </FormItem>
  3034. </div>
  3035. {/*<div className="clearfix">
  3036. <FormItem className="half-item"
  3037. labelCol={{ span: 8 }}
  3038. wrapperCol={{ span: 14 }}
  3039. label="上传协议文件" >
  3040. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  3041. data={(e)=>{
  3042. return {
  3043. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  3044. }
  3045. }}
  3046. fileList={this.state.attachmentUrl}
  3047. showUploadList={{showRemoveIcon:false}}
  3048. onPreview={(e)=>{
  3049. let url = window.location.href.substring(7)
  3050. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  3051. }}>
  3052. </Upload>
  3053. </FormItem>
  3054. </div>*/}
  3055. <div className="clearfix">
  3056. <FormItem
  3057. labelCol={{ span: 4 }}
  3058. wrapperCol={{ span: 18 }}
  3059. label="合同/协议扫描件"
  3060. >
  3061. <Upload
  3062. className="demandDetailShow-upload"
  3063. listType="picture-card"
  3064. fileList={this.state.pictureUrl}
  3065. onPreview={file => {
  3066. this.setState({
  3067. previewImage: file.url || file.thumbUrl,
  3068. previewVisible: true
  3069. });
  3070. }}
  3071. ></Upload>
  3072. <Modal
  3073. maskClosable={false}
  3074. footer={null}
  3075. visible={this.state.previewVisible}
  3076. onCancel={() => {
  3077. this.setState({ previewVisible: false });
  3078. }}
  3079. >
  3080. <img
  3081. alt=""
  3082. style={{
  3083. width: "100%",
  3084. transform: `rotate(${this.state.rotateDeg}deg)`
  3085. }}
  3086. src={this.state.previewImage || ""}
  3087. />
  3088. <Button
  3089. onClick={this.rotate}
  3090. style={{
  3091. position: "relative",
  3092. left: "50%",
  3093. transform: "translateX(-50%)"
  3094. }}
  3095. >
  3096. 旋转
  3097. </Button>
  3098. <Button
  3099. onClick={this.upImg}
  3100. style={{
  3101. position: "absolute",
  3102. left: -81,
  3103. top: "50%",
  3104. transform: "translateY(-50%)"
  3105. }}
  3106. >
  3107. 上一张
  3108. </Button>
  3109. <Button
  3110. onClick={this.downImg}
  3111. style={{
  3112. position: "absolute",
  3113. right: -81,
  3114. top: "50%",
  3115. transform: "translateY(-50%)"
  3116. }}
  3117. >
  3118. 下一张
  3119. </Button>
  3120. </Modal>
  3121. </FormItem>
  3122. </div>
  3123. <div className="clearfix">
  3124. <hr className="division" />
  3125. <div className="clearfix">
  3126. <FormItem
  3127. className="half-item"
  3128. labelCol={{ span: 8 }}
  3129. wrapperCol={{ span: 14 }}
  3130. label="审核意见"
  3131. >
  3132. <span>{this.state.remarks}</span>
  3133. </FormItem>
  3134. </div>
  3135. <div className="clearfix">
  3136. <FormItem
  3137. className="half-item"
  3138. labelCol={{ span: 8 }}
  3139. wrapperCol={{ span: 14 }}
  3140. label="审核结果"
  3141. >
  3142. <span>{getRefundStatus(this.state.refundStatus)}</span>
  3143. </FormItem>
  3144. </div>
  3145. <div className="clearfix">
  3146. <FormItem
  3147. className="half-item"
  3148. labelCol={{ span: 8 }}
  3149. wrapperCol={{ span: 14 }}
  3150. label="审核时间"
  3151. >
  3152. <span>{this.state.auditTimes}</span>
  3153. </FormItem>
  3154. </div>
  3155. </div>
  3156. </TabPane>
  3157. </Tabs>
  3158. </Modal>
  3159. </div>
  3160. <div className="patent-desc">
  3161. <Modal
  3162. maskClosable={false}
  3163. title="驳回理由"
  3164. visible={this.state.boHuiVisible}
  3165. onCancel={this.boHuiCancel}
  3166. width="500px"
  3167. footer=""
  3168. className="admin-desc-content"
  3169. >
  3170. <TextArea
  3171. rows={4}
  3172. value={this.state.reason}
  3173. onChange={e => {
  3174. console.log(e.target.value);
  3175. this.setState({
  3176. reason: e.target.value
  3177. });
  3178. }}
  3179. />
  3180. <Button
  3181. type="primary"
  3182. style={{ marginTop: "20px" }}
  3183. onClick={this.boHuiCo}
  3184. >
  3185. 确定
  3186. </Button>
  3187. </Modal>
  3188. </div>
  3189. <Assign
  3190. title="任务"
  3191. selApi={"/api/admin/newOrder/updateFinance"}
  3192. data={this.state.assignDataY}
  3193. showDesc={this.state.assignVisibleY}
  3194. closeDesc={this.closeAssignY.bind(this)}
  3195. // fenpaiData={8}
  3196. specially={0}
  3197. roleName={this.state.nub}
  3198. requestMethod={"get"}
  3199. />
  3200. <Receivable
  3201. title="收款记录"
  3202. api="/api/admin/financial/addReceiptsFlow"
  3203. data={this.state.assignDataX}
  3204. showDesc={this.state.assignVisibleX}
  3205. closeDesc={this.closeAssignX.bind(this)}
  3206. />
  3207. <Modal
  3208. visible={this.state.bvisible}
  3209. footer=""
  3210. title="开票历史记录"
  3211. className="admin-desc-content"
  3212. width="900px"
  3213. onCancel={this.inRecordCanl}
  3214. >
  3215. <Spin spinning={this.state.loading}>
  3216. <div
  3217. className="patent-table"
  3218. ref={e => {
  3219. this.refs.kaiPiao = e;
  3220. }}
  3221. >
  3222. <Table
  3223. columns={this.state.columnsDate}
  3224. dataSource={this.state.recordData}
  3225. pagination={false}
  3226. bordered
  3227. />
  3228. <div className="clearfix" style={{ marginTop: "20px" }}>
  3229. <FormItem
  3230. className="half-item"
  3231. {...formItemLayout}
  3232. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  3233. >
  3234. <span>{this.state.sum + "(万元)"}</span>
  3235. </FormItem>
  3236. </div>
  3237. <ReactToPrint
  3238. trigger={() => (
  3239. <Button
  3240. type="primary"
  3241. style={{
  3242. float: "right",
  3243. // marginTop: 10,
  3244. position: "absolute",
  3245. top: -54,
  3246. right: 30
  3247. }}
  3248. >
  3249. 打印
  3250. </Button>
  3251. )}
  3252. content={() => this.refs.kaiPiao}
  3253. />
  3254. </div>
  3255. </Spin>
  3256. </Modal>
  3257. <Modal
  3258. visible={this.state.cvisible}
  3259. footer=""
  3260. title="详细收款流水"
  3261. className="admin-desc-content"
  3262. width="1300px"
  3263. onCancel={this.waterCanl}
  3264. >
  3265. <Spin spinning={this.state.loading}>
  3266. <div
  3267. className="patent-table"
  3268. ref={e => {
  3269. this.refs.shouKuan = e;
  3270. }}
  3271. >
  3272. <Table
  3273. columns={this.state.waterlistDate}
  3274. dataSource={this.state.waterData}
  3275. pagination={false}
  3276. bordered
  3277. />
  3278. <div className="clearfix" style={{ marginTop: "20px" }}>
  3279. <FormItem
  3280. className="half-item"
  3281. {...formItemLayout}
  3282. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  3283. >
  3284. <span>{this.state.waterSum + "(万元)"}</span>
  3285. </FormItem>
  3286. </div>
  3287. <ReactToPrint
  3288. trigger={() => (
  3289. <Button
  3290. type="primary"
  3291. style={{
  3292. float: "right",
  3293. position: "absolute",
  3294. top: -54,
  3295. right: 30
  3296. }}
  3297. >
  3298. 打印
  3299. </Button>
  3300. )}
  3301. content={() => this.refs.shouKuan}
  3302. />
  3303. </div>
  3304. </Spin>
  3305. </Modal>
  3306. <Modal
  3307. visible={this.state.dvisible}
  3308. footer=""
  3309. title="所有列表信息"
  3310. className="admin-desc-content"
  3311. width="1300px"
  3312. onCancel={() => {
  3313. this.loadData();
  3314. this.setState({
  3315. dvisible: false
  3316. });
  3317. }}
  3318. >
  3319. <Spin spinning={this.state.loading}>
  3320. <div
  3321. className="patent-table"
  3322. style={{
  3323. // width: 900,
  3324. // position: "relative",
  3325. // left: "50%",
  3326. // transform: "translate(-50%)",
  3327. padding: "25px 0 30px 30px"
  3328. }}
  3329. ref={e => {
  3330. this.refs.all = e;
  3331. }}
  3332. >
  3333. <Table
  3334. columns={this.state.printColumns}
  3335. dataSource={this.state.dataSource}
  3336. pagination={false}
  3337. bordered
  3338. size="small"
  3339. />
  3340. </div>
  3341. </Spin>
  3342. <ReactToPrint
  3343. trigger={() => (
  3344. <Button
  3345. type="primary"
  3346. style={{
  3347. float: "right",
  3348. marginTop: 10,
  3349. position: "absolute",
  3350. top: 0,
  3351. right: 30
  3352. }}
  3353. >
  3354. 打印
  3355. </Button>
  3356. )}
  3357. content={() => this.refs.all}
  3358. />
  3359. </Modal>
  3360. <Modal
  3361. visible={this.state.timeVisible}
  3362. footer=""
  3363. title="工时详情"
  3364. className="admin-desc-content"
  3365. width="1300px"
  3366. pagination={false}
  3367. onCancel={() => {
  3368. this.loadData();
  3369. this.setState({
  3370. timeVisible: false
  3371. });
  3372. }}
  3373. >
  3374. <Spin spinning={this.state.loading}>
  3375. <div
  3376. className="patent-table"
  3377. style={
  3378. {
  3379. // width: 900,
  3380. // position: "relative",
  3381. // left: "50%",
  3382. // transform: "translate(-50%)",
  3383. // padding: "25px 0 30px 30px"
  3384. }
  3385. }
  3386. ref={e => {
  3387. this.refs.all = e;
  3388. }}
  3389. >
  3390. <Table
  3391. columns={this.state.timeColumns}
  3392. dataSource={this.state.timeDataList}
  3393. scroll={{ x: "max-content", y: 0 }}
  3394. pagination={false}
  3395. bordered
  3396. size="small"
  3397. />
  3398. </div>
  3399. </Spin>
  3400. <ReactToPrint
  3401. trigger={() => (
  3402. <Button
  3403. type="primary"
  3404. style={{
  3405. float: "right",
  3406. marginTop: 10,
  3407. position: "absolute",
  3408. top: 0,
  3409. right: 30
  3410. }}
  3411. >
  3412. 打印
  3413. </Button>
  3414. )}
  3415. content={() => this.refs.all}
  3416. />
  3417. </Modal>
  3418. <Modal
  3419. visible={this.state.cuiVisible}
  3420. footer=""
  3421. title="催款详情"
  3422. className="admin-desc-content"
  3423. width="1300px"
  3424. pagination={false}
  3425. onCancel={() => {
  3426. this.loadData();
  3427. this.setState({
  3428. cuiVisible: false
  3429. });
  3430. }}
  3431. >
  3432. <Spin spinning={this.state.loading}>
  3433. <div
  3434. className="patent-table"
  3435. style={
  3436. {
  3437. // width: 900,
  3438. // position: "relative",
  3439. // left: "50%",
  3440. // transform: "translate(-50%)",
  3441. // padding: "25px 0 30px 30px"
  3442. }
  3443. }
  3444. ref={e => {
  3445. this.refs.all = e;
  3446. }}
  3447. >
  3448. <Table
  3449. columns={this.state.cuiColumns}
  3450. dataSource={this.state.cuiDataList}
  3451. scroll={{ x: "max-content", y: 0 }}
  3452. pagination={false}
  3453. bordered
  3454. size="small"
  3455. />
  3456. </div>
  3457. </Spin>
  3458. <ReactToPrint
  3459. trigger={() => (
  3460. <Button
  3461. type="primary"
  3462. style={{
  3463. float: "right",
  3464. marginTop: 10,
  3465. position: "absolute",
  3466. top: 0,
  3467. right: 30
  3468. }}
  3469. >
  3470. 打印
  3471. </Button>
  3472. )}
  3473. content={() => this.refs.all}
  3474. />
  3475. </Modal>
  3476. <Modal
  3477. visible={this.state.proVisible}
  3478. footer=""
  3479. title="项目详情"
  3480. className="admin-desc-content"
  3481. width="1300px"
  3482. pagination={false}
  3483. onCancel={() => {
  3484. this.loadData();
  3485. this.setState({
  3486. proVisible: false
  3487. });
  3488. }}
  3489. >
  3490. <Spin spinning={this.state.loading}>
  3491. <div
  3492. className="patent-table"
  3493. style={
  3494. {
  3495. // width: 900,
  3496. // position: "relative",
  3497. // left: "50%",
  3498. // transform: "translate(-50%)",
  3499. // padding: "25px 0 30px 30px"
  3500. }
  3501. }
  3502. ref={e => {
  3503. this.refs.all = e;
  3504. }}
  3505. >
  3506. <Table
  3507. columns={this.state.proColumns}
  3508. dataSource={this.state.proDataList}
  3509. pagination={false}
  3510. bordered
  3511. size="small"
  3512. />
  3513. </div>
  3514. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  3515. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  3516. </span>
  3517. </Spin>
  3518. <ReactToPrint
  3519. trigger={() => (
  3520. <Button
  3521. type="primary"
  3522. style={{
  3523. float: "right",
  3524. marginTop: 10,
  3525. position: "absolute",
  3526. top: 0,
  3527. right: 30
  3528. }}
  3529. >
  3530. 打印
  3531. </Button>
  3532. )}
  3533. content={() => this.refs.all}
  3534. />
  3535. </Modal>
  3536. </div>
  3537. );
  3538. }
  3539. });
  3540. export default approvedOutsourcing;