billing.jsx 126 KB

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