billing.jsx 118 KB

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