outsourcingList.jsx 94 KB

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