addService.jsx 114 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148
  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. Tabs
  17. } from "antd";
  18. import $ from "jquery/src/ajax";
  19. import "../userMangagement.less";
  20. import "../billing.less";
  21. import moment from "moment";
  22. import Picture from "@/manageCenter/publicComponent/picture";
  23. import OrderRiZi from "@/orderRiZi.jsx";
  24. import {
  25. orderTypes,
  26. customerType,
  27. jiedian,
  28. tepi,
  29. boutique
  30. } from "../../../dataDic.js";
  31. import {
  32. splitUrl,
  33. getProcessStatus,
  34. getLiquidationStatus,
  35. getboutique,
  36. getApprovedState,
  37. getjiedian,
  38. getCuikuan,
  39. getProjectStatus,
  40. moneyVerify
  41. } from "../../../tools.js";
  42. import {cuiJieDian} from "@/dataDic.js"
  43. import PicturesWall from "./changeComponent/picturesWall.js";
  44. import { changeType, getChangeType } from "./changeComponent/changeDetailYxgly";
  45. // const Options = Select.Option;
  46. const Option = AutoComplete.Option;
  47. const NewService = Form.create()(
  48. React.createClass({
  49. //查看项目列表
  50. loadData(record) {
  51. this.state.data = [];
  52. this.setState({
  53. loading: true
  54. });
  55. $.ajax({
  56. method: "get",
  57. dataType: "json",
  58. crossDomain: false,
  59. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  60. data: {
  61. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  62. },
  63. success: function(data) {
  64. let theArr = [];
  65. if (!data.data) {
  66. if (data.error && data.error.length) {
  67. message.warning(data.error[0].message);
  68. }
  69. } else {
  70. for (let i = 0; i < data.data.length; i++) {
  71. let thisdata = data.data[i];
  72. theArr.push({
  73. key: i,
  74. id: thisdata.id,
  75. orderNo: thisdata.orderNo, //订单编号
  76. commodityId: thisdata.commodityId, //项目ID
  77. commodityName: thisdata.commodityName, //项目名称
  78. cname: thisdata.cname, //项目类别
  79. commodityPrice: thisdata.commodityPrice, //项目价格
  80. commodityQuantity: thisdata.commodityQuantity, //项目数量
  81. main: thisdata.main, //是否为主要任务
  82. taskComment: thisdata.taskComment, //任务说明
  83. contacts: thisdata.contacts, //联系人
  84. contactsMobile: thisdata.contactsMobile, //联系人电话
  85. projectStatus: thisdata.projectStatus, //项目状态
  86. sort: thisdata.cSort
  87. });
  88. }
  89. }
  90. this.departmentList();
  91. this.setState({
  92. dataSource: theArr,
  93. pagination: false
  94. });
  95. }.bind(this)
  96. }).always(
  97. function() {
  98. this.setState({
  99. loading: false
  100. });
  101. }.bind(this)
  102. );
  103. },
  104. //收款节点
  105. loadDatas(record) {
  106. this.state.data = [];
  107. this.setState({
  108. loading: true
  109. });
  110. $.ajax({
  111. method: "get",
  112. dataType: "json",
  113. crossDomain: false,
  114. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  115. data: {
  116. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  117. },
  118. success: function(data) {
  119. let theArr = [];
  120. if (!data.data) {
  121. if (data.error && data.error.length) {
  122. message.warning(data.error[0].message);
  123. }
  124. } else {
  125. for (let i = 0; i < data.data.length; i++) {
  126. let thisdata = data.data[i];
  127. theArr.push({
  128. key: i,
  129. id: thisdata.id
  130. });
  131. }
  132. }
  133. this.setState({
  134. dataSource: theArr,
  135. pagination: false
  136. });
  137. }.bind(this)
  138. }).always(
  139. function() {
  140. this.setState({
  141. loading: false
  142. });
  143. }.bind(this)
  144. );
  145. },
  146. getInitialState() {
  147. return {
  148. cuiFlag: false,
  149. startRemarks: "",
  150. remarksC: "",
  151. loading: false,
  152. visible: false,
  153. status: 4,
  154. orgCodeUrl: [],
  155. voucherUrl: [],
  156. customerArr: [],
  157. mark: false,
  158. activeKey: "1",
  159. typeChange: 0,
  160. bussStats: false,
  161. checkedKeys: [],
  162. lookflowList: [],
  163. contractUrl: [],
  164. applicationUrl: [],
  165. changeAmount: "0",
  166. active: {
  167. applySign: false
  168. },
  169. lookState: false,
  170. signBillVisible: false,
  171. commod: "",
  172. columns: [
  173. {
  174. title: "业务项目名称",
  175. dataIndex: "commodityName",
  176. key: "commodityName"
  177. },
  178. {
  179. title: "项目类别",
  180. dataIndex: "cname",
  181. key: "cname"
  182. },
  183. {
  184. title: "项目数量",
  185. dataIndex: "commodityQuantity",
  186. key: "commodityQuantity"
  187. },
  188. {
  189. title: "金额(万元)",
  190. dataIndex: "commodityPrice",
  191. key: "commodityPrice"
  192. },
  193. {
  194. title: "负责人",
  195. dataIndex: "contacts",
  196. key: "contacts"
  197. },
  198. {
  199. title: "负责人电话",
  200. dataIndex: "contactsMobile",
  201. key: "contactsMobile"
  202. },
  203. {
  204. title: "项目状态",
  205. dataIndex: "projectStatus",
  206. key: "projectStatus",
  207. render: text => {
  208. return getProjectStatus(text);
  209. }
  210. },
  211. {
  212. title: "主要项目",
  213. dataIndex: "main",
  214. key: "main",
  215. render: text => {
  216. return text ? "是" : "否";
  217. }
  218. },
  219. {
  220. title: "项目说明",
  221. dataIndex: "taskComment",
  222. key: "taskComment",
  223. render: text => {
  224. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  225. }
  226. },
  227. {
  228. title: "操作",
  229. dataIndex: "ABC",
  230. key: "ABC",
  231. render: (text, record) => {
  232. return (
  233. <div>
  234. {this.state.processStatus == 0 ? (
  235. <Popconfirm
  236. title="是否删除?"
  237. onConfirm={() => {
  238. this.delectRow(record);
  239. }}
  240. okText="是"
  241. cancelText="否"
  242. >
  243. <Button
  244. onClick={e => {
  245. e.stopPropagation();
  246. }}
  247. type="danger"
  248. >
  249. 删除
  250. </Button>
  251. </Popconfirm>
  252. ) : (
  253. ""
  254. )}
  255. </div>
  256. );
  257. }
  258. }
  259. ],
  260. columnsrizhi: [
  261. {
  262. title: "流程",
  263. dataIndex: "processName",
  264. key: "processName"
  265. },
  266. {
  267. title: "操作人",
  268. dataIndex: "adminName",
  269. key: "adminName"
  270. },
  271. {
  272. title: "时间",
  273. dataIndex: "createDate",
  274. key: "createDate"
  275. }
  276. ],
  277. contactList: [],
  278. loading: false,
  279. ContactsLists: [
  280. {
  281. title: "项目名称",
  282. dataIndex: "mingcheng",
  283. key: "mingcheng",
  284. render: (text, record) => {
  285. return (
  286. <Select
  287. placeholder="请选择名称"
  288. style={{ width: "150px" }}
  289. // value={record.sortName}
  290. onChange={(e) => {
  291. record.sortName = e
  292. // console.log(record);
  293. this.state.dataSource.forEach(item => {
  294. if(item.commodityName == record.sortName) {
  295. record.cname = item.cname
  296. record.id = item.id
  297. record.sort = item.sort
  298. }
  299. })
  300. console.log(e);
  301. }}
  302. >
  303. {this.state.dataSource.map(item => {
  304. return (
  305. <Select.Option key={item.id} value={item.commodityName}>
  306. {item.commodityName}
  307. </Select.Option>
  308. );
  309. })}
  310. </Select>
  311. );
  312. }
  313. },
  314. {
  315. title: "项目分类",
  316. dataIndex: "fenlei",
  317. key: "fenlei",
  318. render: (text, record) => {
  319. console.log(this.state.dataSource);
  320. console.log(record);
  321. // const arr = this.state.dataSource.filter(item => {
  322. // return item.commodityName == record.sortName;
  323. // })
  324. // console.log("arr",arr);
  325. return (
  326. <Select
  327. placeholder="请选择分类"
  328. style={{ width: "150px" }}
  329. // value={record.sortName}
  330. onChange={e => {
  331. record.cname = e;
  332. console.log(record);
  333. }}
  334. >
  335. {this.state.dataSource.map(item => {
  336. return (
  337. <Select.Option key={item.id} value={item.cname}>
  338. {item.cname}
  339. </Select.Option>
  340. );
  341. })}
  342. </Select>
  343. );
  344. }
  345. },
  346. // {
  347. // title: "项目名称",
  348. // dataIndex: "mingcheng",
  349. // key: "mingcheng",
  350. // render: (text, record) => {
  351. // const dataSources = this.state.customerCuiArr || [];
  352. // const optionsCui = dataSources.map(group => (
  353. // <Select.Option key={group.id} value={group.bname}>
  354. // {group.bname}
  355. // </Select.Option>
  356. // ));
  357. // return (
  358. // <div>
  359. // <AutoComplete
  360. // className="certain-category-search"
  361. // dropdownClassName="certain-category-search-dropdown"
  362. // dropdownMatchSelectWidth={false}
  363. // dropdownStyle={{ width: 200 }}
  364. // style={{ width: "200px" }}
  365. // dataSource={optionsCui}
  366. // placeholder="输入服务名称"
  367. // value={this.state.commodityNameCui}
  368. // onChange={this.httpChangeCui}
  369. // filterOption={true}
  370. // onSelect={this.selectAutoCui}
  371. // >
  372. //                         
  373. // <Input />
  374. //                       
  375. // </AutoComplete>
  376. // </div>
  377. // );
  378. // }
  379. // },
  380. {
  381. title: "催款科目",
  382. dataIndex: "dunSubject",
  383. key: "dunSubject",
  384. render: (text, record) => {
  385. return (
  386. <div>
  387. {this.state.processStatus == 0 ? (
  388. <Select
  389. placeholder="请选择催款科目"
  390. value={record.dunSubject}
  391. style={{ width: "150px" }}
  392. onChange={e => {
  393. record.dunSubject = e;
  394. this.setState({ contactList: this.state.contactList });
  395. }}
  396. >
  397. {jiedian.map(function(item) {
  398. return (
  399. <Select.Option key={item.value}>
  400. {item.key}
  401. </Select.Option>
  402. );
  403. })}
  404. </Select>
  405. ) : (
  406. getjiedian(text)
  407. )}
  408. </div>
  409. );
  410. }
  411. },
  412. {
  413. title: "时间",
  414. dataIndex: "time",
  415. key: "time",
  416. render: (text, record) => {
  417. return (
  418. <Select
  419. placeholder="请选择时间"
  420. style={{ width: "150px" }}
  421. disabled={this.state.approval == 0 ? true : false}
  422. onChange={e => {
  423. console.log("ee", e);
  424. record.waitDay = e;
  425. console.log("time",record);
  426. }}
  427. >
  428. <Select.Option key={3}>3天</Select.Option>
  429. <Select.Option key={5}>5天</Select.Option>
  430. <Select.Option key={7}>7天</Select.Option>
  431. <Select.Option key={15}>15天</Select.Option>
  432. </Select>
  433. );
  434. }
  435. },
  436. {
  437. title: "金额(万)",
  438. dataIndex: "money",
  439. key: "money",
  440. render: (text, record) => {
  441. return (
  442. <div>
  443. {this.state.processStatus == 0 ? (
  444. <Input
  445. value={record.money}
  446. placeholder="请输入金额(必填项)"
  447. key={record.id}
  448. required="required"
  449. onChange={e => {
  450. record.money = e.target.value;
  451. this.setState({ contactList: this.state.contactList });
  452. }}
  453. style={{ width: "120px" }}
  454. />
  455. ) : (
  456. <span>{text}</span>
  457. )}
  458. </div>
  459. );
  460. }
  461. },
  462. {
  463. title: "催款状态",
  464. dataIndex: "dunStatus",
  465. key: "dunStatus",
  466. render: text => {
  467. return getCuikuan(text);
  468. }
  469. },
  470. {
  471. title: "操作",
  472. dataIndex: "dels",
  473. key: "dels",
  474. render: (text, record, index) => {
  475. return (
  476. <div>
  477. {this.state.processStatus == 0 ? (
  478. <Popconfirm
  479. title="是否删除?"
  480. onConfirm={() => {
  481. this.confirmDelet(record);
  482. }}
  483. okText="删除"
  484. cancelText="不删除"
  485. >
  486. <Button
  487. style={{
  488. marginRight: "10px",
  489. color: "#ffffff",
  490. background: "#f00",
  491. border: "none"
  492. }}
  493. >
  494. 删除
  495. </Button>
  496. </Popconfirm>
  497. ) : (
  498. ""
  499. )}
  500. {!record.id && index == this.state.contactList.length - 1 ? (
  501. <Button type="primary" onClick={this.contactSave}>
  502. 保存
  503. </Button>
  504. ) : (
  505. ""
  506. )}
  507. </div>
  508. );
  509. }
  510. }
  511. ]
  512. };
  513. },
  514. departmentList() {
  515. this.setState({
  516. loading: true
  517. });
  518. $.ajax({
  519. method: "get",
  520. dataType: "json",
  521. crossDomain: false,
  522. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  523. data: {},
  524. success: function(data) {
  525. let thedata = data.data;
  526. let theArr = [];
  527. if (!thedata) {
  528. if (data.error && data.error.length) {
  529. message.warning(data.error[0].message);
  530. }
  531. thedata = {};
  532. } else {
  533. thedata.map(function(item, index) {
  534. theArr.push({
  535. key: index,
  536. name: item.name,
  537. id: item.id,
  538. depNo: item.depNo
  539. });
  540. });
  541. }
  542. this.setState({
  543. departmentArr: theArr
  544. });
  545. }.bind(this)
  546. }).always(
  547. function() {
  548. this.setState({
  549. loading: false
  550. });
  551. }.bind(this)
  552. );
  553. },
  554. //新建订单、编辑订单保存
  555. handleSubmit(e) {
  556. e.preventDefault();
  557. let theorgCodeUrl = [];
  558. if (this.state.orgCodeUrl.length) {
  559. let picArr = [];
  560. this.state.orgCodeUrl.map(function(item) {
  561. if (
  562. item.response &&
  563. item.response.data &&
  564. item.response.data.length
  565. ) {
  566. picArr.push(item.response.data);
  567. }
  568. });
  569. theorgCodeUrl = picArr.join(",");
  570. }
  571. if (this.props.userDetaile) {
  572. if (this.state.totalAmount === "") {
  573. message.warning("签单金额不能为空");
  574. this.refs.signFirstPayment.focus();
  575. return false;
  576. }
  577. if (this.state.firstAmount === "") {
  578. message.warning("首付金额不能为空");
  579. this.refs.signFirstPayment.focus();
  580. return false;
  581. }
  582. if (moneyVerify(this.state.firstAmount)) {
  583. return;
  584. }
  585. if (moneyVerify(this.state.totalAmount)) {
  586. return;
  587. }
  588. if (!theorgCodeUrl) {
  589. message.warning("图片过大,上传失败");
  590. this.refs.signFirstPayment.focus();
  591. return false;
  592. }
  593. if (!this.state.signDate) {
  594. message.warning("签单日期不能为空");
  595. this.refs.signFirstPayment.focus();
  596. return false;
  597. }
  598. if (!this.state.orderRemarks) {
  599. message.warning("订单留言不能为空");
  600. this.refs.signFirstPayment.focus();
  601. return false;
  602. }
  603. } else {
  604. }
  605. this.setState({
  606. loading: true
  607. });
  608. let api = this.props.userDetaile
  609. ? "/api/admin/newOrder/updateServiceOrderNew"
  610. : "/api/admin/newOrder/createOrder";
  611. $.ajax({
  612. method: "POST",
  613. dataType: "json",
  614. crossDomain: false,
  615. url: globalConfig.context + api,
  616. data: !this.props.userDetaile
  617. ? {
  618. uid: this.state.autoId,
  619. orderType: this.state.orderType
  620. }
  621. : {
  622. orderNo: this.state.orderNo, //订单编号
  623. totalAmount: this.state.totalAmount, //总金额
  624. firstAmount: this.state.firstAmount, //首付
  625. isSubmit: this.state.isSubmit, //保存草稿还是提交
  626. signDate: this.state.signDate, //签单日期
  627. contacts: this.state.contacts, //企业负责人
  628. contactMobile: this.state.contactMobile, //负责人联系方式
  629. legalPerson: this.state.legalPerson, //企业法人
  630. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  631. approval: this.state.approval, //特批状态
  632. orderRemarks: this.state.orderRemarks, //订单备注
  633. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  634. orderDep: this.state.organizationSearch
  635. }
  636. }).done(
  637. function(data) {
  638. this.setState({
  639. loading: false
  640. });
  641. if (!data.error.length) {
  642. message.success("保存成功!");
  643. this.handleOk();
  644. if (this.state.autoId) {
  645. this.loadData();
  646. }
  647. } else {
  648. message.warning(data.error[0].message);
  649. }
  650. }.bind(this)
  651. );
  652. },
  653. //订单详情修改
  654. xiangqingClick(e) {
  655. e.preventDefault();
  656. this.setState({
  657. loading: true
  658. });
  659. if (this.state.approval == 2 || this.state.approval == 3) {
  660. message.warning("特批状态不正确");
  661. this.setState({
  662. loading: false
  663. });
  664. return;
  665. }
  666. $.ajax({
  667. url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
  668. method: "post",
  669. data: {
  670. orderNo: this.state.orderNo, //订单编号
  671. totalAmount: this.state.totalAmount, //总金额
  672. firstAmount: this.state.firstAmount, //首付
  673. isSubmit: this.state.isSubmit, //保存草稿还是提交
  674. signDate: this.state.selTime, //签单日期
  675. contacts: this.state.contacts, //企业负责人
  676. contactMobile: this.state.contactMobile, //负责人联系方式
  677. legalPerson: this.state.legalPerson, //企业法人
  678. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  679. approval: this.state.approval, //特批状态
  680. orderRemarks: this.state.orderRemarks //订单备注
  681. }
  682. }).done(
  683. function(data) {
  684. this.setState({
  685. loading: false
  686. });
  687. if (!data.error.length) {
  688. message.success("保存成功!");
  689. this.loaduser();
  690. } else {
  691. message.warning(data.error[0].message);
  692. }
  693. }.bind(this)
  694. );
  695. },
  696. //查看基本详情基本信息
  697. loaduser(record) {
  698. this.state.orderList = [];
  699. $.ajax({
  700. method: "get",
  701. dataType: "json",
  702. crossDomain: false,
  703. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  704. data: {
  705. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  706. },
  707. success: function(data) {
  708. let thisData = data.data;
  709. if (!thisData) {
  710. if (data.error && data.error.length) {
  711. message.warning(data.error[0].message);
  712. }
  713. thisData = {};
  714. }
  715. if (thisData.approval == 2) {
  716. thisData.approval = "特批通过";
  717. } else if (thisData.approval == 3) {
  718. thisData.approval = "特批驳回";
  719. }
  720. this.setState({
  721. id: thisData.id,
  722. kehuId: thisData.buyerId,
  723. orderNo: thisData.orderNo, //订单编号
  724. orderType: thisData.orderType, //订单类型
  725. firstAmount: thisData.firstAmount, //首付金额
  726. totalAmount: thisData.totalAmount, //总金额
  727. settlementAmount: thisData.settlementAmount, //结算金额
  728. liquidationStatus: thisData.liquidationStatus, //清算状态
  729. processStatus: thisData.processStatus, //流程状态
  730. approval: thisData.approval.toString(), //特批状态
  731. orderRemarks: thisData.orderRemarks, //订单备注
  732. contractNo: thisData.contractNo, //合同编号
  733. contacts: thisData.contacts, //联系人
  734. contactMobile: thisData.contactMobile, //联系人电话
  735. legalPerson: thisData.legalPerson, //法人
  736. legalPersonTel: thisData.legalPersonTel, //法人电话
  737. contractNo: thisData.contractNo, //合同编号
  738. orgCodeUrl: thisData.contractPictureUrl
  739. ? splitUrl(
  740. thisData.contractPictureUrl,
  741. ",",
  742. globalConfig.avatarHost + "/upload"
  743. )
  744. : [], //图片地址
  745. signDate: thisData.signDate, //签单时间
  746. userName: thisData.userName, //客户名称
  747. salesmanName: thisData.salesmanName, //营销员名称
  748. salesmanMobile: thisData.salesmanMobile, //营销员电话
  749. oldSalesmanName: thisData.oldSalesmanName, //营销员名称
  750. oldSalesmanMobile: thisData.oldSalesmanMobile, //营销员电话
  751. financeName: thisData.financeName, //财务名称
  752. financeMobile: thisData.financeMobile, //财务电话
  753. nowFinanceMobile: thisData.nowFinanceMobile,
  754. nowFinance: thisData.nowFinance,
  755. contractNo: thisData.contractNo, //合同编号
  756. approval:
  757. thisData.approval == 0
  758. ? thisData.approval.toString()
  759. : thisData.approval,
  760. organizationSearch: thisData.orderDep,
  761. depName: thisData.depName,
  762. status: thisData.status
  763. });
  764. // console.log("kkkk",this.state.processStatus);
  765. }.bind(this)
  766. }).always(
  767. function() {
  768. this.setState({
  769. loading: false
  770. });
  771. }.bind(this)
  772. );
  773. },
  774. //查看催款节点
  775. loaduserss(record) {
  776. this.state.orderList = [];
  777. this.setState({
  778. orderNoss: record ? record.orderNo : this.props.datauser.orderNo
  779. });
  780. $.ajax({
  781. method: "get",
  782. dataType: "json",
  783. crossDomain: false,
  784. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  785. data: {
  786. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  787. },
  788. success: function(data) {
  789. let theArr = [];
  790. let thisData = [];
  791. if (!thisData) {
  792. if (data.error && data.error.length) {
  793. message.warning(data.error[0].message);
  794. }
  795. thisData = {};
  796. } else {
  797. for (let i = 0; i < data.data.length; i++) {
  798. thisData = data.data[i];
  799. theArr.push({
  800. key: i,
  801. dunSubject: thisData.dunSubject
  802. ? thisData.dunSubject.toString()
  803. : "", //催款科目
  804. id: thisData.id, //节点Id
  805. money: thisData.money, //催款金额
  806. dunStatus: thisData.dunStatus, //催款状态
  807. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  808. });
  809. }
  810. this.setState({
  811. contactList: theArr
  812. });
  813. }
  814. }.bind(this)
  815. }).always(
  816. function() {
  817. this.setState({
  818. loading: false
  819. });
  820. }.bind(this)
  821. );
  822. },
  823. //催款节点保存
  824. contactSave() {
  825. if (this.state.contactList) {
  826. let cuiData = this.state.contactList;
  827. for (var a = 0; a < cuiData.length; a++) {
  828. if (cuiData[a].money == "") {
  829. message.warning("催款金额不能为空");
  830. this.refs.signFirstPayment.focus();
  831. return false;
  832. } else if (!cuiData[a].dunSubject) {
  833. message.warning("催款科目不能为空");
  834. this.refs.signFirstPayment.focus();
  835. return false;
  836. }
  837. if (moneyVerify(cuiData[a].money)) {
  838. return;
  839. }
  840. }
  841. }
  842. this.setState({
  843. loading: true
  844. });
  845. $.ajax({
  846. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  847. method: "post",
  848. data: {
  849. orderNo: this.state.orderNoss,
  850. orderDun: JSON.stringify(this.state.contactList)
  851. }
  852. }).done(
  853. function(data) {
  854. this.setState({
  855. loading: false
  856. });
  857. if (!data.error.length) {
  858. message.success("保存成功!");
  859. this.setState({
  860. cuiFlag: false
  861. });
  862. this.loaduserss();
  863. } else {
  864. message.warning(data.error[0].message);
  865. }
  866. }.bind(this)
  867. );
  868. },
  869. //点击新增催款节点
  870. addcontact() {
  871. this.state.contactList.push({
  872. key: this.state.contactList.length,
  873. money: "",
  874. dunSubject: undefined,
  875. orderNo: this.state.orderNoss,
  876. dunTarget: this.state.kehuId
  877. });
  878. this.setState({
  879. contactList: this.state.contactList,
  880. cuiFlag: true
  881. });
  882. },
  883. //删除收款节点
  884. confirmDelet(index) {
  885. if (index.id) {
  886. this.state.contactList.splice(index.key, 1);
  887. this.setState({
  888. contactList: this.state.contactList
  889. });
  890. this.contactSave();
  891. } else {
  892. this.state.contactList.splice(index.key, 1);
  893. this.setState({
  894. contactList: this.state.contactList
  895. });
  896. }
  897. },
  898. handleOk() {
  899. this.setState({
  900. visible: false,
  901. mark: false
  902. });
  903. this.props.closeDesc(false, true);
  904. },
  905. handleCancel() {
  906. if (this.state.orderType == undefined) {
  907. return false;
  908. }
  909. if (!this.state.autoId) {
  910. return false;
  911. }
  912. this.setState({
  913. visible: false,
  914. mark: false
  915. });
  916. this.props.closeDesc(false);
  917. },
  918. handleCancelclose() {
  919. this.setState(
  920. {
  921. visible: false,
  922. mark: false
  923. },
  924. () => {
  925. this.setState({
  926. activeKey: "1"
  927. });
  928. }
  929. );
  930. this.props.closeDesc(false);
  931. this.reset();
  932. },
  933. //点击签单
  934. handleCancels() {
  935. this.setState({
  936. isSubmit: 1
  937. });
  938. },
  939. //点击签单
  940. handleCancelq() {
  941. this.setState({
  942. isSubmit: 0
  943. });
  944. },
  945. //删除
  946. delectRow(record) {
  947. this.setState({
  948. loading: true
  949. });
  950. $.ajax({
  951. method: "post",
  952. dataType: "json",
  953. crossDomain: false,
  954. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  955. data: {
  956. id: record.id
  957. }
  958. }).done(
  959. function(data) {
  960. if (!data.error.length) {
  961. message.success("删除成功!");
  962. this.setState({
  963. loading: false
  964. });
  965. //this.loaduser()
  966. this.loadData();
  967. } else {
  968. message.warning(data.error[0].message);
  969. }
  970. }.bind(this)
  971. );
  972. },
  973. nextCancel() {
  974. this.setState({
  975. addnextVisible: false
  976. });
  977. },
  978. rizhi() {
  979. this.setState({
  980. loading: true
  981. });
  982. $.ajax({
  983. method: "get",
  984. dataType: "json",
  985. crossDomain: false,
  986. url: "/api/admin/newOrder/selectOrderLog",
  987. data: {
  988. orderNo: this.props.datauser.orderNo
  989. },
  990. success: function(data) {
  991. let theArr = [];
  992. let thisData = data.data;
  993. if (!thisData.length) {
  994. if (data.error && data.error.length) {
  995. message.warning(data.error[0].message);
  996. }
  997. thisData = {};
  998. } else {
  999. for (let i = 0; i < data.data.length; i++) {
  1000. let thisdata = data.data[i];
  1001. theArr.push({
  1002. processName: thisdata.processName,
  1003. adminName: thisdata.adminName,
  1004. createDate: thisdata.createDate
  1005. });
  1006. }
  1007. }
  1008. this.setState({
  1009. dataSourcerizhi: theArr
  1010. });
  1011. }.bind(this)
  1012. }).always(
  1013. function() {
  1014. this.setState({
  1015. loading: false
  1016. });
  1017. }.bind(this)
  1018. );
  1019. },
  1020. //查看订单日志
  1021. getOrderLog() {
  1022. this.setState({
  1023. rizhivisible: true
  1024. });
  1025. this.rizhi();
  1026. },
  1027. closeOrderLog() {
  1028. this.setState({
  1029. rizhivisible: false
  1030. });
  1031. },
  1032. callback(key) {
  1033. this.setState({
  1034. activeKey: key
  1035. });
  1036. if (key === "2") {
  1037. let url = window.location.href.substring(7);
  1038. $.ajax({
  1039. method: "get",
  1040. dataType: "json",
  1041. crossDomain: false,
  1042. url:
  1043. globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  1044. data: {
  1045. orderNo: this.props.datauser.orderNo
  1046. },
  1047. success: function(data) {
  1048. // console.log(data.data);
  1049. if (data.data) {
  1050. let thisdata = data.data;
  1051. // console.log(this.state.userName);
  1052. Object.assign(thisdata, {
  1053. userName: this.state.userName,
  1054. contractNo: this.state.contractNo,
  1055. arrears: this.state.arrears
  1056. });
  1057. this.setState({
  1058. mark: true,
  1059. contractData: thisdata,
  1060. voucherUrl: thisdata.voucherUrl
  1061. ? splitUrl(
  1062. thisdata.voucherUrl,
  1063. ",",
  1064. globalConfig.avatarHost + "/upload",
  1065. url
  1066. )
  1067. : []
  1068. });
  1069. }
  1070. }.bind(this)
  1071. });
  1072. }
  1073. },
  1074. getOrgCodeUrl(e) {
  1075. this.setState({ orgCodeUrl: e });
  1076. },
  1077. getVoucherUrl(e) {
  1078. this.setState({ voucherUrl: e });
  1079. },
  1080. //加载(自动补全)
  1081. supervisor(e, state) {
  1082. //客户名称与服务名称自动补全
  1083. let api = state
  1084. ? "/api/admin/customer/getCustomerByName"
  1085. : "/api/admin/order/getBusinessProjectByName";
  1086. $.ajax({
  1087. method: "get",
  1088. dataType: "json",
  1089. crossDomain: false,
  1090. url: globalConfig.context + api,
  1091. data: state
  1092. ? {
  1093. name: e,
  1094. type: this.state.customType
  1095. }
  1096. : {
  1097. businessName: e
  1098. },
  1099. success: function(data) {
  1100. let thedata = data.data;
  1101. if (!thedata) {
  1102. if (data.error && data.error.length) {
  1103. message.warning(data.error[0].message);
  1104. }
  1105. thedata = {};
  1106. }
  1107. this.setState({
  1108. states: state,
  1109. customerArr: thedata
  1110. });
  1111. }.bind(this)
  1112. }).always(
  1113. function() {
  1114. this.setState({
  1115. loading: false
  1116. });
  1117. }.bind(this)
  1118. );
  1119. },
  1120. supervisorCui(e) {
  1121. //客户名称与服务名称自动补全
  1122. let api = "/api/admin/order/getBusinessProjectByName";
  1123. $.ajax({
  1124. method: "get",
  1125. dataType: "json",
  1126. crossDomain: false,
  1127. url: globalConfig.context + api,
  1128. data: {
  1129. businessName: e
  1130. },
  1131. success: function(data) {
  1132. let thedata = data.data;
  1133. if (!thedata) {
  1134. if (data.error && data.error.length) {
  1135. message.warning(data.error[0].message);
  1136. }
  1137. thedata = {};
  1138. }
  1139. this.setState({
  1140. customerCuiArr: thedata
  1141. });
  1142. console.log(thedata);
  1143. }.bind(this)
  1144. }).always(
  1145. function() {
  1146. this.setState({
  1147. loading: false
  1148. });
  1149. }.bind(this)
  1150. );
  1151. },
  1152. //上级主管输入框失去焦点是判断客户是否存在
  1153. selectAuto(value) {
  1154. let kid = [];
  1155. let fwList = this.state.customerArr;
  1156. fwList.map(function(item) {
  1157. if (value == item.bname) {
  1158. kid = item;
  1159. }
  1160. });
  1161. this.setState({
  1162. commodityName: value,
  1163. gid: kid.id,
  1164. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  1165. commodityFirstPayment:
  1166. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  1167. });
  1168. },
  1169. selectAutoCui(value) {
  1170. let kid = [];
  1171. let fwList = this.state.customerCuiArr;
  1172. fwList.map(function(item) {
  1173. if (value == item.bname) {
  1174. kid = item;
  1175. }
  1176. });
  1177. this.setState({
  1178. commodityNameCui: value,
  1179. cid: kid.id,
  1180. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  1181. commodityFirstPayment:
  1182. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  1183. });
  1184. },
  1185. //客户
  1186. selectAutoCUT(value) {
  1187. let autoIds;
  1188. let fwList = this.state.customerArr;
  1189. fwList.map(function(item) {
  1190. if (value == item.name) {
  1191. autoIds = item.id;
  1192. }
  1193. });
  1194. this.setState({
  1195. customerName: value,
  1196. autoId: autoIds
  1197. });
  1198. },
  1199. //服务值改变时请求客户名称
  1200. httpChange(e) {
  1201. this.state.gid = "";
  1202. if (e.length >= 1) {
  1203. this.supervisor(e, false);
  1204. }
  1205. this.setState({
  1206. commodityName: e
  1207. });
  1208. },
  1209. httpChangeCui(e) {
  1210. if (e.length >= 1) {
  1211. this.supervisorCui(e, false);
  1212. }
  1213. this.setState({
  1214. commodityNameCui: e
  1215. });
  1216. },
  1217. //客户名称自动补全
  1218. customerChange(e) {
  1219. if (this.state.customType) {
  1220. this.state.autoId = "";
  1221. if (e.length >= 2) {
  1222. this.supervisor(e, true);
  1223. }
  1224. this.setState({
  1225. customerName: e
  1226. });
  1227. } else {
  1228. this.setState({
  1229. customerName: ""
  1230. });
  1231. message.warning("客户所属类型必须指定");
  1232. }
  1233. },
  1234. //点击添加项目明细
  1235. addDetailed() {
  1236. this.setState({
  1237. gid: "",
  1238. customerArr: [],
  1239. commodityName: "",
  1240. commodityQuantity: "",
  1241. commodityId: "",
  1242. taskComment: "",
  1243. main: undefined,
  1244. commodityPrice: "",
  1245. addState: 1,
  1246. addnextVisible: true
  1247. });
  1248. },
  1249. //新建项目明细保存
  1250. nextSubmit(e) {
  1251. e.preventDefault();
  1252. if (this.state.gid == undefined || !this.state.gid) {
  1253. message.warning("服务名称不匹配!");
  1254. return false;
  1255. }
  1256. if (!this.state.commodityPrice) {
  1257. message.warning("请输入金额!");
  1258. this.refs.commodityPrice.focus();
  1259. return false;
  1260. }
  1261. if (!this.state.commodityQuantity) {
  1262. message.warning("请输入商品数量!");
  1263. this.refs.commodityQuantity.focus();
  1264. return false;
  1265. }
  1266. if (!this.state.main) {
  1267. message.warning("请选择是否为主要项目!");
  1268. this.refs.commodityQuantity.focus();
  1269. return false;
  1270. }
  1271. this.setState({
  1272. loading: true
  1273. });
  1274. let api = this.state.addState
  1275. ? "/api/admin/newOrder/addOrderTask"
  1276. : "/api/bianji";
  1277. $.ajax({
  1278. method: "POST",
  1279. dataType: "json",
  1280. crossDomain: false,
  1281. url: globalConfig.context + api,
  1282. data: {
  1283. commodityId: this.state.gid, //商品ID
  1284. orderNo: this.props.datauser.orderNo, //订单编号
  1285. commodityName: this.state.commodityName, //商品名称
  1286. commodityQuantity: this.state.commodityQuantity, //商品数量
  1287. commodityPrice: this.state.commodityPrice, //签单总价
  1288. taskComment: this.state.taskComment, //服务说明
  1289. main: this.state.main //是否为主要项目
  1290. }
  1291. }).done(
  1292. function(data) {
  1293. this.setState({
  1294. loading: false
  1295. });
  1296. if (!data.error.length) {
  1297. message.success("保存成功!");
  1298. this.nextCancel();
  1299. //this.loaduser(this.props.datauser);
  1300. this.loadData();
  1301. } else {
  1302. message.warning(data.error[0].message);
  1303. }
  1304. }.bind(this)
  1305. );
  1306. },
  1307. //点击打卡项目详情
  1308. tableRowClick(record) {
  1309. this.setState({
  1310. jid: record.id, //项目ID
  1311. kid: record.commodityId, //商品ID
  1312. commodityName: record.commodityName, //金额
  1313. commodityPrice: record.commodityPrice, //金额
  1314. commodityQuantity: record.commodityQuantity, //数量
  1315. taskComment: record.taskComment, //备注
  1316. main: record.main.toString(), //是否为主要
  1317. addnextVisible: true,
  1318. addState: 0
  1319. });
  1320. },
  1321. //修改项目详情
  1322. tabRowSave(e) {
  1323. e.preventDefault();
  1324. if (!this.state.commodityPrice) {
  1325. message.warning("金额不能为空!");
  1326. return false;
  1327. }
  1328. if (!this.state.commodityQuantity) {
  1329. message.warning("数量不能为空!");
  1330. return false;
  1331. }
  1332. if (!this.state.main) {
  1333. message.warning("请选择是否为主要项目!");
  1334. this.refs.commodityQuantity.focus();
  1335. return false;
  1336. }
  1337. $.ajax({
  1338. method: "POST",
  1339. dataType: "json",
  1340. crossDomain: false,
  1341. url: globalConfig.context + "/api/admin/newOrder/updateOrderTask",
  1342. data: {
  1343. id: this.state.jid, //项目ID
  1344. commodityId: this.state.kid, //商品ID
  1345. orderNo: this.props.datauser.orderNo, //订单编号
  1346. main: this.state.main, //是否为主要
  1347. commodityPrice: this.state.commodityPrice, //金额
  1348. commodityQuantity: this.state.commodityQuantity, //数量
  1349. taskComment: this.state.taskComment //备注
  1350. }
  1351. }).done(
  1352. function(data) {
  1353. this.setState({
  1354. loading: false
  1355. });
  1356. if (!data.error.length) {
  1357. message.success("保存成功!");
  1358. this.nextCancel();
  1359. //this.loaduser(this.props.datauser);
  1360. this.loadData();
  1361. } else {
  1362. message.warning(data.error[0].message);
  1363. }
  1364. }.bind(this)
  1365. );
  1366. },
  1367. //签单时间选择
  1368. selTime(e, index) {
  1369. this.setState({
  1370. entryTime: e,
  1371. signDate: e,
  1372. selTime: index
  1373. });
  1374. },
  1375. //退单操作
  1376. //点击退单
  1377. tuikuan() {
  1378. this.setState({
  1379. lookVisible: true,
  1380. contractUrl: [],
  1381. applicationUrl: [],
  1382. reason: ""
  1383. });
  1384. },
  1385. //关闭退单
  1386. noCancel() {
  1387. this.setState({
  1388. lookVisible: false
  1389. });
  1390. },
  1391. //点击确认退单
  1392. tuidanOk() {
  1393. let contractUrls = [];
  1394. let applicationUrls = [];
  1395. if (this.state.contractUrl.length) {
  1396. let picArr = [];
  1397. this.state.contractUrl.map(function(item) {
  1398. if (
  1399. item.response &&
  1400. item.response.data &&
  1401. item.response.data.length
  1402. ) {
  1403. picArr.push(item.response.data);
  1404. }
  1405. });
  1406. contractUrls = picArr.join(",");
  1407. }
  1408. if (this.state.applicationUrl.length) {
  1409. let picArr = [];
  1410. this.state.applicationUrl.map(function(item) {
  1411. if (
  1412. item.response &&
  1413. item.response.data &&
  1414. item.response.data.length
  1415. ) {
  1416. picArr.push(item.response.data);
  1417. }
  1418. });
  1419. applicationUrls = picArr.join(",");
  1420. }
  1421. $.ajax({
  1422. method: "POST",
  1423. dataType: "json",
  1424. crossDomain: false,
  1425. url: globalConfig.context + "/api/admin/newOrder/addOrderRefund",
  1426. data: {
  1427. orderNo: this.state.orderNo, //订单编号
  1428. contractUrl: contractUrls.length ? contractUrls : "", //终止合同
  1429. applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
  1430. reason: this.state.reason //退单原因
  1431. }
  1432. }).done(
  1433. function(data) {
  1434. this.setState({
  1435. loading: false
  1436. });
  1437. if (!data.error.length) {
  1438. message.success("退单成功!");
  1439. this.noCancel();
  1440. this.handleCancelclose();
  1441. } else {
  1442. message.warning(data.error[0].message);
  1443. }
  1444. }.bind(this)
  1445. );
  1446. },
  1447. //开单选择订单类型骚操作
  1448. orderTypeFn(e) {
  1449. if (e == 0) {
  1450. this.setState({
  1451. bussStats: true,
  1452. orderType: e
  1453. });
  1454. this.category();
  1455. } else {
  1456. this.setState({
  1457. contractType: undefined,
  1458. bussStats: false,
  1459. orderType: e
  1460. });
  1461. }
  1462. },
  1463. //品类数据获取
  1464. category() {
  1465. $.ajax({
  1466. method: "get",
  1467. dataType: "json",
  1468. crossDomain: false,
  1469. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  1470. data: {},
  1471. success: function(data) {
  1472. let thedata = data.data;
  1473. let theArr = [];
  1474. if (!thedata) {
  1475. if (data.error && data.error.length) {
  1476. message.warning(data.error[0].message);
  1477. }
  1478. thedata = {};
  1479. } else {
  1480. thedata.map(function(item, index) {
  1481. theArr.push({
  1482. key: index,
  1483. name: item.cname,
  1484. id: item.id
  1485. });
  1486. });
  1487. }
  1488. this.setState({
  1489. contractType: undefined,
  1490. categoryArr: theArr
  1491. });
  1492. }.bind(this)
  1493. });
  1494. },
  1495. //变更申请
  1496. changeApply() {
  1497. if (this.state.processStatus <= 4) {
  1498. message.warning("当前订单流程不能发起变更!");
  1499. return false;
  1500. }
  1501. if (this.state.changeAmount == "") {
  1502. message.warning("申请退款金额不能为空!");
  1503. // console.log(this.state.changeAmount);
  1504. return false;
  1505. }
  1506. if (this.state.remarksC.trim() == "") {
  1507. message.warning("请正确填写变更原因");
  1508. return false;
  1509. }
  1510. if (this.state.startRemarks.trim() == "") {
  1511. message.warning("请正确填写备注信息");
  1512. return false;
  1513. }
  1514. let theorgCodeUrl = [];
  1515. if (this.state.voucherUrl.length) {
  1516. let picArr = [];
  1517. this.state.voucherUrl.map(function(item) {
  1518. if (
  1519. item.response &&
  1520. item.response.data &&
  1521. item.response.data.length
  1522. ) {
  1523. picArr.push(item.response.data);
  1524. }
  1525. });
  1526. theorgCodeUrl = picArr.join(",");
  1527. }
  1528. $.ajax({
  1529. method: "post",
  1530. dataType: "json",
  1531. crossDomain: false,
  1532. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  1533. data: {
  1534. orderNo: this.state.orderNo, //订单编号
  1535. processState: 0,
  1536. status: 1,
  1537. startRemarks: this.state.startRemarks,
  1538. remarks: this.state.remarksC,
  1539. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1540. totalAmount: this.state.totalAmount,
  1541. settlementAmount: this.state.settlementAmount,
  1542. changeAmount: this.state.changeAmount,
  1543. applicant: this.state.salesmanName,
  1544. depName: this.state.depName,
  1545. type: this.state.typeChange
  1546. }
  1547. }).done(
  1548. function(data) {
  1549. this.setState({
  1550. loading: false
  1551. });
  1552. if (!data.error.length) {
  1553. message.success("变更成功!");
  1554. this.noCancel();
  1555. this.handleCancelclose();
  1556. } else {
  1557. message.warning(data.error[0].message);
  1558. }
  1559. }.bind(this)
  1560. );
  1561. },
  1562. componentDidMount() {
  1563. window.setTimeout(() => {
  1564. // console.log("我看看", this.state);
  1565. }, 100);
  1566. },
  1567. reset() {
  1568. this.setState({
  1569. startRemarks: "",
  1570. remarksC: "",
  1571. voucherUrl: [],
  1572. totalAmount: undefined,
  1573. settlementAmount: undefined,
  1574. changeAmount: "0",
  1575. applicant: undefined,
  1576. depNameChange: undefined,
  1577. typeChange: 0
  1578. });
  1579. },
  1580. componentWillReceiveProps(nextProps) {
  1581. //props改变时触发
  1582. this.state.visible = nextProps.showDesc;
  1583. this.state.signBillVisible = nextProps.signBillVisible;
  1584. if (this.state.signBillVisible) {
  1585. this.loaduser(nextProps.uid);
  1586. }
  1587. if (nextProps.userDetaile && nextProps.showDesc) {
  1588. this.loaduser(nextProps.datauser);
  1589. this.loaduserss(nextProps.datauser);
  1590. this.loadData(nextProps.datauser);
  1591. } else {
  1592. this.setState({
  1593. orderType: undefined,
  1594. customerName: "",
  1595. autoId: "",
  1596. customerArr: [],
  1597. contractType: undefined,
  1598. bussStats: false,
  1599. customType: undefined
  1600. });
  1601. }
  1602. },
  1603. render() {
  1604. const FormItem = Form.Item;
  1605. const { TabPane } = Tabs;
  1606. const { TextArea } = Input;
  1607. const formItemLayout = {
  1608. labelCol: { span: 8 },
  1609. wrapperCol: { span: 14 }
  1610. };
  1611. const contractData = this.state.contractData;
  1612. const formItemList = [
  1613. {
  1614. label: "企业联系人",
  1615. content: <span>{this.state.contacts}</span>
  1616. },
  1617. {
  1618. label: "联系人电话",
  1619. content: <span>{this.state.contactMobile}</span>
  1620. },
  1621. {
  1622. label: "企业法人",
  1623. content: <span>{this.state.legalPerson}</span>
  1624. },
  1625. {
  1626. label: "法人电话",
  1627. content: <span>{this.state.legalPersonTel}</span>
  1628. },
  1629. // {
  1630. // label: "签单金额(万元)",
  1631. // content: <span>{this.state.totalAmount}</span>
  1632. // },
  1633. // {
  1634. // label: "首付金额(万元)",
  1635. // content: <span>{this.state.firstAmount}</span>
  1636. // },
  1637. {
  1638. label: "特批立项",
  1639. content: <span>{getApprovedState(this.state.approval)}</span>
  1640. },
  1641. {
  1642. label: "合同签订时间",
  1643. content: <span>{this.state.signDate}</span>
  1644. },
  1645. {
  1646. label: "订单部门",
  1647. content: <span>{this.state.depName}</span>
  1648. }
  1649. ];
  1650. const dataSources = this.state.customerArr || [];
  1651. let departmentArr = this.state.departmentArr || [];
  1652. const options = this.state.states
  1653. ? dataSources.map(group => (
  1654. <Select.Option key={group.id} value={group.name}>
  1655. {group.name}
  1656. </Select.Option>
  1657. ))
  1658. : dataSources.map((group, index) => (
  1659. <Select.Option key={index} value={group.bname}>
  1660. {group.bname}
  1661. </Select.Option>
  1662. ));
  1663. return (
  1664. <div>
  1665. <Modal
  1666. maskClosable={false}
  1667. visible={this.state.visible}
  1668. onOk={this.handleOk}
  1669. onCancel={this.handleCancelclose}
  1670. width={!this.props.userDetaile ? "600px" : "900px"}
  1671. title={!this.props.userDetaile ? "创建订单" : ""}
  1672. footer=""
  1673. className="admin-desc-content"
  1674. >
  1675. <Form
  1676. layout="horizontal"
  1677. onSubmit={this.handleSubmit}
  1678. id="demand-form"
  1679. style={{ paddingBottom: "40px" }}
  1680. >
  1681. <Spin spinning={this.state.loading}>
  1682. <div className="clearfix">
  1683. {!this.props.userDetaile ? (
  1684. <div className="clearfix">
  1685. <div className="clearfix">
  1686. <FormItem {...formItemLayout} label="订单类型">
  1687. <Select
  1688. placeholder="请选择订单类型"
  1689. style={{ width: "200px" }}
  1690. value={this.state.orderType}
  1691. onChange={e => {
  1692. this.setState({ orderType: e });
  1693. }}
  1694. >
  1695. {orderTypes.map(function(item) {
  1696. return (
  1697. <Select.Option key={item.value}>
  1698. {item.key}
  1699. </Select.Option>
  1700. );
  1701. })}
  1702. </Select>
  1703. <span className="mandatory">*</span>
  1704. </FormItem>
  1705. </div>
  1706. <FormItem {...formItemLayout} label="客户所属类型">
  1707. <Select
  1708. placeholder="请选择客户所属类型"
  1709. style={{ width: "200px" }}
  1710. value={this.state.customType}
  1711. onChange={e => {
  1712. this.setState({ customType: e });
  1713. }}
  1714. >
  1715. {customerType.map(function(item) {
  1716. return (
  1717. <Select.Option key={item.value}>
  1718. {item.key}
  1719. </Select.Option>
  1720. );
  1721. })}
  1722. </Select>
  1723. </FormItem>
  1724. <div className="clearfix">
  1725. <FormItem {...formItemLayout} label="客户名称">
  1726. <AutoComplete
  1727. className="certain-category-search"
  1728. dropdownClassName="certain-category-search-dropdown"
  1729. dropdownMatchSelectWidth={false}
  1730. dropdownStyle={{ width: 200 }}
  1731. size="large"
  1732. style={{ width: "200px" }}
  1733. dataSource={options}
  1734. placeholder="输入名称"
  1735. value={this.state.customerName}
  1736. onChange={this.customerChange}
  1737. filterOption={true}
  1738. onSelect={this.selectAutoCUT}
  1739. >
  1740. <Input />
  1741. </AutoComplete>
  1742. <span className="mandatory">*</span>
  1743. </FormItem>
  1744. </div>
  1745. <div className="addSave" style={{ marginTop: "15px" }}>
  1746. <Button
  1747. className="cancel"
  1748. type="primary"
  1749. onClick={this.handleCancel}
  1750. style={{ marginLeft: "150px" }}
  1751. htmlType="submit"
  1752. >
  1753. 开单
  1754. </Button>
  1755. <Button
  1756. className="cancel"
  1757. type="ghost"
  1758. onClick={this.handleCancelclose}
  1759. style={{ marginLeft: "50px" }}
  1760. >
  1761. 取消
  1762. </Button>
  1763. </div>
  1764. </div>
  1765. ) : (
  1766. <Tabs
  1767. onChange={this.callback}
  1768. activeKey={this.state.activeKey}
  1769. >
  1770. <TabPane tab={"编辑订单"} key="1">
  1771. <div className="clearfix">
  1772. <div className="clearfix">
  1773. <FormItem
  1774. className="half-item"
  1775. {...formItemLayout}
  1776. label="合同编号"
  1777. >
  1778. {<span>{this.state.contractNo}</span>}
  1779. </FormItem>
  1780. <FormItem
  1781. className="half-item"
  1782. {...formItemLayout}
  1783. label="订单编号"
  1784. >
  1785. <span>{this.state.orderNo}</span>
  1786. </FormItem>
  1787. <FormItem
  1788. className="half-item"
  1789. {...formItemLayout}
  1790. label="流程状态"
  1791. >
  1792. <span>
  1793. {getProcessStatus(this.state.processStatus)}
  1794. </span>
  1795. </FormItem>
  1796. <FormItem
  1797. className="half-item"
  1798. {...formItemLayout}
  1799. label="结算状态"
  1800. >
  1801. <span>
  1802. {getLiquidationStatus(
  1803. this.state.liquidationStatus
  1804. )}
  1805. </span>
  1806. </FormItem>
  1807. {this.state.processStatus === 0 ? (
  1808. <div className="clearfix">
  1809. <FormItem
  1810. className="half-item"
  1811. {...formItemLayout}
  1812. label="特批立项"
  1813. >
  1814. <Select
  1815. placeholder="请选择客户所属类型"
  1816. style={{ width: "240px" }}
  1817. value={this.state.approval}
  1818. onChange={e => {
  1819. this.setState({ approval: e });
  1820. }}
  1821. >
  1822. {/* {tepi.map(function(item) {
  1823. // if(item.key == "特批通过" || item.key == "特批驳回")
  1824. return (
  1825. <Select.Option key={item.value}>
  1826. {item.key}
  1827. </Select.Option>
  1828. );
  1829. })} */}
  1830. <Select.Option key={0}>
  1831. 非特批
  1832. </Select.Option>
  1833. <Select.Option key={1}>特批</Select.Option>
  1834. </Select>
  1835. </FormItem>
  1836. <FormItem
  1837. className="half-item"
  1838. {...formItemLayout}
  1839. label="合同签订时间"
  1840. >
  1841. <DatePicker
  1842. style={{
  1843. marginTop: "2px",
  1844. // width: "240px",
  1845. height: "32px"
  1846. }}
  1847. showTime
  1848. format="YYYY-MM-DD"
  1849. onOk={() => {}}
  1850. value={
  1851. this.state.signDate
  1852. ? moment(this.state.signDate)
  1853. : null
  1854. }
  1855. onChange={(data, dataString) => {
  1856. this.setState({ signDate: dataString });
  1857. }}
  1858. />
  1859. <span
  1860. className="mandatory"
  1861. style={{ marginLeft: 20 }}
  1862. >
  1863. *
  1864. </span>
  1865. </FormItem>
  1866. <FormItem
  1867. className="half-item"
  1868. {...formItemLayout}
  1869. label="订单部门"
  1870. >
  1871. <Select
  1872. placeholder="请输入订单部门"
  1873. style={{ width: 240 }}
  1874. value={this.state.organizationSearch}
  1875. onChange={e => {
  1876. this.setState({ organizationSearch: e });
  1877. }}
  1878. >
  1879. {departmentArr.map(function(item) {
  1880. return (
  1881. <Select.Option key={item.id}>
  1882. {item.name}
  1883. </Select.Option>
  1884. );
  1885. })}
  1886. </Select>
  1887. </FormItem>
  1888. </div>
  1889. ) : (
  1890. <div className="clearfix">
  1891. <FormItem
  1892. className="half-item"
  1893. {...formItemLayout}
  1894. label="特批立项"
  1895. >
  1896. <span>
  1897. {getApprovedState(this.state.approval)}
  1898. </span>
  1899. </FormItem>
  1900. <FormItem
  1901. className="half-item"
  1902. {...formItemLayout}
  1903. label="合同签订时间"
  1904. >
  1905. <span>{this.state.signDate}</span>
  1906. </FormItem>
  1907. <FormItem
  1908. className="half-item"
  1909. {...formItemLayout}
  1910. label="订单部门"
  1911. >
  1912. <span>{this.state.depName}</span>
  1913. </FormItem>
  1914. </div>
  1915. )}
  1916. </div>
  1917. <h3
  1918. style={{
  1919. marginLeft: 10,
  1920. fontWeight: 800,
  1921. marginBottom: 10
  1922. }}
  1923. >
  1924. 收款项目
  1925. </h3>
  1926. {this.state.processStatus === 0 ? (
  1927. <div className="clearfix">
  1928. <FormItem
  1929. className="half-item"
  1930. {...formItemLayout}
  1931. label="签单金额(万元)"
  1932. >
  1933. <Input
  1934. placeholder="签单金额"
  1935. ref="signTotalAmount"
  1936. value={this.state.totalAmount}
  1937. onChange={e => {
  1938. this.setState({
  1939. totalAmount: e.target.value
  1940. });
  1941. }}
  1942. style={{ width: "240px" }}
  1943. />
  1944. {/* <span className="mandatory">*</span> */}
  1945. </FormItem>
  1946. <FormItem
  1947. className="half-item"
  1948. {...formItemLayout}
  1949. label="首付金额(万元)"
  1950. >
  1951. <Input
  1952. placeholder="请输入实签首款金额"
  1953. ref="signFirstPayment"
  1954. value={this.state.firstAmount}
  1955. onChange={e => {
  1956. this.setState({
  1957. firstAmount: e.target.value
  1958. });
  1959. }}
  1960. style={{ width: "240px" }}
  1961. />
  1962. {/* <span className="mandatory">*</span> */}
  1963. </FormItem>
  1964. <FormItem
  1965. className="half-item"
  1966. {...formItemLayout}
  1967. label="已收款项"
  1968. >
  1969. <span>
  1970. {this.state.settlementAmount + "万元"}
  1971. </span>
  1972. {/* {this.state.settlementAmount ? (
  1973. <Button
  1974. type="primary"
  1975. onClick={this.tuikuan}
  1976. style={{
  1977. float: "right",
  1978. marginRight: "50px",
  1979. marginBottom: "15px"
  1980. }}
  1981. >
  1982. 退单
  1983. </Button>
  1984. ) : (
  1985. ""
  1986. )} */}
  1987. </FormItem>
  1988. </div>
  1989. ) : (
  1990. <div className="clearfix">
  1991. <FormItem
  1992. className="half-item"
  1993. {...formItemLayout}
  1994. label="签单金额(万元)"
  1995. >
  1996. <span>{this.state.totalAmount}</span>
  1997. </FormItem>
  1998. <FormItem
  1999. className="half-item"
  2000. {...formItemLayout}
  2001. label="首付金额(万元)"
  2002. >
  2003. <span>{this.state.firstAmount}</span>
  2004. </FormItem>
  2005. <FormItem
  2006. className="half-item"
  2007. {...formItemLayout}
  2008. label="已收款项"
  2009. >
  2010. <span>
  2011. {this.state.settlementAmount + "万元"}
  2012. </span>
  2013. {/* {this.state.settlementAmount ? (
  2014. <Button
  2015. type="primary"
  2016. onClick={this.tuikuan}
  2017. style={{
  2018. float: "right",
  2019. marginRight: "50px",
  2020. marginBottom: "15px"
  2021. }}
  2022. >
  2023. 退单
  2024. </Button>
  2025. ) : (
  2026. ""
  2027. )} */}
  2028. </FormItem>
  2029. </div>
  2030. )}
  2031. <h3
  2032. style={{
  2033. marginLeft: 10,
  2034. fontWeight: 800,
  2035. marginBottom: 10
  2036. }}
  2037. >
  2038. 联系信息
  2039. </h3>
  2040. {this.state.processStatus == 0 ? (
  2041. <div className="clearfix">
  2042. <div className="clearfix">
  2043. <FormItem
  2044. className="half-item"
  2045. {...formItemLayout}
  2046. label="客户名称"
  2047. >
  2048. <span>{this.state.userName}</span>
  2049. </FormItem>
  2050. </div>
  2051. <FormItem
  2052. className="half-item"
  2053. {...formItemLayout}
  2054. label="企业联系人"
  2055. >
  2056. <Input
  2057. placeholder="请输入联系人"
  2058. ref="signTotalAmount"
  2059. value={this.state.contacts}
  2060. onChange={e => {
  2061. this.setState({ contacts: e.target.value });
  2062. }}
  2063. style={{ width: "240px" }}
  2064. />
  2065. </FormItem>
  2066. <FormItem
  2067. className="half-item"
  2068. {...formItemLayout}
  2069. label="联系人电话"
  2070. >
  2071. <Input
  2072. placeholder="请输入联系人电话"
  2073. ref="signTotalAmount"
  2074. value={this.state.contactMobile}
  2075. onChange={e => {
  2076. this.setState({
  2077. contactMobile: e.target.value
  2078. });
  2079. }}
  2080. style={{ width: "240px" }}
  2081. />
  2082. </FormItem>
  2083. <FormItem
  2084. className="half-item"
  2085. {...formItemLayout}
  2086. label="企业法人"
  2087. >
  2088. <Input
  2089. placeholder="请输入法人"
  2090. ref="signTotalAmount"
  2091. value={this.state.legalPerson}
  2092. onChange={e => {
  2093. this.setState({
  2094. legalPerson: e.target.value
  2095. });
  2096. }}
  2097. style={{ width: "240px" }}
  2098. />
  2099. </FormItem>
  2100. <FormItem
  2101. className="half-item"
  2102. {...formItemLayout}
  2103. label="法人电话"
  2104. >
  2105. <Input
  2106. placeholder="请输入法人电话"
  2107. ref="signTotalAmount"
  2108. value={this.state.legalPersonTel}
  2109. onChange={e => {
  2110. this.setState({
  2111. legalPersonTel: e.target.value
  2112. });
  2113. }}
  2114. style={{ width: "240px" }}
  2115. />
  2116. </FormItem>
  2117. </div>
  2118. ) : (
  2119. <div className="clearfix">
  2120. {formItemList.map((data, index) => {
  2121. return (
  2122. <FormItem
  2123. className="half-item"
  2124. {...formItemLayout}
  2125. key={index}
  2126. label={data.label}
  2127. >
  2128. {data.content}
  2129. </FormItem>
  2130. );
  2131. })}
  2132. </div>
  2133. )}
  2134. <div className="clearfix">
  2135. {this.state.processStatus == 0 ? (
  2136. <FormItem
  2137. labelCol={{ span: 4 }}
  2138. wrapperCol={{ span: 18 }}
  2139. label={
  2140. <span>
  2141. <strong style={{ color: "#f00" }}>*</strong>
  2142. 合同扫描件
  2143. </span>
  2144. }
  2145. >
  2146. <PicturesWall
  2147. fileList={this.getOrgCodeUrl}
  2148. pictureUrl={this.state.orgCodeUrl}
  2149. url="/api/admin/order/uploadOrderImg"
  2150. sign=""
  2151. />
  2152. <p>图片建议:要清晰。</p>
  2153. <Button
  2154. style={{
  2155. float: "right",
  2156. marginRight: "140px",
  2157. marginTop: "20px"
  2158. }}
  2159. onClick={this.getOrderLog}
  2160. >
  2161. 查看订单日志
  2162. </Button>
  2163. </FormItem>
  2164. ) : (
  2165. <FormItem
  2166. labelCol={{ span: 4 }}
  2167. wrapperCol={{ span: 18 }}
  2168. label="合同扫描件"
  2169. >
  2170. <Upload
  2171. className="demandDetailShow-upload"
  2172. listType="picture-card"
  2173. fileList={this.state.orgCodeUrl}
  2174. onPreview={file => {
  2175. this.setState({
  2176. previewImage: file.url || file.thumbUrl,
  2177. previewVisible: true
  2178. });
  2179. }}
  2180. ></Upload>
  2181. <Modal
  2182. maskClosable={false}
  2183. footer={null}
  2184. visible={this.state.previewVisible}
  2185. onCancel={() => {
  2186. this.setState({ previewVisible: false });
  2187. }}
  2188. >
  2189. <img
  2190. alt=""
  2191. style={{ width: "100%" }}
  2192. src={this.state.previewImage || ""}
  2193. />
  2194. </Modal>
  2195. <Button
  2196. style={{
  2197. float: "right",
  2198. marginRight: "140px",
  2199. marginTop: "20px"
  2200. }}
  2201. onClick={this.getOrderLog}
  2202. >
  2203. 查看订单日志
  2204. </Button>
  2205. </FormItem>
  2206. )}
  2207. </div>
  2208. <div className="clearfix">
  2209. {this.state.processStatus == 0 ? (
  2210. <div className="clearfix">
  2211. <FormItem
  2212. labelCol={{ span: 4 }}
  2213. wrapperCol={{ span: 16 }}
  2214. label="订单留言"
  2215. >
  2216. <Input
  2217. type="textarea"
  2218. placeholder="请输入订单留言"
  2219. rows={4}
  2220. value={this.state.orderRemarks}
  2221. onChange={e => {
  2222. this.setState({
  2223. orderRemarks: e.target.value
  2224. });
  2225. }}
  2226. style={{ width: "95%" }}
  2227. />
  2228. <span className="mandatory">*</span>
  2229. </FormItem>
  2230. </div>
  2231. ) : (
  2232. <FormItem
  2233. labelCol={{ span: 4 }}
  2234. wrapperCol={{ span: 16 }}
  2235. label="订单留言"
  2236. >
  2237. <p
  2238. style={{ width: 500, wordWrap: "break-word" }}
  2239. >
  2240. {this.state.orderRemarks}
  2241. </p>
  2242. </FormItem>
  2243. )}
  2244. </div>
  2245. <div className="clearfix">
  2246. <FormItem
  2247. className="half-item"
  2248. {...formItemLayout}
  2249. label="订单负责人"
  2250. >
  2251. <span>{this.state.salesmanName}</span>
  2252. </FormItem>
  2253. <FormItem
  2254. className="half-item"
  2255. {...formItemLayout}
  2256. label="订单负责人电话"
  2257. >
  2258. <span>{this.state.salesmanMobile}</span>
  2259. </FormItem>
  2260. </div>
  2261. <div className="clearfix">
  2262. <FormItem
  2263. className="half-item"
  2264. {...formItemLayout}
  2265. label="当前财务负责人"
  2266. >
  2267. <span>{this.state.nowFinance}</span>
  2268. </FormItem>
  2269. <FormItem
  2270. className="half-item"
  2271. {...formItemLayout}
  2272. label="当前财务负责人电话"
  2273. >
  2274. <span>{this.state.nowFinanceMobile}</span>
  2275. </FormItem>
  2276. </div>
  2277. <div className="clearfix">
  2278. <FormItem
  2279. className="half-item"
  2280. {...formItemLayout}
  2281. style={{ opacity: ".5" }}
  2282. label="原订单负责人"
  2283. >
  2284. <span>{this.state.oldSalesmanName}</span>
  2285. </FormItem>
  2286. <FormItem
  2287. className="half-item"
  2288. {...formItemLayout}
  2289. style={{ opacity: ".5" }}
  2290. label="原订单负责人电话"
  2291. >
  2292. <span>{this.state.oldSalesmanMobile}</span>
  2293. </FormItem>
  2294. </div>
  2295. <div className="clearfix">
  2296. <FormItem
  2297. className="half-item"
  2298. style={{ opacity: ".5" }}
  2299. {...formItemLayout}
  2300. label="实际财务操作人"
  2301. >
  2302. <span>{this.state.financeName}</span>
  2303. </FormItem>
  2304. <FormItem
  2305. className="half-item"
  2306. {...formItemLayout}
  2307. style={{ opacity: ".5" }}
  2308. label="实际财务操作人电话"
  2309. >
  2310. <span>{this.state.financeMobile}</span>
  2311. </FormItem>
  2312. </div>
  2313. <div>
  2314. <span
  2315. style={{ marginLeft: "50px", fontSize: "20px" }}
  2316. >
  2317. 项目业务
  2318. </span>
  2319. {this.state.processStatus == 0 ? (
  2320. <Button
  2321. type="primary"
  2322. onClick={this.addDetailed}
  2323. style={{
  2324. float: "right",
  2325. marginRight: "50px",
  2326. marginBottom: "15px"
  2327. }}
  2328. >
  2329. 添加项目明细
  2330. </Button>
  2331. ) : (
  2332. ""
  2333. )}
  2334. </div>
  2335. <div
  2336. className="patent-table"
  2337. style={{ marginBottom: 10 }}
  2338. >
  2339. <Spin spinning={this.state.loading}>
  2340. <Table
  2341. columns={this.state.columns}
  2342. dataSource={this.state.dataSource}
  2343. pagination={this.state.pagination}
  2344. onRowClick={this.tableRowClick}
  2345. bordered
  2346. size="small"
  2347. />
  2348. </Spin>
  2349. </div>
  2350. <div>
  2351. <span
  2352. style={{ marginLeft: "50px", fontSize: "20px" }}
  2353. >
  2354. 催款节点
  2355. </span>
  2356. {this.state.processStatus == 0 ? (
  2357. <Button
  2358. type="primary"
  2359. onClick={this.addcontact}
  2360. style={{
  2361. float: "right",
  2362. marginRight: "50px",
  2363. marginBottom: "15px"
  2364. }}
  2365. disabled={this.state.cuiFlag ? true : false}
  2366. >
  2367. 添加催款节点
  2368. </Button>
  2369. ) : (
  2370. ""
  2371. )}
  2372. </div>
  2373. <div className="clearfix">
  2374. <Spin spinning={this.state.loading}>
  2375. <Form layout="horizontal" id="demand-form">
  2376. <Table
  2377. pagination={false}
  2378. columns={this.state.ContactsLists}
  2379. dataSource={this.state.contactList}
  2380. bordered
  2381. size="small"
  2382. scroll={{ x: "max-content", y: 0 }}
  2383. />
  2384. <Col
  2385. span={24}
  2386. offset={9}
  2387. style={{ marginTop: "15px" }}
  2388. ></Col>
  2389. </Form>
  2390. </Spin>
  2391. </div>
  2392. {this.state.processStatus == 0 ? (
  2393. <div
  2394. className="addSave"
  2395. style={{ marginTop: "15px" }}
  2396. >
  2397. <Button
  2398. className="cancel"
  2399. type="primary"
  2400. onClick={this.handleCancels}
  2401. style={{ marginLeft: "200px" }}
  2402. htmlType="submit"
  2403. >
  2404. 签单
  2405. </Button>
  2406. <Button
  2407. className="cancel"
  2408. type="primary"
  2409. onClick={this.handleCancelq}
  2410. style={{ marginLeft: "50px" }}
  2411. htmlType="submit"
  2412. >
  2413. 保存
  2414. </Button>
  2415. <Button
  2416. className="cancel"
  2417. type="ghost"
  2418. onClick={this.handleCancelclose}
  2419. style={{ marginLeft: "50px" }}
  2420. >
  2421. 取消
  2422. </Button>
  2423. </div>
  2424. ) : (
  2425. ""
  2426. )}
  2427. </div>
  2428. </TabPane>
  2429. <TabPane tab="合同变更记录" key="2">
  2430. {
  2431. <div>
  2432. <div className="clearfix">
  2433. <FormItem
  2434. className="half-item"
  2435. {...formItemLayout}
  2436. label="客户名称"
  2437. >
  2438. <span>{this.state.userName}</span>
  2439. </FormItem>
  2440. </div>
  2441. <div className="clearfix">
  2442. <FormItem
  2443. className="half-item"
  2444. {...formItemLayout}
  2445. label="合同编号"
  2446. >
  2447. <span>{this.state.contractNo}</span>
  2448. </FormItem>
  2449. </div>
  2450. <div className="clearfix">
  2451. <FormItem
  2452. className="half-item"
  2453. {...formItemLayout}
  2454. label="申请变更部门"
  2455. >
  2456. {!this.state.mark ? (
  2457. <Select
  2458. placeholder="请输入变更部门"
  2459. style={{ width: 240 }}
  2460. value={this.state.depName}
  2461. onChange={e => {
  2462. this.setState({ depName: e });
  2463. // console.log("5454", e);
  2464. }}
  2465. >
  2466. {departmentArr.map(function(item) {
  2467. return (
  2468. <Select.Option
  2469. key={item.id}
  2470. value={item.name}
  2471. >
  2472. {item.name}
  2473. </Select.Option>
  2474. );
  2475. })}
  2476. </Select>
  2477. ) : (
  2478. <span>{contractData.depName}</span>
  2479. )}
  2480. </FormItem>
  2481. <FormItem
  2482. className="half-item"
  2483. {...formItemLayout}
  2484. label="申请人"
  2485. >
  2486. {!this.state.mark ? (
  2487. <Input
  2488. placeholder="请输入申请人"
  2489. ref="signTotalAmount"
  2490. value={this.state.salesmanName}
  2491. onChange={e => {
  2492. this.setState({
  2493. salesmanName: e.target.value
  2494. });
  2495. }}
  2496. style={{ width: "240px" }}
  2497. />
  2498. ) : (
  2499. <span>{contractData.applicant}</span>
  2500. )}
  2501. </FormItem>
  2502. </div>
  2503. <div className="clearfix">
  2504. <FormItem
  2505. labelCol={{ span: 4 }}
  2506. wrapperCol={{ span: 18 }}
  2507. label="变更类型"
  2508. >
  2509. {!this.state.mark ? (
  2510. <Select
  2511. placeholder="选择合同变更类型"
  2512. style={{ width: 200 }}
  2513. onChange={e => {
  2514. this.setState({
  2515. typeChange: e
  2516. });
  2517. }}
  2518. value={this.state.typeChange}
  2519. >
  2520. <Option value={0}>退单退款</Option>
  2521. <Option value={1}>项目及金额变更</Option>
  2522. <Option value={2}>仅项目变更</Option>
  2523. <Option value={3}>仅金额变更</Option>
  2524. <Option value={4}>重报</Option>
  2525. <Option value={5}>赠送</Option>
  2526. </Select>
  2527. ) : (
  2528. <span>
  2529. {getChangeType(contractData.type)}
  2530. </span>
  2531. )}
  2532. </FormItem>
  2533. </div>
  2534. <div className="clearfix">
  2535. <FormItem
  2536. labelCol={{ span: 4 }}
  2537. wrapperCol={{ span: 18 }}
  2538. label="合同额(万元)"
  2539. >
  2540. {!this.state.mark ? (
  2541. <Input
  2542. placeholder="请输入合同额"
  2543. ref="signTotalAmount"
  2544. value={this.state.totalAmount}
  2545. onChange={e => {
  2546. this.setState({
  2547. totalAmount: e.target.value
  2548. });
  2549. }}
  2550. style={{ width: "240px" }}
  2551. />
  2552. ) : (
  2553. <span>{contractData.totalAmount}</span>
  2554. )}
  2555. </FormItem>
  2556. <FormItem
  2557. labelCol={{ span: 4 }}
  2558. wrapperCol={{ span: 18 }}
  2559. label="已收款(万元)"
  2560. >
  2561. {!this.state.mark ? (
  2562. <Input
  2563. placeholder="请输入已收款"
  2564. ref="signTotalAmount"
  2565. value={this.state.settlementAmount}
  2566. onChange={e => {
  2567. this.setState({
  2568. settlementAmount: e.target.value
  2569. });
  2570. }}
  2571. style={{ width: "240px" }}
  2572. />
  2573. ) : (
  2574. <span>{contractData.settlementAmount}</span>
  2575. )}
  2576. </FormItem>
  2577. <FormItem
  2578. labelCol={{ span: 4 }}
  2579. wrapperCol={{ span: 18 }}
  2580. label="申请退款(万元)"
  2581. >
  2582. {!this.state.mark ? (
  2583. <Input
  2584. placeholder="请输入申请退款"
  2585. ref="signTotalAmount"
  2586. value={this.state.changeAmount}
  2587. onChange={e => {
  2588. this.setState({
  2589. changeAmount: e.target.value
  2590. });
  2591. }}
  2592. style={{ width: "240px" }}
  2593. />
  2594. ) : (
  2595. <span>{contractData.changeAmount}</span>
  2596. )}
  2597. </FormItem>
  2598. </div>
  2599. <div className="clearfix">
  2600. <FormItem
  2601. style={{ height: "auto" }}
  2602. labelCol={{ span: 4 }}
  2603. wrapperCol={{ span: 18 }}
  2604. label="变更原因"
  2605. >
  2606. {!this.state.mark ? (
  2607. <TextArea
  2608. rows={4}
  2609. placeholder="请输入变更原因"
  2610. ref="signTotalAmount"
  2611. style={{ width: "95%" }}
  2612. value={this.state.remarksC}
  2613. onChange={e => {
  2614. this.setState({
  2615. remarksC: e.target.value
  2616. });
  2617. }}
  2618. />
  2619. ) : (
  2620. <span>{contractData.remarks}</span>
  2621. )}
  2622. </FormItem>
  2623. </div>
  2624. {/*----- */}
  2625. <div className="clearfix">
  2626. <FormItem
  2627. style={{ height: "auto" }}
  2628. labelCol={{ span: 4 }}
  2629. wrapperCol={{ span: 18 }}
  2630. label="备注"
  2631. >
  2632. {!this.state.mark ? (
  2633. <TextArea
  2634. rows={4}
  2635. placeholder="请输入备注"
  2636. ref="signTotalAmount"
  2637. style={{ width: "95%" }}
  2638. value={this.state.startRemarks}
  2639. onChange={e => {
  2640. this.setState({
  2641. startRemarks: e.target.value
  2642. });
  2643. }}
  2644. />
  2645. ) : (
  2646. <span>{contractData.startRemarks}</span>
  2647. )}
  2648. </FormItem>
  2649. </div>
  2650. {/* ---- */}
  2651. <div className="clearfix">
  2652. <FormItem
  2653. labelCol={{ span: 4 }}
  2654. wrapperCol={{ span: 18 }}
  2655. label="变更凭证"
  2656. >
  2657. {!this.state.mark ? (
  2658. <PicturesWall
  2659. fileList={this.getVoucherUrl}
  2660. pictureUrl={this.state.voucherUrl}
  2661. url="/api/admin/orderChange/uploadFile"
  2662. sign="order_change_file"
  2663. />
  2664. ) : (
  2665. <div>
  2666. <Upload
  2667. className="demandDetailShow-upload"
  2668. listType="picture-card"
  2669. fileList={this.state.voucherUrl}
  2670. onPreview={file => {
  2671. this.setState({
  2672. previewImage:
  2673. file.url || file.thumbUrl,
  2674. previewVisible: true
  2675. });
  2676. }}
  2677. />
  2678. <Modal
  2679. maskClosable={false}
  2680. footer={null}
  2681. visible={this.state.previewVisible}
  2682. onCancel={() => {
  2683. this.setState({
  2684. previewVisible: false
  2685. });
  2686. }}
  2687. >
  2688. <img
  2689. alt=""
  2690. style={{ width: "100%" }}
  2691. src={this.state.previewImage || ""}
  2692. />
  2693. </Modal>
  2694. </div>
  2695. )}
  2696. <p>图片建议:要清晰。</p>
  2697. </FormItem>
  2698. </div>
  2699. {!this.state.mark ? (
  2700. <div className="clearfix">
  2701. <Button
  2702. type="primary"
  2703. style={{ float: "right", marginRight: 40 }}
  2704. onClick={this.changeApply}
  2705. >
  2706. 发起变更申请
  2707. </Button>
  2708. </div>
  2709. ) : (
  2710. ""
  2711. )}
  2712. </div>
  2713. }
  2714. </TabPane>
  2715. </Tabs>
  2716. )}
  2717. </div>
  2718. </Spin>
  2719. </Form>
  2720. </Modal>
  2721. <Modal
  2722. maskClosable={false}
  2723. visible={this.state.addnextVisible}
  2724. onOk={this.nextCancel}
  2725. onCancel={this.nextCancel}
  2726. width="800px"
  2727. title={this.state.addState ? "添加项目任务" : "项目任务详情"}
  2728. footer=""
  2729. className="admin-desc-content"
  2730. >
  2731. <Form
  2732. layout="horizontal"
  2733. onSubmit={this.nextSubmit}
  2734. id="demand-form"
  2735. >
  2736. <Spin spinning={this.state.loading}>
  2737. {this.state.addState ? (
  2738. <div className="clearfix">
  2739. <FormItem
  2740. className="half-item"
  2741. {...formItemLayout}
  2742. label="服务名称"
  2743. >
  2744. <AutoComplete
  2745. className="certain-category-search"
  2746. dropdownClassName="certain-category-search-dropdown"
  2747. dropdownMatchSelectWidth={false}
  2748. dropdownStyle={{ width: 200 }}
  2749. style={{ width: "200px" }}
  2750. dataSource={options}
  2751. placeholder="输入服务名称"
  2752. value={this.state.commodityName}
  2753. onChange={this.httpChange}
  2754. filterOption={true}
  2755. onSelect={this.selectAuto}
  2756. >
  2757. <Input />
  2758. </AutoComplete>
  2759. <span className="mandatory">*</span>
  2760. </FormItem>
  2761. <FormItem
  2762. className="half-item"
  2763. {...formItemLayout}
  2764. label="服务数量"
  2765. >
  2766. <Input
  2767. placeholder="请输入服务数量"
  2768. value={this.state.commodityQuantity}
  2769. style={{ width: "200px" }}
  2770. onChange={e => {
  2771. this.setState({ commodityQuantity: e.target.value });
  2772. }}
  2773. ref="commodityQuantity"
  2774. />
  2775. <span className="mandatory">*</span>
  2776. </FormItem>
  2777. <FormItem
  2778. className="half-item"
  2779. {...formItemLayout}
  2780. label="实签价格(万元)"
  2781. >
  2782. <Input
  2783. placeholder="请输入实签价格"
  2784. value={this.state.commodityPrice}
  2785. style={{ width: "200px" }}
  2786. onChange={e => {
  2787. this.setState({ commodityPrice: e.target.value });
  2788. }}
  2789. ref="commodityPrice"
  2790. />
  2791. <span className="mandatory">*</span>
  2792. </FormItem>
  2793. <FormItem
  2794. className="half-item"
  2795. {...formItemLayout}
  2796. label="主要业务"
  2797. >
  2798. <Select
  2799. placeholder="选择是否为主要业务"
  2800. style={{ width: "200px" }}
  2801. value={this.state.main}
  2802. onChange={e => {
  2803. this.setState({ main: e });
  2804. }}
  2805. >
  2806. {boutique.map(function(item) {
  2807. return (
  2808. <Select.Option key={item.value}>
  2809. {item.key}
  2810. </Select.Option>
  2811. );
  2812. })}
  2813. </Select>
  2814. <span className="mandatory">*</span>
  2815. </FormItem>
  2816. <div className="clearfix">
  2817. <FormItem
  2818. labelCol={{ span: 4 }}
  2819. wrapperCol={{ span: 16 }}
  2820. label="服务说明"
  2821. >
  2822. <Input
  2823. type="textarea"
  2824. placeholder="请输入服务说明"
  2825. value={this.state.taskComment}
  2826. onChange={e => {
  2827. this.setState({ taskComment: e.target.value });
  2828. }}
  2829. />
  2830. </FormItem>
  2831. </div>
  2832. <FormItem
  2833. wrapperCol={{ span: 12, offset: 4 }}
  2834. className="half-middle"
  2835. >
  2836. <Button
  2837. className="submitSave"
  2838. type="primary"
  2839. htmlType="submit"
  2840. >
  2841. 保存
  2842. </Button>
  2843. <Button
  2844. className="submitSave"
  2845. type="ghost"
  2846. onClick={this.nextCancel}
  2847. >
  2848. 取消
  2849. </Button>
  2850. </FormItem>
  2851. </div>
  2852. ) : (
  2853. <div className="clearfix">
  2854. {this.state.processStatus == 0 ? (
  2855. <div className="clearfix">
  2856. <FormItem
  2857. className="half-item"
  2858. {...formItemLayout}
  2859. label="项目名称"
  2860. >
  2861. <span>{this.state.commodityName}</span>
  2862. </FormItem>
  2863. <FormItem
  2864. className="half-item"
  2865. {...formItemLayout}
  2866. label="项目数量"
  2867. >
  2868. <Input
  2869. placeholder="请输入数量"
  2870. value={this.state.commodityQuantity}
  2871. style={{ width: "200px" }}
  2872. onChange={e => {
  2873. this.setState({
  2874. commodityQuantity: e.target.value
  2875. });
  2876. }}
  2877. />
  2878. <span className="mandatory">*</span>
  2879. </FormItem>
  2880. <FormItem
  2881. className="half-item"
  2882. {...formItemLayout}
  2883. label="金额(万元)"
  2884. >
  2885. <Input
  2886. placeholder="请输入签单金额"
  2887. value={this.state.commodityPrice}
  2888. style={{ width: "200px" }}
  2889. onChange={e => {
  2890. this.setState({ commodityPrice: e.target.value });
  2891. }}
  2892. />
  2893. <span className="mandatory">*</span>
  2894. </FormItem>
  2895. <FormItem
  2896. className="half-item"
  2897. {...formItemLayout}
  2898. label="主要项目"
  2899. >
  2900. <Select
  2901. placeholder="选择是否为主要业务"
  2902. style={{ width: "200px" }}
  2903. value={this.state.main}
  2904. onChange={e => {
  2905. this.setState({ main: e });
  2906. }}
  2907. >
  2908. {boutique.map(function(item) {
  2909. return (
  2910. <Select.Option key={item.value}>
  2911. {item.key}
  2912. </Select.Option>
  2913. );
  2914. })}
  2915. </Select>
  2916. <span className="mandatory">*</span>
  2917. </FormItem>
  2918. <div className="clearfix">
  2919. <FormItem
  2920. labelCol={{ span: 4 }}
  2921. wrapperCol={{ span: 16 }}
  2922. label="服务说明"
  2923. >
  2924. <Input
  2925. type="textarea"
  2926. placeholder="请输入服务说明"
  2927. value={this.state.taskComment}
  2928. onChange={e => {
  2929. this.setState({ taskComment: e.target.value });
  2930. }}
  2931. />
  2932. </FormItem>
  2933. </div>
  2934. <FormItem
  2935. wrapperCol={{ span: 12, offset: 4 }}
  2936. className="half-middle"
  2937. >
  2938. <Button
  2939. className="submitSave"
  2940. type="primary"
  2941. onClick={this.tabRowSave}
  2942. >
  2943. 保存
  2944. </Button>
  2945. <Button
  2946. className="submitSave"
  2947. type="ghost"
  2948. onClick={this.nextCancel}
  2949. >
  2950. 取消
  2951. </Button>
  2952. </FormItem>
  2953. </div>
  2954. ) : (
  2955. <div className="clearfix">
  2956. <FormItem
  2957. className="half-item"
  2958. {...formItemLayout}
  2959. label="项目名称"
  2960. >
  2961. <span>{this.state.commodityName}</span>
  2962. </FormItem>
  2963. <FormItem
  2964. className="half-item"
  2965. {...formItemLayout}
  2966. label="项目数量"
  2967. >
  2968. <span>{this.state.commodityQuantity}</span>
  2969. </FormItem>
  2970. <FormItem
  2971. className="half-item"
  2972. {...formItemLayout}
  2973. label="金额(万元)"
  2974. >
  2975. <span>{this.state.commodityPrice}</span>
  2976. </FormItem>
  2977. <FormItem
  2978. className="half-item"
  2979. {...formItemLayout}
  2980. label="主要项目"
  2981. >
  2982. <span>{getboutique(this.state.main)}</span>
  2983. </FormItem>
  2984. <div className="clearfix">
  2985. <FormItem
  2986. labelCol={{ span: 4 }}
  2987. wrapperCol={{ span: 16 }}
  2988. label="服务说明"
  2989. >
  2990. <span>{this.state.taskComment}</span>
  2991. </FormItem>
  2992. </div>
  2993. </div>
  2994. )}
  2995. </div>
  2996. )}
  2997. </Spin>
  2998. </Form>
  2999. </Modal>
  3000. <Modal
  3001. maskClosable={false}
  3002. visible={this.state.lookVisible}
  3003. onOk={this.noCancel}
  3004. onCancel={this.noCancel}
  3005. width="800px"
  3006. title={"退单申请"}
  3007. footer=""
  3008. className="admin-desc-content"
  3009. >
  3010. <Form layout="horizontal" id="demand-form">
  3011. <Spin spinning={this.state.loading}>
  3012. <div className="clearfix">
  3013. <FormItem
  3014. labelCol={{ span: 4 }}
  3015. wrapperCol={{ span: 16 }}
  3016. label="终止合同"
  3017. >
  3018. <Picture
  3019. fileList={e => {
  3020. this.setState({ contractUrl: e });
  3021. }}
  3022. pictureUrl={this.state.contractUrl}
  3023. visible={this.props.visible}
  3024. data={{
  3025. sign: "order_refund_file",
  3026. url: "/api/admin/newOrder/uploadRefundOrderFile",
  3027. number: 8
  3028. }}
  3029. />
  3030. </FormItem>
  3031. </div>
  3032. <div className="clearfix">
  3033. <FormItem
  3034. labelCol={{ span: 4 }}
  3035. wrapperCol={{ span: 16 }}
  3036. label="退单申请表"
  3037. >
  3038. <Picture
  3039. fileList={e => {
  3040. this.setState({ applicationUrl: e });
  3041. }}
  3042. pictureUrl={this.state.applicationUrl}
  3043. visible={this.props.visible}
  3044. data={{
  3045. sign: "order_refund_file",
  3046. url: "/api/admin/newOrder/uploadRefundOrderFile",
  3047. number: 8
  3048. }}
  3049. />
  3050. </FormItem>
  3051. </div>
  3052. <div className="clearfix">
  3053. <FormItem
  3054. labelCol={{ span: 4 }}
  3055. wrapperCol={{ span: 16 }}
  3056. label="退单理由"
  3057. >
  3058. <Input
  3059. type="textarea"
  3060. placeholder="请输入退单理由"
  3061. rows={4}
  3062. value={this.state.reason}
  3063. onChange={e => {
  3064. this.setState({ reason: e.target.value });
  3065. }}
  3066. />
  3067. </FormItem>
  3068. </div>
  3069. <div className="clearfix">
  3070. <Button
  3071. className="cancel"
  3072. type="primary"
  3073. onClick={this.tuidanOk}
  3074. style={{ marginLeft: "50px" }}
  3075. htmlType="submit"
  3076. >
  3077. 确定退单
  3078. </Button>
  3079. <Button
  3080. className="cancel"
  3081. type="ghost"
  3082. onClick={this.noCancel}
  3083. style={{ marginLeft: "50px" }}
  3084. >
  3085. 取消
  3086. </Button>
  3087. </div>
  3088. </Spin>
  3089. </Form>
  3090. </Modal>
  3091. {/* <Modal
  3092. visible={this.state.rizhivisible}
  3093. className="admin-desc-content"
  3094. width="800px"
  3095. maskClosable={false}
  3096. title="订单日志"
  3097. footer={null}
  3098. onCancel={this.closeOrderLog}
  3099. >
  3100. <div className="patent-table">
  3101. <Spin spinning={this.state.loading}>
  3102. <Table
  3103. columns={this.state.columnsrizhi}
  3104. dataSource={this.state.dataSourcerizhi}
  3105. pagination={false}
  3106. />
  3107. </Spin>
  3108. </div>
  3109. </Modal> */}
  3110. <OrderRiZi
  3111. dataSourcerizhi={this.state.dataSourcerizhi}
  3112. closeOrderLog={this.closeOrderLog}
  3113. visible={this.state.rizhivisible}
  3114. loading={this.state.loading}
  3115. />
  3116. </div>
  3117. );
  3118. }
  3119. })
  3120. );
  3121. export default Form.create()(NewService);