approvedOutsourcingAll.jsx 109 KB

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