billing.jsx 127 KB

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