billing.jsx 118 KB

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