examine.jsx 90 KB

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