outsourcingList.jsx 91 KB

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