reject.jsx 60 KB

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