examine.jsx 61 KB

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