billing.jsx 126 KB

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