approveds.jsx 94 KB

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