billing.jsx 117 KB

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