outsourcingList.jsx 90 KB

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