order.jsx 216 KB

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