billing.jsx 126 KB

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