shouKuanAll.jsx 102 KB

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