outsourcingList.jsx 90 KB

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