approvedOutsourcing.jsx 110 KB

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