examine.jsx 77 KB

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