billing.jsx 122 KB

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