addService.jsx 138 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840
  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.key, 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. });
  1602. }
  1603. }
  1604. this.setState({
  1605. dataSourcerizhi: theArr
  1606. });
  1607. }.bind(this)
  1608. }).always(
  1609. function() {
  1610. this.setState({
  1611. loading: false
  1612. });
  1613. }.bind(this)
  1614. );
  1615. },
  1616. //查看订单日志
  1617. getOrderLog() {
  1618. this.setState({
  1619. rizhivisible: true
  1620. });
  1621. this.rizhi();
  1622. },
  1623. closeOrderLog() {
  1624. this.setState({
  1625. rizhivisible: false
  1626. });
  1627. },
  1628. callback(key) {
  1629. this.setState({
  1630. activeKey: key
  1631. });
  1632. if (key === "2") {
  1633. let url = window.location.href.substring(7);
  1634. $.ajax({
  1635. method: "get",
  1636. dataType: "json",
  1637. crossDomain: false,
  1638. url:
  1639. globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  1640. data: {
  1641. orderNo: this.props.datauser.orderNo
  1642. },
  1643. success: function(data) {
  1644. // console.log(data.data);
  1645. if (data.data) {
  1646. let thisdata = data.data;
  1647. // console.log(this.state.userName);
  1648. Object.assign(thisdata, {
  1649. userName: this.state.userName,
  1650. contractNo: this.state.contractNo,
  1651. arrears: this.state.arrears
  1652. });
  1653. this.setState({
  1654. mark: true,
  1655. contractData: thisdata,
  1656. voucherUrl: thisdata.voucherUrl
  1657. ? splitUrl(
  1658. thisdata.voucherUrl,
  1659. ",",
  1660. globalConfig.avatarHost + "/upload",
  1661. url
  1662. )
  1663. : []
  1664. });
  1665. }
  1666. }.bind(this)
  1667. });
  1668. }
  1669. },
  1670. getOrgCodeUrl(e) {
  1671. this.setState({ orgCodeUrl: e });
  1672. },
  1673. getVoucherUrl(e) {
  1674. this.setState({ voucherUrl: e });
  1675. },
  1676. //加载(自动补全)
  1677. supervisor(e, state) {
  1678. //客户名称与服务名称自动补全
  1679. let api = state
  1680. ? "/api/admin/customer/getCustomerByName"
  1681. : "/api/admin/order/getBusinessProjectByName";
  1682. $.ajax({
  1683. method: "get",
  1684. dataType: "json",
  1685. crossDomain: false,
  1686. url: globalConfig.context + api,
  1687. data: state
  1688. ? {
  1689. name: e,
  1690. type: this.state.customType
  1691. }
  1692. : {
  1693. businessName: e
  1694. },
  1695. success: function(data) {
  1696. let thedata = data.data;
  1697. if (!thedata) {
  1698. if (data.error && data.error.length) {
  1699. message.warning(data.error[0].message);
  1700. }
  1701. thedata = {};
  1702. }
  1703. this.setState({
  1704. states: state,
  1705. customerArr: thedata
  1706. });
  1707. }.bind(this)
  1708. }).always(
  1709. function() {
  1710. this.setState({
  1711. loading: false
  1712. });
  1713. }.bind(this)
  1714. );
  1715. },
  1716. supervisorCui(e) {
  1717. //客户名称与服务名称自动补全
  1718. let api = "/api/admin/order/getBusinessProjectByName";
  1719. $.ajax({
  1720. method: "get",
  1721. dataType: "json",
  1722. crossDomain: false,
  1723. url: globalConfig.context + api,
  1724. data: {
  1725. businessName: e
  1726. },
  1727. success: function(data) {
  1728. let thedata = data.data;
  1729. if (!thedata) {
  1730. if (data.error && data.error.length) {
  1731. message.warning(data.error[0].message);
  1732. }
  1733. thedata = {};
  1734. }
  1735. this.setState({
  1736. customerCuiArr: thedata
  1737. });
  1738. }.bind(this)
  1739. }).always(
  1740. function() {
  1741. this.setState({
  1742. loading: false
  1743. });
  1744. }.bind(this)
  1745. );
  1746. },
  1747. //上级主管输入框失去焦点是判断客户是否存在
  1748. selectAuto(value) {
  1749. let kid = [];
  1750. let fwList = this.state.customerArr;
  1751. fwList.map(function(item) {
  1752. if (value == item.bname) {
  1753. kid = item;
  1754. }
  1755. });
  1756. this.setState({
  1757. commodityName: value,
  1758. gid: kid.id,
  1759. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  1760. commodityFirstPayment:
  1761. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  1762. });
  1763. },
  1764. selectAutoCui(value) {
  1765. let kid = [];
  1766. let fwList = this.state.customerCuiArr;
  1767. fwList.map(function(item) {
  1768. if (value == item.bname) {
  1769. kid = item;
  1770. }
  1771. });
  1772. this.setState({
  1773. commodityNameCui: value,
  1774. cid: kid.id,
  1775. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  1776. commodityFirstPayment:
  1777. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  1778. });
  1779. },
  1780. //客户
  1781. selectAutoCUT(value) {
  1782. let autoIds;
  1783. let fwList = this.state.customerArr;
  1784. fwList.map(function(item) {
  1785. if (value == item.name) {
  1786. autoIds = item.id;
  1787. }
  1788. });
  1789. this.setState({
  1790. customerName: value,
  1791. autoId: autoIds
  1792. });
  1793. },
  1794. //服务值改变时请求客户名称
  1795. httpChange(e) {
  1796. this.state.gid = "";
  1797. if (e.length >= 1) {
  1798. this.supervisor(e, false);
  1799. }
  1800. this.setState({
  1801. commodityName: e
  1802. });
  1803. },
  1804. httpChangeCui(e) {
  1805. if (e.length >= 1) {
  1806. this.supervisorCui(e, false);
  1807. }
  1808. this.setState({
  1809. commodityNameCui: e
  1810. });
  1811. },
  1812. //客户名称自动补全
  1813. customerChange(e) {
  1814. if (this.state.customType) {
  1815. this.state.autoId = "";
  1816. if (e.length >= 2) {
  1817. this.supervisor(e, true);
  1818. }
  1819. this.setState({
  1820. customerName: e
  1821. });
  1822. } else {
  1823. this.setState({
  1824. customerName: ""
  1825. });
  1826. message.warning("客户所属类型必须指定");
  1827. }
  1828. },
  1829. //点击添加项目明细
  1830. addDetailed() {
  1831. this.setState({
  1832. gid: "",
  1833. customerArr: [],
  1834. commodityName: "",
  1835. commodityQuantity: "",
  1836. commodityId: "",
  1837. taskComment: "",
  1838. main: undefined,
  1839. commodityPrice: "",
  1840. addState: 1,
  1841. addnextVisible: true
  1842. });
  1843. },
  1844. //新建项目明细保存
  1845. nextSubmit(e) {
  1846. e.preventDefault();
  1847. if (this.state.gid == undefined || !this.state.gid) {
  1848. message.warning("服务名称不匹配!");
  1849. return false;
  1850. }
  1851. if (!this.state.commodityPrice) {
  1852. message.warning("请输入金额!");
  1853. this.refs.commodityPrice.focus();
  1854. return false;
  1855. }
  1856. if (!this.state.commodityQuantity) {
  1857. message.warning("请输入商品数量!");
  1858. this.refs.commodityQuantity.focus();
  1859. return false;
  1860. }
  1861. if (!this.state.main) {
  1862. message.warning("请选择是否为主要项目!");
  1863. this.refs.commodityQuantity.focus();
  1864. return false;
  1865. }
  1866. this.setState({
  1867. loading: true
  1868. });
  1869. let api = this.state.addState
  1870. ? "/api/admin/newOrder/addOrderTask"
  1871. : "/api/bianji";
  1872. $.ajax({
  1873. method: "POST",
  1874. dataType: "json",
  1875. crossDomain: false,
  1876. url: globalConfig.context + api,
  1877. data: {
  1878. commodityId: this.state.gid, //商品ID
  1879. orderNo: this.props.datauser.orderNo, //订单编号
  1880. commodityName: this.state.commodityName, //商品名称
  1881. commodityQuantity: this.state.commodityQuantity, //商品数量
  1882. commodityPrice: this.state.commodityPrice, //签单总价
  1883. taskComment: this.state.taskComment, //服务说明
  1884. main: this.state.main //是否为主要项目
  1885. }
  1886. }).done(
  1887. function(data) {
  1888. this.setState({
  1889. loading: false
  1890. });
  1891. if (!data.error.length) {
  1892. message.success("保存成功!");
  1893. this.nextCancel();
  1894. //this.loaduser(this.props.datauser);
  1895. this.loadData();
  1896. } else {
  1897. message.warning(data.error[0].message);
  1898. }
  1899. }.bind(this)
  1900. );
  1901. },
  1902. //点击打卡项目详情
  1903. tableRowClick(record) {
  1904. this.setState({
  1905. jid: record.id, //项目ID
  1906. kid: record.commodityId, //商品ID
  1907. commodityName: record.commodityName, //金额
  1908. commodityPrice: record.commodityPrice, //金额
  1909. commodityQuantity: record.commodityQuantity, //数量
  1910. taskComment: record.taskComment, //备注
  1911. main: record.main.toString(), //是否为主要
  1912. addnextVisible: true,
  1913. addState: 0
  1914. });
  1915. },
  1916. //修改项目详情
  1917. tabRowSave(e) {
  1918. e.preventDefault();
  1919. if (!this.state.commodityPrice) {
  1920. message.warning("金额不能为空!");
  1921. return false;
  1922. }
  1923. if (!this.state.commodityQuantity) {
  1924. message.warning("数量不能为空!");
  1925. return false;
  1926. }
  1927. if (!this.state.main) {
  1928. message.warning("请选择是否为主要项目!");
  1929. this.refs.commodityQuantity.focus();
  1930. return false;
  1931. }
  1932. $.ajax({
  1933. method: "POST",
  1934. dataType: "json",
  1935. crossDomain: false,
  1936. url: globalConfig.context + "/api/admin/newOrder/updateOrderTask",
  1937. data: {
  1938. id: this.state.jid, //项目ID
  1939. commodityId: this.state.kid, //商品ID
  1940. orderNo: this.props.datauser.orderNo, //订单编号
  1941. main: this.state.main, //是否为主要
  1942. commodityPrice: this.state.commodityPrice, //金额
  1943. commodityQuantity: this.state.commodityQuantity, //数量
  1944. taskComment: this.state.taskComment //备注
  1945. }
  1946. }).done(
  1947. function(data) {
  1948. this.setState({
  1949. loading: false
  1950. });
  1951. if (!data.error.length) {
  1952. message.success("保存成功!");
  1953. this.nextCancel();
  1954. //this.loaduser(this.props.datauser);
  1955. this.loadData();
  1956. } else {
  1957. message.warning(data.error[0].message);
  1958. }
  1959. }.bind(this)
  1960. );
  1961. },
  1962. //签单时间选择
  1963. selTime(e, index) {
  1964. this.setState({
  1965. entryTime: e,
  1966. signDate: e,
  1967. selTime: index
  1968. });
  1969. },
  1970. //退单操作
  1971. //点击退单
  1972. tuikuan() {
  1973. this.setState({
  1974. lookVisible: true,
  1975. contractUrl: [],
  1976. applicationUrl: [],
  1977. reason: ""
  1978. });
  1979. },
  1980. //关闭退单
  1981. noCancel() {
  1982. this.setState({
  1983. lookVisible: false
  1984. });
  1985. },
  1986. //点击确认退单
  1987. tuidanOk() {
  1988. let contractUrls = [];
  1989. let applicationUrls = [];
  1990. if (this.state.contractUrl.length) {
  1991. let picArr = [];
  1992. this.state.contractUrl.map(function(item) {
  1993. if (
  1994. item.response &&
  1995. item.response.data &&
  1996. item.response.data.length
  1997. ) {
  1998. picArr.push(item.response.data);
  1999. }
  2000. });
  2001. contractUrls = picArr.join(",");
  2002. }
  2003. if (this.state.applicationUrl.length) {
  2004. let picArr = [];
  2005. this.state.applicationUrl.map(function(item) {
  2006. if (
  2007. item.response &&
  2008. item.response.data &&
  2009. item.response.data.length
  2010. ) {
  2011. picArr.push(item.response.data);
  2012. }
  2013. });
  2014. applicationUrls = picArr.join(",");
  2015. }
  2016. $.ajax({
  2017. method: "POST",
  2018. dataType: "json",
  2019. crossDomain: false,
  2020. url: globalConfig.context + "/api/admin/newOrder/addOrderRefund",
  2021. data: {
  2022. orderNo: this.state.orderNo, //订单编号
  2023. contractUrl: contractUrls.length ? contractUrls : "", //终止合同
  2024. applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
  2025. reason: this.state.reason //退单原因
  2026. }
  2027. }).done(
  2028. function(data) {
  2029. this.setState({
  2030. loading: false
  2031. });
  2032. if (!data.error.length) {
  2033. message.success("退单成功!");
  2034. this.noCancel();
  2035. this.handleCancelclose();
  2036. } else {
  2037. message.warning(data.error[0].message);
  2038. }
  2039. }.bind(this)
  2040. );
  2041. },
  2042. //开单选择订单类型骚操作
  2043. orderTypeFn(e) {
  2044. if (e == 0) {
  2045. this.setState({
  2046. bussStats: true,
  2047. orderType: e
  2048. });
  2049. this.category();
  2050. } else {
  2051. this.setState({
  2052. contractType: undefined,
  2053. bussStats: false,
  2054. orderType: e
  2055. });
  2056. }
  2057. },
  2058. //品类数据获取
  2059. category() {
  2060. $.ajax({
  2061. method: "get",
  2062. dataType: "json",
  2063. crossDomain: false,
  2064. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  2065. data: {},
  2066. success: function(data) {
  2067. let thedata = data.data;
  2068. let theArr = [];
  2069. if (!thedata) {
  2070. if (data.error && data.error.length) {
  2071. message.warning(data.error[0].message);
  2072. }
  2073. thedata = {};
  2074. } else {
  2075. thedata.map(function(item, index) {
  2076. theArr.push({
  2077. key: index,
  2078. name: item.cname,
  2079. id: item.id
  2080. });
  2081. });
  2082. }
  2083. this.setState({
  2084. contractType: undefined,
  2085. categoryArr: theArr
  2086. });
  2087. }.bind(this)
  2088. });
  2089. },
  2090. //变更申请
  2091. changeApply() {
  2092. if (this.state.processStatus <= 4) {
  2093. message.warning("当前订单流程不能发起变更!");
  2094. return false;
  2095. }
  2096. if (this.state.changeAmount == "") {
  2097. message.warning("申请退款金额不能为空!");
  2098. // console.log(this.state.changeAmount);
  2099. return false;
  2100. }
  2101. if (this.state.remarksC.trim() == "") {
  2102. message.warning("请正确填写变更原因");
  2103. return false;
  2104. }
  2105. if (this.state.startRemarks.trim() == "") {
  2106. message.warning("请正确填写备注信息");
  2107. return false;
  2108. }
  2109. let theorgCodeUrl = [];
  2110. if (this.state.voucherUrl.length) {
  2111. let picArr = [];
  2112. this.state.voucherUrl.map(function(item) {
  2113. if (
  2114. item.response &&
  2115. item.response.data &&
  2116. item.response.data.length
  2117. ) {
  2118. picArr.push(item.response.data);
  2119. }
  2120. });
  2121. theorgCodeUrl = picArr.join(",");
  2122. }
  2123. $.ajax({
  2124. method: "post",
  2125. dataType: "json",
  2126. crossDomain: false,
  2127. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  2128. data: {
  2129. orderNo: this.state.orderNo, //订单编号
  2130. processState: 0,
  2131. status: 1,
  2132. startRemarks: this.state.startRemarks,
  2133. remarks: this.state.remarksC,
  2134. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  2135. totalAmount: this.state.totalAmount,
  2136. settlementAmount: this.state.settlementAmount,
  2137. changeAmount: this.state.changeAmount,
  2138. applicant: this.state.salesmanName,
  2139. depName: this.state.depName,
  2140. type: this.state.typeChange
  2141. }
  2142. }).done(
  2143. function(data) {
  2144. this.setState({
  2145. loading: false
  2146. });
  2147. if (!data.error.length) {
  2148. message.success("变更成功!");
  2149. this.noCancel();
  2150. this.handleCancelclose();
  2151. } else {
  2152. message.warning(data.error[0].message);
  2153. }
  2154. }.bind(this)
  2155. );
  2156. },
  2157. componentDidMount() {
  2158. window.setTimeout(() => {
  2159. // console.log("我看看", this.state);
  2160. }, 100);
  2161. },
  2162. reset() {
  2163. this.setState({
  2164. startRemarks: "",
  2165. remarksC: "",
  2166. voucherUrl: [],
  2167. totalAmount: undefined,
  2168. settlementAmount: undefined,
  2169. changeAmount: "0",
  2170. applicant: undefined,
  2171. depNameChange: undefined,
  2172. typeChange: 0,
  2173. });
  2174. },
  2175. componentWillReceiveProps(nextProps) {
  2176. //props改变时触发
  2177. this.state.visible = nextProps.showDesc;
  2178. this.state.signBillVisible = nextProps.signBillVisible;
  2179. if (this.state.signBillVisible) {
  2180. this.loaduser(nextProps.uid);
  2181. }
  2182. if (nextProps.userDetaile && nextProps.showDesc) {
  2183. this.loaduser(nextProps.datauser);
  2184. this.jiedian(nextProps.datauser.orderNo);
  2185. this.jiedianNew(nextProps.datauser.orderNo);
  2186. this.loadData(nextProps.datauser);
  2187. } else {
  2188. this.setState({
  2189. orderType: undefined,
  2190. customerName: "",
  2191. autoId: "",
  2192. customerArr: [],
  2193. contractType: undefined,
  2194. bussStats: false,
  2195. customType: undefined
  2196. });
  2197. }
  2198. },
  2199. showConfirm(fn,record) {
  2200. confirm({
  2201. title: '确定删除此项目吗?',
  2202. content: <span style={{ color: "red" }}>删除后会将该项目下的所有催款节点自动清除!!!</span>,
  2203. onOk() {
  2204. fn(record)
  2205. },
  2206. onCancel() {
  2207. },
  2208. });
  2209. },
  2210. render() {
  2211. const FormItem = Form.Item;
  2212. const { TabPane } = Tabs;
  2213. const { TextArea } = Input;
  2214. const formItemLayout = {
  2215. labelCol: { span: 8 },
  2216. wrapperCol: { span: 14 }
  2217. };
  2218. const contractData = this.state.contractData;
  2219. const formItemList = [
  2220. {
  2221. label: "企业联系人",
  2222. content: <span>{this.state.contacts}</span>
  2223. },
  2224. {
  2225. label: "联系人电话",
  2226. content: <span>{this.state.contactMobile}</span>
  2227. },
  2228. {
  2229. label: "企业法人",
  2230. content: <span>{this.state.legalPerson}</span>
  2231. },
  2232. {
  2233. label: "法人电话",
  2234. content: <span>{this.state.legalPersonTel}</span>
  2235. },
  2236. // {
  2237. // label: "签单金额(万元)",
  2238. // content: <span>{this.state.totalAmount}</span>
  2239. // },
  2240. // {
  2241. // label: "首付金额(万元)",
  2242. // content: <span>{this.state.firstAmount}</span>
  2243. // },
  2244. // {
  2245. // label: "特批立项",
  2246. // content: <span>{getApprovedState(this.state.approval)}</span>
  2247. // },
  2248. // {
  2249. // label: "合同签订时间",
  2250. // content: <span>{this.state.signDate}</span>
  2251. // },
  2252. // {
  2253. // label: "订单部门",
  2254. // content: <span>{this.state.depName}</span>
  2255. // }
  2256. ];
  2257. const dataSources = this.state.customerArr || [];
  2258. const cuiDataList = this.state.contactList || [];
  2259. let departmentArr = this.state.departmentArr || [];
  2260. const options = this.state.states
  2261. ? dataSources.map(group => (
  2262. <Select.Option key={group.id} value={group.name}>
  2263. {group.name}
  2264. </Select.Option>
  2265. ))
  2266. : dataSources.map((group, index) => (
  2267. <Select.Option key={index} value={group.bname}>
  2268. {group.bname}
  2269. </Select.Option>
  2270. ));
  2271. return (
  2272. <div>
  2273. <Modal
  2274. maskClosable={false}
  2275. visible={this.state.visible}
  2276. onOk={this.handleOk}
  2277. onCancel={this.handleCancelclose}
  2278. width={!this.props.userDetaile ? "600px" : "900px"}
  2279. title={!this.props.userDetaile ? "创建订单" : ""}
  2280. footer=""
  2281. // width={1300}
  2282. className="admin-desc-content"
  2283. >
  2284. <Form
  2285. layout="horizontal"
  2286. onSubmit={this.handleSubmit}
  2287. // id="demand-form"
  2288. style={{ paddingBottom: "40px" }}
  2289. >
  2290. <Spin spinning={this.state.loading}>
  2291. <div className="clearfix">
  2292. {!this.props.userDetaile ? (
  2293. <div className="clearfix">
  2294. <div className="clearfix">
  2295. <FormItem {...formItemLayout} label="订单类型">
  2296. <Select
  2297. placeholder="请选择订单类型"
  2298. style={{ width: "200px" }}
  2299. value={this.state.orderType}
  2300. onChange={e => {
  2301. this.setState({ orderType: e });
  2302. }}
  2303. >
  2304. {orderTypes.map(function(item) {
  2305. return (
  2306. <Select.Option key={item.value}>
  2307. {item.key}
  2308. </Select.Option>
  2309. );
  2310. })}
  2311. </Select>
  2312. <span className="mandatory">*</span>
  2313. </FormItem>
  2314. </div>
  2315. <FormItem {...formItemLayout} label="客户所属类型">
  2316. <Select
  2317. placeholder="请选择客户所属类型"
  2318. style={{ width: "200px" }}
  2319. value={this.state.customType}
  2320. onChange={e => {
  2321. this.setState({ customType: e });
  2322. }}
  2323. >
  2324. {customerType.map(function(item) {
  2325. return (
  2326. <Select.Option key={item.value}>
  2327. {item.key}
  2328. </Select.Option>
  2329. );
  2330. })}
  2331. </Select>
  2332. </FormItem>
  2333. <div className="clearfix">
  2334. <FormItem {...formItemLayout} label="客户名称">
  2335. <AutoComplete
  2336. className="certain-category-search"
  2337. dropdownClassName="certain-category-search-dropdown"
  2338. dropdownMatchSelectWidth={false}
  2339. dropdownStyle={{ width: 200 }}
  2340. size="large"
  2341. style={{ width: "200px" }}
  2342. dataSource={options}
  2343. placeholder="输入名称"
  2344. value={this.state.customerName}
  2345. onChange={this.customerChange}
  2346. filterOption={true}
  2347. onSelect={this.selectAutoCUT}
  2348. >
  2349. <Input />
  2350. </AutoComplete>
  2351. <span className="mandatory">*</span>
  2352. </FormItem>
  2353. </div>
  2354. <div className="addSave" style={{ marginTop: "15px" }}>
  2355. <Button
  2356. className="cancel"
  2357. type="primary"
  2358. onClick={this.handleCancel}
  2359. style={{ marginLeft: "150px" }}
  2360. htmlType="submit"
  2361. >
  2362. 开单
  2363. </Button>
  2364. <Button
  2365. className="cancel"
  2366. type="ghost"
  2367. onClick={this.handleCancelclose}
  2368. style={{ marginLeft: "50px" }}
  2369. >
  2370. 取消
  2371. </Button>
  2372. </div>
  2373. </div>
  2374. ) : (
  2375. <Tabs
  2376. onChange={this.callback}
  2377. activeKey={this.state.activeKey}
  2378. >
  2379. <TabPane tab={"编辑订单"} key="1">
  2380. <div className="clearfix">
  2381. <div className="clearfix">
  2382. <FormItem
  2383. className="half-item"
  2384. {...formItemLayout}
  2385. label="合同编号"
  2386. >
  2387. {<span>{this.state.contractNo}</span>}
  2388. </FormItem>
  2389. <FormItem
  2390. className="half-item"
  2391. {...formItemLayout}
  2392. label="订单编号"
  2393. >
  2394. <span>{this.state.orderNo}</span>
  2395. </FormItem>
  2396. <FormItem
  2397. className="half-item"
  2398. {...formItemLayout}
  2399. label="流程状态"
  2400. >
  2401. <span>
  2402. {getProcessStatus(this.state.processStatus)}
  2403. </span>
  2404. </FormItem>
  2405. <FormItem
  2406. className="half-item"
  2407. {...formItemLayout}
  2408. label="结算状态"
  2409. >
  2410. <span>
  2411. {getLiquidationStatus(
  2412. this.state.liquidationStatus
  2413. )}
  2414. </span>
  2415. </FormItem>
  2416. {this.state.processStatus === 0 ? (
  2417. <div className="clearfix">
  2418. <FormItem
  2419. className="half-item"
  2420. {...formItemLayout}
  2421. label="特批立项"
  2422. >
  2423. <Select
  2424. placeholder="请选择客户所属类型"
  2425. style={{ width: "240px" }}
  2426. value={getApprovedState(
  2427. this.state.approval
  2428. )}
  2429. onChange={e => {
  2430. this.setState({ approval: e });
  2431. }}
  2432. >
  2433. {/* {tepi.map(function(item) {
  2434. // if(item.key == "特批通过" || item.key == "特批驳回")
  2435. return (
  2436. <Select.Option key={item.value}>
  2437. {item.key}
  2438. </Select.Option>
  2439. );
  2440. })} */}
  2441. <Select.Option key={0}>
  2442. 非特批
  2443. </Select.Option>
  2444. <Select.Option key={1}>特批</Select.Option>
  2445. </Select>
  2446. </FormItem>
  2447. <FormItem
  2448. className="half-item"
  2449. {...formItemLayout}
  2450. label="合同签订时间"
  2451. >
  2452. <DatePicker
  2453. style={{
  2454. marginTop: "2px",
  2455. // width: "240px",
  2456. height: "32px"
  2457. }}
  2458. showTime
  2459. format="YYYY-MM-DD"
  2460. onOk={() => {}}
  2461. value={
  2462. this.state.signDate
  2463. ? moment(this.state.signDate)
  2464. : null
  2465. }
  2466. onChange={(data, dataString) => {
  2467. this.setState({ signDate: dataString });
  2468. }}
  2469. />
  2470. <span
  2471. className="mandatory"
  2472. style={{ marginLeft: 20 }}
  2473. >
  2474. *
  2475. </span>
  2476. </FormItem>
  2477. <FormItem
  2478. className="half-item"
  2479. {...formItemLayout}
  2480. label="订单部门"
  2481. >
  2482. <Select
  2483. placeholder="请输入订单部门"
  2484. style={{ width: 240 }}
  2485. value={this.state.organizationSearch}
  2486. onChange={e => {
  2487. this.setState({ organizationSearch: e });
  2488. }}
  2489. >
  2490. {departmentArr.map(function(item) {
  2491. return (
  2492. <Select.Option key={item.id}>
  2493. {item.name}
  2494. </Select.Option>
  2495. );
  2496. })}
  2497. </Select>
  2498. </FormItem>
  2499. </div>
  2500. ) : (
  2501. <div className="clearfix">
  2502. <FormItem
  2503. className="half-item"
  2504. {...formItemLayout}
  2505. label="特批立项"
  2506. >
  2507. <span>
  2508. {getApprovedState(this.state.approval)}
  2509. </span>
  2510. </FormItem>
  2511. <FormItem
  2512. className="half-item"
  2513. {...formItemLayout}
  2514. label="合同签订时间"
  2515. >
  2516. <span>{this.state.signDate}</span>
  2517. </FormItem>
  2518. <FormItem
  2519. className="half-item"
  2520. {...formItemLayout}
  2521. label="订单部门"
  2522. >
  2523. <span>{this.state.depName}</span>
  2524. </FormItem>
  2525. <FormItem
  2526. className="half-item"
  2527. {...formItemLayout}
  2528. label="是否外包"
  2529. >
  2530. <span>{this.state.outsource == 0 ? "否" : "是"}</span>
  2531. </FormItem>
  2532. </div>
  2533. )}
  2534. </div>
  2535. <h3
  2536. style={{
  2537. marginLeft: 10,
  2538. fontWeight: 800,
  2539. marginBottom: 10
  2540. }}
  2541. >
  2542. 收款项目
  2543. </h3>
  2544. {this.state.processStatus === 0 ? (
  2545. <div className="clearfix">
  2546. <FormItem
  2547. className="half-item"
  2548. {...formItemLayout}
  2549. label="签单金额(万元)"
  2550. >
  2551. <Input
  2552. placeholder="签单金额"
  2553. ref="signTotalAmount"
  2554. value={this.state.totalAmount}
  2555. onChange={e => {
  2556. this.setState({
  2557. totalAmount: e.target.value
  2558. });
  2559. }}
  2560. style={{ width: "240px" }}
  2561. />
  2562. {/* <span className="mandatory">*</span> */}
  2563. </FormItem>
  2564. <FormItem
  2565. className="half-item"
  2566. {...formItemLayout}
  2567. label="首付金额(万元)"
  2568. >
  2569. <Input
  2570. placeholder="请输入实签首款金额"
  2571. ref="signFirstPayment"
  2572. value={this.state.firstAmount}
  2573. onChange={e => {
  2574. this.setState({
  2575. firstAmount: e.target.value
  2576. });
  2577. }}
  2578. style={{ width: "240px" }}
  2579. />
  2580. {/* <span className="mandatory">*</span> */}
  2581. </FormItem>
  2582. <FormItem
  2583. className="half-item"
  2584. {...formItemLayout}
  2585. label="已收款项"
  2586. >
  2587. <span>
  2588. {this.state.settlementAmount + "万元"}
  2589. </span>
  2590. {/* {this.state.settlementAmount ? (
  2591. <Button
  2592. type="primary"
  2593. onClick={this.tuikuan}
  2594. style={{
  2595. float: "right",
  2596. marginRight: "50px",
  2597. marginBottom: "15px"
  2598. }}
  2599. >
  2600. 退单
  2601. </Button>
  2602. ) : (
  2603. ""
  2604. )} */}
  2605. </FormItem>
  2606. </div>
  2607. ) : (
  2608. <div className="clearfix">
  2609. <FormItem
  2610. className="half-item"
  2611. {...formItemLayout}
  2612. label="签单金额(万元)"
  2613. >
  2614. <span>{this.state.totalAmount}</span>
  2615. </FormItem>
  2616. <FormItem
  2617. className="half-item"
  2618. {...formItemLayout}
  2619. label="首付金额(万元)"
  2620. >
  2621. <span>{this.state.firstAmount}</span>
  2622. </FormItem>
  2623. <FormItem
  2624. className="half-item"
  2625. {...formItemLayout}
  2626. label="已收款项"
  2627. >
  2628. <span>
  2629. {this.state.settlementAmount + "万元"}
  2630. </span>
  2631. {/* {this.state.settlementAmount ? (
  2632. <Button
  2633. type="primary"
  2634. onClick={this.tuikuan}
  2635. style={{
  2636. float: "right",
  2637. marginRight: "50px",
  2638. marginBottom: "15px"
  2639. }}
  2640. >
  2641. 退单
  2642. </Button>
  2643. ) : (
  2644. ""
  2645. )} */}
  2646. </FormItem>
  2647. </div>
  2648. )}
  2649. <h3
  2650. style={{
  2651. marginLeft: 10,
  2652. fontWeight: 800,
  2653. marginBottom: 10
  2654. }}
  2655. >
  2656. 联系信息
  2657. </h3>
  2658. {this.state.processStatus == 0 ? (
  2659. <div className="clearfix">
  2660. <div className="clearfix">
  2661. <FormItem
  2662. className="half-item"
  2663. {...formItemLayout}
  2664. label="客户名称"
  2665. >
  2666. <span>{this.state.userName}</span>
  2667. </FormItem>
  2668. </div>
  2669. <FormItem
  2670. className="half-item"
  2671. {...formItemLayout}
  2672. label="企业联系人"
  2673. >
  2674. <Input
  2675. placeholder="请输入联系人"
  2676. ref="signTotalAmount"
  2677. value={this.state.contacts}
  2678. onChange={e => {
  2679. this.setState({ contacts: e.target.value });
  2680. }}
  2681. style={{ width: "240px" }}
  2682. />
  2683. </FormItem>
  2684. <FormItem
  2685. className="half-item"
  2686. {...formItemLayout}
  2687. label="联系人电话"
  2688. >
  2689. <Input
  2690. placeholder="请输入联系人电话"
  2691. ref="signTotalAmount"
  2692. value={this.state.contactMobile}
  2693. onChange={e => {
  2694. this.setState({
  2695. contactMobile: e.target.value
  2696. });
  2697. }}
  2698. style={{ width: "240px" }}
  2699. />
  2700. </FormItem>
  2701. <FormItem
  2702. className="half-item"
  2703. {...formItemLayout}
  2704. label="企业法人"
  2705. >
  2706. <Input
  2707. placeholder="请输入法人"
  2708. ref="signTotalAmount"
  2709. value={this.state.legalPerson}
  2710. onChange={e => {
  2711. this.setState({
  2712. legalPerson: e.target.value
  2713. });
  2714. }}
  2715. style={{ width: "240px" }}
  2716. />
  2717. </FormItem>
  2718. <FormItem
  2719. className="half-item"
  2720. {...formItemLayout}
  2721. label="法人电话"
  2722. >
  2723. <Input
  2724. placeholder="请输入法人电话"
  2725. ref="signTotalAmount"
  2726. value={this.state.legalPersonTel}
  2727. onChange={e => {
  2728. this.setState({
  2729. legalPersonTel: e.target.value
  2730. });
  2731. }}
  2732. style={{ width: "240px" }}
  2733. />
  2734. </FormItem>
  2735. </div>
  2736. ) : (
  2737. <div className="clearfix">
  2738. {formItemList.map((data, index) => {
  2739. return (
  2740. <FormItem
  2741. className="half-item"
  2742. {...formItemLayout}
  2743. key={index}
  2744. label={data.label}
  2745. >
  2746. {data.content}
  2747. </FormItem>
  2748. );
  2749. })}
  2750. </div>
  2751. )}
  2752. <div className="clearfix">
  2753. {this.state.processStatus == 0 ? (
  2754. <FormItem
  2755. labelCol={{ span: 4 }}
  2756. wrapperCol={{ span: 18 }}
  2757. label={
  2758. <span>
  2759. <strong style={{ color: "#f00" }}>*</strong>
  2760. 合同扫描件
  2761. </span>
  2762. }
  2763. >
  2764. <PicturesWall
  2765. fileList={this.getOrgCodeUrl}
  2766. pictureUrl={this.state.orgCodeUrl}
  2767. url="/api/admin/order/uploadOrderImg"
  2768. sign=""
  2769. />
  2770. <p>图片建议:要清晰。</p>
  2771. <Button
  2772. style={{
  2773. float: "right",
  2774. marginRight: "140px",
  2775. marginTop: "20px"
  2776. }}
  2777. onClick={this.getOrderLog}
  2778. >
  2779. 查看订单日志
  2780. </Button>
  2781. </FormItem>
  2782. ) : (
  2783. <FormItem
  2784. labelCol={{ span: 4 }}
  2785. wrapperCol={{ span: 18 }}
  2786. label="合同扫描件"
  2787. >
  2788. <Upload
  2789. className="demandDetailShow-upload"
  2790. listType="picture-card"
  2791. fileList={this.state.orgCodeUrl}
  2792. onPreview={file => {
  2793. this.setState({
  2794. previewImage: file.url || file.thumbUrl,
  2795. previewVisible: true
  2796. });
  2797. }}
  2798. ></Upload>
  2799. <Modal
  2800. maskClosable={false}
  2801. footer={null}
  2802. visible={this.state.previewVisible}
  2803. onCancel={() => {
  2804. this.setState({ previewVisible: false });
  2805. }}
  2806. >
  2807. <img
  2808. alt=""
  2809. style={{ width: "100%" }}
  2810. src={this.state.previewImage || ""}
  2811. />
  2812. </Modal>
  2813. <Button
  2814. style={{
  2815. float: "right",
  2816. marginRight: "140px",
  2817. marginTop: "20px"
  2818. }}
  2819. onClick={this.getOrderLog}
  2820. >
  2821. 查看订单日志
  2822. </Button>
  2823. </FormItem>
  2824. )}
  2825. </div>
  2826. <div className="clearfix">
  2827. {this.state.processStatus == 0 ? (
  2828. <div className="clearfix">
  2829. <FormItem
  2830. labelCol={{ span: 4 }}
  2831. wrapperCol={{ span: 16 }}
  2832. label="订单留言"
  2833. >
  2834. <Input
  2835. type="textarea"
  2836. placeholder="请输入订单留言"
  2837. rows={4}
  2838. value={this.state.orderRemarks}
  2839. onChange={e => {
  2840. this.setState({
  2841. orderRemarks: e.target.value
  2842. });
  2843. }}
  2844. style={{ width: "95%" }}
  2845. />
  2846. <span className="mandatory">*</span>
  2847. </FormItem>
  2848. </div>
  2849. ) : (
  2850. <FormItem
  2851. labelCol={{ span: 4 }}
  2852. wrapperCol={{ span: 16 }}
  2853. label="订单留言"
  2854. >
  2855. <p
  2856. style={{ width: 500, wordWrap: "break-word" }}
  2857. >
  2858. {this.state.orderRemarks}
  2859. </p>
  2860. </FormItem>
  2861. )}
  2862. </div>
  2863. <div className="clearfix">
  2864. <FormItem
  2865. className="half-item"
  2866. {...formItemLayout}
  2867. label="订单负责人"
  2868. >
  2869. <span>{this.state.salesmanName}</span>
  2870. </FormItem>
  2871. <FormItem
  2872. className="half-item"
  2873. {...formItemLayout}
  2874. label="订单负责人电话"
  2875. >
  2876. <span>{this.state.salesmanMobile}</span>
  2877. </FormItem>
  2878. </div>
  2879. <div className="clearfix">
  2880. <FormItem
  2881. className="half-item"
  2882. {...formItemLayout}
  2883. label="当前财务负责人"
  2884. >
  2885. <span>{this.state.nowFinance}</span>
  2886. </FormItem>
  2887. <FormItem
  2888. className="half-item"
  2889. {...formItemLayout}
  2890. label="当前财务负责人电话"
  2891. >
  2892. <span>{this.state.nowFinanceMobile}</span>
  2893. </FormItem>
  2894. </div>
  2895. <div className="clearfix">
  2896. <FormItem
  2897. className="half-item"
  2898. {...formItemLayout}
  2899. style={{ opacity: ".5" }}
  2900. label="原订单负责人"
  2901. >
  2902. <span>{this.state.oldSalesmanName}</span>
  2903. </FormItem>
  2904. <FormItem
  2905. className="half-item"
  2906. {...formItemLayout}
  2907. style={{ opacity: ".5" }}
  2908. label="原订单负责人电话"
  2909. >
  2910. <span>{this.state.oldSalesmanMobile}</span>
  2911. </FormItem>
  2912. </div>
  2913. <div className="clearfix">
  2914. <FormItem
  2915. className="half-item"
  2916. style={{ opacity: ".5" }}
  2917. {...formItemLayout}
  2918. label="实际财务操作人"
  2919. >
  2920. <span>{this.state.financeName}</span>
  2921. </FormItem>
  2922. <FormItem
  2923. className="half-item"
  2924. {...formItemLayout}
  2925. style={{ opacity: ".5" }}
  2926. label="实际财务操作人电话"
  2927. >
  2928. <span>{this.state.financeMobile}</span>
  2929. </FormItem>
  2930. </div>
  2931. <div>
  2932. <span
  2933. style={{ marginLeft: "50px", fontSize: "20px" }}
  2934. >
  2935. 项目业务
  2936. </span>
  2937. {this.state.processStatus == 0 ? (
  2938. <Button
  2939. type="primary"
  2940. onClick={this.addDetailed}
  2941. style={{
  2942. float: "right",
  2943. marginRight: "50px",
  2944. marginBottom: "15px"
  2945. }}
  2946. >
  2947. 添加项目明细
  2948. </Button>
  2949. ) : (
  2950. ""
  2951. )}
  2952. </div>
  2953. <div
  2954. className="patent-table"
  2955. style={{ marginBottom: 10 }}
  2956. >
  2957. <Spin spinning={this.state.loading}>
  2958. <Table
  2959. columns={this.state.columns}
  2960. dataSource={this.state.dataSource}
  2961. pagination={this.state.pagination}
  2962. onRowClick={this.tableRowClick}
  2963. bordered
  2964. size="small"
  2965. />
  2966. </Spin>
  2967. </div>
  2968. <div
  2969. style={{
  2970. display: cuiDataList.length ? "block" : "none"
  2971. }}
  2972. >
  2973. <span
  2974. style={{ marginLeft: "50px", fontSize: "20px" }}
  2975. >
  2976. 旧催款节点
  2977. </span>
  2978. <Button
  2979. type="primary"
  2980. // onClick={this.addcontact}
  2981. disabled
  2982. onClick={e => {
  2983. cuiDataList.length
  2984. ? this.addcontact()
  2985. : this.addcontactNew();
  2986. }}
  2987. style={{
  2988. float: "right",
  2989. marginRight: "50px",
  2990. marginBottom: "15px",
  2991. display:
  2992. this.state.processStatus == 0
  2993. ? "block"
  2994. : "none"
  2995. }}
  2996. >
  2997. 添加催款节点
  2998. </Button>
  2999. </div>
  3000. <div
  3001. className="clearfix"
  3002. style={{
  3003. display: cuiDataList.length ? "block" : "none"
  3004. }}
  3005. >
  3006. <Spin spinning={this.state.loading}>
  3007. <Form layout="horizontal">
  3008. <Table
  3009. pagination={false}
  3010. columns={this.state.ContactsLists}
  3011. dataSource={this.state.contactList}
  3012. scroll={{ x: "max-content", y: 0 }}
  3013. bordered
  3014. size="small"
  3015. />
  3016. <Col
  3017. span={24}
  3018. offset={9}
  3019. style={{ marginTop: "15px" }}
  3020. ></Col>
  3021. </Form>
  3022. </Spin>
  3023. </div>
  3024. <div
  3025. style={{
  3026. display: cuiDataList.length ? "none" : "block"
  3027. }}
  3028. >
  3029. <span
  3030. style={{
  3031. marginLeft: "50px",
  3032. fontSize: "20px"
  3033. }}
  3034. >
  3035. 新催款节点
  3036. </span>
  3037. <span style={{ display: "inline-block", marginLeft: 10, color: "red" }}>金额总计(万元): {this.state.totalCui}</span>
  3038. <Button
  3039. type="primary"
  3040. disabled={this.state.addFlag ? true : false}
  3041. // onClick={this.addcontact}
  3042. onClick={e => {
  3043. this.setState({ addFlag: true });
  3044. this.addcontactNew();
  3045. }}
  3046. style={{
  3047. float: "right",
  3048. marginRight: "50px",
  3049. marginBottom: "15px",
  3050. display:
  3051. this.state.processStatus == 0
  3052. ? "block"
  3053. : "none"
  3054. }}
  3055. >
  3056. 添加催款节点
  3057. </Button>
  3058. </div>
  3059. <div
  3060. className="clearfix"
  3061. style={{
  3062. display: cuiDataList.length ? "none" : "block"
  3063. }}
  3064. >
  3065. <Spin spinning={this.state.loading}>
  3066. <Form layout="horizontal">
  3067. <Table
  3068. pagination={false}
  3069. columns={this.state.ContactsListsNew}
  3070. dataSource={this.state.contactListNew}
  3071. scroll={{ x: "max-content", y: 0 }}
  3072. bordered
  3073. size="small"
  3074. />
  3075. <Col
  3076. span={24}
  3077. offset={9}
  3078. style={{ marginTop: "15px" }}
  3079. ></Col>
  3080. </Form>
  3081. </Spin>
  3082. </div>
  3083. {this.state.processStatus == 0 ? (
  3084. <div
  3085. className="addSave"
  3086. style={{ marginTop: "15px" }}
  3087. >
  3088. <Button
  3089. className="cancel"
  3090. type="primary"
  3091. onClick={this.handleCancels}
  3092. style={{ marginLeft: "200px" }}
  3093. htmlType="submit"
  3094. >
  3095. 签单
  3096. </Button>
  3097. <Button
  3098. className="cancel"
  3099. type="primary"
  3100. onClick={this.handleCancelq}
  3101. style={{ marginLeft: "50px" }}
  3102. htmlType="submit"
  3103. >
  3104. 保存
  3105. </Button>
  3106. <Button
  3107. className="cancel"
  3108. type="ghost"
  3109. onClick={this.handleCancelclose}
  3110. style={{ marginLeft: "50px" }}
  3111. >
  3112. 取消
  3113. </Button>
  3114. </div>
  3115. ) : (
  3116. ""
  3117. )}
  3118. </div>
  3119. </TabPane>
  3120. <TabPane tab="合同变更记录" key="2">
  3121. {
  3122. <div>
  3123. <div className="clearfix">
  3124. <FormItem
  3125. className="half-item"
  3126. {...formItemLayout}
  3127. label="客户名称"
  3128. >
  3129. <span>{this.state.userName}</span>
  3130. </FormItem>
  3131. </div>
  3132. <div className="clearfix">
  3133. <FormItem
  3134. className="half-item"
  3135. {...formItemLayout}
  3136. label="合同编号"
  3137. >
  3138. <span>{this.state.contractNo}</span>
  3139. </FormItem>
  3140. </div>
  3141. <div className="clearfix">
  3142. <FormItem
  3143. className="half-item"
  3144. {...formItemLayout}
  3145. label="申请变更部门"
  3146. >
  3147. {!this.state.mark ? (
  3148. <Select
  3149. placeholder="请输入变更部门"
  3150. style={{ width: 240 }}
  3151. value={this.state.depName}
  3152. onChange={e => {
  3153. this.setState({ depName: e });
  3154. // console.log("5454", e);
  3155. }}
  3156. >
  3157. {departmentArr.map(function(item) {
  3158. return (
  3159. <Select.Option
  3160. key={item.id}
  3161. value={item.name}
  3162. >
  3163. {item.name}
  3164. </Select.Option>
  3165. );
  3166. })}
  3167. </Select>
  3168. ) : (
  3169. <span>{contractData.depName}</span>
  3170. )}
  3171. </FormItem>
  3172. <FormItem
  3173. className="half-item"
  3174. {...formItemLayout}
  3175. label="申请人"
  3176. >
  3177. {!this.state.mark ? (
  3178. <Input
  3179. placeholder="请输入申请人"
  3180. ref="signTotalAmount"
  3181. value={this.state.salesmanName}
  3182. onChange={e => {
  3183. this.setState({
  3184. salesmanName: e.target.value
  3185. });
  3186. }}
  3187. style={{ width: "240px" }}
  3188. />
  3189. ) : (
  3190. <span>{contractData.applicant}</span>
  3191. )}
  3192. </FormItem>
  3193. </div>
  3194. <div className="clearfix">
  3195. <FormItem
  3196. labelCol={{ span: 4 }}
  3197. wrapperCol={{ span: 18 }}
  3198. label="变更类型"
  3199. >
  3200. {!this.state.mark ? (
  3201. <Select
  3202. placeholder="选择合同变更类型"
  3203. style={{ width: 200 }}
  3204. onChange={e => {
  3205. this.setState({
  3206. typeChange: e
  3207. });
  3208. }}
  3209. value={this.state.typeChange}
  3210. >
  3211. <Option value={0}>退单退款</Option>
  3212. <Option value={1}>项目及金额变更</Option>
  3213. <Option value={2}>仅项目变更</Option>
  3214. <Option value={3}>仅金额变更</Option>
  3215. <Option value={4}>重报</Option>
  3216. <Option value={5}>赠送</Option>
  3217. </Select>
  3218. ) : (
  3219. <span>
  3220. {getChangeType(contractData.type)}
  3221. </span>
  3222. )}
  3223. </FormItem>
  3224. </div>
  3225. <div className="clearfix">
  3226. <FormItem
  3227. labelCol={{ span: 4 }}
  3228. wrapperCol={{ span: 18 }}
  3229. label="合同额(万元)"
  3230. >
  3231. {!this.state.mark ? (
  3232. <Input
  3233. placeholder="请输入合同额"
  3234. ref="signTotalAmount"
  3235. value={this.state.totalAmount}
  3236. onChange={e => {
  3237. this.setState({
  3238. totalAmount: e.target.value
  3239. });
  3240. }}
  3241. style={{ width: "240px" }}
  3242. />
  3243. ) : (
  3244. <span>{contractData.totalAmount}</span>
  3245. )}
  3246. </FormItem>
  3247. <FormItem
  3248. labelCol={{ span: 4 }}
  3249. wrapperCol={{ span: 18 }}
  3250. label="已收款(万元)"
  3251. >
  3252. {!this.state.mark ? (
  3253. <Input
  3254. placeholder="请输入已收款"
  3255. ref="signTotalAmount"
  3256. value={this.state.settlementAmount}
  3257. onChange={e => {
  3258. this.setState({
  3259. settlementAmount: e.target.value
  3260. });
  3261. }}
  3262. style={{ width: "240px" }}
  3263. />
  3264. ) : (
  3265. <span>{contractData.settlementAmount}</span>
  3266. )}
  3267. </FormItem>
  3268. <FormItem
  3269. labelCol={{ span: 4 }}
  3270. wrapperCol={{ span: 18 }}
  3271. label="申请退款(万元)"
  3272. >
  3273. {!this.state.mark ? (
  3274. <Input
  3275. placeholder="请输入申请退款"
  3276. ref="signTotalAmount"
  3277. value={this.state.changeAmount}
  3278. onChange={e => {
  3279. this.setState({
  3280. changeAmount: e.target.value
  3281. });
  3282. }}
  3283. style={{ width: "240px" }}
  3284. />
  3285. ) : (
  3286. <span>{contractData.changeAmount}</span>
  3287. )}
  3288. </FormItem>
  3289. </div>
  3290. <div className="clearfix">
  3291. <FormItem
  3292. style={{ height: "auto" }}
  3293. labelCol={{ span: 4 }}
  3294. wrapperCol={{ span: 18 }}
  3295. label="变更原因"
  3296. >
  3297. {!this.state.mark ? (
  3298. <TextArea
  3299. rows={4}
  3300. placeholder="请输入变更原因"
  3301. ref="signTotalAmount"
  3302. style={{ width: "95%" }}
  3303. value={this.state.remarksC}
  3304. onChange={e => {
  3305. this.setState({
  3306. remarksC: e.target.value
  3307. });
  3308. }}
  3309. />
  3310. ) : (
  3311. <span>{contractData.remarks}</span>
  3312. )}
  3313. </FormItem>
  3314. </div>
  3315. {/*----- */}
  3316. <div className="clearfix">
  3317. <FormItem
  3318. style={{ height: "auto" }}
  3319. labelCol={{ span: 4 }}
  3320. wrapperCol={{ span: 18 }}
  3321. label="备注"
  3322. >
  3323. {!this.state.mark ? (
  3324. <TextArea
  3325. rows={4}
  3326. placeholder="请输入备注"
  3327. ref="signTotalAmount"
  3328. style={{ width: "95%" }}
  3329. value={this.state.startRemarks}
  3330. onChange={e => {
  3331. this.setState({
  3332. startRemarks: e.target.value
  3333. });
  3334. }}
  3335. />
  3336. ) : (
  3337. <span>{contractData.startRemarks}</span>
  3338. )}
  3339. </FormItem>
  3340. </div>
  3341. {/* ---- */}
  3342. <div className="clearfix">
  3343. <FormItem
  3344. labelCol={{ span: 4 }}
  3345. wrapperCol={{ span: 18 }}
  3346. label="变更凭证"
  3347. >
  3348. {!this.state.mark ? (
  3349. <PicturesWall
  3350. fileList={this.getVoucherUrl}
  3351. pictureUrl={this.state.voucherUrl}
  3352. url="/api/admin/orderChange/uploadFile"
  3353. sign="order_change_file"
  3354. />
  3355. ) : (
  3356. <div>
  3357. <Upload
  3358. className="demandDetailShow-upload"
  3359. listType="picture-card"
  3360. fileList={this.state.voucherUrl}
  3361. onPreview={file => {
  3362. this.setState({
  3363. previewImage:
  3364. file.url || file.thumbUrl,
  3365. previewVisible: true
  3366. });
  3367. }}
  3368. />
  3369. <Modal
  3370. maskClosable={false}
  3371. footer={null}
  3372. visible={this.state.previewVisible}
  3373. onCancel={() => {
  3374. this.setState({
  3375. previewVisible: false
  3376. });
  3377. }}
  3378. >
  3379. <img
  3380. alt=""
  3381. style={{ width: "100%" }}
  3382. src={this.state.previewImage || ""}
  3383. />
  3384. </Modal>
  3385. </div>
  3386. )}
  3387. <p>图片建议:要清晰。</p>
  3388. </FormItem>
  3389. </div>
  3390. {!this.state.mark ? (
  3391. <div className="clearfix">
  3392. <Button
  3393. type="primary"
  3394. style={{ float: "right", marginRight: 40 }}
  3395. onClick={this.changeApply}
  3396. >
  3397. 发起变更申请
  3398. </Button>
  3399. </div>
  3400. ) : (
  3401. ""
  3402. )}
  3403. </div>
  3404. }
  3405. </TabPane>
  3406. </Tabs>
  3407. )}
  3408. </div>
  3409. </Spin>
  3410. </Form>
  3411. </Modal>
  3412. <Modal
  3413. maskClosable={false}
  3414. visible={this.state.addnextVisible}
  3415. onOk={this.nextCancel}
  3416. onCancel={this.nextCancel}
  3417. width="800px"
  3418. title={this.state.addState ? "添加项目任务" : "项目任务详情"}
  3419. footer=""
  3420. className="admin-desc-content"
  3421. >
  3422. <Form
  3423. layout="horizontal"
  3424. onSubmit={this.nextSubmit}
  3425. // id="demand-form"
  3426. >
  3427. <Spin spinning={this.state.loading}>
  3428. {this.state.addState ? (
  3429. <div className="clearfix">
  3430. <FormItem
  3431. className="half-item"
  3432. {...formItemLayout}
  3433. label="服务名称"
  3434. >
  3435. <AutoComplete
  3436. className="certain-category-search"
  3437. dropdownClassName="certain-category-search-dropdown"
  3438. dropdownMatchSelectWidth={false}
  3439. dropdownStyle={{ width: 200 }}
  3440. style={{ width: "200px" }}
  3441. dataSource={options}
  3442. placeholder="输入服务名称"
  3443. value={this.state.commodityName}
  3444. onChange={this.httpChange}
  3445. filterOption={true}
  3446. onSelect={this.selectAuto}
  3447. >
  3448. <Input />
  3449. </AutoComplete>
  3450. <span className="mandatory">*</span>
  3451. </FormItem>
  3452. <FormItem
  3453. className="half-item"
  3454. {...formItemLayout}
  3455. label="服务数量"
  3456. >
  3457. <Input
  3458. placeholder="请输入服务数量"
  3459. value={this.state.commodityQuantity}
  3460. style={{ width: "200px" }}
  3461. onChange={e => {
  3462. this.setState({ commodityQuantity: e.target.value });
  3463. }}
  3464. ref="commodityQuantity"
  3465. />
  3466. <span className="mandatory">*</span>
  3467. </FormItem>
  3468. <FormItem
  3469. className="half-item"
  3470. {...formItemLayout}
  3471. label="实签价格(万元)"
  3472. >
  3473. <Input
  3474. placeholder="请输入实签价格"
  3475. value={this.state.commodityPrice}
  3476. style={{ width: "200px" }}
  3477. onChange={e => {
  3478. this.setState({ commodityPrice: e.target.value });
  3479. }}
  3480. ref="commodityPrice"
  3481. />
  3482. <span className="mandatory">*</span>
  3483. </FormItem>
  3484. <FormItem
  3485. className="half-item"
  3486. {...formItemLayout}
  3487. label="主要业务"
  3488. >
  3489. <Select
  3490. placeholder="选择是否为主要业务"
  3491. style={{ width: "200px" }}
  3492. value={this.state.main}
  3493. onChange={e => {
  3494. this.setState({ main: e });
  3495. }}
  3496. >
  3497. {boutique.map(function(item) {
  3498. return (
  3499. <Select.Option key={item.value}>
  3500. {item.key}
  3501. </Select.Option>
  3502. );
  3503. })}
  3504. </Select>
  3505. <span className="mandatory">*</span>
  3506. </FormItem>
  3507. <div className="clearfix">
  3508. <FormItem
  3509. labelCol={{ span: 4 }}
  3510. wrapperCol={{ span: 16 }}
  3511. label="服务说明"
  3512. >
  3513. <Input
  3514. type="textarea"
  3515. placeholder="请输入服务说明"
  3516. value={this.state.taskComment}
  3517. onChange={e => {
  3518. this.setState({ taskComment: e.target.value });
  3519. }}
  3520. />
  3521. </FormItem>
  3522. </div>
  3523. <FormItem
  3524. wrapperCol={{ span: 12, offset: 4 }}
  3525. className="half-middle"
  3526. >
  3527. <Button
  3528. className="submitSave"
  3529. type="primary"
  3530. htmlType="submit"
  3531. >
  3532. 保存
  3533. </Button>
  3534. <Button
  3535. className="submitSave"
  3536. type="ghost"
  3537. onClick={this.nextCancel}
  3538. >
  3539. 取消
  3540. </Button>
  3541. </FormItem>
  3542. </div>
  3543. ) : (
  3544. <div className="clearfix">
  3545. {this.state.processStatus == 0 ? (
  3546. <div className="clearfix">
  3547. <FormItem
  3548. className="half-item"
  3549. {...formItemLayout}
  3550. label="项目名称"
  3551. >
  3552. <span>{this.state.commodityName}</span>
  3553. </FormItem>
  3554. <FormItem
  3555. className="half-item"
  3556. {...formItemLayout}
  3557. label="项目数量"
  3558. >
  3559. <Input
  3560. placeholder="请输入数量"
  3561. value={this.state.commodityQuantity}
  3562. style={{ width: "200px" }}
  3563. onChange={e => {
  3564. this.setState({
  3565. commodityQuantity: e.target.value
  3566. });
  3567. }}
  3568. />
  3569. <span className="mandatory">*</span>
  3570. </FormItem>
  3571. <FormItem
  3572. className="half-item"
  3573. {...formItemLayout}
  3574. label="金额(万元)"
  3575. >
  3576. <Input
  3577. placeholder="请输入签单金额"
  3578. value={this.state.commodityPrice}
  3579. style={{ width: "200px" }}
  3580. onChange={e => {
  3581. this.setState({ commodityPrice: e.target.value });
  3582. }}
  3583. />
  3584. <span className="mandatory">*</span>
  3585. </FormItem>
  3586. <FormItem
  3587. className="half-item"
  3588. {...formItemLayout}
  3589. label="主要项目"
  3590. >
  3591. <Select
  3592. placeholder="选择是否为主要业务"
  3593. style={{ width: "200px" }}
  3594. value={this.state.main}
  3595. onChange={e => {
  3596. this.setState({ main: e });
  3597. }}
  3598. >
  3599. {boutique.map(function(item) {
  3600. return (
  3601. <Select.Option key={item.value}>
  3602. {item.key}
  3603. </Select.Option>
  3604. );
  3605. })}
  3606. </Select>
  3607. <span className="mandatory">*</span>
  3608. </FormItem>
  3609. <div className="clearfix">
  3610. <FormItem
  3611. labelCol={{ span: 4 }}
  3612. wrapperCol={{ span: 16 }}
  3613. label="服务说明"
  3614. >
  3615. <Input
  3616. type="textarea"
  3617. placeholder="请输入服务说明"
  3618. value={this.state.taskComment}
  3619. onChange={e => {
  3620. this.setState({ taskComment: e.target.value });
  3621. }}
  3622. />
  3623. </FormItem>
  3624. </div>
  3625. <FormItem
  3626. wrapperCol={{ span: 12, offset: 4 }}
  3627. className="half-middle"
  3628. >
  3629. <Button
  3630. className="submitSave"
  3631. type="primary"
  3632. onClick={this.tabRowSave}
  3633. >
  3634. 保存
  3635. </Button>
  3636. <Button
  3637. className="submitSave"
  3638. type="ghost"
  3639. onClick={this.nextCancel}
  3640. >
  3641. 取消
  3642. </Button>
  3643. </FormItem>
  3644. </div>
  3645. ) : (
  3646. <div className="clearfix">
  3647. <FormItem
  3648. className="half-item"
  3649. {...formItemLayout}
  3650. label="项目名称"
  3651. >
  3652. <span>{this.state.commodityName}</span>
  3653. </FormItem>
  3654. <FormItem
  3655. className="half-item"
  3656. {...formItemLayout}
  3657. label="项目数量"
  3658. >
  3659. <span>{this.state.commodityQuantity}</span>
  3660. </FormItem>
  3661. <FormItem
  3662. className="half-item"
  3663. {...formItemLayout}
  3664. label="金额(万元)"
  3665. >
  3666. <span>{this.state.commodityPrice}</span>
  3667. </FormItem>
  3668. <FormItem
  3669. className="half-item"
  3670. {...formItemLayout}
  3671. label="主要项目"
  3672. >
  3673. <span>{getboutique(this.state.main)}</span>
  3674. </FormItem>
  3675. <div className="clearfix">
  3676. <FormItem
  3677. labelCol={{ span: 4 }}
  3678. wrapperCol={{ span: 16 }}
  3679. label="服务说明"
  3680. >
  3681. <span>{this.state.taskComment}</span>
  3682. </FormItem>
  3683. </div>
  3684. </div>
  3685. )}
  3686. </div>
  3687. )}
  3688. </Spin>
  3689. </Form>
  3690. </Modal>
  3691. <Modal
  3692. maskClosable={false}
  3693. visible={this.state.lookVisible}
  3694. onOk={this.noCancel}
  3695. onCancel={this.noCancel}
  3696. width="800px"
  3697. title={"退单申请"}
  3698. footer=""
  3699. className="admin-desc-content"
  3700. >
  3701. <Form layout="horizontal">
  3702. <Spin spinning={this.state.loading}>
  3703. <div className="clearfix">
  3704. <FormItem
  3705. labelCol={{ span: 4 }}
  3706. wrapperCol={{ span: 16 }}
  3707. label="终止合同"
  3708. >
  3709. <Picture
  3710. fileList={e => {
  3711. this.setState({ contractUrl: e });
  3712. }}
  3713. pictureUrl={this.state.contractUrl}
  3714. visible={this.props.visible}
  3715. data={{
  3716. sign: "order_refund_file",
  3717. url: "/api/admin/newOrder/uploadRefundOrderFile",
  3718. number: 8
  3719. }}
  3720. />
  3721. </FormItem>
  3722. </div>
  3723. <div className="clearfix">
  3724. <FormItem
  3725. labelCol={{ span: 4 }}
  3726. wrapperCol={{ span: 16 }}
  3727. label="退单申请表"
  3728. >
  3729. <Picture
  3730. fileList={e => {
  3731. this.setState({ applicationUrl: e });
  3732. }}
  3733. pictureUrl={this.state.applicationUrl}
  3734. visible={this.props.visible}
  3735. data={{
  3736. sign: "order_refund_file",
  3737. url: "/api/admin/newOrder/uploadRefundOrderFile",
  3738. number: 8
  3739. }}
  3740. />
  3741. </FormItem>
  3742. </div>
  3743. <div className="clearfix">
  3744. <FormItem
  3745. labelCol={{ span: 4 }}
  3746. wrapperCol={{ span: 16 }}
  3747. label="退单理由"
  3748. >
  3749. <Input
  3750. type="textarea"
  3751. placeholder="请输入退单理由"
  3752. rows={4}
  3753. value={this.state.reason}
  3754. onChange={e => {
  3755. this.setState({ reason: e.target.value });
  3756. }}
  3757. />
  3758. </FormItem>
  3759. </div>
  3760. <div className="clearfix">
  3761. <Button
  3762. className="cancel"
  3763. type="primary"
  3764. onClick={this.tuidanOk}
  3765. style={{ marginLeft: "50px" }}
  3766. htmlType="submit"
  3767. >
  3768. 确定退单
  3769. </Button>
  3770. <Button
  3771. className="cancel"
  3772. type="ghost"
  3773. onClick={this.noCancel}
  3774. style={{ marginLeft: "50px" }}
  3775. >
  3776. 取消
  3777. </Button>
  3778. </div>
  3779. </Spin>
  3780. </Form>
  3781. </Modal>
  3782. {/* <Modal
  3783. visible={this.state.rizhivisible}
  3784. className="admin-desc-content"
  3785. width="800px"
  3786. maskClosable={false}
  3787. title="订单日志"
  3788. footer={null}
  3789. onCancel={this.closeOrderLog}
  3790. >
  3791. <div className="patent-table">
  3792. <Spin spinning={this.state.loading}>
  3793. <Table
  3794. columns={this.state.columnsrizhi}
  3795. dataSource={this.state.dataSourcerizhi}
  3796. pagination={false}
  3797. />
  3798. </Spin>
  3799. </div>
  3800. </Modal> */}
  3801. <OrderRiZi
  3802. dataSourcerizhi={this.state.dataSourcerizhi}
  3803. closeOrderLog={this.closeOrderLog}
  3804. visible={this.state.rizhivisible}
  3805. loading={this.state.loading}
  3806. />
  3807. </div>
  3808. );
  3809. }
  3810. })
  3811. );
  3812. export default Form.create()(NewService);