billing.jsx 126 KB

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