inquiry.jsx 144 KB

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