addService.jsx 117 KB

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