billing.jsx 117 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466
  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. // console.log("2221", record);
  510. e.stopPropagation(), this.visit(record, index);
  511. }}
  512. >
  513. 开票
  514. </Button>
  515. }
  516. {/* <Button
  517. type="primary"
  518. onClick={e => {
  519. e.stopPropagation(), this.inRecord(record, index);
  520. }}
  521. style={{
  522. border: "none",
  523. background: "orangered",
  524. marginRight: "10px"
  525. }}
  526. >
  527. 开票记录
  528. </Button> */}
  529. {record.liquidationStatus == 2 ? (
  530. <Popconfirm
  531. title="是否结项?"
  532. onConfirm={() => {
  533. this.delectRow(record);
  534. }}
  535. okText="是"
  536. cancelText="否"
  537. >
  538. <Button
  539. type="primary"
  540. style={{
  541. marginRight: "10px",
  542. color: "#ffffff",
  543. border: "none"
  544. }}
  545. onClick={e => {
  546. e.stopPropagation();
  547. }}
  548. >
  549. 结项
  550. </Button>
  551. </Popconfirm>
  552. ) : (
  553. ""
  554. )}
  555. </div>
  556. );
  557. }
  558. }
  559. ],
  560. columnsDate: [
  561. {
  562. title: "编号",
  563. dataIndex: "id",
  564. key: "id"
  565. },
  566. {
  567. title: "订单编号",
  568. dataIndex: "orderno",
  569. key: "orderno"
  570. },
  571. {
  572. title: "开票金额(万元)",
  573. dataIndex: "amount",
  574. key: "amount"
  575. },
  576. {
  577. title: "申请时间",
  578. dataIndex: "createTime",
  579. key: "createTime"
  580. },
  581. {
  582. title: "开票状态",
  583. dataIndex: "status",
  584. key: "status",
  585. render: (text, record) => {
  586. return (
  587. <div>
  588. {record.status === 3 ? (
  589. <Button
  590. type="danger"
  591. onClick={e => {
  592. e.stopPropagation(), this.reject(record);
  593. }}
  594. >
  595. 被拒,查看原因
  596. </Button>
  597. ) : (
  598. getInvoiceStatus(text, record)
  599. )}
  600. {record.status == 3 ? (
  601. <Button
  602. type="primary"
  603. onClick={e => {
  604. e.stopPropagation(), this.recompose(record);
  605. }}
  606. style={{ marginLeft: "10px" }}
  607. >
  608. 修改开票
  609. </Button>
  610. ) : (
  611. ""
  612. )}
  613. </div>
  614. );
  615. }
  616. }
  617. ],
  618. dataSource: []
  619. };
  620. },
  621. invoiceData(record) {
  622. if (this.state.flagA) return;
  623. this.setState({
  624. flagA: true
  625. });
  626. let theorgCodeUrl = [];
  627. if (this.state.orgCodeUrl.length) {
  628. let picArr = [];
  629. this.state.orgCodeUrl.map(function (item) {
  630. if (
  631. item.response &&
  632. item.response.data &&
  633. item.response.data.length
  634. ) {
  635. picArr.push(item.response.data);
  636. }
  637. });
  638. theorgCodeUrl = picArr.join(",");
  639. }
  640. let api = "",
  641. api1 = "",
  642. method = "",
  643. fdata = {
  644. orderNo: this.state.orderNo3,
  645. type: this.state.type,
  646. status: this.state.status,
  647. approval: this.state.ordapproval,
  648. remarks: this.state.remarks,
  649. invoiceType: this.state.invoiceType,
  650. unitName: this.state.unitName,
  651. taxNumber: this.state.taxNumber,
  652. amount: parseFloat(this.state.amount),
  653. banks: this.state.banks,
  654. content: this.state.content,
  655. unitAddress: this.state.unitAddress,
  656. invoiceRemarks: this.state.invoiceRemarks,
  657. unitMobile: this.state.unitMobile,
  658. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  659. post: this.state.post,
  660. addressee: this.state.addressee,
  661. addresseeMobile: this.state.addresseeMobile,
  662. addresseeProvince:
  663. this.state.post === 0 ? this.state.ProvinceCity[0] || [] : "",
  664. addresseeCity:
  665. this.state.post === 0 ? this.state.ProvinceCity[1] || [] : "",
  666. addresseeArea:
  667. this.state.post === 0 ? this.state.ProvinceCity[2] || [] : "",
  668. recipientAddress: this.state.recipientAddress,
  669. alreadyAmount: parseFloat(this.state.alreadyAmount)
  670. },
  671. sumData = {},
  672. sumData1 = {};
  673. switch (this.state.status) {
  674. case 0:
  675. api = "/api/admin/orderInvoice/createOrderInvoice";
  676. sumData = fdata;
  677. method = "post";
  678. break;
  679. case 1:
  680. api = "/api/admin/orderInvoice/createOrderInvoice";
  681. api1 = "/api/admin/orderInvoice/updateOrderInvoice";
  682. sumData = fdata;
  683. sumData1 = {
  684. orderNo: this.state.orderNo3,
  685. type: this.state.type,
  686. status: this.state.status,
  687. approval: this.state.ordapproval,
  688. remarks: this.state.remarks,
  689. invoiceType: this.state.invoiceType,
  690. unitName: this.state.unitName,
  691. taxNumber: this.state.taxNumber,
  692. amount: parseFloat(this.state.amount),
  693. banks: this.state.banks,
  694. content: this.state.content,
  695. unitAddress: this.state.unitAddress,
  696. invoiceRemarks: this.state.invoiceRemarks,
  697. unitMobile: this.state.unitMobile,
  698. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  699. post: this.state.post,
  700. addressee: this.state.addressee,
  701. addresseeMobile: this.state.addresseeMobile,
  702. addresseeProvince:
  703. this.state.post === 0 ? this.state.ProvinceCity[0] || [] : "",
  704. addresseeCity:
  705. this.state.post === 0 ? this.state.ProvinceCity[1] || [] : "",
  706. addresseeArea:
  707. this.state.post === 0 ? this.state.ProvinceCity[2] || [] : "",
  708. recipientAddress: this.state.recipientAddress,
  709. alreadyAmount: parseFloat(this.state.alreadyAmount)
  710. };
  711. sumData1.id = this.state.id;
  712. method = "post";
  713. break;
  714. case 3:
  715. api = "/api/admin/orderInvoice/selectByIdOrderInvoice";
  716. sumData.id = record.id;
  717. method = "get";
  718. break;
  719. default:
  720. api = "";
  721. break;
  722. }
  723. if (this.state.status === 1 || this.state.status === 0) {
  724. if (typeof this.state.type !== "number") {
  725. message.warning("省内/外不能为空");
  726. this.setState({
  727. flagA: false
  728. });
  729. return;
  730. }
  731. if (typeof this.state.invoiceType !== "number") {
  732. message.warning("发票类型不能为空");
  733. this.setState({
  734. flagA: false
  735. });
  736. return;
  737. }
  738. if (typeof theorgCodeUrl !== "string") {
  739. message.warning("未上传图片");
  740. this.setState({
  741. flagA: false
  742. });
  743. return;
  744. }
  745. if (!this.state.unitName) {
  746. message.warning("单位名称不能为空");
  747. this.setState({
  748. flagA: false
  749. });
  750. return;
  751. }
  752. if (!this.state.taxNumber) {
  753. message.warning("税号不能为空");
  754. this.setState({
  755. flagA: false
  756. });
  757. return;
  758. }
  759. if (!this.state.amount) {
  760. message.warning("金额不能为空");
  761. this.setState({
  762. flagA: false
  763. });
  764. return;
  765. }
  766. if (isNaN(this.state.amount)) {
  767. message.warning("开票金额包含非法字符,请重新输入");
  768. this.setState({
  769. flagA: false
  770. });
  771. return;
  772. }
  773. if (isNaN(this.state.alreadyAmount)) {
  774. message.warning("开票金额总计包含非法字符,请重新输入");
  775. this.setState({
  776. flagA: false
  777. });
  778. return;
  779. }
  780. if (parseFloat(this.state.alreadyAmount) < 0) {
  781. message.warning("开票金额总计不能小于0,请重新输入");
  782. this.setState({
  783. flagA: false
  784. });
  785. return;
  786. }
  787. if (!this.state.banks) {
  788. message.warning("开户行不能为空");
  789. this.setState({
  790. flagA: false
  791. });
  792. return;
  793. }
  794. if (!this.state.content) {
  795. message.warning("开票内容及说明不能为空");
  796. this.setState({
  797. flagA: false
  798. });
  799. return;
  800. }
  801. if (!this.state.unitAddress) {
  802. message.warning("单位地址不能为空");
  803. this.setState({
  804. flagA: false
  805. });
  806. return;
  807. }
  808. if (!this.state.unitMobile) {
  809. message.warning("单位电话不能为空");
  810. this.setState({
  811. flagA: false
  812. });
  813. return;
  814. }
  815. if (this.state.alreadyAmount === "") {
  816. message.warning("开票金额总计不能为空");
  817. this.setState({
  818. flagA: false
  819. });
  820. return;
  821. }
  822. }
  823. // console.log(this.state.flag,this.state.status)
  824. this.setState({
  825. loading: true
  826. });
  827. $.ajax({
  828. method: method,
  829. dataType: "json",
  830. crossDomain: false,
  831. url: globalConfig.context + (this.state.flag ? api1 : api),
  832. data: this.state.flag ? sumData1 : sumData,
  833. success: function (data) {
  834. if (this.state.status === 3 && typeof data.data === "object") {
  835. let thisdata = data.data;
  836. let ProvinceCityArr = [];
  837. let ProvinceS = thisdata.addresseeProvince; //省
  838. let citys = thisdata.addresseeCity; //市
  839. let Areas = thisdata.addresseeArea; //区
  840. ProvinceCityArr.push(ProvinceS, citys, Areas);
  841. this.setState({
  842. orderNo: thisdata.orderNo,
  843. type: thisdata.type,
  844. status: thisdata.status,
  845. ordapproval: thisdata.approval,
  846. remarks: thisdata.remarks,
  847. invoiceType: thisdata.invoiceType,
  848. unitName: thisdata.unitName,
  849. taxNumber: thisdata.taxNumber,
  850. amount: thisdata.amount + "",
  851. banks: thisdata.banks,
  852. content: thisdata.content,
  853. unitAddress: thisdata.unitAddress,
  854. invoiceRemarks: thisdata.invoiceRemarks,
  855. unitMobile: thisdata.unitMobile,
  856. post: thisdata.post,
  857. addressee: thisdata.addressee,
  858. addresseeMobile: thisdata.addresseeMobile,
  859. addresseeProvince: thisdata.addresseeProvince,
  860. addresseeCity: thisdata.addresseeCity,
  861. addresseeArea: thisdata.addresseeArea,
  862. alreadyAmount: thisdata.alreadyAmount + "",
  863. ProvinceCity:
  864. ProvinceCityArr[0] != null ? ProvinceCityArr : undefined, //省市区
  865. recipientAddress: thisdata.recipientAddress,
  866. orgCodeUrl: thisdata.voucherUrl
  867. ? splitUrl(
  868. thisdata.voucherUrl,
  869. ",",
  870. globalConfig.avatarHost + "/upload"
  871. )
  872. : []
  873. });
  874. }
  875. }.bind(this)
  876. }).done(
  877. function (data) {
  878. this.setState({
  879. loading: false
  880. });
  881. if (!data.error.length) {
  882. if (this.state.status === 1) {
  883. message.success("提交成功!");
  884. this.visitCancels();
  885. if (this.state.flag) {
  886. this.inRecordData();
  887. }
  888. this.setState({
  889. flagA: false
  890. });
  891. } else if (this.state.status === 0) {
  892. message.success("保存成功!");
  893. this.visitCancels();
  894. this.setState({
  895. flagA: false
  896. });
  897. } else if (this.state.status === 3) {
  898. this.setState({
  899. flag: true,
  900. flagA: false
  901. });
  902. }
  903. } else {
  904. message.warning(data.error[0].message);
  905. this.setState({
  906. flagA: false
  907. });
  908. }
  909. }.bind(this)
  910. );
  911. },
  912. areset() {
  913. this.setState({
  914. remarks: "",
  915. type: undefined,
  916. orgCodeUrl: "",
  917. invoiceType: undefined,
  918. 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 });
  1474. console.log(selectedRowKeys);
  1475. },
  1476. // inRecordData() {
  1477. // this.setState({
  1478. // loading: true
  1479. // });
  1480. // $.ajax({
  1481. // method: "get",
  1482. // dataType: "json",
  1483. // crossDomain: false,
  1484. // url:
  1485. // globalConfig.context +
  1486. // "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1487. // data: {
  1488. // orderNo: this.state.selectedRowKeys[0],
  1489. // pageSize: 9999
  1490. // },
  1491. // success: function(data) {
  1492. // let theArr = [];
  1493. // let sum = 0;
  1494. // if (!data.data) {
  1495. // if (data.error && data.error.length) {
  1496. // message.warning(data.error[0].message);
  1497. // }
  1498. // } else {
  1499. // for (let i = 0; i < data.data.list.length; i++) {
  1500. // let thisdata = data.data.list[i];
  1501. // sum += parseFloat(thisdata.amount);
  1502. // theArr.push({
  1503. // id: thisdata.id,
  1504. // orderno: thisdata.orderno, //订单编号
  1505. // amount: thisdata.amount, //签单金额
  1506. // createTime: thisdata.createTime, //流程状态
  1507. // status: thisdata.status, //结算状态
  1508. // rejectReason: thisdata.rejectReason
  1509. // });
  1510. // }
  1511. // }
  1512. // this.setState({
  1513. // recordData: theArr,
  1514. // sum: sum.toFixed(4)
  1515. // });
  1516. // }.bind(this)
  1517. // }).done(
  1518. // function() {
  1519. // this.setState({
  1520. // loading: false
  1521. // });
  1522. // }.bind(this)
  1523. // );
  1524. // },
  1525. cuiData() {
  1526. this.setState({
  1527. loading: true
  1528. });
  1529. $.ajax({
  1530. method: "get",
  1531. dataType: "json",
  1532. crossDomain: false,
  1533. url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
  1534. data: {
  1535. orderNo: this.state.selectedRowKeys[0],
  1536. pageSize: 9999
  1537. },
  1538. success: function (data) {
  1539. let theArr = [];
  1540. if (!data.data || !data.data.list) {
  1541. if (data.error && data.error.length) {
  1542. message.warning(data.error[0].message);
  1543. }
  1544. } else {
  1545. for (let i = 0; i < data.data.list.length; i++) {
  1546. let thisdata = data.data.list[i];
  1547. theArr.push({
  1548. key: i + 1,
  1549. orderNo: thisdata.orderNo,
  1550. contractNo: thisdata.contractNo,
  1551. userName: thisdata.userName,
  1552. buyerName: thisdata.buyerName,
  1553. departmentName: thisdata.departmentName,
  1554. salesmanName: thisdata.salesmanName,
  1555. depName: thisdata.depName,
  1556. orderStatus: thisdata.orderStatus,
  1557. projectStatus: thisdata.projectStatus,
  1558. totalAmount: thisdata.totalAmount,
  1559. liquidationStatus: thisdata.liquidationStatus,
  1560. settlementAmount: thisdata.settlementAmount,
  1561. accountsReceivable: thisdata.accountsReceivable,
  1562. dunSubject: thisdata.dunSubject,
  1563. startDate: thisdata.startDate,
  1564. taskStatus: thisdata.taskStatus,
  1565. cname: thisdata.cname,
  1566. id: thisdata.id,
  1567. taskName: thisdata.taskName,
  1568. hours: thisdata.hours,
  1569. taskDistributionTime: thisdata.taskDistributionTime,
  1570. taskEndTime: thisdata.taskEndTime,
  1571. dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发"
  1572. });
  1573. }
  1574. }
  1575. this.setState({
  1576. cuiDataList: theArr
  1577. });
  1578. }.bind(this)
  1579. }).always(
  1580. function () {
  1581. this.setState({
  1582. loading: false
  1583. });
  1584. }.bind(this)
  1585. );
  1586. },
  1587. proData() {
  1588. this.setState({
  1589. loading: true
  1590. });
  1591. $.ajax({
  1592. method: "get",
  1593. dataType: "json",
  1594. crossDomain: false,
  1595. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1596. data: {
  1597. orderNo: this.state.selectedRowKeys[0],
  1598. pageSize: 9999
  1599. },
  1600. success: function (data) {
  1601. let theArr = [];
  1602. let totalWaibao = 0;
  1603. if (!data.data) {
  1604. if (data.error && data.error.length) {
  1605. message.warning(data.error[0].message);
  1606. }
  1607. } else {
  1608. for (let i = 0; i < data.data.length; i++) {
  1609. let thisdata = data.data[i];
  1610. totalWaibao += thisdata.outsourcePrice;
  1611. theArr.push({
  1612. key: i + 1,
  1613. id: thisdata.id,
  1614. orderNo: thisdata.orderNo,
  1615. contractNo: thisdata.contractNo,
  1616. userName: thisdata.userName,
  1617. buyerName: thisdata.buyerName,
  1618. departmentName: thisdata.departmentName,
  1619. salesmanName: thisdata.salesmanName,
  1620. depName: thisdata.depName,
  1621. orderStatus: thisdata.orderStatus,
  1622. projectStatus: thisdata.projectStatus,
  1623. commodityName: thisdata.commodityName,
  1624. totalAmount: thisdata.totalAmount,
  1625. liquidationStatus: thisdata.liquidationStatus,
  1626. settlementAmount: thisdata.settlementAmount,
  1627. accountsReceivable: thisdata.accountsReceivable,
  1628. dunSubject: thisdata.dunSubject,
  1629. startDate: thisdata.startDate,
  1630. taskStatus: thisdata.taskStatus,
  1631. cname: thisdata.cname,
  1632. taskName: thisdata.taskName,
  1633. hours: thisdata.hours,
  1634. taskDistributionTime: thisdata.taskDistributionTime,
  1635. taskEndTime: thisdata.taskEndTime,
  1636. commodityQuantity: thisdata.commodityQuantity,
  1637. commodityPrice: thisdata.commodityPrice,
  1638. certificateNumber: thisdata.certificateNumber,
  1639. taskComment: thisdata.taskComment,
  1640. outsourceName: thisdata.outsourceName,
  1641. outsourcePrice: thisdata.outsourcePrice,
  1642. splitStatus: thisdata.splitStatus
  1643. });
  1644. }
  1645. }
  1646. totalWaibao = (Math.round(totalWaibao * 1000000) / 1000000).toFixed(6);
  1647. this.setState({
  1648. proDataList: theArr,
  1649. totalWaibao
  1650. });
  1651. }.bind(this)
  1652. }).always(
  1653. function () {
  1654. this.setState({
  1655. loading: false
  1656. });
  1657. }.bind(this)
  1658. );
  1659. },
  1660. tableRowClickPro(record) {
  1661. this.setState({
  1662. pvisible: true,
  1663. record
  1664. });
  1665. },
  1666. render() {
  1667. const FormItem = Form.Item;
  1668. const formItemLayout = {
  1669. labelCol: { span: 8 },
  1670. wrapperCol: { span: 14 }
  1671. };
  1672. const RadioGroup = Radio.Group;
  1673. var departmentArr = this.state.departmentArr || [];
  1674. const { RangePicker } = DatePicker;
  1675. const { loading, selectedRowKeys, visible } = this.state;
  1676. const rowSelection = {
  1677. selectedRowKeys,
  1678. onChange: this.onSelectChange,
  1679. hideDefaultSelections: true,
  1680. type: "radio"
  1681. };
  1682. return (
  1683. <div className="user-content">
  1684. <ShowModalDiv ShowModal={this.state.showModal} />
  1685. <div className="content-title">
  1686. <span
  1687. style={{
  1688. fontWeight: 900,
  1689. fontSize: 16,
  1690. display: "block",
  1691. marginBottom: 10
  1692. }}
  1693. >
  1694. 开单与签单
  1695. </span>
  1696. <Tabs
  1697. defaultActiveKey="2"
  1698. onChange={this.callback}
  1699. className="test"
  1700. >
  1701. <TabPane tab="更改表格显示数据" key="1">
  1702. <div style={{ marginLeft: 10 }}>
  1703. <ChooseList
  1704. columns={this.state.columns}
  1705. changeFn={this.changeList}
  1706. changeList={this.state.changeList}
  1707. top={55}
  1708. margin={11}
  1709. />
  1710. </div>
  1711. </TabPane>
  1712. <TabPane tab="搜索" key="2">
  1713. <div className="user-search" style={{ marginLeft: 10 }}>
  1714. <Input
  1715. placeholder="订单编号"
  1716. style={{ width: "150px" }}
  1717. value={this.state.searchOrderNo}
  1718. onChange={e => {
  1719. this.setState({ searchOrderNo: e.target.value });
  1720. }}
  1721. />
  1722. <Input
  1723. placeholder="客户名称"
  1724. style={{ width: "150px" }}
  1725. value={this.state.customerName}
  1726. onChange={e => {
  1727. this.setState({ customerName: e.target.value });
  1728. }}
  1729. />
  1730. <Select
  1731. placeholder="订单部门"
  1732. style={{ width: 150, marginRight: 10 }}
  1733. value={this.state.departmenttList}
  1734. onChange={e => {
  1735. this.setState({ departmenttList: e });
  1736. }}
  1737. >
  1738. {departmentArr.map(function (item) {
  1739. return <Option key={item.id}>{item.name}</Option>;
  1740. })}
  1741. </Select>
  1742. <Input
  1743. placeholder="合同编号"
  1744. style={{ width: "150px" }}
  1745. value={this.state.contractNoSearch}
  1746. onChange={e => {
  1747. this.setState({
  1748. contractNoSearch: e.target.value
  1749. });
  1750. }}
  1751. />
  1752. <Select
  1753. style={{ width: 120 }}
  1754. placeholder="结算状态"
  1755. value={this.state.liquidationStatusSearch}
  1756. onChange={e => {
  1757. this.setState({
  1758. liquidationStatusSearch: e
  1759. });
  1760. }}
  1761. >
  1762. <Option value="0">首付待付请</Option>
  1763. <Option value="1">尾款待付清</Option>
  1764. <Option value="2">已付清</Option>
  1765. </Select>
  1766. <Select
  1767. style={{ width: 120 }}
  1768. placeholder="特批状态"
  1769. value={this.state.approvalSearch}
  1770. onChange={e => {
  1771. this.setState({
  1772. approvalSearch: e
  1773. });
  1774. }}
  1775. >
  1776. <Option value="0">非特批</Option>
  1777. <Option value="1">特批</Option>
  1778. </Select>
  1779. <Select
  1780. style={{ width: 120 }}
  1781. placeholder="签单金额"
  1782. value={this.state.amountStatus}
  1783. onChange={e => {
  1784. this.setState({
  1785. amountStatus: e
  1786. });
  1787. }}
  1788. >
  1789. <Option value="0">10万元以下</Option>
  1790. <Option value="1">10~20万元</Option>
  1791. <Option value="2">20~30万元</Option>
  1792. <Option value="3">30~40万元</Option>
  1793. <Option value="4">40万元以上</Option>
  1794. </Select>
  1795. <span style={{ marginRight: "10px" }}>下单时间 :</span>
  1796. <RangePicker
  1797. style={{ width:200 }}
  1798. value={[
  1799. this.state.releaseDate[0]
  1800. ? moment(this.state.releaseDate[0])
  1801. : null,
  1802. this.state.releaseDate[1]
  1803. ? moment(this.state.releaseDate[1])
  1804. : null
  1805. ]}
  1806. onChange={(data, dataString) => {
  1807. this.setState({ releaseDate: dataString });
  1808. }}
  1809. />
  1810. <Button
  1811. type="primary"
  1812. onClick={this.search}
  1813. style={{ marginLeft: "10px" }}
  1814. >
  1815. 搜索
  1816. <Icon type="search" />
  1817. </Button>
  1818. <Button onClick={this.reset}>
  1819. 重置 <Icon type="reload" />
  1820. </Button>
  1821. <Button
  1822. type="primary"
  1823. className="addButton"
  1824. onClick={this.addClick}
  1825. >
  1826. 开单
  1827. <Icon type="plus" />
  1828. </Button>
  1829. </div>
  1830. </TabPane>
  1831. <TabPane tab="查看" key="3">
  1832. <Button
  1833. type="primary"
  1834. style={{ margin: "11px 0px 10px 10px" }}
  1835. onClick={() => {
  1836. this.inRecord();
  1837. this.setState({
  1838. bvisible: true
  1839. });
  1840. }}
  1841. disabled={this.state.selectedRowKeys.length != 1}
  1842. >
  1843. 查看开票记录
  1844. </Button>
  1845. <Button
  1846. type="primary"
  1847. style={{ margin: "11px 0px 10px 10px" }}
  1848. onClick={() => {
  1849. this.cuiData();
  1850. this.setState({
  1851. cuiVisible: true
  1852. });
  1853. }}
  1854. disabled={this.state.selectedRowKeys.length != 1}
  1855. >
  1856. 查看催款详情
  1857. </Button>
  1858. <Button
  1859. type="primary"
  1860. style={{ margin: "11px 0px 10px 10px" }}
  1861. onClick={() => {
  1862. this.proData();
  1863. this.setState({
  1864. proVisible: true
  1865. });
  1866. }}
  1867. disabled={this.state.selectedRowKeys.length != 1}
  1868. >
  1869. 查看项目进度
  1870. </Button>
  1871. </TabPane>
  1872. </Tabs>
  1873. <div className="patent-table">
  1874. <Spin spinning={this.state.loading}>
  1875. <Table
  1876. columns={
  1877. this.state.changeList == undefined
  1878. ? this.state.columns
  1879. : this.state.changeList
  1880. }
  1881. dataSource={this.state.dataSource}
  1882. scroll={{ x: 1500, y: 0 }}
  1883. pagination={this.state.pagination}
  1884. rowSelection={rowSelection}
  1885. onRowClick={this.tableRowClick}
  1886. bordered
  1887. size="small"
  1888. />
  1889. </Spin>
  1890. </div>
  1891. <NewService
  1892. uid={this.state.uid}
  1893. signBillVisible={this.state.signBillVisible}
  1894. signBillState={this.state.signBillState}
  1895. operation={this.operation}
  1896. admissibleOrder={this.admissibleOrder}
  1897. userDetaile={this.state.userDetaile}
  1898. datauser={this.state.datauser}
  1899. showDesc={this.state.showDesc}
  1900. closeDesc={this.closeDesc}
  1901. />
  1902. <Modal
  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>
  2416. <Modal
  2417. visible={this.state.bvisible}
  2418. footer=""
  2419. title="开票历史记录"
  2420. className="admin-desc-content"
  2421. width="900px"
  2422. onCancel={e => {
  2423. this.setState({
  2424. bvisible: false
  2425. });
  2426. }}
  2427. style={{ zIndex: 5 }}
  2428. >
  2429. <Spin spinning={this.state.loading}>
  2430. <div className="patent-table">
  2431. <Table
  2432. columns={this.state.columnsDate}
  2433. onRowClick={this.dtableRowClick}
  2434. dataSource={this.state.recordData}
  2435. pagination={false}
  2436. />
  2437. <div className="clearfix" style={{ marginTop: "20px" }}>
  2438. <FormItem
  2439. className="half-item"
  2440. {...formItemLayout}
  2441. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  2442. >
  2443. <span>{this.state.sum + "(万元)"}</span>
  2444. </FormItem>
  2445. </div>
  2446. </div>
  2447. </Spin>
  2448. </Modal>
  2449. <Modal
  2450. visible={this.state.visibleR}
  2451. className="admin-desc-content"
  2452. footer=""
  2453. title="拒绝理由"
  2454. width="400px"
  2455. onCancel={this.rejectCancels}
  2456. >
  2457. <Input.TextArea
  2458. disabled={true}
  2459. rows={4}
  2460. value={this.state.reason}
  2461. style={{ color: "black" }}
  2462. ></Input.TextArea>
  2463. </Modal>
  2464. <Modal
  2465. className="admin-desc-content"
  2466. footer=""
  2467. title="开具发票申请单"
  2468. width="1000px"
  2469. visible={this.state.cvisible}
  2470. onOk={this.visitOks}
  2471. onCancel={this.visitCancels}
  2472. style={{ zIndex: 999 }}
  2473. >
  2474. <Form
  2475. layout="horizontal"
  2476. // id="demand-form"
  2477. style={{ paddingBottom: "40px" }}
  2478. >
  2479. <Spin spinning={this.state.loading}>
  2480. <div className="clearfix">
  2481. <div className="clearfix">
  2482. <FormItem
  2483. className="half-item"
  2484. {...formItemLayout}
  2485. label="合同编号"
  2486. >
  2487. <span>{this.state.contractNo}</span>
  2488. </FormItem>
  2489. <FormItem
  2490. className="half-item"
  2491. {...formItemLayout}
  2492. label="备注"
  2493. >
  2494. {
  2495. <Input
  2496. placeholder="填写申请发票原因"
  2497. value={this.state.remarks}
  2498. onChange={e => {
  2499. this.setState({ remarks: e.target.value });
  2500. }}
  2501. style={{ width: "240px" }}
  2502. />
  2503. }
  2504. </FormItem>
  2505. </div>
  2506. <div className="clearfix">
  2507. <FormItem
  2508. className="half-item"
  2509. {...formItemLayout}
  2510. label="省内/外:"
  2511. >
  2512. <RadioGroup
  2513. value={this.state.type}
  2514. onChange={e => {
  2515. this.setState({ type: e.target.value });
  2516. }}
  2517. >
  2518. <Radio value={0}>省内</Radio>
  2519. <Radio value={1}>省外</Radio>
  2520. </RadioGroup>
  2521. <span
  2522. style={{
  2523. position: "absolute",
  2524. color: "red",
  2525. fontSize: "10px",
  2526. lineHeight: "20px"
  2527. }}
  2528. >
  2529. 省内:湖南省<br></br>省外:除湖南省以外
  2530. </span>
  2531. </FormItem>
  2532. <FormItem
  2533. className="half-item"
  2534. {...formItemLayout}
  2535. label="特批:"
  2536. >
  2537. <RadioGroup
  2538. value={!this.state.ordapproval ? 0 : 1}
  2539. onChange={e => {
  2540. this.setState({ ordapproval: e.target.value });
  2541. }}
  2542. >
  2543. <Radio value={0}>否</Radio>
  2544. <Radio value={1}>是</Radio>
  2545. </RadioGroup>
  2546. <span
  2547. style={{
  2548. position: "absolute",
  2549. color: "red",
  2550. fontSize: "10px",
  2551. lineHeight: "15px"
  2552. }}
  2553. >
  2554. 注:特批单,省内省外,<br></br>分别由周总,省外总经理
  2555. <br></br>特批后,方可至开票流程
  2556. </span>
  2557. </FormItem>
  2558. </div>
  2559. <hr
  2560. style={{
  2561. border: "1px dashed #aaa",
  2562. width: "90%",
  2563. margin: "auto"
  2564. }}
  2565. />
  2566. <div style={{ marginTop: "13px", marginLeft: "16px" }}>
  2567. <span style={{ fontSize: "14px" }}>发票内容</span>
  2568. </div>
  2569. <div className="clearfix">
  2570. <FormItem
  2571. className="half-item"
  2572. {...formItemLayout}
  2573. label={
  2574. <span>
  2575. <strong style={{ color: "#f00" }}>*</strong>
  2576. 发票类型
  2577. </span>
  2578. }
  2579. >
  2580. <RadioGroup
  2581. style={{ width: "160%" }}
  2582. onChange={e => {
  2583. this.setState({ invoiceType: e.target.value });
  2584. }}
  2585. value={this.state.invoiceType}
  2586. >
  2587. <Radio value={0}>增值税专用发票</Radio>
  2588. <Radio value={1}>增值税普通发票</Radio>
  2589. <Radio value={2}>其他</Radio>
  2590. </RadioGroup>
  2591. </FormItem>
  2592. </div>
  2593. <div className="clearfix">
  2594. <FormItem
  2595. className="half-item"
  2596. {...formItemLayout}
  2597. label={
  2598. <span>
  2599. <strong style={{ color: "#f00" }}>*</strong>
  2600. 单位名称
  2601. </span>
  2602. }
  2603. >
  2604. {
  2605. <Input
  2606. placeholder="请输入单位名称"
  2607. value={this.state.unitName}
  2608. onChange={e => {
  2609. this.setState({ unitName: e.target.value });
  2610. }}
  2611. style={{ width: "240px" }}
  2612. />
  2613. }
  2614. <span
  2615. style={{
  2616. position: "absolute",
  2617. color: "red",
  2618. fontSize: "10px",
  2619. lineHeight: "15px",
  2620. width: "30%"
  2621. }}
  2622. >
  2623. 系统读取单位<br></br>名称,可修改
  2624. </span>
  2625. </FormItem>
  2626. <FormItem
  2627. className="half-item"
  2628. {...formItemLayout}
  2629. label={
  2630. <span>
  2631. <strong style={{ color: "#f00" }}>*</strong>税号
  2632. </span>
  2633. }
  2634. >
  2635. {
  2636. <Input
  2637. placeholder="请输入税号"
  2638. value={this.state.taxNumber}
  2639. onChange={e => {
  2640. this.setState({ taxNumber: e.target.value });
  2641. }}
  2642. style={{ width: "240px" }}
  2643. />
  2644. }
  2645. </FormItem>
  2646. <FormItem
  2647. className="half-item"
  2648. {...formItemLayout}
  2649. label={
  2650. <span>
  2651. <strong style={{ color: "#f00" }}>*</strong>
  2652. 开票金额(万元)
  2653. </span>
  2654. }
  2655. >
  2656. {
  2657. <Input
  2658. placeholder="请输入开票金额"
  2659. value={this.state.amount}
  2660. onChange={e => {
  2661. this.setState({ amount: e.target.value });
  2662. }}
  2663. style={{ width: "240px" }}
  2664. />
  2665. }
  2666. <span
  2667. style={{
  2668. position: "absolute",
  2669. color: "red",
  2670. fontSize: "10px",
  2671. lineHeight: "15px",
  2672. width: "30%"
  2673. }}
  2674. >
  2675. 填写本次开票<br></br>金额
  2676. </span>
  2677. </FormItem>
  2678. <FormItem
  2679. className="half-item"
  2680. {...formItemLayout}
  2681. label={
  2682. <span>
  2683. <strong style={{ color: "#f00" }}>*</strong>
  2684. 开户行及银行账号
  2685. </span>
  2686. }
  2687. >
  2688. {
  2689. <Input
  2690. placeholder="请输入开户行及银行账号"
  2691. value={this.state.banks}
  2692. onChange={e => {
  2693. this.setState({ banks: e.target.value });
  2694. }}
  2695. style={{ width: "240px" }}
  2696. />
  2697. }
  2698. </FormItem>
  2699. <FormItem
  2700. className="half-item"
  2701. {...formItemLayout}
  2702. label={
  2703. <span>
  2704. <strong style={{ color: "#f00" }}>*</strong>
  2705. 开票内容及说明
  2706. </span>
  2707. }
  2708. >
  2709. {
  2710. <Input
  2711. placeholder="请输入开票内容及说明"
  2712. value={this.state.content}
  2713. onChange={e => {
  2714. this.setState({ content: e.target.value });
  2715. }}
  2716. style={{ width: "240px" }}
  2717. />
  2718. }
  2719. </FormItem>
  2720. <FormItem
  2721. className="half-item"
  2722. {...formItemLayout}
  2723. label={
  2724. <span>
  2725. <strong style={{ color: "#f00" }}>*</strong>
  2726. 单位地址
  2727. </span>
  2728. }
  2729. >
  2730. {
  2731. <Input
  2732. placeholder="请输入单位地址"
  2733. value={this.state.unitAddress}
  2734. onChange={e => {
  2735. this.setState({ unitAddress: e.target.value });
  2736. }}
  2737. style={{ width: "240px" }}
  2738. />
  2739. }
  2740. </FormItem>
  2741. <FormItem
  2742. className="half-item"
  2743. {...formItemLayout}
  2744. label="备注"
  2745. >
  2746. {
  2747. <Input
  2748. placeholder="请备注开票公司名称"
  2749. value={this.state.invoiceRemarks}
  2750. onChange={e => {
  2751. this.setState({
  2752. invoiceRemarks: e.target.value
  2753. });
  2754. }}
  2755. style={{ width: "240px" }}
  2756. />
  2757. }
  2758. <span
  2759. style={{
  2760. position: "absolute",
  2761. color: "red",
  2762. fontSize: "10px",
  2763. lineHeight: "15px",
  2764. width: "30%"
  2765. }}
  2766. >
  2767. 开票公司名称,<br></br>如:科德集团
  2768. </span>
  2769. </FormItem>
  2770. <FormItem
  2771. className="half-item"
  2772. {...formItemLayout}
  2773. label={
  2774. <span>
  2775. <strong style={{ color: "#f00" }}>*</strong>
  2776. 单位电话
  2777. </span>
  2778. }
  2779. >
  2780. {
  2781. <Input
  2782. placeholder="请输入单位电话"
  2783. value={this.state.unitMobile}
  2784. onChange={e => {
  2785. this.setState({ unitMobile: e.target.value });
  2786. }}
  2787. style={{ width: "240px" }}
  2788. />
  2789. }
  2790. </FormItem>
  2791. </div>
  2792. <div className="clearfix">
  2793. <FormItem
  2794. labelCol={{ span: 4 }}
  2795. wrapperCol={{ span: 18 }}
  2796. label={
  2797. <span>
  2798. <strong style={{ color: "#f00" }}>*</strong>
  2799. 上传附件
  2800. </span>
  2801. }
  2802. >
  2803. <PicturesWall
  2804. domId={'billing2'}
  2805. fileList={this.getOrgCodeUrl}
  2806. pictureUrl={this.state.orgCodeUrl}
  2807. />
  2808. <span
  2809. style={{
  2810. paddingTop: "10px",
  2811. paddingLeft: "10px",
  2812. color: "red",
  2813. fontSize: "14px"
  2814. }}
  2815. >
  2816. 注:请上传带"公司盖章"的开票申请纸质凭证
  2817. </span>
  2818. <p>图片建议:要清晰。</p>
  2819. </FormItem>
  2820. </div>
  2821. <hr
  2822. style={{
  2823. border: "1px dashed #aaa",
  2824. width: "90%",
  2825. margin: "auto"
  2826. }}
  2827. />
  2828. <div className="clearfix" style={{ marginTop: "10px" }}>
  2829. <FormItem
  2830. className="half-item"
  2831. {...formItemLayout}
  2832. label="发票是否邮寄:"
  2833. >
  2834. <RadioGroup
  2835. value={this.state.post}
  2836. onChange={e => {
  2837. this.setState({ post: e.target.value });
  2838. }}
  2839. >
  2840. <Radio value={0}>是</Radio>
  2841. <Radio value={1}>否</Radio>
  2842. </RadioGroup>
  2843. </FormItem>
  2844. </div>
  2845. {this.state.post === 0 ? (
  2846. <div className="clearfix">
  2847. <FormItem
  2848. className="half-item"
  2849. {...formItemLayout}
  2850. label="收信人姓名"
  2851. >
  2852. {
  2853. <Input
  2854. placeholder="请输入收信人姓名"
  2855. value={this.state.addressee}
  2856. onChange={e => {
  2857. this.setState({ addressee: e.target.value });
  2858. }}
  2859. style={{ width: "240px" }}
  2860. />
  2861. }
  2862. </FormItem>
  2863. <FormItem
  2864. className="half-item"
  2865. {...formItemLayout}
  2866. label="电话"
  2867. >
  2868. {
  2869. <Input
  2870. placeholder="请输入电话"
  2871. value={this.state.addresseeMobile}
  2872. onChange={e => {
  2873. this.setState({
  2874. addresseeMobile: e.target.value
  2875. });
  2876. }}
  2877. style={{ width: "240px" }}
  2878. />
  2879. }
  2880. </FormItem>
  2881. </div>
  2882. ) : (
  2883. ""
  2884. )}
  2885. {this.state.post === 0 ? (
  2886. <div className="clearfix">
  2887. <FormItem
  2888. className="half-item"
  2889. {...formItemLayout}
  2890. label="省-市-区"
  2891. >
  2892. <Cascader
  2893. options={areaSelect()}
  2894. value={this.state.ProvinceCity}
  2895. placeholder="选择城市"
  2896. style={{ width: "95%" }}
  2897. onChange={e => {
  2898. this.setState({ ProvinceCity: e });
  2899. }}
  2900. />
  2901. </FormItem>
  2902. </div>
  2903. ) : (
  2904. ""
  2905. )}
  2906. {this.state.post === 0 ? (
  2907. <div className="clearfix">
  2908. <FormItem
  2909. className="half-item"
  2910. {...formItemLayout}
  2911. label="详细地址"
  2912. >
  2913. {
  2914. <Input
  2915. placeholder="请输入详细地址"
  2916. value={this.state.recipientAddress}
  2917. onChange={e => {
  2918. this.setState({
  2919. recipientAddress: e.target.value
  2920. });
  2921. }}
  2922. style={{ width: "240px" }}
  2923. />
  2924. }
  2925. </FormItem>
  2926. </div>
  2927. ) : (
  2928. ""
  2929. )}
  2930. <FormItem
  2931. className="half-item"
  2932. {...formItemLayout}
  2933. label={
  2934. <span>
  2935. <strong style={{ color: "#f00" }}>*</strong>
  2936. 开票金额总计
  2937. </span>
  2938. }
  2939. >
  2940. {
  2941. <Input
  2942. value={this.state.alreadyAmount}
  2943. onChange={e => {
  2944. this.setState({ alreadyAmount: e.target.value });
  2945. }}
  2946. style={{ width: "40px" }}
  2947. />
  2948. }
  2949. 万元
  2950. <span
  2951. style={{
  2952. position: "absolute",
  2953. color: "red",
  2954. fontSize: "10px",
  2955. lineHeight: "15px",
  2956. marginLeft: "20px"
  2957. }}
  2958. >
  2959. 默认值为0.新开票订单此项不用填.<br></br>
  2960. 以前已开票订单,请填写已开票的总计<br></br>
  2961. 金额,便于审核核对!
  2962. </span>
  2963. </FormItem>
  2964. </div>
  2965. <Button
  2966. className="cancel"
  2967. type="primary"
  2968. style={{ marginRight: "50px", float: "right" }}
  2969. size="large"
  2970. onClick={this.submitApp}
  2971. >
  2972. 提交申请
  2973. </Button>
  2974. {/*<Button className="cancel" type="primary" style={{marginRight:"50px",float:'right',background:'deepskyblue',border:'none'}} size="large" onClick={this.saveApp}>保存</Button>*/}
  2975. </Spin>
  2976. </Form>
  2977. </Modal>
  2978. <Modal
  2979. className="admin-desc-content"
  2980. footer=""
  2981. title="开具发票申请单"
  2982. width="900px"
  2983. visible={this.state.dvisible}
  2984. onOk={this.visitOks}
  2985. onCancel={this.dvisitCancels}
  2986. >
  2987. <Form
  2988. layout="horizontal"
  2989. // id="demand-form"
  2990. style={{ paddingBottom: "40px" }}
  2991. >
  2992. <Spin spinning={this.state.loading}>
  2993. <div className="clearfix">
  2994. <div className="clearfix">
  2995. <FormItem
  2996. className="half-item"
  2997. {...formItemLayout}
  2998. label="合同编号"
  2999. >
  3000. <span>{this.state.contractNo}</span>
  3001. </FormItem>
  3002. <FormItem
  3003. className="half-item"
  3004. {...formItemLayout}
  3005. label="备注"
  3006. >
  3007. <span>{this.state.remarks}</span>
  3008. </FormItem>
  3009. </div>
  3010. <div className="clearfix">
  3011. <FormItem
  3012. className="half-item"
  3013. {...formItemLayout}
  3014. label={
  3015. <span>
  3016. <strong style={{ color: "#f00" }}>*</strong>
  3017. 省内/外
  3018. </span>
  3019. }
  3020. >
  3021. <span>{getProvinceA(this.state.type)}</span>
  3022. </FormItem>
  3023. <FormItem
  3024. className="half-item"
  3025. {...formItemLayout}
  3026. label={
  3027. <span>
  3028. <strong style={{ color: "#f00" }}>*</strong>特批
  3029. </span>
  3030. }
  3031. >
  3032. <span>
  3033. {this.state.ordapproval === 0 ? "否" : "是"}
  3034. </span>
  3035. </FormItem>
  3036. </div>
  3037. <hr
  3038. style={{
  3039. border: "1px dashed #aaa",
  3040. width: "90%",
  3041. margin: "auto"
  3042. }}
  3043. />
  3044. <div style={{ marginTop: "13px", marginLeft: "16px" }}>
  3045. <span style={{ fontSize: "14px" }}>发票内容</span>
  3046. </div>
  3047. <div className="clearfix">
  3048. <FormItem
  3049. className="half-item"
  3050. {...formItemLayout}
  3051. label={
  3052. <span>
  3053. <strong style={{ color: "#f00" }}>*</strong>
  3054. 发票类型
  3055. </span>
  3056. }
  3057. >
  3058. <span>
  3059. {this.state.invoiceType === 0
  3060. ? "增值税专用发票"
  3061. : this.state.invoiceType === 1
  3062. ? "增值税普通发票"
  3063. : "其他"}
  3064. </span>
  3065. </FormItem>
  3066. </div>
  3067. <div className="clearfix">
  3068. <FormItem
  3069. className="half-item"
  3070. {...formItemLayout}
  3071. label={
  3072. <span>
  3073. <strong style={{ color: "#f00" }}>*</strong>
  3074. 单位名称
  3075. </span>
  3076. }
  3077. >
  3078. <span>{this.state.unitName}</span>
  3079. </FormItem>
  3080. <FormItem
  3081. className="half-item"
  3082. {...formItemLayout}
  3083. label={
  3084. <span>
  3085. <strong style={{ color: "#f00" }}>*</strong>税号
  3086. </span>
  3087. }
  3088. >
  3089. <span>{this.state.taxNumber}</span>
  3090. </FormItem>
  3091. <FormItem
  3092. className="half-item"
  3093. {...formItemLayout}
  3094. label={
  3095. <span>
  3096. <strong style={{ color: "#f00" }}>*</strong>
  3097. 开票金额(万元)
  3098. </span>
  3099. }
  3100. >
  3101. <span>{this.state.amount}</span>
  3102. </FormItem>
  3103. <FormItem
  3104. className="half-item"
  3105. {...formItemLayout}
  3106. label={
  3107. <span>
  3108. <strong style={{ color: "#f00" }}>*</strong>
  3109. 开户行银行账号
  3110. </span>
  3111. }
  3112. >
  3113. <span>{this.state.banks}</span>
  3114. </FormItem>
  3115. <FormItem
  3116. className="half-item"
  3117. {...formItemLayout}
  3118. label={
  3119. <span>
  3120. <strong style={{ color: "#f00" }}>*</strong>
  3121. 开票内容及说明
  3122. </span>
  3123. }
  3124. >
  3125. <span>{this.state.content}</span>
  3126. </FormItem>
  3127. <FormItem
  3128. className="half-item"
  3129. {...formItemLayout}
  3130. label={
  3131. <span>
  3132. <strong style={{ color: "#f00" }}>*</strong>
  3133. 单位地址
  3134. </span>
  3135. }
  3136. >
  3137. <span>{this.state.unitAddress}</span>
  3138. </FormItem>
  3139. <FormItem
  3140. className="half-item"
  3141. {...formItemLayout}
  3142. label="备注"
  3143. >
  3144. <span>{this.state.invoiceRemarks}</span>
  3145. </FormItem>
  3146. <FormItem
  3147. className="half-item"
  3148. {...formItemLayout}
  3149. label={
  3150. <span>
  3151. <strong style={{ color: "#f00" }}>*</strong>
  3152. 单位电话
  3153. </span>
  3154. }
  3155. >
  3156. <span>{this.state.unitMobile}</span>
  3157. </FormItem>
  3158. </div>
  3159. <div className="clearfix">
  3160. <FormItem
  3161. labelCol={{ span: 4 }}
  3162. wrapperCol={{ span: 18 }}
  3163. label={
  3164. <span>
  3165. <strong style={{ color: "#f00" }}>*</strong>附件
  3166. </span>
  3167. }
  3168. >
  3169. <Upload
  3170. className="demandDetailShow-upload"
  3171. listType="picture-card"
  3172. fileList={this.state.orgCodeUrl}
  3173. onPreview={file => {
  3174. this.setState({
  3175. previewImage: file.url || file.thumbUrl,
  3176. previewVisible: true
  3177. });
  3178. }}
  3179. />
  3180. {/*<div style={{paddingTop:'10px',paddingBottom:'10px'}}>*/}
  3181. {/* <ImgList fileList={this.state.orgCodeUrl} ItemWidth={'96px'}/>*/}
  3182. {/*</div>*/}
  3183. <Modal
  3184. maskClosable={false}
  3185. footer={null}
  3186. visible={this.state.previewVisible}
  3187. onCancel={() => {
  3188. this.setState({ previewVisible: false });
  3189. }}
  3190. >
  3191. <img
  3192. alt=""
  3193. style={{ width: "100%" }}
  3194. src={this.state.previewImage || ""}
  3195. />
  3196. </Modal>
  3197. </FormItem>
  3198. </div>
  3199. <hr
  3200. style={{
  3201. border: "1px dashed #aaa",
  3202. width: "90%",
  3203. margin: "auto"
  3204. }}
  3205. />
  3206. <div className="clearfix" style={{ marginTop: "10px" }}>
  3207. <FormItem
  3208. className="half-item"
  3209. {...formItemLayout}
  3210. label="发票是否邮寄:"
  3211. >
  3212. <span>{this.state.post === 0 ? "是" : "否"}</span>
  3213. </FormItem>
  3214. </div>
  3215. {this.state.post === 0 ? (
  3216. <div>
  3217. <div className="clearfix">
  3218. <FormItem
  3219. className="half-item"
  3220. {...formItemLayout}
  3221. label="收信人姓名"
  3222. >
  3223. <span>{this.state.addressee}</span>
  3224. </FormItem>
  3225. <FormItem
  3226. className="half-item"
  3227. {...formItemLayout}
  3228. label="电话"
  3229. >
  3230. <span>{this.state.addresseeMobile}</span>
  3231. </FormItem>
  3232. </div>
  3233. <div className="clearfix">
  3234. <FormItem
  3235. className="half-item"
  3236. {...formItemLayout}
  3237. label="省-市-区"
  3238. >
  3239. <span>
  3240. {getprovince(this.state.addresseeProvince)}/
  3241. {getprovince(this.state.addresseeCity)}/
  3242. {getprovince(this.state.addresseeArea)}
  3243. </span>
  3244. </FormItem>
  3245. </div>
  3246. <div className="clearfix">
  3247. <FormItem
  3248. className="half-item"
  3249. {...formItemLayout}
  3250. label="详细地址"
  3251. >
  3252. <span>{this.state.recipientAddress}</span>
  3253. </FormItem>
  3254. </div>
  3255. </div>
  3256. ) : (
  3257. ""
  3258. )}
  3259. </div>
  3260. <FormItem
  3261. className="half-item"
  3262. {...formItemLayout}
  3263. label={
  3264. <span>
  3265. <strong style={{ color: "#f00" }}>*</strong>
  3266. 开票金额总计
  3267. </span>
  3268. }
  3269. >
  3270. <span>{this.state.alreadyAmount}万元</span>
  3271. </FormItem>
  3272. </Spin>
  3273. </Form>
  3274. </Modal>
  3275. {/* <Modal
  3276. visible={this.state.bvisible}
  3277. footer=""
  3278. title="开票历史记录"
  3279. className="admin-desc-content"
  3280. width="900px"
  3281. onCancel={this.inRecordCanl}
  3282. >
  3283. <Spin spinning={this.state.loading}>
  3284. <div
  3285. className="patent-table"
  3286. ref={e => {
  3287. this.refs.kaiPiao = e;
  3288. }}
  3289. >
  3290. <Table
  3291. columns={this.state.columnsDate}
  3292. dataSource={this.state.recordData}
  3293. pagination={false}
  3294. bordered
  3295. />
  3296. <div className="clearfix" style={{ marginTop: "20px" }}>
  3297. <FormItem
  3298. className="half-item"
  3299. {...formItemLayout}
  3300. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  3301. >
  3302. <span>{this.state.sum + "(万元)"}</span>
  3303. </FormItem>
  3304. </div>
  3305. <ReactToPrint
  3306. trigger={() => (
  3307. <Button
  3308. type="primary"
  3309. style={{
  3310. float: "right",
  3311. // marginTop: 10,
  3312. position: "absolute",
  3313. top: -54,
  3314. right: 30
  3315. }}
  3316. >
  3317. 打印
  3318. </Button>
  3319. )}
  3320. content={() => this.refs.kaiPiao}
  3321. />
  3322. </div>
  3323. </Spin>
  3324. </Modal> */}
  3325. <Modal
  3326. visible={this.state.cuiVisible}
  3327. footer=""
  3328. title="催款详情"
  3329. className="admin-desc-content"
  3330. width="1300px"
  3331. pagination={false}
  3332. onCancel={() => {
  3333. // this.loadData();
  3334. this.setState({
  3335. cuiVisible: false
  3336. });
  3337. }}
  3338. >
  3339. <Spin spinning={this.state.loading}>
  3340. <div
  3341. className="patent-table"
  3342. style={
  3343. {
  3344. // width: 900,
  3345. // position: "relative",
  3346. // left: "50%",
  3347. // transform: "translate(-50%)",
  3348. // padding: "25px 0 30px 30px"
  3349. }
  3350. }
  3351. ref={e => {
  3352. this.refs.all = e;
  3353. }}
  3354. >
  3355. <Table
  3356. columns={this.state.cuiColumns}
  3357. dataSource={this.state.cuiDataList}
  3358. scroll={{ x: "max-content", y: 0 }}
  3359. pagination={false}
  3360. bordered
  3361. size="small"
  3362. />
  3363. </div>
  3364. </Spin>
  3365. <ReactToPrint
  3366. trigger={() => (
  3367. <Button
  3368. type="primary"
  3369. style={{
  3370. float: "right",
  3371. marginTop: 10,
  3372. position: "absolute",
  3373. top: 0,
  3374. right: 30
  3375. }}
  3376. >
  3377. 打印
  3378. </Button>
  3379. )}
  3380. content={() => this.refs.all}
  3381. />
  3382. </Modal>
  3383. <Modal
  3384. visible={this.state.proVisible}
  3385. footer=""
  3386. title="项目进度"
  3387. className="admin-desc-content"
  3388. width="1300px"
  3389. pagination={false}
  3390. onCancel={() => {
  3391. // this.loadData();
  3392. this.setState({
  3393. proVisible: false
  3394. });
  3395. }}
  3396. >
  3397. <Spin spinning={this.state.loading}>
  3398. <Project
  3399. record={this.state.record}
  3400. visible={this.state.pvisible}
  3401. cancel={() => {
  3402. this.setState({ pvisible: false });
  3403. }}
  3404. />
  3405. <div
  3406. className="patent-table"
  3407. ref={e => {
  3408. this.refs.all = e;
  3409. }}
  3410. >
  3411. <Table
  3412. columns={this.state.proColumns}
  3413. dataSource={this.state.proDataList}
  3414. onRowClick={this.tableRowClickPro}
  3415. pagination={false}
  3416. bordered
  3417. size="small"
  3418. />
  3419. </div>
  3420. {/* <span style={{ display: "block", marginTop: 10, color: "red" }}>
  3421. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  3422. </span> */}
  3423. </Spin>
  3424. <ReactToPrint
  3425. trigger={() => (
  3426. <Button
  3427. type="primary"
  3428. style={{
  3429. float: "right",
  3430. marginTop: 10,
  3431. position: "absolute",
  3432. top: 0,
  3433. right: 30
  3434. }}
  3435. >
  3436. 打印
  3437. </Button>
  3438. )}
  3439. content={() => this.refs.all}
  3440. />
  3441. </Modal>
  3442. </div>
  3443. </div>
  3444. );
  3445. }
  3446. })
  3447. );
  3448. export default MyService;