billing.jsx 127 KB

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