billing.jsx 114 KB

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