billing.jsx 117 KB

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