outsourcingList.jsx 93 KB

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