billing.jsx 127 KB

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