shouKuang.jsx 133 KB

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