billing.jsx 117 KB

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