approvedOutsourcingAll.jsx 105 KB

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