reject.jsx 100 KB

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