reject.jsx 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878
  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. //图片组件
  18. const PicturesWall = React.createClass({
  19. getInitialState() {
  20. return {
  21. previewVisible: false,
  22. previewImage: '',
  23. fileList: [],
  24. }
  25. },
  26. handleCancel() {
  27. this.setState({
  28. previewVisible: false
  29. })
  30. },
  31. handlePreview(file) {
  32. this.setState({
  33. previewImage: file.url || file.thumbUrl,
  34. previewVisible: true,
  35. });
  36. },
  37. handleChange(info) {
  38. let fileList = info.fileList;
  39. this.setState({
  40. fileList
  41. });
  42. this.props.fileList(fileList);
  43. },
  44. componentWillReceiveProps(nextProps) {
  45. this.state.fileList = nextProps.pictureUrl;
  46. this.state.pojectApplicationUrl = undefined;
  47. },
  48. render() {
  49. const {
  50. previewVisible,
  51. previewImage,
  52. fileList
  53. } = this.state;
  54. const uploadButton = (
  55. <div>
  56. <Icon type="plus" />
  57. <div className="ant-upload-text">点击上传</div>
  58. </div>
  59. );
  60. return(
  61. <div style={{display:"inline-block"}}>
  62. <Upload
  63. action={globalConfig.context + "/api/admin/customer/uploadCustomerImg"}
  64. data={{ 'sign': '' }}
  65. listType="picture-card"
  66. fileList={fileList}
  67. onPreview={this.handlePreview}
  68. onChange={this.handleChange} >
  69. {fileList.length >= 18 ? null : uploadButton}
  70. </Upload>
  71. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  72. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  73. </Modal>
  74. </div>
  75. );
  76. }
  77. });
  78. const IntentionCustomer = Form.create()(React.createClass({
  79. loadData(pageNo) {
  80. this.setState({
  81. visitModul:false,
  82. loading: true,
  83. ispage:pageNo,
  84. modalVisible:false
  85. });
  86. $.ajax({
  87. method: "get",
  88. dataType: "json",
  89. crossDomain: false,
  90. url: globalConfig.context +"/api/admin/newOrder/orderNewList",
  91. data: {
  92. pageNo: pageNo || 1,
  93. pageSize: this.state.pagination.pageSize,
  94. specially: 2,//审核列表
  95. name: this.state.customerName,//名称
  96. orderNo: this.state.orderNoSearch,//订单编号
  97. starTime: this.state.releaseDate[0],//开始时间
  98. endTime: this.state.releaseDate[1],//结束时间
  99. },
  100. success: function(data) {
  101. ShowModal(this)
  102. let theArr = [];
  103. if(data.error.length || data.data.list == "") {
  104. if(data.error && data.error.length) {
  105. message.warning(data.error[0].message);
  106. };
  107. } else {
  108. for(let i = 0; i < data.data.list.length; i++) {
  109. let thisdata = data.data.list[i];
  110. theArr.push({
  111. key: i,
  112. id: thisdata.id,//用户ID
  113. orderNo: thisdata.orderNo,//订单编号
  114. totalAmount:thisdata.totalAmount + "",//签单金额
  115. processStatus:thisdata.processStatus,//流程状态
  116. liquidationStatus:thisdata.liquidationStatus,//结算状态
  117. approval:thisdata.approval,//特批状态
  118. signDate:thisdata.signDate,//签单时间
  119. userName:thisdata.userName,//客户名称
  120. salesmanName:thisdata.salesmanName,//营销员名称
  121. financeName:thisdata.financeName,//财务名称
  122. createDate:thisdata.createDate,//下单时间
  123. initiateName:thisdata.initiateName,//驳回人
  124. reason:thisdata.reason,//驳回信息
  125. backDate:thisdata.backDate,//驳回日期
  126. backId:thisdata.backId,//驳回编号
  127. });
  128. };
  129. this.state.pagination.total = data.data.totalCount;
  130. this.state.pagination.current = data.data.pageNo;
  131. };
  132. if(data.data&&data.data.list&&!data.data.list.length){
  133. this.state.pagination.total=0
  134. }
  135. this.setState({
  136. dataSource: theArr,
  137. pageNo: pageNo,
  138. pagination: this.state.pagination,
  139. selectedRowKeys:[]
  140. });
  141. }.bind(this),
  142. }).always(function() {
  143. this.setState({
  144. loading: false
  145. });
  146. }.bind(this));
  147. },
  148. getInitialState() {
  149. return {
  150. page:1,
  151. releaseDate: [],
  152. selectedRowKeys: [],
  153. orgCodeUrl:[],
  154. customerArr:[],
  155. pagination: {
  156. defaultCurrent: 1,
  157. defaultPageSize: 10,
  158. showQuickJumper: true,
  159. pageSize: 10,
  160. onChange: function(page) {
  161. this.loadData(page);
  162. }.bind(this),
  163. showTotal: function(total) {
  164. return '共' + total + '条数据';
  165. }
  166. },
  167. columns: [
  168. {
  169. title: '驳回编号',
  170. dataIndex: 'backId',
  171. key: 'backId'
  172. },{
  173. title: '驳回日期',
  174. dataIndex: 'backDate',
  175. key: 'backDate'
  176. },{
  177. title: '下单时间',
  178. dataIndex: 'createDate',
  179. key: 'createDate'
  180. },{
  181. title: '订单编号',
  182. dataIndex: 'orderNo',
  183. key: 'orderNo'
  184. }, {
  185. title: '客户名称',
  186. dataIndex: 'userName',
  187. key: 'userName',
  188. render:(text)=>{
  189. return (text&&text.length>9?text.substr(0,9)+'...':text)
  190. }
  191. }, {
  192. title: '驳回人',
  193. dataIndex: 'initiateName',
  194. key: 'initiateName'
  195. },{
  196. title: '驳回原因',
  197. dataIndex: 'reason',
  198. key: 'reason',
  199. render:(text)=>{
  200. return (text&&text.length>24?text.substr(0,24)+'...':text)
  201. }
  202. }
  203. ],
  204. columnsrizhi:[
  205. {
  206. title:'流程',
  207. dataIndex: 'processName',
  208. key: 'processName'
  209. },
  210. {
  211. title:'操作人',
  212. dataIndex: 'adminName',
  213. key: 'adminName'
  214. },{
  215. title:'时间',
  216. dataIndex: 'createDate',
  217. key: 'createDate'
  218. }
  219. ],
  220. data: [],
  221. dataSource: [],
  222. columnsX: [
  223. {
  224. title: '业务项目名称',
  225. dataIndex: 'commodityName',
  226. key: 'commodityName'
  227. }, {
  228. title: '项目类别',
  229. dataIndex: 'cname',
  230. key: 'cname',
  231. },{
  232. title: '项目数量',
  233. dataIndex: 'commodityQuantity',
  234. key: 'commodityQuantity'
  235. }, {
  236. title: '金额(万元)',
  237. dataIndex: 'commodityPrice',
  238. key: 'commodityPrice'
  239. }, {
  240. title: '负责人',
  241. dataIndex: 'contacts',
  242. key: 'contacts'
  243. }, {
  244. title: '负责人电话',
  245. dataIndex: 'contactsMobile',
  246. key: 'contactsMobile'
  247. }, {
  248. title: '主要项目',
  249. dataIndex: 'main',
  250. key: 'main',
  251. render:(text)=>{
  252. return (text?'是':'否')
  253. }
  254. }, {
  255. title: '项目说明',
  256. dataIndex: 'taskComment',
  257. key: 'taskComment',
  258. render:(text)=>{
  259. return (text&&text.length>8?text.substr(0,8)+'…':text)
  260. }
  261. }, {
  262. title: '操作',
  263. dataIndex: 'ABC',
  264. key: 'ABC',
  265. render: (text, record) => {
  266. return <div>
  267. {this.state.processStatus==0?<Popconfirm title="是否删除?" onConfirm={()=>{this.delectRow(record)}} okText="是" cancelText="否">
  268. <Button onClick={(e) =>{ e.stopPropagation()}} type="danger">删除</Button>
  269. </Popconfirm>:""}
  270. </div>
  271. }
  272. }
  273. ],
  274. dataSourceX: [],
  275. ContactsLists: [{
  276. title: '催款科目',
  277. dataIndex: 'dunSubject',
  278. key: 'dunSubject',
  279. render: (text, record) => {
  280. return <Select placeholder="请选择催款科目" value={record.dunSubject} style={{width:'150px'}}
  281. onChange={(e) => { record.dunSubject = e; this.setState({ contactList: this.state.contactList }); }}>
  282. {
  283. jiedian.map(function (item) {
  284. return <Select.Option key={item.value} >{item.key}</Select.Option>
  285. })
  286. }
  287. </Select>
  288. }
  289. },{
  290. title: '金额(万)',
  291. dataIndex: 'money',
  292. key: 'money',
  293. render: (text, record) => {
  294. return <Input value={record.money} placeholder="请输入金额(必填项)" key={record.id} required="required"
  295. onChange={(e) => { record.money = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
  296. }
  297. }, {
  298. title: '催款状态',
  299. dataIndex: 'dunStatus',
  300. key: 'dunStatus',
  301. render:text=>{return getCuikuan(text)}
  302. },
  303. {
  304. title: '操作',
  305. dataIndex: 'dels',
  306. key: 'dels',
  307. render: (text, record) => {
  308. return <div>
  309. {<Popconfirm title="是否删除?" onConfirm={()=>{this.confirmDelet(record.key)}} okText="删除" cancelText="不删除">
  310. <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
  311. </Popconfirm>}
  312. {record.id?'': <Button type="primary" onClick={this.contactSave}>保存</Button>}
  313. </div>
  314. }
  315. }
  316. ],
  317. };
  318. },
  319. //删除
  320. delectRow(record) {
  321. this.setState({
  322. loading: true
  323. });
  324. $.ajax({
  325. method: "post",
  326. dataType: "json",
  327. crossDomain: false,
  328. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  329. data: {
  330. id:record.id
  331. }
  332. }).done(function (data) {
  333. if (!data.error.length) {
  334. message.success('删除成功!');
  335. this.setState({
  336. loading: false,
  337. });
  338. this.xiangmu(this.state.orderNo)
  339. this.loadData();
  340. } else {
  341. message.warning(data.error[0].message);
  342. };
  343. }.bind(this));
  344. },
  345. //页面加载函数
  346. componentWillMount() {
  347. this.loadData();
  348. },
  349. //整行点击
  350. tableRowClick(record) {
  351. this.setState({
  352. visible:true,
  353. });
  354. this.xiangqing(record.orderNo);
  355. this.xiangmu(record.orderNo);
  356. this.jiedian(record.orderNo);
  357. this.departmentList();
  358. },
  359. //点击打卡项目详情
  360. tableRowClickX(record) {
  361. this.setState({
  362. jid:record.id,//项目ID
  363. kid:record.commodityId,//商品ID
  364. commodityName:record.commodityName,//金额
  365. commodityPrice:record.commodityPrice,//金额
  366. commodityQuantity:record.commodityQuantity,//数量
  367. taskComment:record.taskComment,//备注
  368. main:record.main.toString(),//是否为主要
  369. addnextVisible:true,
  370. addState:0,
  371. });
  372. },
  373. //项目详情关闭
  374. nextCancel() {
  375. this.setState({
  376. addnextVisible: false
  377. })
  378. },
  379. //订单详情
  380. xiangqing(orderNos) {
  381. $.ajax({
  382. method: "get",
  383. dataType: "json",
  384. crossDomain: false,
  385. url: globalConfig.context +"/api/admin/newOrder/getOrderNewDetail",
  386. data: {
  387. orderNo:orderNos
  388. },
  389. success: function(data) {
  390. if(data.error.length || data.data.list == "") {
  391. if(data.error && data.error.length) {
  392. message.warning(data.error[0].message);
  393. };
  394. } else {
  395. let thisdata=data.data;
  396. if(thisdata.approval == 2) {
  397. thisdata.approval = "特批通过";
  398. }else if(thisdata.approval == 3) {
  399. thisdata.approval = "特批驳回";
  400. }
  401. this.setState({
  402. id: thisdata.id,
  403. kehuId: thisdata.buyerId,
  404. orderNo: thisdata.orderNo, //订单编号
  405. contractNo: thisdata.contractNo, //合同编号
  406. userName: thisdata.userName, //客户名称
  407. signDate: thisdata.signDate, //签单时间
  408. processStatus: thisdata.processStatus, //流程状态
  409. liquidationStatus: thisdata.liquidationStatus, //结算状态
  410. contacts: thisdata.contacts, //企业联系人
  411. contactMobile: thisdata.contactMobile, //联系人电话
  412. legalPerson: thisdata.legalPerson, //法人
  413. legalPersonTel: thisdata.legalPersonTel, //法人电话
  414. firstAmount: thisdata.firstAmount + "", //签单金额
  415. totalAmount: thisdata.totalAmount + "", //首付金额
  416. settlementAmount: thisdata.settlementAmount, //已收款项
  417. orderRemarks: thisdata.orderRemarks, //订单留言
  418. orgCodeUrl: thisdata.contractPictureUrl
  419. ? splitUrl(
  420. thisdata.contractPictureUrl,
  421. ",",
  422. globalConfig.avatarHost + "/upload"
  423. )
  424. : [], //图片地址
  425. salesmanName: thisdata.salesmanName, //营销员名称
  426. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  427. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  428. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  429. financeName: thisdata.financeName, //财务名称
  430. financeMobile: thisdata.financeMobile, //财务电话
  431. nowFinance: thisdata.nowFinance, //财务名称
  432. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  433. initiateName: thisdata.initiateName, //驳回人
  434. backDate: thisdata.backDate, //驳回时间
  435. reason: thisdata.reason, //驳回原因
  436. approval: thisdata.approval.toString(), //特批状态
  437. organizationSearch: thisdata.orderDep,
  438. //approval:thisdata.approval==0?thisdata.approval.toString():thisdata.approval,//特批状态
  439. outsource: thisdata.outsource == 0 ? "否" : "是"
  440. });
  441. };
  442. }.bind(this),
  443. }).always(function() {
  444. this.setState({
  445. loading: false
  446. });
  447. }.bind(this));
  448. },
  449. //项目列表
  450. xiangmu(orderNos) {
  451. $.ajax({
  452. method: "get",
  453. dataType: "json",
  454. crossDomain: false,
  455. url: globalConfig.context +"/api/admin/newOrder/getOrderTask",
  456. data: {
  457. orderNo:orderNos
  458. },
  459. success: function(data) {
  460. let theArr = [];
  461. if(data.error.length || data.data.list == "") {
  462. if(data.error && data.error.length) {
  463. message.warning(data.error[0].message);
  464. };
  465. } else {
  466. for (let i = 0; i < data.data.length; i++) {
  467. let thisdata = data.data[i];
  468. theArr.push({
  469. key: i,
  470. id:thisdata.id,
  471. orderNo:thisdata.orderNo,//订单编号
  472. commodityId:thisdata.commodityId,//项目ID
  473. commodityName:thisdata.commodityName,//项目名称
  474. cname:thisdata.cname,//项目类别
  475. commodityPrice:thisdata.commodityPrice,//项目价格
  476. commodityQuantity:thisdata.commodityQuantity,//项目数量
  477. main:thisdata.main,//是否为主要任务
  478. taskComment:thisdata.taskComment,//任务说明
  479. contacts:thisdata.contacts,//联系人
  480. contactsMobile:thisdata.contactsMobile,//联系人电话
  481. });
  482. };
  483. };
  484. this.setState({
  485. dataSourceX: theArr,
  486. paginations: false,
  487. });
  488. }.bind(this),
  489. }).always(function() {
  490. this.setState({
  491. loading: false
  492. });
  493. }.bind(this));
  494. },
  495. //节点列表
  496. jiedian(orderNos) {
  497. $.ajax({
  498. method: "get",
  499. dataType: "json",
  500. crossDomain: false,
  501. url: globalConfig.context +"/api/admin/newOrder/selectOrderDun",
  502. data: {
  503. orderNo:orderNos
  504. },
  505. success: function(data) {
  506. let theArr = [];
  507. let thisData=[];
  508. if(data.error.length || data.data.list == "") {
  509. if(data.error && data.error.length) {
  510. message.warning(data.error[0].message);
  511. };
  512. } else {
  513. for(let i = 0; i < data.data.length; i++) {
  514. thisData= data.data[i];
  515. theArr.push({
  516. key:i,
  517. dunSubject:thisData.dunSubject?thisData.dunSubject.toString():"",//催款科目
  518. id:thisData.id,//节点Id
  519. money:thisData.money,//催款金额
  520. dunStatus:thisData.dunStatus,//催款状态
  521. orderNo:thisData.orderNo,
  522. })
  523. }
  524. this.setState({
  525. contactList:theArr
  526. })
  527. };
  528. }.bind(this),
  529. }).always(function() {
  530. this.setState({
  531. loading: false
  532. });
  533. }.bind(this));
  534. },
  535. //催款节点保存
  536. contactSave() {
  537. for(let i = 0; i < this.state.contactList.length; i++) {
  538. if(moneyVerify(this.state.contactList[i].money)) {
  539. return
  540. }
  541. }
  542. this.setState({
  543. loading: true
  544. });
  545. $.ajax({
  546. url: globalConfig.context + '/api/admin/newOrder/createOrderDun',
  547. method: 'post',
  548. data: {
  549. orderNo: this.state.orderNo,
  550. orderDun: JSON.stringify(this.state.contactList)
  551. }
  552. }).done(function(data) {
  553. this.setState({
  554. loading: false
  555. });
  556. if(!data.error.length) {
  557. message.success('保存成功!');
  558. this.jiedian(this.state.orderNo);
  559. } else {
  560. message.warning(data.error[0].message);
  561. }
  562. }.bind(this));
  563. },
  564. //点击新增催款节点
  565. addcontact() {
  566. this.state.contactList.push({
  567. key:this.state.contactList.length,
  568. money: '',
  569. dunSubject:undefined,
  570. orderNo: this.state.orderNo,
  571. dunTarget:this.state.kehuId,
  572. });
  573. this.setState({
  574. contactList: this.state.contactList
  575. })
  576. },
  577. //删除收款节点
  578. confirmDelet(index) {
  579. this.state.contactList.splice(index,1);
  580. this.setState({
  581. contactList: this.state.contactList
  582. })
  583. this.contactSave();
  584. },
  585. //重新提交
  586. examOk(){
  587. if(this.state.flag) return
  588. this.setState({
  589. flag: true
  590. })
  591. let theorgCodeUrl = [];
  592. if (this.state.orgCodeUrl.length) {
  593. let picArr = [];
  594. this.state.orgCodeUrl.map(function (item) {
  595. if ( item.response && item.response.data && item.response.data.length ){
  596. picArr.push(item.response.data);
  597. }
  598. });
  599. theorgCodeUrl = picArr.join(",");
  600. };
  601. if (moneyVerify(this.state.totalAmount)) {
  602. this.setState({
  603. flag: false
  604. });
  605. return
  606. }
  607. if (moneyVerify(this.state.firstAmount)) {
  608. this.setState({
  609. flag: false
  610. });
  611. return;
  612. }
  613. if (!this.state.totalAmount) {
  614. message.warning("签单金额不能为空");
  615. this.refs.signFirstPayment.focus();
  616. this.setState({
  617. flag: false
  618. });
  619. return false;
  620. };
  621. if(!this.state.firstAmount){
  622. message.warning('首付金额不能为空');
  623. this.refs.signFirstPayment.focus()
  624. this.setState({
  625. flag: false
  626. });
  627. return false;
  628. };
  629. if(!theorgCodeUrl){
  630. message.warning('企业负责人不能为空');
  631. this.refs.signFirstPayment.focus()
  632. this.setState({
  633. flag: false
  634. });
  635. return false;
  636. };
  637. if (
  638. this.state.approval == "特批通过" ||
  639. this.state.approval == "特批驳回"
  640. ) {
  641. message.warning("特批状态不正确,请重新填写");
  642. this.setState({
  643. flag: false
  644. });
  645. return false;
  646. }
  647. $.ajax({
  648. method: "post",
  649. dataType: "json",
  650. crossDomain: false,
  651. url: globalConfig.context +"/api/admin/newOrder/updateServiceOrderNew",
  652. data: {
  653. orderNo: this.state.orderNo,//订单编号
  654. totalAmount: this.state.totalAmount,//总金额
  655. firstAmount: this.state.firstAmount,//首付
  656. isSubmit: 1,//保存草稿还是提交
  657. signDate: this.state.signDate,//签单日期
  658. contacts: this.state.contacts,//企业负责人
  659. contactMobile: this.state.contactMobile,//负责人联系方式
  660. legalPerson: this.state.legalPerson,//企业法人
  661. legalPersonTel: this.state.legalPersonTel,//企业法人联系电话
  662. approval: this.state.approval,//特批状态
  663. contractNo: this.state.contractNo,//合同编号
  664. orderRemarks: this.state.orderRemarks,//订单备注
  665. contractPictureUrl:theorgCodeUrl.length?theorgCodeUrl:'',
  666. orderDep:this.state.organizationSearch
  667. },
  668. success: function(data) {
  669. if(data.error.length || data.data.list == "") {
  670. if(data.error && data.error.length) {
  671. message.warning(data.error[0].message);
  672. };
  673. } else {
  674. message.success("该订单已重新提交~");
  675. this.setState({
  676. visible:false,
  677. flag: false
  678. });
  679. this.resets();
  680. this.loadData();
  681. };
  682. }.bind(this),
  683. }).always(function() {
  684. this.setState({
  685. loading: false
  686. });
  687. }.bind(this));
  688. },
  689. //重新提交
  690. examOks(){
  691. if(this.state.flag) return
  692. this.setState({
  693. flag: true
  694. })
  695. $.ajax({
  696. method: "post",
  697. dataType: "json",
  698. crossDomain: false,
  699. url: globalConfig.context +"/api/admin/newOrder/deleteOrderNew",
  700. data: {
  701. orderNo: this.state.orderNo,//订单编号
  702. },
  703. success: function(data) {
  704. if(data.error.length || data.data.list == "") {
  705. if(data.error && data.error.length) {
  706. message.warning(data.error[0].message);
  707. };
  708. } else {
  709. message.success("该订单已作废~");
  710. this.setState({
  711. visible:false,
  712. flag: false
  713. });
  714. this.resets();
  715. this.loadData();
  716. };
  717. }.bind(this),
  718. }).always(function() {
  719. this.setState({
  720. loading: false
  721. });
  722. }.bind(this));
  723. },
  724. departmentList() {
  725. this.setState({
  726. loading: true
  727. });
  728. $.ajax({
  729. method: "get",
  730. dataType: "json",
  731. crossDomain: false,
  732. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  733. data: {
  734. },
  735. success: function(data) {
  736. let thedata = data.data;
  737. let theArr = [];
  738. if(!thedata) {
  739. if(data.error && data.error.length) {
  740. message.warning(data.error[0].message);
  741. };
  742. thedata = {};
  743. } else {
  744. thedata.map(function(item, index) {
  745. theArr.push({
  746. key: index,
  747. name: item.name,
  748. id: item.id,
  749. depNo: item.depNo
  750. })
  751. })
  752. }
  753. this.setState({
  754. departmentArr: theArr,
  755. })
  756. console.log(this.state.departmentArr)
  757. }.bind(this),
  758. }).always(function() {
  759. this.setState({
  760. loading: false
  761. });
  762. }.bind(this));
  763. },
  764. //新建项目明细保存
  765. nextSubmit(e) {
  766. e.preventDefault();
  767. if(this.state.gid==undefined||!this.state.gid){
  768. message.warning('服务名称不匹配!');
  769. return false;
  770. };
  771. if (moneyVerify(this.state.commodityPrice)) {
  772. return
  773. }
  774. if (!this.state.commodityPrice) {
  775. message.warning("请输入金额!");
  776. this.refs.commodityPrice.focus();
  777. return false;
  778. };
  779. if(!this.state.commodityQuantity){
  780. message.warning('请输入商品数量!');
  781. this.refs.commodityQuantity.focus();
  782. return false;
  783. };
  784. if(!this.state.main){
  785. message.warning('请选择是否为主要项目!');
  786. this.refs.commodityQuantity.focus();
  787. return false;
  788. };
  789. this.setState({
  790. loading: true
  791. });
  792. let api=this.state.addState?'/api/admin/newOrder/addOrderTask':'/api/bianji';
  793. $.ajax({
  794. method: "POST",
  795. dataType: "json",
  796. crossDomain: false,
  797. url: globalConfig.context +api ,
  798. data: {
  799. commodityId:this.state.gid,//商品ID
  800. orderNo:this.state.orderNo,//订单编号
  801. commodityName:this.state.commodityName,//商品名称
  802. commodityQuantity:this.state.commodityQuantity,//商品数量
  803. commodityPrice:this.state.commodityPrice,//签单总价
  804. taskComment:this.state.taskComment,//服务说明
  805. main:this.state.main,//是否为主要项目
  806. }
  807. }).done(function(data) {
  808. this.setState({
  809. loading: false
  810. });
  811. if(!data.error.length) {
  812. message.success('保存成功!');
  813. this.nextCancel()
  814. this.xiangmu(this.state.orderNo)
  815. } else {
  816. message.warning(data.error[0].message);
  817. }
  818. }.bind(this));
  819. },
  820. rizhi(){
  821. console.log(this.state.orderNo)
  822. this.setState({
  823. loading:true
  824. })
  825. $.ajax({
  826. method: "get",
  827. dataType: "json",
  828. crossDomain: false,
  829. url: '/api/admin/newOrder/selectOrderLog',
  830. data: {
  831. orderNo:this.state.orderNo
  832. },
  833. success: function (data) {
  834. let theArr = [];
  835. let thisData = data.data;
  836. if (!thisData.length) {
  837. if (data.error && data.error.length) {
  838. message.warning(data.error[0].message);
  839. };
  840. thisData = {};
  841. }else{
  842. for(let i = 0; i < data.data.length; i++) {
  843. let thisdata = data.data[i];
  844. theArr.push({
  845. processName:thisdata.processName,
  846. adminName:thisdata.adminName,
  847. createDate:thisdata.createDate,
  848. });
  849. };
  850. };
  851. this.setState({
  852. dataSourcerizhi: theArr
  853. })
  854. }.bind(this),
  855. }).always(function () {
  856. this.setState({
  857. loading: false
  858. });
  859. }.bind(this));
  860. },
  861. //查看订单日志
  862. getOrderLog(){
  863. this.setState({
  864. rizhivisible:true
  865. })
  866. this.rizhi()
  867. },
  868. closeOrderLog(){
  869. this.setState({
  870. rizhivisible:false
  871. })
  872. },
  873. //点击签单
  874. handleCancels() {
  875. this.setState({
  876. isSubmit:1
  877. })
  878. },
  879. //点击签单
  880. handleCancelq() {
  881. this.setState({
  882. isSubmit:0
  883. })
  884. },
  885. resets(){
  886. this.state.orderNo='';
  887. this.state.customerName='';
  888. this.state.releaseDate[0] = undefined;
  889. this.state.releaseDate[1] = undefined;
  890. this.loadData();
  891. },
  892. //点击添加项目明细
  893. addDetailed(){
  894. this.setState({
  895. gid:'',
  896. customerArr:[],
  897. commodityName:'',
  898. commodityQuantity:'',
  899. commodityId:'',
  900. taskComment:'',
  901. main:undefined,
  902. commodityPrice:'',
  903. addState:1,
  904. addnextVisible: true
  905. })
  906. },
  907. //修改项目详情
  908. tabRowSave(e){
  909. e.preventDefault();
  910. if(!this.state.commodityPrice){
  911. message.warning('金额不能为空!');
  912. return false;
  913. };
  914. if(!this.state.commodityQuantity){
  915. message.warning('数量不能为空!');
  916. return false;
  917. };
  918. if(!this.state.main){
  919. message.warning('请选择是否为主要项目!');
  920. this.refs.commodityQuantity.focus();
  921. return false;
  922. };
  923. $.ajax({
  924. method: "POST",
  925. dataType: "json",
  926. crossDomain: false,
  927. url: globalConfig.context +'/api/admin/newOrder/updateOrderTask' ,
  928. data: {
  929. id:this.state.jid,//项目ID
  930. commodityId:this.state.kid,//商品ID
  931. orderNo:this.state.orderNo,//订单编号
  932. main:this.state.main,//是否为主要
  933. commodityPrice:this.state.commodityPrice,//金额
  934. commodityQuantity:this.state.commodityQuantity,//数量
  935. taskComment:this.state.taskComment//备注
  936. }
  937. }).done(function(data) {
  938. this.setState({
  939. loading: false
  940. });
  941. if(!data.error.length) {
  942. message.success('保存成功!');
  943. this.nextCancel()
  944. this.xiangmu(this.state.orderNo)
  945. //this.loaduser(this.props.datauser);
  946. this.loadData();
  947. } else {
  948. message.warning(data.error[0].message);
  949. }
  950. }.bind(this));
  951. },
  952. //搜索
  953. search() {
  954. this.setState({
  955. //signBillVisible:false
  956. })
  957. this.loadData();
  958. },
  959. getOrgCodeUrl(e) {
  960. this.setState({ orgCodeUrl: e });
  961. },
  962. //关闭详情
  963. visitCancel(){
  964. this.setState({
  965. visible:false
  966. })
  967. this.resets();
  968. },
  969. visitOk(){
  970. this.setState({
  971. visible:false
  972. })
  973. this.resets();
  974. },
  975. //客户
  976. selectAutoCUT(value){
  977. let autoIds;
  978. let fwList=this.state.customerArr;
  979. fwList.map(function(item){
  980. if(value==item.name){
  981. autoIds=item.id
  982. }
  983. })
  984. this.setState({
  985. customerName:value,
  986. autoId:autoIds
  987. })
  988. },
  989. //加载(自动补全)
  990. supervisor(e,state){ //客户名称与服务名称自动补全
  991. let api=state?'/api/admin/customer/getCustomerByName':'/api/admin/order/getBusinessProjectByName';
  992. $.ajax({
  993. method: "get",
  994. dataType: "json",
  995. crossDomain: false,
  996. url: globalConfig.context + api,
  997. data:state?{
  998. name:e,
  999. type:this.state.customType
  1000. }:{
  1001. businessName:e
  1002. },
  1003. success: function (data) {
  1004. let thedata=data.data;
  1005. if (!thedata) {
  1006. if (data.error && data.error.length) {
  1007. message.warning(data.error[0].message);
  1008. };
  1009. thedata = {};
  1010. };
  1011. this.setState({
  1012. states:state,
  1013. customerArr:thedata,
  1014. });
  1015. }.bind(this),
  1016. }).always(function () {
  1017. this.setState({
  1018. loading: false
  1019. });
  1020. }.bind(this));
  1021. },
  1022. //上级主管输入框失去焦点是判断客户是否存在
  1023. selectAuto(value){
  1024. let kid=[];
  1025. let fwList=this.state.customerArr;
  1026. fwList.map(function(item){
  1027. if(value==item.bname){
  1028. kid=item
  1029. }
  1030. })
  1031. this.setState({
  1032. commodityName:value,
  1033. gid:kid.id,
  1034. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  1035. commodityFirstPayment:kid.firstPayment==0?kid.firstPayment.toString():kid.firstPayment
  1036. })
  1037. },
  1038. //服务值改变时请求客户名称
  1039. httpChange(e){
  1040. this.state.gid='';
  1041. if(e.length>=1){
  1042. this.supervisor(e,false);
  1043. }
  1044. this.setState({
  1045. commodityName:e
  1046. })
  1047. },
  1048. render() {
  1049. const formItemLayout = {
  1050. labelCol: { span: 8 },
  1051. wrapperCol: { span: 14 },
  1052. };
  1053. const FormItem = Form.Item;
  1054. const { RangePicker } = DatePicker;
  1055. const rowSelection = {
  1056. selectedRowKeys: this.state.selectedRowKeys,
  1057. onChange: (selectedRowKeys, selectedRows) => {
  1058. this.setState({
  1059. modalVisible:false,
  1060. selectedRows: selectedRows.slice(-1),
  1061. selectedRowKeys: selectedRowKeys.slice(-1)
  1062. });
  1063. },
  1064. onSelect: (recordt) => {
  1065. this.setState({
  1066. modalVisible:false,
  1067. recordt: recordt.id
  1068. })
  1069. },
  1070. };
  1071. const dataSources=this.state.customerArr || [];
  1072. let departmentArr = this.state.departmentArr || [];
  1073. const options = this.state.states?dataSources.map((group) =>
  1074. <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
  1075. ):dataSources.map((group,index) =>
  1076. <Select.Option key={index} value={group.bname}>{group.bname}</Select.Option>
  1077. )
  1078. return (
  1079. <div className="user-content">
  1080. <ShowModalDiv ShowModal={this.state.showModal} />
  1081. <div className="content-title">
  1082. <span>订单审核</span>
  1083. </div>
  1084. <div className="user-search">
  1085. <Input
  1086. placeholder="客户名称"
  1087. style={{ width: "150px", marginBottom: "10px" }}
  1088. value={this.state.customerName}
  1089. onChange={e => {
  1090. this.setState({ customerName: e.target.value });
  1091. }}
  1092. />
  1093. <Input
  1094. placeholder="订单编号"
  1095. style={{ width: "150px" }}
  1096. value={this.state.orderNoSearch}
  1097. onChange={e => {
  1098. this.setState({ orderNoSearch: e.target.value });
  1099. }}
  1100. />
  1101. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1102. <RangePicker
  1103. value={[
  1104. this.state.releaseDate[0]
  1105. ? moment(this.state.releaseDate[0])
  1106. : null,
  1107. this.state.releaseDate[1]
  1108. ? moment(this.state.releaseDate[1])
  1109. : null
  1110. ]}
  1111. onChange={(data, dataString) => {
  1112. this.setState({ releaseDate: dataString });
  1113. }}
  1114. />
  1115. <Button
  1116. type="primary"
  1117. onClick={this.search}
  1118. style={{ marginLeft: "10px" }}
  1119. >
  1120. 搜索
  1121. </Button>
  1122. <Button onClick={this.resets}>重置</Button>
  1123. <div className="patent-table">
  1124. <Spin spinning={this.state.loading}>
  1125. <Table
  1126. columns={this.state.columns}
  1127. dataSource={this.state.dataSource}
  1128. rowSelection={rowSelection}
  1129. pagination={this.state.pagination}
  1130. onRowClick={this.tableRowClick}
  1131. />
  1132. </Spin>
  1133. </div>
  1134. <Modal
  1135. className="customeDetails"
  1136. footer=""
  1137. title="订单详情"
  1138. width="900px"
  1139. visible={this.state.visible}
  1140. onOk={this.visitOk}
  1141. onCancel={this.visitCancel}
  1142. >
  1143. <Form
  1144. layout="horizontal"
  1145. onSubmit={this.handleSubmit}
  1146. id="demand-form"
  1147. style={{ paddingBottom: "40px" }}
  1148. >
  1149. <Spin spinning={this.state.loading}>
  1150. <div className="clearfix">
  1151. <FormItem
  1152. className="half-item"
  1153. {...formItemLayout}
  1154. label="订单编号"
  1155. >
  1156. <span>{this.state.orderNo}</span>
  1157. </FormItem>
  1158. <FormItem
  1159. className="half-item"
  1160. {...formItemLayout}
  1161. label="合同编号"
  1162. >
  1163. <span>{this.state.contractNo}</span>
  1164. </FormItem>
  1165. <FormItem
  1166. className="half-item"
  1167. {...formItemLayout}
  1168. label="客户名称"
  1169. >
  1170. <span>{this.state.userName}</span>
  1171. </FormItem>
  1172. <FormItem
  1173. className="half-item"
  1174. {...formItemLayout}
  1175. label="流程状态"
  1176. >
  1177. <span>{getProcessStatus(this.state.processStatus)}</span>
  1178. </FormItem>
  1179. <FormItem
  1180. className="half-item"
  1181. {...formItemLayout}
  1182. label="结算状态"
  1183. >
  1184. <span>
  1185. {getLiquidationStatus(this.state.liquidationStatus)}
  1186. </span>
  1187. </FormItem>
  1188. <FormItem
  1189. className="half-item"
  1190. {...formItemLayout}
  1191. label="已收款项(万元)"
  1192. >
  1193. <span>{this.state.settlementAmount}</span>
  1194. </FormItem>
  1195. <FormItem
  1196. className="half-item"
  1197. {...formItemLayout}
  1198. label="企业联系人"
  1199. >
  1200. <Input
  1201. placeholder="请输入联系人"
  1202. ref="signTotalAmount"
  1203. value={this.state.contacts}
  1204. onChange={e => {
  1205. this.setState({ contacts: e.target.value });
  1206. }}
  1207. style={{ width: "240px" }}
  1208. />
  1209. </FormItem>
  1210. <FormItem
  1211. className="half-item"
  1212. {...formItemLayout}
  1213. label="联系人电话"
  1214. >
  1215. <Input
  1216. placeholder="请输入联系人电话"
  1217. ref="signTotalAmount"
  1218. value={this.state.contactMobile}
  1219. onChange={e => {
  1220. this.setState({ contactMobile: e.target.value });
  1221. }}
  1222. style={{ width: "240px" }}
  1223. />
  1224. </FormItem>
  1225. <FormItem
  1226. className="half-item"
  1227. {...formItemLayout}
  1228. label="企业法人"
  1229. >
  1230. <Input
  1231. placeholder="请输入法人"
  1232. ref="signTotalAmount"
  1233. value={this.state.legalPerson}
  1234. onChange={e => {
  1235. this.setState({ legalPerson: e.target.value });
  1236. }}
  1237. style={{ width: "240px" }}
  1238. />
  1239. </FormItem>
  1240. <FormItem
  1241. className="half-item"
  1242. {...formItemLayout}
  1243. label="法人电话"
  1244. >
  1245. <Input
  1246. placeholder="请输入法人电话"
  1247. ref="signTotalAmount"
  1248. value={this.state.legalPersonTel}
  1249. onChange={e => {
  1250. this.setState({ legalPersonTel: e.target.value });
  1251. }}
  1252. style={{ width: "240px" }}
  1253. />
  1254. </FormItem>
  1255. <FormItem
  1256. className="half-item"
  1257. {...formItemLayout}
  1258. label="签单金额(万元)"
  1259. >
  1260. <Input
  1261. placeholder="签单金额"
  1262. ref="signTotalAmount"
  1263. value={this.state.totalAmount}
  1264. onChange={e => {
  1265. this.setState({ totalAmount: e.target.value });
  1266. }}
  1267. style={{ width: "240px" }}
  1268. />
  1269. <span className="mandatory">*</span>
  1270. </FormItem>
  1271. <FormItem
  1272. className="half-item"
  1273. {...formItemLayout}
  1274. label="首付金额(万元)"
  1275. >
  1276. <Input
  1277. placeholder="请输入实签首款金额"
  1278. ref="signFirstPayment"
  1279. value={this.state.firstAmount}
  1280. onChange={e => {
  1281. this.setState({ firstAmount: e.target.value });
  1282. }}
  1283. style={{ width: "240px" }}
  1284. />
  1285. <span className="mandatory">*</span>
  1286. </FormItem>
  1287. <FormItem
  1288. className="half-item"
  1289. {...formItemLayout}
  1290. label="特批立项"
  1291. >
  1292. <Select
  1293. placeholder="请选择客户所属类型"
  1294. style={{ width: "240px" }}
  1295. value={this.state.approval}
  1296. onChange={e => {
  1297. this.setState({ approval: e });
  1298. }}
  1299. >
  1300. {/* {tepi.map(function(item) {
  1301. return (
  1302. <Select.Option key={item.value}>
  1303. {item.key}
  1304. </Select.Option>
  1305. );
  1306. })} */}
  1307. <Select.Option key={0}>非特批</Select.Option>
  1308. <Select.Option key={1}>特批</Select.Option>
  1309. </Select>
  1310. </FormItem>
  1311. <FormItem
  1312. className="half-item"
  1313. {...formItemLayout}
  1314. label="合同签订时间"
  1315. >
  1316. <DatePicker
  1317. style={{
  1318. marginTop: "2px",
  1319. width: "240px",
  1320. height: "32px"
  1321. }}
  1322. showTime
  1323. format="YYYY-MM-DD"
  1324. onOk={() => {}}
  1325. value={
  1326. this.state.signDate ? moment(this.state.signDate) : null
  1327. }
  1328. onChange={(data, dataString) => {
  1329. this.setState({ signDate: dataString });
  1330. }}
  1331. />
  1332. </FormItem>
  1333. <FormItem
  1334. className="half-item"
  1335. {...formItemLayout}
  1336. label="订单部门"
  1337. >
  1338. <Select
  1339. placeholder="请输入订单部门"
  1340. style={{ width: 240 }}
  1341. value={this.state.organizationSearch}
  1342. onChange={e => {
  1343. this.setState({ organizationSearch: e });
  1344. }}
  1345. >
  1346. {departmentArr.map(function(item) {
  1347. return (
  1348. <Select.Option key={item.id}>
  1349. {item.name}
  1350. </Select.Option>
  1351. );
  1352. })}
  1353. </Select>
  1354. </FormItem>
  1355. <FormItem
  1356. className="half-item"
  1357. {...formItemLayout}
  1358. label="是否外包"
  1359. >
  1360. {this.state.outsource}
  1361. </FormItem>
  1362. <div className="clearfix">
  1363. <FormItem
  1364. labelCol={{ span: 4 }}
  1365. wrapperCol={{ span: 18 }}
  1366. label={
  1367. <span>
  1368. <strong style={{ color: "#f00" }}>*</strong>合同扫描件
  1369. </span>
  1370. }
  1371. >
  1372. <PicturesWall
  1373. fileList={this.getOrgCodeUrl}
  1374. pictureUrl={this.state.orgCodeUrl}
  1375. />
  1376. <p>图片建议:要清晰。</p>
  1377. <Button
  1378. style={{
  1379. float: "right",
  1380. marginRight: "140px",
  1381. marginTop: "20px"
  1382. }}
  1383. onClick={this.getOrderLog}
  1384. >
  1385. 查看订单 日志
  1386. </Button>
  1387. </FormItem>
  1388. </div>
  1389. <div className="clearfix">
  1390. <FormItem
  1391. labelCol={{ span: 4 }}
  1392. wrapperCol={{ span: 16 }}
  1393. label="订单留言"
  1394. >
  1395. <Input
  1396. type="textarea"
  1397. placeholder="请输入订单留言"
  1398. rows={4}
  1399. value={this.state.orderRemarks}
  1400. onChange={e => {
  1401. this.setState({ orderRemarks: e.target.value });
  1402. }}
  1403. />
  1404. </FormItem>
  1405. </div>
  1406. <div className="clearfix">
  1407. <FormItem
  1408. className="half-item"
  1409. {...formItemLayout}
  1410. label="订单负责人"
  1411. >
  1412. <span>{this.state.salesmanName}</span>
  1413. </FormItem>
  1414. <FormItem
  1415. className="half-item"
  1416. {...formItemLayout}
  1417. label="订单负责人电话"
  1418. >
  1419. <span>{this.state.salesmanMobile}</span>
  1420. </FormItem>
  1421. </div>
  1422. <div className="clearfix">
  1423. <FormItem
  1424. className="half-item"
  1425. {...formItemLayout}
  1426. label="当前财务负责人"
  1427. >
  1428. <span>{this.state.nowFinance}</span>
  1429. </FormItem>
  1430. <FormItem
  1431. className="half-item"
  1432. {...formItemLayout}
  1433. label="当前财务负责人电话"
  1434. >
  1435. <span>{this.state.nowFinanceMobile}</span>
  1436. </FormItem>
  1437. </div>
  1438. <div className="clearfix">
  1439. <FormItem
  1440. className="half-item"
  1441. {...formItemLayout}
  1442. style={{ opacity: ".5" }}
  1443. label="原订单负责人"
  1444. >
  1445. <span>{this.state.oldSalesmanName}</span>
  1446. </FormItem>
  1447. <FormItem
  1448. className="half-item"
  1449. {...formItemLayout}
  1450. style={{ opacity: ".5" }}
  1451. label="原订单负责人电话"
  1452. >
  1453. <span>{this.state.oldSalesmanMobile}</span>
  1454. </FormItem>
  1455. </div>
  1456. <div className="clearfix">
  1457. <FormItem
  1458. className="half-item"
  1459. style={{ opacity: ".5" }}
  1460. {...formItemLayout}
  1461. label="实际财务操作人"
  1462. >
  1463. <span>{this.state.financeName}</span>
  1464. </FormItem>
  1465. <FormItem
  1466. className="half-item"
  1467. {...formItemLayout}
  1468. style={{ opacity: ".5" }}
  1469. label="实际财务操作人电话"
  1470. >
  1471. <span>{this.state.financeMobile}</span>
  1472. </FormItem>
  1473. </div>
  1474. <div className="clearfix">
  1475. <FormItem
  1476. className="half-item"
  1477. {...formItemLayout}
  1478. label="驳回人"
  1479. >
  1480. <span>{this.state.initiateName}</span>
  1481. </FormItem>
  1482. <FormItem
  1483. className="half-item"
  1484. {...formItemLayout}
  1485. label="驳回时间"
  1486. >
  1487. <span>{this.state.backDate}</span>
  1488. </FormItem>
  1489. </div>
  1490. <div className="clearfix">
  1491. <FormItem
  1492. labelCol={{ span: 4 }}
  1493. wrapperCol={{ span: 16 }}
  1494. label="驳回原因"
  1495. >
  1496. <span>{this.state.reason}</span>
  1497. </FormItem>
  1498. </div>
  1499. <div>
  1500. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1501. 催款节点
  1502. </span>
  1503. <Button
  1504. type="primary"
  1505. onClick={this.addcontact}
  1506. style={{
  1507. float: "right",
  1508. marginRight: "50px",
  1509. marginBottom: "15px"
  1510. }}
  1511. >
  1512. 添加催款节点
  1513. </Button>
  1514. </div>
  1515. <div className="clearfix">
  1516. <Spin spinning={this.state.loading}>
  1517. <Form layout="horizontal" id="demand-form">
  1518. <Table
  1519. pagination={false}
  1520. columns={this.state.ContactsLists}
  1521. dataSource={this.state.contactList}
  1522. />
  1523. <Col
  1524. span={24}
  1525. offset={9}
  1526. style={{ marginTop: "15px" }}
  1527. ></Col>
  1528. </Form>
  1529. </Spin>
  1530. </div>
  1531. <div>
  1532. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1533. 项目业务
  1534. </span>
  1535. <Button
  1536. type="primary"
  1537. onClick={this.addDetailed}
  1538. style={{
  1539. float: "right",
  1540. marginRight: "50px",
  1541. marginBottom: "15px"
  1542. }}
  1543. >
  1544. 添加项目明细
  1545. </Button>
  1546. </div>
  1547. <div className="patent-table">
  1548. <Spin spinning={this.state.loading}>
  1549. <Table
  1550. columns={this.state.columnsX}
  1551. dataSource={this.state.dataSourceX}
  1552. pagination={this.state.paginations}
  1553. onRowClick={this.tableRowClickX}
  1554. />
  1555. </Spin>
  1556. </div>
  1557. <div className="addSave" style={{ marginTop: "15px" }}>
  1558. <Button
  1559. className="cancel"
  1560. type="primary"
  1561. onClick={this.examOk}
  1562. style={{ marginLeft: "200px" }}
  1563. htmlType="submit"
  1564. >
  1565. 重新提交
  1566. </Button>
  1567. <Button
  1568. className="cancel"
  1569. type="primary"
  1570. onClick={this.examOks}
  1571. style={{ marginLeft: "50px" }}
  1572. htmlType="submit"
  1573. >
  1574. 订单作废
  1575. </Button>
  1576. <Button
  1577. className="cancel"
  1578. type="ghost"
  1579. onClick={this.visitCancel}
  1580. style={{ marginLeft: "50px" }}
  1581. >
  1582. 取消
  1583. </Button>
  1584. </div>
  1585. </div>
  1586. </Spin>
  1587. </Form>
  1588. </Modal>
  1589. <Modal
  1590. maskClosable={false}
  1591. visible={this.state.addnextVisible}
  1592. onOk={this.nextCancel}
  1593. onCancel={this.nextCancel}
  1594. width="800px"
  1595. title={this.state.addState ? "添加项目任务" : "项目任务详情"}
  1596. footer=""
  1597. className="admin-desc-content"
  1598. >
  1599. <Form
  1600. layout="horizontal"
  1601. onSubmit={this.nextSubmit}
  1602. id="demand-form"
  1603. >
  1604. <Spin spinning={this.state.loading}>
  1605. {this.state.addState ? (
  1606. <div className="clearfix">
  1607. <FormItem
  1608. className="half-item"
  1609. {...formItemLayout}
  1610. label="服务名称"
  1611. >
  1612. <AutoComplete
  1613. className="certain-category-search"
  1614. dropdownClassName="certain-category-search-dropdown"
  1615. dropdownMatchSelectWidth={false}
  1616. dropdownStyle={{ width: 200 }}
  1617. style={{ width: "200px" }}
  1618. dataSource={options}
  1619. placeholder="输入服务名称"
  1620. value={this.state.commodityName}
  1621. onChange={this.httpChange}
  1622. filterOption={true}
  1623. onSelect={this.selectAuto}
  1624. >
  1625. <Input />
  1626. </AutoComplete>
  1627. <span className="mandatory">*</span>
  1628. </FormItem>
  1629. <FormItem
  1630. className="half-item"
  1631. {...formItemLayout}
  1632. label="服务数量"
  1633. >
  1634. <Input
  1635. placeholder="请输入服务数量"
  1636. value={this.state.commodityQuantity}
  1637. style={{ width: "200px" }}
  1638. onChange={e => {
  1639. this.setState({ commodityQuantity: e.target.value });
  1640. }}
  1641. ref="commodityQuantity"
  1642. />
  1643. <span className="mandatory">*</span>
  1644. </FormItem>
  1645. <FormItem
  1646. className="half-item"
  1647. {...formItemLayout}
  1648. label="实签价格(万元)"
  1649. >
  1650. <Input
  1651. placeholder="请输入实签价格"
  1652. value={this.state.commodityPrice}
  1653. style={{ width: "200px" }}
  1654. onChange={e => {
  1655. this.setState({ commodityPrice: e.target.value });
  1656. }}
  1657. ref="commodityPrice"
  1658. />
  1659. <span className="mandatory">*</span>
  1660. </FormItem>
  1661. <FormItem
  1662. className="half-item"
  1663. {...formItemLayout}
  1664. label="主要业务"
  1665. >
  1666. <Select
  1667. placeholder="选择是否为主要业务"
  1668. style={{ width: "200px" }}
  1669. value={this.state.main}
  1670. onChange={e => {
  1671. this.setState({ main: e });
  1672. }}
  1673. >
  1674. {boutique.map(function(item) {
  1675. return (
  1676. <Select.Option key={item.value}>
  1677. {item.key}
  1678. </Select.Option>
  1679. );
  1680. })}
  1681. </Select>
  1682. <span className="mandatory">*</span>
  1683. </FormItem>
  1684. <div className="clearfix">
  1685. <FormItem
  1686. labelCol={{ span: 4 }}
  1687. wrapperCol={{ span: 16 }}
  1688. label="服务说明"
  1689. >
  1690. <Input
  1691. type="textarea"
  1692. placeholder="请输入服务说明"
  1693. value={this.state.taskComment}
  1694. onChange={e => {
  1695. this.setState({ taskComment: e.target.value });
  1696. }}
  1697. />
  1698. </FormItem>
  1699. </div>
  1700. <FormItem
  1701. wrapperCol={{ span: 12, offset: 4 }}
  1702. className="half-middle"
  1703. >
  1704. <Button
  1705. className="submitSave"
  1706. type="primary"
  1707. htmlType="submit"
  1708. >
  1709. 保存
  1710. </Button>
  1711. <Button
  1712. className="submitSave"
  1713. type="ghost"
  1714. onClick={this.nextCancel}
  1715. >
  1716. 取消
  1717. </Button>
  1718. </FormItem>
  1719. </div>
  1720. ) : (
  1721. <div className="clearfix">
  1722. <FormItem
  1723. className="half-item"
  1724. {...formItemLayout}
  1725. label="项目名称"
  1726. >
  1727. <span>{this.state.commodityName}</span>
  1728. </FormItem>
  1729. <FormItem
  1730. className="half-item"
  1731. {...formItemLayout}
  1732. label="项目数量"
  1733. >
  1734. <Input
  1735. placeholder="请输入数量"
  1736. value={this.state.commodityQuantity}
  1737. style={{ width: "200px" }}
  1738. onChange={e => {
  1739. this.setState({ commodityQuantity: e.target.value });
  1740. }}
  1741. />
  1742. <span className="mandatory">*</span>
  1743. </FormItem>
  1744. <FormItem
  1745. className="half-item"
  1746. {...formItemLayout}
  1747. label="金额(万元)"
  1748. >
  1749. <Input
  1750. placeholder="请输入签单金额"
  1751. value={this.state.commodityPrice}
  1752. style={{ width: "200px" }}
  1753. onChange={e => {
  1754. this.setState({ commodityPrice: e.target.value });
  1755. }}
  1756. />
  1757. <span className="mandatory">*</span>
  1758. </FormItem>
  1759. <FormItem
  1760. className="half-item"
  1761. {...formItemLayout}
  1762. label="主要项目"
  1763. >
  1764. <Select
  1765. placeholder="选择是否为主要业务"
  1766. style={{ width: "200px" }}
  1767. value={this.state.main}
  1768. onChange={e => {
  1769. this.setState({ main: e });
  1770. }}
  1771. >
  1772. {boutique.map(function(item) {
  1773. return (
  1774. <Select.Option key={item.value}>
  1775. {item.key}
  1776. </Select.Option>
  1777. );
  1778. })}
  1779. </Select>
  1780. <span className="mandatory">*</span>
  1781. </FormItem>
  1782. <div className="clearfix">
  1783. <FormItem
  1784. labelCol={{ span: 4 }}
  1785. wrapperCol={{ span: 16 }}
  1786. label="服务说明"
  1787. >
  1788. <Input
  1789. type="textarea"
  1790. placeholder="请输入服务说明"
  1791. value={this.state.taskComment}
  1792. onChange={e => {
  1793. this.setState({ taskComment: e.target.value });
  1794. }}
  1795. />
  1796. </FormItem>
  1797. </div>
  1798. <FormItem
  1799. wrapperCol={{ span: 12, offset: 4 }}
  1800. className="half-middle"
  1801. >
  1802. <Button
  1803. className="submitSave"
  1804. type="primary"
  1805. onClick={this.tabRowSave}
  1806. >
  1807. 保存
  1808. </Button>
  1809. <Button
  1810. className="submitSave"
  1811. type="ghost"
  1812. onClick={this.nextCancel}
  1813. >
  1814. 取消
  1815. </Button>
  1816. </FormItem>
  1817. </div>
  1818. )}
  1819. </Spin>
  1820. </Form>
  1821. </Modal>
  1822. {/* <Modal
  1823. visible={this.state.rizhivisible}
  1824. className="admin-desc-content"
  1825. width="800px"
  1826. maskClosable={false}
  1827. title="订单日志"
  1828. footer={null}
  1829. onCancel={this.closeOrderLog}
  1830. >
  1831. <div className="patent-table">
  1832. <Spin spinning={this.state.loading}>
  1833. <Table
  1834. columns={this.state.columnsrizhi}
  1835. dataSource={this.state.dataSourcerizhi}
  1836. pagination={false}
  1837. />
  1838. </Spin>
  1839. </div>
  1840. </Modal> */}
  1841. <OrderRiZi
  1842. dataSourcerizhi={this.state.dataSourcerizhi}
  1843. closeOrderLog={this.closeOrderLog}
  1844. visible={this.state.rizhivisible}
  1845. loading={this.state.loading}
  1846. />
  1847. </div>
  1848. </div>
  1849. );
  1850. }
  1851. }));
  1852. export default IntentionCustomer;