examine.jsx 67 KB

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