inquiry.jsx 152 KB

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