reject.jsx 92 KB

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