shouKuang.jsx 98 KB

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