outsourcingList.jsx 77 KB

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