billing.jsx 123 KB

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