addorders.js 76 KB

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