approvedOutsourcing.jsx 106 KB

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