billing.jsx 126 KB

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