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