outsourcingList.jsx 91 KB

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