outsourcingList.jsx 77 KB

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