billing.jsx 117 KB

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