billing.jsx 117 KB

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