outsourcingList.jsx 90 KB

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