outsourcingList.jsx 91 KB

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