approvedOutsourcing.jsx 106 KB

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