billing.jsx 126 KB

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