outsourcingList.jsx 95 KB

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