addorders.js 105 KB

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