billing.jsx 117 KB

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