billing.jsx 126 KB

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