outsourcingList.jsx 95 KB

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