approvedOutsourcingAll.jsx 103 KB

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