billing.jsx 127 KB

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