billing.jsx 125 KB

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