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. amount: "",
  173. banks: "",
  174. content: "",
  175. unitAddress: "",
  176. invoiceRemarks: "",
  177. unitMobile: "",
  178. post: undefined,
  179. addressee: "",
  180. addresseeMobile: "",
  181. addresseeProvince: "",
  182. addresseeCity: "",
  183. addresseeArea: "",
  184. recipientAddress: "",
  185. ordapproval: undefined,
  186. alreadyAmount: "0",
  187. ProvinceCity: []
  188. },
  189. changeList: undefined,
  190. datauser: {},
  191. orgCodeUrl: [],
  192. selectedRowKeys: [],
  193. releaseDate: [],
  194. departmentArr: [],
  195. signBillState: false,
  196. signBillVisible: false,
  197. selectedRows: [],
  198. recordData: [],
  199. flag: false,
  200. searchMore: true,
  201. loading: false,
  202. alreadyAmount: 0,
  203. intentOrder: true,
  204. formalOrder: true,
  205. pagination: {
  206. defaultCurrent: 1,
  207. defaultPageSize: 10,
  208. showQuickJumper: true,
  209. pageSize: 10,
  210. onChange: function (page) {
  211. this.loadData(page);
  212. }.bind(this),
  213. showTotal: function (total) {
  214. return "共" + total + "条数据";
  215. }
  216. },
  217. cuiColumns: [
  218. {
  219. title: "序号",
  220. dataIndex: "key",
  221. key: "key"
  222. },
  223. {
  224. title: "合同编号",
  225. dataIndex: "contractNo",
  226. key: "contractNo"
  227. },
  228. {
  229. title: "订单编号",
  230. dataIndex: "orderNo",
  231. key: "orderNo"
  232. },
  233. {
  234. title: "客户名称",
  235. dataIndex: "userName",
  236. key: "userName"
  237. },
  238. {
  239. title: "订单负责人",
  240. dataIndex: "salesmanName",
  241. key: "salesmanName"
  242. },
  243. {
  244. title: "订单部门",
  245. dataIndex: "depName",
  246. key: "depName"
  247. },
  248. {
  249. title: "订单状态",
  250. dataIndex: "orderStatus",
  251. key: "orderStatus",
  252. render: text => {
  253. return getNewOrderStatus(text);
  254. }
  255. },
  256. {
  257. title: "项目状态",
  258. dataIndex: "projectStatus",
  259. key: "projectStatus",
  260. render: text => {
  261. return getProjectStatus(text);
  262. }
  263. },
  264. {
  265. title: "签单金额",
  266. dataIndex: "totalAmount",
  267. key: "totalAmount"
  268. },
  269. {
  270. title: "结算状态",
  271. dataIndex: "liquidationStatus",
  272. key: "liquidationStatus",
  273. render: text => {
  274. return getLiquidationStatus(text);
  275. }
  276. },
  277. {
  278. title: "已收款",
  279. dataIndex: "settlementAmount",
  280. key: "settlementAmount"
  281. },
  282. {
  283. title: "应收款",
  284. dataIndex: "accountsReceivable",
  285. key: "accountsReceivable"
  286. },
  287. {
  288. title: "催收科目",
  289. dataIndex: "dunSubject",
  290. key: "dunSubject"
  291. // render: text => {
  292. // return getjiedian(text);
  293. // }
  294. },
  295. {
  296. title: "催款状态",
  297. dataIndex: "dunStatus",
  298. key: "dunStatus"
  299. },
  300. {
  301. title: "催收启动时间",
  302. dataIndex: "startDate",
  303. key: "startDate"
  304. }
  305. ],
  306. proColumns: [
  307. {
  308. title: "序号",
  309. dataIndex: "key",
  310. key: "key"
  311. },
  312. {
  313. title: "合同编号",
  314. dataIndex: "contractNo",
  315. key: "contractNo"
  316. },
  317. {
  318. title: "订单编号",
  319. dataIndex: "orderNo",
  320. key: "orderNo"
  321. },
  322. // {
  323. // title: "项目编号",
  324. // dataIndex: "id",
  325. // key: "id"
  326. // },
  327. {
  328. title: "客户名称",
  329. dataIndex: "userName",
  330. key: "userName"
  331. },
  332. {
  333. title: "订单负责人",
  334. dataIndex: "salesmanName",
  335. key: "salesmanName"
  336. },
  337. {
  338. title: "是否主项目",
  339. dataIndex: "main",
  340. key: "main",
  341. render: text => {
  342. return text == 0 ? "否" : "是";
  343. }
  344. },
  345. {
  346. title: "项目类别",
  347. dataIndex: "cname",
  348. key: "cname"
  349. },
  350. {
  351. title: "项目名称",
  352. dataIndex: "commodityName",
  353. key: "commodityName"
  354. },
  355. {
  356. title: "项目数量",
  357. dataIndex: "commodityQuantity",
  358. key: "commodityQuantity"
  359. },
  360. {
  361. title: "服务市价",
  362. dataIndex: "commodityPrice",
  363. key: "commodityPrice",
  364. render: text => {
  365. return "****";
  366. }
  367. },
  368. {
  369. title: "证书编号",
  370. dataIndex: "certificateNumber",
  371. key: "certificateNumber"
  372. },
  373. {
  374. title: "项目状态",
  375. dataIndex: "projectStatus",
  376. key: "projectStatus",
  377. render: text => {
  378. return getProjectStatus(text);
  379. }
  380. },
  381. {
  382. title: "项目说明",
  383. dataIndex: "taskComment",
  384. key: "taskComment"
  385. },
  386. {
  387. title: "外包(内部)公司",
  388. dataIndex: "outsourceName",
  389. key: "outsourceName"
  390. },
  391. {
  392. title: "外包(内部)价格",
  393. dataIndex: "outsourcePrice",
  394. key: "outsourcePrice",
  395. render: text => {
  396. return "****";
  397. }
  398. }
  399. ],
  400. columns: [
  401. {
  402. title: "合同编号",
  403. dataIndex: "contractNo",
  404. key: "contractNo"
  405. // fixed: 'left'
  406. },
  407. {
  408. title: "订单编号",
  409. dataIndex: "orderNo",
  410. key: "orderNo"
  411. // fixed: 'left'
  412. },
  413. {
  414. title: "客户名称",
  415. dataIndex: "userName",
  416. key: "userName",
  417. render: text => {
  418. return text && text.length > 9 ? text.substr(0, 9) + "..." : text;
  419. }
  420. },
  421. {
  422. title: "订单部门",
  423. dataIndex: "depName",
  424. key: "depName"
  425. // fixed: 'left'
  426. },
  427. {
  428. title: "下单时间",
  429. dataIndex: "createDate",
  430. key: "createTime"
  431. },
  432. {
  433. title: "合同签订时间",
  434. dataIndex: "signDate",
  435. key: "signDate"
  436. },
  437. {
  438. title: "流程状态",
  439. dataIndex: "processStatus",
  440. key: "processStatus",
  441. render: text => {
  442. return getProcessStatus(text);
  443. }
  444. },
  445. {
  446. title: "签单金额(万元)",
  447. dataIndex: "totalAmount",
  448. key: "totalAmount"
  449. },
  450. {
  451. title: "开票金额(万元)",
  452. dataIndex: "invoiceAmount",
  453. key: "invoiceAmount"
  454. },
  455. {
  456. title: "已收款(万元)",
  457. dataIndex: "settlementAmount",
  458. key: "settlementAmount"
  459. },
  460. {
  461. title: "结算状态",
  462. dataIndex: "liquidationStatus",
  463. key: "liquidationStatus",
  464. render: text => {
  465. return getLiquidationStatus(text);
  466. }
  467. },
  468. {
  469. title: "是否特批",
  470. dataIndex: "approval",
  471. key: "approval",
  472. render: text => {
  473. return getApprovedState(text);
  474. }
  475. },
  476. {
  477. title: "订单状态",
  478. dataIndex: "orderStatus",
  479. key: "orderStatus",
  480. render: text => {
  481. return getNewOrderStatus(text);
  482. }
  483. },
  484. {
  485. title: "财务负责人",
  486. dataIndex: "financeName",
  487. key: "financeName"
  488. },
  489. {
  490. title: "操作",
  491. dataIndex: "abc",
  492. key: "abc",
  493. render: (text, record, index) => {
  494. return (
  495. <div>
  496. {
  497. <Button
  498. type="primary"
  499. disabled={record.processStatus == 0 ? true : false}
  500. style={{
  501. marginRight: "10px",
  502. color: "#ffffff",
  503. border: "none",
  504. marginTop: "5px",
  505. background: record.processStatus == 0 ? "#ccc" : "red"
  506. }}
  507. onClick={e => {
  508. // console.log("2221", record);
  509. e.stopPropagation(), this.visit(record, index);
  510. }}
  511. >
  512. 开票
  513. </Button>
  514. }
  515. {/* <Button
  516. type="primary"
  517. onClick={e => {
  518. e.stopPropagation(), this.inRecord(record, index);
  519. }}
  520. style={{
  521. border: "none",
  522. background: "orangered",
  523. marginRight: "10px"
  524. }}
  525. >
  526. 开票记录
  527. </Button> */}
  528. {record.liquidationStatus == 2 ? (
  529. <Popconfirm
  530. title="是否结项?"
  531. onConfirm={() => {
  532. this.delectRow(record);
  533. }}
  534. okText="是"
  535. cancelText="否"
  536. >
  537. <Button
  538. type="primary"
  539. style={{
  540. marginRight: "10px",
  541. color: "#ffffff",
  542. border: "none"
  543. }}
  544. onClick={e => {
  545. e.stopPropagation();
  546. }}
  547. >
  548. 结项
  549. </Button>
  550. </Popconfirm>
  551. ) : (
  552. ""
  553. )}
  554. </div>
  555. );
  556. }
  557. }
  558. ],
  559. columnsDate: [
  560. {
  561. title: "编号",
  562. dataIndex: "id",
  563. key: "id"
  564. },
  565. {
  566. title: "订单编号",
  567. dataIndex: "orderno",
  568. key: "orderno"
  569. },
  570. {
  571. title: "开票金额(万元)",
  572. dataIndex: "amount",
  573. key: "amount"
  574. },
  575. {
  576. title: "申请时间",
  577. dataIndex: "createTime",
  578. key: "createTime"
  579. },
  580. {
  581. title: "开票状态",
  582. dataIndex: "status",
  583. key: "status",
  584. render: (text, record) => {
  585. return (
  586. <div>
  587. {record.status === 3 ? (
  588. <Button
  589. type="danger"
  590. onClick={e => {
  591. e.stopPropagation(), this.reject(record);
  592. }}
  593. >
  594. 被拒,查看原因
  595. </Button>
  596. ) : (
  597. getInvoiceStatus(text, record)
  598. )}
  599. {record.status == 3 ? (
  600. <Button
  601. type="primary"
  602. onClick={e => {
  603. e.stopPropagation(), this.recompose(record);
  604. }}
  605. style={{ marginLeft: "10px" }}
  606. >
  607. 修改开票
  608. </Button>
  609. ) : (
  610. ""
  611. )}
  612. </div>
  613. );
  614. }
  615. }
  616. ],
  617. dataSource: []
  618. };
  619. },
  620. invoiceData(record) {
  621. if (this.state.flagA) return;
  622. this.setState({
  623. flagA: true
  624. });
  625. let theorgCodeUrl = [];
  626. if (this.state.orgCodeUrl.length) {
  627. let picArr = [];
  628. this.state.orgCodeUrl.map(function (item) {
  629. if (
  630. item.response &&
  631. item.response.data &&
  632. item.response.data.length
  633. ) {
  634. picArr.push(item.response.data);
  635. }
  636. });
  637. theorgCodeUrl = picArr.join(",");
  638. }
  639. let api = "",
  640. api1 = "",
  641. method = "",
  642. fdata = {
  643. orderNo: this.state.orderNo3,
  644. type: this.state.type,
  645. status: this.state.status,
  646. approval: this.state.ordapproval,
  647. remarks: this.state.remarks,
  648. invoiceType: this.state.invoiceType,
  649. unitName: this.state.unitName,
  650. taxNumber: this.state.taxNumber,
  651. amount: parseFloat(this.state.amount),
  652. banks: this.state.banks,
  653. content: this.state.content,
  654. unitAddress: this.state.unitAddress,
  655. invoiceRemarks: this.state.invoiceRemarks,
  656. unitMobile: this.state.unitMobile,
  657. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  658. post: this.state.post,
  659. addressee: this.state.addressee,
  660. addresseeMobile: this.state.addresseeMobile,
  661. addresseeProvince:
  662. this.state.post === 0 ? this.state.ProvinceCity[0] || [] : "",
  663. addresseeCity:
  664. this.state.post === 0 ? this.state.ProvinceCity[1] || [] : "",
  665. addresseeArea:
  666. this.state.post === 0 ? this.state.ProvinceCity[2] || [] : "",
  667. recipientAddress: this.state.recipientAddress,
  668. alreadyAmount: parseFloat(this.state.alreadyAmount)
  669. },
  670. sumData = {},
  671. sumData1 = {};
  672. switch (this.state.status) {
  673. case 0:
  674. api = "/api/admin/orderInvoice/createOrderInvoice";
  675. sumData = fdata;
  676. method = "post";
  677. break;
  678. case 1:
  679. api = "/api/admin/orderInvoice/createOrderInvoice";
  680. api1 = "/api/admin/orderInvoice/updateOrderInvoice";
  681. sumData = fdata;
  682. sumData1 = {
  683. orderNo: this.state.orderNo3,
  684. type: this.state.type,
  685. status: this.state.status,
  686. approval: this.state.ordapproval,
  687. remarks: this.state.remarks,
  688. invoiceType: this.state.invoiceType,
  689. unitName: this.state.unitName,
  690. taxNumber: this.state.taxNumber,
  691. amount: parseFloat(this.state.amount),
  692. banks: this.state.banks,
  693. content: this.state.content,
  694. unitAddress: this.state.unitAddress,
  695. invoiceRemarks: this.state.invoiceRemarks,
  696. unitMobile: this.state.unitMobile,
  697. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  698. post: this.state.post,
  699. addressee: this.state.addressee,
  700. addresseeMobile: this.state.addresseeMobile,
  701. addresseeProvince:
  702. this.state.post === 0 ? this.state.ProvinceCity[0] || [] : "",
  703. addresseeCity:
  704. this.state.post === 0 ? this.state.ProvinceCity[1] || [] : "",
  705. addresseeArea:
  706. this.state.post === 0 ? this.state.ProvinceCity[2] || [] : "",
  707. recipientAddress: this.state.recipientAddress,
  708. alreadyAmount: parseFloat(this.state.alreadyAmount)
  709. };
  710. sumData1.id = this.state.id;
  711. method = "post";
  712. break;
  713. case 3:
  714. api = "/api/admin/orderInvoice/selectByIdOrderInvoice";
  715. sumData.id = record.id;
  716. method = "get";
  717. break;
  718. default:
  719. api = "";
  720. break;
  721. }
  722. if (this.state.status === 1 || this.state.status === 0) {
  723. if (typeof this.state.type !== "number") {
  724. message.warning("省内/外不能为空");
  725. this.setState({
  726. flagA: false
  727. });
  728. return;
  729. }
  730. if (typeof this.state.invoiceType !== "number") {
  731. message.warning("发票类型不能为空");
  732. this.setState({
  733. flagA: false
  734. });
  735. return;
  736. }
  737. if (typeof theorgCodeUrl !== "string") {
  738. message.warning("未上传图片");
  739. this.setState({
  740. flagA: false
  741. });
  742. return;
  743. }
  744. if (!this.state.unitName) {
  745. message.warning("单位名称不能为空");
  746. this.setState({
  747. flagA: false
  748. });
  749. return;
  750. }
  751. if (!this.state.taxNumber) {
  752. message.warning("税号不能为空");
  753. this.setState({
  754. flagA: false
  755. });
  756. return;
  757. }
  758. if (!this.state.amount) {
  759. message.warning("金额不能为空");
  760. this.setState({
  761. flagA: false
  762. });
  763. return;
  764. }
  765. if (isNaN(this.state.amount)) {
  766. message.warning("开票金额包含非法字符,请重新输入");
  767. this.setState({
  768. flagA: false
  769. });
  770. return;
  771. }
  772. if (isNaN(this.state.alreadyAmount)) {
  773. message.warning("开票金额总计包含非法字符,请重新输入");
  774. this.setState({
  775. flagA: false
  776. });
  777. return;
  778. }
  779. if (parseFloat(this.state.alreadyAmount) < 0) {
  780. message.warning("开票金额总计不能小于0,请重新输入");
  781. this.setState({
  782. flagA: false
  783. });
  784. return;
  785. }
  786. if (!this.state.banks) {
  787. message.warning("开户行不能为空");
  788. this.setState({
  789. flagA: false
  790. });
  791. return;
  792. }
  793. if (!this.state.content) {
  794. message.warning("开票内容及说明不能为空");
  795. this.setState({
  796. flagA: false
  797. });
  798. return;
  799. }
  800. if (!this.state.unitAddress) {
  801. message.warning("单位地址不能为空");
  802. this.setState({
  803. flagA: false
  804. });
  805. return;
  806. }
  807. if (!this.state.unitMobile) {
  808. message.warning("单位电话不能为空");
  809. this.setState({
  810. flagA: false
  811. });
  812. return;
  813. }
  814. if (this.state.alreadyAmount === "") {
  815. message.warning("开票金额总计不能为空");
  816. this.setState({
  817. flagA: false
  818. });
  819. return;
  820. }
  821. }
  822. // console.log(this.state.flag,this.state.status)
  823. this.setState({
  824. loading: true
  825. });
  826. $.ajax({
  827. method: method,
  828. dataType: "json",
  829. crossDomain: false,
  830. url: globalConfig.context + (this.state.flag ? api1 : api),
  831. data: this.state.flag ? sumData1 : sumData,
  832. success: function (data) {
  833. if (this.state.status === 3 && typeof data.data === "object") {
  834. let thisdata = data.data;
  835. let ProvinceCityArr = [];
  836. let ProvinceS = thisdata.addresseeProvince; //省
  837. let citys = thisdata.addresseeCity; //市
  838. let Areas = thisdata.addresseeArea; //区
  839. ProvinceCityArr.push(ProvinceS, citys, Areas);
  840. this.setState({
  841. orderNo: thisdata.orderNo,
  842. type: thisdata.type,
  843. status: thisdata.status,
  844. ordapproval: thisdata.approval,
  845. remarks: thisdata.remarks,
  846. invoiceType: thisdata.invoiceType,
  847. unitName: thisdata.unitName,
  848. taxNumber: thisdata.taxNumber,
  849. amount: thisdata.amount + "",
  850. banks: thisdata.banks,
  851. content: thisdata.content,
  852. unitAddress: thisdata.unitAddress,
  853. invoiceRemarks: thisdata.invoiceRemarks,
  854. unitMobile: thisdata.unitMobile,
  855. post: thisdata.post,
  856. addressee: thisdata.addressee,
  857. addresseeMobile: thisdata.addresseeMobile,
  858. addresseeProvince: thisdata.addresseeProvince,
  859. addresseeCity: thisdata.addresseeCity,
  860. addresseeArea: thisdata.addresseeArea,
  861. alreadyAmount: thisdata.alreadyAmount + "",
  862. ProvinceCity:
  863. ProvinceCityArr[0] != null ? ProvinceCityArr : undefined, //省市区
  864. recipientAddress: thisdata.recipientAddress,
  865. orgCodeUrl: thisdata.voucherUrl
  866. ? splitUrl(
  867. thisdata.voucherUrl,
  868. ",",
  869. globalConfig.avatarHost + "/upload"
  870. )
  871. : []
  872. });
  873. }
  874. }.bind(this)
  875. }).done(
  876. function (data) {
  877. this.setState({
  878. loading: false
  879. });
  880. if (!data.error.length) {
  881. if (this.state.status === 1) {
  882. message.success("提交成功!");
  883. this.visitCancels();
  884. if (this.state.flag) {
  885. this.inRecordData();
  886. }
  887. this.setState({
  888. flagA: false
  889. });
  890. } else if (this.state.status === 0) {
  891. message.success("保存成功!");
  892. this.visitCancels();
  893. this.setState({
  894. flagA: false
  895. });
  896. } else if (this.state.status === 3) {
  897. this.setState({
  898. flag: true,
  899. flagA: false
  900. });
  901. }
  902. } else {
  903. message.warning(data.error[0].message);
  904. this.setState({
  905. flagA: false
  906. });
  907. }
  908. }.bind(this)
  909. );
  910. },
  911. areset() {
  912. this.setState({
  913. remarks: "",
  914. type: undefined,
  915. orgCodeUrl: "",
  916. invoiceType: undefined,
  917. unitName: "",
  918. taxNumber: "",
  919. unitName: "",
  920. amount: "",
  921. banks: "",
  922. content: "",
  923. unitAddress: "",
  924. invoiceRemarks: "",
  925. unitMobile: "",
  926. post: undefined,
  927. addressee: "",
  928. addresseeMobile: "",
  929. addresseeProvince: "",
  930. addresseeCity: "",
  931. addresseeArea: "",
  932. recipientAddress: "",
  933. ordapproval: 0,
  934. alreadyAmount: "",
  935. ProvinceCity: []
  936. });
  937. },
  938. recompose(record) {
  939. // console.log(record)
  940. this.setState({
  941. avisible: true,
  942. orderNo3: record.orderno,
  943. id: record.id
  944. });
  945. this.setState(
  946. {
  947. status: 3,
  948. cvisible: true,
  949. flag: false
  950. },
  951. () => {
  952. this.invoiceData(record);
  953. }
  954. );
  955. },
  956. submitApp() {
  957. if (this.state.status === 3) {
  958. this.setState({
  959. flag: true
  960. });
  961. }
  962. this.setState(
  963. {
  964. status: 1
  965. },
  966. () => {
  967. this.invoiceData();
  968. }
  969. );
  970. },
  971. saveApp() {
  972. this.setState(
  973. {
  974. status: 0
  975. },
  976. () => {
  977. this.invoiceData();
  978. }
  979. );
  980. },
  981. reject(record) {
  982. this.setState({
  983. visibleR: true,
  984. reason: record.rejectReason
  985. });
  986. },
  987. rejectCancels() {
  988. this.setState({
  989. visibleR: false
  990. });
  991. },
  992. //开票
  993. visit(record, index) {
  994. this.areset();
  995. this.setState({
  996. contractNo: this.state.dataSource[index].contractNo,
  997. orderNo3: record.orderNo,
  998. avisible: true,
  999. flag: false,
  1000. invoiceType: 0,
  1001. alreadyAmount: 0,
  1002. unitName: this.state.dataSource[index].userName,
  1003. post: 1
  1004. });
  1005. $.ajax({
  1006. method: "get",
  1007. dataType: "json",
  1008. crossDomain: false,
  1009. url: globalConfig.context + "/api/admin/orderInvoice/getInvoiceDetails",
  1010. data: {
  1011. orderNo: record.orderNo
  1012. },
  1013. success: data => {
  1014. if (data.error.length) {
  1015. message.warning(data.error[0].message)
  1016. } else if (data.data) {
  1017. const thisdata = data.data
  1018. this.setState({
  1019. contractNo: thisdata.contractNo,
  1020. orderNo: thisdata.orderNo,
  1021. ordapproval: thisdata.approval,
  1022. type: thisdata.type,
  1023. status: thisdata.status,
  1024. remarks: thisdata.remarks,
  1025. invoiceType: thisdata.invoiceType,
  1026. unitName: thisdata.unitName,
  1027. taxNumber: thisdata.taxNumber,
  1028. amount: thisdata.amount,
  1029. banks: thisdata.banks,
  1030. content: thisdata.content,
  1031. unitAddress: thisdata.unitAddress,
  1032. invoiceRemarks: thisdata.invoiceRemarks,
  1033. unitMobile: thisdata.unitMobile,
  1034. post: thisdata.post,
  1035. addressee: thisdata.addressee,
  1036. addresseeMobile: thisdata.addresseeMobile,
  1037. addresseeProvince: thisdata.addresseeProvince,
  1038. addresseeCity: thisdata.addresseeCity,
  1039. addresseeArea: thisdata.addresseeArea,
  1040. alreadyAmount: thisdata.alreadyAmount,
  1041. recipientAddress: thisdata.recipientAddress,
  1042. orgCodeUrl: thisdata.voucherUrl
  1043. ? splitUrl(
  1044. thisdata.voucherUrl,
  1045. ",",
  1046. globalConfig.avatarHost + "/upload"
  1047. )
  1048. : []
  1049. });
  1050. }
  1051. }
  1052. });
  1053. },
  1054. visitCancels() {
  1055. this.setState({
  1056. avisible: false,
  1057. cvisible: false
  1058. });
  1059. },
  1060. //查看开票历史记录详情
  1061. dtableRowClick(record) {
  1062. this.setState({
  1063. dvisible: true
  1064. });
  1065. this.setState({
  1066. loading: true
  1067. });
  1068. $.ajax({
  1069. method: "get",
  1070. dataType: "json",
  1071. crossDomain: false,
  1072. url:
  1073. globalConfig.context +
  1074. "/api/admin/orderInvoice/selectByIdOrderInvoice",
  1075. data: {
  1076. id: record.id
  1077. },
  1078. success: function (data) {
  1079. let thisdata = data.data;
  1080. this.setState({
  1081. contractNo: thisdata.contractNo,
  1082. orderNo: thisdata.orderNo,
  1083. ordapproval: thisdata.approval,
  1084. type: thisdata.type,
  1085. status: thisdata.status,
  1086. remarks: thisdata.remarks,
  1087. invoiceType: thisdata.invoiceType,
  1088. unitName: thisdata.unitName,
  1089. taxNumber: thisdata.taxNumber,
  1090. amount: thisdata.amount,
  1091. banks: thisdata.banks,
  1092. content: thisdata.content,
  1093. unitAddress: thisdata.unitAddress,
  1094. invoiceRemarks: thisdata.invoiceRemarks,
  1095. unitMobile: thisdata.unitMobile,
  1096. post: thisdata.post,
  1097. addressee: thisdata.addressee,
  1098. addresseeMobile: thisdata.addresseeMobile,
  1099. addresseeProvince: thisdata.addresseeProvince,
  1100. addresseeCity: thisdata.addresseeCity,
  1101. addresseeArea: thisdata.addresseeArea,
  1102. alreadyAmount: thisdata.alreadyAmount,
  1103. recipientAddress: thisdata.recipientAddress,
  1104. orgCodeUrl: thisdata.voucherUrl
  1105. ? splitUrl(
  1106. thisdata.voucherUrl,
  1107. ",",
  1108. globalConfig.avatarHost + "/upload"
  1109. )
  1110. : []
  1111. });
  1112. }.bind(this)
  1113. }).done(
  1114. function () {
  1115. this.setState({
  1116. loading: false
  1117. });
  1118. }.bind(this)
  1119. );
  1120. },
  1121. //关闭开票历史记录详情
  1122. dvisitCancels() {
  1123. this.setState({
  1124. dvisible: false
  1125. });
  1126. },
  1127. inRecordData() {
  1128. this.setState({
  1129. loading: true
  1130. });
  1131. $.ajax({
  1132. method: "get",
  1133. dataType: "json",
  1134. crossDomain: false,
  1135. url:
  1136. globalConfig.context +
  1137. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1138. data: {
  1139. orderNo: this.state.orderNo2
  1140. },
  1141. success: function (data) {
  1142. let theArr = [];
  1143. let sum = 0;
  1144. if (!data.data) {
  1145. if (data.error && data.error.length) {
  1146. message.warning(data.error[0].message);
  1147. }
  1148. } else {
  1149. for (let i = 0; i < data.data.list.length; i++) {
  1150. let thisdata = data.data.list[i];
  1151. sum += parseFloat(thisdata.amount);
  1152. theArr.push({
  1153. id: thisdata.id,
  1154. orderno: thisdata.orderno, //订单编号
  1155. amount: thisdata.amount, //签单金额
  1156. createTime: thisdata.createTime, //流程状态
  1157. status: thisdata.status, //结算状态
  1158. rejectReason: thisdata.rejectReason,
  1159. approval: thisdata.approval
  1160. });
  1161. }
  1162. }
  1163. this.setState({
  1164. recordData: theArr,
  1165. sum: sum.toFixed(4)
  1166. });
  1167. }.bind(this)
  1168. }).done(
  1169. function () {
  1170. this.setState({
  1171. loading: false
  1172. });
  1173. }.bind(this)
  1174. );
  1175. },
  1176. inRecord(record) {
  1177. this.setState(
  1178. {
  1179. bvisible: true,
  1180. orderNo2: this.state.selectedRowKeys[0]
  1181. },
  1182. () => {
  1183. this.inRecordData();
  1184. }
  1185. );
  1186. },
  1187. inRecordCanl() {
  1188. this.setState({
  1189. bvisible: false
  1190. });
  1191. },
  1192. //结项
  1193. delectRow(record) {
  1194. this.setState({
  1195. loading: true
  1196. });
  1197. $.ajax({
  1198. method: "get",
  1199. dataType: "json",
  1200. crossDomain: false,
  1201. url: globalConfig.context + "/api/admin/newOrder/OrderOver",
  1202. data: {
  1203. orderNo: record.orderNo
  1204. }
  1205. }).done(
  1206. function (data) {
  1207. if (!data.error.length) {
  1208. message.success("该项目已成功结项!");
  1209. this.loadData();
  1210. } else {
  1211. message.warning(data.error[0].message);
  1212. }
  1213. this.setState({
  1214. loading: false
  1215. });
  1216. }.bind(this)
  1217. );
  1218. },
  1219. //是否退款
  1220. refundCancel(record) {
  1221. this.refund(record, 0);
  1222. },
  1223. refundOk(record) {
  1224. this.refund(record, 1);
  1225. },
  1226. refund(record, index) {
  1227. this.setState({
  1228. signBillVisible: false,
  1229. selectedRowKeys: [],
  1230. loading: true,
  1231. userDetaile: false
  1232. });
  1233. $.ajax({
  1234. method: "get",
  1235. dataType: "json",
  1236. crossDomain: false,
  1237. url: globalConfig.context + "/api/admin/order/confirmRefund",
  1238. data: {
  1239. orderNo: record.orderNo,
  1240. confirm: index
  1241. }
  1242. }).done(
  1243. function (data) {
  1244. if (!data.error.length) {
  1245. message.success("操作成功!");
  1246. this.setState({
  1247. loading: false,
  1248. showDesc: false
  1249. });
  1250. }
  1251. this.loadData(this.state.pageNo);
  1252. }.bind(this)
  1253. );
  1254. },
  1255. //受理订单
  1256. admissibleOrderOk(e) {
  1257. this.admissibleOrder(e, true);
  1258. },
  1259. admissibleOrderCancel(e) {
  1260. this.admissibleOrder(e, false);
  1261. },
  1262. admissibleOrder(record, index) {
  1263. this.setState({
  1264. signBillVisible: false,
  1265. selectedRowKeys: [],
  1266. loading: true,
  1267. userDetaile: false
  1268. });
  1269. $.ajax({
  1270. method: "POST",
  1271. dataType: "json",
  1272. crossDomain: false,
  1273. url: globalConfig.context + "/api/admin/order/confirmIntention",
  1274. data: {
  1275. orderNo: record.orderNo,
  1276. confirm: index
  1277. }
  1278. }).done(
  1279. function (data) {
  1280. if (!data.error.length) {
  1281. message.success("操作成功!");
  1282. this.setState({
  1283. loading: false,
  1284. showDesc: false
  1285. });
  1286. } else {
  1287. message.warning(data.error[0].message);
  1288. this.setState({
  1289. showDesc: true
  1290. });
  1291. }
  1292. this.loadData(this.state.pageNo);
  1293. }.bind(this)
  1294. );
  1295. },
  1296. //取消订单
  1297. cancelOrder(e) {
  1298. this.operation(e, 3);
  1299. },
  1300. //作废订单
  1301. scrapOrder(e) {
  1302. this.operation(e, 2);
  1303. },
  1304. //锁定订单
  1305. lockOrder(e) {
  1306. this.operation(e, 0);
  1307. },
  1308. //解锁订单
  1309. unlockOrder(e) {
  1310. this.operation(e, 1);
  1311. },
  1312. //签单
  1313. signBill(ids) {
  1314. this.setState({
  1315. uid: ids,
  1316. signBillVisible: true
  1317. });
  1318. },
  1319. componentWillMount() {
  1320. this.departmentList();
  1321. this.loadData();
  1322. let data = localStorage.getItem("newData");
  1323. if (data != "{}" && data) {
  1324. var newData = JSON.parse(data);
  1325. this.tableRowClick(newData);
  1326. }
  1327. },
  1328. tableRowClick(record) {
  1329. this.state.userDetaile = true;
  1330. this.state.datauser = record;
  1331. this.setState({
  1332. signBillVisible: false,
  1333. signBillState: true,
  1334. showDesc: true
  1335. });
  1336. localStorage.setItem("newData", "{}");
  1337. },
  1338. //列表各种骚操作
  1339. operation(record, index) {
  1340. this.setState({
  1341. selectedRowKeys: [],
  1342. loading: true,
  1343. showDesc: false
  1344. });
  1345. $.ajax({
  1346. method: "get",
  1347. dataType: "json",
  1348. crossDomain: false,
  1349. url: globalConfig.context + "/api/admin/order/lockOrRevokeOrder",
  1350. data: {
  1351. orderNo: record.orderNo,
  1352. operatorType: index
  1353. }
  1354. }).done(
  1355. function (data) {
  1356. if (!data.error.length) {
  1357. message.success("操作成功!");
  1358. this.setState({
  1359. loading: false
  1360. });
  1361. } else {
  1362. message.warning(data.error[0].message);
  1363. }
  1364. this.loadData(this.state.pageNo);
  1365. }.bind(this)
  1366. );
  1367. },
  1368. addClick() {
  1369. this.state.userDetaile = false;
  1370. this.setState({
  1371. signBillVisible: false,
  1372. showDesc: true
  1373. });
  1374. },
  1375. closeDesc(e, s) {
  1376. this.state.userDetaile = false;
  1377. this.state.signBillVisible = false;
  1378. this.state.showDesc = e;
  1379. if (s) {
  1380. this.loadData(this.state.pageNo);
  1381. }
  1382. },
  1383. searchSwitch() {
  1384. this.setState({
  1385. signBillVisible: false,
  1386. searchMore: !this.state.searchMore
  1387. });
  1388. },
  1389. getOrgCodeUrl(e) {
  1390. this.setState({ orgCodeUrl: e });
  1391. },
  1392. search() {
  1393. this.setState({
  1394. signBillVisible: false
  1395. });
  1396. this.loadData();
  1397. },
  1398. reset() {
  1399. this.setState({
  1400. signBillVisible: false
  1401. });
  1402. this.state.searchOrderNo = undefined;
  1403. this.state.orderNo = "";
  1404. this.state.customerName = "";
  1405. this.state.departmenttSearch = undefined;
  1406. this.state.releaseDate[0] = undefined;
  1407. this.state.releaseDate[1] = undefined;
  1408. this.state.projectProgress = undefined;
  1409. this.state.approval = undefined;
  1410. this.state.formalOrder = true;
  1411. this.state.intentOrder = true;
  1412. (this.state.liquidationStatusSearch = []),
  1413. (this.state.contractNoSearch = "");
  1414. this.state.departmenttList = [];
  1415. this.state.approvalSearch = undefined
  1416. this.state.amountStatus = undefined
  1417. this.loadData();
  1418. },
  1419. //部门
  1420. departmentList() {
  1421. this.setState({
  1422. loading: true
  1423. });
  1424. $.ajax({
  1425. method: "get",
  1426. dataType: "json",
  1427. crossDomain: false,
  1428. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1429. data: {},
  1430. success: function (data) {
  1431. let thedata = data.data;
  1432. let theArr = [];
  1433. if (!thedata) {
  1434. if (data.error && data.error.length) {
  1435. message.warning(data.error[0].message);
  1436. }
  1437. thedata = {};
  1438. } else {
  1439. thedata.map(function (item, index) {
  1440. theArr.push({
  1441. key: index,
  1442. name: item.name,
  1443. id: item.id
  1444. });
  1445. });
  1446. }
  1447. this.setState({
  1448. departmentArr: theArr
  1449. });
  1450. }.bind(this)
  1451. }).always(
  1452. function () {
  1453. this.setState({
  1454. loading: false
  1455. });
  1456. }.bind(this)
  1457. );
  1458. },
  1459. changeList(arr) {
  1460. const newArr = [];
  1461. this.state.columns.forEach(item => {
  1462. arr.forEach(val => {
  1463. if (val === item.title) {
  1464. newArr.push(item);
  1465. }
  1466. });
  1467. });
  1468. this.setState({
  1469. changeList: newArr
  1470. });
  1471. },
  1472. onSelectChange(selectedRowKeys) {
  1473. this.setState({ selectedRowKeys });
  1474. console.log(selectedRowKeys);
  1475. },
  1476. // inRecordData() {
  1477. // this.setState({
  1478. // loading: true
  1479. // });
  1480. // $.ajax({
  1481. // method: "get",
  1482. // dataType: "json",
  1483. // crossDomain: false,
  1484. // url:
  1485. // globalConfig.context +
  1486. // "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1487. // data: {
  1488. // orderNo: this.state.selectedRowKeys[0],
  1489. // pageSize: 9999
  1490. // },
  1491. // success: function(data) {
  1492. // let theArr = [];
  1493. // let sum = 0;
  1494. // if (!data.data) {
  1495. // if (data.error && data.error.length) {
  1496. // message.warning(data.error[0].message);
  1497. // }
  1498. // } else {
  1499. // for (let i = 0; i < data.data.list.length; i++) {
  1500. // let thisdata = data.data.list[i];
  1501. // sum += parseFloat(thisdata.amount);
  1502. // theArr.push({
  1503. // id: thisdata.id,
  1504. // orderno: thisdata.orderno, //订单编号
  1505. // amount: thisdata.amount, //签单金额
  1506. // createTime: thisdata.createTime, //流程状态
  1507. // status: thisdata.status, //结算状态
  1508. // rejectReason: thisdata.rejectReason
  1509. // });
  1510. // }
  1511. // }
  1512. // this.setState({
  1513. // recordData: theArr,
  1514. // sum: sum.toFixed(4)
  1515. // });
  1516. // }.bind(this)
  1517. // }).done(
  1518. // function() {
  1519. // this.setState({
  1520. // loading: false
  1521. // });
  1522. // }.bind(this)
  1523. // );
  1524. // },
  1525. cuiData() {
  1526. this.setState({
  1527. loading: true
  1528. });
  1529. $.ajax({
  1530. method: "get",
  1531. dataType: "json",
  1532. crossDomain: false,
  1533. url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
  1534. data: {
  1535. orderNo: this.state.selectedRowKeys[0],
  1536. pageSize: 9999
  1537. },
  1538. success: function (data) {
  1539. let theArr = [];
  1540. if (!data.data || !data.data.list) {
  1541. if (data.error && data.error.length) {
  1542. message.warning(data.error[0].message);
  1543. }
  1544. } else {
  1545. for (let i = 0; i < data.data.list.length; i++) {
  1546. let thisdata = data.data.list[i];
  1547. theArr.push({
  1548. key: i + 1,
  1549. orderNo: thisdata.orderNo,
  1550. contractNo: thisdata.contractNo,
  1551. userName: thisdata.userName,
  1552. buyerName: thisdata.buyerName,
  1553. departmentName: thisdata.departmentName,
  1554. salesmanName: thisdata.salesmanName,
  1555. depName: thisdata.depName,
  1556. orderStatus: thisdata.orderStatus,
  1557. projectStatus: thisdata.projectStatus,
  1558. totalAmount: thisdata.totalAmount,
  1559. liquidationStatus: thisdata.liquidationStatus,
  1560. settlementAmount: thisdata.settlementAmount,
  1561. accountsReceivable: thisdata.accountsReceivable,
  1562. dunSubject: thisdata.dunSubject,
  1563. startDate: thisdata.startDate,
  1564. taskStatus: thisdata.taskStatus,
  1565. cname: thisdata.cname,
  1566. id: thisdata.id,
  1567. taskName: thisdata.taskName,
  1568. hours: thisdata.hours,
  1569. taskDistributionTime: thisdata.taskDistributionTime,
  1570. taskEndTime: thisdata.taskEndTime,
  1571. dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发"
  1572. });
  1573. }
  1574. }
  1575. this.setState({
  1576. cuiDataList: theArr
  1577. });
  1578. }.bind(this)
  1579. }).always(
  1580. function () {
  1581. this.setState({
  1582. loading: false
  1583. });
  1584. }.bind(this)
  1585. );
  1586. },
  1587. proData() {
  1588. this.setState({
  1589. loading: true
  1590. });
  1591. $.ajax({
  1592. method: "get",
  1593. dataType: "json",
  1594. crossDomain: false,
  1595. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1596. data: {
  1597. orderNo: this.state.selectedRowKeys[0],
  1598. pageSize: 9999
  1599. },
  1600. success: function (data) {
  1601. let theArr = [];
  1602. let totalWaibao = 0;
  1603. if (!data.data) {
  1604. if (data.error && data.error.length) {
  1605. message.warning(data.error[0].message);
  1606. }
  1607. } else {
  1608. for (let i = 0; i < data.data.length; i++) {
  1609. let thisdata = data.data[i];
  1610. totalWaibao += thisdata.outsourcePrice;
  1611. theArr.push({
  1612. key: i + 1,
  1613. id: thisdata.id,
  1614. orderNo: thisdata.orderNo,
  1615. contractNo: thisdata.contractNo,
  1616. userName: thisdata.userName,
  1617. buyerName: thisdata.buyerName,
  1618. departmentName: thisdata.departmentName,
  1619. salesmanName: thisdata.salesmanName,
  1620. depName: thisdata.depName,
  1621. orderStatus: thisdata.orderStatus,
  1622. projectStatus: thisdata.projectStatus,
  1623. commodityName: thisdata.commodityName,
  1624. totalAmount: thisdata.totalAmount,
  1625. liquidationStatus: thisdata.liquidationStatus,
  1626. settlementAmount: thisdata.settlementAmount,
  1627. accountsReceivable: thisdata.accountsReceivable,
  1628. dunSubject: thisdata.dunSubject,
  1629. startDate: thisdata.startDate,
  1630. taskStatus: thisdata.taskStatus,
  1631. cname: thisdata.cname,
  1632. id: thisdata.id,
  1633. taskName: thisdata.taskName,
  1634. hours: thisdata.hours,
  1635. taskDistributionTime: thisdata.taskDistributionTime,
  1636. taskEndTime: thisdata.taskEndTime,
  1637. commodityQuantity: thisdata.commodityQuantity,
  1638. commodityPrice: thisdata.commodityPrice,
  1639. certificateNumber: thisdata.certificateNumber,
  1640. taskComment: thisdata.taskComment,
  1641. outsourceName: thisdata.outsourceName,
  1642. outsourcePrice: thisdata.outsourcePrice,
  1643. splitStatus: thisdata.splitStatus
  1644. });
  1645. }
  1646. }
  1647. totalWaibao = (Math.round(totalWaibao * 10000) / 10000).toFixed(4);
  1648. this.setState({
  1649. proDataList: theArr,
  1650. totalWaibao
  1651. });
  1652. }.bind(this)
  1653. }).always(
  1654. function () {
  1655. this.setState({
  1656. loading: false
  1657. });
  1658. }.bind(this)
  1659. );
  1660. },
  1661. tableRowClickPro(record) {
  1662. this.setState({
  1663. pvisible: true,
  1664. record
  1665. });
  1666. },
  1667. render() {
  1668. const FormItem = Form.Item;
  1669. const formItemLayout = {
  1670. labelCol: { span: 8 },
  1671. wrapperCol: { span: 14 }
  1672. };
  1673. const RadioGroup = Radio.Group;
  1674. var departmentArr = this.state.departmentArr || [];
  1675. const { RangePicker } = DatePicker;
  1676. const { loading, selectedRowKeys, visible } = this.state;
  1677. const rowSelection = {
  1678. selectedRowKeys,
  1679. onChange: this.onSelectChange,
  1680. hideDefaultSelections: true,
  1681. type: "radio"
  1682. };
  1683. return (
  1684. <div className="user-content">
  1685. <ShowModalDiv ShowModal={this.state.showModal} />
  1686. <div className="content-title">
  1687. <span
  1688. style={{
  1689. fontWeight: 900,
  1690. fontSize: 16,
  1691. display: "block",
  1692. marginBottom: 10
  1693. }}
  1694. >
  1695. 开单与签单
  1696. </span>
  1697. <Tabs
  1698. defaultActiveKey="2"
  1699. onChange={this.callback}
  1700. className="test"
  1701. >
  1702. <TabPane tab="更改表格显示数据" key="1">
  1703. <div style={{ marginLeft: 10 }}>
  1704. <ChooseList
  1705. columns={this.state.columns}
  1706. changeFn={this.changeList}
  1707. changeList={this.state.changeList}
  1708. top={55}
  1709. margin={11}
  1710. />
  1711. </div>
  1712. </TabPane>
  1713. <TabPane tab="搜索" key="2">
  1714. <div className="user-search" style={{ marginLeft: 10 }}>
  1715. <Input
  1716. placeholder="订单编号"
  1717. style={{ width: "150px" }}
  1718. value={this.state.searchOrderNo}
  1719. onChange={e => {
  1720. this.setState({ searchOrderNo: e.target.value });
  1721. }}
  1722. />
  1723. <Input
  1724. placeholder="客户名称"
  1725. style={{ width: "150px" }}
  1726. value={this.state.customerName}
  1727. onChange={e => {
  1728. this.setState({ customerName: e.target.value });
  1729. }}
  1730. />
  1731. <Select
  1732. placeholder="订单部门"
  1733. style={{ width: 150, marginRight: 10 }}
  1734. value={this.state.departmenttList}
  1735. onChange={e => {
  1736. this.setState({ departmenttList: e });
  1737. }}
  1738. >
  1739. {departmentArr.map(function (item) {
  1740. return <Option key={item.id}>{item.name}</Option>;
  1741. })}
  1742. </Select>
  1743. <Input
  1744. placeholder="合同编号"
  1745. style={{ width: "150px" }}
  1746. value={this.state.contractNoSearch}
  1747. onChange={e => {
  1748. this.setState({
  1749. contractNoSearch: e.target.value
  1750. });
  1751. }}
  1752. />
  1753. <Select
  1754. style={{ width: 120 }}
  1755. placeholder="结算状态"
  1756. value={this.state.liquidationStatusSearch}
  1757. onChange={e => {
  1758. this.setState({
  1759. liquidationStatusSearch: e
  1760. });
  1761. }}
  1762. >
  1763. <Option value="0">首付待付请</Option>
  1764. <Option value="1">尾款待付清</Option>
  1765. <Option value="2">已付清</Option>
  1766. </Select>
  1767. <Select
  1768. style={{ width: 120 }}
  1769. placeholder="特批状态"
  1770. value={this.state.approvalSearch}
  1771. onChange={e => {
  1772. this.setState({
  1773. approvalSearch: e
  1774. });
  1775. }}
  1776. >
  1777. <Option value="0">非特批</Option>
  1778. <Option value="1">特批</Option>
  1779. </Select>
  1780. <Select
  1781. style={{ width: 120 }}
  1782. placeholder="签单金额"
  1783. value={this.state.amountStatus}
  1784. onChange={e => {
  1785. this.setState({
  1786. amountStatus: e
  1787. });
  1788. }}
  1789. >
  1790. <Option value="0">10万元以下</Option>
  1791. <Option value="1">10~20万元</Option>
  1792. <Option value="2">20~30万元</Option>
  1793. <Option value="3">30~40万元</Option>
  1794. <Option value="4">40万元以上</Option>
  1795. </Select>
  1796. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1797. <RangePicker
  1798. style={{ width:200 }}
  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;