outsourcingList.jsx 92 KB

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