examine.jsx 89 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621
  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. Tooltip,
  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. import ImgList from "../../../common/imgList";
  38. import { ChooseList } from "./chooseList";
  39. import { getProjectName } from "../../../tools";
  40. import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
  41. import NewEditProject from "../../../common/projectOperation/newEditProject"
  42. import OrderItemStatus from "../../../common/orderItemStatus";
  43. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  44. import OrderCoor from "./changeComponent/orderCoor";
  45. import ContentUrl from "./contentUrl";
  46. import { salesList } from "@/dataDic.js";
  47. const confirm = Modal.confirm;
  48. const { Option } = Select;
  49. //图片组件
  50. const PicturesWall = React.createClass({
  51. getInitialState() {
  52. return {
  53. previewVisible: false,
  54. previewImage: "",
  55. declarationBatch: 1,
  56. dataInfor: {},
  57. fileList: this.props.pictureUrl
  58. };
  59. },
  60. handleCancel() {
  61. this.setState({
  62. previewVisible: false
  63. });
  64. },
  65. handlePreview(file) {
  66. this.setState({
  67. previewImage: file.url || file.thumbUrl,
  68. previewVisible: true
  69. });
  70. },
  71. handleChange(info) {
  72. let fileList = info.fileList;
  73. this.setState({
  74. fileList
  75. });
  76. this.props.fileList(fileList);
  77. },
  78. componentWillReceiveProps(nextProps) {
  79. this.state.fileList = nextProps.pictureUrl;
  80. this.state.pojectApplicationUrl = undefined;
  81. },
  82. render() {
  83. const { previewVisible, previewImage, fileList } = this.state;
  84. const uploadButton = (
  85. <div>
  86. <Icon type="plus" />
  87. <div className="ant-upload-text">点击上传</div>
  88. </div>
  89. );
  90. return (
  91. <div style={{ display: "inline-block" }}>
  92. <Upload
  93. action={
  94. globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"
  95. }
  96. data={{ sign: "order_outsource" }}
  97. listType="picture-card"
  98. fileList={fileList}
  99. multiple
  100. onPreview={this.handlePreview}
  101. onChange={this.handleChange}
  102. >
  103. {uploadButton}
  104. </Upload>
  105. {previewVisible ? <Modal
  106. maskClosable={false}
  107. width={"70px"}
  108. visible={previewVisible}
  109. footer={null}
  110. onCancel={this.handleCancel}
  111. >
  112. <img alt="example" style={{ width: "100%" }} src={previewImage} />
  113. </Modal> : <div />}
  114. </div>
  115. );
  116. }
  117. });
  118. const IntentionCustomer = Form.create()(
  119. React.createClass({
  120. loadData(pageNo) {
  121. this.setState({
  122. visitModul: false,
  123. loading: true,
  124. ispage: pageNo,
  125. modalVisible: false,
  126. });
  127. $.ajax({
  128. method: "get",
  129. dataType: "json",
  130. crossDomain: false,
  131. url: globalConfig.context + "/api/admin/newOrder/orderNewList",
  132. data: {
  133. pageNo: pageNo || 1,
  134. pageSize: this.state.pagination.pageSize,
  135. specially: 1, //审核列表
  136. name: this.state.customerName, //名称
  137. orderNo: this.state.orderNoSearch, //订单编号
  138. starTime: this.state.releaseDate[0], //开始时间
  139. endTime: this.state.releaseDate[1], //结束时间
  140. approval: this.state.approvalSearch, //特批状态搜索
  141. processStatus: this.state.processStatusSearch,
  142. amountStatus: this.state.amountStatus,
  143. projectType: this.state.projectType,//会员
  144. },
  145. success: function (data) {
  146. ShowModal(this);
  147. let theArr = [];
  148. if (data.error.length || data.data.list == "") {
  149. if (data.error && data.error.length) {
  150. message.warning(data.error[0].message);
  151. }
  152. } else {
  153. for (let i = 0; i < data.data.list.length; i++) {
  154. let thisdata = data.data.list[i];
  155. theArr.push({
  156. key: i,
  157. id: thisdata.id, //用户ID
  158. salesType: thisdata.salesType, //销售类型
  159. deleteSign: thisdata.deleteSign,
  160. projectType: thisdata.projectType,
  161. other: thisdata.other,
  162. contractNo: thisdata.contractNo, //合同编号
  163. orderNo: thisdata.orderNo, //订单编号
  164. totalAmount: thisdata.totalAmount, //签单金额
  165. processStatus: thisdata.processStatus, //流程状态
  166. liquidationStatus: thisdata.liquidationStatus, //结算状态
  167. approval: thisdata.approval, //特批状态
  168. signDate: thisdata.signDate, //签单时间
  169. userName: thisdata.userName, //客户名称
  170. salesmanName: thisdata.salesmanName, //营销员名称
  171. financeName: thisdata.financeName, //财务名称
  172. createDate: thisdata.createDate, //下单时间
  173. depName: thisdata.depName,
  174. orderStatus: thisdata.orderStatus,
  175. });
  176. }
  177. this.state.pagination.total = data.data.totalCount;
  178. this.state.pagination.current = data.data.pageNo;
  179. }
  180. if (data.data && data.data.list && !data.data.list.length) {
  181. this.state.pagination.total = 0;
  182. }
  183. this.setState({
  184. dataSource: theArr,
  185. pageNo: pageNo,
  186. pagination: this.state.pagination,
  187. selectedRowKeys: [],
  188. });
  189. }.bind(this),
  190. }).always(
  191. function () {
  192. this.setState({
  193. loading: false,
  194. });
  195. }.bind(this)
  196. );
  197. },
  198. getInitialState() {
  199. return {
  200. rotateDeg: 0,
  201. page: 1,
  202. resVisible: false,
  203. releaseDate: [],
  204. selectedRowKeys: [],
  205. pictureUrl: [],
  206. attachmentUrl: [],
  207. paginations: false,
  208. activeKey: "1",
  209. confirmLoading: false,
  210. approvalSearch: undefined,
  211. processStatusSearch: undefined,
  212. aloading: false,
  213. orderNos: '',
  214. pagination: {
  215. defaultCurrent: 1,
  216. defaultPageSize: 10,
  217. showQuickJumper: true,
  218. pageSize: 10,
  219. onChange: function (page) {
  220. this.loadData(page);
  221. }.bind(this),
  222. showTotal: function (total) {
  223. return "共" + total + "条数据";
  224. },
  225. },
  226. columns: [
  227. {
  228. title: "销售类型",
  229. dataIndex: "salesType",
  230. key: "salesType",
  231. render: (text, record) => {
  232. return (
  233. <Tooltip
  234. title={salesList[text] + ((text == 3 || text == 4 || text == 5) ? (!record.other ? "" : "," + record.other) : "")}
  235. >
  236. <span>
  237. {salesList[text]}
  238. </span>
  239. </Tooltip>
  240. );
  241. },
  242. },
  243. {
  244. title: "合同编号",
  245. dataIndex: "contractNo",
  246. key: "contractNo",
  247. className: "title-table",
  248. render: (text, record) => {
  249. return (
  250. <Tooltip
  251. title={
  252. <Button
  253. type="primary"
  254. onClick={(e) => {
  255. e.stopPropagation();
  256. let input = document.getElementById("copyText");
  257. input.value = text;
  258. input.select();
  259. document.execCommand("copy");
  260. message.success("复制成功");
  261. }}
  262. >
  263. 复制
  264. </Button>
  265. }
  266. >
  267. <div>
  268. {text}
  269. <div style={{ display: "flex" }}>
  270. <OrderItemStatus deleteSign={record.deleteSign} />
  271. {
  272. record.approval == 1
  273. ? <Tag color="#faa755">特批待审</Tag> :
  274. record.approval == 2 && <Tag color="#ff0000">特批通过</Tag>
  275. }
  276. </div>
  277. </div>
  278. </Tooltip>
  279. );
  280. },
  281. },
  282. {
  283. title: "客户名称",
  284. dataIndex: "userName",
  285. key: "userName",
  286. render: (text) => {
  287. return (
  288. <Tooltip title={text}>
  289. <div style={{
  290. maxWidth: '150px',
  291. overflow: 'hidden',
  292. textOverflow: "ellipsis",
  293. whiteSpace: 'nowrap',
  294. }}>{text}</div>
  295. </Tooltip>
  296. )
  297. },
  298. },
  299. {
  300. title: "订单编号",
  301. dataIndex: "orderNo",
  302. key: "orderNo",
  303. width: 140,
  304. render: (text, record) => {
  305. return (
  306. <Tooltip
  307. title={
  308. <Button
  309. type="primary"
  310. onClick={(e) => {
  311. e.stopPropagation();
  312. let input = document.getElementById("copyText");
  313. input.value = text;
  314. input.select();
  315. document.execCommand("copy");
  316. message.success("复制成功");
  317. }}
  318. >
  319. 复制
  320. </Button>
  321. }
  322. >
  323. <div>
  324. {text}
  325. <div>
  326. {record.totalAmount >= 10 && <Tag color="#ef7207">大客户</Tag>}
  327. {record.projectType == 1 && <Tag color="rgb(22, 155, 213)">会员</Tag>}
  328. </div>
  329. </div>
  330. </Tooltip>
  331. );
  332. },
  333. },
  334. {
  335. title: "下单时间",
  336. dataIndex: "createDate",
  337. key: "createTime",
  338. },
  339. {
  340. title: "合同签订时间",
  341. dataIndex: "signDate",
  342. key: "signDate",
  343. },
  344. {
  345. title: "流程状态",
  346. dataIndex: "processStatus",
  347. key: "processStatus",
  348. render: (text) => {
  349. return getProcessStatus(text);
  350. },
  351. },
  352. {
  353. title: "订单部门",
  354. dataIndex: "depName",
  355. key: "depName",
  356. },
  357. {
  358. title: "签单金额(万元)",
  359. dataIndex: "totalAmount",
  360. key: "totalAmount",
  361. },
  362. {
  363. title: "结算状态",
  364. dataIndex: "liquidationStatus",
  365. key: "liquidationStatus",
  366. render: (text) => {
  367. return getLiquidationStatus(text);
  368. },
  369. },
  370. {
  371. title: "是否特批",
  372. dataIndex: "approval",
  373. key: "approval",
  374. render: (text) => {
  375. return getApprovedState(text);
  376. },
  377. },
  378. {
  379. title: "订单负责人",
  380. dataIndex: "salesmanName",
  381. key: "salesmanName",
  382. },
  383. {
  384. title: "财务负责人",
  385. dataIndex: "financeName",
  386. key: "financeName",
  387. },
  388. ],
  389. data: [],
  390. dataSource: [],
  391. columnsX: [
  392. {
  393. title: "业务项目名称",
  394. dataIndex: "commodityName",
  395. key: "commodityName",
  396. render: (text, record) => {
  397. return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  398. }
  399. },
  400. {
  401. title: "项目类别",
  402. dataIndex: "cname",
  403. key: "cname",
  404. },
  405. {
  406. title: "项目数量",
  407. dataIndex: "commodityQuantity",
  408. key: "commodityQuantity",
  409. render: (text, record) => {
  410. if (record.splitStatus == 1) {
  411. return (
  412. <span>
  413. {text}{" "}
  414. {/* <Tag
  415. color="#108ee9"
  416. onClick={(e) => {
  417. e.stopPropagation();
  418. this.showRes(record);
  419. }}
  420. >
  421. 已拆
  422. </Tag> */}
  423. </span>
  424. );
  425. } else {
  426. return text;
  427. }
  428. },
  429. },
  430. {
  431. title: "金额(万元)",
  432. dataIndex: "commodityPrice",
  433. key: "commodityPrice",
  434. },
  435. {
  436. title: "负责人",
  437. dataIndex: "contacts",
  438. key: "contacts",
  439. },
  440. {
  441. title: "负责人电话",
  442. dataIndex: "contactsMobile",
  443. key: "contactsMobile",
  444. },
  445. {
  446. title: "项目状态",
  447. dataIndex: "projectStatus",
  448. key: "projectStatus",
  449. render: (text) => {
  450. return getProjectName(text);
  451. },
  452. },
  453. {
  454. title: "主要项目",
  455. dataIndex: "main",
  456. key: "main",
  457. width: 50,
  458. render: (text) => {
  459. return text ? "是" : "否";
  460. },
  461. },
  462. {
  463. title: "总年限",
  464. dataIndex: "yearSum",
  465. key: "yearSum",
  466. render: (text, record) => {
  467. return (
  468. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  469. );
  470. }
  471. },
  472. {
  473. title: "年限",
  474. dataIndex: "serviceLife",
  475. key: "serviceLife",
  476. render: (text, record) => {
  477. return (
  478. <div>{!!text && JSON.parse(text).toString()}</div>
  479. );
  480. }
  481. },
  482. {
  483. title: "本次派单",
  484. dataIndex: "serviceYear",
  485. key: "serviceYear",
  486. render: (text, record) => {
  487. return (
  488. <div>{!text ? "" : text}</div>
  489. );
  490. }
  491. },
  492. {
  493. title: "项目说明",
  494. dataIndex: "taskComment",
  495. key: "taskComment",
  496. render: (text) => {
  497. return (
  498. <Tooltip title={text}>
  499. <div
  500. style={{
  501. width: 100,
  502. overflow: "hidden",
  503. whiteSpace: "nowrap",
  504. textOverflow: "ellipsis",
  505. }}
  506. >{text}</div>
  507. </Tooltip>
  508. )
  509. },
  510. },
  511. ],
  512. columnsrizhi: [
  513. {
  514. title: "流程",
  515. dataIndex: "processName",
  516. key: "processName",
  517. },
  518. {
  519. title: "操作人",
  520. dataIndex: "adminName",
  521. key: "adminName",
  522. },
  523. {
  524. title: "时间",
  525. dataIndex: "createDate",
  526. key: "createDate",
  527. },
  528. ],
  529. dataSourceX: [],
  530. ContactsListsNew: [
  531. {
  532. title: "项目名称",
  533. dataIndex: "commodityName",
  534. key: "commodityName",
  535. render: (text, record) => {
  536. return <span>{text + "-" + record.tid}</span>;
  537. },
  538. },
  539. {
  540. title: "项目分类",
  541. dataIndex: "projectType",
  542. key: "projectType",
  543. render: (text) => {
  544. let arr = this.state.dataSourceX || [];
  545. let str = "";
  546. for (let i = 0; i < arr.length; i++) {
  547. if (this.state.dataSourceX[i].sort == text) {
  548. str = this.state.dataSourceX[i].cname;
  549. return <span>{str}</span>;
  550. }
  551. }
  552. },
  553. },
  554. {
  555. title: "催款科目",
  556. dataIndex: "dunTypeName",
  557. key: "dunTypeName",
  558. render: (text, record) => {
  559. if (record.customizeName) {
  560. return text + record.customizeName;
  561. }
  562. return <span>{text}</span>;
  563. },
  564. },
  565. {
  566. title: "时间(天)",
  567. dataIndex: "waitDay",
  568. key: "waitDay",
  569. render: (text, record) => {
  570. if (record.dunTypeName) {
  571. if (record.customizeTimes) {
  572. return record.customizeTimes;
  573. }
  574. if (text == 0) {
  575. var str = "当天";
  576. } else if (!text) {
  577. var str = "";
  578. } else {
  579. var str = text + "天";
  580. }
  581. return <span>{str}</span>;
  582. }
  583. },
  584. },
  585. {
  586. title: "金额(万元)",
  587. dataIndex: "money",
  588. key: "money",
  589. render: (text, record) => {
  590. if (record.dunTypeName) {
  591. if (record.appropriationRatio) {
  592. let percent = Number(record.appropriationRatio * 100).toFixed(2);
  593. percent += "%";
  594. return <span>{percent}(拨款比例)</span>;
  595. } else {
  596. return <span>{text}</span>;
  597. }
  598. }
  599. },
  600. },
  601. {
  602. title: "服务年限",
  603. dataIndex: "startDate",
  604. key: "startDate",
  605. render: (text, record) => {
  606. if (record.dunTypeName) {
  607. return <span>{text}</span>;
  608. }
  609. },
  610. },
  611. {
  612. title: "催款状态",
  613. dataIndex: "status",
  614. key: "status",
  615. render: (text) => {
  616. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  617. },
  618. },
  619. ],
  620. ContactsLists: [
  621. {
  622. title: "催款科目",
  623. dataIndex: "dunSubject",
  624. key: "dunSubject",
  625. render: (text) => {
  626. return getjiedian(text);
  627. },
  628. },
  629. {
  630. title: "金额(万元)",
  631. visible订单详情dataIndex: "money",
  632. key: "money",
  633. },
  634. {
  635. title: "催款状态",
  636. dataIndex: "dunStatus",
  637. key: "dunStatus",
  638. render: (text) => {
  639. return getCuikuan(text);
  640. },
  641. },
  642. ],
  643. };
  644. },
  645. //页面加载函数
  646. componentWillMount() {
  647. this.loadData();
  648. },
  649. //整行点击
  650. tableRowClick(record) {
  651. this.setState({
  652. visible: true,
  653. orderStatus: record.orderStatus,
  654. id: record.id,
  655. orderNos: record.orderNo
  656. });
  657. this.xiangqing(record.orderNo);
  658. this.xiangmu(record.orderNo);
  659. this.jiedian(record.orderNo);
  660. this.jiedianNew(record.orderNo);
  661. },
  662. //点击打卡项目详情
  663. tableRowClickX(record) {
  664. if (record.type == "1") {
  665. this.setState({
  666. displayFees: "block",
  667. costReduction: record.costReduction,
  668. officialCost: record.officialCost,
  669. });
  670. } else {
  671. this.setState({
  672. displayFees: "none",
  673. });
  674. }
  675. this.setState({
  676. jid: record.id, //项目ID
  677. kid: record.commodityId, //商品ID
  678. commodityName: record.commodityName, //金额
  679. commodityPrice: record.commodityPrice, //金额
  680. commodityQuantity: record.commodityQuantity, //数量
  681. taskComment: record.taskComment, //备注
  682. main: record.main.toString(), //是否为主要
  683. addnextVisible: true,
  684. dataInfor: record,
  685. addState: 0,
  686. });
  687. },
  688. //项目详情关闭
  689. nextCancel() {
  690. this.setState({
  691. addnextVisible: false,
  692. displayFees: "none",
  693. officialCost: "", //是否有官费
  694. costReduction: "", //是否有费减
  695. });
  696. },
  697. //订单详情
  698. xiangqing(orderNos) {
  699. $.ajax({
  700. method: "get",
  701. dataType: "json",
  702. crossDomain: false,
  703. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  704. data: {
  705. orderNo: orderNos,
  706. },
  707. success: function (data) {
  708. if (data.error.length || data.data.list == "") {
  709. if (data.error && data.error.length) {
  710. message.warning(data.error[0].message);
  711. }
  712. } else {
  713. let thisdata = data.data;
  714. this.setState({
  715. orderUid: thisdata.uid,
  716. userType: thisdata.userType,//
  717. salesType: thisdata.salesType, //销售类型
  718. other: thisdata.other,
  719. orderNo: thisdata.orderNo, //订单编号
  720. contractNo: thisdata.contractNo, //合同编号
  721. userName: thisdata.userName, //客户名称
  722. signDate: thisdata.signDate, //签单时间
  723. processStatus: thisdata.processStatus, //流程状态
  724. liquidationStatus: thisdata.liquidationStatus, //结算状态
  725. contacts: thisdata.contacts, //企业联系人
  726. contactMobile: thisdata.contactMobile, //联系人电话
  727. legalPerson: thisdata.legalPerson, //法人
  728. legalPersonTel: thisdata.legalPersonTel, //法人电话
  729. firstAmount: thisdata.firstAmount, //签单金额
  730. totalAmount: thisdata.totalAmount, //首付金额
  731. approval: thisdata.approval, //特批状态
  732. settlementAmount: thisdata.settlementAmount, //已收款项
  733. orderRemarks: thisdata.orderRemarks, //订单留言
  734. orgCodeUrl: thisdata.contractPictureUrl
  735. ? splitUrl(
  736. thisdata.contractPictureUrl,
  737. ",",
  738. globalConfig.avatarHost + "/upload"
  739. )
  740. : [], //图片地址
  741. replenishUrl: thisdata.agreementUrl
  742. ? splitUrl(
  743. thisdata.agreementUrl,
  744. ",",
  745. globalConfig.avatarHost + "/upload"
  746. )
  747. : [], //图片地址
  748. contentUrl: thisdata.serviceContent
  749. ? splitUrl(
  750. thisdata.serviceContent,
  751. ",",
  752. globalConfig.avatarHost + "/upload"
  753. )
  754. : [], //图片地址
  755. salesmanName: thisdata.salesmanName, //营销员名称
  756. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  757. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  758. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  759. financeName: thisdata.financeName, //财务名称
  760. financeMobile: thisdata.financeMobile, //财务电话
  761. nowFinance: thisdata.nowFinance, //财务名称
  762. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  763. depName: thisdata.depName,
  764. outsource: thisdata.outsource == 0 ? "否" : "是",
  765. deleteSign: thisdata.deleteSign,
  766. });
  767. }
  768. }.bind(this),
  769. }).always(
  770. function () {
  771. this.setState({
  772. loading: false,
  773. });
  774. }.bind(this)
  775. );
  776. },
  777. //项目列表
  778. xiangmu(orderNos) {
  779. $.ajax({
  780. method: "get",
  781. dataType: "json",
  782. crossDomain: false,
  783. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  784. data: {
  785. orderNo: orderNos,
  786. },
  787. success: function (data) {
  788. let theArr = [];
  789. if (data.error.length || data.data.list == "") {
  790. if (data.error && data.error.length) {
  791. message.warning(data.error[0].message);
  792. }
  793. } else {
  794. for (let i = 0; i < data.data.length; i++) {
  795. let thisdata = data.data[i];
  796. thisdata.key = i;
  797. thisdata.sort = thisdata.cSort;
  798. theArr.push(thisdata);
  799. }
  800. }
  801. this.setState({
  802. dataSourceX: theArr,
  803. });
  804. }.bind(this),
  805. }).always(
  806. function () {
  807. this.setState({
  808. loading: false,
  809. });
  810. }.bind(this)
  811. );
  812. },
  813. rizhi() {
  814. this.setState({
  815. loading: true,
  816. });
  817. $.ajax({
  818. method: "get",
  819. dataType: "json",
  820. crossDomain: false,
  821. url: "/api/admin/newOrder/selectOrderLog",
  822. data: {
  823. orderNo: this.state.orderNo,
  824. },
  825. success: function (data) {
  826. let theArr = [];
  827. let thisData = data.data;
  828. if (!thisData.length) {
  829. if (data.error && data.error.length) {
  830. message.warning(data.error[0].message);
  831. }
  832. thisData = {};
  833. } else {
  834. for (let i = 0; i < data.data.length; i++) {
  835. let thisdata = data.data[i];
  836. theArr.push({
  837. processName: thisdata.processName,
  838. adminName: thisdata.adminName,
  839. createDate: thisdata.createDate,
  840. remarks: thisdata.remarks,
  841. });
  842. }
  843. }
  844. this.setState({
  845. dataSourcerizhi: theArr,
  846. });
  847. }.bind(this),
  848. }).always(
  849. function () {
  850. this.setState({
  851. loading: false,
  852. });
  853. }.bind(this)
  854. );
  855. },
  856. // 拆分详细
  857. showRes(record) {
  858. this.setState({
  859. resVisible: true,
  860. resRecord: record,
  861. });
  862. },
  863. resCancel() {
  864. this.setState({
  865. resVisible: false,
  866. });
  867. },
  868. getOrderLog() {
  869. this.setState({
  870. rizhivisible: true,
  871. });
  872. this.rizhi();
  873. },
  874. closeOrderLog() {
  875. this.setState({
  876. rizhivisible: false,
  877. });
  878. },
  879. //节点列表
  880. jiedian(orderNos) {
  881. $.ajax({
  882. method: "get",
  883. dataType: "json",
  884. crossDomain: false,
  885. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  886. data: {
  887. orderNo: orderNos,
  888. },
  889. success: function (data) {
  890. let theArr = [];
  891. let thisData = [];
  892. if (data.error.length || data.data.list == "") {
  893. if (data.error && data.error.length) {
  894. message.warning(data.error[0].message);
  895. }
  896. } else {
  897. for (let i = 0; i < data.data.length; i++) {
  898. thisData = data.data[i];
  899. theArr.push({
  900. key: i,
  901. dunSubject: thisData.dunSubject
  902. ? thisData.dunSubject.toString()
  903. : "", //催款科目
  904. id: thisData.id, //节点Id
  905. money: thisData.money, //催款金额
  906. dunStatus: thisData.dunStatus, //催款状态
  907. });
  908. }
  909. this.setState({
  910. contactList: theArr,
  911. });
  912. }
  913. }.bind(this),
  914. }).always(
  915. function () {
  916. this.setState({
  917. loading: false,
  918. });
  919. }.bind(this)
  920. );
  921. },
  922. //查看催款节点
  923. jiedianNew(orderNos) {
  924. $.ajax({
  925. method: "get",
  926. dataType: "json",
  927. crossDomain: false,
  928. url:
  929. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  930. data: {
  931. orderNo: orderNos,
  932. },
  933. success: function (data) {
  934. if (data.error && data.error.length) {
  935. message.warning(data.error[0].message);
  936. } else {
  937. let theArr = [];
  938. let thisData = [];
  939. let arr = data.data || [];
  940. let totalCui = 0;
  941. for (let i = 0; i < arr.length; i++) {
  942. thisData = arr[i];
  943. totalCui += +thisData.money;
  944. theArr.push({
  945. key: i,
  946. dunSubject: thisData.dunSubject
  947. ? thisData.dunSubject.toString()
  948. : "", //催款科目
  949. id: thisData.id, //节点Id
  950. money: thisData.money, //催款金额
  951. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  952. commodityName: thisData.commodityName,
  953. projectType: thisData.projectType,
  954. dunTypeName: thisData.dunTypeName,
  955. status: thisData.status,
  956. waitDay: thisData.waitDay,
  957. effectiveCount: thisData.effectiveCount,
  958. startDate: thisData.startDate,
  959. dunType: thisData.dunType,
  960. appropriationRatio: thisData.appropriationRatio,
  961. customizeName: thisData.customizeName,
  962. customizeTimes: thisData.customizeTimes,
  963. tid: thisData.tid,
  964. });
  965. }
  966. if (!totalCui) {
  967. totalCui = 0;
  968. }
  969. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  970. this.setState({
  971. contactListNew: theArr,
  972. totalCui,
  973. });
  974. }
  975. }.bind(this),
  976. }).always(
  977. function () {
  978. this.setState({
  979. loading: false,
  980. });
  981. }.bind(this)
  982. );
  983. },
  984. //审核通过
  985. examOk() {
  986. if (this.state.remarks == "") {
  987. message.warning("请填写备注信息");
  988. return;
  989. }
  990. if (this.state.flag) return;
  991. this.setState({
  992. flag: true,
  993. loading: true,
  994. });
  995. $.ajax({
  996. method: "post",
  997. dataType: "json",
  998. crossDomain: false,
  999. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  1000. data: {
  1001. orderNo: this.state.orderNo,
  1002. orderStatus: 2,
  1003. reason: this.state.reason,
  1004. },
  1005. success: function (data) {
  1006. if (data.error.length || data.data.list == "") {
  1007. if (data.error && data.error.length) {
  1008. message.warning(data.error[0].message);
  1009. this.setState({
  1010. flag: false,
  1011. });
  1012. }
  1013. } else {
  1014. message.success("该订单已通过审核~");
  1015. this.setState({
  1016. visible: false,
  1017. flag: false,
  1018. agreeVisible: false,
  1019. });
  1020. this.reset();
  1021. }
  1022. }.bind(this),
  1023. }).always(
  1024. function () {
  1025. this.setState({
  1026. loading: false,
  1027. });
  1028. }.bind(this)
  1029. );
  1030. },
  1031. //通过发给外包
  1032. outsourcing() {
  1033. if (this.state.flag) return;
  1034. this.setState({
  1035. flag: true,
  1036. loading: true,
  1037. });
  1038. $.ajax({
  1039. method: "post",
  1040. dataType: "json",
  1041. crossDomain: false,
  1042. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  1043. data: {
  1044. orderNo: this.state.orderNo,
  1045. orderStatus: 2,
  1046. outsource: 1,
  1047. },
  1048. success: function (data) {
  1049. if (data.error.length || data.data.list == "") {
  1050. if (data.error && data.error.length) {
  1051. message.warning(data.error[0].message);
  1052. this.setState({
  1053. flag: false,
  1054. });
  1055. }
  1056. } else {
  1057. message.success("该订单已通过审核~");
  1058. this.setState({
  1059. visible: false,
  1060. flag: false,
  1061. });
  1062. this.reset();
  1063. }
  1064. }.bind(this),
  1065. }).always(
  1066. function () {
  1067. this.setState({
  1068. loading: false,
  1069. });
  1070. }.bind(this)
  1071. );
  1072. },
  1073. //审核不通过
  1074. examOks() {
  1075. this.setState({
  1076. loading: true,
  1077. });
  1078. this.setState({
  1079. aloading: true,
  1080. });
  1081. $.ajax({
  1082. method: "post",
  1083. dataType: "json",
  1084. crossDomain: false,
  1085. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  1086. data: {
  1087. orderNo: this.state.orderNo,
  1088. orderStatus: 3,
  1089. reason: this.state.reason,
  1090. },
  1091. success: function (data) {
  1092. if (data.error.length || data.data.list == "") {
  1093. if (data.error && data.error.length) {
  1094. message.warning(data.error[0].message);
  1095. this.setState({
  1096. aloading: true,
  1097. loading: false,
  1098. });
  1099. }
  1100. } else {
  1101. message.success("该订单已被拒绝~");
  1102. this.setState({
  1103. visible: false,
  1104. aloading: false,
  1105. noVisible: false,
  1106. reason: "",
  1107. loading: false,
  1108. });
  1109. this.reset();
  1110. }
  1111. }.bind(this),
  1112. }).always(
  1113. function () {
  1114. this.setState({
  1115. loading: false,
  1116. });
  1117. }.bind(this)
  1118. );
  1119. },
  1120. //点击拒绝
  1121. examNo() {
  1122. this.setState({
  1123. noVisible: true,
  1124. });
  1125. },
  1126. callback(key) {
  1127. let url = window.location.href.substring(7);
  1128. this.setState({
  1129. activeKey: key,
  1130. });
  1131. if (this.state.pictureUrl.length) {
  1132. let picArr = [];
  1133. this.state.pictureUrl.map(function (item) {
  1134. if (
  1135. item.response &&
  1136. item.response.data &&
  1137. item.response.data.length
  1138. ) {
  1139. picArr.push(item.response.data);
  1140. }
  1141. });
  1142. }
  1143. if (key === "2") {
  1144. this.setState({
  1145. loading: true,
  1146. });
  1147. $.ajax({
  1148. method: "get",
  1149. dataType: "json",
  1150. crossDomain: false,
  1151. url:
  1152. globalConfig.context +
  1153. "/api/admin/outsourceOrg/orderOutsourceDtails",
  1154. data: {
  1155. orderNo: this.state.orderNo,
  1156. },
  1157. success: function (data) {
  1158. if (data.data) {
  1159. let thisdata = data.data;
  1160. this.setState({
  1161. id: thisdata.id,
  1162. createTimes: thisdata.createTimes,
  1163. auditTimes: thisdata.auditTimes,
  1164. remarks: thisdata.remarks,
  1165. attachmentUrl: thisdata.attachmentUrl
  1166. ? splitUrl(
  1167. thisdata.attachmentUrl,
  1168. ",",
  1169. globalConfig.avatarHost + "/upload",
  1170. url
  1171. )
  1172. : [],
  1173. fileUrl: thisdata.attachmentUrl
  1174. ? splitUrl(
  1175. thisdata.attachmentUrl,
  1176. ",",
  1177. globalConfig.avatarHost + "/upload",
  1178. url
  1179. )
  1180. : [],
  1181. pictureUrl: thisdata.pictureUrl
  1182. ? splitUrl(
  1183. thisdata.pictureUrl,
  1184. ",",
  1185. globalConfig.avatarHost + "/upload",
  1186. url
  1187. )
  1188. : [], //图片地址
  1189. amount: thisdata.amount,
  1190. companyName: thisdata.companyName,
  1191. outsourceRemarks: thisdata.outsourceRemarks,
  1192. unitNumber: thisdata.unitNumber,
  1193. unitPrice: thisdata.unitPrice,
  1194. });
  1195. }
  1196. }.bind(this),
  1197. }).always(
  1198. function () {
  1199. this.setState({
  1200. loading: false,
  1201. });
  1202. }.bind(this)
  1203. );
  1204. }
  1205. },
  1206. getUrl(url) {
  1207. let theorgCodeUrl = [];
  1208. if (url.length) {
  1209. let picArr = [];
  1210. url.map(function (item) {
  1211. if (
  1212. item.response &&
  1213. item.response.data &&
  1214. item.response.data.length
  1215. ) {
  1216. picArr.push(item.response.data);
  1217. }
  1218. });
  1219. theorgCodeUrl = picArr.join(",");
  1220. }
  1221. return theorgCodeUrl;
  1222. },
  1223. sureOut() {
  1224. this.setState({
  1225. loading: true,
  1226. });
  1227. if (!this.state.companyName) {
  1228. message.warning("公司名称不能为空");
  1229. return;
  1230. }
  1231. if (!this.state.unitPrice) {
  1232. message.warning("单价不能为空");
  1233. return;
  1234. }
  1235. if (moneyVerify(this.state.unitPrice)) {
  1236. return;
  1237. }
  1238. if (!this.state.unitNumber) {
  1239. message.warning("数量不能为空");
  1240. return;
  1241. }
  1242. if (!this.state.amount) {
  1243. message.warning("总金额不能为空");
  1244. return;
  1245. }
  1246. if (moneyVerify(this.state.amount)) {
  1247. return;
  1248. }
  1249. if (!this.state.outsourceRemarks) {
  1250. message.warning("备注不能为空");
  1251. return;
  1252. }
  1253. if (this.state.pictureUrl.length === 0) {
  1254. message.warning("合同扫描件不能为空");
  1255. return;
  1256. }
  1257. $.ajax({
  1258. method: "POST",
  1259. dataType: "json",
  1260. crossDomain: false,
  1261. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  1262. data: {
  1263. id: this.state.id,
  1264. orderNo: this.state.orderNo,
  1265. companyName: this.state.companyName,
  1266. amount: this.state.amount,
  1267. outsourceRemarks: this.state.outsourceRemarks,
  1268. unitNumber: this.state.unitNumber,
  1269. unitPrice: this.state.unitPrice,
  1270. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  1271. ? this.getUrl(this.state.attachmentUrl)
  1272. : "",
  1273. orderStatus: 2,
  1274. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1275. ? this.getUrl(this.state.pictureUrl)
  1276. : "",
  1277. },
  1278. }).done(
  1279. function (data) {
  1280. this.setState({
  1281. loading: false,
  1282. });
  1283. if (!data.error.length) {
  1284. message.success("发起成功!");
  1285. this.outReset();
  1286. this.visitCancel();
  1287. } else {
  1288. message.warning(data.error[0].message);
  1289. }
  1290. }.bind(this)
  1291. );
  1292. },
  1293. //关闭输入理由框
  1294. noCancel() {
  1295. this.setState({
  1296. noVisible: false,
  1297. aloading: false,
  1298. reason: "",
  1299. });
  1300. },
  1301. //搜索
  1302. search() {
  1303. this.setState({
  1304. //signBillVisible:false
  1305. });
  1306. this.loadData();
  1307. },
  1308. //重置
  1309. reset() {
  1310. this.setState({
  1311. signBillVisible: false,
  1312. });
  1313. this.state.orderNoSearch = "";
  1314. this.state.customerName = "";
  1315. this.state.releaseDate[0] = undefined;
  1316. this.state.releaseDate[1] = undefined;
  1317. this.state.approval = undefined;
  1318. this.state.approvalSearch = undefined;
  1319. this.state.amountStatus = undefined;
  1320. this.state.processStatusSearch = undefined;
  1321. this.state.projectType = undefined;
  1322. this.loadData(1);
  1323. },
  1324. outReset() {
  1325. this.setState({
  1326. companyName: "",
  1327. amount: "",
  1328. unitPrice: "",
  1329. unitNumber: "",
  1330. outsourceRemarks: "",
  1331. attachmentUrl: [],
  1332. pictureUrl: [],
  1333. });
  1334. },
  1335. resets() {
  1336. this.state.orderNo = "";
  1337. this.state.customerName = "";
  1338. this.state.releaseDate[0] = undefined;
  1339. this.state.releaseDate[1] = undefined;
  1340. },
  1341. getOrgCodeUrl(e) {
  1342. this.setState({ pictureUrl: e });
  1343. },
  1344. //关闭详情
  1345. visitCancel() {
  1346. this.setState(
  1347. {
  1348. visible: false,
  1349. },
  1350. () => {
  1351. this.setState({
  1352. activeKey: "1",
  1353. });
  1354. }
  1355. );
  1356. this.resets();
  1357. this.loadData();
  1358. },
  1359. visitOk() {
  1360. this.setState({
  1361. visible: false,
  1362. });
  1363. this.resets();
  1364. },
  1365. showDeleteConfirm(fn) {
  1366. confirm({
  1367. title: <p style={{ fontSize: 16, fontWeight: 900 }}>注意</p>,
  1368. content: (
  1369. <p style={{ fontWeight: 900, color: "red" }}>
  1370. 当前订单为外包单,您确定修改为普通订单?
  1371. </p>
  1372. ),
  1373. okText: "确定",
  1374. okType: "danger",
  1375. cancelText: "取消",
  1376. onOk() {
  1377. fn();
  1378. },
  1379. onCancel() { },
  1380. });
  1381. },
  1382. downImg() {
  1383. let num = 0;
  1384. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1385. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1386. num = i;
  1387. }
  1388. }
  1389. if (num == this.state.orgCodeUrl.length - 1) {
  1390. return message.warning("已经是最后一张了哦");
  1391. }
  1392. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  1393. this.setState({
  1394. previewImage: this.state.previewImage,
  1395. rotateDeg: 0,
  1396. });
  1397. },
  1398. upImg() {
  1399. let num = 0;
  1400. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1401. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1402. num = i;
  1403. }
  1404. }
  1405. if (num == 0) {
  1406. return message.warning("已经是第一张了哦");
  1407. }
  1408. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  1409. this.setState({
  1410. previewImage: this.state.previewImage,
  1411. rotateDeg: 0,
  1412. });
  1413. },
  1414. rotate() {
  1415. let rotateDeg = this.state.rotateDeg + 90;
  1416. this.setState({
  1417. rotateDeg,
  1418. });
  1419. },
  1420. downImgs() {
  1421. let num = 0;
  1422. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1423. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1424. num = i;
  1425. }
  1426. }
  1427. if (num == this.state.replenishUrl.length - 1) {
  1428. return message.warning("已经是最后一张了哦");
  1429. }
  1430. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  1431. this.setState({
  1432. previewImage: this.state.previewImage,
  1433. rotateDeg: 0,
  1434. });
  1435. },
  1436. upImgs() {
  1437. let num = 0;
  1438. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1439. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1440. num = i;
  1441. }
  1442. }
  1443. if (num == 0) {
  1444. return message.warning("已经是第一张了哦");
  1445. }
  1446. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  1447. this.setState({
  1448. previewImage: this.state.previewImage,
  1449. rotateDeg: 0,
  1450. });
  1451. },
  1452. rotates() {
  1453. let rotateDeg = this.state.rotateDeg + 90;
  1454. this.setState({
  1455. rotateDeg,
  1456. });
  1457. },
  1458. changeList(arr) {
  1459. const newArr = [];
  1460. this.state.columns.forEach(item => {
  1461. arr.forEach(val => {
  1462. if (val === item.title) {
  1463. newArr.push(item);
  1464. }
  1465. });
  1466. });
  1467. this.setState({
  1468. changeList: newArr
  1469. });
  1470. },
  1471. // 可展开颜色不同
  1472. addRowColor(record) {
  1473. if (!!record.splitList && record.splitList.length > 0) {
  1474. return 'light'
  1475. } else {
  1476. return 'dark'
  1477. }
  1478. },
  1479. render() {
  1480. const expandedRowRenderVip = (e) => {
  1481. const data = e.splitList;
  1482. let columns = [];
  1483. if (data instanceof Array && data.length) {
  1484. if (e.cSort == 6) {
  1485. columns = [
  1486. {
  1487. title: "负责人",
  1488. dataIndex: "receiverName",
  1489. key: "receiverName",
  1490. },
  1491. {
  1492. title: "负责人电话",
  1493. dataIndex: "receiverMobile",
  1494. key: "receiverMobile",
  1495. },
  1496. {
  1497. title: "项目状态",
  1498. dataIndex: "projectStatus",
  1499. key: "projectStatus",
  1500. render: (text) => {
  1501. return getProjectName(text);
  1502. },
  1503. },
  1504. {
  1505. title: "本次派单",
  1506. dataIndex: "serviceYear",
  1507. key: "serviceYear",
  1508. },
  1509. {
  1510. title: "项目说明",
  1511. dataIndex: "taskComment",
  1512. key: "taskComment",
  1513. render: (text) => {
  1514. return (
  1515. <Tooltip title={text}>
  1516. <div
  1517. // style={{
  1518. // width: 100,
  1519. // overflow: "hidden",
  1520. // whiteSpace: "nowrap",
  1521. // textOverflow: "ellipsis",
  1522. // }}
  1523. >{text}</div>
  1524. </Tooltip>
  1525. )
  1526. },
  1527. },
  1528. ];
  1529. } else {
  1530. columns = [
  1531. {
  1532. title: "子项目名称",
  1533. dataIndex: "taskName",
  1534. key: "taskName"
  1535. },
  1536. {
  1537. title: "子项目数量",
  1538. dataIndex: "commodityQuantity",
  1539. key: "commodityQuantity"
  1540. },
  1541. {
  1542. title: "拆分操作人",
  1543. dataIndex: "splitAname",
  1544. key: "splitAname"
  1545. },
  1546. {
  1547. title: "项目负责人",
  1548. dataIndex: "receiverName",
  1549. key: "receiverName"
  1550. },
  1551. {
  1552. title: "拆分时间",
  1553. dataIndex: "splitTimes",
  1554. key: "splitTimes"
  1555. }
  1556. ]
  1557. }
  1558. return (
  1559. <Table
  1560. columns={columns}
  1561. dataSource={data}
  1562. pagination={false}
  1563. />
  1564. );
  1565. } else {
  1566. columns = [];
  1567. return (
  1568. <p
  1569. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  1570. >
  1571. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  1572. </p>
  1573. );
  1574. }
  1575. };
  1576. const formItemLayout = {
  1577. labelCol: { span: 8 },
  1578. wrapperCol: { span: 14 },
  1579. };
  1580. const FormItem = Form.Item;
  1581. const { TabPane } = Tabs;
  1582. const { TextArea } = Input;
  1583. const { RangePicker } = DatePicker;
  1584. const cuiDataList = this.state.contactList || [];
  1585. return (
  1586. <div className="user-content">
  1587. <textarea id="copyText" style={{ opacity: 0 }} />
  1588. {this.state.resVisible ? (
  1589. <ResolutionDetail
  1590. cancel={this.resCancel}
  1591. detail={this.state.resRecord}
  1592. visible={this.state.resVisible}
  1593. id={this.state.resRecord.orderNo}
  1594. />
  1595. ) : (
  1596. ""
  1597. )}
  1598. <ShowModalDiv ShowModal={this.state.showModal} />
  1599. <div className="content-title" style={{ marginBottom: 10 }}>
  1600. <span style={{ fontWeight: 900, fontSize: 16 }}>订单审核</span>
  1601. </div>
  1602. <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
  1603. <TabPane tab="搜索" key="1">
  1604. <div className="user-search">
  1605. <Input
  1606. placeholder="客户名称"
  1607. style={{
  1608. width: "150px",
  1609. marginBottom: "10px",
  1610. marginLeft: 10,
  1611. }}
  1612. value={this.state.customerName}
  1613. onChange={(e) => {
  1614. this.setState({ customerName: e.target.value });
  1615. }}
  1616. />
  1617. <Input
  1618. placeholder="订单编号"
  1619. style={{ width: "150px" }}
  1620. value={this.state.orderNoSearch}
  1621. onChange={(e) => {
  1622. this.setState({ orderNoSearch: e.target.value });
  1623. }}
  1624. />
  1625. <Select
  1626. style={{ width: 120 }}
  1627. placeholder="特批状态"
  1628. value={this.state.approvalSearch}
  1629. onChange={(e) => {
  1630. this.setState({
  1631. approvalSearch: e,
  1632. });
  1633. }}
  1634. >
  1635. <Option value="0">非特批</Option>
  1636. <Option value="1">特批待审</Option>
  1637. <Option value="2">特批通过</Option>
  1638. <Option value="4">全部特批</Option>
  1639. </Select>
  1640. <Select
  1641. style={{ width: 120 }}
  1642. placeholder="签单金额"
  1643. value={this.state.amountStatus}
  1644. onChange={(e) => {
  1645. this.setState({
  1646. amountStatus: e,
  1647. });
  1648. }}
  1649. >
  1650. <Option value="0">10万元以下</Option>
  1651. <Option value="1">10~20万元</Option>
  1652. <Option value="2">20~30万元</Option>
  1653. <Option value="3">30~40万元</Option>
  1654. <Option value="4">40万元以上</Option>
  1655. </Select>
  1656. <Select
  1657. style={{ width: 120 }}
  1658. placeholder="会员状态"
  1659. value={this.state.projectType}
  1660. onChange={(e) => {
  1661. this.setState({
  1662. projectType: e,
  1663. });
  1664. }}
  1665. >
  1666. <Option value="1">会员</Option>
  1667. <Option value="0">非会员</Option>
  1668. </Select>
  1669. <Select
  1670. style={{ width: 150 }}
  1671. placeholder="流程状态"
  1672. value={this.state.processStatusSearch}
  1673. onChange={e => {
  1674. this.setState({
  1675. processStatusSearch: e
  1676. });
  1677. }}
  1678. >
  1679. <Option value="">全部</Option>
  1680. <Option value="0">已派营销员</Option>
  1681. <Option value="1">已派营销员管理员</Option>
  1682. <Option value="2">已派财务管理员</Option>
  1683. <Option value="3">已派财务专员</Option>
  1684. <Option value="4">已派咨询师管理员</Option>
  1685. <Option value="5">已部分派咨询师经理</Option>
  1686. <Option value="6">已部全部派咨询师经理</Option>
  1687. </Select>
  1688. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1689. <RangePicker
  1690. value={[
  1691. this.state.releaseDate[0]
  1692. ? moment(this.state.releaseDate[0])
  1693. : null,
  1694. this.state.releaseDate[1]
  1695. ? moment(this.state.releaseDate[1])
  1696. : null,
  1697. ]}
  1698. onChange={(data, dataString) => {
  1699. this.setState({ releaseDate: dataString });
  1700. }}
  1701. />
  1702. <Button
  1703. type="primary"
  1704. onClick={this.search}
  1705. style={{ marginLeft: "10px" }}
  1706. >
  1707. 搜索
  1708. </Button>
  1709. <Button onClick={this.reset}>重置</Button>
  1710. </div>
  1711. </TabPane>
  1712. <TabPane tab="更改表格显示数据" key="2">
  1713. <div style={{ marginLeft: 10 }}>
  1714. <ChooseList
  1715. columns={this.state.columns}
  1716. changeFn={this.changeList}
  1717. changeList={this.state.changeList}
  1718. top={55}
  1719. margin={11}
  1720. />
  1721. </div>
  1722. </TabPane>
  1723. </Tabs>
  1724. <div className="patent-table">
  1725. <Spin spinning={this.state.loading}>
  1726. <Table
  1727. columns={
  1728. this.state.changeList
  1729. ? this.state.changeList
  1730. : this.state.columns
  1731. }
  1732. dataSource={this.state.dataSource}
  1733. pagination={this.state.pagination}
  1734. onRowClick={this.tableRowClick}
  1735. bordered
  1736. size="small"
  1737. />
  1738. </Spin>
  1739. {this.state.visible ? <Modal
  1740. maskClosable={false}
  1741. className="customeDetails"
  1742. footer=""
  1743. width="1200px"
  1744. visible={this.state.visible}
  1745. onOk={this.visitOk}
  1746. onCancel={this.visitCancel}
  1747. >
  1748. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1749. <TabPane tab="订单详情" key="1">
  1750. <Form
  1751. layout="horizontal"
  1752. onSubmit={this.handleSubmit}
  1753. id="demand-form"
  1754. style={{ paddingBottom: "40px" }}
  1755. >
  1756. <Spin spinning={this.state.loading}>
  1757. <div className="clearfix">
  1758. <div style={{ position: "absolute", top: '-30px', left: '92px', zIndex: 10000 }}>
  1759. <OrderItemStatus deleteSign={this.state.deleteSign} />
  1760. </div>
  1761. <FormItem
  1762. className="half-item"
  1763. {...formItemLayout}
  1764. label="订单编号"
  1765. >
  1766. <span>{this.state.orderNo}</span>
  1767. </FormItem>
  1768. <FormItem
  1769. className="half-item"
  1770. {...formItemLayout}
  1771. label="合同编号"
  1772. >
  1773. <span>{this.state.contractNo}</span>
  1774. </FormItem>
  1775. <FormItem
  1776. className="half-item"
  1777. {...formItemLayout}
  1778. label="客户名称"
  1779. >
  1780. <span>{this.state.userName}</span>
  1781. <EnterpriseNameChange
  1782. type='journal'
  1783. style={{ marginLeft: 10 }}
  1784. enterpriseId={this.state.orderUid} />
  1785. </FormItem>
  1786. <FormItem
  1787. className="half-item"
  1788. {...formItemLayout}
  1789. label="销售类型"
  1790. >
  1791. <span>
  1792. {(["私有客户-", "签单客户-"][this.state.userType] || " ") +
  1793. (salesList[this.state.salesType] || "")}
  1794. {
  1795. this.state.other != null && this.state.other != "" &&
  1796. <Tooltip title={this.state.other}>
  1797. <span>
  1798. {"(" + this.state.other.toString().slice(0, 10) + (this.state.other.toString().length > 9 ? "...)" : ")")}
  1799. </span>
  1800. </Tooltip>
  1801. }
  1802. </span>
  1803. {/* <span>{(["私有客户-", "签单客户-"][this.state.userType] || " ") +
  1804. (salesList[this.state.salesType] || "")}
  1805. </span> */}
  1806. </FormItem>
  1807. <FormItem
  1808. className="half-item"
  1809. {...formItemLayout}
  1810. label="合同签订时间"
  1811. >
  1812. <span>{this.state.signDate}</span>
  1813. </FormItem>
  1814. <FormItem
  1815. className="half-item"
  1816. {...formItemLayout}
  1817. label="流程状态"
  1818. >
  1819. <span>
  1820. {getProcessStatus(this.state.processStatus)}
  1821. </span>
  1822. </FormItem>
  1823. <FormItem
  1824. className="half-item"
  1825. {...formItemLayout}
  1826. label="结算状态"
  1827. >
  1828. <span>
  1829. {getLiquidationStatus(this.state.liquidationStatus)}
  1830. </span>
  1831. </FormItem>
  1832. <FormItem
  1833. className="half-item"
  1834. {...formItemLayout}
  1835. label="企业联系人"
  1836. >
  1837. <span>{this.state.contacts}</span>
  1838. </FormItem>
  1839. <FormItem
  1840. className="half-item"
  1841. {...formItemLayout}
  1842. label="联系人电话"
  1843. >
  1844. <span>{this.state.contactMobile}</span>
  1845. </FormItem>
  1846. <FormItem
  1847. className="half-item"
  1848. {...formItemLayout}
  1849. label="企业法人"
  1850. >
  1851. <span>{this.state.legalPerson}</span>
  1852. </FormItem>
  1853. <FormItem
  1854. className="half-item"
  1855. {...formItemLayout}
  1856. label="法人电话"
  1857. >
  1858. <span>{this.state.legalPersonTel}</span>
  1859. </FormItem>
  1860. <FormItem
  1861. className="half-item"
  1862. {...formItemLayout}
  1863. label="签单金额(万元)"
  1864. >
  1865. <span>{this.state.totalAmount}</span>
  1866. </FormItem>
  1867. <FormItem
  1868. className="half-item"
  1869. {...formItemLayout}
  1870. label="首付金额(万元)"
  1871. >
  1872. <span>{this.state.firstAmount}</span>
  1873. </FormItem>
  1874. <FormItem
  1875. className="half-item"
  1876. {...formItemLayout}
  1877. label="特批立项"
  1878. >
  1879. <span>{getApprovedState(this.state.approval)}</span>
  1880. </FormItem>
  1881. <FormItem
  1882. className="half-item"
  1883. {...formItemLayout}
  1884. label="已收款项(万元)"
  1885. >
  1886. <span>{this.state.settlementAmount}</span>
  1887. </FormItem>
  1888. <FormItem
  1889. className="half-item"
  1890. {...formItemLayout}
  1891. label="订单部门"
  1892. >
  1893. <span>{this.state.depName}</span>
  1894. </FormItem>
  1895. <FormItem
  1896. className="half-item"
  1897. {...formItemLayout}
  1898. label="是否外包"
  1899. >
  1900. {this.state.outsource}
  1901. </FormItem>
  1902. <div className="clearfix">
  1903. <FormItem
  1904. labelCol={{ span: 4 }}
  1905. wrapperCol={{ span: 16 }}
  1906. label="订单留言"
  1907. >
  1908. <p style={{ width: 500, wordWrap: "break-word" }}>
  1909. {this.state.orderRemarks}
  1910. </p>
  1911. </FormItem>
  1912. </div>
  1913. <div className="clearfix">
  1914. <div>
  1915. <FormItem
  1916. labelCol={{ span: 4 }}
  1917. wrapperCol={{ span: 18 }}
  1918. label="合同扫描件"
  1919. >
  1920. {/*<Upload*/}
  1921. {/* className="demandDetailShow-upload"*/}
  1922. {/* listType="picture-card"*/}
  1923. {/* fileList={this.state.orgCodeUrl}*/}
  1924. {/* onPreview={(file) => {*/}
  1925. {/* this.setState({*/}
  1926. {/* previewImage: file.url || file.thumbUrl,*/}
  1927. {/* previewVisible: true,*/}
  1928. {/* });*/}
  1929. {/* }}*/}
  1930. {/*/>*/}
  1931. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1932. {this.state.orgCodeUrl && this.state.visible ? <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'} /> : <div />}
  1933. </div>
  1934. {this.state.previewVisible ? <Modal
  1935. maskClosable={false}
  1936. footer={null}
  1937. width={"50%"}
  1938. visible={this.state.previewVisible}
  1939. onCancel={() => {
  1940. this.setState({
  1941. previewVisible: false,
  1942. rotateDeg: 0,
  1943. });
  1944. }}
  1945. >
  1946. <img
  1947. alt=""
  1948. style={{
  1949. width: "100%",
  1950. transform: `rotate(${this.state.rotateDeg}deg)`,
  1951. }}
  1952. src={this.state.previewImage || ""}
  1953. />
  1954. <Button
  1955. onClick={this.rotate}
  1956. style={{
  1957. position: "relative",
  1958. left: "50%",
  1959. transform: "translateX(-50%)",
  1960. }}
  1961. >
  1962. 旋转
  1963. </Button>
  1964. <Button
  1965. onClick={this.upImg}
  1966. style={{
  1967. position: "absolute",
  1968. left: -81,
  1969. top: "50%",
  1970. transform: "translateY(-50%)",
  1971. }}
  1972. >
  1973. 上一张
  1974. </Button>
  1975. <Button
  1976. onClick={this.downImg}
  1977. style={{
  1978. position: "absolute",
  1979. right: -81,
  1980. top: "50%",
  1981. transform: "translateY(-50%)",
  1982. }}
  1983. >
  1984. 下一张
  1985. </Button>
  1986. </Modal> : <div />}
  1987. <Button
  1988. style={{
  1989. float: "right",
  1990. marginRight: "140px",
  1991. marginTop: "20px",
  1992. }}
  1993. onClick={this.getOrderLog}
  1994. >
  1995. 查看订单日志
  1996. </Button>
  1997. </FormItem>
  1998. <FormItem
  1999. labelCol={{ span: 4 }}
  2000. wrapperCol={{ span: 18 }}
  2001. label="补充协议"
  2002. >
  2003. {/*<Upload*/}
  2004. {/* className="demandDetailShow-upload"*/}
  2005. {/* listType="picture-card"*/}
  2006. {/* fileList={this.state.replenishUrl}*/}
  2007. {/* onPreview={(file) => {*/}
  2008. {/* this.setState({*/}
  2009. {/* previewImage: file.url || file.thumbUrl,*/}
  2010. {/* previewVisibles: true,*/}
  2011. {/* });*/}
  2012. {/* }}*/}
  2013. {/*/>*/}
  2014. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  2015. {this.state.replenishUrl && this.state.visible ? <ImgList domId={'examine1'} fileList={this.state.replenishUrl} ItemWidth={'96px'} /> : <div />}
  2016. </div>
  2017. {this.state.previewVisibles ? <Modal
  2018. maskClosable={false}
  2019. footer={null}
  2020. width={"50%"}
  2021. visible={this.state.previewVisibles}
  2022. onCancel={() => {
  2023. this.setState({
  2024. previewVisibles: false,
  2025. rotateDeg: 0,
  2026. });
  2027. }}
  2028. >
  2029. <img
  2030. alt=""
  2031. style={{
  2032. width: "100%",
  2033. transform: `rotate(${this.state.rotateDeg}deg)`,
  2034. }}
  2035. src={this.state.previewImage || ""}
  2036. />
  2037. <Button
  2038. onClick={this.rotate}
  2039. style={{
  2040. position: "relative",
  2041. left: "50%",
  2042. transform: "translateX(-50%)",
  2043. }}
  2044. >
  2045. 旋转
  2046. </Button>
  2047. <Button
  2048. onClick={this.upImgs}
  2049. style={{
  2050. position: "absolute",
  2051. left: -81,
  2052. top: "50%",
  2053. transform: "translateY(-50%)",
  2054. }}
  2055. >
  2056. 上一张
  2057. </Button>
  2058. <Button
  2059. onClick={this.downImgs}
  2060. style={{
  2061. position: "absolute",
  2062. right: -81,
  2063. top: "50%",
  2064. transform: "translateY(-50%)",
  2065. }}
  2066. >
  2067. 下一张
  2068. </Button>
  2069. </Modal> : <div />}
  2070. </FormItem>
  2071. </div>
  2072. </div>
  2073. <ContentUrl
  2074. processStatus={1}
  2075. domId={"examineContents"}
  2076. contentUrl={this.state.contentUrl}
  2077. imgId={"examineContentsImg"}
  2078. />
  2079. <div className="clearfix">
  2080. <FormItem
  2081. className="half-item"
  2082. {...formItemLayout}
  2083. label="订单负责人"
  2084. >
  2085. <span>{this.state.salesmanName}</span>
  2086. </FormItem>
  2087. <FormItem
  2088. className="half-item"
  2089. {...formItemLayout}
  2090. label="订单负责人电话"
  2091. >
  2092. <span>{this.state.salesmanMobile}</span>
  2093. </FormItem>
  2094. </div>
  2095. <div className="clearfix">
  2096. <FormItem
  2097. className="half-item"
  2098. {...formItemLayout}
  2099. label="当前财务负责人"
  2100. >
  2101. <span>{this.state.nowFinance}</span>
  2102. </FormItem>
  2103. <FormItem
  2104. className="half-item"
  2105. {...formItemLayout}
  2106. label="当前财务负责人电话"
  2107. >
  2108. <span>{this.state.nowFinanceMobile}</span>
  2109. </FormItem>
  2110. </div>
  2111. <div className="clearfix">
  2112. <FormItem
  2113. className="half-item"
  2114. {...formItemLayout}
  2115. style={{ opacity: ".5" }}
  2116. label="原订单负责人"
  2117. >
  2118. <span>{this.state.oldSalesmanName}</span>
  2119. </FormItem>
  2120. <FormItem
  2121. className="half-item"
  2122. {...formItemLayout}
  2123. style={{ opacity: ".5" }}
  2124. label="原订单负责人电话"
  2125. >
  2126. <span>{this.state.oldSalesmanMobile}</span>
  2127. </FormItem>
  2128. </div>
  2129. <div className="clearfix">
  2130. <FormItem
  2131. className="half-item"
  2132. style={{ opacity: ".5" }}
  2133. {...formItemLayout}
  2134. label="实际财务操作人"
  2135. >
  2136. <span>{this.state.financeName}</span>
  2137. </FormItem>
  2138. <FormItem
  2139. className="half-item"
  2140. {...formItemLayout}
  2141. style={{ opacity: ".5" }}
  2142. label="实际财务操作人电话"
  2143. >
  2144. <span>{this.state.financeMobile}</span>
  2145. </FormItem>
  2146. </div>
  2147. {/* 协单人员 */}
  2148. <OrderCoor orderNo={this.state.orderNos} />
  2149. <div>
  2150. <span
  2151. style={{ marginLeft: "50px", fontSize: "20px" }}
  2152. >
  2153. 项目业务
  2154. </span>
  2155. {this.state.processStatus == 0 ? (
  2156. <Button
  2157. type="primary"
  2158. onClick={this.addDetailed}
  2159. style={{
  2160. float: "right",
  2161. marginRight: "50px",
  2162. marginBottom: "15px",
  2163. }}
  2164. >
  2165. 添加项目明细
  2166. </Button>
  2167. ) : (
  2168. ""
  2169. )}
  2170. </div>
  2171. <div className="patent-table">
  2172. <Spin spinning={this.state.loading}>
  2173. <Table
  2174. columns={this.state.columnsX}
  2175. dataSource={this.state.dataSourceX}
  2176. pagination={this.state.paginations}
  2177. onRowClick={this.tableRowClickX}
  2178. expandedRowRender={expandedRowRenderVip}
  2179. rowClassName={this.addRowColor}
  2180. bordered
  2181. size="small"
  2182. />
  2183. </Spin>
  2184. </div>
  2185. <div>
  2186. <span
  2187. style={{ marginLeft: "50px", fontSize: "20px" }}
  2188. >
  2189. 催款节点
  2190. </span>
  2191. <span
  2192. style={{
  2193. display: cuiDataList.length
  2194. ? "none"
  2195. : "inline-block",
  2196. marginLeft: 10,
  2197. color: "red",
  2198. }}
  2199. >
  2200. 金额总计(万元): {this.state.totalCui}
  2201. </span>
  2202. {this.state.processStatus == 0 ? (
  2203. <Button
  2204. type="primary"
  2205. onClick={this.addcontact}
  2206. style={{
  2207. float: "right",
  2208. marginRight: "50px",
  2209. marginBottom: "15px",
  2210. }}
  2211. >
  2212. 添加催款节点
  2213. </Button>
  2214. ) : (
  2215. ""
  2216. )}
  2217. </div>
  2218. <div className="clearfix">
  2219. <Spin spinning={this.state.loading}>
  2220. <Form layout="horizontal" id="demand-form">
  2221. <Table
  2222. pagination={false}
  2223. bordered
  2224. size="small"
  2225. columns={
  2226. cuiDataList.length
  2227. ? this.state.ContactsLists
  2228. : this.state.ContactsListsNew
  2229. }
  2230. dataSource={
  2231. cuiDataList.length
  2232. ? this.state.contactList
  2233. : this.state.contactListNew
  2234. }
  2235. />
  2236. <Col
  2237. span={24}
  2238. offset={9}
  2239. style={{ marginTop: "15px" }}
  2240. ></Col>
  2241. </Form>
  2242. </Spin>
  2243. </div>
  2244. <div className="addSave" style={{ marginTop: "15px" }}>
  2245. <Button
  2246. type="primary"
  2247. // onClick={this.examOk}
  2248. onClick={() => {
  2249. // if (this.state.outsource == "是") {
  2250. // this.showDeleteConfirm(this.examOk);
  2251. // } else {
  2252. // this.examOk();
  2253. // }
  2254. this.setState({
  2255. agreeVisible: true,
  2256. reason: "",
  2257. });
  2258. }}
  2259. style={{ marginLeft: "200px" }}
  2260. htmlType="submit"
  2261. >
  2262. 通过
  2263. </Button>
  2264. <Button
  2265. type="primary"
  2266. onClick={this.examNo}
  2267. style={{ marginLeft: "50px" }}
  2268. htmlType="submit"
  2269. >
  2270. 驳回
  2271. </Button>
  2272. <Button
  2273. type="ghost"
  2274. onClick={this.visitCancel}
  2275. style={{ marginLeft: "50px" }}
  2276. >
  2277. 取消
  2278. </Button>
  2279. {/*<Button className='warn-button' type="primary" onClick={this.outsourcing} style={{marginLeft:"50px"}}>通过不走总部</Button>
  2280. <p className='hint'>提示:高于总部价格,费用个人承担!</p>*/}
  2281. </div>
  2282. </div>
  2283. </Spin>
  2284. </Form>
  2285. </TabPane>
  2286. {/* <TabPane tab="外包(不走总部)" key="2">
  2287. <Spin spinning={this.state.loading}>
  2288. <div className="clearfix" style={{ marginTop: 10 }}>
  2289. <FormItem
  2290. className="half-item"
  2291. {...formItemLayout}
  2292. label={
  2293. <span>
  2294. <strong style={{ color: "#f00" }}>*</strong>外包公司
  2295. </span>
  2296. }
  2297. >
  2298. <Input
  2299. value={this.state.companyName}
  2300. onChange={(e) => {
  2301. this.setState({
  2302. companyName: e.target.value,
  2303. });
  2304. }}
  2305. placeholder="请填写外包公司名称"
  2306. />
  2307. </FormItem>
  2308. <span className="tip">如多个公司,请用间隔</span>
  2309. </div>
  2310. <div className="clearfix">
  2311. <FormItem
  2312. className="half-item"
  2313. {...formItemLayout}
  2314. label={
  2315. <span>
  2316. <strong style={{ color: "#f00" }}>*</strong>
  2317. 单价(万元)
  2318. </span>
  2319. }
  2320. >
  2321. <Input
  2322. value={this.state.unitPrice}
  2323. onChange={(e) => {
  2324. this.setState({
  2325. unitPrice: e.target.value,
  2326. });
  2327. }}
  2328. placeholder="请填写单价"
  2329. />
  2330. </FormItem>
  2331. </div>
  2332. <div className="clearfix">
  2333. <FormItem
  2334. className="half-item"
  2335. {...formItemLayout}
  2336. label={
  2337. <span>
  2338. <strong style={{ color: "#f00" }}>*</strong>数量(个)
  2339. </span>
  2340. }
  2341. >
  2342. <Input
  2343. value={this.state.unitNumber}
  2344. onChange={(e) => {
  2345. this.setState({
  2346. unitNumber: e.target.value,
  2347. });
  2348. }}
  2349. placeholder="请填写数量"
  2350. />
  2351. </FormItem>
  2352. </div>
  2353. <div className="clearfix">
  2354. <FormItem
  2355. className="half-item"
  2356. {...formItemLayout}
  2357. label={
  2358. <span>
  2359. <strong style={{ color: "#f00" }}>*</strong>
  2360. 总金额(万元)
  2361. </span>
  2362. }
  2363. >
  2364. <Input
  2365. value={this.state.amount}
  2366. onChange={(e) => {
  2367. this.setState({
  2368. amount: e.target.value,
  2369. });
  2370. }}
  2371. placeholder="请填写本次外包公司的价格"
  2372. />
  2373. </FormItem>
  2374. </div>
  2375. <div className="clearfix">
  2376. <FormItem
  2377. className="half-item"
  2378. style={{ height: "auto" }}
  2379. {...formItemLayout}
  2380. label={
  2381. <span>
  2382. <strong style={{ color: "#f00" }}>*</strong>备注
  2383. </span>
  2384. }
  2385. >
  2386. <TextArea
  2387. rows={4}
  2388. value={this.state.outsourceRemarks}
  2389. onChange={(e) => {
  2390. this.setState({
  2391. outsourceRemarks: e.target.value,
  2392. });
  2393. }}
  2394. placeholder="请输入备注"
  2395. />
  2396. </FormItem>
  2397. </div>
  2398. <p
  2399. className="tip"
  2400. style={{
  2401. paddingBottom: "12px",
  2402. width: "240px",
  2403. marginLeft: "145px",
  2404. }}
  2405. >
  2406. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  2407. </p>
  2408. <div className="clearfix">
  2409. <FormItem
  2410. labelCol={{ span: 4 }}
  2411. wrapperCol={{ span: 18 }}
  2412. label={
  2413. <span>
  2414. <strong style={{ color: "#f00" }}>*</strong>
  2415. 合同/协议扫描件
  2416. <span style={{ color: "#f00" }}>(外包合同)</span>
  2417. </span>
  2418. }
  2419. >
  2420. <PicturesWall
  2421. fileList={this.getOrgCodeUrl}
  2422. pictureUrl={this.state.pictureUrl}
  2423. />
  2424. <p>请上传与外包公司签订的合同协议</p>
  2425. <p>图片建议:要清晰。</p>
  2426. </FormItem>
  2427. </div>
  2428. <div className="clearfix">
  2429. <div
  2430. style={{ display: "inline-black", textAlign: "center" }}
  2431. >
  2432. <Button type="primary" onClick={this.sureOut}>
  2433. 确认发起外包,不通过总部
  2434. </Button>
  2435. <p className="tip">提示:高于总部价格,费用个人承担</p>
  2436. </div>
  2437. </div>
  2438. </Spin>
  2439. </TabPane> */}
  2440. </Tabs>
  2441. </Modal> : <div />}
  2442. {this.state.noVisible ? <Modal
  2443. maskClosable={false}
  2444. visible={this.state.noVisible}
  2445. onOk={this.handleOk}
  2446. onCancel={this.noCancel}
  2447. width="400px"
  2448. title={"拒绝理由"}
  2449. footer=""
  2450. className="admin-desc-content"
  2451. confirmLoading={this.state.confirmLoading}
  2452. >
  2453. <Form layout="horizontal" id="demand-form">
  2454. <Spin spinning={this.state.loading}>
  2455. <div className="clearfix">
  2456. <FormItem
  2457. labelCol={{ span: 4 }}
  2458. wrapperCol={{ span: 16 }}
  2459. label="拒绝理由"
  2460. >
  2461. <Input
  2462. type="textarea"
  2463. placeholder="请输入拒绝理由"
  2464. rows={4}
  2465. value={this.state.reason}
  2466. onChange={(e) => {
  2467. this.setState({ reason: e.target.value });
  2468. }}
  2469. />
  2470. </FormItem>
  2471. </div>
  2472. <div className="clearfix">
  2473. <Button
  2474. className="cancel"
  2475. type="primary"
  2476. onClick={this.examOks}
  2477. style={{ marginLeft: "50px" }}
  2478. htmlType="submit"
  2479. loading={this.state.aloading}
  2480. >
  2481. 确定
  2482. </Button>
  2483. <Button
  2484. className="cancel"
  2485. type="ghost"
  2486. onClick={this.noCancel}
  2487. style={{ marginLeft: "50px" }}
  2488. >
  2489. 取消
  2490. </Button>
  2491. </div>
  2492. </Spin>
  2493. </Form>
  2494. </Modal> : <div />}
  2495. {this.state.agreeVisible ? <Modal
  2496. maskClosable={false}
  2497. visible={this.state.agreeVisible}
  2498. onOk={(e) => {
  2499. this.setState({
  2500. agreeVisible: false,
  2501. });
  2502. }}
  2503. onCancel={(e) => {
  2504. this.setState({
  2505. agreeVisible: false,
  2506. });
  2507. }}
  2508. width="400px"
  2509. title={"同意备注"}
  2510. footer=""
  2511. className="admin-desc-content"
  2512. confirmLoading={this.state.confirmLoading}
  2513. >
  2514. <Form layout="horizontal" id="demand-form">
  2515. <Spin spinning={this.state.loading}>
  2516. <div className="clearfix">
  2517. <FormItem
  2518. labelCol={{ span: 4 }}
  2519. wrapperCol={{ span: 16 }}
  2520. label="同意理由"
  2521. >
  2522. <Input
  2523. type="textarea"
  2524. placeholder="请输入同意理由"
  2525. rows={4}
  2526. value={this.state.reason}
  2527. onChange={(e) => {
  2528. this.setState({ reason: e.target.value });
  2529. }}
  2530. />
  2531. </FormItem>
  2532. </div>
  2533. <div className="clearfix">
  2534. <Button
  2535. className="cancel"
  2536. type="primary"
  2537. onClick={(e) => {
  2538. if (this.state.outsource == "是") {
  2539. this.showDeleteConfirm(this.examOk);
  2540. } else {
  2541. this.examOk();
  2542. }
  2543. }}
  2544. style={{ marginLeft: "50px" }}
  2545. htmlType="submit"
  2546. loading={this.state.aloading}
  2547. >
  2548. 确定
  2549. </Button>
  2550. <Button
  2551. className="cancel"
  2552. type="ghost"
  2553. onClick={(e) => {
  2554. this.setState({
  2555. agreeVisible: false,
  2556. });
  2557. }}
  2558. style={{ marginLeft: "50px" }}
  2559. >
  2560. 取消
  2561. </Button>
  2562. </div>
  2563. </Spin>
  2564. </Form>
  2565. </Modal> : <div />}
  2566. {/* <Modal
  2567. visible={this.state.rizhivisible}
  2568. className="admin-desc-content"
  2569. width="800px"
  2570. maskClosable={false}
  2571. title="订单日志"
  2572. footer={null}
  2573. onCancel={this.closeOrderLog}
  2574. >
  2575. <div className="patent-table">
  2576. <Spin spinning={this.state.loading}>
  2577. <Table
  2578. columns={this.state.columnsrizhi}
  2579. dataSource={this.state.dataSourcerizhi}
  2580. pagination={false}
  2581. />
  2582. </Spin>
  2583. </div>
  2584. </Modal> */}
  2585. <OrderRiZi
  2586. dataSourcerizhi={this.state.dataSourcerizhi}
  2587. closeOrderLog={this.closeOrderLog}
  2588. visible={this.state.rizhivisible}
  2589. loading={this.state.loading}
  2590. />
  2591. </div>
  2592. {this.state.addnextVisible &&
  2593. <NewEditProject
  2594. readOnly={this.state.dataInfor && Object.keys(this.state.dataInfor).length > 0 && this.state.processStatus !== 0}
  2595. orderNo={this.state.orderNo}
  2596. visible={this.state.addnextVisible}
  2597. dataInfor={this.state.dataInfor}
  2598. onCancel={this.nextCancel}
  2599. />
  2600. // <ProjectDetailsReadOnly
  2601. // infor={this.state.dataInfor}
  2602. // visible={this.state.addnextVisible}
  2603. // onCancel={this.nextCancel}
  2604. // />
  2605. }
  2606. </div>
  2607. );
  2608. },
  2609. })
  2610. );
  2611. export default IntentionCustomer;