addService.jsx 138 KB

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