approveds.jsx 91 KB

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