approvedOutsourcingAll.jsx 110 KB

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