examine.jsx 90 KB

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