billing.jsx 116 KB

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