shouKuang.jsx 132 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import "./public.less";
  5. import "./shouKuan.less";
  6. import {
  7. AutoComplete,
  8. Button,
  9. Form,
  10. Input,
  11. Spin,
  12. Table,
  13. Select,
  14. message,
  15. DatePicker,
  16. Modal,
  17. Tabs,
  18. Col,
  19. Tag,
  20. Popconfirm,
  21. Tooltip,
  22. } from "antd";
  23. import OrderDesc from "../orderDetail/orderDesc";
  24. import ResolutionDetail from "@/resolutionDetail";
  25. import Receivable from "./receivable";
  26. import Assign from "@/manageCenter/publicComponent/assign";
  27. import KaiPiaoModal from "./kaiPiaoModal";
  28. import ReactToPrint from "react-to-print";
  29. import {
  30. getLiquidationStatus,
  31. getProcessStatus,
  32. getApproval,
  33. getInvoiceStatus,
  34. getTransactionProject,
  35. getTaskStatus,
  36. getNewOrderStatus,
  37. getProjectStatus,
  38. getjiedian,
  39. splitUrl,
  40. getApprovalTag,
  41. getProjectName,
  42. getClockState,
  43. } from "@/tools";
  44. import { ChooseList } from "../../order/orderNew/chooseList"
  45. import Project from "../../../../component/project"
  46. import LogPopup from "../../../common/logPopup";
  47. import { throws } from "assert";
  48. import { clockState, salesList } from "@/dataDic";
  49. import OrderItemStatus from "../../../common/orderItemStatus";
  50. import Cascaders from "../../../common/cascaders";
  51. const FormItem = Form.Item;
  52. const { TabPane } = Tabs;
  53. const { TextArea } = Input;
  54. const ShouKuang = React.createClass({
  55. //获取上级组织
  56. selectSuperId() {
  57. $.ajax({
  58. method: "get",
  59. dataType: "json",
  60. crossDomain: false,
  61. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  62. data: {},
  63. success: function (data) {
  64. let theArr = [];
  65. if (data.error && data.error.length === 0) {
  66. for (let i = 0; i < data.data.length; i++) {
  67. let theData = data.data[i];
  68. theArr.push(
  69. <Select.Option value={theData.id} key={theData.id}>
  70. {theData.name}
  71. </Select.Option>
  72. );
  73. }
  74. this.setState({
  75. contactsOption: theArr,
  76. });
  77. } else {
  78. message.warning(data.error[0].message);
  79. }
  80. }.bind(this),
  81. }).always(
  82. function () {
  83. this.setState({
  84. loading: false,
  85. });
  86. }.bind(this)
  87. );
  88. },
  89. departmentList() {
  90. // this.setState({
  91. // loading: true
  92. // });
  93. $.ajax({
  94. method: "get",
  95. dataType: "json",
  96. crossDomain: false,
  97. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  98. data: {},
  99. success: function (data) {
  100. let thedata = data.data;
  101. let theArr = [];
  102. if (!thedata) {
  103. if (data.error && data.error.length) {
  104. message.warning(data.error[0].message);
  105. }
  106. } else {
  107. thedata.map(function (item, index) {
  108. theArr.push({
  109. key: index,
  110. name: item.name,
  111. id: item.id,
  112. });
  113. });
  114. }
  115. this.setState({
  116. departmentArr: theArr,
  117. });
  118. }.bind(this),
  119. }).always(
  120. function () {
  121. // this.setState({
  122. // loading: false
  123. // });
  124. }.bind(this)
  125. );
  126. },
  127. loadData(pageNo, pageSize) {
  128. this.state.data = [];
  129. this.state.pagination.pageSize = 10;
  130. this.setState({
  131. // selectedRowKeys: [],
  132. // selectedRowKey: [],
  133. page: pageNo || this.state.pageNo,
  134. loadingA: true,
  135. pagination: this.state.pagination,
  136. });
  137. $.ajax({
  138. method: "get",
  139. dataType: "json",
  140. crossDomain: false,
  141. url: globalConfig.context + "/api/admin/financial/financeList",
  142. data: {
  143. pageNo: pageNo || 1,
  144. pageSize: pageSize || this.state.pagination.pageSize,
  145. buyerName: this.state.nameSearch, //客户名称
  146. orderNo: this.state.orderNoSearch,
  147. startTime: this.state.releaseDate[0],
  148. endTime: this.state.releaseDate[1],
  149. startFinalReceivablesTime: this.state.shouKuanDate[0],
  150. endFinalReceivablesTime: this.state.shouKuanDate[1],
  151. deps: this.state.departmenttList,
  152. processStatus: this.state.processStatusSearch,
  153. contractNo: this.state.contractNoSearch,
  154. liquidationStatus: this.state.liquidationStatus,
  155. amountStatus: this.state.amountStatus,
  156. approval: this.state.approval,
  157. projectType: this.state.projectType,
  158. myExamine: this.state.myExamine,
  159. },
  160. success: function (data) {
  161. let theArr = [];
  162. if (!data.data || !data.data.pagination.list) {
  163. if (data.error && data.error.length) {
  164. message.warning(data.error[0].message);
  165. }
  166. } else {
  167. for (let i = 0; i < data.data.pagination.list.length; i++) {
  168. let thisdata = data.data.pagination.list[i];
  169. thisdata.key = thisdata.orderNo;
  170. theArr.push(thisdata);
  171. }
  172. }
  173. this.state.pagination.current = data.data.pagination.pageNo;
  174. this.state.pagination.total = data.data.pagination.totalCount;
  175. if (
  176. data.data &&
  177. data.data.pagination.list &&
  178. !data.data.pagination.list.length
  179. ) {
  180. this.state.pagination.current = 0;
  181. this.state.pagination.total = 0;
  182. }
  183. this.setState({
  184. totalPage: data.data.pagination.totalPage,
  185. dataSource: theArr,
  186. pagination: this.state.pagination,
  187. totalHui: data.data.count ? data.data.count.signTotalAmount : 0,
  188. hui: data.data.count ? data.data.count.actuallyTotalAmount : 0,
  189. });
  190. }.bind(this),
  191. }).always(
  192. function () {
  193. // window.setTimeout(() => {
  194. this.setState({
  195. loadingA: false,
  196. });
  197. // },5000)
  198. }.bind(this)
  199. );
  200. },
  201. getInitialState() {
  202. return {
  203. cuiTabKey: "1",
  204. pubVisible: false,
  205. pubDataList: [],
  206. pubpageNo: 1,
  207. pubpagination: {
  208. defaultCurrent: 1,
  209. defaultPageSize: 10,
  210. showQuickJumper: true,
  211. pageSize: 10,
  212. onChange: function (page) {
  213. this.loadData(page);
  214. }.bind(this),
  215. showTotal: function (total) {
  216. return "共" + total + "条数据";
  217. },
  218. },
  219. searchMore: true,
  220. dvisible: false,
  221. pageNo: 1,
  222. assignVisibleX: false,
  223. assignVisibleY: false,
  224. releaseDate: [],
  225. shouKuanDate: [],
  226. assignDataX: [],
  227. assignDataY: [],
  228. totalPage: 0,
  229. processStatusSearch: [],//默认搜索无流程状态
  230. boHuivisible: false,
  231. selectedRowKeys: [],
  232. selectedRows: [],
  233. loading: false,
  234. loadingA: false,
  235. pagination: {
  236. defaultCurrent: 1,
  237. defaultPageSize: 10,
  238. showQuickJumper: true,
  239. pageSize: 10,
  240. onChange: function (page) {
  241. // console.log(page);
  242. this.setState({
  243. pageNo: page,
  244. });
  245. this.loadData(page);
  246. }.bind(this),
  247. showTotal: function (total) {
  248. return "共" + total + "条数据";
  249. },
  250. },
  251. // 子组件改变的表格title数组
  252. changeList: undefined,
  253. pubColumns: [
  254. {
  255. title: "编号",
  256. dataIndex: "key",
  257. key: "key",
  258. width: 45,
  259. },
  260. {
  261. title: "公出类型",
  262. dataIndex: "type",
  263. key: "type",
  264. width: 70,
  265. render: (text) =>
  266. <span
  267. style={{ color: ["#1D4FEA", "#1E90FF", "#FF5500", "red"][text] }}
  268. >
  269. {
  270. text === 0
  271. ? "业务公出" : text === 1
  272. ? "技术公出" : text === 2
  273. ? "行政公出" : text === 3
  274. ? "技术协单" : ""
  275. }
  276. </span>
  277. },
  278. {
  279. title: "客户名称",
  280. dataIndex: "nickname",
  281. key: "nickname",
  282. width: 80,
  283. render: (text) => {
  284. return (
  285. <div
  286. style={{
  287. width: 80,
  288. wordBreak: "break-all",
  289. }}
  290. >
  291. {text}
  292. </div>
  293. );
  294. },
  295. },
  296. {
  297. title: "跟单人",
  298. dataIndex: "sname",
  299. key: "sname",
  300. width: 70,
  301. render: (text) => {
  302. return (
  303. <Tooltip title={text}>
  304. <div
  305. style={{
  306. width: 90,
  307. overflow: "hidden",
  308. textOverflow: "ellipsis",
  309. whiteSpace: "nowrap",
  310. }}
  311. >
  312. {text}
  313. </div>
  314. </Tooltip>
  315. );
  316. },
  317. },
  318. {
  319. title: "公出人",
  320. dataIndex: "aname",
  321. key: "aname",
  322. width: 70,
  323. render: (text) => {
  324. return (
  325. <Tooltip title={text}>
  326. <div
  327. style={{
  328. width: 90,
  329. overflow: "hidden",
  330. textOverflow: "ellipsis",
  331. whiteSpace: "nowrap",
  332. }}
  333. >
  334. {text}
  335. </div>
  336. </Tooltip>
  337. );
  338. },
  339. },
  340. // {
  341. // title: "申请时间",
  342. // dataIndex: "createTimes",
  343. // key: "createTimes",
  344. // width: 130,
  345. // },
  346. {
  347. title: "公出时间",
  348. dataIndex: "releaseStarts",
  349. key: "releaseStarts",
  350. width: 130,
  351. render: (text, record) => (
  352. <div>
  353. <div>{text}</div>
  354. <div style={{ paddingLeft: "44px" }}>至</div>
  355. <div>{record.releaseEnds}</div>
  356. </div>
  357. ),
  358. },
  359. {
  360. title: "公出地点",
  361. dataIndex: "userName",
  362. key: "userName",
  363. width: 120,
  364. render: (text) => {
  365. return (
  366. <div>{text}</div>
  367. );
  368. },
  369. },
  370. {
  371. title: "打卡时间",
  372. dataIndex: "clockInTimes",
  373. key: "clockInTimes",
  374. width: 75,
  375. },
  376. {
  377. title: "时长(时)",
  378. dataIndex: "duration",
  379. key: "duration",
  380. width: 50,
  381. },
  382. {
  383. title: "打卡状态",
  384. dataIndex: "clockIn",
  385. key: "clockIn",
  386. width: 65,
  387. render: (text) => (
  388. <span
  389. style={{ color: ["#F21212", "#34DE38"][text] }}
  390. >
  391. {["未打卡", "已打卡"][text]}
  392. </span>
  393. )
  394. },
  395. {
  396. title: "审核状态",
  397. dataIndex: "status",
  398. key: "status",
  399. width: 110,
  400. render: (text, record) => (
  401. <div style={{ display: "flex", flexDirection: "row", flexWrap: "warp" }}>
  402. <Tag color={getClockState(text).color}>
  403. {getClockState(text).title}
  404. </Tag>
  405. {record.updateStatus == 1 && <Tag color="#1E90FF">改</Tag>}
  406. </div>
  407. ),
  408. },
  409. {
  410. title: "审核/指导",
  411. dataIndex: "auditInfo",
  412. key: "auditInfo",
  413. width: 160,
  414. render: (text) => {
  415. return <div style={{ wordBreak: "break-all" }}>{text}</div>;
  416. },
  417. },
  418. ],
  419. proColumns: [
  420. {
  421. title: "序号",
  422. dataIndex: "key",
  423. key: "key",
  424. },
  425. {
  426. title: "合同编号",
  427. dataIndex: "contractNo",
  428. key: "contractNo",
  429. },
  430. {
  431. title: "订单编号",
  432. dataIndex: "orderNo",
  433. key: "orderNo",
  434. },
  435. // {
  436. // title: "项目编号",
  437. // dataIndex: "id",
  438. // key: "id"
  439. // },
  440. {
  441. title: "客户名称",
  442. dataIndex: "userName",
  443. key: "userName",
  444. render: text => {
  445. return (
  446. <Tooltip title={text}>
  447. <div
  448. // style={{
  449. // maxWidth: '150px',
  450. // overflow: 'hidden',
  451. // textOverflow: "ellipsis",
  452. // whiteSpace: 'nowrap',
  453. // }}
  454. >{text}</div>
  455. </Tooltip>
  456. )
  457. }
  458. },
  459. {
  460. title: "订单负责人",
  461. dataIndex: "salesmanName",
  462. key: "salesmanName",
  463. },
  464. {
  465. title: "是否主项目",
  466. dataIndex: "main",
  467. key: "main",
  468. render: (text) => {
  469. return text == 0 ? "否" : "是";
  470. },
  471. },
  472. {
  473. title: "项目类别",
  474. dataIndex: "cname",
  475. key: "cname",
  476. },
  477. {
  478. title: "项目名称",
  479. dataIndex: "commodityName",
  480. key: "commodityName",
  481. },
  482. {
  483. title: "项目数量",
  484. dataIndex: "commodityQuantity",
  485. key: "commodityQuantity",
  486. render: (text, record) => {
  487. if (record.splitStatus == 1) {
  488. return (
  489. <span>
  490. {text}{" "}
  491. <Tag
  492. color="#108ee9"
  493. onClick={(e) => {
  494. e.stopPropagation();
  495. this.showRes(record);
  496. }}
  497. >
  498. 已拆
  499. </Tag>
  500. </span>
  501. );
  502. } else {
  503. return text;
  504. }
  505. },
  506. },
  507. {
  508. title: "服务市价",
  509. dataIndex: "commodityPrice",
  510. key: "commodityPrice",
  511. },
  512. {
  513. title: "证书编号",
  514. dataIndex: "certificateNumber",
  515. key: "certificateNumber",
  516. },
  517. {
  518. title: "项目状态",
  519. dataIndex: "projectStatus",
  520. key: "projectStatus",
  521. render: (text) => {
  522. return getProjectName(text);
  523. },
  524. },
  525. {
  526. title: "项目说明",
  527. dataIndex: "taskComment",
  528. key: "taskComment",
  529. },
  530. {
  531. title: "是否外包",
  532. dataIndex: "outsource",
  533. key: "outsource",
  534. render: (text) => {
  535. if (text == 0) {
  536. return "否";
  537. } else if (text == 1) {
  538. return "是";
  539. }
  540. },
  541. },
  542. // {
  543. // title: "外包(内部)公司",
  544. // dataIndex: "outsourceName",
  545. // key: "outsourceName",
  546. // },
  547. // {
  548. // title: "外包(内部)价格",
  549. // dataIndex: "outsourcePrice",
  550. // key: "outsourcePrice",
  551. // },
  552. ],
  553. qianColumns: [
  554. {
  555. title: "序号",
  556. dataIndex: "key",
  557. key: "key",
  558. },
  559. {
  560. title: "合同编号",
  561. dataIndex: "contractNo",
  562. key: "contractNo",
  563. },
  564. {
  565. title: "订单编号",
  566. dataIndex: "orderNo",
  567. key: "orderNo",
  568. },
  569. {
  570. title: "客户名称",
  571. dataIndex: "userName",
  572. key: "userName",
  573. render: text => {
  574. return (
  575. <Tooltip title={text}>
  576. <div
  577. // style={{
  578. // maxWidth: '150px',
  579. // overflow: 'hidden',
  580. // textOverflow: "ellipsis",
  581. // whiteSpace: 'nowrap',
  582. // }}
  583. >{text}</div>
  584. </Tooltip>
  585. )
  586. }
  587. },
  588. {
  589. title: "订单负责人",
  590. dataIndex: "salesmanName",
  591. key: "salesmanName",
  592. },
  593. {
  594. title: "订单部门",
  595. dataIndex: "depName",
  596. key: "depName",
  597. },
  598. {
  599. title: "订单状态",
  600. dataIndex: "orderStatus",
  601. key: "orderStatus",
  602. render: (text) => {
  603. return getNewOrderStatus(text);
  604. },
  605. },
  606. {
  607. title: "项目状态",
  608. dataIndex: "projectStatus",
  609. key: "projectStatus",
  610. render: (text) => {
  611. return getProjectName(text);
  612. },
  613. },
  614. {
  615. title: "签单金额",
  616. dataIndex: "totalAmount",
  617. key: "totalAmount",
  618. },
  619. {
  620. title: "结算状态",
  621. dataIndex: "liquidationStatus",
  622. key: "liquidationStatus",
  623. render: (text) => {
  624. return getLiquidationStatus(text);
  625. },
  626. },
  627. {
  628. title: "已收款",
  629. dataIndex: "settlementAmount",
  630. key: "settlementAmount",
  631. },
  632. {
  633. title: "欠款",
  634. dataIndex: "orderArrears",
  635. key: "orderArrears",
  636. },
  637. {
  638. title: "催收科目",
  639. dataIndex: "type",
  640. key: "type",
  641. render: (text) => {
  642. return "按时触发应收欠款";
  643. },
  644. },
  645. {
  646. title: "催款状态",
  647. dataIndex: "dunStatus",
  648. key: "dunStatus",
  649. render: (text) => {
  650. if (text == 0) {
  651. return "未启动";
  652. } else if (text == 1) {
  653. return "催款中";
  654. } else if (text == 2) {
  655. return "已完成";
  656. } else if (text == 3) {
  657. return "已停止";
  658. }
  659. },
  660. },
  661. {
  662. title: "催收启动时间",
  663. dataIndex: "startDate",
  664. key: "startDate",
  665. },
  666. ],
  667. cuiColumns: [
  668. {
  669. title: "序号",
  670. dataIndex: "key",
  671. key: "key",
  672. },
  673. {
  674. title: "合同编号",
  675. dataIndex: "contractNo",
  676. key: "contractNo",
  677. },
  678. {
  679. title: "订单编号",
  680. dataIndex: "orderNo",
  681. key: "orderNo",
  682. },
  683. {
  684. title: "客户名称",
  685. dataIndex: "userName",
  686. key: "userName",
  687. render: text => {
  688. return (
  689. <Tooltip title={text}>
  690. <div
  691. // style={{
  692. // maxWidth: '150px',
  693. // overflow: 'hidden',
  694. // textOverflow: "ellipsis",
  695. // whiteSpace: 'nowrap',
  696. // }}
  697. >{text}</div>
  698. </Tooltip>
  699. )
  700. }
  701. },
  702. {
  703. title: "订单负责人",
  704. dataIndex: "salesmanName",
  705. key: "salesmanName",
  706. },
  707. {
  708. title: "订单部门",
  709. dataIndex: "depName",
  710. key: "depName",
  711. },
  712. {
  713. title: "订单状态",
  714. dataIndex: "orderStatus",
  715. key: "orderStatus",
  716. render: (text) => {
  717. return getNewOrderStatus(text);
  718. },
  719. },
  720. {
  721. title: "项目状态",
  722. dataIndex: "projectStatus",
  723. key: "projectStatus",
  724. render: (text) => {
  725. return getProjectName(text);
  726. },
  727. },
  728. {
  729. title: "签单金额",
  730. dataIndex: "totalAmount",
  731. key: "totalAmount",
  732. },
  733. {
  734. title: "结算状态",
  735. dataIndex: "liquidationStatus",
  736. key: "liquidationStatus",
  737. render: (text) => {
  738. return getLiquidationStatus(text);
  739. },
  740. },
  741. {
  742. title: "已收款",
  743. dataIndex: "settlementAmount",
  744. key: "settlementAmount",
  745. },
  746. {
  747. title: "应收款",
  748. dataIndex: "accountsReceivable",
  749. key: "accountsReceivable",
  750. },
  751. {
  752. title: "催收科目",
  753. dataIndex: "dunSubject",
  754. key: "dunSubject",
  755. // render: text => {
  756. // return getjiedian(text);
  757. // }
  758. },
  759. {
  760. title: "催款状态",
  761. dataIndex: "dunStatus",
  762. key: "dunStatus",
  763. },
  764. {
  765. title: "催收启动时间",
  766. dataIndex: "startDate",
  767. key: "startDate",
  768. },
  769. ],
  770. timeColumns: [
  771. {
  772. title: "合同编号",
  773. dataIndex: "contractNo",
  774. key: "contractNo",
  775. },
  776. {
  777. title: "订单编号",
  778. dataIndex: "orderNo",
  779. key: "orderNo",
  780. },
  781. {
  782. title: "项目编号",
  783. dataIndex: "id",
  784. key: "id",
  785. render: (text, record) => {
  786. if (record.splitStatus == 2) {
  787. return <span>{record.splitSuper + "-" + record.splitId}</span>;
  788. } else {
  789. return text;
  790. }
  791. },
  792. },
  793. {
  794. title: "客户名称",
  795. dataIndex: "userName",
  796. key: "userName",
  797. render: text => {
  798. return (
  799. <Tooltip title={text}>
  800. <div
  801. // style={{
  802. // maxWidth: '150px',
  803. // overflow: 'hidden',
  804. // textOverflow: "ellipsis",
  805. // whiteSpace: 'nowrap',
  806. // }}
  807. >{text}</div>
  808. </Tooltip>
  809. )
  810. }
  811. },
  812. {
  813. title: "订单部门",
  814. dataIndex: "depName",
  815. key: "depName",
  816. },
  817. {
  818. title: "订单负责人",
  819. dataIndex: "salesmanName",
  820. key: "salesmanName",
  821. },
  822. {
  823. title: "项目类别",
  824. dataIndex: "cname",
  825. key: "cname",
  826. },
  827. {
  828. title: "项目名称",
  829. dataIndex: "taskName",
  830. key: "taskName",
  831. },
  832. {
  833. title: "项目负责人",
  834. dataIndex: "receiverName",
  835. key: "receiverName",
  836. },
  837. {
  838. title: "项目价格(万元)",
  839. dataIndex: "commodityPrice",
  840. key: "commodityPrice",
  841. },
  842. {
  843. title: "数量(个)",
  844. dataIndex: "commodityQuantity",
  845. key: "commodityQuantity",
  846. },
  847. {
  848. title: "任务状态",
  849. dataIndex: "taskStatus",
  850. key: "taskStatus",
  851. render: (text) => {
  852. return getTaskStatus(text);
  853. },
  854. },
  855. {
  856. title: "项目状态",
  857. dataIndex: "projectStatus",
  858. key: "projectStatus",
  859. render: (text) => {
  860. return getProjectName(text);
  861. },
  862. },
  863. {
  864. title: "工时",
  865. dataIndex: "hours",
  866. key: "hours",
  867. },
  868. {
  869. title: "是否外包",
  870. dataIndex: "outsource",
  871. key: "outsource",
  872. render: (text) => {
  873. if (text == 0) {
  874. return "否";
  875. } else if (text == 1) {
  876. return "是";
  877. }
  878. },
  879. },
  880. {
  881. title: "签单日期",
  882. dataIndex: "signTime",
  883. key: "signTime",
  884. },
  885. {
  886. title: "派单日期",
  887. dataIndex: "creteTime",
  888. key: "creteTime",
  889. },
  890. {
  891. title: "分配时间",
  892. dataIndex: "taskDistributionTime",
  893. key: "taskDistributionTime",
  894. },
  895. {
  896. title: "完成时间",
  897. dataIndex: "taskEndTime",
  898. key: "taskEndTime",
  899. },
  900. ],
  901. printColumns: [
  902. {
  903. title: "合同编号",
  904. dataIndex: "contractNo",
  905. key: "contractNo",
  906. },
  907. {
  908. title: "订单编号",
  909. dataIndex: "orderNo",
  910. key: "orderNo",
  911. // fixed: "left"
  912. },
  913. {
  914. title: "客户名称",
  915. dataIndex: "buyerName",
  916. key: "buyerName",
  917. render: text => {
  918. return (
  919. <Tooltip title={text}>
  920. <div
  921. // style={{
  922. // maxWidth: '150px',
  923. // overflow: 'hidden',
  924. // textOverflow: "ellipsis",
  925. // whiteSpace: 'nowrap',
  926. // }}
  927. >{text}</div>
  928. </Tooltip>
  929. )
  930. }
  931. },
  932. {
  933. title: "订单部门",
  934. dataIndex: "departmentName",
  935. key: "departmentName",
  936. },
  937. {
  938. title: "订单负责人",
  939. dataIndex: "sellerName",
  940. key: "sellerName",
  941. },
  942. {
  943. title: "签单日期",
  944. dataIndex: "signTime",
  945. key: "signTime",
  946. },
  947. {
  948. title: "下单日期",
  949. dataIndex: "createTime",
  950. key: "createTime",
  951. },
  952. {
  953. title: "签单金额(万元)",
  954. dataIndex: "signTotalAmount",
  955. key: "signTotalAmount",
  956. render: (text) => {
  957. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  958. },
  959. },
  960. {
  961. title: "开票金额(万元)",
  962. dataIndex: "invoiceAmount",
  963. key: "invoiceAmount",
  964. render: (text) => {
  965. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  966. },
  967. },
  968. {
  969. title: "已收款(万元)",
  970. dataIndex: "actuallyTotalAmount",
  971. key: "actuallyTotalAmount",
  972. render: (text) => {
  973. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  974. },
  975. },
  976. {
  977. title: "总成本(万元)",
  978. dataIndex: "costAmount",
  979. key: "costAmount",
  980. render: (text) => {
  981. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  982. }
  983. },
  984. {
  985. title: "已付成本(万元)",
  986. dataIndex: "paymentAmount",
  987. key: "paymentAmount",
  988. render: (text) => {
  989. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  990. },
  991. },
  992. {
  993. title: "最近收款(万元)",
  994. dataIndex: "finalReceivables",
  995. key: "finalReceivables",
  996. render: (text) => {
  997. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  998. },
  999. },
  1000. {
  1001. title: "最近收款时间",
  1002. dataIndex: "finalReceivablesTime",
  1003. key: "finalReceivablesTime",
  1004. },
  1005. {
  1006. title: "结算状态",
  1007. dataIndex: "liquidationStatus",
  1008. key: "liquidationStatus",
  1009. render: (text) => {
  1010. return getLiquidationStatus(text);
  1011. },
  1012. },
  1013. {
  1014. title: "流程状态",
  1015. dataIndex: "processStatus",
  1016. key: "processStatus",
  1017. render: (text, record) => {
  1018. return getProcessStatus(text, record.examineName, record.approval);
  1019. },
  1020. },
  1021. {
  1022. title: "特批状态",
  1023. dataIndex: "approval",
  1024. key: "approval",
  1025. render: (text) => {
  1026. return getApproval(text);
  1027. },
  1028. },
  1029. ],
  1030. columns: [
  1031. {
  1032. title: "销售类型",
  1033. dataIndex: "salesType",
  1034. key: "salesType",
  1035. className: "title-table",
  1036. fixed: "left",
  1037. render: (text, record) => {
  1038. return (
  1039. <Tooltip
  1040. title={salesList[text] + ((text == 3 || text == 4 || text == 5) ? (!record.other ? "" : "," + record.other) : "")}
  1041. >
  1042. <span>
  1043. {salesList[text]}
  1044. </span>
  1045. </Tooltip>
  1046. );
  1047. },
  1048. },
  1049. {
  1050. title: "合同编号",
  1051. dataIndex: "contractNo",
  1052. key: "contractNo",
  1053. className: "title-table",
  1054. fixed: "left",
  1055. render: (text, record) => {
  1056. return (
  1057. <Tooltip
  1058. title={
  1059. <Button
  1060. type="primary"
  1061. onClick={(e) => {
  1062. e.stopPropagation();
  1063. let input = document.getElementById("copyText");
  1064. input.value = text;
  1065. input.select();
  1066. document.execCommand("copy");
  1067. message.success("复制成功");
  1068. }}
  1069. >
  1070. 复制
  1071. </Button>
  1072. }
  1073. >
  1074. <div>
  1075. {text}
  1076. <div style={{ display: "flex" }}>
  1077. <OrderItemStatus deleteSign={record.deleteSign} />
  1078. {getApprovalTag(record.approval)}
  1079. </div>
  1080. </div>
  1081. </Tooltip>
  1082. );
  1083. },
  1084. },
  1085. {
  1086. title: "客户名称",
  1087. dataIndex: "buyerName",
  1088. key: "buyerName",
  1089. className: "title-table",
  1090. fixed: "left",
  1091. width: 150,
  1092. render: text => {
  1093. return (
  1094. <Tooltip title={text}>
  1095. <div
  1096. // style={{
  1097. // maxWidth: '150px',
  1098. // overflow: 'hidden',
  1099. // textOverflow: "ellipsis",
  1100. // whiteSpace: 'nowrap',
  1101. // }}
  1102. >{text}</div>
  1103. </Tooltip>
  1104. )
  1105. }
  1106. },
  1107. {
  1108. title: "订单编号",
  1109. dataIndex: "orderNo",
  1110. key: "orderNo",
  1111. className: "title-table",
  1112. fixed: "left",
  1113. width: 150,
  1114. render: (text, record) => {
  1115. return (
  1116. <Tooltip
  1117. title={
  1118. <Button
  1119. type="primary"
  1120. onClick={(e) => {
  1121. e.stopPropagation();
  1122. let input = document.getElementById("copyText");
  1123. input.value = text;
  1124. input.select();
  1125. document.execCommand("copy");
  1126. message.success("复制成功");
  1127. }}
  1128. >
  1129. 复制
  1130. </Button>
  1131. }
  1132. >
  1133. <div>
  1134. {text}
  1135. <div>
  1136. {record.signTotalAmount >= 10 && <Tag color="#ef7207">大客户</Tag>}
  1137. {record.projectType == 1 && <Tag color="rgb(22, 155, 213)">会员</Tag>}
  1138. </div>
  1139. </div>
  1140. </Tooltip>
  1141. );
  1142. },
  1143. },
  1144. // {
  1145. // title: "特批状态",
  1146. // dataIndex: "approval",
  1147. // key: "approval",
  1148. // className: "title-table",
  1149. // render: (text) => {
  1150. // if (text == 1 || text == 2) {
  1151. // return <Tag color="#f50">{getApproval(text)}</Tag>;
  1152. // }
  1153. // return getApproval(text);
  1154. // },
  1155. // },
  1156. {
  1157. title: "订单部门",
  1158. dataIndex: "departmentName",
  1159. key: "departmentName",
  1160. className: "title-table",
  1161. },
  1162. {
  1163. title: "订单负责人",
  1164. dataIndex: "sellerName",
  1165. key: "sellerName",
  1166. className: "title-table",
  1167. },
  1168. {
  1169. title: "订单类型",
  1170. dataIndex: "serviceType",
  1171. key: "serviceType",
  1172. className: "title-table",
  1173. width: 150,
  1174. render: (text) => {
  1175. return !!text && text.replace(/[,,]/g, "+");
  1176. }
  1177. },
  1178. {
  1179. title: "订单内容",
  1180. dataIndex: "serviceProject",
  1181. key: "serviceProject",
  1182. className: "title-table",
  1183. render: (text) => {
  1184. return (<div dangerouslySetInnerHTML={{ __html: !!text && text.replace(/[,,]/g, "<br/>") }} />);
  1185. // return (<pre>{!!text && text.replace(/[,,]/g, "\n")}</pre>);
  1186. }
  1187. },
  1188. {
  1189. title: "财务负责人",
  1190. dataIndex: "financeName",
  1191. key: "financeName",
  1192. className: "title-table",
  1193. },
  1194. {
  1195. title: "签单日期",
  1196. dataIndex: "signTime",
  1197. key: "signTime",
  1198. className: "title-table",
  1199. },
  1200. {
  1201. title: "下单日期",
  1202. dataIndex: "createTime",
  1203. key: "createTime",
  1204. className: "title-table",
  1205. },
  1206. {
  1207. title: "签单金额(万元)",
  1208. dataIndex: "signTotalAmount",
  1209. key: "signTotalAmount",
  1210. className: "title-table",
  1211. render: (text) => {
  1212. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1213. }
  1214. },
  1215. {
  1216. title: "开票金额(万元)",
  1217. dataIndex: "invoiceAmount",
  1218. key: "invoiceAmount",
  1219. className: "title-table",
  1220. render: (text) => {
  1221. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1222. }
  1223. },
  1224. {
  1225. title: "已收款(万元)",
  1226. dataIndex: "actuallyTotalAmount",
  1227. key: "actuallyTotalAmount",
  1228. className: "title-table",
  1229. render: (text) => {
  1230. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1231. }
  1232. },
  1233. {
  1234. title: "应收款(万元)",
  1235. dataIndex: "orderReceivables",
  1236. key: "orderReceivables",
  1237. className: "title-table",
  1238. render: (text) => {
  1239. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1240. }
  1241. },
  1242. {
  1243. title: "欠款(万元)",
  1244. dataIndex: "orderArrears",
  1245. key: "orderArrears",
  1246. className: "title-table",
  1247. render: (text) => {
  1248. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1249. }
  1250. },
  1251. {
  1252. title: "总成本/实付",
  1253. dataIndex: "costAmount",
  1254. key: "costAmount",
  1255. className: "title-table",
  1256. render: (text, record) => {
  1257. return (
  1258. <span>
  1259. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1260. {isNaN(parseFloat(record.paymentAmount)) ? text : parseFloat(record.paymentAmount)}
  1261. </span>
  1262. )
  1263. },
  1264. },
  1265. {
  1266. title: "专利/专利已付",
  1267. dataIndex: "patentCost",
  1268. key: "patentCost",
  1269. className: "title-table",
  1270. render: (text, record) => {
  1271. return (
  1272. <span>
  1273. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1274. {isNaN(parseFloat(record.patentCostActual)) ? text : parseFloat(record.patentCostActual)}
  1275. </span>
  1276. )
  1277. },
  1278. },
  1279. {
  1280. title: "软著/软著已付",
  1281. dataIndex: "softCost",
  1282. key: "softCost",
  1283. className: "title-table",
  1284. render: (text, record) => {
  1285. return (
  1286. <span>
  1287. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1288. {isNaN(parseFloat(record.softCostActual)) ? text : parseFloat(record.softCostActual)}
  1289. </span>
  1290. )
  1291. },
  1292. },
  1293. {
  1294. title: "审计/审计已付",
  1295. dataIndex: "auditCost",
  1296. key: "auditCost",
  1297. className: "title-table",
  1298. render: (text, record) => {
  1299. return (
  1300. <span>
  1301. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1302. {isNaN(parseFloat(record.auditCostActual)) ? text : parseFloat(record.auditCostActual)}
  1303. </span>
  1304. )
  1305. },
  1306. },
  1307. {
  1308. title: "其他/其他已付",
  1309. dataIndex: "otherCost",
  1310. key: "otherCost",
  1311. className: "title-table",
  1312. render: (text, record) => {
  1313. return (
  1314. <span>
  1315. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1316. {isNaN(parseFloat(record.otherCostActual)) ? text : parseFloat(record.otherCostActual)}
  1317. </span>
  1318. )
  1319. },
  1320. },
  1321. {
  1322. title: "预估毛利(万元)",
  1323. dataIndex: "expectProfit",
  1324. key: "expectProfit",
  1325. className: "title-table",
  1326. },
  1327. {
  1328. title: "实际毛利(万元)",
  1329. dataIndex: "actualProfit",
  1330. key: "actualProfit",
  1331. className: "title-table",
  1332. },
  1333. {
  1334. title: "最近收款(万元)",
  1335. dataIndex: "finalReceivables",
  1336. key: "finalReceivables",
  1337. className: "title-table",
  1338. render: (text) => {
  1339. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1340. }
  1341. },
  1342. {
  1343. title: "最近收款时间",
  1344. dataIndex: "finalReceivablesTime",
  1345. key: "finalReceivablesTime",
  1346. className: "title-table",
  1347. },
  1348. {
  1349. title: "结算状态",
  1350. dataIndex: "liquidationStatus",
  1351. key: "liquidationStatus",
  1352. className: "title-table",
  1353. render: (text) => {
  1354. return getLiquidationStatus(text);
  1355. },
  1356. },
  1357. {
  1358. title: "流程状态",
  1359. dataIndex: "processStatus",
  1360. key: "processStatus",
  1361. className: "title-table",
  1362. render: (text, record) => {
  1363. return getProcessStatus(text, record.examineName, record.approval);
  1364. },
  1365. },
  1366. // {
  1367. // title: '订单状态',
  1368. // dataIndex: 'orderStatus',
  1369. // key: 'orderStatus',
  1370. // render: text => { return getNewOrderStatus(text)}
  1371. // },
  1372. {
  1373. title: "操作",
  1374. dataIndex: "caozuo",
  1375. key: "caouzo",
  1376. className: "title-table",
  1377. fixed: "right",
  1378. render: (text, recard) => {
  1379. return (
  1380. <div>
  1381. {/* {recard.backStatus == 3 ? <Tag>已驳回</Tag> : ""} */}
  1382. {recard.processStatus == 3 && recard.myExamine == 0 &&
  1383. <Button
  1384. type="primary"
  1385. onClick={(e) => {
  1386. e.stopPropagation(), this.checkRemark(recard);
  1387. }}
  1388. style={{ marginLeft: "5px" }}
  1389. >
  1390. 通过
  1391. </Button>}
  1392. {recard.processStatus == 3 && recard.myExamine == 0 &&
  1393. <Button
  1394. type="danger"
  1395. style={{ marginLeft: "5px", }}
  1396. onClick={(e) => {
  1397. e.stopPropagation(), this.reject(recard);
  1398. }}
  1399. >
  1400. 驳回
  1401. </Button>
  1402. }
  1403. </div>
  1404. );
  1405. },
  1406. },
  1407. ],
  1408. dataSource: [],
  1409. searchTime: [],
  1410. columnsDate: [
  1411. {
  1412. title: "编号",
  1413. dataIndex: "id",
  1414. key: "id",
  1415. },
  1416. {
  1417. title: "订单编号",
  1418. dataIndex: "orderno",
  1419. key: "orderno",
  1420. },
  1421. {
  1422. title: "开票金额(万元)",
  1423. dataIndex: "amount",
  1424. key: "amount",
  1425. },
  1426. {
  1427. title: "申请时间",
  1428. dataIndex: "createTime",
  1429. key: "createTime",
  1430. },
  1431. {
  1432. title: "开票状态",
  1433. dataIndex: "status",
  1434. key: "status",
  1435. render: (text, record) => {
  1436. return <div>{getInvoiceStatus(text, record)} <LogPopup id={record.id} /></div>;
  1437. },
  1438. },
  1439. ],
  1440. waterlistDate: [
  1441. {
  1442. title: "订单编号",
  1443. dataIndex: "orderNo",
  1444. key: "orderNo",
  1445. },
  1446. {
  1447. title: "平台流水号",
  1448. dataIndex: "billNo",
  1449. key: "billNo",
  1450. // fixed: "left"
  1451. },
  1452. {
  1453. title: "收款金额(万元)",
  1454. dataIndex: "transactionAmount",
  1455. key: "transactionAmount",
  1456. },
  1457. {
  1458. title: "收款方",
  1459. dataIndex: "payeeName",
  1460. key: "payeeName",
  1461. },
  1462. {
  1463. title: "付款方",
  1464. dataIndex: "payerName",
  1465. key: "payerName",
  1466. },
  1467. {
  1468. title: "流水科目",
  1469. dataIndex: "transactionSubject",
  1470. key: "transactionSubject",
  1471. render: (text) => {
  1472. return getTransactionProject(text);
  1473. },
  1474. },
  1475. {
  1476. title: "收款类型",
  1477. dataIndex: "type",
  1478. key: "type",
  1479. },
  1480. {
  1481. title: "财务流水时间",
  1482. dataIndex: "financialPayTimes",
  1483. key: "financialPayTimes",
  1484. },
  1485. {
  1486. title: "财务流水号",
  1487. dataIndex: "financialPayNo",
  1488. key: "financialPayNo",
  1489. },
  1490. {
  1491. title: "订单负责人",
  1492. dataIndex: "saleName",
  1493. key: "saleName",
  1494. },
  1495. {
  1496. title: "创建时间",
  1497. dataIndex: "createTimes",
  1498. key: "createTimes",
  1499. },
  1500. {
  1501. title: "退款时间",
  1502. dataIndex: "refundTimes",
  1503. key: "refundTimes",
  1504. },
  1505. {
  1506. title: "删除时间",
  1507. dataIndex: "deleteTimes",
  1508. key: "deleteTimes",
  1509. },
  1510. {
  1511. title: "备注",
  1512. dataIndex: "remarks",
  1513. key: "remarks",
  1514. },
  1515. {
  1516. title: "流水状态",
  1517. dataIndex: "deleteSign",
  1518. key: "deleteSign",
  1519. render: (text, record) => {
  1520. if (!text) {
  1521. return (
  1522. <Popconfirm
  1523. title="是否删除?"
  1524. onConfirm={() => {
  1525. this.changeWater(record.billNo);
  1526. }}
  1527. okText="删除"
  1528. cancelText="不删除"
  1529. >
  1530. <Button>删除</Button>
  1531. </Popconfirm>
  1532. );
  1533. } else {
  1534. return <Tag>已删除</Tag>;
  1535. }
  1536. },
  1537. },
  1538. ],
  1539. waterData: [],
  1540. newVisible: "",
  1541. };
  1542. },
  1543. changeWater(billNo) {
  1544. this.setState({
  1545. loading: true,
  1546. });
  1547. $.ajax({
  1548. method: "get",
  1549. dataType: "json",
  1550. crossDomain: false,
  1551. url: globalConfig.context + "/api/admin/financial/deleteMyBill",
  1552. data: {
  1553. billNo,
  1554. },
  1555. success: function (data) {
  1556. let theArr = [];
  1557. if (data.error && data.error.length) {
  1558. message.warning(data.error[0].message);
  1559. } else {
  1560. message.warning("删除流水成功!");
  1561. this.waterData();
  1562. this.loadData();
  1563. }
  1564. }.bind(this),
  1565. }).always(
  1566. function () {
  1567. this.setState({
  1568. loading: false,
  1569. });
  1570. }.bind(this)
  1571. );
  1572. },
  1573. // 特批通过
  1574. evaluateZ(record) {
  1575. $.ajax({
  1576. method: "POST",
  1577. dataType: "json",
  1578. crossDomain: false,
  1579. url: globalConfig.context + "/api/admin/financial/financeApproval",
  1580. data: {
  1581. orderNo: record.orderNo,
  1582. },
  1583. }).done(
  1584. function (data) {
  1585. if (!data.error.length) {
  1586. message.success("通过成功!");
  1587. this.setState({
  1588. loading: false,
  1589. });
  1590. this.loadData();
  1591. } else {
  1592. message.warning(data.error[0].message);
  1593. }
  1594. }.bind(this)
  1595. );
  1596. },
  1597. /* 收款 */
  1598. evaluateX(recard) {
  1599. this.state.assignDataX = recard;
  1600. this.setState({
  1601. assignVisibleX: true,
  1602. });
  1603. },
  1604. /* 转交 */
  1605. evaluateY(recard, nub) {
  1606. this.state.assignDataY = recard;
  1607. this.setState({
  1608. nub,
  1609. assignVisibleY: true,
  1610. });
  1611. },
  1612. /* 驳回 */
  1613. reject(recard) {
  1614. this.setState({
  1615. bohuiData: recard,
  1616. boHuiVisible: true,
  1617. content: "",
  1618. });
  1619. },
  1620. boHuiOk() {
  1621. this.setState({
  1622. boHuiVisible: false,
  1623. });
  1624. if (
  1625. this.state.pagination.current == this.state.totalPage &&
  1626. this.state.pagination.total % 10 == 1
  1627. ) {
  1628. this.loadData(this.state.page - 1);
  1629. } else {
  1630. this.loadData(this.state.page);
  1631. }
  1632. },
  1633. boHuiCancel() {
  1634. this.setState({
  1635. boHuiVisible: false,
  1636. });
  1637. },
  1638. componentWillMount() {
  1639. this.loadData();
  1640. this.departmentList();
  1641. },
  1642. tableRowClick(record) {
  1643. this.state.RowData = record;
  1644. this.setState({
  1645. showDesc: true,
  1646. });
  1647. },
  1648. tableonRowClick(record) {
  1649. if (this.state.newVisible == "项目进度") {
  1650. this.state.onRowData = record;
  1651. this.setState({
  1652. pvisible: true,
  1653. record
  1654. })
  1655. }
  1656. },
  1657. closeDesc(e, s) {
  1658. this.state.showDesc = e;
  1659. if (s) {
  1660. this.loadData(this.state.page);
  1661. }
  1662. },
  1663. closeAssignX(e, s) {
  1664. this.state.assignDataX = {};
  1665. this.state.assignVisibleX = e;
  1666. if (s) {
  1667. this.loadData(this.state.page);
  1668. }
  1669. },
  1670. closeAssignY(e, s) {
  1671. this.state.assignDataY = {};
  1672. this.state.assignVisibleY = e;
  1673. if (s) {
  1674. this.loadData(this.state.page);
  1675. }
  1676. },
  1677. search() {
  1678. this.setState({
  1679. selectedRowKeys: []
  1680. })
  1681. this.loadData();
  1682. },
  1683. // 拆分详细
  1684. showRes(record) {
  1685. this.setState({
  1686. resVisible: true,
  1687. resRecord: record,
  1688. });
  1689. },
  1690. resCancel() {
  1691. this.setState({
  1692. resVisible: false,
  1693. });
  1694. },
  1695. reset() {
  1696. this.state.nameSearch = "";
  1697. this.state.releaseDate = [];
  1698. this.state.shouKuanDate = [];
  1699. this.state.orderNoSearch = "";
  1700. this.state.departmenttList = undefined;
  1701. this.state.amountStatus = undefined;
  1702. this.state.approval = undefined;
  1703. this.state.projectType = undefined;
  1704. this.state.processStatus = [];
  1705. this.state.contractNoSearch = "";
  1706. this.state.liquidationStatus = [];
  1707. this.state.processStatusSearch = [];
  1708. this.state.contractNo = "";
  1709. this.Cascaders.empty();
  1710. this.loadData();
  1711. },
  1712. //驳回
  1713. boHuiSubmit(e) {
  1714. e.preventDefault();
  1715. if (!this.state.content) {
  1716. message.warning("请填写驳回原因");
  1717. return false;
  1718. }
  1719. if (!this.state.content.replace(/\s+/g, '')) {
  1720. message.warning("请填写驳回原因");
  1721. return false;
  1722. }
  1723. this.setState({
  1724. loading: true,
  1725. });
  1726. $.ajax({
  1727. method: "POST",
  1728. dataType: "json",
  1729. crossDomain: false,
  1730. url: globalConfig.context + "/api/admin/financial/reject",
  1731. data: {
  1732. orderNo: this.state.bohuiData.orderNo,
  1733. reason: this.state.content,
  1734. },
  1735. }).done(
  1736. function (data) {
  1737. if (!data.error.length) {
  1738. message.success("驳回成功!");
  1739. this.setState({
  1740. loading: false,
  1741. });
  1742. this.boHuiOk();
  1743. } else {
  1744. message.warning(data.error[0].message);
  1745. }
  1746. }.bind(this)
  1747. );
  1748. },
  1749. searchSwitch() {
  1750. this.setState({
  1751. searchMore: !this.state.searchMore,
  1752. });
  1753. },
  1754. changeList(arr) {
  1755. const newArr = [];
  1756. this.state.columns.forEach((item) => {
  1757. arr.forEach((val) => {
  1758. if (val === item.title) {
  1759. newArr.push(item);
  1760. }
  1761. });
  1762. });
  1763. this.setState({
  1764. changeList: newArr,
  1765. });
  1766. },
  1767. callback(key) {
  1768. // console.log(key);
  1769. },
  1770. onSelectChange(selectedRowKeys, selectedRows) {
  1771. // for(var i=0; i<selectedRowKeys.length; i++){
  1772. // for(var j=i+1; j<selectedRowKeys.length; j++){
  1773. // if(selectedRowKeys[i]==selectedRowKeys[j]){
  1774. // selectedRowKeys.splice(j,1);
  1775. // j--;
  1776. // }
  1777. // }
  1778. // }
  1779. this.setState({
  1780. selectedRowKeys,
  1781. selectedRows,
  1782. newData: selectedRows,
  1783. });
  1784. },
  1785. inRecordCanl() {
  1786. this.setState({
  1787. bvisible: false,
  1788. });
  1789. },
  1790. inRecordData() {
  1791. this.setState({
  1792. loading: true,
  1793. });
  1794. $.ajax({
  1795. method: "get",
  1796. dataType: "json",
  1797. crossDomain: false,
  1798. url:
  1799. globalConfig.context +
  1800. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1801. data: {
  1802. orderNo: this.state.selectedRowKeys[0],
  1803. pageSize: 9999999,
  1804. },
  1805. success: function (data) {
  1806. let theArr = [];
  1807. let sum = 0;
  1808. if (!data.data) {
  1809. if (data.error && data.error.length) {
  1810. message.warning(data.error[0].message);
  1811. }
  1812. } else {
  1813. for (let i = 0; i < data.data.list.length; i++) {
  1814. let thisdata = data.data.list[i];
  1815. sum += parseFloat(thisdata.amount);
  1816. theArr.push({
  1817. id: thisdata.id,
  1818. orderno: thisdata.orderno, //订单编号
  1819. amount: thisdata.amount, //签单金额
  1820. createTime: thisdata.createTime, //流程状态
  1821. status: thisdata.status, //结算状态
  1822. rejectReason: thisdata.rejectReason,
  1823. approval: thisdata.approval,//0非特批 1待审核 2审核通过
  1824. examineName: thisdata.examineName,
  1825. });
  1826. }
  1827. }
  1828. this.setState({
  1829. recordData: theArr,
  1830. sum: sum.toFixed(6),
  1831. });
  1832. }.bind(this),
  1833. }).done(
  1834. function () {
  1835. this.setState({
  1836. loading: false,
  1837. });
  1838. }.bind(this)
  1839. );
  1840. },
  1841. waterData() {
  1842. this.state.data = [];
  1843. this.setState({
  1844. loading: true,
  1845. });
  1846. $.ajax({
  1847. method: "get",
  1848. dataType: "json",
  1849. crossDomain: false,
  1850. url: globalConfig.context + "/api/admin/financial/myBillList",
  1851. data: {
  1852. orderNo: this.state.selectedRowKeys[0],
  1853. pageSize: 9999999,
  1854. whoType: 1,
  1855. },
  1856. success: function (data) {
  1857. let theArr = [];
  1858. let waterSum = 0;
  1859. if (!data.data || !data.data.list) {
  1860. if (data.error && data.error.length) {
  1861. message.warning(data.error[0].message);
  1862. }
  1863. } else {
  1864. for (let i = 0; i < data.data.list.length; i++) {
  1865. let thisdata = data.data.list[i];
  1866. if (thisdata.deleteSign == 0) {
  1867. waterSum += parseFloat(thisdata.transactionAmount);
  1868. }
  1869. theArr.push({
  1870. key: i,
  1871. orderNo: thisdata.orderNo,
  1872. billNo: thisdata.billNo,
  1873. transactionAmount: thisdata.transactionAmount,
  1874. payeeName: thisdata.payeeName,
  1875. payerName: thisdata.payerName,
  1876. transactionSubject: thisdata.transactionSubject,
  1877. transactionChannel: thisdata.transactionChannel,
  1878. financialPayTimes: thisdata.financialPayTimes,
  1879. financialPayNo: thisdata.financialPayNo,
  1880. createrName: thisdata.createrName,
  1881. saleName: thisdata.saleName,
  1882. createTimes: thisdata.createTimes,
  1883. type:
  1884. thisdata.type == 0
  1885. ? "手工"
  1886. : thisdata.type == 1
  1887. ? "批量"
  1888. : "合同变更退款",
  1889. deleteSign: thisdata.deleteSign,
  1890. deleteTimes: thisdata.deleteTimes,
  1891. refundTimes: thisdata.refundTimes,
  1892. remarks: thisdata.remarks,
  1893. });
  1894. }
  1895. }
  1896. this.setState({
  1897. waterData: theArr,
  1898. waterSum: (Math.round(waterSum * 1000000) / 1000000).toFixed(6),
  1899. });
  1900. }.bind(this),
  1901. }).always(
  1902. function () {
  1903. this.setState({
  1904. loading: false,
  1905. });
  1906. }.bind(this)
  1907. );
  1908. },
  1909. waterCanl() {
  1910. this.setState({
  1911. cvisible: false,
  1912. });
  1913. },
  1914. exportKaip() {
  1915. window.location.href =
  1916. globalConfig.context +
  1917. "/api/admin/receivables/exportInvoice?" +
  1918. `orderNo=${this.state.selectedRowKeys}`;
  1919. },
  1920. exportAll() {
  1921. message.config({
  1922. duration: 20,
  1923. });
  1924. let loading = message.loading("下载中...");
  1925. this.setState({
  1926. exportPendingLoading: true,
  1927. });
  1928. let data = {
  1929. orderNo: this.state.orderNoSearch,
  1930. buyerName: this.state.nameSearch,
  1931. deps: this.state.departmenttList,
  1932. contractNo: this.state.contractNoSearch,
  1933. processStatus: this.state.processStatusSearch,
  1934. startTime: this.state.releaseDate[0],
  1935. endTime: this.state.releaseDate[1],
  1936. startFinalReceivablesTime: this.state.shouKuanDate[0],
  1937. endFinalReceivablesTime: this.state.shouKuanDate[1],
  1938. contractNo: this.state.contractNoSearch,
  1939. liquidationStatus: this.state.liquidationStatus,
  1940. amountStatus: this.state.amountStatus,
  1941. approval: this.state.approval,
  1942. projectType: this.state.projectType,
  1943. };
  1944. $.ajax({
  1945. method: "get",
  1946. dataType: "json",
  1947. crossDomain: false,
  1948. url: "/api/admin/receivables/exportReceivables",
  1949. data,
  1950. success: function (data) {
  1951. if (data.error.length === 0) {
  1952. this.download(data.data);
  1953. } else {
  1954. message.warning(data.error[0].message);
  1955. }
  1956. }.bind(this),
  1957. }).always(
  1958. function () {
  1959. loading();
  1960. this.setState({
  1961. exportPendingLoading: false,
  1962. });
  1963. }.bind(this)
  1964. );
  1965. // window.location.href =
  1966. // globalConfig.context +
  1967. // "/api/admin/receivables/exportReceivables?" +
  1968. // `orderNo=${this.state.orderNoSearch ? this.state.orderNoSearch : ""
  1969. // }&buyerName=${this.state.nameSearch ? this.state.nameSearch : ""
  1970. // }&deps=${this.state.departmenttList ? this.state.departmenttList : ""
  1971. // }&contractNo=${this.state.contractNoSearch ? this.state.contractNoSearch : ""
  1972. // }&processStatus=${this.state.processStatusSearch}`;
  1973. },
  1974. // 下载
  1975. download(fileName) {
  1976. window.location.href =
  1977. globalConfig.context + "/open/download?fileName=" + fileName;
  1978. },
  1979. exportWater() {
  1980. window.location.href =
  1981. globalConfig.context +
  1982. "/api/admin/receivables/exportMyBill?" +
  1983. `orderNo=${this.state.selectedRowKeys}&whoType=1`;
  1984. },
  1985. printAll() {
  1986. this.setState({
  1987. dvisible: true,
  1988. });
  1989. this.loadData(1, 9999999);
  1990. },
  1991. timeData() {
  1992. this.setState({
  1993. loading: true,
  1994. });
  1995. $.ajax({
  1996. method: "get",
  1997. dataType: "json",
  1998. crossDomain: false,
  1999. url: globalConfig.context + "/api/admin/orderProject/taskHoursList",
  2000. data: {
  2001. orderNo: this.state.selectedRowKeys[0],
  2002. pageSize: 9999999,
  2003. },
  2004. success: function (data) {
  2005. let theArr = [];
  2006. if (!data.data || !data.data.list) {
  2007. if (data.error && data.error.length) {
  2008. message.warning(data.error[0].message);
  2009. }
  2010. } else {
  2011. for (let i = 0; i < data.data.list.length; i++) {
  2012. let thisdata = data.data.list[i];
  2013. theArr.push({
  2014. key: i + 1,
  2015. id: thisdata.id, //ID
  2016. orderNo: thisdata.orderNo, //订单编号
  2017. taskName: thisdata.taskName, //任务名称
  2018. userName: thisdata.userName, //客户名称
  2019. cname: thisdata.cname, //项目品类
  2020. taskStatus: thisdata.taskStatus, //任务状态
  2021. receiverName: thisdata.receiverName, //负责人
  2022. hours: thisdata.hours, //任务工时
  2023. depName: thisdata.depName, //派单公司
  2024. contractNo: thisdata.contractNo,
  2025. signTime: thisdata.signTime,
  2026. creteTime: thisdata.creteTime,
  2027. projectStatus: thisdata.projectStatus,
  2028. commodityPrice: thisdata.commodityPrice, //价格
  2029. commodityQuantity: thisdata.commodityQuantity, //数量
  2030. salesmanName: thisdata.salesmanName, //订单负责人
  2031. taskDistributionTime: thisdata.taskDistributionTime,
  2032. taskEndTime: thisdata.taskEndTime,
  2033. outsource: thisdata.outsource,
  2034. splitStatus: thisdata.splitStatus,
  2035. splitSuper: thisdata.splitSuper,
  2036. splitId: thisdata.splitId,
  2037. });
  2038. }
  2039. }
  2040. this.setState({
  2041. timeDataList: theArr,
  2042. });
  2043. }.bind(this),
  2044. }).always(
  2045. function () {
  2046. this.setState({
  2047. loading: false,
  2048. });
  2049. }.bind(this)
  2050. );
  2051. },
  2052. exportTime() {
  2053. const data = {
  2054. orderNo: this.state.selectedRowKeys[0],
  2055. pageSize: 9999999,
  2056. };
  2057. window.location.href =
  2058. globalConfig.context +
  2059. "/api/admin/orderProject/exportMyTaskList?" +
  2060. $.param(data);
  2061. },
  2062. exportPro() {
  2063. const data = {
  2064. orderNo: this.state.selectedRowKeys[0],
  2065. };
  2066. window.location.href =
  2067. globalConfig.context +
  2068. "/api/admin/newOrder/exportOrderTaskData?" +
  2069. $.param(data);
  2070. },
  2071. // exportCui() {
  2072. // const data = {
  2073. // orderNo: this.state.selectedRowKeys[0]
  2074. // ? this.state.selectedRowKeys[0]
  2075. // : undefined, //订单编号
  2076. // // specially: 1,
  2077. // pageSize: 9999999,
  2078. // };
  2079. // window.location.href =
  2080. // globalConfig.context +
  2081. // "/api/admin/newOrder/exportOrderDunData?" +
  2082. // $.param(data);
  2083. // },
  2084. exportCui() {
  2085. this.setState({
  2086. exportPendingLoading: true,
  2087. });
  2088. message.config({
  2089. duration: 20,
  2090. });
  2091. let loading = message.loading("下载中...");
  2092. let data = {
  2093. orderNo: this.state.selectedRowKeys[0]
  2094. ? this.state.selectedRowKeys[0]
  2095. : undefined, //订单编号
  2096. pageSize: 9999999,
  2097. };
  2098. $.ajax({
  2099. method: "get",
  2100. dataType: "json",
  2101. crossDomain: false,
  2102. url:
  2103. globalConfig.context + "/api/admin/newOrder/exportOrderDunData",
  2104. data,
  2105. success: function (data) {
  2106. if (data.error.length === 0) {
  2107. this.download(data.data);
  2108. } else {
  2109. message.warning(data.error[0].message);
  2110. }
  2111. }.bind(this),
  2112. }).always(
  2113. function () {
  2114. loading();
  2115. this.setState({
  2116. exportPendingLoading: false,
  2117. });
  2118. }.bind(this)
  2119. );
  2120. },
  2121. cuiData() {
  2122. this.setState({
  2123. loading: true,
  2124. });
  2125. $.ajax({
  2126. method: "get",
  2127. dataType: "json",
  2128. crossDomain: false,
  2129. url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
  2130. data: {
  2131. orderNo: this.state.selectedRowKeys[0],
  2132. pageSize: 9999999,
  2133. },
  2134. success: function (data) {
  2135. let theArr = [];
  2136. if (!data.data || !data.data.list) {
  2137. if (data.error && data.error.length) {
  2138. message.warning(data.error[0].message);
  2139. }
  2140. } else {
  2141. for (let i = 0; i < data.data.list.length; i++) {
  2142. let thisdata = data.data.list[i];
  2143. theArr.push({
  2144. key: i + 1,
  2145. orderNo: thisdata.orderNo,
  2146. contractNo: thisdata.contractNo,
  2147. userName: thisdata.userName,
  2148. buyerName: thisdata.buyerName,
  2149. departmentName: thisdata.departmentName,
  2150. salesmanName: thisdata.salesmanName,
  2151. depName: thisdata.depName,
  2152. orderStatus: thisdata.orderStatus,
  2153. projectStatus: thisdata.projectStatus,
  2154. totalAmount: thisdata.totalAmount,
  2155. liquidationStatus: thisdata.liquidationStatus,
  2156. settlementAmount: thisdata.settlementAmount,
  2157. accountsReceivable: thisdata.accountsReceivable,
  2158. dunSubject: thisdata.dunSubject,
  2159. startDate: thisdata.startDate,
  2160. taskStatus: thisdata.taskStatus,
  2161. cname: thisdata.cname,
  2162. id: thisdata.id,
  2163. taskName: thisdata.taskName,
  2164. hours: thisdata.hours,
  2165. taskDistributionTime: thisdata.taskDistributionTime,
  2166. taskEndTime: thisdata.taskEndTime,
  2167. dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发",
  2168. });
  2169. }
  2170. }
  2171. this.setState({
  2172. cuiDataList: theArr,
  2173. });
  2174. }.bind(this),
  2175. }).always(
  2176. function () {
  2177. this.setState({
  2178. loading: false,
  2179. });
  2180. }.bind(this)
  2181. );
  2182. },
  2183. cuiTabChange(index) {
  2184. this.setState({
  2185. cuiTabKey: index,
  2186. });
  2187. if (index == 2) {
  2188. this.setState({
  2189. loading: true,
  2190. });
  2191. $.ajax({
  2192. method: "get",
  2193. dataType: "json",
  2194. crossDomain: false,
  2195. url: globalConfig.context + "/api/admin/newOrder/arrearsDunList",
  2196. data: {
  2197. orderNo: this.state.selectedRowKeys[0],
  2198. pageSize: 9999999,
  2199. },
  2200. success: function (data) {
  2201. let theArr = [];
  2202. if (data.error.length || data.data.list == "") {
  2203. if (data.error && data.error.length) {
  2204. message.warning(data.error[0].message);
  2205. }
  2206. } else {
  2207. for (let i = 0; i < data.data.list.length; i++) {
  2208. let thisdata = data.data.list[i];
  2209. let obj = thisdata;
  2210. obj.key = i;
  2211. theArr.push(obj);
  2212. }
  2213. }
  2214. this.setState({
  2215. qianDataList: theArr,
  2216. });
  2217. }.bind(this),
  2218. }).always(
  2219. function () {
  2220. this.setState({
  2221. loading: false,
  2222. });
  2223. }.bind(this)
  2224. );
  2225. }
  2226. },
  2227. proData() {
  2228. this.setState({
  2229. loading: true,
  2230. });
  2231. $.ajax({
  2232. method: "get",
  2233. dataType: "json",
  2234. crossDomain: false,
  2235. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  2236. data: {
  2237. orderNo: this.state.selectedRowKeys[0],
  2238. pageSize: 9999999,
  2239. },
  2240. success: function (data) {
  2241. let theArr = [];
  2242. let totalWaibao = 0;
  2243. if (!data.data) {
  2244. if (data.error && data.error.length) {
  2245. message.warning(data.error[0].message);
  2246. }
  2247. } else {
  2248. for (let i = 0; i < data.data.length; i++) {
  2249. let thisdata = data.data[i];
  2250. totalWaibao += thisdata.outsourcePrice;
  2251. thisdata.key = i + 1;
  2252. theArr.push(thisdata);
  2253. }
  2254. }
  2255. totalWaibao = (Math.round(totalWaibao * 1000000) / 1000000).toFixed(6);
  2256. this.setState({
  2257. proDataList: theArr,
  2258. totalWaibao,
  2259. });
  2260. }.bind(this),
  2261. }).always(
  2262. function () {
  2263. this.setState({
  2264. loading: false,
  2265. });
  2266. }.bind(this)
  2267. );
  2268. },
  2269. // 查看公出列表
  2270. pubData() {
  2271. this.setState({
  2272. loading: true,
  2273. });
  2274. let rows = this.state.selectedRows[0]
  2275. let searchInfor = {
  2276. releaseStart: this.state.releaseDate[0] || undefined,
  2277. releaseEnd: this.state.releaseDate[1] || undefined,
  2278. aid: this.state.theTypes || undefined,
  2279. sid: this.state.theTypes1 || undefined,
  2280. status: this.state.status,
  2281. clockIn: this.state.clockIn,
  2282. depId: this.state.depId || undefined,
  2283. publicType: this.state.type,
  2284. }
  2285. let datas = Object.assign(searchInfor, {
  2286. pageNo: this.state.pubpageNo || 1,
  2287. pageSize: 9999999,
  2288. uid: rows.buyerId,
  2289. });
  2290. $.ajax({
  2291. method: "get",
  2292. dataType: "json",
  2293. crossDomain: false,
  2294. url: globalConfig.context + "/api/admin/release/publicReleaseDtails",
  2295. data: datas,
  2296. success: function (data) {
  2297. let theArr = [];
  2298. this.setState({
  2299. loading: false,
  2300. });
  2301. if (!data.data) {
  2302. if (data.error && data.error.length) {
  2303. message.warning(data.error[0].message);
  2304. }
  2305. } else {
  2306. for (let i = 0; i < data.data.list.length; i++) {
  2307. let thisdata = data.data.list[i];
  2308. thisdata.key = (data.data.pageNo - 1) * data.data.pageSize + i + 1;
  2309. theArr.push(thisdata);
  2310. }
  2311. this.state.pubpagination.current = data.data.pageNo;
  2312. this.state.pubpagination.total = data.data.totalCount;
  2313. if (data.data && data.data.list && !data.data.list.length) {
  2314. this.state.pubpagination.current = 0;
  2315. this.state.pubpagination.total = 0;
  2316. }
  2317. }
  2318. this.setState({
  2319. pubDataList: theArr,
  2320. pubpagination: this.state.pubpagination,
  2321. pubpageNo: data.data.pageNo,
  2322. });
  2323. }.bind(this),
  2324. }).always(
  2325. function () {
  2326. this.setState({
  2327. loading: false,
  2328. });
  2329. }.bind(this)
  2330. );
  2331. },
  2332. // 重置公出列表查询
  2333. resetAll() {
  2334. this.setState(
  2335. {
  2336. releaseDate: [],
  2337. theCustomerTypes: undefined,
  2338. status: undefined,
  2339. clockIn: undefined,
  2340. depId: undefined,
  2341. auto: "",
  2342. auto1: "",
  2343. customer: "",
  2344. theTypes: undefined,
  2345. theTypes1: undefined,
  2346. type: undefined,
  2347. },
  2348. () => {
  2349. this.pubData();
  2350. }
  2351. );
  2352. },
  2353. //公出导出
  2354. pubexportExec() {
  2355. this.setState({
  2356. exportPendingLoading: true,
  2357. });
  2358. message.config({
  2359. duration: 20,
  2360. });
  2361. let loading = message.loading("下载中...");
  2362. let rows = this.state.selectedRows[0]
  2363. let searchInfor = {
  2364. releaseStart: this.state.releaseDate[0] || undefined,
  2365. releaseEnd: this.state.releaseDate[1] || undefined,
  2366. aid: this.state.theTypes || undefined,
  2367. sid: this.state.theTypes1 || undefined,
  2368. status: this.state.status,
  2369. clockIn: this.state.clockIn,
  2370. depId: this.state.depId || undefined,
  2371. publicType: this.state.type,
  2372. }
  2373. let data = Object.assign(searchInfor, {
  2374. pageNo: this.state.pubpageNo || 1,
  2375. pageSize: 9999999,
  2376. uid: rows.buyerId,
  2377. exportType: 1,
  2378. });
  2379. for (let i of Object.keys(data)) {
  2380. if (i === "status" || i === "clockIn") {
  2381. if (isNaN(parseInt(data[i]))) {
  2382. delete data[i];
  2383. }
  2384. } else if (!data[i]) {
  2385. delete data[i];
  2386. }
  2387. }
  2388. $.ajax({
  2389. method: "get",
  2390. dataType: "json",
  2391. crossDomain: false,
  2392. url: globalConfig.context + "/api/admin/release/publicReleaseDtails/export",
  2393. data,
  2394. success: function (data) {
  2395. if (data.error.length === 0) {
  2396. this.download(data.data);
  2397. } else {
  2398. message.warning(data.error[0].message);
  2399. }
  2400. }.bind(this),
  2401. }).always(
  2402. function () {
  2403. loading();
  2404. this.setState({
  2405. exportPendingLoading: false,
  2406. });
  2407. }.bind(this)
  2408. );
  2409. },
  2410. // 下载
  2411. download(fileName) {
  2412. window.location.href =
  2413. globalConfig.context + "/open/download?fileName=" + fileName;
  2414. },
  2415. checkRemark(record) {
  2416. this.setState({
  2417. checkVisible: true,
  2418. checkOrderNo: record.orderNo,
  2419. });
  2420. },
  2421. checkOk() {
  2422. if (!this.state.checkData) {
  2423. message.warning("请填写审核内容");
  2424. return;
  2425. }
  2426. if (!this.state.checkData.replace(/\s+/g, '')) {
  2427. message.warning("请填写审核内容");
  2428. return;
  2429. }
  2430. this.setState({
  2431. loading: true,
  2432. });
  2433. let ajaxObj = $.ajax({
  2434. method: "post",
  2435. dataType: "json",
  2436. crossDomain: false,
  2437. url: globalConfig.context + "/api/admin/financial/financeApproval",
  2438. data: {
  2439. orderNo: this.state.checkOrderNo,
  2440. remarks: this.state.checkData,
  2441. },
  2442. success: function (data) {
  2443. let theArr = [];
  2444. if (!data.data) {
  2445. if (data.error && data.error.length) {
  2446. message.warning(data.error[0].message);
  2447. }
  2448. } else {
  2449. message.success("通过成功!");
  2450. this.loadData();
  2451. this.setState({
  2452. checkVisible: false,
  2453. checkData: "",
  2454. });
  2455. }
  2456. }.bind(this),
  2457. }).always(
  2458. function () {
  2459. this.setState({
  2460. loading: false,
  2461. financeApprovalAjaxObj: null
  2462. });
  2463. }.bind(this)
  2464. );
  2465. this.setState({
  2466. financeApprovalAjaxObj: ajaxObj
  2467. })
  2468. },
  2469. tableRowClickPro(record) {
  2470. this.setState({
  2471. pvisible: true,
  2472. record,
  2473. });
  2474. },
  2475. kaiPiaoData(record) {
  2476. this.setState({
  2477. avisible: true,
  2478. });
  2479. this.invoiceData(record.id)
  2480. },
  2481. invoiceData(id) {
  2482. this.setState({
  2483. loading: true,
  2484. });
  2485. $.ajax({
  2486. method: "get",
  2487. dataType: "json",
  2488. crossDomain: false,
  2489. url:
  2490. globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
  2491. data: {
  2492. id,
  2493. },
  2494. success: function (data) {
  2495. let thisdata = data.data;
  2496. let obj = {
  2497. contractNo: thisdata.contractNo,
  2498. orderNo: thisdata.orderNo,
  2499. approval: thisdata.approval,
  2500. type: thisdata.type,
  2501. status: thisdata.status,
  2502. remarks: thisdata.remarks,
  2503. invoiceType: thisdata.invoiceType,
  2504. unitName: thisdata.unitName,
  2505. taxNumber: thisdata.taxNumber,
  2506. amount: thisdata.amount,
  2507. banks: thisdata.banks,
  2508. content: thisdata.content,
  2509. unitAddress: thisdata.unitAddress,
  2510. invoiceRemarks: thisdata.invoiceRemarks,
  2511. unitMobile: thisdata.unitMobile,
  2512. post: thisdata.post,
  2513. addressee: thisdata.addressee,
  2514. addresseeMobile: thisdata.addresseeMobile,
  2515. addresseeProvince: thisdata.addresseeProvince,
  2516. addresseeCity: thisdata.addresseeCity,
  2517. addresseeArea: thisdata.addresseeArea,
  2518. alreadyAmount: thisdata.alreadyAmount,
  2519. recipientAddress: thisdata.recipientAddress,
  2520. orgCodeUrl: thisdata.voucherUrl
  2521. ? splitUrl(
  2522. thisdata.voucherUrl,
  2523. ",",
  2524. globalConfig.avatarHost + "/upload"
  2525. )
  2526. : [],
  2527. };
  2528. this.setState({
  2529. modalData: obj,
  2530. });
  2531. }.bind(this),
  2532. }).done(
  2533. function () {
  2534. this.setState({
  2535. loading: false,
  2536. });
  2537. }.bind(this)
  2538. );
  2539. },
  2540. visitCancels() {
  2541. this.setState({
  2542. avisible: false
  2543. })
  2544. },
  2545. selectAuto(value, options) {
  2546. this.setState({
  2547. auto: value,
  2548. });
  2549. },
  2550. selectAuto1(value, options) {
  2551. this.setState({
  2552. auto1: value,
  2553. });
  2554. },
  2555. blurChange(e) {
  2556. let theType = "";
  2557. let contactLists = this.state.customerArr || [];
  2558. if (e) {
  2559. contactLists.map(function (item) {
  2560. if (item.name == e.toString()) {
  2561. theType = item.id;
  2562. }
  2563. });
  2564. }
  2565. this.setState({
  2566. theTypes: theType,
  2567. });
  2568. },
  2569. blurChange1(e) {
  2570. let theType = "";
  2571. let contactLists = this.state.customerArr1 || [];
  2572. if (e) {
  2573. contactLists.map(function (item) {
  2574. if (item.name == e.toString()) {
  2575. theType = item.id;
  2576. }
  2577. });
  2578. }
  2579. this.setState({
  2580. theTypes1: theType,
  2581. });
  2582. },
  2583. httpChange(e) {
  2584. if (e.length >= 1) {
  2585. this.supervisor(e);
  2586. }
  2587. this.setState({
  2588. auto: e,
  2589. });
  2590. },
  2591. httpChange1(e) {
  2592. if (e.length >= 1) {
  2593. this.supervisor1(e);
  2594. }
  2595. this.setState({
  2596. auto1: e,
  2597. });
  2598. },
  2599. supervisor(e) {
  2600. $.ajax({
  2601. method: "get",
  2602. dataType: "json",
  2603. crossDomain: false,
  2604. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  2605. data: {
  2606. adminName: e,
  2607. },
  2608. success: function (data) {
  2609. if (data.error && data.error.length === 0) {
  2610. this.setState({
  2611. customerArr: data.data,
  2612. });
  2613. } else {
  2614. message.warning(data.error[0].message);
  2615. }
  2616. }.bind(this),
  2617. }).always(function () { }.bind(this));
  2618. },
  2619. supervisor1(e) {
  2620. $.ajax({
  2621. method: "get",
  2622. dataType: "json",
  2623. crossDomain: false,
  2624. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  2625. data: {
  2626. adminName: e,
  2627. },
  2628. success: function (data) {
  2629. if (data.error && data.error.length === 0) {
  2630. this.setState({
  2631. customerArr1: data.data,
  2632. });
  2633. } else {
  2634. message.warning(data.error[0].message);
  2635. }
  2636. }.bind(this),
  2637. }).always(function () { }.bind(this));
  2638. },
  2639. render() {
  2640. const formItemLayout = {
  2641. labelCol: { span: 8 },
  2642. wrapperCol: { span: 14 },
  2643. };
  2644. const { RangePicker } = DatePicker;
  2645. var departmentArr = this.state.departmentArr || [];
  2646. const { loading, selectedRowKeys, visible } = this.state;
  2647. const rowSelection = {
  2648. selectedRowKeys,
  2649. onChange: this.onSelectChange,
  2650. hideDefaultSelections: true,
  2651. type: "radio",
  2652. };
  2653. const dataSources = this.state.customerArr || [];
  2654. const dataSources1 = this.state.customerArr1 || [];
  2655. const options = dataSources.map((group) => (
  2656. <Select.Option key={group.id} value={group.name}>
  2657. {group.name}
  2658. </Select.Option>
  2659. ));
  2660. const options1 = dataSources1.map((group) => (
  2661. <Select.Option key={group.id} value={group.name}>
  2662. {group.name}
  2663. </Select.Option>
  2664. ));
  2665. return (
  2666. <div className="user-content">
  2667. {this.state.resVisible ? (
  2668. <ResolutionDetail
  2669. cancel={this.resCancel}
  2670. detail={this.state.resRecord}
  2671. visible={this.state.resVisible}
  2672. id={this.state.resRecord.orderNo}
  2673. />
  2674. ) : (
  2675. ""
  2676. )}
  2677. <div className="content-title" style={{ marginBottom: 10 }}>
  2678. <span style={{ fontWeight: 900, fontSize: 16 }}>收款结算</span>
  2679. </div>
  2680. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  2681. <TabPane tab="更改表格显示数据" key="1">
  2682. <div style={{ marginLeft: 10 }}>
  2683. <ChooseList
  2684. columns={this.state.columns}
  2685. changeFn={this.changeList}
  2686. changeList={this.state.changeList}
  2687. top={55}
  2688. margin={11}
  2689. />
  2690. </div>
  2691. </TabPane>
  2692. <TabPane tab="搜索" key="2">
  2693. <div className="user-search" style={{ padding: "0 20px 0 10px" }}>
  2694. <Input
  2695. style={{ width: 200 }}
  2696. placeholder="订单编号"
  2697. value={this.state.orderNoSearch}
  2698. onChange={(e) => {
  2699. this.setState({ orderNoSearch: e.target.value });
  2700. }}
  2701. />
  2702. <Input
  2703. style={{ width: 200 }}
  2704. placeholder="合同编号"
  2705. value={this.state.contractNoSearch}
  2706. onChange={(e) => {
  2707. this.setState({
  2708. contractNoSearch: e.target.value,
  2709. });
  2710. }}
  2711. />
  2712. <Input
  2713. style={{ width: 200 }}
  2714. placeholder="客户名称"
  2715. value={this.state.nameSearch}
  2716. onChange={(e) => {
  2717. this.setState({ nameSearch: e.target.value });
  2718. }}
  2719. />
  2720. <Cascaders
  2721. ref={node => this.Cascaders = node}
  2722. placeholder="订单部门"
  2723. id="id"
  2724. name="name"
  2725. children="list"
  2726. height={28}
  2727. onSel={(e) => {
  2728. this.setState({
  2729. departmenttList: JSON.stringify(e),
  2730. });
  2731. }}
  2732. />
  2733. {/* <Select
  2734. placeholder="订单部门"
  2735. style={{ width: 190, marginRight: 10 }}
  2736. value={this.state.departmenttList}
  2737. onChange={(e) => {
  2738. this.setState({ departmenttList: e });
  2739. }}
  2740. >
  2741. {departmentArr.map(function (item) {
  2742. return (
  2743. <Select.Option key={item.id}>{item.name}</Select.Option>
  2744. );
  2745. })}
  2746. </Select> */}
  2747. <Select
  2748. placeholder="流程状态"
  2749. onChange={(e) => {
  2750. this.setState({ processStatusSearch: e });
  2751. }}
  2752. style={{ width: 150, marginRight: 10 }}
  2753. value={this.state.processStatusSearch}
  2754. >
  2755. <Option value="3">未分配</Option>
  2756. <Option value="4">已分配</Option>
  2757. <Option value="9">已驳回</Option>
  2758. </Select>
  2759. <Select
  2760. placeholder="结算状态"
  2761. onChange={(e) => {
  2762. this.setState({ liquidationStatus: e });
  2763. }}
  2764. style={{ width: 150, marginRight: 10 }}
  2765. value={this.state.liquidationStatus}
  2766. >
  2767. <Option value="0">首付待付清</Option>
  2768. <Option value="1">尾款待付清</Option>
  2769. <Option value="2">已付清</Option>
  2770. </Select>
  2771. <Select
  2772. style={{ width: 150 }}
  2773. placeholder="签单金额"
  2774. value={this.state.amountStatus}
  2775. onChange={(e) => {
  2776. this.setState({
  2777. amountStatus: e,
  2778. });
  2779. }}
  2780. >
  2781. <Option value="0">10万元以下</Option>
  2782. <Option value="1">10~20万元</Option>
  2783. <Option value="2">20~30万元</Option>
  2784. <Option value="3">30~40万元</Option>
  2785. <Option value="4">40万元以上</Option>
  2786. </Select>
  2787. <Select
  2788. style={{ width: 150 }}
  2789. placeholder="特批状态"
  2790. value={this.state.approval}
  2791. onChange={(e) => {
  2792. this.setState({
  2793. approval: e,
  2794. });
  2795. }}
  2796. >
  2797. <Option value="0">非特批</Option>
  2798. <Option value="1">特批待审</Option>
  2799. <Option value="2">特批通过</Option>
  2800. <Option value="4">全部特批</Option>
  2801. </Select>
  2802. <Select
  2803. style={{ width: 150 }}
  2804. placeholder="会员状态"
  2805. value={this.state.projectType}
  2806. onChange={(e) => {
  2807. this.setState({
  2808. projectType: e,
  2809. });
  2810. }}
  2811. >
  2812. <Option value="1">会员</Option>
  2813. <Option value="0">非会员</Option>
  2814. </Select>
  2815. <span style={{}}>下单日期:</span>
  2816. <RangePicker
  2817. value={[
  2818. this.state.releaseDate[0]
  2819. ? moment(this.state.releaseDate[0])
  2820. : null,
  2821. this.state.releaseDate[1]
  2822. ? moment(this.state.releaseDate[1])
  2823. : null,
  2824. ]}
  2825. onChange={(data, dataString) => {
  2826. this.setState({ releaseDate: dataString });
  2827. }}
  2828. />
  2829. <span style={{ marginLeft: 10 }}>最近收款:</span>
  2830. <RangePicker
  2831. value={[
  2832. this.state.shouKuanDate[0]
  2833. ? moment(this.state.shouKuanDate[0])
  2834. : null,
  2835. this.state.shouKuanDate[1]
  2836. ? moment(this.state.shouKuanDate[1])
  2837. : null,
  2838. ]}
  2839. onChange={(data, dataString) => {
  2840. this.setState({ shouKuanDate: dataString });
  2841. }}
  2842. />
  2843. <Button
  2844. type="primary"
  2845. onClick={this.search}
  2846. style={{ marginLeft: 10 }}
  2847. disabled={this.state.loadingA ? true : false}
  2848. >
  2849. 搜索
  2850. </Button>
  2851. <Button onClick={this.reset}>重置</Button>
  2852. </div>
  2853. </TabPane>
  2854. <TabPane tab="打印" key="3">
  2855. <Button
  2856. type="primary"
  2857. style={{ margin: "11px 0px 10px 10px" }}
  2858. onClick={this.printAll}
  2859. disabled={!this.state.dataSource.length}
  2860. >
  2861. 打印所有列表信息
  2862. </Button>
  2863. <Button
  2864. type="primary"
  2865. disabled={this.state.selectedRowKeys.length != 1}
  2866. style={{ margin: "11px 0px 10px 10px" }}
  2867. onClick={() => {
  2868. this.inRecordData();
  2869. this.setState({
  2870. bvisible: true,
  2871. });
  2872. }}
  2873. >
  2874. 打印开票详情
  2875. </Button>
  2876. <Button
  2877. type="primary"
  2878. disabled={this.state.selectedRowKeys.length != 1}
  2879. style={{ margin: "11px 0px 10px 10px" }}
  2880. onClick={() => {
  2881. this.waterData();
  2882. this.setState({
  2883. cvisible: true,
  2884. });
  2885. }}
  2886. >
  2887. 打印收款流水
  2888. </Button>
  2889. <Button
  2890. type="primary"
  2891. disabled={this.state.selectedRowKeys.length != 1}
  2892. style={{ margin: "11px 0px 10px 10px" }}
  2893. onClick={() => {
  2894. this.timeData();
  2895. this.setState({
  2896. timeVisible: true,
  2897. });
  2898. }}
  2899. >
  2900. 打印工时信息
  2901. </Button>
  2902. <Button
  2903. type="primary"
  2904. disabled={this.state.selectedRowKeys.length != 1}
  2905. style={{ margin: "11px 0px 10px 10px" }}
  2906. onClick={() => {
  2907. this.cuiData();
  2908. this.setState({
  2909. cuiVisible: true,
  2910. });
  2911. }}
  2912. >
  2913. 打印催款信息
  2914. </Button>
  2915. <Button
  2916. type="primary"
  2917. disabled={this.state.selectedRowKeys.length != 1}
  2918. style={{ margin: "11px 0px 10px 10px" }}
  2919. onClick={() => {
  2920. this.proData();
  2921. this.setState({
  2922. proVisible: true,
  2923. });
  2924. }}
  2925. >
  2926. 打印项目进度
  2927. </Button>
  2928. </TabPane>
  2929. <TabPane tab="导出Excel" key="4">
  2930. <Button
  2931. type="primary"
  2932. style={{ margin: "11px 0px 10px 10px" }}
  2933. onClick={this.exportAll}
  2934. >
  2935. 导出当前列表
  2936. </Button>
  2937. <Button
  2938. type="primary"
  2939. disabled={this.state.selectedRowKeys.length != 1}
  2940. style={{ margin: "11px 0px 10px 10px" }}
  2941. onClick={this.exportKaip}
  2942. >
  2943. 导出所选开票详情
  2944. </Button>
  2945. <Button
  2946. type="primary"
  2947. disabled={this.state.selectedRowKeys.length != 1}
  2948. style={{ margin: "11px 0px 10px 10px" }}
  2949. onClick={this.exportWater}
  2950. >
  2951. 导出所选收款详情流水
  2952. </Button>
  2953. <Button
  2954. type="primary"
  2955. disabled={this.state.selectedRowKeys.length != 1}
  2956. style={{ margin: "11px 0px 10px 10px" }}
  2957. onClick={this.exportTime}
  2958. >
  2959. 导出所选工时信息
  2960. </Button>
  2961. <Button
  2962. type="primary"
  2963. disabled={this.state.selectedRowKeys.length != 1}
  2964. style={{ margin: "11px 0px 10px 10px" }}
  2965. onClick={this.exportCui}
  2966. >
  2967. 导出催款信息
  2968. </Button>
  2969. <Button
  2970. type="primary"
  2971. disabled={this.state.selectedRowKeys.length != 1}
  2972. style={{ margin: "11px 0px 10px 10px" }}
  2973. onClick={this.exportPro}
  2974. >
  2975. 导出项目进度
  2976. </Button>
  2977. </TabPane>
  2978. <TabPane tab="查看" key="5">
  2979. <Button
  2980. type="primary"
  2981. disabled={this.state.selectedRowKeys.length != 1}
  2982. style={{ margin: "11px 0px 10px 10px" }}
  2983. onClick={() => {
  2984. this.inRecordData();
  2985. this.setState({
  2986. // bvisible: true,
  2987. newVisible: "开票历史记录",
  2988. });
  2989. }}
  2990. >
  2991. 查看开票详情
  2992. </Button>
  2993. <Button
  2994. type="primary"
  2995. disabled={this.state.selectedRowKeys.length != 1}
  2996. style={{ margin: "11px 0px 10px 10px" }}
  2997. onClick={() => {
  2998. this.waterData();
  2999. this.setState({
  3000. // cvisible: true,
  3001. newVisible: "详细收款流水",
  3002. });
  3003. }}
  3004. >
  3005. 详情收款流水
  3006. </Button>
  3007. <Button
  3008. type="primary"
  3009. disabled={this.state.selectedRowKeys.length != 1}
  3010. style={{ margin: "11px 0px 10px 10px" }}
  3011. onClick={() => {
  3012. this.timeData();
  3013. this.setState({
  3014. // timeVisible: true,
  3015. newVisible: "工时详情",
  3016. });
  3017. }}
  3018. >
  3019. 工时信息
  3020. </Button>
  3021. <Button
  3022. type="primary"
  3023. disabled={this.state.selectedRowKeys.length != 1}
  3024. style={{ margin: "11px 0px 10px 10px" }}
  3025. onClick={() => {
  3026. this.cuiData();
  3027. this.setState({
  3028. // cuiVisible: true,
  3029. newVisible: "催款详情",
  3030. });
  3031. }}
  3032. >
  3033. 催款信息
  3034. </Button>
  3035. <Button
  3036. type="primary"
  3037. disabled={this.state.selectedRowKeys.length != 1}
  3038. style={{ margin: "11px 0px 10px 10px" }}
  3039. onClick={() => {
  3040. this.proData();
  3041. this.setState({
  3042. // proVisible: true,
  3043. newVisible: "项目进度",
  3044. });
  3045. }}
  3046. >
  3047. 项目进度
  3048. </Button>
  3049. <Button
  3050. type="primary"
  3051. disabled={this.state.selectedRowKeys.length != 1}
  3052. style={{ margin: "11px 0px 10px 10px" }}
  3053. onClick={() => {
  3054. this.pubData();
  3055. this.selectSuperId();
  3056. this.setState({
  3057. // pubVisible: true,
  3058. newVisible: "公出详细列表",
  3059. });
  3060. }}
  3061. >
  3062. 查看公出
  3063. </Button>
  3064. </TabPane>
  3065. {/* <TabPane tab="批量操作" key="6">
  3066. <Button
  3067. type="primary"
  3068. disabled={this.state.selectedRowKeys.length == 0}
  3069. style={{ margin: "0px 0px 10px 10px" }}
  3070. onClick={e => {
  3071. e.stopPropagation(),
  3072. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  3073. }}
  3074. >
  3075. 转交
  3076. </Button>
  3077. </TabPane> */}
  3078. </Tabs>
  3079. <div className="patent-table">
  3080. <Spin spinning={this.state.loadingA}>
  3081. <Table
  3082. bordered
  3083. columns={
  3084. this.state.changeList == undefined
  3085. ? this.state.columns
  3086. : this.state.changeList
  3087. }
  3088. dataSource={this.state.dataSource}
  3089. rowSelection={rowSelection}
  3090. scroll={{ x: "max-content", y: 0 }}
  3091. pagination={this.state.pagination}
  3092. onRowDoubleClick={this.tableRowClick.bind(this)}
  3093. size="small"
  3094. />
  3095. </Spin>
  3096. <p
  3097. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  3098. >
  3099. {
  3100. <span style={{ marginRight: 10 }}>
  3101. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  3102. </span>
  3103. }
  3104. {
  3105. <span>
  3106. {`合同额总计(万元):${this.state.totalHui ? this.state.totalHui : "0"
  3107. }`}
  3108. </span>
  3109. }
  3110. </p>
  3111. </div>
  3112. <Assign
  3113. title="任务"
  3114. selApi={"/api/admin/newOrder/updateFinance"}
  3115. data={this.state.assignDataY}
  3116. showDesc={this.state.assignVisibleY}
  3117. closeDesc={this.closeAssignY.bind(this)}
  3118. // fenpaiData={8}
  3119. specially={0}
  3120. roleName={this.state.nub}
  3121. requestMethod={"get"}
  3122. />
  3123. <OrderDesc
  3124. data={this.state.RowData}
  3125. showDesc={this.state.showDesc}
  3126. closeDesc={this.closeDesc.bind(this)}
  3127. />
  3128. <Receivable
  3129. title="收款记录"
  3130. api="/api/admin/financial/addReceiptsFlow"
  3131. data={this.state.assignDataX}
  3132. showDesc={this.state.assignVisibleX}
  3133. closeDesc={this.closeAssignX.bind(this)}
  3134. />
  3135. <Modal
  3136. visible={this.state.boHuiVisible}
  3137. width="400px"
  3138. title="驳回备注"
  3139. footer=""
  3140. onOk={this.boHuiOk}
  3141. onCancel={this.boHuiCancel}
  3142. >
  3143. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  3144. <Spin spinning={this.state.loading}>
  3145. <FormItem
  3146. labelCol={{ span: 5 }}
  3147. wrapperCol={{ span: 16 }}
  3148. label={
  3149. <span>
  3150. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  3151. </span>
  3152. }
  3153. >
  3154. <Input
  3155. type="textarea"
  3156. rows={4}
  3157. placeholder="请输入驳回原因"
  3158. value={this.state.content}
  3159. onChange={(e) => {
  3160. this.setState({ content: e.target.value });
  3161. }}
  3162. />
  3163. </FormItem>
  3164. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  3165. <Button
  3166. type="primary"
  3167. htmlType="submit"
  3168. style={{ marginRight: 20 }}
  3169. >
  3170. 驳回
  3171. </Button>
  3172. <Button
  3173. type="default"
  3174. onClick={() => {
  3175. this.boHuiCancel();
  3176. }}
  3177. >
  3178. 取消
  3179. </Button>
  3180. </FormItem>
  3181. </Spin>
  3182. </Form>
  3183. </Modal>
  3184. <Modal
  3185. visible={this.state.bvisible}
  3186. footer=""
  3187. title="开票历史记录"
  3188. className="admin-desc-content"
  3189. width="1200px"
  3190. onCancel={this.inRecordCanl}
  3191. >
  3192. <Spin spinning={this.state.loading}>
  3193. <div
  3194. className="patent-table"
  3195. ref={(e) => {
  3196. this.refs.kaiPiao = e;
  3197. }}
  3198. >
  3199. <Table
  3200. columns={this.state.columnsDate}
  3201. dataSource={this.state.recordData}
  3202. onRowClick={this.kaiPiaoData}
  3203. pagination={false}
  3204. bordered
  3205. size="small"
  3206. />
  3207. <div className="clearfix" style={{ marginTop: "20px" }}>
  3208. <FormItem
  3209. className="half-item"
  3210. {...formItemLayout}
  3211. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  3212. >
  3213. <span>{this.state.sum + "(万元)"}</span>
  3214. </FormItem>
  3215. </div>
  3216. <ReactToPrint
  3217. trigger={() => (
  3218. <Button
  3219. type="primary"
  3220. style={{
  3221. float: "right",
  3222. // marginTop: 10,
  3223. position: "absolute",
  3224. top: -54,
  3225. right: 30,
  3226. }}
  3227. >
  3228. 打印
  3229. </Button>
  3230. )}
  3231. content={() => this.refs.kaiPiao}
  3232. />
  3233. </div>
  3234. </Spin>
  3235. </Modal>
  3236. <Modal
  3237. visible={this.state.cvisible}
  3238. footer=""
  3239. title="详细收款流水"
  3240. className="admin-desc-content"
  3241. width="1300px"
  3242. onCancel={this.waterCanl}
  3243. >
  3244. <Spin spinning={this.state.loading}>
  3245. <div
  3246. className="patent-table"
  3247. ref={(e) => {
  3248. this.refs.shouKuan = e;
  3249. }}
  3250. >
  3251. <Table
  3252. columns={this.state.waterlistDate}
  3253. dataSource={this.state.waterData}
  3254. pagination={false}
  3255. scroll={{ x: "max-content", y: 0 }}
  3256. bordered
  3257. size="small"
  3258. />
  3259. <div className="clearfix" style={{ marginTop: "20px" }}>
  3260. <FormItem
  3261. className="half-item"
  3262. {...formItemLayout}
  3263. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  3264. >
  3265. <span>{this.state.waterSum + "(万元)"}</span>
  3266. </FormItem>
  3267. </div>
  3268. <ReactToPrint
  3269. trigger={() => (
  3270. <Button
  3271. type="primary"
  3272. style={{
  3273. float: "right",
  3274. position: "absolute",
  3275. top: -54,
  3276. right: 30,
  3277. }}
  3278. >
  3279. 打印
  3280. </Button>
  3281. )}
  3282. content={() => this.refs.shouKuan}
  3283. />
  3284. </div>
  3285. </Spin>
  3286. </Modal>
  3287. <Modal
  3288. visible={this.state.dvisible}
  3289. footer=""
  3290. title="所有列表信息"
  3291. className="admin-desc-content"
  3292. width="1300px"
  3293. onCancel={() => {
  3294. this.loadData();
  3295. this.setState({
  3296. dvisible: false,
  3297. });
  3298. }}
  3299. >
  3300. <Spin spinning={this.state.loading}>
  3301. <div
  3302. className="patent-table"
  3303. style={{
  3304. // width: 900,
  3305. // position: "relative",
  3306. // left: "50%",
  3307. // transform: "translate(-50%)",
  3308. padding: "25px 0 30px 30px",
  3309. }}
  3310. ref={(e) => {
  3311. this.refs.all = e;
  3312. }}
  3313. >
  3314. <Table
  3315. columns={this.state.printColumns}
  3316. dataSource={this.state.dataSource}
  3317. pagination={false}
  3318. bordered
  3319. size="small"
  3320. />
  3321. </div>
  3322. </Spin>
  3323. <ReactToPrint
  3324. trigger={() => (
  3325. <Button
  3326. type="primary"
  3327. style={{
  3328. float: "right",
  3329. marginTop: 10,
  3330. position: "absolute",
  3331. top: 0,
  3332. right: 30,
  3333. }}
  3334. >
  3335. 打印
  3336. </Button>
  3337. )}
  3338. content={() => this.refs.all}
  3339. />
  3340. </Modal>
  3341. <Project
  3342. record={this.state.record}
  3343. visible={this.state.pvisible}
  3344. isAuditPayment={true}
  3345. cancel={() => {
  3346. this.setState({ pvisible: false });
  3347. }}
  3348. />
  3349. {/* 工时详情 */}
  3350. <Modal
  3351. visible={this.state.timeVisible}
  3352. footer=""
  3353. title="工时详情"
  3354. className="admin-desc-content"
  3355. width="1300px"
  3356. pagination={false}
  3357. onCancel={() => {
  3358. this.loadData();
  3359. this.setState({
  3360. timeVisible: false,
  3361. });
  3362. }}
  3363. >
  3364. <Spin spinning={this.state.loading}>
  3365. <div
  3366. className="patent-table"
  3367. style={
  3368. {
  3369. // width: 900,
  3370. // position: "relative",
  3371. // left: "50%",
  3372. // transform: "translate(-50%)",
  3373. // padding: "25px 0 30px 30px"
  3374. }
  3375. }
  3376. ref={(e) => {
  3377. this.refs.all = e;
  3378. }}
  3379. >
  3380. <Table
  3381. columns={this.state.timeColumns}
  3382. dataSource={this.state.timeDataList}
  3383. onRowClick={this.tableRowClickPro}
  3384. scroll={{ x: "max-content", y: 0 }}
  3385. pagination={false}
  3386. bordered
  3387. size="small"
  3388. />
  3389. </div>
  3390. </Spin>
  3391. <ReactToPrint
  3392. trigger={() => (
  3393. <Button
  3394. type="primary"
  3395. style={{
  3396. float: "right",
  3397. marginTop: 10,
  3398. position: "absolute",
  3399. top: 0,
  3400. right: 30,
  3401. }}
  3402. >
  3403. 打印
  3404. </Button>
  3405. )}
  3406. content={() => this.refs.all}
  3407. />
  3408. </Modal>
  3409. {/* 催款详情 */}
  3410. <Modal
  3411. visible={this.state.cuiVisible}
  3412. footer=""
  3413. title="催款详情"
  3414. className="admin-desc-content"
  3415. width="1300px"
  3416. pagination={false}
  3417. onCancel={() => {
  3418. this.loadData();
  3419. this.setState({
  3420. cuiVisible: false,
  3421. cuiTabKey: "1",
  3422. });
  3423. }}
  3424. >
  3425. <Tabs activeKey={this.state.cuiTabKey} onChange={this.cuiTabChange}>
  3426. <TabPane tab="催款节点" key="1">
  3427. <Spin spinning={this.state.loading}>
  3428. <div
  3429. className="patent-table"
  3430. ref={(e) => {
  3431. this.refs.all = e;
  3432. }}
  3433. >
  3434. <Table
  3435. columns={this.state.cuiColumns}
  3436. dataSource={this.state.cuiDataList}
  3437. scroll={{ x: "max-content", y: 0 }}
  3438. pagination={false}
  3439. bordered
  3440. size="small"
  3441. />
  3442. </div>
  3443. <ReactToPrint
  3444. trigger={() => (
  3445. <Button
  3446. type="primary"
  3447. style={{
  3448. float: "right",
  3449. marginTop: 10,
  3450. position: "absolute",
  3451. top: "-60px",
  3452. right: 30,
  3453. }}
  3454. >
  3455. 打印
  3456. </Button>
  3457. )}
  3458. content={() => this.refs.all}
  3459. />
  3460. </Spin>
  3461. </TabPane>
  3462. <TabPane tab="欠款催收记录" key="2">
  3463. <Spin spinning={this.state.loading}>
  3464. <div
  3465. className="patent-table"
  3466. ref={(e) => {
  3467. this.refs.all = e;
  3468. }}
  3469. >
  3470. <Table
  3471. columns={this.state.qianColumns}
  3472. dataSource={this.state.qianDataList}
  3473. scroll={{ x: "max-content", y: 0 }}
  3474. pagination={false}
  3475. bordered
  3476. size="small"
  3477. />
  3478. </div>
  3479. <ReactToPrint
  3480. trigger={() => (
  3481. <Button
  3482. type="primary"
  3483. style={{
  3484. float: "right",
  3485. marginTop: 10,
  3486. position: "absolute",
  3487. top: "-60px",
  3488. right: 30,
  3489. }}
  3490. >
  3491. 打印
  3492. </Button>
  3493. )}
  3494. content={() => this.refs.all}
  3495. />
  3496. </Spin>
  3497. </TabPane>
  3498. </Tabs>
  3499. </Modal>
  3500. {/* 项目进度 */}
  3501. <Modal
  3502. visible={this.state.proVisible}
  3503. footer=""
  3504. title="项目进度"
  3505. className="admin-desc-content"
  3506. width="1300px"
  3507. pagination={false}
  3508. onCancel={() => {
  3509. this.loadData(this.state.page);
  3510. this.setState({
  3511. proVisible: false,
  3512. });
  3513. }}
  3514. >
  3515. <Spin spinning={this.state.loading}>
  3516. <div
  3517. className="patent-table"
  3518. ref={(e) => {
  3519. this.refs.all = e;
  3520. }}
  3521. >
  3522. <Table
  3523. columns={this.state.proColumns}
  3524. dataSource={this.state.proDataList}
  3525. scroll={{ x: "max-content", y: 0 }}
  3526. onRowClick={this.tableRowClickPro}
  3527. pagination={false}
  3528. bordered
  3529. size="small"
  3530. />
  3531. </div>
  3532. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  3533. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  3534. </span>
  3535. </Spin>
  3536. <ReactToPrint
  3537. trigger={() => (
  3538. <Button
  3539. type="primary"
  3540. style={{
  3541. float: "right",
  3542. marginTop: 10,
  3543. position: "absolute",
  3544. top: 0,
  3545. right: 30,
  3546. }}
  3547. >
  3548. 打印
  3549. </Button>
  3550. )}
  3551. content={() => this.refs.all}
  3552. />
  3553. </Modal>
  3554. {/* 查看公出 */}
  3555. <Modal
  3556. visible={this.state.pubVisible}
  3557. footer=""
  3558. title={<span>公出详细列表(
  3559. {this.state.selectedRows.length > 0 && this.state.selectedRows[0].buyerName}
  3560. )</span>}
  3561. className="admin-desc-content"
  3562. width="1500px"
  3563. pagination={false}
  3564. onCancel={() => {
  3565. this.pubData();
  3566. this.setState({
  3567. pubVisible: false,
  3568. });
  3569. }}
  3570. >
  3571. <div
  3572. className="user-search"
  3573. style={{
  3574. marginTop: "10px",
  3575. marginLeft: "10px",
  3576. marginRight: "10px",
  3577. }}
  3578. >
  3579. <span style={{ marginRight: "10px" }}>
  3580. <Select
  3581. placeholder="请选择审核状态"
  3582. style={{ width: 120 }}
  3583. value={this.state.status}
  3584. onChange={(e) => {
  3585. this.setState({ status: e });
  3586. }}
  3587. >
  3588. {clockState.map((v, k) => (
  3589. <Select.Option key={k} value={v.id}>
  3590. {v.title}
  3591. </Select.Option>
  3592. ))}
  3593. </Select>
  3594. </span>
  3595. <span style={{ marginRight: "10px" }}>
  3596. <Select
  3597. placeholder="请选择打卡状态"
  3598. style={{ width: 120 }}
  3599. value={this.state.clockIn}
  3600. onChange={(e) => {
  3601. this.setState({ clockIn: e });
  3602. }}
  3603. >
  3604. <Select.Option value={1}>已打卡</Select.Option>
  3605. <Select.Option value={0}>未打卡</Select.Option>
  3606. </Select>
  3607. </span>
  3608. <span style={{ marginRight: "10px" }}>
  3609. <Select
  3610. placeholder="请选择公出类型"
  3611. style={{ width: 120 }}
  3612. value={this.state.type}
  3613. onChange={(e) => {
  3614. this.setState({ type: e });
  3615. }}
  3616. >
  3617. <Select.Option value={0}>业务打卡</Select.Option>
  3618. <Select.Option value={1}>技术打卡</Select.Option>
  3619. <Select.Option value={2}>行政打卡</Select.Option>
  3620. <Select.Option value={3}>技术协单</Select.Option>
  3621. </Select>
  3622. </span>
  3623. <span style={{ marginRight: "10px" }}>
  3624. <AutoComplete
  3625. className="certain-category-search"
  3626. dropdownClassName="certain-category-search-dropdown"
  3627. dropdownMatchSelectWidth={false}
  3628. style={{ width: "120px" }}
  3629. dataSource={options}
  3630. placeholder="输入公出申请人"
  3631. value={this.state.auto}
  3632. onChange={this.httpChange}
  3633. filterOption={true}
  3634. onBlur={this.blurChange}
  3635. onSelect={this.selectAuto}
  3636. >
  3637. <Input />
  3638. </AutoComplete>
  3639. </span>
  3640. <span style={{ marginRight: "10px" }}>
  3641. <AutoComplete
  3642. className="certain-category-search"
  3643. dropdownClassName="certain-category-search-dropdown"
  3644. dropdownMatchSelectWidth={false}
  3645. style={{ width: "120px" }}
  3646. dataSource={options1}
  3647. placeholder="输入跟单人"
  3648. value={this.state.auto1}
  3649. onChange={this.httpChange1}
  3650. filterOption={true}
  3651. onBlur={this.blurChange1}
  3652. onSelect={this.selectAuto1}
  3653. >
  3654. <Input />
  3655. </AutoComplete>
  3656. </span>
  3657. <span style={{ marginRight: "10px" }}>
  3658. <Select
  3659. placeholder="请选择公出部门"
  3660. style={{ width: 200 }}
  3661. value={this.state.depId}
  3662. onChange={(e) => {
  3663. this.setState({ depId: e });
  3664. }}
  3665. notFoundContent="未获取到上级组织列表"
  3666. >
  3667. {this.state.contactsOption}
  3668. </Select>
  3669. </span>
  3670. <span style={{ marginRight: "10px" }}>
  3671. <span style={{ marginRight: "5px", marginBottom: "10px" }}>
  3672. 公出时间 :
  3673. </span>
  3674. <RangePicker
  3675. style={{ marginRight: "10px", marginBottom: "10px" }}
  3676. value={[
  3677. this.state.releaseDate[0]
  3678. ? moment(this.state.releaseDate[0])
  3679. : null,
  3680. this.state.releaseDate[1]
  3681. ? moment(this.state.releaseDate[1])
  3682. : null,
  3683. ]}
  3684. onChange={(data, dataString) => {
  3685. this.setState({ releaseDate: dataString });
  3686. }}
  3687. />
  3688. </span>
  3689. <Button
  3690. type="primary"
  3691. onClick={() => {
  3692. this.pubData();
  3693. }}
  3694. style={{ marginRight: "10px", marginBottom: "10px" }}
  3695. >
  3696. 搜索
  3697. </Button>
  3698. <Button
  3699. onClick={this.resetAll}
  3700. style={{ marginRight: "10px", marginBottom: "10px" }}
  3701. >
  3702. 重置
  3703. </Button>
  3704. </div>
  3705. <Spin spinning={this.state.loading}>
  3706. <div
  3707. className="patent-table"
  3708. ref={(e) => {
  3709. this.refs.all = e;
  3710. }}
  3711. >
  3712. <Table
  3713. columns={this.state.pubColumns}
  3714. dataSource={this.state.pubDataList}
  3715. scroll={{ x: "max-content", y: 0 }}
  3716. pagination={false}
  3717. bordered
  3718. size="small"
  3719. />
  3720. </div>
  3721. </Spin>
  3722. <Button
  3723. type="primary"
  3724. style={{
  3725. float: "right",
  3726. marginTop: 10,
  3727. position: "absolute",
  3728. top: 0,
  3729. right: 120,
  3730. }}
  3731. loading={this.state.exportPendingLoading}
  3732. onClick={() => { this.pubexportExec() }}
  3733. >
  3734. 导出
  3735. </Button>
  3736. <ReactToPrint
  3737. trigger={() => (
  3738. <Button
  3739. type="primary"
  3740. style={{
  3741. float: "right",
  3742. marginTop: 10,
  3743. position: "absolute",
  3744. top: 0,
  3745. right: 30,
  3746. }}
  3747. >
  3748. 打印
  3749. </Button>
  3750. )}
  3751. content={() => this.refs.all}
  3752. />
  3753. </Modal>
  3754. <Spin spinning={this.state.loading}>
  3755. {this.state.checkVisible ? <Modal
  3756. title="审核订单"
  3757. visible={this.state.checkVisible}
  3758. onOk={this.checkOk}
  3759. confirmLoading={this.state.loading}
  3760. okText={"通过"}
  3761. onCancel={() => {
  3762. this.state.financeApprovalAjaxObj ? this.state.financeApprovalAjaxObj.abort() : null;
  3763. this.setState({
  3764. financeApprovalAjaxObj: null
  3765. })
  3766. this.loadData();
  3767. this.setState({
  3768. checkVisible: false,
  3769. checkData: "",
  3770. });
  3771. }}
  3772. >
  3773. <TextArea
  3774. value={this.state.checkData}
  3775. onChange={(e, recard) => {
  3776. this.setState({
  3777. checkData: e.target.value,
  3778. });
  3779. }}
  3780. placeholder="请填写审核内容"
  3781. />
  3782. </Modal> : <div />}
  3783. </Spin>
  3784. <KaiPiaoModal
  3785. visible={this.state.avisible}
  3786. data={this.state.modalData}
  3787. onCancel={this.visitCancels}
  3788. loading={this.state.loading}
  3789. />
  3790. {/* 合并查看 */}
  3791. {
  3792. this.state.newVisible != "" &&
  3793. <Modal
  3794. visible={this.state.newVisible != ""}
  3795. footer=""
  3796. title={this.state.newVisible}
  3797. className="admin-desc-content"
  3798. width="1500px"
  3799. pagination={false}
  3800. onCancel={() => {
  3801. this.setState({
  3802. newVisible: "",
  3803. });
  3804. }}
  3805. >
  3806. <Spin spinning={this.state.loading}>
  3807. <div style={{ margin: 20 }}>
  3808. <div style={{ marginBottom: 20 }}>
  3809. <Table
  3810. bordered
  3811. columns={this.state.columns}
  3812. dataSource={this.state.newData}
  3813. scroll={{ x: "max-content", y: 0 }}
  3814. pagination={false}
  3815. onRowDoubleClick={this.tableRowClick.bind(this)}
  3816. size="small"
  3817. />
  3818. </div>
  3819. <div>
  3820. <Button
  3821. type="primary"
  3822. style={{
  3823. margin: "11px 0px 10px 10px",
  3824. background: this.state.newVisible == "开票历史记录" ? "#f04134" : "",
  3825. }}
  3826. onClick={() => {
  3827. this.inRecordData();
  3828. this.setState({
  3829. newVisible: "开票历史记录"
  3830. });
  3831. }}
  3832. >
  3833. 查看开票详情
  3834. </Button>
  3835. <Button
  3836. type="primary"
  3837. style={{
  3838. margin: "11px 0px 10px 10px",
  3839. background: this.state.newVisible == "详细收款流水" ? "#f04134" : "",
  3840. }}
  3841. onClick={() => {
  3842. this.waterData();
  3843. this.setState({
  3844. newVisible: "详细收款流水",
  3845. });
  3846. }}
  3847. >
  3848. 详情收款流水
  3849. </Button>
  3850. <Button
  3851. type="primary"
  3852. style={{
  3853. margin: "11px 0px 10px 10px",
  3854. background: this.state.newVisible == "工时详情" ? "#f04134" : "",
  3855. }}
  3856. onClick={() => {
  3857. this.timeData();
  3858. this.setState({
  3859. newVisible: "工时详情",
  3860. });
  3861. }}
  3862. >
  3863. 工时信息
  3864. </Button>
  3865. <Button
  3866. type="primary"
  3867. style={{
  3868. margin: "11px 0px 10px 10px",
  3869. background: this.state.newVisible == "催款详情" ? "#f04134" : "",
  3870. }}
  3871. onClick={() => {
  3872. this.cuiData();
  3873. this.setState({
  3874. newVisible: "催款详情",
  3875. });
  3876. }}
  3877. >
  3878. 催款信息
  3879. </Button>
  3880. <Button
  3881. type="primary"
  3882. style={{
  3883. margin: "11px 0px 10px 10px",
  3884. background: this.state.newVisible == "项目进度" ? "#f04134" : "",
  3885. }}
  3886. onClick={() => {
  3887. this.proData();
  3888. this.setState({
  3889. newVisible: "项目进度",
  3890. });
  3891. }}
  3892. >
  3893. 项目进度
  3894. </Button>
  3895. <Button
  3896. type="primary"
  3897. style={{
  3898. margin: "11px 0px 10px 10px",
  3899. background: this.state.newVisible == "公出详细列表" ? "#f04134" : "",
  3900. }}
  3901. onClick={() => {
  3902. this.pubData();
  3903. this.selectSuperId();
  3904. this.setState({
  3905. newVisible: "公出详细列表",
  3906. });
  3907. }}
  3908. >
  3909. 查看公出
  3910. </Button>
  3911. </div>
  3912. {
  3913. this.state.newVisible == "公出详细列表" &&
  3914. <div
  3915. className="user-search"
  3916. style={{
  3917. marginTop: "10px",
  3918. marginLeft: "10px",
  3919. marginRight: "10px",
  3920. }}
  3921. >
  3922. <span style={{ marginRight: "10px" }}>
  3923. <Select
  3924. placeholder="请选择审核状态"
  3925. style={{ width: 120 }}
  3926. value={this.state.status}
  3927. onChange={(e) => {
  3928. this.setState({ status: e });
  3929. }}
  3930. >
  3931. {clockState.map((v, k) => (
  3932. <Select.Option key={k} value={v.id}>
  3933. {v.title}
  3934. </Select.Option>
  3935. ))}
  3936. </Select>
  3937. </span>
  3938. <span style={{ marginRight: "10px" }}>
  3939. <Select
  3940. placeholder="请选择打卡状态"
  3941. style={{ width: 120 }}
  3942. value={this.state.clockIn}
  3943. onChange={(e) => {
  3944. this.setState({ clockIn: e });
  3945. }}
  3946. >
  3947. <Select.Option value={1}>已打卡</Select.Option>
  3948. <Select.Option value={0}>未打卡</Select.Option>
  3949. </Select>
  3950. </span>
  3951. <span style={{ marginRight: "10px" }}>
  3952. <Select
  3953. placeholder="请选择公出类型"
  3954. style={{ width: 120 }}
  3955. value={this.state.type}
  3956. onChange={(e) => {
  3957. this.setState({ type: e });
  3958. }}
  3959. >
  3960. <Select.Option value={0}>业务打卡</Select.Option>
  3961. <Select.Option value={1}>技术打卡</Select.Option>
  3962. <Select.Option value={2}>行政打卡</Select.Option>
  3963. <Select.Option value={3}>技术协单</Select.Option>
  3964. </Select>
  3965. </span>
  3966. <span style={{ marginRight: "10px" }}>
  3967. <AutoComplete
  3968. className="certain-category-search"
  3969. dropdownClassName="certain-category-search-dropdown"
  3970. dropdownMatchSelectWidth={false}
  3971. style={{ width: "120px" }}
  3972. dataSource={options}
  3973. placeholder="输入公出申请人"
  3974. value={this.state.auto}
  3975. onChange={this.httpChange}
  3976. filterOption={true}
  3977. onBlur={this.blurChange}
  3978. onSelect={this.selectAuto}
  3979. >
  3980. <Input />
  3981. </AutoComplete>
  3982. </span>
  3983. <span style={{ marginRight: "10px" }}>
  3984. <AutoComplete
  3985. className="certain-category-search"
  3986. dropdownClassName="certain-category-search-dropdown"
  3987. dropdownMatchSelectWidth={false}
  3988. style={{ width: "120px" }}
  3989. dataSource={options1}
  3990. placeholder="输入跟单人"
  3991. value={this.state.auto1}
  3992. onChange={this.httpChange1}
  3993. filterOption={true}
  3994. onBlur={this.blurChange1}
  3995. onSelect={this.selectAuto1}
  3996. >
  3997. <Input />
  3998. </AutoComplete>
  3999. </span>
  4000. <span style={{ marginRight: "10px" }}>
  4001. <Select
  4002. placeholder="请选择公出部门"
  4003. style={{ width: 200 }}
  4004. value={this.state.depId}
  4005. onChange={(e) => {
  4006. this.setState({ depId: e });
  4007. }}
  4008. notFoundContent="未获取到上级组织列表"
  4009. >
  4010. {this.state.contactsOption}
  4011. </Select>
  4012. </span>
  4013. <span style={{ marginRight: "10px" }}>
  4014. <span style={{ marginRight: "5px", marginBottom: "10px" }}>
  4015. 公出时间 :
  4016. </span>
  4017. <RangePicker
  4018. style={{ marginRight: "10px", marginBottom: "10px" }}
  4019. value={[
  4020. this.state.releaseDate[0]
  4021. ? moment(this.state.releaseDate[0])
  4022. : null,
  4023. this.state.releaseDate[1]
  4024. ? moment(this.state.releaseDate[1])
  4025. : null,
  4026. ]}
  4027. onChange={(data, dataString) => {
  4028. this.setState({ releaseDate: dataString });
  4029. }}
  4030. />
  4031. </span>
  4032. <Button
  4033. type="primary"
  4034. onClick={() => {
  4035. this.pubData();
  4036. }}
  4037. style={{ marginRight: "10px", marginBottom: "10px" }}
  4038. >
  4039. 搜索
  4040. </Button>
  4041. <Button
  4042. onClick={this.resetAll}
  4043. style={{ marginRight: "10px", marginBottom: "10px" }}
  4044. >
  4045. 重置
  4046. </Button>
  4047. </div>
  4048. }
  4049. {
  4050. this.state.newVisible == "催款详情"
  4051. ? <Tabs activeKey={this.state.cuiTabKey} onChange={this.cuiTabChange}>
  4052. <TabPane tab="催款节点" key="1">
  4053. <Spin spinning={this.state.loading}>
  4054. <div
  4055. className="patent-table"
  4056. ref={(e) => {
  4057. this.refs.all = e;
  4058. }}
  4059. >
  4060. <Table
  4061. columns={this.state.cuiColumns}
  4062. dataSource={this.state.cuiDataList}
  4063. scroll={{ x: "max-content", y: 0 }}
  4064. pagination={false}
  4065. bordered
  4066. size="small"
  4067. />
  4068. </div>
  4069. <Button
  4070. type="primary"
  4071. style={{
  4072. float: "right",
  4073. marginTop: 10,
  4074. position: "absolute",
  4075. top: "-60px",
  4076. right: "100px",
  4077. }}
  4078. loading={this.state.exportPendingLoading}
  4079. onClick={() => { this.exportCui() }}
  4080. >
  4081. 导出
  4082. </Button>
  4083. <ReactToPrint
  4084. trigger={() => (
  4085. <Button
  4086. type="primary"
  4087. style={{
  4088. float: "right",
  4089. marginTop: 10,
  4090. position: "absolute",
  4091. top: "-60px",
  4092. right: "10px",
  4093. }}
  4094. >
  4095. 打印
  4096. </Button>
  4097. )}
  4098. content={() => this.refs.all}
  4099. />
  4100. </Spin>
  4101. </TabPane>
  4102. <TabPane tab="欠款催收记录" key="2">
  4103. <Spin spinning={this.state.loading}>
  4104. <div
  4105. className="patent-table"
  4106. ref={(e) => {
  4107. this.refs.all = e;
  4108. }}
  4109. >
  4110. <Table
  4111. columns={this.state.qianColumns}
  4112. dataSource={this.state.qianDataList}
  4113. scroll={{ x: "max-content", y: 0 }}
  4114. pagination={false}
  4115. bordered
  4116. size="small"
  4117. />
  4118. </div>
  4119. <ReactToPrint
  4120. trigger={() => (
  4121. <Button
  4122. type="primary"
  4123. style={{
  4124. float: "right",
  4125. marginTop: 10,
  4126. position: "absolute",
  4127. top: "-60px",
  4128. right: "10px",
  4129. }}
  4130. >
  4131. 打印
  4132. </Button>
  4133. )}
  4134. content={() => this.refs.all}
  4135. />
  4136. </Spin>
  4137. </TabPane>
  4138. </Tabs>
  4139. : <div
  4140. className="patent-table"
  4141. style={{ position: "relative" }}
  4142. ref={(e) => {
  4143. this.refs.all = e;
  4144. }}
  4145. >
  4146. <Table
  4147. bordered
  4148. columns={
  4149. this.state.newVisible == "开票历史记录"
  4150. ? this.state.columnsDate : this.state.newVisible == "详细收款流水"
  4151. ? this.state.waterlistDate : this.state.newVisible == "工时详情"
  4152. ? this.state.timeColumns : this.state.newVisible == "催款详情"
  4153. ? this.state.cuiColumns : this.state.newVisible == "项目进度"
  4154. ? this.state.proColumns : this.state.newVisible == "公出详细列表"
  4155. && this.state.pubColumns
  4156. }
  4157. dataSource={
  4158. this.state.newVisible == "开票历史记录"
  4159. ? this.state.recordData : this.state.newVisible == "详细收款流水"
  4160. ? this.state.waterData : this.state.newVisible == "工时详情"
  4161. ? this.state.timeDataList : this.state.newVisible == "催款详情"
  4162. ? this.state.cuiDataList : this.state.newVisible == "项目进度"
  4163. ? this.state.proDataList : this.state.newVisible == "公出详细列表"
  4164. && this.state.pubDataList
  4165. }
  4166. pagination={false}
  4167. scroll={{ x: "max-content", y: 0 }}
  4168. size="small"
  4169. onRowClick={this.tableonRowClick.bind(this)}
  4170. />
  4171. {
  4172. this.state.newVisible == "开票历史记录" &&
  4173. <div className="clearfix" style={{ marginTop: "20px" }}>
  4174. <FormItem
  4175. className="half-item"
  4176. {...formItemLayout}
  4177. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  4178. >
  4179. <span>{this.state.sum + "(万元)"}</span>
  4180. </FormItem>
  4181. </div>
  4182. }
  4183. {
  4184. this.state.newVisible == "开票历史记录" &&
  4185. <Button
  4186. type="primary"
  4187. style={{
  4188. float: "right",
  4189. position: "absolute",
  4190. top: "-40px",
  4191. right: "100px",
  4192. }}
  4193. loading={this.state.exportPendingLoading}
  4194. onClick={() => { this.exportKaip() }}
  4195. >
  4196. 导出
  4197. </Button>
  4198. }
  4199. {
  4200. this.state.newVisible == "开票历史记录" &&
  4201. <ReactToPrint
  4202. trigger={() => (
  4203. <Button type="primary"
  4204. style={{
  4205. float: "right",
  4206. position: "absolute",
  4207. top: "-40px",
  4208. right: "10px",
  4209. }}
  4210. >打印</Button>
  4211. )}
  4212. content={() => this.refs.kaiPiao}
  4213. />
  4214. }
  4215. {
  4216. this.state.newVisible == "详细收款流水" &&
  4217. <div className="clearfix" style={{ marginTop: "20px" }}>
  4218. <FormItem
  4219. className="half-item"
  4220. {...formItemLayout}
  4221. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  4222. >
  4223. <span>{this.state.waterSum + "(万元)"}</span>
  4224. </FormItem>
  4225. </div>
  4226. }
  4227. {
  4228. this.state.newVisible == "详细收款流水" &&
  4229. <Button
  4230. type="primary"
  4231. style={{
  4232. float: "right",
  4233. position: "absolute",
  4234. top: "-40px",
  4235. right: "100px",
  4236. }}
  4237. loading={this.state.exportPendingLoading}
  4238. onClick={() => { this.exportWater() }}
  4239. >
  4240. 导出
  4241. </Button>
  4242. }
  4243. {
  4244. this.state.newVisible == "详细收款流水" &&
  4245. <ReactToPrint
  4246. trigger={() => (
  4247. <Button
  4248. type="primary"
  4249. style={{
  4250. float: "right",
  4251. position: "absolute",
  4252. top: "-40px",
  4253. right: "10px",
  4254. }}
  4255. >
  4256. 打印
  4257. </Button>
  4258. )}
  4259. content={() => this.refs.shouKuan}
  4260. />
  4261. }
  4262. {
  4263. this.state.newVisible == "工时详情" &&
  4264. <Button
  4265. type="primary"
  4266. style={{
  4267. float: "right",
  4268. position: "absolute",
  4269. top: "-40px",
  4270. right: "100px",
  4271. }}
  4272. loading={this.state.exportPendingLoading}
  4273. onClick={() => { this.exportTime() }}
  4274. >
  4275. 导出
  4276. </Button>
  4277. }
  4278. {
  4279. this.state.newVisible == "工时详情" &&
  4280. <ReactToPrint
  4281. trigger={() => (
  4282. <Button
  4283. type="primary"
  4284. style={{
  4285. float: "right",
  4286. position: "absolute",
  4287. top: "-40px",
  4288. right: "10px",
  4289. }}
  4290. >
  4291. 打印
  4292. </Button>
  4293. )}
  4294. content={() => this.refs.all}
  4295. />
  4296. }
  4297. {
  4298. this.state.newVisible == "项目进度" &&
  4299. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  4300. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  4301. </span>
  4302. }
  4303. {
  4304. this.state.newVisible == "项目进度" &&
  4305. <Button
  4306. type="primary"
  4307. style={{
  4308. float: "right",
  4309. position: "absolute",
  4310. top: "-40px",
  4311. right: "100px",
  4312. }}
  4313. loading={this.state.exportPendingLoading}
  4314. onClick={() => { this.exportPro() }}
  4315. >
  4316. 导出
  4317. </Button>
  4318. }
  4319. {
  4320. this.state.newVisible == "项目进度" &&
  4321. <ReactToPrint
  4322. trigger={() => (
  4323. <Button
  4324. type="primary"
  4325. style={{
  4326. float: "right",
  4327. position: "absolute",
  4328. top: "-40px",
  4329. right: "10px",
  4330. }}
  4331. >
  4332. 打印
  4333. </Button>
  4334. )}
  4335. content={() => this.refs.all}
  4336. />
  4337. }
  4338. {
  4339. this.state.newVisible == "公出详细列表" &&
  4340. <Button
  4341. type="primary"
  4342. style={{
  4343. float: "right",
  4344. position: "absolute",
  4345. top: "-90px",
  4346. right: "100px",
  4347. }}
  4348. loading={this.state.exportPendingLoading}
  4349. onClick={() => { this.pubexportExec() }}
  4350. >
  4351. 导出
  4352. </Button>
  4353. }
  4354. {
  4355. this.state.newVisible == "公出详细列表" &&
  4356. <ReactToPrint
  4357. trigger={() => (
  4358. <Button
  4359. type="primary"
  4360. style={{
  4361. float: "right",
  4362. position: "absolute",
  4363. top: "-90px",
  4364. right: "10px",
  4365. }}
  4366. >
  4367. 打印
  4368. </Button>
  4369. )}
  4370. content={() => this.refs.all}
  4371. />
  4372. }
  4373. </div>
  4374. }
  4375. </div>
  4376. </Spin>
  4377. </Modal>
  4378. }
  4379. <textarea id="copyText" style={{ opacity: 0 }} />
  4380. </div>
  4381. );
  4382. },
  4383. });
  4384. export default ShouKuang;