approvedOutsourcing.jsx 106 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609
  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. getCuikuan
  37. } from "@/tools";
  38. import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
  39. const FormItem = Form.Item;
  40. const approvedOutsourcing = React.createClass({
  41. departmentList() {
  42. this.setState({
  43. loading: true
  44. });
  45. $.ajax({
  46. method: "get",
  47. dataType: "json",
  48. crossDomain: false,
  49. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  50. data: {},
  51. success: function(data) {
  52. let thedata = data.data;
  53. let theArr = [];
  54. if (!thedata) {
  55. if (data.error && data.error.length) {
  56. message.warning(data.error[0].message);
  57. }
  58. } else {
  59. thedata.map(function(item, index) {
  60. theArr.push({
  61. key: index,
  62. name: item.name,
  63. id: item.id
  64. });
  65. });
  66. }
  67. this.setState({
  68. departmentArr: theArr
  69. });
  70. }.bind(this)
  71. }).always(
  72. function() {
  73. this.setState({
  74. loading: false
  75. });
  76. }.bind(this)
  77. );
  78. },
  79. loadData(pageNo, pageSize) {
  80. this.state.data = [];
  81. this.setState({
  82. page: pageNo,
  83. loadingA: true
  84. });
  85. $.ajax({
  86. method: "get",
  87. dataType: "json",
  88. crossDomain: false,
  89. url: globalConfig.context + "/api/admin/financial/financeList",
  90. data: {
  91. pageNo: pageNo || 1,
  92. pageSize: pageSize || this.state.pagination.pageSize,
  93. buyerName: this.state.nameSearch, //客户名称
  94. orderNo: this.state.orderNoSearch,
  95. startTime: this.state.releaseDate[0],
  96. endTime: this.state.releaseDate[1],
  97. startFinalReceivablesTime: this.state.shouKuanDate[0],
  98. endFinalReceivablesTime: this.state.shouKuanDate[1],
  99. departmentId: this.state.departmenttList,
  100. processStatus: this.state.processStatusSearch,
  101. contractNo: this.state.contractNoSearch,
  102. outsource: 1,
  103. liquidationStatus: this.state.liquidationStatus
  104. },
  105. success: function(data) {
  106. let theArr = [];
  107. if (!data.data || !data.data.pagination.list) {
  108. if (data.error && data.error.length) {
  109. message.warning(data.error[0].message);
  110. }
  111. } else {
  112. for (let i = 0; i < data.data.pagination.list.length; i++) {
  113. let thisdata = data.data.pagination.list[i];
  114. theArr.push({
  115. key: thisdata.orderNo,
  116. orderNo: thisdata.orderNo,
  117. orderType: thisdata.orderType,
  118. orderStatus: thisdata.orderStatus,
  119. sellerName: thisdata.sellerName,
  120. processStatus: thisdata.processStatus,
  121. liquidationStatus: thisdata.liquidationStatus,
  122. approval: thisdata.approval,
  123. buyerName: thisdata.buyerName,
  124. actuallyTotalAmount: thisdata.actuallyTotalAmount,
  125. signTime: thisdata.signTime,
  126. companyId: thisdata.companyId,
  127. companyName: thisdata.companyName,
  128. buyerId: thisdata.buyerId,
  129. buyerName: thisdata.buyerName,
  130. contractNo: thisdata.contractNo,
  131. createTime: thisdata.createTime,
  132. departmentName: thisdata.departmentName,
  133. outsourceName: thisdata.outsourceName,
  134. invoiceAmount: thisdata.invoiceAmount,
  135. finalReceivables: thisdata.finalReceivables,
  136. finalReceivablesTime: thisdata.finalReceivablesTime,
  137. signTotalAmount: thisdata.signTotalAmount,
  138. outsourceAmount: thisdata.outsourceAmount,
  139. financeName: thisdata.financeName,
  140. outsourceAmount: thisdata.outsourceAmount
  141. });
  142. }
  143. }
  144. this.state.pagination.current = data.data.pagination.pageNo;
  145. this.state.pagination.total = data.data.pagination.totalCount;
  146. if (
  147. data.data &&
  148. data.data.pagination.list &&
  149. !data.data.pagination.list.length
  150. ) {
  151. this.state.pagination.current = 0;
  152. this.state.pagination.total = 0;
  153. }
  154. this.setState({
  155. totalPage: data.data.pagination.totalPage,
  156. dataSource: theArr,
  157. pagination: this.state.pagination,
  158. totalHui: data.data.count ? data.data.count.signTotalAmount : 0,
  159. hui: data.data.count ? data.data.count.actuallyTotalAmount : 0
  160. });
  161. }.bind(this)
  162. }).always(
  163. function() {
  164. this.setState({
  165. loadingA: false
  166. });
  167. }.bind(this)
  168. );
  169. },
  170. getInitialState() {
  171. return {
  172. rotateDeg: 0,
  173. searchMore: true,
  174. loadingA: false,
  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. // 子组件改变的表格title数组
  203. changeList: undefined,
  204. columns: [
  205. {
  206. title: "合同编号",
  207. dataIndex: "contractNo",
  208. key: "contractNo",
  209. className: "title-table"
  210. },
  211. {
  212. title: "订单编号",
  213. dataIndex: "orderNo",
  214. key: "orderNo",
  215. className: "title-table"
  216. // fixed: "left"
  217. },
  218. {
  219. title: "客户名称",
  220. dataIndex: "buyerName",
  221. key: "buyerName",
  222. className: "title-table"
  223. },
  224. {
  225. title: "订单部门",
  226. dataIndex: "departmentName",
  227. key: "departmentName",
  228. className: "title-table"
  229. },
  230. {
  231. title: "订单负责人",
  232. dataIndex: "sellerName",
  233. key: "sellerName",
  234. className: "title-table"
  235. },
  236. {
  237. title: "财务负责人",
  238. dataIndex: "financeName",
  239. key: "financeName",
  240. className: "title-table"
  241. },
  242. {
  243. title: "外包公司",
  244. dataIndex: "outsourceName",
  245. key: "outsourceName",
  246. className: "title-table"
  247. },
  248. {
  249. title: "外包成本",
  250. dataIndex: "outsourceAmount",
  251. key: "outsourceAmount",
  252. className: "title-table"
  253. },
  254. {
  255. title: "签单日期",
  256. dataIndex: "signTime",
  257. key: "signTime",
  258. className: "title-table"
  259. },
  260. {
  261. title: "下单日期",
  262. dataIndex: "createTime",
  263. key: "createTime",
  264. className: "title-table"
  265. },
  266. {
  267. title: "签单金额(万元)",
  268. dataIndex: "signTotalAmount",
  269. key: "signTotalAmount",
  270. className: "title-table"
  271. },
  272. {
  273. title: "开票金额(万元)",
  274. dataIndex: "invoiceAmount",
  275. key: "invoiceAmount",
  276. className: "title-table"
  277. },
  278. {
  279. title: "已收款(万元)",
  280. dataIndex: "actuallyTotalAmount",
  281. key: "actuallyTotalAmount",
  282. className: "title-table"
  283. },
  284. {
  285. title: "最近收款(万元)",
  286. dataIndex: "finalReceivables",
  287. key: "finalReceivables",
  288. className: "title-table"
  289. },
  290. {
  291. title: "最近收款时间",
  292. dataIndex: "finalReceivablesTime",
  293. key: "finalReceivablesTime",
  294. className: "title-table"
  295. },
  296. {
  297. title: "结算状态",
  298. dataIndex: "liquidationStatus",
  299. key: "liquidationStatus",
  300. className: "title-table",
  301. render: text => {
  302. return getLiquidationStatus(text);
  303. }
  304. },
  305. {
  306. title: "流程状态",
  307. dataIndex: "processStatus",
  308. key: "processStatus",
  309. className: "title-table",
  310. render: text => {
  311. return getProcessStatus(text);
  312. }
  313. },
  314. {
  315. title: "特批状态",
  316. dataIndex: "approval",
  317. key: "approval",
  318. className: "title-table",
  319. render: text => {
  320. return getApproval(text);
  321. }
  322. },
  323. {
  324. title: "操作",
  325. dataIndex: "caozuo",
  326. key: "caouzo",
  327. className: "title-table",
  328. render: (text, recard) => {
  329. return (
  330. <div>
  331. {/* {recard.liquidationStatus < 2 &&
  332. (recard.approval === 1 || recard.approval === 2) ? (
  333. <Button
  334. style={{ background: "rgb(192,192,192)" }}
  335. onClick={e => {
  336. e.stopPropagation(), this.evaluateX(recard);
  337. }}
  338. >
  339. 收款
  340. </Button>
  341. ) : (
  342. <Button
  343. type="primary"
  344. onClick={e => {
  345. e.stopPropagation(), this.evaluateX(recard);
  346. }}
  347. >
  348. 收款
  349. </Button>
  350. )} */}
  351. {recard.processStatus < 4 ? (
  352. <Button
  353. type="primary"
  354. onClick={e => {
  355. // e.stopPropagation(), this.evaluateZ(recard);
  356. e.stopPropagation(), this.checkRemark(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. proColumns: [
  397. {
  398. title: "序号",
  399. dataIndex: "key",
  400. key: "key"
  401. },
  402. {
  403. title: "合同编号",
  404. dataIndex: "contractNo",
  405. key: "contractNo"
  406. },
  407. {
  408. title: "订单编号",
  409. dataIndex: "orderNo",
  410. key: "orderNo"
  411. },
  412. {
  413. title: "客户名称",
  414. dataIndex: "userName",
  415. key: "userName"
  416. },
  417. {
  418. title: "订单负责人",
  419. dataIndex: "salesmanName",
  420. key: "salesmanName"
  421. },
  422. {
  423. title: "是否主项目",
  424. dataIndex: "main",
  425. key: "main",
  426. render: text => {
  427. return text == 0 ? "否" : "是";
  428. }
  429. },
  430. {
  431. title: "项目类别",
  432. dataIndex: "cname",
  433. key: "cname"
  434. },
  435. {
  436. title: "项目名称",
  437. dataIndex: "commodityName",
  438. key: "commodityName"
  439. },
  440. {
  441. title: "项目数量",
  442. dataIndex: "commodityQuantity",
  443. key: "commodityQuantity"
  444. },
  445. {
  446. title: "服务市价",
  447. dataIndex: "commodityPrice",
  448. key: "commodityPrice"
  449. },
  450. {
  451. title: "证书编号",
  452. dataIndex: "certificateNumber",
  453. key: "certificateNumber"
  454. },
  455. {
  456. title: "项目状态",
  457. dataIndex: "projectStatus",
  458. key: "projectStatus",
  459. render: text => {
  460. return getProjectStatus(text);
  461. }
  462. },
  463. {
  464. title: "项目说明",
  465. dataIndex: "taskComment",
  466. key: "taskComment"
  467. },
  468. {
  469. title: "外包(内部)公司",
  470. dataIndex: "outsourceName",
  471. key: "outsourceName"
  472. },
  473. {
  474. title: "外包(内部)价格",
  475. dataIndex: "outsourcePrice",
  476. key: "outsourcePrice"
  477. }
  478. ],
  479. cuiColumns: [
  480. {
  481. title: "序号",
  482. dataIndex: "key",
  483. key: "key"
  484. },
  485. {
  486. title: "合同编号",
  487. dataIndex: "contractNo",
  488. key: "contractNo"
  489. },
  490. {
  491. title: "订单编号",
  492. dataIndex: "orderNo",
  493. key: "orderNo"
  494. },
  495. {
  496. title: "客户名称",
  497. dataIndex: "userName",
  498. key: "userName"
  499. },
  500. {
  501. title: "订单负责人",
  502. dataIndex: "salesmanName",
  503. key: "salesmanName"
  504. },
  505. {
  506. title: "订单部门",
  507. dataIndex: "depName",
  508. key: "depName"
  509. },
  510. {
  511. title: "订单状态",
  512. dataIndex: "orderStatus",
  513. key: "orderStatus",
  514. render: text => {
  515. return getNewOrderStatus(text);
  516. }
  517. },
  518. {
  519. title: "项目状态",
  520. dataIndex: "projectStatus",
  521. key: "projectStatus",
  522. render: text => {
  523. return getProjectStatus(text);
  524. }
  525. },
  526. {
  527. title: "签单金额",
  528. dataIndex: "totalAmount",
  529. key: "totalAmount"
  530. },
  531. {
  532. title: "结算状态",
  533. dataIndex: "liquidationStatus",
  534. key: "liquidationStatus",
  535. render: text => {
  536. return getLiquidationStatus(text);
  537. }
  538. },
  539. {
  540. title: "已收款",
  541. dataIndex: "settlementAmount",
  542. key: "settlementAmount"
  543. },
  544. {
  545. title: "应收款",
  546. dataIndex: "accountsReceivable",
  547. key: "accountsReceivable"
  548. },
  549. {
  550. title: "催收科目",
  551. dataIndex: "dunSubject",
  552. key: "dunSubject"
  553. // render: text => {
  554. // return getjiedian(text);
  555. // }
  556. },
  557. {
  558. title: "催款状态",
  559. dataIndex: "dunStatus",
  560. key: "dunStatus"
  561. },
  562. {
  563. title: "催收启动时间",
  564. dataIndex: "startDate",
  565. key: "startDate"
  566. }
  567. ],
  568. ContactsListsNew: [
  569. {
  570. title: "项目名称",
  571. dataIndex: "commodityName",
  572. key: "commodityName",
  573. render: text => {
  574. return <span>{text}</span>;
  575. }
  576. },
  577. {
  578. title: "项目分类",
  579. dataIndex: "projectType",
  580. key: "projectType",
  581. render: text => {
  582. let arr = this.state.dataSourceX || [];
  583. let str = "";
  584. for (let i = 0; i < arr.length; i++) {
  585. if (this.state.dataSourceX[i].sort == text) {
  586. str = this.state.dataSourceX[i].cname;
  587. return <span>{str}</span>;
  588. }
  589. }
  590. }
  591. },
  592. {
  593. title: "催款科目",
  594. dataIndex: "dunTypeName",
  595. key: "dunTypeName",
  596. render: text => {
  597. return <span>{text}</span>;
  598. }
  599. },
  600. {
  601. title: "时间",
  602. dataIndex: "waitDay",
  603. key: "waitDay",
  604. render: (text, record) => {
  605. if (record.dunTypeName) {
  606. return <span>{text}</span>;
  607. }
  608. }
  609. },
  610. {
  611. title: "金额(万元)",
  612. dataIndex: "money",
  613. key: "money",
  614. render: (text, record) => {
  615. if (record.dunTypeName) {
  616. if (record.appropriationRatio && !record.money) {
  617. return <span>{record.appropriationRatio}(拨款比例)</span>;
  618. } else if (record.appropriationRatio && record.money) {
  619. return (
  620. <span>
  621. {text}(比例:{record.appropriationRatio})
  622. </span>
  623. );
  624. } else {
  625. return <span>{text}</span>;
  626. }
  627. }
  628. }
  629. },
  630. {
  631. title: "服务年限",
  632. dataIndex: "startDate",
  633. key: "startDate",
  634. render: (text, record) => {
  635. if (record.dunTypeName) {
  636. return <span>{text}</span>;
  637. }
  638. }
  639. },
  640. {
  641. title: "催款状态",
  642. dataIndex: "status",
  643. key: "status",
  644. render: text => {
  645. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  646. }
  647. }
  648. ],
  649. ContactsLists: [
  650. {
  651. title: "催款科目",
  652. dataIndex: "dunSubject",
  653. key: "dunSubject",
  654. render: text => {
  655. return getjiedian(text);
  656. }
  657. },
  658. {
  659. title: "金额(万元)",
  660. dataIndex: "money",
  661. key: "money"
  662. },
  663. {
  664. title: "催款状态",
  665. dataIndex: "dunStatus",
  666. key: "dunStatus",
  667. render: text => {
  668. return getCuikuan(text);
  669. }
  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. checkRemark(record) {
  2127. this.setState({
  2128. checkVisible: true,
  2129. checkOrderNo: record.orderNo
  2130. });
  2131. },
  2132. checkOk() {
  2133. if (this.state.checkData.trim() == "") {
  2134. message.warning("请填写审核内容");
  2135. return;
  2136. }
  2137. this.setState({
  2138. loading: true
  2139. });
  2140. $.ajax({
  2141. method: "post",
  2142. dataType: "json",
  2143. crossDomain: false,
  2144. url: globalConfig.context + "/api/admin/financial/financeApproval",
  2145. data: {
  2146. orderNo: this.state.checkOrderNo,
  2147. remarks: this.state.checkData
  2148. },
  2149. success: function(data) {
  2150. let theArr = [];
  2151. if (!data.data) {
  2152. if (data.error && data.error.length) {
  2153. message.warning(data.error[0].message);
  2154. }
  2155. } else {
  2156. message.success("通过成功!");
  2157. this.loadData();
  2158. this.setState({
  2159. checkVisible: false,
  2160. checkData: ""
  2161. });
  2162. }
  2163. }.bind(this)
  2164. }).always(
  2165. function() {
  2166. this.setState({
  2167. loading: false
  2168. });
  2169. }.bind(this)
  2170. );
  2171. },
  2172. jiedian(orderNos) {
  2173. $.ajax({
  2174. method: "get",
  2175. dataType: "json",
  2176. crossDomain: false,
  2177. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  2178. data: {
  2179. orderNo: orderNos
  2180. },
  2181. success: function(data) {
  2182. let theArr = [];
  2183. let thisData = [];
  2184. if (data.error.length || data.data.list == "") {
  2185. if (data.error && data.error.length) {
  2186. message.warning(data.error[0].message);
  2187. }
  2188. } else {
  2189. for (let i = 0; i < data.data.length; i++) {
  2190. thisData = data.data[i];
  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. dunStatus: thisData.dunStatus, //催款状态
  2199. orderNo: thisData.orderNo
  2200. });
  2201. }
  2202. this.setState({
  2203. contactList: theArr
  2204. });
  2205. }
  2206. }.bind(this)
  2207. }).always(
  2208. function() {
  2209. this.setState({
  2210. loading: false
  2211. });
  2212. }.bind(this)
  2213. );
  2214. },
  2215. //查看催款节点
  2216. jiedianNew(orderNos) {
  2217. $.ajax({
  2218. method: "get",
  2219. dataType: "json",
  2220. crossDomain: false,
  2221. url:
  2222. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  2223. data: {
  2224. orderNo: orderNos
  2225. },
  2226. success: function(data) {
  2227. let theArr = [];
  2228. let thisData = [];
  2229. if (!thisData) {
  2230. if (data.error && data.error.length) {
  2231. message.warning(data.error[0].message);
  2232. }
  2233. thisData = {};
  2234. } else {
  2235. for (let i = 0; i < data.data.length; i++) {
  2236. thisData = data.data[i];
  2237. theArr.push({
  2238. key: i,
  2239. dunSubject: thisData.dunSubject
  2240. ? thisData.dunSubject.toString()
  2241. : "", //催款科目
  2242. id: thisData.id, //节点Id
  2243. money: thisData.money, //催款金额
  2244. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  2245. commodityName: thisData.commodityName,
  2246. projectType: thisData.projectType,
  2247. dunTypeName: thisData.dunTypeName,
  2248. status: thisData.status,
  2249. waitDay: thisData.waitDay,
  2250. effectiveCount: thisData.effectiveCount,
  2251. startDate: thisData.startDate,
  2252. appropriationRatio: thisData.appropriationRatio
  2253. });
  2254. }
  2255. this.setState({
  2256. contactListNew: theArr
  2257. });
  2258. }
  2259. }.bind(this)
  2260. }).always(
  2261. function() {
  2262. this.setState({
  2263. loading: false
  2264. });
  2265. }.bind(this)
  2266. );
  2267. },
  2268. render() {
  2269. const { TextArea } = Input;
  2270. const { RangePicker } = DatePicker;
  2271. const { TabPane } = Tabs;
  2272. var departmentArr = this.state.departmentArr || [];
  2273. const theData = this.state.orderList || {};
  2274. const formItemLayout = {
  2275. labelCol: { span: 8 },
  2276. wrapperCol: { span: 12 }
  2277. };
  2278. const { loading, selectedRowKeys, visible } = this.state;
  2279. const cuiDataList = this.state.contactList || [];
  2280. const rowSelection = {
  2281. selectedRowKeys,
  2282. onChange: this.onSelectChange,
  2283. hideDefaultSelections: true,
  2284. type: "radio"
  2285. };
  2286. const jsDate = this.state.jsDate || [];
  2287. return (
  2288. <div className="user-content">
  2289. <div className="content-title" style={{ marginBottom: 10 }}>
  2290. <span style={{ fontWeight: 900, fontSize: 16 }}>外包结算管理</span>
  2291. </div>
  2292. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  2293. <TabPane tab="更改表格显示数据" key="1">
  2294. <div style={{ marginLeft: 10 }}>
  2295. <ChooseList
  2296. columns={this.state.columns}
  2297. changeFn={this.changeList}
  2298. changeList={this.state.changeList}
  2299. top={55}
  2300. margin={11}
  2301. />
  2302. </div>
  2303. </TabPane>
  2304. <TabPane tab="搜索" key="2">
  2305. <div className="user-search" style={{ marginLeft: 10 }}>
  2306. <Input
  2307. placeholder="订单编号"
  2308. value={this.state.orderNoSearch}
  2309. onChange={e => {
  2310. this.setState({ orderNoSearch: e.target.value });
  2311. }}
  2312. />
  2313. <Input
  2314. placeholder="客户名称"
  2315. value={this.state.nameSearch}
  2316. onChange={e => {
  2317. this.setState({ nameSearch: e.target.value });
  2318. }}
  2319. />
  2320. <Select
  2321. placeholder="订单部门"
  2322. style={{ width: 150, marginRight: 10 }}
  2323. value={this.state.departmenttList}
  2324. onChange={e => {
  2325. this.setState({ departmenttList: e });
  2326. }}
  2327. >
  2328. {departmentArr.map(function(item) {
  2329. return (
  2330. <Select.Option key={item.id}>{item.name}</Select.Option>
  2331. );
  2332. })}
  2333. </Select>
  2334. <Input
  2335. placeholder="合同编号"
  2336. value={this.state.contractNoSearch}
  2337. onChange={e => {
  2338. this.setState({
  2339. contractNoSearch: e.target.value
  2340. });
  2341. }}
  2342. />
  2343. <Select
  2344. placeholder="流程状态"
  2345. onChange={e => {
  2346. this.setState({ processStatusSearch: e });
  2347. }}
  2348. style={{ width: 160, marginRight: 5 }}
  2349. value={this.state.processStatusSearch}
  2350. >
  2351. <Option value="3">未分配</Option>
  2352. <Option value="4">已分配</Option>
  2353. </Select>
  2354. <Select
  2355. placeholder="结算状态"
  2356. onChange={e => {
  2357. this.setState({ liquidationStatus: e });
  2358. }}
  2359. style={{ width: 160, marginRight: 5 }}
  2360. value={this.state.liquidationStatus}
  2361. >
  2362. <Option value="0">首付待付清</Option>
  2363. <Option value="1">尾款待付清</Option>
  2364. <Option value="2">已付清</Option>
  2365. </Select>
  2366. <span style={{ marginRight: 0 }}>下单日期:</span>
  2367. <RangePicker
  2368. value={[
  2369. this.state.releaseDate[0]
  2370. ? moment(this.state.releaseDate[0])
  2371. : null,
  2372. this.state.releaseDate[1]
  2373. ? moment(this.state.releaseDate[1])
  2374. : null
  2375. ]}
  2376. onChange={(data, dataString) => {
  2377. this.setState({ releaseDate: dataString });
  2378. }}
  2379. />
  2380. <span style={{}}>最近收款:</span>
  2381. <RangePicker
  2382. value={[
  2383. this.state.shouKuanDate[0]
  2384. ? moment(this.state.shouKuanDate[0])
  2385. : null,
  2386. this.state.shouKuanDate[1]
  2387. ? moment(this.state.shouKuanDate[1])
  2388. : null
  2389. ]}
  2390. onChange={(data, dataString) => {
  2391. this.setState({ shouKuanDate: dataString });
  2392. }}
  2393. />
  2394. <Button
  2395. type="primary"
  2396. onClick={this.search}
  2397. style={{ marginLeft: 10 }}
  2398. disabled={this.state.loadingA ? true : false}
  2399. >
  2400. 搜索
  2401. </Button>
  2402. <Button onClick={this.reset}>重置</Button>
  2403. </div>
  2404. </TabPane>
  2405. <TabPane tab="打印" key="3">
  2406. <Button
  2407. type="primary"
  2408. style={{ margin: "11px 0px 10px 10px" }}
  2409. onClick={this.printAll}
  2410. disabled={!this.state.dataSource.length}
  2411. >
  2412. 打印所有列表信息
  2413. </Button>
  2414. <Button
  2415. type="primary"
  2416. disabled={this.state.selectedRowKeys.length != 1}
  2417. style={{ margin: "11px 0px 10px 10px" }}
  2418. onClick={() => {
  2419. this.inRecordData();
  2420. this.setState({
  2421. bvisible: true
  2422. });
  2423. }}
  2424. >
  2425. 打印开票详情
  2426. </Button>
  2427. <Button
  2428. type="primary"
  2429. disabled={this.state.selectedRowKeys.length != 1}
  2430. style={{ margin: "11px 0px 10px 10px" }}
  2431. onClick={() => {
  2432. this.waterData();
  2433. this.setState({
  2434. cvisible: true
  2435. });
  2436. }}
  2437. >
  2438. 打印收款流水
  2439. </Button>
  2440. <Button
  2441. type="primary"
  2442. disabled={this.state.selectedRowKeys.length != 1}
  2443. style={{ margin: "11px 0px 10px 10px" }}
  2444. onClick={() => {
  2445. this.timeData();
  2446. this.setState({
  2447. timeVisible: true
  2448. });
  2449. }}
  2450. >
  2451. 打印工时信息
  2452. </Button>
  2453. <Button
  2454. type="primary"
  2455. disabled={this.state.selectedRowKeys.length != 1}
  2456. style={{ margin: "11px 0px 10px 10px" }}
  2457. onClick={() => {
  2458. this.cuiData();
  2459. this.setState({
  2460. cuiVisible: true
  2461. });
  2462. }}
  2463. >
  2464. 打印催款信息
  2465. </Button>
  2466. <Button
  2467. type="primary"
  2468. disabled={this.state.selectedRowKeys.length != 1}
  2469. style={{ margin: "11px 0px 10px 10px" }}
  2470. onClick={() => {
  2471. this.proData();
  2472. this.setState({
  2473. proVisible: true
  2474. });
  2475. }}
  2476. >
  2477. 打印项目信息
  2478. </Button>
  2479. </TabPane>
  2480. <TabPane tab="导出Excel" key="4">
  2481. <Button
  2482. type="primary"
  2483. style={{ margin: "11px 0px 10px 10px" }}
  2484. onClick={this.exportAll}
  2485. >
  2486. 导出当前列表
  2487. </Button>
  2488. <Button
  2489. type="primary"
  2490. disabled={this.state.selectedRowKeys.length != 1}
  2491. style={{ margin: "11px 0px 10px 10px" }}
  2492. onClick={this.exportKaip}
  2493. >
  2494. 导出所选开票详情
  2495. </Button>
  2496. <Button
  2497. type="primary"
  2498. disabled={this.state.selectedRowKeys.length != 1}
  2499. style={{ margin: "11px 0px 10px 10px" }}
  2500. onClick={this.exportWater}
  2501. >
  2502. 导出所选收款详情流水
  2503. </Button>
  2504. <Button
  2505. type="primary"
  2506. disabled={this.state.selectedRowKeys.length != 1}
  2507. style={{ margin: "11px 0px 10px 10px" }}
  2508. onClick={this.exportTime}
  2509. >
  2510. 导出所选工时信息
  2511. </Button>
  2512. <Button
  2513. type="primary"
  2514. disabled={this.state.selectedRowKeys.length != 1}
  2515. style={{ margin: "11px 0px 10px 10px" }}
  2516. onClick={this.exportCui}
  2517. >
  2518. 导出催款信息
  2519. </Button>
  2520. <Button
  2521. type="primary"
  2522. disabled={this.state.selectedRowKeys.length != 1}
  2523. style={{ margin: "11px 0px 10px 10px" }}
  2524. onClick={this.exportPro}
  2525. >
  2526. 导出项目详情
  2527. </Button>
  2528. </TabPane>
  2529. <TabPane tab="查看" key="5">
  2530. <Button
  2531. type="primary"
  2532. disabled={this.state.selectedRowKeys.length != 1}
  2533. style={{ margin: "11px 0px 10px 10px" }}
  2534. onClick={() => {
  2535. this.inRecordData();
  2536. this.setState({
  2537. bvisible: true
  2538. });
  2539. }}
  2540. >
  2541. 查看开票详情
  2542. </Button>
  2543. <Button
  2544. type="primary"
  2545. disabled={this.state.selectedRowKeys.length != 1}
  2546. style={{ margin: "11px 0px 10px 10px" }}
  2547. onClick={() => {
  2548. this.waterData();
  2549. this.setState({
  2550. cvisible: true
  2551. });
  2552. }}
  2553. >
  2554. 详情收款流水
  2555. </Button>
  2556. <Button
  2557. type="primary"
  2558. disabled={this.state.selectedRowKeys.length != 1}
  2559. style={{ margin: "11px 0px 10px 10px" }}
  2560. onClick={() => {
  2561. this.timeData();
  2562. this.setState({
  2563. timeVisible: true
  2564. });
  2565. }}
  2566. >
  2567. 工时信息
  2568. </Button>
  2569. <Button
  2570. type="primary"
  2571. disabled={this.state.selectedRowKeys.length != 1}
  2572. style={{ margin: "11px 0px 10px 10px" }}
  2573. onClick={() => {
  2574. this.cuiData();
  2575. this.setState({
  2576. cuiVisible: true
  2577. });
  2578. }}
  2579. >
  2580. 催款信息
  2581. </Button>
  2582. <Button
  2583. type="primary"
  2584. disabled={this.state.selectedRowKeys.length != 1}
  2585. style={{ margin: "11px 0px 10px 10px" }}
  2586. onClick={() => {
  2587. this.proData();
  2588. this.setState({
  2589. proVisible: true
  2590. });
  2591. }}
  2592. >
  2593. 项目信息
  2594. </Button>
  2595. </TabPane>
  2596. {/* <TabPane tab="批量操作" key="6">
  2597. <Button
  2598. type="primary"
  2599. disabled={this.state.selectedRowKeys.length == 0}
  2600. style={{ margin: "0px 0px 10px 10px" }}
  2601. onClick={e => {
  2602. e.stopPropagation(),
  2603. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  2604. }}
  2605. >
  2606. 转交
  2607. </Button>
  2608. </TabPane> */}
  2609. </Tabs>
  2610. <div className="patent-table">
  2611. <Spin spinning={this.state.loadingA}>
  2612. <Table
  2613. bordered
  2614. columns={
  2615. this.state.changeList == undefined
  2616. ? this.state.columns
  2617. : this.state.changeList
  2618. }
  2619. dataSource={this.state.dataSource}
  2620. rowSelection={false}
  2621. scroll={{ x: "max-content", y: 0 }}
  2622. pagination={this.state.pagination}
  2623. onRowDoubleClick={this.tableRowClick.bind(this)}
  2624. rowSelection={rowSelection}
  2625. size="small"
  2626. />
  2627. </Spin>
  2628. <p
  2629. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  2630. >
  2631. {
  2632. <span style={{ marginRight: 10 }}>
  2633. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  2634. </span>
  2635. }
  2636. {
  2637. <span>
  2638. {`合同额总计(万元):${
  2639. this.state.totalHui ? this.state.totalHui : "0"
  2640. }`}
  2641. </span>
  2642. }
  2643. </p>
  2644. </div>
  2645. <div className="patent-desc">
  2646. <Modal
  2647. maskClosable={false}
  2648. visible={this.state.visible}
  2649. onCancel={this.closeModal}
  2650. width={this.state.width}
  2651. footer=""
  2652. className="admin-desc-content"
  2653. >
  2654. <Tabs
  2655. onChange={this.callBack}
  2656. type="card"
  2657. activeKey={this.state.modKey}
  2658. >
  2659. <TabPane tab="项目概况" key="1">
  2660. <Form layout="horizontal" id="demand-form">
  2661. <Spin spinning={this.state.loading}>
  2662. <div className="clearfix">
  2663. <FormItem
  2664. className="half-item"
  2665. {...formItemLayout}
  2666. label="订单编号"
  2667. >
  2668. <span>{this.state.orderNo}</span>
  2669. </FormItem>
  2670. <FormItem
  2671. className="half-item"
  2672. {...formItemLayout}
  2673. label="签单时间"
  2674. >
  2675. <span>{theData.signDate}</span>
  2676. </FormItem>
  2677. <FormItem
  2678. className="half-item"
  2679. {...formItemLayout}
  2680. label="客户名称"
  2681. >
  2682. <span>{theData.userName}</span>
  2683. </FormItem>
  2684. <FormItem
  2685. className="half-item"
  2686. {...formItemLayout}
  2687. label="流转状态"
  2688. >
  2689. <span>{getProcessStatus(theData.processStatus)}</span>
  2690. </FormItem>
  2691. <FormItem
  2692. className="half-item"
  2693. {...formItemLayout}
  2694. label="订单类型"
  2695. >
  2696. <span>{getNewOrderType(theData.orderType)}</span>
  2697. </FormItem>
  2698. <FormItem
  2699. className="half-item"
  2700. {...formItemLayout}
  2701. label="结算状态"
  2702. >
  2703. <span>
  2704. {getLiquidationStatus(theData.liquidationStatus)}
  2705. </span>
  2706. </FormItem>
  2707. <FormItem
  2708. className="half-item"
  2709. {...formItemLayout}
  2710. label="签单总金额(万元)"
  2711. >
  2712. <span>{theData.totalAmount}</span>
  2713. </FormItem>
  2714. <FormItem
  2715. className="half-item"
  2716. {...formItemLayout}
  2717. label="首付款(万元)"
  2718. >
  2719. <span>{theData.firstAmount}</span>
  2720. </FormItem>
  2721. <FormItem
  2722. className="half-item"
  2723. {...formItemLayout}
  2724. label="已收款(万元)"
  2725. >
  2726. <span>{theData.settlementAmount}</span>
  2727. </FormItem>
  2728. <FormItem
  2729. className="half-item"
  2730. {...formItemLayout}
  2731. label="是否特批"
  2732. >
  2733. <span>{getApproval(theData.approval)}</span>
  2734. </FormItem>
  2735. {/*this.props.data.orderStatus=='6'&&<FormItem className="half-item" {...formItemLayout} label="已退(万元)">
  2736. <span>{this.props.data.refundAmount}</span>
  2737. </FormItem>*/}
  2738. </div>
  2739. <div className="clearfix">
  2740. <FormItem
  2741. labelCol={{ span: 5 }}
  2742. wrapperCol={{ span: 18 }}
  2743. label="合同扫描件"
  2744. >
  2745. <Upload
  2746. className="demandDetailShow-upload"
  2747. listType="picture-card"
  2748. fileList={this.state.orgCodeUrl}
  2749. onPreview={file => {
  2750. this.setState({
  2751. previewImage: file.url || file.thumbUrl,
  2752. previewVisible: true
  2753. });
  2754. }}
  2755. ></Upload>
  2756. <Modal
  2757. maskClosable={false}
  2758. footer={null}
  2759. visible={this.state.previewVisible}
  2760. onCancel={() => {
  2761. this.setState({
  2762. previewVisible: false,
  2763. rotateDeg: 0
  2764. });
  2765. }}
  2766. >
  2767. <img
  2768. alt=""
  2769. style={{
  2770. width: "100%",
  2771. transform: `rotate(${this.state.rotateDeg}deg)`
  2772. }}
  2773. src={this.state.previewImage || ""}
  2774. />
  2775. <Button
  2776. onClick={this.rotate}
  2777. style={{
  2778. position: "relative",
  2779. left: "50%",
  2780. transform: "translateX(-50%)"
  2781. }}
  2782. >
  2783. 旋转
  2784. </Button>
  2785. <Button
  2786. onClick={this.upImg}
  2787. style={{
  2788. position: "absolute",
  2789. left: -81,
  2790. top: "50%",
  2791. transform: "translateY(-50%)"
  2792. }}
  2793. >
  2794. 上一张
  2795. </Button>
  2796. <Button
  2797. onClick={this.downImg}
  2798. style={{
  2799. position: "absolute",
  2800. right: -81,
  2801. top: "50%",
  2802. transform: "translateY(-50%)"
  2803. }}
  2804. >
  2805. 下一张
  2806. </Button>
  2807. </Modal>
  2808. <Button
  2809. style={{
  2810. float: "right",
  2811. marginRight: "140px",
  2812. marginTop: "20px"
  2813. }}
  2814. onClick={this.getOrderLog}
  2815. >
  2816. 查看订单日志
  2817. </Button>
  2818. </FormItem>
  2819. </div>
  2820. <div className="clearfix">
  2821. <FormItem
  2822. className="half-item"
  2823. {...formItemLayout}
  2824. label="合同编号"
  2825. >
  2826. <span>{theData.contractNo}</span>
  2827. </FormItem>
  2828. <FormItem
  2829. className="half-item"
  2830. {...formItemLayout}
  2831. label="订单部门"
  2832. >
  2833. <span>{theData.depName}</span>
  2834. </FormItem>
  2835. </div>
  2836. <div className="clearfix">
  2837. <FormItem
  2838. labelCol={{ span: 5 }}
  2839. wrapperCol={{ span: 18 }}
  2840. label="订单留言"
  2841. >
  2842. <p style={{ width: 500, wordWrap: "break-word" }}>
  2843. {this.state.orderRemarks}
  2844. </p>
  2845. </FormItem>
  2846. </div>
  2847. {/* <div className="clearfix">
  2848. <FormItem
  2849. labelCol={{ span: 5 }}
  2850. wrapperCol={{ span: 18 }}
  2851. label="收款节点"
  2852. >
  2853. {jsDate.map(item => {
  2854. return (
  2855. <p>
  2856. {getjiedian(item.dunSubject)} -- {item.money} 万元
  2857. </p>
  2858. );
  2859. })}
  2860. </FormItem>
  2861. </div> */}
  2862. <div className="clearfix">
  2863. <FormItem
  2864. className="half-item"
  2865. {...formItemLayout}
  2866. label="订单负责人"
  2867. >
  2868. <span>{theData.salesmanName}</span>
  2869. </FormItem>
  2870. <FormItem
  2871. className="half-item"
  2872. {...formItemLayout}
  2873. label="订单负责人电话"
  2874. >
  2875. <span>{theData.salesmanMobile}</span>
  2876. </FormItem>
  2877. <FormItem
  2878. className="half-item"
  2879. {...formItemLayout}
  2880. label="当前财务负责人"
  2881. >
  2882. <span>{theData.nowFinance}</span>
  2883. </FormItem>
  2884. <FormItem
  2885. className="half-item"
  2886. {...formItemLayout}
  2887. label="当前财务负责人电话"
  2888. >
  2889. <span>{theData.nowFinanceMobile}</span>
  2890. </FormItem>
  2891. <FormItem
  2892. className="half-item"
  2893. {...formItemLayout}
  2894. style={{ opacity: ".5" }}
  2895. label="原订单负责人"
  2896. >
  2897. <span>{theData.oldSalesmanName}</span>
  2898. </FormItem>
  2899. <FormItem
  2900. className="half-item"
  2901. {...formItemLayout}
  2902. style={{ opacity: ".5" }}
  2903. label="原订单负责人电话"
  2904. >
  2905. <span>{theData.oldSalesmanMobile}</span>
  2906. </FormItem>
  2907. <FormItem
  2908. className="half-item"
  2909. {...formItemLayout}
  2910. style={{ opacity: ".5" }}
  2911. label="实际财务操作人"
  2912. >
  2913. <span>{theData.financeName}</span>
  2914. </FormItem>
  2915. <FormItem
  2916. className="half-item"
  2917. {...formItemLayout}
  2918. style={{ opacity: ".5" }}
  2919. label="实际财务操作人电话"
  2920. >
  2921. <span>{theData.financeMobile}</span>
  2922. </FormItem>
  2923. </div>
  2924. {/* <Modal
  2925. visible={this.state.avisible}
  2926. className="admin-desc-content"
  2927. width="800px"
  2928. maskClosable={false}
  2929. title="订单日志"
  2930. footer={null}
  2931. onCancel={this.closeOrderLog}
  2932. >
  2933. <div className="patent-table">
  2934. <Spin spinning={this.state.loading}>
  2935. <Table
  2936. columns={this.state.columnsY}
  2937. dataSource={this.state.dataSourceY}
  2938. pagination={false}
  2939. />
  2940. </Spin>
  2941. </div>
  2942. </Modal> */}
  2943. <OrderRiZi
  2944. dataSourcerizhi={this.state.dataSourceY}
  2945. closeOrderLog={this.closeOrderLog}
  2946. visible={this.state.avisible}
  2947. loading={this.state.loading}
  2948. />
  2949. <div className="clearfix">
  2950. <p style={{ fontSize: 18, marginLeft: 20 }}>项目业务</p>
  2951. <div className="patent-table">
  2952. <Spin spinning={this.state.loading}>
  2953. <Table
  2954. columns={this.state.columnsX}
  2955. dataSource={this.state.dataSourceX}
  2956. pagination={false}
  2957. bordered
  2958. size="small"
  2959. />
  2960. </Spin>
  2961. </div>
  2962. </div>
  2963. <div>
  2964. <span style={{ marginLeft: 20, fontSize: "18px" }}>
  2965. 催款节点
  2966. </span>
  2967. </div>
  2968. <div className="clearfix">
  2969. <Spin spinning={this.state.loading}>
  2970. <Form layout="horizontal" id="demand-form">
  2971. <Table
  2972. pagination={false}
  2973. bordered
  2974. size="small"
  2975. columns={
  2976. cuiDataList.length
  2977. ? this.state.ContactsLists
  2978. : this.state.ContactsListsNew
  2979. }
  2980. dataSource={
  2981. cuiDataList.length
  2982. ? this.state.contactList
  2983. : this.state.contactListNew
  2984. }
  2985. />
  2986. <Col
  2987. span={24}
  2988. offset={9}
  2989. style={{ marginTop: "15px" }}
  2990. ></Col>
  2991. </Form>
  2992. </Spin>
  2993. </div>
  2994. </Spin>
  2995. </Form>
  2996. </TabPane>
  2997. <TabPane tab="外包详情" key="2">
  2998. <div className="clearfix">
  2999. <p style={{ color: "red" }}>
  3000. 提示:查看备注请点击表格左侧加号按钮~
  3001. </p>
  3002. <div className="patent-table">
  3003. <Spin spinning={this.state.loading}>
  3004. <Table
  3005. columns={this.state.columnsW}
  3006. bordered
  3007. size="small"
  3008. dataSource={this.state.dataSourceW}
  3009. pagination={false}
  3010. expandedRowRender={record => (
  3011. <p style={{ margin: 0 }}>{record.remarks}</p>
  3012. )}
  3013. scroll={{ x: 300, y: 0 }}
  3014. />
  3015. </Spin>
  3016. </div>
  3017. </div>
  3018. </TabPane>
  3019. <TabPane tab="外包审核" key="3">
  3020. <div className="clearfix">
  3021. <FormItem
  3022. className="half-item"
  3023. labelCol={{ span: 8 }}
  3024. wrapperCol={{ span: 14 }}
  3025. label="外包公司"
  3026. >
  3027. <span>{this.state.companyName}</span>
  3028. </FormItem>
  3029. </div>
  3030. <div className="clearfix">
  3031. <FormItem
  3032. className="half-item"
  3033. {...formItemLayout}
  3034. label="单价(万元)"
  3035. >
  3036. <span>{this.state.unitPrice}</span>
  3037. </FormItem>
  3038. </div>
  3039. <div className="clearfix">
  3040. <FormItem
  3041. className="half-item"
  3042. {...formItemLayout}
  3043. label="数量(万元)"
  3044. >
  3045. <span>{this.state.unitNumber}</span>
  3046. </FormItem>
  3047. </div>
  3048. <div className="clearfix">
  3049. <FormItem
  3050. className="half-item"
  3051. {...formItemLayout}
  3052. label="总金额(万元)"
  3053. >
  3054. <span>{this.state.amount}</span>
  3055. </FormItem>
  3056. </div>
  3057. <div className="clearfix">
  3058. <FormItem
  3059. className="half-item"
  3060. {...formItemLayout}
  3061. label="备注"
  3062. >
  3063. <span>{this.state.outsourceRemarks}</span>
  3064. </FormItem>
  3065. </div>
  3066. {/*<div className="clearfix">
  3067. <FormItem className="half-item"
  3068. labelCol={{ span: 8 }}
  3069. wrapperCol={{ span: 14 }}
  3070. label="上传协议文件" >
  3071. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  3072. data={(e)=>{
  3073. return {
  3074. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  3075. }
  3076. }}
  3077. fileList={this.state.attachmentUrl}
  3078. showUploadList={{showRemoveIcon:false}}
  3079. onPreview={(e)=>{
  3080. let url = window.location.href.substring(7)
  3081. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  3082. }}>
  3083. </Upload>
  3084. </FormItem>
  3085. </div>*/}
  3086. <div className="clearfix">
  3087. <FormItem
  3088. labelCol={{ span: 4 }}
  3089. wrapperCol={{ span: 18 }}
  3090. label="合同/协议扫描件"
  3091. >
  3092. <Upload
  3093. className="demandDetailShow-upload"
  3094. listType="picture-card"
  3095. fileList={this.state.pictureUrl}
  3096. onPreview={file => {
  3097. this.setState({
  3098. previewImage: file.url || file.thumbUrl,
  3099. previewVisible: true
  3100. });
  3101. }}
  3102. ></Upload>
  3103. <Modal
  3104. maskClosable={false}
  3105. footer={null}
  3106. visible={this.state.previewVisible}
  3107. onCancel={() => {
  3108. this.setState({ previewVisible: false });
  3109. }}
  3110. >
  3111. <img
  3112. alt=""
  3113. style={{
  3114. width: "100%",
  3115. transform: `rotate(${this.state.rotateDeg}deg)`
  3116. }}
  3117. src={this.state.previewImage || ""}
  3118. />
  3119. <Button
  3120. onClick={this.rotate}
  3121. style={{
  3122. position: "relative",
  3123. left: "50%",
  3124. transform: "translateX(-50%)"
  3125. }}
  3126. >
  3127. 旋转
  3128. </Button>
  3129. <Button
  3130. onClick={this.upImg}
  3131. style={{
  3132. position: "absolute",
  3133. left: -81,
  3134. top: "50%",
  3135. transform: "translateY(-50%)"
  3136. }}
  3137. >
  3138. 上一张
  3139. </Button>
  3140. <Button
  3141. onClick={this.downImg}
  3142. style={{
  3143. position: "absolute",
  3144. right: -81,
  3145. top: "50%",
  3146. transform: "translateY(-50%)"
  3147. }}
  3148. >
  3149. 下一张
  3150. </Button>
  3151. </Modal>
  3152. </FormItem>
  3153. </div>
  3154. <div className="clearfix">
  3155. <hr className="division" />
  3156. <div className="clearfix">
  3157. <FormItem
  3158. className="half-item"
  3159. labelCol={{ span: 8 }}
  3160. wrapperCol={{ span: 14 }}
  3161. label="审核意见"
  3162. >
  3163. <span>{this.state.remarks}</span>
  3164. </FormItem>
  3165. </div>
  3166. <div className="clearfix">
  3167. <FormItem
  3168. className="half-item"
  3169. labelCol={{ span: 8 }}
  3170. wrapperCol={{ span: 14 }}
  3171. label="审核结果"
  3172. >
  3173. <span>{getRefundStatus(this.state.refundStatus)}</span>
  3174. </FormItem>
  3175. </div>
  3176. <div className="clearfix">
  3177. <FormItem
  3178. className="half-item"
  3179. labelCol={{ span: 8 }}
  3180. wrapperCol={{ span: 14 }}
  3181. label="审核时间"
  3182. >
  3183. <span>{this.state.auditTimes}</span>
  3184. </FormItem>
  3185. </div>
  3186. </div>
  3187. </TabPane>
  3188. </Tabs>
  3189. </Modal>
  3190. </div>
  3191. <div className="patent-desc">
  3192. <Modal
  3193. maskClosable={false}
  3194. title="驳回理由"
  3195. visible={this.state.boHuiVisible}
  3196. onCancel={this.boHuiCancel}
  3197. width="500px"
  3198. footer=""
  3199. className="admin-desc-content"
  3200. >
  3201. <TextArea
  3202. rows={4}
  3203. value={this.state.reason}
  3204. onChange={e => {
  3205. console.log(e.target.value);
  3206. this.setState({
  3207. reason: e.target.value
  3208. });
  3209. }}
  3210. />
  3211. <Button
  3212. type="primary"
  3213. style={{ marginTop: "20px" }}
  3214. onClick={this.boHuiCo}
  3215. >
  3216. 确定
  3217. </Button>
  3218. </Modal>
  3219. </div>
  3220. <Assign
  3221. title="任务"
  3222. selApi={"/api/admin/newOrder/updateFinance"}
  3223. data={this.state.assignDataY}
  3224. showDesc={this.state.assignVisibleY}
  3225. closeDesc={this.closeAssignY.bind(this)}
  3226. // fenpaiData={8}
  3227. specially={0}
  3228. roleName={this.state.nub}
  3229. requestMethod={"get"}
  3230. />
  3231. <Receivable
  3232. title="收款记录"
  3233. api="/api/admin/financial/addReceiptsFlow"
  3234. data={this.state.assignDataX}
  3235. showDesc={this.state.assignVisibleX}
  3236. closeDesc={this.closeAssignX.bind(this)}
  3237. />
  3238. <Modal
  3239. visible={this.state.bvisible}
  3240. footer=""
  3241. title="开票历史记录"
  3242. className="admin-desc-content"
  3243. width="900px"
  3244. onCancel={this.inRecordCanl}
  3245. >
  3246. <Spin spinning={this.state.loading}>
  3247. <div
  3248. className="patent-table"
  3249. ref={e => {
  3250. this.refs.kaiPiao = e;
  3251. }}
  3252. >
  3253. <Table
  3254. columns={this.state.columnsDate}
  3255. dataSource={this.state.recordData}
  3256. pagination={false}
  3257. bordered
  3258. />
  3259. <div className="clearfix" style={{ marginTop: "20px" }}>
  3260. <FormItem
  3261. className="half-item"
  3262. {...formItemLayout}
  3263. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  3264. >
  3265. <span>{this.state.sum + "(万元)"}</span>
  3266. </FormItem>
  3267. </div>
  3268. <ReactToPrint
  3269. trigger={() => (
  3270. <Button
  3271. type="primary"
  3272. style={{
  3273. float: "right",
  3274. // marginTop: 10,
  3275. position: "absolute",
  3276. top: -54,
  3277. right: 30
  3278. }}
  3279. >
  3280. 打印
  3281. </Button>
  3282. )}
  3283. content={() => this.refs.kaiPiao}
  3284. />
  3285. </div>
  3286. </Spin>
  3287. </Modal>
  3288. <Modal
  3289. visible={this.state.cvisible}
  3290. footer=""
  3291. title="详细收款流水"
  3292. className="admin-desc-content"
  3293. width="1300px"
  3294. onCancel={this.waterCanl}
  3295. >
  3296. <Spin spinning={this.state.loading}>
  3297. <div
  3298. className="patent-table"
  3299. ref={e => {
  3300. this.refs.shouKuan = e;
  3301. }}
  3302. >
  3303. <Table
  3304. columns={this.state.waterlistDate}
  3305. dataSource={this.state.waterData}
  3306. pagination={false}
  3307. bordered
  3308. />
  3309. <div className="clearfix" style={{ marginTop: "20px" }}>
  3310. <FormItem
  3311. className="half-item"
  3312. {...formItemLayout}
  3313. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  3314. >
  3315. <span>{this.state.waterSum + "(万元)"}</span>
  3316. </FormItem>
  3317. </div>
  3318. <ReactToPrint
  3319. trigger={() => (
  3320. <Button
  3321. type="primary"
  3322. style={{
  3323. float: "right",
  3324. position: "absolute",
  3325. top: -54,
  3326. right: 30
  3327. }}
  3328. >
  3329. 打印
  3330. </Button>
  3331. )}
  3332. content={() => this.refs.shouKuan}
  3333. />
  3334. </div>
  3335. </Spin>
  3336. </Modal>
  3337. <Modal
  3338. visible={this.state.dvisible}
  3339. footer=""
  3340. title="所有列表信息"
  3341. className="admin-desc-content"
  3342. width="1300px"
  3343. onCancel={() => {
  3344. this.loadData();
  3345. this.setState({
  3346. dvisible: false
  3347. });
  3348. }}
  3349. >
  3350. <Spin spinning={this.state.loading}>
  3351. <div
  3352. className="patent-table"
  3353. style={{
  3354. // width: 900,
  3355. // position: "relative",
  3356. // left: "50%",
  3357. // transform: "translate(-50%)",
  3358. padding: "25px 0 30px 30px"
  3359. }}
  3360. ref={e => {
  3361. this.refs.all = e;
  3362. }}
  3363. >
  3364. <Table
  3365. columns={this.state.printColumns}
  3366. dataSource={this.state.dataSource}
  3367. pagination={false}
  3368. bordered
  3369. size="small"
  3370. />
  3371. </div>
  3372. </Spin>
  3373. <ReactToPrint
  3374. trigger={() => (
  3375. <Button
  3376. type="primary"
  3377. style={{
  3378. float: "right",
  3379. marginTop: 10,
  3380. position: "absolute",
  3381. top: 0,
  3382. right: 30
  3383. }}
  3384. >
  3385. 打印
  3386. </Button>
  3387. )}
  3388. content={() => this.refs.all}
  3389. />
  3390. </Modal>
  3391. <Modal
  3392. visible={this.state.timeVisible}
  3393. footer=""
  3394. title="工时详情"
  3395. className="admin-desc-content"
  3396. width="1300px"
  3397. pagination={false}
  3398. onCancel={() => {
  3399. this.loadData();
  3400. this.setState({
  3401. timeVisible: false
  3402. });
  3403. }}
  3404. >
  3405. <Spin spinning={this.state.loading}>
  3406. <div
  3407. className="patent-table"
  3408. style={
  3409. {
  3410. // width: 900,
  3411. // position: "relative",
  3412. // left: "50%",
  3413. // transform: "translate(-50%)",
  3414. // padding: "25px 0 30px 30px"
  3415. }
  3416. }
  3417. ref={e => {
  3418. this.refs.all = e;
  3419. }}
  3420. >
  3421. <Table
  3422. columns={this.state.timeColumns}
  3423. dataSource={this.state.timeDataList}
  3424. scroll={{ x: "max-content", y: 0 }}
  3425. pagination={false}
  3426. bordered
  3427. size="small"
  3428. />
  3429. </div>
  3430. </Spin>
  3431. <ReactToPrint
  3432. trigger={() => (
  3433. <Button
  3434. type="primary"
  3435. style={{
  3436. float: "right",
  3437. marginTop: 10,
  3438. position: "absolute",
  3439. top: 0,
  3440. right: 30
  3441. }}
  3442. >
  3443. 打印
  3444. </Button>
  3445. )}
  3446. content={() => this.refs.all}
  3447. />
  3448. </Modal>
  3449. <Modal
  3450. visible={this.state.cuiVisible}
  3451. footer=""
  3452. title="催款详情"
  3453. className="admin-desc-content"
  3454. width="1300px"
  3455. pagination={false}
  3456. onCancel={() => {
  3457. this.loadData();
  3458. this.setState({
  3459. cuiVisible: false
  3460. });
  3461. }}
  3462. >
  3463. <Spin spinning={this.state.loading}>
  3464. <div
  3465. className="patent-table"
  3466. style={
  3467. {
  3468. // width: 900,
  3469. // position: "relative",
  3470. // left: "50%",
  3471. // transform: "translate(-50%)",
  3472. // padding: "25px 0 30px 30px"
  3473. }
  3474. }
  3475. ref={e => {
  3476. this.refs.all = e;
  3477. }}
  3478. >
  3479. <Table
  3480. columns={this.state.cuiColumns}
  3481. dataSource={this.state.cuiDataList}
  3482. pagination={false}
  3483. scroll={{ x: "max-content", y: 0 }}
  3484. bordered
  3485. size="small"
  3486. />
  3487. </div>
  3488. </Spin>
  3489. <ReactToPrint
  3490. trigger={() => (
  3491. <Button
  3492. type="primary"
  3493. style={{
  3494. float: "right",
  3495. marginTop: 10,
  3496. position: "absolute",
  3497. top: 0,
  3498. right: 30
  3499. }}
  3500. >
  3501. 打印
  3502. </Button>
  3503. )}
  3504. content={() => this.refs.all}
  3505. />
  3506. </Modal>
  3507. <Modal
  3508. visible={this.state.proVisible}
  3509. footer=""
  3510. title="项目详情"
  3511. className="admin-desc-content"
  3512. width="1300px"
  3513. pagination={false}
  3514. onCancel={() => {
  3515. this.loadData();
  3516. this.setState({
  3517. proVisible: false
  3518. });
  3519. }}
  3520. >
  3521. <Spin spinning={this.state.loading}>
  3522. <div
  3523. className="patent-table"
  3524. style={
  3525. {
  3526. // width: 900,
  3527. // position: "relative",
  3528. // left: "50%",
  3529. // transform: "translate(-50%)",
  3530. // padding: "25px 0 30px 30px"
  3531. }
  3532. }
  3533. ref={e => {
  3534. this.refs.all = e;
  3535. }}
  3536. >
  3537. <Table
  3538. columns={this.state.proColumns}
  3539. dataSource={this.state.proDataList}
  3540. pagination={false}
  3541. bordered
  3542. size="small"
  3543. />
  3544. </div>
  3545. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  3546. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  3547. </span>
  3548. </Spin>
  3549. <ReactToPrint
  3550. trigger={() => (
  3551. <Button
  3552. type="primary"
  3553. style={{
  3554. float: "right",
  3555. marginTop: 10,
  3556. position: "absolute",
  3557. top: 0,
  3558. right: 30
  3559. }}
  3560. >
  3561. 打印
  3562. </Button>
  3563. )}
  3564. content={() => this.refs.all}
  3565. />
  3566. </Modal>
  3567. <Spin spinning={this.state.loading}>
  3568. <Modal
  3569. title="审核订单"
  3570. visible={this.state.checkVisible}
  3571. onOk={this.checkOk}
  3572. okText={"通过"}
  3573. onCancel={() => {
  3574. this.loadData();
  3575. this.setState({
  3576. checkVisible: false,
  3577. checkData: ""
  3578. });
  3579. }}
  3580. >
  3581. <TextArea
  3582. value={this.state.checkData}
  3583. onChange={(e, recard) => {
  3584. this.setState({
  3585. checkData: e.target.value
  3586. });
  3587. }}
  3588. placeholder="请填写审核内容"
  3589. />
  3590. </Modal>
  3591. </Spin>
  3592. </div>
  3593. );
  3594. }
  3595. });
  3596. export default approvedOutsourcing;