billing.jsx 127 KB

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