billing.jsx 120 KB

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