billing.jsx 117 KB

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