approveds.jsx 93 KB

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