approvedOutsourcingAll.jsx 105 KB

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