billing.jsx 129 KB

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