examine.jsx 89 KB

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