outsourcingList.jsx 93 KB

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