approveds.jsx 92 KB

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