billing.jsx 117 KB

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