addorders.js 98 KB

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