shouKuanAll.jsx 131 KB

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