examine.jsx 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087
  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. if (this.state.flag) return;
  880. this.setState({
  881. flag: true
  882. });
  883. this.setState({
  884. aloading: true
  885. });
  886. $.ajax({
  887. method: "post",
  888. dataType: "json",
  889. crossDomain: false,
  890. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  891. data: {
  892. orderNo: this.state.orderNo,
  893. orderStatus: 3,
  894. reason: this.state.reason
  895. },
  896. success: function(data) {
  897. if (data.error.length || data.data.list == "") {
  898. if (data.error && data.error.length) {
  899. message.warning(data.error[0].message);
  900. this.setState({
  901. aloading: true,
  902. flag: false
  903. });
  904. }
  905. } else {
  906. message.success("该订单已被拒绝~");
  907. this.setState({
  908. visible: false,
  909. aloading: false,
  910. noVisible: false,
  911. reason: "",
  912. flag: false
  913. });
  914. this.reset();
  915. }
  916. }.bind(this)
  917. }).always(
  918. function() {
  919. this.setState({
  920. loading: false
  921. });
  922. }.bind(this)
  923. );
  924. },
  925. //点击拒绝
  926. examNo() {
  927. this.setState({
  928. noVisible: true
  929. });
  930. },
  931. callback(key) {
  932. let url = window.location.href.substring(7);
  933. this.setState({
  934. activeKey: key
  935. });
  936. if (this.state.pictureUrl.length) {
  937. let picArr = [];
  938. this.state.pictureUrl.map(function(item) {
  939. if (
  940. item.response &&
  941. item.response.data &&
  942. item.response.data.length
  943. ) {
  944. picArr.push(item.response.data);
  945. }
  946. });
  947. }
  948. if (key === "2") {
  949. this.setState({
  950. loading: true
  951. });
  952. $.ajax({
  953. method: "get",
  954. dataType: "json",
  955. crossDomain: false,
  956. url:
  957. globalConfig.context +
  958. "/api/admin/outsourceOrg/orderOutsourceDtails",
  959. data: {
  960. orderNo: this.state.orderNo
  961. },
  962. success: function(data) {
  963. if (data.data) {
  964. let thisdata = data.data;
  965. this.setState({
  966. id: thisdata.id,
  967. createTimes: thisdata.createTimes,
  968. auditTimes: thisdata.auditTimes,
  969. remarks: thisdata.remarks,
  970. attachmentUrl: thisdata.attachmentUrl
  971. ? splitUrl(
  972. thisdata.attachmentUrl,
  973. ",",
  974. globalConfig.avatarHost + "/upload",
  975. url
  976. )
  977. : [],
  978. fileUrl: thisdata.attachmentUrl
  979. ? splitUrl(
  980. thisdata.attachmentUrl,
  981. ",",
  982. globalConfig.avatarHost + "/upload",
  983. url
  984. )
  985. : [],
  986. pictureUrl: thisdata.pictureUrl
  987. ? splitUrl(
  988. thisdata.pictureUrl,
  989. ",",
  990. globalConfig.avatarHost + "/upload",
  991. url
  992. )
  993. : [], //图片地址
  994. amount: thisdata.amount,
  995. companyName: thisdata.companyName,
  996. outsourceRemarks: thisdata.outsourceRemarks,
  997. unitNumber: thisdata.unitNumber,
  998. unitPrice: thisdata.unitPrice
  999. });
  1000. }
  1001. }.bind(this)
  1002. }).always(
  1003. function() {
  1004. this.setState({
  1005. loading: false
  1006. });
  1007. }.bind(this)
  1008. );
  1009. }
  1010. },
  1011. getUrl(url) {
  1012. let theorgCodeUrl = [];
  1013. if (url.length) {
  1014. let picArr = [];
  1015. url.map(function(item) {
  1016. if (
  1017. item.response &&
  1018. item.response.data &&
  1019. item.response.data.length
  1020. ) {
  1021. picArr.push(item.response.data);
  1022. }
  1023. });
  1024. theorgCodeUrl = picArr.join(",");
  1025. }
  1026. return theorgCodeUrl;
  1027. },
  1028. sureOut() {
  1029. this.setState({
  1030. loading: true
  1031. })
  1032. if (!this.state.companyName) {
  1033. message.warning("公司名称不能为空");
  1034. return;
  1035. }
  1036. if (!this.state.unitPrice) {
  1037. message.warning("单价不能为空");
  1038. return;
  1039. }
  1040. if (moneyVerify(this.state.unitPrice)) {
  1041. return;
  1042. }
  1043. if (!this.state.unitNumber) {
  1044. message.warning("数量不能为空");
  1045. return;
  1046. }
  1047. if (!this.state.amount) {
  1048. message.warning("总金额不能为空");
  1049. return;
  1050. }
  1051. if (moneyVerify(this.state.amount)) {
  1052. return;
  1053. }
  1054. if (!this.state.outsourceRemarks) {
  1055. message.warning("备注不能为空");
  1056. return;
  1057. }
  1058. if (this.state.pictureUrl.length === 0) {
  1059. message.warning("合同扫描件不能为空");
  1060. return;
  1061. }
  1062. $.ajax({
  1063. method: "POST",
  1064. dataType: "json",
  1065. crossDomain: false,
  1066. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  1067. data: {
  1068. id: this.state.id,
  1069. orderNo: this.state.orderNo,
  1070. companyName: this.state.companyName,
  1071. amount: this.state.amount,
  1072. outsourceRemarks: this.state.outsourceRemarks,
  1073. unitNumber: this.state.unitNumber,
  1074. unitPrice: this.state.unitPrice,
  1075. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  1076. ? this.getUrl(this.state.attachmentUrl)
  1077. : "",
  1078. orderStatus: 2,
  1079. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1080. ? this.getUrl(this.state.pictureUrl)
  1081. : ""
  1082. }
  1083. }).done(
  1084. function(data) {
  1085. this.setState({
  1086. loading: false
  1087. });
  1088. if (!data.error.length) {
  1089. message.success("发起成功!");
  1090. this.outReset();
  1091. this.visitCancel();
  1092. } else {
  1093. message.warning(data.error[0].message);
  1094. }
  1095. }.bind(this)
  1096. );
  1097. },
  1098. //关闭输入理由框
  1099. noCancel() {
  1100. this.setState({
  1101. noVisible: false,
  1102. aloading: false,
  1103. reason: ""
  1104. });
  1105. },
  1106. //搜索
  1107. search() {
  1108. this.setState({
  1109. //signBillVisible:false
  1110. });
  1111. this.loadData();
  1112. },
  1113. //重置
  1114. reset() {
  1115. this.setState({
  1116. signBillVisible: false
  1117. });
  1118. this.state.orderNo = "";
  1119. this.state.customerName = "";
  1120. this.state.releaseDate[0] = undefined;
  1121. this.state.releaseDate[1] = undefined;
  1122. this.state.approval = undefined;
  1123. this.state.approvalSearch = undefined;
  1124. this.state.amountStatus = undefined;
  1125. this.loadData(1);
  1126. },
  1127. outReset() {
  1128. this.setState({
  1129. companyName: "",
  1130. amount: "",
  1131. unitPrice: "",
  1132. unitNumber: "",
  1133. outsourceRemarks: "",
  1134. attachmentUrl: [],
  1135. pictureUrl: []
  1136. });
  1137. },
  1138. resets() {
  1139. this.state.orderNo = "";
  1140. this.state.customerName = "";
  1141. this.state.releaseDate[0] = undefined;
  1142. this.state.releaseDate[1] = undefined;
  1143. },
  1144. getOrgCodeUrl(e) {
  1145. this.setState({ pictureUrl: e });
  1146. },
  1147. //关闭详情
  1148. visitCancel() {
  1149. this.setState(
  1150. {
  1151. visible: false
  1152. },
  1153. () => {
  1154. this.setState({
  1155. activeKey: "1"
  1156. });
  1157. }
  1158. );
  1159. this.resets();
  1160. this.loadData();
  1161. },
  1162. visitOk() {
  1163. this.setState({
  1164. visible: false
  1165. });
  1166. this.resets();
  1167. },
  1168. showDeleteConfirm(fn) {
  1169. confirm({
  1170. title: <p style={{ fontSize: 16, fontWeight: 900 }}>注意</p>,
  1171. content: (
  1172. <p style={{ fontWeight: 900, color: "red" }}>
  1173. 当前订单为外包单,您确定修改为普通订单?
  1174. </p>
  1175. ),
  1176. okText: "确定",
  1177. okType: "danger",
  1178. cancelText: "取消",
  1179. onOk() {
  1180. fn();
  1181. },
  1182. onCancel() {}
  1183. });
  1184. },
  1185. render() {
  1186. const formItemLayout = {
  1187. labelCol: { span: 8 },
  1188. wrapperCol: { span: 14 }
  1189. };
  1190. const FormItem = Form.Item;
  1191. const { TabPane } = Tabs;
  1192. const { TextArea } = Input;
  1193. const { RangePicker } = DatePicker;
  1194. const cuiDataList = this.state.contactList || [];
  1195. return (
  1196. <div className="user-content">
  1197. {this.state.resVisible ? (
  1198. <ResolutionDetail
  1199. cancel={this.resCancel}
  1200. detail={this.state.resRecord}
  1201. visible={this.state.resVisible}
  1202. id={this.state.resRecord.orderNo}
  1203. />
  1204. ) : (
  1205. ""
  1206. )}
  1207. <ShowModalDiv ShowModal={this.state.showModal} />
  1208. <div className="content-title">
  1209. <span>订单审核</span>
  1210. </div>
  1211. <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
  1212. <TabPane tab="搜索" key="1">
  1213. <div className="user-search">
  1214. <Input
  1215. placeholder="客户名称"
  1216. style={{
  1217. width: "150px",
  1218. marginBottom: "10px",
  1219. marginLeft: 10
  1220. }}
  1221. value={this.state.customerName}
  1222. onChange={e => {
  1223. this.setState({ customerName: e.target.value });
  1224. }}
  1225. />
  1226. <Input
  1227. placeholder="订单编号"
  1228. style={{ width: "150px" }}
  1229. value={this.state.orderNoSearch}
  1230. onChange={e => {
  1231. this.setState({ orderNoSearch: e.target.value });
  1232. }}
  1233. />
  1234. <Select
  1235. style={{ width: 120 }}
  1236. placeholder="特批状态"
  1237. value={this.state.approvalSearch}
  1238. onChange={e => {
  1239. this.setState({
  1240. approvalSearch: e
  1241. });
  1242. }}
  1243. >
  1244. <Option value="0">非特批</Option>
  1245. <Option value="1">特批</Option>
  1246. </Select>
  1247. <Select
  1248. style={{ width: 120 }}
  1249. placeholder="签单金额"
  1250. value={this.state.amountStatus}
  1251. onChange={e => {
  1252. this.setState({
  1253. amountStatus: e
  1254. });
  1255. }}
  1256. >
  1257. <Option value="0">10万元以下</Option>
  1258. <Option value="1">10~20万元</Option>
  1259. <Option value="2">20~30万元</Option>
  1260. <Option value="3">30~40万元</Option>
  1261. <Option value="4">40万元以上</Option>
  1262. </Select>
  1263. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1264. <RangePicker
  1265. value={[
  1266. this.state.releaseDate[0]
  1267. ? moment(this.state.releaseDate[0])
  1268. : null,
  1269. this.state.releaseDate[1]
  1270. ? moment(this.state.releaseDate[1])
  1271. : null
  1272. ]}
  1273. onChange={(data, dataString) => {
  1274. this.setState({ releaseDate: dataString });
  1275. }}
  1276. />
  1277. <Button
  1278. type="primary"
  1279. onClick={this.search}
  1280. style={{ marginLeft: "10px" }}
  1281. >
  1282. 搜索
  1283. </Button>
  1284. <Button onClick={this.reset}>重置</Button>
  1285. </div>
  1286. </TabPane>
  1287. </Tabs>
  1288. <div className="patent-table">
  1289. <Spin spinning={this.state.loading}>
  1290. <Table
  1291. columns={this.state.columns}
  1292. dataSource={this.state.dataSource}
  1293. pagination={this.state.pagination}
  1294. onRowClick={this.tableRowClick}
  1295. bordered
  1296. size="small"
  1297. />
  1298. </Spin>
  1299. <Modal
  1300. className="customeDetails"
  1301. footer=""
  1302. width="900px"
  1303. visible={this.state.visible}
  1304. onOk={this.visitOk}
  1305. onCancel={this.visitCancel}
  1306. >
  1307. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1308. <TabPane tab="订单详情" key="1">
  1309. <Form
  1310. layout="horizontal"
  1311. onSubmit={this.handleSubmit}
  1312. id="demand-form"
  1313. style={{ paddingBottom: "40px" }}
  1314. >
  1315. <Spin spinning={this.state.loading}>
  1316. <div className="clearfix">
  1317. <FormItem
  1318. className="half-item"
  1319. {...formItemLayout}
  1320. label="订单编号"
  1321. >
  1322. <span>{this.state.orderNo}</span>
  1323. </FormItem>
  1324. <FormItem
  1325. className="half-item"
  1326. {...formItemLayout}
  1327. label="合同编号"
  1328. >
  1329. <span>{this.state.contractNo}</span>
  1330. </FormItem>
  1331. <FormItem
  1332. className="half-item"
  1333. {...formItemLayout}
  1334. label="客户名称"
  1335. >
  1336. <span>{this.state.userName}</span>
  1337. </FormItem>
  1338. <FormItem
  1339. className="half-item"
  1340. {...formItemLayout}
  1341. label="合同签订时间"
  1342. >
  1343. <span>{this.state.signDate}</span>
  1344. </FormItem>
  1345. <FormItem
  1346. className="half-item"
  1347. {...formItemLayout}
  1348. label="流程状态"
  1349. >
  1350. <span>
  1351. {getProcessStatus(this.state.processStatus)}
  1352. </span>
  1353. </FormItem>
  1354. <FormItem
  1355. className="half-item"
  1356. {...formItemLayout}
  1357. label="结算状态"
  1358. >
  1359. <span>
  1360. {getLiquidationStatus(this.state.liquidationStatus)}
  1361. </span>
  1362. </FormItem>
  1363. <FormItem
  1364. className="half-item"
  1365. {...formItemLayout}
  1366. label="企业联系人"
  1367. >
  1368. <span>{this.state.contacts}</span>
  1369. </FormItem>
  1370. <FormItem
  1371. className="half-item"
  1372. {...formItemLayout}
  1373. label="联系人电话"
  1374. >
  1375. <span>{this.state.contactMobile}</span>
  1376. </FormItem>
  1377. <FormItem
  1378. className="half-item"
  1379. {...formItemLayout}
  1380. label="企业法人"
  1381. >
  1382. <span>{this.state.legalPerson}</span>
  1383. </FormItem>
  1384. <FormItem
  1385. className="half-item"
  1386. {...formItemLayout}
  1387. label="法人电话"
  1388. >
  1389. <span>{this.state.legalPersonTel}</span>
  1390. </FormItem>
  1391. <FormItem
  1392. className="half-item"
  1393. {...formItemLayout}
  1394. label="签单金额(万元)"
  1395. >
  1396. <span>{this.state.totalAmount}</span>
  1397. </FormItem>
  1398. <FormItem
  1399. className="half-item"
  1400. {...formItemLayout}
  1401. label="首付金额(万元)"
  1402. >
  1403. <span>{this.state.firstAmount}</span>
  1404. </FormItem>
  1405. <FormItem
  1406. className="half-item"
  1407. {...formItemLayout}
  1408. label="特批立项"
  1409. >
  1410. <span>{getApprovedState(this.state.approval)}</span>
  1411. </FormItem>
  1412. <FormItem
  1413. className="half-item"
  1414. {...formItemLayout}
  1415. label="已收款项(万元)"
  1416. >
  1417. <span>{this.state.settlementAmount}</span>
  1418. </FormItem>
  1419. <FormItem
  1420. className="half-item"
  1421. {...formItemLayout}
  1422. label="订单部门"
  1423. >
  1424. <span>{this.state.depName}</span>
  1425. </FormItem>
  1426. <FormItem
  1427. className="half-item"
  1428. {...formItemLayout}
  1429. label="是否外包"
  1430. >
  1431. {this.state.outsource}
  1432. </FormItem>
  1433. <div className="clearfix">
  1434. <FormItem
  1435. labelCol={{ span: 4 }}
  1436. wrapperCol={{ span: 16 }}
  1437. label="订单留言"
  1438. >
  1439. <p style={{ width: 500, wordWrap: "break-word" }}>
  1440. {this.state.orderRemarks}
  1441. </p>
  1442. </FormItem>
  1443. </div>
  1444. <div className="clearfix">
  1445. <FormItem
  1446. labelCol={{ span: 4 }}
  1447. wrapperCol={{ span: 18 }}
  1448. label="合同扫描件"
  1449. >
  1450. <Upload
  1451. className="demandDetailShow-upload"
  1452. listType="picture-card"
  1453. fileList={this.state.orgCodeUrl}
  1454. onPreview={file => {
  1455. this.setState({
  1456. previewImage: file.url || file.thumbUrl,
  1457. previewVisible: true
  1458. });
  1459. }}
  1460. ></Upload>
  1461. <Modal
  1462. maskClosable={false}
  1463. footer={null}
  1464. visible={this.state.previewVisible}
  1465. onCancel={() => {
  1466. this.setState({ previewVisible: false });
  1467. }}
  1468. >
  1469. <img
  1470. alt=""
  1471. style={{ width: "100%" }}
  1472. src={this.state.previewImage || ""}
  1473. />
  1474. </Modal>
  1475. <Button
  1476. style={{
  1477. float: "right",
  1478. marginRight: "140px",
  1479. marginTop: "20px"
  1480. }}
  1481. onClick={this.getOrderLog}
  1482. >
  1483. 查看订单日志
  1484. </Button>
  1485. </FormItem>
  1486. </div>
  1487. <div className="clearfix">
  1488. <FormItem
  1489. className="half-item"
  1490. {...formItemLayout}
  1491. label="订单负责人"
  1492. >
  1493. <span>{this.state.salesmanName}</span>
  1494. </FormItem>
  1495. <FormItem
  1496. className="half-item"
  1497. {...formItemLayout}
  1498. label="订单负责人电话"
  1499. >
  1500. <span>{this.state.salesmanMobile}</span>
  1501. </FormItem>
  1502. </div>
  1503. <div className="clearfix">
  1504. <FormItem
  1505. className="half-item"
  1506. {...formItemLayout}
  1507. label="当前财务负责人"
  1508. >
  1509. <span>{this.state.nowFinance}</span>
  1510. </FormItem>
  1511. <FormItem
  1512. className="half-item"
  1513. {...formItemLayout}
  1514. label="当前财务负责人电话"
  1515. >
  1516. <span>{this.state.nowFinanceMobile}</span>
  1517. </FormItem>
  1518. </div>
  1519. <div className="clearfix">
  1520. <FormItem
  1521. className="half-item"
  1522. {...formItemLayout}
  1523. style={{ opacity: ".5" }}
  1524. label="原订单负责人"
  1525. >
  1526. <span>{this.state.oldSalesmanName}</span>
  1527. </FormItem>
  1528. <FormItem
  1529. className="half-item"
  1530. {...formItemLayout}
  1531. style={{ opacity: ".5" }}
  1532. label="原订单负责人电话"
  1533. >
  1534. <span>{this.state.oldSalesmanMobile}</span>
  1535. </FormItem>
  1536. </div>
  1537. <div className="clearfix">
  1538. <FormItem
  1539. className="half-item"
  1540. style={{ opacity: ".5" }}
  1541. {...formItemLayout}
  1542. label="实际财务操作人"
  1543. >
  1544. <span>{this.state.financeName}</span>
  1545. </FormItem>
  1546. <FormItem
  1547. className="half-item"
  1548. {...formItemLayout}
  1549. style={{ opacity: ".5" }}
  1550. label="实际财务操作人电话"
  1551. >
  1552. <span>{this.state.financeMobile}</span>
  1553. </FormItem>
  1554. </div>
  1555. <div>
  1556. <span
  1557. style={{ marginLeft: "50px", fontSize: "20px" }}
  1558. >
  1559. 项目业务
  1560. </span>
  1561. {this.state.processStatus == 0 ? (
  1562. <Button
  1563. type="primary"
  1564. onClick={this.addDetailed}
  1565. style={{
  1566. float: "right",
  1567. marginRight: "50px",
  1568. marginBottom: "15px"
  1569. }}
  1570. >
  1571. 添加项目明细
  1572. </Button>
  1573. ) : (
  1574. ""
  1575. )}
  1576. </div>
  1577. <div className="patent-table">
  1578. <Spin spinning={this.state.loading}>
  1579. <Table
  1580. columns={this.state.columnsX}
  1581. dataSource={this.state.dataSourceX}
  1582. pagination={this.state.paginations}
  1583. onRowClick={this.tableRowClickX}
  1584. bordered
  1585. size="small"
  1586. />
  1587. </Spin>
  1588. </div>
  1589. <div>
  1590. <span
  1591. style={{ marginLeft: "50px", fontSize: "20px" }}
  1592. >
  1593. 催款节点
  1594. </span>
  1595. <span
  1596. style={{
  1597. display: cuiDataList.length
  1598. ? "none"
  1599. : "inline-block",
  1600. marginLeft: 10,
  1601. color: "red"
  1602. }}
  1603. >
  1604. 金额总计(万元): {this.state.totalCui}
  1605. </span>
  1606. {this.state.processStatus == 0 ? (
  1607. <Button
  1608. type="primary"
  1609. onClick={this.addcontact}
  1610. style={{
  1611. float: "right",
  1612. marginRight: "50px",
  1613. marginBottom: "15px"
  1614. }}
  1615. >
  1616. 添加催款节点
  1617. </Button>
  1618. ) : (
  1619. ""
  1620. )}
  1621. </div>
  1622. <div className="clearfix">
  1623. <Spin spinning={this.state.loading}>
  1624. <Form layout="horizontal" id="demand-form">
  1625. <Table
  1626. pagination={false}
  1627. bordered
  1628. size="small"
  1629. columns={
  1630. cuiDataList.length
  1631. ? this.state.ContactsLists
  1632. : this.state.ContactsListsNew
  1633. }
  1634. dataSource={
  1635. cuiDataList.length
  1636. ? this.state.contactList
  1637. : this.state.contactListNew
  1638. }
  1639. />
  1640. <Col
  1641. span={24}
  1642. offset={9}
  1643. style={{ marginTop: "15px" }}
  1644. ></Col>
  1645. </Form>
  1646. </Spin>
  1647. </div>
  1648. <div className="addSave" style={{ marginTop: "15px" }}>
  1649. <Button
  1650. type="primary"
  1651. // onClick={this.examOk}
  1652. onClick={() => {
  1653. // if (this.state.outsource == "是") {
  1654. // this.showDeleteConfirm(this.examOk);
  1655. // } else {
  1656. // this.examOk();
  1657. // }
  1658. this.setState({
  1659. agreeVisible: true,
  1660. reason: ""
  1661. });
  1662. }}
  1663. style={{ marginLeft: "200px" }}
  1664. htmlType="submit"
  1665. >
  1666. 通过
  1667. </Button>
  1668. <Button
  1669. type="primary"
  1670. onClick={this.examNo}
  1671. style={{ marginLeft: "50px" }}
  1672. htmlType="submit"
  1673. >
  1674. 驳回
  1675. </Button>
  1676. <Button
  1677. type="ghost"
  1678. onClick={this.visitCancel}
  1679. style={{ marginLeft: "50px" }}
  1680. >
  1681. 取消
  1682. </Button>
  1683. {/*<Button className='warn-button' type="primary" onClick={this.outsourcing} style={{marginLeft:"50px"}}>通过不走总部</Button>
  1684. <p className='hint'>提示:高于总部价格,费用个人承担!</p>*/}
  1685. </div>
  1686. </div>
  1687. </Spin>
  1688. </Form>
  1689. </TabPane>
  1690. <TabPane tab="外包(不走总部)" key="2">
  1691. <Spin spinning={this.state.loading}>
  1692. <div className="clearfix">
  1693. <FormItem
  1694. className="half-item"
  1695. {...formItemLayout}
  1696. label={
  1697. <span>
  1698. <strong style={{ color: "#f00" }}>*</strong>外包公司
  1699. </span>
  1700. }
  1701. >
  1702. <Input
  1703. value={this.state.companyName}
  1704. onChange={e => {
  1705. this.setState({
  1706. companyName: e.target.value
  1707. });
  1708. }}
  1709. placeholder="请填写外包公司名称"
  1710. />
  1711. </FormItem>
  1712. <span className="tip">如多个公司,请用间隔</span>
  1713. </div>
  1714. <div className="clearfix">
  1715. <FormItem
  1716. className="half-item"
  1717. {...formItemLayout}
  1718. label={
  1719. <span>
  1720. <strong style={{ color: "#f00" }}>*</strong>
  1721. 单价(万元)
  1722. </span>
  1723. }
  1724. >
  1725. <Input
  1726. value={this.state.unitPrice}
  1727. onChange={e => {
  1728. this.setState({
  1729. unitPrice: e.target.value
  1730. });
  1731. }}
  1732. placeholder="请填写单价"
  1733. />
  1734. </FormItem>
  1735. </div>
  1736. <div className="clearfix">
  1737. <FormItem
  1738. className="half-item"
  1739. {...formItemLayout}
  1740. label={
  1741. <span>
  1742. <strong style={{ color: "#f00" }}>*</strong>数量(个)
  1743. </span>
  1744. }
  1745. >
  1746. <Input
  1747. value={this.state.unitNumber}
  1748. onChange={e => {
  1749. this.setState({
  1750. unitNumber: e.target.value
  1751. });
  1752. }}
  1753. placeholder="请填写数量"
  1754. />
  1755. </FormItem>
  1756. </div>
  1757. <div className="clearfix">
  1758. <FormItem
  1759. className="half-item"
  1760. {...formItemLayout}
  1761. label={
  1762. <span>
  1763. <strong style={{ color: "#f00" }}>*</strong>
  1764. 总金额(万元)
  1765. </span>
  1766. }
  1767. >
  1768. <Input
  1769. value={this.state.amount}
  1770. onChange={e => {
  1771. this.setState({
  1772. amount: e.target.value
  1773. });
  1774. }}
  1775. placeholder="请填写本次外包公司的价格"
  1776. />
  1777. </FormItem>
  1778. </div>
  1779. {/*<div className="clearfix">
  1780. <FormItem className="half-item"
  1781. {...formItemLayout}
  1782. label="上传协议文件" style={{height:"auto"}}>
  1783. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1784. data={(e)=>{
  1785. return {
  1786. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1787. }
  1788. }}
  1789. fileList={this.state.attachmentUrl}
  1790. onChange={(e)=>{
  1791. this.setState({attachmentUrl:e.fileList})
  1792. }}>
  1793. {this.state.attachmentUrl.length>1?null:<Button>
  1794. <Icon type="upload" /> 点击上传
  1795. </Button>}
  1796. </Upload>
  1797. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  1798. </FormItem>
  1799. </div>*/}
  1800. <div className="clearfix">
  1801. <FormItem
  1802. className="half-item"
  1803. style={{ height: "auto" }}
  1804. {...formItemLayout}
  1805. label={
  1806. <span>
  1807. <strong style={{ color: "#f00" }}>*</strong>备注
  1808. </span>
  1809. }
  1810. >
  1811. <TextArea
  1812. rows={4}
  1813. value={this.state.outsourceRemarks}
  1814. onChange={e => {
  1815. this.setState({
  1816. outsourceRemarks: e.target.value
  1817. });
  1818. }}
  1819. placeholder="请输入备注"
  1820. />
  1821. </FormItem>
  1822. </div>
  1823. <p
  1824. className="tip"
  1825. style={{
  1826. paddingBottom: "12px",
  1827. width: "240px",
  1828. marginLeft: "145px"
  1829. }}
  1830. >
  1831. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  1832. </p>
  1833. <div className="clearfix">
  1834. <FormItem
  1835. labelCol={{ span: 4 }}
  1836. wrapperCol={{ span: 18 }}
  1837. label={
  1838. <span>
  1839. <strong style={{ color: "#f00" }}>*</strong>
  1840. 合同/协议扫描件
  1841. <span style={{ color: "#f00" }}>(外包合同)</span>
  1842. </span>
  1843. }
  1844. >
  1845. <PicturesWall
  1846. fileList={this.getOrgCodeUrl}
  1847. pictureUrl={this.state.pictureUrl}
  1848. />
  1849. <p>请上传与外包公司签订的合同协议</p>
  1850. <p>图片建议:要清晰。</p>
  1851. </FormItem>
  1852. </div>
  1853. <div className="clearfix">
  1854. <div
  1855. style={{ display: "inline-black", textAlign: "center" }}
  1856. >
  1857. <Button type="primary" onClick={this.sureOut}>
  1858. 确认发起外包,不通过总部
  1859. </Button>
  1860. <p className="tip">提示:高于总部价格,费用个人承担</p>
  1861. </div>
  1862. </div>
  1863. </Spin>
  1864. </TabPane>
  1865. </Tabs>
  1866. </Modal>
  1867. <Modal
  1868. maskClosable={false}
  1869. visible={this.state.addnextVisible}
  1870. onOk={this.nextCancel}
  1871. onCancel={this.nextCancel}
  1872. confirmLoading={this.state.confirmLoading}
  1873. width="800px"
  1874. title={"项目任务详情"}
  1875. footer=""
  1876. className="admin-desc-content"
  1877. >
  1878. <Form layout="horizontal" id="demand-form">
  1879. <Spin spinning={this.state.loading}>
  1880. <div className="clearfix">
  1881. <FormItem
  1882. className="half-item"
  1883. {...formItemLayout}
  1884. label="项目名称"
  1885. >
  1886. <span>{this.state.commodityName}</span>
  1887. </FormItem>
  1888. <FormItem
  1889. className="half-item"
  1890. {...formItemLayout}
  1891. label="项目数量"
  1892. >
  1893. <span>{this.state.commodityQuantity}</span>
  1894. </FormItem>
  1895. <FormItem
  1896. className="half-item"
  1897. {...formItemLayout}
  1898. label="金额(万元)"
  1899. >
  1900. <span>{this.state.commodityPrice}</span>
  1901. </FormItem>
  1902. <FormItem
  1903. className="half-item"
  1904. {...formItemLayout}
  1905. label="主要项目"
  1906. >
  1907. <span>{getboutique(this.state.main)}</span>
  1908. </FormItem>
  1909. <div className="clearfix">
  1910. <FormItem
  1911. labelCol={{ span: 4 }}
  1912. wrapperCol={{ span: 16 }}
  1913. label="服务说明"
  1914. >
  1915. <span>{this.state.taskComment}</span>
  1916. </FormItem>
  1917. </div>
  1918. </div>
  1919. </Spin>
  1920. </Form>
  1921. </Modal>
  1922. <Modal
  1923. maskClosable={false}
  1924. visible={this.state.noVisible}
  1925. onOk={this.handleOk}
  1926. onCancel={this.noCancel}
  1927. width="400px"
  1928. title={"拒绝理由"}
  1929. footer=""
  1930. className="admin-desc-content"
  1931. confirmLoading={this.state.confirmLoading}
  1932. >
  1933. <Form layout="horizontal" id="demand-form">
  1934. <Spin spinning={this.state.loading}>
  1935. <div className="clearfix">
  1936. <FormItem
  1937. labelCol={{ span: 4 }}
  1938. wrapperCol={{ span: 16 }}
  1939. label="拒绝理由"
  1940. >
  1941. <Input
  1942. type="textarea"
  1943. placeholder="请输入拒绝理由"
  1944. rows={4}
  1945. value={this.state.reason}
  1946. onChange={e => {
  1947. this.setState({ reason: e.target.value });
  1948. }}
  1949. />
  1950. </FormItem>
  1951. </div>
  1952. <div className="clearfix">
  1953. <Button
  1954. className="cancel"
  1955. type="primary"
  1956. onClick={this.examOks}
  1957. style={{ marginLeft: "50px" }}
  1958. htmlType="submit"
  1959. loading={this.state.aloading}
  1960. >
  1961. 确定
  1962. </Button>
  1963. <Button
  1964. className="cancel"
  1965. type="ghost"
  1966. onClick={this.noCancel}
  1967. style={{ marginLeft: "50px" }}
  1968. >
  1969. 取消
  1970. </Button>
  1971. </div>
  1972. </Spin>
  1973. </Form>
  1974. </Modal>
  1975. <Modal
  1976. maskClosable={false}
  1977. visible={this.state.agreeVisible}
  1978. onOk={e => {
  1979. this.setState({
  1980. agreeVisible: false
  1981. });
  1982. }}
  1983. onCancel={e => {
  1984. this.setState({
  1985. agreeVisible: false
  1986. });
  1987. }}
  1988. width="400px"
  1989. title={"同意备注"}
  1990. footer=""
  1991. className="admin-desc-content"
  1992. confirmLoading={this.state.confirmLoading}
  1993. >
  1994. <Form layout="horizontal" id="demand-form">
  1995. <Spin spinning={this.state.loading}>
  1996. <div className="clearfix">
  1997. <FormItem
  1998. labelCol={{ span: 4 }}
  1999. wrapperCol={{ span: 16 }}
  2000. label="同意理由"
  2001. >
  2002. <Input
  2003. type="textarea"
  2004. placeholder="请输入同意理由"
  2005. rows={4}
  2006. value={this.state.reason}
  2007. onChange={e => {
  2008. this.setState({ reason: e.target.value });
  2009. }}
  2010. />
  2011. </FormItem>
  2012. </div>
  2013. <div className="clearfix">
  2014. <Button
  2015. className="cancel"
  2016. type="primary"
  2017. onClick={e => {
  2018. if (this.state.outsource == "是") {
  2019. this.showDeleteConfirm(this.examOk);
  2020. } else {
  2021. this.examOk();
  2022. }
  2023. }}
  2024. style={{ marginLeft: "50px" }}
  2025. htmlType="submit"
  2026. loading={this.state.aloading}
  2027. >
  2028. 确定
  2029. </Button>
  2030. <Button
  2031. className="cancel"
  2032. type="ghost"
  2033. onClick={e => {
  2034. this.setState({
  2035. agreeVisible: false
  2036. });
  2037. }}
  2038. style={{ marginLeft: "50px" }}
  2039. >
  2040. 取消
  2041. </Button>
  2042. </div>
  2043. </Spin>
  2044. </Form>
  2045. </Modal>
  2046. {/* <Modal
  2047. visible={this.state.rizhivisible}
  2048. className="admin-desc-content"
  2049. width="800px"
  2050. maskClosable={false}
  2051. title="订单日志"
  2052. footer={null}
  2053. onCancel={this.closeOrderLog}
  2054. >
  2055. <div className="patent-table">
  2056. <Spin spinning={this.state.loading}>
  2057. <Table
  2058. columns={this.state.columnsrizhi}
  2059. dataSource={this.state.dataSourcerizhi}
  2060. pagination={false}
  2061. />
  2062. </Spin>
  2063. </div>
  2064. </Modal> */}
  2065. <OrderRiZi
  2066. dataSourcerizhi={this.state.dataSourcerizhi}
  2067. closeOrderLog={this.closeOrderLog}
  2068. visible={this.state.rizhivisible}
  2069. loading={this.state.loading}
  2070. />
  2071. </div>
  2072. </div>
  2073. );
  2074. }
  2075. })
  2076. );
  2077. export default IntentionCustomer;