examine.jsx 62 KB

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