inquiry.jsx 151 KB

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