billing.jsx 125 KB

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