inquiry.jsx 151 KB

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