approvedOutsourcing.jsx 105 KB

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