reject.jsx 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880
  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. bordered
  1132. size="small"
  1133. />
  1134. </Spin>
  1135. </div>
  1136. <Modal
  1137. className="customeDetails"
  1138. footer=""
  1139. title="订单详情"
  1140. width="900px"
  1141. visible={this.state.visible}
  1142. onOk={this.visitOk}
  1143. onCancel={this.visitCancel}
  1144. >
  1145. <Form
  1146. layout="horizontal"
  1147. onSubmit={this.handleSubmit}
  1148. id="demand-form"
  1149. style={{ paddingBottom: "40px" }}
  1150. >
  1151. <Spin spinning={this.state.loading}>
  1152. <div className="clearfix">
  1153. <FormItem
  1154. className="half-item"
  1155. {...formItemLayout}
  1156. label="订单编号"
  1157. >
  1158. <span>{this.state.orderNo}</span>
  1159. </FormItem>
  1160. <FormItem
  1161. className="half-item"
  1162. {...formItemLayout}
  1163. label="合同编号"
  1164. >
  1165. <span>{this.state.contractNo}</span>
  1166. </FormItem>
  1167. <FormItem
  1168. className="half-item"
  1169. {...formItemLayout}
  1170. label="客户名称"
  1171. >
  1172. <span>{this.state.userName}</span>
  1173. </FormItem>
  1174. <FormItem
  1175. className="half-item"
  1176. {...formItemLayout}
  1177. label="流程状态"
  1178. >
  1179. <span>{getProcessStatus(this.state.processStatus)}</span>
  1180. </FormItem>
  1181. <FormItem
  1182. className="half-item"
  1183. {...formItemLayout}
  1184. label="结算状态"
  1185. >
  1186. <span>
  1187. {getLiquidationStatus(this.state.liquidationStatus)}
  1188. </span>
  1189. </FormItem>
  1190. <FormItem
  1191. className="half-item"
  1192. {...formItemLayout}
  1193. label="已收款项(万元)"
  1194. >
  1195. <span>{this.state.settlementAmount}</span>
  1196. </FormItem>
  1197. <FormItem
  1198. className="half-item"
  1199. {...formItemLayout}
  1200. label="企业联系人"
  1201. >
  1202. <Input
  1203. placeholder="请输入联系人"
  1204. ref="signTotalAmount"
  1205. value={this.state.contacts}
  1206. onChange={e => {
  1207. this.setState({ contacts: e.target.value });
  1208. }}
  1209. style={{ width: "240px" }}
  1210. />
  1211. </FormItem>
  1212. <FormItem
  1213. className="half-item"
  1214. {...formItemLayout}
  1215. label="联系人电话"
  1216. >
  1217. <Input
  1218. placeholder="请输入联系人电话"
  1219. ref="signTotalAmount"
  1220. value={this.state.contactMobile}
  1221. onChange={e => {
  1222. this.setState({ contactMobile: e.target.value });
  1223. }}
  1224. style={{ width: "240px" }}
  1225. />
  1226. </FormItem>
  1227. <FormItem
  1228. className="half-item"
  1229. {...formItemLayout}
  1230. label="企业法人"
  1231. >
  1232. <Input
  1233. placeholder="请输入法人"
  1234. ref="signTotalAmount"
  1235. value={this.state.legalPerson}
  1236. onChange={e => {
  1237. this.setState({ legalPerson: e.target.value });
  1238. }}
  1239. style={{ width: "240px" }}
  1240. />
  1241. </FormItem>
  1242. <FormItem
  1243. className="half-item"
  1244. {...formItemLayout}
  1245. label="法人电话"
  1246. >
  1247. <Input
  1248. placeholder="请输入法人电话"
  1249. ref="signTotalAmount"
  1250. value={this.state.legalPersonTel}
  1251. onChange={e => {
  1252. this.setState({ legalPersonTel: e.target.value });
  1253. }}
  1254. style={{ width: "240px" }}
  1255. />
  1256. </FormItem>
  1257. <FormItem
  1258. className="half-item"
  1259. {...formItemLayout}
  1260. label="签单金额(万元)"
  1261. >
  1262. <Input
  1263. placeholder="签单金额"
  1264. ref="signTotalAmount"
  1265. value={this.state.totalAmount}
  1266. onChange={e => {
  1267. this.setState({ totalAmount: e.target.value });
  1268. }}
  1269. style={{ width: "240px" }}
  1270. />
  1271. <span className="mandatory">*</span>
  1272. </FormItem>
  1273. <FormItem
  1274. className="half-item"
  1275. {...formItemLayout}
  1276. label="首付金额(万元)"
  1277. >
  1278. <Input
  1279. placeholder="请输入实签首款金额"
  1280. ref="signFirstPayment"
  1281. value={this.state.firstAmount}
  1282. onChange={e => {
  1283. this.setState({ firstAmount: e.target.value });
  1284. }}
  1285. style={{ width: "240px" }}
  1286. />
  1287. <span className="mandatory">*</span>
  1288. </FormItem>
  1289. <FormItem
  1290. className="half-item"
  1291. {...formItemLayout}
  1292. label="特批立项"
  1293. >
  1294. <Select
  1295. placeholder="请选择客户所属类型"
  1296. style={{ width: "240px" }}
  1297. value={this.state.approval}
  1298. onChange={e => {
  1299. this.setState({ approval: e });
  1300. }}
  1301. >
  1302. {/* {tepi.map(function(item) {
  1303. return (
  1304. <Select.Option key={item.value}>
  1305. {item.key}
  1306. </Select.Option>
  1307. );
  1308. })} */}
  1309. <Select.Option key={0}>非特批</Select.Option>
  1310. <Select.Option key={1}>特批</Select.Option>
  1311. </Select>
  1312. </FormItem>
  1313. <FormItem
  1314. className="half-item"
  1315. {...formItemLayout}
  1316. label="合同签订时间"
  1317. >
  1318. <DatePicker
  1319. style={{
  1320. marginTop: "2px",
  1321. width: "240px",
  1322. height: "32px"
  1323. }}
  1324. showTime
  1325. format="YYYY-MM-DD"
  1326. onOk={() => {}}
  1327. value={
  1328. this.state.signDate ? moment(this.state.signDate) : null
  1329. }
  1330. onChange={(data, dataString) => {
  1331. this.setState({ signDate: dataString });
  1332. }}
  1333. />
  1334. </FormItem>
  1335. <FormItem
  1336. className="half-item"
  1337. {...formItemLayout}
  1338. label="订单部门"
  1339. >
  1340. <Select
  1341. placeholder="请输入订单部门"
  1342. style={{ width: 240 }}
  1343. value={this.state.organizationSearch}
  1344. onChange={e => {
  1345. this.setState({ organizationSearch: e });
  1346. }}
  1347. >
  1348. {departmentArr.map(function(item) {
  1349. return (
  1350. <Select.Option key={item.id}>
  1351. {item.name}
  1352. </Select.Option>
  1353. );
  1354. })}
  1355. </Select>
  1356. </FormItem>
  1357. <FormItem
  1358. className="half-item"
  1359. {...formItemLayout}
  1360. label="是否外包"
  1361. >
  1362. {this.state.outsource}
  1363. </FormItem>
  1364. <div className="clearfix">
  1365. <FormItem
  1366. labelCol={{ span: 4 }}
  1367. wrapperCol={{ span: 18 }}
  1368. label={
  1369. <span>
  1370. <strong style={{ color: "#f00" }}>*</strong>合同扫描件
  1371. </span>
  1372. }
  1373. >
  1374. <PicturesWall
  1375. fileList={this.getOrgCodeUrl}
  1376. pictureUrl={this.state.orgCodeUrl}
  1377. />
  1378. <p>图片建议:要清晰。</p>
  1379. <Button
  1380. style={{
  1381. float: "right",
  1382. marginRight: "140px",
  1383. marginTop: "20px"
  1384. }}
  1385. onClick={this.getOrderLog}
  1386. >
  1387. 查看订单 日志
  1388. </Button>
  1389. </FormItem>
  1390. </div>
  1391. <div className="clearfix">
  1392. <FormItem
  1393. labelCol={{ span: 4 }}
  1394. wrapperCol={{ span: 16 }}
  1395. label="订单留言"
  1396. >
  1397. <Input
  1398. type="textarea"
  1399. placeholder="请输入订单留言"
  1400. rows={4}
  1401. value={this.state.orderRemarks}
  1402. onChange={e => {
  1403. this.setState({ orderRemarks: e.target.value });
  1404. }}
  1405. />
  1406. </FormItem>
  1407. </div>
  1408. <div className="clearfix">
  1409. <FormItem
  1410. className="half-item"
  1411. {...formItemLayout}
  1412. label="订单负责人"
  1413. >
  1414. <span>{this.state.salesmanName}</span>
  1415. </FormItem>
  1416. <FormItem
  1417. className="half-item"
  1418. {...formItemLayout}
  1419. label="订单负责人电话"
  1420. >
  1421. <span>{this.state.salesmanMobile}</span>
  1422. </FormItem>
  1423. </div>
  1424. <div className="clearfix">
  1425. <FormItem
  1426. className="half-item"
  1427. {...formItemLayout}
  1428. label="当前财务负责人"
  1429. >
  1430. <span>{this.state.nowFinance}</span>
  1431. </FormItem>
  1432. <FormItem
  1433. className="half-item"
  1434. {...formItemLayout}
  1435. label="当前财务负责人电话"
  1436. >
  1437. <span>{this.state.nowFinanceMobile}</span>
  1438. </FormItem>
  1439. </div>
  1440. <div className="clearfix">
  1441. <FormItem
  1442. className="half-item"
  1443. {...formItemLayout}
  1444. style={{ opacity: ".5" }}
  1445. label="原订单负责人"
  1446. >
  1447. <span>{this.state.oldSalesmanName}</span>
  1448. </FormItem>
  1449. <FormItem
  1450. className="half-item"
  1451. {...formItemLayout}
  1452. style={{ opacity: ".5" }}
  1453. label="原订单负责人电话"
  1454. >
  1455. <span>{this.state.oldSalesmanMobile}</span>
  1456. </FormItem>
  1457. </div>
  1458. <div className="clearfix">
  1459. <FormItem
  1460. className="half-item"
  1461. style={{ opacity: ".5" }}
  1462. {...formItemLayout}
  1463. label="实际财务操作人"
  1464. >
  1465. <span>{this.state.financeName}</span>
  1466. </FormItem>
  1467. <FormItem
  1468. className="half-item"
  1469. {...formItemLayout}
  1470. style={{ opacity: ".5" }}
  1471. label="实际财务操作人电话"
  1472. >
  1473. <span>{this.state.financeMobile}</span>
  1474. </FormItem>
  1475. </div>
  1476. <div className="clearfix">
  1477. <FormItem
  1478. className="half-item"
  1479. {...formItemLayout}
  1480. label="驳回人"
  1481. >
  1482. <span>{this.state.initiateName}</span>
  1483. </FormItem>
  1484. <FormItem
  1485. className="half-item"
  1486. {...formItemLayout}
  1487. label="驳回时间"
  1488. >
  1489. <span>{this.state.backDate}</span>
  1490. </FormItem>
  1491. </div>
  1492. <div className="clearfix">
  1493. <FormItem
  1494. labelCol={{ span: 4 }}
  1495. wrapperCol={{ span: 16 }}
  1496. label="驳回原因"
  1497. >
  1498. <span>{this.state.reason}</span>
  1499. </FormItem>
  1500. </div>
  1501. <div>
  1502. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1503. 催款节点
  1504. </span>
  1505. <Button
  1506. type="primary"
  1507. onClick={this.addcontact}
  1508. style={{
  1509. float: "right",
  1510. marginRight: "50px",
  1511. marginBottom: "15px"
  1512. }}
  1513. >
  1514. 添加催款节点
  1515. </Button>
  1516. </div>
  1517. <div className="clearfix">
  1518. <Spin spinning={this.state.loading}>
  1519. <Form layout="horizontal" id="demand-form">
  1520. <Table
  1521. pagination={false}
  1522. columns={this.state.ContactsLists}
  1523. dataSource={this.state.contactList}
  1524. />
  1525. <Col
  1526. span={24}
  1527. offset={9}
  1528. style={{ marginTop: "15px" }}
  1529. ></Col>
  1530. </Form>
  1531. </Spin>
  1532. </div>
  1533. <div>
  1534. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  1535. 项目业务
  1536. </span>
  1537. <Button
  1538. type="primary"
  1539. onClick={this.addDetailed}
  1540. style={{
  1541. float: "right",
  1542. marginRight: "50px",
  1543. marginBottom: "15px"
  1544. }}
  1545. >
  1546. 添加项目明细
  1547. </Button>
  1548. </div>
  1549. <div className="patent-table">
  1550. <Spin spinning={this.state.loading}>
  1551. <Table
  1552. columns={this.state.columnsX}
  1553. dataSource={this.state.dataSourceX}
  1554. pagination={this.state.paginations}
  1555. onRowClick={this.tableRowClickX}
  1556. />
  1557. </Spin>
  1558. </div>
  1559. <div className="addSave" style={{ marginTop: "15px" }}>
  1560. <Button
  1561. className="cancel"
  1562. type="primary"
  1563. onClick={this.examOk}
  1564. style={{ marginLeft: "200px" }}
  1565. htmlType="submit"
  1566. >
  1567. 重新提交
  1568. </Button>
  1569. <Button
  1570. className="cancel"
  1571. type="primary"
  1572. onClick={this.examOks}
  1573. style={{ marginLeft: "50px" }}
  1574. htmlType="submit"
  1575. >
  1576. 订单作废
  1577. </Button>
  1578. <Button
  1579. className="cancel"
  1580. type="ghost"
  1581. onClick={this.visitCancel}
  1582. style={{ marginLeft: "50px" }}
  1583. >
  1584. 取消
  1585. </Button>
  1586. </div>
  1587. </div>
  1588. </Spin>
  1589. </Form>
  1590. </Modal>
  1591. <Modal
  1592. maskClosable={false}
  1593. visible={this.state.addnextVisible}
  1594. onOk={this.nextCancel}
  1595. onCancel={this.nextCancel}
  1596. width="800px"
  1597. title={this.state.addState ? "添加项目任务" : "项目任务详情"}
  1598. footer=""
  1599. className="admin-desc-content"
  1600. >
  1601. <Form
  1602. layout="horizontal"
  1603. onSubmit={this.nextSubmit}
  1604. id="demand-form"
  1605. >
  1606. <Spin spinning={this.state.loading}>
  1607. {this.state.addState ? (
  1608. <div className="clearfix">
  1609. <FormItem
  1610. className="half-item"
  1611. {...formItemLayout}
  1612. label="服务名称"
  1613. >
  1614. <AutoComplete
  1615. className="certain-category-search"
  1616. dropdownClassName="certain-category-search-dropdown"
  1617. dropdownMatchSelectWidth={false}
  1618. dropdownStyle={{ width: 200 }}
  1619. style={{ width: "200px" }}
  1620. dataSource={options}
  1621. placeholder="输入服务名称"
  1622. value={this.state.commodityName}
  1623. onChange={this.httpChange}
  1624. filterOption={true}
  1625. onSelect={this.selectAuto}
  1626. >
  1627. <Input />
  1628. </AutoComplete>
  1629. <span className="mandatory">*</span>
  1630. </FormItem>
  1631. <FormItem
  1632. className="half-item"
  1633. {...formItemLayout}
  1634. label="服务数量"
  1635. >
  1636. <Input
  1637. placeholder="请输入服务数量"
  1638. value={this.state.commodityQuantity}
  1639. style={{ width: "200px" }}
  1640. onChange={e => {
  1641. this.setState({ commodityQuantity: e.target.value });
  1642. }}
  1643. ref="commodityQuantity"
  1644. />
  1645. <span className="mandatory">*</span>
  1646. </FormItem>
  1647. <FormItem
  1648. className="half-item"
  1649. {...formItemLayout}
  1650. label="实签价格(万元)"
  1651. >
  1652. <Input
  1653. placeholder="请输入实签价格"
  1654. value={this.state.commodityPrice}
  1655. style={{ width: "200px" }}
  1656. onChange={e => {
  1657. this.setState({ commodityPrice: e.target.value });
  1658. }}
  1659. ref="commodityPrice"
  1660. />
  1661. <span className="mandatory">*</span>
  1662. </FormItem>
  1663. <FormItem
  1664. className="half-item"
  1665. {...formItemLayout}
  1666. label="主要业务"
  1667. >
  1668. <Select
  1669. placeholder="选择是否为主要业务"
  1670. style={{ width: "200px" }}
  1671. value={this.state.main}
  1672. onChange={e => {
  1673. this.setState({ main: e });
  1674. }}
  1675. >
  1676. {boutique.map(function(item) {
  1677. return (
  1678. <Select.Option key={item.value}>
  1679. {item.key}
  1680. </Select.Option>
  1681. );
  1682. })}
  1683. </Select>
  1684. <span className="mandatory">*</span>
  1685. </FormItem>
  1686. <div className="clearfix">
  1687. <FormItem
  1688. labelCol={{ span: 4 }}
  1689. wrapperCol={{ span: 16 }}
  1690. label="服务说明"
  1691. >
  1692. <Input
  1693. type="textarea"
  1694. placeholder="请输入服务说明"
  1695. value={this.state.taskComment}
  1696. onChange={e => {
  1697. this.setState({ taskComment: e.target.value });
  1698. }}
  1699. />
  1700. </FormItem>
  1701. </div>
  1702. <FormItem
  1703. wrapperCol={{ span: 12, offset: 4 }}
  1704. className="half-middle"
  1705. >
  1706. <Button
  1707. className="submitSave"
  1708. type="primary"
  1709. htmlType="submit"
  1710. >
  1711. 保存
  1712. </Button>
  1713. <Button
  1714. className="submitSave"
  1715. type="ghost"
  1716. onClick={this.nextCancel}
  1717. >
  1718. 取消
  1719. </Button>
  1720. </FormItem>
  1721. </div>
  1722. ) : (
  1723. <div className="clearfix">
  1724. <FormItem
  1725. className="half-item"
  1726. {...formItemLayout}
  1727. label="项目名称"
  1728. >
  1729. <span>{this.state.commodityName}</span>
  1730. </FormItem>
  1731. <FormItem
  1732. className="half-item"
  1733. {...formItemLayout}
  1734. label="项目数量"
  1735. >
  1736. <Input
  1737. placeholder="请输入数量"
  1738. value={this.state.commodityQuantity}
  1739. style={{ width: "200px" }}
  1740. onChange={e => {
  1741. this.setState({ commodityQuantity: e.target.value });
  1742. }}
  1743. />
  1744. <span className="mandatory">*</span>
  1745. </FormItem>
  1746. <FormItem
  1747. className="half-item"
  1748. {...formItemLayout}
  1749. label="金额(万元)"
  1750. >
  1751. <Input
  1752. placeholder="请输入签单金额"
  1753. value={this.state.commodityPrice}
  1754. style={{ width: "200px" }}
  1755. onChange={e => {
  1756. this.setState({ commodityPrice: e.target.value });
  1757. }}
  1758. />
  1759. <span className="mandatory">*</span>
  1760. </FormItem>
  1761. <FormItem
  1762. className="half-item"
  1763. {...formItemLayout}
  1764. label="主要项目"
  1765. >
  1766. <Select
  1767. placeholder="选择是否为主要业务"
  1768. style={{ width: "200px" }}
  1769. value={this.state.main}
  1770. onChange={e => {
  1771. this.setState({ main: e });
  1772. }}
  1773. >
  1774. {boutique.map(function(item) {
  1775. return (
  1776. <Select.Option key={item.value}>
  1777. {item.key}
  1778. </Select.Option>
  1779. );
  1780. })}
  1781. </Select>
  1782. <span className="mandatory">*</span>
  1783. </FormItem>
  1784. <div className="clearfix">
  1785. <FormItem
  1786. labelCol={{ span: 4 }}
  1787. wrapperCol={{ span: 16 }}
  1788. label="服务说明"
  1789. >
  1790. <Input
  1791. type="textarea"
  1792. placeholder="请输入服务说明"
  1793. value={this.state.taskComment}
  1794. onChange={e => {
  1795. this.setState({ taskComment: e.target.value });
  1796. }}
  1797. />
  1798. </FormItem>
  1799. </div>
  1800. <FormItem
  1801. wrapperCol={{ span: 12, offset: 4 }}
  1802. className="half-middle"
  1803. >
  1804. <Button
  1805. className="submitSave"
  1806. type="primary"
  1807. onClick={this.tabRowSave}
  1808. >
  1809. 保存
  1810. </Button>
  1811. <Button
  1812. className="submitSave"
  1813. type="ghost"
  1814. onClick={this.nextCancel}
  1815. >
  1816. 取消
  1817. </Button>
  1818. </FormItem>
  1819. </div>
  1820. )}
  1821. </Spin>
  1822. </Form>
  1823. </Modal>
  1824. {/* <Modal
  1825. visible={this.state.rizhivisible}
  1826. className="admin-desc-content"
  1827. width="800px"
  1828. maskClosable={false}
  1829. title="订单日志"
  1830. footer={null}
  1831. onCancel={this.closeOrderLog}
  1832. >
  1833. <div className="patent-table">
  1834. <Spin spinning={this.state.loading}>
  1835. <Table
  1836. columns={this.state.columnsrizhi}
  1837. dataSource={this.state.dataSourcerizhi}
  1838. pagination={false}
  1839. />
  1840. </Spin>
  1841. </div>
  1842. </Modal> */}
  1843. <OrderRiZi
  1844. dataSourcerizhi={this.state.dataSourcerizhi}
  1845. closeOrderLog={this.closeOrderLog}
  1846. visible={this.state.rizhivisible}
  1847. loading={this.state.loading}
  1848. />
  1849. </div>
  1850. </div>
  1851. );
  1852. }
  1853. }));
  1854. export default IntentionCustomer;