outsourcingList.jsx 92 KB

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