reject.jsx 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511
  1. import React from 'react';
  2. import { Icon, Button, AutoComplete,Input, Select, Spin, Popconfirm, Table, message,DatePicker, Upload, Form ,Modal,Col} from 'antd';
  3. import $ from 'jquery/src/ajax';
  4. import moment from 'moment';
  5. import {boutique ,tepi,jiedian} from '@/dataDic.js';
  6. import {
  7. getLiquidationStatus,
  8. getProcessStatus,
  9. splitUrl,
  10. getCuikuan,
  11. moneyVerify,
  12. ShowModal
  13. } from "@/tools.js";
  14. import './customer.less';
  15. import ShowModalDiv from "@/showModal.jsx"
  16. import OrderRiZi from "@/orderRiZi.jsx";
  17. import { cuiJieDian } from "@/dataDic.js";
  18. //图片组件
  19. const PicturesWall = React.createClass({
  20. getInitialState() {
  21. return {
  22. previewVisible: false,
  23. previewImage: '',
  24. fileList: [],
  25. }
  26. },
  27. handleCancel() {
  28. this.setState({
  29. previewVisible: false
  30. })
  31. },
  32. handlePreview(file) {
  33. this.setState({
  34. previewImage: file.url || file.thumbUrl,
  35. previewVisible: true,
  36. });
  37. },
  38. handleChange(info) {
  39. let fileList = info.fileList;
  40. this.setState({
  41. fileList
  42. });
  43. this.props.fileList(fileList);
  44. },
  45. componentWillReceiveProps(nextProps) {
  46. this.state.fileList = nextProps.pictureUrl;
  47. this.state.pojectApplicationUrl = undefined;
  48. },
  49. render() {
  50. const {
  51. previewVisible,
  52. previewImage,
  53. fileList
  54. } = this.state;
  55. const uploadButton = (
  56. <div>
  57. <Icon type="plus" />
  58. <div className="ant-upload-text">点击上传</div>
  59. </div>
  60. );
  61. return(
  62. <div style={{display:"inline-block"}}>
  63. <Upload
  64. action={globalConfig.context + "/api/admin/customer/uploadCustomerImg"}
  65. data={{ 'sign': '' }}
  66. listType="picture-card"
  67. fileList={fileList}
  68. onPreview={this.handlePreview}
  69. onChange={this.handleChange} >
  70. {fileList.length >= 18 ? null : uploadButton}
  71. </Upload>
  72. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  73. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  74. </Modal>
  75. </div>
  76. );
  77. }
  78. });
  79. const IntentionCustomer = Form.create()(
  80. React.createClass({
  81. loadData(pageNo) {
  82. this.setState({
  83. visitModul: false,
  84. loading: true,
  85. ispage: pageNo,
  86. modalVisible: false
  87. });
  88. $.ajax({
  89. method: "get",
  90. dataType: "json",
  91. crossDomain: false,
  92. url: globalConfig.context + "/api/admin/newOrder/orderNewList",
  93. data: {
  94. pageNo: pageNo || 1,
  95. pageSize: this.state.pagination.pageSize,
  96. specially: 2, //审核列表
  97. name: this.state.customerName, //名称
  98. orderNo: this.state.orderNoSearch, //订单编号
  99. starTime: this.state.releaseDate[0], //开始时间
  100. endTime: this.state.releaseDate[1] //结束时间
  101. },
  102. success: function(data) {
  103. ShowModal(this);
  104. let theArr = [];
  105. if (data.error.length || data.data.list == "") {
  106. if (data.error && data.error.length) {
  107. message.warning(data.error[0].message);
  108. }
  109. } else {
  110. for (let i = 0; i < data.data.list.length; i++) {
  111. let thisdata = data.data.list[i];
  112. theArr.push({
  113. key: i,
  114. id: thisdata.id, //用户ID
  115. orderNo: thisdata.orderNo, //订单编号
  116. totalAmount: thisdata.totalAmount + "", //签单金额
  117. processStatus: thisdata.processStatus, //流程状态
  118. liquidationStatus: thisdata.liquidationStatus, //结算状态
  119. approval: thisdata.approval, //特批状态
  120. signDate: thisdata.signDate, //签单时间
  121. userName: thisdata.userName, //客户名称
  122. salesmanName: thisdata.salesmanName, //营销员名称
  123. financeName: thisdata.financeName, //财务名称
  124. createDate: thisdata.createDate, //下单时间
  125. initiateName: thisdata.initiateName, //驳回人
  126. reason: thisdata.reason, //驳回信息
  127. backDate: thisdata.backDate, //驳回日期
  128. backId: thisdata.backId //驳回编号
  129. });
  130. }
  131. this.state.pagination.total = data.data.totalCount;
  132. this.state.pagination.current = data.data.pageNo;
  133. }
  134. if (data.data && data.data.list && !data.data.list.length) {
  135. this.state.pagination.total = 0;
  136. }
  137. this.setState({
  138. dataSource: theArr,
  139. pageNo: pageNo,
  140. pagination: this.state.pagination,
  141. selectedRowKeys: []
  142. });
  143. }.bind(this)
  144. }).always(
  145. function() {
  146. this.setState({
  147. loading: false
  148. });
  149. }.bind(this)
  150. );
  151. },
  152. getInitialState() {
  153. return {
  154. page: 1,
  155. releaseDate: [],
  156. selectedRowKeys: [],
  157. orgCodeUrl: [],
  158. customerArr: [],
  159. pagination: {
  160. defaultCurrent: 1,
  161. defaultPageSize: 10,
  162. showQuickJumper: true,
  163. pageSize: 10,
  164. onChange: function(page) {
  165. this.loadData(page);
  166. }.bind(this),
  167. showTotal: function(total) {
  168. return "共" + total + "条数据";
  169. }
  170. },
  171. columns: [
  172. {
  173. title: "驳回编号",
  174. dataIndex: "backId",
  175. key: "backId"
  176. },
  177. {
  178. title: "驳回日期",
  179. dataIndex: "backDate",
  180. key: "backDate"
  181. },
  182. {
  183. title: "下单时间",
  184. dataIndex: "createDate",
  185. key: "createDate"
  186. },
  187. {
  188. title: "订单编号",
  189. dataIndex: "orderNo",
  190. key: "orderNo"
  191. },
  192. {
  193. title: "客户名称",
  194. dataIndex: "userName",
  195. key: "userName",
  196. render: text => {
  197. return text && text.length > 9 ? text.substr(0, 9) + "..." : text;
  198. }
  199. },
  200. {
  201. title: "驳回人",
  202. dataIndex: "initiateName",
  203. key: "initiateName"
  204. },
  205. {
  206. title: "驳回原因",
  207. dataIndex: "reason",
  208. key: "reason",
  209. render: text => {
  210. return text && text.length > 24
  211. ? text.substr(0, 24) + "..."
  212. : text;
  213. }
  214. }
  215. ],
  216. columnsrizhi: [
  217. {
  218. title: "流程",
  219. dataIndex: "processName",
  220. key: "processName"
  221. },
  222. {
  223. title: "操作人",
  224. dataIndex: "adminName",
  225. key: "adminName"
  226. },
  227. {
  228. title: "时间",
  229. dataIndex: "createDate",
  230. key: "createDate"
  231. }
  232. ],
  233. data: [],
  234. dataSource: [],
  235. columnsX: [
  236. {
  237. title: "业务项目名称",
  238. dataIndex: "commodityName",
  239. key: "commodityName"
  240. },
  241. {
  242. title: "项目类别",
  243. dataIndex: "cname",
  244. key: "cname"
  245. },
  246. {
  247. title: "项目数量",
  248. dataIndex: "commodityQuantity",
  249. key: "commodityQuantity"
  250. },
  251. {
  252. title: "金额(万元)",
  253. dataIndex: "commodityPrice",
  254. key: "commodityPrice"
  255. },
  256. {
  257. title: "负责人",
  258. dataIndex: "contacts",
  259. key: "contacts"
  260. },
  261. {
  262. title: "负责人电话",
  263. dataIndex: "contactsMobile",
  264. key: "contactsMobile"
  265. },
  266. {
  267. title: "主要项目",
  268. dataIndex: "main",
  269. key: "main",
  270. render: text => {
  271. return text ? "是" : "否";
  272. }
  273. },
  274. {
  275. title: "项目说明",
  276. dataIndex: "taskComment",
  277. key: "taskComment",
  278. render: text => {
  279. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  280. }
  281. },
  282. {
  283. title: "操作",
  284. dataIndex: "ABC",
  285. key: "ABC",
  286. render: (text, record) => {
  287. return (
  288. <div>
  289. {this.state.processStatus == 0 ? (
  290. <Popconfirm
  291. title="是否删除?"
  292. onConfirm={() => {
  293. this.delectRow(record);
  294. }}
  295. okText="是"
  296. cancelText="否"
  297. >
  298. <Button
  299. onClick={e => {
  300. e.stopPropagation();
  301. }}
  302. type="danger"
  303. >
  304. 删除
  305. </Button>
  306. </Popconfirm>
  307. ) : (
  308. ""
  309. )}
  310. </div>
  311. );
  312. }
  313. }
  314. ],
  315. dataSourceX: [],
  316. ContactsListsNew: [
  317. {
  318. title: "项目名称",
  319. dataIndex: "commodityName",
  320. key: "commodityName",
  321. render: (text, record, index) => {
  322. let dataArr = this.state.dataSourceX || [];
  323. if (text) {
  324. return <span>{text}</span>;
  325. }
  326. return (
  327. <Select
  328. placeholder="请选择名称"
  329. style={{ width: "150px" }}
  330. disabled={
  331. this.state.getLoad && record.sortName ? true : false
  332. }
  333. onChange={e => {
  334. record.sortName = e;
  335. dataArr.forEach(item => {
  336. if (item.commodityName == record.sortName) {
  337. record.cname = item.cname;
  338. record.tid = item.id;
  339. record.isSave = true;
  340. record.sort = item.sort;
  341. console.log(record);
  342. cuiJieDian.forEach(item => {
  343. if (item.value == record.sort) {
  344. record.arr = item.children;
  345. let yearFlag = true;
  346. if (record.sort == 6) {
  347. yearFlag = false;
  348. }
  349. this.setState({
  350. getLoad: true,
  351. yearFlag
  352. });
  353. }
  354. });
  355. }
  356. });
  357. console.log(e);
  358. }}
  359. >
  360. {dataArr.map(item => {
  361. return (
  362. <Select.Option key={item.id} value={item.commodityName}>
  363. {item.commodityName}
  364. </Select.Option>
  365. );
  366. })}
  367. </Select>
  368. );
  369. }
  370. },
  371. {
  372. title: "项目分类",
  373. dataIndex: "projectType",
  374. key: "projectType",
  375. render: (text, record) => {
  376. console.log("看分类", record);
  377. if (text) {
  378. let arr = this.state.dataSourceX || [];
  379. let str = "";
  380. for (let i = 0; i < arr.length; i++) {
  381. if (this.state.dataSourceX[i].sort == text) {
  382. str = this.state.dataSourceX[i].cname;
  383. return <span>{str}</span>;
  384. }
  385. }
  386. }
  387. if (this.state.getLoad) {
  388. return (
  389. <Select
  390. style={{ width: "150px" }}
  391. placeholder="请选择分类"
  392. value={record.cname}
  393. >
  394. <Select.Option key={record.sort} value={record.cname}>
  395. {record.cname}
  396. </Select.Option>
  397. </Select>
  398. );
  399. } else {
  400. return (
  401. <Select style={{ width: "150px" }} placeholder="请选择分类">
  402. <Select.Option key={record.sort} value={record.cname}>
  403. {record.cname}
  404. </Select.Option>
  405. </Select>
  406. );
  407. }
  408. }
  409. },
  410. {
  411. title: "催款科目",
  412. dataIndex: "dunTypeName",
  413. key: "dunTypeName",
  414. render: (text, record) => {
  415. if (text) {
  416. return <span>{text}</span>;
  417. }
  418. if (this.state.getLoad) {
  419. let arr = record.arr || [];
  420. console.log("arrrr", arr);
  421. return (
  422. <Select
  423. style={{ width: "150px" }}
  424. placeholder="请选择分类"
  425. onChange={e => {
  426. record.dunType = e;
  427. console.log(e);
  428. }}
  429. >
  430. {arr.map(item => {
  431. record;
  432. return (
  433. <Select.Option key={item.value} value={item.value}>
  434. {item.key}
  435. </Select.Option>
  436. );
  437. })}
  438. </Select>
  439. );
  440. } else {
  441. return (
  442. <Select style={{ width: "150px" }} placeholder="请选择分类">
  443. <Select.Option
  444. key={0}
  445. value={"请选择上一项"}
  446. ></Select.Option>
  447. </Select>
  448. );
  449. }
  450. }
  451. },
  452. {
  453. title: "时间",
  454. dataIndex: "waitDay",
  455. key: "waitDay",
  456. render: (text, record) => {
  457. if (record.dunTypeName) {
  458. return <span>{text}</span>;
  459. }
  460. return (
  461. <Select
  462. placeholder="请选择时间"
  463. style={{ width: "150px" }}
  464. disabled={this.state.approval == 0 ? true : false}
  465. onChange={e => {
  466. console.log("ee", e);
  467. record.waitDay = e;
  468. console.log("time", record);
  469. }}
  470. >
  471. <Select.Option key={3}>3天</Select.Option>
  472. <Select.Option key={5}>5天</Select.Option>
  473. <Select.Option key={7}>7天</Select.Option>
  474. <Select.Option key={15}>15天</Select.Option>
  475. </Select>
  476. );
  477. }
  478. },
  479. {
  480. title: "金额(万)",
  481. dataIndex: "money",
  482. key: "money",
  483. render: (text, record) => {
  484. if (record.dunTypeName) {
  485. return <span>{text}</span>;
  486. }
  487. return (
  488. <div>
  489. {/* {this.state.processStatus == 0 ? (
  490. <Input
  491. value={record.money}
  492. placeholder="请输入金额(必填项)"
  493. key={record.id}
  494. required="required"
  495. onChange={e => {
  496. record.money = e.target.value;
  497. this.setState({ contactListNew: this.state.contactListNew });
  498. }}
  499. style={{ width: "120px" }}
  500. />
  501. ) : (
  502. <span>{text}</span>
  503. )} */}
  504. <Input
  505. value={record.money}
  506. placeholder="请输入金额(必填项)"
  507. key={record.id}
  508. required="required"
  509. onChange={e => {
  510. record.money = e.target.value;
  511. this.setState({ contactList: this.state.contactList });
  512. }}
  513. style={{ width: "120px" }}
  514. />
  515. </div>
  516. );
  517. }
  518. },
  519. {
  520. title: "服务年限",
  521. dataIndex: "startDate",
  522. key: "startDate",
  523. render: (text, record) => {
  524. if (record.dunTypeName) {
  525. return <span>{text}</span>;
  526. }
  527. return (
  528. <Select
  529. placeholder="请选择时间"
  530. style={{ width: "150px" }}
  531. disabled={this.state.yearFlag ? true : false}
  532. onChange={e => {
  533. console.log("ee", e);
  534. record.effectiveCount = e;
  535. console.log("year", record);
  536. }}
  537. >
  538. {/* <Select.Option key={null}>无</Select.Option> */}
  539. <Select.Option key={1}>一年</Select.Option>
  540. <Select.Option key={3}>两年</Select.Option>
  541. <Select.Option key={5}>三年</Select.Option>
  542. <Select.Option key={7}>四年</Select.Option>
  543. <Select.Option key={9}>五年</Select.Option>
  544. </Select>
  545. );
  546. }
  547. },
  548. {
  549. title: "催款状态",
  550. dataIndex: "status",
  551. key: "status",
  552. render: text => {
  553. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  554. }
  555. },
  556. {
  557. title: "操作",
  558. dataIndex: "dels",
  559. key: "dels",
  560. render: (text, record, index) => {
  561. return (
  562. <div>
  563. {this.state.processStatus == 0 ? (
  564. <Popconfirm
  565. title="是否删除?"
  566. onConfirm={() => {
  567. this.confirmDeletNew(record);
  568. }}
  569. okText="删除"
  570. cancelText="不删除"
  571. >
  572. <Button
  573. style={{
  574. marginRight: "10px",
  575. color: "#ffffff",
  576. background: "#f00",
  577. border: "none"
  578. }}
  579. >
  580. 删除
  581. </Button>
  582. </Popconfirm>
  583. ) : (
  584. ""
  585. )}
  586. {record.isSave ? (
  587. <Button
  588. type="primary"
  589. onClick={e => {
  590. this.contactSaveNew(record);
  591. }}
  592. >
  593. 保存
  594. </Button>
  595. ) : (
  596. ""
  597. )}
  598. </div>
  599. );
  600. }
  601. }
  602. ],
  603. ContactsLists: [
  604. {
  605. title: "催款科目",
  606. dataIndex: "dunSubject",
  607. key: "dunSubject",
  608. render: (text, record) => {
  609. return (
  610. <Select
  611. placeholder="请选择催款科目"
  612. value={record.dunSubject}
  613. style={{ width: "150px" }}
  614. onChange={e => {
  615. record.dunSubject = e;
  616. this.setState({ contactList: this.state.contactList });
  617. }}
  618. >
  619. {jiedian.map(function(item) {
  620. return (
  621. <Select.Option key={item.value}>{item.key}</Select.Option>
  622. );
  623. })}
  624. </Select>
  625. );
  626. }
  627. },
  628. {
  629. title: "金额(万)",
  630. dataIndex: "money",
  631. key: "money",
  632. render: (text, record) => {
  633. return (
  634. <Input
  635. value={record.money}
  636. placeholder="请输入金额(必填项)"
  637. key={record.id}
  638. required="required"
  639. onChange={e => {
  640. record.money = e.target.value;
  641. this.setState({ contactList: this.state.contactList });
  642. }}
  643. style={{ width: "120px" }}
  644. />
  645. );
  646. }
  647. },
  648. {
  649. title: "催款状态",
  650. dataIndex: "dunStatus",
  651. key: "dunStatus",
  652. render: text => {
  653. return getCuikuan(text);
  654. }
  655. },
  656. {
  657. title: "操作",
  658. dataIndex: "dels",
  659. key: "dels",
  660. render: (text, record) => {
  661. return (
  662. <div>
  663. {
  664. <Popconfirm
  665. title="是否删除?"
  666. onConfirm={() => {
  667. this.confirmDelet(record.key);
  668. }}
  669. okText="删除"
  670. cancelText="不删除"
  671. >
  672. <Button
  673. style={{
  674. marginRight: "10px",
  675. color: "#ffffff",
  676. background: "#f00",
  677. border: "none"
  678. }}
  679. >
  680. 删除
  681. </Button>
  682. </Popconfirm>
  683. }
  684. {record.id ? (
  685. ""
  686. ) : (
  687. <Button type="primary" onClick={this.contactSave}>
  688. 保存
  689. </Button>
  690. )}
  691. </div>
  692. );
  693. }
  694. }
  695. ]
  696. };
  697. },
  698. //删除
  699. delectRow(record) {
  700. this.setState({
  701. loading: true
  702. });
  703. $.ajax({
  704. method: "post",
  705. dataType: "json",
  706. crossDomain: false,
  707. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  708. data: {
  709. id: record.id
  710. }
  711. }).done(
  712. function(data) {
  713. if (!data.error.length) {
  714. message.success("删除成功!");
  715. this.setState({
  716. loading: false
  717. });
  718. this.xiangmu(this.state.orderNo);
  719. this.loadData();
  720. } else {
  721. message.warning(data.error[0].message);
  722. }
  723. }.bind(this)
  724. );
  725. },
  726. //页面加载函数
  727. componentWillMount() {
  728. this.loadData();
  729. },
  730. //整行点击
  731. tableRowClick(record) {
  732. this.setState({
  733. visible: true
  734. });
  735. this.xiangqing(record.orderNo);
  736. this.xiangmu(record.orderNo);
  737. this.jiedian(record.orderNo);
  738. this.jiedianNew(record.orderNo);
  739. this.departmentList();
  740. },
  741. //点击打卡项目详情
  742. tableRowClickX(record) {
  743. this.setState({
  744. jid: record.id, //项目ID
  745. kid: record.commodityId, //商品ID
  746. commodityName: record.commodityName, //金额
  747. commodityPrice: record.commodityPrice, //金额
  748. commodityQuantity: record.commodityQuantity, //数量
  749. taskComment: record.taskComment, //备注
  750. main: record.main.toString(), //是否为主要
  751. addnextVisible: true,
  752. addState: 0
  753. });
  754. },
  755. //项目详情关闭
  756. nextCancel() {
  757. this.setState({
  758. addnextVisible: false
  759. });
  760. },
  761. //订单详情
  762. xiangqing(orderNos) {
  763. $.ajax({
  764. method: "get",
  765. dataType: "json",
  766. crossDomain: false,
  767. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  768. data: {
  769. orderNo: orderNos
  770. },
  771. success: function(data) {
  772. if (data.error.length || data.data.list == "") {
  773. if (data.error && data.error.length) {
  774. message.warning(data.error[0].message);
  775. }
  776. } else {
  777. let thisdata = data.data;
  778. if (thisdata.approval == 2) {
  779. thisdata.approval = "特批通过";
  780. } else if (thisdata.approval == 3) {
  781. thisdata.approval = "特批驳回";
  782. }
  783. this.setState({
  784. id: thisdata.id,
  785. kehuId: thisdata.buyerId,
  786. orderNo: thisdata.orderNo, //订单编号
  787. contractNo: thisdata.contractNo, //合同编号
  788. userName: thisdata.userName, //客户名称
  789. signDate: thisdata.signDate, //签单时间
  790. processStatus: thisdata.processStatus, //流程状态
  791. liquidationStatus: thisdata.liquidationStatus, //结算状态
  792. contacts: thisdata.contacts, //企业联系人
  793. contactMobile: thisdata.contactMobile, //联系人电话
  794. legalPerson: thisdata.legalPerson, //法人
  795. legalPersonTel: thisdata.legalPersonTel, //法人电话
  796. firstAmount: thisdata.firstAmount + "", //签单金额
  797. totalAmount: thisdata.totalAmount + "", //首付金额
  798. settlementAmount: thisdata.settlementAmount, //已收款项
  799. orderRemarks: thisdata.orderRemarks, //订单留言
  800. orgCodeUrl: thisdata.contractPictureUrl
  801. ? splitUrl(
  802. thisdata.contractPictureUrl,
  803. ",",
  804. globalConfig.avatarHost + "/upload"
  805. )
  806. : [], //图片地址
  807. salesmanName: thisdata.salesmanName, //营销员名称
  808. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  809. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  810. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  811. financeName: thisdata.financeName, //财务名称
  812. financeMobile: thisdata.financeMobile, //财务电话
  813. nowFinance: thisdata.nowFinance, //财务名称
  814. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  815. initiateName: thisdata.initiateName, //驳回人
  816. backDate: thisdata.backDate, //驳回时间
  817. reason: thisdata.reason, //驳回原因
  818. approval: thisdata.approval.toString(), //特批状态
  819. organizationSearch: thisdata.orderDep,
  820. //approval:thisdata.approval==0?thisdata.approval.toString():thisdata.approval,//特批状态
  821. outsource: thisdata.outsource == 0 ? "否" : "是"
  822. });
  823. }
  824. }.bind(this)
  825. }).always(
  826. function() {
  827. this.setState({
  828. loading: false
  829. });
  830. }.bind(this)
  831. );
  832. },
  833. //项目列表
  834. xiangmu(orderNos) {
  835. $.ajax({
  836. method: "get",
  837. dataType: "json",
  838. crossDomain: false,
  839. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  840. data: {
  841. orderNo: orderNos
  842. },
  843. success: function(data) {
  844. let theArr = [];
  845. if (data.error.length || data.data.list == "") {
  846. if (data.error && data.error.length) {
  847. message.warning(data.error[0].message);
  848. }
  849. } else {
  850. for (let i = 0; i < data.data.length; i++) {
  851. let thisdata = data.data[i];
  852. theArr.push({
  853. key: i,
  854. id: thisdata.id,
  855. orderNo: thisdata.orderNo, //订单编号
  856. commodityId: thisdata.commodityId, //项目ID
  857. commodityName: thisdata.commodityName, //项目名称
  858. cname: thisdata.cname, //项目类别
  859. commodityPrice: thisdata.commodityPrice, //项目价格
  860. commodityQuantity: thisdata.commodityQuantity, //项目数量
  861. main: thisdata.main, //是否为主要任务
  862. taskComment: thisdata.taskComment, //任务说明
  863. contacts: thisdata.contacts, //联系人
  864. contactsMobile: thisdata.contactsMobile, //联系人电话
  865. sort: thisdata.cSort
  866. });
  867. }
  868. }
  869. this.setState({
  870. dataSourceX: theArr,
  871. paginations: false
  872. });
  873. }.bind(this)
  874. }).always(
  875. function() {
  876. this.setState({
  877. loading: false
  878. });
  879. }.bind(this)
  880. );
  881. },
  882. //节点列表
  883. jiedian(orderNos) {
  884. $.ajax({
  885. method: "get",
  886. dataType: "json",
  887. crossDomain: false,
  888. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  889. data: {
  890. orderNo: orderNos
  891. },
  892. success: function(data) {
  893. let theArr = [];
  894. let thisData = [];
  895. if (data.error.length || data.data.list == "") {
  896. if (data.error && data.error.length) {
  897. message.warning(data.error[0].message);
  898. }
  899. } else {
  900. for (let i = 0; i < data.data.length; i++) {
  901. thisData = data.data[i];
  902. theArr.push({
  903. key: i,
  904. dunSubject: thisData.dunSubject
  905. ? thisData.dunSubject.toString()
  906. : "", //催款科目
  907. id: thisData.id, //节点Id
  908. money: thisData.money, //催款金额
  909. dunStatus: thisData.dunStatus, //催款状态
  910. orderNo: thisData.orderNo
  911. });
  912. }
  913. this.setState({
  914. contactList: theArr
  915. });
  916. }
  917. }.bind(this)
  918. }).always(
  919. function() {
  920. this.setState({
  921. loading: false
  922. });
  923. }.bind(this)
  924. );
  925. },
  926. //查看催款节点
  927. jiedianNew(orderNos) {
  928. $.ajax({
  929. method: "get",
  930. dataType: "json",
  931. crossDomain: false,
  932. url:
  933. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  934. data: {
  935. orderNo: orderNos
  936. },
  937. success: function(data) {
  938. let theArr = [];
  939. let thisData = [];
  940. if (!thisData) {
  941. if (data.error && data.error.length) {
  942. message.warning(data.error[0].message);
  943. }
  944. thisData = {};
  945. } else {
  946. let arr = data.data || [];
  947. for (let i = 0; i < arr.length; i++) {
  948. thisData = arr[i];
  949. theArr.push({
  950. key: i,
  951. dunSubject: thisData.dunSubject
  952. ? thisData.dunSubject.toString()
  953. : "", //催款科目
  954. id: thisData.id, //节点Id
  955. money: thisData.money, //催款金额
  956. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  957. commodityName: thisData.commodityName,
  958. projectType: thisData.projectType,
  959. dunTypeName: thisData.dunTypeName,
  960. status: thisData.status,
  961. waitDay: thisData.waitDay,
  962. effectiveCount: thisData.effectiveCount,
  963. startDate: thisData.startDate
  964. });
  965. }
  966. this.setState({
  967. contactListNew: theArr
  968. });
  969. }
  970. }.bind(this)
  971. }).always(
  972. function() {
  973. this.setState({
  974. loading: false
  975. });
  976. }.bind(this)
  977. );
  978. },
  979. //催款节点保存
  980. contactSave() {
  981. for (let i = 0; i < this.state.contactList.length; i++) {
  982. if (moneyVerify(this.state.contactList[i].money)) {
  983. return;
  984. }
  985. }
  986. this.setState({
  987. loading: true
  988. });
  989. $.ajax({
  990. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  991. method: "post",
  992. data: {
  993. orderNo: this.state.orderNo,
  994. orderDun: JSON.stringify(this.state.contactList)
  995. }
  996. }).done(
  997. function(data) {
  998. this.setState({
  999. loading: false
  1000. });
  1001. if (!data.error.length) {
  1002. message.success("保存成功!");
  1003. this.jiedian(this.state.orderNo);
  1004. } else {
  1005. message.warning(data.error[0].message);
  1006. }
  1007. }.bind(this)
  1008. );
  1009. },
  1010. //催款节点保存
  1011. contactSaveNew(record) {
  1012. if (!this.state.yearFlag) {
  1013. if (!record.effectiveCount) {
  1014. message.warning("请选择服务年限");
  1015. return;
  1016. }
  1017. } else {
  1018. record.effectiveCount = "";
  1019. }
  1020. if (record.money == "") {
  1021. message.warning("请填写金额");
  1022. return;
  1023. }
  1024. if (!record.dunType) {
  1025. message.warning("请选择对应科目");
  1026. return;
  1027. }
  1028. this.setState({
  1029. loading: true
  1030. });
  1031. $.ajax({
  1032. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1033. method: "post",
  1034. data: {
  1035. orderNo: record.orderNo,
  1036. tid: record.tid,
  1037. projectType: record.sort,
  1038. dunType: record.dunType,
  1039. money: record.money,
  1040. waitDay: record.waitDay,
  1041. effectiveCount: record.effectiveCount
  1042. }
  1043. }).done(
  1044. function(data) {
  1045. this.setState({
  1046. loading: false
  1047. });
  1048. if (!data.error.length) {
  1049. message.success("保存成功!");
  1050. this.setState({
  1051. cuiFlag: false
  1052. });
  1053. this.jiedianNew(record.orderNo);
  1054. } else {
  1055. message.warning(data.error[0].message);
  1056. }
  1057. }.bind(this)
  1058. );
  1059. },
  1060. //点击新增催款节点
  1061. addcontact() {
  1062. this.state.contactList.push({
  1063. key: this.state.contactList.length,
  1064. money: "",
  1065. dunSubject: undefined,
  1066. orderNo: this.state.orderNo,
  1067. dunTarget: this.state.kehuId
  1068. });
  1069. this.setState({
  1070. contactList: this.state.contactList
  1071. });
  1072. },
  1073. //点击新增催款节点
  1074. addcontactNew() {
  1075. this.state.contactListNew.push({
  1076. key: this.state.contactListNew.length,
  1077. money: "",
  1078. dunSubject: undefined,
  1079. orderNo: this.state.orderNo,
  1080. dunTarget: this.state.kehuId
  1081. });
  1082. this.setState({
  1083. contactListNew: this.state.contactListNew,
  1084. cuiFlag: true
  1085. });
  1086. },
  1087. //删除收款节点
  1088. confirmDelet(index) {
  1089. this.state.contactList.splice(index, 1);
  1090. this.setState({
  1091. contactList: this.state.contactList
  1092. });
  1093. this.contactSave();
  1094. },
  1095. //删除收款节点
  1096. confirmDeletNew(index) {
  1097. console.log(index);
  1098. if (index.id) {
  1099. this.state.contactListNew.splice(index.key, 1);
  1100. this.setState({
  1101. contactListNew: this.state.contactListNew,
  1102. cuiFlag: false
  1103. });
  1104. $.ajax({
  1105. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  1106. method: "post",
  1107. data: {
  1108. id: index.id
  1109. }
  1110. }).done(
  1111. function(data) {
  1112. this.setState({
  1113. loading: false
  1114. });
  1115. if (!data.error.length) {
  1116. message.success("删除成功!");
  1117. this.setState({
  1118. cuiFlag: false
  1119. });
  1120. this.jiedianNew(this.state.orderNo);
  1121. } else {
  1122. message.warning(data.error[0].message);
  1123. }
  1124. }.bind(this)
  1125. );
  1126. } else {
  1127. this.state.contactListNew.splice(index.key, 1);
  1128. this.setState({
  1129. contactListNew: this.state.contactListNew,
  1130. cuiFlag: false
  1131. });
  1132. }
  1133. },
  1134. //重新提交
  1135. examOk() {
  1136. if (this.state.flag) return;
  1137. this.setState({
  1138. flag: true
  1139. });
  1140. let theorgCodeUrl = [];
  1141. if (this.state.orgCodeUrl.length) {
  1142. let picArr = [];
  1143. this.state.orgCodeUrl.map(function(item) {
  1144. if (
  1145. item.response &&
  1146. item.response.data &&
  1147. item.response.data.length
  1148. ) {
  1149. picArr.push(item.response.data);
  1150. }
  1151. });
  1152. theorgCodeUrl = picArr.join(",");
  1153. }
  1154. if (moneyVerify(this.state.totalAmount)) {
  1155. this.setState({
  1156. flag: false
  1157. });
  1158. return;
  1159. }
  1160. if (moneyVerify(this.state.firstAmount)) {
  1161. this.setState({
  1162. flag: false
  1163. });
  1164. return;
  1165. }
  1166. if (!this.state.totalAmount) {
  1167. message.warning("签单金额不能为空");
  1168. this.refs.signFirstPayment.focus();
  1169. this.setState({
  1170. flag: false
  1171. });
  1172. return false;
  1173. }
  1174. if (!this.state.firstAmount) {
  1175. message.warning("首付金额不能为空");
  1176. this.refs.signFirstPayment.focus();
  1177. this.setState({
  1178. flag: false
  1179. });
  1180. return false;
  1181. }
  1182. if (!theorgCodeUrl) {
  1183. message.warning("企业负责人不能为空");
  1184. this.refs.signFirstPayment.focus();
  1185. this.setState({
  1186. flag: false
  1187. });
  1188. return false;
  1189. }
  1190. if (
  1191. this.state.approval == "特批通过" ||
  1192. this.state.approval == "特批驳回"
  1193. ) {
  1194. message.warning("特批状态不正确,请重新填写");
  1195. this.setState({
  1196. flag: false
  1197. });
  1198. return false;
  1199. }
  1200. $.ajax({
  1201. method: "post",
  1202. dataType: "json",
  1203. crossDomain: false,
  1204. url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
  1205. data: {
  1206. orderNo: this.state.orderNo, //订单编号
  1207. totalAmount: this.state.totalAmount, //总金额
  1208. firstAmount: this.state.firstAmount, //首付
  1209. isSubmit: 1, //保存草稿还是提交
  1210. signDate: this.state.signDate, //签单日期
  1211. contacts: this.state.contacts, //企业负责人
  1212. contactMobile: this.state.contactMobile, //负责人联系方式
  1213. legalPerson: this.state.legalPerson, //企业法人
  1214. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1215. approval: this.state.approval, //特批状态
  1216. contractNo: this.state.contractNo, //合同编号
  1217. orderRemarks: this.state.orderRemarks, //订单备注
  1218. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1219. orderDep: this.state.organizationSearch
  1220. },
  1221. success: function(data) {
  1222. if (data.error.length || data.data.list == "") {
  1223. if (data.error && data.error.length) {
  1224. message.warning(data.error[0].message);
  1225. }
  1226. } else {
  1227. message.success("该订单已重新提交~");
  1228. this.setState({
  1229. visible: false,
  1230. flag: false
  1231. });
  1232. this.resets();
  1233. this.loadData();
  1234. }
  1235. }.bind(this)
  1236. }).always(
  1237. function() {
  1238. this.setState({
  1239. loading: false
  1240. });
  1241. }.bind(this)
  1242. );
  1243. },
  1244. //重新提交
  1245. examOks() {
  1246. if (this.state.flag) return;
  1247. this.setState({
  1248. flag: true
  1249. });
  1250. $.ajax({
  1251. method: "post",
  1252. dataType: "json",
  1253. crossDomain: false,
  1254. url: globalConfig.context + "/api/admin/newOrder/deleteOrderNew",
  1255. data: {
  1256. orderNo: this.state.orderNo //订单编号
  1257. },
  1258. success: function(data) {
  1259. if (data.error.length || data.data.list == "") {
  1260. if (data.error && data.error.length) {
  1261. message.warning(data.error[0].message);
  1262. }
  1263. } else {
  1264. message.success("该订单已作废~");
  1265. this.setState({
  1266. visible: false,
  1267. flag: false
  1268. });
  1269. this.resets();
  1270. this.loadData();
  1271. }
  1272. }.bind(this)
  1273. }).always(
  1274. function() {
  1275. this.setState({
  1276. loading: false
  1277. });
  1278. }.bind(this)
  1279. );
  1280. },
  1281. departmentList() {
  1282. this.setState({
  1283. loading: true
  1284. });
  1285. $.ajax({
  1286. method: "get",
  1287. dataType: "json",
  1288. crossDomain: false,
  1289. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1290. data: {},
  1291. success: function(data) {
  1292. let thedata = data.data;
  1293. let theArr = [];
  1294. if (!thedata) {
  1295. if (data.error && data.error.length) {
  1296. message.warning(data.error[0].message);
  1297. }
  1298. thedata = {};
  1299. } else {
  1300. thedata.map(function(item, index) {
  1301. theArr.push({
  1302. key: index,
  1303. name: item.name,
  1304. id: item.id,
  1305. depNo: item.depNo
  1306. });
  1307. });
  1308. }
  1309. this.setState({
  1310. departmentArr: theArr
  1311. });
  1312. console.log(this.state.departmentArr);
  1313. }.bind(this)
  1314. }).always(
  1315. function() {
  1316. this.setState({
  1317. loading: false
  1318. });
  1319. }.bind(this)
  1320. );
  1321. },
  1322. //新建项目明细保存
  1323. nextSubmit(e) {
  1324. e.preventDefault();
  1325. if (this.state.gid == undefined || !this.state.gid) {
  1326. message.warning("服务名称不匹配!");
  1327. return false;
  1328. }
  1329. if (moneyVerify(this.state.commodityPrice)) {
  1330. return;
  1331. }
  1332. if (!this.state.commodityPrice) {
  1333. message.warning("请输入金额!");
  1334. this.refs.commodityPrice.focus();
  1335. return false;
  1336. }
  1337. if (!this.state.commodityQuantity) {
  1338. message.warning("请输入商品数量!");
  1339. this.refs.commodityQuantity.focus();
  1340. return false;
  1341. }
  1342. if (!this.state.main) {
  1343. message.warning("请选择是否为主要项目!");
  1344. this.refs.commodityQuantity.focus();
  1345. return false;
  1346. }
  1347. this.setState({
  1348. loading: true
  1349. });
  1350. let api = this.state.addState
  1351. ? "/api/admin/newOrder/addOrderTask"
  1352. : "/api/bianji";
  1353. $.ajax({
  1354. method: "POST",
  1355. dataType: "json",
  1356. crossDomain: false,
  1357. url: globalConfig.context + api,
  1358. data: {
  1359. commodityId: this.state.gid, //商品ID
  1360. orderNo: this.state.orderNo, //订单编号
  1361. commodityName: this.state.commodityName, //商品名称
  1362. commodityQuantity: this.state.commodityQuantity, //商品数量
  1363. commodityPrice: this.state.commodityPrice, //签单总价
  1364. taskComment: this.state.taskComment, //服务说明
  1365. main: this.state.main //是否为主要项目
  1366. }
  1367. }).done(
  1368. function(data) {
  1369. this.setState({
  1370. loading: false
  1371. });
  1372. if (!data.error.length) {
  1373. message.success("保存成功!");
  1374. this.nextCancel();
  1375. this.xiangmu(this.state.orderNo);
  1376. } else {
  1377. message.warning(data.error[0].message);
  1378. }
  1379. }.bind(this)
  1380. );
  1381. },
  1382. rizhi() {
  1383. console.log(this.state.orderNo);
  1384. this.setState({
  1385. loading: true
  1386. });
  1387. $.ajax({
  1388. method: "get",
  1389. dataType: "json",
  1390. crossDomain: false,
  1391. url: "/api/admin/newOrder/selectOrderLog",
  1392. data: {
  1393. orderNo: this.state.orderNo
  1394. },
  1395. success: function(data) {
  1396. let theArr = [];
  1397. let thisData = data.data;
  1398. if (!thisData.length) {
  1399. if (data.error && data.error.length) {
  1400. message.warning(data.error[0].message);
  1401. }
  1402. thisData = {};
  1403. } else {
  1404. for (let i = 0; i < data.data.length; i++) {
  1405. let thisdata = data.data[i];
  1406. theArr.push({
  1407. processName: thisdata.processName,
  1408. adminName: thisdata.adminName,
  1409. createDate: thisdata.createDate
  1410. });
  1411. }
  1412. }
  1413. this.setState({
  1414. dataSourcerizhi: theArr
  1415. });
  1416. }.bind(this)
  1417. }).always(
  1418. function() {
  1419. this.setState({
  1420. loading: false
  1421. });
  1422. }.bind(this)
  1423. );
  1424. },
  1425. //查看订单日志
  1426. getOrderLog() {
  1427. this.setState({
  1428. rizhivisible: true
  1429. });
  1430. this.rizhi();
  1431. },
  1432. closeOrderLog() {
  1433. this.setState({
  1434. rizhivisible: false
  1435. });
  1436. },
  1437. //点击签单
  1438. handleCancels() {
  1439. this.setState({
  1440. isSubmit: 1
  1441. });
  1442. },
  1443. //点击签单
  1444. handleCancelq() {
  1445. this.setState({
  1446. isSubmit: 0
  1447. });
  1448. },
  1449. resets() {
  1450. this.state.orderNo = "";
  1451. this.state.customerName = "";
  1452. this.state.releaseDate[0] = undefined;
  1453. this.state.releaseDate[1] = undefined;
  1454. this.loadData();
  1455. },
  1456. //点击添加项目明细
  1457. addDetailed() {
  1458. this.setState({
  1459. gid: "",
  1460. customerArr: [],
  1461. commodityName: "",
  1462. commodityQuantity: "",
  1463. commodityId: "",
  1464. taskComment: "",
  1465. main: undefined,
  1466. commodityPrice: "",
  1467. addState: 1,
  1468. addnextVisible: true
  1469. });
  1470. },
  1471. //修改项目详情
  1472. tabRowSave(e) {
  1473. e.preventDefault();
  1474. if (!this.state.commodityPrice) {
  1475. message.warning("金额不能为空!");
  1476. return false;
  1477. }
  1478. if (!this.state.commodityQuantity) {
  1479. message.warning("数量不能为空!");
  1480. return false;
  1481. }
  1482. if (!this.state.main) {
  1483. message.warning("请选择是否为主要项目!");
  1484. this.refs.commodityQuantity.focus();
  1485. return false;
  1486. }
  1487. $.ajax({
  1488. method: "POST",
  1489. dataType: "json",
  1490. crossDomain: false,
  1491. url: globalConfig.context + "/api/admin/newOrder/updateOrderTask",
  1492. data: {
  1493. id: this.state.jid, //项目ID
  1494. commodityId: this.state.kid, //商品ID
  1495. orderNo: this.state.orderNo, //订单编号
  1496. main: this.state.main, //是否为主要
  1497. commodityPrice: this.state.commodityPrice, //金额
  1498. commodityQuantity: this.state.commodityQuantity, //数量
  1499. taskComment: this.state.taskComment //备注
  1500. }
  1501. }).done(
  1502. function(data) {
  1503. this.setState({
  1504. loading: false
  1505. });
  1506. if (!data.error.length) {
  1507. message.success("保存成功!");
  1508. this.nextCancel();
  1509. this.xiangmu(this.state.orderNo);
  1510. //this.loaduser(this.props.datauser);
  1511. this.loadData();
  1512. } else {
  1513. message.warning(data.error[0].message);
  1514. }
  1515. }.bind(this)
  1516. );
  1517. },
  1518. //搜索
  1519. search() {
  1520. this.setState({
  1521. //signBillVisible:false
  1522. });
  1523. this.loadData();
  1524. },
  1525. getOrgCodeUrl(e) {
  1526. this.setState({ orgCodeUrl: e });
  1527. },
  1528. //关闭详情
  1529. visitCancel() {
  1530. this.setState({
  1531. visible: false
  1532. });
  1533. this.resets();
  1534. },
  1535. visitOk() {
  1536. this.setState({
  1537. visible: false
  1538. });
  1539. this.resets();
  1540. },
  1541. //客户
  1542. selectAutoCUT(value) {
  1543. let autoIds;
  1544. let fwList = this.state.customerArr;
  1545. fwList.map(function(item) {
  1546. if (value == item.name) {
  1547. autoIds = item.id;
  1548. }
  1549. });
  1550. this.setState({
  1551. customerName: value,
  1552. autoId: autoIds
  1553. });
  1554. },
  1555. //加载(自动补全)
  1556. supervisor(e, state) {
  1557. //客户名称与服务名称自动补全
  1558. let api = state
  1559. ? "/api/admin/customer/getCustomerByName"
  1560. : "/api/admin/order/getBusinessProjectByName";
  1561. $.ajax({
  1562. method: "get",
  1563. dataType: "json",
  1564. crossDomain: false,
  1565. url: globalConfig.context + api,
  1566. data: state
  1567. ? {
  1568. name: e,
  1569. type: this.state.customType
  1570. }
  1571. : {
  1572. businessName: e
  1573. },
  1574. success: function(data) {
  1575. let thedata = data.data;
  1576. if (!thedata) {
  1577. if (data.error && data.error.length) {
  1578. message.warning(data.error[0].message);
  1579. }
  1580. thedata = {};
  1581. }
  1582. this.setState({
  1583. states: state,
  1584. customerArr: thedata
  1585. });
  1586. }.bind(this)
  1587. }).always(
  1588. function() {
  1589. this.setState({
  1590. loading: false
  1591. });
  1592. }.bind(this)
  1593. );
  1594. },
  1595. //上级主管输入框失去焦点是判断客户是否存在
  1596. selectAuto(value) {
  1597. let kid = [];
  1598. let fwList = this.state.customerArr;
  1599. fwList.map(function(item) {
  1600. if (value == item.bname) {
  1601. kid = item;
  1602. }
  1603. });
  1604. this.setState({
  1605. commodityName: value,
  1606. gid: kid.id,
  1607. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  1608. commodityFirstPayment:
  1609. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  1610. });
  1611. },
  1612. //服务值改变时请求客户名称
  1613. httpChange(e) {
  1614. this.state.gid = "";
  1615. if (e.length >= 1) {
  1616. this.supervisor(e, false);
  1617. }
  1618. this.setState({
  1619. commodityName: e
  1620. });
  1621. },
  1622. render() {
  1623. const formItemLayout = {
  1624. labelCol: { span: 8 },
  1625. wrapperCol: { span: 14 }
  1626. };
  1627. const FormItem = Form.Item;
  1628. const { RangePicker } = DatePicker;
  1629. const rowSelection = {
  1630. selectedRowKeys: this.state.selectedRowKeys,
  1631. onChange: (selectedRowKeys, selectedRows) => {
  1632. this.setState({
  1633. modalVisible: false,
  1634. selectedRows: selectedRows.slice(-1),
  1635. selectedRowKeys: selectedRowKeys.slice(-1)
  1636. });
  1637. },
  1638. onSelect: recordt => {
  1639. this.setState({
  1640. modalVisible: false,
  1641. recordt: recordt.id
  1642. });
  1643. }
  1644. };
  1645. const cuiDataList = this.state.contactList || [];
  1646. const dataSources = this.state.customerArr || [];
  1647. let departmentArr = this.state.departmentArr || [];
  1648. const options = this.state.states
  1649. ? dataSources.map(group => (
  1650. <Select.Option key={group.id} value={group.name}>
  1651. {group.name}
  1652. </Select.Option>
  1653. ))
  1654. : dataSources.map((group, index) => (
  1655. <Select.Option key={index} value={group.bname}>
  1656. {group.bname}
  1657. </Select.Option>
  1658. ));
  1659. return (
  1660. <div className="user-content">
  1661. <ShowModalDiv ShowModal={this.state.showModal} />
  1662. <div className="content-title">
  1663. <span>订单审核</span>
  1664. </div>
  1665. <div className="user-search">
  1666. <Input
  1667. placeholder="客户名称"
  1668. style={{ width: "150px", marginBottom: "10px" }}
  1669. value={this.state.customerName}
  1670. onChange={e => {
  1671. this.setState({ customerName: e.target.value });
  1672. }}
  1673. />
  1674. <Input
  1675. placeholder="订单编号"
  1676. style={{ width: "150px" }}
  1677. value={this.state.orderNoSearch}
  1678. onChange={e => {
  1679. this.setState({ orderNoSearch: e.target.value });
  1680. }}
  1681. />
  1682. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1683. <RangePicker
  1684. value={[
  1685. this.state.releaseDate[0]
  1686. ? moment(this.state.releaseDate[0])
  1687. : null,
  1688. this.state.releaseDate[1]
  1689. ? moment(this.state.releaseDate[1])
  1690. : null
  1691. ]}
  1692. onChange={(data, dataString) => {
  1693. this.setState({ releaseDate: dataString });
  1694. }}
  1695. />
  1696. <Button
  1697. type="primary"
  1698. onClick={this.search}
  1699. style={{ marginLeft: "10px" }}
  1700. >
  1701. 搜索
  1702. </Button>
  1703. <Button onClick={this.resets}>重置</Button>
  1704. <div className="patent-table">
  1705. <Spin spinning={this.state.loading}>
  1706. <Table
  1707. columns={this.state.columns}
  1708. dataSource={this.state.dataSource}
  1709. rowSelection={rowSelection}
  1710. pagination={this.state.pagination}
  1711. onRowClick={this.tableRowClick}
  1712. bordered
  1713. size="small"
  1714. />
  1715. </Spin>
  1716. </div>
  1717. <Modal
  1718. className="customeDetails"
  1719. footer=""
  1720. title="订单详情"
  1721. width="900px"
  1722. visible={this.state.visible}
  1723. onOk={this.visitOk}
  1724. onCancel={this.visitCancel}
  1725. >
  1726. <Form
  1727. layout="horizontal"
  1728. onSubmit={this.handleSubmit}
  1729. id="demand-form"
  1730. style={{ paddingBottom: "40px" }}
  1731. >
  1732. <Spin spinning={this.state.loading}>
  1733. <div className="clearfix">
  1734. <FormItem
  1735. className="half-item"
  1736. {...formItemLayout}
  1737. label="订单编号"
  1738. >
  1739. <span>{this.state.orderNo}</span>
  1740. </FormItem>
  1741. <FormItem
  1742. className="half-item"
  1743. {...formItemLayout}
  1744. label="合同编号"
  1745. >
  1746. <span>{this.state.contractNo}</span>
  1747. </FormItem>
  1748. <FormItem
  1749. className="half-item"
  1750. {...formItemLayout}
  1751. label="客户名称"
  1752. >
  1753. <span>{this.state.userName}</span>
  1754. </FormItem>
  1755. <FormItem
  1756. className="half-item"
  1757. {...formItemLayout}
  1758. label="流程状态"
  1759. >
  1760. <span>{getProcessStatus(this.state.processStatus)}</span>
  1761. </FormItem>
  1762. <FormItem
  1763. className="half-item"
  1764. {...formItemLayout}
  1765. label="结算状态"
  1766. >
  1767. <span>
  1768. {getLiquidationStatus(this.state.liquidationStatus)}
  1769. </span>
  1770. </FormItem>
  1771. <FormItem
  1772. className="half-item"
  1773. {...formItemLayout}
  1774. label="已收款项(万元)"
  1775. >
  1776. <span>{this.state.settlementAmount}</span>
  1777. </FormItem>
  1778. <FormItem
  1779. className="half-item"
  1780. {...formItemLayout}
  1781. label="企业联系人"
  1782. >
  1783. <Input
  1784. placeholder="请输入联系人"
  1785. ref="signTotalAmount"
  1786. value={this.state.contacts}
  1787. onChange={e => {
  1788. this.setState({ contacts: e.target.value });
  1789. }}
  1790. style={{ width: "240px" }}
  1791. />
  1792. </FormItem>
  1793. <FormItem
  1794. className="half-item"
  1795. {...formItemLayout}
  1796. label="联系人电话"
  1797. >
  1798. <Input
  1799. placeholder="请输入联系人电话"
  1800. ref="signTotalAmount"
  1801. value={this.state.contactMobile}
  1802. onChange={e => {
  1803. this.setState({ contactMobile: e.target.value });
  1804. }}
  1805. style={{ width: "240px" }}
  1806. />
  1807. </FormItem>
  1808. <FormItem
  1809. className="half-item"
  1810. {...formItemLayout}
  1811. label="企业法人"
  1812. >
  1813. <Input
  1814. placeholder="请输入法人"
  1815. ref="signTotalAmount"
  1816. value={this.state.legalPerson}
  1817. onChange={e => {
  1818. this.setState({ legalPerson: e.target.value });
  1819. }}
  1820. style={{ width: "240px" }}
  1821. />
  1822. </FormItem>
  1823. <FormItem
  1824. className="half-item"
  1825. {...formItemLayout}
  1826. label="法人电话"
  1827. >
  1828. <Input
  1829. placeholder="请输入法人电话"
  1830. ref="signTotalAmount"
  1831. value={this.state.legalPersonTel}
  1832. onChange={e => {
  1833. this.setState({ legalPersonTel: e.target.value });
  1834. }}
  1835. style={{ width: "240px" }}
  1836. />
  1837. </FormItem>
  1838. <FormItem
  1839. className="half-item"
  1840. {...formItemLayout}
  1841. label="签单金额(万元)"
  1842. >
  1843. <Input
  1844. placeholder="签单金额"
  1845. ref="signTotalAmount"
  1846. value={this.state.totalAmount}
  1847. onChange={e => {
  1848. this.setState({ totalAmount: e.target.value });
  1849. }}
  1850. style={{ width: "240px" }}
  1851. />
  1852. <span className="mandatory">*</span>
  1853. </FormItem>
  1854. <FormItem
  1855. className="half-item"
  1856. {...formItemLayout}
  1857. label="首付金额(万元)"
  1858. >
  1859. <Input
  1860. placeholder="请输入实签首款金额"
  1861. ref="signFirstPayment"
  1862. value={this.state.firstAmount}
  1863. onChange={e => {
  1864. this.setState({ firstAmount: e.target.value });
  1865. }}
  1866. style={{ width: "240px" }}
  1867. />
  1868. <span className="mandatory">*</span>
  1869. </FormItem>
  1870. <FormItem
  1871. className="half-item"
  1872. {...formItemLayout}
  1873. label="特批立项"
  1874. >
  1875. <Select
  1876. placeholder="请选择客户所属类型"
  1877. style={{ width: "240px" }}
  1878. value={this.state.approval}
  1879. onChange={e => {
  1880. this.setState({ approval: e });
  1881. }}
  1882. >
  1883. {/* {tepi.map(function(item) {
  1884. return (
  1885. <Select.Option key={item.value}>
  1886. {item.key}
  1887. </Select.Option>
  1888. );
  1889. })} */}
  1890. <Select.Option key={0}>非特批</Select.Option>
  1891. <Select.Option key={1}>特批</Select.Option>
  1892. </Select>
  1893. </FormItem>
  1894. <FormItem
  1895. className="half-item"
  1896. {...formItemLayout}
  1897. label="合同签订时间"
  1898. >
  1899. <DatePicker
  1900. style={{
  1901. marginTop: "2px",
  1902. width: "240px",
  1903. height: "32px"
  1904. }}
  1905. showTime
  1906. format="YYYY-MM-DD"
  1907. onOk={() => {}}
  1908. value={
  1909. this.state.signDate
  1910. ? moment(this.state.signDate)
  1911. : null
  1912. }
  1913. onChange={(data, dataString) => {
  1914. this.setState({ signDate: dataString });
  1915. }}
  1916. />
  1917. </FormItem>
  1918. <FormItem
  1919. className="half-item"
  1920. {...formItemLayout}
  1921. label="订单部门"
  1922. >
  1923. <Select
  1924. placeholder="请输入订单部门"
  1925. style={{ width: 240 }}
  1926. value={this.state.organizationSearch}
  1927. onChange={e => {
  1928. this.setState({ organizationSearch: e });
  1929. }}
  1930. >
  1931. {departmentArr.map(function(item) {
  1932. return (
  1933. <Select.Option key={item.id}>
  1934. {item.name}
  1935. </Select.Option>
  1936. );
  1937. })}
  1938. </Select>
  1939. </FormItem>
  1940. <FormItem
  1941. className="half-item"
  1942. {...formItemLayout}
  1943. label="是否外包"
  1944. >
  1945. {this.state.outsource}
  1946. </FormItem>
  1947. <div className="clearfix">
  1948. <FormItem
  1949. labelCol={{ span: 4 }}
  1950. wrapperCol={{ span: 18 }}
  1951. label={
  1952. <span>
  1953. <strong style={{ color: "#f00" }}>*</strong>
  1954. 合同扫描件
  1955. </span>
  1956. }
  1957. >
  1958. <PicturesWall
  1959. fileList={this.getOrgCodeUrl}
  1960. pictureUrl={this.state.orgCodeUrl}
  1961. />
  1962. <p>图片建议:要清晰。</p>
  1963. <Button
  1964. style={{
  1965. float: "right",
  1966. marginRight: "140px",
  1967. marginTop: "20px"
  1968. }}
  1969. onClick={this.getOrderLog}
  1970. >
  1971. 查看订单 日志
  1972. </Button>
  1973. </FormItem>
  1974. </div>
  1975. <div className="clearfix">
  1976. <FormItem
  1977. labelCol={{ span: 4 }}
  1978. wrapperCol={{ span: 16 }}
  1979. label="订单留言"
  1980. >
  1981. <Input
  1982. type="textarea"
  1983. placeholder="请输入订单留言"
  1984. rows={4}
  1985. value={this.state.orderRemarks}
  1986. onChange={e => {
  1987. this.setState({ orderRemarks: e.target.value });
  1988. }}
  1989. />
  1990. </FormItem>
  1991. </div>
  1992. <div className="clearfix">
  1993. <FormItem
  1994. className="half-item"
  1995. {...formItemLayout}
  1996. label="订单负责人"
  1997. >
  1998. <span>{this.state.salesmanName}</span>
  1999. </FormItem>
  2000. <FormItem
  2001. className="half-item"
  2002. {...formItemLayout}
  2003. label="订单负责人电话"
  2004. >
  2005. <span>{this.state.salesmanMobile}</span>
  2006. </FormItem>
  2007. </div>
  2008. <div className="clearfix">
  2009. <FormItem
  2010. className="half-item"
  2011. {...formItemLayout}
  2012. label="当前财务负责人"
  2013. >
  2014. <span>{this.state.nowFinance}</span>
  2015. </FormItem>
  2016. <FormItem
  2017. className="half-item"
  2018. {...formItemLayout}
  2019. label="当前财务负责人电话"
  2020. >
  2021. <span>{this.state.nowFinanceMobile}</span>
  2022. </FormItem>
  2023. </div>
  2024. <div className="clearfix">
  2025. <FormItem
  2026. className="half-item"
  2027. {...formItemLayout}
  2028. style={{ opacity: ".5" }}
  2029. label="原订单负责人"
  2030. >
  2031. <span>{this.state.oldSalesmanName}</span>
  2032. </FormItem>
  2033. <FormItem
  2034. className="half-item"
  2035. {...formItemLayout}
  2036. style={{ opacity: ".5" }}
  2037. label="原订单负责人电话"
  2038. >
  2039. <span>{this.state.oldSalesmanMobile}</span>
  2040. </FormItem>
  2041. </div>
  2042. <div className="clearfix">
  2043. <FormItem
  2044. className="half-item"
  2045. style={{ opacity: ".5" }}
  2046. {...formItemLayout}
  2047. label="实际财务操作人"
  2048. >
  2049. <span>{this.state.financeName}</span>
  2050. </FormItem>
  2051. <FormItem
  2052. className="half-item"
  2053. {...formItemLayout}
  2054. style={{ opacity: ".5" }}
  2055. label="实际财务操作人电话"
  2056. >
  2057. <span>{this.state.financeMobile}</span>
  2058. </FormItem>
  2059. </div>
  2060. <div className="clearfix">
  2061. <FormItem
  2062. className="half-item"
  2063. {...formItemLayout}
  2064. label="驳回人"
  2065. >
  2066. <span>{this.state.initiateName}</span>
  2067. </FormItem>
  2068. <FormItem
  2069. className="half-item"
  2070. {...formItemLayout}
  2071. label="驳回时间"
  2072. >
  2073. <span>{this.state.backDate}</span>
  2074. </FormItem>
  2075. </div>
  2076. <div className="clearfix">
  2077. <FormItem
  2078. labelCol={{ span: 4 }}
  2079. wrapperCol={{ span: 16 }}
  2080. label="驳回原因"
  2081. >
  2082. <span>{this.state.reason}</span>
  2083. </FormItem>
  2084. </div>
  2085. <div
  2086. style={{ display: cuiDataList.length ? "block" : "none" }}
  2087. >
  2088. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2089. 旧催款节点
  2090. </span>
  2091. <Button
  2092. type="primary"
  2093. // onClick={this.addcontact}
  2094. disabled
  2095. onClick={e => {
  2096. cuiDataList.length
  2097. ? this.addcontact()
  2098. : this.addcontactNew();
  2099. }}
  2100. style={{
  2101. float: "right",
  2102. marginRight: "50px",
  2103. marginBottom: "15px"
  2104. }}
  2105. >
  2106. 添加催款节点
  2107. </Button>
  2108. </div>
  2109. <div
  2110. className="clearfix"
  2111. style={{ display: cuiDataList.length ? "block" : "none" }}
  2112. >
  2113. <Spin spinning={this.state.loading}>
  2114. <Form layout="horizontal" id="demand-form">
  2115. <Table
  2116. pagination={false}
  2117. columns={this.state.ContactsLists}
  2118. dataSource={this.state.contactList}
  2119. scroll={{ x: "max-content", y: 0 }}
  2120. />
  2121. <Col
  2122. span={24}
  2123. offset={9}
  2124. style={{ marginTop: "15px" }}
  2125. ></Col>
  2126. </Form>
  2127. </Spin>
  2128. </div>
  2129. <div>
  2130. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2131. 新催款节点
  2132. </span>
  2133. <Button
  2134. type="primary"
  2135. disabled={cuiDataList.length ? true : false}
  2136. // onClick={this.addcontact}
  2137. onClick={e => {
  2138. this.addcontactNew();
  2139. }}
  2140. style={{
  2141. float: "right",
  2142. marginRight: "50px",
  2143. marginBottom: "15px"
  2144. }}
  2145. >
  2146. 添加催款节点
  2147. </Button>
  2148. </div>
  2149. <div className="clearfix">
  2150. <Spin spinning={this.state.loading}>
  2151. <Form layout="horizontal" id="demand-form">
  2152. <Table
  2153. pagination={false}
  2154. columns={this.state.ContactsListsNew}
  2155. dataSource={this.state.contactListNew}
  2156. scroll={{ x: "max-content", y: 0 }}
  2157. />
  2158. <Col
  2159. span={24}
  2160. offset={9}
  2161. style={{ marginTop: "15px" }}
  2162. ></Col>
  2163. </Form>
  2164. </Spin>
  2165. </div>
  2166. <div>
  2167. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  2168. 项目业务
  2169. </span>
  2170. <Button
  2171. type="primary"
  2172. onClick={this.addDetailed}
  2173. style={{
  2174. float: "right",
  2175. marginRight: "50px",
  2176. marginBottom: "15px"
  2177. }}
  2178. >
  2179. 添加项目明细
  2180. </Button>
  2181. </div>
  2182. <div className="patent-table">
  2183. <Spin spinning={this.state.loading}>
  2184. <Table
  2185. columns={this.state.columnsX}
  2186. dataSource={this.state.dataSourceX}
  2187. pagination={this.state.paginations}
  2188. onRowClick={this.tableRowClickX}
  2189. />
  2190. </Spin>
  2191. </div>
  2192. <div className="addSave" style={{ marginTop: "15px" }}>
  2193. <Button
  2194. className="cancel"
  2195. type="primary"
  2196. onClick={this.examOk}
  2197. style={{ marginLeft: "200px" }}
  2198. htmlType="submit"
  2199. >
  2200. 重新提交
  2201. </Button>
  2202. <Button
  2203. className="cancel"
  2204. type="primary"
  2205. onClick={this.examOks}
  2206. style={{ marginLeft: "50px" }}
  2207. htmlType="submit"
  2208. >
  2209. 订单作废
  2210. </Button>
  2211. <Button
  2212. className="cancel"
  2213. type="ghost"
  2214. onClick={this.visitCancel}
  2215. style={{ marginLeft: "50px" }}
  2216. >
  2217. 取消
  2218. </Button>
  2219. </div>
  2220. </div>
  2221. </Spin>
  2222. </Form>
  2223. </Modal>
  2224. <Modal
  2225. maskClosable={false}
  2226. visible={this.state.addnextVisible}
  2227. onOk={this.nextCancel}
  2228. onCancel={this.nextCancel}
  2229. width="800px"
  2230. title={this.state.addState ? "添加项目任务" : "项目任务详情"}
  2231. footer=""
  2232. className="admin-desc-content"
  2233. >
  2234. <Form
  2235. layout="horizontal"
  2236. onSubmit={this.nextSubmit}
  2237. id="demand-form"
  2238. >
  2239. <Spin spinning={this.state.loading}>
  2240. {this.state.addState ? (
  2241. <div className="clearfix">
  2242. <FormItem
  2243. className="half-item"
  2244. {...formItemLayout}
  2245. label="服务名称"
  2246. >
  2247. <AutoComplete
  2248. className="certain-category-search"
  2249. dropdownClassName="certain-category-search-dropdown"
  2250. dropdownMatchSelectWidth={false}
  2251. dropdownStyle={{ width: 200 }}
  2252. style={{ width: "200px" }}
  2253. dataSource={options}
  2254. placeholder="输入服务名称"
  2255. value={this.state.commodityName}
  2256. onChange={this.httpChange}
  2257. filterOption={true}
  2258. onSelect={this.selectAuto}
  2259. >
  2260. <Input />
  2261. </AutoComplete>
  2262. <span className="mandatory">*</span>
  2263. </FormItem>
  2264. <FormItem
  2265. className="half-item"
  2266. {...formItemLayout}
  2267. label="服务数量"
  2268. >
  2269. <Input
  2270. placeholder="请输入服务数量"
  2271. value={this.state.commodityQuantity}
  2272. style={{ width: "200px" }}
  2273. onChange={e => {
  2274. this.setState({
  2275. commodityQuantity: e.target.value
  2276. });
  2277. }}
  2278. ref="commodityQuantity"
  2279. />
  2280. <span className="mandatory">*</span>
  2281. </FormItem>
  2282. <FormItem
  2283. className="half-item"
  2284. {...formItemLayout}
  2285. label="实签价格(万元)"
  2286. >
  2287. <Input
  2288. placeholder="请输入实签价格"
  2289. value={this.state.commodityPrice}
  2290. style={{ width: "200px" }}
  2291. onChange={e => {
  2292. this.setState({ commodityPrice: e.target.value });
  2293. }}
  2294. ref="commodityPrice"
  2295. />
  2296. <span className="mandatory">*</span>
  2297. </FormItem>
  2298. <FormItem
  2299. className="half-item"
  2300. {...formItemLayout}
  2301. label="主要业务"
  2302. >
  2303. <Select
  2304. placeholder="选择是否为主要业务"
  2305. style={{ width: "200px" }}
  2306. value={this.state.main}
  2307. onChange={e => {
  2308. this.setState({ main: e });
  2309. }}
  2310. >
  2311. {boutique.map(function(item) {
  2312. return (
  2313. <Select.Option key={item.value}>
  2314. {item.key}
  2315. </Select.Option>
  2316. );
  2317. })}
  2318. </Select>
  2319. <span className="mandatory">*</span>
  2320. </FormItem>
  2321. <div className="clearfix">
  2322. <FormItem
  2323. labelCol={{ span: 4 }}
  2324. wrapperCol={{ span: 16 }}
  2325. label="服务说明"
  2326. >
  2327. <Input
  2328. type="textarea"
  2329. placeholder="请输入服务说明"
  2330. value={this.state.taskComment}
  2331. onChange={e => {
  2332. this.setState({ taskComment: e.target.value });
  2333. }}
  2334. />
  2335. </FormItem>
  2336. </div>
  2337. <FormItem
  2338. wrapperCol={{ span: 12, offset: 4 }}
  2339. className="half-middle"
  2340. >
  2341. <Button
  2342. className="submitSave"
  2343. type="primary"
  2344. htmlType="submit"
  2345. >
  2346. 保存
  2347. </Button>
  2348. <Button
  2349. className="submitSave"
  2350. type="ghost"
  2351. onClick={this.nextCancel}
  2352. >
  2353. 取消
  2354. </Button>
  2355. </FormItem>
  2356. </div>
  2357. ) : (
  2358. <div className="clearfix">
  2359. <FormItem
  2360. className="half-item"
  2361. {...formItemLayout}
  2362. label="项目名称"
  2363. >
  2364. <span>{this.state.commodityName}</span>
  2365. </FormItem>
  2366. <FormItem
  2367. className="half-item"
  2368. {...formItemLayout}
  2369. label="项目数量"
  2370. >
  2371. <Input
  2372. placeholder="请输入数量"
  2373. value={this.state.commodityQuantity}
  2374. style={{ width: "200px" }}
  2375. onChange={e => {
  2376. this.setState({
  2377. commodityQuantity: e.target.value
  2378. });
  2379. }}
  2380. />
  2381. <span className="mandatory">*</span>
  2382. </FormItem>
  2383. <FormItem
  2384. className="half-item"
  2385. {...formItemLayout}
  2386. label="金额(万元)"
  2387. >
  2388. <Input
  2389. placeholder="请输入签单金额"
  2390. value={this.state.commodityPrice}
  2391. style={{ width: "200px" }}
  2392. onChange={e => {
  2393. this.setState({ commodityPrice: e.target.value });
  2394. }}
  2395. />
  2396. <span className="mandatory">*</span>
  2397. </FormItem>
  2398. <FormItem
  2399. className="half-item"
  2400. {...formItemLayout}
  2401. label="主要项目"
  2402. >
  2403. <Select
  2404. placeholder="选择是否为主要业务"
  2405. style={{ width: "200px" }}
  2406. value={this.state.main}
  2407. onChange={e => {
  2408. this.setState({ main: e });
  2409. }}
  2410. >
  2411. {boutique.map(function(item) {
  2412. return (
  2413. <Select.Option key={item.value}>
  2414. {item.key}
  2415. </Select.Option>
  2416. );
  2417. })}
  2418. </Select>
  2419. <span className="mandatory">*</span>
  2420. </FormItem>
  2421. <div className="clearfix">
  2422. <FormItem
  2423. labelCol={{ span: 4 }}
  2424. wrapperCol={{ span: 16 }}
  2425. label="服务说明"
  2426. >
  2427. <Input
  2428. type="textarea"
  2429. placeholder="请输入服务说明"
  2430. value={this.state.taskComment}
  2431. onChange={e => {
  2432. this.setState({ taskComment: e.target.value });
  2433. }}
  2434. />
  2435. </FormItem>
  2436. </div>
  2437. <FormItem
  2438. wrapperCol={{ span: 12, offset: 4 }}
  2439. className="half-middle"
  2440. >
  2441. <Button
  2442. className="submitSave"
  2443. type="primary"
  2444. onClick={this.tabRowSave}
  2445. >
  2446. 保存
  2447. </Button>
  2448. <Button
  2449. className="submitSave"
  2450. type="ghost"
  2451. onClick={this.nextCancel}
  2452. >
  2453. 取消
  2454. </Button>
  2455. </FormItem>
  2456. </div>
  2457. )}
  2458. </Spin>
  2459. </Form>
  2460. </Modal>
  2461. {/* <Modal
  2462. visible={this.state.rizhivisible}
  2463. className="admin-desc-content"
  2464. width="800px"
  2465. maskClosable={false}
  2466. title="订单日志"
  2467. footer={null}
  2468. onCancel={this.closeOrderLog}
  2469. >
  2470. <div className="patent-table">
  2471. <Spin spinning={this.state.loading}>
  2472. <Table
  2473. columns={this.state.columnsrizhi}
  2474. dataSource={this.state.dataSourcerizhi}
  2475. pagination={false}
  2476. />
  2477. </Spin>
  2478. </div>
  2479. </Modal> */}
  2480. <OrderRiZi
  2481. dataSourcerizhi={this.state.dataSourcerizhi}
  2482. closeOrderLog={this.closeOrderLog}
  2483. visible={this.state.rizhivisible}
  2484. loading={this.state.loading}
  2485. />
  2486. </div>
  2487. </div>
  2488. );
  2489. }
  2490. })
  2491. );
  2492. export default IntentionCustomer;