approvedOutsourcingAll.jsx 109 KB

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