outsourcingList.jsx 88 KB

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