order.jsx 213 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import {
  4. Form,
  5. Radio,
  6. Icon,
  7. Button,
  8. Input,
  9. Spin,
  10. Table,
  11. message,
  12. DatePicker,
  13. Modal,
  14. Upload,
  15. Cascader,
  16. Tabs,
  17. Select,
  18. Col,
  19. Tag
  20. } from "antd";
  21. import NewService from "../../order/orderNew/addService.jsx";
  22. import ResolutionDetail from "@/resolutionDetail";
  23. import moment from "moment";
  24. import "./userMangagement.less";
  25. import { areaSelect } from "@/NewDicProvinceList";
  26. import OrderRiZi from "@/orderRiZi.jsx";
  27. import {
  28. getApprovedState,
  29. getprovince,
  30. getProcessStatus,
  31. getLiquidationStatus,
  32. getNewOrderStatus,
  33. beforeUploadFile,
  34. getProvinceA,
  35. getInvoiceStatus,
  36. splitUrl,
  37. ShowModal,
  38. getCuikuan,
  39. getjiedian, getProjectName
  40. } from "../../../tools.js";
  41. import ShowModalDiv from "@/showModal.jsx";
  42. import { ChooseList } from "../../order/orderNew/chooseList";
  43. import ReactToPrint from "react-to-print";
  44. import Project from "../../../../component/project";
  45. import ImgList from "../../../common/imgList";
  46. import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
  47. const { Option } = Select;
  48. const { TabPane } = Tabs;
  49. const PicturesWall = React.createClass({
  50. getInitialState() {
  51. return {
  52. previewVisible: false,
  53. previewImage: "",
  54. fileList: this.props.pictureUrl,
  55. declarationBatch: 1,
  56. dataInfor: {},
  57. };
  58. },
  59. getDefaultProps() {
  60. return {
  61. changeClick: this.modifyChange
  62. };
  63. },
  64. handleCancel() {
  65. this.setState({ previewVisible: false });
  66. },
  67. handlePreview(file) {
  68. this.setState({
  69. previewImage: file.url || file.thumbUrl,
  70. previewVisible: true
  71. });
  72. },
  73. handleChange(info) {
  74. let fileList = info.fileList;
  75. this.setState({ fileList });
  76. this.props.fileList(fileList);
  77. },
  78. componentWillReceiveProps(nextProps) {
  79. this.state.fileList = nextProps.pictureUrl;
  80. },
  81. render() {
  82. const { previewVisible, previewImage, fileList } = this.state;
  83. const uploadButton = (
  84. <div>
  85. <Icon type="plus" />
  86. <div className="ant-upload-text">点击上传</div>
  87. </div>
  88. );
  89. return (
  90. <div style={{ display: "inline-block" }}>
  91. <Upload
  92. beforeUpload={beforeUploadFile}
  93. action={
  94. globalConfig.context +
  95. "/api/admin/orderInvoice/uploadOrderInvoiceFile"
  96. }
  97. multiple={true}
  98. data={{ sign: "order_invoice_file" }}
  99. listType="picture-card"
  100. fileList={fileList}
  101. onPreview={this.handlePreview}
  102. onChange={this.handleChange}
  103. >
  104. {uploadButton}
  105. </Upload>
  106. <Modal
  107. maskClosable={false}
  108. visible={previewVisible}
  109. footer={null}
  110. onCancel={this.handleCancel}
  111. >
  112. <img alt="example" style={{ width: "100%" }} src={previewImage} />
  113. </Modal>
  114. </div>
  115. );
  116. }
  117. });
  118. const Order = Form.create()(
  119. React.createClass({
  120. loadData(pageNo) {
  121. this.state.data = [];
  122. this.setState({
  123. loading: true,
  124. });
  125. $.ajax({
  126. method: "get",
  127. dataType: "json",
  128. crossDomain: false,
  129. url: globalConfig.context + "/api/admin/newOrder/orderNewList",
  130. data: {
  131. pageNo: pageNo || 1,
  132. pageSize: this.state.pagination.pageSize,
  133. specially: 6,
  134. name: this.state.customerName,
  135. orderNo: this.state.searchOrderNo,
  136. starTime: this.state.releaseDate[0],
  137. endTime: this.state.releaseDate[1],
  138. liquidationStatus: this.state.liquidationStatusSearch,
  139. contractNo: this.state.contractNoSearch,
  140. depId: this.state.departmenttList,
  141. amountStatus: this.state.amountStatus,
  142. approval: this.state.approvalSearch,
  143. },
  144. success: function (data) {
  145. ShowModal(this);
  146. let theArr = [];
  147. if (!data.data) {
  148. if (data.error && data.error.length) {
  149. message.warning(data.error[0].message);
  150. }
  151. } else {
  152. for (let i = 0; i < data.data.list.length; i++) {
  153. let thisdata = data.data.list[i];
  154. theArr.push({
  155. key: thisdata.orderNo,
  156. id: thisdata.id,
  157. orderNo: thisdata.orderNo, //订单编号
  158. totalAmount: thisdata.totalAmount, //签单金额
  159. processStatus: thisdata.processStatus, //流程状态
  160. liquidationStatus: thisdata.liquidationStatus, //结算状态
  161. approval: thisdata.approval, //特批状态
  162. signDate: thisdata.signDate, //签单时间
  163. userName: thisdata.userName, //客户名称
  164. salesmanName: thisdata.salesmanName, //营销员名称
  165. financeName: thisdata.financeName, //财务名称
  166. createDate: thisdata.createDate, //下单时间
  167. orderStatus: thisdata.orderStatus, //订单状态
  168. depName: thisdata.depName, //部门名称
  169. contractNo: thisdata.contractNo, //合同编号
  170. invoiceAmount: thisdata.invoiceAmount, //开票金额
  171. settlementAmount: thisdata.settlementAmount, //已收款
  172. });
  173. }
  174. this.state.pagination.current = data.data.pageNo;
  175. this.state.pagination.total = data.data.totalCount;
  176. }
  177. if (!data.data.list.length) {
  178. this.state.pagination.current = 0;
  179. this.state.pagination.total = 0;
  180. }
  181. this.setState({
  182. pageNo: pageNo,
  183. dataSource: theArr,
  184. pagination: this.state.pagination,
  185. selectedRowKeys: [],
  186. });
  187. }.bind(this),
  188. }).always(
  189. function () {
  190. this.setState({
  191. loading: false,
  192. });
  193. }.bind(this)
  194. );
  195. },
  196. getInitialState() {
  197. return {
  198. rotateDeg: 0,
  199. kaiData: {
  200. remarks: "",
  201. type: undefined,
  202. orgCodeUrl: "",
  203. invoiceType: undefined,
  204. unitName: "",
  205. taxNumber: "",
  206. amount: "",
  207. banks: "",
  208. content: "",
  209. unitAddress: "",
  210. invoiceRemarks: "",
  211. unitMobile: "",
  212. post: undefined,
  213. addressee: "",
  214. addresseeMobile: "",
  215. addresseeProvince: "",
  216. addresseeCity: "",
  217. addresseeArea: "",
  218. recipientAddress: "",
  219. ordapproval: undefined,
  220. alreadyAmount: "0",
  221. ProvinceCity: [],
  222. },
  223. changeList: undefined,
  224. datauser: {},
  225. orgCodeUrl: [],
  226. selectedRowKeys: [],
  227. releaseDate: [],
  228. departmentArr: [],
  229. signBillState: false,
  230. signBillVisible: false,
  231. selectedRows: [],
  232. recordData: [],
  233. flag: false,
  234. searchMore: true,
  235. loading: false,
  236. alreadyAmount: 0,
  237. intentOrder: true,
  238. formalOrder: true,
  239. resVisible: false,
  240. pagination: {
  241. defaultCurrent: 1,
  242. defaultPageSize: 10,
  243. showQuickJumper: true,
  244. pageSize: 10,
  245. onChange: function (page) {
  246. this.loadData(page);
  247. }.bind(this),
  248. showTotal: function (total) {
  249. return "共" + total + "条数据";
  250. },
  251. },
  252. columnsX: [
  253. {
  254. title: "业务项目名称",
  255. dataIndex: "commodityName",
  256. key: "commodityName",
  257. render: (text, record) => {
  258. return text + "-" + record.id
  259. }
  260. },
  261. {
  262. title: "项目类别",
  263. dataIndex: "cname",
  264. key: "cname",
  265. },
  266. {
  267. title: "项目数量",
  268. dataIndex: "commodityQuantity",
  269. key: "commodityQuantity",
  270. render: (text, record) => {
  271. if (record.splitStatus == 1) {
  272. return (
  273. <span>
  274. {text}{" "}
  275. <Tag
  276. color="#108ee9"
  277. onClick={(e) => {
  278. e.stopPropagation();
  279. this.showRes(record);
  280. }}
  281. >
  282. 已拆
  283. </Tag>
  284. </span>
  285. );
  286. } else {
  287. return text;
  288. }
  289. },
  290. },
  291. {
  292. title: "金额(万元)",
  293. dataIndex: "commodityPrice",
  294. key: "commodityPrice",
  295. },
  296. {
  297. title: "负责人",
  298. dataIndex: "contacts",
  299. key: "contacts",
  300. },
  301. {
  302. title: "负责人电话",
  303. dataIndex: "contactsMobile",
  304. key: "contactsMobile",
  305. },
  306. {
  307. title: "主要项目",
  308. dataIndex: "main",
  309. key: "main",
  310. render: (text) => {
  311. return text ? "是" : "否";
  312. },
  313. },
  314. {
  315. title: "项目说明",
  316. dataIndex: "taskComment",
  317. key: "taskComment",
  318. render: (text) => {
  319. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  320. },
  321. },
  322. ],
  323. ContactsListsNew: [
  324. {
  325. title: "项目名称",
  326. dataIndex: "commodityName",
  327. key: "commodityName",
  328. render: (text, record) => {
  329. return <span>{text + "-" + record.tid}</span>;
  330. },
  331. },
  332. {
  333. title: "项目分类",
  334. dataIndex: "projectType",
  335. key: "projectType",
  336. render: (text) => {
  337. let arr = this.state.dataSourceX || [];
  338. let str = "";
  339. for (let i = 0; i < arr.length; i++) {
  340. if (this.state.dataSourceX[i].sort == text) {
  341. str = this.state.dataSourceX[i].cname;
  342. return <span>{str}</span>;
  343. }
  344. }
  345. },
  346. },
  347. {
  348. title: "催款科目",
  349. dataIndex: "dunTypeName",
  350. key: "dunTypeName",
  351. render: (text, record) => {
  352. if (record.customizeName) {
  353. return text + record.customizeName;
  354. }
  355. return <span>{text}</span>;
  356. },
  357. },
  358. {
  359. title: "时间(天)",
  360. dataIndex: "waitDay",
  361. key: "waitDay",
  362. render: (text, record) => {
  363. if (record.dunTypeName) {
  364. if (record.customizeTimes) {
  365. return record.customizeTimes;
  366. }
  367. return <span>{text}</span>;
  368. }
  369. },
  370. },
  371. {
  372. title: "金额(万元)",
  373. dataIndex: "money",
  374. key: "money",
  375. render: (text, record) => {
  376. if (record.dunTypeName) {
  377. if (record.appropriationRatio && !record.money) {
  378. return <span>{record.appropriationRatio}(拨款比例)</span>;
  379. } else if (record.appropriationRatio && record.money) {
  380. return (
  381. <span>
  382. {text}(比例:{record.appropriationRatio})
  383. </span>
  384. );
  385. } else {
  386. return <span>{text}</span>;
  387. }
  388. }
  389. },
  390. },
  391. {
  392. title: "服务年限",
  393. dataIndex: "startDate",
  394. key: "startDate",
  395. render: (text, record) => {
  396. if (record.dunTypeName) {
  397. return <span>{text}</span>;
  398. }
  399. },
  400. },
  401. {
  402. title: "催款状态",
  403. dataIndex: "status",
  404. key: "status",
  405. render: (text) => {
  406. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  407. },
  408. },
  409. ],
  410. ContactsLists: [
  411. {
  412. title: "催款科目",
  413. dataIndex: "dunSubject",
  414. key: "dunSubject",
  415. render: (text) => {
  416. return getjiedian(text);
  417. },
  418. },
  419. {
  420. title: "金额(万元)",
  421. dataIndex: "money",
  422. key: "money",
  423. },
  424. {
  425. title: "催款状态",
  426. dataIndex: "dunStatus",
  427. key: "dunStatus",
  428. render: (text) => {
  429. return getCuikuan(text);
  430. },
  431. },
  432. ],
  433. cuiColumns: [
  434. {
  435. title: "序号",
  436. dataIndex: "key",
  437. key: "key",
  438. },
  439. {
  440. title: "合同编号",
  441. dataIndex: "contractNo",
  442. key: "contractNo",
  443. },
  444. {
  445. title: "订单编号",
  446. dataIndex: "orderNo",
  447. key: "orderNo",
  448. },
  449. {
  450. title: "客户名称",
  451. dataIndex: "userName",
  452. key: "userName",
  453. },
  454. {
  455. title: "订单负责人",
  456. dataIndex: "salesmanName",
  457. key: "salesmanName",
  458. },
  459. {
  460. title: "订单部门",
  461. dataIndex: "depName",
  462. key: "depName",
  463. },
  464. {
  465. title: "订单状态",
  466. dataIndex: "orderStatus",
  467. key: "orderStatus",
  468. render: (text) => {
  469. return getNewOrderStatus(text);
  470. },
  471. },
  472. {
  473. title: "项目状态",
  474. dataIndex: "projectStatus",
  475. key: "projectStatus",
  476. render: (text) => {
  477. return getProjectName(text);
  478. },
  479. },
  480. {
  481. title: "签单金额",
  482. dataIndex: "totalAmount",
  483. key: "totalAmount",
  484. },
  485. {
  486. title: "结算状态",
  487. dataIndex: "liquidationStatus",
  488. key: "liquidationStatus",
  489. render: (text) => {
  490. return getLiquidationStatus(text);
  491. },
  492. },
  493. {
  494. title: "已收款",
  495. dataIndex: "settlementAmount",
  496. key: "settlementAmount",
  497. },
  498. {
  499. title: "应收款",
  500. dataIndex: "accountsReceivable",
  501. key: "accountsReceivable",
  502. },
  503. {
  504. title: "催收科目",
  505. dataIndex: "dunSubject",
  506. key: "dunSubject",
  507. // render: text => {
  508. // return getjiedian(text);
  509. // }
  510. },
  511. {
  512. title: "催款状态",
  513. dataIndex: "dunStatus",
  514. key: "dunStatus",
  515. },
  516. {
  517. title: "催收启动时间",
  518. dataIndex: "startDate",
  519. key: "startDate",
  520. },
  521. ],
  522. proColumns: [
  523. {
  524. title: "序号",
  525. dataIndex: "key",
  526. key: "key",
  527. },
  528. {
  529. title: "合同编号",
  530. dataIndex: "contractNo",
  531. key: "contractNo",
  532. },
  533. {
  534. title: "订单编号",
  535. dataIndex: "orderNo",
  536. key: "orderNo",
  537. },
  538. // {
  539. // title: "项目编号",
  540. // dataIndex: "id",
  541. // key: "id"
  542. // },
  543. {
  544. title: "客户名称",
  545. dataIndex: "userName",
  546. key: "userName",
  547. },
  548. {
  549. title: "订单负责人",
  550. dataIndex: "salesmanName",
  551. key: "salesmanName",
  552. },
  553. {
  554. title: "是否主项目",
  555. dataIndex: "main",
  556. key: "main",
  557. render: (text) => {
  558. return text == 0 ? "否" : "是";
  559. },
  560. },
  561. {
  562. title: "项目类别",
  563. dataIndex: "cname",
  564. key: "cname",
  565. },
  566. {
  567. title: "项目名称",
  568. dataIndex: "commodityName",
  569. key: "commodityName",
  570. },
  571. {
  572. title: "项目数量",
  573. dataIndex: "commodityQuantity",
  574. key: "commodityQuantity",
  575. render: (text, record) => {
  576. if (record.splitStatus == 1) {
  577. return (
  578. <span>
  579. {text}{" "}
  580. <Tag
  581. color="#108ee9"
  582. onClick={(e) => {
  583. e.stopPropagation();
  584. this.showRes(record);
  585. }}
  586. >
  587. 已拆
  588. </Tag>
  589. </span>
  590. );
  591. } else {
  592. return text;
  593. }
  594. },
  595. },
  596. {
  597. title: "服务市价",
  598. dataIndex: "commodityPrice",
  599. key: "commodityPrice",
  600. render: (text) => {
  601. return "****";
  602. },
  603. },
  604. {
  605. title: "证书编号",
  606. dataIndex: "certificateNumber",
  607. key: "certificateNumber",
  608. },
  609. {
  610. title: "项目状态",
  611. dataIndex: "projectStatus",
  612. key: "projectStatus",
  613. render: (text) => {
  614. return getProjectName(text);
  615. },
  616. },
  617. {
  618. title: "项目说明",
  619. dataIndex: "taskComment",
  620. key: "taskComment",
  621. },
  622. // {
  623. // title: "外包(内部)公司",
  624. // dataIndex: "outsourceName",
  625. // key: "outsourceName",
  626. // },
  627. // {
  628. // title: "外包(内部)价格",
  629. // dataIndex: "outsourcePrice",
  630. // key: "outsourcePrice",
  631. // render: (text) => {
  632. // return "****";
  633. // },
  634. // },
  635. ],
  636. columns: [
  637. {
  638. title: "合同编号",
  639. dataIndex: "contractNo",
  640. key: "contractNo",
  641. // fixed: 'left'
  642. },
  643. {
  644. title: "订单编号",
  645. dataIndex: "orderNo",
  646. key: "orderNo",
  647. // fixed: 'left'
  648. },
  649. {
  650. title: "客户名称",
  651. dataIndex: "userName",
  652. key: "userName",
  653. render: (text) => {
  654. return text && text.length > 9 ? text.substr(0, 9) + "..." : text;
  655. },
  656. },
  657. {
  658. title: "订单部门",
  659. dataIndex: "depName",
  660. key: "depName",
  661. // fixed: 'left'
  662. },
  663. {
  664. title: "下单时间",
  665. dataIndex: "createDate",
  666. key: "createTime",
  667. },
  668. {
  669. title: "合同签订时间",
  670. dataIndex: "signDate",
  671. key: "signDate",
  672. },
  673. {
  674. title: "流程状态",
  675. dataIndex: "processStatus",
  676. key: "processStatus",
  677. render: (text) => {
  678. return getProcessStatus(text);
  679. },
  680. },
  681. {
  682. title: "签单金额(万元)",
  683. dataIndex: "totalAmount",
  684. key: "totalAmount",
  685. },
  686. {
  687. title: "开票金额(万元)",
  688. dataIndex: "invoiceAmount",
  689. key: "invoiceAmount",
  690. },
  691. {
  692. title: "已收款(万元)",
  693. dataIndex: "settlementAmount",
  694. key: "settlementAmount",
  695. },
  696. {
  697. title: "结算状态",
  698. dataIndex: "liquidationStatus",
  699. key: "liquidationStatus",
  700. render: (text) => {
  701. return getLiquidationStatus(text);
  702. },
  703. },
  704. {
  705. title: "是否特批",
  706. dataIndex: "approval",
  707. key: "approval",
  708. render: (text) => {
  709. return getApprovedState(text);
  710. },
  711. },
  712. {
  713. title: "订单状态",
  714. dataIndex: "orderStatus",
  715. key: "orderStatus",
  716. render: (text) => {
  717. return getNewOrderStatus(text);
  718. },
  719. },
  720. {
  721. title: "财务负责人",
  722. dataIndex: "financeName",
  723. key: "financeName",
  724. },
  725. ],
  726. columnsDate: [
  727. {
  728. title: "编号",
  729. dataIndex: "id",
  730. key: "id",
  731. },
  732. {
  733. title: "订单编号",
  734. dataIndex: "orderno",
  735. key: "orderno",
  736. },
  737. {
  738. title: "开票金额(万元)",
  739. dataIndex: "amount",
  740. key: "amount",
  741. },
  742. {
  743. title: "申请时间",
  744. dataIndex: "createTime",
  745. key: "createTime",
  746. },
  747. {
  748. title: "开票状态",
  749. dataIndex: "status",
  750. key: "status",
  751. render: (text, record) => {
  752. return <div>{getInvoiceStatus(text, record)}</div>;
  753. },
  754. },
  755. ],
  756. dataSource: [],
  757. };
  758. },
  759. invoiceData(record) {
  760. if (this.state.flagA) return;
  761. this.setState({
  762. flagA: true,
  763. });
  764. let theorgCodeUrl = [];
  765. if (this.state.orgCodeUrl.length) {
  766. let picArr = [];
  767. this.state.orgCodeUrl.map(function (item) {
  768. if (
  769. item.response &&
  770. item.response.data &&
  771. item.response.data.length
  772. ) {
  773. picArr.push(item.response.data);
  774. }
  775. });
  776. theorgCodeUrl = picArr.join(",");
  777. }
  778. let api = "",
  779. api1 = "",
  780. method = "",
  781. fdata = {
  782. orderNo: this.state.orderNo3,
  783. type: this.state.type,
  784. status: this.state.status,
  785. approval: this.state.ordapproval,
  786. remarks: this.state.remarks,
  787. invoiceType: this.state.invoiceType,
  788. unitName: this.state.unitName,
  789. taxNumber: this.state.taxNumber,
  790. amount: parseFloat(this.state.amount),
  791. banks: this.state.banks,
  792. content: this.state.content,
  793. unitAddress: this.state.unitAddress,
  794. invoiceRemarks: this.state.invoiceRemarks,
  795. unitMobile: this.state.unitMobile,
  796. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  797. post: this.state.post,
  798. addressee: this.state.addressee,
  799. addresseeMobile: this.state.addresseeMobile,
  800. addresseeProvince:
  801. this.state.post === 0 ? this.state.ProvinceCity[0] : "",
  802. addresseeCity:
  803. this.state.post === 0 ? this.state.ProvinceCity[1] : "",
  804. addresseeArea:
  805. this.state.post === 0 ? this.state.ProvinceCity[2] : "",
  806. recipientAddress: this.state.recipientAddress,
  807. alreadyAmount: parseFloat(this.state.alreadyAmount),
  808. },
  809. sumData = {},
  810. sumData1 = {};
  811. switch (this.state.status) {
  812. case 0:
  813. api = "/api/admin/orderInvoice/createOrderInvoice";
  814. sumData = fdata;
  815. method = "post";
  816. break;
  817. case 1:
  818. api = "/api/admin/orderInvoice/createOrderInvoice";
  819. api1 = "/api/admin/orderInvoice/updateOrderInvoice";
  820. sumData = fdata;
  821. sumData1 = {
  822. orderNo: this.state.orderNo3,
  823. type: this.state.type,
  824. status: this.state.status,
  825. approval: this.state.ordapproval,
  826. remarks: this.state.remarks,
  827. invoiceType: this.state.invoiceType,
  828. unitName: this.state.unitName,
  829. taxNumber: this.state.taxNumber,
  830. amount: parseFloat(this.state.amount),
  831. banks: this.state.banks,
  832. content: this.state.content,
  833. unitAddress: this.state.unitAddress,
  834. invoiceRemarks: this.state.invoiceRemarks,
  835. unitMobile: this.state.unitMobile,
  836. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  837. post: this.state.post,
  838. addressee: this.state.addressee,
  839. addresseeMobile: this.state.addresseeMobile,
  840. addresseeProvince:
  841. this.state.post === 0 ? this.state.ProvinceCity[0] : "",
  842. addresseeCity:
  843. this.state.post === 0 ? this.state.ProvinceCity[1] : "",
  844. addresseeArea:
  845. this.state.post === 0 ? this.state.ProvinceCity[2] : "",
  846. recipientAddress: this.state.recipientAddress,
  847. alreadyAmount: parseFloat(this.state.alreadyAmount),
  848. };
  849. sumData1.id = this.state.id;
  850. method = "post";
  851. break;
  852. case 3:
  853. api = "/api/admin/orderInvoice/selectByIdOrderInvoice";
  854. sumData.id = record.id;
  855. method = "get";
  856. break;
  857. default:
  858. api = "";
  859. break;
  860. }
  861. if (this.state.status === 1 || this.state.status === 0) {
  862. if (typeof this.state.type !== "number") {
  863. message.warning("省内/外不能为空");
  864. this.setState({
  865. flagA: false,
  866. });
  867. return;
  868. }
  869. if (typeof this.state.invoiceType !== "number") {
  870. message.warning("发票类型不能为空");
  871. this.setState({
  872. flagA: false,
  873. });
  874. return;
  875. }
  876. if (typeof theorgCodeUrl !== "string") {
  877. message.warning("未上传图片");
  878. this.setState({
  879. flagA: false,
  880. });
  881. return;
  882. }
  883. if (!this.state.unitName) {
  884. message.warning("单位名称不能为空");
  885. this.setState({
  886. flagA: false,
  887. });
  888. return;
  889. }
  890. if (!this.state.taxNumber) {
  891. message.warning("税号不能为空");
  892. this.setState({
  893. flagA: false,
  894. });
  895. return;
  896. }
  897. if (!this.state.amount) {
  898. message.warning("金额不能为空");
  899. this.setState({
  900. flagA: false,
  901. });
  902. return;
  903. }
  904. if (isNaN(this.state.amount)) {
  905. message.warning("开票金额包含非法字符,请重新输入");
  906. this.setState({
  907. flagA: false,
  908. });
  909. return;
  910. }
  911. if (isNaN(this.state.alreadyAmount)) {
  912. message.warning("开票金额总计包含非法字符,请重新输入");
  913. this.setState({
  914. flagA: false,
  915. });
  916. return;
  917. }
  918. if (parseFloat(this.state.alreadyAmount) < 0) {
  919. message.warning("开票金额总计不能小于0,请重新输入");
  920. this.setState({
  921. flagA: false,
  922. });
  923. return;
  924. }
  925. if (!this.state.banks) {
  926. message.warning("开户行不能为空");
  927. this.setState({
  928. flagA: false,
  929. });
  930. return;
  931. }
  932. if (!this.state.content) {
  933. message.warning("开票内容及说明不能为空");
  934. this.setState({
  935. flagA: false,
  936. });
  937. return;
  938. }
  939. if (!this.state.unitAddress) {
  940. message.warning("单位地址不能为空");
  941. this.setState({
  942. flagA: false,
  943. });
  944. return;
  945. }
  946. if (!this.state.unitMobile) {
  947. message.warning("单位电话不能为空");
  948. this.setState({
  949. flagA: false,
  950. });
  951. return;
  952. }
  953. if (this.state.alreadyAmount === "") {
  954. message.warning("开票金额总计不能为空");
  955. this.setState({
  956. flagA: false,
  957. });
  958. return;
  959. }
  960. }
  961. // console.log(this.state.flag,this.state.status)
  962. this.setState({
  963. loading: true,
  964. });
  965. $.ajax({
  966. method: method,
  967. dataType: "json",
  968. crossDomain: false,
  969. url: globalConfig.context + (this.state.flag ? api1 : api),
  970. data: this.state.flag ? sumData1 : sumData,
  971. success: function (data) {
  972. if (this.state.status === 3 && typeof data.data === "object") {
  973. let thisdata = data.data;
  974. let ProvinceCityArr = [];
  975. let ProvinceS = thisdata.addresseeProvince; //省
  976. let citys = thisdata.addresseeCity; //市
  977. let Areas = thisdata.addresseeArea; //区
  978. ProvinceCityArr.push(ProvinceS, citys, Areas);
  979. this.setState({
  980. orderNo: thisdata.orderNo,
  981. type: thisdata.type,
  982. status: thisdata.status,
  983. ordapproval: thisdata.approval,
  984. remarks: thisdata.remarks,
  985. invoiceType: thisdata.invoiceType,
  986. unitName: thisdata.unitName,
  987. taxNumber: thisdata.taxNumber,
  988. amount: thisdata.amount + "",
  989. banks: thisdata.banks,
  990. content: thisdata.content,
  991. unitAddress: thisdata.unitAddress,
  992. invoiceRemarks: thisdata.invoiceRemarks,
  993. unitMobile: thisdata.unitMobile,
  994. post: thisdata.post,
  995. addressee: thisdata.addressee,
  996. addresseeMobile: thisdata.addresseeMobile,
  997. addresseeProvince: thisdata.addresseeProvince,
  998. addresseeCity: thisdata.addresseeCity,
  999. addresseeArea: thisdata.addresseeArea,
  1000. alreadyAmount: thisdata.alreadyAmount + "",
  1001. ProvinceCity:
  1002. ProvinceCityArr[0] != null ? ProvinceCityArr : undefined, //省市区
  1003. recipientAddress: thisdata.recipientAddress,
  1004. orgCodeUrl: thisdata.voucherUrl
  1005. ? splitUrl(
  1006. thisdata.voucherUrl,
  1007. ",",
  1008. globalConfig.avatarHost + "/upload"
  1009. )
  1010. : [],
  1011. });
  1012. }
  1013. }.bind(this),
  1014. }).done(
  1015. function (data) {
  1016. this.setState({
  1017. loading: false,
  1018. });
  1019. if (!data.error.length) {
  1020. if (this.state.status === 1) {
  1021. message.success("提交成功!");
  1022. this.visitCancels();
  1023. if (this.state.flag) {
  1024. this.inRecordData();
  1025. }
  1026. this.setState({
  1027. flagA: false,
  1028. });
  1029. } else if (this.state.status === 0) {
  1030. message.success("保存成功!");
  1031. this.visitCancels();
  1032. this.setState({
  1033. flagA: false,
  1034. });
  1035. } else if (this.state.status === 3) {
  1036. this.setState({
  1037. flag: true,
  1038. flagA: false,
  1039. });
  1040. }
  1041. } else {
  1042. message.warning(data.error[0].message);
  1043. this.setState({
  1044. flagA: false,
  1045. });
  1046. }
  1047. }.bind(this)
  1048. );
  1049. },
  1050. areset() {
  1051. this.setState({
  1052. remarks: "",
  1053. type: undefined,
  1054. orgCodeUrl: "",
  1055. invoiceType: undefined,
  1056. unitName: "",
  1057. taxNumber: "",
  1058. amount: "",
  1059. banks: "",
  1060. content: "",
  1061. unitAddress: "",
  1062. invoiceRemarks: "",
  1063. unitMobile: "",
  1064. post: undefined,
  1065. addressee: "",
  1066. addresseeMobile: "",
  1067. addresseeProvince: "",
  1068. addresseeCity: "",
  1069. addresseeArea: "",
  1070. recipientAddress: "",
  1071. ordapproval: undefined,
  1072. alreadyAmount: "",
  1073. ProvinceCity: [],
  1074. });
  1075. },
  1076. recompose(record) {
  1077. // console.log(record)
  1078. this.setState({
  1079. avisible: true,
  1080. orderNo3: record.orderno,
  1081. id: record.id,
  1082. });
  1083. this.setState(
  1084. {
  1085. status: 3,
  1086. cvisible: true,
  1087. flag: false,
  1088. },
  1089. () => {
  1090. this.invoiceData(record);
  1091. }
  1092. );
  1093. },
  1094. submitApp() {
  1095. if (this.state.status === 3) {
  1096. this.setState({
  1097. flag: true,
  1098. });
  1099. }
  1100. this.setState(
  1101. {
  1102. status: 1,
  1103. },
  1104. () => {
  1105. this.invoiceData();
  1106. }
  1107. );
  1108. },
  1109. saveApp() {
  1110. this.setState(
  1111. {
  1112. status: 0,
  1113. },
  1114. () => {
  1115. this.invoiceData();
  1116. }
  1117. );
  1118. },
  1119. reject(record) {
  1120. this.setState({
  1121. visibleR: true,
  1122. reason: record.rejectReason,
  1123. });
  1124. },
  1125. rejectCancels() {
  1126. this.setState({
  1127. visibleR: false,
  1128. });
  1129. },
  1130. rizhi() {
  1131. console.log(this.state.orderNo);
  1132. this.setState({
  1133. loading: true,
  1134. });
  1135. $.ajax({
  1136. method: "get",
  1137. dataType: "json",
  1138. crossDomain: false,
  1139. url: "/api/admin/newOrder/selectOrderLog",
  1140. data: {
  1141. orderNo: this.state.orderNo,
  1142. },
  1143. success: function (data) {
  1144. let theArr = [];
  1145. let thisData = data.data;
  1146. if (!thisData.length) {
  1147. if (data.error && data.error.length) {
  1148. message.warning(data.error[0].message);
  1149. }
  1150. thisData = {};
  1151. } else {
  1152. for (let i = 0; i < data.data.length; i++) {
  1153. let thisdata = data.data[i];
  1154. theArr.push({
  1155. processName: thisdata.processName,
  1156. adminName: thisdata.adminName,
  1157. createDate: thisdata.createDate,
  1158. remarks: thisdata.remarks,
  1159. });
  1160. }
  1161. }
  1162. this.setState({
  1163. dataSourcerizhi: theArr,
  1164. });
  1165. }.bind(this),
  1166. }).always(
  1167. function () {
  1168. this.setState({
  1169. loading: false,
  1170. });
  1171. }.bind(this)
  1172. );
  1173. },
  1174. //查看订单日志
  1175. getOrderLog() {
  1176. this.setState({
  1177. rizhivisible: true,
  1178. });
  1179. this.rizhi();
  1180. },
  1181. closeOrderLog() {
  1182. this.setState({
  1183. rizhivisible: false,
  1184. });
  1185. },
  1186. //开票
  1187. visit(record, index) {
  1188. this.areset();
  1189. this.setState({
  1190. contractNo: this.state.dataSource[index].contractNo,
  1191. orderNo3: record.orderNo,
  1192. avisible: true,
  1193. flag: false,
  1194. invoiceType: 0,
  1195. alreadyAmount: 0,
  1196. unitName: this.state.dataSource[index].userName,
  1197. post: 1,
  1198. });
  1199. $.ajax({
  1200. method: "get",
  1201. dataType: "json",
  1202. crossDomain: false,
  1203. url: globalConfig.context + "/api/admin/orderInvoice/getInvoiceDetails",
  1204. data: {
  1205. orderNo: record.orderNo,
  1206. },
  1207. success: (data) => {
  1208. if (data.error.length) {
  1209. message.warning(data.error[0].message);
  1210. } else if (data.data) {
  1211. const thisdata = data.data;
  1212. this.setState({
  1213. contractNo: thisdata.contractNo,
  1214. orderNo: thisdata.orderNo,
  1215. ordapproval: thisdata.approval,
  1216. type: thisdata.type,
  1217. status: thisdata.status,
  1218. remarks: thisdata.remarks,
  1219. invoiceType: thisdata.invoiceType,
  1220. unitName: thisdata.unitName,
  1221. taxNumber: thisdata.taxNumber,
  1222. amount: thisdata.amount,
  1223. banks: thisdata.banks,
  1224. content: thisdata.content,
  1225. unitAddress: thisdata.unitAddress,
  1226. invoiceRemarks: thisdata.invoiceRemarks,
  1227. unitMobile: thisdata.unitMobile,
  1228. post: thisdata.post,
  1229. addressee: thisdata.addressee,
  1230. addresseeMobile: thisdata.addresseeMobile,
  1231. addresseeProvince: thisdata.addresseeProvince,
  1232. addresseeCity: thisdata.addresseeCity,
  1233. addresseeArea: thisdata.addresseeArea,
  1234. alreadyAmount: thisdata.alreadyAmount,
  1235. recipientAddress: thisdata.recipientAddress,
  1236. orgCodeUrl: thisdata.voucherUrl
  1237. ? splitUrl(
  1238. thisdata.voucherUrl,
  1239. ",",
  1240. globalConfig.avatarHost + "/upload"
  1241. )
  1242. : [],
  1243. });
  1244. }
  1245. },
  1246. });
  1247. },
  1248. visitCancels() {
  1249. this.setState({
  1250. avisible: false,
  1251. cvisible: false,
  1252. });
  1253. },
  1254. //查看开票历史记录详情
  1255. dtableRowClick(record) {
  1256. this.setState({
  1257. dvisible: true,
  1258. });
  1259. this.setState({
  1260. loading: true,
  1261. });
  1262. $.ajax({
  1263. method: "get",
  1264. dataType: "json",
  1265. crossDomain: false,
  1266. url:
  1267. globalConfig.context +
  1268. "/api/admin/orderInvoice/selectByIdOrderInvoice",
  1269. data: {
  1270. id: record.id,
  1271. },
  1272. success: function (data) {
  1273. let thisdata = data.data;
  1274. this.setState({
  1275. contractNo: thisdata.contractNo,
  1276. orderNo: thisdata.orderNo,
  1277. ordapproval: thisdata.approval,
  1278. type: thisdata.type,
  1279. status: thisdata.status,
  1280. remarks: thisdata.remarks,
  1281. invoiceType: thisdata.invoiceType,
  1282. unitName: thisdata.unitName,
  1283. taxNumber: thisdata.taxNumber,
  1284. amount: thisdata.amount,
  1285. banks: thisdata.banks,
  1286. content: thisdata.content,
  1287. unitAddress: thisdata.unitAddress,
  1288. invoiceRemarks: thisdata.invoiceRemarks,
  1289. unitMobile: thisdata.unitMobile,
  1290. post: thisdata.post,
  1291. addressee: thisdata.addressee,
  1292. addresseeMobile: thisdata.addresseeMobile,
  1293. addresseeProvince: thisdata.addresseeProvince,
  1294. addresseeCity: thisdata.addresseeCity,
  1295. addresseeArea: thisdata.addresseeArea,
  1296. alreadyAmount: thisdata.alreadyAmount,
  1297. recipientAddress: thisdata.recipientAddress,
  1298. orgCodeUrl: thisdata.voucherUrl
  1299. ? splitUrl(
  1300. thisdata.voucherUrl,
  1301. ",",
  1302. globalConfig.avatarHost + "/upload"
  1303. )
  1304. : [],
  1305. });
  1306. }.bind(this),
  1307. }).done(
  1308. function () {
  1309. this.setState({
  1310. loading: false,
  1311. });
  1312. }.bind(this)
  1313. );
  1314. },
  1315. //关闭开票历史记录详情
  1316. dvisitCancels() {
  1317. this.setState({
  1318. dvisible: false,
  1319. });
  1320. },
  1321. inRecordData() {
  1322. this.setState({
  1323. loading: true,
  1324. });
  1325. $.ajax({
  1326. method: "get",
  1327. dataType: "json",
  1328. crossDomain: false,
  1329. url:
  1330. globalConfig.context +
  1331. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1332. data: {
  1333. orderNo: this.state.orderNo2,
  1334. },
  1335. success: function (data) {
  1336. let theArr = [];
  1337. let sum = 0;
  1338. if (!data.data) {
  1339. if (data.error && data.error.length) {
  1340. message.warning(data.error[0].message);
  1341. }
  1342. } else {
  1343. for (let i = 0; i < data.data.list.length; i++) {
  1344. let thisdata = data.data.list[i];
  1345. sum += parseFloat(thisdata.amount);
  1346. theArr.push({
  1347. id: thisdata.id,
  1348. orderno: thisdata.orderno, //订单编号
  1349. amount: thisdata.amount, //签单金额
  1350. createTime: thisdata.createTime, //流程状态
  1351. status: thisdata.status, //结算状态
  1352. rejectReason: thisdata.rejectReason,
  1353. approval: thisdata.approval,
  1354. });
  1355. }
  1356. }
  1357. this.setState({
  1358. recordData: theArr,
  1359. sum: sum.toFixed(6),
  1360. });
  1361. }.bind(this),
  1362. }).done(
  1363. function () {
  1364. this.setState({
  1365. loading: false,
  1366. });
  1367. }.bind(this)
  1368. );
  1369. },
  1370. inRecord(record) {
  1371. this.setState(
  1372. {
  1373. bvisible: true,
  1374. orderNo2: this.state.selectedRowKeys[0],
  1375. },
  1376. () => {
  1377. this.inRecordData();
  1378. }
  1379. );
  1380. },
  1381. inRecordCanl() {
  1382. this.setState({
  1383. bvisible: false,
  1384. });
  1385. },
  1386. // 拆分详细
  1387. showRes(record) {
  1388. this.setState({
  1389. resVisible: true,
  1390. resRecord: record,
  1391. });
  1392. },
  1393. resCancel() {
  1394. this.setState({
  1395. resVisible: false,
  1396. });
  1397. },
  1398. //结项
  1399. delectRow(record) {
  1400. this.setState({
  1401. loading: true,
  1402. });
  1403. $.ajax({
  1404. method: "get",
  1405. dataType: "json",
  1406. crossDomain: false,
  1407. url: globalConfig.context + "/api/admin/newOrder/OrderOver",
  1408. data: {
  1409. orderNo: record.orderNo,
  1410. },
  1411. }).done(
  1412. function (data) {
  1413. if (!data.error.length) {
  1414. message.success("该项目已成功结项!");
  1415. this.loadData();
  1416. } else {
  1417. message.warning(data.error[0].message);
  1418. }
  1419. this.setState({
  1420. loading: false,
  1421. });
  1422. }.bind(this)
  1423. );
  1424. },
  1425. //是否退款
  1426. refundCancel(record) {
  1427. this.refund(record, 0);
  1428. },
  1429. refundOk(record) {
  1430. this.refund(record, 1);
  1431. },
  1432. refund(record, index) {
  1433. this.setState({
  1434. signBillVisible: false,
  1435. selectedRowKeys: [],
  1436. loading: true,
  1437. userDetaile: false,
  1438. });
  1439. $.ajax({
  1440. method: "get",
  1441. dataType: "json",
  1442. crossDomain: false,
  1443. url: globalConfig.context + "/api/admin/order/confirmRefund",
  1444. data: {
  1445. orderNo: record.orderNo,
  1446. confirm: index,
  1447. },
  1448. }).done(
  1449. function (data) {
  1450. if (!data.error.length) {
  1451. message.success("操作成功!");
  1452. this.setState({
  1453. loading: false,
  1454. showDesc: false,
  1455. });
  1456. }
  1457. this.loadData(this.state.pageNo);
  1458. }.bind(this)
  1459. );
  1460. },
  1461. //受理订单
  1462. admissibleOrderOk(e) {
  1463. this.admissibleOrder(e, true);
  1464. },
  1465. admissibleOrderCancel(e) {
  1466. this.admissibleOrder(e, false);
  1467. },
  1468. admissibleOrder(record, index) {
  1469. this.setState({
  1470. signBillVisible: false,
  1471. selectedRowKeys: [],
  1472. loading: true,
  1473. userDetaile: false,
  1474. });
  1475. $.ajax({
  1476. method: "POST",
  1477. dataType: "json",
  1478. crossDomain: false,
  1479. url: globalConfig.context + "/api/admin/order/confirmIntention",
  1480. data: {
  1481. orderNo: record.orderNo,
  1482. confirm: index,
  1483. },
  1484. }).done(
  1485. function (data) {
  1486. if (!data.error.length) {
  1487. message.success("操作成功!");
  1488. this.setState({
  1489. loading: false,
  1490. showDesc: false,
  1491. });
  1492. } else {
  1493. message.warning(data.error[0].message);
  1494. this.setState({
  1495. showDesc: true,
  1496. });
  1497. }
  1498. this.loadData(this.state.pageNo);
  1499. }.bind(this)
  1500. );
  1501. },
  1502. //取消订单
  1503. cancelOrder(e) {
  1504. this.operation(e, 3);
  1505. },
  1506. //作废订单
  1507. scrapOrder(e) {
  1508. this.operation(e, 2);
  1509. },
  1510. //锁定订单
  1511. lockOrder(e) {
  1512. this.operation(e, 0);
  1513. },
  1514. //解锁订单
  1515. unlockOrder(e) {
  1516. this.operation(e, 1);
  1517. },
  1518. //签单
  1519. signBill(ids) {
  1520. this.setState({
  1521. uid: ids,
  1522. signBillVisible: true,
  1523. });
  1524. },
  1525. componentWillMount() {
  1526. this.departmentList();
  1527. this.loadData();
  1528. },
  1529. //整行点击
  1530. tableRowClick(record) {
  1531. this.setState({
  1532. visible: true,
  1533. });
  1534. this.xiangqing(record.orderNo);
  1535. this.xiangmu(record.orderNo);
  1536. this.jiedian(record.orderNo);
  1537. this.jiedianNew(record.orderNo);
  1538. },
  1539. //点击打卡项目详情
  1540. tableRowClickX(record) {
  1541. this.setState({
  1542. jid: record.id, //项目ID
  1543. kid: record.commodityId, //商品ID
  1544. commodityName: record.commodityName, //金额
  1545. commodityPrice: record.commodityPrice, //金额
  1546. commodityQuantity: record.commodityQuantity, //数量
  1547. taskComment: record.taskComment, //备注
  1548. main: record.main.toString(), //是否为主要
  1549. addnextVisible: true,
  1550. dataInfor:record,
  1551. addState: 0,
  1552. });
  1553. },
  1554. //项目详情关闭
  1555. nextCancel() {
  1556. this.setState({
  1557. addnextVisible: false,
  1558. });
  1559. },
  1560. visitCancel() {
  1561. this.setState({
  1562. visible: false,
  1563. });
  1564. },
  1565. //订单详情
  1566. xiangqing(orderNos) {
  1567. $.ajax({
  1568. method: "get",
  1569. dataType: "json",
  1570. crossDomain: false,
  1571. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  1572. data: {
  1573. orderNo: orderNos,
  1574. },
  1575. success: function (data) {
  1576. if (data.error.length || data.data.list == "") {
  1577. if (data.error && data.error.length) {
  1578. message.warning(data.error[0].message);
  1579. }
  1580. } else {
  1581. let thisdata = data.data;
  1582. this.setState({
  1583. orderNo: thisdata.orderNo, //订单编号
  1584. contractNo: thisdata.contractNo, //合同编号
  1585. userName: thisdata.userName, //客户名称
  1586. signDate: thisdata.signDate, //签单时间
  1587. processStatus: thisdata.processStatus, //流程状态
  1588. liquidationStatus: thisdata.liquidationStatus, //结算状态
  1589. contacts: thisdata.contacts, //企业联系人
  1590. contactMobile: thisdata.contactMobile, //联系人电话
  1591. legalPerson: thisdata.legalPerson, //法人
  1592. legalPersonTel: thisdata.legalPersonTel, //法人电话
  1593. firstAmount: thisdata.firstAmount, //签单金额
  1594. totalAmount: thisdata.totalAmount, //首付金额
  1595. approval: thisdata.approval, //特批状态
  1596. settlementAmount: thisdata.settlementAmount, //已收款项
  1597. orderRemarks: thisdata.orderRemarks, //订单留言
  1598. orgCodeUrl: thisdata.contractPictureUrl
  1599. ? splitUrl(
  1600. thisdata.contractPictureUrl,
  1601. ",",
  1602. globalConfig.avatarHost + "/upload"
  1603. )
  1604. : [], //图片地址
  1605. replenishUrl: thisdata.agreementUrl
  1606. ? splitUrl(
  1607. thisdata.agreementUrl,
  1608. ",",
  1609. globalConfig.avatarHost + "/upload"
  1610. )
  1611. : [], //图片地址
  1612. salesmanName: thisdata.salesmanName, //营销员名称
  1613. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  1614. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  1615. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  1616. financeName: thisdata.financeName, //财务名称
  1617. financeMobile: thisdata.financeMobile, //财务电话
  1618. nowFinance: thisdata.nowFinance, //财务名称
  1619. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  1620. depName: thisdata.depName,
  1621. outsource: thisdata.outsource == 0 ? "否" : "是",
  1622. });
  1623. }
  1624. }.bind(this),
  1625. }).always(
  1626. function () {
  1627. this.setState({
  1628. loading: false,
  1629. });
  1630. }.bind(this)
  1631. );
  1632. },
  1633. //项目列表
  1634. xiangmu(orderNos) {
  1635. $.ajax({
  1636. method: "get",
  1637. dataType: "json",
  1638. crossDomain: false,
  1639. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1640. data: {
  1641. orderNo: orderNos,
  1642. },
  1643. success: function (data) {
  1644. let theArr = [];
  1645. if (data.error.length || data.data.list == "") {
  1646. if (data.error && data.error.length) {
  1647. message.warning(data.error[0].message);
  1648. }
  1649. } else {
  1650. for (let i = 0; i < data.data.length; i++) {
  1651. let thisdata = data.data[i];
  1652. thisdata.key = i;
  1653. thisdata.sort = thisdata.cSort;
  1654. theArr.push(thisdata);
  1655. }
  1656. }
  1657. this.setState({
  1658. dataSourceX: theArr,
  1659. });
  1660. }.bind(this),
  1661. }).always(
  1662. function () {
  1663. this.setState({
  1664. loading: false,
  1665. });
  1666. }.bind(this)
  1667. );
  1668. },
  1669. //节点列表
  1670. jiedian(orderNos) {
  1671. $.ajax({
  1672. method: "get",
  1673. dataType: "json",
  1674. crossDomain: false,
  1675. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  1676. data: {
  1677. orderNo: orderNos,
  1678. },
  1679. success: function (data) {
  1680. let theArr = [];
  1681. let thisData = [];
  1682. if (data.error.length || data.data.list == "") {
  1683. if (data.error && data.error.length) {
  1684. message.warning(data.error[0].message);
  1685. }
  1686. } else {
  1687. for (let i = 0; i < data.data.length; i++) {
  1688. thisData = data.data[i];
  1689. theArr.push({
  1690. key: i,
  1691. dunSubject: thisData.dunSubject
  1692. ? thisData.dunSubject.toString()
  1693. : "", //催款科目
  1694. id: thisData.id, //节点Id
  1695. money: thisData.money, //催款金额
  1696. dunStatus: thisData.dunStatus, //催款状态
  1697. });
  1698. }
  1699. this.setState({
  1700. contactList: theArr,
  1701. });
  1702. }
  1703. }.bind(this),
  1704. }).always(
  1705. function () {
  1706. this.setState({
  1707. loading: false,
  1708. });
  1709. }.bind(this)
  1710. );
  1711. },
  1712. //查看催款节点
  1713. jiedianNew(orderNos) {
  1714. $.ajax({
  1715. method: "get",
  1716. dataType: "json",
  1717. crossDomain: false,
  1718. url:
  1719. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  1720. data: {
  1721. orderNo: orderNos,
  1722. },
  1723. success: function (data) {
  1724. if (data.error && data.error.length) {
  1725. message.warning(data.error[0].message);
  1726. } else {
  1727. let theArr = [];
  1728. let thisData = [];
  1729. let arr = data.data || [];
  1730. let totalCui = 0;
  1731. for (let i = 0; i < arr.length; i++) {
  1732. thisData = arr[i];
  1733. totalCui += +thisData.money;
  1734. theArr.push({
  1735. key: i,
  1736. dunSubject: thisData.dunSubject
  1737. ? thisData.dunSubject.toString()
  1738. : "", //催款科目
  1739. id: thisData.id, //节点Id
  1740. money: thisData.money, //催款金额
  1741. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  1742. commodityName: thisData.commodityName,
  1743. projectType: thisData.projectType,
  1744. dunTypeName: thisData.dunTypeName,
  1745. status: thisData.status,
  1746. waitDay: thisData.waitDay,
  1747. effectiveCount: thisData.effectiveCount,
  1748. startDate: thisData.startDate,
  1749. dunType: thisData.dunType,
  1750. appropriationRatio: thisData.appropriationRatio,
  1751. customizeName: thisData.customizeName,
  1752. customizeTimes: thisData.customizeTimes,
  1753. tid: thisData.tid,
  1754. });
  1755. }
  1756. if (!totalCui) {
  1757. totalCui = 0;
  1758. }
  1759. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  1760. this.setState({
  1761. contactListNew: theArr,
  1762. totalCui,
  1763. });
  1764. }
  1765. }.bind(this),
  1766. }).always(
  1767. function () {
  1768. this.setState({
  1769. loading: false,
  1770. });
  1771. }.bind(this)
  1772. );
  1773. },
  1774. //列表各种骚操作
  1775. operation(record, index) {
  1776. this.setState({
  1777. selectedRowKeys: [],
  1778. loading: true,
  1779. showDesc: false,
  1780. });
  1781. $.ajax({
  1782. method: "get",
  1783. dataType: "json",
  1784. crossDomain: false,
  1785. url: globalConfig.context + "/api/admin/order/lockOrRevokeOrder",
  1786. data: {
  1787. orderNo: record.orderNo,
  1788. operatorType: index,
  1789. },
  1790. }).done(
  1791. function (data) {
  1792. if (!data.error.length) {
  1793. message.success("操作成功!");
  1794. this.setState({
  1795. loading: false,
  1796. });
  1797. } else {
  1798. message.warning(data.error[0].message);
  1799. }
  1800. this.loadData(this.state.pageNo);
  1801. }.bind(this)
  1802. );
  1803. },
  1804. addClick() {
  1805. this.state.userDetaile = false;
  1806. this.setState({
  1807. signBillVisible: false,
  1808. showDesc: true,
  1809. });
  1810. },
  1811. closeDesc(e, s) {
  1812. this.state.userDetaile = false;
  1813. this.state.signBillVisible = false;
  1814. this.state.showDesc = e;
  1815. if (s) {
  1816. this.loadData(this.state.pageNo);
  1817. }
  1818. },
  1819. searchSwitch() {
  1820. this.setState({
  1821. signBillVisible: false,
  1822. searchMore: !this.state.searchMore,
  1823. });
  1824. },
  1825. getOrgCodeUrl(e) {
  1826. this.setState({ orgCodeUrl: e });
  1827. },
  1828. search() {
  1829. this.setState({
  1830. signBillVisible: false,
  1831. });
  1832. this.loadData();
  1833. },
  1834. reset() {
  1835. this.setState({
  1836. signBillVisible: false,
  1837. });
  1838. this.state.searchOrderNo = undefined;
  1839. this.state.orderNo = "";
  1840. this.state.customerName = "";
  1841. this.state.departmenttSearch = undefined;
  1842. this.state.releaseDate[0] = undefined;
  1843. this.state.releaseDate[1] = undefined;
  1844. this.state.projectProgress = undefined;
  1845. this.state.approval = undefined;
  1846. this.state.formalOrder = true;
  1847. this.state.intentOrder = true;
  1848. (this.state.liquidationStatusSearch = []),
  1849. (this.state.contractNoSearch = "");
  1850. this.state.departmenttList = [];
  1851. this.state.amountStatus = undefined;
  1852. this.state.approvalSearch = undefined;
  1853. this.loadData();
  1854. },
  1855. //部门
  1856. departmentList() {
  1857. this.setState({
  1858. loading: true,
  1859. });
  1860. $.ajax({
  1861. method: "get",
  1862. dataType: "json",
  1863. crossDomain: false,
  1864. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1865. data: {},
  1866. success: function (data) {
  1867. let thedata = data.data;
  1868. let theArr = [];
  1869. if (!thedata) {
  1870. if (data.error && data.error.length) {
  1871. message.warning(data.error[0].message);
  1872. }
  1873. thedata = {};
  1874. } else {
  1875. thedata.map(function (item, index) {
  1876. theArr.push({
  1877. key: index,
  1878. name: item.name,
  1879. id: item.id,
  1880. });
  1881. });
  1882. }
  1883. this.setState({
  1884. departmentArr: theArr,
  1885. });
  1886. }.bind(this),
  1887. }).always(
  1888. function () {
  1889. this.setState({
  1890. loading: false,
  1891. });
  1892. }.bind(this)
  1893. );
  1894. },
  1895. changeList(arr) {
  1896. const newArr = [];
  1897. this.state.columns.forEach((item) => {
  1898. arr.forEach((val) => {
  1899. if (val === item.title) {
  1900. newArr.push(item);
  1901. }
  1902. });
  1903. });
  1904. this.setState({
  1905. changeList: newArr,
  1906. });
  1907. },
  1908. onSelectChange(selectedRowKeys) {
  1909. this.setState({ selectedRowKeys });
  1910. console.log(selectedRowKeys);
  1911. },
  1912. // inRecordData() {
  1913. // this.setState({
  1914. // loading: true
  1915. // });
  1916. // $.ajax({
  1917. // method: "get",
  1918. // dataType: "json",
  1919. // crossDomain: false,
  1920. // url:
  1921. // globalConfig.context +
  1922. // "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1923. // data: {
  1924. // orderNo: this.state.selectedRowKeys[0],
  1925. // pageSize: 9999
  1926. // },
  1927. // success: function(data) {
  1928. // let theArr = [];
  1929. // let sum = 0;
  1930. // if (!data.data) {
  1931. // if (data.error && data.error.length) {
  1932. // message.warning(data.error[0].message);
  1933. // }
  1934. // } else {
  1935. // for (let i = 0; i < data.data.list.length; i++) {
  1936. // let thisdata = data.data.list[i];
  1937. // sum += parseFloat(thisdata.amount);
  1938. // theArr.push({
  1939. // id: thisdata.id,
  1940. // orderno: thisdata.orderno, //订单编号
  1941. // amount: thisdata.amount, //签单金额
  1942. // createTime: thisdata.createTime, //流程状态
  1943. // status: thisdata.status, //结算状态
  1944. // rejectReason: thisdata.rejectReason
  1945. // });
  1946. // }
  1947. // }
  1948. // this.setState({
  1949. // recordData: theArr,
  1950. // sum: sum.toFixed(4)
  1951. // });
  1952. // }.bind(this)
  1953. // }).done(
  1954. // function() {
  1955. // this.setState({
  1956. // loading: false
  1957. // });
  1958. // }.bind(this)
  1959. // );
  1960. // },
  1961. cuiData() {
  1962. this.setState({
  1963. loading: true,
  1964. });
  1965. $.ajax({
  1966. method: "get",
  1967. dataType: "json",
  1968. crossDomain: false,
  1969. url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
  1970. data: {
  1971. orderNo: this.state.selectedRowKeys[0],
  1972. pageSize: 9999,
  1973. },
  1974. success: function (data) {
  1975. let theArr = [];
  1976. if (!data.data || !data.data.list) {
  1977. if (data.error && data.error.length) {
  1978. message.warning(data.error[0].message);
  1979. }
  1980. } else {
  1981. for (let i = 0; i < data.data.list.length; i++) {
  1982. let thisdata = data.data.list[i];
  1983. theArr.push({
  1984. key: i + 1,
  1985. orderNo: thisdata.orderNo,
  1986. contractNo: thisdata.contractNo,
  1987. userName: thisdata.userName,
  1988. buyerName: thisdata.buyerName,
  1989. departmentName: thisdata.departmentName,
  1990. salesmanName: thisdata.salesmanName,
  1991. depName: thisdata.depName,
  1992. orderStatus: thisdata.orderStatus,
  1993. projectStatus: thisdata.projectStatus,
  1994. totalAmount: thisdata.totalAmount,
  1995. liquidationStatus: thisdata.liquidationStatus,
  1996. settlementAmount: thisdata.settlementAmount,
  1997. accountsReceivable: thisdata.accountsReceivable,
  1998. dunSubject: thisdata.dunSubject,
  1999. startDate: thisdata.startDate,
  2000. taskStatus: thisdata.taskStatus,
  2001. cname: thisdata.cname,
  2002. id: thisdata.id,
  2003. taskName: thisdata.taskName,
  2004. hours: thisdata.hours,
  2005. taskDistributionTime: thisdata.taskDistributionTime,
  2006. taskEndTime: thisdata.taskEndTime,
  2007. dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发",
  2008. });
  2009. }
  2010. }
  2011. this.setState({
  2012. cuiDataList: theArr,
  2013. });
  2014. }.bind(this),
  2015. }).always(
  2016. function () {
  2017. this.setState({
  2018. loading: false,
  2019. });
  2020. }.bind(this)
  2021. );
  2022. },
  2023. proData() {
  2024. this.setState({
  2025. loading: true,
  2026. });
  2027. $.ajax({
  2028. method: "get",
  2029. dataType: "json",
  2030. crossDomain: false,
  2031. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  2032. data: {
  2033. orderNo: this.state.selectedRowKeys[0],
  2034. pageSize: 9999,
  2035. },
  2036. success: function (data) {
  2037. let theArr = [];
  2038. let totalWaibao = 0;
  2039. if (!data.data) {
  2040. if (data.error && data.error.length) {
  2041. message.warning(data.error[0].message);
  2042. }
  2043. } else {
  2044. for (let i = 0; i < data.data.length; i++) {
  2045. let thisdata = data.data[i];
  2046. totalWaibao += thisdata.outsourcePrice;
  2047. thisdata.key = i + 1;
  2048. theArr.push(thisdata);
  2049. }
  2050. }
  2051. totalWaibao = (Math.round(totalWaibao * 1000000) / 1000000).toFixed(6);
  2052. this.setState({
  2053. proDataList: theArr,
  2054. totalWaibao,
  2055. });
  2056. }.bind(this),
  2057. }).always(
  2058. function () {
  2059. this.setState({
  2060. loading: false,
  2061. });
  2062. }.bind(this)
  2063. );
  2064. },
  2065. tableRowClickPro(record) {
  2066. this.setState({
  2067. pvisible: true,
  2068. record,
  2069. });
  2070. },
  2071. downImg() {
  2072. let num = 0;
  2073. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  2074. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  2075. num = i;
  2076. }
  2077. }
  2078. if (num == this.state.orgCodeUrl.length - 1) {
  2079. return message.warning("已经是最后一张了哦");
  2080. }
  2081. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  2082. this.setState({
  2083. previewImage: this.state.previewImage,
  2084. rotateDeg: 0,
  2085. });
  2086. },
  2087. upImg() {
  2088. let num = 0;
  2089. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  2090. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  2091. num = i;
  2092. }
  2093. }
  2094. if (num == 0) {
  2095. return message.warning("已经是第一张了哦");
  2096. }
  2097. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  2098. this.setState({
  2099. previewImage: this.state.previewImage,
  2100. rotateDeg: 0,
  2101. });
  2102. },
  2103. rotate() {
  2104. let rotateDeg = this.state.rotateDeg + 90;
  2105. this.setState({
  2106. rotateDeg,
  2107. });
  2108. },
  2109. downImgs() {
  2110. let num = 0;
  2111. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  2112. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  2113. num = i;
  2114. }
  2115. }
  2116. if (num == this.state.replenishUrl.length - 1) {
  2117. return message.warning("已经是最后一张了哦");
  2118. }
  2119. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  2120. this.setState({
  2121. previewImage: this.state.previewImage,
  2122. rotateDeg: 0,
  2123. });
  2124. },
  2125. upImgs() {
  2126. let num = 0;
  2127. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  2128. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  2129. num = i;
  2130. }
  2131. }
  2132. if (num == 0) {
  2133. return message.warning("已经是第一张了哦");
  2134. }
  2135. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  2136. this.setState({
  2137. previewImage: this.state.previewImage,
  2138. rotateDeg: 0,
  2139. });
  2140. },
  2141. rotates() {
  2142. let rotateDeg = this.state.rotateDeg + 90;
  2143. this.setState({
  2144. rotateDeg,
  2145. });
  2146. },
  2147. render() {
  2148. const FormItem = Form.Item;
  2149. const formItemLayout = {
  2150. labelCol: { span: 8 },
  2151. wrapperCol: { span: 14 },
  2152. };
  2153. const RadioGroup = Radio.Group;
  2154. var departmentArr = this.state.departmentArr || [];
  2155. const cuiDataList = this.state.contactList || [];
  2156. const { RangePicker } = DatePicker;
  2157. const { loading, selectedRowKeys, visible } = this.state;
  2158. const rowSelection = {
  2159. selectedRowKeys,
  2160. onChange: this.onSelectChange,
  2161. hideDefaultSelections: true,
  2162. type: "radio",
  2163. };
  2164. return (
  2165. <div className="user-content">
  2166. {this.state.resVisible ? (
  2167. <ResolutionDetail
  2168. cancel={this.resCancel}
  2169. detail={this.state.resRecord}
  2170. visible={this.state.resVisible}
  2171. id={this.state.resRecord.orderNo}
  2172. />
  2173. ) : (
  2174. ""
  2175. )}
  2176. <ShowModalDiv ShowModal={this.state.showModal} />
  2177. <div className="content-title">
  2178. <span
  2179. style={{
  2180. fontWeight: 900,
  2181. fontSize: 16,
  2182. display: "block",
  2183. marginBottom: 10,
  2184. }}
  2185. >
  2186. 部门订单
  2187. </span>
  2188. <Tabs
  2189. defaultActiveKey="2"
  2190. onChange={this.callback}
  2191. className="test"
  2192. >
  2193. <TabPane tab="更改表格显示数据" key="1">
  2194. <div style={{ marginLeft: 10 }}>
  2195. <ChooseList
  2196. columns={this.state.columns}
  2197. changeFn={this.changeList}
  2198. changeList={this.state.changeList}
  2199. top={55}
  2200. margin={11}
  2201. />
  2202. </div>
  2203. </TabPane>
  2204. <TabPane tab="搜索" key="2">
  2205. <div className="user-search" style={{ marginLeft: 10 }}>
  2206. <Input
  2207. placeholder="订单编号"
  2208. style={{ width: "150px" }}
  2209. value={this.state.searchOrderNo}
  2210. onChange={(e) => {
  2211. this.setState({ searchOrderNo: e.target.value });
  2212. }}
  2213. />
  2214. <Input
  2215. placeholder="客户名称"
  2216. style={{ width: "150px" }}
  2217. value={this.state.customerName}
  2218. onChange={(e) => {
  2219. this.setState({ customerName: e.target.value });
  2220. }}
  2221. />
  2222. <Select
  2223. placeholder="订单部门"
  2224. style={{ width: 150, marginRight: 10 }}
  2225. value={this.state.departmenttList}
  2226. onChange={(e) => {
  2227. this.setState({ departmenttList: e });
  2228. }}
  2229. >
  2230. {departmentArr.map(function (item) {
  2231. return <Option key={item.id}>{item.name}</Option>;
  2232. })}
  2233. </Select>
  2234. <Input
  2235. placeholder="合同编号"
  2236. style={{ width: "150px" }}
  2237. value={this.state.contractNoSearch}
  2238. onChange={(e) => {
  2239. this.setState({
  2240. contractNoSearch: e.target.value,
  2241. });
  2242. }}
  2243. />
  2244. <Select
  2245. style={{ width: 120 }}
  2246. placeholder="结算状态"
  2247. value={this.state.liquidationStatusSearch}
  2248. onChange={(e) => {
  2249. this.setState({
  2250. liquidationStatusSearch: e,
  2251. });
  2252. }}
  2253. >
  2254. <Option value="0">首付待付请</Option>
  2255. <Option value="1">尾款待付清</Option>
  2256. <Option value="2">已付清</Option>
  2257. </Select>
  2258. <Select
  2259. style={{ width: 120 }}
  2260. placeholder="特批状态"
  2261. value={this.state.approvalSearch}
  2262. onChange={(e) => {
  2263. this.setState({
  2264. approvalSearch: e,
  2265. });
  2266. }}
  2267. >
  2268. <Option value="0">非特批</Option>
  2269. <Option value="1">特批</Option>
  2270. </Select>
  2271. <Select
  2272. style={{ width: 120 }}
  2273. placeholder="签单金额"
  2274. value={this.state.amountStatus}
  2275. onChange={(e) => {
  2276. this.setState({
  2277. amountStatus: e,
  2278. });
  2279. }}
  2280. >
  2281. <Option value="0">10万元以下</Option>
  2282. <Option value="1">10~20万元</Option>
  2283. <Option value="2">20~30万元</Option>
  2284. <Option value="3">30~40万元</Option>
  2285. <Option value="4">40万元以上</Option>
  2286. </Select>
  2287. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  2288. <RangePicker
  2289. value={[
  2290. this.state.releaseDate[0]
  2291. ? moment(this.state.releaseDate[0])
  2292. : null,
  2293. this.state.releaseDate[1]
  2294. ? moment(this.state.releaseDate[1])
  2295. : null,
  2296. ]}
  2297. onChange={(data, dataString) => {
  2298. this.setState({ releaseDate: dataString });
  2299. }}
  2300. />
  2301. <Button
  2302. type="primary"
  2303. onClick={this.search}
  2304. style={{ marginLeft: "10px" }}
  2305. >
  2306. 搜索
  2307. <Icon type="search" />
  2308. </Button>
  2309. <Button onClick={this.reset}>
  2310. 重置 <Icon type="reload" />
  2311. </Button>
  2312. </div>
  2313. </TabPane>
  2314. <TabPane tab="查看" key="3">
  2315. <Button
  2316. type="primary"
  2317. style={{ margin: "11px 0px 10px 10px" }}
  2318. onClick={() => {
  2319. this.inRecord();
  2320. this.setState({
  2321. bvisible: true,
  2322. });
  2323. }}
  2324. disabled={this.state.selectedRowKeys.length != 1}
  2325. >
  2326. 查看开票详情
  2327. </Button>
  2328. <Button
  2329. type="primary"
  2330. style={{ margin: "11px 0px 10px 10px" }}
  2331. onClick={() => {
  2332. this.cuiData();
  2333. this.setState({
  2334. cuiVisible: true,
  2335. });
  2336. }}
  2337. disabled={this.state.selectedRowKeys.length != 1}
  2338. >
  2339. 查看催款详情
  2340. </Button>
  2341. <Button
  2342. type="primary"
  2343. style={{ margin: "11px 0px 10px 10px" }}
  2344. onClick={() => {
  2345. this.proData();
  2346. this.setState({
  2347. proVisible: true,
  2348. });
  2349. }}
  2350. disabled={this.state.selectedRowKeys.length != 1}
  2351. >
  2352. 查看项目进度
  2353. </Button>
  2354. </TabPane>
  2355. </Tabs>
  2356. <div className="patent-table">
  2357. <Spin spinning={this.state.loading}>
  2358. <Table
  2359. columns={
  2360. this.state.changeList == undefined
  2361. ? this.state.columns
  2362. : this.state.changeList
  2363. }
  2364. dataSource={this.state.dataSource}
  2365. scroll={{ x: 1500, y: 0 }}
  2366. pagination={this.state.pagination}
  2367. rowSelection={rowSelection}
  2368. onRowClick={this.tableRowClick}
  2369. bordered
  2370. size="small"
  2371. />
  2372. </Spin>
  2373. </div>
  2374. <NewService
  2375. uid={this.state.uid}
  2376. signBillVisible={this.state.signBillVisible}
  2377. signBillState={this.state.signBillState}
  2378. operation={this.operation}
  2379. admissibleOrder={this.admissibleOrder}
  2380. userDetaile={this.state.userDetaile}
  2381. datauser={this.state.datauser}
  2382. showDesc={this.state.showDesc}
  2383. closeDesc={this.closeDesc}
  2384. />
  2385. <Modal
  2386. maskClosable={false}
  2387. className="admin-desc-content"
  2388. footer=""
  2389. title="开具发票申请单"
  2390. width="1000px"
  2391. visible={this.state.avisible}
  2392. onOk={this.visitOks}
  2393. onCancel={this.visitCancels}
  2394. style={{ zIndex: 999 }}
  2395. >
  2396. <Form
  2397. layout="horizontal"
  2398. // id="demand-form"
  2399. style={{ paddingBottom: "40px" }}
  2400. >
  2401. <Spin spinning={this.state.loading}>
  2402. <div className="clearfix">
  2403. <div className="clearfix">
  2404. <FormItem
  2405. className="half-item"
  2406. {...formItemLayout}
  2407. label="合同编号"
  2408. >
  2409. <span>{this.state.contractNo}</span>
  2410. </FormItem>
  2411. <FormItem
  2412. className="half-item"
  2413. {...formItemLayout}
  2414. label="备注"
  2415. >
  2416. {
  2417. <Input
  2418. placeholder="填写申请发票原因"
  2419. value={this.state.remarks}
  2420. onChange={(e) => {
  2421. this.setState({ remarks: e.target.value });
  2422. }}
  2423. style={{ width: "240px" }}
  2424. />
  2425. }
  2426. </FormItem>
  2427. </div>
  2428. <div className="clearfix">
  2429. <FormItem
  2430. className="half-item"
  2431. {...formItemLayout}
  2432. label="省内/外:"
  2433. >
  2434. <RadioGroup
  2435. value={this.state.type}
  2436. onChange={(e) => {
  2437. this.setState({ type: e.target.value });
  2438. }}
  2439. >
  2440. <Radio value={0}>省内</Radio>
  2441. <Radio value={1}>省外</Radio>
  2442. </RadioGroup>
  2443. <span
  2444. style={{
  2445. position: "absolute",
  2446. color: "red",
  2447. fontSize: "10px",
  2448. lineHeight: "20px",
  2449. }}
  2450. >
  2451. 省内:湖南省<br></br>省外:除湖南省以外
  2452. </span>
  2453. </FormItem>
  2454. <FormItem
  2455. className="half-item"
  2456. {...formItemLayout}
  2457. label="特批:"
  2458. >
  2459. <RadioGroup
  2460. value={!this.state.ordapproval ? 0 : 1}
  2461. onChange={(e) => {
  2462. this.setState({ ordapproval: e.target.value });
  2463. }}
  2464. >
  2465. <Radio value={0}>否</Radio>
  2466. <Radio value={1}>是</Radio>
  2467. </RadioGroup>
  2468. <span
  2469. style={{
  2470. position: "absolute",
  2471. color: "red",
  2472. fontSize: "10px",
  2473. lineHeight: "15px",
  2474. }}
  2475. >
  2476. 注:特批单,省内省外,<br></br>分别由周总,省外总经理
  2477. <br></br>特批后,方可至开票流程
  2478. </span>
  2479. </FormItem>
  2480. </div>
  2481. <hr
  2482. style={{
  2483. border: "1px dashed #aaa",
  2484. width: "90%",
  2485. margin: "auto",
  2486. }}
  2487. />
  2488. <div style={{ marginTop: "13px", marginLeft: "16px" }}>
  2489. <span style={{ fontSize: "14px" }}>发票内容</span>
  2490. </div>
  2491. <div className="clearfix">
  2492. <FormItem
  2493. className="half-item"
  2494. {...formItemLayout}
  2495. label={
  2496. <span>
  2497. <strong style={{ color: "#f00" }}>*</strong>
  2498. 发票类型
  2499. </span>
  2500. }
  2501. >
  2502. <RadioGroup
  2503. style={{ width: "160%" }}
  2504. onChange={(e) => {
  2505. this.setState({ invoiceType: e.target.value });
  2506. }}
  2507. value={this.state.invoiceType}
  2508. >
  2509. <Radio value={0}>增值税专用发票</Radio>
  2510. <Radio value={1}>增值税普通发票</Radio>
  2511. <Radio value={2}>其他</Radio>
  2512. </RadioGroup>
  2513. </FormItem>
  2514. </div>
  2515. <div className="clearfix">
  2516. <FormItem
  2517. className="half-item"
  2518. {...formItemLayout}
  2519. label={
  2520. <span>
  2521. <strong style={{ color: "#f00" }}>*</strong>
  2522. 单位名称
  2523. </span>
  2524. }
  2525. >
  2526. {
  2527. <Input
  2528. placeholder="请输入单位名称"
  2529. value={this.state.unitName}
  2530. onChange={(e) => {
  2531. this.setState({ unitName: e.target.value });
  2532. }}
  2533. style={{ width: "240px" }}
  2534. />
  2535. }
  2536. <span
  2537. style={{
  2538. position: "absolute",
  2539. color: "red",
  2540. fontSize: "10px",
  2541. lineHeight: "15px",
  2542. width: "30%",
  2543. }}
  2544. >
  2545. 系统读取单位<br></br>名称,可修改
  2546. </span>
  2547. </FormItem>
  2548. <FormItem
  2549. className="half-item"
  2550. {...formItemLayout}
  2551. label={
  2552. <span>
  2553. <strong style={{ color: "#f00" }}>*</strong>税号
  2554. </span>
  2555. }
  2556. >
  2557. {
  2558. <Input
  2559. placeholder="请输入税号"
  2560. value={this.state.taxNumber}
  2561. onChange={(e) => {
  2562. this.setState({ taxNumber: e.target.value });
  2563. }}
  2564. style={{ width: "240px" }}
  2565. />
  2566. }
  2567. </FormItem>
  2568. <FormItem
  2569. className="half-item"
  2570. {...formItemLayout}
  2571. label={
  2572. <span>
  2573. <strong style={{ color: "#f00" }}>*</strong>
  2574. 开票金额(万元)
  2575. </span>
  2576. }
  2577. >
  2578. {
  2579. <Input
  2580. placeholder="请输入开票金额"
  2581. value={this.state.amount}
  2582. onChange={(e) => {
  2583. this.setState({ amount: e.target.value });
  2584. }}
  2585. style={{ width: "240px" }}
  2586. />
  2587. }
  2588. <span
  2589. style={{
  2590. position: "absolute",
  2591. color: "red",
  2592. fontSize: "10px",
  2593. lineHeight: "15px",
  2594. width: "30%",
  2595. }}
  2596. >
  2597. 填写本次开票<br></br>金额
  2598. </span>
  2599. </FormItem>
  2600. <FormItem
  2601. className="half-item"
  2602. {...formItemLayout}
  2603. label={
  2604. <span>
  2605. <strong style={{ color: "#f00" }}>*</strong>
  2606. 开户行及银行账号
  2607. </span>
  2608. }
  2609. >
  2610. {
  2611. <Input
  2612. placeholder="请输入开户行及银行账号"
  2613. value={this.state.banks}
  2614. onChange={(e) => {
  2615. this.setState({ banks: e.target.value });
  2616. }}
  2617. style={{ width: "240px" }}
  2618. />
  2619. }
  2620. </FormItem>
  2621. <FormItem
  2622. className="half-item"
  2623. {...formItemLayout}
  2624. label={
  2625. <span>
  2626. <strong style={{ color: "#f00" }}>*</strong>
  2627. 开票内容及说明
  2628. </span>
  2629. }
  2630. >
  2631. {
  2632. <Input
  2633. placeholder="请输入开票内容及说明"
  2634. value={this.state.content}
  2635. onChange={(e) => {
  2636. this.setState({ content: e.target.value });
  2637. }}
  2638. style={{ width: "240px" }}
  2639. />
  2640. }
  2641. </FormItem>
  2642. <FormItem
  2643. className="half-item"
  2644. {...formItemLayout}
  2645. label={
  2646. <span>
  2647. <strong style={{ color: "#f00" }}>*</strong>
  2648. 单位地址
  2649. </span>
  2650. }
  2651. >
  2652. {
  2653. <Input
  2654. placeholder="请输入单位地址"
  2655. value={this.state.unitAddress}
  2656. onChange={(e) => {
  2657. this.setState({ unitAddress: e.target.value });
  2658. }}
  2659. style={{ width: "240px" }}
  2660. />
  2661. }
  2662. </FormItem>
  2663. <FormItem
  2664. className="half-item"
  2665. {...formItemLayout}
  2666. label="备注"
  2667. >
  2668. {
  2669. <Input
  2670. placeholder="请备注开票公司名称"
  2671. value={this.state.invoiceRemarks}
  2672. onChange={(e) => {
  2673. this.setState({
  2674. invoiceRemarks: e.target.value,
  2675. });
  2676. }}
  2677. style={{ width: "240px" }}
  2678. />
  2679. }
  2680. <span
  2681. style={{
  2682. position: "absolute",
  2683. color: "red",
  2684. fontSize: "10px",
  2685. lineHeight: "15px",
  2686. width: "30%",
  2687. }}
  2688. >
  2689. 开票公司名称,<br></br>如:科德集团
  2690. </span>
  2691. </FormItem>
  2692. <FormItem
  2693. className="half-item"
  2694. {...formItemLayout}
  2695. label={
  2696. <span>
  2697. <strong style={{ color: "#f00" }}>*</strong>
  2698. 单位电话
  2699. </span>
  2700. }
  2701. >
  2702. {
  2703. <Input
  2704. placeholder="请输入单位电话"
  2705. value={this.state.unitMobile}
  2706. onChange={(e) => {
  2707. this.setState({ unitMobile: e.target.value });
  2708. }}
  2709. style={{ width: "240px" }}
  2710. />
  2711. }
  2712. </FormItem>
  2713. </div>
  2714. <div className="clearfix">
  2715. <FormItem
  2716. labelCol={{ span: 4 }}
  2717. wrapperCol={{ span: 18 }}
  2718. label={
  2719. <span>
  2720. <strong style={{ color: "#f00" }}>*</strong>
  2721. 上传附件
  2722. </span>
  2723. }
  2724. >
  2725. <PicturesWall
  2726. fileList={this.getOrgCodeUrl}
  2727. pictureUrl={this.state.orgCodeUrl}
  2728. />
  2729. <span
  2730. style={{
  2731. paddingTop: "10px",
  2732. paddingLeft: "10px",
  2733. color: "red",
  2734. fontSize: "14px",
  2735. }}
  2736. >
  2737. 注:请上传带"公司盖章"的开票申请纸质凭证
  2738. </span>
  2739. <p>图片建议:要清晰。</p>
  2740. </FormItem>
  2741. </div>
  2742. <hr
  2743. style={{
  2744. border: "1px dashed #aaa",
  2745. width: "90%",
  2746. margin: "auto",
  2747. }}
  2748. />
  2749. <div className="clearfix" style={{ marginTop: "10px" }}>
  2750. <FormItem
  2751. className="half-item"
  2752. {...formItemLayout}
  2753. label="发票是否邮寄:"
  2754. >
  2755. <RadioGroup
  2756. value={this.state.post}
  2757. onChange={(e) => {
  2758. this.setState({ post: e.target.value });
  2759. }}
  2760. >
  2761. <Radio value={0}>是</Radio>
  2762. <Radio value={1}>否</Radio>
  2763. </RadioGroup>
  2764. </FormItem>
  2765. </div>
  2766. {this.state.post === 0 ? (
  2767. <div className="clearfix">
  2768. <FormItem
  2769. className="half-item"
  2770. {...formItemLayout}
  2771. label="收信人姓名"
  2772. >
  2773. {
  2774. <Input
  2775. placeholder="请输入收信人姓名"
  2776. value={this.state.addressee}
  2777. onChange={(e) => {
  2778. this.setState({ addressee: e.target.value });
  2779. }}
  2780. style={{ width: "240px" }}
  2781. />
  2782. }
  2783. </FormItem>
  2784. <FormItem
  2785. className="half-item"
  2786. {...formItemLayout}
  2787. label="电话"
  2788. >
  2789. {
  2790. <Input
  2791. placeholder="请输入电话"
  2792. value={this.state.addresseeMobile}
  2793. onChange={(e) => {
  2794. this.setState({
  2795. addresseeMobile: e.target.value,
  2796. });
  2797. }}
  2798. style={{ width: "240px" }}
  2799. />
  2800. }
  2801. </FormItem>
  2802. </div>
  2803. ) : (
  2804. ""
  2805. )}
  2806. {this.state.post === 0 ? (
  2807. <div className="clearfix">
  2808. <FormItem
  2809. className="half-item"
  2810. {...formItemLayout}
  2811. label="省-市-区"
  2812. >
  2813. <Cascader
  2814. options={areaSelect()}
  2815. value={this.state.ProvinceCity}
  2816. placeholder="选择城市"
  2817. style={{ width: "95%" }}
  2818. onChange={(e) => {
  2819. this.setState({ ProvinceCity: e });
  2820. }}
  2821. />
  2822. </FormItem>
  2823. </div>
  2824. ) : (
  2825. ""
  2826. )}
  2827. {this.state.post === 0 ? (
  2828. <div className="clearfix">
  2829. <FormItem
  2830. className="half-item"
  2831. {...formItemLayout}
  2832. label="详细地址"
  2833. >
  2834. {
  2835. <Input
  2836. placeholder="请输入详细地址"
  2837. value={this.state.recipientAddress}
  2838. onChange={(e) => {
  2839. this.setState({
  2840. recipientAddress: e.target.value,
  2841. });
  2842. }}
  2843. style={{ width: "240px" }}
  2844. />
  2845. }
  2846. </FormItem>
  2847. </div>
  2848. ) : (
  2849. ""
  2850. )}
  2851. <FormItem
  2852. className="half-item"
  2853. {...formItemLayout}
  2854. label={
  2855. <span>
  2856. <strong style={{ color: "#f00" }}>*</strong>
  2857. 开票金额总计
  2858. </span>
  2859. }
  2860. >
  2861. {
  2862. <Input
  2863. value={this.state.alreadyAmount}
  2864. onChange={(e) => {
  2865. this.setState({ alreadyAmount: e.target.value });
  2866. }}
  2867. style={{ width: "40px" }}
  2868. />
  2869. }
  2870. 万元
  2871. <span
  2872. style={{
  2873. position: "absolute",
  2874. color: "red",
  2875. fontSize: "10px",
  2876. lineHeight: "15px",
  2877. marginLeft: "20px",
  2878. }}
  2879. >
  2880. 默认值为0.新开票订单此项不用填.<br></br>
  2881. 以前已开票订单,请填写已开票的总计<br></br>
  2882. 金额,便于审核核对!
  2883. </span>
  2884. </FormItem>
  2885. </div>
  2886. <Button
  2887. className="cancel"
  2888. type="primary"
  2889. style={{ marginRight: "50px", float: "right" }}
  2890. size="large"
  2891. onClick={this.submitApp}
  2892. >
  2893. 提交申请
  2894. </Button>
  2895. {/*<Button className="cancel" type="primary" style={{marginRight:"50px",float:'right',background:'deepskyblue',border:'none'}} size="large" onClick={this.saveApp}>保存</Button>*/}
  2896. </Spin>
  2897. </Form>
  2898. </Modal>
  2899. <Modal
  2900. maskClosable={false}
  2901. visible={this.state.bvisible}
  2902. footer=""
  2903. title="开票历史记录"
  2904. className="admin-desc-content"
  2905. width="900px"
  2906. onCancel={(e) => {
  2907. this.setState({
  2908. bvisible: false,
  2909. });
  2910. }}
  2911. style={{ zIndex: 5 }}
  2912. >
  2913. <Spin spinning={this.state.loading}>
  2914. <div className="patent-table">
  2915. <Table
  2916. columns={this.state.columnsDate}
  2917. onRowClick={this.dtableRowClick}
  2918. dataSource={this.state.recordData}
  2919. pagination={false}
  2920. />
  2921. <div className="clearfix" style={{ marginTop: "20px" }}>
  2922. <FormItem
  2923. className="half-item"
  2924. {...formItemLayout}
  2925. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  2926. >
  2927. <span>{this.state.sum + "(万元)"}</span>
  2928. </FormItem>
  2929. </div>
  2930. </div>
  2931. </Spin>
  2932. </Modal>
  2933. <Modal
  2934. maskClosable={false}
  2935. visible={this.state.visibleR}
  2936. className="admin-desc-content"
  2937. footer=""
  2938. title="拒绝理由"
  2939. width="400px"
  2940. onCancel={this.rejectCancels}
  2941. >
  2942. <Input.TextArea
  2943. disabled={true}
  2944. rows={4}
  2945. value={this.state.reason}
  2946. style={{ color: "black" }}
  2947. ></Input.TextArea>
  2948. </Modal>
  2949. <Modal
  2950. maskClosable={false}
  2951. className="admin-desc-content"
  2952. footer=""
  2953. title="开具发票申请单"
  2954. width="1000px"
  2955. visible={this.state.cvisible}
  2956. onOk={this.visitOks}
  2957. onCancel={this.visitCancels}
  2958. style={{ zIndex: 999 }}
  2959. >
  2960. <Form
  2961. layout="horizontal"
  2962. // id="demand-form"
  2963. style={{ paddingBottom: "40px" }}
  2964. >
  2965. <Spin spinning={this.state.loading}>
  2966. <div className="clearfix">
  2967. <div className="clearfix">
  2968. <FormItem
  2969. className="half-item"
  2970. {...formItemLayout}
  2971. label="合同编号"
  2972. >
  2973. <span>{this.state.contractNo}</span>
  2974. </FormItem>
  2975. <FormItem
  2976. className="half-item"
  2977. {...formItemLayout}
  2978. label="备注"
  2979. >
  2980. {
  2981. <Input
  2982. placeholder="填写申请发票原因"
  2983. value={this.state.remarks}
  2984. onChange={(e) => {
  2985. this.setState({ remarks: e.target.value });
  2986. }}
  2987. style={{ width: "240px" }}
  2988. />
  2989. }
  2990. </FormItem>
  2991. </div>
  2992. <div className="clearfix">
  2993. <FormItem
  2994. className="half-item"
  2995. {...formItemLayout}
  2996. label="省内/外:"
  2997. >
  2998. <RadioGroup
  2999. value={this.state.type}
  3000. onChange={(e) => {
  3001. this.setState({ type: e.target.value });
  3002. }}
  3003. >
  3004. <Radio value={0}>省内</Radio>
  3005. <Radio value={1}>省外</Radio>
  3006. </RadioGroup>
  3007. <span
  3008. style={{
  3009. position: "absolute",
  3010. color: "red",
  3011. fontSize: "10px",
  3012. lineHeight: "20px",
  3013. }}
  3014. >
  3015. 省内:湖南省<br></br>省外:除湖南省以外
  3016. </span>
  3017. </FormItem>
  3018. <FormItem
  3019. className="half-item"
  3020. {...formItemLayout}
  3021. label="特批:"
  3022. >
  3023. <RadioGroup
  3024. value={!this.state.ordapproval ? 0 : 1}
  3025. onChange={(e) => {
  3026. this.setState({ ordapproval: e.target.value });
  3027. }}
  3028. >
  3029. <Radio value={0}>否</Radio>
  3030. <Radio value={1}>是</Radio>
  3031. </RadioGroup>
  3032. <span
  3033. style={{
  3034. position: "absolute",
  3035. color: "red",
  3036. fontSize: "10px",
  3037. lineHeight: "15px",
  3038. }}
  3039. >
  3040. 注:特批单,省内省外,<br></br>分别由周总,省外总经理
  3041. <br></br>特批后,方可至开票流程
  3042. </span>
  3043. </FormItem>
  3044. </div>
  3045. <hr
  3046. style={{
  3047. border: "1px dashed #aaa",
  3048. width: "90%",
  3049. margin: "auto",
  3050. }}
  3051. />
  3052. <div style={{ marginTop: "13px", marginLeft: "16px" }}>
  3053. <span style={{ fontSize: "14px" }}>发票内容</span>
  3054. </div>
  3055. <div className="clearfix">
  3056. <FormItem
  3057. className="half-item"
  3058. {...formItemLayout}
  3059. label={
  3060. <span>
  3061. <strong style={{ color: "#f00" }}>*</strong>
  3062. 发票类型
  3063. </span>
  3064. }
  3065. >
  3066. <RadioGroup
  3067. style={{ width: "160%" }}
  3068. onChange={(e) => {
  3069. this.setState({ invoiceType: e.target.value });
  3070. }}
  3071. value={this.state.invoiceType}
  3072. >
  3073. <Radio value={0}>增值税专用发票</Radio>
  3074. <Radio value={1}>增值税普通发票</Radio>
  3075. <Radio value={2}>其他</Radio>
  3076. </RadioGroup>
  3077. </FormItem>
  3078. </div>
  3079. <div className="clearfix">
  3080. <FormItem
  3081. className="half-item"
  3082. {...formItemLayout}
  3083. label={
  3084. <span>
  3085. <strong style={{ color: "#f00" }}>*</strong>
  3086. 单位名称
  3087. </span>
  3088. }
  3089. >
  3090. {
  3091. <Input
  3092. placeholder="请输入单位名称"
  3093. value={this.state.unitName}
  3094. onChange={(e) => {
  3095. this.setState({ unitName: e.target.value });
  3096. }}
  3097. style={{ width: "240px" }}
  3098. />
  3099. }
  3100. <span
  3101. style={{
  3102. position: "absolute",
  3103. color: "red",
  3104. fontSize: "10px",
  3105. lineHeight: "15px",
  3106. width: "30%",
  3107. }}
  3108. >
  3109. 系统读取单位<br></br>名称,可修改
  3110. </span>
  3111. </FormItem>
  3112. <FormItem
  3113. className="half-item"
  3114. {...formItemLayout}
  3115. label={
  3116. <span>
  3117. <strong style={{ color: "#f00" }}>*</strong>税号
  3118. </span>
  3119. }
  3120. >
  3121. {
  3122. <Input
  3123. placeholder="请输入税号"
  3124. value={this.state.taxNumber}
  3125. onChange={(e) => {
  3126. this.setState({ taxNumber: e.target.value });
  3127. }}
  3128. style={{ width: "240px" }}
  3129. />
  3130. }
  3131. </FormItem>
  3132. <FormItem
  3133. className="half-item"
  3134. {...formItemLayout}
  3135. label={
  3136. <span>
  3137. <strong style={{ color: "#f00" }}>*</strong>
  3138. 开票金额(万元)
  3139. </span>
  3140. }
  3141. >
  3142. {
  3143. <Input
  3144. placeholder="请输入开票金额"
  3145. value={this.state.amount}
  3146. onChange={(e) => {
  3147. this.setState({ amount: e.target.value });
  3148. }}
  3149. style={{ width: "240px" }}
  3150. />
  3151. }
  3152. <span
  3153. style={{
  3154. position: "absolute",
  3155. color: "red",
  3156. fontSize: "10px",
  3157. lineHeight: "15px",
  3158. width: "30%",
  3159. }}
  3160. >
  3161. 填写本次开票<br></br>金额
  3162. </span>
  3163. </FormItem>
  3164. <FormItem
  3165. className="half-item"
  3166. {...formItemLayout}
  3167. label={
  3168. <span>
  3169. <strong style={{ color: "#f00" }}>*</strong>
  3170. 开户行及银行账号
  3171. </span>
  3172. }
  3173. >
  3174. {
  3175. <Input
  3176. placeholder="请输入开户行及银行账号"
  3177. value={this.state.banks}
  3178. onChange={(e) => {
  3179. this.setState({ banks: e.target.value });
  3180. }}
  3181. style={{ width: "240px" }}
  3182. />
  3183. }
  3184. </FormItem>
  3185. <FormItem
  3186. className="half-item"
  3187. {...formItemLayout}
  3188. label={
  3189. <span>
  3190. <strong style={{ color: "#f00" }}>*</strong>
  3191. 开票内容及说明
  3192. </span>
  3193. }
  3194. >
  3195. {
  3196. <Input
  3197. placeholder="请输入开票内容及说明"
  3198. value={this.state.content}
  3199. onChange={(e) => {
  3200. this.setState({ content: e.target.value });
  3201. }}
  3202. style={{ width: "240px" }}
  3203. />
  3204. }
  3205. </FormItem>
  3206. <FormItem
  3207. className="half-item"
  3208. {...formItemLayout}
  3209. label={
  3210. <span>
  3211. <strong style={{ color: "#f00" }}>*</strong>
  3212. 单位地址
  3213. </span>
  3214. }
  3215. >
  3216. {
  3217. <Input
  3218. placeholder="请输入单位地址"
  3219. value={this.state.unitAddress}
  3220. onChange={(e) => {
  3221. this.setState({ unitAddress: e.target.value });
  3222. }}
  3223. style={{ width: "240px" }}
  3224. />
  3225. }
  3226. </FormItem>
  3227. <FormItem
  3228. className="half-item"
  3229. {...formItemLayout}
  3230. label="备注"
  3231. >
  3232. {
  3233. <Input
  3234. placeholder="请备注开票公司名称"
  3235. value={this.state.invoiceRemarks}
  3236. onChange={(e) => {
  3237. this.setState({
  3238. invoiceRemarks: e.target.value,
  3239. });
  3240. }}
  3241. style={{ width: "240px" }}
  3242. />
  3243. }
  3244. <span
  3245. style={{
  3246. position: "absolute",
  3247. color: "red",
  3248. fontSize: "10px",
  3249. lineHeight: "15px",
  3250. width: "30%",
  3251. }}
  3252. >
  3253. 开票公司名称,<br></br>如:科德集团
  3254. </span>
  3255. </FormItem>
  3256. <FormItem
  3257. className="half-item"
  3258. {...formItemLayout}
  3259. label={
  3260. <span>
  3261. <strong style={{ color: "#f00" }}>*</strong>
  3262. 单位电话
  3263. </span>
  3264. }
  3265. >
  3266. {
  3267. <Input
  3268. placeholder="请输入单位电话"
  3269. value={this.state.unitMobile}
  3270. onChange={(e) => {
  3271. this.setState({ unitMobile: e.target.value });
  3272. }}
  3273. style={{ width: "240px" }}
  3274. />
  3275. }
  3276. </FormItem>
  3277. </div>
  3278. <div className="clearfix">
  3279. <FormItem
  3280. labelCol={{ span: 4 }}
  3281. wrapperCol={{ span: 18 }}
  3282. label={
  3283. <span>
  3284. <strong style={{ color: "#f00" }}>*</strong>
  3285. 上传附件
  3286. </span>
  3287. }
  3288. >
  3289. <PicturesWall
  3290. fileList={this.getOrgCodeUrl}
  3291. pictureUrl={this.state.orgCodeUrl}
  3292. />
  3293. <span
  3294. style={{
  3295. paddingTop: "10px",
  3296. paddingLeft: "10px",
  3297. color: "red",
  3298. fontSize: "14px",
  3299. }}
  3300. >
  3301. 注:请上传带"公司盖章"的开票申请纸质凭证
  3302. </span>
  3303. <p>图片建议:要清晰。</p>
  3304. </FormItem>
  3305. </div>
  3306. <hr
  3307. style={{
  3308. border: "1px dashed #aaa",
  3309. width: "90%",
  3310. margin: "auto",
  3311. }}
  3312. />
  3313. <div className="clearfix" style={{ marginTop: "10px" }}>
  3314. <FormItem
  3315. className="half-item"
  3316. {...formItemLayout}
  3317. label="发票是否邮寄:"
  3318. >
  3319. <RadioGroup
  3320. value={this.state.post}
  3321. onChange={(e) => {
  3322. this.setState({ post: e.target.value });
  3323. }}
  3324. >
  3325. <Radio value={0}>是</Radio>
  3326. <Radio value={1}>否</Radio>
  3327. </RadioGroup>
  3328. </FormItem>
  3329. </div>
  3330. {this.state.post === 0 ? (
  3331. <div className="clearfix">
  3332. <FormItem
  3333. className="half-item"
  3334. {...formItemLayout}
  3335. label="收信人姓名"
  3336. >
  3337. {
  3338. <Input
  3339. placeholder="请输入收信人姓名"
  3340. value={this.state.addressee}
  3341. onChange={(e) => {
  3342. this.setState({ addressee: e.target.value });
  3343. }}
  3344. style={{ width: "240px" }}
  3345. />
  3346. }
  3347. </FormItem>
  3348. <FormItem
  3349. className="half-item"
  3350. {...formItemLayout}
  3351. label="电话"
  3352. >
  3353. {
  3354. <Input
  3355. placeholder="请输入电话"
  3356. value={this.state.addresseeMobile}
  3357. onChange={(e) => {
  3358. this.setState({
  3359. addresseeMobile: e.target.value,
  3360. });
  3361. }}
  3362. style={{ width: "240px" }}
  3363. />
  3364. }
  3365. </FormItem>
  3366. </div>
  3367. ) : (
  3368. ""
  3369. )}
  3370. {this.state.post === 0 ? (
  3371. <div className="clearfix">
  3372. <FormItem
  3373. className="half-item"
  3374. {...formItemLayout}
  3375. label="省-市-区"
  3376. >
  3377. <Cascader
  3378. options={areaSelect()}
  3379. value={this.state.ProvinceCity}
  3380. placeholder="选择城市"
  3381. style={{ width: "95%" }}
  3382. onChange={(e) => {
  3383. this.setState({ ProvinceCity: e });
  3384. }}
  3385. />
  3386. </FormItem>
  3387. </div>
  3388. ) : (
  3389. ""
  3390. )}
  3391. {this.state.post === 0 ? (
  3392. <div className="clearfix">
  3393. <FormItem
  3394. className="half-item"
  3395. {...formItemLayout}
  3396. label="详细地址"
  3397. >
  3398. {
  3399. <Input
  3400. placeholder="请输入详细地址"
  3401. value={this.state.recipientAddress}
  3402. onChange={(e) => {
  3403. this.setState({
  3404. recipientAddress: e.target.value,
  3405. });
  3406. }}
  3407. style={{ width: "240px" }}
  3408. />
  3409. }
  3410. </FormItem>
  3411. </div>
  3412. ) : (
  3413. ""
  3414. )}
  3415. <FormItem
  3416. className="half-item"
  3417. {...formItemLayout}
  3418. label={
  3419. <span>
  3420. <strong style={{ color: "#f00" }}>*</strong>
  3421. 开票金额总计
  3422. </span>
  3423. }
  3424. >
  3425. {
  3426. <Input
  3427. value={this.state.alreadyAmount}
  3428. onChange={(e) => {
  3429. this.setState({ alreadyAmount: e.target.value });
  3430. }}
  3431. style={{ width: "40px" }}
  3432. />
  3433. }
  3434. 万元
  3435. <span
  3436. style={{
  3437. position: "absolute",
  3438. color: "red",
  3439. fontSize: "10px",
  3440. lineHeight: "15px",
  3441. marginLeft: "20px",
  3442. }}
  3443. >
  3444. 默认值为0.新开票订单此项不用填.<br></br>
  3445. 以前已开票订单,请填写已开票的总计<br></br>
  3446. 金额,便于审核核对!
  3447. </span>
  3448. </FormItem>
  3449. </div>
  3450. <Button
  3451. className="cancel"
  3452. type="primary"
  3453. style={{ marginRight: "50px", float: "right" }}
  3454. size="large"
  3455. onClick={this.submitApp}
  3456. >
  3457. 提交申请
  3458. </Button>
  3459. {/*<Button className="cancel" type="primary" style={{marginRight:"50px",float:'right',background:'deepskyblue',border:'none'}} size="large" onClick={this.saveApp}>保存</Button>*/}
  3460. </Spin>
  3461. </Form>
  3462. </Modal>
  3463. <Modal
  3464. maskClosable={false}
  3465. className="admin-desc-content"
  3466. footer=""
  3467. title="开具发票申请单"
  3468. width="900px"
  3469. visible={this.state.dvisible}
  3470. onOk={this.visitOks}
  3471. onCancel={this.dvisitCancels}
  3472. >
  3473. <Form
  3474. layout="horizontal"
  3475. // id="demand-form"
  3476. style={{ paddingBottom: "40px" }}
  3477. >
  3478. <Spin spinning={this.state.loading}>
  3479. <div className="clearfix">
  3480. <div className="clearfix">
  3481. <FormItem
  3482. className="half-item"
  3483. {...formItemLayout}
  3484. label="合同编号"
  3485. >
  3486. <span>{this.state.contractNo}</span>
  3487. </FormItem>
  3488. <FormItem
  3489. className="half-item"
  3490. {...formItemLayout}
  3491. label="备注"
  3492. >
  3493. <span>{this.state.remarks}</span>
  3494. </FormItem>
  3495. </div>
  3496. <div className="clearfix">
  3497. <FormItem
  3498. className="half-item"
  3499. {...formItemLayout}
  3500. label={
  3501. <span>
  3502. <strong style={{ color: "#f00" }}>*</strong>
  3503. 省内/外
  3504. </span>
  3505. }
  3506. >
  3507. <span>{getProvinceA(this.state.type)}</span>
  3508. </FormItem>
  3509. <FormItem
  3510. className="half-item"
  3511. {...formItemLayout}
  3512. label={
  3513. <span>
  3514. <strong style={{ color: "#f00" }}>*</strong>特批
  3515. </span>
  3516. }
  3517. >
  3518. <span>
  3519. {this.state.ordapproval === 0 ? "否" : "是"}
  3520. </span>
  3521. </FormItem>
  3522. </div>
  3523. <hr
  3524. style={{
  3525. border: "1px dashed #aaa",
  3526. width: "90%",
  3527. margin: "auto",
  3528. }}
  3529. />
  3530. <div style={{ marginTop: "13px", marginLeft: "16px" }}>
  3531. <span style={{ fontSize: "14px" }}>发票内容</span>
  3532. </div>
  3533. <div className="clearfix">
  3534. <FormItem
  3535. className="half-item"
  3536. {...formItemLayout}
  3537. label={
  3538. <span>
  3539. <strong style={{ color: "#f00" }}>*</strong>
  3540. 发票类型
  3541. </span>
  3542. }
  3543. >
  3544. <span>
  3545. {this.state.invoiceType === 0
  3546. ? "增值税专用发票"
  3547. : this.state.invoiceType === 1
  3548. ? "增值税普通发票"
  3549. : "其他"}
  3550. </span>
  3551. </FormItem>
  3552. </div>
  3553. <div className="clearfix">
  3554. <FormItem
  3555. className="half-item"
  3556. {...formItemLayout}
  3557. label={
  3558. <span>
  3559. <strong style={{ color: "#f00" }}>*</strong>
  3560. 单位名称
  3561. </span>
  3562. }
  3563. >
  3564. <span>{this.state.unitName}</span>
  3565. </FormItem>
  3566. <FormItem
  3567. className="half-item"
  3568. {...formItemLayout}
  3569. label={
  3570. <span>
  3571. <strong style={{ color: "#f00" }}>*</strong>税号
  3572. </span>
  3573. }
  3574. >
  3575. <span>{this.state.taxNumber}</span>
  3576. </FormItem>
  3577. <FormItem
  3578. className="half-item"
  3579. {...formItemLayout}
  3580. label={
  3581. <span>
  3582. <strong style={{ color: "#f00" }}>*</strong>
  3583. 开票金额(万元)
  3584. </span>
  3585. }
  3586. >
  3587. <span>{this.state.amount}</span>
  3588. </FormItem>
  3589. <FormItem
  3590. className="half-item"
  3591. {...formItemLayout}
  3592. label={
  3593. <span>
  3594. <strong style={{ color: "#f00" }}>*</strong>
  3595. 开户行银行账号
  3596. </span>
  3597. }
  3598. >
  3599. <span>{this.state.banks}</span>
  3600. </FormItem>
  3601. <FormItem
  3602. className="half-item"
  3603. {...formItemLayout}
  3604. label={
  3605. <span>
  3606. <strong style={{ color: "#f00" }}>*</strong>
  3607. 开票内容及说明
  3608. </span>
  3609. }
  3610. >
  3611. <span>{this.state.content}</span>
  3612. </FormItem>
  3613. <FormItem
  3614. className="half-item"
  3615. {...formItemLayout}
  3616. label={
  3617. <span>
  3618. <strong style={{ color: "#f00" }}>*</strong>
  3619. 单位地址
  3620. </span>
  3621. }
  3622. >
  3623. <span>{this.state.unitAddress}</span>
  3624. </FormItem>
  3625. <FormItem
  3626. className="half-item"
  3627. {...formItemLayout}
  3628. label="备注"
  3629. >
  3630. <span>{this.state.invoiceRemarks}</span>
  3631. </FormItem>
  3632. <FormItem
  3633. className="half-item"
  3634. {...formItemLayout}
  3635. label={
  3636. <span>
  3637. <strong style={{ color: "#f00" }}>*</strong>
  3638. 单位电话
  3639. </span>
  3640. }
  3641. >
  3642. <span>{this.state.unitMobile}</span>
  3643. </FormItem>
  3644. </div>
  3645. <div className="clearfix">
  3646. <FormItem
  3647. labelCol={{ span: 4 }}
  3648. wrapperCol={{ span: 18 }}
  3649. label={
  3650. <span>
  3651. <strong style={{ color: "#f00" }}>*</strong>附件
  3652. </span>
  3653. }
  3654. >
  3655. {/*<Upload*/}
  3656. {/* className="demandDetailShow-upload"*/}
  3657. {/* listType="picture-card"*/}
  3658. {/* fileList={this.state.orgCodeUrl}*/}
  3659. {/* onPreview={(file) => {*/}
  3660. {/* this.setState({*/}
  3661. {/* previewImage: file.url || file.thumbUrl,*/}
  3662. {/* previewVisible: true,*/}
  3663. {/* });*/}
  3664. {/* }}*/}
  3665. {/*/>*/}
  3666. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  3667. {this.state.visible && this.state.orgCodeUrl ? <ImgList domId={'inquiry2'} fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/> : <div/>}
  3668. </div>
  3669. <Modal
  3670. maskClosable={false}
  3671. footer={null}
  3672. visible={this.state.previewVisible}
  3673. onCancel={() => {
  3674. this.setState({ previewVisible: false });
  3675. }}
  3676. >
  3677. <img
  3678. alt=""
  3679. style={{ width: "100%" }}
  3680. src={this.state.previewImage || ""}
  3681. />
  3682. </Modal>
  3683. </FormItem>
  3684. </div>
  3685. <hr
  3686. style={{
  3687. border: "1px dashed #aaa",
  3688. width: "90%",
  3689. margin: "auto",
  3690. }}
  3691. />
  3692. <div className="clearfix" style={{ marginTop: "10px" }}>
  3693. <FormItem
  3694. className="half-item"
  3695. {...formItemLayout}
  3696. label="发票是否邮寄:"
  3697. >
  3698. <span>{this.state.post === 0 ? "是" : "否"}</span>
  3699. </FormItem>
  3700. </div>
  3701. {this.state.post === 0 ? (
  3702. <div>
  3703. <div className="clearfix">
  3704. <FormItem
  3705. className="half-item"
  3706. {...formItemLayout}
  3707. label="收信人姓名"
  3708. >
  3709. <span>{this.state.addressee}</span>
  3710. </FormItem>
  3711. <FormItem
  3712. className="half-item"
  3713. {...formItemLayout}
  3714. label="电话"
  3715. >
  3716. <span>{this.state.addresseeMobile}</span>
  3717. </FormItem>
  3718. </div>
  3719. <div className="clearfix">
  3720. <FormItem
  3721. className="half-item"
  3722. {...formItemLayout}
  3723. label="省-市-区"
  3724. >
  3725. <span>
  3726. {getprovince(this.state.addresseeProvince)}/
  3727. {getprovince(this.state.addresseeCity)}/
  3728. {getprovince(this.state.addresseeArea)}
  3729. </span>
  3730. </FormItem>
  3731. </div>
  3732. <div className="clearfix">
  3733. <FormItem
  3734. className="half-item"
  3735. {...formItemLayout}
  3736. label="详细地址"
  3737. >
  3738. <span>{this.state.recipientAddress}</span>
  3739. </FormItem>
  3740. </div>
  3741. </div>
  3742. ) : (
  3743. ""
  3744. )}
  3745. </div>
  3746. <FormItem
  3747. className="half-item"
  3748. {...formItemLayout}
  3749. label={
  3750. <span>
  3751. <strong style={{ color: "#f00" }}>*</strong>
  3752. 开票金额总计
  3753. </span>
  3754. }
  3755. >
  3756. <span>{this.state.alreadyAmount}万元</span>
  3757. </FormItem>
  3758. </Spin>
  3759. </Form>
  3760. </Modal>
  3761. {/* <Modal
  3762. visible={this.state.bvisible}
  3763. footer=""
  3764. title="开票历史记录"
  3765. className="admin-desc-content"
  3766. width="900px"
  3767. onCancel={this.inRecordCanl}
  3768. >
  3769. <Spin spinning={this.state.loading}>
  3770. <div
  3771. className="patent-table"
  3772. ref={e => {
  3773. this.refs.kaiPiao = e;
  3774. }}
  3775. >
  3776. <Table
  3777. columns={this.state.columnsDate}
  3778. dataSource={this.state.recordData}
  3779. pagination={false}
  3780. bordered
  3781. />
  3782. <div className="clearfix" style={{ marginTop: "20px" }}>
  3783. <FormItem
  3784. className="half-item"
  3785. {...formItemLayout}
  3786. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  3787. >
  3788. <span>{this.state.sum + "(万元)"}</span>
  3789. </FormItem>
  3790. </div>
  3791. <ReactToPrint
  3792. trigger={() => (
  3793. <Button
  3794. type="primary"
  3795. style={{
  3796. float: "right",
  3797. // marginTop: 10,
  3798. position: "absolute",
  3799. top: -54,
  3800. right: 30
  3801. }}
  3802. >
  3803. 打印
  3804. </Button>
  3805. )}
  3806. content={() => this.refs.kaiPiao}
  3807. />
  3808. </div>
  3809. </Spin>
  3810. </Modal> */}
  3811. <Modal
  3812. maskClosable={false}
  3813. visible={this.state.cuiVisible}
  3814. footer=""
  3815. title="催款详情"
  3816. className="admin-desc-content"
  3817. width="1300px"
  3818. pagination={false}
  3819. onCancel={() => {
  3820. // this.loadData();
  3821. this.setState({
  3822. cuiVisible: false,
  3823. });
  3824. }}
  3825. >
  3826. <Spin spinning={this.state.loading}>
  3827. <div
  3828. className="patent-table"
  3829. style={
  3830. {
  3831. // width: 900,
  3832. // position: "relative",
  3833. // left: "50%",
  3834. // transform: "translate(-50%)",
  3835. // padding: "25px 0 30px 30px"
  3836. }
  3837. }
  3838. ref={(e) => {
  3839. this.refs.all = e;
  3840. }}
  3841. >
  3842. <Table
  3843. columns={this.state.cuiColumns}
  3844. dataSource={this.state.cuiDataList}
  3845. scroll={{ x: "max-content", y: 0 }}
  3846. pagination={false}
  3847. bordered
  3848. size="small"
  3849. />
  3850. </div>
  3851. </Spin>
  3852. <ReactToPrint
  3853. trigger={() => (
  3854. <Button
  3855. type="primary"
  3856. style={{
  3857. float: "right",
  3858. marginTop: 10,
  3859. position: "absolute",
  3860. top: 0,
  3861. right: 30,
  3862. }}
  3863. >
  3864. 打印
  3865. </Button>
  3866. )}
  3867. content={() => this.refs.all}
  3868. />
  3869. </Modal>
  3870. <Modal
  3871. maskClosable={false}
  3872. visible={this.state.proVisible}
  3873. footer=""
  3874. title="项目详情"
  3875. className="admin-desc-content"
  3876. width="1300px"
  3877. pagination={false}
  3878. onCancel={() => {
  3879. // this.loadData();
  3880. this.setState({
  3881. proVisible: false,
  3882. });
  3883. }}
  3884. >
  3885. <Spin spinning={this.state.loading}>
  3886. <Project
  3887. record={this.state.record}
  3888. visible={this.state.pvisible}
  3889. cancel={() => {
  3890. this.setState({ pvisible: false });
  3891. }}
  3892. />
  3893. <div
  3894. className="patent-table"
  3895. ref={(e) => {
  3896. this.refs.all = e;
  3897. }}
  3898. >
  3899. <Table
  3900. columns={this.state.proColumns}
  3901. dataSource={this.state.proDataList}
  3902. onRowClick={this.tableRowClickPro}
  3903. pagination={false}
  3904. bordered
  3905. size="small"
  3906. />
  3907. </div>
  3908. {/* <span style={{ display: "block", marginTop: 10, color: "red" }}>
  3909. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  3910. </span> */}
  3911. </Spin>
  3912. <ReactToPrint
  3913. trigger={() => (
  3914. <Button
  3915. type="primary"
  3916. style={{
  3917. float: "right",
  3918. marginTop: 10,
  3919. position: "absolute",
  3920. top: 0,
  3921. right: 30,
  3922. }}
  3923. >
  3924. 打印
  3925. </Button>
  3926. )}
  3927. content={() => this.refs.all}
  3928. />
  3929. </Modal>
  3930. {this.state.visible ? <Modal
  3931. className="customeDetails"
  3932. footer=""
  3933. title="订单详情"
  3934. width="900px"
  3935. visible={this.state.visible}
  3936. onOk={this.visitOk}
  3937. onCancel={this.visitCancel}
  3938. >
  3939. <Form
  3940. layout="horizontal"
  3941. onSubmit={this.handleSubmit}
  3942. id="demand-form"
  3943. style={{ paddingBottom: "40px" }}
  3944. >
  3945. <Spin spinning={this.state.loading}>
  3946. <div className="clearfix">
  3947. <FormItem
  3948. className="half-item"
  3949. {...formItemLayout}
  3950. label="订单编号"
  3951. >
  3952. <span>{this.state.orderNo}</span>
  3953. </FormItem>
  3954. <FormItem
  3955. className="half-item"
  3956. {...formItemLayout}
  3957. label="合同编号"
  3958. >
  3959. <span>{this.state.contractNo}</span>
  3960. </FormItem>
  3961. <FormItem
  3962. className="half-item"
  3963. {...formItemLayout}
  3964. label="客户名称"
  3965. >
  3966. <span>{this.state.userName}</span>
  3967. </FormItem>
  3968. <FormItem
  3969. className="half-item"
  3970. {...formItemLayout}
  3971. label="合同签订时间"
  3972. >
  3973. <span>{this.state.signDate}</span>
  3974. </FormItem>
  3975. <FormItem
  3976. className="half-item"
  3977. {...formItemLayout}
  3978. label="流程状态"
  3979. >
  3980. <span>{getProcessStatus(this.state.processStatus)}</span>
  3981. </FormItem>
  3982. <FormItem
  3983. className="half-item"
  3984. {...formItemLayout}
  3985. label="结算状态"
  3986. >
  3987. <span>
  3988. {getLiquidationStatus(this.state.liquidationStatus)}
  3989. </span>
  3990. </FormItem>
  3991. <FormItem
  3992. className="half-item"
  3993. {...formItemLayout}
  3994. label="企业联系人"
  3995. >
  3996. <span>{this.state.contacts}</span>
  3997. </FormItem>
  3998. <FormItem
  3999. className="half-item"
  4000. {...formItemLayout}
  4001. label="联系人电话"
  4002. >
  4003. <span>{this.state.contactMobile}</span>
  4004. </FormItem>
  4005. <FormItem
  4006. className="half-item"
  4007. {...formItemLayout}
  4008. label="企业法人"
  4009. >
  4010. <span>{this.state.legalPerson}</span>
  4011. </FormItem>
  4012. <FormItem
  4013. className="half-item"
  4014. {...formItemLayout}
  4015. label="法人电话"
  4016. >
  4017. <span>{this.state.legalPersonTel}</span>
  4018. </FormItem>
  4019. <FormItem
  4020. className="half-item"
  4021. {...formItemLayout}
  4022. label="签单金额(万元)"
  4023. >
  4024. <span>{this.state.totalAmount}</span>
  4025. </FormItem>
  4026. <FormItem
  4027. className="half-item"
  4028. {...formItemLayout}
  4029. label="首付金额(万元)"
  4030. >
  4031. <span>{this.state.firstAmount}</span>
  4032. </FormItem>
  4033. <FormItem
  4034. className="half-item"
  4035. {...formItemLayout}
  4036. label="特批立项"
  4037. >
  4038. <span>{getApprovedState(this.state.approval)}</span>
  4039. </FormItem>
  4040. <FormItem
  4041. className="half-item"
  4042. {...formItemLayout}
  4043. label="已收款项(万元)"
  4044. >
  4045. <span>{this.state.settlementAmount}</span>
  4046. </FormItem>
  4047. <FormItem
  4048. className="half-item"
  4049. {...formItemLayout}
  4050. label="订单部门"
  4051. >
  4052. <span>{this.state.depName}</span>
  4053. </FormItem>
  4054. <FormItem
  4055. className="half-item"
  4056. {...formItemLayout}
  4057. label="是否外包"
  4058. >
  4059. {this.state.outsource}
  4060. </FormItem>
  4061. <div className="clearfix">
  4062. <FormItem
  4063. labelCol={{ span: 4 }}
  4064. wrapperCol={{ span: 16 }}
  4065. label="订单留言"
  4066. >
  4067. <span>{this.state.orderRemarks}</span>
  4068. </FormItem>
  4069. </div>
  4070. <div className="clearfix">
  4071. <FormItem
  4072. labelCol={{ span: 4 }}
  4073. wrapperCol={{ span: 18 }}
  4074. label={"合同扫描件"}
  4075. >
  4076. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  4077. {this.state.visible && this.state.orgCodeUrl ? <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/> : <div/>}
  4078. </div>
  4079. {/*<Upload*/}
  4080. {/* className="demandDetailShow-upload"*/}
  4081. {/* listType="picture-card"*/}
  4082. {/* fileList={this.state.orgCodeUrl}*/}
  4083. {/* onPreview={(file) => {*/}
  4084. {/* this.setState({*/}
  4085. {/* previewImage: file.url || file.thumbUrl,*/}
  4086. {/* previewVisible: true,*/}
  4087. {/* });*/}
  4088. {/* }}*/}
  4089. {/*/>*/}
  4090. <Modal
  4091. maskClosable={false}
  4092. footer={null}
  4093. width={"50%"}
  4094. visible={this.state.previewVisible}
  4095. onCancel={() => {
  4096. this.setState({
  4097. previewVisible: false,
  4098. rotateDeg: 0,
  4099. });
  4100. }}
  4101. >
  4102. <img
  4103. alt=""
  4104. style={{
  4105. width: "100%",
  4106. transform: `rotate(${this.state.rotateDeg}deg)`,
  4107. }}
  4108. src={this.state.previewImage || ""}
  4109. />
  4110. <Button
  4111. onClick={this.rotate}
  4112. style={{
  4113. position: "relative",
  4114. left: "50%",
  4115. transform: "translateX(-50%)",
  4116. }}
  4117. >
  4118. 旋转
  4119. </Button>
  4120. <Button
  4121. onClick={this.upImg}
  4122. style={{
  4123. position: "absolute",
  4124. left: -81,
  4125. top: "50%",
  4126. transform: "translateY(-50%)",
  4127. }}
  4128. >
  4129. 上一张
  4130. </Button>
  4131. <Button
  4132. onClick={this.downImg}
  4133. style={{
  4134. position: "absolute",
  4135. right: -81,
  4136. top: "50%",
  4137. transform: "translateY(-50%)",
  4138. }}
  4139. >
  4140. 下一张
  4141. </Button>
  4142. </Modal>
  4143. <Button
  4144. style={{
  4145. float: "right",
  4146. marginRight: "140px",
  4147. marginTop: "20px",
  4148. }}
  4149. onClick={this.getOrderLog}
  4150. >
  4151. 查看订单 日志
  4152. </Button>
  4153. </FormItem>
  4154. <FormItem
  4155. labelCol={{ span: 4 }}
  4156. wrapperCol={{ span: 18 }}
  4157. label="补充协议"
  4158. >
  4159. {/*<Upload*/}
  4160. {/* className="demandDetailShow-upload"*/}
  4161. {/* listType="picture-card"*/}
  4162. {/* fileList={this.state.replenishUrl}*/}
  4163. {/* onPreview={(file) => {*/}
  4164. {/* this.setState({*/}
  4165. {/* previewImage: file.url || file.thumbUrl,*/}
  4166. {/* previewVisibles: true,*/}
  4167. {/* });*/}
  4168. {/* }}*/}
  4169. {/*/>*/}
  4170. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  4171. {this.state.visible && this.state.replenishUrl ? <ImgList domId={'inquiry1'} fileList={this.state.replenishUrl} ItemWidth={'96px'}/> : <div/>}
  4172. </div>
  4173. <Modal
  4174. maskClosable={false}
  4175. footer={null}
  4176. width={"50%"}
  4177. visible={this.state.previewVisibles}
  4178. onCancel={() => {
  4179. this.setState({ previewVisibles: false,rotateDeg: 0 });
  4180. }}
  4181. >
  4182. <img
  4183. alt=""
  4184. style={{
  4185. width: "100%",
  4186. transform: `rotate(${this.state.rotateDeg}deg)`,
  4187. }}
  4188. src={this.state.previewImage || ""}
  4189. />
  4190. <Button
  4191. onClick={this.rotate}
  4192. style={{
  4193. position: "relative",
  4194. left: "50%",
  4195. transform: "translateX(-50%)",
  4196. }}
  4197. >
  4198. 旋转
  4199. </Button>
  4200. <Button
  4201. onClick={this.upImgs}
  4202. style={{
  4203. position: "absolute",
  4204. left: -81,
  4205. top: "50%",
  4206. transform: "translateY(-50%)",
  4207. }}
  4208. >
  4209. 上一张
  4210. </Button>
  4211. <Button
  4212. onClick={this.downImgs}
  4213. style={{
  4214. position: "absolute",
  4215. right: -81,
  4216. top: "50%",
  4217. transform: "translateY(-50%)",
  4218. }}
  4219. >
  4220. 下一张
  4221. </Button>
  4222. </Modal>
  4223. </FormItem>
  4224. </div>
  4225. <div className="clearfix">
  4226. <FormItem
  4227. className="half-item"
  4228. {...formItemLayout}
  4229. label="订单负责人"
  4230. >
  4231. <span>{this.state.salesmanName}</span>
  4232. </FormItem>
  4233. <FormItem
  4234. className="half-item"
  4235. {...formItemLayout}
  4236. label="订单负责人电话"
  4237. >
  4238. <span>{this.state.salesmanMobile}</span>
  4239. </FormItem>
  4240. </div>
  4241. <div className="clearfix">
  4242. <FormItem
  4243. className="half-item"
  4244. {...formItemLayout}
  4245. label="当前财务负责人"
  4246. >
  4247. <span>{this.state.nowFinance}</span>
  4248. </FormItem>
  4249. <FormItem
  4250. className="half-item"
  4251. {...formItemLayout}
  4252. label="当前财务负责人电话"
  4253. >
  4254. <span>{this.state.nowFinanceMobile}</span>
  4255. </FormItem>
  4256. </div>
  4257. <div className="clearfix">
  4258. <FormItem
  4259. className="half-item"
  4260. {...formItemLayout}
  4261. style={{ opacity: ".5" }}
  4262. label="原订单负责人"
  4263. >
  4264. <span>{this.state.oldSalesmanName}</span>
  4265. </FormItem>
  4266. <FormItem
  4267. className="half-item"
  4268. {...formItemLayout}
  4269. style={{ opacity: ".5" }}
  4270. label="原订单负责人电话"
  4271. >
  4272. <span>{this.state.oldSalesmanMobile}</span>
  4273. </FormItem>
  4274. </div>
  4275. <div className="clearfix">
  4276. <FormItem
  4277. className="half-item"
  4278. style={{ opacity: ".5" }}
  4279. {...formItemLayout}
  4280. label="实际财务操作人"
  4281. >
  4282. <span>{this.state.financeName}</span>
  4283. </FormItem>
  4284. <FormItem
  4285. className="half-item"
  4286. {...formItemLayout}
  4287. style={{ opacity: ".5" }}
  4288. label="实际财务操作人电话"
  4289. >
  4290. <span>{this.state.financeMobile}</span>
  4291. </FormItem>
  4292. </div>
  4293. <div>
  4294. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  4295. 项目业务
  4296. </span>
  4297. </div>
  4298. <div className="patent-table">
  4299. <Spin spinning={this.state.loading}>
  4300. <Table
  4301. columns={this.state.columnsX}
  4302. dataSource={this.state.dataSourceX}
  4303. pagination={false}
  4304. onRowClick={this.tableRowClickX}
  4305. bordered
  4306. size="small"
  4307. />
  4308. </Spin>
  4309. </div>
  4310. <div>
  4311. <span style={{ marginLeft: "50px", fontSize: "20px" }}>
  4312. 催款节点
  4313. </span>
  4314. <span
  4315. style={{
  4316. display: cuiDataList.length ? "none" : "inline-block",
  4317. marginLeft: 10,
  4318. color: "red",
  4319. }}
  4320. >
  4321. 金额总计(万元): {this.state.totalCui}
  4322. </span>
  4323. </div>
  4324. <div className="clearfix">
  4325. <Spin spinning={this.state.loading}>
  4326. <Form layout="horizontal" id="demand-form">
  4327. <Table
  4328. pagination={false}
  4329. bordered
  4330. size="small"
  4331. columns={
  4332. cuiDataList.length
  4333. ? this.state.ContactsLists
  4334. : this.state.ContactsListsNew
  4335. }
  4336. dataSource={
  4337. cuiDataList.length
  4338. ? this.state.contactList
  4339. : this.state.contactListNew
  4340. }
  4341. />
  4342. <Col
  4343. span={24}
  4344. offset={9}
  4345. style={{ marginTop: "15px" }}
  4346. ></Col>
  4347. </Form>
  4348. </Spin>
  4349. </div>
  4350. </div>
  4351. </Spin>
  4352. </Form>
  4353. </Modal> : <div/>}
  4354. <OrderRiZi
  4355. dataSourcerizhi={this.state.dataSourcerizhi}
  4356. closeOrderLog={this.closeOrderLog}
  4357. visible={this.state.rizhivisible}
  4358. loading={this.state.loading}
  4359. />
  4360. </div>
  4361. {this.state.addnextVisible && <ProjectDetailsReadOnly
  4362. infor={this.state.dataInfor}
  4363. visible={this.state.addnextVisible}
  4364. onCancel={this.nextCancel}
  4365. />}
  4366. </div>
  4367. );
  4368. },
  4369. })
  4370. );
  4371. export default Order;