outsourcingList.jsx 92 KB

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