approvedOutsourcing.jsx 104 KB

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