billing.jsx 118 KB

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