addorders.js 75 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381
  1. import React from "react";
  2. import {
  3. Table,
  4. Modal,
  5. message,
  6. Spin,
  7. Input,
  8. Select,
  9. Button,
  10. Form,
  11. Upload,
  12. Popconfirm,
  13. AutoComplete,
  14. DatePicker,
  15. Col
  16. } from "antd";
  17. import $ from "jquery/src/ajax";
  18. import "../userMangagement.less";
  19. import moment from "moment";
  20. import Picture from "@/manageCenter/publicComponent/picture";
  21. import { jiedian, tepi, boutique } from "../../../dataDic.js";
  22. import {
  23. splitUrl,
  24. getProcessStatus,
  25. getLiquidationStatus,
  26. getboutique,
  27. getApprovedState,
  28. getjiedian,
  29. getCuikuan,
  30. getProjectStatus
  31. } from "../../../tools.js";
  32. import PicturesWall from "./changeComponent/picturesWall.js";
  33. const Addorders = Form.create()(
  34. React.createClass({
  35. //查看项目列表
  36. loadData(orderNo) {
  37. this.state.data = [];
  38. this.setState({
  39. loading: true
  40. });
  41. $.ajax({
  42. method: "get",
  43. dataType: "json",
  44. crossDomain: false,
  45. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  46. data: {
  47. orderNo: orderNo
  48. },
  49. success: function(data) {
  50. let theArr = [];
  51. if (!data.data) {
  52. if (data.error && data.error.length) {
  53. message.warning(data.error[0].message);
  54. }
  55. } else {
  56. for (let i = 0; i < data.data.length; i++) {
  57. let thisdata = data.data[i];
  58. theArr.push({
  59. key: i,
  60. id: thisdata.id,
  61. orderNo: thisdata.orderNo, //订单编号
  62. commodityId: thisdata.commodityId, //项目ID
  63. commodityName: thisdata.commodityName, //项目名称
  64. cname: thisdata.cname, //项目类别
  65. commodityPrice: thisdata.commodityPrice, //项目价格
  66. commodityQuantity: thisdata.commodityQuantity, //项目数量
  67. main: thisdata.main, //是否为主要任务
  68. taskComment: thisdata.taskComment, //任务说明
  69. contacts: thisdata.contacts, //联系人
  70. contactsMobile: thisdata.contactsMobile, //联系人电话
  71. projectStatus: thisdata.projectStatus //项目状态
  72. });
  73. }
  74. }
  75. this.departmentList();
  76. this.setState({
  77. dataSource: theArr,
  78. pagination: false
  79. });
  80. }.bind(this)
  81. }).always(
  82. function() {
  83. this.setState({
  84. loading: false
  85. });
  86. }.bind(this)
  87. );
  88. },
  89. //收款节点
  90. loadDatas(orderNo) {
  91. this.state.data = [];
  92. this.setState({
  93. loading: true
  94. });
  95. $.ajax({
  96. method: "get",
  97. dataType: "json",
  98. crossDomain: false,
  99. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  100. data: {
  101. orderNo: orderNo
  102. },
  103. success: function(data) {
  104. let theArr = [];
  105. if (!data.data) {
  106. if (data.error && data.error.length) {
  107. message.warning(data.error[0].message);
  108. }
  109. } else {
  110. for (let i = 0; i < data.data.length; i++) {
  111. let thisdata = data.data[i];
  112. theArr.push({
  113. key: i,
  114. id: thisdata.id
  115. });
  116. }
  117. }
  118. this.setState({
  119. dataSource: theArr,
  120. pagination: false
  121. });
  122. }.bind(this)
  123. }).always(
  124. function() {
  125. this.setState({
  126. loading: false
  127. });
  128. }.bind(this)
  129. );
  130. },
  131. getInitialState() {
  132. return {
  133. loading: false,
  134. visible: false,
  135. orgCodeUrl: [],
  136. voucherUrl: [],
  137. customerArr: [],
  138. mark: false,
  139. activeKey: "1",
  140. buttonStatus: true,
  141. typeChange: 0,
  142. bussStats: false,
  143. checkedKeys: [],
  144. lookflowList: [],
  145. contractUrl: [],
  146. applicationUrl: [],
  147. active: {
  148. applySign: false
  149. },
  150. lookState: false,
  151. signBillVisible: false,
  152. commod: "",
  153. columns: [
  154. {
  155. title: "业务项目名称",
  156. dataIndex: "commodityName",
  157. key: "commodityName"
  158. },
  159. {
  160. title: "项目类别",
  161. dataIndex: "cname",
  162. key: "cname"
  163. },
  164. {
  165. title: "项目数量",
  166. dataIndex: "commodityQuantity",
  167. key: "commodityQuantity"
  168. },
  169. {
  170. title: "金额(万元)",
  171. dataIndex: "commodityPrice",
  172. key: "commodityPrice"
  173. },
  174. {
  175. title: "负责人",
  176. dataIndex: "contacts",
  177. key: "contacts"
  178. },
  179. {
  180. title: "负责人电话",
  181. dataIndex: "contactsMobile",
  182. key: "contactsMobile"
  183. },
  184. {
  185. title: "项目状态",
  186. dataIndex: "projectStatus",
  187. key: "projectStatus",
  188. render: text => {
  189. return getProjectStatus(text);
  190. }
  191. },
  192. {
  193. title: "主要项目",
  194. dataIndex: "main",
  195. key: "main",
  196. render: text => {
  197. return text ? "是" : "否";
  198. }
  199. },
  200. {
  201. title: "项目说明",
  202. dataIndex: "taskComment",
  203. key: "taskComment",
  204. render: text => {
  205. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  206. }
  207. },
  208. {
  209. title: "操作",
  210. dataIndex: "ABC",
  211. key: "ABC",
  212. render: (_text, record) => {
  213. return (
  214. <div>
  215. {this.state.processStatus == 0 ? (
  216. <Popconfirm
  217. title="是否删除?"
  218. onConfirm={() => {
  219. this.delectRow(record);
  220. }}
  221. okText="是"
  222. cancelText="否"
  223. >
  224. <Button
  225. onClick={e => {
  226. e.stopPropagation();
  227. }}
  228. type="danger"
  229. >
  230. 删除
  231. </Button>
  232. </Popconfirm>
  233. ) : (
  234. ""
  235. )}
  236. </div>
  237. );
  238. }
  239. }
  240. ],
  241. columnsrizhi: [
  242. {
  243. title: "流程",
  244. dataIndex: "processName",
  245. key: "processName"
  246. },
  247. {
  248. title: "操作人",
  249. dataIndex: "adminName",
  250. key: "adminName"
  251. },
  252. {
  253. title: "时间",
  254. dataIndex: "createDate",
  255. key: "createDate"
  256. }
  257. ],
  258. contactList: [],
  259. loading: false,
  260. ContactsLists: [
  261. {
  262. title: "催款科目",
  263. dataIndex: "dunSubject",
  264. key: "dunSubject",
  265. render: (text, record) => {
  266. return (
  267. <div>
  268. {this.props.deleteSign === 3 ||
  269. this.state.processStatus == 0 ? (
  270. <Select
  271. placeholder="请选择催款科目"
  272. value={record.dunSubject}
  273. style={{ width: "150px" }}
  274. onChange={e => {
  275. record.dunSubject = e;
  276. this.setState({ contactList: this.state.contactList });
  277. }}
  278. >
  279. {jiedian.map(function(item) {
  280. return (
  281. <Select.Option key={item.value}>
  282. {item.key}
  283. </Select.Option>
  284. );
  285. })}
  286. </Select>
  287. ) : (
  288. getjiedian(text)
  289. )}
  290. </div>
  291. );
  292. }
  293. },
  294. {
  295. title: "金额(万)",
  296. dataIndex: "money",
  297. key: "money",
  298. render: (text, record) => {
  299. return (
  300. <div>
  301. {this.props.deleteSign === 3 ||
  302. this.state.processStatus == 0 ? (
  303. <Input
  304. value={record.money}
  305. placeholder="请输入金额(必填项)"
  306. key={record.id}
  307. required="required"
  308. onChange={e => {
  309. record.money = e.target.value;
  310. this.setState({ contactList: this.state.contactList });
  311. }}
  312. style={{ width: "120px" }}
  313. />
  314. ) : (
  315. <span>{text}</span>
  316. )}
  317. </div>
  318. );
  319. }
  320. },
  321. {
  322. title: "催款状态",
  323. dataIndex: "dunStatus",
  324. key: "dunStatus",
  325. render: text => {
  326. return getCuikuan(text);
  327. }
  328. },
  329. {
  330. title: "操作",
  331. dataIndex: "dels",
  332. key: "dels",
  333. render: (_text, record, index) => {
  334. return (
  335. <div>
  336. {this.props.deleteSign === 3 ||
  337. this.state.processStatus == 0 ? (
  338. <Popconfirm
  339. title="是否删除?"
  340. onConfirm={() => {
  341. this.confirmDelet(record);
  342. }}
  343. okText="删除"
  344. cancelText="不删除"
  345. >
  346. <Button
  347. style={{
  348. marginRight: "10px",
  349. color: "#ffffff",
  350. background: "#f00",
  351. border: "none"
  352. }}
  353. >
  354. 删除
  355. </Button>
  356. </Popconfirm>
  357. ) : (
  358. ""
  359. )}
  360. {!record.id && index == this.state.contactList.length - 1 ? (
  361. <Button type="primary" onClick={this.contactSave}>
  362. 保存
  363. </Button>
  364. ) : (
  365. ""
  366. )}
  367. </div>
  368. );
  369. }
  370. }
  371. ]
  372. };
  373. },
  374. departmentList() {
  375. this.setState({
  376. loading: true
  377. });
  378. $.ajax({
  379. method: "get",
  380. dataType: "json",
  381. crossDomain: false,
  382. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  383. data: {},
  384. success: function(data) {
  385. let thedata = data.data;
  386. let theArr = [];
  387. if (!thedata) {
  388. if (data.error && data.error.length) {
  389. message.warning(data.error[0].message);
  390. }
  391. thedata = {};
  392. } else {
  393. thedata.map(function(item, index) {
  394. theArr.push({
  395. key: index,
  396. name: item.name,
  397. id: item.id,
  398. depNo: item.depNo
  399. });
  400. });
  401. }
  402. this.setState({
  403. departmentArr: theArr
  404. });
  405. }.bind(this)
  406. }).always(
  407. function() {
  408. this.setState({
  409. loading: false
  410. });
  411. }.bind(this)
  412. );
  413. },
  414. //新建订单、编辑订单保存
  415. handleSubmit() {
  416. let theorgCodeUrl = [];
  417. if (this.state.orgCodeUrl.length) {
  418. let picArr = [];
  419. this.state.orgCodeUrl.map(function(item) {
  420. if (
  421. item.response &&
  422. item.response.data &&
  423. item.response.data.length
  424. ) {
  425. picArr.push(item.response.data);
  426. }
  427. });
  428. theorgCodeUrl = picArr.join(",");
  429. }
  430. if (this.props.data) {
  431. if (!theorgCodeUrl) {
  432. message.warning("图片过大,上传失败");
  433. return false;
  434. }
  435. if (!this.state.signDate) {
  436. message.warning("签单日期不能为空");
  437. return false;
  438. }
  439. if (!this.state.orderRemarks) {
  440. message.warning("订单留言不能为空");
  441. return false;
  442. }
  443. } else {
  444. }
  445. this.setState({
  446. loading: true
  447. });
  448. let api = "/api/admin/newOrder/updateServiceOrderNew";
  449. $.ajax({
  450. method: "POST",
  451. dataType: "json",
  452. crossDomain: false,
  453. url: globalConfig.context + api,
  454. data:
  455. {
  456. orderNo: this.state.orderNo, //订单编号
  457. totalAmount: this.state.totalAmount, //总金额
  458. firstAmount: this.state.firstAmount, //首付
  459. isSubmit: this.state.isSubmit, //保存草稿还是提交
  460. signDate: this.state.signDate, //签单日期
  461. contacts: this.state.contacts, //企业负责人
  462. contactMobile: this.state.contactMobile, //负责人联系方式
  463. legalPerson: this.state.legalPerson, //企业法人
  464. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  465. approval: this.state.approval, //特批状态
  466. orderRemarks: this.state.orderRemarks, //订单备注
  467. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  468. orderDep: this.state.organizationSearch,
  469. deleteSign: this.props.deleteSign === 3 ? 0 : undefined
  470. }
  471. }).done(
  472. function(data) {
  473. this.setState({
  474. loading: false
  475. });
  476. if (!data.error.length) {
  477. message.success("保存成功!");
  478. this.handleOk();
  479. if (this.state.autoId) {
  480. this.loadData(this.props.data);
  481. }
  482. } else {
  483. message.warning(data.error[0].message);
  484. }
  485. }.bind(this)
  486. );
  487. },
  488. //订单详情修改
  489. xiangqingClick(e) {
  490. e.preventDefault();
  491. this.setState({
  492. loading: true
  493. });
  494. $.ajax({
  495. url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
  496. method: "post",
  497. data: {
  498. orderNo: this.state.orderNo, //订单编号
  499. totalAmount: this.state.totalAmount, //总金额
  500. firstAmount: this.state.firstAmount, //首付
  501. isSubmit: this.state.isSubmit, //保存草稿还是提交
  502. signDate: this.state.selTime, //签单日期
  503. contacts: this.state.contacts, //企业负责人
  504. contactMobile: this.state.contactMobile, //负责人联系方式
  505. legalPerson: this.state.legalPerson, //企业法人
  506. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  507. approval: this.state.approval, //特批状态
  508. orderRemarks: this.state.orderRemarks //订单备注
  509. }
  510. }).done(
  511. function(data) {
  512. this.setState({
  513. loading: false
  514. });
  515. if (!data.error.length) {
  516. message.success("保存成功!");
  517. this.loaduser(this.props.data);
  518. } else {
  519. message.warning(data.error[0].message);
  520. }
  521. }.bind(this)
  522. );
  523. },
  524. //查看基本详情基本信息
  525. loaduser(orderNo) {
  526. this.state.orderList = [];
  527. $.ajax({
  528. method: "get",
  529. dataType: "json",
  530. crossDomain: false,
  531. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  532. data: {
  533. orderNo: orderNo
  534. },
  535. success: function(data) {
  536. let thisData = data.data;
  537. if (!thisData) {
  538. if (data.error && data.error.length) {
  539. message.warning(data.error[0].message);
  540. }
  541. thisData = {};
  542. }
  543. // this.props.getPrimaryOrder(thisData.primaryOrder);
  544. // this.props.getAdditionalOrder(thisData.additionalOrder);
  545. this.setState({
  546. id: thisData.id,
  547. kehuId: thisData.buyerId,
  548. orderNo: thisData.orderNo, //订单编号
  549. orderType: thisData.orderType, //订单类型
  550. firstAmount: thisData.firstAmount, //首付金额
  551. totalAmount: thisData.totalAmount, //总金额
  552. settlementAmount: thisData.settlementAmount, //结算金额
  553. liquidationStatus: thisData.liquidationStatus, //清算状态
  554. processStatus: thisData.processStatus, //流程状态
  555. approval: thisData.approval.toString(), //特批状态
  556. orderRemarks: thisData.orderRemarks, //订单备注
  557. contractNo: thisData.contractNo, //合同编号
  558. contacts: thisData.contacts, //联系人
  559. contactMobile: thisData.contactMobile, //联系人电话
  560. legalPerson: thisData.legalPerson, //法人
  561. legalPersonTel: thisData.legalPersonTel, //法人电话
  562. contractNo: thisData.contractNo, //合同编号
  563. orgCodeUrl: thisData.contractPictureUrl
  564. ? splitUrl(
  565. thisData.contractPictureUrl,
  566. ",",
  567. globalConfig.avatarHost + "/upload"
  568. )
  569. : [], //图片地址
  570. signDate: thisData.signDate, //签单时间
  571. userName: thisData.userName, //客户名称
  572. salesmanName: thisData.salesmanName, //营销员名称
  573. salesmanMobile: thisData.salesmanMobile, //营销员电话
  574. oldSalesmanName: thisData.oldSalesmanName, //营销员名称
  575. oldSalesmanMobile: thisData.oldSalesmanMobile, //营销员电话
  576. financeName: thisData.financeName, //财务名称
  577. financeMobile: thisData.financeMobile, //财务电话
  578. nowFinance: thisData.nowFinance,
  579. nowFinanceMobile: thisData.nowFinanceMobile,
  580. contractNo: thisData.contractNo, //合同编号
  581. approval:
  582. thisData.approval == 0
  583. ? thisData.approval.toString()
  584. : thisData.approval,
  585. organizationSearch: thisData.orderDep,
  586. depName: thisData.depName
  587. });
  588. }.bind(this)
  589. }).always(
  590. function() {
  591. this.setState({
  592. loading: false
  593. });
  594. }.bind(this)
  595. );
  596. },
  597. //查看催款节点
  598. loaduserss(orderNo) {
  599. this.state.orderList = [];
  600. this.setState({
  601. orderNoss: orderNo
  602. });
  603. $.ajax({
  604. method: "get",
  605. dataType: "json",
  606. crossDomain: false,
  607. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  608. data: {
  609. orderNo: orderNo
  610. },
  611. success: function(data) {
  612. let theArr = [];
  613. let thisData = [];
  614. if (!thisData) {
  615. if (data.error && data.error.length) {
  616. message.warning(data.error[0].message);
  617. }
  618. thisData = {};
  619. } else {
  620. for (let i = 0; i < data.data.length; i++) {
  621. thisData = data.data[i];
  622. theArr.push({
  623. key: i,
  624. dunStatus: thisData.dunStatus,
  625. dunSubject: thisData.dunSubject
  626. ? thisData.dunSubject.toString()
  627. : "", //催款科目
  628. id: thisData.id, //节点Id
  629. money: thisData.money, //催款金额
  630. orderNo: orderNo
  631. });
  632. }
  633. this.setState({
  634. contactList: theArr
  635. });
  636. }
  637. }.bind(this)
  638. }).always(
  639. function() {
  640. this.setState({
  641. loading: false
  642. });
  643. }.bind(this)
  644. );
  645. },
  646. //催款节点保存
  647. contactSave() {
  648. if (this.state.contactList) {
  649. let cuiData = this.state.contactList;
  650. for (var a = 0; a < cuiData.length; a++) {
  651. if (cuiData[a].money == "") {
  652. message.warning("催款金额不能为空");
  653. this.refs.signFirstPayment.focus();
  654. return false;
  655. } else if (!cuiData[a].dunSubject) {
  656. message.warning("催款科目不能为空");
  657. this.refs.signFirstPayment.focus();
  658. return false;
  659. }
  660. }
  661. }
  662. this.setState({
  663. loading: true
  664. });
  665. $.ajax({
  666. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  667. method: "post",
  668. data: {
  669. orderNo: this.state.orderNoss,
  670. orderDun: JSON.stringify(this.state.contactList)
  671. }
  672. }).done(
  673. function(data) {
  674. this.setState({
  675. loading: false
  676. });
  677. if (!data.error.length) {
  678. message.success("保存成功!");
  679. this.loaduserss(this.props.data);
  680. } else {
  681. message.warning(data.error[0].message);
  682. }
  683. }.bind(this)
  684. );
  685. },
  686. //点击新增催款节点
  687. addcontact() {
  688. this.state.contactList.push({
  689. key: this.state.contactList.length,
  690. money: "",
  691. dunSubject: undefined,
  692. orderNo: this.state.orderNoss,
  693. dunTarget: this.state.kehuId
  694. });
  695. this.setState({
  696. contactList: this.state.contactList
  697. });
  698. },
  699. //删除收款节点
  700. confirmDelet(index) {
  701. if (index.id) {
  702. this.state.contactList.splice(index.key, 1);
  703. this.setState({
  704. contactList: this.state.contactList
  705. });
  706. this.contactSave();
  707. } else {
  708. this.state.contactList.splice(index.key, 1);
  709. this.setState({
  710. contactList: this.state.contactList
  711. });
  712. }
  713. },
  714. handleOk() {
  715. this.setState({
  716. visible: false
  717. });
  718. this.props.closeDesc(false, true);
  719. },
  720. handleCancel() {
  721. if (this.state.orderType == undefined) {
  722. return false;
  723. }
  724. if (!this.state.autoId) {
  725. return false;
  726. }
  727. this.setState({
  728. visible: false
  729. });
  730. this.props.closeDesc(false);
  731. },
  732. handleCancelclose() {
  733. this.setState(
  734. {
  735. visible: false
  736. },
  737. () => {
  738. this.setState({
  739. activeKey: "1"
  740. });
  741. }
  742. );
  743. this.props.closeDesc(false);
  744. this.reset();
  745. },
  746. //点击签单
  747. handleCancels() {
  748. this.setState(
  749. {
  750. isSubmit: 1
  751. },
  752. () => {
  753. this.handleSubmit();
  754. }
  755. );
  756. },
  757. //点击签单
  758. handleCancelq() {
  759. this.setState(
  760. {
  761. isSubmit: 0
  762. },
  763. () => {
  764. this.handleSubmit();
  765. }
  766. );
  767. },
  768. //删除
  769. delectRow(record) {
  770. this.setState({
  771. loading: true
  772. });
  773. $.ajax({
  774. method: "post",
  775. dataType: "json",
  776. crossDomain: false,
  777. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  778. data: {
  779. id: record.id
  780. }
  781. }).done(
  782. function(data) {
  783. if (!data.error.length) {
  784. message.success("删除成功!");
  785. this.setState({
  786. loading: false
  787. });
  788. //this.loaduser()
  789. this.loadData(this.props.data);
  790. } else {
  791. message.warning(data.error[0].message);
  792. }
  793. }.bind(this)
  794. );
  795. },
  796. nextCancel() {
  797. this.setState({
  798. addnextVisible: false
  799. });
  800. },
  801. rizhi() {
  802. this.setState({
  803. loading: true
  804. });
  805. $.ajax({
  806. method: "get",
  807. dataType: "json",
  808. crossDomain: false,
  809. url: "/api/admin/newOrder/selectOrderLog",
  810. data: {
  811. orderNo: this.props.data
  812. },
  813. success: function(data) {
  814. let theArr = [];
  815. let thisData = data.data;
  816. if (!thisData.length) {
  817. if (data.error && data.error.length) {
  818. message.warning(data.error[0].message);
  819. }
  820. thisData = {};
  821. } else {
  822. for (let i = 0; i < data.data.length; i++) {
  823. let thisdata = data.data[i];
  824. theArr.push({
  825. processName: thisdata.processName,
  826. adminName: thisdata.adminName,
  827. createDate: thisdata.createDate
  828. });
  829. }
  830. }
  831. this.setState({
  832. dataSourcerizhi: theArr
  833. });
  834. }.bind(this)
  835. }).always(
  836. function() {
  837. this.setState({
  838. loading: false
  839. });
  840. }.bind(this)
  841. );
  842. },
  843. //查看订单日志
  844. getOrderLog() {
  845. this.setState({
  846. rizhivisible: true
  847. });
  848. this.rizhi();
  849. },
  850. closeOrderLog() {
  851. this.setState({
  852. rizhivisible: false
  853. });
  854. },
  855. callback(key) {
  856. this.setState({
  857. activeKey: key
  858. });
  859. },
  860. getOrgCodeUrl(e) {
  861. this.setState({ orgCodeUrl: e });
  862. },
  863. getVoucherUrl(e) {
  864. this.setState({ voucherUrl: e });
  865. },
  866. //加载(自动补全)
  867. supervisor(e, state) {
  868. //客户名称与服务名称自动补全
  869. let api = state
  870. ? "/api/admin/customer/getCustomerByName"
  871. : "/api/admin/order/getBusinessProjectByName";
  872. $.ajax({
  873. method: "get",
  874. dataType: "json",
  875. crossDomain: false,
  876. url: globalConfig.context + api,
  877. data: state
  878. ? {
  879. name: e,
  880. type: this.state.customType
  881. }
  882. : {
  883. businessName: e
  884. },
  885. success: function(data) {
  886. let thedata = data.data;
  887. if (!thedata) {
  888. if (data.error && data.error.length) {
  889. message.warning(data.error[0].message);
  890. }
  891. thedata = {};
  892. }
  893. this.setState({
  894. states: state,
  895. customerArr: thedata
  896. });
  897. }.bind(this)
  898. }).always(
  899. function() {
  900. this.setState({
  901. loading: false
  902. });
  903. }.bind(this)
  904. );
  905. },
  906. //上级主管输入框失去焦点是判断客户是否存在
  907. selectAuto(value) {
  908. let kid = [];
  909. let fwList = this.state.customerArr;
  910. fwList.map(function(item) {
  911. if (value == item.bname) {
  912. kid = item;
  913. }
  914. });
  915. this.setState({
  916. commodityName: value,
  917. gid: kid.id,
  918. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  919. commodityFirstPayment:
  920. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  921. });
  922. },
  923. //客户
  924. selectAutoCUT(value) {
  925. let autoIds;
  926. let fwList = this.state.customerArr;
  927. fwList.map(function(item) {
  928. if (value == item.name) {
  929. autoIds = item.id;
  930. }
  931. });
  932. this.setState({
  933. customerName: value,
  934. autoId: autoIds
  935. });
  936. },
  937. //服务值改变时请求客户名称
  938. httpChange(e) {
  939. this.state.gid = "";
  940. if (e.length >= 1) {
  941. this.supervisor(e, false);
  942. }
  943. this.setState({
  944. commodityName: e
  945. });
  946. },
  947. //客户名称自动补全
  948. customerChange(e) {
  949. if (this.state.customType) {
  950. this.state.autoId = "";
  951. if (e.length >= 2) {
  952. this.supervisor(e, true);
  953. }
  954. this.setState({
  955. customerName: e
  956. });
  957. } else {
  958. this.setState({
  959. customerName: ""
  960. });
  961. message.warning("客户所属类型必须指定");
  962. }
  963. },
  964. //点击添加项目明细
  965. addDetailed() {
  966. this.setState({
  967. gid: "",
  968. customerArr: [],
  969. commodityName: "",
  970. commodityQuantity: "",
  971. commodityId: "",
  972. taskComment: "",
  973. main: undefined,
  974. commodityPrice: "",
  975. addState: 1,
  976. addnextVisible: true
  977. });
  978. },
  979. //新建项目明细保存
  980. nextSubmit(e) {
  981. e.preventDefault();
  982. if (this.state.gid == undefined || !this.state.gid) {
  983. message.warning("服务名称不匹配!");
  984. return false;
  985. }
  986. if (!this.state.commodityPrice) {
  987. message.warning("请输入金额!");
  988. this.refs.commodityPrice.focus();
  989. return false;
  990. }
  991. if (!this.state.commodityQuantity) {
  992. message.warning("请输入商品数量!");
  993. this.refs.commodityQuantity.focus();
  994. return false;
  995. }
  996. if (!this.state.main) {
  997. message.warning("请选择是否为主要项目!");
  998. this.refs.commodityQuantity.focus();
  999. return false;
  1000. }
  1001. this.setState({
  1002. loading: true
  1003. });
  1004. let api = this.state.addState
  1005. ? "/api/admin/newOrder/addOrderTask"
  1006. : "/api/bianji";
  1007. $.ajax({
  1008. method: "POST",
  1009. dataType: "json",
  1010. crossDomain: false,
  1011. url: globalConfig.context + api,
  1012. data: {
  1013. commodityId: this.state.gid, //商品ID
  1014. orderNo: this.props.data, //订单编号
  1015. commodityName: this.state.commodityName, //商品名称
  1016. commodityQuantity: this.state.commodityQuantity, //商品数量
  1017. commodityPrice: this.state.commodityPrice, //签单总价
  1018. taskComment: this.state.taskComment, //服务说明
  1019. main: this.state.main //是否为主要项目
  1020. }
  1021. }).done(
  1022. function(data) {
  1023. this.setState({
  1024. loading: false
  1025. });
  1026. if (!data.error.length) {
  1027. message.success("保存成功!");
  1028. this.nextCancel();
  1029. //this.loaduser(this.props.datauser);
  1030. this.loadData(this.props.data);
  1031. } else {
  1032. message.warning(data.error[0].message);
  1033. }
  1034. }.bind(this)
  1035. );
  1036. },
  1037. //点击打卡项目详情
  1038. tableRowClick(record) {
  1039. this.setState({
  1040. jid: record.id, //项目ID
  1041. kid: record.commodityId, //商品ID
  1042. commodityName: record.commodityName, //金额
  1043. commodityPrice: record.commodityPrice, //金额
  1044. commodityQuantity: record.commodityQuantity, //数量
  1045. taskComment: record.taskComment, //备注
  1046. main: record.main.toString(), //是否为主要
  1047. addnextVisible: true,
  1048. addState: 0
  1049. });
  1050. },
  1051. //修改项目详情
  1052. tabRowSave(e) {
  1053. e.preventDefault();
  1054. if (!this.state.commodityPrice) {
  1055. message.warning("金额不能为空!");
  1056. return false;
  1057. }
  1058. if (!this.state.commodityQuantity) {
  1059. message.warning("数量不能为空!");
  1060. return false;
  1061. }
  1062. if (!this.state.main) {
  1063. message.warning("请选择是否为主要项目!");
  1064. this.refs.commodityQuantity.focus();
  1065. return false;
  1066. }
  1067. $.ajax({
  1068. method: "POST",
  1069. dataType: "json",
  1070. crossDomain: false,
  1071. url: globalConfig.context + "/api/admin/newOrder/updateOrderTask",
  1072. data: {
  1073. id: this.state.jid, //项目ID
  1074. commodityId: this.state.kid, //商品ID
  1075. orderNo: this.props.data, //订单编号
  1076. main: this.state.main, //是否为主要
  1077. commodityPrice: this.state.commodityPrice, //金额
  1078. commodityQuantity: this.state.commodityQuantity, //数量
  1079. taskComment: this.state.taskComment //备注
  1080. }
  1081. }).done(
  1082. function(data) {
  1083. this.setState({
  1084. loading: false
  1085. });
  1086. if (!data.error.length) {
  1087. message.success("保存成功!");
  1088. this.nextCancel();
  1089. //this.loaduser(this.props.datauser);
  1090. this.loadData(this.props.data);
  1091. } else {
  1092. message.warning(data.error[0].message);
  1093. }
  1094. }.bind(this)
  1095. );
  1096. },
  1097. //签单时间选择
  1098. selTime(e, index) {
  1099. this.setState({
  1100. entryTime: e,
  1101. signDate: e,
  1102. selTime: index
  1103. });
  1104. },
  1105. //退单操作
  1106. //点击退单
  1107. tuikuan() {
  1108. this.setState({
  1109. lookVisible: true,
  1110. contractUrl: [],
  1111. applicationUrl: [],
  1112. reason: ""
  1113. });
  1114. },
  1115. //关闭退单
  1116. noCancel() {
  1117. this.setState({
  1118. lookVisible: false
  1119. });
  1120. },
  1121. //点击确认退单
  1122. tuidanOk() {
  1123. let contractUrls = [];
  1124. let applicationUrls = [];
  1125. if (this.state.contractUrl.length) {
  1126. let picArr = [];
  1127. this.state.contractUrl.map(function(item) {
  1128. if (
  1129. item.response &&
  1130. item.response.data &&
  1131. item.response.data.length
  1132. ) {
  1133. picArr.push(item.response.data);
  1134. }
  1135. });
  1136. contractUrls = picArr.join(",");
  1137. }
  1138. if (this.state.applicationUrl.length) {
  1139. let picArr = [];
  1140. this.state.applicationUrl.map(function(item) {
  1141. if (
  1142. item.response &&
  1143. item.response.data &&
  1144. item.response.data.length
  1145. ) {
  1146. picArr.push(item.response.data);
  1147. }
  1148. });
  1149. applicationUrls = picArr.join(",");
  1150. }
  1151. $.ajax({
  1152. method: "POST",
  1153. dataType: "json",
  1154. crossDomain: false,
  1155. url: globalConfig.context + "/api/admin/newOrder/addOrderRefund",
  1156. data: {
  1157. orderNo: this.state.orderNo, //订单编号
  1158. contractUrl: contractUrls.length ? contractUrls : "", //终止合同
  1159. applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
  1160. reason: this.state.reason //退单原因
  1161. }
  1162. }).done(
  1163. function(data) {
  1164. this.setState({
  1165. loading: false
  1166. });
  1167. if (!data.error.length) {
  1168. message.success("退单成功!");
  1169. this.noCancel();
  1170. this.handleCancelclose();
  1171. } else {
  1172. message.warning(data.error[0].message);
  1173. }
  1174. }.bind(this)
  1175. );
  1176. },
  1177. //开单选择订单类型骚操作
  1178. orderTypeFn(e) {
  1179. if (e == 0) {
  1180. this.setState({
  1181. bussStats: true,
  1182. orderType: e
  1183. });
  1184. this.category();
  1185. } else {
  1186. this.setState({
  1187. contractType: undefined,
  1188. bussStats: false,
  1189. orderType: e
  1190. });
  1191. }
  1192. },
  1193. //品类数据获取
  1194. category() {
  1195. $.ajax({
  1196. method: "get",
  1197. dataType: "json",
  1198. crossDomain: false,
  1199. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  1200. data: {},
  1201. success: function(data) {
  1202. let thedata = data.data;
  1203. let theArr = [];
  1204. if (!thedata) {
  1205. if (data.error && data.error.length) {
  1206. message.warning(data.error[0].message);
  1207. }
  1208. thedata = {};
  1209. } else {
  1210. thedata.map(function(item, index) {
  1211. theArr.push({
  1212. key: index,
  1213. name: item.cname,
  1214. id: item.id
  1215. });
  1216. });
  1217. }
  1218. this.setState({
  1219. contractType: undefined,
  1220. categoryArr: theArr
  1221. });
  1222. }.bind(this)
  1223. });
  1224. },
  1225. //变更申请
  1226. changeApply() {
  1227. let theorgCodeUrl = [];
  1228. if (this.state.voucherUrl.length) {
  1229. let picArr = [];
  1230. this.state.voucherUrl.map(function(item) {
  1231. if (
  1232. item.response &&
  1233. item.response.data &&
  1234. item.response.data.length
  1235. ) {
  1236. picArr.push(item.response.data);
  1237. }
  1238. });
  1239. theorgCodeUrl = picArr.join(",");
  1240. }
  1241. $.ajax({
  1242. method: "post",
  1243. dataType: "json",
  1244. crossDomain: false,
  1245. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  1246. data: {
  1247. orderNo: this.state.orderNo, //订单编号
  1248. processState: 0,
  1249. status: 1,
  1250. remarks: this.state.remarksC,
  1251. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1252. totalAmount: this.state.totalAmountC,
  1253. settlementAmount: this.state.settlementAmountC,
  1254. changeAmount: this.state.changeAmount,
  1255. applicant: this.state.applicant,
  1256. depName: this.state.depNameChange,
  1257. type: this.state.typeChange
  1258. }
  1259. }).done(
  1260. function(data) {
  1261. this.setState({
  1262. loading: false
  1263. });
  1264. if (!data.error.length) {
  1265. message.success("变更成功!");
  1266. this.setState({
  1267. mark: true
  1268. });
  1269. this.noCancel();
  1270. this.handleCancelclose();
  1271. } else {
  1272. message.warning(data.error[0].message);
  1273. }
  1274. }.bind(this)
  1275. );
  1276. },
  1277. reset() {
  1278. this.setState({
  1279. remarksC: undefined,
  1280. voucherUrl: [],
  1281. totalAmountC: undefined,
  1282. settlementAmountC: undefined,
  1283. changeAmount: undefined,
  1284. applicant: undefined,
  1285. depNameChange: undefined,
  1286. typeChange: 0
  1287. });
  1288. },
  1289. componentDidMount() {
  1290. this.loaduser(this.props.data);
  1291. this.loaduserss(this.props.data);
  1292. this.loadData(this.props.data);
  1293. },
  1294. componentWillReceiveProps(nextProps) {
  1295. if (nextProps.mark) {
  1296. this.setState({
  1297. buttonStatus: true
  1298. });
  1299. } else {
  1300. this.setState({
  1301. buttonStatus: false
  1302. });
  1303. }
  1304. if (nextProps.activeKey === "4") {
  1305. this.loaduser(this.props.data);
  1306. this.loaduserss(this.props.data);
  1307. this.loadData(this.props.data);
  1308. }
  1309. },
  1310. render() {
  1311. const FormItem = Form.Item;
  1312. const formItemLayout = {
  1313. labelCol: { span: 8 },
  1314. wrapperCol: { span: 14 }
  1315. };
  1316. const formItemList = [
  1317. {
  1318. label: "企业联系人",
  1319. content: <span>{this.state.contacts}</span>
  1320. },
  1321. {
  1322. label: "联系人电话",
  1323. content: <span>{this.state.contactMobile}</span>
  1324. },
  1325. {
  1326. label: "企业法人",
  1327. content: <span>{this.state.legalPerson}</span>
  1328. },
  1329. {
  1330. label: "法人电话",
  1331. content: <span>{this.state.legalPersonTel}</span>
  1332. },
  1333. {
  1334. label: "签单金额(万元)",
  1335. content: <span>{this.state.totalAmount}</span>
  1336. },
  1337. {
  1338. label: "首付金额(万元)",
  1339. content: <span>{this.state.firstAmount}</span>
  1340. },
  1341. {
  1342. label: "特批立项",
  1343. content: <span>{getApprovedState(this.state.approval)}</span>
  1344. },
  1345. {
  1346. label: "合同签订时间",
  1347. content: <span>{this.state.signDate}</span>
  1348. },
  1349. {
  1350. label: "订单部门",
  1351. content: <span>{this.state.depName}</span>
  1352. }
  1353. ];
  1354. const dataSources = this.state.customerArr || [];
  1355. let departmentArr = this.state.departmentArr || [];
  1356. const options = this.state.states
  1357. ? dataSources.map(group => (
  1358. <Select.Option key={group.id} value={group.name}>
  1359. {group.name}
  1360. </Select.Option>
  1361. ))
  1362. : dataSources.map((group, index) => (
  1363. <Select.Option key={index} value={group.bname}>
  1364. {group.bname}
  1365. </Select.Option>
  1366. ));
  1367. return (
  1368. <div>
  1369. <Spin spinning={this.state.loading}>
  1370. <div className="clearfix">
  1371. <FormItem
  1372. className="half-item"
  1373. {...formItemLayout}
  1374. label="合同编号"
  1375. >
  1376. {<span>{this.state.contractNo}</span>}
  1377. </FormItem>
  1378. <FormItem
  1379. className="half-item"
  1380. {...formItemLayout}
  1381. label="订单编号"
  1382. >
  1383. <span>{this.state.orderNo}</span>
  1384. </FormItem>
  1385. <FormItem
  1386. className="half-item"
  1387. {...formItemLayout}
  1388. label="流程状态"
  1389. >
  1390. <span>{getProcessStatus(this.state.processStatus)}</span>
  1391. </FormItem>
  1392. <FormItem
  1393. className="half-item"
  1394. {...formItemLayout}
  1395. label="结算状态"
  1396. >
  1397. <span>
  1398. {getLiquidationStatus(this.state.liquidationStatus)}
  1399. </span>
  1400. </FormItem>
  1401. {this.props.deleteSign === 3 || this.state.processStatus === 0 ? (
  1402. <div className="clearfix">
  1403. <FormItem
  1404. className="half-item"
  1405. {...formItemLayout}
  1406. label="特批立项"
  1407. >
  1408. <Select
  1409. placeholder="请选择客户所属类型"
  1410. style={{ width: "240px" }}
  1411. value={this.state.approval}
  1412. onChange={e => {
  1413. this.setState({ approval: e });
  1414. }}
  1415. >
  1416. {tepi.map(function(item) {
  1417. return (
  1418. <Select.Option key={item.value}>
  1419. {item.key}
  1420. </Select.Option>
  1421. );
  1422. })}
  1423. </Select>
  1424. </FormItem>
  1425. <FormItem
  1426. className="half-item"
  1427. {...formItemLayout}
  1428. label="合同签订时间"
  1429. >
  1430. <DatePicker
  1431. style={{
  1432. marginTop: "2px",
  1433. width: "240px",
  1434. height: "32px"
  1435. }}
  1436. showTime
  1437. format="YYYY-MM-DD"
  1438. onOk={() => {}}
  1439. value={
  1440. this.state.signDate ? moment(this.state.signDate) : null
  1441. }
  1442. onChange={(_data, dataString) => {
  1443. this.setState({ signDate: dataString });
  1444. }}
  1445. />
  1446. <span className="mandatory">*</span>
  1447. </FormItem>
  1448. <FormItem
  1449. className="half-item"
  1450. {...formItemLayout}
  1451. label="订单部门"
  1452. >
  1453. <Select
  1454. placeholder="请输入订单部门"
  1455. style={{ width: 240 }}
  1456. value={this.state.organizationSearch}
  1457. onChange={e => {
  1458. this.setState({ organizationSearch: e });
  1459. }}
  1460. >
  1461. {departmentArr.map(function(item) {
  1462. return (
  1463. <Select.Option key={item.id}>
  1464. {item.name}
  1465. </Select.Option>
  1466. );
  1467. })}
  1468. </Select>
  1469. </FormItem>
  1470. </div>
  1471. ) : (
  1472. <div className="clearfix">
  1473. <FormItem
  1474. className="half-item"
  1475. {...formItemLayout}
  1476. label="特批立项"
  1477. >
  1478. <span>{getApprovedState(this.state.approval)}</span>
  1479. </FormItem>
  1480. <FormItem
  1481. className="half-item"
  1482. {...formItemLayout}
  1483. label="合同签订时间"
  1484. >
  1485. <span>{this.state.signDate}</span>
  1486. </FormItem>
  1487. <FormItem
  1488. className="half-item"
  1489. {...formItemLayout}
  1490. label="订单部门"
  1491. >
  1492. <span>{this.state.depName}</span>
  1493. </FormItem>
  1494. </div>
  1495. )}
  1496. </div>
  1497. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  1498. 收款项目
  1499. </h3>
  1500. {this.props.deleteSign === 3 || this.state.processStatus === 0 ? (
  1501. <div className="clearfix">
  1502. <FormItem
  1503. className="half-item"
  1504. {...formItemLayout}
  1505. label="签单金额(万元)"
  1506. >
  1507. <Input
  1508. placeholder="签单金额"
  1509. ref="signTotalAmount"
  1510. value={this.state.totalAmount}
  1511. onChange={e => {
  1512. this.setState({ totalAmount: e.target.value });
  1513. }}
  1514. style={{ width: "240px" }}
  1515. />
  1516. <span className="mandatory">*</span>
  1517. </FormItem>
  1518. <FormItem
  1519. className="half-item"
  1520. {...formItemLayout}
  1521. label="首付金额(万元)"
  1522. >
  1523. <Input
  1524. placeholder="请输入实签首款金额"
  1525. ref="signFirstPayment"
  1526. value={this.state.firstAmount}
  1527. onChange={e => {
  1528. this.setState({ firstAmount: e.target.value });
  1529. }}
  1530. style={{ width: "240px" }}
  1531. />
  1532. <span className="mandatory">*</span>
  1533. </FormItem>
  1534. <FormItem
  1535. className="half-item"
  1536. {...formItemLayout}
  1537. label="已收款项"
  1538. >
  1539. <span>{this.state.settlementAmount + "万元"}</span>
  1540. {/* {this.state.settlementAmount ? (
  1541. <Button
  1542. type="primary"
  1543. onClick={this.tuikuan}
  1544. style={{
  1545. float: "right",
  1546. marginRight: "50px",
  1547. marginBottom: "15px"
  1548. }}
  1549. >
  1550. 退单
  1551. </Button>
  1552. ) : (
  1553. ""
  1554. )} */}
  1555. </FormItem>
  1556. </div>
  1557. ) : (
  1558. <div className="clearfix">
  1559. <FormItem
  1560. className="half-item"
  1561. {...formItemLayout}
  1562. label="签单金额(万元)"
  1563. >
  1564. <span>{this.state.totalAmount}</span>
  1565. </FormItem>
  1566. <FormItem
  1567. className="half-item"
  1568. {...formItemLayout}
  1569. label="首付金额(万元)"
  1570. >
  1571. <span>{this.state.firstAmount}</span>
  1572. </FormItem>
  1573. <FormItem
  1574. className="half-item"
  1575. {...formItemLayout}
  1576. label="已收款项"
  1577. >
  1578. <span>{this.state.settlementAmount + "万元"}</span>
  1579. {/* {this.state.settlementAmount ? (
  1580. <Button
  1581. type="primary"
  1582. onClick={this.tuikuan}
  1583. style={{
  1584. float: "right",
  1585. marginRight: "50px",
  1586. marginBottom: "15px"
  1587. }}
  1588. >
  1589. 退单
  1590. </Button>
  1591. ) : (
  1592. ""
  1593. )} */}
  1594. </FormItem>
  1595. </div>
  1596. )}
  1597. <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
  1598. 联系信息
  1599. </h3>
  1600. {this.props.deleteSign === 3 || this.state.processStatus == 0 ? (
  1601. <div className="clearfix">
  1602. <div className="clearfix">
  1603. <FormItem
  1604. className="half-item"
  1605. {...formItemLayout}
  1606. label="客户名称"
  1607. >
  1608. <span>{this.state.userName}</span>
  1609. </FormItem>
  1610. </div>
  1611. <FormItem
  1612. className="half-item"
  1613. {...formItemLayout}
  1614. label="企业联系人"
  1615. >
  1616. <Input
  1617. placeholder="请输入联系人"
  1618. ref="signTotalAmount"
  1619. value={this.state.contacts}
  1620. onChange={e => {
  1621. this.setState({ contacts: e.target.value });
  1622. }}
  1623. style={{ width: "240px" }}
  1624. />
  1625. </FormItem>
  1626. <FormItem
  1627. className="half-item"
  1628. {...formItemLayout}
  1629. label="联系人电话"
  1630. >
  1631. <Input
  1632. placeholder="请输入联系人电话"
  1633. ref="signTotalAmount"
  1634. value={this.state.contactMobile}
  1635. onChange={e => {
  1636. this.setState({ contactMobile: e.target.value });
  1637. }}
  1638. style={{ width: "240px" }}
  1639. />
  1640. </FormItem>
  1641. <FormItem
  1642. className="half-item"
  1643. {...formItemLayout}
  1644. label="企业法人"
  1645. >
  1646. <Input
  1647. placeholder="请输入法人"
  1648. ref="signTotalAmount"
  1649. value={this.state.legalPerson}
  1650. onChange={e => {
  1651. this.setState({ legalPerson: e.target.value });
  1652. }}
  1653. style={{ width: "240px" }}
  1654. />
  1655. </FormItem>
  1656. <FormItem
  1657. className="half-item"
  1658. {...formItemLayout}
  1659. label="法人电话"
  1660. >
  1661. <Input
  1662. placeholder="请输入法人电话"
  1663. ref="signTotalAmount"
  1664. value={this.state.legalPersonTel}
  1665. onChange={e => {
  1666. this.setState({ legalPersonTel: e.target.value });
  1667. }}
  1668. style={{ width: "240px" }}
  1669. />
  1670. </FormItem>
  1671. </div>
  1672. ) : (
  1673. <div className="clearfix">
  1674. {formItemList.map((data, index) => {
  1675. return (
  1676. <FormItem
  1677. className="half-item"
  1678. {...formItemLayout}
  1679. key={index}
  1680. label={data.label}
  1681. >
  1682. {data.content}
  1683. </FormItem>
  1684. );
  1685. })}
  1686. </div>
  1687. )}
  1688. <div className="clearfix">
  1689. {this.props.deleteSign === 3 || this.state.processStatus == 0 ? (
  1690. <FormItem
  1691. labelCol={{ span: 4 }}
  1692. wrapperCol={{ span: 18 }}
  1693. label={
  1694. <span>
  1695. <strong style={{ color: "#f00" }}>*</strong>合同扫描件
  1696. </span>
  1697. }
  1698. >
  1699. <PicturesWall
  1700. fileList={this.getOrgCodeUrl}
  1701. pictureUrl={this.state.orgCodeUrl}
  1702. url="/api/admin/order/uploadOrderImg"
  1703. sign=""
  1704. />
  1705. <p>图片建议:要清晰。</p>
  1706. <Button
  1707. style={{
  1708. float: "right",
  1709. marginRight: "140px",
  1710. marginTop: "20px"
  1711. }}
  1712. onClick={this.getOrderLog}
  1713. >
  1714. 查看订单日志
  1715. </Button>
  1716. </FormItem>
  1717. ) : (
  1718. <FormItem
  1719. labelCol={{ span: 4 }}
  1720. wrapperCol={{ span: 18 }}
  1721. label="合同扫描件"
  1722. >
  1723. <Upload
  1724. className="demandDetailShow-upload"
  1725. listType="picture-card"
  1726. fileList={this.state.orgCodeUrl}
  1727. onPreview={file => {
  1728. this.setState({
  1729. previewImage: file.url || file.thumbUrl,
  1730. previewVisible: true
  1731. });
  1732. }}
  1733. ></Upload>
  1734. <Modal
  1735. maskClosable={false}
  1736. footer={null}
  1737. visible={this.state.previewVisible}
  1738. onCancel={() => {
  1739. this.setState({ previewVisible: false });
  1740. }}
  1741. >
  1742. <img
  1743. alt=""
  1744. style={{ width: "100%" }}
  1745. src={this.state.previewImage || ""}
  1746. />
  1747. </Modal>
  1748. <Button
  1749. style={{
  1750. float: "right",
  1751. marginRight: "140px",
  1752. marginTop: "20px"
  1753. }}
  1754. onClick={this.getOrderLog}
  1755. >
  1756. 查看订单日志
  1757. </Button>
  1758. </FormItem>
  1759. )}
  1760. </div>
  1761. <div className="clearfix">
  1762. {this.props.deleteSign === 3 || this.state.processStatus == 0 ? (
  1763. <div className="clearfix">
  1764. <FormItem
  1765. labelCol={{ span: 4 }}
  1766. wrapperCol={{ span: 16 }}
  1767. label="订单留言"
  1768. >
  1769. <Input
  1770. type="textarea"
  1771. placeholder="请输入订单留言"
  1772. rows={4}
  1773. value={this.state.orderRemarks}
  1774. onChange={e => {
  1775. this.setState({ orderRemarks: e.target.value });
  1776. }}
  1777. style={{ width: "95%" }}
  1778. />
  1779. <span className="mandatory">*</span>
  1780. </FormItem>
  1781. </div>
  1782. ) : (
  1783. <FormItem
  1784. labelCol={{ span: 4 }}
  1785. wrapperCol={{ span: 16 }}
  1786. label="订单留言"
  1787. >
  1788. <p style={{ width: 500, wordWrap: "break-word" }}>
  1789. {this.state.orderRemarks}
  1790. </p>
  1791. </FormItem>
  1792. )}
  1793. </div>
  1794. <div className="clearfix">
  1795. <FormItem
  1796. className="half-item"
  1797. {...formItemLayout}
  1798. label="订单负责人"
  1799. >
  1800. <span>{this.state.salesmanName}</span>
  1801. </FormItem>
  1802. <FormItem
  1803. className="half-item"
  1804. {...formItemLayout}
  1805. label="订单负责人电话"
  1806. >
  1807. <span>{this.state.salesmanMobile}</span>
  1808. </FormItem>
  1809. </div>
  1810. <div className="clearfix">
  1811. <FormItem
  1812. className="half-item"
  1813. {...formItemLayout}
  1814. label="当前财务负责人"
  1815. >
  1816. <span>{this.state.nowFinance}</span>
  1817. </FormItem>
  1818. <FormItem
  1819. className="half-item"
  1820. {...formItemLayout}
  1821. label="当前财务负责人电话"
  1822. >
  1823. <span>{this.state.nowFinanceMobile}</span>
  1824. </FormItem>
  1825. </div>
  1826. <div className="clearfix">
  1827. <FormItem
  1828. className="half-item"
  1829. {...formItemLayout}
  1830. style={{ opacity: ".5" }}
  1831. label="原订单负责人"
  1832. >
  1833. <span>{this.state.oldSalesmanName}</span>
  1834. </FormItem>
  1835. <FormItem
  1836. className="half-item"
  1837. {...formItemLayout}
  1838. style={{ opacity: ".5" }}
  1839. label="原订单负责人电话"
  1840. >
  1841. <span>{this.state.oldSalesmanMobile}</span>
  1842. </FormItem>
  1843. </div>
  1844. <div className="clearfix">
  1845. <FormItem
  1846. className="half-item"
  1847. style={{ opacity: ".5" }}
  1848. {...formItemLayout}
  1849. label="实际财务操作人"
  1850. >
  1851. <span>{this.state.financeName}</span>
  1852. </FormItem>
  1853. <FormItem
  1854. className="half-item"
  1855. {...formItemLayout}
  1856. style={{ opacity: ".5" }}
  1857. label="实际财务操作人电话"
  1858. >
  1859. <span>{this.state.financeMobile}</span>
  1860. </FormItem>
  1861. </div>
  1862. <div>
  1863. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1864. 催款节点
  1865. </span>
  1866. {this.props.deleteSign === 3 || this.state.processStatus == 0 ? (
  1867. <Button
  1868. type="primary"
  1869. onClick={this.addcontact}
  1870. style={{
  1871. float: "right",
  1872. marginRight: "50px",
  1873. marginBottom: "15px"
  1874. }}
  1875. >
  1876. 添加催款节点
  1877. </Button>
  1878. ) : (
  1879. ""
  1880. )}
  1881. </div>
  1882. <div className="clearfix">
  1883. <Spin spinning={this.state.loading}>
  1884. <Form layout="horizontal" id="demand-form">
  1885. <Table
  1886. pagination={false}
  1887. columns={this.state.ContactsLists}
  1888. dataSource={this.state.contactList}
  1889. />
  1890. <Col span={24} offset={9} style={{ marginTop: "15px" }}></Col>
  1891. </Form>
  1892. </Spin>
  1893. </div>{" "}
  1894. <div>
  1895. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1896. 项目业务
  1897. </span>
  1898. {this.props.deleteSign === 3 || this.state.processStatus == 0 ? (
  1899. <Button
  1900. type="primary"
  1901. onClick={this.addDetailed}
  1902. style={{
  1903. float: "right",
  1904. marginRight: "50px",
  1905. marginBottom: "15px"
  1906. }}
  1907. >
  1908. 添加项目明细
  1909. </Button>
  1910. ) : (
  1911. ""
  1912. )}
  1913. </div>
  1914. <div className="patent-table">
  1915. <Spin spinning={this.state.loading}>
  1916. <Table
  1917. columns={this.state.columns}
  1918. dataSource={this.state.dataSource}
  1919. pagination={this.state.pagination}
  1920. onRowClick={this.tableRowClick}
  1921. />
  1922. </Spin>
  1923. </div>{" "}
  1924. {this.props.deleteSign === 3 || this.state.processStatus == 0 ? (
  1925. <div
  1926. className="addSave"
  1927. style={{
  1928. marginTop: "15px",
  1929. display: "flex",
  1930. justifyContent: "flex-end"
  1931. }}
  1932. >
  1933. {!this.state.buttonStatus ? (
  1934. <Button
  1935. className="cancel"
  1936. type="primary"
  1937. onClick={this.handleCancels}
  1938. style={{ marginRight: 20 }}
  1939. htmlType="submit"
  1940. >
  1941. 签单
  1942. </Button>
  1943. ) : (
  1944. ""
  1945. )}
  1946. <Button
  1947. className="cancel"
  1948. type="primary"
  1949. onClick={this.handleCancelq}
  1950. style={{ marginRight: 40 }}
  1951. htmlType="submit"
  1952. >
  1953. 保存
  1954. </Button>
  1955. </div>
  1956. ) : (
  1957. ""
  1958. )}
  1959. </Spin>
  1960. <Modal
  1961. maskClosable={false}
  1962. visible={this.state.addnextVisible}
  1963. onOk={this.nextCancel}
  1964. onCancel={this.nextCancel}
  1965. width="800px"
  1966. title={this.state.addState ? "添加项目任务" : "项目任务详情"}
  1967. footer=""
  1968. className="admin-desc-content"
  1969. >
  1970. <Form
  1971. layout="horizontal"
  1972. onSubmit={this.nextSubmit}
  1973. id="demand-form"
  1974. >
  1975. <Spin spinning={this.state.loading}>
  1976. {this.state.addState ? (
  1977. <div className="clearfix">
  1978. <FormItem
  1979. className="half-item"
  1980. {...formItemLayout}
  1981. label="服务名称"
  1982. >
  1983. <AutoComplete
  1984. className="certain-category-search"
  1985. dropdownClassName="certain-category-search-dropdown"
  1986. dropdownMatchSelectWidth={false}
  1987. dropdownStyle={{ width: 200 }}
  1988. style={{ width: "200px" }}
  1989. dataSource={options}
  1990. placeholder="输入服务名称"
  1991. value={this.state.commodityName}
  1992. onChange={this.httpChange}
  1993. filterOption={true}
  1994. onSelect={this.selectAuto}
  1995. >
  1996. <Input />
  1997. </AutoComplete>
  1998. <span className="mandatory">*</span>
  1999. </FormItem>
  2000. <FormItem
  2001. className="half-item"
  2002. {...formItemLayout}
  2003. label="服务数量"
  2004. >
  2005. <Input
  2006. placeholder="请输入服务数量"
  2007. value={this.state.commodityQuantity}
  2008. style={{ width: "200px" }}
  2009. onChange={e => {
  2010. this.setState({ commodityQuantity: e.target.value });
  2011. }}
  2012. ref="commodityQuantity"
  2013. />
  2014. <span className="mandatory">*</span>
  2015. </FormItem>
  2016. <FormItem
  2017. className="half-item"
  2018. {...formItemLayout}
  2019. label="实签价格(万元)"
  2020. >
  2021. <Input
  2022. placeholder="请输入实签价格"
  2023. value={this.state.commodityPrice}
  2024. style={{ width: "200px" }}
  2025. onChange={e => {
  2026. this.setState({ commodityPrice: e.target.value });
  2027. }}
  2028. ref="commodityPrice"
  2029. />
  2030. <span className="mandatory">*</span>
  2031. </FormItem>
  2032. <FormItem
  2033. className="half-item"
  2034. {...formItemLayout}
  2035. label="主要业务"
  2036. >
  2037. <Select
  2038. placeholder="选择是否为主要业务"
  2039. style={{ width: "200px" }}
  2040. value={this.state.main}
  2041. onChange={e => {
  2042. this.setState({ main: e });
  2043. }}
  2044. >
  2045. {boutique.map(function(item) {
  2046. return (
  2047. <Select.Option key={item.value}>
  2048. {item.key}
  2049. </Select.Option>
  2050. );
  2051. })}
  2052. </Select>
  2053. <span className="mandatory">*</span>
  2054. </FormItem>
  2055. <div className="clearfix">
  2056. <FormItem
  2057. labelCol={{ span: 4 }}
  2058. wrapperCol={{ span: 16 }}
  2059. label="服务说明"
  2060. >
  2061. <Input
  2062. type="textarea"
  2063. placeholder="请输入服务说明"
  2064. value={this.state.taskComment}
  2065. onChange={e => {
  2066. this.setState({ taskComment: e.target.value });
  2067. }}
  2068. />
  2069. </FormItem>
  2070. </div>
  2071. <FormItem
  2072. wrapperCol={{ span: 12, offset: 4 }}
  2073. className="half-middle"
  2074. >
  2075. <Button
  2076. className="submitSave"
  2077. type="primary"
  2078. htmlType="submit"
  2079. >
  2080. 保存
  2081. </Button>
  2082. <Button
  2083. className="submitSave"
  2084. type="ghost"
  2085. onClick={this.nextCancel}
  2086. >
  2087. 取消
  2088. </Button>
  2089. </FormItem>
  2090. </div>
  2091. ) : (
  2092. <div className="clearfix">
  2093. {this.props.deleteSign === 3 ||
  2094. this.state.processStatus == 0 ? (
  2095. <div className="clearfix">
  2096. <FormItem
  2097. className="half-item"
  2098. {...formItemLayout}
  2099. label="项目名称"
  2100. >
  2101. <span>{this.state.commodityName}</span>
  2102. </FormItem>
  2103. <FormItem
  2104. className="half-item"
  2105. {...formItemLayout}
  2106. label="项目数量"
  2107. >
  2108. <Input
  2109. placeholder="请输入数量"
  2110. value={this.state.commodityQuantity}
  2111. style={{ width: "200px" }}
  2112. onChange={e => {
  2113. this.setState({
  2114. commodityQuantity: e.target.value
  2115. });
  2116. }}
  2117. />
  2118. <span className="mandatory">*</span>
  2119. </FormItem>
  2120. <FormItem
  2121. className="half-item"
  2122. {...formItemLayout}
  2123. label="金额(万元)"
  2124. >
  2125. <Input
  2126. placeholder="请输入签单金额"
  2127. value={this.state.commodityPrice}
  2128. style={{ width: "200px" }}
  2129. onChange={e => {
  2130. this.setState({ commodityPrice: e.target.value });
  2131. }}
  2132. />
  2133. <span className="mandatory">*</span>
  2134. </FormItem>
  2135. <FormItem
  2136. className="half-item"
  2137. {...formItemLayout}
  2138. label="主要项目"
  2139. >
  2140. <Select
  2141. placeholder="选择是否为主要业务"
  2142. style={{ width: "200px" }}
  2143. value={this.state.main}
  2144. onChange={e => {
  2145. this.setState({ main: e });
  2146. }}
  2147. >
  2148. {boutique.map(function(item) {
  2149. return (
  2150. <Select.Option key={item.value}>
  2151. {item.key}
  2152. </Select.Option>
  2153. );
  2154. })}
  2155. </Select>
  2156. <span className="mandatory">*</span>
  2157. </FormItem>
  2158. <div className="clearfix">
  2159. <FormItem
  2160. labelCol={{ span: 4 }}
  2161. wrapperCol={{ span: 16 }}
  2162. label="服务说明"
  2163. >
  2164. <Input
  2165. type="textarea"
  2166. placeholder="请输入服务说明"
  2167. value={this.state.taskComment}
  2168. onChange={e => {
  2169. this.setState({ taskComment: e.target.value });
  2170. }}
  2171. />
  2172. </FormItem>
  2173. </div>
  2174. <FormItem
  2175. wrapperCol={{ span: 12, offset: 4 }}
  2176. className="half-middle"
  2177. >
  2178. <Button
  2179. className="submitSave"
  2180. type="primary"
  2181. onClick={this.tabRowSave}
  2182. >
  2183. 保存
  2184. </Button>
  2185. <Button
  2186. className="submitSave"
  2187. type="ghost"
  2188. onClick={this.nextCancel}
  2189. >
  2190. 取消
  2191. </Button>
  2192. </FormItem>
  2193. </div>
  2194. ) : (
  2195. <div className="clearfix">
  2196. <FormItem
  2197. className="half-item"
  2198. {...formItemLayout}
  2199. label="项目名称"
  2200. >
  2201. <span>{this.state.commodityName}</span>
  2202. </FormItem>
  2203. <FormItem
  2204. className="half-item"
  2205. {...formItemLayout}
  2206. label="项目数量"
  2207. >
  2208. <span>{this.state.commodityQuantity}</span>
  2209. </FormItem>
  2210. <FormItem
  2211. className="half-item"
  2212. {...formItemLayout}
  2213. label="金额(万元)"
  2214. >
  2215. <span>{this.state.commodityPrice}</span>
  2216. </FormItem>
  2217. <FormItem
  2218. className="half-item"
  2219. {...formItemLayout}
  2220. label="主要项目"
  2221. >
  2222. <span>{getboutique(this.state.main)}</span>
  2223. </FormItem>
  2224. <div className="clearfix">
  2225. <FormItem
  2226. labelCol={{ span: 4 }}
  2227. wrapperCol={{ span: 16 }}
  2228. label="服务说明"
  2229. >
  2230. <span>{this.state.taskComment}</span>
  2231. </FormItem>
  2232. </div>
  2233. </div>
  2234. )}
  2235. </div>
  2236. )}
  2237. </Spin>
  2238. </Form>
  2239. </Modal>
  2240. <Modal
  2241. maskClosable={false}
  2242. visible={this.state.lookVisible}
  2243. onOk={this.noCancel}
  2244. onCancel={this.noCancel}
  2245. width="800px"
  2246. title={"退单申请"}
  2247. footer=""
  2248. className="admin-desc-content"
  2249. >
  2250. <Form layout="horizontal" id="demand-form">
  2251. <Spin spinning={this.state.loading}>
  2252. <div className="clearfix">
  2253. <FormItem
  2254. labelCol={{ span: 4 }}
  2255. wrapperCol={{ span: 16 }}
  2256. label="终止合同"
  2257. >
  2258. <Picture
  2259. fileList={e => {
  2260. this.setState({ contractUrl: e });
  2261. }}
  2262. pictureUrl={this.state.contractUrl}
  2263. visible={this.props.visible}
  2264. data={{
  2265. sign: "order_refund_file",
  2266. url: "/api/admin/newOrder/uploadRefundOrderFile",
  2267. number: 8
  2268. }}
  2269. />
  2270. </FormItem>
  2271. </div>
  2272. <div className="clearfix">
  2273. <FormItem
  2274. labelCol={{ span: 4 }}
  2275. wrapperCol={{ span: 16 }}
  2276. label="退单申请表"
  2277. >
  2278. <Picture
  2279. fileList={e => {
  2280. this.setState({ applicationUrl: e });
  2281. }}
  2282. pictureUrl={this.state.applicationUrl}
  2283. visible={this.props.visible}
  2284. data={{
  2285. sign: "order_refund_file",
  2286. url: "/api/admin/newOrder/uploadRefundOrderFile",
  2287. number: 8
  2288. }}
  2289. />
  2290. </FormItem>
  2291. </div>
  2292. <div className="clearfix">
  2293. <FormItem
  2294. labelCol={{ span: 4 }}
  2295. wrapperCol={{ span: 16 }}
  2296. label="退单理由"
  2297. >
  2298. <Input
  2299. type="textarea"
  2300. placeholder="请输入退单理由"
  2301. rows={4}
  2302. value={this.state.reason}
  2303. onChange={e => {
  2304. this.setState({ reason: e.target.value });
  2305. }}
  2306. />
  2307. </FormItem>
  2308. </div>
  2309. <div className="clearfix">
  2310. <Button
  2311. className="cancel"
  2312. type="primary"
  2313. onClick={this.tuidanOk}
  2314. style={{ marginLeft: "50px" }}
  2315. htmlType="submit"
  2316. >
  2317. 确定退单
  2318. </Button>
  2319. <Button
  2320. className="cancel"
  2321. type="ghost"
  2322. onClick={this.noCancel}
  2323. style={{ marginLeft: "50px" }}
  2324. >
  2325. 取消
  2326. </Button>
  2327. </div>
  2328. </Spin>
  2329. </Form>
  2330. </Modal>
  2331. <Modal
  2332. visible={this.state.rizhivisible}
  2333. className="admin-desc-content"
  2334. width="800px"
  2335. maskClosable={false}
  2336. title="订单日志"
  2337. footer={null}
  2338. onCancel={this.closeOrderLog}
  2339. >
  2340. <div className="patent-table">
  2341. <Spin spinning={this.state.loading}>
  2342. <Table
  2343. columns={this.state.columnsrizhi}
  2344. dataSource={this.state.dataSourcerizhi}
  2345. pagination={false}
  2346. />
  2347. </Spin>
  2348. </div>
  2349. </Modal>
  2350. </div>
  2351. );
  2352. }
  2353. })
  2354. );
  2355. export default Addorders;