billing.jsx 125 KB

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