billing.jsx 127 KB

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