billing.jsx 125 KB

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