outsourcingList.jsx 77 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253
  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. <span
  1607. style={{ marginLeft: "50px", fontSize: "20px" }}
  1608. >
  1609. 项目业务
  1610. </span>
  1611. {this.state.processStatus == 0 ? (
  1612. <Button
  1613. type="primary"
  1614. onClick={this.addDetailed}
  1615. style={{
  1616. float: "right",
  1617. marginRight: "50px",
  1618. marginBottom: "15px"
  1619. }}
  1620. >
  1621. 添加项目明细
  1622. </Button>
  1623. ) : (
  1624. ""
  1625. )}
  1626. </div>
  1627. <div className="patent-table">
  1628. <Spin spinning={this.state.loading}>
  1629. <Table
  1630. columns={this.state.columnsX}
  1631. dataSource={this.state.dataSourceX}
  1632. pagination={this.state.paginations}
  1633. onRowClick={this.tableRowClickX}
  1634. bordered
  1635. size="small"
  1636. />
  1637. </Spin>
  1638. </div>
  1639. <div
  1640. style={{
  1641. display: cuiDataList.length ? "block" : "none"
  1642. }}
  1643. >
  1644. <span
  1645. style={{ marginLeft: "50px", fontSize: "20px" }}
  1646. >
  1647. 催款节点
  1648. </span>
  1649. {this.state.processStatus == 0 ? (
  1650. <Button
  1651. type="primary"
  1652. onClick={this.addcontact}
  1653. disabled
  1654. style={{
  1655. float: "right",
  1656. marginRight: "50px",
  1657. marginBottom: "15px"
  1658. }}
  1659. >
  1660. 添加催款节点
  1661. </Button>
  1662. ) : (
  1663. ""
  1664. )}
  1665. </div>
  1666. <div
  1667. className="clearfix"
  1668. style={{
  1669. display: cuiDataList.length ? "block" : "none"
  1670. }}
  1671. >
  1672. <Spin spinning={this.state.loading}>
  1673. <Form layout="horizontal" id="demand-form">
  1674. <Table
  1675. pagination={false}
  1676. columns={this.state.ContactsLists}
  1677. dataSource={this.state.contactList}
  1678. bordered
  1679. size="small"
  1680. scroll={{ x: "max-content", y: 0 }}
  1681. />
  1682. <Col
  1683. span={24}
  1684. offset={9}
  1685. style={{ marginTop: "15px" }}
  1686. ></Col>
  1687. </Form>
  1688. </Spin>
  1689. </div>
  1690. <div
  1691. style={{
  1692. display: cuiDataList.length ? "none" : "block"
  1693. }}
  1694. >
  1695. <span
  1696. style={{ marginLeft: "50px", fontSize: "20px" }}
  1697. >
  1698. 催款节点
  1699. </span>
  1700. {this.state.processStatus == 0 ? (
  1701. <Button
  1702. type="primary"
  1703. onClick={this.addcontactNew}
  1704. disabled={cuiDataList.length ? true : false}
  1705. style={{
  1706. float: "right",
  1707. marginRight: "50px",
  1708. marginBottom: "15px"
  1709. }}
  1710. >
  1711. 添加催款节点
  1712. </Button>
  1713. ) : (
  1714. ""
  1715. )}
  1716. </div>
  1717. <div
  1718. className="clearfix"
  1719. style={{
  1720. display: cuiDataList.length ? "none" : "block"
  1721. }}
  1722. >
  1723. <Spin spinning={this.state.loading}>
  1724. <Form layout="horizontal" id="demand-form">
  1725. <Table
  1726. pagination={false}
  1727. columns={this.state.ContactsListsNew}
  1728. dataSource={this.state.contactListNew}
  1729. bordered
  1730. size="small"
  1731. scroll={{ x: "max-content", y: 0 }}
  1732. />
  1733. <Col
  1734. span={24}
  1735. offset={9}
  1736. style={{ marginTop: "15px" }}
  1737. ></Col>
  1738. </Form>
  1739. </Spin>
  1740. </div>
  1741. {this.state.refundStatus === 2 ? (
  1742. <div
  1743. className="addSave"
  1744. style={{ marginTop: "15px" }}
  1745. >
  1746. <Button
  1747. type="primary"
  1748. onClick={this.examOk}
  1749. style={{ marginLeft: "200px" }}
  1750. htmlType="submit"
  1751. >
  1752. 通过
  1753. </Button>
  1754. <Button
  1755. type="primary"
  1756. onClick={this.examNo}
  1757. style={{ marginLeft: "50px" }}
  1758. htmlType="submit"
  1759. >
  1760. 驳回
  1761. </Button>
  1762. <Button
  1763. type="ghost"
  1764. onClick={this.visitCancel}
  1765. style={{ marginLeft: "50px" }}
  1766. >
  1767. 取消
  1768. </Button>
  1769. {/*<Button className='warn-button' type="primary" onClick={this.outsourcing} style={{marginLeft:"50px"}}>通过不走总部</Button>
  1770. <p className='hint'>提示:高于总部价格,费用个人承担!</p>*/}
  1771. </div>
  1772. ) : (
  1773. ""
  1774. )}
  1775. </div>
  1776. </Spin>
  1777. </Form>
  1778. </TabPane>
  1779. <TabPane tab="外包(不走总部)" key="2">
  1780. {this.state.refundStatus === 2 ? (
  1781. <div>
  1782. <div className="clearfix">
  1783. <FormItem
  1784. className="half-item"
  1785. {...formItemLayout}
  1786. label={
  1787. <span>
  1788. <strong style={{ color: "#f00" }}>*</strong>
  1789. 外包公司
  1790. </span>
  1791. }
  1792. >
  1793. <Input
  1794. value={this.state.companyName}
  1795. onChange={e => {
  1796. this.setState({
  1797. companyName: e.target.value
  1798. });
  1799. }}
  1800. placeholder="请填写外包公司名称"
  1801. />
  1802. </FormItem>
  1803. <span className="tip">如多个公司,请用间隔</span>
  1804. </div>
  1805. <div className="clearfix">
  1806. <FormItem
  1807. className="half-item"
  1808. {...formItemLayout}
  1809. label={
  1810. <span>
  1811. <strong style={{ color: "#f00" }}>*</strong>
  1812. 单价(万元)
  1813. </span>
  1814. }
  1815. >
  1816. <Input
  1817. value={this.state.unitPrice}
  1818. onChange={e => {
  1819. this.setState({
  1820. unitPrice: e.target.value
  1821. });
  1822. }}
  1823. placeholder="请填写本次外包公司的价格"
  1824. />
  1825. </FormItem>
  1826. </div>
  1827. <div className="clearfix">
  1828. <FormItem
  1829. className="half-item"
  1830. {...formItemLayout}
  1831. label={
  1832. <span>
  1833. <strong style={{ color: "#f00" }}>*</strong>
  1834. 数量(万元)
  1835. </span>
  1836. }
  1837. >
  1838. <Input
  1839. value={this.state.unitNumber}
  1840. onChange={e => {
  1841. this.setState({
  1842. unitNumber: e.target.value
  1843. });
  1844. }}
  1845. placeholder="请填写本次外包公司的价格"
  1846. />
  1847. </FormItem>
  1848. </div>
  1849. <div className="clearfix">
  1850. <FormItem
  1851. className="half-item"
  1852. {...formItemLayout}
  1853. label={
  1854. <span>
  1855. <strong style={{ color: "#f00" }}>*</strong>
  1856. 总金额(万元)
  1857. </span>
  1858. }
  1859. >
  1860. <Input
  1861. value={this.state.amount}
  1862. onChange={e => {
  1863. this.setState({
  1864. amount: e.target.value
  1865. });
  1866. }}
  1867. placeholder="请填写本次外包公司的价格"
  1868. />
  1869. </FormItem>
  1870. </div>
  1871. <div className="clearfix">
  1872. <FormItem
  1873. className="half-item"
  1874. {...formItemLayout}
  1875. label={
  1876. <span>
  1877. <strong style={{ color: "#f00" }}>*</strong>备注
  1878. </span>
  1879. }
  1880. >
  1881. <TextArea
  1882. rows={4}
  1883. value={this.state.outsourceRemarks}
  1884. onChange={e => {
  1885. this.setState({
  1886. outsourceRemarks: e.target.value
  1887. });
  1888. }}
  1889. placeholder="请输入备注"
  1890. />
  1891. </FormItem>
  1892. </div>
  1893. {/*<div className="clearfix">
  1894. <FormItem className="half-item"
  1895. {...formItemLayout}
  1896. label="上传协议文件" style={{height:"auto"}}>
  1897. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1898. data={(e)=>{
  1899. return {
  1900. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1901. }
  1902. }}
  1903. fileList={this.state.fileUrl}
  1904. onChange={(e)=>{
  1905. this.setState({
  1906. attachmentUrl:e.fileList,
  1907. fileUrl:e.fileList
  1908. })
  1909. }}>
  1910. {fileUrl.length>1?null:<Button>
  1911. <Icon type="upload" /> 点击上传
  1912. </Button>}
  1913. </Upload>
  1914. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  1915. </FormItem>
  1916. </div>*/}
  1917. <p
  1918. className="tip"
  1919. style={{
  1920. paddingBottom: "12px",
  1921. width: "240px",
  1922. marginLeft: "145px"
  1923. }}
  1924. >
  1925. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  1926. </p>
  1927. <div className="clearfix">
  1928. <FormItem
  1929. labelCol={{ span: 4 }}
  1930. wrapperCol={{ span: 18 }}
  1931. label={
  1932. <span>
  1933. <strong style={{ color: "#f00" }}>*</strong>
  1934. 合同/协议扫描件
  1935. </span>
  1936. }
  1937. >
  1938. <PicturesWall
  1939. fileList={this.getOrgCodeUrl}
  1940. pictureUrl={this.state.pictureUrl}
  1941. />
  1942. <p>图片建议:要清晰。</p>
  1943. </FormItem>
  1944. </div>
  1945. <div className="clearfix">
  1946. <div
  1947. style={{
  1948. display: "inline-black",
  1949. textAlign: "center"
  1950. }}
  1951. >
  1952. <Button type="primary" onClick={this.sureOut}>
  1953. 确认发起外包,不通过总部
  1954. </Button>
  1955. <p className="tip">提示:高于总部价格,费用个人承担</p>
  1956. </div>
  1957. </div>
  1958. </div>
  1959. ) : (
  1960. <div>
  1961. <div className="clearfix">
  1962. <FormItem
  1963. className="half-item"
  1964. {...formItemLayout}
  1965. label="外包公司"
  1966. >
  1967. <span>{this.state.companyName}</span>
  1968. </FormItem>
  1969. </div>
  1970. <div className="clearfix">
  1971. <FormItem
  1972. className="half-item"
  1973. {...formItemLayout}
  1974. label="单价(万元)"
  1975. >
  1976. <span>{this.state.unitPrice}</span>
  1977. </FormItem>
  1978. </div>
  1979. <div className="clearfix">
  1980. <FormItem
  1981. className="half-item"
  1982. {...formItemLayout}
  1983. label="数量(个)"
  1984. >
  1985. <span>{this.state.unitNumber}</span>
  1986. </FormItem>
  1987. </div>
  1988. <div className="clearfix">
  1989. <FormItem
  1990. className="half-item"
  1991. {...formItemLayout}
  1992. label="总金额(万元)"
  1993. >
  1994. <span>{this.state.amount}</span>
  1995. </FormItem>
  1996. </div>
  1997. <div className="clearfix">
  1998. <FormItem
  1999. className="half-item"
  2000. {...formItemLayout}
  2001. label="备注"
  2002. >
  2003. <span>{this.state.outsourceRemarks}</span>
  2004. </FormItem>
  2005. </div>
  2006. {/*<div className="clearfix">
  2007. <FormItem className="half-item" style={{height:'auto'}}
  2008. {...formItemLayout}
  2009. label="上传协议文件" >
  2010. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  2011. data={(e)=>{
  2012. return {
  2013. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  2014. }
  2015. }}
  2016. fileList={this.state.fileUrl}
  2017. showUploadList={{showRemoveIcon:false}}
  2018. onPreview={(e)=>{
  2019. let url = window.location.href.substring(7)
  2020. window.location.href="http://"+url.substring(0,url.indexOf("/"))+"/api/admin/outsourceOrg//downloadFile?path="+e.response.data
  2021. }}
  2022. >
  2023. </Upload>
  2024. </FormItem>
  2025. </div>*/}
  2026. <div className="clearfix">
  2027. <FormItem
  2028. labelCol={{ span: 4 }}
  2029. wrapperCol={{ span: 18 }}
  2030. label="合同/协议扫描件"
  2031. >
  2032. <Upload
  2033. className="demandDetailShow-upload"
  2034. listType="picture-card"
  2035. fileList={this.state.pictureUrl}
  2036. onPreview={file => {
  2037. this.setState({
  2038. previewImage: file.url || file.thumbUrl,
  2039. previewVisible: true
  2040. });
  2041. }}
  2042. ></Upload>
  2043. <Modal
  2044. maskClosable={false}
  2045. footer={null}
  2046. visible={this.state.previewVisible}
  2047. onCancel={() => {
  2048. this.setState({ previewVisible: false });
  2049. }}
  2050. >
  2051. <img
  2052. alt=""
  2053. style={{ width: "100%" }}
  2054. src={this.state.previewImage || ""}
  2055. />
  2056. </Modal>
  2057. </FormItem>
  2058. </div>
  2059. </div>
  2060. )}
  2061. {this.state.refundStatus ? (
  2062. <div className="clearfix">
  2063. <hr className="division" />
  2064. <div className="clearfix">
  2065. <FormItem
  2066. className="half-item"
  2067. {...formItemLayout}
  2068. label="审核意见"
  2069. >
  2070. <span>{this.state.remarks}</span>
  2071. </FormItem>
  2072. </div>
  2073. <div className="clearfix">
  2074. <FormItem
  2075. className="half-item"
  2076. {...formItemLayout}
  2077. label="审核结果"
  2078. >
  2079. <span>
  2080. {getRefundStatus(this.state.refundStatus)}
  2081. </span>
  2082. </FormItem>
  2083. </div>
  2084. <div className="clearfix">
  2085. <FormItem
  2086. className="half-item"
  2087. {...formItemLayout}
  2088. label="审核时间"
  2089. >
  2090. <span>{this.state.auditTimes}</span>
  2091. </FormItem>
  2092. </div>
  2093. </div>
  2094. ) : (
  2095. ""
  2096. )}
  2097. </TabPane>
  2098. </Tabs>
  2099. </Modal>
  2100. <Modal
  2101. maskClosable={false}
  2102. visible={this.state.addnextVisible}
  2103. onOk={this.nextCancel}
  2104. onCancel={this.nextCancel}
  2105. confirmLoading={this.state.confirmLoading}
  2106. width="800px"
  2107. title={"项目任务详情"}
  2108. footer=""
  2109. className="admin-desc-content"
  2110. >
  2111. <Form layout="horizontal" id="demand-form">
  2112. <Spin spinning={this.state.loading}>
  2113. <div className="clearfix">
  2114. <FormItem
  2115. className="half-item"
  2116. {...formItemLayout}
  2117. label="项目名称"
  2118. >
  2119. <span>{this.state.commodityName}</span>
  2120. </FormItem>
  2121. <FormItem
  2122. className="half-item"
  2123. {...formItemLayout}
  2124. label="项目数量"
  2125. >
  2126. <span>{this.state.commodityQuantity}</span>
  2127. </FormItem>
  2128. <FormItem
  2129. className="half-item"
  2130. {...formItemLayout}
  2131. label="金额(万元)"
  2132. >
  2133. <span>{this.state.commodityPrice}</span>
  2134. </FormItem>
  2135. <FormItem
  2136. className="half-item"
  2137. {...formItemLayout}
  2138. label="主要项目"
  2139. >
  2140. <span>{getboutique(this.state.main)}</span>
  2141. </FormItem>
  2142. <div className="clearfix">
  2143. <FormItem
  2144. labelCol={{ span: 4 }}
  2145. wrapperCol={{ span: 16 }}
  2146. label="服务说明"
  2147. >
  2148. <span>{this.state.taskComment}</span>
  2149. </FormItem>
  2150. </div>
  2151. </div>
  2152. </Spin>
  2153. </Form>
  2154. </Modal>
  2155. <Modal
  2156. maskClosable={false}
  2157. visible={this.state.noVisible}
  2158. onOk={this.handleOk}
  2159. onCancel={this.noCancel}
  2160. width="400px"
  2161. title={"拒绝理由"}
  2162. footer=""
  2163. className="admin-desc-content"
  2164. confirmLoading={this.state.confirmLoading}
  2165. >
  2166. <Form layout="horizontal" id="demand-form">
  2167. <Spin spinning={this.state.loading}>
  2168. <div className="clearfix">
  2169. <FormItem
  2170. labelCol={{ span: 4 }}
  2171. wrapperCol={{ span: 16 }}
  2172. label="拒绝理由"
  2173. >
  2174. <Input
  2175. type="textarea"
  2176. placeholder="请输入拒绝理由"
  2177. rows={4}
  2178. value={this.state.reason}
  2179. onChange={e => {
  2180. this.setState({ reason: e.target.value });
  2181. }}
  2182. />
  2183. </FormItem>
  2184. </div>
  2185. <div className="clearfix">
  2186. <Button
  2187. className="cancel"
  2188. type="primary"
  2189. onClick={this.examOks}
  2190. style={{ marginLeft: "50px" }}
  2191. htmlType="submit"
  2192. loading={this.state.aloading}
  2193. >
  2194. 确定
  2195. </Button>
  2196. <Button
  2197. className="cancel"
  2198. type="ghost"
  2199. onClick={this.noCancel}
  2200. style={{ marginLeft: "50px" }}
  2201. >
  2202. 取消
  2203. </Button>
  2204. </div>
  2205. </Spin>
  2206. </Form>
  2207. </Modal>
  2208. {/* <Modal
  2209. visible={this.state.rizhivisible}
  2210. className="admin-desc-content"
  2211. width="800px"
  2212. maskClosable={false}
  2213. title="订单日志"
  2214. footer={null}
  2215. onCancel={this.closeOrderLog}
  2216. >
  2217. <div className="patent-table">
  2218. <Spin spinning={this.state.loading}>
  2219. <Table
  2220. columns={this.state.columnsrizhi}
  2221. dataSource={this.state.dataSourcerizhi}
  2222. pagination={false}
  2223. />
  2224. </Spin>
  2225. </div>
  2226. </Modal> */}
  2227. <OrderRiZi
  2228. dataSourcerizhi={this.state.dataSourcerizhi}
  2229. closeOrderLog={this.closeOrderLog}
  2230. visible={this.state.rizhivisible}
  2231. loading={this.state.loading}
  2232. />
  2233. </div>
  2234. </div>
  2235. );
  2236. }
  2237. })
  2238. );
  2239. export default outsourcingList;