examine.jsx 90 KB

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