outsourcingList.jsx 93 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674
  1. import React from "react";
  2. import {
  3. Icon,
  4. Button,
  5. Input,
  6. Select,
  7. Spin,
  8. Table,
  9. message,
  10. DatePicker,
  11. Upload,
  12. Form,
  13. Modal,
  14. Tabs,
  15. Col,
  16. Tooltip,
  17. Tag
  18. } from "antd";
  19. import $ from "jquery/src/ajax";
  20. import moment from "moment";
  21. import {
  22. getLiquidationStatus,
  23. getApprovedState,
  24. getProcessStatus,
  25. splitUrl,
  26. getjiedian,
  27. getboutique,
  28. getCuikuan,
  29. getProjectStatus,
  30. getRefundStatus,
  31. ShowModal
  32. } from "@/tools.js";
  33. import "./customer.less";
  34. import ShowModalDiv from "@/showModal.jsx";
  35. import ResolutionDetail from "@/resolutionDetail";
  36. const confirm = Modal.confirm;
  37. import OrderRiZi from "@/orderRiZi.jsx";
  38. import ImgList from "../../../common/imgList";
  39. import { ChooseList } from "./chooseList";
  40. import { getProjectName } from "../../../tools";
  41. import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
  42. import OrderItemStatus from "../../../common/orderItemStatus";
  43. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  44. import OrderCoor from "./changeComponent/orderCoor";
  45. import ContentUrl from "./contentUrl";
  46. //图片组件
  47. const PicturesWall = React.createClass({
  48. getInitialState() {
  49. return {
  50. previewVisible: false,
  51. previewImage: "",
  52. declarationBatch: 1,
  53. dataInfor: {},
  54. fileList: []
  55. };
  56. },
  57. handleCancel() {
  58. this.setState({
  59. previewVisible: false
  60. });
  61. },
  62. handlePreview(file) {
  63. this.setState({
  64. previewImage: file.url || file.thumbUrl,
  65. previewVisible: true
  66. });
  67. },
  68. handleChange(info) {
  69. let fileList = info.fileList;
  70. this.setState({
  71. fileList
  72. });
  73. this.props.fileList(fileList);
  74. },
  75. componentWillReceiveProps(nextProps) {
  76. this.state.fileList = nextProps.pictureUrl;
  77. this.state.pojectApplicationUrl = undefined;
  78. },
  79. render() {
  80. const { previewVisible, previewImage, fileList } = this.state;
  81. const uploadButton = (
  82. <div>
  83. <Icon type="plus" />
  84. <div className="ant-upload-text">点击上传</div>
  85. </div>
  86. );
  87. return (
  88. <div style={{ display: "inline-block" }}>
  89. <Upload
  90. action={
  91. globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"
  92. }
  93. data={{ sign: "order_outsource" }}
  94. listType="picture-card"
  95. fileList={fileList}
  96. onPreview={this.handlePreview}
  97. onChange={this.handleChange}
  98. multiple={true}
  99. >
  100. {uploadButton}
  101. </Upload>
  102. <Modal
  103. maskClosable={false}
  104. visible={previewVisible}
  105. footer={null}
  106. onCancel={this.handleCancel}
  107. >
  108. <img alt="example" style={{ width: "100%" }} src={previewImage} />
  109. </Modal>
  110. </div>
  111. );
  112. }
  113. });
  114. const outsourcingList = Form.create()(
  115. React.createClass({
  116. loadData(pageNo) {
  117. this.setState({
  118. visitModul: false,
  119. loading: true,
  120. ispage: pageNo,
  121. modalVisible: false,
  122. });
  123. $.ajax({
  124. method: "get",
  125. dataType: "json",
  126. crossDomain: false,
  127. url:
  128. globalConfig.context +
  129. "/api/admin/outsourceOrg/salesmanOrderOutsourceList",
  130. data: {
  131. pageNo: pageNo || 1,
  132. pageSize: this.state.pagination.pageSize,
  133. contractNo: this.state.contractNoSearch,
  134. name: this.state.nameSearch, //名称
  135. orderNo: this.state.orderNoSearch, //订单编号
  136. starTime: this.state.releaseDate[0], //开始时间
  137. endTime: this.state.releaseDate[1], //结束时间
  138. refundStatus: this.state.refundStatusSearch, //外包审核状态
  139. },
  140. success: function (data) {
  141. ShowModal(this);
  142. let theArr = [];
  143. if (data.error.length || data.data.list == "") {
  144. if (data.error && data.error.length) {
  145. message.warning(data.error[0].message);
  146. }
  147. } else {
  148. for (let i = 0; i < data.data.list.length; i++) {
  149. let thisdata = data.data.list[i];
  150. theArr.push({
  151. key: i,
  152. id: thisdata.id, //用户ID
  153. orderNo: thisdata.orderNo, //订单编号
  154. contractNo: thisdata.contractNo, //签单金额
  155. createTime: thisdata.createTime, //流程状态
  156. signTime: thisdata.signTime, //结算状态
  157. userName: thisdata.userName, //特批状态
  158. depName: thisdata.depName, //签单时间
  159. totalAmount: thisdata.totalAmount, //客户名称
  160. adminName: thisdata.adminName, //营销员名称
  161. financeName: thisdata.financeName, //财务名称
  162. liquidationStatus: thisdata.liquidationStatus, //下单时间
  163. refundStatus: thisdata.refundStatus,
  164. });
  165. }
  166. this.state.pagination.total = data.data.totalCount;
  167. this.state.pagination.current = data.data.pageNo;
  168. }
  169. if (data.data && data.data.list && !data.data.list.length) {
  170. this.state.pagination.total = 0;
  171. }
  172. this.setState({
  173. dataSource: theArr,
  174. pageNo: pageNo,
  175. pagination: this.state.pagination,
  176. selectedRowKeys: [],
  177. });
  178. }.bind(this),
  179. }).always(
  180. function () {
  181. this.setState({
  182. loading: false,
  183. });
  184. }.bind(this)
  185. );
  186. },
  187. getInitialState() {
  188. return {
  189. rotateDeg: 0,
  190. page: 1,
  191. orderNos: "",
  192. releaseDate: [],
  193. selectedRowKeys: [],
  194. pictureUrl: [],
  195. fileUrl: [],
  196. attachmentUrl: [],
  197. paginations: false,
  198. resVisible: false,
  199. activeKey: "1",
  200. confirmLoading: false,
  201. aloading: false,
  202. pagination: {
  203. defaultCurrent: 1,
  204. defaultPageSize: 10,
  205. showQuickJumper: true,
  206. pageSize: 10,
  207. onChange: function (page) {
  208. this.loadData(page);
  209. }.bind(this),
  210. showTotal: function (total) {
  211. return "共" + total + "条数据";
  212. },
  213. },
  214. ContactsListsNew: [
  215. {
  216. title: "项目名称",
  217. dataIndex: "commodityName",
  218. key: "commodityName",
  219. render: (text, record, index) => {
  220. let dataArr = this.state.dataSourceX || [];
  221. if (text) {
  222. return <span>{text + "-" + record.tid}</span>;
  223. }
  224. return (
  225. <Select
  226. placeholder="请选择名称"
  227. style={{ width: "150px" }}
  228. disabled={
  229. this.state.getLoad && record.sortName ? true : false
  230. }
  231. onChange={(e) => {
  232. record.sortName = e;
  233. dataArr.forEach((item) => {
  234. if (item.commodityName == record.sortName) {
  235. record.cname = item.cname;
  236. record.tid = item.id;
  237. record.isSave = true;
  238. record.sort = item.sort;
  239. // console.log(record);
  240. cuiJieDian.forEach((item) => {
  241. if (item.value == record.sort) {
  242. record.arr = item.children;
  243. let yearFlag = true;
  244. if (record.sort == 6) {
  245. yearFlag = false;
  246. }
  247. this.setState({
  248. getLoad: true,
  249. yearFlag,
  250. });
  251. }
  252. });
  253. }
  254. });
  255. // console.log(e);
  256. }}
  257. >
  258. {dataArr.map((item) => {
  259. return (
  260. <Select.Option key={item.id} value={item.commodityName}>
  261. {item.commodityName}
  262. </Select.Option>
  263. );
  264. })}
  265. </Select>
  266. );
  267. },
  268. },
  269. {
  270. title: "项目分类",
  271. dataIndex: "projectType",
  272. key: "projectType",
  273. render: (text, record) => {
  274. // console.log("看分类", record);
  275. if (text) {
  276. let arr = this.state.dataSourceX || [];
  277. let str = "";
  278. for (let i = 0; i < arr.length; i++) {
  279. if (this.state.dataSourceX[i].sort == text) {
  280. str = this.state.dataSourceX[i].cname;
  281. return <span>{str}</span>;
  282. }
  283. }
  284. }
  285. if (this.state.getLoad) {
  286. return (
  287. <Select
  288. style={{ width: "150px" }}
  289. placeholder="请选择分类"
  290. value={record.cname}
  291. >
  292. <Select.Option key={record.sort} value={record.cname}>
  293. {record.cname}
  294. </Select.Option>
  295. </Select>
  296. );
  297. } else {
  298. return (
  299. <Select style={{ width: "150px" }} placeholder="请选择分类">
  300. <Select.Option key={record.sort} value={record.cname}>
  301. {record.cname}
  302. </Select.Option>
  303. </Select>
  304. );
  305. }
  306. },
  307. },
  308. {
  309. title: "催款科目",
  310. dataIndex: "dunTypeName",
  311. key: "dunTypeName",
  312. render: (text, record) => {
  313. if (text) {
  314. if (record.customizeName) {
  315. return text + record.customizeName;
  316. }
  317. return <span>{text}</span>;
  318. }
  319. if (this.state.getLoad) {
  320. let arr = record.arr || [];
  321. // console.log("arrrr", arr);
  322. return (
  323. <Select
  324. style={{ width: "150px" }}
  325. placeholder="请选择分类"
  326. onChange={(e) => {
  327. record.dunType = e;
  328. // console.log(e);
  329. }}
  330. >
  331. {arr.map((item) => {
  332. record;
  333. return (
  334. <Select.Option key={item.value} value={item.value}>
  335. {item.key}
  336. </Select.Option>
  337. );
  338. })}
  339. </Select>
  340. );
  341. } else {
  342. return (
  343. <Select style={{ width: "150px" }} placeholder="请选择分类">
  344. <Select.Option
  345. key={0}
  346. value={"请选择上一项"}
  347. ></Select.Option>
  348. </Select>
  349. );
  350. }
  351. },
  352. },
  353. {
  354. title: "时间(天)",
  355. dataIndex: "waitDay",
  356. key: "waitDay",
  357. render: (text, record) => {
  358. if (record.dunTypeName) {
  359. if (record.customizeTimes) {
  360. return record.customizeTimes;
  361. }
  362. return <span>{text}</span>;
  363. }
  364. return (
  365. <Select
  366. placeholder="请选择时间"
  367. style={{ width: "150px" }}
  368. disabled={this.state.approval == 0 ? true : false}
  369. onChange={(e) => {
  370. // console.log("ee", e);
  371. record.waitDay = e;
  372. // console.log("time", record);
  373. }}
  374. >
  375. <Select.Option key={3}>3天</Select.Option>
  376. <Select.Option key={5}>5天</Select.Option>
  377. <Select.Option key={7}>7天</Select.Option>
  378. <Select.Option key={15}>15天</Select.Option>
  379. </Select>
  380. );
  381. },
  382. },
  383. {
  384. title: "金额(万元)",
  385. dataIndex: "money",
  386. key: "money",
  387. render: (text, record) => {
  388. if (record.dunTypeName) {
  389. if (record.appropriationRatio) {
  390. let percent = Number(record.appropriationRatio * 100).toFixed(2);
  391. percent += "%";
  392. return <span>{percent}(拨款比例)</span>;
  393. } else {
  394. return <span>{text}</span>;
  395. }
  396. }
  397. return (
  398. <div>
  399. {this.state.processStatus == 0 ? (
  400. <Input
  401. value={record.money}
  402. placeholder="请输入金额(必填项)"
  403. key={record.id}
  404. required="required"
  405. onChange={(e) => {
  406. record.money = e.target.value;
  407. this.setState({
  408. contactListNew: this.state.contactListNew,
  409. });
  410. }}
  411. style={{ width: "120px" }}
  412. />
  413. ) : (
  414. <span>{text}</span>
  415. )}
  416. </div>
  417. );
  418. },
  419. },
  420. {
  421. title: "服务年限",
  422. dataIndex: "startDate",
  423. key: "startDate",
  424. render: (text, record) => {
  425. if (record.dunTypeName) {
  426. return <span>{text}</span>;
  427. }
  428. return (
  429. <Select
  430. placeholder="请选择时间"
  431. style={{ width: "150px" }}
  432. disabled={this.state.yearFlag ? true : false}
  433. onChange={(e) => {
  434. // console.log("ee", e);
  435. record.effectiveCount = e;
  436. // console.log("year", record);
  437. }}
  438. >
  439. {/* <Select.Option key={null}>无</Select.Option> */}
  440. <Select.Option key={1}>一年</Select.Option>
  441. <Select.Option key={3}>两年</Select.Option>
  442. <Select.Option key={5}>三年</Select.Option>
  443. <Select.Option key={7}>四年</Select.Option>
  444. <Select.Option key={9}>五年</Select.Option>
  445. </Select>
  446. );
  447. },
  448. },
  449. {
  450. title: "催款状态",
  451. dataIndex: "status",
  452. key: "status",
  453. render: (text) => {
  454. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  455. },
  456. },
  457. {
  458. title: "操作",
  459. dataIndex: "dels",
  460. key: "dels",
  461. render: (text, record, index) => {
  462. return (
  463. <div>
  464. {/* {this.state.processStatus == 0 ? (
  465. <Popconfirm
  466. title="是否删除?"
  467. onConfirm={() => {
  468. this.confirmDeletNew(record);
  469. }}
  470. okText="删除"
  471. cancelText="不删除"
  472. >
  473. <Button
  474. style={{
  475. marginRight: "10px",
  476. color: "#ffffff",
  477. background: "#f00",
  478. border: "none"
  479. }}
  480. >
  481. 删除
  482. </Button>
  483. </Popconfirm>
  484. ) : (
  485. ""
  486. )}
  487. {record.isSave ? (
  488. <Button
  489. type="primary"
  490. onClick={e => {
  491. this.contactSaveNew(record);
  492. }}
  493. >
  494. 保存
  495. </Button>
  496. ) : (
  497. ""
  498. )} */}
  499. </div>
  500. );
  501. },
  502. },
  503. ],
  504. columns: [
  505. {
  506. title: "订单编号",
  507. dataIndex: "orderNo",
  508. key: "orderNo",
  509. },
  510. {
  511. title: "合同编号",
  512. dataIndex: "contractNo",
  513. key: "contractNo",
  514. },
  515. {
  516. title: "创建时间",
  517. dataIndex: "createTime",
  518. key: "createTime",
  519. },
  520. {
  521. title: "签单时间",
  522. dataIndex: "signTime",
  523. key: "signTime",
  524. },
  525. {
  526. title: "客户名称",
  527. dataIndex: "userName",
  528. key: "userName",
  529. render: text => {
  530. return (
  531. <Tooltip title={text}>
  532. <div style={{
  533. maxWidth: '150px',
  534. overflow: 'hidden',
  535. textOverflow: "ellipsis",
  536. whiteSpace: 'nowrap',
  537. }}>{text}</div>
  538. </Tooltip>
  539. )
  540. }
  541. },
  542. {
  543. title: "订单部门",
  544. dataIndex: "depName",
  545. key: "depName",
  546. },
  547. {
  548. title: "签单金额(万元)",
  549. dataIndex: "totalAmount",
  550. key: "totalAmount",
  551. },
  552. {
  553. title: "结算状态",
  554. dataIndex: "liquidationStatus",
  555. key: "liquidationStatus",
  556. render: (text) => {
  557. return getLiquidationStatus(text);
  558. },
  559. },
  560. {
  561. title: "外包审核",
  562. dataIndex: "refundStatus",
  563. key: "refundStatus",
  564. render: (text) => {
  565. return getRefundStatus(text);
  566. },
  567. },
  568. {
  569. title: "营销负责人",
  570. dataIndex: "adminName",
  571. key: "adminName",
  572. },
  573. {
  574. title: "财务负责人",
  575. dataIndex: "financeName",
  576. key: "financeName",
  577. },
  578. ],
  579. data: [],
  580. dataSource: [],
  581. columnsX: [
  582. {
  583. title: "业务项目名称",
  584. dataIndex: "commodityName",
  585. key: "commodityName",
  586. render: (text, record) => {
  587. return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  588. }
  589. },
  590. {
  591. title: "项目类别",
  592. dataIndex: "cname",
  593. key: "cname",
  594. },
  595. {
  596. title: "项目数量",
  597. dataIndex: "commodityQuantity",
  598. key: "commodityQuantity",
  599. render: (text, record) => {
  600. if (record.splitStatus == 1) {
  601. return (
  602. <span>
  603. {text}{" "}
  604. <Tag
  605. color="#108ee9"
  606. onClick={(e) => {
  607. e.stopPropagation();
  608. this.showRes(record);
  609. }}
  610. >
  611. 已拆
  612. </Tag>
  613. </span>
  614. );
  615. } else {
  616. return text;
  617. }
  618. },
  619. },
  620. {
  621. title: "金额(万元)",
  622. dataIndex: "commodityPrice",
  623. key: "commodityPrice",
  624. },
  625. {
  626. title: "负责人",
  627. dataIndex: "contacts",
  628. key: "contacts",
  629. },
  630. {
  631. title: "负责人电话",
  632. dataIndex: "contactsMobile",
  633. key: "contactsMobile",
  634. },
  635. {
  636. title: "项目状态",
  637. dataIndex: "projectStatus",
  638. key: "projectStatus",
  639. render: (text) => {
  640. return getProjectName(text);
  641. },
  642. },
  643. {
  644. title: "主要项目",
  645. dataIndex: "main",
  646. key: "main",
  647. render: (text) => {
  648. return text ? "是" : "否";
  649. },
  650. },
  651. {
  652. title: "总年限",
  653. dataIndex: "yearSum",
  654. key: "yearSum",
  655. render: (text, record) => {
  656. return (
  657. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  658. );
  659. }
  660. },
  661. {
  662. title: "年限",
  663. dataIndex: "serviceLife",
  664. key: "serviceLife",
  665. render: (text, record) => {
  666. return (
  667. !!text && JSON.parse(text).map(item =>
  668. <div>{item}</div>
  669. )
  670. );
  671. }
  672. },
  673. {
  674. title: "本次派单",
  675. dataIndex: "serviceYear",
  676. key: "serviceYear",
  677. render: (text, record) => {
  678. return (
  679. <div>{!text ? "" : text}</div>
  680. );
  681. }
  682. },
  683. {
  684. title: "项目说明",
  685. dataIndex: "taskComment",
  686. key: "taskComment",
  687. render: (text) => {
  688. return (
  689. <Tooltip title={text}>
  690. <div
  691. style={{
  692. width: 100,
  693. overflow: "hidden",
  694. whiteSpace: "nowrap",
  695. textOverflow: "ellipsis",
  696. }}
  697. >{text}</div>
  698. </Tooltip>
  699. )
  700. },
  701. },
  702. ],
  703. columnsrizhi: [
  704. {
  705. title: "流程",
  706. dataIndex: "processName",
  707. key: "processName",
  708. },
  709. {
  710. title: "操作人",
  711. dataIndex: "adminName",
  712. key: "adminName",
  713. },
  714. {
  715. title: "时间",
  716. dataIndex: "createDate",
  717. key: "createDate",
  718. },
  719. ],
  720. dataSourceX: [],
  721. ContactsLists: [
  722. {
  723. title: "催款科目",
  724. dataIndex: "dunSubject",
  725. key: "dunSubject",
  726. render: (text) => {
  727. return getjiedian(text);
  728. },
  729. },
  730. {
  731. title: "金额(万元)",
  732. dataIndex: "money",
  733. key: "money",
  734. },
  735. {
  736. title: "催款状态",
  737. dataIndex: "dunStatus",
  738. key: "dunStatus",
  739. render: (text) => {
  740. return getCuikuan(text);
  741. },
  742. },
  743. ],
  744. };
  745. },
  746. //页面加载函数
  747. componentWillMount() {
  748. this.loadData();
  749. },
  750. //整行点击
  751. tableRowClick(record) {
  752. this.setState({
  753. visible: true,
  754. refundStatus: record.refundStatus,
  755. orderNos: record.orderNo
  756. });
  757. this.xiangqing(record.orderNo);
  758. this.xiangmu(record.orderNo);
  759. this.jiedian(record.orderNo);
  760. this.jiedianNew(record.orderNo);
  761. },
  762. //点击打卡项目详情
  763. tableRowClickX(record) {
  764. this.setState({
  765. jid: record.id, //项目ID
  766. kid: record.commodityId, //商品ID
  767. commodityName: record.commodityName, //金额
  768. commodityPrice: record.commodityPrice, //金额
  769. commodityQuantity: record.commodityQuantity, //数量
  770. taskComment: record.taskComment, //备注
  771. main: record.main.toString(), //是否为主要
  772. addnextVisible: true,
  773. dataInfor: record,
  774. addState: 0,
  775. });
  776. },
  777. //项目详情关闭
  778. nextCancel() {
  779. this.setState({
  780. addnextVisible: false,
  781. });
  782. },
  783. //订单详情
  784. xiangqing(orderNos) {
  785. $.ajax({
  786. method: "get",
  787. dataType: "json",
  788. crossDomain: false,
  789. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  790. data: {
  791. orderNo: orderNos,
  792. },
  793. success: function (data) {
  794. if (data.error.length || data.data.list == "") {
  795. if (data.error && data.error.length) {
  796. message.warning(data.error[0].message);
  797. }
  798. } else {
  799. let thisdata = data.data;
  800. this.setState({
  801. orderUid: thisdata.uid,
  802. orderNo: thisdata.orderNo, //订单编号
  803. contractNo: thisdata.contractNo, //合同编号
  804. userName: thisdata.userName, //客户名称
  805. signDate: thisdata.signDate, //签单时间
  806. processStatus: thisdata.processStatus, //流程状态
  807. liquidationStatus: thisdata.liquidationStatus, //结算状态
  808. contacts: thisdata.contacts, //企业联系人
  809. contactMobile: thisdata.contactMobile, //联系人电话
  810. legalPerson: thisdata.legalPerson, //法人
  811. legalPersonTel: thisdata.legalPersonTel, //法人电话
  812. firstAmount: thisdata.firstAmount, //签单金额
  813. totalAmount: thisdata.totalAmount, //首付金额
  814. approval: thisdata.approval, //特批状态
  815. settlementAmount: thisdata.settlementAmount, //已收款项
  816. orderRemarks: thisdata.orderRemarks, //订单留言
  817. orgCodeUrl: thisdata.contractPictureUrl
  818. ? splitUrl(
  819. thisdata.contractPictureUrl,
  820. ",",
  821. globalConfig.avatarHost + "/upload"
  822. )
  823. : [], //图片地址
  824. replenishUrl: thisdata.agreementUrl
  825. ? splitUrl(
  826. thisdata.agreementUrl,
  827. ",",
  828. globalConfig.avatarHost + "/upload"
  829. )
  830. : [], //图片地址
  831. contentUrl: thisdata.serviceContent
  832. ? splitUrl(
  833. thisdata.serviceContent,
  834. ",",
  835. globalConfig.avatarHost + "/upload"
  836. )
  837. : [], //图片地址
  838. salesmanName: thisdata.salesmanName, //营销员名称
  839. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  840. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  841. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  842. financeName: thisdata.financeName, //财务名称
  843. financeMobile: thisdata.financeMobile, //财务电话
  844. nowFinance: thisdata.nowFinance, //财务名称
  845. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  846. depName: thisdata.depName,
  847. outsource: thisdata.outsource == 0 ? "否" : "是",
  848. deleteSign: thisdata.deleteSign,
  849. });
  850. }
  851. }.bind(this),
  852. }).always(
  853. function () {
  854. this.setState({
  855. loading: false,
  856. });
  857. }.bind(this)
  858. );
  859. },
  860. //项目列表
  861. xiangmu(orderNos) {
  862. $.ajax({
  863. method: "get",
  864. dataType: "json",
  865. crossDomain: false,
  866. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  867. data: {
  868. orderNo: orderNos,
  869. },
  870. success: function (data) {
  871. let theArr = [];
  872. if (data.error.length || data.data.list == "") {
  873. if (data.error && data.error.length) {
  874. message.warning(data.error[0].message);
  875. }
  876. } else {
  877. for (let i = 0; i < data.data.length; i++) {
  878. let thisdata = data.data[i];
  879. thisdata.key = i;
  880. thisdata.sort = thisdata.cSort;
  881. theArr.push(thisdata);
  882. }
  883. }
  884. this.setState({
  885. dataSourceX: theArr,
  886. });
  887. }.bind(this),
  888. }).always(
  889. function () {
  890. this.setState({
  891. loading: false,
  892. });
  893. }.bind(this)
  894. );
  895. },
  896. // 拆分详细
  897. showRes(record) {
  898. this.setState({
  899. resVisible: true,
  900. resRecord: record,
  901. });
  902. },
  903. resCancel() {
  904. this.setState({
  905. resVisible: false,
  906. });
  907. },
  908. rizhi() {
  909. this.setState({
  910. loading: true,
  911. });
  912. $.ajax({
  913. method: "get",
  914. dataType: "json",
  915. crossDomain: false,
  916. url: "/api/admin/newOrder/selectOrderLog",
  917. data: {
  918. orderNo: this.state.orderNo,
  919. },
  920. success: function (data) {
  921. let theArr = [];
  922. let thisData = data.data;
  923. if (!thisData.length) {
  924. if (data.error && data.error.length) {
  925. message.warning(data.error[0].message);
  926. }
  927. thisData = {};
  928. } else {
  929. for (let i = 0; i < data.data.length; i++) {
  930. let thisdata = data.data[i];
  931. theArr.push({
  932. processName: thisdata.processName,
  933. adminName: thisdata.adminName,
  934. createDate: thisdata.createDate,
  935. remarks: thisdata.remarks,
  936. });
  937. }
  938. }
  939. this.setState({
  940. dataSourcerizhi: theArr,
  941. });
  942. }.bind(this),
  943. }).always(
  944. function () {
  945. this.setState({
  946. loading: false,
  947. });
  948. }.bind(this)
  949. );
  950. },
  951. getOrderLog() {
  952. this.setState({
  953. rizhivisible: true,
  954. });
  955. this.rizhi();
  956. },
  957. closeOrderLog() {
  958. this.setState({
  959. rizhivisible: false,
  960. });
  961. },
  962. //节点列表
  963. jiedian(orderNos) {
  964. $.ajax({
  965. method: "get",
  966. dataType: "json",
  967. crossDomain: false,
  968. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  969. data: {
  970. orderNo: orderNos,
  971. },
  972. success: function (data) {
  973. let theArr = [];
  974. let thisData = [];
  975. if (data.error.length || data.data.list == "") {
  976. if (data.error && data.error.length) {
  977. message.warning(data.error[0].message);
  978. }
  979. } else {
  980. for (let i = 0; i < data.data.length; i++) {
  981. thisData = data.data[i];
  982. theArr.push({
  983. key: i,
  984. dunSubject: thisData.dunSubject
  985. ? thisData.dunSubject.toString()
  986. : "", //催款科目
  987. id: thisData.id, //节点Id
  988. money: thisData.money, //催款金额
  989. dunStatus: thisData.dunStatus, //催款状态
  990. });
  991. }
  992. this.setState({
  993. contactList: theArr,
  994. });
  995. }
  996. }.bind(this),
  997. }).always(
  998. function () {
  999. this.setState({
  1000. loading: false,
  1001. });
  1002. }.bind(this)
  1003. );
  1004. },
  1005. jiedianNew(orderNos) {
  1006. $.ajax({
  1007. method: "get",
  1008. dataType: "json",
  1009. crossDomain: false,
  1010. url:
  1011. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  1012. data: {
  1013. orderNo: orderNos,
  1014. },
  1015. success: function (data) {
  1016. if (data.error && data.error.length) {
  1017. message.warning(data.error[0].message);
  1018. } else {
  1019. let theArr = [];
  1020. let thisData = [];
  1021. let arr = data.data || [];
  1022. let totalCui = 0;
  1023. for (let i = 0; i < arr.length; i++) {
  1024. thisData = arr[i];
  1025. totalCui += +thisData.money;
  1026. theArr.push({
  1027. key: i,
  1028. dunSubject: thisData.dunSubject
  1029. ? thisData.dunSubject.toString()
  1030. : "", //催款科目
  1031. id: thisData.id, //节点Id
  1032. money: thisData.money, //催款金额
  1033. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  1034. commodityName: thisData.commodityName,
  1035. projectType: thisData.projectType,
  1036. dunTypeName: thisData.dunTypeName,
  1037. status: thisData.status,
  1038. waitDay: thisData.waitDay,
  1039. effectiveCount: thisData.effectiveCount,
  1040. startDate: thisData.startDate,
  1041. dunType: thisData.dunType,
  1042. appropriationRatio: thisData.appropriationRatio,
  1043. customizeName: thisData.customizeName,
  1044. customizeTimes: thisData.customizeTimes,
  1045. tid: thisData.tid,
  1046. });
  1047. }
  1048. if (!totalCui) {
  1049. totalCui = 0;
  1050. }
  1051. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  1052. this.setState({
  1053. contactListNew: theArr,
  1054. totalCui,
  1055. });
  1056. }
  1057. }.bind(this),
  1058. }).always(
  1059. function () {
  1060. this.setState({
  1061. loading: false,
  1062. });
  1063. }.bind(this)
  1064. );
  1065. },
  1066. //审核通过
  1067. examOk() {
  1068. $.ajax({
  1069. method: "post",
  1070. dataType: "json",
  1071. crossDomain: false,
  1072. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  1073. data: {
  1074. orderNo: this.state.orderNo,
  1075. orderStatus: 2,
  1076. },
  1077. success: function (data) {
  1078. if (data.error.length || data.data.list == "") {
  1079. if (data.error && data.error.length) {
  1080. message.warning(data.error[0].message);
  1081. }
  1082. } else {
  1083. message.success("该订单已通过审核~");
  1084. this.setState({
  1085. visible: false,
  1086. });
  1087. this.reset();
  1088. }
  1089. }.bind(this),
  1090. }).always(
  1091. function () {
  1092. this.setState({
  1093. loading: false,
  1094. });
  1095. }.bind(this)
  1096. );
  1097. },
  1098. //通过发给外包
  1099. outsourcing() {
  1100. if (this.state.flag) return;
  1101. this.setState({
  1102. flag: true,
  1103. });
  1104. $.ajax({
  1105. method: "post",
  1106. dataType: "json",
  1107. crossDomain: false,
  1108. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  1109. data: {
  1110. orderNo: this.state.orderNo,
  1111. orderStatus: 2,
  1112. outsource: 1,
  1113. },
  1114. success: function (data) {
  1115. if (data.error.length || data.data.list == "") {
  1116. if (data.error && data.error.length) {
  1117. message.warning(data.error[0].message);
  1118. }
  1119. } else {
  1120. message.success("该订单已通过审核~");
  1121. this.setState({
  1122. visible: false,
  1123. flag: false,
  1124. });
  1125. this.reset();
  1126. }
  1127. }.bind(this),
  1128. }).always(
  1129. function () {
  1130. this.setState({
  1131. loading: false,
  1132. });
  1133. }.bind(this)
  1134. );
  1135. },
  1136. //审核不通过
  1137. examOks() {
  1138. this.setState({
  1139. aloading: true,
  1140. });
  1141. $.ajax({
  1142. method: "post",
  1143. dataType: "json",
  1144. crossDomain: false,
  1145. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  1146. data: {
  1147. orderNo: this.state.orderNo,
  1148. orderStatus: 3,
  1149. reason: this.state.reason,
  1150. },
  1151. success: function (data) {
  1152. if (data.error.length || data.data.list == "") {
  1153. if (data.error && data.error.length) {
  1154. message.warning(data.error[0].message);
  1155. this.setState({
  1156. aloading: true,
  1157. });
  1158. }
  1159. } else {
  1160. message.success("该订单已被拒绝~");
  1161. this.setState({
  1162. visible: false,
  1163. aloading: false,
  1164. noVisible: false,
  1165. reason: "",
  1166. });
  1167. this.reset();
  1168. }
  1169. }.bind(this),
  1170. }).always(
  1171. function () {
  1172. this.setState({
  1173. loading: false,
  1174. });
  1175. }.bind(this)
  1176. );
  1177. },
  1178. //点击拒绝
  1179. examNo() {
  1180. this.setState({
  1181. noVisible: true,
  1182. });
  1183. },
  1184. load() {
  1185. if (this.state.attachmentUrl) {
  1186. let url = window.location.href.substring(7);
  1187. this.state.fileUrl.forEach((e) => {
  1188. window.location.href =
  1189. "http://" +
  1190. url.substring(0, url.indexOf("/")) +
  1191. "/api/admin/outsourceOrg//downloadFile?path=" +
  1192. e.response.data;
  1193. });
  1194. } else {
  1195. message.error("此订单无上传文件");
  1196. }
  1197. },
  1198. callback(key) {
  1199. let url = window.location.href.substring(7);
  1200. this.setState({
  1201. activeKey: key,
  1202. });
  1203. if (this.state.pictureUrl.length) {
  1204. let picArr = [];
  1205. this.state.pictureUrl.map(function (item) {
  1206. if (
  1207. item.response &&
  1208. item.response.data &&
  1209. item.response.data.length
  1210. ) {
  1211. picArr.push(item.response.data);
  1212. }
  1213. });
  1214. }
  1215. if (key === "2") {
  1216. this.setState({
  1217. loading: true,
  1218. });
  1219. $.ajax({
  1220. method: "get",
  1221. dataType: "json",
  1222. crossDomain: false,
  1223. url:
  1224. globalConfig.context +
  1225. "/api/admin/outsourceOrg/orderOutsourceDtails",
  1226. data: {
  1227. orderNo: this.state.orderNo,
  1228. },
  1229. success: function (data) {
  1230. let thisdata = data.data;
  1231. this.setState({
  1232. id: thisdata.id,
  1233. createTimes: thisdata.createTimes,
  1234. auditTimes: thisdata.auditTimes,
  1235. remarks: thisdata.remarks,
  1236. attachmentUrl: thisdata.attachmentUrl
  1237. ? splitUrl(
  1238. thisdata.attachmentUrl,
  1239. ",",
  1240. globalConfig.avatarHost + "/upload",
  1241. url
  1242. )
  1243. : [],
  1244. fileUrl: thisdata.attachmentUrl
  1245. ? splitUrl(
  1246. thisdata.attachmentUrl,
  1247. ",",
  1248. globalConfig.avatarHost + "/upload",
  1249. url
  1250. )
  1251. : [],
  1252. pictureUrl: thisdata.pictureUrl
  1253. ? splitUrl(
  1254. thisdata.pictureUrl,
  1255. ",",
  1256. globalConfig.avatarHost + "/upload",
  1257. url
  1258. )
  1259. : [], //图片地址
  1260. amount: thisdata.amount,
  1261. companyName: thisdata.companyName,
  1262. outsourceRemarks: thisdata.outsourceRemarks,
  1263. unitNumber: thisdata.unitNumber,
  1264. unitPrice: thisdata.unitPrice,
  1265. });
  1266. }.bind(this),
  1267. }).always(
  1268. function () {
  1269. this.setState({
  1270. loading: false,
  1271. });
  1272. }.bind(this)
  1273. );
  1274. }
  1275. },
  1276. downImg() {
  1277. let num = 0;
  1278. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1279. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1280. num = i;
  1281. }
  1282. }
  1283. if (num == this.state.orgCodeUrl.length - 1) {
  1284. return message.warning("已经是最后一张了哦");
  1285. }
  1286. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  1287. this.setState({
  1288. previewImage: this.state.previewImage,
  1289. rotateDeg: 0,
  1290. });
  1291. },
  1292. upImg() {
  1293. let num = 0;
  1294. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1295. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1296. num = i;
  1297. }
  1298. }
  1299. if (num == 0) {
  1300. return message.warning("已经是第一张了哦");
  1301. }
  1302. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  1303. this.setState({
  1304. previewImage: this.state.previewImage,
  1305. rotateDeg: 0,
  1306. });
  1307. },
  1308. rotate() {
  1309. let rotateDeg = this.state.rotateDeg + 90;
  1310. this.setState({
  1311. rotateDeg,
  1312. });
  1313. },
  1314. downImgs() {
  1315. let num = 0;
  1316. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1317. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1318. num = i;
  1319. }
  1320. }
  1321. if (num == this.state.replenishUrl.length - 1) {
  1322. return message.warning("已经是最后一张了哦");
  1323. }
  1324. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  1325. this.setState({
  1326. previewImage: this.state.previewImage,
  1327. rotateDeg: 0,
  1328. });
  1329. },
  1330. upImgs() {
  1331. let num = 0;
  1332. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1333. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1334. num = i;
  1335. }
  1336. }
  1337. if (num == 0) {
  1338. return message.warning("已经是第一张了哦");
  1339. }
  1340. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  1341. this.setState({
  1342. previewImage: this.state.previewImage,
  1343. rotateDeg: 0,
  1344. });
  1345. },
  1346. rotates() {
  1347. let rotateDeg = this.state.rotateDeg + 90;
  1348. this.setState({
  1349. rotateDeg,
  1350. });
  1351. },
  1352. getUrl(url) {
  1353. let theorgCodeUrl = [];
  1354. if (url.length) {
  1355. let picArr = [];
  1356. url.map(function (item) {
  1357. if (
  1358. item.response &&
  1359. item.response.data &&
  1360. item.response.data.length
  1361. ) {
  1362. picArr.push(item.response.data);
  1363. }
  1364. });
  1365. theorgCodeUrl = picArr.join(",");
  1366. }
  1367. return theorgCodeUrl;
  1368. },
  1369. sureOut() {
  1370. if (!this.state.companyName) {
  1371. message.warning("公司名称不能为空");
  1372. return;
  1373. }
  1374. if (!this.state.unitPrice) {
  1375. message.warning("单价不能为空");
  1376. return;
  1377. }
  1378. if (!this.state.unitNumber) {
  1379. message.warning("数量不能为空");
  1380. return;
  1381. }
  1382. if (!this.state.amount) {
  1383. message.warning("总金额不能为空");
  1384. return;
  1385. }
  1386. if (!this.state.outsourceRemarks) {
  1387. message.warning("备注不能为空");
  1388. return;
  1389. }
  1390. if (this.state.pictureUrl.length === 0) {
  1391. message.warning("合同扫描件不能为空");
  1392. return;
  1393. }
  1394. $.ajax({
  1395. method: "POST",
  1396. dataType: "json",
  1397. crossDomain: false,
  1398. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  1399. data: {
  1400. id: this.state.id,
  1401. orderNo: this.state.orderNo,
  1402. companyName: this.state.companyName,
  1403. amount: this.state.amount,
  1404. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  1405. ? this.getUrl(this.state.attachmentUrl)
  1406. : "",
  1407. orderStatus: 2,
  1408. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1409. ? this.getUrl(this.state.pictureUrl)
  1410. : "",
  1411. outsourceRemarks: this.state.outsourceRemarks,
  1412. unitNumber: this.state.unitNumber,
  1413. unitPrice: this.state.unitPrice,
  1414. },
  1415. }).done(
  1416. function (data) {
  1417. this.setState({
  1418. loading: false,
  1419. });
  1420. if (!data.error.length) {
  1421. message.success("提交成功!");
  1422. this.visitCancel();
  1423. } else {
  1424. message.warning(data.error[0].message);
  1425. }
  1426. }.bind(this)
  1427. );
  1428. },
  1429. //关闭输入理由框
  1430. noCancel() {
  1431. this.setState({
  1432. noVisible: false,
  1433. aloading: false,
  1434. reason: "",
  1435. });
  1436. },
  1437. //搜索
  1438. search() {
  1439. this.loadData();
  1440. },
  1441. //重置
  1442. reset() {
  1443. this.state.nameSearch = "";
  1444. this.state.contractNoSearch = "";
  1445. this.state.releaseDate[0] = undefined;
  1446. this.state.releaseDate[1] = undefined;
  1447. this.state.refundStatusSearch = undefined;
  1448. this.loadData(1);
  1449. },
  1450. resets() {
  1451. this.state.orderNo = "";
  1452. this.state.customerName = "";
  1453. this.state.releaseDate[0] = undefined;
  1454. this.state.releaseDate[1] = undefined;
  1455. },
  1456. getOrgCodeUrl(e) {
  1457. this.setState({ pictureUrl: e });
  1458. },
  1459. //关闭详情
  1460. visitCancel() {
  1461. this.setState(
  1462. {
  1463. visible: false,
  1464. },
  1465. () => {
  1466. this.setState({
  1467. activeKey: "1",
  1468. });
  1469. }
  1470. );
  1471. this.resets();
  1472. this.loadData();
  1473. },
  1474. visitOk() {
  1475. this.setState({
  1476. visible: false,
  1477. });
  1478. this.resets();
  1479. },
  1480. showDeleteConfirm(fn) {
  1481. confirm({
  1482. title: <p style={{ fontSize: 16, fontWeight: 900 }}>注意</p>,
  1483. content: (
  1484. <p style={{ fontWeight: 900, color: "red" }}>
  1485. 当前订单为外包单,您确定修改为普通订单?
  1486. </p>
  1487. ),
  1488. okText: "确定",
  1489. okType: "danger",
  1490. cancelText: "取消",
  1491. onOk() {
  1492. fn();
  1493. },
  1494. onCancel() { },
  1495. });
  1496. },
  1497. changeList(arr) {
  1498. const newArr = [];
  1499. this.state.columns.forEach(item => {
  1500. arr.forEach(val => {
  1501. if (val === item.title) {
  1502. newArr.push(item);
  1503. }
  1504. });
  1505. });
  1506. this.setState({
  1507. changeList: newArr
  1508. });
  1509. },
  1510. render() {
  1511. const formItemLayout = {
  1512. labelCol: { span: 8 },
  1513. wrapperCol: { span: 14 },
  1514. };
  1515. const FormItem = Form.Item;
  1516. const { TextArea } = Input;
  1517. const { TabPane } = Tabs;
  1518. const { RangePicker } = DatePicker;
  1519. const cuiDataList = this.state.contactList || [];
  1520. return (
  1521. <div className="user-content">
  1522. {this.state.resVisible ? (
  1523. <ResolutionDetail
  1524. cancel={this.resCancel}
  1525. detail={this.state.resRecord}
  1526. visible={this.state.resVisible}
  1527. id={this.state.resRecord.orderNo}
  1528. />
  1529. ) : (
  1530. ""
  1531. )}
  1532. <ShowModalDiv ShowModal={this.state.showModal} />
  1533. <div className="content-title">
  1534. <span>外包订单列表</span>
  1535. </div>
  1536. <div className="user-search">
  1537. <Tabs
  1538. defaultActiveKey="1"
  1539. onChange={this.callback}
  1540. className="test"
  1541. >
  1542. <TabPane tab="搜索" key="1">
  1543. <Input
  1544. placeholder="客户名称"
  1545. style={{
  1546. width: "150px",
  1547. marginBottom: "10px",
  1548. marginLeft: 10,
  1549. marginRight: 10,
  1550. }}
  1551. value={this.state.nameSearch}
  1552. onChange={(e) => {
  1553. this.setState({ nameSearch: e.target.value });
  1554. }}
  1555. />
  1556. <Input
  1557. placeholder="合同编号"
  1558. style={{ width: "150px" }}
  1559. value={this.state.contractNoSearch}
  1560. onChange={(e) => {
  1561. this.setState({ contractNoSearch: e.target.value });
  1562. }}
  1563. />
  1564. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1565. <RangePicker
  1566. value={[
  1567. this.state.releaseDate[0]
  1568. ? moment(this.state.releaseDate[0])
  1569. : null,
  1570. this.state.releaseDate[1]
  1571. ? moment(this.state.releaseDate[1])
  1572. : null,
  1573. ]}
  1574. onChange={(data, dataString) => {
  1575. this.setState({ releaseDate: dataString });
  1576. }}
  1577. />
  1578. <Select
  1579. value={this.state.refundStatusSearch}
  1580. style={{ width: 150, marginLeft: "10px" }}
  1581. onChange={(e) => {
  1582. this.setState({
  1583. refundStatusSearch: e,
  1584. });
  1585. }}
  1586. placeholder="审核状态"
  1587. >
  1588. <Option value={0}>待审核</Option>
  1589. <Option value={1}>审核通过</Option>
  1590. <Option value={2}>审核驳回</Option>
  1591. </Select>
  1592. <Button
  1593. type="primary"
  1594. onClick={this.search}
  1595. style={{ marginLeft: "10px", marginRight: 10 }}
  1596. >
  1597. 搜索
  1598. </Button>
  1599. <Button onClick={this.reset}>重置</Button>
  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="900px"
  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)}
  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={1}
  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. </div>
  2654. );
  2655. },
  2656. })
  2657. );
  2658. export default outsourcingList;