approveds.jsx 92 KB

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