examine.jsx 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848
  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. });
  733. $.ajax({
  734. method: "post",
  735. dataType: "json",
  736. crossDomain: false,
  737. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  738. data: {
  739. orderNo: this.state.orderNo,
  740. orderStatus: 2
  741. },
  742. success: function(data) {
  743. if (data.error.length || data.data.list == "") {
  744. if (data.error && data.error.length) {
  745. message.warning(data.error[0].message);
  746. this.setState({
  747. flag: false
  748. });
  749. }
  750. } else {
  751. message.success("该订单已通过审核~");
  752. this.setState({
  753. visible: false,
  754. flag: false
  755. });
  756. this.reset();
  757. }
  758. }.bind(this)
  759. }).always(
  760. function() {
  761. this.setState({
  762. loading: false
  763. });
  764. }.bind(this)
  765. );
  766. },
  767. //通过发给外包
  768. outsourcing() {
  769. if (this.state.flag) return;
  770. this.setState({
  771. flag: true
  772. });
  773. $.ajax({
  774. method: "post",
  775. dataType: "json",
  776. crossDomain: false,
  777. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  778. data: {
  779. orderNo: this.state.orderNo,
  780. orderStatus: 2,
  781. outsource: 1
  782. },
  783. success: function(data) {
  784. if (data.error.length || data.data.list == "") {
  785. if (data.error && data.error.length) {
  786. message.warning(data.error[0].message);
  787. this.setState({
  788. flag: false
  789. });
  790. }
  791. } else {
  792. message.success("该订单已通过审核~");
  793. this.setState({
  794. visible: false,
  795. flag: false
  796. });
  797. this.reset();
  798. }
  799. }.bind(this)
  800. }).always(
  801. function() {
  802. this.setState({
  803. loading: false
  804. });
  805. }.bind(this)
  806. );
  807. },
  808. //审核不通过
  809. examOks() {
  810. if (this.state.flag) return;
  811. this.setState({
  812. flag: true
  813. });
  814. this.setState({
  815. aloading: true
  816. });
  817. $.ajax({
  818. method: "post",
  819. dataType: "json",
  820. crossDomain: false,
  821. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  822. data: {
  823. orderNo: this.state.orderNo,
  824. orderStatus: 3,
  825. reason: this.state.reason
  826. },
  827. success: function(data) {
  828. if (data.error.length || data.data.list == "") {
  829. if (data.error && data.error.length) {
  830. message.warning(data.error[0].message);
  831. this.setState({
  832. aloading: true,
  833. flag: false
  834. });
  835. }
  836. } else {
  837. message.success("该订单已被拒绝~");
  838. this.setState({
  839. visible: false,
  840. aloading: false,
  841. noVisible: false,
  842. reason: "",
  843. flag: false
  844. });
  845. this.reset();
  846. }
  847. }.bind(this)
  848. }).always(
  849. function() {
  850. this.setState({
  851. loading: false
  852. });
  853. }.bind(this)
  854. );
  855. },
  856. //点击拒绝
  857. examNo() {
  858. this.setState({
  859. noVisible: true
  860. });
  861. },
  862. callback(key) {
  863. let url = window.location.href.substring(7);
  864. this.setState({
  865. activeKey: key
  866. });
  867. if (this.state.pictureUrl.length) {
  868. let picArr = [];
  869. this.state.pictureUrl.map(function(item) {
  870. if (
  871. item.response &&
  872. item.response.data &&
  873. item.response.data.length
  874. ) {
  875. picArr.push(item.response.data);
  876. }
  877. });
  878. }
  879. if (key === "2") {
  880. this.setState({
  881. loading: true
  882. });
  883. $.ajax({
  884. method: "get",
  885. dataType: "json",
  886. crossDomain: false,
  887. url:
  888. globalConfig.context +
  889. "/api/admin/outsourceOrg/orderOutsourceDtails",
  890. data: {
  891. orderNo: this.state.orderNo
  892. },
  893. success: function(data) {
  894. if (data.data) {
  895. let thisdata = data.data;
  896. this.setState({
  897. id: thisdata.id,
  898. createTimes: thisdata.createTimes,
  899. auditTimes: thisdata.auditTimes,
  900. remarks: thisdata.remarks,
  901. attachmentUrl: thisdata.attachmentUrl
  902. ? splitUrl(
  903. thisdata.attachmentUrl,
  904. ",",
  905. globalConfig.avatarHost + "/upload",
  906. url
  907. )
  908. : [],
  909. fileUrl: thisdata.attachmentUrl
  910. ? splitUrl(
  911. thisdata.attachmentUrl,
  912. ",",
  913. globalConfig.avatarHost + "/upload",
  914. url
  915. )
  916. : [],
  917. pictureUrl: thisdata.pictureUrl
  918. ? splitUrl(
  919. thisdata.pictureUrl,
  920. ",",
  921. globalConfig.avatarHost + "/upload",
  922. url
  923. )
  924. : [], //图片地址
  925. amount: thisdata.amount,
  926. companyName: thisdata.companyName,
  927. outsourceRemarks: thisdata.outsourceRemarks,
  928. unitNumber: thisdata.unitNumber,
  929. unitPrice: thisdata.unitPrice
  930. });
  931. }
  932. }.bind(this)
  933. }).always(
  934. function() {
  935. this.setState({
  936. loading: false
  937. });
  938. }.bind(this)
  939. );
  940. }
  941. },
  942. getUrl(url) {
  943. let theorgCodeUrl = [];
  944. if (url.length) {
  945. let picArr = [];
  946. url.map(function(item) {
  947. if (
  948. item.response &&
  949. item.response.data &&
  950. item.response.data.length
  951. ) {
  952. picArr.push(item.response.data);
  953. }
  954. });
  955. theorgCodeUrl = picArr.join(",");
  956. }
  957. return theorgCodeUrl;
  958. },
  959. sureOut() {
  960. if (!this.state.companyName) {
  961. message.warning("公司名称不能为空");
  962. return;
  963. }
  964. if (!this.state.unitPrice) {
  965. message.warning("单价不能为空");
  966. return;
  967. }
  968. if (moneyVerify(this.state.unitPrice)) {
  969. return;
  970. }
  971. if (!this.state.unitNumber) {
  972. message.warning("数量不能为空");
  973. return;
  974. }
  975. if (!this.state.amount) {
  976. message.warning("总金额不能为空");
  977. return;
  978. }
  979. if (moneyVerify(this.state.amount)) {
  980. return;
  981. }
  982. if (!this.state.outsourceRemarks) {
  983. message.warning("备注不能为空");
  984. return;
  985. }
  986. if (this.state.pictureUrl.length === 0) {
  987. message.warning("合同扫描件不能为空");
  988. return;
  989. }
  990. $.ajax({
  991. method: "POST",
  992. dataType: "json",
  993. crossDomain: false,
  994. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  995. data: {
  996. id: this.state.id,
  997. orderNo: this.state.orderNo,
  998. companyName: this.state.companyName,
  999. amount: this.state.amount,
  1000. outsourceRemarks: this.state.outsourceRemarks,
  1001. unitNumber: this.state.unitNumber,
  1002. unitPrice: this.state.unitPrice,
  1003. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  1004. ? this.getUrl(this.state.attachmentUrl)
  1005. : "",
  1006. orderStatus: 2,
  1007. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1008. ? this.getUrl(this.state.pictureUrl)
  1009. : ""
  1010. }
  1011. }).done(
  1012. function(data) {
  1013. this.setState({
  1014. loading: false
  1015. });
  1016. if (!data.error.length) {
  1017. message.success("发起成功!");
  1018. this.outReset();
  1019. this.visitCancel();
  1020. } else {
  1021. message.warning(data.error[0].message);
  1022. }
  1023. }.bind(this)
  1024. );
  1025. },
  1026. //关闭输入理由框
  1027. noCancel() {
  1028. this.setState({
  1029. noVisible: false,
  1030. aloading: false,
  1031. reason: ""
  1032. });
  1033. },
  1034. //搜索
  1035. search() {
  1036. this.setState({
  1037. //signBillVisible:false
  1038. });
  1039. this.loadData();
  1040. },
  1041. //重置
  1042. reset() {
  1043. this.setState({
  1044. signBillVisible: false
  1045. });
  1046. this.state.orderNo = "";
  1047. this.state.customerName = "";
  1048. this.state.releaseDate[0] = undefined;
  1049. this.state.releaseDate[1] = undefined;
  1050. this.state.approval = undefined;
  1051. this.loadData(1);
  1052. },
  1053. outReset() {
  1054. this.setState({
  1055. companyName: "",
  1056. amount: "",
  1057. unitPrice: "",
  1058. unitNumber: "",
  1059. outsourceRemarks: "",
  1060. attachmentUrl: [],
  1061. pictureUrl: []
  1062. });
  1063. },
  1064. resets() {
  1065. this.state.orderNo = "";
  1066. this.state.customerName = "";
  1067. this.state.releaseDate[0] = undefined;
  1068. this.state.releaseDate[1] = undefined;
  1069. },
  1070. getOrgCodeUrl(e) {
  1071. this.setState({ pictureUrl: e });
  1072. },
  1073. //关闭详情
  1074. visitCancel() {
  1075. this.setState(
  1076. {
  1077. visible: false
  1078. },
  1079. () => {
  1080. this.setState({
  1081. activeKey: "1"
  1082. });
  1083. }
  1084. );
  1085. this.resets();
  1086. this.loadData();
  1087. },
  1088. visitOk() {
  1089. this.setState({
  1090. visible: false
  1091. });
  1092. this.resets();
  1093. },
  1094. render() {
  1095. const formItemLayout = {
  1096. labelCol: { span: 8 },
  1097. wrapperCol: { span: 14 }
  1098. };
  1099. const FormItem = Form.Item;
  1100. const { TabPane } = Tabs;
  1101. const { TextArea } = Input;
  1102. const { RangePicker } = DatePicker;
  1103. const cuiDataList = this.state.contactList || [];
  1104. return (
  1105. <div className="user-content">
  1106. <ShowModalDiv ShowModal={this.state.showModal} />
  1107. <div className="content-title">
  1108. <span>订单审核</span>
  1109. </div>
  1110. <div className="user-search">
  1111. <Input
  1112. placeholder="客户名称"
  1113. style={{ width: "150px", marginBottom: "10px" }}
  1114. value={this.state.customerName}
  1115. onChange={e => {
  1116. this.setState({ customerName: e.target.value });
  1117. }}
  1118. />
  1119. <Input
  1120. placeholder="订单编号"
  1121. style={{ width: "150px" }}
  1122. value={this.state.orderNoSearch}
  1123. onChange={e => {
  1124. this.setState({ orderNoSearch: e.target.value });
  1125. }}
  1126. />
  1127. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1128. <RangePicker
  1129. value={[
  1130. this.state.releaseDate[0]
  1131. ? moment(this.state.releaseDate[0])
  1132. : null,
  1133. this.state.releaseDate[1]
  1134. ? moment(this.state.releaseDate[1])
  1135. : null
  1136. ]}
  1137. onChange={(data, dataString) => {
  1138. this.setState({ releaseDate: dataString });
  1139. }}
  1140. />
  1141. <Button
  1142. type="primary"
  1143. onClick={this.search}
  1144. style={{ marginLeft: "10px" }}
  1145. >
  1146. 搜索
  1147. </Button>
  1148. <Button onClick={this.reset}>重置</Button>
  1149. <div className="patent-table">
  1150. <Spin spinning={this.state.loading}>
  1151. <Table
  1152. columns={this.state.columns}
  1153. dataSource={this.state.dataSource}
  1154. pagination={this.state.pagination}
  1155. onRowClick={this.tableRowClick}
  1156. bordered
  1157. size="small"
  1158. />
  1159. </Spin>
  1160. </div>
  1161. <Modal
  1162. className="customeDetails"
  1163. footer=""
  1164. width="900px"
  1165. visible={this.state.visible}
  1166. onOk={this.visitOk}
  1167. onCancel={this.visitCancel}
  1168. >
  1169. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1170. <TabPane tab="订单详情" key="1">
  1171. <Form
  1172. layout="horizontal"
  1173. onSubmit={this.handleSubmit}
  1174. id="demand-form"
  1175. style={{ paddingBottom: "40px" }}
  1176. >
  1177. <Spin spinning={this.state.loading}>
  1178. <div className="clearfix">
  1179. <FormItem
  1180. className="half-item"
  1181. {...formItemLayout}
  1182. label="订单编号"
  1183. >
  1184. <span>{this.state.orderNo}</span>
  1185. </FormItem>
  1186. <FormItem
  1187. className="half-item"
  1188. {...formItemLayout}
  1189. label="合同编号"
  1190. >
  1191. <span>{this.state.contractNo}</span>
  1192. </FormItem>
  1193. <FormItem
  1194. className="half-item"
  1195. {...formItemLayout}
  1196. label="客户名称"
  1197. >
  1198. <span>{this.state.userName}</span>
  1199. </FormItem>
  1200. <FormItem
  1201. className="half-item"
  1202. {...formItemLayout}
  1203. label="合同签订时间"
  1204. >
  1205. <span>{this.state.signDate}</span>
  1206. </FormItem>
  1207. <FormItem
  1208. className="half-item"
  1209. {...formItemLayout}
  1210. label="流程状态"
  1211. >
  1212. <span>
  1213. {getProcessStatus(this.state.processStatus)}
  1214. </span>
  1215. </FormItem>
  1216. <FormItem
  1217. className="half-item"
  1218. {...formItemLayout}
  1219. label="结算状态"
  1220. >
  1221. <span>
  1222. {getLiquidationStatus(this.state.liquidationStatus)}
  1223. </span>
  1224. </FormItem>
  1225. <FormItem
  1226. className="half-item"
  1227. {...formItemLayout}
  1228. label="企业联系人"
  1229. >
  1230. <span>{this.state.contacts}</span>
  1231. </FormItem>
  1232. <FormItem
  1233. className="half-item"
  1234. {...formItemLayout}
  1235. label="联系人电话"
  1236. >
  1237. <span>{this.state.contactMobile}</span>
  1238. </FormItem>
  1239. <FormItem
  1240. className="half-item"
  1241. {...formItemLayout}
  1242. label="企业法人"
  1243. >
  1244. <span>{this.state.legalPerson}</span>
  1245. </FormItem>
  1246. <FormItem
  1247. className="half-item"
  1248. {...formItemLayout}
  1249. label="法人电话"
  1250. >
  1251. <span>{this.state.legalPersonTel}</span>
  1252. </FormItem>
  1253. <FormItem
  1254. className="half-item"
  1255. {...formItemLayout}
  1256. label="签单金额(万元)"
  1257. >
  1258. <span>{this.state.totalAmount}</span>
  1259. </FormItem>
  1260. <FormItem
  1261. className="half-item"
  1262. {...formItemLayout}
  1263. label="首付金额(万元)"
  1264. >
  1265. <span>{this.state.firstAmount}</span>
  1266. </FormItem>
  1267. <FormItem
  1268. className="half-item"
  1269. {...formItemLayout}
  1270. label="特批立项"
  1271. >
  1272. <span>{getApprovedState(this.state.approval)}</span>
  1273. </FormItem>
  1274. <FormItem
  1275. className="half-item"
  1276. {...formItemLayout}
  1277. label="已收款项(万元)"
  1278. >
  1279. <span>{this.state.settlementAmount}</span>
  1280. </FormItem>
  1281. <FormItem
  1282. className="half-item"
  1283. {...formItemLayout}
  1284. label="订单部门"
  1285. >
  1286. <span>{this.state.depName}</span>
  1287. </FormItem>
  1288. <FormItem
  1289. className="half-item"
  1290. {...formItemLayout}
  1291. label="是否外包"
  1292. >
  1293. {this.state.outsource}
  1294. </FormItem>
  1295. <div className="clearfix">
  1296. <FormItem
  1297. labelCol={{ span: 4 }}
  1298. wrapperCol={{ span: 16 }}
  1299. label="订单留言"
  1300. >
  1301. <p style={{ width: 500, wordWrap: "break-word" }}>
  1302. {this.state.orderRemarks}
  1303. </p>
  1304. </FormItem>
  1305. </div>
  1306. <div className="clearfix">
  1307. <FormItem
  1308. labelCol={{ span: 4 }}
  1309. wrapperCol={{ span: 18 }}
  1310. label="合同扫描件"
  1311. >
  1312. <Upload
  1313. className="demandDetailShow-upload"
  1314. listType="picture-card"
  1315. fileList={this.state.orgCodeUrl}
  1316. onPreview={file => {
  1317. this.setState({
  1318. previewImage: file.url || file.thumbUrl,
  1319. previewVisible: true
  1320. });
  1321. }}
  1322. ></Upload>
  1323. <Modal
  1324. maskClosable={false}
  1325. footer={null}
  1326. visible={this.state.previewVisible}
  1327. onCancel={() => {
  1328. this.setState({ previewVisible: false });
  1329. }}
  1330. >
  1331. <img
  1332. alt=""
  1333. style={{ width: "100%" }}
  1334. src={this.state.previewImage || ""}
  1335. />
  1336. </Modal>
  1337. <Button
  1338. style={{
  1339. float: "right",
  1340. marginRight: "140px",
  1341. marginTop: "20px"
  1342. }}
  1343. onClick={this.getOrderLog}
  1344. >
  1345. 查看订单日志
  1346. </Button>
  1347. </FormItem>
  1348. </div>
  1349. <div className="clearfix">
  1350. <FormItem
  1351. className="half-item"
  1352. {...formItemLayout}
  1353. label="订单负责人"
  1354. >
  1355. <span>{this.state.salesmanName}</span>
  1356. </FormItem>
  1357. <FormItem
  1358. className="half-item"
  1359. {...formItemLayout}
  1360. label="订单负责人电话"
  1361. >
  1362. <span>{this.state.salesmanMobile}</span>
  1363. </FormItem>
  1364. </div>
  1365. <div className="clearfix">
  1366. <FormItem
  1367. className="half-item"
  1368. {...formItemLayout}
  1369. label="当前财务负责人"
  1370. >
  1371. <span>{this.state.nowFinance}</span>
  1372. </FormItem>
  1373. <FormItem
  1374. className="half-item"
  1375. {...formItemLayout}
  1376. label="当前财务负责人电话"
  1377. >
  1378. <span>{this.state.nowFinanceMobile}</span>
  1379. </FormItem>
  1380. </div>
  1381. <div className="clearfix">
  1382. <FormItem
  1383. className="half-item"
  1384. {...formItemLayout}
  1385. style={{ opacity: ".5" }}
  1386. label="原订单负责人"
  1387. >
  1388. <span>{this.state.oldSalesmanName}</span>
  1389. </FormItem>
  1390. <FormItem
  1391. className="half-item"
  1392. {...formItemLayout}
  1393. style={{ opacity: ".5" }}
  1394. label="原订单负责人电话"
  1395. >
  1396. <span>{this.state.oldSalesmanMobile}</span>
  1397. </FormItem>
  1398. </div>
  1399. <div className="clearfix">
  1400. <FormItem
  1401. className="half-item"
  1402. style={{ opacity: ".5" }}
  1403. {...formItemLayout}
  1404. label="实际财务操作人"
  1405. >
  1406. <span>{this.state.financeName}</span>
  1407. </FormItem>
  1408. <FormItem
  1409. className="half-item"
  1410. {...formItemLayout}
  1411. style={{ opacity: ".5" }}
  1412. label="实际财务操作人电话"
  1413. >
  1414. <span>{this.state.financeMobile}</span>
  1415. </FormItem>
  1416. </div>
  1417. <div>
  1418. <span
  1419. style={{ marginLeft: "50px", fontSize: "20px" }}
  1420. >
  1421. 催款节点
  1422. </span>
  1423. {this.state.processStatus == 0 ? (
  1424. <Button
  1425. type="primary"
  1426. onClick={this.addcontact}
  1427. style={{
  1428. float: "right",
  1429. marginRight: "50px",
  1430. marginBottom: "15px"
  1431. }}
  1432. >
  1433. 添加催款节点
  1434. </Button>
  1435. ) : (
  1436. ""
  1437. )}
  1438. </div>
  1439. <div className="clearfix">
  1440. <Spin spinning={this.state.loading}>
  1441. <Form layout="horizontal" id="demand-form">
  1442. <Table
  1443. pagination={false}
  1444. columns={
  1445. cuiDataList.length
  1446. ? this.state.ContactsLists
  1447. : this.state.ContactsListsNew
  1448. }
  1449. dataSource={
  1450. cuiDataList.length
  1451. ? this.state.contactList
  1452. : this.state.contactListNew
  1453. }
  1454. />
  1455. <Col
  1456. span={24}
  1457. offset={9}
  1458. style={{ marginTop: "15px" }}
  1459. ></Col>
  1460. </Form>
  1461. </Spin>
  1462. </div>
  1463. <div>
  1464. <span
  1465. style={{ marginLeft: "50px", fontSize: "20px" }}
  1466. >
  1467. 项目业务
  1468. </span>
  1469. {this.state.processStatus == 0 ? (
  1470. <Button
  1471. type="primary"
  1472. onClick={this.addDetailed}
  1473. style={{
  1474. float: "right",
  1475. marginRight: "50px",
  1476. marginBottom: "15px"
  1477. }}
  1478. >
  1479. 添加项目明细
  1480. </Button>
  1481. ) : (
  1482. ""
  1483. )}
  1484. </div>
  1485. <div className="patent-table">
  1486. <Spin spinning={this.state.loading}>
  1487. <Table
  1488. columns={this.state.columnsX}
  1489. dataSource={this.state.dataSourceX}
  1490. pagination={this.state.paginations}
  1491. onRowClick={this.tableRowClickX}
  1492. />
  1493. </Spin>
  1494. </div>
  1495. <div className="addSave" style={{ marginTop: "15px" }}>
  1496. <Button
  1497. type="primary"
  1498. onClick={this.examOk}
  1499. style={{ marginLeft: "200px" }}
  1500. htmlType="submit"
  1501. >
  1502. 通过
  1503. </Button>
  1504. <Button
  1505. type="primary"
  1506. onClick={this.examNo}
  1507. style={{ marginLeft: "50px" }}
  1508. htmlType="submit"
  1509. >
  1510. 驳回
  1511. </Button>
  1512. <Button
  1513. type="ghost"
  1514. onClick={this.visitCancel}
  1515. style={{ marginLeft: "50px" }}
  1516. >
  1517. 取消
  1518. </Button>
  1519. {/*<Button className='warn-button' type="primary" onClick={this.outsourcing} style={{marginLeft:"50px"}}>通过不走总部</Button>
  1520. <p className='hint'>提示:高于总部价格,费用个人承担!</p>*/}
  1521. </div>
  1522. </div>
  1523. </Spin>
  1524. </Form>
  1525. </TabPane>
  1526. <TabPane tab="外包(不走总部)" key="2">
  1527. <div className="clearfix">
  1528. <FormItem
  1529. className="half-item"
  1530. {...formItemLayout}
  1531. label={
  1532. <span>
  1533. <strong style={{ color: "#f00" }}>*</strong>外包公司
  1534. </span>
  1535. }
  1536. >
  1537. <Input
  1538. value={this.state.companyName}
  1539. onChange={e => {
  1540. this.setState({
  1541. companyName: e.target.value
  1542. });
  1543. }}
  1544. placeholder="请填写外包公司名称"
  1545. />
  1546. </FormItem>
  1547. <span className="tip">如多个公司,请用间隔</span>
  1548. </div>
  1549. <div className="clearfix">
  1550. <FormItem
  1551. className="half-item"
  1552. {...formItemLayout}
  1553. label={
  1554. <span>
  1555. <strong style={{ color: "#f00" }}>*</strong>单价(万元)
  1556. </span>
  1557. }
  1558. >
  1559. <Input
  1560. value={this.state.unitPrice}
  1561. onChange={e => {
  1562. this.setState({
  1563. unitPrice: e.target.value
  1564. });
  1565. }}
  1566. placeholder="请填写单价"
  1567. />
  1568. </FormItem>
  1569. </div>
  1570. <div className="clearfix">
  1571. <FormItem
  1572. className="half-item"
  1573. {...formItemLayout}
  1574. label={
  1575. <span>
  1576. <strong style={{ color: "#f00" }}>*</strong>数量(个)
  1577. </span>
  1578. }
  1579. >
  1580. <Input
  1581. value={this.state.unitNumber}
  1582. onChange={e => {
  1583. this.setState({
  1584. unitNumber: e.target.value
  1585. });
  1586. }}
  1587. placeholder="请填写数量"
  1588. />
  1589. </FormItem>
  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. 总金额(万元)
  1599. </span>
  1600. }
  1601. >
  1602. <Input
  1603. value={this.state.amount}
  1604. onChange={e => {
  1605. this.setState({
  1606. amount: e.target.value
  1607. });
  1608. }}
  1609. placeholder="请填写本次外包公司的价格"
  1610. />
  1611. </FormItem>
  1612. </div>
  1613. {/*<div className="clearfix">
  1614. <FormItem className="half-item"
  1615. {...formItemLayout}
  1616. label="上传协议文件" style={{height:"auto"}}>
  1617. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1618. data={(e)=>{
  1619. return {
  1620. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1621. }
  1622. }}
  1623. fileList={this.state.attachmentUrl}
  1624. onChange={(e)=>{
  1625. this.setState({attachmentUrl:e.fileList})
  1626. }}>
  1627. {this.state.attachmentUrl.length>1?null:<Button>
  1628. <Icon type="upload" /> 点击上传
  1629. </Button>}
  1630. </Upload>
  1631. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  1632. </FormItem>
  1633. </div>*/}
  1634. <div className="clearfix">
  1635. <FormItem
  1636. className="half-item"
  1637. style={{ height: "auto" }}
  1638. {...formItemLayout}
  1639. label={
  1640. <span>
  1641. <strong style={{ color: "#f00" }}>*</strong>备注
  1642. </span>
  1643. }
  1644. >
  1645. <TextArea
  1646. rows={4}
  1647. value={this.state.outsourceRemarks}
  1648. onChange={e => {
  1649. this.setState({
  1650. outsourceRemarks: e.target.value
  1651. });
  1652. }}
  1653. placeholder="请输入备注"
  1654. />
  1655. </FormItem>
  1656. </div>
  1657. <p
  1658. className="tip"
  1659. style={{
  1660. paddingBottom: "12px",
  1661. width: "240px",
  1662. marginLeft: "145px"
  1663. }}
  1664. >
  1665. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  1666. </p>
  1667. <div className="clearfix">
  1668. <FormItem
  1669. labelCol={{ span: 4 }}
  1670. wrapperCol={{ span: 18 }}
  1671. label={
  1672. <span>
  1673. <strong style={{ color: "#f00" }}>*</strong>
  1674. 合同/协议扫描件
  1675. <span style={{ color: "#f00" }}>(外包合同)</span>
  1676. </span>
  1677. }
  1678. >
  1679. <PicturesWall
  1680. fileList={this.getOrgCodeUrl}
  1681. pictureUrl={this.state.pictureUrl}
  1682. />
  1683. <p>请上传与外包公司签订的合同协议</p>
  1684. <p>图片建议:要清晰。</p>
  1685. </FormItem>
  1686. </div>
  1687. <div className="clearfix">
  1688. <div
  1689. style={{ display: "inline-black", textAlign: "center" }}
  1690. >
  1691. <Button type="primary" onClick={this.sureOut}>
  1692. 确认发起外包,不通过总部
  1693. </Button>
  1694. <p className="tip">提示:高于总部价格,费用个人承担</p>
  1695. </div>
  1696. </div>
  1697. </TabPane>
  1698. </Tabs>
  1699. </Modal>
  1700. <Modal
  1701. maskClosable={false}
  1702. visible={this.state.addnextVisible}
  1703. onOk={this.nextCancel}
  1704. onCancel={this.nextCancel}
  1705. confirmLoading={this.state.confirmLoading}
  1706. width="800px"
  1707. title={"项目任务详情"}
  1708. footer=""
  1709. className="admin-desc-content"
  1710. >
  1711. <Form layout="horizontal" id="demand-form">
  1712. <Spin spinning={this.state.loading}>
  1713. <div className="clearfix">
  1714. <FormItem
  1715. className="half-item"
  1716. {...formItemLayout}
  1717. label="项目名称"
  1718. >
  1719. <span>{this.state.commodityName}</span>
  1720. </FormItem>
  1721. <FormItem
  1722. className="half-item"
  1723. {...formItemLayout}
  1724. label="项目数量"
  1725. >
  1726. <span>{this.state.commodityQuantity}</span>
  1727. </FormItem>
  1728. <FormItem
  1729. className="half-item"
  1730. {...formItemLayout}
  1731. label="金额(万元)"
  1732. >
  1733. <span>{this.state.commodityPrice}</span>
  1734. </FormItem>
  1735. <FormItem
  1736. className="half-item"
  1737. {...formItemLayout}
  1738. label="主要项目"
  1739. >
  1740. <span>{getboutique(this.state.main)}</span>
  1741. </FormItem>
  1742. <div className="clearfix">
  1743. <FormItem
  1744. labelCol={{ span: 4 }}
  1745. wrapperCol={{ span: 16 }}
  1746. label="服务说明"
  1747. >
  1748. <span>{this.state.taskComment}</span>
  1749. </FormItem>
  1750. </div>
  1751. </div>
  1752. </Spin>
  1753. </Form>
  1754. </Modal>
  1755. <Modal
  1756. maskClosable={false}
  1757. visible={this.state.noVisible}
  1758. onOk={this.handleOk}
  1759. onCancel={this.noCancel}
  1760. width="400px"
  1761. title={"拒绝理由"}
  1762. footer=""
  1763. className="admin-desc-content"
  1764. confirmLoading={this.state.confirmLoading}
  1765. >
  1766. <Form layout="horizontal" id="demand-form">
  1767. <Spin spinning={this.state.loading}>
  1768. <div className="clearfix">
  1769. <FormItem
  1770. labelCol={{ span: 4 }}
  1771. wrapperCol={{ span: 16 }}
  1772. label="拒绝理由"
  1773. >
  1774. <Input
  1775. type="textarea"
  1776. placeholder="请输入拒绝理由"
  1777. rows={4}
  1778. value={this.state.reason}
  1779. onChange={e => {
  1780. this.setState({ reason: e.target.value });
  1781. }}
  1782. />
  1783. </FormItem>
  1784. </div>
  1785. <div className="clearfix">
  1786. <Button
  1787. className="cancel"
  1788. type="primary"
  1789. onClick={this.examOks}
  1790. style={{ marginLeft: "50px" }}
  1791. htmlType="submit"
  1792. loading={this.state.aloading}
  1793. >
  1794. 确定
  1795. </Button>
  1796. <Button
  1797. className="cancel"
  1798. type="ghost"
  1799. onClick={this.noCancel}
  1800. style={{ marginLeft: "50px" }}
  1801. >
  1802. 取消
  1803. </Button>
  1804. </div>
  1805. </Spin>
  1806. </Form>
  1807. </Modal>
  1808. {/* <Modal
  1809. visible={this.state.rizhivisible}
  1810. className="admin-desc-content"
  1811. width="800px"
  1812. maskClosable={false}
  1813. title="订单日志"
  1814. footer={null}
  1815. onCancel={this.closeOrderLog}
  1816. >
  1817. <div className="patent-table">
  1818. <Spin spinning={this.state.loading}>
  1819. <Table
  1820. columns={this.state.columnsrizhi}
  1821. dataSource={this.state.dataSourcerizhi}
  1822. pagination={false}
  1823. />
  1824. </Spin>
  1825. </div>
  1826. </Modal> */}
  1827. <OrderRiZi
  1828. dataSourcerizhi={this.state.dataSourcerizhi}
  1829. closeOrderLog={this.closeOrderLog}
  1830. visible={this.state.rizhivisible}
  1831. loading={this.state.loading}
  1832. />
  1833. </div>
  1834. </div>
  1835. );
  1836. }
  1837. })
  1838. );
  1839. export default IntentionCustomer;