billing.jsx 127 KB

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