approveds.jsx 94 KB

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