outsourcingList.jsx 92 KB

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