billing.jsx 118 KB

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