examine.jsx 86 KB

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