approveds.jsx 91 KB

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