examine.jsx 85 KB

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