outsourcingList.jsx 91 KB

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