outsourcingList.jsx 92 KB

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