billing.jsx 125 KB

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