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