approveds.jsx 94 KB

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