examine.jsx 69 KB

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