billing.jsx 127 KB

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