billing.jsx 126 KB

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