approveds.jsx 91 KB

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