billing.jsx 118 KB

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