examine.jsx 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908
  1. import React from "react";
  2. import {
  3. Icon,
  4. Button,
  5. Input,
  6. Spin,
  7. Table,
  8. message,
  9. DatePicker,
  10. Upload,
  11. Form,
  12. Modal,
  13. Tabs,
  14. Col,
  15. Popconfirm
  16. } from "antd";
  17. import $ from "jquery/src/ajax";
  18. import moment from "moment";
  19. import {
  20. getLiquidationStatus,
  21. getApprovedState,
  22. getProcessStatus,
  23. splitUrl,
  24. getjiedian,
  25. getboutique,
  26. getCuikuan,
  27. getProjectStatus,
  28. moneyVerify,
  29. ShowModal
  30. } from "@/tools.js";
  31. import "./customer.less";
  32. import ShowModalDiv from "@/showModal.jsx";
  33. import OrderRiZi from "@/orderRiZi.jsx";
  34. const confirm = Modal.confirm;
  35. //图片组件
  36. const PicturesWall = React.createClass({
  37. getInitialState() {
  38. return {
  39. previewVisible: false,
  40. previewImage: "",
  41. fileList: this.props.pictureUrl
  42. };
  43. },
  44. handleCancel() {
  45. this.setState({
  46. previewVisible: false
  47. });
  48. },
  49. handlePreview(file) {
  50. this.setState({
  51. previewImage: file.url || file.thumbUrl,
  52. previewVisible: true
  53. });
  54. },
  55. handleChange(info) {
  56. let fileList = info.fileList;
  57. this.setState({
  58. fileList
  59. });
  60. this.props.fileList(fileList);
  61. },
  62. componentWillReceiveProps(nextProps) {
  63. this.state.fileList = nextProps.pictureUrl;
  64. this.state.pojectApplicationUrl = undefined;
  65. },
  66. render() {
  67. const { previewVisible, previewImage, fileList } = this.state;
  68. const uploadButton = (
  69. <div>
  70. <Icon type="plus" />
  71. <div className="ant-upload-text">点击上传</div>
  72. </div>
  73. );
  74. return (
  75. <div style={{ display: "inline-block" }}>
  76. <Upload
  77. action={
  78. globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"
  79. }
  80. data={{ sign: "order_outsource" }}
  81. listType="picture-card"
  82. fileList={fileList}
  83. onPreview={this.handlePreview}
  84. onChange={this.handleChange}
  85. >
  86. {fileList.length >= 18 ? null : uploadButton}
  87. </Upload>
  88. <Modal
  89. maskClosable={false}
  90. visible={previewVisible}
  91. footer={null}
  92. onCancel={this.handleCancel}
  93. >
  94. <img alt="example" style={{ width: "100%" }} src={previewImage} />
  95. </Modal>
  96. </div>
  97. );
  98. }
  99. });
  100. const IntentionCustomer = Form.create()(
  101. React.createClass({
  102. loadData(pageNo) {
  103. this.setState({
  104. visitModul: false,
  105. loading: true,
  106. ispage: pageNo,
  107. modalVisible: false
  108. });
  109. $.ajax({
  110. method: "get",
  111. dataType: "json",
  112. crossDomain: false,
  113. url: globalConfig.context + "/api/admin/newOrder/orderNewList",
  114. data: {
  115. pageNo: pageNo || 1,
  116. pageSize: this.state.pagination.pageSize,
  117. specially: 1, //审核列表
  118. name: this.state.customerName, //名称
  119. orderNo: this.state.orderNoSearch, //订单编号
  120. starTime: this.state.releaseDate[0], //开始时间
  121. endTime: this.state.releaseDate[1] //结束时间
  122. },
  123. success: function(data) {
  124. ShowModal(this);
  125. let theArr = [];
  126. if (data.error.length || data.data.list == "") {
  127. if (data.error && data.error.length) {
  128. message.warning(data.error[0].message);
  129. }
  130. } else {
  131. for (let i = 0; i < data.data.list.length; i++) {
  132. let thisdata = data.data.list[i];
  133. theArr.push({
  134. key: i,
  135. id: thisdata.id, //用户ID
  136. orderNo: thisdata.orderNo, //订单编号
  137. totalAmount: thisdata.totalAmount, //签单金额
  138. processStatus: thisdata.processStatus, //流程状态
  139. liquidationStatus: thisdata.liquidationStatus, //结算状态
  140. approval: thisdata.approval, //特批状态
  141. signDate: thisdata.signDate, //签单时间
  142. userName: thisdata.userName, //客户名称
  143. salesmanName: thisdata.salesmanName, //营销员名称
  144. financeName: thisdata.financeName, //财务名称
  145. createDate: thisdata.createDate, //下单时间
  146. depName: thisdata.depName,
  147. orderStatus: thisdata.orderStatus
  148. });
  149. }
  150. this.state.pagination.total = data.data.totalCount;
  151. this.state.pagination.current = data.data.pageNo;
  152. }
  153. if (data.data && data.data.list && !data.data.list.length) {
  154. this.state.pagination.total = 0;
  155. }
  156. this.setState({
  157. dataSource: theArr,
  158. pageNo: pageNo,
  159. pagination: this.state.pagination,
  160. selectedRowKeys: []
  161. });
  162. }.bind(this)
  163. }).always(
  164. function() {
  165. this.setState({
  166. loading: false
  167. });
  168. }.bind(this)
  169. );
  170. },
  171. getInitialState() {
  172. return {
  173. page: 1,
  174. releaseDate: [],
  175. selectedRowKeys: [],
  176. pictureUrl: [],
  177. attachmentUrl: [],
  178. paginations: false,
  179. activeKey: "1",
  180. confirmLoading: false,
  181. aloading: false,
  182. pagination: {
  183. defaultCurrent: 1,
  184. defaultPageSize: 10,
  185. showQuickJumper: true,
  186. pageSize: 10,
  187. onChange: function(page) {
  188. this.loadData(page);
  189. }.bind(this),
  190. showTotal: function(total) {
  191. return "共" + total + "条数据";
  192. }
  193. },
  194. columns: [
  195. {
  196. title: "订单编号",
  197. dataIndex: "orderNo",
  198. key: "orderNo"
  199. },
  200. {
  201. title: "下单时间",
  202. dataIndex: "createDate",
  203. key: "createTime"
  204. },
  205. {
  206. title: "合同签订时间",
  207. dataIndex: "signDate",
  208. key: "signDate"
  209. },
  210. {
  211. title: "客户名称",
  212. dataIndex: "userName",
  213. key: "userName",
  214. render: text => {
  215. return text && text.length > 9 ? text.substr(0, 9) + "..." : text;
  216. }
  217. },
  218. {
  219. title: "流程状态",
  220. dataIndex: "processStatus",
  221. key: "processStatus",
  222. render: text => {
  223. return getProcessStatus(text);
  224. }
  225. },
  226. {
  227. title: "订单部门",
  228. dataIndex: "depName",
  229. key: "depName"
  230. },
  231. {
  232. title: "签单金额(万元)",
  233. dataIndex: "totalAmount",
  234. key: "totalAmount"
  235. },
  236. {
  237. title: "结算状态",
  238. dataIndex: "liquidationStatus",
  239. key: "liquidationStatus",
  240. render: text => {
  241. return getLiquidationStatus(text);
  242. }
  243. },
  244. {
  245. title: "是否特批",
  246. dataIndex: "approval",
  247. key: "approval",
  248. render: text => {
  249. return getApprovedState(text);
  250. }
  251. },
  252. {
  253. title: "订单负责人",
  254. dataIndex: "salesmanName",
  255. key: "salesmanName"
  256. },
  257. {
  258. title: "财务负责人",
  259. dataIndex: "financeName",
  260. key: "financeName"
  261. }
  262. ],
  263. data: [],
  264. dataSource: [],
  265. columnsX: [
  266. {
  267. title: "业务项目名称",
  268. dataIndex: "commodityName",
  269. key: "commodityName"
  270. },
  271. {
  272. title: "项目类别",
  273. dataIndex: "cname",
  274. key: "cname"
  275. },
  276. {
  277. title: "项目数量",
  278. dataIndex: "commodityQuantity",
  279. key: "commodityQuantity"
  280. },
  281. {
  282. title: "金额(万元)",
  283. dataIndex: "commodityPrice",
  284. key: "commodityPrice"
  285. },
  286. {
  287. title: "负责人",
  288. dataIndex: "contacts",
  289. key: "contacts"
  290. },
  291. {
  292. title: "负责人电话",
  293. dataIndex: "contactsMobile",
  294. key: "contactsMobile"
  295. },
  296. {
  297. title: "项目状态",
  298. dataIndex: "projectStatus",
  299. key: "projectStatus",
  300. render: text => {
  301. return getProjectStatus(text);
  302. }
  303. },
  304. {
  305. title: "主要项目",
  306. dataIndex: "main",
  307. key: "main",
  308. render: text => {
  309. return text ? "是" : "否";
  310. }
  311. },
  312. {
  313. title: "项目说明",
  314. dataIndex: "taskComment",
  315. key: "taskComment",
  316. render: text => {
  317. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  318. }
  319. }
  320. ],
  321. columnsrizhi: [
  322. {
  323. title: "流程",
  324. dataIndex: "processName",
  325. key: "processName"
  326. },
  327. {
  328. title: "操作人",
  329. dataIndex: "adminName",
  330. key: "adminName"
  331. },
  332. {
  333. title: "时间",
  334. dataIndex: "createDate",
  335. key: "createDate"
  336. }
  337. ],
  338. dataSourceX: [],
  339. ContactsListsNew: [
  340. {
  341. title: "项目名称",
  342. dataIndex: "commodityName",
  343. key: "commodityName",
  344. render: text => {
  345. return <span>{text}</span>;
  346. }
  347. },
  348. {
  349. title: "项目分类",
  350. dataIndex: "projectType",
  351. key: "projectType",
  352. render: text => {
  353. let arr = this.state.dataSourceX || [];
  354. let str = "";
  355. for (let i = 0; i < arr.length; i++) {
  356. if (this.state.dataSourceX[i].sort == text) {
  357. str = this.state.dataSourceX[i].cname;
  358. return <span>{str}</span>;
  359. }
  360. }
  361. }
  362. },
  363. {
  364. title: "催款科目",
  365. dataIndex: "dunTypeName",
  366. key: "dunTypeName",
  367. render: text => {
  368. return <span>{text}</span>;
  369. }
  370. },
  371. {
  372. title: "时间",
  373. dataIndex: "waitDay",
  374. key: "waitDay",
  375. render: (text, record) => {
  376. if (record.dunTypeName) {
  377. return <span>{text}</span>;
  378. }
  379. }
  380. },
  381. {
  382. title: "金额(万元)",
  383. dataIndex: "money",
  384. key: "money",
  385. render: (text, record) => {
  386. if (record.dunTypeName) {
  387. if (record.appropriationRatio && !record.money) {
  388. return <span>{record.appropriationRatio}(拨款比例)</span>;
  389. } else if (record.appropriationRatio && record.money) {
  390. return (
  391. <span>
  392. {text}(比例:{record.appropriationRatio})
  393. </span>
  394. );
  395. } else {
  396. return <span>{text}</span>;
  397. }
  398. }
  399. }
  400. },
  401. {
  402. title: "服务年限",
  403. dataIndex: "startDate",
  404. key: "startDate",
  405. render: (text, record) => {
  406. if (record.dunTypeName) {
  407. return <span>{text}</span>;
  408. }
  409. }
  410. },
  411. {
  412. title: "催款状态",
  413. dataIndex: "status",
  414. key: "status",
  415. render: text => {
  416. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  417. }
  418. }
  419. ],
  420. ContactsLists: [
  421. {
  422. title: "催款科目",
  423. dataIndex: "dunSubject",
  424. key: "dunSubject",
  425. render: text => {
  426. return getjiedian(text);
  427. }
  428. },
  429. {
  430. title: "金额(万元)",
  431. dataIndex: "money",
  432. key: "money"
  433. },
  434. {
  435. title: "催款状态",
  436. dataIndex: "dunStatus",
  437. key: "dunStatus",
  438. render: text => {
  439. return getCuikuan(text);
  440. }
  441. }
  442. ]
  443. };
  444. },
  445. //页面加载函数
  446. componentWillMount() {
  447. this.loadData();
  448. },
  449. //整行点击
  450. tableRowClick(record) {
  451. this.setState({
  452. visible: true,
  453. orderStatus: record.orderStatus,
  454. id: record.id
  455. });
  456. this.xiangqing(record.orderNo);
  457. this.xiangmu(record.orderNo);
  458. this.jiedian(record.orderNo);
  459. this.jiedianNew(record.orderNo);
  460. },
  461. //点击打卡项目详情
  462. tableRowClickX(record) {
  463. this.setState({
  464. jid: record.id, //项目ID
  465. kid: record.commodityId, //商品ID
  466. commodityName: record.commodityName, //金额
  467. commodityPrice: record.commodityPrice, //金额
  468. commodityQuantity: record.commodityQuantity, //数量
  469. taskComment: record.taskComment, //备注
  470. main: record.main.toString(), //是否为主要
  471. addnextVisible: true,
  472. addState: 0
  473. });
  474. },
  475. //项目详情关闭
  476. nextCancel() {
  477. this.setState({
  478. addnextVisible: false
  479. });
  480. },
  481. //订单详情
  482. xiangqing(orderNos) {
  483. $.ajax({
  484. method: "get",
  485. dataType: "json",
  486. crossDomain: false,
  487. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  488. data: {
  489. orderNo: orderNos
  490. },
  491. success: function(data) {
  492. if (data.error.length || data.data.list == "") {
  493. if (data.error && data.error.length) {
  494. message.warning(data.error[0].message);
  495. }
  496. } else {
  497. let thisdata = data.data;
  498. this.setState({
  499. orderNo: thisdata.orderNo, //订单编号
  500. contractNo: thisdata.contractNo, //合同编号
  501. userName: thisdata.userName, //客户名称
  502. signDate: thisdata.signDate, //签单时间
  503. processStatus: thisdata.processStatus, //流程状态
  504. liquidationStatus: thisdata.liquidationStatus, //结算状态
  505. contacts: thisdata.contacts, //企业联系人
  506. contactMobile: thisdata.contactMobile, //联系人电话
  507. legalPerson: thisdata.legalPerson, //法人
  508. legalPersonTel: thisdata.legalPersonTel, //法人电话
  509. firstAmount: thisdata.firstAmount, //签单金额
  510. totalAmount: thisdata.totalAmount, //首付金额
  511. approval: thisdata.approval, //特批状态
  512. settlementAmount: thisdata.settlementAmount, //已收款项
  513. orderRemarks: thisdata.orderRemarks, //订单留言
  514. orgCodeUrl: thisdata.contractPictureUrl
  515. ? splitUrl(
  516. thisdata.contractPictureUrl,
  517. ",",
  518. globalConfig.avatarHost + "/upload"
  519. )
  520. : [], //图片地址
  521. salesmanName: thisdata.salesmanName, //营销员名称
  522. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  523. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  524. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  525. financeName: thisdata.financeName, //财务名称
  526. financeMobile: thisdata.financeMobile, //财务电话
  527. nowFinance: thisdata.nowFinance, //财务名称
  528. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  529. depName: thisdata.depName,
  530. outsource: thisdata.outsource == 0 ? "否" : "是"
  531. });
  532. }
  533. }.bind(this)
  534. }).always(
  535. function() {
  536. this.setState({
  537. loading: false
  538. });
  539. }.bind(this)
  540. );
  541. },
  542. //项目列表
  543. xiangmu(orderNos) {
  544. $.ajax({
  545. method: "get",
  546. dataType: "json",
  547. crossDomain: false,
  548. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  549. data: {
  550. orderNo: orderNos
  551. },
  552. success: function(data) {
  553. let theArr = [];
  554. if (data.error.length || data.data.list == "") {
  555. if (data.error && data.error.length) {
  556. message.warning(data.error[0].message);
  557. }
  558. } else {
  559. for (let i = 0; i < data.data.length; i++) {
  560. let thisdata = data.data[i];
  561. theArr.push({
  562. key: i,
  563. id: thisdata.id,
  564. orderNo: thisdata.orderNo, //订单编号
  565. commodityId: thisdata.commodityId, //项目ID
  566. commodityName: thisdata.commodityName, //项目名称
  567. cname: thisdata.cname, //项目类别
  568. commodityPrice: thisdata.commodityPrice, //项目价格
  569. commodityQuantity: thisdata.commodityQuantity, //项目数量
  570. main: thisdata.main, //是否为主要任务
  571. taskComment: thisdata.taskComment, //任务说明
  572. contacts: thisdata.contacts, //联系人
  573. contactsMobile: thisdata.contactsMobile, //联系人电话
  574. projectStatus: thisdata.projectStatus, //项目状态
  575. sort: thisdata.cSort
  576. });
  577. }
  578. }
  579. this.setState({
  580. dataSourceX: theArr
  581. });
  582. }.bind(this)
  583. }).always(
  584. function() {
  585. this.setState({
  586. loading: false
  587. });
  588. }.bind(this)
  589. );
  590. },
  591. rizhi() {
  592. this.setState({
  593. loading: true
  594. });
  595. $.ajax({
  596. method: "get",
  597. dataType: "json",
  598. crossDomain: false,
  599. url: "/api/admin/newOrder/selectOrderLog",
  600. data: {
  601. orderNo: this.state.orderNo
  602. },
  603. success: function(data) {
  604. let theArr = [];
  605. let thisData = data.data;
  606. if (!thisData.length) {
  607. if (data.error && data.error.length) {
  608. message.warning(data.error[0].message);
  609. }
  610. thisData = {};
  611. } else {
  612. for (let i = 0; i < data.data.length; i++) {
  613. let thisdata = data.data[i];
  614. theArr.push({
  615. processName: thisdata.processName,
  616. adminName: thisdata.adminName,
  617. createDate: thisdata.createDate
  618. });
  619. }
  620. }
  621. this.setState({
  622. dataSourcerizhi: theArr
  623. });
  624. }.bind(this)
  625. }).always(
  626. function() {
  627. this.setState({
  628. loading: false
  629. });
  630. }.bind(this)
  631. );
  632. },
  633. getOrderLog() {
  634. this.setState({
  635. rizhivisible: true
  636. });
  637. this.rizhi();
  638. },
  639. closeOrderLog() {
  640. this.setState({
  641. rizhivisible: false
  642. });
  643. },
  644. //节点列表
  645. jiedian(orderNos) {
  646. $.ajax({
  647. method: "get",
  648. dataType: "json",
  649. crossDomain: false,
  650. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  651. data: {
  652. orderNo: orderNos
  653. },
  654. success: function(data) {
  655. let theArr = [];
  656. let thisData = [];
  657. if (data.error.length || data.data.list == "") {
  658. if (data.error && data.error.length) {
  659. message.warning(data.error[0].message);
  660. }
  661. } else {
  662. for (let i = 0; i < data.data.length; i++) {
  663. thisData = data.data[i];
  664. theArr.push({
  665. key: i,
  666. dunSubject: thisData.dunSubject
  667. ? thisData.dunSubject.toString()
  668. : "", //催款科目
  669. id: thisData.id, //节点Id
  670. money: thisData.money, //催款金额
  671. dunStatus: thisData.dunStatus //催款状态
  672. });
  673. }
  674. this.setState({
  675. contactList: theArr
  676. });
  677. }
  678. }.bind(this)
  679. }).always(
  680. function() {
  681. this.setState({
  682. loading: false
  683. });
  684. }.bind(this)
  685. );
  686. },
  687. //查看催款节点
  688. jiedianNew(orderNos) {
  689. $.ajax({
  690. method: "get",
  691. dataType: "json",
  692. crossDomain: false,
  693. url:
  694. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  695. data: {
  696. orderNo: orderNos
  697. },
  698. success: function(data) {
  699. if (data.error && data.error.length) {
  700. message.warning(data.error[0].message);
  701. } else {
  702. let theArr = [];
  703. let thisData = [];
  704. let arr = data.data || [];
  705. let totalCui = 0;
  706. for (let i = 0; i < arr.length; i++) {
  707. thisData = arr[i];
  708. totalCui += +thisData.money;
  709. theArr.push({
  710. key: i,
  711. dunSubject: thisData.dunSubject
  712. ? thisData.dunSubject.toString()
  713. : "", //催款科目
  714. id: thisData.id, //节点Id
  715. money: thisData.money, //催款金额
  716. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  717. commodityName: thisData.commodityName,
  718. projectType: thisData.projectType,
  719. dunTypeName: thisData.dunTypeName,
  720. status: thisData.status,
  721. waitDay: thisData.waitDay,
  722. effectiveCount: thisData.effectiveCount,
  723. startDate: thisData.startDate,
  724. dunType: thisData.dunType,
  725. appropriationRatio: thisData.appropriationRatio
  726. });
  727. }
  728. if (!totalCui) {
  729. totalCui = 0;
  730. }
  731. totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
  732. this.setState({
  733. contactListNew: theArr,
  734. totalCui
  735. });
  736. }
  737. }.bind(this)
  738. }).always(
  739. function() {
  740. this.setState({
  741. loading: false
  742. });
  743. }.bind(this)
  744. );
  745. },
  746. //审核通过
  747. examOk() {
  748. if (this.state.flag) return;
  749. this.setState({
  750. flag: true,
  751. loading: true
  752. });
  753. $.ajax({
  754. method: "post",
  755. dataType: "json",
  756. crossDomain: false,
  757. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  758. data: {
  759. orderNo: this.state.orderNo,
  760. orderStatus: 2
  761. },
  762. success: function(data) {
  763. if (data.error.length || data.data.list == "") {
  764. if (data.error && data.error.length) {
  765. message.warning(data.error[0].message);
  766. this.setState({
  767. flag: false
  768. });
  769. }
  770. } else {
  771. message.success("该订单已通过审核~");
  772. this.setState({
  773. visible: false,
  774. flag: false
  775. });
  776. this.reset();
  777. }
  778. }.bind(this)
  779. }).always(
  780. function() {
  781. this.setState({
  782. loading: false
  783. });
  784. }.bind(this)
  785. );
  786. },
  787. //通过发给外包
  788. outsourcing() {
  789. if (this.state.flag) return;
  790. this.setState({
  791. flag: true,
  792. loading: true
  793. });
  794. $.ajax({
  795. method: "post",
  796. dataType: "json",
  797. crossDomain: false,
  798. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  799. data: {
  800. orderNo: this.state.orderNo,
  801. orderStatus: 2,
  802. outsource: 1
  803. },
  804. success: function(data) {
  805. if (data.error.length || data.data.list == "") {
  806. if (data.error && data.error.length) {
  807. message.warning(data.error[0].message);
  808. this.setState({
  809. flag: false
  810. });
  811. }
  812. } else {
  813. message.success("该订单已通过审核~");
  814. this.setState({
  815. visible: false,
  816. flag: false
  817. });
  818. this.reset();
  819. }
  820. }.bind(this)
  821. }).always(
  822. function() {
  823. this.setState({
  824. loading: false
  825. });
  826. }.bind(this)
  827. );
  828. },
  829. //审核不通过
  830. examOks() {
  831. if (this.state.flag) return;
  832. this.setState({
  833. flag: true
  834. });
  835. this.setState({
  836. aloading: true
  837. });
  838. $.ajax({
  839. method: "post",
  840. dataType: "json",
  841. crossDomain: false,
  842. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  843. data: {
  844. orderNo: this.state.orderNo,
  845. orderStatus: 3,
  846. reason: this.state.reason
  847. },
  848. success: function(data) {
  849. if (data.error.length || data.data.list == "") {
  850. if (data.error && data.error.length) {
  851. message.warning(data.error[0].message);
  852. this.setState({
  853. aloading: true,
  854. flag: false
  855. });
  856. }
  857. } else {
  858. message.success("该订单已被拒绝~");
  859. this.setState({
  860. visible: false,
  861. aloading: false,
  862. noVisible: false,
  863. reason: "",
  864. flag: false
  865. });
  866. this.reset();
  867. }
  868. }.bind(this)
  869. }).always(
  870. function() {
  871. this.setState({
  872. loading: false
  873. });
  874. }.bind(this)
  875. );
  876. },
  877. //点击拒绝
  878. examNo() {
  879. this.setState({
  880. noVisible: true
  881. });
  882. },
  883. callback(key) {
  884. let url = window.location.href.substring(7);
  885. this.setState({
  886. activeKey: key
  887. });
  888. if (this.state.pictureUrl.length) {
  889. let picArr = [];
  890. this.state.pictureUrl.map(function(item) {
  891. if (
  892. item.response &&
  893. item.response.data &&
  894. item.response.data.length
  895. ) {
  896. picArr.push(item.response.data);
  897. }
  898. });
  899. }
  900. if (key === "2") {
  901. this.setState({
  902. loading: true
  903. });
  904. $.ajax({
  905. method: "get",
  906. dataType: "json",
  907. crossDomain: false,
  908. url:
  909. globalConfig.context +
  910. "/api/admin/outsourceOrg/orderOutsourceDtails",
  911. data: {
  912. orderNo: this.state.orderNo
  913. },
  914. success: function(data) {
  915. if (data.data) {
  916. let thisdata = data.data;
  917. this.setState({
  918. id: thisdata.id,
  919. createTimes: thisdata.createTimes,
  920. auditTimes: thisdata.auditTimes,
  921. remarks: thisdata.remarks,
  922. attachmentUrl: thisdata.attachmentUrl
  923. ? splitUrl(
  924. thisdata.attachmentUrl,
  925. ",",
  926. globalConfig.avatarHost + "/upload",
  927. url
  928. )
  929. : [],
  930. fileUrl: thisdata.attachmentUrl
  931. ? splitUrl(
  932. thisdata.attachmentUrl,
  933. ",",
  934. globalConfig.avatarHost + "/upload",
  935. url
  936. )
  937. : [],
  938. pictureUrl: thisdata.pictureUrl
  939. ? splitUrl(
  940. thisdata.pictureUrl,
  941. ",",
  942. globalConfig.avatarHost + "/upload",
  943. url
  944. )
  945. : [], //图片地址
  946. amount: thisdata.amount,
  947. companyName: thisdata.companyName,
  948. outsourceRemarks: thisdata.outsourceRemarks,
  949. unitNumber: thisdata.unitNumber,
  950. unitPrice: thisdata.unitPrice
  951. });
  952. }
  953. }.bind(this)
  954. }).always(
  955. function() {
  956. this.setState({
  957. loading: false
  958. });
  959. }.bind(this)
  960. );
  961. }
  962. },
  963. getUrl(url) {
  964. let theorgCodeUrl = [];
  965. if (url.length) {
  966. let picArr = [];
  967. url.map(function(item) {
  968. if (
  969. item.response &&
  970. item.response.data &&
  971. item.response.data.length
  972. ) {
  973. picArr.push(item.response.data);
  974. }
  975. });
  976. theorgCodeUrl = picArr.join(",");
  977. }
  978. return theorgCodeUrl;
  979. },
  980. sureOut() {
  981. if (!this.state.companyName) {
  982. message.warning("公司名称不能为空");
  983. return;
  984. }
  985. if (!this.state.unitPrice) {
  986. message.warning("单价不能为空");
  987. return;
  988. }
  989. if (moneyVerify(this.state.unitPrice)) {
  990. return;
  991. }
  992. if (!this.state.unitNumber) {
  993. message.warning("数量不能为空");
  994. return;
  995. }
  996. if (!this.state.amount) {
  997. message.warning("总金额不能为空");
  998. return;
  999. }
  1000. if (moneyVerify(this.state.amount)) {
  1001. return;
  1002. }
  1003. if (!this.state.outsourceRemarks) {
  1004. message.warning("备注不能为空");
  1005. return;
  1006. }
  1007. if (this.state.pictureUrl.length === 0) {
  1008. message.warning("合同扫描件不能为空");
  1009. return;
  1010. }
  1011. $.ajax({
  1012. method: "POST",
  1013. dataType: "json",
  1014. crossDomain: false,
  1015. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  1016. data: {
  1017. id: this.state.id,
  1018. orderNo: this.state.orderNo,
  1019. companyName: this.state.companyName,
  1020. amount: this.state.amount,
  1021. outsourceRemarks: this.state.outsourceRemarks,
  1022. unitNumber: this.state.unitNumber,
  1023. unitPrice: this.state.unitPrice,
  1024. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  1025. ? this.getUrl(this.state.attachmentUrl)
  1026. : "",
  1027. orderStatus: 2,
  1028. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1029. ? this.getUrl(this.state.pictureUrl)
  1030. : ""
  1031. }
  1032. }).done(
  1033. function(data) {
  1034. this.setState({
  1035. loading: false
  1036. });
  1037. if (!data.error.length) {
  1038. message.success("发起成功!");
  1039. this.outReset();
  1040. this.visitCancel();
  1041. } else {
  1042. message.warning(data.error[0].message);
  1043. }
  1044. }.bind(this)
  1045. );
  1046. },
  1047. //关闭输入理由框
  1048. noCancel() {
  1049. this.setState({
  1050. noVisible: false,
  1051. aloading: false,
  1052. reason: ""
  1053. });
  1054. },
  1055. //搜索
  1056. search() {
  1057. this.setState({
  1058. //signBillVisible:false
  1059. });
  1060. this.loadData();
  1061. },
  1062. //重置
  1063. reset() {
  1064. this.setState({
  1065. signBillVisible: false
  1066. });
  1067. this.state.orderNo = "";
  1068. this.state.customerName = "";
  1069. this.state.releaseDate[0] = undefined;
  1070. this.state.releaseDate[1] = undefined;
  1071. this.state.approval = undefined;
  1072. this.loadData(1);
  1073. },
  1074. outReset() {
  1075. this.setState({
  1076. companyName: "",
  1077. amount: "",
  1078. unitPrice: "",
  1079. unitNumber: "",
  1080. outsourceRemarks: "",
  1081. attachmentUrl: [],
  1082. pictureUrl: []
  1083. });
  1084. },
  1085. resets() {
  1086. this.state.orderNo = "";
  1087. this.state.customerName = "";
  1088. this.state.releaseDate[0] = undefined;
  1089. this.state.releaseDate[1] = undefined;
  1090. },
  1091. getOrgCodeUrl(e) {
  1092. this.setState({ pictureUrl: e });
  1093. },
  1094. //关闭详情
  1095. visitCancel() {
  1096. this.setState(
  1097. {
  1098. visible: false
  1099. },
  1100. () => {
  1101. this.setState({
  1102. activeKey: "1"
  1103. });
  1104. }
  1105. );
  1106. this.resets();
  1107. this.loadData();
  1108. },
  1109. visitOk() {
  1110. this.setState({
  1111. visible: false
  1112. });
  1113. this.resets();
  1114. },
  1115. showDeleteConfirm(fn) {
  1116. confirm({
  1117. title: <p style={{ fontSize: 16, fontWeight: 900 }}>注意</p>,
  1118. content: (
  1119. <p style={{ fontWeight: 900, color: "red" }}>
  1120. 当前订单为外包单,您确定修改为普通订单?
  1121. </p>
  1122. ),
  1123. okText: "确定",
  1124. okType: "danger",
  1125. cancelText: "取消",
  1126. onOk() {
  1127. fn()
  1128. },
  1129. onCancel() {}
  1130. });
  1131. },
  1132. render() {
  1133. const formItemLayout = {
  1134. labelCol: { span: 8 },
  1135. wrapperCol: { span: 14 }
  1136. };
  1137. const FormItem = Form.Item;
  1138. const { TabPane } = Tabs;
  1139. const { TextArea } = Input;
  1140. const { RangePicker } = DatePicker;
  1141. const cuiDataList = this.state.contactList || [];
  1142. return (
  1143. <div className="user-content">
  1144. <ShowModalDiv ShowModal={this.state.showModal} />
  1145. <div className="content-title">
  1146. <span>订单审核</span>
  1147. </div>
  1148. <div className="user-search">
  1149. <Input
  1150. placeholder="客户名称"
  1151. style={{ width: "150px", marginBottom: "10px" }}
  1152. value={this.state.customerName}
  1153. onChange={e => {
  1154. this.setState({ customerName: e.target.value });
  1155. }}
  1156. />
  1157. <Input
  1158. placeholder="订单编号"
  1159. style={{ width: "150px" }}
  1160. value={this.state.orderNoSearch}
  1161. onChange={e => {
  1162. this.setState({ orderNoSearch: e.target.value });
  1163. }}
  1164. />
  1165. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1166. <RangePicker
  1167. value={[
  1168. this.state.releaseDate[0]
  1169. ? moment(this.state.releaseDate[0])
  1170. : null,
  1171. this.state.releaseDate[1]
  1172. ? moment(this.state.releaseDate[1])
  1173. : null
  1174. ]}
  1175. onChange={(data, dataString) => {
  1176. this.setState({ releaseDate: dataString });
  1177. }}
  1178. />
  1179. <Button
  1180. type="primary"
  1181. onClick={this.search}
  1182. style={{ marginLeft: "10px" }}
  1183. >
  1184. 搜索
  1185. </Button>
  1186. <Button onClick={this.reset}>重置</Button>
  1187. <div className="patent-table">
  1188. <Spin spinning={this.state.loading}>
  1189. <Table
  1190. columns={this.state.columns}
  1191. dataSource={this.state.dataSource}
  1192. pagination={this.state.pagination}
  1193. onRowClick={this.tableRowClick}
  1194. bordered
  1195. size="small"
  1196. />
  1197. </Spin>
  1198. </div>
  1199. <Modal
  1200. className="customeDetails"
  1201. footer=""
  1202. width="900px"
  1203. visible={this.state.visible}
  1204. onOk={this.visitOk}
  1205. onCancel={this.visitCancel}
  1206. >
  1207. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1208. <TabPane tab="订单详情" key="1">
  1209. <Form
  1210. layout="horizontal"
  1211. onSubmit={this.handleSubmit}
  1212. id="demand-form"
  1213. style={{ paddingBottom: "40px" }}
  1214. >
  1215. <Spin spinning={this.state.loading}>
  1216. <div className="clearfix">
  1217. <FormItem
  1218. className="half-item"
  1219. {...formItemLayout}
  1220. label="订单编号"
  1221. >
  1222. <span>{this.state.orderNo}</span>
  1223. </FormItem>
  1224. <FormItem
  1225. className="half-item"
  1226. {...formItemLayout}
  1227. label="合同编号"
  1228. >
  1229. <span>{this.state.contractNo}</span>
  1230. </FormItem>
  1231. <FormItem
  1232. className="half-item"
  1233. {...formItemLayout}
  1234. label="客户名称"
  1235. >
  1236. <span>{this.state.userName}</span>
  1237. </FormItem>
  1238. <FormItem
  1239. className="half-item"
  1240. {...formItemLayout}
  1241. label="合同签订时间"
  1242. >
  1243. <span>{this.state.signDate}</span>
  1244. </FormItem>
  1245. <FormItem
  1246. className="half-item"
  1247. {...formItemLayout}
  1248. label="流程状态"
  1249. >
  1250. <span>
  1251. {getProcessStatus(this.state.processStatus)}
  1252. </span>
  1253. </FormItem>
  1254. <FormItem
  1255. className="half-item"
  1256. {...formItemLayout}
  1257. label="结算状态"
  1258. >
  1259. <span>
  1260. {getLiquidationStatus(this.state.liquidationStatus)}
  1261. </span>
  1262. </FormItem>
  1263. <FormItem
  1264. className="half-item"
  1265. {...formItemLayout}
  1266. label="企业联系人"
  1267. >
  1268. <span>{this.state.contacts}</span>
  1269. </FormItem>
  1270. <FormItem
  1271. className="half-item"
  1272. {...formItemLayout}
  1273. label="联系人电话"
  1274. >
  1275. <span>{this.state.contactMobile}</span>
  1276. </FormItem>
  1277. <FormItem
  1278. className="half-item"
  1279. {...formItemLayout}
  1280. label="企业法人"
  1281. >
  1282. <span>{this.state.legalPerson}</span>
  1283. </FormItem>
  1284. <FormItem
  1285. className="half-item"
  1286. {...formItemLayout}
  1287. label="法人电话"
  1288. >
  1289. <span>{this.state.legalPersonTel}</span>
  1290. </FormItem>
  1291. <FormItem
  1292. className="half-item"
  1293. {...formItemLayout}
  1294. label="签单金额(万元)"
  1295. >
  1296. <span>{this.state.totalAmount}</span>
  1297. </FormItem>
  1298. <FormItem
  1299. className="half-item"
  1300. {...formItemLayout}
  1301. label="首付金额(万元)"
  1302. >
  1303. <span>{this.state.firstAmount}</span>
  1304. </FormItem>
  1305. <FormItem
  1306. className="half-item"
  1307. {...formItemLayout}
  1308. label="特批立项"
  1309. >
  1310. <span>{getApprovedState(this.state.approval)}</span>
  1311. </FormItem>
  1312. <FormItem
  1313. className="half-item"
  1314. {...formItemLayout}
  1315. label="已收款项(万元)"
  1316. >
  1317. <span>{this.state.settlementAmount}</span>
  1318. </FormItem>
  1319. <FormItem
  1320. className="half-item"
  1321. {...formItemLayout}
  1322. label="订单部门"
  1323. >
  1324. <span>{this.state.depName}</span>
  1325. </FormItem>
  1326. <FormItem
  1327. className="half-item"
  1328. {...formItemLayout}
  1329. label="是否外包"
  1330. >
  1331. {this.state.outsource}
  1332. </FormItem>
  1333. <div className="clearfix">
  1334. <FormItem
  1335. labelCol={{ span: 4 }}
  1336. wrapperCol={{ span: 16 }}
  1337. label="订单留言"
  1338. >
  1339. <p style={{ width: 500, wordWrap: "break-word" }}>
  1340. {this.state.orderRemarks}
  1341. </p>
  1342. </FormItem>
  1343. </div>
  1344. <div className="clearfix">
  1345. <FormItem
  1346. labelCol={{ span: 4 }}
  1347. wrapperCol={{ span: 18 }}
  1348. label="合同扫描件"
  1349. >
  1350. <Upload
  1351. className="demandDetailShow-upload"
  1352. listType="picture-card"
  1353. fileList={this.state.orgCodeUrl}
  1354. onPreview={file => {
  1355. this.setState({
  1356. previewImage: file.url || file.thumbUrl,
  1357. previewVisible: true
  1358. });
  1359. }}
  1360. ></Upload>
  1361. <Modal
  1362. maskClosable={false}
  1363. footer={null}
  1364. visible={this.state.previewVisible}
  1365. onCancel={() => {
  1366. this.setState({ previewVisible: false });
  1367. }}
  1368. >
  1369. <img
  1370. alt=""
  1371. style={{ width: "100%" }}
  1372. src={this.state.previewImage || ""}
  1373. />
  1374. </Modal>
  1375. <Button
  1376. style={{
  1377. float: "right",
  1378. marginRight: "140px",
  1379. marginTop: "20px"
  1380. }}
  1381. onClick={this.getOrderLog}
  1382. >
  1383. 查看订单日志
  1384. </Button>
  1385. </FormItem>
  1386. </div>
  1387. <div className="clearfix">
  1388. <FormItem
  1389. className="half-item"
  1390. {...formItemLayout}
  1391. label="订单负责人"
  1392. >
  1393. <span>{this.state.salesmanName}</span>
  1394. </FormItem>
  1395. <FormItem
  1396. className="half-item"
  1397. {...formItemLayout}
  1398. label="订单负责人电话"
  1399. >
  1400. <span>{this.state.salesmanMobile}</span>
  1401. </FormItem>
  1402. </div>
  1403. <div className="clearfix">
  1404. <FormItem
  1405. className="half-item"
  1406. {...formItemLayout}
  1407. label="当前财务负责人"
  1408. >
  1409. <span>{this.state.nowFinance}</span>
  1410. </FormItem>
  1411. <FormItem
  1412. className="half-item"
  1413. {...formItemLayout}
  1414. label="当前财务负责人电话"
  1415. >
  1416. <span>{this.state.nowFinanceMobile}</span>
  1417. </FormItem>
  1418. </div>
  1419. <div className="clearfix">
  1420. <FormItem
  1421. className="half-item"
  1422. {...formItemLayout}
  1423. style={{ opacity: ".5" }}
  1424. label="原订单负责人"
  1425. >
  1426. <span>{this.state.oldSalesmanName}</span>
  1427. </FormItem>
  1428. <FormItem
  1429. className="half-item"
  1430. {...formItemLayout}
  1431. style={{ opacity: ".5" }}
  1432. label="原订单负责人电话"
  1433. >
  1434. <span>{this.state.oldSalesmanMobile}</span>
  1435. </FormItem>
  1436. </div>
  1437. <div className="clearfix">
  1438. <FormItem
  1439. className="half-item"
  1440. style={{ opacity: ".5" }}
  1441. {...formItemLayout}
  1442. label="实际财务操作人"
  1443. >
  1444. <span>{this.state.financeName}</span>
  1445. </FormItem>
  1446. <FormItem
  1447. className="half-item"
  1448. {...formItemLayout}
  1449. style={{ opacity: ".5" }}
  1450. label="实际财务操作人电话"
  1451. >
  1452. <span>{this.state.financeMobile}</span>
  1453. </FormItem>
  1454. </div>
  1455. <div>
  1456. <span
  1457. style={{ marginLeft: "50px", fontSize: "20px" }}
  1458. >
  1459. 项目业务
  1460. </span>
  1461. {this.state.processStatus == 0 ? (
  1462. <Button
  1463. type="primary"
  1464. onClick={this.addDetailed}
  1465. style={{
  1466. float: "right",
  1467. marginRight: "50px",
  1468. marginBottom: "15px"
  1469. }}
  1470. >
  1471. 添加项目明细
  1472. </Button>
  1473. ) : (
  1474. ""
  1475. )}
  1476. </div>
  1477. <div className="patent-table">
  1478. <Spin spinning={this.state.loading}>
  1479. <Table
  1480. columns={this.state.columnsX}
  1481. dataSource={this.state.dataSourceX}
  1482. pagination={this.state.paginations}
  1483. onRowClick={this.tableRowClickX}
  1484. bordered
  1485. size="small"
  1486. />
  1487. </Spin>
  1488. </div>
  1489. <div>
  1490. <span
  1491. style={{ marginLeft: "50px", fontSize: "20px" }}
  1492. >
  1493. 催款节点
  1494. </span>
  1495. <span
  1496. style={{
  1497. display: cuiDataList.length
  1498. ? "none"
  1499. : "inline-block",
  1500. marginLeft: 10,
  1501. color: "red"
  1502. }}
  1503. >
  1504. 金额总计(万元): {this.state.totalCui}
  1505. </span>
  1506. {this.state.processStatus == 0 ? (
  1507. <Button
  1508. type="primary"
  1509. onClick={this.addcontact}
  1510. style={{
  1511. float: "right",
  1512. marginRight: "50px",
  1513. marginBottom: "15px"
  1514. }}
  1515. >
  1516. 添加催款节点
  1517. </Button>
  1518. ) : (
  1519. ""
  1520. )}
  1521. </div>
  1522. <div className="clearfix">
  1523. <Spin spinning={this.state.loading}>
  1524. <Form layout="horizontal" id="demand-form">
  1525. <Table
  1526. pagination={false}
  1527. bordered
  1528. size="small"
  1529. columns={
  1530. cuiDataList.length
  1531. ? this.state.ContactsLists
  1532. : this.state.ContactsListsNew
  1533. }
  1534. dataSource={
  1535. cuiDataList.length
  1536. ? this.state.contactList
  1537. : this.state.contactListNew
  1538. }
  1539. />
  1540. <Col
  1541. span={24}
  1542. offset={9}
  1543. style={{ marginTop: "15px" }}
  1544. ></Col>
  1545. </Form>
  1546. </Spin>
  1547. </div>
  1548. <div className="addSave" style={{ marginTop: "15px" }}>
  1549. <Button
  1550. type="primary"
  1551. // onClick={this.examOk}
  1552. onClick={() => {
  1553. if (this.state.outsource == "是") {
  1554. this.showDeleteConfirm(this.examOk);
  1555. } else {
  1556. this.examOk();
  1557. }
  1558. }}
  1559. style={{ marginLeft: "200px" }}
  1560. htmlType="submit"
  1561. >
  1562. 通过
  1563. </Button>
  1564. <Button
  1565. type="primary"
  1566. onClick={this.examNo}
  1567. style={{ marginLeft: "50px" }}
  1568. htmlType="submit"
  1569. >
  1570. 驳回
  1571. </Button>
  1572. <Button
  1573. type="ghost"
  1574. onClick={this.visitCancel}
  1575. style={{ marginLeft: "50px" }}
  1576. >
  1577. 取消
  1578. </Button>
  1579. {/*<Button className='warn-button' type="primary" onClick={this.outsourcing} style={{marginLeft:"50px"}}>通过不走总部</Button>
  1580. <p className='hint'>提示:高于总部价格,费用个人承担!</p>*/}
  1581. </div>
  1582. </div>
  1583. </Spin>
  1584. </Form>
  1585. </TabPane>
  1586. <TabPane tab="外包(不走总部)" key="2">
  1587. <div className="clearfix">
  1588. <FormItem
  1589. className="half-item"
  1590. {...formItemLayout}
  1591. label={
  1592. <span>
  1593. <strong style={{ color: "#f00" }}>*</strong>外包公司
  1594. </span>
  1595. }
  1596. >
  1597. <Input
  1598. value={this.state.companyName}
  1599. onChange={e => {
  1600. this.setState({
  1601. companyName: e.target.value
  1602. });
  1603. }}
  1604. placeholder="请填写外包公司名称"
  1605. />
  1606. </FormItem>
  1607. <span className="tip">如多个公司,请用间隔</span>
  1608. </div>
  1609. <div className="clearfix">
  1610. <FormItem
  1611. className="half-item"
  1612. {...formItemLayout}
  1613. label={
  1614. <span>
  1615. <strong style={{ color: "#f00" }}>*</strong>单价(万元)
  1616. </span>
  1617. }
  1618. >
  1619. <Input
  1620. value={this.state.unitPrice}
  1621. onChange={e => {
  1622. this.setState({
  1623. unitPrice: e.target.value
  1624. });
  1625. }}
  1626. placeholder="请填写单价"
  1627. />
  1628. </FormItem>
  1629. </div>
  1630. <div className="clearfix">
  1631. <FormItem
  1632. className="half-item"
  1633. {...formItemLayout}
  1634. label={
  1635. <span>
  1636. <strong style={{ color: "#f00" }}>*</strong>数量(个)
  1637. </span>
  1638. }
  1639. >
  1640. <Input
  1641. value={this.state.unitNumber}
  1642. onChange={e => {
  1643. this.setState({
  1644. unitNumber: e.target.value
  1645. });
  1646. }}
  1647. placeholder="请填写数量"
  1648. />
  1649. </FormItem>
  1650. </div>
  1651. <div className="clearfix">
  1652. <FormItem
  1653. className="half-item"
  1654. {...formItemLayout}
  1655. label={
  1656. <span>
  1657. <strong style={{ color: "#f00" }}>*</strong>
  1658. 总金额(万元)
  1659. </span>
  1660. }
  1661. >
  1662. <Input
  1663. value={this.state.amount}
  1664. onChange={e => {
  1665. this.setState({
  1666. amount: e.target.value
  1667. });
  1668. }}
  1669. placeholder="请填写本次外包公司的价格"
  1670. />
  1671. </FormItem>
  1672. </div>
  1673. {/*<div className="clearfix">
  1674. <FormItem className="half-item"
  1675. {...formItemLayout}
  1676. label="上传协议文件" style={{height:"auto"}}>
  1677. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1678. data={(e)=>{
  1679. return {
  1680. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1681. }
  1682. }}
  1683. fileList={this.state.attachmentUrl}
  1684. onChange={(e)=>{
  1685. this.setState({attachmentUrl:e.fileList})
  1686. }}>
  1687. {this.state.attachmentUrl.length>1?null:<Button>
  1688. <Icon type="upload" /> 点击上传
  1689. </Button>}
  1690. </Upload>
  1691. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  1692. </FormItem>
  1693. </div>*/}
  1694. <div className="clearfix">
  1695. <FormItem
  1696. className="half-item"
  1697. style={{ height: "auto" }}
  1698. {...formItemLayout}
  1699. label={
  1700. <span>
  1701. <strong style={{ color: "#f00" }}>*</strong>备注
  1702. </span>
  1703. }
  1704. >
  1705. <TextArea
  1706. rows={4}
  1707. value={this.state.outsourceRemarks}
  1708. onChange={e => {
  1709. this.setState({
  1710. outsourceRemarks: e.target.value
  1711. });
  1712. }}
  1713. placeholder="请输入备注"
  1714. />
  1715. </FormItem>
  1716. </div>
  1717. <p
  1718. className="tip"
  1719. style={{
  1720. paddingBottom: "12px",
  1721. width: "240px",
  1722. marginLeft: "145px"
  1723. }}
  1724. >
  1725. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  1726. </p>
  1727. <div className="clearfix">
  1728. <FormItem
  1729. labelCol={{ span: 4 }}
  1730. wrapperCol={{ span: 18 }}
  1731. label={
  1732. <span>
  1733. <strong style={{ color: "#f00" }}>*</strong>
  1734. 合同/协议扫描件
  1735. <span style={{ color: "#f00" }}>(外包合同)</span>
  1736. </span>
  1737. }
  1738. >
  1739. <PicturesWall
  1740. fileList={this.getOrgCodeUrl}
  1741. pictureUrl={this.state.pictureUrl}
  1742. />
  1743. <p>请上传与外包公司签订的合同协议</p>
  1744. <p>图片建议:要清晰。</p>
  1745. </FormItem>
  1746. </div>
  1747. <div className="clearfix">
  1748. <div
  1749. style={{ display: "inline-black", textAlign: "center" }}
  1750. >
  1751. <Button type="primary" onClick={this.sureOut}>
  1752. 确认发起外包,不通过总部
  1753. </Button>
  1754. <p className="tip">提示:高于总部价格,费用个人承担</p>
  1755. </div>
  1756. </div>
  1757. </TabPane>
  1758. </Tabs>
  1759. </Modal>
  1760. <Modal
  1761. maskClosable={false}
  1762. visible={this.state.addnextVisible}
  1763. onOk={this.nextCancel}
  1764. onCancel={this.nextCancel}
  1765. confirmLoading={this.state.confirmLoading}
  1766. width="800px"
  1767. title={"项目任务详情"}
  1768. footer=""
  1769. className="admin-desc-content"
  1770. >
  1771. <Form layout="horizontal" id="demand-form">
  1772. <Spin spinning={this.state.loading}>
  1773. <div className="clearfix">
  1774. <FormItem
  1775. className="half-item"
  1776. {...formItemLayout}
  1777. label="项目名称"
  1778. >
  1779. <span>{this.state.commodityName}</span>
  1780. </FormItem>
  1781. <FormItem
  1782. className="half-item"
  1783. {...formItemLayout}
  1784. label="项目数量"
  1785. >
  1786. <span>{this.state.commodityQuantity}</span>
  1787. </FormItem>
  1788. <FormItem
  1789. className="half-item"
  1790. {...formItemLayout}
  1791. label="金额(万元)"
  1792. >
  1793. <span>{this.state.commodityPrice}</span>
  1794. </FormItem>
  1795. <FormItem
  1796. className="half-item"
  1797. {...formItemLayout}
  1798. label="主要项目"
  1799. >
  1800. <span>{getboutique(this.state.main)}</span>
  1801. </FormItem>
  1802. <div className="clearfix">
  1803. <FormItem
  1804. labelCol={{ span: 4 }}
  1805. wrapperCol={{ span: 16 }}
  1806. label="服务说明"
  1807. >
  1808. <span>{this.state.taskComment}</span>
  1809. </FormItem>
  1810. </div>
  1811. </div>
  1812. </Spin>
  1813. </Form>
  1814. </Modal>
  1815. <Modal
  1816. maskClosable={false}
  1817. visible={this.state.noVisible}
  1818. onOk={this.handleOk}
  1819. onCancel={this.noCancel}
  1820. width="400px"
  1821. title={"拒绝理由"}
  1822. footer=""
  1823. className="admin-desc-content"
  1824. confirmLoading={this.state.confirmLoading}
  1825. >
  1826. <Form layout="horizontal" id="demand-form">
  1827. <Spin spinning={this.state.loading}>
  1828. <div className="clearfix">
  1829. <FormItem
  1830. labelCol={{ span: 4 }}
  1831. wrapperCol={{ span: 16 }}
  1832. label="拒绝理由"
  1833. >
  1834. <Input
  1835. type="textarea"
  1836. placeholder="请输入拒绝理由"
  1837. rows={4}
  1838. value={this.state.reason}
  1839. onChange={e => {
  1840. this.setState({ reason: e.target.value });
  1841. }}
  1842. />
  1843. </FormItem>
  1844. </div>
  1845. <div className="clearfix">
  1846. <Button
  1847. className="cancel"
  1848. type="primary"
  1849. onClick={this.examOks}
  1850. style={{ marginLeft: "50px" }}
  1851. htmlType="submit"
  1852. loading={this.state.aloading}
  1853. >
  1854. 确定
  1855. </Button>
  1856. <Button
  1857. className="cancel"
  1858. type="ghost"
  1859. onClick={this.noCancel}
  1860. style={{ marginLeft: "50px" }}
  1861. >
  1862. 取消
  1863. </Button>
  1864. </div>
  1865. </Spin>
  1866. </Form>
  1867. </Modal>
  1868. {/* <Modal
  1869. visible={this.state.rizhivisible}
  1870. className="admin-desc-content"
  1871. width="800px"
  1872. maskClosable={false}
  1873. title="订单日志"
  1874. footer={null}
  1875. onCancel={this.closeOrderLog}
  1876. >
  1877. <div className="patent-table">
  1878. <Spin spinning={this.state.loading}>
  1879. <Table
  1880. columns={this.state.columnsrizhi}
  1881. dataSource={this.state.dataSourcerizhi}
  1882. pagination={false}
  1883. />
  1884. </Spin>
  1885. </div>
  1886. </Modal> */}
  1887. <OrderRiZi
  1888. dataSourcerizhi={this.state.dataSourcerizhi}
  1889. closeOrderLog={this.closeOrderLog}
  1890. visible={this.state.rizhivisible}
  1891. loading={this.state.loading}
  1892. />
  1893. </div>
  1894. </div>
  1895. );
  1896. }
  1897. })
  1898. );
  1899. export default IntentionCustomer;