examine.jsx 77 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276
  1. import React from "react";
  2. import {
  3. Icon,
  4. Button,
  5. Input,
  6. Spin,
  7. Table,
  8. message,
  9. DatePicker,
  10. Upload,
  11. Form,
  12. Modal,
  13. Tabs,
  14. Col,
  15. Popconfirm,
  16. Select,
  17. Tag
  18. } from "antd";
  19. import $ from "jquery/src/ajax";
  20. import moment from "moment";
  21. import {
  22. getLiquidationStatus,
  23. getApprovedState,
  24. getProcessStatus,
  25. splitUrl,
  26. getjiedian,
  27. getboutique,
  28. getCuikuan,
  29. getProjectStatus,
  30. moneyVerify,
  31. ShowModal
  32. } from "@/tools.js";
  33. import "./customer.less";
  34. import ShowModalDiv from "@/showModal.jsx";
  35. import ResolutionDetail from "@/resolutionDetail";
  36. import OrderRiZi from "@/orderRiZi.jsx";
  37. const confirm = Modal.confirm;
  38. const { Option } = Select;
  39. //图片组件
  40. const PicturesWall = React.createClass({
  41. getInitialState() {
  42. return {
  43. previewVisible: false,
  44. previewImage: "",
  45. fileList: this.props.pictureUrl
  46. };
  47. },
  48. handleCancel() {
  49. this.setState({
  50. previewVisible: false
  51. });
  52. },
  53. handlePreview(file) {
  54. this.setState({
  55. previewImage: file.url || file.thumbUrl,
  56. previewVisible: true
  57. });
  58. },
  59. handleChange(info) {
  60. let fileList = info.fileList;
  61. this.setState({
  62. fileList
  63. });
  64. this.props.fileList(fileList);
  65. },
  66. componentWillReceiveProps(nextProps) {
  67. this.state.fileList = nextProps.pictureUrl;
  68. this.state.pojectApplicationUrl = undefined;
  69. },
  70. render() {
  71. const { previewVisible, previewImage, fileList } = this.state;
  72. const uploadButton = (
  73. <div>
  74. <Icon type="plus" />
  75. <div className="ant-upload-text">点击上传</div>
  76. </div>
  77. );
  78. return (
  79. <div style={{ display: "inline-block" }}>
  80. <Upload
  81. action={
  82. globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"
  83. }
  84. data={{ sign: "order_outsource" }}
  85. listType="picture-card"
  86. fileList={fileList}
  87. onPreview={this.handlePreview}
  88. onChange={this.handleChange}
  89. >
  90. {fileList.length >= 18 ? null : uploadButton}
  91. </Upload>
  92. <Modal
  93. maskClosable={false}
  94. width={"70px"}
  95. visible={previewVisible}
  96. footer={null}
  97. onCancel={this.handleCancel}
  98. >
  99. <img alt="example" style={{ width: "100%" }} src={previewImage} />
  100. </Modal>
  101. </div>
  102. );
  103. }
  104. });
  105. const IntentionCustomer = Form.create()(
  106. React.createClass({
  107. loadData(pageNo) {
  108. this.setState({
  109. visitModul: false,
  110. loading: true,
  111. ispage: pageNo,
  112. modalVisible: false,
  113. });
  114. $.ajax({
  115. method: "get",
  116. dataType: "json",
  117. crossDomain: false,
  118. url: globalConfig.context + "/api/admin/newOrder/orderNewList",
  119. data: {
  120. pageNo: pageNo || 1,
  121. pageSize: this.state.pagination.pageSize,
  122. specially: 1, //审核列表
  123. name: this.state.customerName, //名称
  124. orderNo: this.state.orderNoSearch, //订单编号
  125. starTime: this.state.releaseDate[0], //开始时间
  126. endTime: this.state.releaseDate[1], //结束时间
  127. approval: this.state.approvalSearch, //特批状态搜索
  128. amountStatus: this.state.amountStatus,
  129. },
  130. success: function (data) {
  131. ShowModal(this);
  132. let theArr = [];
  133. if (data.error.length || data.data.list == "") {
  134. if (data.error && data.error.length) {
  135. message.warning(data.error[0].message);
  136. }
  137. } else {
  138. for (let i = 0; i < data.data.list.length; i++) {
  139. let thisdata = data.data.list[i];
  140. theArr.push({
  141. key: i,
  142. id: thisdata.id, //用户ID
  143. orderNo: thisdata.orderNo, //订单编号
  144. totalAmount: thisdata.totalAmount, //签单金额
  145. processStatus: thisdata.processStatus, //流程状态
  146. liquidationStatus: thisdata.liquidationStatus, //结算状态
  147. approval: thisdata.approval, //特批状态
  148. signDate: thisdata.signDate, //签单时间
  149. userName: thisdata.userName, //客户名称
  150. salesmanName: thisdata.salesmanName, //营销员名称
  151. financeName: thisdata.financeName, //财务名称
  152. createDate: thisdata.createDate, //下单时间
  153. depName: thisdata.depName,
  154. orderStatus: thisdata.orderStatus,
  155. });
  156. }
  157. this.state.pagination.total = data.data.totalCount;
  158. this.state.pagination.current = data.data.pageNo;
  159. }
  160. if (data.data && data.data.list && !data.data.list.length) {
  161. this.state.pagination.total = 0;
  162. }
  163. this.setState({
  164. dataSource: theArr,
  165. pageNo: pageNo,
  166. pagination: this.state.pagination,
  167. selectedRowKeys: [],
  168. });
  169. }.bind(this),
  170. }).always(
  171. function () {
  172. this.setState({
  173. loading: false,
  174. });
  175. }.bind(this)
  176. );
  177. },
  178. getInitialState() {
  179. return {
  180. rotateDeg: 0,
  181. page: 1,
  182. resVisible: false,
  183. releaseDate: [],
  184. selectedRowKeys: [],
  185. pictureUrl: [],
  186. attachmentUrl: [],
  187. paginations: false,
  188. activeKey: "1",
  189. confirmLoading: false,
  190. approvalSearch: undefined,
  191. aloading: false,
  192. pagination: {
  193. defaultCurrent: 1,
  194. defaultPageSize: 10,
  195. showQuickJumper: true,
  196. pageSize: 10,
  197. onChange: function (page) {
  198. this.loadData(page);
  199. }.bind(this),
  200. showTotal: function (total) {
  201. return "共" + total + "条数据";
  202. },
  203. },
  204. columns: [
  205. {
  206. title: "订单编号",
  207. dataIndex: "orderNo",
  208. key: "orderNo",
  209. },
  210. {
  211. title: "下单时间",
  212. dataIndex: "createDate",
  213. key: "createTime",
  214. },
  215. {
  216. title: "合同签订时间",
  217. dataIndex: "signDate",
  218. key: "signDate",
  219. },
  220. {
  221. title: "客户名称",
  222. dataIndex: "userName",
  223. key: "userName",
  224. render: (text) => {
  225. return text && text.length > 9 ? text.substr(0, 9) + "..." : text;
  226. },
  227. },
  228. {
  229. title: "流程状态",
  230. dataIndex: "processStatus",
  231. key: "processStatus",
  232. render: (text) => {
  233. return getProcessStatus(text);
  234. },
  235. },
  236. {
  237. title: "订单部门",
  238. dataIndex: "depName",
  239. key: "depName",
  240. },
  241. {
  242. title: "签单金额(万元)",
  243. dataIndex: "totalAmount",
  244. key: "totalAmount",
  245. },
  246. {
  247. title: "结算状态",
  248. dataIndex: "liquidationStatus",
  249. key: "liquidationStatus",
  250. render: (text) => {
  251. return getLiquidationStatus(text);
  252. },
  253. },
  254. {
  255. title: "是否特批",
  256. dataIndex: "approval",
  257. key: "approval",
  258. render: (text) => {
  259. return getApprovedState(text);
  260. },
  261. },
  262. {
  263. title: "订单负责人",
  264. dataIndex: "salesmanName",
  265. key: "salesmanName",
  266. },
  267. {
  268. title: "财务负责人",
  269. dataIndex: "financeName",
  270. key: "financeName",
  271. },
  272. ],
  273. data: [],
  274. dataSource: [],
  275. columnsX: [
  276. {
  277. title: "业务项目名称",
  278. dataIndex: "commodityName",
  279. key: "commodityName",
  280. },
  281. {
  282. title: "项目类别",
  283. dataIndex: "cname",
  284. key: "cname",
  285. },
  286. {
  287. title: "项目数量",
  288. dataIndex: "commodityQuantity",
  289. key: "commodityQuantity",
  290. render: (text, record) => {
  291. if (record.splitStatus == 1) {
  292. return (
  293. <span>
  294. {text}{" "}
  295. <Tag
  296. color="#108ee9"
  297. onClick={(e) => {
  298. e.stopPropagation();
  299. this.showRes(record);
  300. }}
  301. >
  302. 已拆
  303. </Tag>
  304. </span>
  305. );
  306. } else {
  307. return text;
  308. }
  309. },
  310. },
  311. {
  312. title: "金额(万元)",
  313. dataIndex: "commodityPrice",
  314. key: "commodityPrice",
  315. },
  316. {
  317. title: "负责人",
  318. dataIndex: "contacts",
  319. key: "contacts",
  320. },
  321. {
  322. title: "负责人电话",
  323. dataIndex: "contactsMobile",
  324. key: "contactsMobile",
  325. },
  326. {
  327. title: "项目状态",
  328. dataIndex: "projectStatus",
  329. key: "projectStatus",
  330. render: (text) => {
  331. return getProjectStatus(text);
  332. },
  333. },
  334. {
  335. title: "主要项目",
  336. dataIndex: "main",
  337. key: "main",
  338. render: (text) => {
  339. return text ? "是" : "否";
  340. },
  341. },
  342. {
  343. title: "项目说明",
  344. dataIndex: "taskComment",
  345. key: "taskComment",
  346. render: (text) => {
  347. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  348. },
  349. },
  350. ],
  351. columnsrizhi: [
  352. {
  353. title: "流程",
  354. dataIndex: "processName",
  355. key: "processName",
  356. },
  357. {
  358. title: "操作人",
  359. dataIndex: "adminName",
  360. key: "adminName",
  361. },
  362. {
  363. title: "时间",
  364. dataIndex: "createDate",
  365. key: "createDate",
  366. },
  367. ],
  368. dataSourceX: [],
  369. ContactsListsNew: [
  370. {
  371. title: "项目名称",
  372. dataIndex: "commodityName",
  373. key: "commodityName",
  374. render: (text) => {
  375. return <span>{text}</span>;
  376. },
  377. },
  378. {
  379. title: "项目分类",
  380. dataIndex: "projectType",
  381. key: "projectType",
  382. render: (text) => {
  383. let arr = this.state.dataSourceX || [];
  384. let str = "";
  385. for (let i = 0; i < arr.length; i++) {
  386. if (this.state.dataSourceX[i].sort == text) {
  387. str = this.state.dataSourceX[i].cname;
  388. return <span>{str}</span>;
  389. }
  390. }
  391. },
  392. },
  393. {
  394. title: "催款科目",
  395. dataIndex: "dunTypeName",
  396. key: "dunTypeName",
  397. render: (text) => {
  398. return <span>{text}</span>;
  399. },
  400. },
  401. {
  402. title: "时间(天)",
  403. dataIndex: "waitDay",
  404. key: "waitDay",
  405. render: (text, record) => {
  406. if (record.dunTypeName) {
  407. return <span>{text}</span>;
  408. }
  409. },
  410. },
  411. {
  412. title: "金额(万元)",
  413. dataIndex: "money",
  414. key: "money",
  415. render: (text, record) => {
  416. if (record.dunTypeName) {
  417. if (record.appropriationRatio && !record.money) {
  418. return <span>{record.appropriationRatio}(拨款比例)</span>;
  419. } else if (record.appropriationRatio && record.money) {
  420. return (
  421. <span>
  422. {text}(比例:{record.appropriationRatio})
  423. </span>
  424. );
  425. } else {
  426. return <span>{text}</span>;
  427. }
  428. }
  429. },
  430. },
  431. {
  432. title: "服务年限",
  433. dataIndex: "startDate",
  434. key: "startDate",
  435. render: (text, record) => {
  436. if (record.dunTypeName) {
  437. return <span>{text}</span>;
  438. }
  439. },
  440. },
  441. {
  442. title: "催款状态",
  443. dataIndex: "status",
  444. key: "status",
  445. render: (text) => {
  446. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  447. },
  448. },
  449. ],
  450. ContactsLists: [
  451. {
  452. title: "催款科目",
  453. dataIndex: "dunSubject",
  454. key: "dunSubject",
  455. render: (text) => {
  456. return getjiedian(text);
  457. },
  458. },
  459. {
  460. title: "金额(万元)",
  461. dataIndex: "money",
  462. key: "money",
  463. },
  464. {
  465. title: "催款状态",
  466. dataIndex: "dunStatus",
  467. key: "dunStatus",
  468. render: (text) => {
  469. return getCuikuan(text);
  470. },
  471. },
  472. ],
  473. };
  474. },
  475. //页面加载函数
  476. componentWillMount() {
  477. this.loadData();
  478. },
  479. //整行点击
  480. tableRowClick(record) {
  481. this.setState({
  482. visible: true,
  483. orderStatus: record.orderStatus,
  484. id: record.id,
  485. });
  486. this.xiangqing(record.orderNo);
  487. this.xiangmu(record.orderNo);
  488. this.jiedian(record.orderNo);
  489. this.jiedianNew(record.orderNo);
  490. },
  491. //点击打卡项目详情
  492. tableRowClickX(record) {
  493. this.setState({
  494. jid: record.id, //项目ID
  495. kid: record.commodityId, //商品ID
  496. commodityName: record.commodityName, //金额
  497. commodityPrice: record.commodityPrice, //金额
  498. commodityQuantity: record.commodityQuantity, //数量
  499. taskComment: record.taskComment, //备注
  500. main: record.main.toString(), //是否为主要
  501. addnextVisible: true,
  502. addState: 0,
  503. });
  504. },
  505. //项目详情关闭
  506. nextCancel() {
  507. this.setState({
  508. addnextVisible: false,
  509. });
  510. },
  511. //订单详情
  512. xiangqing(orderNos) {
  513. $.ajax({
  514. method: "get",
  515. dataType: "json",
  516. crossDomain: false,
  517. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  518. data: {
  519. orderNo: orderNos,
  520. },
  521. success: function (data) {
  522. if (data.error.length || data.data.list == "") {
  523. if (data.error && data.error.length) {
  524. message.warning(data.error[0].message);
  525. }
  526. } else {
  527. let thisdata = data.data;
  528. this.setState({
  529. orderNo: thisdata.orderNo, //订单编号
  530. contractNo: thisdata.contractNo, //合同编号
  531. userName: thisdata.userName, //客户名称
  532. signDate: thisdata.signDate, //签单时间
  533. processStatus: thisdata.processStatus, //流程状态
  534. liquidationStatus: thisdata.liquidationStatus, //结算状态
  535. contacts: thisdata.contacts, //企业联系人
  536. contactMobile: thisdata.contactMobile, //联系人电话
  537. legalPerson: thisdata.legalPerson, //法人
  538. legalPersonTel: thisdata.legalPersonTel, //法人电话
  539. firstAmount: thisdata.firstAmount, //签单金额
  540. totalAmount: thisdata.totalAmount, //首付金额
  541. approval: thisdata.approval, //特批状态
  542. settlementAmount: thisdata.settlementAmount, //已收款项
  543. orderRemarks: thisdata.orderRemarks, //订单留言
  544. orgCodeUrl: thisdata.contractPictureUrl
  545. ? splitUrl(
  546. thisdata.contractPictureUrl,
  547. ",",
  548. globalConfig.avatarHost + "/upload"
  549. )
  550. : [], //图片地址
  551. replenishUrl: thisdata.agreementUrl
  552. ? splitUrl(
  553. thisdata.agreementUrl,
  554. ",",
  555. globalConfig.avatarHost + "/upload"
  556. )
  557. : [], //图片地址
  558. salesmanName: thisdata.salesmanName, //营销员名称
  559. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  560. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  561. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  562. financeName: thisdata.financeName, //财务名称
  563. financeMobile: thisdata.financeMobile, //财务电话
  564. nowFinance: thisdata.nowFinance, //财务名称
  565. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  566. depName: thisdata.depName,
  567. outsource: thisdata.outsource == 0 ? "否" : "是",
  568. });
  569. }
  570. }.bind(this),
  571. }).always(
  572. function () {
  573. this.setState({
  574. loading: false,
  575. });
  576. }.bind(this)
  577. );
  578. },
  579. //项目列表
  580. xiangmu(orderNos) {
  581. $.ajax({
  582. method: "get",
  583. dataType: "json",
  584. crossDomain: false,
  585. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  586. data: {
  587. orderNo: orderNos,
  588. },
  589. success: function (data) {
  590. let theArr = [];
  591. if (data.error.length || data.data.list == "") {
  592. if (data.error && data.error.length) {
  593. message.warning(data.error[0].message);
  594. }
  595. } else {
  596. for (let i = 0; i < data.data.length; i++) {
  597. let thisdata = data.data[i];
  598. theArr.push({
  599. key: i,
  600. id: thisdata.id,
  601. orderNo: thisdata.orderNo, //订单编号
  602. commodityId: thisdata.commodityId, //项目ID
  603. commodityName: thisdata.commodityName, //项目名称
  604. cname: thisdata.cname, //项目类别
  605. commodityPrice: thisdata.commodityPrice, //项目价格
  606. commodityQuantity: thisdata.commodityQuantity, //项目数量
  607. main: thisdata.main, //是否为主要任务
  608. taskComment: thisdata.taskComment, //任务说明
  609. contacts: thisdata.contacts, //联系人
  610. contactsMobile: thisdata.contactsMobile, //联系人电话
  611. projectStatus: thisdata.projectStatus, //项目状态
  612. sort: thisdata.cSort,
  613. splitStatus: thisdata.splitStatus,
  614. });
  615. }
  616. }
  617. this.setState({
  618. dataSourceX: theArr,
  619. });
  620. }.bind(this),
  621. }).always(
  622. function () {
  623. this.setState({
  624. loading: false,
  625. });
  626. }.bind(this)
  627. );
  628. },
  629. rizhi() {
  630. this.setState({
  631. loading: true,
  632. });
  633. $.ajax({
  634. method: "get",
  635. dataType: "json",
  636. crossDomain: false,
  637. url: "/api/admin/newOrder/selectOrderLog",
  638. data: {
  639. orderNo: this.state.orderNo,
  640. },
  641. success: function (data) {
  642. let theArr = [];
  643. let thisData = data.data;
  644. if (!thisData.length) {
  645. if (data.error && data.error.length) {
  646. message.warning(data.error[0].message);
  647. }
  648. thisData = {};
  649. } else {
  650. for (let i = 0; i < data.data.length; i++) {
  651. let thisdata = data.data[i];
  652. theArr.push({
  653. processName: thisdata.processName,
  654. adminName: thisdata.adminName,
  655. createDate: thisdata.createDate,
  656. remarks: thisdata.remarks,
  657. });
  658. }
  659. }
  660. this.setState({
  661. dataSourcerizhi: theArr,
  662. });
  663. }.bind(this),
  664. }).always(
  665. function () {
  666. this.setState({
  667. loading: false,
  668. });
  669. }.bind(this)
  670. );
  671. },
  672. // 拆分详细
  673. showRes(record) {
  674. this.setState({
  675. resVisible: true,
  676. resRecord: record,
  677. });
  678. },
  679. resCancel() {
  680. this.setState({
  681. resVisible: false,
  682. });
  683. },
  684. getOrderLog() {
  685. this.setState({
  686. rizhivisible: true,
  687. });
  688. this.rizhi();
  689. },
  690. closeOrderLog() {
  691. this.setState({
  692. rizhivisible: false,
  693. });
  694. },
  695. //节点列表
  696. jiedian(orderNos) {
  697. $.ajax({
  698. method: "get",
  699. dataType: "json",
  700. crossDomain: false,
  701. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  702. data: {
  703. orderNo: orderNos,
  704. },
  705. success: function (data) {
  706. let theArr = [];
  707. let thisData = [];
  708. if (data.error.length || data.data.list == "") {
  709. if (data.error && data.error.length) {
  710. message.warning(data.error[0].message);
  711. }
  712. } else {
  713. for (let i = 0; i < data.data.length; i++) {
  714. thisData = data.data[i];
  715. theArr.push({
  716. key: i,
  717. dunSubject: thisData.dunSubject
  718. ? thisData.dunSubject.toString()
  719. : "", //催款科目
  720. id: thisData.id, //节点Id
  721. money: thisData.money, //催款金额
  722. dunStatus: thisData.dunStatus, //催款状态
  723. });
  724. }
  725. this.setState({
  726. contactList: theArr,
  727. });
  728. }
  729. }.bind(this),
  730. }).always(
  731. function () {
  732. this.setState({
  733. loading: false,
  734. });
  735. }.bind(this)
  736. );
  737. },
  738. //查看催款节点
  739. jiedianNew(orderNos) {
  740. $.ajax({
  741. method: "get",
  742. dataType: "json",
  743. crossDomain: false,
  744. url:
  745. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  746. data: {
  747. orderNo: orderNos,
  748. },
  749. success: function (data) {
  750. if (data.error && data.error.length) {
  751. message.warning(data.error[0].message);
  752. } else {
  753. let theArr = [];
  754. let thisData = [];
  755. let arr = data.data || [];
  756. let totalCui = 0;
  757. for (let i = 0; i < arr.length; i++) {
  758. thisData = arr[i];
  759. totalCui += +thisData.money;
  760. theArr.push({
  761. key: i,
  762. dunSubject: thisData.dunSubject
  763. ? thisData.dunSubject.toString()
  764. : "", //催款科目
  765. id: thisData.id, //节点Id
  766. money: thisData.money, //催款金额
  767. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  768. commodityName: thisData.commodityName,
  769. projectType: thisData.projectType,
  770. dunTypeName: thisData.dunTypeName,
  771. status: thisData.status,
  772. waitDay: thisData.waitDay,
  773. effectiveCount: thisData.effectiveCount,
  774. startDate: thisData.startDate,
  775. dunType: thisData.dunType,
  776. appropriationRatio: thisData.appropriationRatio,
  777. });
  778. }
  779. if (!totalCui) {
  780. totalCui = 0;
  781. }
  782. totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
  783. this.setState({
  784. contactListNew: theArr,
  785. totalCui,
  786. });
  787. }
  788. }.bind(this),
  789. }).always(
  790. function () {
  791. this.setState({
  792. loading: false,
  793. });
  794. }.bind(this)
  795. );
  796. },
  797. //审核通过
  798. examOk() {
  799. if (this.state.remarks == "") {
  800. message.warning("请填写备注信息");
  801. return;
  802. }
  803. if (this.state.flag) return;
  804. this.setState({
  805. flag: true,
  806. loading: true,
  807. });
  808. $.ajax({
  809. method: "post",
  810. dataType: "json",
  811. crossDomain: false,
  812. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  813. data: {
  814. orderNo: this.state.orderNo,
  815. orderStatus: 2,
  816. reason: this.state.reason,
  817. },
  818. success: function (data) {
  819. if (data.error.length || data.data.list == "") {
  820. if (data.error && data.error.length) {
  821. message.warning(data.error[0].message);
  822. this.setState({
  823. flag: false,
  824. });
  825. }
  826. } else {
  827. message.success("该订单已通过审核~");
  828. this.setState({
  829. visible: false,
  830. flag: false,
  831. agreeVisible: false,
  832. });
  833. this.reset();
  834. }
  835. }.bind(this),
  836. }).always(
  837. function () {
  838. this.setState({
  839. loading: false,
  840. });
  841. }.bind(this)
  842. );
  843. },
  844. //通过发给外包
  845. outsourcing() {
  846. if (this.state.flag) return;
  847. this.setState({
  848. flag: true,
  849. loading: true,
  850. });
  851. $.ajax({
  852. method: "post",
  853. dataType: "json",
  854. crossDomain: false,
  855. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  856. data: {
  857. orderNo: this.state.orderNo,
  858. orderStatus: 2,
  859. outsource: 1,
  860. },
  861. success: function (data) {
  862. if (data.error.length || data.data.list == "") {
  863. if (data.error && data.error.length) {
  864. message.warning(data.error[0].message);
  865. this.setState({
  866. flag: false,
  867. });
  868. }
  869. } else {
  870. message.success("该订单已通过审核~");
  871. this.setState({
  872. visible: false,
  873. flag: false,
  874. });
  875. this.reset();
  876. }
  877. }.bind(this),
  878. }).always(
  879. function () {
  880. this.setState({
  881. loading: false,
  882. });
  883. }.bind(this)
  884. );
  885. },
  886. //审核不通过
  887. examOks() {
  888. this.setState({
  889. loading: true,
  890. });
  891. this.setState({
  892. aloading: true,
  893. });
  894. $.ajax({
  895. method: "post",
  896. dataType: "json",
  897. crossDomain: false,
  898. url: globalConfig.context + "/api/admin/newOrder/auditOrderNew",
  899. data: {
  900. orderNo: this.state.orderNo,
  901. orderStatus: 3,
  902. reason: this.state.reason,
  903. },
  904. success: function (data) {
  905. if (data.error.length || data.data.list == "") {
  906. if (data.error && data.error.length) {
  907. message.warning(data.error[0].message);
  908. this.setState({
  909. aloading: true,
  910. loading: false,
  911. });
  912. }
  913. } else {
  914. message.success("该订单已被拒绝~");
  915. this.setState({
  916. visible: false,
  917. aloading: false,
  918. noVisible: false,
  919. reason: "",
  920. loading: false,
  921. });
  922. this.reset();
  923. }
  924. }.bind(this),
  925. }).always(
  926. function () {
  927. this.setState({
  928. loading: false,
  929. });
  930. }.bind(this)
  931. );
  932. },
  933. //点击拒绝
  934. examNo() {
  935. this.setState({
  936. noVisible: true,
  937. });
  938. },
  939. callback(key) {
  940. let url = window.location.href.substring(7);
  941. this.setState({
  942. activeKey: key,
  943. });
  944. if (this.state.pictureUrl.length) {
  945. let picArr = [];
  946. this.state.pictureUrl.map(function (item) {
  947. if (
  948. item.response &&
  949. item.response.data &&
  950. item.response.data.length
  951. ) {
  952. picArr.push(item.response.data);
  953. }
  954. });
  955. }
  956. if (key === "2") {
  957. this.setState({
  958. loading: true,
  959. });
  960. $.ajax({
  961. method: "get",
  962. dataType: "json",
  963. crossDomain: false,
  964. url:
  965. globalConfig.context +
  966. "/api/admin/outsourceOrg/orderOutsourceDtails",
  967. data: {
  968. orderNo: this.state.orderNo,
  969. },
  970. success: function (data) {
  971. if (data.data) {
  972. let thisdata = data.data;
  973. this.setState({
  974. id: thisdata.id,
  975. createTimes: thisdata.createTimes,
  976. auditTimes: thisdata.auditTimes,
  977. remarks: thisdata.remarks,
  978. attachmentUrl: thisdata.attachmentUrl
  979. ? splitUrl(
  980. thisdata.attachmentUrl,
  981. ",",
  982. globalConfig.avatarHost + "/upload",
  983. url
  984. )
  985. : [],
  986. fileUrl: thisdata.attachmentUrl
  987. ? splitUrl(
  988. thisdata.attachmentUrl,
  989. ",",
  990. globalConfig.avatarHost + "/upload",
  991. url
  992. )
  993. : [],
  994. pictureUrl: thisdata.pictureUrl
  995. ? splitUrl(
  996. thisdata.pictureUrl,
  997. ",",
  998. globalConfig.avatarHost + "/upload",
  999. url
  1000. )
  1001. : [], //图片地址
  1002. amount: thisdata.amount,
  1003. companyName: thisdata.companyName,
  1004. outsourceRemarks: thisdata.outsourceRemarks,
  1005. unitNumber: thisdata.unitNumber,
  1006. unitPrice: thisdata.unitPrice,
  1007. });
  1008. }
  1009. }.bind(this),
  1010. }).always(
  1011. function () {
  1012. this.setState({
  1013. loading: false,
  1014. });
  1015. }.bind(this)
  1016. );
  1017. }
  1018. },
  1019. getUrl(url) {
  1020. let theorgCodeUrl = [];
  1021. if (url.length) {
  1022. let picArr = [];
  1023. url.map(function (item) {
  1024. if (
  1025. item.response &&
  1026. item.response.data &&
  1027. item.response.data.length
  1028. ) {
  1029. picArr.push(item.response.data);
  1030. }
  1031. });
  1032. theorgCodeUrl = picArr.join(",");
  1033. }
  1034. return theorgCodeUrl;
  1035. },
  1036. sureOut() {
  1037. this.setState({
  1038. loading: true,
  1039. });
  1040. if (!this.state.companyName) {
  1041. message.warning("公司名称不能为空");
  1042. return;
  1043. }
  1044. if (!this.state.unitPrice) {
  1045. message.warning("单价不能为空");
  1046. return;
  1047. }
  1048. if (moneyVerify(this.state.unitPrice)) {
  1049. return;
  1050. }
  1051. if (!this.state.unitNumber) {
  1052. message.warning("数量不能为空");
  1053. return;
  1054. }
  1055. if (!this.state.amount) {
  1056. message.warning("总金额不能为空");
  1057. return;
  1058. }
  1059. if (moneyVerify(this.state.amount)) {
  1060. return;
  1061. }
  1062. if (!this.state.outsourceRemarks) {
  1063. message.warning("备注不能为空");
  1064. return;
  1065. }
  1066. if (this.state.pictureUrl.length === 0) {
  1067. message.warning("合同扫描件不能为空");
  1068. return;
  1069. }
  1070. $.ajax({
  1071. method: "POST",
  1072. dataType: "json",
  1073. crossDomain: false,
  1074. url: globalConfig.context + "/api/admin/outsourceOrg/auditOutsource",
  1075. data: {
  1076. id: this.state.id,
  1077. orderNo: this.state.orderNo,
  1078. companyName: this.state.companyName,
  1079. amount: this.state.amount,
  1080. outsourceRemarks: this.state.outsourceRemarks,
  1081. unitNumber: this.state.unitNumber,
  1082. unitPrice: this.state.unitPrice,
  1083. attachmentUrl: this.getUrl(this.state.attachmentUrl).length
  1084. ? this.getUrl(this.state.attachmentUrl)
  1085. : "",
  1086. orderStatus: 2,
  1087. pictureUrl: this.getUrl(this.state.pictureUrl).length
  1088. ? this.getUrl(this.state.pictureUrl)
  1089. : "",
  1090. },
  1091. }).done(
  1092. function (data) {
  1093. this.setState({
  1094. loading: false,
  1095. });
  1096. if (!data.error.length) {
  1097. message.success("发起成功!");
  1098. this.outReset();
  1099. this.visitCancel();
  1100. } else {
  1101. message.warning(data.error[0].message);
  1102. }
  1103. }.bind(this)
  1104. );
  1105. },
  1106. //关闭输入理由框
  1107. noCancel() {
  1108. this.setState({
  1109. noVisible: false,
  1110. aloading: false,
  1111. reason: "",
  1112. });
  1113. },
  1114. //搜索
  1115. search() {
  1116. this.setState({
  1117. //signBillVisible:false
  1118. });
  1119. this.loadData();
  1120. },
  1121. //重置
  1122. reset() {
  1123. this.setState({
  1124. signBillVisible: false,
  1125. });
  1126. this.state.orderNo = "";
  1127. this.state.customerName = "";
  1128. this.state.releaseDate[0] = undefined;
  1129. this.state.releaseDate[1] = undefined;
  1130. this.state.approval = undefined;
  1131. this.state.approvalSearch = undefined;
  1132. this.state.amountStatus = undefined;
  1133. this.loadData(1);
  1134. },
  1135. outReset() {
  1136. this.setState({
  1137. companyName: "",
  1138. amount: "",
  1139. unitPrice: "",
  1140. unitNumber: "",
  1141. outsourceRemarks: "",
  1142. attachmentUrl: [],
  1143. pictureUrl: [],
  1144. });
  1145. },
  1146. resets() {
  1147. this.state.orderNo = "";
  1148. this.state.customerName = "";
  1149. this.state.releaseDate[0] = undefined;
  1150. this.state.releaseDate[1] = undefined;
  1151. },
  1152. getOrgCodeUrl(e) {
  1153. this.setState({ pictureUrl: e });
  1154. },
  1155. //关闭详情
  1156. visitCancel() {
  1157. this.setState(
  1158. {
  1159. visible: false,
  1160. },
  1161. () => {
  1162. this.setState({
  1163. activeKey: "1",
  1164. });
  1165. }
  1166. );
  1167. this.resets();
  1168. this.loadData();
  1169. },
  1170. visitOk() {
  1171. this.setState({
  1172. visible: false,
  1173. });
  1174. this.resets();
  1175. },
  1176. showDeleteConfirm(fn) {
  1177. confirm({
  1178. title: <p style={{ fontSize: 16, fontWeight: 900 }}>注意</p>,
  1179. content: (
  1180. <p style={{ fontWeight: 900, color: "red" }}>
  1181. 当前订单为外包单,您确定修改为普通订单?
  1182. </p>
  1183. ),
  1184. okText: "确定",
  1185. okType: "danger",
  1186. cancelText: "取消",
  1187. onOk() {
  1188. fn();
  1189. },
  1190. onCancel() {},
  1191. });
  1192. },
  1193. downImg() {
  1194. let num = 0;
  1195. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1196. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1197. num = i;
  1198. }
  1199. }
  1200. if (num == this.state.orgCodeUrl.length - 1) {
  1201. return message.warning("已经是最后一张了哦");
  1202. }
  1203. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  1204. this.setState({
  1205. previewImage: this.state.previewImage,
  1206. rotateDeg: 0,
  1207. });
  1208. },
  1209. upImg() {
  1210. let num = 0;
  1211. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  1212. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  1213. num = i;
  1214. }
  1215. }
  1216. if (num == 0) {
  1217. return message.warning("已经是第一张了哦");
  1218. }
  1219. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  1220. this.setState({
  1221. previewImage: this.state.previewImage,
  1222. rotateDeg: 0,
  1223. });
  1224. },
  1225. rotate() {
  1226. let rotateDeg = this.state.rotateDeg + 90;
  1227. this.setState({
  1228. rotateDeg,
  1229. });
  1230. },
  1231. downImgs() {
  1232. let num = 0;
  1233. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1234. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1235. num = i;
  1236. }
  1237. }
  1238. if (num == this.state.replenishUrl.length - 1) {
  1239. return message.warning("已经是最后一张了哦");
  1240. }
  1241. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  1242. this.setState({
  1243. previewImage: this.state.previewImage,
  1244. rotateDeg: 0,
  1245. });
  1246. },
  1247. upImgs() {
  1248. let num = 0;
  1249. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  1250. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  1251. num = i;
  1252. }
  1253. }
  1254. if (num == 0) {
  1255. return message.warning("已经是第一张了哦");
  1256. }
  1257. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  1258. this.setState({
  1259. previewImage: this.state.previewImage,
  1260. rotateDeg: 0,
  1261. });
  1262. },
  1263. rotates() {
  1264. let rotateDeg = this.state.rotateDeg + 90;
  1265. this.setState({
  1266. rotateDeg,
  1267. });
  1268. },
  1269. render() {
  1270. const formItemLayout = {
  1271. labelCol: { span: 8 },
  1272. wrapperCol: { span: 14 },
  1273. };
  1274. const FormItem = Form.Item;
  1275. const { TabPane } = Tabs;
  1276. const { TextArea } = Input;
  1277. const { RangePicker } = DatePicker;
  1278. const cuiDataList = this.state.contactList || [];
  1279. return (
  1280. <div className="user-content">
  1281. {this.state.resVisible ? (
  1282. <ResolutionDetail
  1283. cancel={this.resCancel}
  1284. detail={this.state.resRecord}
  1285. visible={this.state.resVisible}
  1286. id={this.state.resRecord.orderNo}
  1287. />
  1288. ) : (
  1289. ""
  1290. )}
  1291. <ShowModalDiv ShowModal={this.state.showModal} />
  1292. <div className="content-title">
  1293. <span>订单审核</span>
  1294. </div>
  1295. <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
  1296. <TabPane tab="搜索" key="1">
  1297. <div className="user-search">
  1298. <Input
  1299. placeholder="客户名称"
  1300. style={{
  1301. width: "150px",
  1302. marginBottom: "10px",
  1303. marginLeft: 10,
  1304. }}
  1305. value={this.state.customerName}
  1306. onChange={(e) => {
  1307. this.setState({ customerName: e.target.value });
  1308. }}
  1309. />
  1310. <Input
  1311. placeholder="订单编号"
  1312. style={{ width: "150px" }}
  1313. value={this.state.orderNoSearch}
  1314. onChange={(e) => {
  1315. this.setState({ orderNoSearch: e.target.value });
  1316. }}
  1317. />
  1318. <Select
  1319. style={{ width: 120 }}
  1320. placeholder="特批状态"
  1321. value={this.state.approvalSearch}
  1322. onChange={(e) => {
  1323. this.setState({
  1324. approvalSearch: e,
  1325. });
  1326. }}
  1327. >
  1328. <Option value="0">非特批</Option>
  1329. <Option value="1">特批</Option>
  1330. </Select>
  1331. <Select
  1332. style={{ width: 120 }}
  1333. placeholder="签单金额"
  1334. value={this.state.amountStatus}
  1335. onChange={(e) => {
  1336. this.setState({
  1337. amountStatus: e,
  1338. });
  1339. }}
  1340. >
  1341. <Option value="0">10万元以下</Option>
  1342. <Option value="1">10~20万元</Option>
  1343. <Option value="2">20~30万元</Option>
  1344. <Option value="3">30~40万元</Option>
  1345. <Option value="4">40万元以上</Option>
  1346. </Select>
  1347. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1348. <RangePicker
  1349. value={[
  1350. this.state.releaseDate[0]
  1351. ? moment(this.state.releaseDate[0])
  1352. : null,
  1353. this.state.releaseDate[1]
  1354. ? moment(this.state.releaseDate[1])
  1355. : null,
  1356. ]}
  1357. onChange={(data, dataString) => {
  1358. this.setState({ releaseDate: dataString });
  1359. }}
  1360. />
  1361. <Button
  1362. type="primary"
  1363. onClick={this.search}
  1364. style={{ marginLeft: "10px" }}
  1365. >
  1366. 搜索
  1367. </Button>
  1368. <Button onClick={this.reset}>重置</Button>
  1369. </div>
  1370. </TabPane>
  1371. </Tabs>
  1372. <div className="patent-table">
  1373. <Spin spinning={this.state.loading}>
  1374. <Table
  1375. columns={this.state.columns}
  1376. dataSource={this.state.dataSource}
  1377. pagination={this.state.pagination}
  1378. onRowClick={this.tableRowClick}
  1379. bordered
  1380. size="small"
  1381. />
  1382. </Spin>
  1383. <Modal
  1384. className="customeDetails"
  1385. footer=""
  1386. width="900px"
  1387. visible={this.state.visible}
  1388. onOk={this.visitOk}
  1389. onCancel={this.visitCancel}
  1390. >
  1391. <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
  1392. <TabPane tab="订单详情" key="1">
  1393. <Form
  1394. layout="horizontal"
  1395. onSubmit={this.handleSubmit}
  1396. id="demand-form"
  1397. style={{ paddingBottom: "40px" }}
  1398. >
  1399. <Spin spinning={this.state.loading}>
  1400. <div className="clearfix">
  1401. <FormItem
  1402. className="half-item"
  1403. {...formItemLayout}
  1404. label="订单编号"
  1405. >
  1406. <span>{this.state.orderNo}</span>
  1407. </FormItem>
  1408. <FormItem
  1409. className="half-item"
  1410. {...formItemLayout}
  1411. label="合同编号"
  1412. >
  1413. <span>{this.state.contractNo}</span>
  1414. </FormItem>
  1415. <FormItem
  1416. className="half-item"
  1417. {...formItemLayout}
  1418. label="客户名称"
  1419. >
  1420. <span>{this.state.userName}</span>
  1421. </FormItem>
  1422. <FormItem
  1423. className="half-item"
  1424. {...formItemLayout}
  1425. label="合同签订时间"
  1426. >
  1427. <span>{this.state.signDate}</span>
  1428. </FormItem>
  1429. <FormItem
  1430. className="half-item"
  1431. {...formItemLayout}
  1432. label="流程状态"
  1433. >
  1434. <span>
  1435. {getProcessStatus(this.state.processStatus)}
  1436. </span>
  1437. </FormItem>
  1438. <FormItem
  1439. className="half-item"
  1440. {...formItemLayout}
  1441. label="结算状态"
  1442. >
  1443. <span>
  1444. {getLiquidationStatus(this.state.liquidationStatus)}
  1445. </span>
  1446. </FormItem>
  1447. <FormItem
  1448. className="half-item"
  1449. {...formItemLayout}
  1450. label="企业联系人"
  1451. >
  1452. <span>{this.state.contacts}</span>
  1453. </FormItem>
  1454. <FormItem
  1455. className="half-item"
  1456. {...formItemLayout}
  1457. label="联系人电话"
  1458. >
  1459. <span>{this.state.contactMobile}</span>
  1460. </FormItem>
  1461. <FormItem
  1462. className="half-item"
  1463. {...formItemLayout}
  1464. label="企业法人"
  1465. >
  1466. <span>{this.state.legalPerson}</span>
  1467. </FormItem>
  1468. <FormItem
  1469. className="half-item"
  1470. {...formItemLayout}
  1471. label="法人电话"
  1472. >
  1473. <span>{this.state.legalPersonTel}</span>
  1474. </FormItem>
  1475. <FormItem
  1476. className="half-item"
  1477. {...formItemLayout}
  1478. label="签单金额(万元)"
  1479. >
  1480. <span>{this.state.totalAmount}</span>
  1481. </FormItem>
  1482. <FormItem
  1483. className="half-item"
  1484. {...formItemLayout}
  1485. label="首付金额(万元)"
  1486. >
  1487. <span>{this.state.firstAmount}</span>
  1488. </FormItem>
  1489. <FormItem
  1490. className="half-item"
  1491. {...formItemLayout}
  1492. label="特批立项"
  1493. >
  1494. <span>{getApprovedState(this.state.approval)}</span>
  1495. </FormItem>
  1496. <FormItem
  1497. className="half-item"
  1498. {...formItemLayout}
  1499. label="已收款项(万元)"
  1500. >
  1501. <span>{this.state.settlementAmount}</span>
  1502. </FormItem>
  1503. <FormItem
  1504. className="half-item"
  1505. {...formItemLayout}
  1506. label="订单部门"
  1507. >
  1508. <span>{this.state.depName}</span>
  1509. </FormItem>
  1510. <FormItem
  1511. className="half-item"
  1512. {...formItemLayout}
  1513. label="是否外包"
  1514. >
  1515. {this.state.outsource}
  1516. </FormItem>
  1517. <div className="clearfix">
  1518. <FormItem
  1519. labelCol={{ span: 4 }}
  1520. wrapperCol={{ span: 16 }}
  1521. label="订单留言"
  1522. >
  1523. <p style={{ width: 500, wordWrap: "break-word" }}>
  1524. {this.state.orderRemarks}
  1525. </p>
  1526. </FormItem>
  1527. </div>
  1528. <div className="clearfix">
  1529. <div>
  1530. <FormItem
  1531. labelCol={{ span: 4 }}
  1532. wrapperCol={{ span: 18 }}
  1533. label="合同扫描件"
  1534. >
  1535. <Upload
  1536. className="demandDetailShow-upload"
  1537. listType="picture-card"
  1538. fileList={this.state.orgCodeUrl}
  1539. onPreview={(file) => {
  1540. this.setState({
  1541. previewImage: file.url || file.thumbUrl,
  1542. previewVisible: true,
  1543. });
  1544. }}
  1545. ></Upload>
  1546. <Modal
  1547. maskClosable={false}
  1548. footer={null}
  1549. width={"70%"}
  1550. visible={this.state.previewVisible}
  1551. onCancel={() => {
  1552. this.setState({ previewVisible: false,rotateDeg: 0, });
  1553. }}
  1554. >
  1555. <img
  1556. alt=""
  1557. style={{
  1558. width: "100%",
  1559. transform: `rotate(${this.state.rotateDeg}deg)`,
  1560. }}
  1561. src={this.state.previewImage || ""}
  1562. />
  1563. <Button
  1564. onClick={this.rotate}
  1565. style={{
  1566. position: "relative",
  1567. left: "50%",
  1568. transform: "translateX(-50%)",
  1569. }}
  1570. >
  1571. 旋转
  1572. </Button>
  1573. <Button
  1574. onClick={this.upImg}
  1575. style={{
  1576. position: "absolute",
  1577. left: -81,
  1578. top: "50%",
  1579. transform: "translateY(-50%)",
  1580. }}
  1581. >
  1582. 上一张
  1583. </Button>
  1584. <Button
  1585. onClick={this.downImg}
  1586. style={{
  1587. position: "absolute",
  1588. right: -81,
  1589. top: "50%",
  1590. transform: "translateY(-50%)",
  1591. }}
  1592. >
  1593. 下一张
  1594. </Button>
  1595. </Modal>
  1596. <Button
  1597. style={{
  1598. float: "right",
  1599. marginRight: "140px",
  1600. marginTop: "20px",
  1601. }}
  1602. onClick={this.getOrderLog}
  1603. >
  1604. 查看订单日志
  1605. </Button>
  1606. </FormItem>
  1607. <FormItem
  1608. labelCol={{ span: 4 }}
  1609. wrapperCol={{ span: 18 }}
  1610. label="补充协议"
  1611. >
  1612. <Upload
  1613. className="demandDetailShow-upload"
  1614. listType="picture-card"
  1615. fileList={this.state.replenishUrl}
  1616. onPreview={(file) => {
  1617. this.setState({
  1618. previewImage: file.url || file.thumbUrl,
  1619. previewVisible: true,
  1620. });
  1621. }}
  1622. ></Upload>
  1623. <Modal
  1624. maskClosable={false}
  1625. footer={null}
  1626. width={"70%"}
  1627. visible={this.state.previewVisible}
  1628. onCancel={() => {
  1629. this.setState({ previewVisible: false,rotateDeg: 0 });
  1630. }}
  1631. >
  1632. <img
  1633. alt=""
  1634. style={{
  1635. width: "100%",
  1636. transform: `rotate(${this.state.rotateDeg}deg)`,
  1637. }}
  1638. src={this.state.previewImage || ""}
  1639. />
  1640. <Button
  1641. onClick={this.rotate}
  1642. style={{
  1643. position: "relative",
  1644. left: "50%",
  1645. transform: "translateX(-50%)",
  1646. }}
  1647. >
  1648. 旋转
  1649. </Button>
  1650. <Button
  1651. onClick={this.upImgs}
  1652. style={{
  1653. position: "absolute",
  1654. left: -81,
  1655. top: "50%",
  1656. transform: "translateY(-50%)",
  1657. }}
  1658. >
  1659. 上一张
  1660. </Button>
  1661. <Button
  1662. onClick={this.downImgs}
  1663. style={{
  1664. position: "absolute",
  1665. right: -81,
  1666. top: "50%",
  1667. transform: "translateY(-50%)",
  1668. }}
  1669. >
  1670. 下一张
  1671. </Button>
  1672. </Modal>
  1673. </FormItem>
  1674. </div>
  1675. </div>
  1676. <div className="clearfix">
  1677. <FormItem
  1678. className="half-item"
  1679. {...formItemLayout}
  1680. label="订单负责人"
  1681. >
  1682. <span>{this.state.salesmanName}</span>
  1683. </FormItem>
  1684. <FormItem
  1685. className="half-item"
  1686. {...formItemLayout}
  1687. label="订单负责人电话"
  1688. >
  1689. <span>{this.state.salesmanMobile}</span>
  1690. </FormItem>
  1691. </div>
  1692. <div className="clearfix">
  1693. <FormItem
  1694. className="half-item"
  1695. {...formItemLayout}
  1696. label="当前财务负责人"
  1697. >
  1698. <span>{this.state.nowFinance}</span>
  1699. </FormItem>
  1700. <FormItem
  1701. className="half-item"
  1702. {...formItemLayout}
  1703. label="当前财务负责人电话"
  1704. >
  1705. <span>{this.state.nowFinanceMobile}</span>
  1706. </FormItem>
  1707. </div>
  1708. <div className="clearfix">
  1709. <FormItem
  1710. className="half-item"
  1711. {...formItemLayout}
  1712. style={{ opacity: ".5" }}
  1713. label="原订单负责人"
  1714. >
  1715. <span>{this.state.oldSalesmanName}</span>
  1716. </FormItem>
  1717. <FormItem
  1718. className="half-item"
  1719. {...formItemLayout}
  1720. style={{ opacity: ".5" }}
  1721. label="原订单负责人电话"
  1722. >
  1723. <span>{this.state.oldSalesmanMobile}</span>
  1724. </FormItem>
  1725. </div>
  1726. <div className="clearfix">
  1727. <FormItem
  1728. className="half-item"
  1729. style={{ opacity: ".5" }}
  1730. {...formItemLayout}
  1731. label="实际财务操作人"
  1732. >
  1733. <span>{this.state.financeName}</span>
  1734. </FormItem>
  1735. <FormItem
  1736. className="half-item"
  1737. {...formItemLayout}
  1738. style={{ opacity: ".5" }}
  1739. label="实际财务操作人电话"
  1740. >
  1741. <span>{this.state.financeMobile}</span>
  1742. </FormItem>
  1743. </div>
  1744. <div>
  1745. <span
  1746. style={{ marginLeft: "50px", fontSize: "20px" }}
  1747. >
  1748. 项目业务
  1749. </span>
  1750. {this.state.processStatus == 0 ? (
  1751. <Button
  1752. type="primary"
  1753. onClick={this.addDetailed}
  1754. style={{
  1755. float: "right",
  1756. marginRight: "50px",
  1757. marginBottom: "15px",
  1758. }}
  1759. >
  1760. 添加项目明细
  1761. </Button>
  1762. ) : (
  1763. ""
  1764. )}
  1765. </div>
  1766. <div className="patent-table">
  1767. <Spin spinning={this.state.loading}>
  1768. <Table
  1769. columns={this.state.columnsX}
  1770. dataSource={this.state.dataSourceX}
  1771. pagination={this.state.paginations}
  1772. onRowClick={this.tableRowClickX}
  1773. bordered
  1774. size="small"
  1775. />
  1776. </Spin>
  1777. </div>
  1778. <div>
  1779. <span
  1780. style={{ marginLeft: "50px", fontSize: "20px" }}
  1781. >
  1782. 催款节点
  1783. </span>
  1784. <span
  1785. style={{
  1786. display: cuiDataList.length
  1787. ? "none"
  1788. : "inline-block",
  1789. marginLeft: 10,
  1790. color: "red",
  1791. }}
  1792. >
  1793. 金额总计(万元): {this.state.totalCui}
  1794. </span>
  1795. {this.state.processStatus == 0 ? (
  1796. <Button
  1797. type="primary"
  1798. onClick={this.addcontact}
  1799. style={{
  1800. float: "right",
  1801. marginRight: "50px",
  1802. marginBottom: "15px",
  1803. }}
  1804. >
  1805. 添加催款节点
  1806. </Button>
  1807. ) : (
  1808. ""
  1809. )}
  1810. </div>
  1811. <div className="clearfix">
  1812. <Spin spinning={this.state.loading}>
  1813. <Form layout="horizontal" id="demand-form">
  1814. <Table
  1815. pagination={false}
  1816. bordered
  1817. size="small"
  1818. columns={
  1819. cuiDataList.length
  1820. ? this.state.ContactsLists
  1821. : this.state.ContactsListsNew
  1822. }
  1823. dataSource={
  1824. cuiDataList.length
  1825. ? this.state.contactList
  1826. : this.state.contactListNew
  1827. }
  1828. />
  1829. <Col
  1830. span={24}
  1831. offset={9}
  1832. style={{ marginTop: "15px" }}
  1833. ></Col>
  1834. </Form>
  1835. </Spin>
  1836. </div>
  1837. <div className="addSave" style={{ marginTop: "15px" }}>
  1838. <Button
  1839. type="primary"
  1840. // onClick={this.examOk}
  1841. onClick={() => {
  1842. // if (this.state.outsource == "是") {
  1843. // this.showDeleteConfirm(this.examOk);
  1844. // } else {
  1845. // this.examOk();
  1846. // }
  1847. this.setState({
  1848. agreeVisible: true,
  1849. reason: "",
  1850. });
  1851. }}
  1852. style={{ marginLeft: "200px" }}
  1853. htmlType="submit"
  1854. >
  1855. 通过
  1856. </Button>
  1857. <Button
  1858. type="primary"
  1859. onClick={this.examNo}
  1860. style={{ marginLeft: "50px" }}
  1861. htmlType="submit"
  1862. >
  1863. 驳回
  1864. </Button>
  1865. <Button
  1866. type="ghost"
  1867. onClick={this.visitCancel}
  1868. style={{ marginLeft: "50px" }}
  1869. >
  1870. 取消
  1871. </Button>
  1872. {/*<Button className='warn-button' type="primary" onClick={this.outsourcing} style={{marginLeft:"50px"}}>通过不走总部</Button>
  1873. <p className='hint'>提示:高于总部价格,费用个人承担!</p>*/}
  1874. </div>
  1875. </div>
  1876. </Spin>
  1877. </Form>
  1878. </TabPane>
  1879. <TabPane tab="外包(不走总部)" key="2">
  1880. <Spin spinning={this.state.loading}>
  1881. <div className="clearfix" style={{ marginTop: 10 }}>
  1882. <FormItem
  1883. className="half-item"
  1884. {...formItemLayout}
  1885. label={
  1886. <span>
  1887. <strong style={{ color: "#f00" }}>*</strong>外包公司
  1888. </span>
  1889. }
  1890. >
  1891. <Input
  1892. value={this.state.companyName}
  1893. onChange={(e) => {
  1894. this.setState({
  1895. companyName: e.target.value,
  1896. });
  1897. }}
  1898. placeholder="请填写外包公司名称"
  1899. />
  1900. </FormItem>
  1901. <span className="tip">如多个公司,请用间隔</span>
  1902. </div>
  1903. <div className="clearfix">
  1904. <FormItem
  1905. className="half-item"
  1906. {...formItemLayout}
  1907. label={
  1908. <span>
  1909. <strong style={{ color: "#f00" }}>*</strong>
  1910. 单价(万元)
  1911. </span>
  1912. }
  1913. >
  1914. <Input
  1915. value={this.state.unitPrice}
  1916. onChange={(e) => {
  1917. this.setState({
  1918. unitPrice: e.target.value,
  1919. });
  1920. }}
  1921. placeholder="请填写单价"
  1922. />
  1923. </FormItem>
  1924. </div>
  1925. <div className="clearfix">
  1926. <FormItem
  1927. className="half-item"
  1928. {...formItemLayout}
  1929. label={
  1930. <span>
  1931. <strong style={{ color: "#f00" }}>*</strong>数量(个)
  1932. </span>
  1933. }
  1934. >
  1935. <Input
  1936. value={this.state.unitNumber}
  1937. onChange={(e) => {
  1938. this.setState({
  1939. unitNumber: e.target.value,
  1940. });
  1941. }}
  1942. placeholder="请填写数量"
  1943. />
  1944. </FormItem>
  1945. </div>
  1946. <div className="clearfix">
  1947. <FormItem
  1948. className="half-item"
  1949. {...formItemLayout}
  1950. label={
  1951. <span>
  1952. <strong style={{ color: "#f00" }}>*</strong>
  1953. 总金额(万元)
  1954. </span>
  1955. }
  1956. >
  1957. <Input
  1958. value={this.state.amount}
  1959. onChange={(e) => {
  1960. this.setState({
  1961. amount: e.target.value,
  1962. });
  1963. }}
  1964. placeholder="请填写本次外包公司的价格"
  1965. />
  1966. </FormItem>
  1967. </div>
  1968. {/*<div className="clearfix">
  1969. <FormItem className="half-item"
  1970. {...formItemLayout}
  1971. label="上传协议文件" style={{height:"auto"}}>
  1972. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  1973. data={(e)=>{
  1974. return {
  1975. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  1976. }
  1977. }}
  1978. fileList={this.state.attachmentUrl}
  1979. onChange={(e)=>{
  1980. this.setState({attachmentUrl:e.fileList})
  1981. }}>
  1982. {this.state.attachmentUrl.length>1?null:<Button>
  1983. <Icon type="upload" /> 点击上传
  1984. </Button>}
  1985. </Upload>
  1986. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  1987. </FormItem>
  1988. </div>*/}
  1989. <div className="clearfix">
  1990. <FormItem
  1991. className="half-item"
  1992. style={{ height: "auto" }}
  1993. {...formItemLayout}
  1994. label={
  1995. <span>
  1996. <strong style={{ color: "#f00" }}>*</strong>备注
  1997. </span>
  1998. }
  1999. >
  2000. <TextArea
  2001. rows={4}
  2002. value={this.state.outsourceRemarks}
  2003. onChange={(e) => {
  2004. this.setState({
  2005. outsourceRemarks: e.target.value,
  2006. });
  2007. }}
  2008. placeholder="请输入备注"
  2009. />
  2010. </FormItem>
  2011. </div>
  2012. <p
  2013. className="tip"
  2014. style={{
  2015. paddingBottom: "12px",
  2016. width: "240px",
  2017. marginLeft: "145px",
  2018. }}
  2019. >
  2020. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  2021. </p>
  2022. <div className="clearfix">
  2023. <FormItem
  2024. labelCol={{ span: 4 }}
  2025. wrapperCol={{ span: 18 }}
  2026. label={
  2027. <span>
  2028. <strong style={{ color: "#f00" }}>*</strong>
  2029. 合同/协议扫描件
  2030. <span style={{ color: "#f00" }}>(外包合同)</span>
  2031. </span>
  2032. }
  2033. >
  2034. <PicturesWall
  2035. fileList={this.getOrgCodeUrl}
  2036. pictureUrl={this.state.pictureUrl}
  2037. />
  2038. <p>请上传与外包公司签订的合同协议</p>
  2039. <p>图片建议:要清晰。</p>
  2040. </FormItem>
  2041. </div>
  2042. <div className="clearfix">
  2043. <div
  2044. style={{ display: "inline-black", textAlign: "center" }}
  2045. >
  2046. <Button type="primary" onClick={this.sureOut}>
  2047. 确认发起外包,不通过总部
  2048. </Button>
  2049. <p className="tip">提示:高于总部价格,费用个人承担</p>
  2050. </div>
  2051. </div>
  2052. </Spin>
  2053. </TabPane>
  2054. </Tabs>
  2055. </Modal>
  2056. <Modal
  2057. maskClosable={false}
  2058. visible={this.state.addnextVisible}
  2059. onOk={this.nextCancel}
  2060. onCancel={this.nextCancel}
  2061. confirmLoading={this.state.confirmLoading}
  2062. width="800px"
  2063. title={"项目任务详情"}
  2064. footer=""
  2065. className="admin-desc-content"
  2066. >
  2067. <Form layout="horizontal" id="demand-form">
  2068. <Spin spinning={this.state.loading}>
  2069. <div className="clearfix">
  2070. <FormItem
  2071. className="half-item"
  2072. {...formItemLayout}
  2073. label="项目名称"
  2074. >
  2075. <span>{this.state.commodityName}</span>
  2076. </FormItem>
  2077. <FormItem
  2078. className="half-item"
  2079. {...formItemLayout}
  2080. label="项目数量"
  2081. >
  2082. <span>{this.state.commodityQuantity}</span>
  2083. </FormItem>
  2084. <FormItem
  2085. className="half-item"
  2086. {...formItemLayout}
  2087. label="金额(万元)"
  2088. >
  2089. <span>{this.state.commodityPrice}</span>
  2090. </FormItem>
  2091. <FormItem
  2092. className="half-item"
  2093. {...formItemLayout}
  2094. label="主要项目"
  2095. >
  2096. <span>{getboutique(this.state.main)}</span>
  2097. </FormItem>
  2098. <div className="clearfix">
  2099. <FormItem
  2100. labelCol={{ span: 4 }}
  2101. wrapperCol={{ span: 16 }}
  2102. label="服务说明"
  2103. >
  2104. <span>{this.state.taskComment}</span>
  2105. </FormItem>
  2106. </div>
  2107. </div>
  2108. </Spin>
  2109. </Form>
  2110. </Modal>
  2111. <Modal
  2112. maskClosable={false}
  2113. visible={this.state.noVisible}
  2114. onOk={this.handleOk}
  2115. onCancel={this.noCancel}
  2116. width="400px"
  2117. title={"拒绝理由"}
  2118. footer=""
  2119. className="admin-desc-content"
  2120. confirmLoading={this.state.confirmLoading}
  2121. >
  2122. <Form layout="horizontal" id="demand-form">
  2123. <Spin spinning={this.state.loading}>
  2124. <div className="clearfix">
  2125. <FormItem
  2126. labelCol={{ span: 4 }}
  2127. wrapperCol={{ span: 16 }}
  2128. label="拒绝理由"
  2129. >
  2130. <Input
  2131. type="textarea"
  2132. placeholder="请输入拒绝理由"
  2133. rows={4}
  2134. value={this.state.reason}
  2135. onChange={(e) => {
  2136. this.setState({ reason: e.target.value });
  2137. }}
  2138. />
  2139. </FormItem>
  2140. </div>
  2141. <div className="clearfix">
  2142. <Button
  2143. className="cancel"
  2144. type="primary"
  2145. onClick={this.examOks}
  2146. style={{ marginLeft: "50px" }}
  2147. htmlType="submit"
  2148. loading={this.state.aloading}
  2149. >
  2150. 确定
  2151. </Button>
  2152. <Button
  2153. className="cancel"
  2154. type="ghost"
  2155. onClick={this.noCancel}
  2156. style={{ marginLeft: "50px" }}
  2157. >
  2158. 取消
  2159. </Button>
  2160. </div>
  2161. </Spin>
  2162. </Form>
  2163. </Modal>
  2164. <Modal
  2165. maskClosable={false}
  2166. visible={this.state.agreeVisible}
  2167. onOk={(e) => {
  2168. this.setState({
  2169. agreeVisible: false,
  2170. });
  2171. }}
  2172. onCancel={(e) => {
  2173. this.setState({
  2174. agreeVisible: false,
  2175. });
  2176. }}
  2177. width="400px"
  2178. title={"同意备注"}
  2179. footer=""
  2180. className="admin-desc-content"
  2181. confirmLoading={this.state.confirmLoading}
  2182. >
  2183. <Form layout="horizontal" id="demand-form">
  2184. <Spin spinning={this.state.loading}>
  2185. <div className="clearfix">
  2186. <FormItem
  2187. labelCol={{ span: 4 }}
  2188. wrapperCol={{ span: 16 }}
  2189. label="同意理由"
  2190. >
  2191. <Input
  2192. type="textarea"
  2193. placeholder="请输入同意理由"
  2194. rows={4}
  2195. value={this.state.reason}
  2196. onChange={(e) => {
  2197. this.setState({ reason: e.target.value });
  2198. }}
  2199. />
  2200. </FormItem>
  2201. </div>
  2202. <div className="clearfix">
  2203. <Button
  2204. className="cancel"
  2205. type="primary"
  2206. onClick={(e) => {
  2207. if (this.state.outsource == "是") {
  2208. this.showDeleteConfirm(this.examOk);
  2209. } else {
  2210. this.examOk();
  2211. }
  2212. }}
  2213. style={{ marginLeft: "50px" }}
  2214. htmlType="submit"
  2215. loading={this.state.aloading}
  2216. >
  2217. 确定
  2218. </Button>
  2219. <Button
  2220. className="cancel"
  2221. type="ghost"
  2222. onClick={(e) => {
  2223. this.setState({
  2224. agreeVisible: false,
  2225. });
  2226. }}
  2227. style={{ marginLeft: "50px" }}
  2228. >
  2229. 取消
  2230. </Button>
  2231. </div>
  2232. </Spin>
  2233. </Form>
  2234. </Modal>
  2235. {/* <Modal
  2236. visible={this.state.rizhivisible}
  2237. className="admin-desc-content"
  2238. width="800px"
  2239. maskClosable={false}
  2240. title="订单日志"
  2241. footer={null}
  2242. onCancel={this.closeOrderLog}
  2243. >
  2244. <div className="patent-table">
  2245. <Spin spinning={this.state.loading}>
  2246. <Table
  2247. columns={this.state.columnsrizhi}
  2248. dataSource={this.state.dataSourcerizhi}
  2249. pagination={false}
  2250. />
  2251. </Spin>
  2252. </div>
  2253. </Modal> */}
  2254. <OrderRiZi
  2255. dataSourcerizhi={this.state.dataSourcerizhi}
  2256. closeOrderLog={this.closeOrderLog}
  2257. visible={this.state.rizhivisible}
  2258. loading={this.state.loading}
  2259. />
  2260. </div>
  2261. </div>
  2262. );
  2263. },
  2264. })
  2265. );
  2266. export default IntentionCustomer;